@linkshell/host 0.4.69 → 0.4.71

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/dist/host/src/acp-settings.js +1 -1
  2. package/dist/host/src/acp-settings.js.map +1 -1
  3. package/dist/host/src/computer-preview.d.ts +1 -9
  4. package/dist/host/src/drivers/acp/antigravity.d.ts +13 -0
  5. package/dist/host/src/drivers/acp/antigravity.js +13 -0
  6. package/dist/host/src/drivers/acp/antigravity.js.map +1 -1
  7. package/dist/host/src/drivers/acp/driver.d.ts +14 -1
  8. package/dist/host/src/drivers/acp/driver.js +45 -3
  9. package/dist/host/src/drivers/acp/driver.js.map +1 -1
  10. package/dist/host/src/drivers/acp/mapper.d.ts +2 -0
  11. package/dist/host/src/drivers/acp/mapper.js +6 -1
  12. package/dist/host/src/drivers/acp/mapper.js.map +1 -1
  13. package/dist/host/src/drivers/acp/questions.js +2 -2
  14. package/dist/host/src/drivers/acp/questions.js.map +1 -1
  15. package/dist/host/src/drivers/claude/app-sessions.d.ts +58 -0
  16. package/dist/host/src/drivers/claude/app-sessions.js +183 -0
  17. package/dist/host/src/drivers/claude/app-sessions.js.map +1 -0
  18. package/dist/host/src/drivers/claude/driver.d.ts +22 -1
  19. package/dist/host/src/drivers/claude/driver.js +99 -11
  20. package/dist/host/src/drivers/claude/driver.js.map +1 -1
  21. package/dist/host/src/drivers/claude/holders.d.ts +3 -1
  22. package/dist/host/src/drivers/claude/holders.js +4 -0
  23. package/dist/host/src/drivers/claude/holders.js.map +1 -1
  24. package/dist/host/src/drivers/claude/routing.d.ts +19 -0
  25. package/dist/host/src/drivers/claude/routing.js +145 -0
  26. package/dist/host/src/drivers/claude/routing.js.map +1 -0
  27. package/dist/host/src/drivers/claude/tasks.d.ts +3 -3
  28. package/dist/host/src/drivers/claude/transcript.d.ts +393 -348
  29. package/dist/host/src/drivers/claude/transcript.js +97 -22
  30. package/dist/host/src/drivers/claude/transcript.js.map +1 -1
  31. package/dist/host/src/drivers/codex/driver.d.ts +15 -0
  32. package/dist/host/src/drivers/codex/driver.js +47 -9
  33. package/dist/host/src/drivers/codex/driver.js.map +1 -1
  34. package/dist/host/src/drivers/codex/mapper.d.ts +41 -7
  35. package/dist/host/src/drivers/codex/mapper.js +167 -26
  36. package/dist/host/src/drivers/codex/mapper.js.map +1 -1
  37. package/dist/host/src/drivers/codex/mcp-apps.d.ts +69 -0
  38. package/dist/host/src/drivers/codex/mcp-apps.js +340 -0
  39. package/dist/host/src/drivers/codex/mcp-apps.js.map +1 -0
  40. package/dist/host/src/drivers/codex/settings.d.ts +13 -0
  41. package/dist/host/src/drivers/codex/settings.js +22 -6
  42. package/dist/host/src/drivers/codex/settings.js.map +1 -1
  43. package/dist/host/src/drivers/types.d.ts +50 -1
  44. package/dist/host/src/fs.d.ts +9 -9
  45. package/dist/host/src/hub.d.ts +118 -81
  46. package/dist/host/src/hub.js +157 -13
  47. package/dist/host/src/hub.js.map +1 -1
  48. package/dist/host/src/input.d.ts +43 -89
  49. package/dist/host/src/input.js +1 -1
  50. package/dist/host/src/input.js.map +1 -1
  51. package/dist/host/src/rpc/mcp.d.ts +8 -0
  52. package/dist/host/src/rpc/mcp.js +33 -0
  53. package/dist/host/src/rpc/mcp.js.map +1 -0
  54. package/dist/host/src/rpc/server.js +16 -2
  55. package/dist/host/src/rpc/server.js.map +1 -1
  56. package/dist/host/src/screen-session.d.ts +3 -17
  57. package/dist/host/src/screen-session.js +2 -2
  58. package/dist/host/src/screen-session.js.map +1 -1
  59. package/dist/host/src/store.d.ts +7 -0
  60. package/dist/host/src/store.js +27 -3
  61. package/dist/host/src/store.js.map +1 -1
  62. package/dist/host/src/terminals.d.ts +12 -6
  63. package/dist/host/src/terminals.js +29 -2
  64. package/dist/host/src/terminals.js.map +1 -1
  65. package/dist/host/src/usage.d.ts +5 -0
  66. package/dist/host/src/usage.js +10 -2
  67. package/dist/host/src/usage.js.map +1 -1
  68. package/dist/host/tsconfig.tsbuildinfo +1 -1
  69. package/dist/wire/src/acp.d.ts +68 -430
  70. package/dist/wire/src/acp.js +5 -5
  71. package/dist/wire/src/acp.js.map +1 -1
  72. package/dist/wire/src/async-questions.d.ts +2 -10
  73. package/dist/wire/src/computer-preview.d.ts +1 -15
  74. package/dist/wire/src/computer-preview.js +1 -1
  75. package/dist/wire/src/computer-preview.js.map +1 -1
  76. package/dist/wire/src/content.d.ts +207 -372
  77. package/dist/wire/src/content.js +4 -4
  78. package/dist/wire/src/content.js.map +1 -1
  79. package/dist/wire/src/editor.d.ts +48 -592
  80. package/dist/wire/src/envelopes.d.ts +53 -0
  81. package/dist/wire/src/envelopes.js +263 -0
  82. package/dist/wire/src/envelopes.js.map +1 -0
  83. package/dist/wire/src/goal.d.ts +15 -48
  84. package/dist/wire/src/index.d.ts +2 -0
  85. package/dist/wire/src/index.js +2 -0
  86. package/dist/wire/src/index.js.map +1 -1
  87. package/dist/wire/src/live-activity.d.ts +83 -212
  88. package/dist/wire/src/live-activity.js +1 -1
  89. package/dist/wire/src/live-activity.js.map +1 -1
  90. package/dist/wire/src/model.d.ts +458 -2281
  91. package/dist/wire/src/model.js +24 -0
  92. package/dist/wire/src/model.js.map +1 -1
  93. package/dist/wire/src/relay.d.ts +41 -267
  94. package/dist/wire/src/relay.js +1 -1
  95. package/dist/wire/src/relay.js.map +1 -1
  96. package/dist/wire/src/rpc-mcp.d.ts +84 -0
  97. package/dist/wire/src/rpc-mcp.js +78 -0
  98. package/dist/wire/src/rpc-mcp.js.map +1 -0
  99. package/dist/wire/src/rpc.d.ts +6891 -31073
  100. package/dist/wire/src/rpc.js +35 -7
  101. package/dist/wire/src/rpc.js.map +1 -1
  102. package/dist/wire/src/side.d.ts +13 -61
  103. package/dist/wire/src/updates.d.ts +1771 -6680
  104. package/dist/wire/src/updates.js +14 -1
  105. package/dist/wire/src/updates.js.map +1 -1
  106. package/dist/wire/src/usage.d.ts +17 -195
  107. package/dist/wire/src/watch.d.ts +223 -1141
  108. package/dist/wire/src/workflow.d.ts +46 -139
  109. package/package.json +4 -4
@@ -9,54 +9,26 @@ import { z } from "zod";
9
9
  * - remote: structured control only; the desktop uses LinkShell's own UI.
10
10
  * - terminal: PTY only.
11
11
  */
12
- export declare const agentTierSchema: z.ZodEnum<["multi_client", "handoff", "remote", "terminal"]>;
12
+ export declare const agentTierSchema: z.ZodEnum<{
13
+ terminal: "terminal";
14
+ remote: "remote";
15
+ multi_client: "multi_client";
16
+ handoff: "handoff";
17
+ }>;
13
18
  export type AgentTier = z.infer<typeof agentTierSchema>;
14
19
  export declare const agentCapabilitiesSchema: z.ZodObject<{
15
20
  interrupt: z.ZodBoolean;
16
- /** Inject a message into a running turn instead of queueing it. */
17
21
  steer: z.ZodBoolean;
18
22
  permissions: z.ZodBoolean;
19
23
  images: z.ZodBoolean;
20
24
  audio: z.ZodOptional<z.ZodBoolean>;
21
25
  embeddedContext: z.ZodOptional<z.ZodBoolean>;
22
- /** Host-managed ACP settings and optional protocol features. */
23
26
  acp: z.ZodOptional<z.ZodBoolean>;
24
- /**
25
- * The agent forks sessions itself, keeping everything it knew. Every agent's
26
- * sessions can be forked: without this (or from a single reply, where the
27
- * agent only forks whole sessions) LinkShell makes the fork — the new session
28
- * shows the conversation and its agent is told it as text.
29
- */
30
27
  fork: z.ZodBoolean;
31
- /** The agent has a side conversation of its own (`sessions.side`). Absent from older hosts. */
32
28
  side: z.ZodOptional<z.ZodBoolean>;
33
29
  models: z.ZodBoolean;
34
30
  modes: z.ZodBoolean;
35
- }, "strip", z.ZodTypeAny, {
36
- interrupt: boolean;
37
- steer: boolean;
38
- permissions: boolean;
39
- images: boolean;
40
- fork: boolean;
41
- models: boolean;
42
- modes: boolean;
43
- audio?: boolean | undefined;
44
- embeddedContext?: boolean | undefined;
45
- acp?: boolean | undefined;
46
- side?: boolean | undefined;
47
- }, {
48
- interrupt: boolean;
49
- steer: boolean;
50
- permissions: boolean;
51
- images: boolean;
52
- fork: boolean;
53
- models: boolean;
54
- modes: boolean;
55
- audio?: boolean | undefined;
56
- embeddedContext?: boolean | undefined;
57
- acp?: boolean | undefined;
58
- side?: boolean | undefined;
59
- }>;
31
+ }, z.core.$strip>;
60
32
  export type AgentCapabilities = z.infer<typeof agentCapabilitiesSchema>;
61
33
  /**
62
34
  * How the agent authenticates on this machine, as the agent itself reports it
@@ -64,180 +36,115 @@ export type AgentCapabilities = z.infer<typeof agentCapabilitiesSchema>;
64
36
  * the credentials; it runs agents with the user's own environment and config.
65
37
  */
66
38
  export declare const agentAuthSchema: z.ZodObject<{
67
- state: z.ZodEnum<["ok", "missing", "unknown"]>;
68
- /** e.g. "claude.ai", "api_key", "oauth_token", "chatgpt", "bedrock". */
39
+ state: z.ZodEnum<{
40
+ unknown: "unknown";
41
+ ok: "ok";
42
+ missing: "missing";
43
+ }>;
69
44
  method: z.ZodOptional<z.ZodString>;
70
- /** What the user should do when state is "missing". */
71
45
  hint: z.ZodOptional<z.ZodString>;
72
- }, "strip", z.ZodTypeAny, {
73
- state: "unknown" | "ok" | "missing";
74
- hint?: string | undefined;
75
- method?: string | undefined;
76
- }, {
77
- state: "unknown" | "ok" | "missing";
78
- hint?: string | undefined;
79
- method?: string | undefined;
80
- }>;
46
+ }, z.core.$strip>;
81
47
  export type AgentAuth = z.infer<typeof agentAuthSchema>;
82
48
  export declare const agentInfoSchema: z.ZodObject<{
83
49
  id: z.ZodString;
84
50
  label: z.ZodString;
85
- tier: z.ZodEnum<["multi_client", "handoff", "remote", "terminal"]>;
51
+ tier: z.ZodEnum<{
52
+ terminal: "terminal";
53
+ remote: "remote";
54
+ multi_client: "multi_client";
55
+ handoff: "handoff";
56
+ }>;
86
57
  installed: z.ZodBoolean;
87
58
  version: z.ZodOptional<z.ZodString>;
88
- /** Human-readable reason when the agent is installed but unusable. */
89
59
  problem: z.ZodOptional<z.ZodString>;
90
60
  auth: z.ZodOptional<z.ZodObject<{
91
- state: z.ZodEnum<["ok", "missing", "unknown"]>;
92
- /** e.g. "claude.ai", "api_key", "oauth_token", "chatgpt", "bedrock". */
61
+ state: z.ZodEnum<{
62
+ unknown: "unknown";
63
+ ok: "ok";
64
+ missing: "missing";
65
+ }>;
93
66
  method: z.ZodOptional<z.ZodString>;
94
- /** What the user should do when state is "missing". */
95
67
  hint: z.ZodOptional<z.ZodString>;
96
- }, "strip", z.ZodTypeAny, {
97
- state: "unknown" | "ok" | "missing";
98
- hint?: string | undefined;
99
- method?: string | undefined;
100
- }, {
101
- state: "unknown" | "ok" | "missing";
102
- hint?: string | undefined;
103
- method?: string | undefined;
104
- }>>;
68
+ }, z.core.$strip>>;
105
69
  capabilities: z.ZodObject<{
106
70
  interrupt: z.ZodBoolean;
107
- /** Inject a message into a running turn instead of queueing it. */
108
71
  steer: z.ZodBoolean;
109
72
  permissions: z.ZodBoolean;
110
73
  images: z.ZodBoolean;
111
74
  audio: z.ZodOptional<z.ZodBoolean>;
112
75
  embeddedContext: z.ZodOptional<z.ZodBoolean>;
113
- /** Host-managed ACP settings and optional protocol features. */
114
76
  acp: z.ZodOptional<z.ZodBoolean>;
115
- /**
116
- * The agent forks sessions itself, keeping everything it knew. Every agent's
117
- * sessions can be forked: without this (or from a single reply, where the
118
- * agent only forks whole sessions) LinkShell makes the fork — the new session
119
- * shows the conversation and its agent is told it as text.
120
- */
121
77
  fork: z.ZodBoolean;
122
- /** The agent has a side conversation of its own (`sessions.side`). Absent from older hosts. */
123
78
  side: z.ZodOptional<z.ZodBoolean>;
124
79
  models: z.ZodBoolean;
125
80
  modes: z.ZodBoolean;
126
- }, "strip", z.ZodTypeAny, {
127
- interrupt: boolean;
128
- steer: boolean;
129
- permissions: boolean;
130
- images: boolean;
131
- fork: boolean;
132
- models: boolean;
133
- modes: boolean;
134
- audio?: boolean | undefined;
135
- embeddedContext?: boolean | undefined;
136
- acp?: boolean | undefined;
137
- side?: boolean | undefined;
138
- }, {
139
- interrupt: boolean;
140
- steer: boolean;
141
- permissions: boolean;
142
- images: boolean;
143
- fork: boolean;
144
- models: boolean;
145
- modes: boolean;
146
- audio?: boolean | undefined;
147
- embeddedContext?: boolean | undefined;
148
- acp?: boolean | undefined;
149
- side?: boolean | undefined;
150
- }>;
151
- }, "strip", z.ZodTypeAny, {
152
- id: string;
153
- label: string;
154
- tier: "terminal" | "remote" | "multi_client" | "handoff";
155
- installed: boolean;
156
- capabilities: {
157
- interrupt: boolean;
158
- steer: boolean;
159
- permissions: boolean;
160
- images: boolean;
161
- fork: boolean;
162
- models: boolean;
163
- modes: boolean;
164
- audio?: boolean | undefined;
165
- embeddedContext?: boolean | undefined;
166
- acp?: boolean | undefined;
167
- side?: boolean | undefined;
168
- };
169
- version?: string | undefined;
170
- problem?: string | undefined;
171
- auth?: {
172
- state: "unknown" | "ok" | "missing";
173
- hint?: string | undefined;
174
- method?: string | undefined;
175
- } | undefined;
176
- }, {
177
- id: string;
178
- label: string;
179
- tier: "terminal" | "remote" | "multi_client" | "handoff";
180
- installed: boolean;
181
- capabilities: {
182
- interrupt: boolean;
183
- steer: boolean;
184
- permissions: boolean;
185
- images: boolean;
186
- fork: boolean;
187
- models: boolean;
188
- modes: boolean;
189
- audio?: boolean | undefined;
190
- embeddedContext?: boolean | undefined;
191
- acp?: boolean | undefined;
192
- side?: boolean | undefined;
193
- };
194
- version?: string | undefined;
195
- problem?: string | undefined;
196
- auth?: {
197
- state: "unknown" | "ok" | "missing";
198
- hint?: string | undefined;
199
- method?: string | undefined;
200
- } | undefined;
201
- }>;
81
+ }, z.core.$strip>;
82
+ }, z.core.$strip>;
202
83
  export type AgentInfo = z.infer<typeof agentInfoSchema>;
