@atcx/contract 0.0.0 → 7.4.1

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 (63) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +45 -30
  3. package/dist/agent-list.d.ts +215 -0
  4. package/dist/agent-session-id.d.ts +2 -0
  5. package/dist/answer-view.d.ts +10 -0
  6. package/dist/check-daemon.d.ts +15 -0
  7. package/dist/commit-id-pattern.d.ts +1 -0
  8. package/dist/config-file-schema.d.ts +15 -0
  9. package/dist/contract-version.d.ts +1 -0
  10. package/dist/daemon-contract.d.ts +1646 -0
  11. package/dist/daemon-error-map.d.ts +9 -0
  12. package/dist/daemon-event.d.ts +424 -0
  13. package/dist/daemon-features.d.ts +2 -0
  14. package/dist/daemon-id.d.ts +2 -0
  15. package/dist/events-page.d.ts +39 -0
  16. package/dist/fleet-entry-view.d.ts +32 -0
  17. package/dist/fleet-event.d.ts +35 -0
  18. package/dist/git-probe-result.d.ts +18 -0
  19. package/dist/git-ref.d.ts +10 -0
  20. package/dist/hello-result.d.ts +16 -0
  21. package/dist/index.d.ts +45 -0
  22. package/dist/index.js +1121 -0
  23. package/dist/light/error-codes.d.ts +2 -0
  24. package/dist/light/index.d.ts +6 -0
  25. package/dist/light/index.js +131 -0
  26. package/dist/light/message-sender.d.ts +17 -0
  27. package/dist/light/resolve-atc-paths.d.ts +11 -0
  28. package/dist/light/resolve-home-dir.d.ts +1 -0
  29. package/dist/light/resolve-state-dir.d.ts +1 -0
  30. package/dist/light/session-env-names.d.ts +7 -0
  31. package/dist/menu-view.d.ts +12 -0
  32. package/dist/message-answer.d.ts +10 -0
  33. package/dist/message-id.d.ts +2 -0
  34. package/dist/message-status.d.ts +7 -0
  35. package/dist/message-view.d.ts +36 -0
  36. package/dist/note-view.d.ts +10 -0
  37. package/dist/procedure-meta.d.ts +10 -0
  38. package/dist/published-record-schema.d.ts +3 -0
  39. package/dist/published-record.d.ts +39 -0
  40. package/dist/request-param-schemas.d.ts +252 -0
  41. package/dist/restart-result.d.ts +28 -0
  42. package/dist/schema/build-optional-boolean.d.ts +2 -0
  43. package/dist/schema/build-optional-non-empty-string.d.ts +2 -0
  44. package/dist/schema/build-optional-string-array.d.ts +2 -0
  45. package/dist/schema/build-optional-string.d.ts +2 -0
  46. package/dist/schema/index.d.ts +4 -0
  47. package/dist/schema/index.js +26 -0
  48. package/dist/session-descriptor.d.ts +71 -0
  49. package/dist/session-id.d.ts +2 -0
  50. package/dist/session-lifecycle.d.ts +26 -0
  51. package/dist/session-workspace.d.ts +8 -0
  52. package/dist/source-candidate.d.ts +13 -0
  53. package/dist/source-entry.d.ts +10 -0
  54. package/dist/source-interpretation.d.ts +14 -0
  55. package/dist/source-pick.d.ts +9 -0
  56. package/dist/spawn-answer.d.ts +73 -0
  57. package/dist/spawn-option-spec.d.ts +16 -0
  58. package/dist/to-agent-session-id.d.ts +2 -0
  59. package/dist/to-daemon-id.d.ts +2 -0
  60. package/dist/to-message-id.d.ts +2 -0
  61. package/dist/to-session-id.d.ts +2 -0
  62. package/dist/transcript-row.d.ts +14 -0
  63. package/package.json +34 -6
