@agent-phonon/protocol 0.9.0 → 0.10.0

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 (145) hide show
  1. package/README.md +35 -1
  2. package/dist/index.d.ts +12 -0
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +12 -0
  5. package/dist/index.js.map +1 -1
  6. package/dist/native-version.d.ts +6 -0
  7. package/dist/native-version.d.ts.map +1 -0
  8. package/dist/native-version.js +41 -0
  9. package/dist/native-version.js.map +1 -0
  10. package/dist/schemas/capabilities.d.ts +9 -0
  11. package/dist/schemas/capabilities.d.ts.map +1 -1
  12. package/dist/schemas/capabilities.js +3 -0
  13. package/dist/schemas/capabilities.js.map +1 -1
  14. package/dist/schemas/common.d.ts +4 -4
  15. package/dist/schemas/common.d.ts.map +1 -1
  16. package/dist/schemas/common.js +9 -0
  17. package/dist/schemas/common.js.map +1 -1
  18. package/dist/schemas/compression.d.ts +191 -0
  19. package/dist/schemas/compression.d.ts.map +1 -0
  20. package/dist/schemas/compression.js +18 -0
  21. package/dist/schemas/compression.js.map +1 -0
  22. package/dist/schemas/conversation-archive.d.ts +1021 -0
  23. package/dist/schemas/conversation-archive.d.ts.map +1 -0
  24. package/dist/schemas/conversation-archive.js +148 -0
  25. package/dist/schemas/conversation-archive.js.map +1 -0
  26. package/dist/schemas/conversation-board.d.ts +428 -0
  27. package/dist/schemas/conversation-board.d.ts.map +1 -0
  28. package/dist/schemas/conversation-board.js +32 -0
  29. package/dist/schemas/conversation-board.js.map +1 -0
  30. package/dist/schemas/conversation-message.d.ts +658 -0
  31. package/dist/schemas/conversation-message.d.ts.map +1 -0
  32. package/dist/schemas/conversation-message.js +42 -0
  33. package/dist/schemas/conversation-message.js.map +1 -0
  34. package/dist/schemas/conversation-workflow.d.ts +1201 -0
  35. package/dist/schemas/conversation-workflow.d.ts.map +1 -0
  36. package/dist/schemas/conversation-workflow.js +68 -0
  37. package/dist/schemas/conversation-workflow.js.map +1 -0
  38. package/dist/schemas/device.d.ts +198 -2
  39. package/dist/schemas/device.d.ts.map +1 -1
  40. package/dist/schemas/device.js +29 -1
  41. package/dist/schemas/device.js.map +1 -1
  42. package/dist/schemas/discovery.d.ts +107 -0
  43. package/dist/schemas/discovery.d.ts.map +1 -1
  44. package/dist/schemas/discovery.js +2 -0
  45. package/dist/schemas/discovery.js.map +1 -1
  46. package/dist/schemas/document.d.ts +56 -26
  47. package/dist/schemas/document.d.ts.map +1 -1
  48. package/dist/schemas/document.js +11 -0
  49. package/dist/schemas/document.js.map +1 -1
  50. package/dist/schemas/employee.d.ts +139 -0
  51. package/dist/schemas/employee.d.ts.map +1 -0
  52. package/dist/schemas/employee.js +17 -0
  53. package/dist/schemas/employee.js.map +1 -0
  54. package/dist/schemas/env.d.ts +15 -15
  55. package/dist/schemas/env.d.ts.map +1 -1
  56. package/dist/schemas/env.js +1 -1
  57. package/dist/schemas/env.js.map +1 -1
  58. package/dist/schemas/file.d.ts +6 -6
  59. package/dist/schemas/hook.d.ts +4 -4
  60. package/dist/schemas/interaction.d.ts +363 -2
  61. package/dist/schemas/interaction.d.ts.map +1 -1
  62. package/dist/schemas/interaction.js +28 -1
  63. package/dist/schemas/interaction.js.map +1 -1
  64. package/dist/schemas/jsonrpc.d.ts +19 -19
  65. package/dist/schemas/maintenance.d.ts +822 -0
  66. package/dist/schemas/maintenance.d.ts.map +1 -0
  67. package/dist/schemas/maintenance.js +166 -0
  68. package/dist/schemas/maintenance.js.map +1 -0
  69. package/dist/schemas/managed-mcp.d.ts +116 -0
  70. package/dist/schemas/managed-mcp.d.ts.map +1 -0
  71. package/dist/schemas/managed-mcp.js +23 -0
  72. package/dist/schemas/managed-mcp.js.map +1 -0
  73. package/dist/schemas/methods.d.ts +22195 -2371
  74. package/dist/schemas/methods.d.ts.map +1 -1
  75. package/dist/schemas/methods.js +181 -6
  76. package/dist/schemas/methods.js.map +1 -1
  77. package/dist/schemas/native-stop.d.ts +162 -0
  78. package/dist/schemas/native-stop.d.ts.map +1 -0
  79. package/dist/schemas/native-stop.js +14 -0
  80. package/dist/schemas/native-stop.js.map +1 -0
  81. package/dist/schemas/policy.d.ts +61 -2
  82. package/dist/schemas/policy.d.ts.map +1 -1
  83. package/dist/schemas/policy.js +33 -0
  84. package/dist/schemas/policy.js.map +1 -1
  85. package/dist/schemas/project-coordination.d.ts +1956 -0
  86. package/dist/schemas/project-coordination.d.ts.map +1 -0
  87. package/dist/schemas/project-coordination.js +81 -0
  88. package/dist/schemas/project-coordination.js.map +1 -0
  89. package/dist/schemas/project.d.ts +771 -53
  90. package/dist/schemas/project.d.ts.map +1 -1
  91. package/dist/schemas/project.js +60 -5
  92. package/dist/schemas/project.js.map +1 -1
  93. package/dist/schemas/reasoning.d.ts +26 -0
  94. package/dist/schemas/reasoning.d.ts.map +1 -0
  95. package/dist/schemas/reasoning.js +10 -0
  96. package/dist/schemas/reasoning.js.map +1 -0
  97. package/dist/schemas/schedule.d.ts +14653 -4527
  98. package/dist/schemas/schedule.d.ts.map +1 -1
  99. package/dist/schemas/schedule.js +55 -8
  100. package/dist/schemas/schedule.js.map +1 -1
  101. package/dist/schemas/session.d.ts +1558 -49
  102. package/dist/schemas/session.d.ts.map +1 -1
  103. package/dist/schemas/session.js +27 -16
  104. package/dist/schemas/session.js.map +1 -1
  105. package/dist/schemas/skill.d.ts +1009 -8
  106. package/dist/schemas/skill.d.ts.map +1 -1
  107. package/dist/schemas/skill.js +39 -0
  108. package/dist/schemas/skill.js.map +1 -1
  109. package/dist/schemas/stream.d.ts +1060 -67
  110. package/dist/schemas/stream.d.ts.map +1 -1
  111. package/dist/schemas/stream.js +18 -3
  112. package/dist/schemas/stream.js.map +1 -1
  113. package/dist/schemas/workflow.d.ts +2764 -255
  114. package/dist/schemas/workflow.d.ts.map +1 -1
  115. package/dist/schemas/workflow.js +69 -1
  116. package/dist/schemas/workflow.js.map +1 -1
  117. package/package.json +1 -1
  118. package/src/index.ts +12 -0
  119. package/src/native-version.ts +30 -0
  120. package/src/schemas/capabilities.ts +3 -0
  121. package/src/schemas/common.ts +9 -0
  122. package/src/schemas/compression.ts +19 -0
  123. package/src/schemas/conversation-archive.ts +155 -0
  124. package/src/schemas/conversation-board.ts +36 -0
  125. package/src/schemas/conversation-message.ts +46 -0
  126. package/src/schemas/conversation-workflow.ts +62 -0
  127. package/src/schemas/device.ts +32 -1
  128. package/src/schemas/discovery.ts +2 -0
  129. package/src/schemas/document.ts +13 -0
  130. package/src/schemas/employee.ts +19 -0
  131. package/src/schemas/env.ts +1 -1
  132. package/src/schemas/interaction.ts +32 -1
  133. package/src/schemas/maintenance.ts +204 -0
  134. package/src/schemas/managed-mcp.ts +25 -0
  135. package/src/schemas/methods.ts +208 -1
  136. package/src/schemas/native-stop.ts +16 -0
  137. package/src/schemas/policy.ts +33 -0
  138. package/src/schemas/project-coordination.ts +90 -0
  139. package/src/schemas/project.ts +72 -5
  140. package/src/schemas/reasoning.ts +13 -0
  141. package/src/schemas/schedule.ts +63 -8
  142. package/src/schemas/session.ts +30 -18
  143. package/src/schemas/skill.ts +52 -0
  144. package/src/schemas/stream.ts +22 -3
  145. package/src/schemas/workflow.ts +82 -1