203
84
  /**
204
85
  * Who is driving a handoff session right now: the desktop's native UI, this
205
86
  * host on behalf of a device, or nobody (either side can continue).
206
87
  */
207
- export declare const sessionDriverSchema: z.ZodEnum<["desktop", "remote", "none"]>;
88
+ export declare const sessionDriverSchema: z.ZodEnum<{
89
+ desktop: "desktop";
90
+ remote: "remote";
91
+ none: "none";
92
+ }>;
208
93
  export type SessionDriver = z.infer<typeof sessionDriverSchema>;
209
- export declare const sessionStateSchema: z.ZodEnum<["idle", "running", "waiting", "error", "offline", "unknown"]>;
94
+ export declare const sessionStateSchema: z.ZodEnum<{
95
+ error: "error";
96
+ unknown: "unknown";
97
+ running: "running";
98
+ idle: "idle";
99
+ waiting: "waiting";
100
+ offline: "offline";
101
+ }>;
210
102
  export type SessionState = z.infer<typeof sessionStateSchema>;
211
- export declare const toolKindSchema: z.ZodEnum<["read", "edit", "delete", "move", "search", "execute", "think", "fetch", "switch_mode", "other"]>;
103
+ export declare const toolKindSchema: z.ZodEnum<{
104
+ search: "search";
105
+ delete: "delete";
106
+ other: "other";
107
+ read: "read";
108
+ edit: "edit";
109
+ move: "move";
110
+ execute: "execute";
111
+ think: "think";
112
+ fetch: "fetch";
113
+ switch_mode: "switch_mode";
114
+ }>;
212
115
  export type ToolKind = z.infer<typeof toolKindSchema>;
213
116
  export declare const permissionOptionSchema: z.ZodObject<{
214
117
  optionId: z.ZodString;
215
118
  name: z.ZodString;
216
- kind: z.ZodEnum<["allow_once", "allow_always", "reject_once", "reject_always"]>;
217
- }, "strip", z.ZodTypeAny, {
218
- name: string;
219
- kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
220
- optionId: string;
221
- }, {
222
- name: string;
223
- kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
224
- optionId: string;
225
- }>;
119
+ kind: z.ZodEnum<{
120
+ allow_once: "allow_once";
121
+ allow_always: "allow_always";
122
+ reject_once: "reject_once";
123
+ reject_always: "reject_always";
124
+ }>;
125
+ }, z.core.$strip>;
226
126
  export type PermissionOption = z.infer<typeof permissionOptionSchema>;
227
127
  /** What a running session is doing right now, for list rows. Live only. */
228
128
  export declare const sessionActivitySchema: z.ZodObject<{
229
- kind: z.ZodEnum<["thinking", "responding", "tool"]>;
129
+ kind: z.ZodEnum<{
130
+ tool: "tool";
131
+ thinking: "thinking";
132
+ responding: "responding";
133
+ }>;
230
134
  title: z.ZodOptional<z.ZodString>;
231
- toolKind: z.ZodOptional<z.ZodEnum<["read", "edit", "delete", "move", "search", "execute", "think", "fetch", "switch_mode", "other"]>>;
232
- }, "strip", z.ZodTypeAny, {
233
- kind: "tool" | "thinking" | "responding";
234
- title?: string | undefined;
235
- toolKind?: "search" | "delete" | "other" | "read" | "edit" | "move" | "execute" | "think" | "fetch" | "switch_mode" | undefined;
236
- }, {
237
- kind: "tool" | "thinking" | "responding";
238
- title?: string | undefined;
239
- toolKind?: "search" | "delete" | "other" | "read" | "edit" | "move" | "execute" | "think" | "fetch" | "switch_mode" | undefined;
240
- }>;
135
+ toolKind: z.ZodOptional<z.ZodEnum<{
136
+ search: "search";
137
+ delete: "delete";
138
+ other: "other";
139
+ read: "read";
140
+ edit: "edit";
141
+ move: "move";
142
+ execute: "execute";
143
+ think: "think";
144
+ fetch: "fetch";
145
+ switch_mode: "switch_mode";
146
+ }>>;
147
+ }, z.core.$strip>;
241
148
  export type SessionActivity = z.infer<typeof sessionActivitySchema>;
242
149
  /** The oldest unanswered permission request, so lists can offer approval inline. Live only. */
243
150
  /**
@@ -248,7 +155,13 @@ export type SessionActivity = z.infer<typeof sessionActivitySchema>;
248
155
  export declare const questionSchema: z.ZodObject<{
249
156
  id: z.ZodString;
250
157
  constraints: z.ZodOptional<z.ZodObject<{
251
- type: z.ZodEnum<["string", "number", "integer", "boolean", "array"]>;
158
+ type: z.ZodEnum<{
159
+ string: "string";
160
+ number: "number";
161
+ boolean: "boolean";
162
+ array: "array";
163
+ integer: "integer";
164
+ }>;
252
165
  minimum: z.ZodOptional<z.ZodNumber>;
253
166
  maximum: z.ZodOptional<z.ZodNumber>;
254
167
  minLength: z.ZodOptional<z.ZodNumber>;
@@ -257,118 +170,30 @@ export declare const questionSchema: z.ZodObject<{
257
170
  maxItems: z.ZodOptional<z.ZodNumber>;
258
171
  pattern: z.ZodOptional<z.ZodString>;
259
172
  format: z.ZodOptional<z.ZodString>;
260
- }, "strip", z.ZodTypeAny, {
261
- type: "string" | "number" | "boolean" | "integer" | "array";
262
- minimum?: number | undefined;
263
- maximum?: number | undefined;
264
- minLength?: number | undefined;
265
- maxLength?: number | undefined;
266
- minItems?: number | undefined;
267
- maxItems?: number | undefined;
268
- pattern?: string | undefined;
269
- format?: string | undefined;
270
- }, {
271
- type: "string" | "number" | "boolean" | "integer" | "array";
272
- minimum?: number | undefined;
273
- maximum?: number | undefined;
274
- minLength?: number | undefined;
275
- maxLength?: number | undefined;
276
- minItems?: number | undefined;
277
- maxItems?: number | undefined;
278
- pattern?: string | undefined;
279
- format?: string | undefined;
280
- }>>;
281
- defaults: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
282
- /** A short label for the question ("Auth method"). */
173
+ }, z.core.$strip>>;
174
+ defaults: z.ZodOptional<z.ZodArray<z.ZodString>>;
283
175
  header: z.ZodOptional<z.ZodString>;
284
176
  text: z.ZodString;
285
- /** `choice`: one of `options`; `choices`: any number of them; `text`: typed. */
286
- kind: z.ZodEnum<["choice", "choices", "text"]>;
177
+ kind: z.ZodEnum<{
178
+ text: "text";
179
+ choice: "choice";
180
+ choices: "choices";
181
+ }>;
287
182
  options: z.ZodOptional<z.ZodArray<z.ZodObject<{
288
183
  value: z.ZodString;
289
184
  label: z.ZodString;
290
185
  description: z.ZodOptional<z.ZodString>;
291
- }, "strip", z.ZodTypeAny, {
292
- value: string;
293
- label: string;
294
- description?: string | undefined;
295
- }, {
296
- value: string;
297
- label: string;
298
- description?: string | undefined;
299
- }>, "many">>;
300
- /** With options: an answer of the user's own can be typed instead of, or beside, a pick. */
186
+ }, z.core.$strip>>>;
301
187
  other: z.ZodOptional<z.ZodBoolean>;
302
- /** What is typed shouldn't be shown (a token). */
303
188
  secret: z.ZodOptional<z.ZodBoolean>;
304
189
  required: z.ZodOptional<z.ZodBoolean>;
305
- }, "strip", z.ZodTypeAny, {
306
- text: string;
307
- kind: "text" | "choice" | "choices";
308
- id: string;
309
- secret?: boolean | undefined;
310
- options?: {
311
- value: string;
312
- label: string;
313
- description?: string | undefined;
314
- }[] | undefined;
315
- other?: boolean | undefined;
316
- constraints?: {
317
- type: "string" | "number" | "boolean" | "integer" | "array";
318
- minimum?: number | undefined;
319
- maximum?: number | undefined;
320
- minLength?: number | undefined;
321
- maxLength?: number | undefined;
322
- minItems?: number | undefined;
323
- maxItems?: number | undefined;
324
- pattern?: string | undefined;
325
- format?: string | undefined;
326
- } | undefined;
327
- defaults?: string[] | undefined;
328
- header?: string | undefined;
329
- required?: boolean | undefined;
330
- }, {
331
- text: string;
332
- kind: "text" | "choice" | "choices";
333
- id: string;
334
- secret?: boolean | undefined;
335
- options?: {
336
- value: string;
337
- label: string;
338
- description?: string | undefined;
339
- }[] | undefined;
340
- other?: boolean | undefined;
341
- constraints?: {
342
- type: "string" | "number" | "boolean" | "integer" | "array";
343
- minimum?: number | undefined;
344
- maximum?: number | undefined;
345
- minLength?: number | undefined;
346
- maxLength?: number | undefined;
347
- minItems?: number | undefined;
348
- maxItems?: number | undefined;
349
- pattern?: string | undefined;
350
- format?: string | undefined;
351
- } | undefined;
352
- defaults?: string[] | undefined;
353
- header?: string | undefined;
354
- required?: boolean | undefined;
355
- }>;
190
+ }, z.core.$strip>;
356
191
  export type Question = z.infer<typeof questionSchema>;
357
192
  export declare const questionAnswerSchema: z.ZodObject<{
358
193
  id: z.ZodString;
359
- /** The values picked (`choice`: at most one), or what was typed for a `text` question. */
360
- values: z.ZodArray<z.ZodString, "many">;
361
- /** The user's own answer beside the options. */
194
+ values: z.ZodArray<z.ZodString>;
362
195
  other: z.ZodOptional<z.ZodString>;
363
- }, "strip", z.ZodTypeAny, {
364
- values: string[];
365
- id: string;
366
- other?: string | undefined;
367
- }, {
368
- values: string[];
369
- id: string;
370
- other?: string | undefined;
371
- }>;
196
+ }, z.core.$strip>;
372
197
  export type QuestionAnswer = z.infer<typeof questionAnswerSchema>;
