spawnfile 0.1.1 → 0.1.2

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 (85) hide show
  1. package/README.md +79 -396
  2. package/dist/cli/modelCommands.d.ts +3 -0
  3. package/dist/cli/modelCommands.js +68 -0
  4. package/dist/cli/runCli.d.ts +6 -1
  5. package/dist/cli/runCli.js +12 -67
  6. package/dist/cli/runtimeCommands.d.ts +3 -0
  7. package/dist/cli/runtimeCommands.js +20 -0
  8. package/dist/cli/surfaceCommands.d.ts +3 -0
  9. package/dist/cli/surfaceCommands.js +98 -0
  10. package/dist/compiler/agentSurfaces.js +51 -5
  11. package/dist/compiler/buildCompilePlan.js +36 -40
  12. package/dist/compiler/buildCompilePlanRuntime.d.ts +14 -0
  13. package/dist/compiler/buildCompilePlanRuntime.js +39 -0
  14. package/dist/compiler/buildCompilePlanTeams.d.ts +5 -0
  15. package/dist/compiler/buildCompilePlanTeams.js +38 -0
  16. package/dist/compiler/compilePlanHelpers.js +4 -1
  17. package/dist/compiler/compileProject.js +62 -13
  18. package/dist/compiler/compileProjectSupport.d.ts +17 -0
  19. package/dist/compiler/compileProjectSupport.js +136 -0
  20. package/dist/compiler/containerArtifacts.d.ts +6 -1
  21. package/dist/compiler/containerArtifacts.js +26 -4
  22. package/dist/compiler/containerArtifactsPlans.js +16 -1
  23. package/dist/compiler/containerArtifactsRender.d.ts +4 -2
  24. package/dist/compiler/containerArtifactsRender.js +21 -126
  25. package/dist/compiler/containerArtifactsTypes.d.ts +7 -0
  26. package/dist/compiler/containerEntrypointRender.d.ts +12 -0
  27. package/dist/compiler/containerEntrypointRender.js +186 -0
  28. package/dist/compiler/index.d.ts +2 -0
  29. package/dist/compiler/index.js +2 -0
  30. package/dist/compiler/interactiveSurfaceScopes.d.ts +2 -0
  31. package/dist/compiler/interactiveSurfaceScopes.js +21 -0
  32. package/dist/compiler/moltnetArtifacts.d.ts +27 -0
  33. package/dist/compiler/moltnetArtifacts.js +204 -0
  34. package/dist/compiler/moltnetBinaries.d.ts +4 -0
  35. package/dist/compiler/moltnetBinaries.js +103 -0
  36. package/dist/compiler/moltnetClientConfig.d.ts +11 -0
  37. package/dist/compiler/moltnetClientConfig.js +89 -0
  38. package/dist/compiler/moltnetRepresentativeResolution.d.ts +16 -0
  39. package/dist/compiler/moltnetRepresentativeResolution.js +86 -0
  40. package/dist/compiler/moltnetResolution.d.ts +3 -0
  41. package/dist/compiler/moltnetResolution.js +201 -0
  42. package/dist/compiler/runProject.js +1 -1
  43. package/dist/compiler/surfaceDefinitions.d.ts +55 -0
  44. package/dist/compiler/surfaceDefinitions.js +204 -0
  45. package/dist/compiler/teamContextHelpers.d.ts +18 -0
  46. package/dist/compiler/teamContextHelpers.js +112 -0
  47. package/dist/compiler/teamContextSupport.d.ts +4 -0
  48. package/dist/compiler/teamContextSupport.js +264 -0
  49. package/dist/compiler/teamContextSupport.testHelpers.d.ts +16 -0
  50. package/dist/compiler/teamContextSupport.testHelpers.js +68 -0
  51. package/dist/compiler/teamContextTypes.d.ts +28 -0
  52. package/dist/compiler/teamContextTypes.js +1 -0
  53. package/dist/compiler/teamRoster.d.ts +12 -0
  54. package/dist/compiler/teamRoster.js +48 -0
  55. package/dist/compiler/teamRosterEntries.d.ts +13 -0
  56. package/dist/compiler/teamRosterEntries.js +230 -0
  57. package/dist/compiler/teamRosterTypes.d.ts +45 -0
  58. package/dist/compiler/teamRosterTypes.js +1 -0
  59. package/dist/compiler/types.d.ts +72 -6
  60. package/dist/compiler/updateProjectRuntime.d.ts +9 -0
  61. package/dist/compiler/updateProjectRuntime.js +67 -0
  62. package/dist/compiler/updateProjectSurfaces.d.ts +8 -0
  63. package/dist/compiler/updateProjectSurfaces.js +106 -0
  64. package/dist/manifest/loadManifest.js +4 -4
  65. package/dist/manifest/renderSpawnfile.js +74 -8
  66. package/dist/manifest/scaffold.js +1 -3
  67. package/dist/manifest/schemas.d.ts +227 -17
  68. package/dist/manifest/schemas.js +62 -20
  69. package/dist/manifest/surfaceSchemas.d.ts +154 -0
  70. package/dist/manifest/surfaceSchemas.js +77 -5
  71. package/dist/runtime/common.js +3 -0
  72. package/dist/runtime/openclaw/adapter.js +38 -5
  73. package/dist/runtime/openclaw/moltnet.d.ts +12 -0
  74. package/dist/runtime/openclaw/moltnet.js +124 -0
  75. package/dist/runtime/openclaw/surfaces.js +3 -0
  76. package/dist/runtime/picoclaw/adapter.js +27 -8
  77. package/dist/runtime/picoclaw/pico.d.ts +2 -0
  78. package/dist/runtime/picoclaw/pico.js +2 -0
  79. package/dist/runtime/picoclaw/surfaces.js +11 -0
  80. package/dist/runtime/tinyclaw/adapter.js +22 -8
  81. package/dist/runtime/tinyclaw/runAuth.js +28 -1
  82. package/dist/runtime/tinyclaw/surfaces.js +8 -0
  83. package/dist/runtime/types.d.ts +11 -0
  84. package/package.json +4 -2
  85. package/runtimes.yaml +4 -4
