@mclawnet/shared 0.1.7 → 0.1.9

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 (60) hide show
  1. package/dist/__tests__/chat-protocol.test.d.ts +2 -0
  2. package/dist/__tests__/chat-protocol.test.d.ts.map +1 -0
  3. package/dist/__tests__/chat-protocol.test.js +32 -0
  4. package/dist/__tests__/chat-protocol.test.js.map +1 -0
  5. package/dist/__tests__/model-catalog.test.d.ts +2 -0
  6. package/dist/__tests__/model-catalog.test.d.ts.map +1 -0
  7. package/dist/__tests__/model-catalog.test.js +55 -0
  8. package/dist/__tests__/model-catalog.test.js.map +1 -0
  9. package/dist/__tests__/session-protocol-schema.test.d.ts +2 -0
  10. package/dist/__tests__/session-protocol-schema.test.d.ts.map +1 -0
  11. package/dist/__tests__/session-protocol-schema.test.js +149 -0
  12. package/dist/__tests__/session-protocol-schema.test.js.map +1 -0
  13. package/dist/__tests__/swarm-protocol.test.d.ts +2 -0
  14. package/dist/__tests__/swarm-protocol.test.d.ts.map +1 -0
  15. package/dist/__tests__/swarm-protocol.test.js +35 -0
  16. package/dist/__tests__/swarm-protocol.test.js.map +1 -0
  17. package/dist/constants.d.ts +1 -1
  18. package/dist/constants.d.ts.map +1 -1
  19. package/dist/constants.js +4 -1
  20. package/dist/constants.js.map +1 -1
  21. package/dist/encode-cwd.d.ts +15 -0
  22. package/dist/encode-cwd.d.ts.map +1 -0
  23. package/dist/encode-cwd.js +27 -0
  24. package/dist/encode-cwd.js.map +1 -0
  25. package/dist/index.d.ts +3 -0
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +3 -0
  28. package/dist/index.js.map +1 -1
  29. package/dist/model-catalog.d.ts +53 -0
  30. package/dist/model-catalog.d.ts.map +1 -0
  31. package/dist/model-catalog.js +5 -0
  32. package/dist/model-catalog.js.map +1 -0
  33. package/dist/protocol/agent.d.ts +576 -17
  34. package/dist/protocol/agent.d.ts.map +1 -1
  35. package/dist/protocol/agent.js +7 -0
  36. package/dist/protocol/agent.js.map +1 -1
  37. package/dist/protocol/chat.d.ts +110 -5
  38. package/dist/protocol/chat.d.ts.map +1 -1
  39. package/dist/protocol/events.d.ts +5 -2
  40. package/dist/protocol/events.d.ts.map +1 -1
  41. package/dist/protocol/events.js.map +1 -1
  42. package/dist/protocol/index.d.ts +3 -3
  43. package/dist/protocol/index.d.ts.map +1 -1
  44. package/dist/protocol/index.js +1 -1
  45. package/dist/protocol/index.js.map +1 -1
  46. package/dist/sandbox.d.ts +27 -0
  47. package/dist/sandbox.d.ts.map +1 -0
  48. package/dist/sandbox.js +7 -0
  49. package/dist/sandbox.js.map +1 -0
  50. package/dist/schemas.d.ts +573 -11
  51. package/dist/schemas.d.ts.map +1 -1
  52. package/dist/schemas.js +151 -2
  53. package/dist/schemas.js.map +1 -1
  54. package/dist/types/session.d.ts +1 -1
  55. package/dist/types/session.d.ts.map +1 -1
  56. package/package.json +1 -1
  57. package/dist/brain-types.d.ts +0 -101
  58. package/dist/brain-types.d.ts.map +0 -1
  59. package/dist/brain-types.js +0 -4
  60. package/dist/brain-types.js.map +0 -1
package/dist/schemas.d.ts CHANGED
@@ -44,21 +44,31 @@ export declare const registerSchema: z.ZodObject<{
44
44
  email?: string | undefined;
45
45
  }>;
46
46
  export type RegisterInput = z.infer<typeof registerSchema>;