373
198
  export declare const pendingPermissionSchema: z.ZodObject<{
374
199
  requestId: z.ZodString;
@@ -378,38 +203,52 @@ export declare const pendingPermissionSchema: z.ZodObject<{
378
203
  detail: z.ZodOptional<z.ZodString>;
379
204
  tool: z.ZodOptional<z.ZodObject<{
380
205
  title: z.ZodOptional<z.ZodString>;
381
- kind: z.ZodOptional<z.ZodEnum<["read", "edit", "delete", "move", "search", "execute", "think", "fetch", "switch_mode", "other"]>>;
206
+ kind: z.ZodOptional<z.ZodEnum<{
207
+ search: "search";
208
+ delete: "delete";
209
+ other: "other";
210
+ read: "read";
211
+ edit: "edit";
212
+ move: "move";
213
+ execute: "execute";
214
+ think: "think";
215
+ fetch: "fetch";
216
+ switch_mode: "switch_mode";
217
+ }>>;
382
218
  rawInput: z.ZodOptional<z.ZodUnknown>;
383
- content: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
219
+ content: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
384
220
  type: z.ZodLiteral<"content">;
385
221
  content: z.ZodType<{
386
222
  type: "text";
387
223
  text: string;
388
- annotations?: z.objectOutputType<{
389
- audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
390
- priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
391
- lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
392
- }, z.ZodTypeAny, "passthrough"> | undefined;
224
+ annotations?: {
225
+ [x: string]: unknown;
226
+ audience?: ("user" | "assistant")[] | undefined;
227
+ priority?: number | undefined;
228
+ lastModified?: string | undefined;
229
+ } | undefined;
393
230
  _meta?: Record<string, unknown> | undefined;
394
231
  } | {
395
232
  type: "image";
396
233
  mimeType: string;
397
- annotations?: z.objectOutputType<{
398
- audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
399
- priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
400
- lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
401
- }, z.ZodTypeAny, "passthrough"> | undefined;
234
+ annotations?: {
235
+ [x: string]: unknown;
236
+ audience?: ("user" | "assistant")[] | undefined;
237
+ priority?: number | undefined;
238
+ lastModified?: string | undefined;
239
+ } | undefined;
402
240
  _meta?: Record<string, unknown> | undefined;
403
241
  data?: string | undefined;
404
242
  uri?: string | undefined;
405
243
  } | {
406
244
  type: "audio";
407
245
  mimeType: string;
408
- annotations?: z.objectOutputType<{
409
- audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
410
- priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
411
- lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
412
- }, z.ZodTypeAny, "passthrough"> | undefined;
246
+ annotations?: {
247
+ [x: string]: unknown;
248
+ audience?: ("user" | "assistant")[] | undefined;
249
+ priority?: number | undefined;
250
+ lastModified?: string | undefined;
251
+ } | undefined;
413
252
  _meta?: Record<string, unknown> | undefined;
414
253
  data?: string | undefined;
415
254
  uri?: string | undefined;
@@ -417,64 +256,66 @@ export declare const pendingPermissionSchema: z.ZodObject<{
417
256
  type: "resource";
418
257
  resource: {
419
258
  uri: string;
420
- text?: string | undefined;
421
- _meta?: Record<string, unknown> | undefined;
422
259
  mimeType?: string | undefined;
260
+ text?: string | undefined;
423
261
  blob?: string | undefined;
424
262
  assetUri?: string | undefined;
263
+ _meta?: Record<string, unknown> | undefined;
425
264
  };
426
- annotations?: z.objectOutputType<{
427
- audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
428
- priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
429
- lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
430
- }, z.ZodTypeAny, "passthrough"> | undefined;
265
+ annotations?: {
266
+ [x: string]: unknown;
267
+ audience?: ("user" | "assistant")[] | undefined;
268
+ priority?: number | undefined;
269
+ lastModified?: string | undefined;
270
+ } | undefined;
431
271
  _meta?: Record<string, unknown> | undefined;
432
272
  } | {
433
273
  type: "resource_link";
434
274
  uri: string;
435
275
  name: string;
436
- annotations?: z.objectOutputType<{
437
- audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
438
- priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
439
- lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
440
- }, z.ZodTypeAny, "passthrough"> | undefined;
276
+ kind?: "file" | "skill" | "agent" | undefined;
277
+ annotations?: {
278
+ [x: string]: unknown;
279
+ audience?: ("user" | "assistant")[] | undefined;
280
+ priority?: number | undefined;
281
+ lastModified?: string | undefined;
282
+ } | undefined;
441
283
  _meta?: Record<string, unknown> | undefined;
442
- mimeType?: string | undefined;
443
284
  title?: string | undefined;
444
285
  description?: string | undefined;
286
+ mimeType?: string | undefined;
445
287
  size?: number | undefined;
446
- kind?: "file" | "skill" | "agent" | undefined;
447
- }, z.ZodTypeDef, unknown>;
448
- }, "strip", z.ZodTypeAny, {
449
- type: "content";
450
- content: {
288
+ }, unknown, z.core.$ZodTypeInternals<{
451
289
  type: "text";
452
290
  text: string;
453
- annotations?: z.objectOutputType<{
454
- audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
455
- priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
456
- lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
457
- }, z.ZodTypeAny, "passthrough"> | undefined;
291
+ annotations?: {
292
+ [x: string]: unknown;
293
+ audience?: ("user" | "assistant")[] | undefined;
294
+ priority?: number | undefined;
295
+ lastModified?: string | undefined;
296
+ } | undefined;
458
297
  _meta?: Record<string, unknown> | undefined;
459
298
  } | {
460
299
  type: "image";
461
300
  mimeType: string;
462
- annotations?: z.objectOutputType<{
463
- audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
464
- priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
465
- lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
466
- }, z.ZodTypeAny, "passthrough"> | undefined;
301
+ annotations?: {
302
+ [x: string]: unknown;
303
+ audience?: ("user" | "assistant")[] | undefined;
304
+ priority?: number | undefined;
305
+ lastModified?: string | undefined;
306
+ } | undefined;
467
307
  _meta?: Record<string, unknown> | undefined;
468
308
  data?: string | undefined;
469
309
  uri?: string | undefined;
470
310
  } | {
471
311
  type: "audio";
472
312
  mimeType: string;
473
- annotations?: z.objectOutputType<{
474
- audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
475
- priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
476
- lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
477
- }, z.ZodTypeAny, "passthrough"> | undefined;
313
+ annotations?: {
314
+ [x: string]: unknown;
315
+ audience?: ("user" | "assistant")[] | undefined;
316
+ priority?: number | undefined;
317
+ lastModified?: string | undefined;
318
+ } | undefined;
478
319
  _meta?: Record<string, unknown> | undefined;
479
320
  data?: string | undefined;
480
321
  uri?: string | undefined;
@@ -482,233 +323,84 @@ export declare const pendingPermissionSchema: z.ZodObject<{
482
323
  type: "resource";
483
324
  resource: {
484
325
  uri: string;
485
- text?: string | undefined;
486
- _meta?: Record<string, unknown> | undefined;
487
326
  mimeType?: string | undefined;
327
+ text?: string | undefined;
488
328
  blob?: string | undefined;
489
329
  assetUri?: string | undefined;
330
+ _meta?: Record<string, unknown> | undefined;
490
331
  };
491
- annotations?: z.objectOutputType<{
492
- audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
493
- priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
494
- lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
495
- }, z.ZodTypeAny, "passthrough"> | undefined;
332
+ annotations?: {
333
+ [x: string]: unknown;
334
+ audience?: ("user" | "assistant")[] | undefined;
335
+ priority?: number | undefined;
336
+ lastModified?: string | undefined;
337
+ } | undefined;
496
338
  _meta?: Record<string, unknown> | undefined;
497
339
  } | {
498
340
  type: "resource_link";
499
341
  uri: string;
500
342
  name: string;
501
- annotations?: z.objectOutputType<{
502
- audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
503
- priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
504
- lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
505
- }, z.ZodTypeAny, "passthrough"> | undefined;
343
+ kind?: "file" | "skill" | "agent" | undefined;
344
+ annotations?: {
345
+ [x: string]: unknown;
346
+ audience?: ("user" | "assistant")[] | undefined;
347
+ priority?: number | undefined;
348
+ lastModified?: string | undefined;
349
+ } | undefined;
506
350
  _meta?: Record<string, unknown> | undefined;
507
- mimeType?: string | undefined;
508
351
  title?: string | undefined;
509
352
  description?: string | undefined;
353
+ mimeType?: string | undefined;
510
354
  size?: number | undefined;
511
- kind?: "file" | "skill" | "agent" | undefined;
512
- };
513
- }, {
514
- type: "content";
515
- content?: unknown;
516
- }>, z.ZodObject<{
355
+ }, unknown>>;
356
+ }, z.core.$strip>, z.ZodObject<{
517
357
  type: z.ZodLiteral<"diff">;
518
358
  path: z.ZodString;
519
359
  oldText: z.ZodOptional<z.ZodNullable<z.ZodString>>;
520
360
  newText: z.ZodString;
521
- }, "strip", z.ZodTypeAny, {
522
- path: string;
523
- type: "diff";
524
- newText: string;
525
- oldText?: string | null | undefined;
526
- }, {
527
- path: string;
528
- type: "diff";
529
- newText: string;
530
- oldText?: string | null | undefined;
531
- }>, z.ZodObject<{
361
+ }, z.core.$strip>, z.ZodObject<{
532
362
  type: z.ZodLiteral<"patch">;
533
363
  path: z.ZodString;
534
- change: z.ZodEnum<["add", "delete", "update"]>;
364
+ change: z.ZodEnum<{
365
+ add: "add";
366
+ delete: "delete";
367
+ update: "update";
368
+ }>;
535
369
  movePath: z.ZodOptional<z.ZodString>;
536
370
  diff: z.ZodString;
537
- }, "strip", z.ZodTypeAny, {
538
- path: string;
539
- type: "patch";
540
- diff: string;
541
- change: "add" | "delete" | "update";
542
- movePath?: string | undefined;
543
- }, {
544
- path: string;
545
- type: "patch";
546
- diff: string;
547
- change: "add" | "delete" | "update";
548
- movePath?: string | undefined;
549
- }>, z.ZodObject<{
371
+ }, z.core.$strip>, z.ZodObject<{
550
372
  type: z.ZodLiteral<"terminal">;
551
373
  terminalId: z.ZodString;
552
- }, "strip", z.ZodTypeAny, {
553
- type: "terminal";
554
- terminalId: string;
555
- }, {
556
- type: "terminal";
557
- terminalId: string;
558
- }>]>, "many">>;
374
+ }, z.core.$strip>], "type">>>;
559
375
  locations: z.ZodOptional<z.ZodArray<z.ZodObject<{
560
376
  path: z.ZodString;
561
377
  line: z.ZodOptional<z.ZodNumber>;
562
- }, "strip", z.ZodTypeAny, {
563
- path: string;
564
- line?: number | undefined;
565
- }, {
566
- path: string;
567
- line?: number | undefined;
568
- }>, "many">>;
569
- }, "strip", z.ZodTypeAny, {
570
- title?: string | undefined;
571
- kind?: "search" | "delete" | "other" | "read" | "edit" | "move" | "execute" | "think" | "fetch" | "switch_mode" | undefined;
572
- content?: ({
573
- type: "content";
574
- content: {
575
- type: "text";
576
- text: string;
577
- annotations?: z.objectOutputType<{
578
- audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
579
- priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
580
- lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
581
- }, z.ZodTypeAny, "passthrough"> | undefined;
582
- _meta?: Record<string, unknown> | undefined;
583
- } | {
584
- type: "image";
585
- mimeType: string;
586
- annotations?: z.objectOutputType<{
587
- audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
588
- priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
589
- lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
590
- }, z.ZodTypeAny, "passthrough"> | undefined;
591
- _meta?: Record<string, unknown> | undefined;
592
- data?: string | undefined;
593
- uri?: string | undefined;
594
- } | {
595
- type: "audio";
596
- mimeType: string;
597
- annotations?: z.objectOutputType<{
598
- audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
599
- priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
600
- lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
601
- }, z.ZodTypeAny, "passthrough"> | undefined;
602
- _meta?: Record<string, unknown> | undefined;
603
- data?: string | undefined;
604
- uri?: string | undefined;
605
- } | {
606
- type: "resource";
607
- resource: {
608
- uri: string;
609
- text?: string | undefined;
610
- _meta?: Record<string, unknown> | undefined;
611
- mimeType?: string | undefined;
612
- blob?: string | undefined;
613
- assetUri?: string | undefined;
614
- };
615
- annotations?: z.objectOutputType<{
616
- audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
617
- priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
618
- lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
619
- }, z.ZodTypeAny, "passthrough"> | undefined;
620
- _meta?: Record<string, unknown> | undefined;
621
- } | {
622
- type: "resource_link";
623
- uri: string;
624
- name: string;
625
- annotations?: z.objectOutputType<{
626
- audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
627
- priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
628
- lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
629
- }, z.ZodTypeAny, "passthrough"> | undefined;
630
- _meta?: Record<string, unknown> | undefined;
631
- mimeType?: string | undefined;
632
- title?: string | undefined;
633
- description?: string | undefined;
634
- size?: number | undefined;
635
- kind?: "file" | "skill" | "agent" | undefined;
636
- };
637
- } | {
638
- path: string;
639
- type: "diff";
640
- newText: string;
641
- oldText?: string | null | undefined;
642
- } | {
643
- path: string;
644
- type: "patch";
645
- diff: string;
646
- change: "add" | "delete" | "update";
647
- movePath?: string | undefined;
648
- } | {
649
- type: "terminal";
650
- terminalId: string;
651
- })[] | undefined;
652
- rawInput?: unknown;
653
- locations?: {
654
- path: string;
655
- line?: number | undefined;
656
- }[] | undefined;
657
- }, {
658
- title?: string | undefined;
659
- kind?: "search" | "delete" | "other" | "read" | "edit" | "move" | "execute" | "think" | "fetch" | "switch_mode" | undefined;
660
- content?: ({
661
- type: "content";
662
- content?: unknown;
663
- } | {
664
- path: string;
665
- type: "diff";
666
- newText: string;
667
- oldText?: string | null | undefined;
668
- } | {
669
- path: string;
670
- type: "patch";
671
- diff: string;
672
- change: "add" | "delete" | "update";
673
- movePath?: string | undefined;
674
- } | {
675
- type: "terminal";
676
- terminalId: string;
677
- })[] | undefined;
678
- rawInput?: unknown;
679
- locations?: {
680
- path: string;
681
- line?: number | undefined;
682
- }[] | undefined;
683
- }>>;
378
+ }, z.core.$strip>>>;
379
+ }, z.core.$strip>>;
684
380
  url: z.ZodOptional<z.ZodObject<{
685
381
  url: z.ZodString;
686
382
  elicitationId: z.ZodString;
687
- }, "strip", z.ZodTypeAny, {
688
- url: string;
689
- elicitationId: string;
690
- }, {
691
- url: string;
692
- elicitationId: string;
693
- }>>;
383
+ }, z.core.$strip>>;
694
384
  options: z.ZodArray<z.ZodObject<{
695
385
  optionId: z.ZodString;
696
386
  name: z.ZodString;
697
- kind: z.ZodEnum<["allow_once", "allow_always", "reject_once", "reject_always"]>;
698
- }, "strip", z.ZodTypeAny, {
699
- name: string;
700
- kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
701
- optionId: string;
702
- }, {
703
- name: string;
704
- kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
705
- optionId: string;
706
- }>, "many">;
707
- /** Set when this is a question to answer (`sessions.answer`) rather than a permission to give. */
387
+ kind: z.ZodEnum<{
388
+ allow_once: "allow_once";
389
+ allow_always: "allow_always";
390
+ reject_once: "reject_once";
391
+ reject_always: "reject_always";
392
+ }>;
393
+ }, z.core.$strip>>;
708
394
  questions: z.ZodOptional<z.ZodArray<z.ZodObject<{
709
395
  id: z.ZodString;
710
396
  constraints: z.ZodOptional<z.ZodObject<{
711
- type: z.ZodEnum<["string", "number", "integer", "boolean", "array"]>;
397
+ type: z.ZodEnum<{
398
+ string: "string";
399
+ number: "number";
400
+ boolean: "boolean";
401
+ array: "array";
402
+ integer: "integer";
403
+ }>;
712
404
  minimum: z.ZodOptional<z.ZodNumber>;
713
405
  maximum: z.ZodOptional<z.ZodNumber>;
714
406
  minLength: z.ZodOptional<z.ZodNumber>;
@@ -717,316 +409,31 @@ export declare const pendingPermissionSchema: z.ZodObject<{
717
409
  maxItems: z.ZodOptional<z.ZodNumber>;
718
410
  pattern: z.ZodOptional<z.ZodString>;
719
411
  format: z.ZodOptional<z.ZodString>;
720
- }, "strip", z.ZodTypeAny, {
721
- type: "string" | "number" | "boolean" | "integer" | "array";
722
- minimum?: number | undefined;
723
- maximum?: number | undefined;
724
- minLength?: number | undefined;
725
- maxLength?: number | undefined;
726
- minItems?: number | undefined;
727
- maxItems?: number | undefined;
728
- pattern?: string | undefined;
729
- format?: string | undefined;
730
- }, {
731
- type: "string" | "number" | "boolean" | "integer" | "array";
732
- minimum?: number | undefined;
733
- maximum?: number | undefined;
734
- minLength?: number | undefined;
735
- maxLength?: number | undefined;
736
- minItems?: number | undefined;
737
- maxItems?: number | undefined;
738
- pattern?: string | undefined;
739
- format?: string | undefined;
740
- }>>;
741
- defaults: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
742
- /** A short label for the question ("Auth method"). */
412
+ }, z.core.$strip>>;
413
+ defaults: z.ZodOptional<z.ZodArray<z.ZodString>>;
743
414
  header: z.ZodOptional<z.ZodString>;
744
415
  text: z.ZodString;
745
- /** `choice`: one of `options`; `choices`: any number of them; `text`: typed. */
746
- kind: z.ZodEnum<["choice", "choices", "text"]>;
416
+ kind: z.ZodEnum<{
417
+ text: "text";
418
+ choice: "choice";
419
+ choices: "choices";
420
+ }>;
747
421
  options: z.ZodOptional<z.ZodArray<z.ZodObject<{
748
422
  value: z.ZodString;
749
423
  label: z.ZodString;
750
424
  description: z.ZodOptional<z.ZodString>;
751
- }, "strip", z.ZodTypeAny, {
752
- value: string;
753
- label: string;
754
- description?: string | undefined;
755
- }, {
756
- value: string;
757
- label: string;
758
- description?: string | undefined;
759
- }>, "many">>;
760
- /** With options: an answer of the user's own can be typed instead of, or beside, a pick. */
425
+ }, z.core.$strip>>>;
761
426
  other: z.ZodOptional<z.ZodBoolean>;
762
- /** What is typed shouldn't be shown (a token). */
763
427
  secret: z.ZodOptional<z.ZodBoolean>;
764
428
  required: z.ZodOptional<z.ZodBoolean>;
765
- }, "strip", z.ZodTypeAny, {
766
- text: string;
767
- kind: "text" | "choice" | "choices";
768
- id: string;
769
- secret?: boolean | undefined;
770
- options?: {
771
- value: string;
772
- label: string;
773
- description?: string | undefined;
774
- }[] | undefined;
775
- other?: boolean | undefined;
776
- constraints?: {
777
- type: "string" | "number" | "boolean" | "integer" | "array";
778
- minimum?: number | undefined;
779
- maximum?: number | undefined;
780
- minLength?: number | undefined;
781
- maxLength?: number | undefined;
782
- minItems?: number | undefined;
783
- maxItems?: number | undefined;
784
- pattern?: string | undefined;
785
- format?: string | undefined;
786
- } | undefined;
787
- defaults?: string[] | undefined;
788
- header?: string | undefined;
789
- required?: boolean | undefined;
790
- }, {
791
- text: string;
792
- kind: "text" | "choice" | "choices";
793
- id: string;
794
- secret?: boolean | undefined;
795
- options?: {
796
- value: string;
797
- label: string;
798
- description?: string | undefined;
799
- }[] | undefined;
800
- other?: boolean | undefined;
801
- constraints?: {
802
- type: "string" | "number" | "boolean" | "integer" | "array";
803
- minimum?: number | undefined;
804
- maximum?: number | undefined;
805
- minLength?: number | undefined;
806
- maxLength?: number | undefined;
807
- minItems?: number | undefined;
808
- maxItems?: number | undefined;
809
- pattern?: string | undefined;
810
- format?: string | undefined;
811
- } | undefined;
812
- defaults?: string[] | undefined;
813
- header?: string | undefined;
814
- required?: boolean | undefined;
815
- }>, "many">>;
816
- }, "strip", z.ZodTypeAny, {
817
- options: {
818
- name: string;
819
- kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
820
- optionId: string;
821
- }[];
822
- title: string;
823
- requestId: string;
824
- toolCallId?: string | undefined;
825
- tool?: {
826
- title?: string | undefined;
827
- kind?: "search" | "delete" | "other" | "read" | "edit" | "move" | "execute" | "think" | "fetch" | "switch_mode" | undefined;
828
- content?: ({
829
- type: "content";
830
- content: {
831
- type: "text";
832
- text: string;
833
- annotations?: z.objectOutputType<{
834
- audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
835
- priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
836
- lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
837
- }, z.ZodTypeAny, "passthrough"> | undefined;
838
- _meta?: Record<string, unknown> | undefined;
839
- } | {
840
- type: "image";
841
- mimeType: string;
842
- annotations?: z.objectOutputType<{
843
- audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
844
- priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
845
- lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
846
- }, z.ZodTypeAny, "passthrough"> | undefined;
847
- _meta?: Record<string, unknown> | undefined;
848
- data?: string | undefined;
849
- uri?: string | undefined;
850
- } | {
851
- type: "audio";
852
- mimeType: string;
853
- annotations?: z.objectOutputType<{
854
- audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
855
- priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
856
- lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
857
- }, z.ZodTypeAny, "passthrough"> | undefined;
858
- _meta?: Record<string, unknown> | undefined;
859
- data?: string | undefined;
860
- uri?: string | undefined;
861
- } | {
862
- type: "resource";
863
- resource: {
864
- uri: string;
865
- text?: string | undefined;
866
- _meta?: Record<string, unknown> | undefined;
867
- mimeType?: string | undefined;
868
- blob?: string | undefined;
869
- assetUri?: string | undefined;
870
- };
871
- annotations?: z.objectOutputType<{
872
- audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
873
- priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
874
- lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
875
- }, z.ZodTypeAny, "passthrough"> | undefined;
876
- _meta?: Record<string, unknown> | undefined;
877
- } | {
878
- type: "resource_link";
879
- uri: string;
880
- name: string;
881
- annotations?: z.objectOutputType<{
882
- audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
883
- priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
884
- lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
885
- }, z.ZodTypeAny, "passthrough"> | undefined;
886
- _meta?: Record<string, unknown> | undefined;
887
- mimeType?: string | undefined;
888
- title?: string | undefined;
889
- description?: string | undefined;
890
- size?: number | undefined;
891
- kind?: "file" | "skill" | "agent" | undefined;
892
- };
893
- } | {
894
- path: string;
895
- type: "diff";
896
- newText: string;
897
- oldText?: string | null | undefined;
898
- } | {
899
- path: string;
900
- type: "patch";
901
- diff: string;
902
- change: "add" | "delete" | "update";
903
- movePath?: string | undefined;
904
- } | {
905
- type: "terminal";
906
- terminalId: string;
907
- })[] | undefined;
908
- rawInput?: unknown;
909
- locations?: {
910
- path: string;
911
- line?: number | undefined;
912
- }[] | undefined;
913
- } | undefined;
914
- detail?: string | undefined;
915
- questions?: {
916
- text: string;
917
- kind: "text" | "choice" | "choices";
918
- id: string;
919
- secret?: boolean | undefined;
920
- options?: {
921
- value: string;
922
- label: string;
923
- description?: string | undefined;
924
- }[] | undefined;
925
- other?: boolean | undefined;
926
- constraints?: {
927
- type: "string" | "number" | "boolean" | "integer" | "array";
928
- minimum?: number | undefined;
929
- maximum?: number | undefined;
930
- minLength?: number | undefined;
931
- maxLength?: number | undefined;
932
- minItems?: number | undefined;
933
- maxItems?: number | undefined;
934
- pattern?: string | undefined;
935
- format?: string | undefined;
936
- } | undefined;
937
- defaults?: string[] | undefined;
938
- header?: string | undefined;
939
- required?: boolean | undefined;
940
- }[] | undefined;
941
- childSessionId?: string | undefined;
942
- url?: {
943
- url: string;
944
- elicitationId: string;
945
- } | undefined;
946
- }, {
947
- options: {
948
- name: string;
949
- kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
950
- optionId: string;
951
- }[];
952
- title: string;
953
- requestId: string;
954
- toolCallId?: string | undefined;
955
- tool?: {
956
- title?: string | undefined;
957
- kind?: "search" | "delete" | "other" | "read" | "edit" | "move" | "execute" | "think" | "fetch" | "switch_mode" | undefined;
958
- content?: ({
959
- type: "content";
960
- content?: unknown;
961
- } | {
962
- path: string;
963
- type: "diff";
964
- newText: string;
965
- oldText?: string | null | undefined;
966
- } | {
967
- path: string;
968
- type: "patch";
969
- diff: string;
970
- change: "add" | "delete" | "update";
971
- movePath?: string | undefined;
972
- } | {
973
- type: "terminal";
974
- terminalId: string;
975
- })[] | undefined;
976
- rawInput?: unknown;
977
- locations?: {
978
- path: string;
979
- line?: number | undefined;
980
- }[] | undefined;
981
- } | undefined;
982
- detail?: string | undefined;
983
- questions?: {
984
- text: string;
985
- kind: "text" | "choice" | "choices";
986
- id: string;
987
- secret?: boolean | undefined;
988
- options?: {
989
- value: string;
990
- label: string;
991
- description?: string | undefined;
992
- }[] | undefined;
993
- other?: boolean | undefined;
994
- constraints?: {
995
- type: "string" | "number" | "boolean" | "integer" | "array";
996
- minimum?: number | undefined;
997
- maximum?: number | undefined;
998
- minLength?: number | undefined;
999
- maxLength?: number | undefined;
1000
- minItems?: number | undefined;
1001
- maxItems?: number | undefined;
1002
- pattern?: string | undefined;
1003
- format?: string | undefined;
1004
- } | undefined;
1005
- defaults?: string[] | undefined;
1006
- header?: string | undefined;
1007
- required?: boolean | undefined;
1008
- }[] | undefined;
1009
- childSessionId?: string | undefined;
1010
- url?: {
1011
- url: string;
1012
- elicitationId: string;
1013
- } | undefined;
1014
- }>;
429
+ }, z.core.$strip>>>;
430
+ }, z.core.$strip>;
1015
431
  export type PendingPermissionSummary = z.infer<typeof pendingPermissionSchema>;
