spawnfile 0.1.1 → 0.1.3
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.
- package/README.md +80 -396
- package/dist/cli/index.js +0 -0
- package/dist/cli/modelCommands.d.ts +3 -0
- package/dist/cli/modelCommands.js +68 -0
- package/dist/cli/runCli.d.ts +23 -2
- package/dist/cli/runCli.js +78 -122
- package/dist/cli/runtimeCommands.d.ts +3 -0
- package/dist/cli/runtimeCommands.js +20 -0
- package/dist/cli/surfaceCommands.d.ts +3 -0
- package/dist/cli/surfaceCommands.js +98 -0
- package/dist/cli/viewCommand.d.ts +3 -0
- package/dist/cli/viewCommand.js +87 -0
- package/dist/compiler/agentSurfaces.js +51 -5
- package/dist/compiler/buildCompilePlan.js +38 -40
- package/dist/compiler/buildCompilePlanRuntime.d.ts +14 -0
- package/dist/compiler/buildCompilePlanRuntime.js +39 -0
- package/dist/compiler/buildCompilePlanTeams.d.ts +5 -0
- package/dist/compiler/buildCompilePlanTeams.js +38 -0
- package/dist/compiler/compilePlanHelpers.js +4 -1
- package/dist/compiler/compileProject.js +62 -13
- package/dist/compiler/compileProjectSupport.d.ts +17 -0
- package/dist/compiler/compileProjectSupport.js +136 -0
- package/dist/compiler/containerArtifacts.d.ts +6 -1
- package/dist/compiler/containerArtifacts.js +26 -4
- package/dist/compiler/containerArtifactsPlans.js +16 -1
- package/dist/compiler/containerArtifactsRender.d.ts +4 -2
- package/dist/compiler/containerArtifactsRender.js +21 -126
- package/dist/compiler/containerArtifactsTypes.d.ts +7 -0
- package/dist/compiler/containerEntrypointRender.d.ts +12 -0
- package/dist/compiler/containerEntrypointRender.js +186 -0
- package/dist/compiler/index.d.ts +4 -0
- package/dist/compiler/index.js +4 -0
- package/dist/compiler/interactiveSurfaceScopes.d.ts +2 -0
- package/dist/compiler/interactiveSurfaceScopes.js +21 -0
- package/dist/compiler/moltnetArtifacts.d.ts +27 -0
- package/dist/compiler/moltnetArtifacts.js +208 -0
- package/dist/compiler/moltnetBinaries.d.ts +4 -0
- package/dist/compiler/moltnetBinaries.js +103 -0
- package/dist/compiler/moltnetClientConfig.d.ts +11 -0
- package/dist/compiler/moltnetClientConfig.js +89 -0
- package/dist/compiler/moltnetRepresentativeResolution.d.ts +16 -0
- package/dist/compiler/moltnetRepresentativeResolution.js +86 -0
- package/dist/compiler/moltnetResolution.d.ts +3 -0
- package/dist/compiler/moltnetResolution.js +182 -0
- package/dist/compiler/moltnetRoomMemberships.d.ts +3 -0
- package/dist/compiler/moltnetRoomMemberships.js +140 -0
- package/dist/compiler/runProject.js +1 -1
- package/dist/compiler/surfaceDefinitions.d.ts +55 -0
- package/dist/compiler/surfaceDefinitions.js +204 -0
- package/dist/compiler/teamContextHelpers.d.ts +18 -0
- package/dist/compiler/teamContextHelpers.js +112 -0
- package/dist/compiler/teamContextSupport.d.ts +4 -0
- package/dist/compiler/teamContextSupport.js +264 -0
- package/dist/compiler/teamContextSupport.testHelpers.d.ts +16 -0
- package/dist/compiler/teamContextSupport.testHelpers.js +68 -0
- package/dist/compiler/teamContextTypes.d.ts +28 -0
- package/dist/compiler/teamContextTypes.js +1 -0
- package/dist/compiler/teamRoster.d.ts +12 -0
- package/dist/compiler/teamRoster.js +48 -0
- package/dist/compiler/teamRosterEntries.d.ts +13 -0
- package/dist/compiler/teamRosterEntries.js +230 -0
- package/dist/compiler/teamRosterTypes.d.ts +45 -0
- package/dist/compiler/teamRosterTypes.js +1 -0
- package/dist/compiler/types.d.ts +90 -6
- package/dist/compiler/updateProjectRuntime.d.ts +9 -0
- package/dist/compiler/updateProjectRuntime.js +67 -0
- package/dist/compiler/updateProjectSurfaces.d.ts +8 -0
- package/dist/compiler/updateProjectSurfaces.js +106 -0
- package/dist/compiler/view/buildOrganizationView.d.ts +2 -0
- package/dist/compiler/view/buildOrganizationView.js +180 -0
- package/dist/compiler/view/index.d.ts +4 -0
- package/dist/compiler/view/index.js +4 -0
- package/dist/compiler/view/renderNetworks.d.ts +2 -0
- package/dist/compiler/view/renderNetworks.js +93 -0
- package/dist/compiler/view/renderTree.d.ts +2 -0
- package/dist/compiler/view/renderTree.js +59 -0
- package/dist/compiler/view/sourcePaths.d.ts +2 -0
- package/dist/compiler/view/sourcePaths.js +19 -0
- package/dist/compiler/view/types.d.ts +80 -0
- package/dist/compiler/view/types.js +1 -0
- package/dist/manifest/loadManifest.js +4 -4
- package/dist/manifest/renderSpawnfile.js +74 -8
- package/dist/manifest/scaffold.js +1 -3
- package/dist/manifest/schemas.d.ts +227 -17
- package/dist/manifest/schemas.js +62 -20
- package/dist/manifest/surfaceSchemas.d.ts +154 -0
- package/dist/manifest/surfaceSchemas.js +77 -5
- package/dist/runtime/common.js +3 -0
- package/dist/runtime/openclaw/adapter.js +38 -5
- package/dist/runtime/openclaw/moltnet.d.ts +12 -0
- package/dist/runtime/openclaw/moltnet.js +124 -0
- package/dist/runtime/openclaw/surfaces.js +3 -0
- package/dist/runtime/picoclaw/adapter.js +27 -8
- package/dist/runtime/picoclaw/pico.d.ts +2 -0
- package/dist/runtime/picoclaw/pico.js +2 -0
- package/dist/runtime/picoclaw/surfaces.js +11 -0
- package/dist/runtime/tinyclaw/adapter.js +22 -8
- package/dist/runtime/tinyclaw/runAuth.js +28 -1
- package/dist/runtime/tinyclaw/surfaces.js +8 -0
- package/dist/runtime/types.d.ts +11 -0
- package/package.json +5 -3
- package/runtimes.yaml +4 -4
|
@@ -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
|
|
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;
|
package/dist/manifest/schemas.js
CHANGED
|
@@ -220,6 +220,7 @@ const policySchema = z
|
|
|
220
220
|
.strict();
|
|
221
221
|
const commonManifestSchema = z
|
|
222
222
|
.object({
|
|
223
|
+
description: z.string().optional(),
|
|
223
224
|
docs: docsSchema.optional(),
|
|
224
225
|
env: z.record(z.string(), z.string()).optional(),
|
|
225
226
|
execution: executionSchema.optional(),
|
|
@@ -251,47 +252,67 @@ const sharedSurfaceSchema = z
|
|
|
251
252
|
skills: z.array(skillReferenceSchema).optional()
|
|
252
253
|
})
|
|
253
254
|
.strict();
|
|
254
|
-
const
|
|
255
|
+
const memberSchema = z
|
|
255
256
|
.object({
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
257
|
+
id: z.string().min(1),
|
|
258
|
+
ref: z.string()
|
|
259
|
+
})
|
|
260
|
+
.strict();
|
|
261
|
+
const teamNetworkRoomSchema = z
|
|
262
|
+
.object({
|
|
263
|
+
id: z.string().min(1),
|
|
264
|
+
members: z.array(z.string().min(1)).min(1)
|
|
265
|
+
})
|
|
266
|
+
.strict();
|
|
267
|
+
const teamNetworkSchema = z
|
|
268
|
+
.object({
|
|
269
|
+
expose: z.boolean().optional(),
|
|
270
|
+
id: z.string().min(1),
|
|
271
|
+
name: z.string().min(1).optional(),
|
|
272
|
+
provider: z.literal("moltnet"),
|
|
273
|
+
rooms: z.array(teamNetworkRoomSchema).min(1)
|
|
259
274
|
})
|
|
260
275
|
.strict()
|
|
261
276
|
.superRefine((value, context) => {
|
|
262
|
-
|
|
277
|
+
const roomIds = value.rooms.map((room) => room.id);
|
|
278
|
+
if (new Set(roomIds).size !== roomIds.length) {
|
|
263
279
|
context.addIssue({
|
|
264
280
|
code: z.ZodIssueCode.custom,
|
|
265
|
-
message:
|
|
266
|
-
});
|
|
267
|
-
}
|
|
268
|
-
if (value.mode === "swarm" && value.leader) {
|
|
269
|
-
context.addIssue({
|
|
270
|
-
code: z.ZodIssueCode.custom,
|
|
271
|
-
message: "swarm teams must not declare a leader"
|
|
281
|
+
message: `network ${value.id} declares duplicate room ids`
|
|
272
282
|
});
|
|
273
283
|
}
|
|
274
284
|
});
|
|
275
|
-
const memberSchema = z
|
|
276
|
-
.object({
|
|
277
|
-
id: z.string().min(1),
|
|
278
|
-
ref: z.string()
|
|
279
|
-
})
|
|
280
|
-
.strict();
|
|
281
285
|
const agentManifestSchema = commonManifestSchema
|
|
282
286
|
.extend({
|
|
287
|
+
expose: z.boolean().optional(),
|
|
283
288
|
kind: z.literal("agent"),
|
|
284
289
|
subagents: z.array(subagentSchema).optional()
|
|
285
290
|
})
|
|
286
291
|
.strict();
|
|
287
292
|
const teamManifestSchema = commonManifestSchema
|
|
288
293
|
.extend({
|
|
294
|
+
external: z.array(z.string().min(1)).optional(),
|
|
289
295
|
kind: z.literal("team"),
|
|
296
|
+
lead: z.string().min(1).optional(),
|
|
290
297
|
members: z.array(memberSchema),
|
|
291
|
-
|
|
292
|
-
|
|
298
|
+
mode: z.enum(["hierarchical", "swarm"]),
|
|
299
|
+
networks: z.array(teamNetworkSchema).optional(),
|
|
300
|
+
shared: sharedSurfaceSchema.optional()
|
|
293
301
|
})
|
|
294
302
|
.superRefine((value, context) => {
|
|
303
|
+
const memberIds = new Set(value.members.map((member) => member.id));
|
|
304
|
+
if (value.mode === "hierarchical" && !value.lead) {
|
|
305
|
+
context.addIssue({
|
|
306
|
+
code: z.ZodIssueCode.custom,
|
|
307
|
+
message: "hierarchical teams must declare lead"
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
if (value.mode === "swarm" && value.lead) {
|
|
311
|
+
context.addIssue({
|
|
312
|
+
code: z.ZodIssueCode.custom,
|
|
313
|
+
message: "swarm teams must not declare lead"
|
|
314
|
+
});
|
|
315
|
+
}
|
|
295
316
|
if (value.execution !== undefined) {
|
|
296
317
|
context.addIssue({
|
|
297
318
|
code: z.ZodIssueCode.custom,
|
|
@@ -304,6 +325,27 @@ const teamManifestSchema = commonManifestSchema
|
|
|
304
325
|
message: "team manifests must not declare surfaces"
|
|
305
326
|
});
|
|
306
327
|
}
|
|
328
|
+
if (value.networks) {
|
|
329
|
+
const networkIds = value.networks.map((network) => network.id);
|
|
330
|
+
if (new Set(networkIds).size !== networkIds.length) {
|
|
331
|
+
context.addIssue({
|
|
332
|
+
code: z.ZodIssueCode.custom,
|
|
333
|
+
message: "team manifests must not declare duplicate network ids"
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
for (const network of value.networks) {
|
|
337
|
+
for (const room of network.rooms) {
|
|
338
|
+
for (const memberId of room.members) {
|
|
339
|
+
if (!memberIds.has(memberId)) {
|
|
340
|
+
context.addIssue({
|
|
341
|
+
code: z.ZodIssueCode.custom,
|
|
342
|
+
message: `network ${network.id} room ${room.id} references unknown member ${memberId}`
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
}
|
|
307
349
|
})
|
|
308
350
|
.strict();
|
|
309
351
|
export const manifestSchema = z.discriminatedUnion("kind", [
|