47
+ export declare const backendKindSchema: z.ZodEnum<["claude", "codex"]>;
47
48
  export declare const createSessionSchema: z.ZodObject<{
48
49
  agentId: z.ZodOptional<z.ZodString>;
49
50
  workDir: z.ZodOptional<z.ZodString>;
50
51
  title: z.ZodOptional<z.ZodString>;
51
- backendType: z.ZodDefault<z.ZodEnum<["claude-code", "openclaw", "codex"]>>;
52
+ backendType: z.ZodDefault<z.ZodEnum<["claude", "codex"]>>;
53
+ stickyModel: z.ZodOptional<z.ZodString>;
54
+ stickyMode: z.ZodOptional<z.ZodString>;
55
+ useBrainCore: z.ZodDefault<z.ZodBoolean>;
52
56
  }, "strip", z.ZodTypeAny, {
53
- backendType: "claude-code" | "openclaw" | "codex";
57
+ backendType: "claude" | "codex";
58
+ useBrainCore: boolean;
54
59
  agentId?: string | undefined;
55
60
  workDir?: string | undefined;
56
61
  title?: string | undefined;
62
+ stickyModel?: string | undefined;
63
+ stickyMode?: string | undefined;
57
64
  }, {
58
65
  agentId?: string | undefined;
59
66
  workDir?: string | undefined;
60
67
  title?: string | undefined;
61
- backendType?: "claude-code" | "openclaw" | "codex" | undefined;
68
+ backendType?: "claude" | "codex" | undefined;
69
+ stickyModel?: string | undefined;
70
+ stickyMode?: string | undefined;
71
+ useBrainCore?: boolean | undefined;
62
72
  }>;
63
73
  export type CreateSessionInput = z.infer<typeof createSessionSchema>;