@@ -29,7 +29,8 @@ const orderDiscordSurface = (surface) => {
29
29
  }
30
30
  return withDefinedEntries([
31
31
  ["access", orderDiscordSurfaceAccess(surface.access)],
32
- ["bot_token_secret", surface.bot_token_secret]
32
+ ["bot_token_secret", surface.bot_token_secret],
33
+ ["identity", surface.identity]
33
34
  ]);
34
35
  };
35
36
  const orderDiscordSurfaceAccess = (access) => {
@@ -49,7 +50,8 @@ const orderTelegramSurface = (surface) => {
49
50
  }
50
51
  return withDefinedEntries([
51
52
  ["access", orderTelegramSurfaceAccess(surface.access)],
52
- ["bot_token_secret", surface.bot_token_secret]
53
+ ["bot_token_secret", surface.bot_token_secret],
54
+ ["identity", surface.identity]
53
55
  ]);
54
56
  };
55
57
  const orderTelegramSurfaceAccess = (access) => {
@@ -62,11 +64,55 @@ const orderTelegramSurfaceAccess = (access) => {
62
64
  ["chats", access.chats]
63
65
  ]);
64
66
  };
67
+ const orderWebhookSurface = (surface) => {
68
+ if (!surface) {
69
+ return undefined;
70
+ }
71
+ return withDefinedEntries([
72
+ ["url", surface.url],
73
+ ["signing_secret", surface.signing_secret]
74
+ ]);
75
+ };
76
+ const orderMoltnetRoomBehavior = (behavior) => {
77
+ if (!behavior) {
78
+ return undefined;
79
+ }
80
+ return withDefinedEntries([
81
+ ["read", behavior.read],
82
+ ["reply", behavior.reply]
83
+ ]);
84
+ };
85
+ const orderMoltnetDm = (dms) => {
86
+ if (!dms) {
87
+ return undefined;
88
+ }
89
+ return withDefinedEntries([
90
+ ["enabled", dms.enabled],
91
+ ["read", dms.read],
92
+ ["reply", dms.reply]
93
+ ]);
94
+ };
95
+ const orderMoltnetAttachment = (attachment) => withDefinedEntries([
96
+ ["network", attachment.network],
97
+ [
98
+ "rooms",
99
+ attachment.rooms
100
+ ? Object.fromEntries(Object.entries(attachment.rooms)
101
+ .sort(([left], [right]) => left.localeCompare(right))
102
+ .map(([roomId, behavior]) => [roomId, orderMoltnetRoomBehavior(behavior)]))
103
+ : undefined
104
+ ],
105
+ ["dms", orderMoltnetDm(attachment.dms)]
106
+ ]);
107
+ const orderMoltnetSurface = (surface) => surface?.map(orderMoltnetAttachment);
65
108
  const orderWhatsAppSurface = (surface) => {
66
109
  if (!surface) {
67
110
  return undefined;
68
111
  }
69
- return withDefinedEntries([["access", orderWhatsAppSurfaceAccess(surface.access)]]);
112
+ return withDefinedEntries([
113
+ ["access", orderWhatsAppSurfaceAccess(surface.access)],
114
+ ["identity", surface.identity]
115
+ ]);
70
116
  };