1016
432
  export declare const queuedMessageSchema: z.ZodObject<{
1017
433
  clientMessageId: z.ZodString;
1018
- /** The message's text (images are counted, not sent). */
1019
434
  text: z.ZodString;
1020
435
  images: z.ZodNumber;
1021
- }, "strip", z.ZodTypeAny, {
1022
- text: string;
1023
- images: number;
1024
- clientMessageId: string;
1025
- }, {
1026
- text: string;
1027
- images: number;
1028
- clientMessageId: string;
1029
- }>;
436
+ }, z.core.$strip>;
1030
437
  export type QueuedMessage = z.infer<typeof queuedMessageSchema>;
1031
438
  /** A sub-agent a session started: the tool call it runs under, and how it is doing. */
1032
439
  export declare const subagentInfoSchema: z.ZodObject<{
@@ -1034,20 +441,32 @@ export declare const subagentInfoSchema: z.ZodObject<{
1034
441
  canCancel: z.ZodOptional<z.ZodBoolean>;
1035
442
  toolCallId: z.ZodString;
1036
443
  parentToolCallId: z.ZodOptional<z.ZodString>;
1037
- /** What it was asked to do. */
1038
444
  task: z.ZodString;
1039
- /** Its role or type, e.g. "Explore". */
1040
445
  agentType: z.ZodOptional<z.ZodString>;
1041
446
  name: z.ZodOptional<z.ZodString>;
1042
447
  running: z.ZodBoolean;
1043
448
  failed: z.ZodOptional<z.ZodBoolean>;
1044
449
  startedAt: z.ZodNumber;
1045
450
  endedAt: z.ZodOptional<z.ZodNumber>;
1046
- state: z.ZodOptional<z.ZodEnum<["pending", "running", "paused", "completed", "failed", "stopped", "unknown"]>>;
451
+ state: z.ZodOptional<z.ZodEnum<{
452
+ paused: "paused";
453
+ unknown: "unknown";
454
+ pending: "pending";
455
+ completed: "completed";
456
+ failed: "failed";
457
+ running: "running";
458
+ stopped: "stopped";
459
+ }>>;
1047
460
  workflow: z.ZodOptional<z.ZodObject<{
1048
461
  runId: z.ZodOptional<z.ZodString>;
1049
462
  name: z.ZodOptional<z.ZodString>;
1050
- state: z.ZodOptional<z.ZodEnum<["running", "paused", "completed", "failed", "stopped"]>>;
463
+ state: z.ZodOptional<z.ZodEnum<{
464
+ paused: "paused";
465
+ completed: "completed";
466
+ failed: "failed";
467
+ running: "running";
468
+ stopped: "stopped";
469
+ }>>;
1051
470
  started: z.ZodOptional<z.ZodNumber>;
1052
471
  completed: z.ZodOptional<z.ZodNumber>;
1053
472
  tokens: z.ZodOptional<z.ZodNumber>;
@@ -1058,20 +477,20 @@ export declare const subagentInfoSchema: z.ZodObject<{
1058
477
  id: z.ZodString;
1059
478
  title: z.ZodString;
1060
479
  order: z.ZodNumber;
1061
- }, "strip", z.ZodTypeAny, {
1062
- title: string;
1063
- id: string;
1064
- order: number;
1065
- }, {
1066
- title: string;
1067
- id: string;
1068
- order: number;
1069
- }>, "many">>;
480
+ }, z.core.$strip>>>;
1070
481
  agents: z.ZodOptional<z.ZodArray<z.ZodObject<{
1071
482
  id: z.ZodString;
1072
483
  toolCallId: z.ZodOptional<z.ZodString>;
1073
484
  title: z.ZodString;
1074
- state: z.ZodEnum<["pending", "running", "paused", "completed", "failed", "stopped", "unknown"]>;
485
+ state: z.ZodEnum<{
486
+ paused: "paused";
487
+ unknown: "unknown";
488
+ pending: "pending";
489
+ completed: "completed";
490
+ failed: "failed";
491
+ running: "running";
492
+ stopped: "stopped";
493
+ }>;
1075
494
  phaseId: z.ZodOptional<z.ZodString>;
1076
495
  model: z.ZodOptional<z.ZodString>;
1077
496
  tokens: z.ZodOptional<z.ZodNumber>;
@@ -1080,253 +499,69 @@ export declare const subagentInfoSchema: z.ZodObject<{
1080
499
  startedAt: z.ZodOptional<z.ZodNumber>;
1081
500
  endedAt: z.ZodOptional<z.ZodNumber>;
1082
501
  result: z.ZodOptional<z.ZodString>;
1083
- }, "strip", z.ZodTypeAny, {
1084
- title: string;
1085
- id: string;
1086
- state: "unknown" | "paused" | "pending" | "completed" | "failed" | "running" | "stopped";
1087
- toolCallId?: string | undefined;
1088
- phaseId?: string | undefined;
1089
- model?: string | undefined;
1090
- tokens?: number | undefined;
1091
- toolCalls?: number | undefined;
1092
- durationMs?: number | undefined;
1093
- startedAt?: number | undefined;
1094
- endedAt?: number | undefined;
1095
- result?: string | undefined;
1096
- }, {
1097
- title: string;
1098
- id: string;
1099
- state: "unknown" | "paused" | "pending" | "completed" | "failed" | "running" | "stopped";
1100
- toolCallId?: string | undefined;
1101
- phaseId?: string | undefined;
1102
- model?: string | undefined;
1103
- tokens?: number | undefined;
1104
- toolCalls?: number | undefined;
1105
- durationMs?: number | undefined;
1106
- startedAt?: number | undefined;
1107
- endedAt?: number | undefined;
1108
- result?: string | undefined;
1109
- }>, "many">>;
1110
- }, "strip", z.ZodTypeAny, {
1111
- name?: string | undefined;
1112
- completed?: number | undefined;
1113
- state?: "paused" | "completed" | "failed" | "running" | "stopped" | undefined;
1114
- tokens?: number | undefined;
1115
- durationMs?: number | undefined;
1116
- startedAt?: number | undefined;
1117
- endedAt?: number | undefined;
1118
- runId?: string | undefined;
1119
- started?: number | undefined;
1120
- phases?: {
1121
- title: string;
1122
- id: string;
1123
- order: number;
1124
- }[] | undefined;
1125
- agents?: {
1126
- title: string;
1127
- id: string;
1128
- state: "unknown" | "paused" | "pending" | "completed" | "failed" | "running" | "stopped";
1129
- toolCallId?: string | undefined;
1130
- phaseId?: string | undefined;
1131
- model?: string | undefined;
1132
- tokens?: number | undefined;
1133
- toolCalls?: number | undefined;
1134
- durationMs?: number | undefined;
1135
- startedAt?: number | undefined;
1136
- endedAt?: number | undefined;
1137
- result?: string | undefined;
1138
- }[] | undefined;
1139
- }, {
1140
- name?: string | undefined;
1141
- completed?: number | undefined;
1142
- state?: "paused" | "completed" | "failed" | "running" | "stopped" | undefined;
1143
- tokens?: number | undefined;
1144
- durationMs?: number | undefined;
1145
- startedAt?: number | undefined;
1146
- endedAt?: number | undefined;
1147
- runId?: string | undefined;
1148
- started?: number | undefined;
1149
- phases?: {
1150
- title: string;
1151
- id: string;
1152
- order: number;
1153
- }[] | undefined;
1154
- agents?: {
1155
- title: string;
1156
- id: string;
1157
- state: "unknown" | "paused" | "pending" | "completed" | "failed" | "running" | "stopped";
1158
- toolCallId?: string | undefined;
1159
- phaseId?: string | undefined;
1160
- model?: string | undefined;
1161
- tokens?: number | undefined;
1162
- toolCalls?: number | undefined;
1163
- durationMs?: number | undefined;
1164
- startedAt?: number | undefined;
1165
- endedAt?: number | undefined;
1166
- result?: string | undefined;
1167
- }[] | undefined;
1168
- }>>;
1169
- /** Orders list snapshots against events arriving while the request is in flight. */
502
+ }, z.core.$strip>>>;
503
+ }, z.core.$strip>>;
1170
504
  lastSeq: z.ZodOptional<z.ZodNumber>;
1171
- }, "strip", z.ZodTypeAny, {
1172
- running: boolean;
1173
- toolCallId: string;
1174
- startedAt: number;
1175
- task: string;
1176
- name?: string | undefined;
1177
- failed?: boolean | undefined;
1178
- state?: "unknown" | "paused" | "pending" | "completed" | "failed" | "running" | "stopped" | undefined;
1179
- endedAt?: number | undefined;
1180
- agentType?: string | undefined;
1181
- nativeSessionId?: string | undefined;
1182
- canCancel?: boolean | undefined;
1183
- workflow?: {
1184
- name?: string | undefined;
1185
- completed?: number | undefined;
1186
- state?: "paused" | "completed" | "failed" | "running" | "stopped" | undefined;
1187
- tokens?: number | undefined;
1188
- durationMs?: number | undefined;
1189
- startedAt?: number | undefined;
1190
- endedAt?: number | undefined;
1191
- runId?: string | undefined;
1192
- started?: number | undefined;
1193
- phases?: {
1194
- title: string;
1195
- id: string;
1196
- order: number;
1197
- }[] | undefined;
1198
- agents?: {
1199
- title: string;
1200
- id: string;
1201
- state: "unknown" | "paused" | "pending" | "completed" | "failed" | "running" | "stopped";
1202
- toolCallId?: string | undefined;
1203
- phaseId?: string | undefined;
1204
- model?: string | undefined;
1205
- tokens?: number | undefined;
1206
- toolCalls?: number | undefined;
1207
- durationMs?: number | undefined;
1208
- startedAt?: number | undefined;
1209
- endedAt?: number | undefined;
1210
- result?: string | undefined;
1211
- }[] | undefined;
1212
- } | undefined;
1213
- parentToolCallId?: string | undefined;
1214
- lastSeq?: number | undefined;
1215
- }, {
1216
- running: boolean;
1217
- toolCallId: string;
1218
- startedAt: number;
1219
- task: string;
1220
- name?: string | undefined;
1221
- failed?: boolean | undefined;
1222
- state?: "unknown" | "paused" | "pending" | "completed" | "failed" | "running" | "stopped" | undefined;
1223
- endedAt?: number | undefined;
1224
- agentType?: string | undefined;
1225
- nativeSessionId?: string | undefined;
1226
- canCancel?: boolean | undefined;
1227
- workflow?: {
1228
- name?: string | undefined;
1229
- completed?: number | undefined;
1230
- state?: "paused" | "completed" | "failed" | "running" | "stopped" | undefined;
1231
- tokens?: number | undefined;
1232
- durationMs?: number | undefined;
1233
- startedAt?: number | undefined;
1234
- endedAt?: number | undefined;
1235
- runId?: string | undefined;
1236
- started?: number | undefined;
1237
- phases?: {
1238
- title: string;
1239
- id: string;
1240
- order: number;
1241
- }[] | undefined;
1242
- agents?: {
1243
- title: string;
1244
- id: string;
1245
- state: "unknown" | "paused" | "pending" | "completed" | "failed" | "running" | "stopped";
1246
- toolCallId?: string | undefined;
1247
- phaseId?: string | undefined;
1248
- model?: string | undefined;
1249
- tokens?: number | undefined;
1250
- toolCalls?: number | undefined;
1251
- durationMs?: number | undefined;
1252
- startedAt?: number | undefined;
1253
- endedAt?: number | undefined;
1254
- result?: string | undefined;
1255
- }[] | undefined;
1256
- } | undefined;
1257
- parentToolCallId?: string | undefined;
1258
- lastSeq?: number | undefined;
1259
- }>;
505
+ }, z.core.$strip>;
1260
506
  export type SubagentInfo = z.infer<typeof subagentInfoSchema>;
1261
507
  /**
1262
508
  * A command the agent left running after its call returned (a background
1263
509
  * shell, a dev server, a watcher). Sub-agents and workflows are not tasks:
1264
510
  * they have their own records (`SubagentInfo`).
1265
511
  */
1266
- export declare const backgroundTaskStateSchema: z.ZodEnum<["running", "completed", "failed", "stopped", "unknown"]>;
512
+ export declare const backgroundTaskStateSchema: z.ZodEnum<{
513
+ unknown: "unknown";
514
+ completed: "completed";
515
+ failed: "failed";
516
+ running: "running";
517
+ stopped: "stopped";
518
+ }>;
1267
519
  export type BackgroundTaskState = z.infer<typeof backgroundTaskStateSchema>;