@@ -0,0 +1,1646 @@
1
+ import { z } from 'zod';
2
+ export declare const DAEMON_CONTRACT: {
3
+ daemon: {
4
+ hello: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
5
+ client: z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>;
6
+ protocol: z.ZodOptional<z.ZodNumber>;
7
+ principal: z.ZodOptional<z.ZodString>;
8
+ session: z.ZodPreprocess<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("./session-id.js").SessionID, string>>>, unknown>;
9
+ }, z.core.$strip>, z.ZodObject<{
10
+ daemon: z.ZodString;
11
+ daemonID: z.ZodString;
12
+ limits: z.ZodObject<{
13
+ maxLine: z.ZodNumber;
14
+ maxChunk: z.ZodNumber;
15
+ }, z.core.$strip>;
16
+ idempotency: z.ZodObject<{
17
+ completedRetentionMs: z.ZodNumber;
18
+ }, z.core.$strip>;
19
+ lastUsedAgent: z.ZodString;
20
+ peerSession: z.ZodNullable<z.ZodString>;
21
+ features: z.ZodDefault<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
22
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
23
+ access: "owner" | "principal";
24
+ readOnly: boolean;
25
+ keyed: boolean;
26
+ }> & Record<never, never>>;
27
+ ping: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
28
+ access: "owner" | "principal";
29
+ readOnly: boolean;
30
+ keyed: boolean;
31
+ }> & Record<never, never>>;
32
+ quit: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
33
+ access: "owner" | "principal";
34
+ readOnly: boolean;
35
+ keyed: boolean;
36
+ }> & Record<never, never>>;
37
+ restarted: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
38
+ result: z.ZodObject<{
39
+ runID: z.ZodString;
40
+ code: z.ZodNumber;
41
+ pid: z.ZodNullable<z.ZodNumber>;
42
+ build: z.ZodNullable<z.ZodString>;
43
+ listenPort: z.ZodNullable<z.ZodNumber>;
44
+ restored: z.ZodNumber;
45
+ total: z.ZodNumber;
46
+ failed: z.ZodReadonly<z.ZodArray<z.ZodObject<{
47
+ name: z.ZodString;
48
+ id: z.ZodString;
49
+ reason: z.ZodString;
50
+ }, z.core.$strip>>>;
51
+ interrupted: z.ZodReadonly<z.ZodArray<z.ZodObject<{
52
+ name: z.ZodString;
53
+ id: z.ZodString;
54
+ }, z.core.$strip>>>;
55
+ error: z.ZodNullable<z.ZodString>;
56
+ }, z.core.$strip>;
57
+ }, z.core.$strip>, z.ZodObject<{}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
58
+ access: "owner" | "principal";
59
+ readOnly: boolean;
60
+ keyed: boolean;
61
+ }> & Record<never, never>>;
62
+ backup: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
63
+ path: z.ZodString;
64
+ }, z.core.$strip>, z.ZodObject<{
65
+ path: z.ZodString;
66
+ bytes: z.ZodNumber;
67
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
68
+ access: "owner" | "principal";
69
+ readOnly: boolean;
70
+ keyed: boolean;
71
+ }> & Record<never, never>>;
72
+ };
73
+ dirs: {
74
+ list: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
75
+ dirs: z.ZodReadonly<z.ZodArray<z.ZodString>>;
76
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
77
+ access: "owner" | "principal";
78
+ readOnly: boolean;
79
+ keyed: boolean;
80
+ }> & Record<never, never>>;
81
+ };
82
+ agents: {
83
+ list: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
84
+ daemon: z.ZodObject<{
85
+ hostname: z.ZodString;
86
+ platform: z.ZodString;
87
+ arch: z.ZodString;
88
+ build: z.ZodString;
89
+ }, z.core.$strip>;
90
+ agents: z.ZodReadonly<z.ZodArray<z.ZodObject<{
91
+ id: z.ZodString;
92
+ label: z.ZodString;
93
+ kind: z.ZodString;
94
+ installed: z.ZodBoolean;
95
+ brokerAuth: z.ZodBoolean;
96
+ brokerRequired: z.ZodBoolean;
97
+ spawnTargets: z.ZodReadonly<z.ZodArray<z.ZodString>>;
98
+ capabilities: z.ZodObject<{
99
+ spawn: z.ZodBoolean;
100
+ readTranscript: z.ZodBoolean;
101
+ message: z.ZodBoolean;
102
+ attach: z.ZodBoolean;
103
+ screen: z.ZodBoolean;
104
+ input: z.ZodBoolean;
105
+ }, z.core.$strip>;
106
+ models: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>;
107
+ spawnOptions: z.ZodObject<{
108
+ model: z.ZodObject<{
109
+ supported: z.ZodBoolean;
110
+ values: z.ZodNullable<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
111
+ examples: z.ZodReadonly<z.ZodArray<z.ZodObject<{
112
+ value: z.ZodString;
113
+ resolvesTo: z.ZodNullable<z.ZodString>;
114
+ }, z.core.$strip>>>;
115
+ default: z.ZodNullable<z.ZodString>;
116
+ backendEffect: z.ZodNullable<z.ZodEnum<{
117
+ applied: "applied";
118
+ unverified: "unverified";
119
+ }>>;
120
+ note: z.ZodNullable<z.ZodString>;
121
+ available: z.ZodBoolean;
122
+ }, z.core.$strip>;
123
+ effort: z.ZodObject<{
124
+ supported: z.ZodBoolean;
125
+ values: z.ZodNullable<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
126
+ examples: z.ZodReadonly<z.ZodArray<z.ZodObject<{
127
+ value: z.ZodString;
128
+ resolvesTo: z.ZodNullable<z.ZodString>;
129
+ }, z.core.$strip>>>;
130
+ default: z.ZodNullable<z.ZodString>;
131
+ backendEffect: z.ZodNullable<z.ZodEnum<{
132
+ applied: "applied";
133
+ unverified: "unverified";
134
+ }>>;
135
+ note: z.ZodNullable<z.ZodString>;
136
+ available: z.ZodBoolean;
137
+ }, z.core.$strip>;
138
+ pluginDirs: z.ZodObject<{
139
+ supported: z.ZodBoolean;
140
+ values: z.ZodNullable<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
141
+ examples: z.ZodReadonly<z.ZodArray<z.ZodObject<{
142
+ value: z.ZodString;
143
+ resolvesTo: z.ZodNullable<z.ZodString>;
144
+ }, z.core.$strip>>>;
145
+ default: z.ZodNullable<z.ZodString>;
146
+ backendEffect: z.ZodNullable<z.ZodEnum<{
147
+ applied: "applied";
148
+ unverified: "unverified";
149
+ }>>;
150
+ note: z.ZodNullable<z.ZodString>;
151
+ available: z.ZodBoolean;
152
+ }, z.core.$strip>;
153
+ }, z.core.$strip>;
154
+ }, z.core.$strip>>>;
155
+ targets: z.ZodReadonly<z.ZodArray<z.ZodObject<{
156
+ id: z.ZodString;
157
+ provider: z.ZodString;
158
+ identity: z.ZodString;
159
+ available: z.ZodBoolean;
160
+ remote: z.ZodBoolean;
161
+ default: z.ZodBoolean;
162
+ capabilities: z.ZodObject<{
163
+ spawn: z.ZodBoolean;
164
+ attach: z.ZodBoolean;
165
+ input: z.ZodBoolean;
166
+ resize: z.ZodBoolean;
167
+ kill: z.ZodBoolean;
168
+ transfer: z.ZodBoolean;
169
+ run: z.ZodBoolean;
170
+ headless: z.ZodBoolean;
171
+ suspend: z.ZodBoolean;
172
+ destroy: z.ZodBoolean;
173
+ }, z.core.$strip>;
174
+ brokerAuth: z.ZodBoolean;
175
+ }, z.core.$strip>>>;
176
+ spawnDefaults: z.ZodObject<{
177
+ agent: z.ZodString;
178
+ target: z.ZodNullable<z.ZodString>;
179
+ }, z.core.$strip>;
180
+ configRevision: z.ZodString;
181
+ targetErrors: z.ZodReadonly<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
182
+ scope: z.ZodEnum<{
183
+ defaultTarget: "defaultTarget";
184
+ target: "target";
185
+ targets: "targets";
186
+ }>;
187
+ target: z.ZodOptional<z.ZodString>;
188
+ problem: z.ZodString;
189
+ }, z.core.$strip>, z.ZodObject<{
190
+ scope: z.ZodLiteral<"config">;
191
+ problem: z.ZodEnum<{
192
+ config_malformed: "config_malformed";
193
+ config_unreadable: "config_unreadable";
194
+ }>;
195
+ path: z.ZodString;
196
+ detail: z.ZodString;
197
+ }, z.core.$strip>]>>>;
198
+ sources: z.ZodReadonly<z.ZodArray<z.ZodObject<{
199
+ id: z.ZodString;
200
+ label: z.ZodString;
201
+ kind: z.ZodEnum<{
202
+ git: "git";
203
+ path: "path";
204
+ }>;
205
+ }, z.core.$strip>>>;
206
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
207
+ access: "owner" | "principal";
208
+ readOnly: boolean;
209
+ keyed: boolean;
210
+ }> & Record<never, never>>;
211
+ };
212
+ sources: {
213
+ list: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
214
+ source: z.ZodString;
215
+ target: z.ZodOptional<z.ZodString>;
216
+ scope: z.ZodOptional<z.ZodString>;
217
+ text: z.ZodOptional<z.ZodString>;
218
+ }, z.core.$strip>, z.ZodObject<{
219
+ source: z.ZodString;
220
+ scope: z.ZodNullable<z.ZodString>;
221
+ candidates: z.ZodReadonly<z.ZodArray<z.ZodObject<{
222
+ label: z.ZodString;
223
+ detail: z.ZodOptional<z.ZodString>;
224
+ pick: z.ZodDiscriminatedUnion<[z.ZodObject<{
225
+ kind: z.ZodLiteral<"path">;
226
+ directory: z.ZodString;
227
+ }, z.core.$strip>, z.ZodObject<{
228
+ kind: z.ZodLiteral<"git">;
229
+ url: z.ZodString;
230
+ }, z.core.$strip>], "kind">;
231
+ }, z.core.$strip>>>;
232
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
233
+ access: "owner" | "principal";
234
+ readOnly: boolean;
235
+ keyed: boolean;
236
+ }> & Record<never, never>>;
237
+ interpret: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
238
+ source: z.ZodString;
239
+ input: z.ZodString;
240
+ target: z.ZodOptional<z.ZodString>;
241
+ clientCwd: z.ZodOptional<z.ZodString>;
242
+ }, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
243
+ kind: z.ZodLiteral<"browse">;
244
+ scope: z.ZodString;
245
+ }, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
246
+ kind: z.ZodLiteral<"path">;
247
+ directory: z.ZodString;
248
+ }, z.core.$strip>, z.ZodObject<{
249
+ kind: z.ZodLiteral<"git">;
250
+ url: z.ZodString;
251
+ }, z.core.$strip>], "kind">, z.ZodObject<{
252
+ kind: z.ZodLiteral<"none">;
253
+ }, z.core.$strip>]>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
254
+ access: "owner" | "principal";
255
+ readOnly: boolean;
256
+ keyed: boolean;
257
+ }> & Record<never, never>>;
258
+ complete: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
259
+ source: z.ZodString;
260
+ input: z.ZodString;
261
+ target: z.ZodOptional<z.ZodString>;
262
+ clientCwd: z.ZodOptional<z.ZodString>;
263
+ }, z.core.$strip>, z.ZodObject<{
264
+ completions: z.ZodReadonly<z.ZodArray<z.ZodObject<{
265
+ label: z.ZodString;
266
+ detail: z.ZodOptional<z.ZodString>;
267
+ pick: z.ZodDiscriminatedUnion<[z.ZodObject<{
268
+ kind: z.ZodLiteral<"path">;
269
+ directory: z.ZodString;
270
+ }, z.core.$strip>, z.ZodObject<{
271
+ kind: z.ZodLiteral<"git">;
272
+ url: z.ZodString;
273
+ }, z.core.$strip>], "kind">;
274
+ }, z.core.$strip>>>;
275
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
276
+ access: "owner" | "principal";
277
+ readOnly: boolean;
278
+ keyed: boolean;
279
+ }> & Record<never, never>>;
280
+ };
281
+ git: {
282
+ probe: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
283
+ url: z.ZodString;
284
+ ref: z.ZodOptional<z.ZodString>;
285
+ sha: z.ZodOptional<z.ZodString>;
286
+ credentialRef: z.ZodOptional<z.ZodObject<{
287
+ kind: z.ZodLiteral<"env">;
288
+ name: z.ZodString;
289
+ }, z.core.$strict>>;
290
+ target: z.ZodOptional<z.ZodString>;
291
+ }, z.core.$strip>, z.ZodObject<{
292
+ url: z.ZodString;
293
+ head: z.ZodNullable<z.ZodString>;
294
+ refs: z.ZodReadonly<z.ZodArray<z.ZodObject<{
295
+ name: z.ZodString;
296
+ kind: z.ZodEnum<{
297
+ branch: "branch";
298
+ tag: "tag";
299
+ }>;
300
+ sha: z.ZodString;
301
+ }, z.core.$strip>>>;
302
+ resolved: z.ZodNullable<z.ZodObject<{
303
+ sha: z.ZodString;
304
+ branch: z.ZodNullable<z.ZodString>;
305
+ }, z.core.$strip>>;
306
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
307
+ access: "owner" | "principal";
308
+ readOnly: boolean;
309
+ keyed: boolean;
310
+ }> & Record<never, never>>;
311
+ };
312
+ fleet: {
313
+ list: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
314
+ fleet: z.ZodReadonly<z.ZodArray<z.ZodObject<{
315
+ sessionID: z.ZodString;
316
+ name: z.ZodString;
317
+ cwd: z.ZodString;
318
+ agentSessionID: z.ZodOptional<z.ZodString>;
319
+ agent: z.ZodString;
320
+ pinned: z.ZodOptional<z.ZodBoolean>;
321
+ lastAttachedAt: z.ZodOptional<z.ZodNumber>;
322
+ exited: z.ZodOptional<z.ZodBoolean>;
323
+ parent: z.ZodOptional<z.ZodString>;
324
+ prompt: z.ZodOptional<z.ZodString>;
325
+ result: z.ZodOptional<z.ZodString>;
326
+ transcriptPath: z.ZodOptional<z.ZodString>;
327
+ model: z.ZodOptional<z.ZodString>;
328
+ effort: z.ZodOptional<z.ZodString>;
329
+ pluginDirs: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
330
+ target: z.ZodOptional<z.ZodString>;
331
+ targetIdentity: z.ZodOptional<z.ZodString>;
332
+ workspace: z.ZodOptional<z.ZodObject<{
333
+ repoURL: z.ZodString;
334
+ sha: z.ZodString;
335
+ ref: z.ZodOptional<z.ZodString>;
336
+ materializedAt: z.ZodNumber;
337
+ }, z.core.$strip>>;
338
+ withheldEnv: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
339
+ desired: z.ZodOptional<z.ZodEnum<{
340
+ sleep: "sleep";
341
+ stop: "stop";
342
+ }>>;
343
+ hostKey: z.ZodOptional<z.ZodString>;
344
+ }, z.core.$strip>>>;
345
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
346
+ access: "owner" | "principal";
347
+ readOnly: boolean;
348
+ keyed: boolean;
349
+ }> & Record<never, never>>;
350
+ restore: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
351
+ cols: z.ZodPreprocess<z.ZodDefault<z.ZodNumber>, unknown>;
352
+ rows: z.ZodPreprocess<z.ZodDefault<z.ZodNumber>, unknown>;
353
+ }, z.core.$strip>, z.ZodObject<{
354
+ restored: z.ZodNumber;
355
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
356
+ access: "owner" | "principal";
357
+ readOnly: boolean;
358
+ keyed: boolean;
359
+ }> & Record<never, never>>;
360
+ };
361
+ session: {
362
+ list: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
363
+ sessions: z.ZodReadonly<z.ZodArray<z.ZodObject<{
364
+ id: z.ZodPipe<z.ZodString, z.ZodTransform<import("./session-id.js").SessionID, string>>;
365
+ name: z.ZodString;
366
+ cwd: z.ZodString;
367
+ state: z.ZodEnum<{
368
+ done: "done";
369
+ exited: "exited";
370
+ needs_you: "needs_you";
371
+ running: "running";
372
+ }>;
373
+ unread: z.ZodBoolean;
374
+ lastMsg: z.ZodString;
375
+ lastDetail: z.ZodOptional<z.ZodString>;
376
+ restoreRefusal: z.ZodOptional<z.ZodString>;
377
+ agentSessionID: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("./agent-session-id.js").AgentSessionID, string>>>;
378
+ agent: z.ZodString;
379
+ pinned: z.ZodBoolean;
380
+ lastAttachedAt: z.ZodNumber;
381
+ repoRoot: z.ZodString;
382
+ namedBy: z.ZodEnum<{
383
+ agent: "agent";
384
+ auto: "auto";
385
+ user: "user";
386
+ }>;
387
+ createdAt: z.ZodNumber;
388
+ kind: z.ZodEnum<{
389
+ headless: "headless";
390
+ pty: "pty";
391
+ }>;
392
+ alive: z.ZodBoolean;
393
+ canEject: z.ZodBoolean;
394
+ parent: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("./session-id.js").SessionID, string>>>;
395
+ locator: z.ZodObject<{
396
+ daemonID: z.ZodPipe<z.ZodString, z.ZodTransform<import("./daemon-id.js").DaemonID, string>>;
397
+ targetID: z.ZodString;
398
+ }, z.core.$strip>;
399
+ workspace: z.ZodOptional<z.ZodObject<{
400
+ repoURL: z.ZodString;
401
+ sha: z.ZodString;
402
+ ref: z.ZodOptional<z.ZodString>;
403
+ materializedAt: z.ZodNumber;
404
+ }, z.core.$strip>>;
405
+ lifecycle: z.ZodObject<{
406
+ desired: z.ZodEnum<{
407
+ run: "run";
408
+ sleep: "sleep";
409
+ stop: "stop";
410
+ }>;
411
+ vm: z.ZodEnum<{
412
+ asleep: "asleep";
413
+ awake: "awake";
414
+ none: "none";
415
+ unknown: "unknown";
416
+ }>;
417
+ harness: z.ZodEnum<{
418
+ exited: "exited";
419
+ running: "running";
420
+ suspended: "suspended";
421
+ }>;
422
+ attachment: z.ZodEnum<{
423
+ attached: "attached";
424
+ detached: "detached";
425
+ local: "local";
426
+ reattaching: "reattaching";
427
+ }>;
428
+ }, z.core.$strip>;
429
+ model: z.ZodOptional<z.ZodString>;
430
+ pluginDirs: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
431
+ }, z.core.$strip>>>;
432
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
433
+ access: "owner" | "principal";
434
+ readOnly: boolean;
435
+ keyed: boolean;
436
+ }> & Record<never, never>>;
437
+ spawn: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
438
+ cwd: z.ZodOptional<z.ZodString>;
439
+ name: z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>;
440
+ prompt: z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>;
441
+ cols: z.ZodPreprocess<z.ZodDefault<z.ZodNumber>, unknown>;
442
+ rows: z.ZodPreprocess<z.ZodDefault<z.ZodNumber>, unknown>;
443
+ resume: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>, unknown>, z.ZodTransform<boolean | import("./agent-session-id.js").AgentSessionID, string | boolean>>;
444
+ agent: z.ZodOptional<z.ZodString>;
445
+ model: z.ZodOptional<z.ZodString>;
446
+ effort: z.ZodOptional<z.ZodString>;
447
+ pluginDirs: z.ZodOptional<z.ZodArray<z.ZodString>>;
448
+ idempotencyKey: z.ZodOptional<z.ZodString>;
449
+ replayOnly: z.ZodOptional<z.ZodBoolean>;
450
+ target: z.ZodOptional<z.ZodString>;
451
+ workspace: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
452
+ kind: z.ZodLiteral<"path">;
453
+ path: z.ZodString;
454
+ allowDirty: z.ZodOptional<z.ZodEnum<{
455
+ refuse: "refuse";
456
+ warn: "warn";
457
+ }>>;
458
+ }, z.core.$strict>, z.ZodObject<{
459
+ kind: z.ZodLiteral<"git">;
460
+ url: z.ZodString;
461
+ ref: z.ZodOptional<z.ZodString>;
462
+ sha: z.ZodOptional<z.ZodString>;
463
+ credentialRef: z.ZodOptional<z.ZodObject<{
464
+ kind: z.ZodLiteral<"env">;
465
+ name: z.ZodString;
466
+ }, z.core.$strict>>;
467
+ }, z.core.$strict>], "kind">>;
468
+ trustClonedWorkspace: z.ZodOptional<z.ZodBoolean>;
469
+ scope: z.ZodOptional<z.ZodUnknown>;
470
+ parent: z.ZodPreprocess<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("./session-id.js").SessionID, string>>>, unknown>;
471
+ }, z.core.$strip>, z.ZodObject<{
472
+ session: z.ZodObject<{
473
+ id: z.ZodPipe<z.ZodString, z.ZodTransform<import("./session-id.js").SessionID, string>>;
474
+ name: z.ZodString;
475
+ cwd: z.ZodString;
476
+ state: z.ZodEnum<{
477
+ done: "done";
478
+ exited: "exited";
479
+ needs_you: "needs_you";
480
+ running: "running";
481
+ }>;
482
+ unread: z.ZodBoolean;
483
+ lastMsg: z.ZodString;
484
+ lastDetail: z.ZodOptional<z.ZodString>;
485
+ restoreRefusal: z.ZodOptional<z.ZodString>;
486
+ agentSessionID: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("./agent-session-id.js").AgentSessionID, string>>>;
487
+ agent: z.ZodString;
488
+ pinned: z.ZodBoolean;
489
+ lastAttachedAt: z.ZodNumber;
490
+ repoRoot: z.ZodString;
491
+ namedBy: z.ZodEnum<{
492
+ agent: "agent";
493
+ auto: "auto";
494
+ user: "user";
495
+ }>;
496
+ createdAt: z.ZodNumber;
497
+ kind: z.ZodEnum<{
498
+ headless: "headless";
499
+ pty: "pty";
500
+ }>;
501
+ alive: z.ZodBoolean;
502
+ canEject: z.ZodBoolean;
503
+ parent: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("./session-id.js").SessionID, string>>>;
504
+ locator: z.ZodObject<{
505
+ daemonID: z.ZodPipe<z.ZodString, z.ZodTransform<import("./daemon-id.js").DaemonID, string>>;
506
+ targetID: z.ZodString;
507
+ }, z.core.$strip>;
508
+ workspace: z.ZodOptional<z.ZodObject<{
509
+ repoURL: z.ZodString;
510
+ sha: z.ZodString;
511
+ ref: z.ZodOptional<z.ZodString>;
512
+ materializedAt: z.ZodNumber;
513
+ }, z.core.$strip>>;
514
+ lifecycle: z.ZodObject<{
515
+ desired: z.ZodEnum<{
516
+ run: "run";
517
+ sleep: "sleep";
518
+ stop: "stop";
519
+ }>;
520
+ vm: z.ZodEnum<{
521
+ asleep: "asleep";
522
+ awake: "awake";
523
+ none: "none";
524
+ unknown: "unknown";
525
+ }>;
526
+ harness: z.ZodEnum<{
527
+ exited: "exited";
528
+ running: "running";
529
+ suspended: "suspended";
530
+ }>;
531
+ attachment: z.ZodEnum<{
532
+ attached: "attached";
533
+ detached: "detached";
534
+ local: "local";
535
+ reattaching: "reattaching";
536
+ }>;
537
+ }, z.core.$strip>;
538
+ model: z.ZodOptional<z.ZodString>;
539
+ pluginDirs: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
540
+ }, z.core.$strip>;
541
+ warnings: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
542
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
543
+ access: "owner" | "principal";
544
+ readOnly: boolean;
545
+ keyed: boolean;
546
+ }> & Record<never, never>>;
547
+ kill: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
548
+ session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
549
+ stopOnly: z.ZodOptional<z.ZodBoolean>;
550
+ }, z.core.$strip>, z.ZodObject<{
551
+ stopped: z.ZodOptional<z.ZodBoolean>;
552
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
553
+ access: "owner" | "principal";
554
+ readOnly: boolean;
555
+ keyed: boolean;
556
+ }> & Record<never, never>>;
557
+ ack: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
558
+ session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
559
+ }, z.core.$strip>, z.ZodObject<{}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
560
+ access: "owner" | "principal";
561
+ readOnly: boolean;
562
+ keyed: boolean;
563
+ }> & Record<never, never>>;
564
+ forget: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
565
+ session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
566
+ confirmToken: z.ZodOptional<z.ZodString>;
567
+ refusePinned: z.ZodOptional<z.ZodBoolean>;
568
+ refuseLive: z.ZodOptional<z.ZodBoolean>;
569
+ }, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
570
+ confirmToken: z.ZodString;
571
+ expiresAt: z.ZodNumber;
572
+ }, z.core.$strip>, z.ZodObject<{
573
+ forgotten: z.ZodLiteral<true>;
574
+ destroyed: z.ZodBoolean;
575
+ }, z.core.$strip>]>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
576
+ access: "owner" | "principal";
577
+ readOnly: boolean;
578
+ keyed: boolean;
579
+ }> & Record<never, never>>;
580
+ resumeCommand: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
581
+ session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
582
+ }, z.core.$strip>, z.ZodObject<{
583
+ command: z.ZodString;
584
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
585
+ access: "owner" | "principal";
586
+ readOnly: boolean;
587
+ keyed: boolean;
588
+ }> & Record<never, never>>;
589
+ auth: {
590
+ revoke: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
591
+ session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
592
+ }, z.core.$strip>, z.ZodObject<{
593
+ revoked: z.ZodLiteral<true>;
594
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
595
+ access: "owner" | "principal";
596
+ readOnly: boolean;
597
+ keyed: boolean;
598
+ }> & Record<never, never>>;
599
+ rebind: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
600
+ session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
601
+ }, z.core.$strip>, z.ZodObject<{
602
+ revision: z.ZodNumber;
603
+ restartPending: z.ZodReadonly<z.ZodArray<z.ZodString>>;
604
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
605
+ access: "owner" | "principal";
606
+ readOnly: boolean;
607
+ keyed: boolean;
608
+ }> & Record<never, never>>;
609
+ };
610
+ update: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
611
+ session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
612
+ name: z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>;
613
+ pinned: z.ZodPreprocess<z.ZodOptional<z.ZodBoolean>, unknown>;
614
+ parent: z.ZodOptional<z.ZodNull>;
615
+ }, z.core.$strip>, z.ZodObject<{
616
+ renameSkipped: z.ZodOptional<z.ZodString>;
617
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
618
+ access: "owner" | "principal";
619
+ readOnly: boolean;
620
+ keyed: boolean;
621
+ }> & Record<never, never>>;
622
+ scope: {
623
+ add: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
624
+ session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
625
+ scope: z.ZodUnknown;
626
+ }, z.core.$strip>, z.ZodObject<{
627
+ record: z.ZodType<import("./published-record.js").PublishedRecord, import("./published-record.js").PublishedRecord, z.core.$ZodTypeInternals<import("./published-record.js").PublishedRecord, import("./published-record.js").PublishedRecord>>;
628
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
629
+ access: "owner" | "principal";
630
+ readOnly: boolean;
631
+ keyed: boolean;
632
+ }> & Record<never, never>>;
633
+ };
634
+ attach: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
635
+ session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
636
+ cols: z.ZodPreprocess<z.ZodDefault<z.ZodNumber>, unknown>;
637
+ rows: z.ZodPreprocess<z.ZodDefault<z.ZodNumber>, unknown>;
638
+ }, z.core.$strip>, z.ZodObject<{
639
+ cols: z.ZodNumber;
640
+ rows: z.ZodNumber;
641
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
642
+ access: "owner" | "principal";
643
+ readOnly: boolean;
644
+ keyed: boolean;
645
+ }> & Record<never, never>>;
646
+ detach: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
647
+ session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
648
+ }, z.core.$strip>, z.ZodObject<{}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
649
+ access: "owner" | "principal";
650
+ readOnly: boolean;
651
+ keyed: boolean;
652
+ }> & Record<never, never>>;
653
+ watch: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
654
+ session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
655
+ }, z.core.$strip>, z.ZodObject<{
656
+ cols: z.ZodNumber;
657
+ rows: z.ZodNumber;
658
+ seq: z.ZodNumber;
659
+ replay: z.ZodString;
660
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
661
+ access: "owner" | "principal";
662
+ readOnly: boolean;
663
+ keyed: boolean;
664
+ }> & Record<never, never>>;
665
+ input: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
666
+ session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
667
+ data: z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>;
668
+ }, z.core.$strip>, z.ZodObject<{}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
669
+ access: "owner" | "principal";
670
+ readOnly: boolean;
671
+ keyed: boolean;
672
+ }> & Record<never, never>>;
673
+ submit: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
674
+ session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
675
+ text: z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>;
676
+ }, z.core.$strip>, z.ZodObject<{}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
677
+ access: "owner" | "principal";
678
+ readOnly: boolean;
679
+ keyed: boolean;
680
+ }> & Record<never, never>>;
681
+ resize: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
682
+ session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
683
+ cols: z.ZodPreprocess<z.ZodDefault<z.ZodNumber>, unknown>;
684
+ rows: z.ZodPreprocess<z.ZodDefault<z.ZodNumber>, unknown>;
685
+ }, z.core.$strip>, z.ZodObject<{}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
686
+ access: "owner" | "principal";
687
+ readOnly: boolean;
688
+ keyed: boolean;
689
+ }> & Record<never, never>>;
690
+ screen: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
691
+ session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
692
+ }, z.core.$strip>, z.ZodObject<{
693
+ text: z.ZodString;
694
+ cols: z.ZodNumber;
695
+ rows: z.ZodNumber;
696
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
697
+ access: "owner" | "principal";
698
+ readOnly: boolean;
699
+ keyed: boolean;
700
+ }> & Record<never, never>>;
701
+ menu: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
702
+ session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
703
+ }, z.core.$strip>, z.ZodObject<{
704
+ menu: z.ZodNullable<z.ZodObject<{
705
+ text: z.ZodString;
706
+ options: z.ZodReadonly<z.ZodArray<z.ZodObject<{
707
+ option: z.ZodNumber;
708
+ label: z.ZodString;
709
+ checked: z.ZodNullable<z.ZodBoolean>;
710
+ highlighted: z.ZodBoolean;
711
+ }, z.core.$strip>>>;
712
+ menuToken: z.ZodString;
713
+ }, z.core.$strip>>;
714
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
715
+ access: "owner" | "principal";
716
+ readOnly: boolean;
717
+ keyed: boolean;
718
+ }> & Record<never, never>>;
719
+ choose: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
720
+ session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
721
+ menuToken: z.ZodString;
722
+ option: z.ZodOptional<z.ZodNumber>;
723
+ label: z.ZodOptional<z.ZodString>;
724
+ key: z.ZodOptional<z.ZodLiteral<"escape">>;
725
+ }, z.core.$strip>, z.ZodObject<{
726
+ pressed: z.ZodString;
727
+ menu: z.ZodNullable<z.ZodObject<{
728
+ text: z.ZodString;
729
+ options: z.ZodReadonly<z.ZodArray<z.ZodObject<{
730
+ option: z.ZodNumber;
731
+ label: z.ZodString;
732
+ checked: z.ZodNullable<z.ZodBoolean>;
733
+ highlighted: z.ZodBoolean;
734
+ }, z.core.$strip>>>;
735
+ menuToken: z.ZodString;
736
+ }, z.core.$strip>>;
737
+ partial: z.ZodOptional<z.ZodLiteral<true>>;
738
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
739
+ access: "owner" | "principal";
740
+ readOnly: boolean;
741
+ keyed: boolean;
742
+ }> & Record<never, never>>;
743
+ eject: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
744
+ session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
745
+ prompt: z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>;
746
+ }, z.core.$strip>, z.ZodObject<{}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
747
+ access: "owner" | "principal";
748
+ readOnly: boolean;
749
+ keyed: boolean;
750
+ }> & Record<never, never>>;
751
+ adopt: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
752
+ session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
753
+ cols: z.ZodPreprocess<z.ZodDefault<z.ZodNumber>, unknown>;
754
+ rows: z.ZodPreprocess<z.ZodDefault<z.ZodNumber>, unknown>;
755
+ }, z.core.$strip>, z.ZodObject<{}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
756
+ access: "owner" | "principal";
757
+ readOnly: boolean;
758
+ keyed: boolean;
759
+ }> & Record<never, never>>;
760
+ get: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
761
+ session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
762
+ }, z.core.$strip>, z.ZodObject<{
763
+ session: z.ZodObject<{
764
+ id: z.ZodPipe<z.ZodString, z.ZodTransform<import("./session-id.js").SessionID, string>>;
765
+ name: z.ZodString;
766
+ cwd: z.ZodString;
767
+ state: z.ZodEnum<{
768
+ done: "done";
769
+ exited: "exited";
770
+ needs_you: "needs_you";
771
+ running: "running";
772
+ }>;
773
+ unread: z.ZodBoolean;
774
+ lastMsg: z.ZodString;
775
+ lastDetail: z.ZodOptional<z.ZodString>;
776
+ restoreRefusal: z.ZodOptional<z.ZodString>;
777
+ agentSessionID: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("./agent-session-id.js").AgentSessionID, string>>>;
778
+ agent: z.ZodString;
779
+ pinned: z.ZodBoolean;
780
+ lastAttachedAt: z.ZodNumber;
781
+ repoRoot: z.ZodString;
782
+ namedBy: z.ZodEnum<{
783
+ agent: "agent";
784
+ auto: "auto";
785
+ user: "user";
786
+ }>;
787
+ createdAt: z.ZodNumber;
788
+ kind: z.ZodEnum<{
789
+ headless: "headless";
790
+ pty: "pty";
791
+ }>;
792
+ alive: z.ZodBoolean;
793
+ canEject: z.ZodBoolean;
794
+ parent: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("./session-id.js").SessionID, string>>>;
795
+ locator: z.ZodObject<{
796
+ daemonID: z.ZodPipe<z.ZodString, z.ZodTransform<import("./daemon-id.js").DaemonID, string>>;
797
+ targetID: z.ZodString;
798
+ }, z.core.$strip>;
799
+ workspace: z.ZodOptional<z.ZodObject<{
800
+ repoURL: z.ZodString;
801
+ sha: z.ZodString;
802
+ ref: z.ZodOptional<z.ZodString>;
803
+ materializedAt: z.ZodNumber;
804
+ }, z.core.$strip>>;
805
+ lifecycle: z.ZodObject<{
806
+ desired: z.ZodEnum<{
807
+ run: "run";
808
+ sleep: "sleep";
809
+ stop: "stop";
810
+ }>;
811
+ vm: z.ZodEnum<{
812
+ asleep: "asleep";
813
+ awake: "awake";
814
+ none: "none";
815
+ unknown: "unknown";
816
+ }>;
817
+ harness: z.ZodEnum<{
818
+ exited: "exited";
819
+ running: "running";
820
+ suspended: "suspended";
821
+ }>;
822
+ attachment: z.ZodEnum<{
823
+ attached: "attached";
824
+ detached: "detached";
825
+ local: "local";
826
+ reattaching: "reattaching";
827
+ }>;
828
+ }, z.core.$strip>;
829
+ model: z.ZodOptional<z.ZodString>;
830
+ pluginDirs: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
831
+ }, z.core.$strip>;
832
+ prompt: z.ZodNullable<z.ZodString>;
833
+ lastActivityAt: z.ZodNumber;
834
+ pending: z.ZodNullable<z.ZodObject<{
835
+ message: z.ZodString;
836
+ }, z.core.$strip>>;
837
+ result: z.ZodNullable<z.ZodString>;
838
+ sessionRecord: z.ZodNullable<z.ZodType<import("./published-record.js").PublishedRecord, import("./published-record.js").PublishedRecord, z.core.$ZodTypeInternals<import("./published-record.js").PublishedRecord, import("./published-record.js").PublishedRecord>>>;
839
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
840
+ access: "owner" | "principal";
841
+ readOnly: boolean;
842
+ keyed: boolean;
843
+ }> & Record<never, never>>;
844
+ read: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
845
+ session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
846
+ cursor: z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>;
847
+ limit: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodNumber>, unknown>, z.ZodTransform<number, number>>;
848
+ }, z.core.$strip>, z.ZodObject<{
849
+ rows: z.ZodReadonly<z.ZodArray<z.ZodObject<{
850
+ role: z.ZodEnum<{
851
+ assistant: "assistant";
852
+ user: "user";
853
+ }>;
854
+ text: z.ZodString;
855
+ tools: z.ZodReadonly<z.ZodArray<z.ZodObject<{
856
+ name: z.ZodString;
857
+ input: z.ZodString;
858
+ }, z.core.$strip>>>;
859
+ at: z.ZodNullable<z.ZodNumber>;
860
+ }, z.core.$strip>>>;
861
+ cursor: z.ZodString;
862
+ more: z.ZodBoolean;
863
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
864
+ access: "owner" | "principal";
865
+ readOnly: boolean;
866
+ keyed: boolean;
867
+ }> & Record<never, never>>;
868
+ message: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
869
+ session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
870
+ text: z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>;
871
+ idempotencyKey: z.ZodOptional<z.ZodString>;
872
+ replayOnly: z.ZodOptional<z.ZodBoolean>;
873
+ from: z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>;
874
+ notice: z.ZodOptional<z.ZodBoolean>;
875
+ }, z.core.$strip>, z.ZodObject<{
876
+ message: z.ZodString;
877
+ status: z.ZodEnum<{
878
+ answered: "answered";
879
+ delivered: "delivered";
880
+ queued: "queued";
881
+ unanswered: "unanswered";
882
+ }>;
883
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
884
+ access: "owner" | "principal";
885
+ readOnly: boolean;
886
+ keyed: boolean;
887
+ }> & Record<never, never>>;
888
+ tap: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
889
+ session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
890
+ notices: z.ZodDefault<z.ZodBoolean>;
891
+ }, z.core.$strip>, z.ZodObject<{}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
892
+ access: "owner" | "principal";
893
+ readOnly: boolean;
894
+ keyed: boolean;
895
+ }> & Record<never, never>>;
896
+ };
897
+ permission: {
898
+ respond: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
899
+ request: z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>;
900
+ decision: z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>;
901
+ }, z.core.$strip>, z.ZodObject<{}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
902
+ access: "owner" | "principal";
903
+ readOnly: boolean;
904
+ keyed: boolean;
905
+ }> & Record<never, never>>;
906
+ };
907
+ events: {
908
+ read: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
909
+ cursor: z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>;
910
+ from: z.ZodOptional<z.ZodLiteral<"start">>;
911
+ limit: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodNumber>, unknown>, z.ZodTransform<number, number>>;
912
+ waitMs: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodNumber>, unknown>, z.ZodTransform<number, number>>;
913
+ session: z.ZodPreprocess<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("./session-id.js").SessionID, string>>>, unknown>;
914
+ }, z.core.$strip>, z.ZodObject<{
915
+ events: z.ZodReadonly<z.ZodArray<z.ZodObject<{
916
+ cursor: z.ZodString;
917
+ at: z.ZodNumber;
918
+ session: z.ZodString;
919
+ name: z.ZodNullable<z.ZodString>;
920
+ kind: z.ZodString;
921
+ detail: z.ZodNullable<z.ZodString>;
922
+ message: z.ZodOptional<z.ZodString>;
923
+ label: z.ZodOptional<z.ZodString>;
924
+ result: z.ZodOptional<z.ZodObject<{
925
+ runID: z.ZodString;
926
+ code: z.ZodNumber;
927
+ pid: z.ZodNullable<z.ZodNumber>;
928
+ build: z.ZodNullable<z.ZodString>;
929
+ listenPort: z.ZodNullable<z.ZodNumber>;
930
+ restored: z.ZodNumber;
931
+ total: z.ZodNumber;
932
+ failed: z.ZodReadonly<z.ZodArray<z.ZodObject<{
933
+ name: z.ZodString;
934
+ id: z.ZodString;
935
+ reason: z.ZodString;
936
+ }, z.core.$strip>>>;
937
+ interrupted: z.ZodReadonly<z.ZodArray<z.ZodObject<{
938
+ name: z.ZodString;
939
+ id: z.ZodString;
940
+ }, z.core.$strip>>>;
941
+ error: z.ZodNullable<z.ZodString>;
942
+ }, z.core.$strip>>;
943
+ origin: z.ZodOptional<z.ZodObject<{
944
+ daemon: z.ZodString;
945
+ incarnation: z.ZodString;
946
+ cursor: z.ZodString;
947
+ }, z.core.$strip>>;
948
+ }, z.core.$strip>>>;
949
+ cursor: z.ZodString;
950
+ more: z.ZodBoolean;
951
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
952
+ access: "owner" | "principal";
953
+ readOnly: boolean;
954
+ keyed: boolean;
955
+ }> & Record<never, never>>;
956
+ subscribe: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{}, z.core.$strip>, import("@orpc/contract").Schema<AsyncIteratorObject<{
957
+ ev: "SessionRenamed";
958
+ sessionID: string;
959
+ name: string;
960
+ namedBy: "agent" | "auto" | "user";
961
+ } | {
962
+ ev: "SessionRemoved";
963
+ sessionID: string;
964
+ } | {
965
+ ev: "SessionResized";
966
+ sessionID: string;
967
+ cols: number;
968
+ rows: number;
969
+ } | {
970
+ ev: "SessionOutput";
971
+ sessionID: string;
972
+ seq: number;
973
+ data: string;
974
+ } | {
975
+ ev: "SessionDesync";
976
+ sessionID: string;
977
+ dropped: number;
978
+ } | {
979
+ ev: "PermissionRequested";
980
+ request: string;
981
+ sessionID: string;
982
+ message: string;
983
+ respondable: boolean;
984
+ } | {
985
+ ev: "PermissionResolved";
986
+ request: string;
987
+ decision: string;
988
+ } | {
989
+ ev: "SessionMessage";
990
+ sessionID: string;
991
+ message: string;
992
+ status: "answered" | "delivered" | "queued" | "unanswered";
993
+ from: string;
994
+ sender?: {
995
+ kind: "connector";
996
+ client: string;
997
+ name: string;
998
+ } | {
999
+ kind: "session";
1000
+ session: string;
1001
+ name: string;
1002
+ } | {
1003
+ kind: "local";
1004
+ name: string;
1005
+ } | {
1006
+ kind: "owner";
1007
+ name: string;
1008
+ } | undefined;
1009
+ textPreview: string;
1010
+ sentAt: number;
1011
+ deliveredAt?: number | undefined;
1012
+ answeredAt?: number | undefined;
1013
+ answerPreview?: string | undefined;
1014
+ unansweredAt?: number | undefined;
1015
+ unansweredReason?: string | undefined;
1016
+ } | {
1017
+ ev: "SessionNote";
1018
+ sessionID: string;
1019
+ kind: string;
1020
+ text: string;
1021
+ sentAt: number;
1022
+ } | {
1023
+ ev: "InboxMessage";
1024
+ sessionID: string;
1025
+ message: string;
1026
+ from: string;
1027
+ sender?: {
1028
+ kind: "connector";
1029
+ client: string;
1030
+ name: string;
1031
+ } | {
1032
+ kind: "session";
1033
+ session: string;
1034
+ name: string;
1035
+ } | {
1036
+ kind: "local";
1037
+ name: string;
1038
+ } | {
1039
+ kind: "owner";
1040
+ name: string;
1041
+ } | undefined;
1042
+ text: string;
1043
+ sentAt: number;
1044
+ } | {
1045
+ ev: "InboxNotice";
1046
+ sessionID: string;
1047
+ message: string;
1048
+ from: string;
1049
+ status: "answered" | "unanswered";
1050
+ answer?: string | undefined;
1051
+ reason?: string | undefined;
1052
+ at: number;
1053
+ } | {
1054
+ ev: "InboxClosed";
1055
+ sessionID: string;
1056
+ reason: "removed" | "replaced";
1057
+ } | {
1058
+ ev: "DaemonRestarted";
1059
+ result: {
1060
+ runID: string;
1061
+ code: number;
1062
+ pid: number | null;
1063
+ build: string | null;
1064
+ listenPort: number | null;
1065
+ restored: number;
1066
+ total: number;
1067
+ failed: readonly {
1068
+ name: string;
1069
+ id: string;
1070
+ reason: string;
1071
+ }[];
1072
+ interrupted: readonly {
1073
+ name: string;
1074
+ id: string;
1075
+ }[];
1076
+ error: string | null;
1077
+ };
1078
+ } | {
1079
+ session: {
1080
+ id: string;
1081
+ name: string;
1082
+ cwd: string;
1083
+ state: "done" | "exited" | "needs_you" | "running";
1084
+ unread: boolean;
1085
+ lastMsg: string;
1086
+ lastDetail?: string | undefined;
1087
+ restoreRefusal?: string | undefined;
1088
+ agentSessionID?: string | undefined;
1089
+ agent: string;
1090
+ pinned: boolean;
1091
+ lastAttachedAt: number;
1092
+ repoRoot: string;
1093
+ namedBy: "agent" | "auto" | "user";
1094
+ createdAt: number;
1095
+ kind: "headless" | "pty";
1096
+ alive: boolean;
1097
+ canEject: boolean;
1098
+ parent?: string | undefined;
1099
+ locator: {
1100
+ daemonID: string;
1101
+ targetID: string;
1102
+ };
1103
+ workspace?: {
1104
+ repoURL: string;
1105
+ sha: string;
1106
+ ref?: string | undefined;
1107
+ materializedAt: number;
1108
+ } | undefined;
1109
+ lifecycle: {
1110
+ desired: "run" | "sleep" | "stop";
1111
+ vm: "asleep" | "awake" | "none" | "unknown";
1112
+ harness: "exited" | "running" | "suspended";
1113
+ attachment: "attached" | "detached" | "local" | "reattaching";
1114
+ };
1115
+ model?: string | undefined;
1116
+ pluginDirs?: readonly string[] | undefined;
1117
+ };
1118
+ ev: "SessionAdded";
1119
+ } | {
1120
+ session: {
1121
+ id: string;
1122
+ name: string;
1123
+ cwd: string;
1124
+ state: "done" | "exited" | "needs_you" | "running";
1125
+ unread: boolean;
1126
+ lastMsg: string;
1127
+ lastDetail?: string | undefined;
1128
+ restoreRefusal?: string | undefined;
1129
+ agentSessionID?: string | undefined;
1130
+ agent: string;
1131
+ pinned: boolean;
1132
+ lastAttachedAt: number;
1133
+ repoRoot: string;
1134
+ namedBy: "agent" | "auto" | "user";
1135
+ createdAt: number;
1136
+ kind: "headless" | "pty";
1137
+ alive: boolean;
1138
+ canEject: boolean;
1139
+ parent?: string | undefined;
1140
+ locator: {
1141
+ daemonID: string;
1142
+ targetID: string;
1143
+ };
1144
+ workspace?: {
1145
+ repoURL: string;
1146
+ sha: string;
1147
+ ref?: string | undefined;
1148
+ materializedAt: number;
1149
+ } | undefined;
1150
+ lifecycle: {
1151
+ desired: "run" | "sleep" | "stop";
1152
+ vm: "asleep" | "awake" | "none" | "unknown";
1153
+ harness: "exited" | "running" | "suspended";
1154
+ attachment: "attached" | "detached" | "local" | "reattaching";
1155
+ };
1156
+ model?: string | undefined;
1157
+ pluginDirs?: readonly string[] | undefined;
1158
+ };
1159
+ ev: "SessionState";
1160
+ } | {
1161
+ session: {
1162
+ id: string;
1163
+ name: string;
1164
+ cwd: string;
1165
+ state: "done" | "exited" | "needs_you" | "running";
1166
+ unread: boolean;
1167
+ lastMsg: string;
1168
+ lastDetail?: string | undefined;
1169
+ restoreRefusal?: string | undefined;
1170
+ agentSessionID?: string | undefined;
1171
+ agent: string;
1172
+ pinned: boolean;
1173
+ lastAttachedAt: number;
1174
+ repoRoot: string;
1175
+ namedBy: "agent" | "auto" | "user";
1176
+ createdAt: number;
1177
+ kind: "headless" | "pty";
1178
+ alive: boolean;
1179
+ canEject: boolean;
1180
+ parent?: string | undefined;
1181
+ locator: {
1182
+ daemonID: string;
1183
+ targetID: string;
1184
+ };
1185
+ workspace?: {
1186
+ repoURL: string;
1187
+ sha: string;
1188
+ ref?: string | undefined;
1189
+ materializedAt: number;
1190
+ } | undefined;
1191
+ lifecycle: {
1192
+ desired: "run" | "sleep" | "stop";
1193
+ vm: "asleep" | "awake" | "none" | "unknown";
1194
+ harness: "exited" | "running" | "suspended";
1195
+ attachment: "attached" | "detached" | "local" | "reattaching";
1196
+ };
1197
+ model?: string | undefined;
1198
+ pluginDirs?: readonly string[] | undefined;
1199
+ };
1200
+ ev: "SessionAttached";
1201
+ } | {
1202
+ session: {
1203
+ id: string;
1204
+ name: string;
1205
+ cwd: string;
1206
+ state: "done" | "exited" | "needs_you" | "running";
1207
+ unread: boolean;
1208
+ lastMsg: string;
1209
+ lastDetail?: string | undefined;
1210
+ restoreRefusal?: string | undefined;
1211
+ agentSessionID?: string | undefined;
1212
+ agent: string;
1213
+ pinned: boolean;
1214
+ lastAttachedAt: number;
1215
+ repoRoot: string;
1216
+ namedBy: "agent" | "auto" | "user";
1217
+ createdAt: number;
1218
+ kind: "headless" | "pty";
1219
+ alive: boolean;
1220
+ canEject: boolean;
1221
+ parent?: string | undefined;
1222
+ locator: {
1223
+ daemonID: string;
1224
+ targetID: string;
1225
+ };
1226
+ workspace?: {
1227
+ repoURL: string;
1228
+ sha: string;
1229
+ ref?: string | undefined;
1230
+ materializedAt: number;
1231
+ } | undefined;
1232
+ lifecycle: {
1233
+ desired: "run" | "sleep" | "stop";
1234
+ vm: "asleep" | "awake" | "none" | "unknown";
1235
+ harness: "exited" | "running" | "suspended";
1236
+ attachment: "attached" | "detached" | "local" | "reattaching";
1237
+ };
1238
+ model?: string | undefined;
1239
+ pluginDirs?: readonly string[] | undefined;
1240
+ };
1241
+ ev: "SessionDetached";
1242
+ }, unknown, void>, import("@orpc/contract").AsyncIteratorClass<{
1243
+ ev: "SessionRenamed";
1244
+ sessionID: string;
1245
+ name: string;
1246
+ namedBy: "agent" | "auto" | "user";
1247
+ } | {
1248
+ ev: "SessionRemoved";
1249
+ sessionID: string;
1250
+ } | {
1251
+ ev: "SessionResized";
1252
+ sessionID: string;
1253
+ cols: number;
1254
+ rows: number;
1255
+ } | {
1256
+ ev: "SessionOutput";
1257
+ sessionID: string;
1258
+ seq: number;
1259
+ data: string;
1260
+ } | {
1261
+ ev: "SessionDesync";
1262
+ sessionID: string;
1263
+ dropped: number;
1264
+ } | {
1265
+ ev: "PermissionRequested";
1266
+ request: string;
1267
+ sessionID: string;
1268
+ message: string;
1269
+ respondable: boolean;
1270
+ } | {
1271
+ ev: "PermissionResolved";
1272
+ request: string;
1273
+ decision: string;
1274
+ } | {
1275
+ ev: "SessionMessage";
1276
+ sessionID: string;
1277
+ message: string;
1278
+ status: "answered" | "delivered" | "queued" | "unanswered";
1279
+ from: string;
1280
+ sender?: {
1281
+ kind: "connector";
1282
+ client: string;
1283
+ name: string;
1284
+ } | {
1285
+ kind: "session";
1286
+ session: string;
1287
+ name: string;
1288
+ } | {
1289
+ kind: "local";
1290
+ name: string;
1291
+ } | {
1292
+ kind: "owner";
1293
+ name: string;
1294
+ } | undefined;
1295
+ textPreview: string;
1296
+ sentAt: number;
1297
+ deliveredAt?: number | undefined;
1298
+ answeredAt?: number | undefined;
1299
+ answerPreview?: string | undefined;
1300
+ unansweredAt?: number | undefined;
1301
+ unansweredReason?: string | undefined;
1302
+ } | {
1303
+ ev: "SessionNote";
1304
+ sessionID: string;
1305
+ kind: string;
1306
+ text: string;
1307
+ sentAt: number;
1308
+ } | {
1309
+ ev: "InboxMessage";
1310
+ sessionID: string;
1311
+ message: string;
1312
+ from: string;
1313
+ sender?: {
1314
+ kind: "connector";
1315
+ client: string;
1316
+ name: string;
1317
+ } | {
1318
+ kind: "session";
1319
+ session: string;
1320
+ name: string;
1321
+ } | {
1322
+ kind: "local";
1323
+ name: string;
1324
+ } | {
1325
+ kind: "owner";
1326
+ name: string;
1327
+ } | undefined;
1328
+ text: string;
1329
+ sentAt: number;
1330
+ } | {
1331
+ ev: "InboxNotice";
1332
+ sessionID: string;
1333
+ message: string;
1334
+ from: string;
1335
+ status: "answered" | "unanswered";
1336
+ answer?: string | undefined;
1337
+ reason?: string | undefined;
1338
+ at: number;
1339
+ } | {
1340
+ ev: "InboxClosed";
1341
+ sessionID: string;
1342
+ reason: "removed" | "replaced";
1343
+ } | {
1344
+ ev: "DaemonRestarted";
1345
+ result: {
1346
+ runID: string;
1347
+ code: number;
1348
+ pid: number | null;
1349
+ build: string | null;
1350
+ listenPort: number | null;
1351
+ restored: number;
1352
+ total: number;
1353
+ failed: readonly {
1354
+ name: string;
1355
+ id: string;
1356
+ reason: string;
1357
+ }[];
1358
+ interrupted: readonly {
1359
+ name: string;
1360
+ id: string;
1361
+ }[];
1362
+ error: string | null;
1363
+ };
1364
+ } | {
1365
+ session: {
1366
+ id: import("./session-id.js").SessionID;
1367
+ name: string;
1368
+ cwd: string;
1369
+ state: "done" | "exited" | "needs_you" | "running";
1370
+ unread: boolean;
1371
+ lastMsg: string;
1372
+ lastDetail?: string | undefined;
1373
+ restoreRefusal?: string | undefined;
1374
+ agentSessionID?: import("./agent-session-id.js").AgentSessionID | undefined;
1375
+ agent: string;
1376
+ pinned: boolean;
1377
+ lastAttachedAt: number;
1378
+ repoRoot: string;
1379
+ namedBy: "agent" | "auto" | "user";
1380
+ createdAt: number;
1381
+ kind: "headless" | "pty";
1382
+ alive: boolean;
1383
+ canEject: boolean;
1384
+ parent?: import("./session-id.js").SessionID | undefined;
1385
+ locator: {
1386
+ daemonID: import("./daemon-id.js").DaemonID;
1387
+ targetID: string;
1388
+ };
1389
+ workspace?: {
1390
+ repoURL: string;
1391
+ sha: string;
1392
+ ref?: string | undefined;
1393
+ materializedAt: number;
1394
+ } | undefined;
1395
+ lifecycle: {
1396
+ desired: "run" | "sleep" | "stop";
1397
+ vm: "asleep" | "awake" | "none" | "unknown";
1398
+ harness: "exited" | "running" | "suspended";
1399
+ attachment: "attached" | "detached" | "local" | "reattaching";
1400
+ };
1401
+ model?: string | undefined;
1402
+ pluginDirs?: readonly string[] | undefined;
1403
+ };
1404
+ ev: "SessionAdded";
1405
+ } | {
1406
+ session: {
1407
+ id: import("./session-id.js").SessionID;
1408
+ name: string;
1409
+ cwd: string;
1410
+ state: "done" | "exited" | "needs_you" | "running";
1411
+ unread: boolean;
1412
+ lastMsg: string;
1413
+ lastDetail?: string | undefined;
1414
+ restoreRefusal?: string | undefined;
1415
+ agentSessionID?: import("./agent-session-id.js").AgentSessionID | undefined;
1416
+ agent: string;
1417
+ pinned: boolean;
1418
+ lastAttachedAt: number;
1419
+ repoRoot: string;
1420
+ namedBy: "agent" | "auto" | "user";
1421
+ createdAt: number;
1422
+ kind: "headless" | "pty";
1423
+ alive: boolean;
1424
+ canEject: boolean;
1425
+ parent?: import("./session-id.js").SessionID | undefined;
1426
+ locator: {
1427
+ daemonID: import("./daemon-id.js").DaemonID;
1428
+ targetID: string;
1429
+ };
1430
+ workspace?: {
1431
+ repoURL: string;
1432
+ sha: string;
1433
+ ref?: string | undefined;
1434
+ materializedAt: number;
1435
+ } | undefined;
1436
+ lifecycle: {
1437
+ desired: "run" | "sleep" | "stop";
1438
+ vm: "asleep" | "awake" | "none" | "unknown";
1439
+ harness: "exited" | "running" | "suspended";
1440
+ attachment: "attached" | "detached" | "local" | "reattaching";
1441
+ };
1442
+ model?: string | undefined;
1443
+ pluginDirs?: readonly string[] | undefined;
1444
+ };
1445
+ ev: "SessionState";
1446
+ } | {
1447
+ session: {
1448
+ id: import("./session-id.js").SessionID;
1449
+ name: string;
1450
+ cwd: string;
1451
+ state: "done" | "exited" | "needs_you" | "running";
1452
+ unread: boolean;
1453
+ lastMsg: string;
1454
+ lastDetail?: string | undefined;
1455
+ restoreRefusal?: string | undefined;
1456
+ agentSessionID?: import("./agent-session-id.js").AgentSessionID | undefined;
1457
+ agent: string;
1458
+ pinned: boolean;
1459
+ lastAttachedAt: number;
1460
+ repoRoot: string;
1461
+ namedBy: "agent" | "auto" | "user";
1462
+ createdAt: number;
1463
+ kind: "headless" | "pty";
1464
+ alive: boolean;
1465
+ canEject: boolean;
1466
+ parent?: import("./session-id.js").SessionID | undefined;
1467
+ locator: {
1468
+ daemonID: import("./daemon-id.js").DaemonID;
1469
+ targetID: string;
1470
+ };
1471
+ workspace?: {
1472
+ repoURL: string;
1473
+ sha: string;
1474
+ ref?: string | undefined;
1475
+ materializedAt: number;
1476
+ } | undefined;
1477
+ lifecycle: {
1478
+ desired: "run" | "sleep" | "stop";
1479
+ vm: "asleep" | "awake" | "none" | "unknown";
1480
+ harness: "exited" | "running" | "suspended";
1481
+ attachment: "attached" | "detached" | "local" | "reattaching";
1482
+ };
1483
+ model?: string | undefined;
1484
+ pluginDirs?: readonly string[] | undefined;
1485
+ };
1486
+ ev: "SessionAttached";
1487
+ } | {
1488
+ session: {
1489
+ id: import("./session-id.js").SessionID;
1490
+ name: string;
1491
+ cwd: string;
1492
+ state: "done" | "exited" | "needs_you" | "running";
1493
+ unread: boolean;
1494
+ lastMsg: string;
1495
+ lastDetail?: string | undefined;
1496
+ restoreRefusal?: string | undefined;
1497
+ agentSessionID?: import("./agent-session-id.js").AgentSessionID | undefined;
1498
+ agent: string;
1499
+ pinned: boolean;
1500
+ lastAttachedAt: number;
1501
+ repoRoot: string;
1502
+ namedBy: "agent" | "auto" | "user";
1503
+ createdAt: number;
1504
+ kind: "headless" | "pty";
1505
+ alive: boolean;
1506
+ canEject: boolean;
1507
+ parent?: import("./session-id.js").SessionID | undefined;
1508
+ locator: {
1509
+ daemonID: import("./daemon-id.js").DaemonID;
1510
+ targetID: string;
1511
+ };
1512
+ workspace?: {
1513
+ repoURL: string;
1514
+ sha: string;
1515
+ ref?: string | undefined;
1516
+ materializedAt: number;
1517
+ } | undefined;
1518
+ lifecycle: {
1519
+ desired: "run" | "sleep" | "stop";
1520
+ vm: "asleep" | "awake" | "none" | "unknown";
1521
+ harness: "exited" | "running" | "suspended";
1522
+ attachment: "attached" | "detached" | "local" | "reattaching";
1523
+ };
1524
+ model?: string | undefined;
1525
+ pluginDirs?: readonly string[] | undefined;
1526
+ };
1527
+ ev: "SessionDetached";
1528
+ }, unknown, void>>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
1529
+ access: "owner" | "principal";
1530
+ readOnly: boolean;
1531
+ keyed: boolean;
1532
+ }> & Record<never, never>>;
1533
+ };
1534
+ message: {
1535
+ get: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1536
+ message: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./message-id.js").MessageID, string>>;
1537
+ waitMs: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodNumber>, unknown>, z.ZodTransform<number, number>>;
1538
+ }, z.core.$strip>, z.ZodObject<{
1539
+ message: z.ZodString;
1540
+ session: z.ZodString;
1541
+ from: z.ZodString;
1542
+ sender: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1543
+ kind: z.ZodLiteral<"connector">;
1544
+ client: z.ZodString;
1545
+ name: z.ZodString;
1546
+ }, z.core.$strip>, z.ZodObject<{
1547
+ kind: z.ZodLiteral<"session">;
1548
+ session: z.ZodString;
1549
+ name: z.ZodString;
1550
+ }, z.core.$strip>, z.ZodObject<{
1551
+ kind: z.ZodLiteral<"local">;
1552
+ name: z.ZodString;
1553
+ }, z.core.$strip>, z.ZodObject<{
1554
+ kind: z.ZodLiteral<"owner">;
1555
+ name: z.ZodString;
1556
+ }, z.core.$strip>], "kind">>;
1557
+ text: z.ZodString;
1558
+ status: z.ZodEnum<{
1559
+ answered: "answered";
1560
+ delivered: "delivered";
1561
+ queued: "queued";
1562
+ unanswered: "unanswered";
1563
+ }>;
1564
+ sentAt: z.ZodNumber;
1565
+ deliveredAt: z.ZodOptional<z.ZodNumber>;
1566
+ answeredAt: z.ZodOptional<z.ZodNumber>;
1567
+ answer: z.ZodOptional<z.ZodString>;
1568
+ unansweredAt: z.ZodOptional<z.ZodNumber>;
1569
+ unansweredReason: z.ZodOptional<z.ZodString>;
1570
+ turn: z.ZodNullable<z.ZodString>;
1571
+ answeredWith: z.ZodReadonly<z.ZodArray<z.ZodString>>;
1572
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
1573
+ access: "owner" | "principal";
1574
+ readOnly: boolean;
1575
+ keyed: boolean;
1576
+ }> & Record<never, never>>;
1577
+ ack: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1578
+ session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
1579
+ message: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./message-id.js").MessageID, string>>;
1580
+ }, z.core.$strip>, z.ZodObject<{
1581
+ message: z.ZodString;
1582
+ status: z.ZodEnum<{
1583
+ answered: "answered";
1584
+ delivered: "delivered";
1585
+ queued: "queued";
1586
+ unanswered: "unanswered";
1587
+ }>;
1588
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
1589
+ access: "owner" | "principal";
1590
+ readOnly: boolean;
1591
+ keyed: boolean;
1592
+ }> & Record<never, never>>;
1593
+ };
1594
+ notice: {
1595
+ ack: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1596
+ session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
1597
+ message: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./message-id.js").MessageID, string>>;
1598
+ }, z.core.$strip>, z.ZodObject<{
1599
+ message: z.ZodString;
1600
+ status: z.ZodEnum<{
1601
+ answered: "answered";
1602
+ delivered: "delivered";
1603
+ queued: "queued";
1604
+ unanswered: "unanswered";
1605
+ }>;
1606
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
1607
+ access: "owner" | "principal";
1608
+ readOnly: boolean;
1609
+ keyed: boolean;
1610
+ }> & Record<never, never>>;
1611
+ };
1612
+ note: {
1613
+ get: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1614
+ note: z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>;
1615
+ }, z.core.$strip>, z.ZodObject<{
1616
+ note: z.ZodString;
1617
+ at: z.ZodNumber;
1618
+ session: z.ZodString;
1619
+ name: z.ZodNullable<z.ZodString>;
1620
+ label: z.ZodString;
1621
+ text: z.ZodString;
1622
+ complete: z.ZodBoolean;
1623
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
1624
+ access: "owner" | "principal";
1625
+ readOnly: boolean;
1626
+ keyed: boolean;
1627
+ }> & Record<never, never>>;
1628
+ };
1629
+ answer: {
1630
+ get: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1631
+ answer: z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>;
1632
+ }, z.core.$strip>, z.ZodObject<{
1633
+ answer: z.ZodString;
1634
+ at: z.ZodNumber;
1635
+ session: z.ZodString;
1636
+ name: z.ZodNullable<z.ZodString>;
1637
+ message: z.ZodString;
1638
+ text: z.ZodString;
1639
+ complete: z.ZodBoolean;
1640
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("./daemon-error-map.js").DaemonErrorMap>, Readonly<{
1641
+ access: "owner" | "principal";
1642
+ readOnly: boolean;
1643
+ keyed: boolean;
1644
+ }> & Record<never, never>>;
1645
+ };
1646
+ };