@clawroom/openclaw 0.5.25 → 0.5.27

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 (51) hide show
  1. package/node_modules/@clawroom/protocol/dist/index.d.ts +759 -0
  2. package/node_modules/@clawroom/protocol/dist/index.d.ts.map +1 -0
  3. package/node_modules/@clawroom/protocol/dist/index.js +179 -0
  4. package/node_modules/@clawroom/protocol/dist/index.js.map +1 -0
  5. package/node_modules/@clawroom/protocol/package.json +15 -4
  6. package/node_modules/@clawroom/sdk/dist/client.d.ts +87 -0
  7. package/node_modules/@clawroom/sdk/dist/client.d.ts.map +1 -0
  8. package/node_modules/@clawroom/sdk/dist/client.js +375 -0
  9. package/node_modules/@clawroom/sdk/dist/client.js.map +1 -0
  10. package/node_modules/@clawroom/sdk/{src/index.ts → dist/index.d.ts} +2 -16
  11. package/node_modules/@clawroom/sdk/dist/index.d.ts.map +1 -0
  12. package/node_modules/@clawroom/sdk/dist/index.js +4 -0
  13. package/node_modules/@clawroom/sdk/dist/index.js.map +1 -0
  14. package/node_modules/@clawroom/sdk/dist/machine-client.d.ts +78 -0
  15. package/node_modules/@clawroom/sdk/dist/machine-client.d.ts.map +1 -0
  16. package/node_modules/@clawroom/sdk/dist/machine-client.js +297 -0
  17. package/node_modules/@clawroom/sdk/dist/machine-client.js.map +1 -0
  18. package/node_modules/@clawroom/sdk/dist/protocol.d.ts +3 -0
  19. package/node_modules/@clawroom/sdk/dist/protocol.d.ts.map +1 -0
  20. package/node_modules/@clawroom/sdk/dist/protocol.js +2 -0
  21. package/node_modules/@clawroom/sdk/dist/protocol.js.map +1 -0
  22. package/node_modules/@clawroom/sdk/dist/ws-transport.d.ts +48 -0
  23. package/node_modules/@clawroom/sdk/dist/ws-transport.d.ts.map +1 -0
  24. package/node_modules/@clawroom/sdk/dist/ws-transport.js +188 -0
  25. package/node_modules/@clawroom/sdk/dist/ws-transport.js.map +1 -0
  26. package/node_modules/@clawroom/sdk/package.json +20 -5
  27. package/node_modules/ws/LICENSE +20 -0
  28. package/node_modules/ws/README.md +548 -0
  29. package/node_modules/ws/browser.js +8 -0
  30. package/node_modules/ws/index.js +22 -0
  31. package/node_modules/ws/lib/buffer-util.js +131 -0
  32. package/node_modules/ws/lib/constants.js +19 -0
  33. package/node_modules/ws/lib/event-target.js +292 -0
  34. package/node_modules/ws/lib/extension.js +203 -0
  35. package/node_modules/ws/lib/limiter.js +55 -0
  36. package/node_modules/ws/lib/permessage-deflate.js +528 -0
  37. package/node_modules/ws/lib/receiver.js +706 -0
  38. package/node_modules/ws/lib/sender.js +602 -0
  39. package/node_modules/ws/lib/stream.js +161 -0
  40. package/node_modules/ws/lib/subprotocol.js +62 -0
  41. package/node_modules/ws/lib/validation.js +152 -0
  42. package/node_modules/ws/lib/websocket-server.js +554 -0
  43. package/node_modules/ws/lib/websocket.js +1393 -0
  44. package/node_modules/ws/package.json +70 -0
  45. package/node_modules/ws/wrapper.mjs +21 -0
  46. package/package.json +11 -6
  47. package/node_modules/@clawroom/protocol/src/index.ts +0 -407
  48. package/node_modules/@clawroom/sdk/src/client.ts +0 -430
  49. package/node_modules/@clawroom/sdk/src/machine-client.ts +0 -356
  50. package/node_modules/@clawroom/sdk/src/protocol.ts +0 -22
  51. package/node_modules/@clawroom/sdk/src/ws-transport.ts +0 -218