1268
520
  export declare const backgroundTaskSchema: z.ZodObject<{
1269
- /** The agent's own id for it. */
1270
521
  id: z.ZodString;
1271
- /** shell: a command; monitor: a command whose output the agent is told about as it comes. */
1272
- kind: z.ZodEnum<["shell", "monitor"]>;
1273
- /** The tool call that started it. */
522
+ kind: z.ZodEnum<{
523
+ shell: "shell";
524
+ monitor: "monitor";
525
+ }>;
1274
526
  toolCallId: z.ZodOptional<z.ZodString>;
1275
527
  title: z.ZodString;
1276
528
  command: z.ZodOptional<z.ZodString>;
1277
- /** `unknown`: it was running when the host lost track of it (its agent quit without saying how it ended). */
1278
- state: z.ZodEnum<["running", "completed", "failed", "stopped", "unknown"]>;
529
+ state: z.ZodEnum<{
530
+ unknown: "unknown";
531
+ completed: "completed";
532
+ failed: "failed";
533
+ running: "running";
534
+ stopped: "stopped";
535
+ }>;
1279
536
  startedAt: z.ZodNumber;
1280
537
  endedAt: z.ZodOptional<z.ZodNumber>;
1281
- /** How it ended, or the latest thing it reported, as the agent says it. */
1282
538
  summary: z.ZodOptional<z.ZodString>;
1283
539
  exitCode: z.ZodOptional<z.ZodNumber>;
1284
- /** Its output can be read (`sessions.taskOutput`). */
1285
540
  output: z.ZodOptional<z.ZodBoolean>;
1286
- /** It can be stopped from here (`sessions.stopTask`). */
1287
541
  canStop: z.ZodOptional<z.ZodBoolean>;
1288
- /** Orders list snapshots against events arriving while the request is in flight. */
1289
542
  lastSeq: z.ZodOptional<z.ZodNumber>;
1290
- }, "strip", z.ZodTypeAny, {
1291
- title: string;
1292
- kind: "shell" | "monitor";
1293
- id: string;
1294
- state: "unknown" | "completed" | "failed" | "running" | "stopped";
1295
- startedAt: number;
1296
- toolCallId?: string | undefined;
1297
- endedAt?: number | undefined;
1298
- command?: string | undefined;
1299
- summary?: string | undefined;
1300
- exitCode?: number | undefined;
1301
- output?: boolean | undefined;
1302
- canStop?: boolean | undefined;
1303
- lastSeq?: number | undefined;
1304
- }, {
1305
- title: string;
1306
- kind: "shell" | "monitor";
1307
- id: string;
1308
- state: "unknown" | "completed" | "failed" | "running" | "stopped";
1309
- startedAt: number;
1310
- toolCallId?: string | undefined;
1311
- endedAt?: number | undefined;
1312
- command?: string | undefined;
1313
- summary?: string | undefined;
1314
- exitCode?: number | undefined;
1315
- output?: boolean | undefined;
1316
- canStop?: boolean | undefined;
1317
- lastSeq?: number | undefined;
1318
- }>;
543
+ }, z.core.$strip>;
1319
544
  export type BackgroundTask = z.infer<typeof backgroundTaskSchema>;
1320
545
  export declare const sessionSummarySchema: z.ZodObject<{
1321
- /** `${agent}:${nativeId}` — stable across daemon restarts and rediscovery. */
1322
546
  id: z.ZodString;
1323
547
  agent: z.ZodString;
1324
548
  nativeId: z.ZodString;
1325
549
  title: z.ZodOptional<z.ZodString>;
1326
550
  preview: z.ZodOptional<z.ZodString>;
1327
551
  cwd: z.ZodString;
1328
- state: z.ZodEnum<["idle", "running", "waiting", "error", "offline", "unknown"]>;
1329
- driver: z.ZodOptional<z.ZodEnum<["desktop", "remote", "none"]>>;
552
+ state: z.ZodEnum<{
553
+ error: "error";
554
+ unknown: "unknown";
555
+ running: "running";
556
+ idle: "idle";
557
+ waiting: "waiting";
558
+ offline: "offline";
559
+ }>;
560
+ driver: z.ZodOptional<z.ZodEnum<{
561
+ desktop: "desktop";
562
+ remote: "remote";
563
+ none: "none";
564
+ }>>;
1330
565
  pendingPermissions: z.ZodNumber;
1331
566
  model: z.ZodOptional<z.ZodString>;
1332
567
  createdAt: z.ZodNumber;
@@ -1334,18 +569,25 @@ export declare const sessionSummarySchema: z.ZodObject<{
1334
569
  lastSeq: z.ZodNumber;
1335
570
  archived: z.ZodBoolean;
1336
571
  activity: z.ZodOptional<z.ZodObject<{
1337
- kind: z.ZodEnum<["thinking", "responding", "tool"]>;
572
+ kind: z.ZodEnum<{
573
+ tool: "tool";
574
+ thinking: "thinking";
575
+ responding: "responding";
576
+ }>;
1338
577
  title: z.ZodOptional<z.ZodString>;
1339
- toolKind: z.ZodOptional<z.ZodEnum<["read", "edit", "delete", "move", "search", "execute", "think", "fetch", "switch_mode", "other"]>>;
1340
- }, "strip", z.ZodTypeAny, {
1341
- kind: "tool" | "thinking" | "responding";
1342
- title?: string | undefined;
1343
- toolKind?: "search" | "delete" | "other" | "read" | "edit" | "move" | "execute" | "think" | "fetch" | "switch_mode" | undefined;
1344
- }, {
1345
- kind: "tool" | "thinking" | "responding";
1346
- title?: string | undefined;
1347
- toolKind?: "search" | "delete" | "other" | "read" | "edit" | "move" | "execute" | "think" | "fetch" | "switch_mode" | undefined;
1348
- }>>;
578
+ toolKind: z.ZodOptional<z.ZodEnum<{
579
+ search: "search";
580
+ delete: "delete";
581
+ other: "other";
582
+ read: "read";
583
+ edit: "edit";
584
+ move: "move";
585
+ execute: "execute";
586
+ think: "think";
587
+ fetch: "fetch";
588
+ switch_mode: "switch_mode";
589
+ }>>;
590
+ }, z.core.$strip>>;
1349
591
  permission: z.ZodOptional<z.ZodObject<{
1350
592
  requestId: z.ZodString;
1351
593
  childSessionId: z.ZodOptional<z.ZodString>;
@@ -1354,38 +596,52 @@ export declare const sessionSummarySchema: z.ZodObject<{
1354
596
  detail: z.ZodOptional<z.ZodString>;
1355
597
  tool: z.ZodOptional<z.ZodObject<{
1356
598
  title: z.ZodOptional<z.ZodString>;
1357
- kind: z.ZodOptional<z.ZodEnum<["read", "edit", "delete", "move", "search", "execute", "think", "fetch", "switch_mode", "other"]>>;
599
+ kind: z.ZodOptional<z.ZodEnum<{
600
+ search: "search";
601
+ delete: "delete";
602
+ other: "other";
603
+ read: "read";
604
+ edit: "edit";
605
+ move: "move";
606
+ execute: "execute";
607
+ think: "think";
608
+ fetch: "fetch";
609
+ switch_mode: "switch_mode";
610
+ }>>;
1358
611
  rawInput: z.ZodOptional<z.ZodUnknown>;
1359
- content: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
612
+ content: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1360
613
  type: z.ZodLiteral<"content">;
1361
614
  content: z.ZodType<{
1362
615
  type: "text";
1363
616
  text: string;
1364
- annotations?: z.objectOutputType<{
1365
- audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1366
- priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1367
- lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1368
- }, z.ZodTypeAny, "passthrough"> | undefined;
617
+ annotations?: {
618
+ [x: string]: unknown;
619
+ audience?: ("user" | "assistant")[] | undefined;
620
+ priority?: number | undefined;
621
+ lastModified?: string | undefined;
622
+ } | undefined;
1369
623
  _meta?: Record<string, unknown> | undefined;
1370
624
  } | {
1371
625
  type: "image";
1372
626
  mimeType: string;
1373
- annotations?: z.objectOutputType<{
1374
- audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1375
- priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1376
- lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1377
- }, z.ZodTypeAny, "passthrough"> | undefined;
627
+ annotations?: {
628
+ [x: string]: unknown;
629
+ audience?: ("user" | "assistant")[] | undefined;
630
+ priority?: number | undefined;
631
+ lastModified?: string | undefined;
632
+ } | undefined;
1378
633
  _meta?: Record<string, unknown> | undefined;
1379
634
  data?: string | undefined;
1380
635
  uri?: string | undefined;
1381
636
  } | {
1382
637
  type: "audio";
1383
638
  mimeType: string;
1384
- annotations?: z.objectOutputType<{
1385
- audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1386
- priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1387
- lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1388
- }, z.ZodTypeAny, "passthrough"> | undefined;
639
+ annotations?: {
640
+ [x: string]: unknown;
641
+ audience?: ("user" | "assistant")[] | undefined;
642
+ priority?: number | undefined;
643
+ lastModified?: string | undefined;
644
+ } | undefined;
1389
645
  _meta?: Record<string, unknown> | undefined;
1390
646
  data?: string | undefined;
1391
647
  uri?: string | undefined;
@@ -1393,64 +649,66 @@ export declare const sessionSummarySchema: z.ZodObject<{
1393
649
  type: "resource";
1394
650
  resource: {
1395
651
  uri: string;
1396
- text?: string | undefined;
1397
- _meta?: Record<string, unknown> | undefined;
1398
652
  mimeType?: string | undefined;
653
+ text?: string | undefined;
1399
654
  blob?: string | undefined;
1400
655
  assetUri?: string | undefined;
656
+ _meta?: Record<string, unknown> | undefined;
1401
657
  };
1402
- annotations?: z.objectOutputType<{
1403
- audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1404
- priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1405
- lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1406
- }, z.ZodTypeAny, "passthrough"> | undefined;
658
+ annotations?: {
659
+ [x: string]: unknown;
660
+ audience?: ("user" | "assistant")[] | undefined;
661
+ priority?: number | undefined;
662
+ lastModified?: string | undefined;
663
+ } | undefined;
1407
664
  _meta?: Record<string, unknown> | undefined;
1408
665
  } | {
1409
666
  type: "resource_link";
1410
667
  uri: string;
1411
668
  name: string;
1412
- annotations?: z.objectOutputType<{
1413
- audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1414
- priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1415
- lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1416
- }, z.ZodTypeAny, "passthrough"> | undefined;
669
+ kind?: "file" | "skill" | "agent" | undefined;
670
+ annotations?: {
671
+ [x: string]: unknown;
672
+ audience?: ("user" | "assistant")[] | undefined;
673
+ priority?: number | undefined;
674
+ lastModified?: string | undefined;
675
+ } | undefined;
1417
676
  _meta?: Record<string, unknown> | undefined;
1418
- mimeType?: string | undefined;
1419
677
  title?: string | undefined;
1420
678
  description?: string | undefined;
679
+ mimeType?: string | undefined;
1421
680
  size?: number | undefined;
1422
- kind?: "file" | "skill" | "agent" | undefined;
1423
- }, z.ZodTypeDef, unknown>;
1424
- }, "strip", z.ZodTypeAny, {
1425
- type: "content";
1426
- content: {
681
+ }, unknown, z.core.$ZodTypeInternals<{
1427
682
  type: "text";
1428
683
  text: string;
1429
- annotations?: z.objectOutputType<{
1430
- audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1431
- priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1432
- lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1433
- }, z.ZodTypeAny, "passthrough"> | undefined;
684
+ annotations?: {
685
+ [x: string]: unknown;
686
+ audience?: ("user" | "assistant")[] | undefined;
687
+ priority?: number | undefined;
688
+ lastModified?: string | undefined;
689
+ } | undefined;
1434
690
  _meta?: Record<string, unknown> | undefined;
1435
691
  } | {
1436
692
  type: "image";
1437
693
  mimeType: string;
1438
- annotations?: z.objectOutputType<{
1439
- audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1440
- priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1441
- lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1442
- }, z.ZodTypeAny, "passthrough"> | undefined;
694
+ annotations?: {
695
+ [x: string]: unknown;
696
+ audience?: ("user" | "assistant")[] | undefined;
697
+ priority?: number | undefined;
698
+ lastModified?: string | undefined;
699
+ } | undefined;
1443
700
  _meta?: Record<string, unknown> | undefined;
1444
701
  data?: string | undefined;
1445
702
  uri?: string | undefined;
1446
703
  } | {
1447
704
  type: "audio";
1448
705
  mimeType: string;
1449
- annotations?: z.objectOutputType<{
1450
- audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1451
- priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1452
- lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1453
- }, z.ZodTypeAny, "passthrough"> | undefined;
706
+ annotations?: {
707
+ [x: string]: unknown;
708
+ audience?: ("user" | "assistant")[] | undefined;
709
+ priority?: number | undefined;
710
+ lastModified?: string | undefined;
711
+ } | undefined;
1454
712
  _meta?: Record<string, unknown> | undefined;
1455
713
  data?: string | undefined;
1456
714
  uri?: string | undefined;
@@ -1458,233 +716,84 @@ export declare const sessionSummarySchema: z.ZodObject<{
1458
716
  type: "resource";
1459
717
  resource: {
1460
718
  uri: string;
1461
- text?: string | undefined;
1462
- _meta?: Record<string, unknown> | undefined;
1463
719
  mimeType?: string | undefined;
720
+ text?: string | undefined;
1464
721
  blob?: string | undefined;
1465
722
  assetUri?: string | undefined;
723
+ _meta?: Record<string, unknown> | undefined;
1466
724
  };
1467
- annotations?: z.objectOutputType<{
1468
- audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1469
- priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1470
- lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1471
- }, z.ZodTypeAny, "passthrough"> | undefined;
725
+ annotations?: {
726
+ [x: string]: unknown;
727
+ audience?: ("user" | "assistant")[] | undefined;
728
+ priority?: number | undefined;
729
+ lastModified?: string | undefined;
730
+ } | undefined;
1472
731
  _meta?: Record<string, unknown> | undefined;
1473
732
  } | {
1474
733
  type: "resource_link";
1475
734
  uri: string;
1476
735
  name: string;
1477
- annotations?: z.objectOutputType<{
1478
- audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1479
- priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1480
- lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1481
- }, z.ZodTypeAny, "passthrough"> | undefined;
736
+ kind?: "file" | "skill" | "agent" | undefined;
737
+ annotations?: {
738
+ [x: string]: unknown;
739
+ audience?: ("user" | "assistant")[] | undefined;
740
+ priority?: number | undefined;
741
+ lastModified?: string | undefined;
742
+ } | undefined;
1482
743
  _meta?: Record<string, unknown> | undefined;
1483
- mimeType?: string | undefined;
1484
744
  title?: string | undefined;
1485
745
  description?: string | undefined;
746
+ mimeType?: string | undefined;
1486
747
  size?: number | undefined;
1487
- kind?: "file" | "skill" | "agent" | undefined;
1488
- };
1489
- }, {
1490
- type: "content";
1491
- content?: unknown;
1492
- }>, z.ZodObject<{
748
+ }, unknown>>;
749
+ }, z.core.$strip>, z.ZodObject<{
1493
750
  type: z.ZodLiteral<"diff">;
1494
751
  path: z.ZodString;
1495
752
  oldText: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1496
753
  newText: z.ZodString;
1497
- }, "strip", z.ZodTypeAny, {
1498
- path: string;
1499
- type: "diff";
1500
- newText: string;
1501
- oldText?: string | null | undefined;
1502
- }, {
1503
- path: string;
1504
- type: "diff";
1505
- newText: string;
1506
- oldText?: string | null | undefined;
1507
- }>, z.ZodObject<{
754
+ }, z.core.$strip>, z.ZodObject<{
1508
755
  type: z.ZodLiteral<"patch">;
1509
756
  path: z.ZodString;
1510
- change: z.ZodEnum<["add", "delete", "update"]>;
757
+ change: z.ZodEnum<{
758
+ add: "add";
759
+ delete: "delete";
760
+ update: "update";
761
+ }>;
1511
762
  movePath: z.ZodOptional<z.ZodString>;
1512
763
  diff: z.ZodString;
1513
- }, "strip", z.ZodTypeAny, {
1514
- path: string;
1515
- type: "patch";
1516
- diff: string;
1517
- change: "add" | "delete" | "update";
1518
- movePath?: string | undefined;
1519
- }, {
1520
- path: string;
1521
- type: "patch";
1522
- diff: string;
1523
- change: "add" | "delete" | "update";
1524
- movePath?: string | undefined;
1525
- }>, z.ZodObject<{
764
+ }, z.core.$strip>, z.ZodObject<{
1526
765
  type: z.ZodLiteral<"terminal">;
1527
766
  terminalId: z.ZodString;
1528
- }, "strip", z.ZodTypeAny, {
1529
- type: "terminal";
1530
- terminalId: string;
1531
- }, {
1532
- type: "terminal";
1533
- terminalId: string;
1534
- }>]>, "many">>;
767
+ }, z.core.$strip>], "type">>>;
1535
768
  locations: z.ZodOptional<z.ZodArray<z.ZodObject<{
1536
769
  path: z.ZodString;
1537
770
  line: z.ZodOptional<z.ZodNumber>;
1538
- }, "strip", z.ZodTypeAny, {
1539
- path: string;
1540
- line?: number | undefined;
1541
- }, {
1542
- path: string;
1543
- line?: number | undefined;
1544
- }>, "many">>;
1545
- }, "strip", z.ZodTypeAny, {
1546
- title?: string | undefined;
1547
- kind?: "search" | "delete" | "other" | "read" | "edit" | "move" | "execute" | "think" | "fetch" | "switch_mode" | undefined;
1548
- content?: ({
1549
- type: "content";
1550
- content: {
1551
- type: "text";
1552
- text: string;
1553
- annotations?: z.objectOutputType<{
1554
- audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1555
- priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1556
- lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1557
- }, z.ZodTypeAny, "passthrough"> | undefined;
1558
- _meta?: Record<string, unknown> | undefined;
1559
- } | {
1560
- type: "image";
1561
- mimeType: string;
1562
- annotations?: z.objectOutputType<{
1563
- audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1564
- priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1565
- lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1566
- }, z.ZodTypeAny, "passthrough"> | undefined;
1567
- _meta?: Record<string, unknown> | undefined;
1568
- data?: string | undefined;
1569
- uri?: string | undefined;
1570
- } | {
1571
- type: "audio";
1572
- mimeType: string;
1573
- annotations?: z.objectOutputType<{
1574
- audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1575
- priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1576
- lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1577
- }, z.ZodTypeAny, "passthrough"> | undefined;
1578
- _meta?: Record<string, unknown> | undefined;
1579
- data?: string | undefined;
1580
- uri?: string | undefined;
1581
- } | {
1582
- type: "resource";
1583
- resource: {
1584
- uri: string;
1585
- text?: string | undefined;
1586
- _meta?: Record<string, unknown> | undefined;
1587
- mimeType?: string | undefined;
1588
- blob?: string | undefined;
1589
- assetUri?: string | undefined;
1590
- };
1591
- annotations?: z.objectOutputType<{
1592
- audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1593
- priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1594
- lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1595
- }, z.ZodTypeAny, "passthrough"> | undefined;
1596
- _meta?: Record<string, unknown> | undefined;
1597
- } | {
1598
- type: "resource_link";
1599
- uri: string;
1600
- name: string;
1601
- annotations?: z.objectOutputType<{
1602
- audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1603
- priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1604
- lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1605
- }, z.ZodTypeAny, "passthrough"> | undefined;
1606
- _meta?: Record<string, unknown> | undefined;
1607
- mimeType?: string | undefined;
1608
- title?: string | undefined;
1609
- description?: string | undefined;
1610
- size?: number | undefined;
1611
- kind?: "file" | "skill" | "agent" | undefined;
1612
- };
1613
- } | {
1614
- path: string;
1615
- type: "diff";
1616
- newText: string;
1617
- oldText?: string | null | undefined;
1618
- } | {
1619
- path: string;
1620
- type: "patch";
1621
- diff: string;
1622
- change: "add" | "delete" | "update";
1623
- movePath?: string | undefined;
1624
- } | {
1625
- type: "terminal";
1626
- terminalId: string;
1627
- })[] | undefined;
1628
- rawInput?: unknown;
1629
- locations?: {
1630
- path: string;
1631
- line?: number | undefined;
1632
- }[] | undefined;
1633
- }, {
1634
- title?: string | undefined;
1635
- kind?: "search" | "delete" | "other" | "read" | "edit" | "move" | "execute" | "think" | "fetch" | "switch_mode" | undefined;
1636
- content?: ({
1637
- type: "content";
1638
- content?: unknown;
1639
- } | {
1640
- path: string;
1641
- type: "diff";
1642
- newText: string;
1643
- oldText?: string | null | undefined;
1644
- } | {
1645
- path: string;
1646
- type: "patch";
1647
- diff: string;
1648
- change: "add" | "delete" | "update";
1649
- movePath?: string | undefined;
1650
- } | {
1651
- type: "terminal";
1652
- terminalId: string;
1653
- })[] | undefined;
1654
- rawInput?: unknown;
1655
- locations?: {
1656
- path: string;
1657
- line?: number | undefined;
1658
- }[] | undefined;
1659
- }>>;
771
+ }, z.core.$strip>>>;
772
+ }, z.core.$strip>>;
1660
773
  url: z.ZodOptional<z.ZodObject<{
1661
774
  url: z.ZodString;
1662
775
  elicitationId: z.ZodString;
1663
- }, "strip", z.ZodTypeAny, {
1664
- url: string;
1665
- elicitationId: string;
1666
- }, {
1667
- url: string;
1668
- elicitationId: string;
1669
- }>>;
776
+ }, z.core.$strip>>;
1670
777
  options: z.ZodArray<z.ZodObject<{
1671
778
  optionId: z.ZodString;
1672
779
  name: z.ZodString;
1673
- kind: z.ZodEnum<["allow_once", "allow_always", "reject_once", "reject_always"]>;
1674
- }, "strip", z.ZodTypeAny, {
1675
- name: string;
1676
- kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
1677
- optionId: string;
1678
- }, {
1679
- name: string;
1680
- kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
1681
- optionId: string;
1682
- }>, "many">;
1683
- /** Set when this is a question to answer (`sessions.answer`) rather than a permission to give. */
780
+ kind: z.ZodEnum<{
781
+ allow_once: "allow_once";
782
+ allow_always: "allow_always";
783
+ reject_once: "reject_once";
784
+ reject_always: "reject_always";
785
+ }>;
786
+ }, z.core.$strip>>;
1684
787
  questions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1685
