spawnfile 0.1.11 → 0.1.12
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 +13 -2
- package/dist/cli/lifecycleCommands.js +101 -1
- package/dist/cli/modelCommands.js +3 -0
- package/dist/cli/resolveCommandInput.d.ts +19 -0
- package/dist/cli/resolveCommandInput.js +25 -0
- package/dist/cli/runCli.d.ts +4 -1
- package/dist/cli/runCli.js +37 -13
- package/dist/cli/runtimeCommands.js +1 -0
- package/dist/cli/statusCommand.d.ts +42 -0
- package/dist/cli/statusCommand.js +394 -0
- package/dist/cli/surfaceCommands.js +4 -0
- package/dist/compiler/agentSurfaces.js +2 -4
- package/dist/compiler/compileProject.js +19 -10
- package/dist/compiler/containerArtifacts.d.ts +1 -0
- package/dist/compiler/containerArtifacts.js +208 -32
- package/dist/compiler/containerArtifactsPlans.js +7 -4
- package/dist/compiler/containerArtifactsRender.d.ts +7 -1
- package/dist/compiler/containerArtifactsRender.js +6 -0
- package/dist/compiler/containerArtifactsTypes.d.ts +9 -0
- package/dist/compiler/containerEntrypointRender.js +18 -31
- package/dist/compiler/index.d.ts +1 -0
- package/dist/compiler/index.js +1 -0
- package/dist/compiler/moltnetArtifacts.js +5 -0
- package/dist/compiler/moltnetClientConfig.d.ts +1 -1
- package/dist/compiler/moltnetClientConfig.js +3 -16
- package/dist/compiler/moltnetNodeConfig.js +2 -4
- package/dist/compiler/moltnetResolution.js +1 -1
- package/dist/compiler/moltnetRoomMemberships.js +1 -2
- package/dist/compiler/moltnetRuntimeConfig.d.ts +1 -1
- package/dist/compiler/moltnetRuntimeConfig.js +1 -13
- package/dist/compiler/networkBinding.d.ts +14 -0
- package/dist/compiler/networkBinding.js +34 -0
- package/dist/compiler/publishProject.d.ts +13 -0
- package/dist/compiler/publishProject.js +72 -0
- package/dist/compiler/runProject.d.ts +26 -12
- package/dist/compiler/runProject.js +102 -125
- package/dist/compiler/runProjectAuth.d.ts +5 -0
- package/dist/compiler/runProjectAuth.js +98 -0
- package/dist/compiler/runProjectDocker.d.ts +19 -0
- package/dist/compiler/runProjectDocker.js +57 -0
- package/dist/compiler/types.d.ts +1 -2
- package/dist/compiler/upProject.d.ts +6 -0
- package/dist/compiler/upProject.js +42 -8
- package/dist/compiler/view/buildOrganizationView.js +4 -1
- package/dist/compiler/view/declarations.d.ts +4 -0
- package/dist/compiler/view/declarations.js +104 -0
- package/dist/compiler/view/renderNetworks.js +1 -2
- package/dist/compiler/view/renderTree.js +6 -2
- package/dist/compiler/view/types.d.ts +64 -1
- package/dist/deployment/dockerInspect.d.ts +29 -0
- package/dist/deployment/dockerInspect.js +130 -0
- package/dist/deployment/dockerLabels.d.ts +16 -0
- package/dist/deployment/dockerLabels.js +32 -0
- package/dist/deployment/dockerLogs.d.ts +24 -0
- package/dist/deployment/dockerLogs.js +96 -0
- package/dist/deployment/dockerManager.d.ts +59 -0
- package/dist/deployment/dockerManager.js +76 -0
- package/dist/deployment/dockerProbeGateway.d.ts +16 -0
- package/dist/deployment/dockerProbeGateway.js +48 -0
- package/dist/deployment/homeStore.d.ts +19 -0
- package/dist/deployment/homeStore.js +130 -0
- package/dist/deployment/index.d.ts +9 -0
- package/dist/deployment/index.js +9 -0
- package/dist/deployment/names.d.ts +3 -0
- package/dist/deployment/names.js +12 -0
- package/dist/deployment/record.d.ts +76 -0
- package/dist/deployment/record.js +174 -0
- package/dist/deployment/target.d.ts +35 -0
- package/dist/deployment/target.js +96 -0
- package/dist/distribution/buildDistributionReport.d.ts +22 -0
- package/dist/distribution/buildDistributionReport.js +51 -0
- package/dist/distribution/consumeImage.d.ts +29 -0
- package/dist/distribution/consumeImage.js +254 -0
- package/dist/distribution/consumeImageSupport.d.ts +18 -0
- package/dist/distribution/consumeImageSupport.js +63 -0
- package/dist/distribution/distributionReportSchema.d.ts +84 -0
- package/dist/distribution/distributionReportSchema.js +107 -0
- package/dist/distribution/dockerRunner.d.ts +5 -0
- package/dist/distribution/dockerRunner.js +21 -0
- package/dist/distribution/extractImage.d.ts +25 -0
- package/dist/distribution/extractImage.js +96 -0
- package/dist/distribution/fingerprint.d.ts +2 -0
- package/dist/distribution/fingerprint.js +14 -0
- package/dist/distribution/imageRef.d.ts +9 -0
- package/dist/distribution/imageRef.js +65 -0
- package/dist/distribution/imageRuntimeAuth.d.ts +19 -0
- package/dist/distribution/imageRuntimeAuth.js +71 -0
- package/dist/distribution/index.d.ts +24 -0
- package/dist/distribution/index.js +16 -0
- package/dist/distribution/preflight.d.ts +11 -0
- package/dist/distribution/preflight.js +65 -0
- package/dist/distribution/projectImageView.d.ts +8 -0
- package/dist/distribution/projectImageView.js +83 -0
- package/dist/distribution/projectName.d.ts +1 -0
- package/dist/distribution/projectName.js +12 -0
- package/dist/distribution/renderImageInterface.d.ts +30 -0
- package/dist/distribution/renderImageInterface.js +86 -0
- package/dist/distribution/tarReader.d.ts +10 -0
- package/dist/distribution/tarReader.js +69 -0
- package/dist/distribution/types.d.ts +80 -0
- package/dist/distribution/types.js +4 -0
- package/dist/distribution/verifyDistributionReport.d.ts +12 -0
- package/dist/distribution/verifyDistributionReport.js +29 -0
- package/dist/filesystem/paths.d.ts +6 -0
- package/dist/filesystem/paths.js +11 -0
- package/dist/manifest/loadManifest.js +22 -2
- package/dist/manifest/renderSpawnfile.js +2 -4
- package/dist/manifest/schemas.d.ts +17 -41
- package/dist/manifest/surfaceSchemas.d.ts +19 -47
- package/dist/manifest/surfaceSchemas.js +3 -6
- package/dist/report/createReport.d.ts +7 -1
- package/dist/report/createReport.js +28 -1
- package/dist/report/types.d.ts +43 -0
- package/dist/runtime/container.js +0 -16
- package/dist/runtime/index.d.ts +1 -0
- package/dist/runtime/index.js +1 -0
- package/dist/runtime/install.d.ts +0 -10
- package/dist/runtime/install.js +0 -45
- package/dist/runtime/openclaw/adapter.js +9 -1
- package/dist/runtime/openclaw/configAuth.d.ts +15 -0
- package/dist/runtime/openclaw/configAuth.js +46 -0
- package/dist/runtime/openclaw/runAuth.d.ts +6 -0
- package/dist/runtime/openclaw/runAuth.js +7 -55
- package/dist/runtime/openclaw/statusProbes.d.ts +2 -0
- package/dist/runtime/openclaw/statusProbes.js +31 -0
- package/dist/runtime/picoclaw/adapter.js +10 -0
- package/dist/runtime/picoclaw/runAuth.d.ts +7 -0
- package/dist/runtime/picoclaw/runAuth.js +8 -68
- package/dist/runtime/picoclaw/statusProbes.d.ts +2 -0
- package/dist/runtime/picoclaw/statusProbes.js +100 -0
- package/dist/runtime/registry.d.ts +0 -5
- package/dist/runtime/registry.js +2 -12
- package/dist/runtime/statusProbes.d.ts +16 -0
- package/dist/runtime/statusProbes.js +41 -0
- package/dist/runtime/types.d.ts +52 -1
- package/dist/shared/errors.d.ts +6 -0
- package/dist/shared/errors.js +9 -0
- package/dist/status/buildStatus.d.ts +13 -0
- package/dist/status/buildStatus.js +266 -0
- package/dist/status/compileReport.d.ts +96 -0
- package/dist/status/compileReport.js +230 -0
- package/dist/status/compiledContainerObservations.d.ts +5 -0
- package/dist/status/compiledContainerObservations.js +63 -0
- package/dist/status/deploymentLogs.d.ts +12 -0
- package/dist/status/deploymentLogs.js +45 -0
- package/dist/status/deployments.d.ts +14 -0
- package/dist/status/deployments.js +128 -0
- package/dist/status/imageStatusReport.d.ts +10 -0
- package/dist/status/imageStatusReport.js +73 -0
- package/dist/status/index.d.ts +14 -0
- package/dist/status/index.js +14 -0
- package/dist/status/moltnetProbes.d.ts +21 -0
- package/dist/status/moltnetProbes.js +240 -0
- package/dist/status/registryDrift.d.ts +28 -0
- package/dist/status/registryDrift.js +119 -0
- package/dist/status/renderStatus.d.ts +2 -0
- package/dist/status/renderStatus.js +230 -0
- package/dist/status/runtimeProbes.d.ts +13 -0
- package/dist/status/runtimeProbes.js +111 -0
- package/dist/status/selectionSubjects.d.ts +8 -0
- package/dist/status/selectionSubjects.js +77 -0
- package/dist/status/selectors.d.ts +14 -0
- package/dist/status/selectors.js +90 -0
- package/dist/status/traversal.d.ts +6 -0
- package/dist/status/traversal.js +15 -0
- package/dist/status/types.d.ts +113 -0
- package/dist/status/types.js +1 -0
- package/package.json +4 -2
- package/runtimes.yaml +22 -15
- package/dist/runtime/tinyclaw/adapter.d.ts +0 -2
- package/dist/runtime/tinyclaw/adapter.js +0 -284
- package/dist/runtime/tinyclaw/runAuth.d.ts +0 -2
- package/dist/runtime/tinyclaw/runAuth.js +0 -49
- package/dist/runtime/tinyclaw/scaffold-assets/AGENTS.md +0 -160
- package/dist/runtime/tinyclaw/scaffold-assets/CLAUDE.md +0 -5
- package/dist/runtime/tinyclaw/scaffold-assets/SOUL.md +0 -177
- package/dist/runtime/tinyclaw/scaffold.d.ts +0 -2
- package/dist/runtime/tinyclaw/scaffold.js +0 -24
- package/dist/runtime/tinyclaw/schedules.d.ts +0 -9
- package/dist/runtime/tinyclaw/schedules.js +0 -62
- package/dist/runtime/tinyclaw/surfaces.d.ts +0 -8
- package/dist/runtime/tinyclaw/surfaces.js +0 -94
|
@@ -258,27 +258,21 @@ declare const agentManifestSchema: z.ZodObject<{
|
|
|
258
258
|
moltnet: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
259
259
|
dms: z.ZodOptional<z.ZodObject<{
|
|
260
260
|
enabled: z.ZodBoolean;
|
|
261
|
-
|
|
261
|
+
wake: z.ZodOptional<z.ZodEnum<{
|
|
262
|
+
never: "never";
|
|
262
263
|
all: "all";
|
|
263
264
|
mentions: "mentions";
|
|
264
265
|
thread_only: "thread_only";
|
|
265
266
|
}>>;
|
|
266
|
-
reply: z.ZodOptional<z.ZodEnum<{
|
|
267
|
-
never: "never";
|
|
268
|
-
auto: "auto";
|
|
269
|
-
}>>;
|
|
270
267
|
}, z.core.$strict>>;
|
|
271
268
|
network: z.ZodString;
|
|
272
269
|
rooms: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
273
|
-
|
|
270
|
+
wake: z.ZodOptional<z.ZodEnum<{
|
|
271
|
+
never: "never";
|
|
274
272
|
all: "all";
|
|
275
273
|
mentions: "mentions";
|
|
276
274
|
thread_only: "thread_only";
|
|
277
275
|
}>>;
|
|
278
|
-
reply: z.ZodOptional<z.ZodEnum<{
|
|
279
|
-
never: "never";
|
|
280
|
-
auto: "auto";
|
|
281
|
-
}>>;
|
|
282
276
|
}, z.core.$strict>>>;
|
|
283
277
|
}, z.core.$strict>>>;
|
|
284
278
|
slack: z.ZodOptional<z.ZodObject<{
|
|
@@ -536,27 +530,21 @@ declare const teamManifestSchema: z.ZodObject<{
|
|
|
536
530
|
moltnet: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
537
531
|
dms: z.ZodOptional<z.ZodObject<{
|
|
538
532
|
enabled: z.ZodBoolean;
|
|
539
|
-
|
|
533
|
+
wake: z.ZodOptional<z.ZodEnum<{
|
|
534
|
+
never: "never";
|
|
540
535
|
all: "all";
|
|
541
536
|
mentions: "mentions";
|
|
542
537
|
thread_only: "thread_only";
|
|
543
538
|
}>>;
|
|
544
|
-
reply: z.ZodOptional<z.ZodEnum<{
|
|
545
|
-
never: "never";
|
|
546
|
-
auto: "auto";
|
|
547
|
-
}>>;
|
|
548
539
|
}, z.core.$strict>>;
|
|
549
540
|
network: z.ZodString;
|
|
550
541
|
rooms: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
551
|
-
|
|
542
|
+
wake: z.ZodOptional<z.ZodEnum<{
|
|
543
|
+
never: "never";
|
|
552
544
|
all: "all";
|
|
553
545
|
mentions: "mentions";
|
|
554
546
|
thread_only: "thread_only";
|
|
555
547
|
}>>;
|
|
556
|
-
reply: z.ZodOptional<z.ZodEnum<{
|
|
557
|
-
never: "never";
|
|
558
|
-
auto: "auto";
|
|
559
|
-
}>>;
|
|
560
548
|
}, z.core.$strict>>>;
|
|
561
549
|
}, z.core.$strict>>>;
|
|
562
550
|
slack: z.ZodOptional<z.ZodObject<{
|
|
@@ -942,27 +930,21 @@ export declare const manifestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
942
930
|
moltnet: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
943
931
|
dms: z.ZodOptional<z.ZodObject<{
|
|
944
932
|
enabled: z.ZodBoolean;
|
|
945
|
-
|
|
933
|
+
wake: z.ZodOptional<z.ZodEnum<{
|
|
934
|
+
never: "never";
|
|
946
935
|
all: "all";
|
|
947
936
|
mentions: "mentions";
|
|
948
937
|
thread_only: "thread_only";
|
|
949
938
|
}>>;
|
|
950
|
-
reply: z.ZodOptional<z.ZodEnum<{
|
|
951
|
-
never: "never";
|
|
952
|
-
auto: "auto";
|
|
953
|
-
}>>;
|
|
954
939
|
}, z.core.$strict>>;
|
|
955
940
|
network: z.ZodString;
|
|
956
941
|
rooms: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
957
|
-
|
|
942
|
+
wake: z.ZodOptional<z.ZodEnum<{
|
|
943
|
+
never: "never";
|
|
958
944
|
all: "all";
|
|
959
945
|
mentions: "mentions";
|
|
960
946
|
thread_only: "thread_only";
|
|
961
947
|
}>>;
|
|
962
|
-
reply: z.ZodOptional<z.ZodEnum<{
|
|
963
|
-
never: "never";
|
|
964
|
-
auto: "auto";
|
|
965
|
-
}>>;
|
|
966
948
|
}, z.core.$strict>>>;
|
|
967
949
|
}, z.core.$strict>>>;
|
|
968
950
|
slack: z.ZodOptional<z.ZodObject<{
|
|
@@ -1219,27 +1201,21 @@ export declare const manifestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1219
1201
|
moltnet: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1220
1202
|
dms: z.ZodOptional<z.ZodObject<{
|
|
1221
1203
|
enabled: z.ZodBoolean;
|
|
1222
|
-
|
|
1204
|
+
wake: z.ZodOptional<z.ZodEnum<{
|
|
1205
|
+
never: "never";
|
|
1223
1206
|
all: "all";
|
|
1224
1207
|
mentions: "mentions";
|
|
1225
1208
|
thread_only: "thread_only";
|
|
1226
1209
|
}>>;
|
|
1227
|
-
reply: z.ZodOptional<z.ZodEnum<{
|
|
1228
|
-
never: "never";
|
|
1229
|
-
auto: "auto";
|
|
1230
|
-
}>>;
|
|
1231
1210
|
}, z.core.$strict>>;
|
|
1232
1211
|
network: z.ZodString;
|
|
1233
1212
|
rooms: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1234
|
-
|
|
1213
|
+
wake: z.ZodOptional<z.ZodEnum<{
|
|
1214
|
+
never: "never";
|
|
1235
1215
|
all: "all";
|
|
1236
1216
|
mentions: "mentions";
|
|
1237
1217
|
thread_only: "thread_only";
|
|
1238
1218
|
}>>;
|
|
1239
|
-
reply: z.ZodOptional<z.ZodEnum<{
|
|
1240
|
-
never: "never";
|
|
1241
|
-
auto: "auto";
|
|
1242
|
-
}>>;
|
|
1243
1219
|
}, z.core.$strict>>>;
|
|
1244
1220
|
}, z.core.$strict>>>;
|
|
1245
1221
|
slack: z.ZodOptional<z.ZodObject<{
|
|
@@ -1540,6 +1516,6 @@ export type SkillReference = z.infer<typeof skillReferenceSchema>;
|
|
|
1540
1516
|
export type TeamManifest = z.infer<typeof teamManifestSchema>;
|
|
1541
1517
|
export type { ExecutionBlock, ModelEndpoint, ModelEntryAuth, ModelTarget } from "./executionSchemas.js";
|
|
1542
1518
|
export type { TeamNetwork, TeamNetworkRoom, TeamNetworkServer, TeamWorkspace, TeamWorkspaceResource } from "./teamNetworkSchemas.js";
|
|
1543
|
-
export type { DiscordSurface, DiscordSurfaceAccess, HttpSurface, HttpSurfaceAccess, HttpSurfaceAuth, MoltnetAttachment, MoltnetDM,
|
|
1519
|
+
export type { DiscordSurface, DiscordSurfaceAccess, HttpSurface, HttpSurfaceAccess, HttpSurfaceAuth, MoltnetAttachment, MoltnetDM, MoltnetRoomBehavior, MoltnetSurface, MoltnetWake, SlackSurface, SlackSurfaceAccess, SurfacesBlock, TelegramSurface, TelegramSurfaceAccess, WebhookSurface, WhatsAppSurface, WhatsAppSurfaceAccess } from "./surfaceSchemas.js";
|
|
1544
1520
|
export declare const isAgentManifest: (manifest: Manifest) => manifest is AgentManifest;
|
|
1545
1521
|
export declare const isTeamManifest: (manifest: Manifest) => manifest is TeamManifest;
|
|
@@ -102,88 +102,67 @@ declare const webhookSurfaceSchema: z.ZodObject<{
|
|
|
102
102
|
signing_secret: z.ZodOptional<z.ZodString>;
|
|
103
103
|
url: z.ZodString;
|
|
104
104
|
}, z.core.$strict>;
|
|
105
|
-
declare const
|
|
105
|
+
declare const moltnetWakeSchema: z.ZodEnum<{
|
|
106
|
+
never: "never";
|
|
106
107
|
all: "all";
|
|
107
108
|
mentions: "mentions";
|
|
108
109
|
thread_only: "thread_only";
|
|
109
110
|
}>;
|
|
110
|
-
declare const moltnetReplySchema: z.ZodEnum<{
|
|
111
|
-
never: "never";
|
|
112
|
-
auto: "auto";
|
|
113
|
-
}>;
|
|
114
111
|
declare const moltnetRoomBehaviorSchema: z.ZodObject<{
|
|
115
|
-
|
|
112
|
+
wake: z.ZodOptional<z.ZodEnum<{
|
|
113
|
+
never: "never";
|
|
116
114
|
all: "all";
|
|
117
115
|
mentions: "mentions";
|
|
118
116
|
thread_only: "thread_only";
|
|
119
117
|
}>>;
|
|
120
|
-
reply: z.ZodOptional<z.ZodEnum<{
|
|
121
|
-
never: "never";
|
|
122
|
-
auto: "auto";
|
|
123
|
-
}>>;
|
|
124
118
|
}, z.core.$strict>;
|
|
125
119
|
declare const moltnetDmSchema: z.ZodObject<{
|
|
126
120
|
enabled: z.ZodBoolean;
|
|
127
|
-
|
|
121
|
+
wake: z.ZodOptional<z.ZodEnum<{
|
|
122
|
+
never: "never";
|
|
128
123
|
all: "all";
|
|
129
124
|
mentions: "mentions";
|
|
130
125
|
thread_only: "thread_only";
|
|
131
126
|
}>>;
|
|
132
|
-
reply: z.ZodOptional<z.ZodEnum<{
|
|
133
|
-
never: "never";
|
|
134
|
-
auto: "auto";
|
|
135
|
-
}>>;
|
|
136
127
|
}, z.core.$strict>;
|
|
137
128
|
declare const moltnetAttachmentSchema: z.ZodObject<{
|
|
138
129
|
dms: z.ZodOptional<z.ZodObject<{
|
|
139
130
|
enabled: z.ZodBoolean;
|
|
140
|
-
|
|
131
|
+
wake: z.ZodOptional<z.ZodEnum<{
|
|
132
|
+
never: "never";
|
|
141
133
|
all: "all";
|
|
142
134
|
mentions: "mentions";
|
|
143
135
|
thread_only: "thread_only";
|
|
144
136
|
}>>;
|
|
145
|
-
reply: z.ZodOptional<z.ZodEnum<{
|
|
146
|
-
never: "never";
|
|
147
|
-
auto: "auto";
|
|
148
|
-
}>>;
|
|
149
137
|
}, z.core.$strict>>;
|
|
150
138
|
network: z.ZodString;
|
|
151
139
|
rooms: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
152
|
-
|
|
140
|
+
wake: z.ZodOptional<z.ZodEnum<{
|
|
141
|
+
never: "never";
|
|
153
142
|
all: "all";
|
|
154
143
|
mentions: "mentions";
|
|
155
144
|
thread_only: "thread_only";
|
|
156
145
|
}>>;
|
|
157
|
-
reply: z.ZodOptional<z.ZodEnum<{
|
|
158
|
-
never: "never";
|
|
159
|
-
auto: "auto";
|
|
160
|
-
}>>;
|
|
161
146
|
}, z.core.$strict>>>;
|
|
162
147
|
}, z.core.$strict>;
|
|
163
148
|
declare const moltnetSurfaceSchema: z.ZodArray<z.ZodObject<{
|
|
164
149
|
dms: z.ZodOptional<z.ZodObject<{
|
|
165
150
|
enabled: z.ZodBoolean;
|
|
166
|
-
|
|
151
|
+
wake: z.ZodOptional<z.ZodEnum<{
|
|
152
|
+
never: "never";
|
|
167
153
|
all: "all";
|
|
168
154
|
mentions: "mentions";
|
|
169
155
|
thread_only: "thread_only";
|
|
170
156
|
}>>;
|
|
171
|
-
reply: z.ZodOptional<z.ZodEnum<{
|
|
172
|
-
never: "never";
|
|
173
|
-
auto: "auto";
|
|
174
|
-
}>>;
|
|
175
157
|
}, z.core.$strict>>;
|
|
176
158
|
network: z.ZodString;
|
|
177
159
|
rooms: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
178
|
-
|
|
160
|
+
wake: z.ZodOptional<z.ZodEnum<{
|
|
161
|
+
never: "never";
|
|
179
162
|
all: "all";
|
|
180
163
|
mentions: "mentions";
|
|
181
164
|
thread_only: "thread_only";
|
|
182
165
|
}>>;
|
|
183
|
-
reply: z.ZodOptional<z.ZodEnum<{
|
|
184
|
-
never: "never";
|
|
185
|
-
auto: "auto";
|
|
186
|
-
}>>;
|
|
187
166
|
}, z.core.$strict>>>;
|
|
188
167
|
}, z.core.$strict>>;
|
|
189
168
|
export declare const surfacesSchema: z.ZodObject<{
|
|
@@ -206,27 +185,21 @@ export declare const surfacesSchema: z.ZodObject<{
|
|
|
206
185
|
moltnet: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
207
186
|
dms: z.ZodOptional<z.ZodObject<{
|
|
208
187
|
enabled: z.ZodBoolean;
|
|
209
|
-
|
|
188
|
+
wake: z.ZodOptional<z.ZodEnum<{
|
|
189
|
+
never: "never";
|
|
210
190
|
all: "all";
|
|
211
191
|
mentions: "mentions";
|
|
212
192
|
thread_only: "thread_only";
|
|
213
193
|
}>>;
|
|
214
|
-
reply: z.ZodOptional<z.ZodEnum<{
|
|
215
|
-
never: "never";
|
|
216
|
-
auto: "auto";
|
|
217
|
-
}>>;
|
|
218
194
|
}, z.core.$strict>>;
|
|
219
195
|
network: z.ZodString;
|
|
220
196
|
rooms: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
221
|
-
|
|
197
|
+
wake: z.ZodOptional<z.ZodEnum<{
|
|
198
|
+
never: "never";
|
|
222
199
|
all: "all";
|
|
223
200
|
mentions: "mentions";
|
|
224
201
|
thread_only: "thread_only";
|
|
225
202
|
}>>;
|
|
226
|
-
reply: z.ZodOptional<z.ZodEnum<{
|
|
227
|
-
never: "never";
|
|
228
|
-
auto: "auto";
|
|
229
|
-
}>>;
|
|
230
203
|
}, z.core.$strict>>>;
|
|
231
204
|
}, z.core.$strict>>>;
|
|
232
205
|
slack: z.ZodOptional<z.ZodObject<{
|
|
@@ -287,10 +260,9 @@ export type HttpSurfaceAuth = never;
|
|
|
287
260
|
export type HttpSurface = never;
|
|
288
261
|
export type MoltnetAttachment = z.infer<typeof moltnetAttachmentSchema>;
|
|
289
262
|
export type MoltnetDM = z.infer<typeof moltnetDmSchema>;
|
|
290
|
-
export type MoltnetRead = z.infer<typeof moltnetReadSchema>;
|
|
291
|
-
export type MoltnetReply = z.infer<typeof moltnetReplySchema>;
|
|
292
263
|
export type MoltnetRoomBehavior = z.infer<typeof moltnetRoomBehaviorSchema>;
|
|
293
264
|
export type MoltnetSurface = z.infer<typeof moltnetSurfaceSchema>;
|
|
265
|
+
export type MoltnetWake = z.infer<typeof moltnetWakeSchema>;
|
|
294
266
|
export type SlackSurfaceAccess = z.infer<typeof slackSurfaceAccessSchema>;
|
|
295
267
|
export type SlackSurface = z.infer<typeof slackSurfaceSchema>;
|
|
296
268
|
export type TelegramSurfaceAccess = z.infer<typeof telegramSurfaceAccessSchema>;
|
|
@@ -178,19 +178,16 @@ const webhookSurfaceSchema = z
|
|
|
178
178
|
url: z.string().url()
|
|
179
179
|
})
|
|
180
180
|
.strict();
|
|
181
|
-
const
|
|
182
|
-
const moltnetReplySchema = z.enum(["auto", "never"]);
|
|
181
|
+
const moltnetWakeSchema = z.enum(["all", "mentions", "thread_only", "never"]);
|
|
183
182
|
const moltnetRoomBehaviorSchema = z
|
|
184
183
|
.object({
|
|
185
|
-
|
|
186
|
-
reply: moltnetReplySchema.optional()
|
|
184
|
+
wake: moltnetWakeSchema.optional()
|
|
187
185
|
})
|
|
188
186
|
.strict();
|
|
189
187
|
const moltnetDmSchema = z
|
|
190
188
|
.object({
|
|
191
189
|
enabled: z.boolean(),
|
|
192
|
-
|
|
193
|
-
reply: moltnetReplySchema.optional()
|
|
190
|
+
wake: moltnetWakeSchema.optional()
|
|
194
191
|
})
|
|
195
192
|
.strict();
|
|
196
193
|
const moltnetAttachmentSchema = z
|
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
import { CompileReport, ContainerReport, DiagnosticReport, NodeReport } from "./types.js";
|
|
2
|
-
export
|
|
2
|
+
export interface CreateCompileReportOptions {
|
|
3
|
+
compileFingerprint?: string;
|
|
4
|
+
generatedAt?: string;
|
|
5
|
+
outputDirectory?: string;
|
|
6
|
+
projectName?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const createCompileReport: (root: string, nodes: NodeReport[], diagnostics?: DiagnosticReport[], container?: ContainerReport, options?: CreateCompileReportOptions) => CompileReport;
|
|
@@ -1,7 +1,34 @@
|
|
|
1
|
-
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
const stableStringify = (value) => {
|
|
3
|
+
if (Array.isArray(value)) {
|
|
4
|
+
return `[${value.map((item) => stableStringify(item)).join(",")}]`;
|
|
5
|
+
}
|
|
6
|
+
if (value && typeof value === "object") {
|
|
7
|
+
return `{${Object.entries(value)
|
|
8
|
+
.sort(([left], [right]) => left.localeCompare(right))
|
|
9
|
+
.map(([key, item]) => `${JSON.stringify(key)}:${stableStringify(item)}`)
|
|
10
|
+
.join(",")}}`;
|
|
11
|
+
}
|
|
12
|
+
return JSON.stringify(value);
|
|
13
|
+
};
|
|
14
|
+
const createCompileFingerprint = (root, nodes, diagnostics, container) => {
|
|
15
|
+
const payload = stableStringify({
|
|
16
|
+
container,
|
|
17
|
+
diagnostics,
|
|
18
|
+
nodes,
|
|
19
|
+
root,
|
|
20
|
+
spawnfile_version: "0.1"
|
|
21
|
+
});
|
|
22
|
+
return `sf1:${createHash("sha1").update(payload).digest("hex").slice(0, 12)}`;
|
|
23
|
+
};
|
|
24
|
+
export const createCompileReport = (root, nodes, diagnostics = [], container, options = {}) => ({
|
|
25
|
+
compile_fingerprint: options.compileFingerprint ?? createCompileFingerprint(root, nodes, diagnostics, container),
|
|
2
26
|
...(container ? { container } : {}),
|
|
3
27
|
diagnostics,
|
|
28
|
+
generated_at: options.generatedAt ?? new Date().toISOString(),
|
|
4
29
|
nodes,
|
|
30
|
+
...(options.outputDirectory ? { output_directory: options.outputDirectory } : {}),
|
|
31
|
+
...(options.projectName ? { project_name: options.projectName } : {}),
|
|
5
32
|
root,
|
|
6
33
|
spawnfile_version: "0.1"
|
|
7
34
|
});
|
package/dist/report/types.d.ts
CHANGED
|
@@ -14,9 +14,13 @@ export interface ContainerRuntimeInstanceReport {
|
|
|
14
14
|
config_path: string;
|
|
15
15
|
home_path: string | null;
|
|
16
16
|
id: string;
|
|
17
|
+
internal_port?: number | null;
|
|
17
18
|
model_auth_methods: Record<string, ModelAuthMethod>;
|
|
18
19
|
model_secrets_required: string[];
|
|
20
|
+
node_ids?: string[];
|
|
21
|
+
published_port?: number | null;
|
|
19
22
|
runtime: string;
|
|
23
|
+
workspace_path?: string;
|
|
20
24
|
}
|
|
21
25
|
export interface ContainerWorkspaceResourceReport {
|
|
22
26
|
backing_path: string;
|
|
@@ -33,6 +37,37 @@ export interface ContainerPersistentMountReport {
|
|
|
33
37
|
reason: string;
|
|
34
38
|
volume_name: string;
|
|
35
39
|
}
|
|
40
|
+
export interface ContainerPortMappingReport {
|
|
41
|
+
internal_port: number;
|
|
42
|
+
published_port: number;
|
|
43
|
+
}
|
|
44
|
+
export interface ContainerMoltnetNodePlanSummary {
|
|
45
|
+
config_path: string;
|
|
46
|
+
network_id: string;
|
|
47
|
+
}
|
|
48
|
+
export interface ContainerMoltnetServerPlanSummary {
|
|
49
|
+
auth_mode?: "bearer" | "none" | "open";
|
|
50
|
+
base_url: string;
|
|
51
|
+
config_path?: string;
|
|
52
|
+
direct_messages?: boolean;
|
|
53
|
+
id: string;
|
|
54
|
+
mode: "external" | "managed";
|
|
55
|
+
network_id: string;
|
|
56
|
+
operator_token_secret?: string;
|
|
57
|
+
port?: number;
|
|
58
|
+
public_read?: boolean;
|
|
59
|
+
rooms: Array<{
|
|
60
|
+
id: string;
|
|
61
|
+
members: string[];
|
|
62
|
+
visibility?: "public" | "private";
|
|
63
|
+
write_policy?: "members" | "operators" | "registered_agents";
|
|
64
|
+
}>;
|
|
65
|
+
store_kind?: "json" | "memory" | "postgres" | "sqlite";
|
|
66
|
+
}
|
|
67
|
+
export interface ContainerMoltnetPlanSummary {
|
|
68
|
+
node_plans: ContainerMoltnetNodePlanSummary[];
|
|
69
|
+
server_plans: ContainerMoltnetServerPlanSummary[];
|
|
70
|
+
}
|
|
36
71
|
export interface NodeReport {
|
|
37
72
|
capabilities: CapabilityReport[];
|
|
38
73
|
diagnostics: DiagnosticReport[];
|
|
@@ -48,8 +83,12 @@ export interface ContainerReport {
|
|
|
48
83
|
dockerfile: string;
|
|
49
84
|
entrypoint: string;
|
|
50
85
|
env_example: string;
|
|
86
|
+
internal_ports?: number[];
|
|
51
87
|
model_secrets_required: string[];
|
|
88
|
+
moltnet?: ContainerMoltnetPlanSummary;
|
|
89
|
+
port_mappings?: ContainerPortMappingReport[];
|
|
52
90
|
ports: number[];
|
|
91
|
+
published_ports?: number[];
|
|
53
92
|
runtime_instances: ContainerRuntimeInstanceReport[];
|
|
54
93
|
runtime_homes: string[];
|
|
55
94
|
runtime_secrets_required: string[];
|
|
@@ -59,9 +98,13 @@ export interface ContainerReport {
|
|
|
59
98
|
workspace_resources?: ContainerWorkspaceResourceReport[];
|
|
60
99
|
}
|
|
61
100
|
export interface CompileReport {
|
|
101
|
+
compile_fingerprint?: string;
|
|
62
102
|
container?: ContainerReport;
|
|
63
103
|
diagnostics: DiagnosticReport[];
|
|
104
|
+
generated_at?: string;
|
|
64
105
|
nodes: NodeReport[];
|
|
106
|
+
output_directory?: string;
|
|
107
|
+
project_name?: string;
|
|
65
108
|
root: string;
|
|
66
109
|
spawnfile_version: "0.1";
|
|
67
110
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { SpawnfileError } from "../shared/index.js";
|
|
2
2
|
import { resolveRuntimeInstallSelection } from "./install.js";
|
|
3
3
|
export const RUNTIME_INSTALL_ROOT = "/opt/spawnfile/runtime-installs";
|
|
4
|
-
const createGitHubReleaseUrl = (repository, tag, asset) => `https://github.com/${repository}/releases/download/${tag}/${asset}`;
|
|
5
4
|
const assertArtifactInstallSelection = (runtimeName, selection) => {
|
|
6
5
|
if (selection.kind !== "source_repo") {
|
|
7
6
|
return;
|
|
@@ -45,21 +44,6 @@ export const createRuntimeInstallRecipe = async (runtimeName) => {
|
|
|
45
44
|
runtimeRoot: installRoot
|
|
46
45
|
};
|
|
47
46
|
}
|
|
48
|
-
case "tinyclaw": {
|
|
49
|
-
if (selection.kind !== "github_release_bundle") {
|
|
50
|
-
throw new SpawnfileError("runtime_error", `Runtime ${runtimeName} has no compiled artifact recipe for ${selection.kind}`);
|
|
51
|
-
}
|
|
52
|
-
return {
|
|
53
|
-
commands: [
|
|
54
|
-
`mkdir -p ${installRoot}`,
|
|
55
|
-
`curl -fsSL ${JSON.stringify(createGitHubReleaseUrl(selection.repository, selection.tag, selection.asset))} | tar -xz --strip-components=1 -C ${installRoot}`,
|
|
56
|
-
`cd ${installRoot} && npm rebuild better-sqlite3 --silent`
|
|
57
|
-
],
|
|
58
|
-
copyCommands: [],
|
|
59
|
-
runtimeName,
|
|
60
|
-
runtimeRoot: installRoot
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
47
|
/* c8 ignore next 5 -- compileable runtimes are exhaustively covered above */
|
|
64
48
|
default:
|
|
65
49
|
throw new SpawnfileError("runtime_error", `Runtime ${runtimeName} has no container install recipe`);
|
package/dist/runtime/index.d.ts
CHANGED
package/dist/runtime/index.js
CHANGED
|
@@ -18,16 +18,6 @@ export type RuntimeInstallSelection = {
|
|
|
18
18
|
selectionSource: "runtime_registry_install";
|
|
19
19
|
tag: string;
|
|
20
20
|
versionedAssets: Record<string, string>;
|
|
21
|
-
} | {
|
|
22
|
-
asset: string;
|
|
23
|
-
ecosystem: "node";
|
|
24
|
-
installHint: string;
|
|
25
|
-
kind: "github_release_bundle";
|
|
26
|
-
repository: string;
|
|
27
|
-
runtimeName: string;
|
|
28
|
-
runtimeRef: string;
|
|
29
|
-
selectionSource: "runtime_registry_install";
|
|
30
|
-
tag: string;
|
|
31
21
|
} | {
|
|
32
22
|
ecosystem: "node";
|
|
33
23
|
installHint: string;
|
package/dist/runtime/install.js
CHANGED
|
@@ -20,10 +20,6 @@ const installHints = new Map([
|
|
|
20
20
|
ecosystem: "node",
|
|
21
21
|
installHint: "Download the pinned OpenClaw artifact archive from the release."
|
|
22
22
|
},
|
|
23
|
-
github_release_bundle: {
|
|
24
|
-
ecosystem: "node",
|
|
25
|
-
installHint: "Download the pinned OpenClaw bundle artifact from the release."
|
|
26
|
-
},
|
|
27
23
|
npm: {
|
|
28
24
|
ecosystem: "node",
|
|
29
25
|
installHint: "Install the pinned OpenClaw package version from npm."
|
|
@@ -45,10 +41,6 @@ const installHints = new Map([
|
|
|
45
41
|
ecosystem: "go",
|
|
46
42
|
installHint: "Download the pinned PicoClaw release archive for the target platform."
|
|
47
43
|
},
|
|
48
|
-
github_release_bundle: {
|
|
49
|
-
ecosystem: "node",
|
|
50
|
-
installHint: "Download the pinned PicoClaw bundle artifact from the release."
|
|
51
|
-
},
|
|
52
44
|
npm: {
|
|
53
45
|
ecosystem: "node",
|
|
54
46
|
installHint: "Install the pinned PicoClaw package version from npm."
|
|
@@ -58,31 +50,6 @@ const installHints = new Map([
|
|
|
58
50
|
installHint: "Checkout the pinned repo ref and build/install from the repository root."
|
|
59
51
|
}
|
|
60
52
|
}
|
|
61
|
-
],
|
|
62
|
-
[
|
|
63
|
-
"tinyclaw",
|
|
64
|
-
{
|
|
65
|
-
container_image: {
|
|
66
|
-
ecosystem: "node",
|
|
67
|
-
installHint: "Copy the pinned TinyClaw runtime files from the official container image."
|
|
68
|
-
},
|
|
69
|
-
github_release_archive: {
|
|
70
|
-
ecosystem: "go",
|
|
71
|
-
installHint: "Download the pinned TinyClaw release archive for the target platform."
|
|
72
|
-
},
|
|
73
|
-
github_release_bundle: {
|
|
74
|
-
ecosystem: "node",
|
|
75
|
-
installHint: "Download the pinned TinyClaw bundle artifact from the release."
|
|
76
|
-
},
|
|
77
|
-
npm: {
|
|
78
|
-
ecosystem: "node",
|
|
79
|
-
installHint: "Install the pinned TinyClaw package version from npm."
|
|
80
|
-
},
|
|
81
|
-
source_repo: {
|
|
82
|
-
ecosystem: "node",
|
|
83
|
-
installHint: "Checkout the pinned repo ref and run the TinyAGI install flow from the repository root."
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
53
|
]
|
|
87
54
|
]);
|
|
88
55
|
export const resolveRuntimeInstallSelection = async (runtimeName) => {
|
|
@@ -127,18 +94,6 @@ export const resolveRuntimeInstallSelection = async (runtimeName) => {
|
|
|
127
94
|
tag: runtime.install.tag,
|
|
128
95
|
versionedAssets: runtime.install.assets
|
|
129
96
|
};
|
|
130
|
-
case "github_release_bundle":
|
|
131
|
-
return {
|
|
132
|
-
ecosystem: "node",
|
|
133
|
-
installHint: installProfile.github_release_bundle.installHint,
|
|
134
|
-
asset: runtime.install.asset,
|
|
135
|
-
kind: "github_release_bundle",
|
|
136
|
-
repository: runtime.install.repository,
|
|
137
|
-
runtimeName: runtime.name,
|
|
138
|
-
runtimeRef: runtime.ref,
|
|
139
|
-
selectionSource: "runtime_registry_install",
|
|
140
|
-
tag: runtime.install.tag
|
|
141
|
-
};
|
|
142
97
|
case "source_repo":
|
|
143
98
|
case undefined:
|
|
144
99
|
return {
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { listEffectiveExecutionModelTargets } from "../../compiler/modelEnv.js";
|
|
2
2
|
import { createAgentCapabilities, createDiagnostic, createDocumentFiles, createSkillFiles } from "../common.js";
|
|
3
3
|
import { SpawnfileError } from "../../shared/index.js";
|
|
4
|
+
import { applyOpenClawImportAuthConfig, resolveOpenClawImportAuthModes } from "./configAuth.js";
|
|
4
5
|
import { prepareOpenClawRuntimeAuth } from "./runAuth.js";
|
|
5
6
|
import { createOpenClawAgentScaffold } from "./scaffold.js";
|
|
6
7
|
import { assertSupportedOpenClawSurfaces, buildOpenClawChannelConfig, buildOpenClawSurfaceEnvBindings } from "./surfaces.js";
|
|
7
8
|
import { buildOpenClawMoltnetConfig, buildOpenClawMoltnetEnvBindings, validateOpenClawMoltnetRuntimeOptions } from "./moltnet.js";
|
|
9
|
+
import { openClawStatusProbes } from "./statusProbes.js";
|
|
8
10
|
const buildEnvSecretRef = (envName) => ({
|
|
9
11
|
id: envName,
|
|
10
12
|
provider: "default",
|
|
@@ -86,7 +88,10 @@ const buildOpenClawConfig = (node) => {
|
|
|
86
88
|
if (moltnet) {
|
|
87
89
|
config.moltnet = moltnet;
|
|
88
90
|
}
|
|
89
|
-
|
|
91
|
+
// Bake the import-auth (claude-code/codex) OAuth structure at compile time so
|
|
92
|
+
// the image is self-sufficient; only the credential tokens are injected later.
|
|
93
|
+
const authBaked = applyOpenClawImportAuthConfig(config, resolveOpenClawImportAuthModes(node));
|
|
94
|
+
return `${JSON.stringify(authBaked, null, 2)}\n`;
|
|
90
95
|
};
|
|
91
96
|
const createOpenClawStateFiles = () => [
|
|
92
97
|
{
|
|
@@ -107,6 +112,7 @@ const createContainerTargets = async (inputs) => inputs.map((input) => {
|
|
|
107
112
|
? [
|
|
108
113
|
{
|
|
109
114
|
envName: "OPENCLAW_HOOKS_TOKEN",
|
|
115
|
+
generated: true,
|
|
110
116
|
jsonPath: "hooks.token"
|
|
111
117
|
}
|
|
112
118
|
]
|
|
@@ -153,6 +159,7 @@ export const openClawAdapter = {
|
|
|
153
159
|
env: [
|
|
154
160
|
{
|
|
155
161
|
description: "Gateway auth token required for non-loopback OpenClaw access",
|
|
162
|
+
generated: true,
|
|
156
163
|
name: "OPENCLAW_GATEWAY_TOKEN",
|
|
157
164
|
required: true
|
|
158
165
|
}
|
|
@@ -217,6 +224,7 @@ export const openClawAdapter = {
|
|
|
217
224
|
name: "openclaw",
|
|
218
225
|
prepareRuntimeAuth: prepareOpenClawRuntimeAuth,
|
|
219
226
|
scaffoldAgentProject: createOpenClawAgentScaffold,
|
|
227
|
+
statusProbes: openClawStatusProbes,
|
|
220
228
|
validateRuntimeOptions(options) {
|
|
221
229
|
const diagnostics = validateOpenClawMoltnetRuntimeOptions(options).map((message) => createDiagnostic("error", message));
|
|
222
230
|
if ("profile" in options && typeof options.profile !== "string") {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ResolvedAgentNode } from "../../compiler/types.js";
|
|
2
|
+
export interface OpenClawImportAuthModes {
|
|
3
|
+
useClaudeCode: boolean;
|
|
4
|
+
useCodex: boolean;
|
|
5
|
+
}
|
|
6
|
+
/** Determines which import-based auth modes an agent's models declare. */
|
|
7
|
+
export declare const resolveOpenClawImportAuthModes: (node: ResolvedAgentNode) => OpenClawImportAuthModes;
|
|
8
|
+
export declare const normalizeOpenClawCodexModel: (model: string) => string;
|
|
9
|
+
/**
|
|
10
|
+
* Applies the import-auth structure (OAuth profiles, provider order, and the
|
|
11
|
+
* Codex model rename) to an OpenClaw config. This is deterministic from the
|
|
12
|
+
* declared auth methods, so it is baked into the image at compile time. Only
|
|
13
|
+
* the OAuth credential tokens are injected at run time.
|
|
14
|
+
*/
|
|
15
|
+
export declare const applyOpenClawImportAuthConfig: (config: Record<string, unknown>, modes: OpenClawImportAuthModes) => Record<string, unknown>;
|