Gateway: per-watch notification switches, model list for new threads, and Ask before acting
Gateway / check (push) Successful in 9s
Gateway / image (push) Successful in 21s

This commit is contained in:
gib committed 2026-11-02 12:02:53 -05:00
1 parent a5222e14e8
commit 3cc7e40852
14 files changed
+472 -20

No files matched your search

+35
View File
@@ -68,9 +68,21 @@ export interface StatusResponse {
/** True once the watch has sent its APNs token. */
pushRegistered: boolean;
apnsEnvironment: "sandbox" | "production" | null;
notifications: NotificationPrefs;
};
}
/**
* Which pushes a watch wants. `needsMe` covers approvals and questions on your own threads, and
* `subagents` covers the same from subagents. Host problems and test pushes always go out.
*/
export interface NotificationPrefs {
needsMe: boolean;
finished: boolean;
failed: boolean;
subagents: boolean;
}
/** Something a thread is waiting on: an approval, or questions for the user. */
export interface PendingRequest {
id: string;
@@ -157,6 +169,12 @@ export interface ThreadDetail {
messages: Message[];
/** True while a run is active, so Stop makes sense. */
canStop: boolean;
/** True when the thread runs in approval-required mode, asking before each action. */
askFirst: boolean;
}
export interface ThreadModeRequest {
askFirst: boolean;
}
export interface ProjectsResponse {
@@ -167,11 +185,24 @@ export interface ProjectsResponse {
title: string;
/** The model a new thread will use, such as `claude-opus-5-5`. Null when none is configured. */
model: string | null;
/** The provider instance `model` belongs to, matching an entry in `providers`. */
instanceId: string | null;
}>;
/** The providers on this host that can start a thread now, each with its models. */
providers: AgentProvider[];
}
>;
}
export interface AgentProvider {
instanceId: string;
/** Such as `Claude` or `Codex`. */
name: string;
/** False when the provider cannot run in approval-required mode. */
canAskFirst: boolean;
models: Array<{ slug: string; name: string }>;
}
export interface PairRequest {
code: string;
deviceName: string;
@@ -200,6 +231,10 @@ export interface NewThreadRequest {
hostId: string;
projectId: string;
text: string;
/** A model from the host's `providers`. Absent uses the project's default. */
model?: { instanceId: string; slug: string };
/** Starts the thread in approval-required mode. Absent or false uses the host's default mode. */
askFirst?: boolean;
}
export interface NewThreadResponse {