788
  id: z.ZodString;
1686
789
  constraints: z.ZodOptional<z.ZodObject<{
1687
- type: z.ZodEnum<["string", "number", "integer", "boolean", "array"]>;
790
+ type: z.ZodEnum<{
791
+ string: "string";
792
+ number: "number";
793
+ boolean: "boolean";
794
+ array: "array";
795
+ integer: "integer";
796
+ }>;
1688
797
  minimum: z.ZodOptional<z.ZodNumber>;
1689
798
  maximum: z.ZodOptional<z.ZodNumber>;
1690
799
  minLength: z.ZodOptional<z.ZodNumber>;
@@ -1693,656 +802,51 @@ export declare const sessionSummarySchema: z.ZodObject<{
1693
802
  maxItems: z.ZodOptional<z.ZodNumber>;
1694
803
  pattern: z.ZodOptional<z.ZodString>;
1695
804
  format: z.ZodOptional<z.ZodString>;
1696
- }, "strip", z.ZodTypeAny, {
1697
- type: "string" | "number" | "boolean" | "integer" | "array";
1698
- minimum?: number | undefined;
1699
- maximum?: number | undefined;
1700
- minLength?: number | undefined;
1701
- maxLength?: number | undefined;
1702
- minItems?: number | undefined;
1703
- maxItems?: number | undefined;
1704
- pattern?: string | undefined;
1705
- format?: string | undefined;
1706
- }, {
1707
- type: "string" | "number" | "boolean" | "integer" | "array";
1708
- minimum?: number | undefined;
1709
- maximum?: number | undefined;
1710
- minLength?: number | undefined;
1711
- maxLength?: number | undefined;
1712
- minItems?: number | undefined;
1713
- maxItems?: number | undefined;
1714
- pattern?: string | undefined;
1715
- format?: string | undefined;
1716
- }>>;
1717
- defaults: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1718
- /** A short label for the question ("Auth method"). */
805
+ }, z.core.$strip>>;
806
+ defaults: z.ZodOptional<z.ZodArray<z.ZodString>>;
1719
807
  header: z.ZodOptional<z.ZodString>;
1720
808
  text: z.ZodString;
1721
- /** `choice`: one of `options`; `choices`: any number of them; `text`: typed. */
1722
- kind: z.ZodEnum<["choice", "choices", "text"]>;
809
+ kind: z.ZodEnum<{
810
+ text: "text";
811
+ choice: "choice";
812
+ choices: "choices";
813
+ }>;
1723
814
  options: z.ZodOptional<z.ZodArray<z.ZodObject<{
1724
815
  value: z.ZodString;
1725
816
  label: z.ZodString;
1726
817
  description: z.ZodOptional<z.ZodString>;
1727
- }, "strip", z.ZodTypeAny, {
1728
- value: string;
1729
- label: string;
1730
- description?: string | undefined;
1731
- }, {
1732
- value: string;
1733
- label: string;
1734
- description?: string | undefined;
1735
- }>, "many">>;
1736
- /** With options: an answer of the user's own can be typed instead of, or beside, a pick. */
818
+ }, z.core.$strip>>>;
1737
819
  other: z.ZodOptional<z.ZodBoolean>;
1738
- /** What is typed shouldn't be shown (a token). */
1739
820
  secret: z.ZodOptional<z.ZodBoolean>;
1740
821
  required: z.ZodOptional<z.ZodBoolean>;
1741
- }, "strip", z.ZodTypeAny, {
1742
- text: string;
1743
- kind: "text" | "choice" | "choices";
1744
- id: string;
1745
- secret?: boolean | undefined;
1746
- options?: {
1747
- value: string;
1748
- label: string;
1749
- description?: string | undefined;
1750
- }[] | undefined;
1751
- other?: boolean | undefined;
1752
- constraints?: {
1753
- type: "string" | "number" | "boolean" | "integer" | "array";
1754
- minimum?: number | undefined;
1755
- maximum?: number | undefined;
1756
- minLength?: number | undefined;
1757
- maxLength?: number | undefined;
1758
- minItems?: number | undefined;
1759
- maxItems?: number | undefined;
1760
- pattern?: string | undefined;
1761
- format?: string | undefined;
1762
- } | undefined;
1763
- defaults?: string[] | undefined;
1764
- header?: string | undefined;
1765
- required?: boolean | undefined;
1766
- }, {
1767
- text: string;
1768
- kind: "text" | "choice" | "choices";
1769
- id: string;
1770
- secret?: boolean | undefined;
1771
- options?: {
1772
- value: string;
1773
- label: string;
1774
- description?: string | undefined;
1775
- }[] | undefined;
1776
- other?: boolean | undefined;
1777
- constraints?: {
1778
- type: "string" | "number" | "boolean" | "integer" | "array";
1779
- minimum?: number | undefined;
1780
- maximum?: number | undefined;
1781
- minLength?: number | undefined;
1782
- maxLength?: number | undefined;
1783
- minItems?: number | undefined;
1784
- maxItems?: number | undefined;
1785
- pattern?: string | undefined;
1786
- format?: string | undefined;
1787
- } | undefined;
1788
- defaults?: string[] | undefined;
1789
- header?: string | undefined;
1790
- required?: boolean | undefined;
1791
- }>, "many">>;
1792
- }, "strip", z.ZodTypeAny, {
1793
- options: {
1794
- name: string;
1795
- kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
1796
- optionId: string;
1797
- }[];
1798
- title: string;
1799
- requestId: string;
1800
- toolCallId?: string | undefined;
1801
- tool?: {
1802
- title?: string | undefined;
1803
- kind?: "search" | "delete" | "other" | "read" | "edit" | "move" | "execute" | "think" | "fetch" | "switch_mode" | undefined;
1804
- content?: ({
1805
- type: "content";
1806
- content: {
1807
- type: "text";
1808
- text: string;
1809
- annotations?: z.objectOutputType<{
1810
- audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1811
- priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1812
- lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1813
- }, z.ZodTypeAny, "passthrough"> | undefined;
1814
- _meta?: Record<string, unknown> | undefined;
1815
- } | {
1816
- type: "image";
1817
- mimeType: string;
1818
- annotations?: z.objectOutputType<{
1819
- audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1820
- priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1821
- lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1822
- }, z.ZodTypeAny, "passthrough"> | undefined;
1823
- _meta?: Record<string, unknown> | undefined;
1824
- data?: string | undefined;
1825
- uri?: string | undefined;
1826
- } | {
1827
- type: "audio";
1828
- mimeType: string;
1829
- annotations?: z.objectOutputType<{
1830
- audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1831
- priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1832
- lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1833
- }, z.ZodTypeAny, "passthrough"> | undefined;
1834
- _meta?: Record<string, unknown> | undefined;
1835
- data?: string | undefined;
1836
- uri?: string | undefined;
1837
- } | {
1838
- type: "resource";
1839
- resource: {
1840
- uri: string;
1841
- text?: string | undefined;
1842
- _meta?: Record<string, unknown> | undefined;
1843
- mimeType?: string | undefined;
1844
- blob?: string | undefined;
1845
- assetUri?: string | undefined;
1846
- };
1847
- annotations?: z.objectOutputType<{
1848
- audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1849
- priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1850
- lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1851
- }, z.ZodTypeAny, "passthrough"> | undefined;
1852
- _meta?: Record<string, unknown> | undefined;
1853
- } | {
1854
- type: "resource_link";
1855
- uri: string;
1856
- name: string;
1857
- annotations?: z.objectOutputType<{
1858
- audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1859
- priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1860
- lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1861
- }, z.ZodTypeAny, "passthrough"> | undefined;
1862
- _meta?: Record<string, unknown> | undefined;
1863
- mimeType?: string | undefined;
1864
- title?: string | undefined;
1865
- description?: string | undefined;
1866
- size?: number | undefined;
1867
- kind?: "file" | "skill" | "agent" | undefined;
1868
- };
1869
- } | {
1870
- path: string;
1871
- type: "diff";
1872
- newText: string;
1873
- oldText?: string | null | undefined;
1874
- } | {
1875
- path: string;
1876
- type: "patch";
1877
- diff: string;
1878
- change: "add" | "delete" | "update";
1879
- movePath?: string | undefined;
1880
- } | {
1881
- type: "terminal";
1882
- terminalId: string;
1883
- })[] | undefined;
1884
- rawInput?: unknown;
1885
- locations?: {
1886
- path: string;
1887
- line?: number | undefined;
1888
- }[] | undefined;
1889
- } | undefined;
1890
- detail?: string | undefined;
1891
- questions?: {
1892
- text: string;
1893
- kind: "text" | "choice" | "choices";
1894
- id: string;
1895
- secret?: boolean | undefined;
1896
- options?: {
1897
- value: string;
1898
- label: string;
1899
- description?: string | undefined;
1900
- }[] | undefined;
1901
- other?: boolean | undefined;
1902
- constraints?: {
1903
- type: "string" | "number" | "boolean" | "integer" | "array";
1904
- minimum?: number | undefined;
1905
- maximum?: number | undefined;
1906
- minLength?: number | undefined;
1907
- maxLength?: number | undefined;
1908
- minItems?: number | undefined;
1909
- maxItems?: number | undefined;
1910
- pattern?: string | undefined;
1911
- format?: string | undefined;
1912
- } | undefined;
1913
- defaults?: string[] | undefined;
1914
- header?: string | undefined;
1915
- required?: boolean | undefined;
1916
- }[] | undefined;
1917
- childSessionId?: string | undefined;
1918
- url?: {
1919
- url: string;
1920
- elicitationId: string;
1921
- } | undefined;
1922
- }, {
1923
- options: {
1924
- name: string;
1925
- kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
1926
- optionId: string;
1927
- }[];
1928
- title: string;
1929
- requestId: string;
1930
- toolCallId?: string | undefined;
1931
- tool?: {
1932
- title?: string | undefined;
1933
- kind?: "search" | "delete" | "other" | "read" | "edit" | "move" | "execute" | "think" | "fetch" | "switch_mode" | undefined;
1934
- content?: ({
1935
- type: "content";
1936
- content?: unknown;
1937
- } | {
1938
- path: string;
1939
- type: "diff";
1940
- newText: string;
1941
- oldText?: string | null | undefined;
1942
- } | {
1943
- path: string;
1944
- type: "patch";
1945
- diff: string;
1946
- change: "add" | "delete" | "update";
1947
- movePath?: string | undefined;
1948
- } | {
1949
- type: "terminal";
1950
- terminalId: string;
1951
- })[] | undefined;
1952
- rawInput?: unknown;
1953
- locations?: {
1954
- path: string;
1955
- line?: number | undefined;
1956
- }[] | undefined;
1957
- } | undefined;
1958
- detail?: string | undefined;
1959
- questions?: {
1960
- text: string;
1961
- kind: "text" | "choice" | "choices";
1962
- id: string;
1963
- secret?: boolean | undefined;
1964
- options?: {
1965
- value: string;
1966
- label: string;
1967
- description?: string | undefined;
1968
- }[] | undefined;
1969
- other?: boolean | undefined;
1970
- constraints?: {
1971
- type: "string" | "number" | "boolean" | "integer" | "array";
1972
- minimum?: number | undefined;
1973
- maximum?: number | undefined;
1974
- minLength?: number | undefined;
1975
- maxLength?: number | undefined;
1976
- minItems?: number | undefined;
1977
- maxItems?: number | undefined;
1978
- pattern?: string | undefined;
1979
- format?: string | undefined;
1980
- } | undefined;
1981
- defaults?: string[] | undefined;
1982
- header?: string | undefined;
1983
- required?: boolean | undefined;
1984
- }[] | undefined;
1985
- childSessionId?: string | undefined;
1986
- url?: {
1987
- url: string;
1988
- elicitationId: string;
1989
- } | undefined;
1990
- }>>;
1991
- /** Unanswered questions in the current turn, even while the agent continues working. */
822
+ }, z.core.$strip>>>;
823
+ }, z.core.$strip>>;
1992
824
  asyncQuestions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1993