@@ -0,0 +1,759 @@
1
+ import { z } from "zod";
2
+ export declare const TASK_ROLE_VALUES: readonly ["root", "child"];
3
+ export type TaskRole = (typeof TASK_ROLE_VALUES)[number];
4
+ export declare const TASK_STATUS_VALUES: readonly ["open", "in_progress", "in_review", "done", "failed"];
5
+ export type TaskStatus = (typeof TASK_STATUS_VALUES)[number];
6
+ export declare const TASK_KIND_VALUES: readonly ["work", "decision", "approval", "follow_up"];
7
+ export type TaskKind = (typeof TASK_KIND_VALUES)[number];
8
+ export declare const TASK_PRIORITY_VALUES: readonly ["urgent", "high", "normal", "low"];
9
+ export type TaskPriority = (typeof TASK_PRIORITY_VALUES)[number];
10
+ export declare const TASK_BLOCKING_STATE_VALUES: readonly ["none", "needs_human", "external"];
11
+ export type TaskBlockingState = (typeof TASK_BLOCKING_STATE_VALUES)[number];
12
+ export declare const TASK_REVIEW_VERDICT_VALUES: readonly ["approve", "revise"];
13
+ export type TaskReviewVerdict = (typeof TASK_REVIEW_VERDICT_VALUES)[number];
14
+ export declare const LIST_TASK_FILTER_VALUES: readonly ["mine", "channel", "open"];
15
+ export type ListTasksFilter = (typeof LIST_TASK_FILTER_VALUES)[number];
16
+ export declare const SERVER_CHAT_WAKE_REASON_VALUES: readonly ["mention", "dm", "follow_through", "goal_drift", "trigger", "broadcast", "routed", "coordination", "review"];
17
+ export type ServerChatWakeReason = (typeof SERVER_CHAT_WAKE_REASON_VALUES)[number];
18
+ export interface TaskExecutionPlanSubtask {
19
+ title: string;
20
+ description: string;
21
+ suggestedAssignee: string | null;
22
+ blockedBy: number[];
23
+ }
24
+ export interface TaskExecutionPlan {
25
+ summary: string;
26
+ subtasks: TaskExecutionPlanSubtask[];
27
+ confirmedAt?: number;
28
+ }
29
+ export interface TaskExecutionBrief {
30
+ goal: string;
31
+ doneDefinition: string;
32
+ plan?: TaskExecutionPlan;
33
+ }
34
+ export declare const TASK_PLAN_LIMITS: {
35
+ readonly minSubtasks: 1;
36
+ readonly maxSubtasks: 10;
37
+ };
38
+ export declare const taskRoleSchema: z.ZodEnum<["root", "child"]>;
39
+ export declare const taskStatusSchema: z.ZodEnum<["open", "in_progress", "in_review", "done", "failed"]>;
40
+ export declare const taskKindSchema: z.ZodEnum<["work", "decision", "approval", "follow_up"]>;
41
+ export declare const taskPrioritySchema: z.ZodEnum<["urgent", "high", "normal", "low"]>;
42
+ export declare const taskBlockingStateSchema: z.ZodEnum<["none", "needs_human", "external"]>;
43
+ export declare const taskReviewVerdictSchema: z.ZodEnum<["approve", "revise"]>;
44
+ export declare const listTasksFilterSchema: z.ZodEnum<["mine", "channel", "open"]>;
45
+ export declare function createTaskKindSchema(zod: typeof z): z.ZodEnum<["work", "decision", "approval", "follow_up"]>;
46
+ export declare function createTaskStatusSchema(zod: typeof z): z.ZodEnum<["open", "in_progress", "in_review", "done", "failed"]>;
47
+ export declare function createTaskPrioritySchema(zod: typeof z): z.ZodEnum<["urgent", "high", "normal", "low"]>;
48
+ export declare function createTaskBlockingStateSchema(zod: typeof z): z.ZodEnum<["none", "needs_human", "external"]>;
49
+ export declare function createTaskReviewVerdictSchema(zod: typeof z): z.ZodEnum<["approve", "revise"]>;
50
+ export declare function createListTasksFilterSchema(zod: typeof z): z.ZodEnum<["mine", "channel", "open"]>;
51
+ export declare function createTaskExecutionPlanSubtaskSchema(zod: typeof z): z.ZodObject<{
52
+ title: z.ZodString;
53
+ description: z.ZodString;
54
+ suggestedAssignee: z.ZodNullable<z.ZodString>;
55
+ blockedBy: z.ZodArray<z.ZodNumber, "many">;
56
+ }, "strip", z.ZodTypeAny, {
57
+ title: string;
58
+ description: string;
59
+ suggestedAssignee: string | null;
60
+ blockedBy: number[];
61
+ }, {
62
+ title: string;
63
+ description: string;
64
+ suggestedAssignee: string | null;
65
+ blockedBy: number[];
66
+ }>;
67
+ export declare function createTaskExecutionPlanSchema(zod: typeof z): z.ZodObject<{
68
+ summary: z.ZodString;
69
+ subtasks: z.ZodArray<z.ZodObject<{
70
+ title: z.ZodString;
71
+ description: z.ZodString;
72
+ suggestedAssignee: z.ZodNullable<z.ZodString>;
73
+ blockedBy: z.ZodArray<z.ZodNumber, "many">;
74
+ }, "strip", z.ZodTypeAny, {
75
+ title: string;
76
+ description: string;
77
+ suggestedAssignee: string | null;
78
+ blockedBy: number[];
79
+ }, {
80
+ title: string;
81
+ description: string;
82
+ suggestedAssignee: string | null;
83
+ blockedBy: number[];
84
+ }>, "many">;
85
+ confirmedAt: z.ZodOptional<z.ZodNumber>;
86
+ }, "strip", z.ZodTypeAny, {
87
+ summary: string;
88
+ subtasks: {
89
+ title: string;
90
+ description: string;
91
+ suggestedAssignee: string | null;
92
+ blockedBy: number[];
93
+ }[];
94
+ confirmedAt?: number | undefined;
95
+ }, {
96
+ summary: string;
97
+ subtasks: {
98
+ title: string;
99
+ description: string;
100
+ suggestedAssignee: string | null;
101
+ blockedBy: number[];
102
+ }[];
103
+ confirmedAt?: number | undefined;
104
+ }>;
105
+ export declare function createTaskExecutionBriefInputSchema(zod: typeof z): z.ZodObject<{
106
+ goal: z.ZodString;
107
+ doneDefinition: z.ZodString;
108
+ }, "strip", z.ZodTypeAny, {
109
+ goal: string;
110
+ doneDefinition: string;
111
+ }, {
112
+ goal: string;
113
+ doneDefinition: string;
114
+ }>;
115
+ export declare function createTaskExecutionBriefSchema(zod: typeof z): z.ZodObject<{
116
+ goal: z.ZodString;
117
+ doneDefinition: z.ZodString;
118
+ } & {
119
+ plan: z.ZodOptional<z.ZodObject<{
120
+ summary: z.ZodString;
121
+ subtasks: z.ZodArray<z.ZodObject<{
122
+ title: z.ZodString;
123
+ description: z.ZodString;
124
+ suggestedAssignee: z.ZodNullable<z.ZodString>;
125
+ blockedBy: z.ZodArray<z.ZodNumber, "many">;
126
+ }, "strip", z.ZodTypeAny, {
127
+ title: string;
128
+ description: string;
129
+ suggestedAssignee: string | null;
130
+ blockedBy: number[];
131
+ }, {
132
+ title: string;
133
+ description: string;
134
+ suggestedAssignee: string | null;
135
+ blockedBy: number[];
136
+ }>, "many">;
137
+ confirmedAt: z.ZodOptional<z.ZodNumber>;
138
+ }, "strip", z.ZodTypeAny, {
139
+ summary: string;
140
+ subtasks: {
141
+ title: string;
142
+ description: string;
143
+ suggestedAssignee: string | null;
144
+ blockedBy: number[];
145
+ }[];
146
+ confirmedAt?: number | undefined;
147
+ }, {
148
+ summary: string;
149
+ subtasks: {
150
+ title: string;
151
+ description: string;
152
+ suggestedAssignee: string | null;
153
+ blockedBy: number[];
154
+ }[];
155
+ confirmedAt?: number | undefined;
156
+ }>>;
157
+ }, "strip", z.ZodTypeAny, {
158
+ goal: string;
159
+ doneDefinition: string;
160
+ plan?: {
161
+ summary: string;
162
+ subtasks: {
163
+ title: string;
164
+ description: string;
165
+ suggestedAssignee: string | null;
166
+ blockedBy: number[];
167
+ }[];
168
+ confirmedAt?: number | undefined;
169
+ } | undefined;
170
+ }, {
171
+ goal: string;
172
+ doneDefinition: string;
173
+ plan?: {
174
+ summary: string;
175
+ subtasks: {
176
+ title: string;
177
+ description: string;
178
+ suggestedAssignee: string | null;
179
+ blockedBy: number[];
180
+ }[];
181
+ confirmedAt?: number | undefined;
182
+ } | undefined;
183
+ }>;
184
+ export declare function createTaskPlanSubtaskSchema(zod: typeof z): z.ZodObject<{
185
+ title: z.ZodString;
186
+ description: z.ZodString;
187
+ suggestedAssignee: z.ZodString;
188
+ blockedBy: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
189
+ }, "strip", z.ZodTypeAny, {
190
+ title: string;
191
+ description: string;
192
+ suggestedAssignee: string;
193
+ blockedBy?: number[] | undefined;
194
+ }, {
195
+ title: string;
196
+ description: string;
197
+ suggestedAssignee: string;
198
+ blockedBy?: number[] | undefined;
199
+ }>;
200
+ export declare const taskExecutionPlanSubtaskSchema: z.ZodObject<{
201
+ title: z.ZodString;
202
+ description: z.ZodString;
203
+ suggestedAssignee: z.ZodNullable<z.ZodString>;
204
+ blockedBy: z.ZodArray<z.ZodNumber, "many">;
205
+ }, "strip", z.ZodTypeAny, {
206
+ title: string;
207
+ description: string;
208
+ suggestedAssignee: string | null;
209
+ blockedBy: number[];
210
+ }, {
211
+ title: string;
212
+ description: string;
213
+ suggestedAssignee: string | null;
214
+ blockedBy: number[];
215
+ }>;
216
+ export declare const taskExecutionPlanSchema: z.ZodObject<{
217
+ summary: z.ZodString;
218
+ subtasks: z.ZodArray<z.ZodObject<{
219
+ title: z.ZodString;
220
+ description: z.ZodString;
221
+ suggestedAssignee: z.ZodNullable<z.ZodString>;
222
+ blockedBy: z.ZodArray<z.ZodNumber, "many">;
223
+ }, "strip", z.ZodTypeAny, {
224
+ title: string;
225
+ description: string;
226
+ suggestedAssignee: string | null;
227
+ blockedBy: number[];
228
+ }, {
229
+ title: string;
230
+ description: string;
231
+ suggestedAssignee: string | null;
232
+ blockedBy: number[];
233
+ }>, "many">;
234
+ confirmedAt: z.ZodOptional<z.ZodNumber>;
235
+ }, "strip", z.ZodTypeAny, {
236
+ summary: string;
237
+ subtasks: {
238
+ title: string;
239
+ description: string;
240
+ suggestedAssignee: string | null;
241
+ blockedBy: number[];
242
+ }[];
243
+ confirmedAt?: number | undefined;
244
+ }, {
245
+ summary: string;
246
+ subtasks: {
247
+ title: string;
248
+ description: string;
249
+ suggestedAssignee: string | null;
250
+ blockedBy: number[];
251
+ }[];
252
+ confirmedAt?: number | undefined;
253
+ }>;
254
+ export declare const taskExecutionBriefInputSchema: z.ZodObject<{
255
+ goal: z.ZodString;
256
+ doneDefinition: z.ZodString;
257
+ }, "strip", z.ZodTypeAny, {
258
+ goal: string;
259
+ doneDefinition: string;
260
+ }, {
261
+ goal: string;
262
+ doneDefinition: string;
263
+ }>;
264
+ export declare const taskExecutionBriefSchema: z.ZodObject<{
265
+ goal: z.ZodString;
266
+ doneDefinition: z.ZodString;
267
+ } & {
268
+ plan: z.ZodOptional<z.ZodObject<{
269
+ summary: z.ZodString;
270
+ subtasks: z.ZodArray<z.ZodObject<{
271
+ title: z.ZodString;
272
+ description: z.ZodString;
273
+ suggestedAssignee: z.ZodNullable<z.ZodString>;
274
+ blockedBy: z.ZodArray<z.ZodNumber, "many">;
275
+ }, "strip", z.ZodTypeAny, {
276
+ title: string;
277
+ description: string;
278
+ suggestedAssignee: string | null;
279
+ blockedBy: number[];
280
+ }, {
281
+ title: string;
282
+ description: string;
283
+ suggestedAssignee: string | null;
284
+ blockedBy: number[];
285
+ }>, "many">;
286
+ confirmedAt: z.ZodOptional<z.ZodNumber>;
287
+ }, "strip", z.ZodTypeAny, {
288
+ summary: string;
289
+ subtasks: {
290
+ title: string;
291
+ description: string;
292
+ suggestedAssignee: string | null;
293
+ blockedBy: number[];
294
+ }[];
295
+ confirmedAt?: number | undefined;
296
+ }, {
297
+ summary: string;
298
+ subtasks: {
299
+ title: string;
300
+ description: string;
301
+ suggestedAssignee: string | null;
302
+ blockedBy: number[];
303
+ }[];
304
+ confirmedAt?: number | undefined;
305
+ }>>;
306
+ }, "strip", z.ZodTypeAny, {
307
+ goal: string;
308
+ doneDefinition: string;
309
+ plan?: {
310
+ summary: string;
311
+ subtasks: {
312
+ title: string;
313
+ description: string;
314
+ suggestedAssignee: string | null;
315
+ blockedBy: number[];
316
+ }[];
317
+ confirmedAt?: number | undefined;
318
+ } | undefined;
319
+ }, {
320
+ goal: string;
321
+ doneDefinition: string;
322
+ plan?: {
323
+ summary: string;
324
+ subtasks: {
325
+ title: string;
326
+ description: string;
327
+ suggestedAssignee: string | null;
328
+ blockedBy: number[];
329
+ }[];
330
+ confirmedAt?: number | undefined;
331
+ } | undefined;
332
+ }>;
333
+ export declare const taskCoordinationPatchSchema: z.ZodObject<{
334
+ priority: z.ZodOptional<z.ZodEnum<["urgent", "high", "normal", "low"]>>;
335
+ blockingState: z.ZodOptional<z.ZodEnum<["none", "needs_human", "external"]>>;
336
+ blockingNote: z.ZodOptional<z.ZodNullable<z.ZodString>>;
337
+ executionBrief: z.ZodOptional<z.ZodObject<{
338
+ goal: z.ZodString;
339
+ doneDefinition: z.ZodString;
340
+ }, "strip", z.ZodTypeAny, {
341
+ goal: string;
342
+ doneDefinition: string;
343
+ }, {
344
+ goal: string;
345
+ doneDefinition: string;
346
+ }>>;
347
+ accepted: z.ZodOptional<z.ZodBoolean>;
348
+ }, "strip", z.ZodTypeAny, {
349
+ priority?: "urgent" | "high" | "normal" | "low" | undefined;
350
+ blockingState?: "none" | "needs_human" | "external" | undefined;
351
+ blockingNote?: string | null | undefined;
352
+ executionBrief?: {
353
+ goal: string;
354
+ doneDefinition: string;
355
+ } | undefined;
356
+ accepted?: boolean | undefined;
357
+ }, {
358
+ priority?: "urgent" | "high" | "normal" | "low" | undefined;
359
+ blockingState?: "none" | "needs_human" | "external" | undefined;
360
+ blockingNote?: string | null | undefined;
361
+ executionBrief?: {
362
+ goal: string;
363
+ doneDefinition: string;
364
+ } | undefined;
365
+ accepted?: boolean | undefined;
366
+ }>;
367
+ export declare const sendMessagePayloadSchema: z.ZodObject<{
368
+ channelId: z.ZodString;
369
+ content: z.ZodString;
370
+ mentionIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
371
+ }, "strip", z.ZodTypeAny, {
372
+ channelId: string;
373
+ content: string;
374
+ mentionIds?: string[] | undefined;
375
+ }, {
376
+ channelId: string;
377
+ content: string;
378
+ mentionIds?: string[] | undefined;
379
+ }>;
380
+ export declare const createTaskPayloadSchema: z.ZodObject<{
381
+ title: z.ZodString;
382
+ description: z.ZodString;
383
+ channelId: z.ZodOptional<z.ZodString>;
384
+ assigneeName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
385
+ priority: z.ZodOptional<z.ZodEnum<["urgent", "high", "normal", "low"]>>;
386
+ kind: z.ZodOptional<z.ZodEnum<["work", "decision", "approval", "follow_up"]>>;
387
+ scheduledFor: z.ZodOptional<z.ZodNumber>;
388
+ parentTaskId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
389
+ }, "strip", z.ZodTypeAny, {
390
+ title: string;
391
+ description: string;
392
+ priority?: "urgent" | "high" | "normal" | "low" | undefined;
393
+ channelId?: string | undefined;
394
+ assigneeName?: string | null | undefined;
395
+ kind?: "work" | "decision" | "approval" | "follow_up" | undefined;
396
+ scheduledFor?: number | undefined;
397
+ parentTaskId?: string | null | undefined;
398
+ }, {
399
+ title: string;
400
+ description: string;
401
+ priority?: "urgent" | "high" | "normal" | "low" | undefined;
402
+ channelId?: string | undefined;
403
+ assigneeName?: string | null | undefined;
404
+ kind?: "work" | "decision" | "approval" | "follow_up" | undefined;
405
+ scheduledFor?: number | undefined;
406
+ parentTaskId?: string | null | undefined;
407
+ }>;
408
+ export declare const planTaskPayloadSchema: z.ZodObject<{
409
+ taskId: z.ZodString;
410
+ summary: z.ZodString;
411
+ subtasks: z.ZodArray<z.ZodObject<{
412
+ title: z.ZodString;
413
+ description: z.ZodString;
414
+ suggestedAssignee: z.ZodString;
415
+ } & {
416
+ blockedBy: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
417
+ }, "strip", z.ZodTypeAny, {
418
+ title: string;
419
+ description: string;
420
+ suggestedAssignee: string;
421
+ blockedBy?: number[] | undefined;
422
+ }, {
423
+ title: string;
424
+ description: string;
425
+ suggestedAssignee: string;
426
+ blockedBy?: number[] | undefined;
427
+ }>, "many">;
428
+ }, "strip", z.ZodTypeAny, {
429
+ summary: string;
430
+ subtasks: {
431
+ title: string;
432
+ description: string;
433
+ suggestedAssignee: string;
434
+ blockedBy?: number[] | undefined;
435
+ }[];
436
+ taskId: string;
437
+ }, {
438
+ summary: string;
439
+ subtasks: {
440
+ title: string;
441
+ description: string;
442
+ suggestedAssignee: string;
443
+ blockedBy?: number[] | undefined;
444
+ }[];
445
+ taskId: string;
446
+ }>;
447
+ export declare const updateTaskCoordinationPayloadSchema: z.ZodObject<{
448
+ priority: z.ZodOptional<z.ZodEnum<["urgent", "high", "normal", "low"]>>;
449
+ blockingState: z.ZodOptional<z.ZodEnum<["none", "needs_human", "external"]>>;
450
+ blockingNote: z.ZodOptional<z.ZodNullable<z.ZodString>>;
451
+ executionBrief: z.ZodOptional<z.ZodObject<{
452
+ goal: z.ZodString;
453
+ doneDefinition: z.ZodString;
454
+ }, "strip", z.ZodTypeAny, {
455
+ goal: string;
456
+ doneDefinition: string;
457
+ }, {
458
+ goal: string;
459
+ doneDefinition: string;
460
+ }>>;
461
+ accepted: z.ZodOptional<z.ZodBoolean>;
462
+ } & {
463
+ taskId: z.ZodString;
464
+ }, "strip", z.ZodTypeAny, {
465
+ taskId: string;
466
+ priority?: "urgent" | "high" | "normal" | "low" | undefined;
467
+ blockingState?: "none" | "needs_human" | "external" | undefined;
468
+ blockingNote?: string | null | undefined;
469
+ executionBrief?: {
470
+ goal: string;
471
+ doneDefinition: string;
472
+ } | undefined;
473
+ accepted?: boolean | undefined;
474
+ }, {
475
+ taskId: string;
476
+ priority?: "urgent" | "high" | "normal" | "low" | undefined;
477
+ blockingState?: "none" | "needs_human" | "external" | undefined;
478
+ blockingNote?: string | null | undefined;
479
+ executionBrief?: {
480
+ goal: string;
481
+ doneDefinition: string;
482
+ } | undefined;
483
+ accepted?: boolean | undefined;
484
+ }>;
485
+ export declare const submitTaskPayloadSchema: z.ZodObject<{
486
+ taskId: z.ZodString;
487
+ output: z.ZodString;
488
+ filePaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
489
+ }, "strip", z.ZodTypeAny, {
490
+ taskId: string;
491
+ output: string;
492
+ filePaths?: string[] | undefined;
493
+ }, {
494
+ taskId: string;
495
+ output: string;
496
+ filePaths?: string[] | undefined;
497
+ }>;
498
+ export declare const failTaskPayloadSchema: z.ZodObject<{
499
+ taskId: z.ZodString;
500
+ reason: z.ZodString;
501
+ }, "strip", z.ZodTypeAny, {
502
+ taskId: string;
503
+ reason: string;
504
+ }, {
505
+ taskId: string;
506
+ reason: string;
507
+ }>;
508
+ export declare const reviewTaskPayloadSchema: z.ZodObject<{
509
+ taskId: z.ZodString;
510
+ score: z.ZodNumber;
511
+ verdict: z.ZodEnum<["approve", "revise"]>;
512
+ feedback: z.ZodString;
513
+ }, "strip", z.ZodTypeAny, {
514
+ taskId: string;
515
+ score: number;
516
+ verdict: "approve" | "revise";
517
+ feedback: string;
518
+ }, {
519
+ taskId: string;
520
+ score: number;
521
+ verdict: "approve" | "revise";
522
+ feedback: string;
523
+ }>;
524
+ export declare const listTasksPayloadSchema: z.ZodObject<{
525
+ filter: z.ZodOptional<z.ZodEnum<["mine", "channel", "open"]>>;
526
+ channelId: z.ZodOptional<z.ZodString>;
527
+ }, "strip", z.ZodTypeAny, {
528
+ filter?: "open" | "mine" | "channel" | undefined;
529
+ channelId?: string | undefined;
530
+ }, {
531
+ filter?: "open" | "mine" | "channel" | undefined;
532
+ channelId?: string | undefined;
533
+ }>;
534
+ export declare const uploadTaskFilePayloadSchema: z.ZodObject<{
535
+ taskId: z.ZodString;
536
+ filePath: z.ZodString;
537
+ }, "strip", z.ZodTypeAny, {
538
+ taskId: string;
539
+ filePath: string;
540
+ }, {
541
+ taskId: string;
542
+ filePath: string;
543
+ }>;
544
+ export declare const taskExecutionBriefJsonSchema: {
545
+ readonly type: "object";
546
+ readonly description: "Execution brief for a root task. Both fields are required.";
547
+ readonly properties: {
548
+ readonly goal: {
549
+ readonly type: "string";
550
+ readonly description: "What this task aims to achieve.";
551
+ };
552
+ readonly doneDefinition: {
553
+ readonly type: "string";
554
+ readonly description: "What 'done' looks like.";
555
+ };
556
+ };
557
+ readonly required: readonly ["goal", "doneDefinition"];
558
+ };
559
+ export declare const taskPlanSubtaskJsonSchema: {
560
+ readonly type: "object";
561
+ readonly properties: {
562
+ readonly title: {
563
+ readonly type: "string";
564
+ readonly description: "Subtask title.";
565
+ };
566
+ readonly description: {
567
+ readonly type: "string";
568
+ readonly description: "Detailed subtask description.";
569
+ };
570
+ readonly suggestedAssignee: {
571
+ readonly type: "string";
572
+ readonly description: "Agent name best suited for the subtask.";
573
+ };
574
+ readonly blockedBy: {
575
+ readonly type: "array";
576
+ readonly description: "Indexes of prior subtasks this one depends on.";
577
+ readonly items: {
578
+ readonly type: "number";
579
+ };
580
+ };
581
+ };
582
+ readonly required: readonly ["title", "description", "suggestedAssignee"];
583
+ };
584
+ export declare const taskPlanSubtaskSchema: z.ZodObject<{
585
+ title: z.ZodString;
586
+ description: z.ZodString;
587
+ suggestedAssignee: z.ZodString;
588
+ blockedBy: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
589
+ }, "strip", z.ZodTypeAny, {
590
+ title: string;
591
+ description: string;
592
+ suggestedAssignee: string;
593
+ blockedBy?: number[] | undefined;
594
+ }, {
595
+ title: string;
596
+ description: string;
597
+ suggestedAssignee: string;
598
+ blockedBy?: number[] | undefined;
599
+ }>;
600
+ export declare const taskPlanSubtasksSchema: z.ZodArray<z.ZodObject<{
601
+ title: z.ZodString;
602
+ description: z.ZodString;
603
+ suggestedAssignee: z.ZodString;
604
+ blockedBy: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
605
+ }, "strip", z.ZodTypeAny, {
606
+ title: string;
607
+ description: string;
608
+ suggestedAssignee: string;
609
+ blockedBy?: number[] | undefined;
610
+ }, {
611
+ title: string;
612
+ description: string;
613
+ suggestedAssignee: string;
614
+ blockedBy?: number[] | undefined;
615
+ }>, "many">;
616
+ export interface AgentHeartbeat {
617
+ type: "agent.heartbeat";
618
+ }
619
+ export interface AgentWorkRef {
620
+ workId: string;
621
+ leaseToken: string;
622
+ }
623
+ export interface AgentResultFile {
624
+ filename: string;
625
+ mimeType: string;
626
+ data: string;
627
+ }
628
+ export interface AgentComplete {
629
+ type: "agent.complete";
630
+ taskId: string;
631
+ output: string;
632
+ attachments?: AgentResultFile[];
633
+ workRef?: AgentWorkRef;
634
+ }
635
+ export interface AgentProgress {
636
+ type: "agent.progress";
637
+ taskId: string;
638
+ message: string;
639
+ workRef?: AgentWorkRef;
640
+ }
641
+ export interface AgentFail {
642
+ type: "agent.fail";
643
+ taskId: string;
644
+ reason: string;
645
+ workRef?: AgentWorkRef;
646
+ }
647
+ export interface AgentChatReply {
648
+ type: "agent.chat.reply";
649
+ channelId: string;
650
+ content: string;
651
+ replyTo?: string;
652
+ workRefs?: AgentWorkRef[];
653
+ }
654
+ export interface AgentTyping {
655
+ type: "agent.typing";
656
+ channelId: string;
657
+ }
658
+ export type AgentMessage = AgentHeartbeat | AgentComplete | AgentProgress | AgentFail | AgentChatReply | AgentTyping;
659
+ export interface ServerTask {
660
+ type: "server.task";
661
+ taskId: string;
662
+ title: string;
663
+ description: string;
664
+ input: string;
665
+ channelId?: string | null;
666
+ workId: string;
667
+ leaseToken: string;
668
+ sourceMessageId?: string | null;
669
+ sourceMessageContent?: string | null;
670
+ sourceMessageSenderName?: string | null;
671
+ sourceMessageAttachments?: ChatAttachmentRef[];
672
+ taskRole?: TaskRole;
673
+ assignedAgentId?: string | null;
674
+ assignedAgentName?: string | null;
675
+ executionBrief?: TaskExecutionBrief | null;
676
+ taskDiscussionContext?: ServerTaskDiscussionEntry[];
677
+ }
678
+ export interface AgentChatProfile {
679
+ role: string;
680
+ systemPrompt: string;
681
+ memory: string;
682
+ continuityPacket: string;
683
+ }
684
+ export type ServerTaskExecutionBrief = TaskExecutionBrief;
685
+ export interface ServerTaskDiscussionEntry {
686
+ id: string;
687
+ senderType: string;
688
+ senderName: string;
689
+ content: string;
690
+ createdAt: number;
691
+ }
692
+ export interface ChatAttachmentRef {
693
+ id?: string;
694
+ filename: string;
695
+ mimeType: string;
696
+ byteSize?: number;
697
+ downloadUrl: string;
698
+ }
699
+ export interface ServerMessageContextEntry {
700
+ id: string;
701
+ senderType: string;
702
+ senderName: string;
703
+ content: string;
704
+ createdAt: number;
705
+ }
706
+ export interface ChannelMemberRef {
707
+ id: string;
708
+ name: string;
709
+ type: string;
710
+ }
711
+ export interface ServerChatMessage {
712
+ type: "server.chat";
713
+ kind: "chat_reply" | "wake";
714
+ workId: string;
715
+ leaseToken: string;
716
+ messageId: string;
717
+ channelId: string;
718
+ taskId?: string | null;
719
+ content: string;
720
+ attachments?: ChatAttachmentRef[];
721
+ isMention?: boolean;
722
+ wakeReason?: ServerChatWakeReason;
723
+ triggerReason?: string;
724
+ agentProfile: AgentChatProfile;
725
+ context: ServerMessageContextEntry[];
726
+ replyToMessageId?: string | null;
727
+ senderName?: string;
728
+ senderType?: string;
729
+ createdAt?: number;
730
+ channelMembers?: ChannelMemberRef[];
731
+ taskTitle?: string | null;
732
+ taskRole?: TaskRole;
733
+ assignedAgentId?: string | null;
734
+ assignedAgentName?: string | null;
735
+ executionBrief?: TaskExecutionBrief | null;
736
+ taskDiscussionContext?: ServerTaskDiscussionEntry[];
737
+ }
738
+ export type ServerMessage = ServerTask | ServerChatMessage;
739
+ /**
740
+ * Runtime definitions — shared between bridge, server, and UI.
741
+ *
742
+ * bridgeManaged = true: executed by bridge daemon (spawns CLI process, messages via /api/bridge/poll)
743
+ * bridgeManaged = false: executed by something else (e.g. OpenClaw plugin, messages via /api/machines/poll)
744
+ */
745
+ export interface RuntimeDef {
746
+ id: string;
747
+ displayName: string;
748
+ /** CLI binary name to detect on PATH (empty = not detectable) */
749
+ binary: string;
750
+ /** Whether the bridge daemon spawns and manages a CLI process for this runtime */
751
+ bridgeManaged: boolean;
752
+ /** Badge color for UI */
753
+ badgeColor: string;
754
+ }
755
+ export declare const RUNTIMES: RuntimeDef[];
756
+ /** Bridge-managed runtimes: server skips dequeue in /api/machines/poll (they use /api/bridge/poll instead) */
757
+ export declare const BRIDGE_MANAGED_RUNTIME_IDS: Set<string>;
758
+ export declare const RUNTIME_MAP: Map<string, RuntimeDef>;
759
+ //# sourceMappingURL=index.d.ts.map