71
117
  const orderWhatsAppSurfaceAccess = (access) => {
72
118
  if (!access) {
@@ -85,7 +131,8 @@ const orderSlackSurface = (surface) => {
85
131
  return withDefinedEntries([
86
132
  ["access", orderSlackSurfaceAccess(surface.access)],
87
133
  ["bot_token_secret", surface.bot_token_secret],
88
- ["app_token_secret", surface.app_token_secret]
134
+ ["app_token_secret", surface.app_token_secret],
135
+ ["identity", surface.identity]
89
136
  ]);
90
137
  };
91
138
  const orderSlackSurfaceAccess = (access) => {
@@ -156,9 +203,24 @@ const orderSurfaces = (surfaces) => {
156
203
  ["discord", orderDiscordSurface(surfaces.discord)],
157
204
  ["telegram", orderTelegramSurface(surfaces.telegram)],
158
205
  ["whatsapp", orderWhatsAppSurface(surfaces.whatsapp)],
159
- ["slack", orderSlackSurface(surfaces.slack)]
206
+ ["slack", orderSlackSurface(surfaces.slack)],
207
+ ["webhook", orderWebhookSurface(surfaces.webhook)],
208
+ ["moltnet", orderMoltnetSurface(surfaces.moltnet)]
160
209
  ]);
161
210
  };
211
+ const orderTeamNetworks = (networks) => networks?.map((network) => withDefinedEntries([
212
+ ["id", network.id],
213
+ ["provider", network.provider],
214
+ ["name", network.name],
215
+ ["expose", network.expose],
216
+ [
217
+ "rooms",
218
+ network.rooms.map((room) => withDefinedEntries([
219
+ ["id", room.id],
220
+ ["members", room.members]
221
+ ]))
222
+ ]
223
+ ]));
162
224
  const renderSections = (sections) => sections
163
225
  .filter(hasEntries)
164
226
  .map((section) => YAML.stringify(section))
@@ -167,7 +229,8 @@ const orderAgentManifestSections = (manifest) => [
167
229
  withDefinedEntries([
168
230
  ["spawnfile_version", manifest.spawnfile_version],
169
231
  ["kind", manifest.kind],
170
- ["name", manifest.name]
232
+ ["name", manifest.name],
233
+ ["expose", manifest.expose]
171
234
  ]),
172
235
  withDefinedEntries([["runtime", orderRuntimeBinding(manifest.runtime)]]),
173
236
  withDefinedEntries([["execution", orderExecution(manifest.execution)]]),
@@ -192,7 +255,8 @@ const orderTeamManifestSections = (manifest) => [
192
255
  withDefinedEntries([["execution", orderExecution(manifest.execution)]]),
193
256
  withDefinedEntries([
194
257
  ["docs", orderDocs(manifest.docs)],
195
- ["shared", orderSharedSurface(manifest.shared)]
258
+ ["shared", orderSharedSurface(manifest.shared)],
259
+ ["networks", orderTeamNetworks(manifest.networks)]
196
260
  ]),
197
261
  withDefinedEntries([
198
262
  ["skills", manifest.skills],
@@ -203,7 +267,9 @@ const orderTeamManifestSections = (manifest) => [
203
267
  ]),
204
268
  withDefinedEntries([
205
269
  ["members", manifest.members],
206
- ["structure", manifest.structure]
270
+ ["mode", manifest.mode],
271
+ ["lead", manifest.lead],
272
+ ["external", manifest.external]
207
273
  ])
208
274
  ];
209
275
  export const renderSpawnfile = (manifest) => renderSections(manifest.kind === "agent"
@@ -35,7 +35,5 @@ export const createTeamScaffoldManifest = () => ({
35
35
  system: "TEAM.md"
36
36
  },
37
37
  members: [],
38
- structure: {
39
- mode: "swarm"
40
- }
38
+ mode: "swarm"
41
39
  });
@@ -175,7 +175,22 @@ declare const memberSchema: z.ZodObject<{
175
175
  id: z.ZodString;
176
176
  ref: z.ZodString;
177
177
  }, z.core.$strict>;
178
+ declare const teamNetworkRoomSchema: z.ZodObject<{
179
+ id: z.ZodString;
180
+ members: z.ZodArray<z.ZodString>;
181
+ }, z.core.$strict>;
182
+ declare const teamNetworkSchema: z.ZodObject<{
183
+ expose: z.ZodOptional<z.ZodBoolean>;
184
+ id: z.ZodString;
185
+ name: z.ZodOptional<z.ZodString>;
186
+ provider: z.ZodLiteral<"moltnet">;
187
+ rooms: z.ZodArray<z.ZodObject<{
188
+ id: z.ZodString;
189
+ members: z.ZodArray<z.ZodString>;
190
+ }, z.core.$strict>>;
191
+ }, z.core.$strict>;
178
192
  declare const agentManifestSchema: z.ZodObject<{
193
+ description: z.ZodOptional<z.ZodString>;
179
194
  docs: z.ZodOptional<z.ZodObject<{
180
195
  extras: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
181
196
  heartbeat: z.ZodOptional<z.ZodString>;
@@ -311,7 +326,36 @@ declare const agentManifestSchema: z.ZodObject<{
311
326
  users: z.ZodOptional<z.ZodArray<z.ZodString>>;
312
327
  }, z.core.$strict>>;
313
328
  bot_token_secret: z.ZodOptional<z.ZodString>;
329
+ identity: z.ZodOptional<z.ZodObject<{
330
+ user_id: z.ZodString;
331
+ }, z.core.$strict>>;
314
332
  }, z.core.$strict>>;
333
+ moltnet: z.ZodOptional<z.ZodArray<z.ZodObject<{
334
+ dms: z.ZodOptional<z.ZodObject<{
335
+ enabled: z.ZodBoolean;
336
+ read: z.ZodOptional<z.ZodEnum<{
337
+ all: "all";
338
+ mentions: "mentions";
339
+ thread_only: "thread_only";
340
+ }>>;
341
+ reply: z.ZodOptional<z.ZodEnum<{
342
+ never: "never";
343
+ auto: "auto";
344
+ }>>;
345
+ }, z.core.$strict>>;
346
+ network: z.ZodString;
347
+ rooms: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
348
+ read: z.ZodOptional<z.ZodEnum<{
349
+ all: "all";
350
+ mentions: "mentions";
351
+ thread_only: "thread_only";
352
+ }>>;
353
+ reply: z.ZodOptional<z.ZodEnum<{
354
+ never: "never";
355
+ auto: "auto";
356
+ }>>;
357
+ }, z.core.$strict>>>;
358
+ }, z.core.$strict>>>;
315
359
  slack: z.ZodOptional<z.ZodObject<{
316
360
  access: z.ZodOptional<z.ZodObject<{
317
361
  channels: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -324,6 +368,9 @@ declare const agentManifestSchema: z.ZodObject<{
324
368
  }, z.core.$strict>>;
325
369
  app_token_secret: z.ZodOptional<z.ZodString>;
326
370
  bot_token_secret: z.ZodOptional<z.ZodString>;
371
+ identity: z.ZodOptional<z.ZodObject<{
372
+ user_id: z.ZodString;
373
+ }, z.core.$strict>>;
327
374
  }, z.core.$strict>>;
328
375
  telegram: z.ZodOptional<z.ZodObject<{
329
376
  access: z.ZodOptional<z.ZodObject<{
@@ -336,6 +383,14 @@ declare const agentManifestSchema: z.ZodObject<{
336
383
  users: z.ZodOptional<z.ZodArray<z.ZodString>>;
337
384
  }, z.core.$strict>>;
338
385
  bot_token_secret: z.ZodOptional<z.ZodString>;
386
+ identity: z.ZodOptional<z.ZodObject<{
387
+ user_id: z.ZodOptional<z.ZodString>;
388
+ username: z.ZodOptional<z.ZodString>;
389
+ }, z.core.$strict>>;
390
+ }, z.core.$strict>>;
391
+ webhook: z.ZodOptional<z.ZodObject<{
392
+ signing_secret: z.ZodOptional<z.ZodString>;
393
+ url: z.ZodString;
339
394
  }, z.core.$strict>>;
340
395
  whatsapp: z.ZodOptional<z.ZodObject<{
341
396
  access: z.ZodOptional<z.ZodObject<{
@@ -347,9 +402,13 @@ declare const agentManifestSchema: z.ZodObject<{
347
402
  }>>;
348
403
  users: z.ZodOptional<z.ZodArray<z.ZodString>>;
349
404
  }, z.core.$strict>>;
405
+ identity: z.ZodOptional<z.ZodObject<{
406
+ phone: z.ZodString;
407
+ }, z.core.$strict>>;
350
408
  }, z.core.$strict>>;
351
409
  }, z.core.$strict>>;
352
410
  spawnfile_version: z.ZodLiteral<"0.1">;
411
+ expose: z.ZodOptional<z.ZodBoolean>;
353
412
  kind: z.ZodLiteral<"agent">;
354
413
  subagents: z.ZodOptional<z.ZodArray<z.ZodObject<{
355
414
  id: z.ZodString;
@@ -357,6 +416,7 @@ declare const agentManifestSchema: z.ZodObject<{
357
416
  }, z.core.$strict>>>;
358
417
  }, z.core.$strict>;
359
418
  declare const teamManifestSchema: z.ZodObject<{
419
+ description: z.ZodOptional<z.ZodString>;
360
420
  docs: z.ZodOptional<z.ZodObject<{
361
421
  extras: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
362
422
  heartbeat: z.ZodOptional<z.ZodString>;
@@ -492,7 +552,36 @@ declare const teamManifestSchema: z.ZodObject<{
492
552
  users: z.ZodOptional<z.ZodArray<z.ZodString>>;
493
553
  }, z.core.$strict>>;
494
554
  bot_token_secret: z.ZodOptional<z.ZodString>;
555
+ identity: z.ZodOptional<z.ZodObject<{
556
+ user_id: z.ZodString;
557
+ }, z.core.$strict>>;
495
558
  }, z.core.$strict>>;
559
+ moltnet: z.ZodOptional<z.ZodArray<z.ZodObject<{
560
+ dms: z.ZodOptional<z.ZodObject<{
561
+ enabled: z.ZodBoolean;
562
+ read: z.ZodOptional<z.ZodEnum<{
563
+ all: "all";
564
+ mentions: "mentions";
565
+ thread_only: "thread_only";
566
+ }>>;
567
+ reply: z.ZodOptional<z.ZodEnum<{
568
+ never: "never";
569
+ auto: "auto";
570
+ }>>;
571
+ }, z.core.$strict>>;
572
+ network: z.ZodString;
573
+ rooms: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
574
+ read: z.ZodOptional<z.ZodEnum<{
575
+ all: "all";
576
+ mentions: "mentions";
577
+ thread_only: "thread_only";
578
+ }>>;
579
+ reply: z.ZodOptional<z.ZodEnum<{
580
+ never: "never";
581
+ auto: "auto";
582
+ }>>;
583
+ }, z.core.$strict>>>;
584
+ }, z.core.$strict>>>;
496
585
  slack: z.ZodOptional<z.ZodObject<{
497
586
  access: z.ZodOptional<z.ZodObject<{
498
587
  channels: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -505,6 +594,9 @@ declare const teamManifestSchema: z.ZodObject<{
505
594
  }, z.core.$strict>>;
506
595
  app_token_secret: z.ZodOptional<z.ZodString>;
507
596
  bot_token_secret: z.ZodOptional<z.ZodString>;
597
+ identity: z.ZodOptional<z.ZodObject<{
598
+ user_id: z.ZodString;
599
+ }, z.core.$strict>>;
508
600
  }, z.core.$strict>>;
509
601
  telegram: z.ZodOptional<z.ZodObject<{
510
602
  access: z.ZodOptional<z.ZodObject<{
@@ -517,6 +609,14 @@ declare const teamManifestSchema: z.ZodObject<{
517
609
  users: z.ZodOptional<z.ZodArray<z.ZodString>>;
518
610
  }, z.core.$strict>>;
519
611
  bot_token_secret: z.ZodOptional<z.ZodString>;
612
+ identity: z.ZodOptional<z.ZodObject<{
613
+ user_id: z.ZodOptional<z.ZodString>;
614
+ username: z.ZodOptional<z.ZodString>;
615
+ }, z.core.$strict>>;
616
+ }, z.core.$strict>>;
617
+ webhook: z.ZodOptional<z.ZodObject<{
618
+ signing_secret: z.ZodOptional<z.ZodString>;
619
+ url: z.ZodString;
520
620
  }, z.core.$strict>>;
521
621
  whatsapp: z.ZodOptional<z.ZodObject<{
522
622
  access: z.ZodOptional<z.ZodObject<{
@@ -528,14 +628,33 @@ declare const teamManifestSchema: z.ZodObject<{
528
628
  }>>;
529
629
  users: z.ZodOptional<z.ZodArray<z.ZodString>>;
530
630
  }, z.core.$strict>>;
631
+ identity: z.ZodOptional<z.ZodObject<{
632
+ phone: z.ZodString;
633
+ }, z.core.$strict>>;
531
634
  }, z.core.$strict>>;
532
635
  }, z.core.$strict>>;
533
636
  spawnfile_version: z.ZodLiteral<"0.1">;
637
+ external: z.ZodOptional<z.ZodArray<z.ZodString>>;
534
638
  kind: z.ZodLiteral<"team">;
639
+ lead: z.ZodOptional<z.ZodString>;
535
640
  members: z.ZodArray<z.ZodObject<{
536
641
  id: z.ZodString;
537
642
  ref: z.ZodString;
538
643
  }, z.core.$strict>>;
644
+ mode: z.ZodEnum<{
645
+ hierarchical: "hierarchical";
646
+ swarm: "swarm";
647
+ }>;
648
+ networks: z.ZodOptional<z.ZodArray<z.ZodObject<{
649
+ expose: z.ZodOptional<z.ZodBoolean>;
650
+ id: z.ZodString;
651
+ name: z.ZodOptional<z.ZodString>;
652
+ provider: z.ZodLiteral<"moltnet">;
653
+ rooms: z.ZodArray<z.ZodObject<{
654
+ id: z.ZodString;
655
+ members: z.ZodArray<z.ZodString>;
656
+ }, z.core.$strict>>;
657
+ }, z.core.$strict>>>;
539
658
  shared: z.ZodOptional<z.ZodObject<{
540
659
  env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
541
660
  mcp_servers: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -564,16 +683,9 @@ declare const teamManifestSchema: z.ZodObject<{
564
683
  }, z.core.$strict>>;
565
684
  }, z.core.$strict>>>;
566
685
  }, z.core.$strict>>;
567
- structure: z.ZodObject<{
568
- external: z.ZodOptional<z.ZodArray<z.ZodString>>;
569
- leader: z.ZodOptional<z.ZodString>;
570
- mode: z.ZodEnum<{
571
- hierarchical: "hierarchical";
572
- swarm: "swarm";
573
- }>;
574
- }, z.core.$strict>;
575
686
  }, z.core.$strict>;
576
687
  export declare const manifestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
688
+ description: z.ZodOptional<z.ZodString>;
577
689
  docs: z.ZodOptional<z.ZodObject<{
578
690
  extras: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
579
691
  heartbeat: z.ZodOptional<z.ZodString>;
@@ -709,7 +821,36 @@ export declare const manifestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
709
821
  users: z.ZodOptional<z.ZodArray<z.ZodString>>;
710
822
  }, z.core.$strict>>;
711
823
  bot_token_secret: z.ZodOptional<z.ZodString>;
824
+ identity: z.ZodOptional<z.ZodObject<{
825
+ user_id: z.ZodString;
826
+ }, z.core.$strict>>;
712
827
  }, z.core.$strict>>;
828
+ moltnet: z.ZodOptional<z.ZodArray<z.ZodObject<{
829
+ dms: z.ZodOptional<z.ZodObject<{
830
+ enabled: z.ZodBoolean;
831
+ read: z.ZodOptional<z.ZodEnum<{
832
+ all: "all";
833
+ mentions: "mentions";
834
+ thread_only: "thread_only";
835
+ }>>;
836
+ reply: z.ZodOptional<z.ZodEnum<{
837
+ never: "never";
838
+ auto: "auto";
839
+ }>>;
840
+ }, z.core.$strict>>;
841
+ network: z.ZodString;
842
+ rooms: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
843
+ read: z.ZodOptional<z.ZodEnum<{
844
+ all: "all";
845
+ mentions: "mentions";
846
+ thread_only: "thread_only";
847
+ }>>;
848
+ reply: z.ZodOptional<z.ZodEnum<{
849
+ never: "never";
850
+ auto: "auto";
851
+ }>>;
852
+ }, z.core.$strict>>>;
853
+ }, z.core.$strict>>>;
713
854
  slack: z.ZodOptional<z.ZodObject<{
714
855
  access: z.ZodOptional<z.ZodObject<{
715
856
  channels: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -722,6 +863,9 @@ export declare const manifestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
722
863
  }, z.core.$strict>>;
723
864
  app_token_secret: z.ZodOptional<z.ZodString>;
724
865
  bot_token_secret: z.ZodOptional<z.ZodString>;
866
+ identity: z.ZodOptional<z.ZodObject<{
867
+ user_id: z.ZodString;
868
+ }, z.core.$strict>>;
725
869
  }, z.core.$strict>>;
726
870
  telegram: z.ZodOptional<z.ZodObject<{
727
871
  access: z.ZodOptional<z.ZodObject<{
@@ -734,6 +878,14 @@ export declare const manifestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
734
878
  users: z.ZodOptional<z.ZodArray<z.ZodString>>;
735
879
  }, z.core.$strict>>;
736
880
  bot_token_secret: z.ZodOptional<z.ZodString>;
881
+ identity: z.ZodOptional<z.ZodObject<{
882
+ user_id: z.ZodOptional<z.ZodString>;
883
+ username: z.ZodOptional<z.ZodString>;
884
+ }, z.core.$strict>>;
885
+ }, z.core.$strict>>;
886
+ webhook: z.ZodOptional<z.ZodObject<{
887
+ signing_secret: z.ZodOptional<z.ZodString>;
888
+ url: z.ZodString;
737
889
  }, z.core.$strict>>;
738
890
  whatsapp: z.ZodOptional<z.ZodObject<{
739
891
  access: z.ZodOptional<z.ZodObject<{
@@ -745,15 +897,20 @@ export declare const manifestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
745
897
  }>>;
746
898
  users: z.ZodOptional<z.ZodArray<z.ZodString>>;
747
899
  }, z.core.$strict>>;
900
+ identity: z.ZodOptional<z.ZodObject<{
901
+ phone: z.ZodString;
902
+ }, z.core.$strict>>;
748
903
  }, z.core.$strict>>;