825
  id: z.ZodString;
1994
826
  title: z.ZodString;
1995
- options: z.ZodArray<z.ZodString, "many">;
1996
- }, "strip", z.ZodTypeAny, {
1997
- options: string[];
1998
- title: string;
1999
- id: string;
2000
- }, {
2001
- options: string[];
2002
- title: string;
2003
- id: string;
2004
- }>, "many">>;
2005
- /**
2006
- * Live only: messages waiting for the current turn to end, when the host
2007
- * holds them (agents that can't take input mid-turn). Oldest first.
2008
- */
827
+ options: z.ZodArray<z.ZodString>;
828
+ }, z.core.$strip>>>;
2009
829
  queue: z.ZodOptional<z.ZodArray<z.ZodObject<{
2010
830
  clientMessageId: z.ZodString;
2011
- /** The message's text (images are counted, not sent). */
2012
831
  text: z.ZodString;
2013
832
  images: z.ZodNumber;
2014
- }, "strip", z.ZodTypeAny, {
2015
- text: string;
2016
- images: number;
2017
- clientMessageId: string;
2018
- }, {
2019
- text: string;
2020
- images: number;
2021
- clientMessageId: string;
2022
- }>, "many">>;
2023
- /**
2024
- * The session works in a git worktree LinkShell made for it: its own
2025
- * checkout and branch, so it can't disturb the project's working directory.
2026
- * `cwd` is inside the worktree; `source` is the directory it was made from
2027
- * (the project the session belongs to).
2028
- */
833
+ }, z.core.$strip>>>;
2029
834
  worktree: z.ZodOptional<z.ZodObject<{
2030
835
  branch: z.ZodString;
2031
836
  source: z.ZodString;
2032
- }, "strip", z.ZodTypeAny, {
2033
- branch: string;
2034
- source: string;
2035
- }, {
2036
- branch: string;
2037
- source: string;
2038
- }>>;
2039
- /** Live only, for sessions that started sub-agents: how many, and how many are working now (`sessions.subagents` lists them). */
837
+ }, z.core.$strip>>;
838
+ parentId: z.ZodOptional<z.ZodString>;
839
+ forkedFrom: z.ZodOptional<z.ZodString>;
840
+ appId: z.ZodOptional<z.ZodString>;
2040
841
  subagents: z.ZodOptional<z.ZodObject<{
2041
842
  total: z.ZodNumber;
2042
843
  running: z.ZodNumber;
2043
- }, "strip", z.ZodTypeAny, {
2044
- running: number;
2045
- total: number;
2046
- }, {
2047
- running: number;
2048
- total: number;
2049
- }>>;
2050
- /** Live only, for sessions that left commands running: how many, and how many still run (`sessions.tasks` lists them). */
844
+ }, z.core.$strip>>;
2051
845
  tasks: z.ZodOptional<z.ZodObject<{
2052
846
  total: z.ZodNumber;
2053
847
  running: z.ZodNumber;
2054
- }, "strip", z.ZodTypeAny, {
2055
- running: number;
2056
- total: number;
2057
- }, {
2058
- running: number;
2059
- total: number;
2060
- }>>;
2061
- }, "strip", z.ZodTypeAny, {
2062
- agent: string;
2063
- id: string;
2064
- state: "unknown" | "running" | "error" | "idle" | "waiting" | "offline";
2065
- updatedAt: number;
2066
- lastSeq: number;
2067
- nativeId: string;
2068
- cwd: string;
2069
- pendingPermissions: number;
2070
- createdAt: number;
2071
- archived: boolean;
2072
- title?: string | undefined;
2073
- model?: string | undefined;
2074
- driver?: "desktop" | "remote" | "none" | undefined;
2075
- preview?: string | undefined;
2076
- activity?: {
2077
- kind: "tool" | "thinking" | "responding";
2078
- title?: string | undefined;
2079
- toolKind?: "search" | "delete" | "other" | "read" | "edit" | "move" | "execute" | "think" | "fetch" | "switch_mode" | undefined;
2080
- } | undefined;
2081
- permission?: {
2082
- options: {
2083
- name: string;
2084
- kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
2085
- optionId: string;
2086
- }[];
2087
- title: string;
2088
- requestId: string;
2089
- toolCallId?: string | undefined;
2090
- tool?: {
2091
- title?: string | undefined;
2092
- kind?: "search" | "delete" | "other" | "read" | "edit" | "move" | "execute" | "think" | "fetch" | "switch_mode" | undefined;
2093
- content?: ({
2094
- type: "content";
2095
- content: {
2096
- type: "text";
2097
- text: string;
2098
- annotations?: z.objectOutputType<{
2099
- audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
2100
- priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
2101
- lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
2102
- }, z.ZodTypeAny, "passthrough"> | undefined;
2103
- _meta?: Record<string, unknown> | undefined;
2104
- } | {
2105
- type: "image";
2106
- mimeType: string;
2107
- annotations?: z.objectOutputType<{
2108
- audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
2109
- priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
2110
- lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
2111
- }, z.ZodTypeAny, "passthrough"> | undefined;
2112
- _meta?: Record<string, unknown> | undefined;
2113
- data?: string | undefined;
2114
- uri?: string | undefined;
2115
- } | {
2116
- type: "audio";
2117
- mimeType: string;
2118
- annotations?: z.objectOutputType<{
2119
- audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
2120
- priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
2121
- lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
2122
- }, z.ZodTypeAny, "passthrough"> | undefined;
2123
- _meta?: Record<string, unknown> | undefined;
2124
- data?: string | undefined;
2125
- uri?: string | undefined;
2126
- } | {
2127
- type: "resource";
2128
- resource: {
2129
- uri: string;
2130
- text?: string | undefined;
2131
- _meta?: Record<string, unknown> | undefined;
2132
- mimeType?: string | undefined;
2133
- blob?: string | undefined;
2134
- assetUri?: string | undefined;
2135
- };
2136
- annotations?: z.objectOutputType<{
2137
- audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
2138
- priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
2139
- lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
2140
- }, z.ZodTypeAny, "passthrough"> | undefined;
2141
- _meta?: Record<string, unknown> | undefined;
2142
- } | {
2143
- type: "resource_link";
2144
- uri: string;
2145
- name: string;
2146
- annotations?: z.objectOutputType<{
2147
- audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
2148
- priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
2149
- lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
2150
- }, z.ZodTypeAny, "passthrough"> | undefined;
2151
- _meta?: Record<string, unknown> | undefined;
2152
- mimeType?: string | undefined;
2153
- title?: string | undefined;
2154
- description?: string | undefined;
2155
- size?: number | undefined;
2156
- kind?: "file" | "skill" | "agent" | undefined;
2157
- };
2158
- } | {
2159
- path: string;
2160
- type: "diff";
2161
- newText: string;
2162
- oldText?: string | null | undefined;
2163
- } | {
2164
- path: string;
2165
- type: "patch";
2166
- diff: string;
2167
- change: "add" | "delete" | "update";
2168
- movePath?: string | undefined;
2169
- } | {
2170
- type: "terminal";
2171
- terminalId: string;
2172
- })[] | undefined;
2173
- rawInput?: unknown;
2174
- locations?: {
2175
- path: string;
2176
- line?: number | undefined;
2177
- }[] | undefined;
2178
- } | undefined;
2179
- detail?: string | undefined;
2180
- questions?: {
2181
- text: string;
2182
- kind: "text" | "choice" | "choices";
2183
- id: string;
2184
- secret?: boolean | undefined;
2185
- options?: {
2186
- value: string;
2187
- label: string;
2188
- description?: string | undefined;
2189
- }[] | undefined;
2190
- other?: boolean | undefined;
2191
- constraints?: {
2192
- type: "string" | "number" | "boolean" | "integer" | "array";
2193
- minimum?: number | undefined;
2194
- maximum?: number | undefined;
2195
- minLength?: number | undefined;
2196
- maxLength?: number | undefined;
2197
- minItems?: number | undefined;
2198
- maxItems?: number | undefined;
2199
- pattern?: string | undefined;
2200
- format?: string | undefined;
2201
- } | undefined;
2202
- defaults?: string[] | undefined;
2203
- header?: string | undefined;
2204
- required?: boolean | undefined;
2205
- }[] | undefined;
2206
- childSessionId?: string | undefined;
2207
- url?: {
2208
- url: string;
2209
- elicitationId: string;
2210
- } | undefined;
2211
- } | undefined;
2212
- asyncQuestions?: {
2213
- options: string[];
2214
- title: string;
2215
- id: string;
2216
- }[] | undefined;
2217
- queue?: {
2218
- text: string;
2219
- images: number;
2220
- clientMessageId: string;
2221
- }[] | undefined;
2222
- worktree?: {
2223
- branch: string;
2224
- source: string;
2225
- } | undefined;
2226
- subagents?: {
2227
- running: number;
2228
- total: number;
2229
- } | undefined;
2230
- tasks?: {
2231
- running: number;
2232
- total: number;
2233
- } | undefined;
2234
- }, {
2235
- agent: string;
2236
- id: string;
2237
- state: "unknown" | "running" | "error" | "idle" | "waiting" | "offline";
2238
- updatedAt: number;
2239
- lastSeq: number;
2240
- nativeId: string;
2241
- cwd: string;
2242
- pendingPermissions: number;
2243
- createdAt: number;
2244
- archived: boolean;
2245
- title?: string | undefined;
2246
- model?: string | undefined;
2247
- driver?: "desktop" | "remote" | "none" | undefined;
2248
- preview?: string | undefined;
2249
- activity?: {
2250
- kind: "tool" | "thinking" | "responding";
2251
- title?: string | undefined;
2252
- toolKind?: "search" | "delete" | "other" | "read" | "edit" | "move" | "execute" | "think" | "fetch" | "switch_mode" | undefined;
2253
- } | undefined;
2254
- permission?: {
2255
- options: {
2256
- name: string;
2257
- kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
2258
- optionId: string;
2259
- }[];
2260
- title: string;
2261
- requestId: string;
2262
- toolCallId?: string | undefined;
2263
- tool?: {
2264
- title?: string | undefined;
2265
- kind?: "search" | "delete" | "other" | "read" | "edit" | "move" | "execute" | "think" | "fetch" | "switch_mode" | undefined;
2266
- content?: ({
2267
- type: "content";
2268
- content?: unknown;
2269
- } | {
2270
- path: string;
2271
- type: "diff";
2272
- newText: string;
2273
- oldText?: string | null | undefined;
2274
- } | {
2275
- path: string;
2276
- type: "patch";
2277
- diff: string;
2278
- change: "add" | "delete" | "update";
2279
- movePath?: string | undefined;
2280
- } | {
2281
- type: "terminal";
2282
- terminalId: string;
2283
- })[] | undefined;
2284
- rawInput?: unknown;
2285
- locations?: {
2286
- path: string;
2287
- line?: number | undefined;
2288
- }[] | undefined;
2289
- } | undefined;
2290
- detail?: string | undefined;
2291
- questions?: {
2292
- text: string;
2293
- kind: "text" | "choice" | "choices";
2294
- id: string;
2295
- secret?: boolean | undefined;
2296
- options?: {
2297
- value: string;
2298
- label: string;
2299
- description?: string | undefined;
2300
- }[] | undefined;
2301
- other?: boolean | undefined;
2302
- constraints?: {
2303
- type: "string" | "number" | "boolean" | "integer" | "array";
2304
- minimum?: number | undefined;
2305
- maximum?: number | undefined;
2306
- minLength?: number | undefined;
2307
- maxLength?: number | undefined;
2308
- minItems?: number | undefined;
2309
- maxItems?: number | undefined;
2310
- pattern?: string | undefined;
2311
- format?: string | undefined;
2312
- } | undefined;
2313
- defaults?: string[] | undefined;
2314
- header?: string | undefined;
2315
- required?: boolean | undefined;
2316
- }[] | undefined;
2317
- childSessionId?: string | undefined;
2318
- url?: {
2319
- url: string;
2320
- elicitationId: string;
2321
- } | undefined;
2322
- } | undefined;
2323
- asyncQuestions?: {
2324
- options: string[];
2325
- title: string;
2326
- id: string;
2327
- }[] | undefined;
2328
- queue?: {
2329
- text: string;
2330
- images: number;
2331
- clientMessageId: string;
2332
- }[] | undefined;
2333
- worktree?: {
2334
- branch: string;
2335
- source: string;
2336
- } | undefined;
2337
- subagents?: {
2338
- running: number;
2339
- total: number;
2340
- } | undefined;
2341
- tasks?: {
2342
- running: number;
2343
- total: number;
2344
- } | undefined;
2345
- }>;
848
+ }, z.core.$strip>>;
849
+ }, z.core.$strip>;
2346
850
  export type SessionSummary = z.infer<typeof sessionSummarySchema>;
2347
851
  export declare function sessionIdFor(agent: string, nativeId: string): string;
2348
852
  export declare function parseSessionId(id: string): {
@@ -2351,457 +855,130 @@ export declare function parseSessionId(id: string): {
2351
855
  } | null;
2352
856
  /** What git says about a directory, to offer starting a session in a worktree of it. */
2353
857
  export declare const gitInfoSchema: z.ZodObject<{
2354
- /** The repository's top directory. */
2355
858
  root: z.ZodString;
2356
- /** The branch checked out; absent on a detached HEAD. */
2357
859
  branch: z.ZodOptional<z.ZodString>;
2358
- /** The commit checked out, abbreviated; absent before the first commit. */
2359
860
  head: z.ZodOptional<z.ZodString>;
2360
- /** Uncommitted changes in the working directory (a new worktree starts from the last commit, without them). */
2361
861
  dirty: z.ZodBoolean;
2362
- }, "strip", z.ZodTypeAny, {
2363
- dirty: boolean;
2364
- root: string;
2365
- branch?: string | undefined;
2366
- head?: string | undefined;
2367
- }, {
2368
- dirty: boolean;
2369
- root: string;
2370
- branch?: string | undefined;
2371
- head?: string | undefined;
2372
- }>;
862
+ }, z.core.$strip>;
2373
863
  export type GitInfo = z.infer<typeof gitInfoSchema>;
2374
864
  /** A worktree LinkShell made for sessions. */
2375
865
  export declare const worktreeEntrySchema: z.ZodObject<{
2376
- /** The worktree's top directory. */
2377
866
  path: z.ZodString;
2378
867
  branch: z.ZodString;
2379
- /** The repository it belongs to. */
2380
868
  source: z.ZodString;
2381
869
  createdAt: z.ZodNumber;
2382
- /** Sessions working in it. */
2383
- sessions: z.ZodArray<z.ZodString, "many">;
2384
- /** Uncommitted changes in it. */
870
+ sessions: z.ZodArray<z.ZodString>;
2385
871
  dirty: z.ZodBoolean;
2386
- /** Commits made in it since it was created. */
2387
872
  ahead: z.ZodNumber;
2388
- }, "strip", z.ZodTypeAny, {
2389
- dirty: boolean;
2390
- path: string;
2391
- createdAt: number;
2392
- branch: string;
2393
- source: string;
2394
- sessions: string[];
2395
- ahead: number;
2396
- }, {
2397
- dirty: boolean;
2398
- path: string;
2399
- createdAt: number;
2400
- branch: string;
2401
- source: string;
2402
- sessions: string[];
2403
- ahead: number;
2404
- }>;
873
+ }, z.core.$strip>;
2405
874
  export type WorktreeEntry = z.infer<typeof worktreeEntrySchema>;