@@ -0,0 +1,1956 @@
1
+ import { z } from "zod";
2
+ export declare const CoordinationActivity: z.ZodEffects<z.ZodObject<{
3
+ summary: z.ZodString;
4
+ phase: z.ZodEnum<["planning", "working", "validating", "blocked", "idle", "completed"]>;
5
+ impact: z.ZodArray<z.ZodString, "many">;
6
+ dependencies: z.ZodDefault<z.ZodString>;
7
+ }, "strict", z.ZodTypeAny, {
8
+ summary: string;
9
+ phase: "blocked" | "idle" | "completed" | "planning" | "working" | "validating";
10
+ impact: string[];
11
+ dependencies: string;
12
+ }, {
13
+ summary: string;
14
+ phase: "blocked" | "idle" | "completed" | "planning" | "working" | "validating";
15
+ impact: string[];
16
+ dependencies?: string | undefined;
17
+ }>, {
18
+ summary: string;
19
+ phase: "blocked" | "idle" | "completed" | "planning" | "working" | "validating";
20
+ impact: string[];
21
+ dependencies: string;
22
+ }, {
23
+ summary: string;
24
+ phase: "blocked" | "idle" | "completed" | "planning" | "working" | "validating";
25
+ impact: string[];
26
+ dependencies?: string | undefined;
27
+ }>;
28
+ export declare const AgentCoordinationInput: z.ZodEffects<z.ZodDiscriminatedUnion<"operation", [z.ZodObject<{
29
+ operation: z.ZodLiteral<"presence">;
30
+ }, "strict", z.ZodTypeAny, {
31
+ operation: "presence";
32
+ }, {
33
+ operation: "presence";
34
+ }>, z.ZodObject<{
35
+ operation: z.ZodLiteral<"peers">;
36
+ after: z.ZodDefault<z.ZodString>;
37
+ }, "strict", z.ZodTypeAny, {
38
+ operation: "peers";
39
+ after: string;
40
+ }, {
41
+ operation: "peers";
42
+ after?: string | undefined;
43
+ }>, z.ZodObject<{
44
+ operation: z.ZodLiteral<"activity">;
45
+ requestId: z.ZodEffects<z.ZodString, string, string>;
46
+ baseRevision: z.ZodNumber;
47
+ activity: z.ZodEffects<z.ZodObject<{
48
+ summary: z.ZodString;
49
+ phase: z.ZodEnum<["planning", "working", "validating", "blocked", "idle", "completed"]>;
50
+ impact: z.ZodArray<z.ZodString, "many">;
51
+ dependencies: z.ZodDefault<z.ZodString>;
52
+ }, "strict", z.ZodTypeAny, {
53
+ summary: string;
54
+ phase: "blocked" | "idle" | "completed" | "planning" | "working" | "validating";
55
+ impact: string[];
56
+ dependencies: string;
57
+ }, {
58
+ summary: string;
59
+ phase: "blocked" | "idle" | "completed" | "planning" | "working" | "validating";
60
+ impact: string[];
61
+ dependencies?: string | undefined;
62
+ }>, {
63
+ summary: string;
64
+ phase: "blocked" | "idle" | "completed" | "planning" | "working" | "validating";
65
+ impact: string[];
66
+ dependencies: string;
67
+ }, {
68
+ summary: string;
69
+ phase: "blocked" | "idle" | "completed" | "planning" | "working" | "validating";
70
+ impact: string[];
71
+ dependencies?: string | undefined;
72
+ }>;
73
+ }, "strict", z.ZodTypeAny, {
74
+ operation: "activity";
75
+ baseRevision: number;
76
+ requestId: string;
77
+ activity: {
78
+ summary: string;
79
+ phase: "blocked" | "idle" | "completed" | "planning" | "working" | "validating";
80
+ impact: string[];
81
+ dependencies: string;
82
+ };
83
+ }, {
84
+ operation: "activity";
85
+ baseRevision: number;
86
+ requestId: string;
87
+ activity: {
88
+ summary: string;
89
+ phase: "blocked" | "idle" | "completed" | "planning" | "working" | "validating";
90
+ impact: string[];
91
+ dependencies?: string | undefined;
92
+ };
93
+ }>, z.ZodObject<{
94
+ operation: z.ZodLiteral<"send">;
95
+ requestId: z.ZodEffects<z.ZodString, string, string>;
96
+ recipientId: z.ZodEffects<z.ZodString, string, string>;
97
+ kind: z.ZodEnum<["intent", "question", "notice", "request", "result"]>;
98
+ text: z.ZodString;
99
+ references: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
100
+ inReplyTo: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
101
+ }, "strict", z.ZodTypeAny, {
102
+ kind: "result" | "request" | "intent" | "question" | "notice";
103
+ operation: "send";
104
+ text: string;
105
+ requestId: string;
106
+ recipientId: string;
107
+ references: string[];
108
+ inReplyTo?: string | undefined;
109
+ }, {
110
+ kind: "result" | "request" | "intent" | "question" | "notice";
111
+ operation: "send";
112
+ text: string;
113
+ requestId: string;
114
+ recipientId: string;
115
+ references?: string[] | undefined;
116
+ inReplyTo?: string | undefined;
117
+ }>, z.ZodObject<{
118
+ operation: z.ZodLiteral<"inbox">;
119
+ after: z.ZodDefault<z.ZodString>;
120
+ }, "strict", z.ZodTypeAny, {
121
+ operation: "inbox";
122
+ after: string;
123
+ }, {
124
+ operation: "inbox";
125
+ after?: string | undefined;
126
+ }>, z.ZodObject<{
127
+ operation: z.ZodLiteral<"acknowledge">;
128
+ messageIds: z.ZodEffects<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">, string[], string[]>;
129
+ }, "strict", z.ZodTypeAny, {
130
+ operation: "acknowledge";
131
+ messageIds: string[];
132
+ }, {
133
+ operation: "acknowledge";
134
+ messageIds: string[];
135
+ }>, z.ZodObject<{
136
+ operation: z.ZodLiteral<"receipt">;
137
+ requestId: z.ZodEffects<z.ZodString, string, string>;
138
+ }, "strict", z.ZodTypeAny, {
139
+ operation: "receipt";
140
+ requestId: string;
141
+ }, {
142
+ operation: "receipt";
143
+ requestId: string;
144
+ }>, z.ZodObject<{
145
+ operation: z.ZodLiteral<"leave">;
146
+ }, "strict", z.ZodTypeAny, {
147
+ operation: "leave";
148
+ }, {
149
+ operation: "leave";
150
+ }>]>, {
151
+ operation: "presence";
152
+ } | {
153
+ operation: "peers";
154
+ after: string;
155
+ } | {
156
+ operation: "activity";
157
+ baseRevision: number;
158
+ requestId: string;
159
+ activity: {
160
+ summary: string;
161
+ phase: "blocked" | "idle" | "completed" | "planning" | "working" | "validating";
162
+ impact: string[];
163
+ dependencies: string;
164
+ };
165
+ } | {
166
+ kind: "result" | "request" | "intent" | "question" | "notice";
167
+ operation: "send";
168
+ text: string;
169
+ requestId: string;
170
+ recipientId: string;
171
+ references: string[];
172
+ inReplyTo?: string | undefined;
173
+ } | {
174
+ operation: "inbox";
175
+ after: string;
176
+ } | {
177
+ operation: "acknowledge";
178
+ messageIds: string[];
179
+ } | {
180
+ operation: "receipt";
181
+ requestId: string;
182
+ } | {
183
+ operation: "leave";
184
+ }, {
185
+ operation: "presence";
186
+ } | {
187
+ operation: "peers";
188
+ after?: string | undefined;
189
+ } | {
190
+ operation: "activity";
191
+ baseRevision: number;
192
+ requestId: string;
193
+ activity: {
194
+ summary: string;
195
+ phase: "blocked" | "idle" | "completed" | "planning" | "working" | "validating";
196
+ impact: string[];
197
+ dependencies?: string | undefined;
198
+ };
199
+ } | {
200
+ kind: "result" | "request" | "intent" | "question" | "notice";
201
+ operation: "send";
202
+ text: string;
203
+ requestId: string;
204
+ recipientId: string;
205
+ references?: string[] | undefined;
206
+ inReplyTo?: string | undefined;
207
+ } | {
208
+ operation: "inbox";
209
+ after?: string | undefined;
210
+ } | {
211
+ operation: "acknowledge";
212
+ messageIds: string[];
213
+ } | {
214
+ operation: "receipt";
215
+ requestId: string;
216
+ } | {
217
+ operation: "leave";
218
+ }>;
219
+ export type AgentCoordinationInput = z.infer<typeof AgentCoordinationInput>;
220
+ export declare const CoordinationReceiveReport: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
221
+ version: z.ZodLiteral<1>;
222
+ mode: z.ZodLiteral<"tool_polling">;
223
+ }, "strict", z.ZodTypeAny, {
224
+ version: 1;
225
+ mode: "tool_polling";
226
+ }, {
227
+ version: 1;
228
+ mode: "tool_polling";
229
+ }>, z.ZodObject<{
230
+ version: z.ZodLiteral<1>;
231
+ mode: z.ZodLiteral<"runtime_pending">;
232
+ boundary: z.ZodEnum<["before_model", "after_tools"]>;
233
+ evidence: z.ZodEnum<["context_hook", "provider_payload"]>;
234
+ visibility: z.ZodEnum<["hidden", "collapsed"]>;
235
+ }, "strict", z.ZodTypeAny, {
236
+ version: 1;
237
+ mode: "runtime_pending";
238
+ boundary: "before_model" | "after_tools";
239
+ evidence: "context_hook" | "provider_payload";
240
+ visibility: "hidden" | "collapsed";
241
+ }, {
242
+ version: 1;
243
+ mode: "runtime_pending";
244
+ boundary: "before_model" | "after_tools";
245
+ evidence: "context_hook" | "provider_payload";
246
+ visibility: "hidden" | "collapsed";
247
+ }>, z.ZodObject<{
248
+ version: z.ZodLiteral<1>;
249
+ mode: z.ZodLiteral<"runtime_checkpoint">;
250
+ boundary: z.ZodEnum<["before_model", "after_tools"]>;
251
+ evidence: z.ZodEnum<["context_hook", "provider_payload"]>;
252
+ visibility: z.ZodEnum<["hidden", "collapsed"]>;
253
+ }, "strict", z.ZodTypeAny, {
254
+ version: 1;
255
+ mode: "runtime_checkpoint";
256
+ boundary: "before_model" | "after_tools";
257
+ evidence: "context_hook" | "provider_payload";
258
+ visibility: "hidden" | "collapsed";
259
+ }, {
260
+ version: 1;
261
+ mode: "runtime_checkpoint";
262
+ boundary: "before_model" | "after_tools";
263
+ evidence: "context_hook" | "provider_payload";
264
+ visibility: "hidden" | "collapsed";
265
+ }>]>;
266
+ export type CoordinationReceiveReport = z.infer<typeof CoordinationReceiveReport>;
267
+ export declare const CoordinationReceiveState: z.ZodObject<{
268
+ report: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
269
+ version: z.ZodLiteral<1>;
270
+ mode: z.ZodLiteral<"tool_polling">;
271
+ }, "strict", z.ZodTypeAny, {
272
+ version: 1;
273
+ mode: "tool_polling";
274
+ }, {
275
+ version: 1;
276
+ mode: "tool_polling";
277
+ }>, z.ZodObject<{
278
+ version: z.ZodLiteral<1>;
279
+ mode: z.ZodLiteral<"runtime_pending">;
280
+ boundary: z.ZodEnum<["before_model", "after_tools"]>;
281
+ evidence: z.ZodEnum<["context_hook", "provider_payload"]>;
282
+ visibility: z.ZodEnum<["hidden", "collapsed"]>;
283
+ }, "strict", z.ZodTypeAny, {
284
+ version: 1;
285
+ mode: "runtime_pending";
286
+ boundary: "before_model" | "after_tools";
287
+ evidence: "context_hook" | "provider_payload";
288
+ visibility: "hidden" | "collapsed";
289
+ }, {
290
+ version: 1;
291
+ mode: "runtime_pending";
292
+ boundary: "before_model" | "after_tools";
293
+ evidence: "context_hook" | "provider_payload";
294
+ visibility: "hidden" | "collapsed";
295
+ }>, z.ZodObject<{
296
+ version: z.ZodLiteral<1>;
297
+ mode: z.ZodLiteral<"runtime_checkpoint">;
298
+ boundary: z.ZodEnum<["before_model", "after_tools"]>;
299
+ evidence: z.ZodEnum<["context_hook", "provider_payload"]>;
300
+ visibility: z.ZodEnum<["hidden", "collapsed"]>;
301
+ }, "strict", z.ZodTypeAny, {
302
+ version: 1;
303
+ mode: "runtime_checkpoint";
304
+ boundary: "before_model" | "after_tools";
305
+ evidence: "context_hook" | "provider_payload";
306
+ visibility: "hidden" | "collapsed";
307
+ }, {
308
+ version: 1;
309
+ mode: "runtime_checkpoint";
310
+ boundary: "before_model" | "after_tools";
311
+ evidence: "context_hook" | "provider_payload";
312
+ visibility: "hidden" | "collapsed";
313
+ }>]>;
314
+ reportedAt: z.ZodString;
315
+ current: z.ZodBoolean;
316
+ }, "strict", z.ZodTypeAny, {
317
+ report: {
318
+ version: 1;
319
+ mode: "tool_polling";
320
+ } | {
321
+ version: 1;
322
+ mode: "runtime_pending";
323
+ boundary: "before_model" | "after_tools";
324
+ evidence: "context_hook" | "provider_payload";
325
+ visibility: "hidden" | "collapsed";
326
+ } | {
327
+ version: 1;
328
+ mode: "runtime_checkpoint";
329
+ boundary: "before_model" | "after_tools";
330
+ evidence: "context_hook" | "provider_payload";
331
+ visibility: "hidden" | "collapsed";
332
+ };
333
+ reportedAt: string;
334
+ current: boolean;
335
+ }, {
336
+ report: {
337
+ version: 1;
338
+ mode: "tool_polling";
339
+ } | {
340
+ version: 1;
341
+ mode: "runtime_pending";
342
+ boundary: "before_model" | "after_tools";
343
+ evidence: "context_hook" | "provider_payload";
344
+ visibility: "hidden" | "collapsed";
345
+ } | {
346
+ version: 1;
347
+ mode: "runtime_checkpoint";
348
+ boundary: "before_model" | "after_tools";
349
+ evidence: "context_hook" | "provider_payload";
350
+ visibility: "hidden" | "collapsed";
351
+ };
352
+ reportedAt: string;
353
+ current: boolean;
354
+ }>;
355
+ export declare const ProjectCoordinationParams: z.ZodObject<{
356
+ sourceKind: z.ZodEnum<["native", "dev"]>;
357
+ runId: z.ZodEffects<z.ZodString, string, string>;
358
+ workflowId: z.ZodString;
359
+ sessionId: z.ZodString;
360
+ turnId: z.ZodString;
361
+ action: z.ZodEffects<z.ZodDiscriminatedUnion<"operation", [z.ZodObject<{
362
+ operation: z.ZodLiteral<"presence">;
363
+ }, "strict", z.ZodTypeAny, {
364
+ operation: "presence";
365
+ }, {
366
+ operation: "presence";
367
+ }>, z.ZodObject<{
368
+ operation: z.ZodLiteral<"peers">;
369
+ after: z.ZodDefault<z.ZodString>;
370
+ }, "strict", z.ZodTypeAny, {
371
+ operation: "peers";
372
+ after: string;
373
+ }, {
374
+ operation: "peers";
375
+ after?: string | undefined;
376
+ }>, z.ZodObject<{
377
+ operation: z.ZodLiteral<"activity">;
378
+ requestId: z.ZodEffects<z.ZodString, string, string>;
379
+ baseRevision: z.ZodNumber;
380
+ activity: z.ZodEffects<z.ZodObject<{
381
+ summary: z.ZodString;
382
+ phase: z.ZodEnum<["planning", "working", "validating", "blocked", "idle", "completed"]>;
383
+ impact: z.ZodArray<z.ZodString, "many">;
384
+ dependencies: z.ZodDefault<z.ZodString>;
385
+ }, "strict", z.ZodTypeAny, {
386
+ summary: string;
387
+ phase: "blocked" | "idle" | "completed" | "planning" | "working" | "validating";
388
+ impact: string[];
389
+ dependencies: string;
390
+ }, {
391
+ summary: string;
392
+ phase: "blocked" | "idle" | "completed" | "planning" | "working" | "validating";
393
+ impact: string[];
394
+ dependencies?: string | undefined;
395
+ }>, {
396
+ summary: string;
397
+ phase: "blocked" | "idle" | "completed" | "planning" | "working" | "validating";
398
+ impact: string[];
399
+ dependencies: string;
400
+ }, {
401
+ summary: string;
402
+ phase: "blocked" | "idle" | "completed" | "planning" | "working" | "validating";
403
+ impact: string[];
404
+ dependencies?: string | undefined;
405
+ }>;
406
+ }, "strict", z.ZodTypeAny, {
407
+ operation: "activity";
408
+ baseRevision: number;
409
+ requestId: string;
410
+ activity: {
411
+ summary: string;
412
+ phase: "blocked" | "idle" | "completed" | "planning" | "working" | "validating";
413
+ impact: string[];
414
+ dependencies: string;
415
+ };
416
+ }, {
417
+ operation: "activity";
418
+ baseRevision: number;
419
+ requestId: string;
420
+ activity: {
421
+ summary: string;
422
+ phase: "blocked" | "idle" | "completed" | "planning" | "working" | "validating";
423
+ impact: string[];
424
+ dependencies?: string | undefined;
425
+ };
426
+ }>, z.ZodObject<{
427
+ operation: z.ZodLiteral<"send">;
428
+ requestId: z.ZodEffects<z.ZodString, string, string>;
429
+ recipientId: z.ZodEffects<z.ZodString, string, string>;
430
+ kind: z.ZodEnum<["intent", "question", "notice", "request", "result"]>;
431
+ text: z.ZodString;
432
+ references: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
433
+ inReplyTo: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
434
+ }, "strict", z.ZodTypeAny, {
435
+ kind: "result" | "request" | "intent" | "question" | "notice";
436
+ operation: "send";
437
+ text: string;
438
+ requestId: string;
439
+ recipientId: string;
440
+ references: string[];
441
+ inReplyTo?: string | undefined;
442
+ }, {
443
+ kind: "result" | "request" | "intent" | "question" | "notice";
444
+ operation: "send";
445
+ text: string;
446
+ requestId: string;
447
+ recipientId: string;
448
+ references?: string[] | undefined;
449
+ inReplyTo?: string | undefined;
450
+ }>, z.ZodObject<{
451
+ operation: z.ZodLiteral<"inbox">;
452
+ after: z.ZodDefault<z.ZodString>;
453
+ }, "strict", z.ZodTypeAny, {
454
+ operation: "inbox";
455
+ after: string;
456
+ }, {
457
+ operation: "inbox";
458
+ after?: string | undefined;
459
+ }>, z.ZodObject<{
460
+ operation: z.ZodLiteral<"acknowledge">;
461
+ messageIds: z.ZodEffects<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">, string[], string[]>;
462
+ }, "strict", z.ZodTypeAny, {
463
+ operation: "acknowledge";
464
+ messageIds: string[];
465
+ }, {
466
+ operation: "acknowledge";
467
+ messageIds: string[];
468
+ }>, z.ZodObject<{
469
+ operation: z.ZodLiteral<"receipt">;
470
+ requestId: z.ZodEffects<z.ZodString, string, string>;
471
+ }, "strict", z.ZodTypeAny, {
472
+ operation: "receipt";
473
+ requestId: string;
474
+ }, {
475
+ operation: "receipt";
476
+ requestId: string;
477
+ }>, z.ZodObject<{
478
+ operation: z.ZodLiteral<"leave">;
479
+ }, "strict", z.ZodTypeAny, {
480
+ operation: "leave";
481
+ }, {
482
+ operation: "leave";
483
+ }>]>, {
484
+ operation: "presence";
485
+ } | {
486
+ operation: "peers";
487
+ after: string;
488
+ } | {
489
+ operation: "activity";
490
+ baseRevision: number;
491
+ requestId: string;
492
+ activity: {
493
+ summary: string;
494
+ phase: "blocked" | "idle" | "completed" | "planning" | "working" | "validating";
495
+ impact: string[];
496
+ dependencies: string;
497
+ };
498
+ } | {
499
+ kind: "result" | "request" | "intent" | "question" | "notice";
500
+ operation: "send";
501
+ text: string;
502
+ requestId: string;
503
+ recipientId: string;
504
+ references: string[];
505
+ inReplyTo?: string | undefined;
506
+ } | {
507
+ operation: "inbox";
508
+ after: string;
509
+ } | {
510
+ operation: "acknowledge";
511
+ messageIds: string[];
512
+ } | {
513
+ operation: "receipt";
514
+ requestId: string;
515
+ } | {
516
+ operation: "leave";
517
+ }, {
518
+ operation: "presence";
519
+ } | {
520
+ operation: "peers";
521
+ after?: string | undefined;
522
+ } | {
523
+ operation: "activity";
524
+ baseRevision: number;
525
+ requestId: string;
526
+ activity: {
527
+ summary: string;
528
+ phase: "blocked" | "idle" | "completed" | "planning" | "working" | "validating";
529
+ impact: string[];
530
+ dependencies?: string | undefined;
531
+ };
532
+ } | {
533
+ kind: "result" | "request" | "intent" | "question" | "notice";
534
+ operation: "send";
535
+ text: string;
536
+ requestId: string;
537
+ recipientId: string;
538
+ references?: string[] | undefined;
539
+ inReplyTo?: string | undefined;
540
+ } | {
541
+ operation: "inbox";
542
+ after?: string | undefined;
543
+ } | {
544
+ operation: "acknowledge";
545
+ messageIds: string[];
546
+ } | {
547
+ operation: "receipt";
548
+ requestId: string;
549
+ } | {
550
+ operation: "leave";
551
+ }>;
552
+ receive: z.ZodOptional<z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
553
+ version: z.ZodLiteral<1>;
554
+ mode: z.ZodLiteral<"tool_polling">;
555
+ }, "strict", z.ZodTypeAny, {
556
+ version: 1;
557
+ mode: "tool_polling";
558
+ }, {
559
+ version: 1;
560
+ mode: "tool_polling";
561
+ }>, z.ZodObject<{
562
+ version: z.ZodLiteral<1>;
563
+ mode: z.ZodLiteral<"runtime_pending">;
564
+ boundary: z.ZodEnum<["before_model", "after_tools"]>;
565
+ evidence: z.ZodEnum<["context_hook", "provider_payload"]>;
566
+ visibility: z.ZodEnum<["hidden", "collapsed"]>;
567
+ }, "strict", z.ZodTypeAny, {
568
+ version: 1;
569
+ mode: "runtime_pending";
570
+ boundary: "before_model" | "after_tools";
571
+ evidence: "context_hook" | "provider_payload";
572
+ visibility: "hidden" | "collapsed";
573
+ }, {
574
+ version: 1;
575
+ mode: "runtime_pending";
576
+ boundary: "before_model" | "after_tools";
577
+ evidence: "context_hook" | "provider_payload";
578
+ visibility: "hidden" | "collapsed";
579
+ }>, z.ZodObject<{
580
+ version: z.ZodLiteral<1>;
581
+ mode: z.ZodLiteral<"runtime_checkpoint">;
582
+ boundary: z.ZodEnum<["before_model", "after_tools"]>;
583
+ evidence: z.ZodEnum<["context_hook", "provider_payload"]>;
584
+ visibility: z.ZodEnum<["hidden", "collapsed"]>;
585
+ }, "strict", z.ZodTypeAny, {
586
+ version: 1;
587
+ mode: "runtime_checkpoint";
588
+ boundary: "before_model" | "after_tools";
589
+ evidence: "context_hook" | "provider_payload";
590
+ visibility: "hidden" | "collapsed";
591
+ }, {
592
+ version: 1;
593
+ mode: "runtime_checkpoint";
594
+ boundary: "before_model" | "after_tools";
595
+ evidence: "context_hook" | "provider_payload";
596
+ visibility: "hidden" | "collapsed";
597
+ }>]>>;
598
+ evidenceVersion: z.ZodOptional<z.ZodLiteral<1>>;
599
+ workspaceVersion: z.ZodOptional<z.ZodLiteral<1>>;
600
+ }, "strict", z.ZodTypeAny, {
601
+ sessionId: string;
602
+ turnId: string;
603
+ workflowId: string;
604
+ action: {
605
+ operation: "presence";
606
+ } | {
607
+ operation: "peers";
608
+ after: string;
609
+ } | {
610
+ operation: "activity";
611
+ baseRevision: number;
612
+ requestId: string;
613
+ activity: {
614
+ summary: string;
615
+ phase: "blocked" | "idle" | "completed" | "planning" | "working" | "validating";
616
+ impact: string[];
617
+ dependencies: string;
618
+ };
619
+ } | {
620
+ kind: "result" | "request" | "intent" | "question" | "notice";
621
+ operation: "send";
622
+ text: string;
623
+ requestId: string;
624
+ recipientId: string;
625
+ references: string[];
626
+ inReplyTo?: string | undefined;
627
+ } | {
628
+ operation: "inbox";
629
+ after: string;
630
+ } | {
631
+ operation: "acknowledge";
632
+ messageIds: string[];
633
+ } | {
634
+ operation: "receipt";
635
+ requestId: string;
636
+ } | {
637
+ operation: "leave";
638
+ };
639
+ runId: string;
640
+ sourceKind: "native" | "dev";
641
+ receive?: {
642
+ version: 1;
643
+ mode: "tool_polling";
644
+ } | {
645
+ version: 1;
646
+ mode: "runtime_pending";
647
+ boundary: "before_model" | "after_tools";
648
+ evidence: "context_hook" | "provider_payload";
649
+ visibility: "hidden" | "collapsed";
650
+ } | {
651
+ version: 1;
652
+ mode: "runtime_checkpoint";
653
+ boundary: "before_model" | "after_tools";
654
+ evidence: "context_hook" | "provider_payload";
655
+ visibility: "hidden" | "collapsed";
656
+ } | undefined;
657
+ evidenceVersion?: 1 | undefined;
658
+ workspaceVersion?: 1 | undefined;
659
+ }, {
660
+ sessionId: string;
661
+ turnId: string;
662
+ workflowId: string;
663
+ action: {
664
+ operation: "presence";
665
+ } | {
666
+ operation: "peers";
667
+ after?: string | undefined;
668
+ } | {
669
+ operation: "activity";
670
+ baseRevision: number;
671
+ requestId: string;
672
+ activity: {
673
+ summary: string;
674
+ phase: "blocked" | "idle" | "completed" | "planning" | "working" | "validating";
675
+ impact: string[];
676
+ dependencies?: string | undefined;
677
+ };
678
+ } | {
679
+ kind: "result" | "request" | "intent" | "question" | "notice";
680
+ operation: "send";
681
+ text: string;
682
+ requestId: string;
683
+ recipientId: string;
684
+ references?: string[] | undefined;
685
+ inReplyTo?: string | undefined;
686
+ } | {
687
+ operation: "inbox";
688
+ after?: string | undefined;
689
+ } | {
690
+ operation: "acknowledge";
691
+ messageIds: string[];
692
+ } | {
693
+ operation: "receipt";
694
+ requestId: string;
695
+ } | {
696
+ operation: "leave";
697
+ };
698
+ runId: string;
699
+ sourceKind: "native" | "dev";
700
+ receive?: {
701
+ version: 1;
702
+ mode: "tool_polling";
703
+ } | {
704
+ version: 1;
705
+ mode: "runtime_pending";
706
+ boundary: "before_model" | "after_tools";
707
+ evidence: "context_hook" | "provider_payload";
708
+ visibility: "hidden" | "collapsed";
709
+ } | {
710
+ version: 1;
711
+ mode: "runtime_checkpoint";
712
+ boundary: "before_model" | "after_tools";
713
+ evidence: "context_hook" | "provider_payload";
714
+ visibility: "hidden" | "collapsed";
715
+ } | undefined;
716
+ evidenceVersion?: 1 | undefined;
717
+ workspaceVersion?: 1 | undefined;
718
+ }>;
719
+ export type ProjectCoordinationParams = z.infer<typeof ProjectCoordinationParams>;
720
+ export declare const CoordinationWorkspace: z.ZodDiscriminatedUnion<"state", [z.ZodObject<{
721
+ state: z.ZodLiteral<"current">;
722
+ deviceId: z.ZodEffects<z.ZodString, string, string>;
723
+ runtimeWorkspaceId: z.ZodEffects<z.ZodString, string, string>;
724
+ path: z.ZodEffects<z.ZodString, string, string>;
725
+ repositoryRoot: z.ZodEffects<z.ZodString, string, string>;
726
+ branch: z.ZodEffects<z.ZodString, string, string>;
727
+ isWorktree: z.ZodBoolean;
728
+ worktreeId: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
729
+ detached: z.ZodBoolean;
730
+ head: z.ZodOptional<z.ZodString>;
731
+ observedAt: z.ZodString;
732
+ checkedAt: z.ZodString;
733
+ }, "strict", z.ZodTypeAny, {
734
+ path: string;
735
+ state: "current";
736
+ observedAt: string;
737
+ detached: boolean;
738
+ branch: string;
739
+ repositoryRoot: string;
740
+ isWorktree: boolean;
741
+ deviceId: string;
742
+ runtimeWorkspaceId: string;
743
+ checkedAt: string;
744
+ worktreeId?: string | undefined;
745
+ head?: string | undefined;
746
+ }, {
747
+ path: string;
748
+ state: "current";
749
+ observedAt: string;
750
+ detached: boolean;
751
+ branch: string;
752
+ repositoryRoot: string;
753
+ isWorktree: boolean;
754
+ deviceId: string;
755
+ runtimeWorkspaceId: string;
756
+ checkedAt: string;
757
+ worktreeId?: string | undefined;
758
+ head?: string | undefined;
759
+ }>, z.ZodObject<{
760
+ state: z.ZodEnum<["unavailable", "unsupported", "notGit"]>;
761
+ deviceId: z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>;
762
+ checkedAt: z.ZodString;
763
+ reasonCode: z.ZodOptional<z.ZodString>;
764
+ }, "strict", z.ZodTypeAny, {
765
+ state: "unsupported" | "unavailable" | "notGit";
766
+ deviceId: string | null;
767
+ checkedAt: string;
768
+ reasonCode?: string | undefined;
769
+ }, {
770
+ state: "unsupported" | "unavailable" | "notGit";
771
+ deviceId: string | null;
772
+ checkedAt: string;
773
+ reasonCode?: string | undefined;
774
+ }>]>;
775
+ export type CoordinationWorkspace = z.infer<typeof CoordinationWorkspace>;
776
+ export declare const ProjectCoordinationResult: z.ZodObject<{
777
+ self: z.ZodOptional<z.ZodObject<{
778
+ id: z.ZodEffects<z.ZodString, string, string>;
779
+ position: z.ZodString;
780
+ projectId: z.ZodEffects<z.ZodString, string, string>;
781
+ ownerId: z.ZodString;
782
+ deviceId: z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>;
783
+ agentId: z.ZodString;
784
+ agentKind: z.ZodEnum<["agent", "de"]>;
785
+ sourceKind: z.ZodEnum<["native", "dev", "mcp"]>;
786
+ sessionId: z.ZodString;
787
+ label: z.ZodString;
788
+ activity: z.ZodEffects<z.ZodObject<{
789
+ summary: z.ZodString;
790
+ phase: z.ZodEnum<["planning", "working", "validating", "blocked", "idle", "completed"]>;
791
+ impact: z.ZodArray<z.ZodString, "many">;
792
+ dependencies: z.ZodDefault<z.ZodString>;
793
+ }, "strict", z.ZodTypeAny, {
794
+ summary: string;
795
+ phase: "blocked" | "idle" | "completed" | "planning" | "working" | "validating";
796
+ impact: string[];
797
+ dependencies: string;
798
+ }, {
799
+ summary: string;
800
+ phase: "blocked" | "idle" | "completed" | "planning" | "working" | "validating";
801
+ impact: string[];
802
+ dependencies?: string | undefined;
803
+ }>, {
804
+ summary: string;
805
+ phase: "blocked" | "idle" | "completed" | "planning" | "working" | "validating";
806
+ impact: string[];
807
+ dependencies: string;
808
+ }, {
809
+ summary: string;
810
+ phase: "blocked" | "idle" | "completed" | "planning" | "working" | "validating";
811
+ impact: string[];
812
+ dependencies?: string | undefined;
813
+ }>;
814
+ activityRevision: z.ZodNumber;
815
+ lastSeenAt: z.ZodNullable<z.ZodString>;
816
+ deviceName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
817
+ runtimeState: z.ZodOptional<z.ZodNullable<z.ZodString>>;
818
+ receive: z.ZodOptional<z.ZodObject<{
819
+ report: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
820
+ version: z.ZodLiteral<1>;
821
+ mode: z.ZodLiteral<"tool_polling">;
822
+ }, "strict", z.ZodTypeAny, {
823
+ version: 1;
824
+ mode: "tool_polling";
825
+ }, {
826
+ version: 1;
827
+ mode: "tool_polling";
828
+ }>, z.ZodObject<{
829
+ version: z.ZodLiteral<1>;
830
+ mode: z.ZodLiteral<"runtime_pending">;
831
+ boundary: z.ZodEnum<["before_model", "after_tools"]>;
832
+ evidence: z.ZodEnum<["context_hook", "provider_payload"]>;
833
+ visibility: z.ZodEnum<["hidden", "collapsed"]>;
834
+ }, "strict", z.ZodTypeAny, {
835
+ version: 1;
836
+ mode: "runtime_pending";
837
+ boundary: "before_model" | "after_tools";
838
+ evidence: "context_hook" | "provider_payload";
839
+ visibility: "hidden" | "collapsed";
840
+ }, {
841
+ version: 1;
842
+ mode: "runtime_pending";
843
+ boundary: "before_model" | "after_tools";
844
+ evidence: "context_hook" | "provider_payload";
845
+ visibility: "hidden" | "collapsed";
846
+ }>, z.ZodObject<{
847
+ version: z.ZodLiteral<1>;
848
+ mode: z.ZodLiteral<"runtime_checkpoint">;
849
+ boundary: z.ZodEnum<["before_model", "after_tools"]>;
850
+ evidence: z.ZodEnum<["context_hook", "provider_payload"]>;
851
+ visibility: z.ZodEnum<["hidden", "collapsed"]>;
852
+ }, "strict", z.ZodTypeAny, {
853
+ version: 1;
854
+ mode: "runtime_checkpoint";
855
+ boundary: "before_model" | "after_tools";
856
+ evidence: "context_hook" | "provider_payload";
857
+ visibility: "hidden" | "collapsed";
858
+ }, {
859
+ version: 1;
860
+ mode: "runtime_checkpoint";
861
+ boundary: "before_model" | "after_tools";
862
+ evidence: "context_hook" | "provider_payload";
863
+ visibility: "hidden" | "collapsed";
864
+ }>]>;
865
+ reportedAt: z.ZodString;
866
+ current: z.ZodBoolean;
867
+ }, "strict", z.ZodTypeAny, {
868
+ report: {
869
+ version: 1;
870
+ mode: "tool_polling";
871
+ } | {
872
+ version: 1;
873
+ mode: "runtime_pending";
874
+ boundary: "before_model" | "after_tools";
875
+ evidence: "context_hook" | "provider_payload";
876
+ visibility: "hidden" | "collapsed";
877
+ } | {
878
+ version: 1;
879
+ mode: "runtime_checkpoint";
880
+ boundary: "before_model" | "after_tools";
881
+ evidence: "context_hook" | "provider_payload";
882
+ visibility: "hidden" | "collapsed";
883
+ };
884
+ reportedAt: string;
885
+ current: boolean;
886
+ }, {
887
+ report: {
888
+ version: 1;
889
+ mode: "tool_polling";
890
+ } | {
891
+ version: 1;
892
+ mode: "runtime_pending";
893
+ boundary: "before_model" | "after_tools";
894
+ evidence: "context_hook" | "provider_payload";
895
+ visibility: "hidden" | "collapsed";
896
+ } | {
897
+ version: 1;
898
+ mode: "runtime_checkpoint";
899
+ boundary: "before_model" | "after_tools";
900
+ evidence: "context_hook" | "provider_payload";
901
+ visibility: "hidden" | "collapsed";
902
+ };
903
+ reportedAt: string;
904
+ current: boolean;
905
+ }>>;
906
+ workspace: z.ZodOptional<z.ZodDiscriminatedUnion<"state", [z.ZodObject<{
907
+ state: z.ZodLiteral<"current">;
908
+ deviceId: z.ZodEffects<z.ZodString, string, string>;
909
+ runtimeWorkspaceId: z.ZodEffects<z.ZodString, string, string>;
910
+ path: z.ZodEffects<z.ZodString, string, string>;
911
+ repositoryRoot: z.ZodEffects<z.ZodString, string, string>;
912
+ branch: z.ZodEffects<z.ZodString, string, string>;
913
+ isWorktree: z.ZodBoolean;
914
+ worktreeId: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
915
+ detached: z.ZodBoolean;
916
+ head: z.ZodOptional<z.ZodString>;
917
+ observedAt: z.ZodString;
918
+ checkedAt: z.ZodString;
919
+ }, "strict", z.ZodTypeAny, {
920
+ path: string;
921
+ state: "current";
922
+ observedAt: string;
923
+ detached: boolean;
924
+ branch: string;
925
+ repositoryRoot: string;
926
+ isWorktree: boolean;
927
+ deviceId: string;
928
+ runtimeWorkspaceId: string;
929
+ checkedAt: string;
930
+ worktreeId?: string | undefined;
931
+ head?: string | undefined;
932
+ }, {
933
+ path: string;
934
+ state: "current";
935
+ observedAt: string;
936
+ detached: boolean;
937
+ branch: string;
938
+ repositoryRoot: string;
939
+ isWorktree: boolean;
940
+ deviceId: string;
941
+ runtimeWorkspaceId: string;
942
+ checkedAt: string;
943
+ worktreeId?: string | undefined;
944
+ head?: string | undefined;
945
+ }>, z.ZodObject<{
946
+ state: z.ZodEnum<["unavailable", "unsupported", "notGit"]>;
947
+ deviceId: z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>;
948
+ checkedAt: z.ZodString;
949
+ reasonCode: z.ZodOptional<z.ZodString>;
950
+ }, "strict", z.ZodTypeAny, {
951
+ state: "unsupported" | "unavailable" | "notGit";
952
+ deviceId: string | null;
953
+ checkedAt: string;
954
+ reasonCode?: string | undefined;
955
+ }, {
956
+ state: "unsupported" | "unavailable" | "notGit";
957
+ deviceId: string | null;
958
+ checkedAt: string;
959
+ reasonCode?: string | undefined;
960
+ }>]>>;
961
+ presence: z.ZodEnum<["active", "stale", "offline", "ended"]>;
962
+ }, "strict", z.ZodTypeAny, {
963
+ sessionId: string;
964
+ agentId: string;
965
+ id: string;
966
+ projectId: string;
967
+ label: string;
968
+ deviceId: string | null;
969
+ presence: "active" | "offline" | "stale" | "ended";
970
+ activity: {
971
+ summary: string;
972
+ phase: "blocked" | "idle" | "completed" | "planning" | "working" | "validating";
973
+ impact: string[];
974
+ dependencies: string;
975
+ };
976
+ sourceKind: "native" | "dev" | "mcp";
977
+ position: string;
978
+ ownerId: string;
979
+ agentKind: "agent" | "de";
980
+ activityRevision: number;
981
+ lastSeenAt: string | null;
982
+ workspace?: {
983
+ path: string;
984
+ state: "current";
985
+ observedAt: string;
986
+ detached: boolean;
987
+ branch: string;
988
+ repositoryRoot: string;
989
+ isWorktree: boolean;
990
+ deviceId: string;
991
+ runtimeWorkspaceId: string;
992
+ checkedAt: string;
993
+ worktreeId?: string | undefined;
994
+ head?: string | undefined;
995
+ } | {
996
+ state: "unsupported" | "unavailable" | "notGit";
997
+ deviceId: string | null;
998
+ checkedAt: string;
999
+ reasonCode?: string | undefined;
1000
+ } | undefined;
1001
+ receive?: {
1002
+ report: {
1003
+ version: 1;
1004
+ mode: "tool_polling";
1005
+ } | {
1006
+ version: 1;
1007
+ mode: "runtime_pending";
1008
+ boundary: "before_model" | "after_tools";
1009
+ evidence: "context_hook" | "provider_payload";
1010
+ visibility: "hidden" | "collapsed";
1011
+ } | {
1012
+ version: 1;
1013
+ mode: "runtime_checkpoint";
1014
+ boundary: "before_model" | "after_tools";
1015
+ evidence: "context_hook" | "provider_payload";
1016
+ visibility: "hidden" | "collapsed";
1017
+ };
1018
+ reportedAt: string;
1019
+ current: boolean;
1020
+ } | undefined;
1021
+ deviceName?: string | null | undefined;
1022
+ runtimeState?: string | null | undefined;
1023
+ }, {
1024
+ sessionId: string;
1025
+ agentId: string;
1026
+ id: string;
1027
+ projectId: string;
1028
+ label: string;
1029
+ deviceId: string | null;
1030
+ presence: "active" | "offline" | "stale" | "ended";
1031
+ activity: {
1032
+ summary: string;
1033
+ phase: "blocked" | "idle" | "completed" | "planning" | "working" | "validating";
1034
+ impact: string[];
1035
+ dependencies?: string | undefined;
1036
+ };
1037
+ sourceKind: "native" | "dev" | "mcp";
1038
+ position: string;
1039
+ ownerId: string;
1040
+ agentKind: "agent" | "de";
1041
+ activityRevision: number;
1042
+ lastSeenAt: string | null;
1043
+ workspace?: {
1044
+ path: string;
1045
+ state: "current";
1046
+ observedAt: string;
1047
+ detached: boolean;
1048
+ branch: string;
1049
+ repositoryRoot: string;
1050
+ isWorktree: boolean;
1051
+ deviceId: string;
1052
+ runtimeWorkspaceId: string;
1053
+ checkedAt: string;
1054
+ worktreeId?: string | undefined;
1055
+ head?: string | undefined;
1056
+ } | {
1057
+ state: "unsupported" | "unavailable" | "notGit";
1058
+ deviceId: string | null;
1059
+ checkedAt: string;
1060
+ reasonCode?: string | undefined;
1061
+ } | undefined;
1062
+ receive?: {
1063
+ report: {
1064
+ version: 1;
1065
+ mode: "tool_polling";
1066
+ } | {
1067
+ version: 1;
1068
+ mode: "runtime_pending";
1069
+ boundary: "before_model" | "after_tools";
1070
+ evidence: "context_hook" | "provider_payload";
1071
+ visibility: "hidden" | "collapsed";
1072
+ } | {
1073
+ version: 1;
1074
+ mode: "runtime_checkpoint";
1075
+ boundary: "before_model" | "after_tools";
1076
+ evidence: "context_hook" | "provider_payload";
1077
+ visibility: "hidden" | "collapsed";
1078
+ };
1079
+ reportedAt: string;
1080
+ current: boolean;
1081
+ } | undefined;
1082
+ deviceName?: string | null | undefined;
1083
+ runtimeState?: string | null | undefined;
1084
+ }>>;
1085
+ participants: z.ZodOptional<z.ZodArray<z.ZodObject<{
1086
+ id: z.ZodEffects<z.ZodString, string, string>;
1087
+ position: z.ZodString;
1088
+ projectId: z.ZodEffects<z.ZodString, string, string>;
1089
+ ownerId: z.ZodString;
1090
+ deviceId: z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>;
1091
+ agentId: z.ZodString;
1092
+ agentKind: z.ZodEnum<["agent", "de"]>;
1093
+ sourceKind: z.ZodEnum<["native", "dev", "mcp"]>;
1094
+ sessionId: z.ZodString;
1095
+ label: z.ZodString;
1096
+ activity: z.ZodEffects<z.ZodObject<{
1097
+ summary: z.ZodString;
1098
+ phase: z.ZodEnum<["planning", "working", "validating", "blocked", "idle", "completed"]>;
1099
+ impact: z.ZodArray<z.ZodString, "many">;
1100
+ dependencies: z.ZodDefault<z.ZodString>;
1101
+ }, "strict", z.ZodTypeAny, {
1102
+ summary: string;
1103
+ phase: "blocked" | "idle" | "completed" | "planning" | "working" | "validating";
1104
+ impact: string[];
1105
+ dependencies: string;
1106
+ }, {
1107
+ summary: string;
1108
+ phase: "blocked" | "idle" | "completed" | "planning" | "working" | "validating";
1109
+ impact: string[];
1110
+ dependencies?: string | undefined;
1111
+ }>, {
1112
+ summary: string;
1113
+ phase: "blocked" | "idle" | "completed" | "planning" | "working" | "validating";
1114
+ impact: string[];
1115
+ dependencies: string;
1116
+ }, {
1117
+ summary: string;
1118
+ phase: "blocked" | "idle" | "completed" | "planning" | "working" | "validating";
1119
+ impact: string[];
1120
+ dependencies?: string | undefined;
1121
+ }>;
1122
+ activityRevision: z.ZodNumber;
1123
+ lastSeenAt: z.ZodNullable<z.ZodString>;
1124
+ deviceName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1125
+ runtimeState: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1126
+ receive: z.ZodOptional<z.ZodObject<{
1127
+ report: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
1128
+ version: z.ZodLiteral<1>;
1129
+ mode: z.ZodLiteral<"tool_polling">;
1130
+ }, "strict", z.ZodTypeAny, {
1131
+ version: 1;
1132
+ mode: "tool_polling";
1133
+ }, {
1134
+ version: 1;
1135
+ mode: "tool_polling";
1136
+ }>, z.ZodObject<{
1137
+ version: z.ZodLiteral<1>;
1138
+ mode: z.ZodLiteral<"runtime_pending">;
1139
+ boundary: z.ZodEnum<["before_model", "after_tools"]>;
1140
+ evidence: z.ZodEnum<["context_hook", "provider_payload"]>;
1141
+ visibility: z.ZodEnum<["hidden", "collapsed"]>;
1142
+ }, "strict", z.ZodTypeAny, {
1143
+ version: 1;
1144
+ mode: "runtime_pending";
1145
+ boundary: "before_model" | "after_tools";
1146
+ evidence: "context_hook" | "provider_payload";
1147
+ visibility: "hidden" | "collapsed";
1148
+ }, {
1149
+ version: 1;
1150
+ mode: "runtime_pending";
1151
+ boundary: "before_model" | "after_tools";
1152
+ evidence: "context_hook" | "provider_payload";
1153
+ visibility: "hidden" | "collapsed";
1154
+ }>, z.ZodObject<{
1155
+ version: z.ZodLiteral<1>;
1156
+ mode: z.ZodLiteral<"runtime_checkpoint">;
1157
+ boundary: z.ZodEnum<["before_model", "after_tools"]>;
1158
+ evidence: z.ZodEnum<["context_hook", "provider_payload"]>;
1159
+ visibility: z.ZodEnum<["hidden", "collapsed"]>;
1160
+ }, "strict", z.ZodTypeAny, {
1161
+ version: 1;
1162
+ mode: "runtime_checkpoint";
1163
+ boundary: "before_model" | "after_tools";
1164
+ evidence: "context_hook" | "provider_payload";
1165
+ visibility: "hidden" | "collapsed";
1166
+ }, {
1167
+ version: 1;
1168
+ mode: "runtime_checkpoint";
1169
+ boundary: "before_model" | "after_tools";
1170
+ evidence: "context_hook" | "provider_payload";
1171
+ visibility: "hidden" | "collapsed";
1172
+ }>]>;
1173
+ reportedAt: z.ZodString;
1174
+ current: z.ZodBoolean;
1175
+ }, "strict", z.ZodTypeAny, {
1176
+ report: {
1177
+ version: 1;
1178
+ mode: "tool_polling";
1179
+ } | {
1180
+ version: 1;
1181
+ mode: "runtime_pending";
1182
+ boundary: "before_model" | "after_tools";
1183
+ evidence: "context_hook" | "provider_payload";
1184
+ visibility: "hidden" | "collapsed";
1185
+ } | {
1186
+ version: 1;
1187
+ mode: "runtime_checkpoint";
1188
+ boundary: "before_model" | "after_tools";
1189
+ evidence: "context_hook" | "provider_payload";
1190
+ visibility: "hidden" | "collapsed";
1191
+ };
1192
+ reportedAt: string;
1193
+ current: boolean;
1194
+ }, {
1195
+ report: {
1196
+ version: 1;
1197
+ mode: "tool_polling";
1198
+ } | {
1199
+ version: 1;
1200
+ mode: "runtime_pending";
1201
+ boundary: "before_model" | "after_tools";
1202
+ evidence: "context_hook" | "provider_payload";
1203
+ visibility: "hidden" | "collapsed";
1204
+ } | {
1205
+ version: 1;
1206
+ mode: "runtime_checkpoint";
1207
+ boundary: "before_model" | "after_tools";
1208
+ evidence: "context_hook" | "provider_payload";
1209
+ visibility: "hidden" | "collapsed";
1210
+ };
1211
+ reportedAt: string;
1212
+ current: boolean;
1213
+ }>>;
1214
+ workspace: z.ZodOptional<z.ZodDiscriminatedUnion<"state", [z.ZodObject<{
1215
+ state: z.ZodLiteral<"current">;
1216
+ deviceId: z.ZodEffects<z.ZodString, string, string>;
1217
+ runtimeWorkspaceId: z.ZodEffects<z.ZodString, string, string>;
1218
+ path: z.ZodEffects<z.ZodString, string, string>;
1219
+ repositoryRoot: z.ZodEffects<z.ZodString, string, string>;
1220
+ branch: z.ZodEffects<z.ZodString, string, string>;
1221
+ isWorktree: z.ZodBoolean;
1222
+ worktreeId: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1223
+ detached: z.ZodBoolean;
1224
+ head: z.ZodOptional<z.ZodString>;
1225
+ observedAt: z.ZodString;
1226
+ checkedAt: z.ZodString;
1227
+ }, "strict", z.ZodTypeAny, {
1228
+ path: string;
1229
+ state: "current";
1230
+ observedAt: string;
1231
+ detached: boolean;
1232
+ branch: string;
1233
+ repositoryRoot: string;
1234
+ isWorktree: boolean;
1235
+ deviceId: string;
1236
+ runtimeWorkspaceId: string;
1237
+ checkedAt: string;
1238
+ worktreeId?: string | undefined;
1239
+ head?: string | undefined;
1240
+ }, {
1241
+ path: string;
1242
+ state: "current";
1243
+ observedAt: string;
1244
+ detached: boolean;
1245
+ branch: string;
1246
+ repositoryRoot: string;
1247
+ isWorktree: boolean;
1248
+ deviceId: string;
1249
+ runtimeWorkspaceId: string;
1250
+ checkedAt: string;
1251
+ worktreeId?: string | undefined;
1252
+ head?: string | undefined;
1253
+ }>, z.ZodObject<{
1254
+ state: z.ZodEnum<["unavailable", "unsupported", "notGit"]>;
1255
+ deviceId: z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>;
1256
+ checkedAt: z.ZodString;
1257
+ reasonCode: z.ZodOptional<z.ZodString>;
1258
+ }, "strict", z.ZodTypeAny, {
1259
+ state: "unsupported" | "unavailable" | "notGit";
1260
+ deviceId: string | null;
1261
+ checkedAt: string;
1262
+ reasonCode?: string | undefined;
1263
+ }, {
1264
+ state: "unsupported" | "unavailable" | "notGit";
1265
+ deviceId: string | null;
1266
+ checkedAt: string;
1267
+ reasonCode?: string | undefined;
1268
+ }>]>>;
1269
+ presence: z.ZodEnum<["active", "stale", "offline", "ended"]>;
1270
+ }, "strict", z.ZodTypeAny, {
1271
+ sessionId: string;
1272
+ agentId: string;
1273
+ id: string;
1274
+ projectId: string;
1275
+ label: string;
1276
+ deviceId: string | null;
1277
+ presence: "active" | "offline" | "stale" | "ended";
1278
+ activity: {
1279
+ summary: string;
1280
+ phase: "blocked" | "idle" | "completed" | "planning" | "working" | "validating";
1281
+ impact: string[];
1282
+ dependencies: string;
1283
+ };
1284
+ sourceKind: "native" | "dev" | "mcp";
1285
+ position: string;
1286
+ ownerId: string;
1287
+ agentKind: "agent" | "de";
1288
+ activityRevision: number;
1289
+ lastSeenAt: string | null;
1290
+ workspace?: {
1291
+ path: string;
1292
+ state: "current";
1293
+ observedAt: string;
1294
+ detached: boolean;
1295
+ branch: string;
1296
+ repositoryRoot: string;
1297
+ isWorktree: boolean;
1298
+ deviceId: string;
1299
+ runtimeWorkspaceId: string;
1300
+ checkedAt: string;
1301
+ worktreeId?: string | undefined;
1302
+ head?: string | undefined;
1303
+ } | {
1304
+ state: "unsupported" | "unavailable" | "notGit";
1305
+ deviceId: string | null;
1306
+ checkedAt: string;
1307
+ reasonCode?: string | undefined;
1308
+ } | undefined;
1309
+ receive?: {
1310
+ report: {
1311
+ version: 1;
1312
+ mode: "tool_polling";
1313
+ } | {
1314
+ version: 1;
1315
+ mode: "runtime_pending";
1316
+ boundary: "before_model" | "after_tools";
1317
+ evidence: "context_hook" | "provider_payload";
1318
+ visibility: "hidden" | "collapsed";
1319
+ } | {
1320
+ version: 1;
1321
+ mode: "runtime_checkpoint";
1322
+ boundary: "before_model" | "after_tools";
1323
+ evidence: "context_hook" | "provider_payload";
1324
+ visibility: "hidden" | "collapsed";
1325
+ };
1326
+ reportedAt: string;
1327
+ current: boolean;
1328
+ } | undefined;
1329
+ deviceName?: string | null | undefined;
1330
+ runtimeState?: string | null | undefined;
1331
+ }, {
1332
+ sessionId: string;
1333
+ agentId: string;
1334
+ id: string;
1335
+ projectId: string;
1336
+ label: string;
1337
+ deviceId: string | null;
1338
+ presence: "active" | "offline" | "stale" | "ended";
1339
+ activity: {
1340
+ summary: string;
1341
+ phase: "blocked" | "idle" | "completed" | "planning" | "working" | "validating";
1342
+ impact: string[];
1343
+ dependencies?: string | undefined;
1344
+ };
1345
+ sourceKind: "native" | "dev" | "mcp";
1346
+ position: string;
1347
+ ownerId: string;
1348
+ agentKind: "agent" | "de";
1349
+ activityRevision: number;
1350
+ lastSeenAt: string | null;
1351
+ workspace?: {
1352
+ path: string;
1353
+ state: "current";
1354
+ observedAt: string;
1355
+ detached: boolean;
1356
+ branch: string;
1357
+ repositoryRoot: string;
1358
+ isWorktree: boolean;
1359
+ deviceId: string;
1360
+ runtimeWorkspaceId: string;
1361
+ checkedAt: string;
1362
+ worktreeId?: string | undefined;
1363
+ head?: string | undefined;
1364
+ } | {
1365
+ state: "unsupported" | "unavailable" | "notGit";
1366
+ deviceId: string | null;
1367
+ checkedAt: string;
1368
+ reasonCode?: string | undefined;
1369
+ } | undefined;
1370
+ receive?: {
1371
+ report: {
1372
+ version: 1;
1373
+ mode: "tool_polling";
1374
+ } | {
1375
+ version: 1;
1376
+ mode: "runtime_pending";
1377
+ boundary: "before_model" | "after_tools";
1378
+ evidence: "context_hook" | "provider_payload";
1379
+ visibility: "hidden" | "collapsed";
1380
+ } | {
1381
+ version: 1;
1382
+ mode: "runtime_checkpoint";
1383
+ boundary: "before_model" | "after_tools";
1384
+ evidence: "context_hook" | "provider_payload";
1385
+ visibility: "hidden" | "collapsed";
1386
+ };
1387
+ reportedAt: string;
1388
+ current: boolean;
1389
+ } | undefined;
1390
+ deviceName?: string | null | undefined;
1391
+ runtimeState?: string | null | undefined;
1392
+ }>, "many">>;
1393
+ receiveReporting: z.ZodOptional<z.ZodLiteral<1>>;
1394
+ evidenceVersion: z.ZodOptional<z.ZodLiteral<1>>;
1395
+ workspaceVersion: z.ZodOptional<z.ZodLiteral<1>>;
1396
+ deliveryOffers: z.ZodOptional<z.ZodArray<z.ZodObject<{
1397
+ messageId: z.ZodEffects<z.ZodString, string, string>;
1398
+ deliveryId: z.ZodEffects<z.ZodString, string, string>;
1399
+ }, "strict", z.ZodTypeAny, {
1400
+ messageId: string;
1401
+ deliveryId: string;
1402
+ }, {
1403
+ messageId: string;
1404
+ deliveryId: string;
1405
+ }>, "many">>;
1406
+ messages: z.ZodOptional<z.ZodArray<z.ZodObject<{
1407
+ id: z.ZodEffects<z.ZodString, string, string>;
1408
+ position: z.ZodString;
1409
+ senderId: z.ZodEffects<z.ZodString, string, string>;
1410
+ recipientId: z.ZodEffects<z.ZodString, string, string>;
1411
+ kind: z.ZodEnum<["intent", "question", "notice", "request", "result"]>;
1412
+ text: z.ZodString;
1413
+ references: z.ZodArray<z.ZodString, "many">;
1414
+ inReplyTo: z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>;
1415
+ depth: z.ZodNumber;
1416
+ createdAt: z.ZodNullable<z.ZodString>;
1417
+ expiresAt: z.ZodNullable<z.ZodString>;
1418
+ state: z.ZodEnum<["stored", "received", "withdrawn", "expired"]>;
1419
+ receivedAt: z.ZodNullable<z.ZodString>;
1420
+ contentAvailable: z.ZodOptional<z.ZodBoolean>;
1421
+ }, "strict", z.ZodTypeAny, {
1422
+ id: string;
1423
+ kind: "result" | "request" | "intent" | "question" | "notice";
1424
+ state: "received" | "stored" | "withdrawn" | "expired";
1425
+ createdAt: string | null;
1426
+ text: string;
1427
+ expiresAt: string | null;
1428
+ depth: number;
1429
+ recipientId: string;
1430
+ references: string[];
1431
+ inReplyTo: string | null;
1432
+ position: string;
1433
+ senderId: string;
1434
+ receivedAt: string | null;
1435
+ contentAvailable?: boolean | undefined;
1436
+ }, {
1437
+ id: string;
1438
+ kind: "result" | "request" | "intent" | "question" | "notice";
1439
+ state: "received" | "stored" | "withdrawn" | "expired";
1440
+ createdAt: string | null;
1441
+ text: string;
1442
+ expiresAt: string | null;
1443
+ depth: number;
1444
+ recipientId: string;
1445
+ references: string[];
1446
+ inReplyTo: string | null;
1447
+ position: string;
1448
+ senderId: string;
1449
+ receivedAt: string | null;
1450
+ contentAvailable?: boolean | undefined;
1451
+ }>, "many">>;
1452
+ message: z.ZodOptional<z.ZodObject<{
1453
+ id: z.ZodEffects<z.ZodString, string, string>;
1454
+ position: z.ZodString;
1455
+ senderId: z.ZodEffects<z.ZodString, string, string>;
1456
+ recipientId: z.ZodEffects<z.ZodString, string, string>;
1457
+ kind: z.ZodEnum<["intent", "question", "notice", "request", "result"]>;
1458
+ text: z.ZodString;
1459
+ references: z.ZodArray<z.ZodString, "many">;
1460
+ inReplyTo: z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>;
1461
+ depth: z.ZodNumber;
1462
+ createdAt: z.ZodNullable<z.ZodString>;
1463
+ expiresAt: z.ZodNullable<z.ZodString>;
1464
+ state: z.ZodEnum<["stored", "received", "withdrawn", "expired"]>;
1465
+ receivedAt: z.ZodNullable<z.ZodString>;
1466
+ contentAvailable: z.ZodOptional<z.ZodBoolean>;
1467
+ }, "strict", z.ZodTypeAny, {
1468
+ id: string;
1469
+ kind: "result" | "request" | "intent" | "question" | "notice";
1470
+ state: "received" | "stored" | "withdrawn" | "expired";
1471
+ createdAt: string | null;
1472
+ text: string;
1473
+ expiresAt: string | null;
1474
+ depth: number;
1475
+ recipientId: string;
1476
+ references: string[];
1477
+ inReplyTo: string | null;
1478
+ position: string;
1479
+ senderId: string;
1480
+ receivedAt: string | null;
1481
+ contentAvailable?: boolean | undefined;
1482
+ }, {
1483
+ id: string;
1484
+ kind: "result" | "request" | "intent" | "question" | "notice";
1485
+ state: "received" | "stored" | "withdrawn" | "expired";
1486
+ createdAt: string | null;
1487
+ text: string;
1488
+ expiresAt: string | null;
1489
+ depth: number;
1490
+ recipientId: string;
1491
+ references: string[];
1492
+ inReplyTo: string | null;
1493
+ position: string;
1494
+ senderId: string;
1495
+ receivedAt: string | null;
1496
+ contentAvailable?: boolean | undefined;
1497
+ }>>;
1498
+ next: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1499
+ status: z.ZodOptional<z.ZodEnum<["recorded", "not_found", "left"]>>;
1500
+ requestId: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1501
+ participantId: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1502
+ replayed: z.ZodOptional<z.ZodBoolean>;
1503
+ }, "strict", z.ZodTypeAny, {
1504
+ message?: {
1505
+ id: string;
1506
+ kind: "result" | "request" | "intent" | "question" | "notice";
1507
+ state: "received" | "stored" | "withdrawn" | "expired";
1508
+ createdAt: string | null;
1509
+ text: string;
1510
+ expiresAt: string | null;
1511
+ depth: number;
1512
+ recipientId: string;
1513
+ references: string[];
1514
+ inReplyTo: string | null;
1515
+ position: string;
1516
+ senderId: string;
1517
+ receivedAt: string | null;
1518
+ contentAvailable?: boolean | undefined;
1519
+ } | undefined;
1520
+ status?: "not_found" | "recorded" | "left" | undefined;
1521
+ messages?: {
1522
+ id: string;
1523
+ kind: "result" | "request" | "intent" | "question" | "notice";
1524
+ state: "received" | "stored" | "withdrawn" | "expired";
1525
+ createdAt: string | null;
1526
+ text: string;
1527
+ expiresAt: string | null;
1528
+ depth: number;
1529
+ recipientId: string;
1530
+ references: string[];
1531
+ inReplyTo: string | null;
1532
+ position: string;
1533
+ senderId: string;
1534
+ receivedAt: string | null;
1535
+ contentAvailable?: boolean | undefined;
1536
+ }[] | undefined;
1537
+ replayed?: boolean | undefined;
1538
+ requestId?: string | undefined;
1539
+ participants?: {
1540
+ sessionId: string;
1541
+ agentId: string;
1542
+ id: string;
1543
+ projectId: string;
1544
+ label: string;
1545
+ deviceId: string | null;
1546
+ presence: "active" | "offline" | "stale" | "ended";
1547
+ activity: {
1548
+ summary: string;
1549
+ phase: "blocked" | "idle" | "completed" | "planning" | "working" | "validating";
1550
+ impact: string[];
1551
+ dependencies: string;
1552
+ };
1553
+ sourceKind: "native" | "dev" | "mcp";
1554
+ position: string;
1555
+ ownerId: string;
1556
+ agentKind: "agent" | "de";
1557
+ activityRevision: number;
1558
+ lastSeenAt: string | null;
1559
+ workspace?: {
1560
+ path: string;
1561
+ state: "current";
1562
+ observedAt: string;
1563
+ detached: boolean;
1564
+ branch: string;
1565
+ repositoryRoot: string;
1566
+ isWorktree: boolean;
1567
+ deviceId: string;
1568
+ runtimeWorkspaceId: string;
1569
+ checkedAt: string;
1570
+ worktreeId?: string | undefined;
1571
+ head?: string | undefined;
1572
+ } | {
1573
+ state: "unsupported" | "unavailable" | "notGit";
1574
+ deviceId: string | null;
1575
+ checkedAt: string;
1576
+ reasonCode?: string | undefined;
1577
+ } | undefined;
1578
+ receive?: {
1579
+ report: {
1580
+ version: 1;
1581
+ mode: "tool_polling";
1582
+ } | {
1583
+ version: 1;
1584
+ mode: "runtime_pending";
1585
+ boundary: "before_model" | "after_tools";
1586
+ evidence: "context_hook" | "provider_payload";
1587
+ visibility: "hidden" | "collapsed";
1588
+ } | {
1589
+ version: 1;
1590
+ mode: "runtime_checkpoint";
1591
+ boundary: "before_model" | "after_tools";
1592
+ evidence: "context_hook" | "provider_payload";
1593
+ visibility: "hidden" | "collapsed";
1594
+ };
1595
+ reportedAt: string;
1596
+ current: boolean;
1597
+ } | undefined;
1598
+ deviceName?: string | null | undefined;
1599
+ runtimeState?: string | null | undefined;
1600
+ }[] | undefined;
1601
+ evidenceVersion?: 1 | undefined;
1602
+ workspaceVersion?: 1 | undefined;
1603
+ self?: {
1604
+ sessionId: string;
1605
+ agentId: string;
1606
+ id: string;
1607
+ projectId: string;
1608
+ label: string;
1609
+ deviceId: string | null;
1610
+ presence: "active" | "offline" | "stale" | "ended";
1611
+ activity: {
1612
+ summary: string;
1613
+ phase: "blocked" | "idle" | "completed" | "planning" | "working" | "validating";
1614
+ impact: string[];
1615
+ dependencies: string;
1616
+ };
1617
+ sourceKind: "native" | "dev" | "mcp";
1618
+ position: string;
1619
+ ownerId: string;
1620
+ agentKind: "agent" | "de";
1621
+ activityRevision: number;
1622
+ lastSeenAt: string | null;
1623
+ workspace?: {
1624
+ path: string;
1625
+ state: "current";
1626
+ observedAt: string;
1627
+ detached: boolean;
1628
+ branch: string;
1629
+ repositoryRoot: string;
1630
+ isWorktree: boolean;
1631
+ deviceId: string;
1632
+ runtimeWorkspaceId: string;
1633
+ checkedAt: string;
1634
+ worktreeId?: string | undefined;
1635
+ head?: string | undefined;
1636
+ } | {
1637
+ state: "unsupported" | "unavailable" | "notGit";
1638
+ deviceId: string | null;
1639
+ checkedAt: string;
1640
+ reasonCode?: string | undefined;
1641
+ } | undefined;
1642
+ receive?: {
1643
+ report: {
1644
+ version: 1;
1645
+ mode: "tool_polling";
1646
+ } | {
1647
+ version: 1;
1648
+ mode: "runtime_pending";
1649
+ boundary: "before_model" | "after_tools";
1650
+ evidence: "context_hook" | "provider_payload";
1651
+ visibility: "hidden" | "collapsed";
1652
+ } | {
1653
+ version: 1;
1654
+ mode: "runtime_checkpoint";
1655
+ boundary: "before_model" | "after_tools";
1656
+ evidence: "context_hook" | "provider_payload";
1657
+ visibility: "hidden" | "collapsed";
1658
+ };
1659
+ reportedAt: string;
1660
+ current: boolean;
1661
+ } | undefined;
1662
+ deviceName?: string | null | undefined;
1663
+ runtimeState?: string | null | undefined;
1664
+ } | undefined;
1665
+ receiveReporting?: 1 | undefined;
1666
+ deliveryOffers?: {
1667
+ messageId: string;
1668
+ deliveryId: string;
1669
+ }[] | undefined;
1670
+ next?: string | null | undefined;
1671
+ participantId?: string | undefined;
1672
+ }, {
1673
+ message?: {
1674
+ id: string;
1675
+ kind: "result" | "request" | "intent" | "question" | "notice";
1676
+ state: "received" | "stored" | "withdrawn" | "expired";
1677
+ createdAt: string | null;
1678
+ text: string;
1679
+ expiresAt: string | null;
1680
+ depth: number;
1681
+ recipientId: string;
1682
+ references: string[];
1683
+ inReplyTo: string | null;
1684
+ position: string;
1685
+ senderId: string;
1686
+ receivedAt: string | null;
1687
+ contentAvailable?: boolean | undefined;
1688
+ } | undefined;
1689
+ status?: "not_found" | "recorded" | "left" | undefined;
1690
+ messages?: {
1691
+ id: string;
1692
+ kind: "result" | "request" | "intent" | "question" | "notice";
1693
+ state: "received" | "stored" | "withdrawn" | "expired";
1694
+ createdAt: string | null;
1695
+ text: string;
1696
+ expiresAt: string | null;
1697
+ depth: number;
1698
+ recipientId: string;
1699
+ references: string[];
1700
+ inReplyTo: string | null;
1701
+ position: string;
1702
+ senderId: string;
1703
+ receivedAt: string | null;
1704
+ contentAvailable?: boolean | undefined;
1705
+ }[] | undefined;
1706
+ replayed?: boolean | undefined;
1707
+ requestId?: string | undefined;
1708
+ participants?: {
1709
+ sessionId: string;
1710
+ agentId: string;
1711
+ id: string;
1712
+ projectId: string;
1713
+ label: string;
1714
+ deviceId: string | null;
1715
+ presence: "active" | "offline" | "stale" | "ended";
1716
+ activity: {
1717
+ summary: string;
1718
+ phase: "blocked" | "idle" | "completed" | "planning" | "working" | "validating";
1719
+ impact: string[];
1720
+ dependencies?: string | undefined;
1721
+ };
1722
+ sourceKind: "native" | "dev" | "mcp";
1723
+ position: string;
1724
+ ownerId: string;
1725
+ agentKind: "agent" | "de";
1726
+ activityRevision: number;
1727
+ lastSeenAt: string | null;
1728
+ workspace?: {
1729
+ path: string;
1730
+ state: "current";
1731
+ observedAt: string;
1732
+ detached: boolean;
1733
+ branch: string;
1734
+ repositoryRoot: string;
1735
+ isWorktree: boolean;
1736
+ deviceId: string;
1737
+ runtimeWorkspaceId: string;
1738
+ checkedAt: string;
1739
+ worktreeId?: string | undefined;
1740
+ head?: string | undefined;
1741
+ } | {
1742
+ state: "unsupported" | "unavailable" | "notGit";
1743
+ deviceId: string | null;
1744
+ checkedAt: string;
1745
+ reasonCode?: string | undefined;
1746
+ } | undefined;
1747
+ receive?: {
1748
+ report: {
1749
+ version: 1;
1750
+ mode: "tool_polling";
1751
+ } | {
1752
+ version: 1;
1753
+ mode: "runtime_pending";
1754
+ boundary: "before_model" | "after_tools";
1755
+ evidence: "context_hook" | "provider_payload";
1756
+ visibility: "hidden" | "collapsed";
1757
+ } | {
1758
+ version: 1;
1759
+ mode: "runtime_checkpoint";
1760
+ boundary: "before_model" | "after_tools";
1761
+ evidence: "context_hook" | "provider_payload";
1762
+ visibility: "hidden" | "collapsed";
1763
+ };
1764
+ reportedAt: string;
1765
+ current: boolean;
1766
+ } | undefined;
1767
+ deviceName?: string | null | undefined;
1768
+ runtimeState?: string | null | undefined;
1769
+ }[] | undefined;
1770
+ evidenceVersion?: 1 | undefined;
1771
+ workspaceVersion?: 1 | undefined;
1772
+ self?: {
1773
+ sessionId: string;
1774
+ agentId: string;
1775
+ id: string;
1776
+ projectId: string;
1777
+ label: string;
1778
+ deviceId: string | null;
1779
+ presence: "active" | "offline" | "stale" | "ended";
1780
+ activity: {
1781
+ summary: string;
1782
+ phase: "blocked" | "idle" | "completed" | "planning" | "working" | "validating";
1783
+ impact: string[];
1784
+ dependencies?: string | undefined;
1785
+ };
1786
+ sourceKind: "native" | "dev" | "mcp";
1787
+ position: string;
1788
+ ownerId: string;
1789
+ agentKind: "agent" | "de";
1790
+ activityRevision: number;
1791
+ lastSeenAt: string | null;
1792
+ workspace?: {
1793
+ path: string;
1794
+ state: "current";
1795
+ observedAt: string;
1796
+ detached: boolean;
1797
+ branch: string;
1798
+ repositoryRoot: string;
1799
+ isWorktree: boolean;
1800
+ deviceId: string;
1801
+ runtimeWorkspaceId: string;
1802
+ checkedAt: string;
1803
+ worktreeId?: string | undefined;
1804
+ head?: string | undefined;
1805
+ } | {
1806
+ state: "unsupported" | "unavailable" | "notGit";
1807
+ deviceId: string | null;
1808
+ checkedAt: string;
1809
+ reasonCode?: string | undefined;
1810
+ } | undefined;
1811
+ receive?: {
1812
+ report: {
1813
+ version: 1;
1814
+ mode: "tool_polling";
1815
+ } | {
1816
+ version: 1;
1817
+ mode: "runtime_pending";
1818
+ boundary: "before_model" | "after_tools";
1819
+ evidence: "context_hook" | "provider_payload";
1820
+ visibility: "hidden" | "collapsed";
1821
+ } | {
1822
+ version: 1;
1823
+ mode: "runtime_checkpoint";
1824
+ boundary: "before_model" | "after_tools";
1825
+ evidence: "context_hook" | "provider_payload";
1826
+ visibility: "hidden" | "collapsed";
1827
+ };
1828
+ reportedAt: string;
1829
+ current: boolean;
1830
+ } | undefined;
1831
+ deviceName?: string | null | undefined;
1832
+ runtimeState?: string | null | undefined;
1833
+ } | undefined;
1834
+ receiveReporting?: 1 | undefined;
1835
+ deliveryOffers?: {
1836
+ messageId: string;
1837
+ deliveryId: string;
1838
+ }[] | undefined;
1839
+ next?: string | null | undefined;
1840
+ participantId?: string | undefined;
1841
+ }>;
1842
+ export type ProjectCoordinationResult = z.infer<typeof ProjectCoordinationResult>;
1843
+ export declare const CoordinationRuntimeEvidence: z.ZodObject<{
1844
+ deliveryId: z.ZodEffects<z.ZodString, string, string>;
1845
+ boundaryId: z.ZodEffects<z.ZodString, string, string>;
1846
+ contentHash: z.ZodString;
1847
+ state: z.ZodEnum<["offered", "context_hook", "provider_payload"]>;
1848
+ }, "strict", z.ZodTypeAny, {
1849
+ state: "context_hook" | "provider_payload" | "offered";
1850
+ contentHash: string;
1851
+ deliveryId: string;
1852
+ boundaryId: string;
1853
+ }, {
1854
+ state: "context_hook" | "provider_payload" | "offered";
1855
+ contentHash: string;
1856
+ deliveryId: string;
1857
+ boundaryId: string;
1858
+ }>;
1859
+ export declare const ProjectCoordinationEvidenceParams: z.ZodObject<{
1860
+ version: z.ZodLiteral<1>;
1861
+ reports: z.ZodEffects<z.ZodArray<z.ZodObject<{
1862
+ deliveryId: z.ZodEffects<z.ZodString, string, string>;
1863
+ boundaryId: z.ZodEffects<z.ZodString, string, string>;
1864
+ contentHash: z.ZodString;
1865
+ state: z.ZodEnum<["offered", "context_hook", "provider_payload"]>;
1866
+ }, "strict", z.ZodTypeAny, {
1867
+ state: "context_hook" | "provider_payload" | "offered";
1868
+ contentHash: string;
1869
+ deliveryId: string;
1870
+ boundaryId: string;
1871
+ }, {
1872
+ state: "context_hook" | "provider_payload" | "offered";
1873
+ contentHash: string;
1874
+ deliveryId: string;
1875
+ boundaryId: string;
1876
+ }>, "many">, {
1877
+ state: "context_hook" | "provider_payload" | "offered";
1878
+ contentHash: string;
1879
+ deliveryId: string;
1880
+ boundaryId: string;
1881
+ }[], {
1882
+ state: "context_hook" | "provider_payload" | "offered";
1883
+ contentHash: string;
1884
+ deliveryId: string;
1885
+ boundaryId: string;
1886
+ }[]>;
1887
+ }, "strict", z.ZodTypeAny, {
1888
+ version: 1;
1889
+ reports: {
1890
+ state: "context_hook" | "provider_payload" | "offered";
1891
+ contentHash: string;
1892
+ deliveryId: string;
1893
+ boundaryId: string;
1894
+ }[];
1895
+ }, {
1896
+ version: 1;
1897
+ reports: {
1898
+ state: "context_hook" | "provider_payload" | "offered";
1899
+ contentHash: string;
1900
+ deliveryId: string;
1901
+ boundaryId: string;
1902
+ }[];
1903
+ }>;
1904
+ export type ProjectCoordinationEvidenceParams = z.infer<typeof ProjectCoordinationEvidenceParams>;
1905
+ export declare const ProjectCoordinationEvidenceResult: z.ZodObject<{
1906
+ version: z.ZodLiteral<1>;
1907
+ receipts: z.ZodArray<z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
1908
+ deliveryId: z.ZodEffects<z.ZodString, string, string>;
1909
+ status: z.ZodLiteral<"recorded">;
1910
+ state: z.ZodEnum<["offered", "context_hook", "provider_payload"]>;
1911
+ }, "strict", z.ZodTypeAny, {
1912
+ status: "recorded";
1913
+ state: "context_hook" | "provider_payload" | "offered";
1914
+ deliveryId: string;
1915
+ }, {
1916
+ status: "recorded";
1917
+ state: "context_hook" | "provider_payload" | "offered";
1918
+ deliveryId: string;
1919
+ }>, z.ZodObject<{
1920
+ deliveryId: z.ZodEffects<z.ZodString, string, string>;
1921
+ status: z.ZodLiteral<"rejected">;
1922
+ reason: z.ZodEnum<["unavailable", "mismatch"]>;
1923
+ }, "strict", z.ZodTypeAny, {
1924
+ status: "rejected";
1925
+ reason: "unavailable" | "mismatch";
1926
+ deliveryId: string;
1927
+ }, {
1928
+ status: "rejected";
1929
+ reason: "unavailable" | "mismatch";
1930
+ deliveryId: string;
1931
+ }>]>, "many">;
1932
+ }, "strict", z.ZodTypeAny, {
1933
+ version: 1;
1934
+ receipts: ({
1935
+ status: "recorded";
1936
+ state: "context_hook" | "provider_payload" | "offered";
1937
+ deliveryId: string;
1938
+ } | {
1939
+ status: "rejected";
1940
+ reason: "unavailable" | "mismatch";
1941
+ deliveryId: string;
1942
+ })[];
1943
+ }, {
1944
+ version: 1;
1945
+ receipts: ({
1946
+ status: "recorded";
1947
+ state: "context_hook" | "provider_payload" | "offered";
1948
+ deliveryId: string;
1949
+ } | {
1950
+ status: "rejected";
1951
+ reason: "unavailable" | "mismatch";
1952
+ deliveryId: string;
1953
+ })[];
1954
+ }>;
1955
+ export type ProjectCoordinationEvidenceResult = z.infer<typeof ProjectCoordinationEvidenceResult>;
1956
+ //# sourceMappingURL=project-coordination.d.ts.map