749
904
  }, z.core.$strict>>;
750
905
  spawnfile_version: z.ZodLiteral<"0.1">;
906
+ expose: z.ZodOptional<z.ZodBoolean>;
751
907
  kind: z.ZodLiteral<"agent">;
752
908
  subagents: z.ZodOptional<z.ZodArray<z.ZodObject<{
753
909
  id: z.ZodString;
754
910
  ref: z.ZodString;
755
911
  }, z.core.$strict>>>;
756
912
  }, z.core.$strict>, z.ZodObject<{
913
+ description: z.ZodOptional<z.ZodString>;
757
914
  docs: z.ZodOptional<z.ZodObject<{
758
915
  extras: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
759
916
  heartbeat: z.ZodOptional<z.ZodString>;
@@ -889,7 +1046,36 @@ export declare const manifestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
889
1046
  users: z.ZodOptional<z.ZodArray<z.ZodString>>;
890
1047
  }, z.core.$strict>>;
891
1048
  bot_token_secret: z.ZodOptional<z.ZodString>;
1049
+ identity: z.ZodOptional<z.ZodObject<{
1050
+ user_id: z.ZodString;
1051
+ }, z.core.$strict>>;
892
1052
  }, z.core.$strict>>;
1053
+ moltnet: z.ZodOptional<z.ZodArray<z.ZodObject<{
1054
+ dms: z.ZodOptional<z.ZodObject<{
1055
+ enabled: z.ZodBoolean;
1056
+ read: z.ZodOptional<z.ZodEnum<{
1057
+ all: "all";
1058
+ mentions: "mentions";
1059
+ thread_only: "thread_only";
1060
+ }>>;
1061
+ reply: z.ZodOptional<z.ZodEnum<{
1062
+ never: "never";
1063
+ auto: "auto";
1064
+ }>>;
1065
+ }, z.core.$strict>>;
1066
+ network: z.ZodString;
1067
+ rooms: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1068
+ read: z.ZodOptional<z.ZodEnum<{
1069
+ all: "all";
1070
+ mentions: "mentions";
1071
+ thread_only: "thread_only";
1072
+ }>>;
1073
+ reply: z.ZodOptional<z.ZodEnum<{
1074
+ never: "never";
1075
+ auto: "auto";
1076
+ }>>;
1077
+ }, z.core.$strict>>>;
1078
+ }, z.core.$strict>>>;
893
1079
  slack: z.ZodOptional<z.ZodObject<{
894
1080
  access: z.ZodOptional<z.ZodObject<{
895
1081
  channels: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -902,6 +1088,9 @@ export declare const manifestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
902
1088
  }, z.core.$strict>>;
903
1089
  app_token_secret: z.ZodOptional<z.ZodString>;
904
1090
  bot_token_secret: z.ZodOptional<z.ZodString>;
1091
+ identity: z.ZodOptional<z.ZodObject<{
1092
+ user_id: z.ZodString;
1093
+ }, z.core.$strict>>;
905
1094
  }, z.core.$strict>>;