2406
875
  export declare const projectSummarySchema: z.ZodObject<{
2407
876
  cwd: z.ZodString;
2408
877
  name: z.ZodString;
2409
878
  lastActiveAt: z.ZodNumber;
2410
879
  sessionCount: z.ZodNumber;
2411
- /** For a git repository: the branch checked out there now (or the abbreviated commit, on a detached HEAD). */
2412
880
  branch: z.ZodOptional<z.ZodString>;
2413
- }, "strip", z.ZodTypeAny, {
2414
- name: string;
2415
- cwd: string;
2416
- lastActiveAt: number;
2417
- sessionCount: number;
2418
- branch?: string | undefined;
2419
- }, {
2420
- name: string;
2421
- cwd: string;
2422
- lastActiveAt: number;
2423
- sessionCount: number;
2424
- branch?: string | undefined;
2425
- }>;
881
+ }, z.core.$strip>;
2426
882
  export type ProjectSummary = z.infer<typeof projectSummarySchema>;
2427
883
  export declare const machineInfoSchema: z.ZodObject<{
2428
884
  machineId: z.ZodString;
2429
885
  hostname: z.ZodString;
2430
886
  platform: z.ZodString;
2431
887
  hostVersion: z.ZodString;
2432
- /** The host's RPC revision (`HOST_PROTOCOL`); absent from hosts older than it. */
2433
888
  protocol: z.ZodOptional<z.ZodNumber>;
2434
- /** The host user's home directory, so apps can show paths as `~/…`. */
2435
889
  home: z.ZodOptional<z.ZodString>;
2436
890
  agents: z.ZodArray<z.ZodObject<{
2437
891
  id: z.ZodString;
2438
892
  label: z.ZodString;
2439
- tier: z.ZodEnum<["multi_client", "handoff", "remote", "terminal"]>;
893
+ tier: z.ZodEnum<{
894
+ terminal: "terminal";
895
+ remote: "remote";
896
+ multi_client: "multi_client";
897
+ handoff: "handoff";
898
+ }>;
2440
899
  installed: z.ZodBoolean;
2441
900
  version: z.ZodOptional<z.ZodString>;
2442
- /** Human-readable reason when the agent is installed but unusable. */
2443
901
  problem: z.ZodOptional<z.ZodString>;
2444
902
  auth: z.ZodOptional<z.ZodObject<{
2445
- state: z.ZodEnum<["ok", "missing", "unknown"]>;
2446
- /** e.g. "claude.ai", "api_key", "oauth_token", "chatgpt", "bedrock". */
903
+ state: z.ZodEnum<{
904
+ unknown: "unknown";
905
+ ok: "ok";
906
+ missing: "missing";
907
+ }>;
2447
908
  method: z.ZodOptional<z.ZodString>;
2448
- /** What the user should do when state is "missing". */
2449
909
  hint: z.ZodOptional<z.ZodString>;
2450
- }, "strip", z.ZodTypeAny, {
2451
- state: "unknown" | "ok" | "missing";
2452
- hint?: string | undefined;
2453
- method?: string | undefined;
2454
- }, {
2455
- state: "unknown" | "ok" | "missing";
2456
- hint?: string | undefined;
2457
- method?: string | undefined;
2458
- }>>;
910
+ }, z.core.$strip>>;
2459
911
  capabilities: z.ZodObject<{
2460
912
  interrupt: z.ZodBoolean;
2461
- /** Inject a message into a running turn instead of queueing it. */
2462
913
  steer: z.ZodBoolean;
2463
914
  permissions: z.ZodBoolean;
2464
915
  images: z.ZodBoolean;
2465
916
  audio: z.ZodOptional<z.ZodBoolean>;
2466
917
  embeddedContext: z.ZodOptional<z.ZodBoolean>;
2467
- /** Host-managed ACP settings and optional protocol features. */
2468
918
  acp: z.ZodOptional<z.ZodBoolean>;
2469
- /**
2470
- * The agent forks sessions itself, keeping everything it knew. Every agent's
2471
- * sessions can be forked: without this (or from a single reply, where the
2472
- * agent only forks whole sessions) LinkShell makes the fork — the new session
2473
- * shows the conversation and its agent is told it as text.
2474
- */
2475
919
  fork: z.ZodBoolean;
2476
- /** The agent has a side conversation of its own (`sessions.side`). Absent from older hosts. */
2477
920
  side: z.ZodOptional<z.ZodBoolean>;
2478
921
  models: z.ZodBoolean;
2479
922
  modes: z.ZodBoolean;
2480
- }, "strip", z.ZodTypeAny, {
2481
- interrupt: boolean;
2482
- steer: boolean;
2483
- permissions: boolean;
2484
- images: boolean;
2485
- fork: boolean;
2486
- models: boolean;
2487
- modes: boolean;
2488
- audio?: boolean | undefined;
2489
- embeddedContext?: boolean | undefined;
2490
- acp?: boolean | undefined;
2491
- side?: boolean | undefined;
2492
- }, {
2493
- interrupt: boolean;
2494
- steer: boolean;
2495
- permissions: boolean;
2496
- images: boolean;
2497
- fork: boolean;
2498
- models: boolean;
2499
- modes: boolean;
2500
- audio?: boolean | undefined;
2501
- embeddedContext?: boolean | undefined;
2502
- acp?: boolean | undefined;
2503
- side?: boolean | undefined;
2504
- }>;
2505
- }, "strip", z.ZodTypeAny, {
2506
- id: string;
2507
- label: string;
2508
- tier: "terminal" | "remote" | "multi_client" | "handoff";
2509
- installed: boolean;
2510
- capabilities: {
2511
- interrupt: boolean;
2512
- steer: boolean;
2513
- permissions: boolean;
2514
- images: boolean;
2515
- fork: boolean;
2516
- models: boolean;
2517
- modes: boolean;
2518
- audio?: boolean | undefined;
2519
- embeddedContext?: boolean | undefined;
2520
- acp?: boolean | undefined;
2521
- side?: boolean | undefined;
2522
- };
2523
- version?: string | undefined;
2524
- problem?: string | undefined;
2525
- auth?: {
2526
- state: "unknown" | "ok" | "missing";
2527
- hint?: string | undefined;
2528
- method?: string | undefined;
2529
- } | undefined;
2530
- }, {
2531
- id: string;
2532
- label: string;
2533
- tier: "terminal" | "remote" | "multi_client" | "handoff";
2534
- installed: boolean;
2535
- capabilities: {
2536
- interrupt: boolean;
2537
- steer: boolean;
2538
- permissions: boolean;
2539
- images: boolean;
2540
- fork: boolean;
2541
- models: boolean;
2542
- modes: boolean;
2543
- audio?: boolean | undefined;
2544
- embeddedContext?: boolean | undefined;
2545
- acp?: boolean | undefined;
2546
- side?: boolean | undefined;
2547
- };
2548
- version?: string | undefined;
2549
- problem?: string | undefined;
2550
- auth?: {
2551
- state: "unknown" | "ok" | "missing";
2552
- hint?: string | undefined;
2553
- method?: string | undefined;
2554
- } | undefined;
2555
- }>, "many">;
2556
- /**
2557
- * The host can send bulk streams peer to peer (`direct.offer`); `iceServers`
2558
- * are the STUN servers both sides use to find a path.
2559
- */
923
+ }, z.core.$strip>;
924
+ }, z.core.$strip>>;
2560
925
  direct: z.ZodOptional<z.ZodObject<{
2561
- iceServers: z.ZodArray<z.ZodString, "many">;
2562
- }, "strip", z.ZodTypeAny, {
2563
- iceServers: string[];
2564
- }, {
2565
- iceServers: string[];
2566
- }>>;
2567
- /** The computer has an access password and this connection must `access.unlock` first; until then the rest is withheld. */
926
+ iceServers: z.ZodArray<z.ZodString>;
927
+ }, z.core.$strip>>;
2568
928
  locked: z.ZodOptional<z.ZodBoolean>;
2569
- }, "strip", z.ZodTypeAny, {
2570
- agents: {
2571
- id: string;
2572
- label: string;
2573
- tier: "terminal" | "remote" | "multi_client" | "handoff";
2574
- installed: boolean;
2575
- capabilities: {
2576
- interrupt: boolean;
2577
- steer: boolean;
2578
- permissions: boolean;
2579
- images: boolean;
2580
- fork: boolean;
2581
- models: boolean;
2582
- modes: boolean;
2583
- audio?: boolean | undefined;
2584
- embeddedContext?: boolean | undefined;
2585
- acp?: boolean | undefined;
2586
- side?: boolean | undefined;
2587
- };
2588
- version?: string | undefined;
2589
- problem?: string | undefined;
2590
- auth?: {
2591
- state: "unknown" | "ok" | "missing";
2592
- hint?: string | undefined;
2593
- method?: string | undefined;
2594
- } | undefined;
2595
- }[];
2596
- machineId: string;
2597
- hostname: string;
2598
- platform: string;
2599
- hostVersion: string;
2600
- protocol?: number | undefined;
2601
- home?: string | undefined;
2602
- direct?: {
2603
- iceServers: string[];
2604
- } | undefined;
2605
- locked?: boolean | undefined;
2606
- }, {
2607
- agents: {
2608
- id: string;
2609
- label: string;
2610
- tier: "terminal" | "remote" | "multi_client" | "handoff";
2611
- installed: boolean;
2612
- capabilities: {
2613
- interrupt: boolean;
2614
- steer: boolean;
2615
- permissions: boolean;
2616
- images: boolean;
2617
- fork: boolean;
2618
- models: boolean;
2619
- modes: boolean;
2620
- audio?: boolean | undefined;
2621
- embeddedContext?: boolean | undefined;
2622
- acp?: boolean | undefined;
2623
- side?: boolean | undefined;
2624
- };
2625
- version?: string | undefined;
2626
- problem?: string | undefined;
2627
- auth?: {
2628
- state: "unknown" | "ok" | "missing";
2629
- hint?: string | undefined;
2630
- method?: string | undefined;
2631
- } | undefined;
2632
- }[];
2633
- machineId: string;
2634
- hostname: string;
2635
- platform: string;
2636
- hostVersion: string;
2637
- protocol?: number | undefined;
2638
- home?: string | undefined;
2639
- direct?: {
2640
- iceServers: string[];
2641
- } | undefined;
2642
- locked?: boolean | undefined;
2643
- }>;
929
+ }, z.core.$strip>;
2644
930
  export type MachineInfo = z.infer<typeof machineInfoSchema>;
2645
931
  /** A server listening on the host, which a device can preview through the encrypted channel. */
2646
932
  export declare const portInfoSchema: z.ZodObject<{
2647
933
  port: z.ZodNumber;
2648
- /** The listening process ("node", "python3.12"). */
2649
934
  process: z.ZodString;
2650
935
  pid: z.ZodOptional<z.ZodNumber>;
2651
- /** The process's working directory: which project the server belongs to. */
2652
936
  cwd: z.ZodOptional<z.ZodString>;
2653
- /** The page title, when the port answers HTTP with an HTML page. */
2654
937
  title: z.ZodOptional<z.ZodString>;
2655
- /** Answers HTTP at all (a dev server, not a database). */
2656
938
  http: z.ZodBoolean;
2657
- }, "strip", z.ZodTypeAny, {
2658
- port: number;
2659
- process: string;
2660
- http: boolean;
2661
- title?: string | undefined;
2662
- cwd?: string | undefined;
2663
- pid?: number | undefined;
2664
- }, {
2665
- port: number;
2666
- process: string;
2667
- http: boolean;
2668
- title?: string | undefined;
2669
- cwd?: string | undefined;
2670
- pid?: number | undefined;
2671
- }>;
939
+ }, z.core.$strip>;
2672
940
  export type PortInfo = z.infer<typeof portInfoSchema>;
2673
941
  /** A shell the host keeps open, independent of any device connection. */
2674
942
  export declare const terminalInfoSchema: z.ZodObject<{
2675
943
  id: z.ZodString;
2676
- /** What's running in the foreground (the shell or its current command). */
2677
944
  title: z.ZodString;
2678
945
  cwd: z.ZodString;
2679
946
  cols: z.ZodNumber;
2680
947
  rows: z.ZodNumber;
2681
948
  createdAt: z.ZodNumber;
2682
- /** Last output time. */
2683
949
  activeAt: z.ZodNumber;
2684
- /** The command it was started to run, if any (else it's a plain shell). */
2685
950
  command: z.ZodOptional<z.ZodString>;
2686
- /** Set once the shell ended; the terminal and its output stay until deleted. */
2687
951
  exitCode: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2688
- /** Ended without an exit code: the host stopped while it ran. */
2689
952
  interrupted: z.ZodOptional<z.ZodBoolean>;
2690
- }, "strip", z.ZodTypeAny, {
2691
- title: string;
2692
- id: string;
2693
- cwd: string;
2694
- createdAt: number;
2695
- cols: number;
2696
- rows: number;
2697
- activeAt: number;
2698
- command?: string | undefined;
2699
- exitCode?: number | null | undefined;
2700
- interrupted?: boolean | undefined;
2701
- }, {
2702
- title: string;
2703
- id: string;
2704
- cwd: string;
2705
- createdAt: number;
2706
- cols: number;
2707
- rows: number;
2708
- activeAt: number;
2709
- command?: string | undefined;
2710
- exitCode?: number | null | undefined;
2711
- interrupted?: boolean | undefined;
2712
- }>;
953
+ sessionId: z.ZodOptional<z.ZodString>;
954
+ }, z.core.$strip>;
2713
955
  export type TerminalInfo = z.infer<typeof terminalInfoSchema>;
2714
956
  /** The host's link to a v2 gateway, for `linkshell status` and the app's computer page. */
2715
957
  export declare const gatewayStatusSchema: z.ZodObject<{
2716
958
  url: z.ZodOptional<z.ZodString>;
2717
- status: z.ZodEnum<["off", "connecting", "online", "offline"]>;
959
+ status: z.ZodEnum<{
960
+ offline: "offline";
961
+ off: "off";
962
+ connecting: "connecting";
963
+ online: "online";
964
+ }>;
2718
965
  error: z.ZodOptional<z.ZodObject<{
2719
966
  code: z.ZodString;
2720
967
  message: z.ZodString;
2721
- }, "strip", z.ZodTypeAny, {
2722
- code: string;
2723
- message: string;
2724
- }, {
2725
- code: string;
2726
- message: string;
2727
- }>>;
968
+ }, z.core.$strip>>;
2728
969
  machine: z.ZodOptional<z.ZodObject<{
2729
970
  id: z.ZodString;
2730
971
  name: z.ZodString;
2731
- }, "strip", z.ZodTypeAny, {
2732
- name: string;
2733
- id: string;
2734
- }, {
2735
- name: string;
2736
- id: string;
2737
- }>>;
972
+ }, z.core.$strip>>;
2738
973
  account: z.ZodOptional<z.ZodObject<{
2739
974
  userId: z.ZodString;
2740
975
  email: z.ZodOptional<z.ZodString>;
2741
- }, "strip", z.ZodTypeAny, {
2742
- userId: string;
2743
- email?: string | undefined;
2744
- }, {
2745
- userId: string;
2746
- email?: string | undefined;
2747
- }>>;
976
+ }, z.core.$strip>>;
2748
977
  devices: z.ZodArray<z.ZodObject<{
2749
978
  id: z.ZodString;
2750
979
  name: z.ZodString;
2751
980
  pairedAt: z.ZodNumber;
2752
981
  online: z.ZodBoolean;
2753
- }, "strip", z.ZodTypeAny, {
2754
- name: string;
2755
- id: string;
2756
- online: boolean;
2757
- pairedAt: number;
2758
- }, {
2759
- name: string;
2760
- id: string;
2761
- online: boolean;
2762
- pairedAt: number;
2763
- }>, "many">;
2764
- }, "strip", z.ZodTypeAny, {
2765
- status: "offline" | "off" | "connecting" | "online";
2766
- devices: {
2767
- name: string;
2768
- id: string;
2769
- online: boolean;
2770
- pairedAt: number;
2771
- }[];
2772
- error?: {
2773
- code: string;
2774
- message: string;
2775
- } | undefined;
2776
- url?: string | undefined;
2777
- machine?: {
2778
- name: string;
2779
- id: string;
2780
- } | undefined;
2781
- account?: {
2782
- userId: string;
2783
- email?: string | undefined;
2784
- } | undefined;
2785
- }, {
2786
- status: "offline" | "off" | "connecting" | "online";
2787
- devices: {
2788
- name: string;
2789
- id: string;
2790
- online: boolean;
2791
- pairedAt: number;
2792
- }[];
2793
- error?: {
2794
- code: string;
2795
- message: string;
2796
- } | undefined;
2797
- url?: string | undefined;
2798
- machine?: {
2799
- name: string;
2800
- id: string;
2801
- } | undefined;
2802
- account?: {
2803
- userId: string;
2804
- email?: string | undefined;
2805
- } | undefined;
2806
- }>;
982
+ }, z.core.$strip>>;
983
+ }, z.core.$strip>;
2807
984
  export type GatewayStatus = z.infer<typeof gatewayStatusSchema>;