64
74
  export declare const updateSessionSchema: z.ZodObject<{
@@ -104,25 +114,25 @@ export declare const notificationSchema: z.ZodObject<{
104
114
  readAt: z.ZodNullable<z.ZodString>;
105
115
  createdAt: z.ZodString;
106
116
  }, "strip", z.ZodTypeAny, {
107
- id: string;
108
- payload: Record<string, unknown> | null;
109
117
  title: string;
118
+ id: string;
110
119
  userId: string;
111
120
  kind: string;
112
121
  body: string | null;
113
- severity: "error" | "success" | "info" | "warning";
122
+ severity: "error" | "info" | "success" | "warning";
123
+ payload: Record<string, unknown> | null;
114
124
  link: string | null;
115
125
  dedupeKey: string | null;
116
126
  readAt: string | null;
117
127
  createdAt: string;
118
128
  }, {
119
- id: string;
120
- payload: Record<string, unknown> | null;
121
129
  title: string;
130
+ id: string;
122
131
  userId: string;
123
132
  kind: string;
124
133
  body: string | null;
125
- severity: "error" | "success" | "info" | "warning";
134
+ severity: "error" | "info" | "success" | "warning";
135
+ payload: Record<string, unknown> | null;
126
136
  link: string | null;
127
137
  dedupeKey: string | null;
128
138
  readAt: string | null;
@@ -149,6 +159,37 @@ export declare const ideaStatusSchema: z.ZodEnum<["idea", "todo", "researching",
149
159
  export type IdeaStatus = z.infer<typeof ideaStatusSchema>;
150
160
  export declare const ideaPrioritySchema: z.ZodEnum<["low", "medium", "high"]>;
151
161
  export type IdeaPriority = z.infer<typeof ideaPrioritySchema>;
162
+ export declare const researchConclusionSchema: z.ZodEnum<["promote", "archive", "needs-info"]>;
163
+ export type ResearchConclusion = z.infer<typeof researchConclusionSchema>;
164
+ export declare const researchKindSchema: z.ZodEnum<["investigate", "execute"]>;
165
+ export type ResearchKind = z.infer<typeof researchKindSchema>;
166
+ export declare const researchRefSchema: z.ZodObject<{
167
+ /**
168
+ * Relative to projectRoot, e.g. `.clawnet/ideas/<ideaId>/research-<ISO>.md`.
169
+ * S8 hotfix — enforce shape at the schema boundary: either a path inside
170
+ * the canonical `.clawnet/ideas/` tree (relative form) or an absolute
171
+ * path (the fallback when the report lives outside projectRoot). Reject
172
+ * any path containing `..` so a malicious / typo'd value can't escape
173
+ * the project tree when the UI later joins it with projectRoot.
174
+ */
175
+ reportPath: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
176
+ /** Swarm that produced the report — reverse provenance link. */
177
+ swarmId: z.ZodString;
178
+ conclusion: z.ZodEnum<["promote", "archive", "needs-info"]>;
179
+ /** ISO timestamp. */
180
+ ranAt: z.ZodString;
181
+ }, "strip", z.ZodTypeAny, {
182
+ reportPath: string;
183
+ swarmId: string;
184
+ conclusion: "promote" | "archive" | "needs-info";
185
+ ranAt: string;
186
+ }, {
187
+ reportPath: string;
188
+ swarmId: string;
189
+ conclusion: "promote" | "archive" | "needs-info";
190
+ ranAt: string;
191
+ }>;
192
+ export type ResearchRef = z.infer<typeof researchRefSchema>;
152
193
  export declare const ideaSchema: z.ZodObject<{
153
194
  id: z.ZodString;
154
195
  userId: z.ZodString;
@@ -164,12 +205,40 @@ export declare const ideaSchema: z.ZodObject<{
164
205
  sourceRole: z.ZodNullable<z.ZodString>;
165
206
  linkedSessionId: z.ZodNullable<z.ZodString>;
166
207
  linkedSwarmTaskId: z.ZodNullable<z.ZodString>;
208
+ researchReports: z.ZodOptional<z.ZodArray<z.ZodObject<{
209
+ /**
210
+ * Relative to projectRoot, e.g. `.clawnet/ideas/<ideaId>/research-<ISO>.md`.
211
+ * S8 hotfix — enforce shape at the schema boundary: either a path inside
212
+ * the canonical `.clawnet/ideas/` tree (relative form) or an absolute
213
+ * path (the fallback when the report lives outside projectRoot). Reject
214
+ * any path containing `..` so a malicious / typo'd value can't escape
215
+ * the project tree when the UI later joins it with projectRoot.
216
+ */
217
+ reportPath: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
218
+ /** Swarm that produced the report — reverse provenance link. */
219
+ swarmId: z.ZodString;
220
+ conclusion: z.ZodEnum<["promote", "archive", "needs-info"]>;
221
+ /** ISO timestamp. */
222
+ ranAt: z.ZodString;
223
+ }, "strip", z.ZodTypeAny, {
224
+ reportPath: string;
225
+ swarmId: string;
226
+ conclusion: "promote" | "archive" | "needs-info";
227
+ ranAt: string;
228
+ }, {
229
+ reportPath: string;
230
+ swarmId: string;
231
+ conclusion: "promote" | "archive" | "needs-info";
232
+ ranAt: string;
233
+ }>, "many">>;
234
+ researchKind: z.ZodOptional<z.ZodNullable<z.ZodEnum<["investigate", "execute"]>>>;
235
+ shipFailureReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
167
236
  createdAt: z.ZodString;
168
237
  updatedAt: z.ZodString;
169
238
  }, "strip", z.ZodTypeAny, {
170
- id: string;
171
239
  status: "idea" | "todo" | "researching" | "developed" | "archived";
172
240
  title: string;
241
+ id: string;
173
242
  userId: string;
174
243
  body: string;
175
244
  createdAt: string;
@@ -183,10 +252,18 @@ export declare const ideaSchema: z.ZodObject<{
183
252
  linkedSessionId: string | null;
184
253
  linkedSwarmTaskId: string | null;
185
254
  updatedAt: string;
255
+ researchReports?: {
256
+ reportPath: string;
257
+ swarmId: string;
258
+ conclusion: "promote" | "archive" | "needs-info";
259
+ ranAt: string;
260
+ }[] | undefined;
261
+ researchKind?: "investigate" | "execute" | null | undefined;
262
+ shipFailureReason?: string | null | undefined;
186
263
  }, {
187
- id: string;
188
264
  status: "idea" | "todo" | "researching" | "developed" | "archived";
189
265
  title: string;
266
+ id: string;
190
267
  userId: string;
191
268
  body: string;
192
269
  createdAt: string;
@@ -200,6 +277,14 @@ export declare const ideaSchema: z.ZodObject<{
200
277
  linkedSessionId: string | null;
201
278
  linkedSwarmTaskId: string | null;
202
279
  updatedAt: string;
280
+ researchReports?: {
281
+ reportPath: string;
282
+ swarmId: string;
283
+ conclusion: "promote" | "archive" | "needs-info";
284
+ ranAt: string;
285
+ }[] | undefined;
286
+ researchKind?: "investigate" | "execute" | null | undefined;
287
+ shipFailureReason?: string | null | undefined;
203
288
  }>;
204
289
  export type Idea = z.infer<typeof ideaSchema>;
205
290
  export declare const createIdeaSchema: z.ZodObject<{
@@ -251,6 +336,34 @@ export declare const updateIdeaSchema: z.ZodObject<{
251
336
  } & {
252
337
  linkedSessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
253
338
  linkedSwarmTaskId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
339
+ researchReports: z.ZodOptional<z.ZodArray<z.ZodObject<{
340
+ /**
341
+ * Relative to projectRoot, e.g. `.clawnet/ideas/<ideaId>/research-<ISO>.md`.
342
+ * S8 hotfix — enforce shape at the schema boundary: either a path inside
343
+ * the canonical `.clawnet/ideas/` tree (relative form) or an absolute
344
+ * path (the fallback when the report lives outside projectRoot). Reject
345
+ * any path containing `..` so a malicious / typo'd value can't escape
346
+ * the project tree when the UI later joins it with projectRoot.
347
+ */
348
+ reportPath: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
349
+ /** Swarm that produced the report — reverse provenance link. */
350
+ swarmId: z.ZodString;
351
+ conclusion: z.ZodEnum<["promote", "archive", "needs-info"]>;
352
+ /** ISO timestamp. */
353
+ ranAt: z.ZodString;
354
+ }, "strip", z.ZodTypeAny, {
355
+ reportPath: string;
356
+ swarmId: string;
357
+ conclusion: "promote" | "archive" | "needs-info";
358
+ ranAt: string;
359
+ }, {
360
+ reportPath: string;
361
+ swarmId: string;
362
+ conclusion: "promote" | "archive" | "needs-info";
363
+ ranAt: string;
364
+ }>, "many">>;
365
+ researchKind: z.ZodOptional<z.ZodNullable<z.ZodEnum<["investigate", "execute"]>>>;
366
+ shipFailureReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
254
367
  }, "strip", z.ZodTypeAny, {
255
368
  status?: "idea" | "todo" | "researching" | "developed" | "archived" | undefined;
256
369
  title?: string | undefined;
@@ -264,6 +377,14 @@ export declare const updateIdeaSchema: z.ZodObject<{
264
377
  sourceRole?: string | null | undefined;
265
378
  linkedSessionId?: string | null | undefined;
266
379
  linkedSwarmTaskId?: string | null | undefined;
380
+ researchReports?: {
381
+ reportPath: string;
382
+ swarmId: string;
383
+ conclusion: "promote" | "archive" | "needs-info";
384
+ ranAt: string;
385
+ }[] | undefined;
386
+ researchKind?: "investigate" | "execute" | null | undefined;
387
+ shipFailureReason?: string | null | undefined;
267
388
  }, {
268
389
  status?: "idea" | "todo" | "researching" | "developed" | "archived" | undefined;
269
390
  title?: string | undefined;
@@ -277,6 +398,14 @@ export declare const updateIdeaSchema: z.ZodObject<{
277
398
  sourceRole?: string | null | undefined;
278
399
  linkedSessionId?: string | null | undefined;
279
400
  linkedSwarmTaskId?: string | null | undefined;
401
+ researchReports?: {
402
+ reportPath: string;
403
+ swarmId: string;
404
+ conclusion: "promote" | "archive" | "needs-info";
405
+ ranAt: string;
406
+ }[] | undefined;
407
+ researchKind?: "investigate" | "execute" | null | undefined;
408
+ shipFailureReason?: string | null | undefined;
280
409
  }>;
281
410
  export type UpdateIdeaInput = z.infer<typeof updateIdeaSchema>;
282
411
  export declare const listIdeasSchema: z.ZodObject<{
@@ -305,4 +434,437 @@ export declare const listIdeasSchema: z.ZodObject<{
305
434
  q?: string | undefined;
306
435
  }>;
307
436
  export type ListIdeasInput = z.infer<typeof listIdeasSchema>;
437
+ export declare const modelDescriptorSchema: z.ZodObject<{
438
+ code: z.ZodString;
439
+ label: z.ZodString;
440
+ description: z.ZodOptional<z.ZodString>;
441
+ tier: z.ZodOptional<z.ZodEnum<["premium", "standard", "lite"]>>;
442
+ contextWindow: z.ZodOptional<z.ZodNumber>;
443
+ supportsVision: z.ZodOptional<z.ZodBoolean>;
444
+ supportsToolUse: z.ZodOptional<z.ZodBoolean>;
445
+ default: z.ZodOptional<z.ZodBoolean>;
446
+ }, "strip", z.ZodTypeAny, {
447
+ code: string;
448
+ label: string;
449
+ description?: string | undefined;
450
+ tier?: "premium" | "standard" | "lite" | undefined;
451
+ contextWindow?: number | undefined;
452
+ supportsVision?: boolean | undefined;
453
+ supportsToolUse?: boolean | undefined;
454
+ default?: boolean | undefined;
455
+ }, {
456
+ code: string;
457
+ label: string;
458
+ description?: string | undefined;
459
+ tier?: "premium" | "standard" | "lite" | undefined;
460
+ contextWindow?: number | undefined;
461
+ supportsVision?: boolean | undefined;
462
+ supportsToolUse?: boolean | undefined;
463
+ default?: boolean | undefined;
464
+ }>;
465
+ export declare const modeDescriptorSchema: z.ZodObject<{
466
+ code: z.ZodString;
467
+ label: z.ZodString;
468
+ description: z.ZodOptional<z.ZodString>;
469
+ default: z.ZodOptional<z.ZodBoolean>;
470
+ }, "strip", z.ZodTypeAny, {
471
+ code: string;
472
+ label: string;
473
+ description?: string | undefined;
474
+ default?: boolean | undefined;
475
+ }, {
476
+ code: string;
477
+ label: string;
478
+ description?: string | undefined;
479
+ default?: boolean | undefined;
480
+ }>;
481
+ export declare const backendManifestEntrySchema: z.ZodObject<{
482
+ kind: z.ZodEnum<["claude", "codex"]>;
483
+ installed: z.ZodBoolean;
484
+ binaryPath: z.ZodOptional<z.ZodString>;
485
+ version: z.ZodOptional<z.ZodString>;
486
+ unavailableReason: z.ZodOptional<z.ZodString>;
487
+ models: z.ZodArray<z.ZodObject<{
488
+ code: z.ZodString;
489
+ label: z.ZodString;
490
+ description: z.ZodOptional<z.ZodString>;
491
+ tier: z.ZodOptional<z.ZodEnum<["premium", "standard", "lite"]>>;
492
+ contextWindow: z.ZodOptional<z.ZodNumber>;
493
+ supportsVision: z.ZodOptional<z.ZodBoolean>;
494
+ supportsToolUse: z.ZodOptional<z.ZodBoolean>;
495
+ default: z.ZodOptional<z.ZodBoolean>;
496
+ }, "strip", z.ZodTypeAny, {
497
+ code: string;
498
+ label: string;
499
+ description?: string | undefined;
500
+ tier?: "premium" | "standard" | "lite" | undefined;
501
+ contextWindow?: number | undefined;
502
+ supportsVision?: boolean | undefined;
503
+ supportsToolUse?: boolean | undefined;
504
+ default?: boolean | undefined;
505
+ }, {
506
+ code: string;
507
+ label: string;
508
+ description?: string | undefined;
509
+ tier?: "premium" | "standard" | "lite" | undefined;
510
+ contextWindow?: number | undefined;
511
+ supportsVision?: boolean | undefined;
512
+ supportsToolUse?: boolean | undefined;
513
+ default?: boolean | undefined;
514
+ }>, "many">;
515
+ modes: z.ZodArray<z.ZodObject<{
516
+ code: z.ZodString;
517
+ label: z.ZodString;
518
+ description: z.ZodOptional<z.ZodString>;
519
+ default: z.ZodOptional<z.ZodBoolean>;
520
+ }, "strip", z.ZodTypeAny, {
521
+ code: string;
522
+ label: string;
523
+ description?: string | undefined;
524
+ default?: boolean | undefined;
525
+ }, {
526
+ code: string;
527
+ label: string;
528
+ description?: string | undefined;
529
+ default?: boolean | undefined;
530
+ }>, "many">;
531
+ }, "strip", z.ZodTypeAny, {
532
+ kind: "claude" | "codex";
533
+ installed: boolean;
534
+ models: {
535
+ code: string;
536
+ label: string;
537
+ description?: string | undefined;
538
+ tier?: "premium" | "standard" | "lite" | undefined;
539
+ contextWindow?: number | undefined;
540
+ supportsVision?: boolean | undefined;
541
+ supportsToolUse?: boolean | undefined;
542
+ default?: boolean | undefined;
543
+ }[];
544
+ modes: {
545
+ code: string;
546
+ label: string;
547
+ description?: string | undefined;
548
+ default?: boolean | undefined;
549
+ }[];
550
+ binaryPath?: string | undefined;
551
+ version?: string | undefined;
552
+ unavailableReason?: string | undefined;
553
+ }, {
554
+ kind: "claude" | "codex";
555
+ installed: boolean;
556
+ models: {
557
+ code: string;
558
+ label: string;
559
+ description?: string | undefined;
560
+ tier?: "premium" | "standard" | "lite" | undefined;
561
+ contextWindow?: number | undefined;
562
+ supportsVision?: boolean | undefined;
563
+ supportsToolUse?: boolean | undefined;
564
+ default?: boolean | undefined;
565
+ }[];
566
+ modes: {
567
+ code: string;
568
+ label: string;
569
+ description?: string | undefined;
570
+ default?: boolean | undefined;
571
+ }[];
572
+ binaryPath?: string | undefined;
573
+ version?: string | undefined;
574
+ unavailableReason?: string | undefined;
575
+ }>;
576
+ export declare const agentManifestPayloadSchema: z.ZodObject<{
577
+ manifestVersion: z.ZodLiteral<1>;
578
+ backends: z.ZodArray<z.ZodObject<{
579
+ kind: z.ZodEnum<["claude", "codex"]>;
580
+ installed: z.ZodBoolean;
581
+ binaryPath: z.ZodOptional<z.ZodString>;
582
+ version: z.ZodOptional<z.ZodString>;
583
+ unavailableReason: z.ZodOptional<z.ZodString>;
584
+ models: z.ZodArray<z.ZodObject<{
585
+ code: z.ZodString;
586
+ label: z.ZodString;
587
+ description: z.ZodOptional<z.ZodString>;
588
+ tier: z.ZodOptional<z.ZodEnum<["premium", "standard", "lite"]>>;
589
+ contextWindow: z.ZodOptional<z.ZodNumber>;
590
+ supportsVision: z.ZodOptional<z.ZodBoolean>;
591
+ supportsToolUse: z.ZodOptional<z.ZodBoolean>;
592
+ default: z.ZodOptional<z.ZodBoolean>;
593
+ }, "strip", z.ZodTypeAny, {
594
+ code: string;
595
+ label: string;
596
+ description?: string | undefined;
597
+ tier?: "premium" | "standard" | "lite" | undefined;
598
+ contextWindow?: number | undefined;
599
+ supportsVision?: boolean | undefined;
600
+ supportsToolUse?: boolean | undefined;
601
+ default?: boolean | undefined;
602
+ }, {
603
+ code: string;
604
+ label: string;
605
+ description?: string | undefined;
606
+ tier?: "premium" | "standard" | "lite" | undefined;
607
+ contextWindow?: number | undefined;
608
+ supportsVision?: boolean | undefined;
609
+ supportsToolUse?: boolean | undefined;
610
+ default?: boolean | undefined;
611
+ }>, "many">;
612
+ modes: z.ZodArray<z.ZodObject<{
613
+ code: z.ZodString;
614
+ label: z.ZodString;
615
+ description: z.ZodOptional<z.ZodString>;
616
+ default: z.ZodOptional<z.ZodBoolean>;
617
+ }, "strip", z.ZodTypeAny, {
618
+ code: string;
619
+ label: string;
620
+ description?: string | undefined;
621
+ default?: boolean | undefined;
622
+ }, {
623
+ code: string;
624
+ label: string;
625
+ description?: string | undefined;
626
+ default?: boolean | undefined;
627
+ }>, "many">;
628
+ }, "strip", z.ZodTypeAny, {
629
+ kind: "claude" | "codex";
630
+ installed: boolean;
631
+ models: {
632
+ code: string;
633
+ label: string;
634
+ description?: string | undefined;
635
+ tier?: "premium" | "standard" | "lite" | undefined;
636
+ contextWindow?: number | undefined;
637
+ supportsVision?: boolean | undefined;
638
+ supportsToolUse?: boolean | undefined;
639
+ default?: boolean | undefined;
640
+ }[];
641
+ modes: {
642
+ code: string;
643
+ label: string;
644
+ description?: string | undefined;
645
+ default?: boolean | undefined;
646
+ }[];
647
+ binaryPath?: string | undefined;
648
+ version?: string | undefined;
649
+ unavailableReason?: string | undefined;
650
+ }, {
651
+ kind: "claude" | "codex";
652
+ installed: boolean;
653
+ models: {
654
+ code: string;
655
+ label: string;
656
+ description?: string | undefined;
657
+ tier?: "premium" | "standard" | "lite" | undefined;
658
+ contextWindow?: number | undefined;
659
+ supportsVision?: boolean | undefined;
660
+ supportsToolUse?: boolean | undefined;
661
+ default?: boolean | undefined;
662
+ }[];
663
+ modes: {
664
+ code: string;
665
+ label: string;
666
+ description?: string | undefined;
667
+ default?: boolean | undefined;
668
+ }[];
669
+ binaryPath?: string | undefined;
670
+ version?: string | undefined;
671
+ unavailableReason?: string | undefined;
672
+ }>, "many">;
673
+ }, "strip", z.ZodTypeAny, {
674
+ manifestVersion: 1;
675
+ backends: {
676
+ kind: "claude" | "codex";
677
+ installed: boolean;
678
+ models: {
679
+ code: string;
680
+ label: string;
681
+ description?: string | undefined;
682
+ tier?: "premium" | "standard" | "lite" | undefined;
683
+ contextWindow?: number | undefined;
684
+ supportsVision?: boolean | undefined;
685
+ supportsToolUse?: boolean | undefined;
686
+ default?: boolean | undefined;
687
+ }[];
688
+ modes: {
689
+ code: string;
690
+ label: string;
691
+ description?: string | undefined;
692
+ default?: boolean | undefined;
693
+ }[];
694
+ binaryPath?: string | undefined;
695
+ version?: string | undefined;
696
+ unavailableReason?: string | undefined;
697
+ }[];
698
+ }, {
699
+ manifestVersion: 1;
700
+ backends: {
701
+ kind: "claude" | "codex";
702
+ installed: boolean;
703
+ models: {
704
+ code: string;
705
+ label: string;
706
+ description?: string | undefined;
707
+ tier?: "premium" | "standard" | "lite" | undefined;
708
+ contextWindow?: number | undefined;
709
+ supportsVision?: boolean | undefined;
710
+ supportsToolUse?: boolean | undefined;
711
+ default?: boolean | undefined;
712
+ }[];
713
+ modes: {
714
+ code: string;
715
+ label: string;
716
+ description?: string | undefined;
717
+ default?: boolean | undefined;
718
+ }[];
719
+ binaryPath?: string | undefined;
720
+ version?: string | undefined;
721
+ unavailableReason?: string | undefined;
722
+ }[];
723
+ }>;
724
+ export declare const agentDefaultsEntrySchema: z.ZodObject<{
725
+ model: z.ZodOptional<z.ZodString>;
726
+ mode: z.ZodOptional<z.ZodString>;
727
+ }, "strip", z.ZodTypeAny, {
728
+ mode?: string | undefined;
729
+ model?: string | undefined;
730
+ }, {
731
+ mode?: string | undefined;
732
+ model?: string | undefined;
733
+ }>;
734
+ export declare const agentDefaultsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
735
+ model: z.ZodOptional<z.ZodString>;
736
+ mode: z.ZodOptional<z.ZodString>;
737
+ }, "strip", z.ZodTypeAny, {
738
+ mode?: string | undefined;
739
+ model?: string | undefined;
740
+ }, {
741
+ mode?: string | undefined;
742
+ model?: string | undefined;
743
+ }>>;
744
+ export type AgentDefaultsEntry = z.infer<typeof agentDefaultsEntrySchema>;
745
+ export type AgentDefaults = z.infer<typeof agentDefaultsSchema>;
746
+ export declare const sessionStickySchema: z.ZodObject<{
747
+ model: z.ZodOptional<z.ZodString>;
748
+ mode: z.ZodOptional<z.ZodString>;
749
+ }, "strip", z.ZodTypeAny, {
750
+ mode?: string | undefined;
751
+ model?: string | undefined;
752
+ }, {
753
+ mode?: string | undefined;
754
+ model?: string | undefined;
755
+ }>;
756
+ export declare const sessionCreatePayloadSchema: z.ZodObject<{
757
+ sessionId: z.ZodString;
758
+ workDir: z.ZodOptional<z.ZodString>;
759
+ backend: z.ZodEnum<["claude", "codex"]>;
760
+ sticky: z.ZodOptional<z.ZodObject<{
761
+ model: z.ZodOptional<z.ZodString>;
762
+ mode: z.ZodOptional<z.ZodString>;
763
+ }, "strip", z.ZodTypeAny, {
764
+ mode?: string | undefined;
765
+ model?: string | undefined;
766
+ }, {
767
+ mode?: string | undefined;
768
+ model?: string | undefined;
769
+ }>>;
770
+ systemPrompt: z.ZodOptional<z.ZodString>;
771
+ useBrainCore: z.ZodOptional<z.ZodBoolean>;
772
+ initialInput: z.ZodOptional<z.ZodString>;
773
+ backendSessionId: z.ZodOptional<z.ZodString>;
774
+ useWorktree: z.ZodOptional<z.ZodBoolean>;
775
+ }, "strip", z.ZodTypeAny, {
776
+ sessionId: string;
777
+ backend: "claude" | "codex";
778
+ workDir?: string | undefined;
779
+ useBrainCore?: boolean | undefined;
780
+ sticky?: {
781
+ mode?: string | undefined;
782
+ model?: string | undefined;
783
+ } | undefined;
784
+ systemPrompt?: string | undefined;
785
+ initialInput?: string | undefined;
786
+ backendSessionId?: string | undefined;
787
+ useWorktree?: boolean | undefined;
788
+ }, {
789
+ sessionId: string;
790
+ backend: "claude" | "codex";
791
+ workDir?: string | undefined;
792
+ useBrainCore?: boolean | undefined;
793
+ sticky?: {
794
+ mode?: string | undefined;
795
+ model?: string | undefined;
796
+ } | undefined;
797
+ systemPrompt?: string | undefined;
798
+ initialInput?: string | undefined;
799
+ backendSessionId?: string | undefined;
800
+ useWorktree?: boolean | undefined;
801
+ }>;
802
+ export declare const sessionInputPayloadSchema: z.ZodObject<{
803
+ sessionId: z.ZodString;
804
+ content: z.ZodString;
805
+ messageMeta: z.ZodOptional<z.ZodObject<{
806
+ model: z.ZodOptional<z.ZodString>;
807
+ mode: z.ZodOptional<z.ZodString>;
808
+ }, "strip", z.ZodTypeAny, {
809
+ mode?: string | undefined;
810
+ model?: string | undefined;
811
+ }, {
812
+ mode?: string | undefined;
813
+ model?: string | undefined;
814
+ }>>;
815
+ backendSessionId: z.ZodOptional<z.ZodString>;
816
+ workDir: z.ZodOptional<z.ZodString>;
817
+ useBrainCore: z.ZodOptional<z.ZodBoolean>;
818
+ }, "strip", z.ZodTypeAny, {
819
+ sessionId: string;
820
+ content: string;
821
+ workDir?: string | undefined;
822
+ useBrainCore?: boolean | undefined;
823
+ backendSessionId?: string | undefined;
824
+ messageMeta?: {
825
+ mode?: string | undefined;
826
+ model?: string | undefined;
827
+ } | undefined;
828
+ }, {
829
+ sessionId: string;
830
+ content: string;
831
+ workDir?: string | undefined;
832
+ useBrainCore?: boolean | undefined;
833
+ backendSessionId?: string | undefined;
834
+ messageMeta?: {
835
+ mode?: string | undefined;
836
+ model?: string | undefined;
837
+ } | undefined;
838
+ }>;
839
+ export declare const sessionUpdateStickyPayloadSchema: z.ZodObject<{
840
+ sessionId: z.ZodString;
841
+ sticky: z.ZodEffects<z.ZodObject<{
842
+ model: z.ZodOptional<z.ZodString>;
843
+ mode: z.ZodOptional<z.ZodString>;
844
+ }, "strip", z.ZodTypeAny, {
845
+ mode?: string | undefined;
846
+ model?: string | undefined;
847
+ }, {
848
+ mode?: string | undefined;
849
+ model?: string | undefined;
850
+ }>, {
851
+ mode?: string | undefined;
852
+ model?: string | undefined;
853
+ }, {
854
+ mode?: string | undefined;
855
+ model?: string | undefined;
856
+ }>;
857
+ }, "strip", z.ZodTypeAny, {
858
+ sessionId: string;
859
+ sticky: {
860
+ mode?: string | undefined;
861
+ model?: string | undefined;
862
+ };
863
+ }, {
864
+ sessionId: string;
865
+ sticky: {
866
+ mode?: string | undefined;
867
+ model?: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