906
1095
  telegram: z.ZodOptional<z.ZodObject<{
907
1096
  access: z.ZodOptional<z.ZodObject<{
@@ -914,6 +1103,14 @@ export declare const manifestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
914
1103
  users: z.ZodOptional<z.ZodArray<z.ZodString>>;
915
1104
  }, z.core.$strict>>;
916
1105
  bot_token_secret: z.ZodOptional<z.ZodString>;
1106
+ identity: z.ZodOptional<z.ZodObject<{
1107
+ user_id: z.ZodOptional<z.ZodString>;
1108
+ username: z.ZodOptional<z.ZodString>;
1109
+ }, z.core.$strict>>;
1110
+ }, z.core.$strict>>;
1111
+ webhook: z.ZodOptional<z.ZodObject<{
1112
+ signing_secret: z.ZodOptional<z.ZodString>;
1113
+ url: z.ZodString;
917
1114
  }, z.core.$strict>>;
918
1115
  whatsapp: z.ZodOptional<z.ZodObject<{
919
1116
  access: z.ZodOptional<z.ZodObject<{
@@ -925,14 +1122,33 @@ export declare const manifestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
925
1122
  }>>;
926
1123
  users: z.ZodOptional<z.ZodArray<z.ZodString>>;
927
1124
  }, z.core.$strict>>;
1125
+ identity: z.ZodOptional<z.ZodObject<{
1126
+ phone: z.ZodString;
1127
+ }, z.core.$strict>>;
928
1128
  }, z.core.$strict>>;
929
1129
  }, z.core.$strict>>;
930
1130
  spawnfile_version: z.ZodLiteral<"0.1">;
1131
+ external: z.ZodOptional<z.ZodArray<z.ZodString>>;
931
1132
  kind: z.ZodLiteral<"team">;
1133
+ lead: z.ZodOptional<z.ZodString>;
932
1134
  members: z.ZodArray<z.ZodObject<{
933
1135
  id: z.ZodString;
934
1136
  ref: z.ZodString;
935
1137
  }, z.core.$strict>>;
1138
+ mode: z.ZodEnum<{
1139
+ hierarchical: "hierarchical";
1140
+ swarm: "swarm";
1141
+ }>;
1142
+ networks: z.ZodOptional<z.ZodArray<z.ZodObject<{
1143
+ expose: z.ZodOptional<z.ZodBoolean>;
1144
+ id: z.ZodString;
1145
+ name: z.ZodOptional<z.ZodString>;
1146
+ provider: z.ZodLiteral<"moltnet">;
1147
+ rooms: z.ZodArray<z.ZodObject<{
1148
+ id: z.ZodString;
1149
+ members: z.ZodArray<z.ZodString>;
1150
+ }, z.core.$strict>>;
1151
+ }, z.core.$strict>>>;
936
1152
  shared: z.ZodOptional<z.ZodObject<{
937
1153
  env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
938
1154
  mcp_servers: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -961,14 +1177,6 @@ export declare const manifestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
961
1177
  }, z.core.$strict>>;
962
1178
  }, z.core.$strict>>>;
963
1179
  }, z.core.$strict>>;
964
- structure: z.ZodObject<{
965
- external: z.ZodOptional<z.ZodArray<z.ZodString>>;
966
- leader: z.ZodOptional<z.ZodString>;
967
- mode: z.ZodEnum<{
968
- hierarchical: "hierarchical";
969
- swarm: "swarm";
970
- }>;
971
- }, z.core.$strict>;
972
1180
  }, z.core.$strict>], "kind">;
973
1181
  export type AgentManifest = z.infer<typeof agentManifestSchema>;
974
1182
  export type DocsBlock = z.infer<typeof docsSchema>;
@@ -984,6 +1192,8 @@ export type Secret = z.infer<typeof secretSchema>;
984
1192
  export type SharedSurface = z.infer<typeof sharedSurfaceSchema>;
985
1193
  export type SkillReference = z.infer<typeof skillReferenceSchema>;
986
1194
  export type TeamManifest = z.infer<typeof teamManifestSchema>;
987
- export type { DiscordSurface, DiscordSurfaceAccess, SlackSurface, SlackSurfaceAccess, SurfacesBlock, TelegramSurface, TelegramSurfaceAccess, WhatsAppSurface, WhatsAppSurfaceAccess } from "./surfaceSchemas.js";
1195
+ export type TeamNetwork = z.infer<typeof teamNetworkSchema>;
1196
+ export type TeamNetworkRoom = z.infer<typeof teamNetworkRoomSchema>;
1197
+ export type { DiscordSurface, DiscordSurfaceAccess, HttpSurface, HttpSurfaceAccess, HttpSurfaceAuth, MoltnetAttachment, MoltnetDM, MoltnetRead, MoltnetReply, MoltnetRoomBehavior, MoltnetSurface, SlackSurface, SlackSurfaceAccess, SurfacesBlock, TelegramSurface, TelegramSurfaceAccess, WebhookSurface, WhatsAppSurface, WhatsAppSurfaceAccess } from "./surfaceSchemas.js";
988
1198
  export declare const isAgentManifest: (manifest: Manifest) => manifest is AgentManifest;
989
1199
  export declare const isTeamManifest: (manifest: Manifest) => manifest is TeamManifest;