spawnfile 0.1.10 → 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/buildCompilePlanTeams.js +3 -1
- package/dist/compiler/compileProject.js +19 -10
- package/dist/compiler/compileProjectSupport.d.ts +1 -0
- package/dist/compiler/compileProjectSupport.js +1 -1
- 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.d.ts +2 -0
- package/dist/compiler/moltnetArtifacts.js +58 -99
- package/dist/compiler/moltnetClientConfig.d.ts +2 -2
- package/dist/compiler/moltnetClientConfig.js +16 -23
- package/dist/compiler/moltnetConfigLowering.d.ts +3 -0
- package/dist/compiler/moltnetConfigLowering.js +13 -2
- package/dist/compiler/moltnetNodeConfig.d.ts +27 -0
- package/dist/compiler/moltnetNodeConfig.js +68 -0
- package/dist/compiler/moltnetResolution.js +1 -1
- package/dist/compiler/moltnetRoomMemberships.js +1 -2
- package/dist/compiler/moltnetRoomPolicyCompatibility.d.ts +4 -0
- package/dist/compiler/moltnetRoomPolicyCompatibility.js +28 -0
- 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 +3 -2
- package/dist/compiler/upProject.d.ts +6 -0
- package/dist/compiler/upProject.js +42 -8
- package/dist/compiler/view/buildOrganizationView.js +27 -3
- package/dist/compiler/view/declarations.d.ts +4 -0
- package/dist/compiler/view/declarations.js +104 -0
- package/dist/compiler/view/renderNetworks.js +12 -3
- package/dist/compiler/view/renderTree.js +16 -3
- package/dist/compiler/view/types.d.ts +77 -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/renderSpawnfileNetworks.js +5 -0
- package/dist/manifest/schemas.d.ts +71 -41
- package/dist/manifest/surfaceSchemas.d.ts +19 -47
- package/dist/manifest/surfaceSchemas.js +3 -6
- package/dist/manifest/teamNetworkAccessSchemas.d.ts +15 -0
- package/dist/manifest/teamNetworkAccessSchemas.js +8 -0
- package/dist/manifest/teamNetworkConsoleSchemas.d.ts +7 -0
- package/dist/manifest/teamNetworkConsoleSchemas.js +19 -0
- package/dist/manifest/teamNetworkSchemas.d.ts +60 -0
- package/dist/manifest/teamNetworkSchemas.js +20 -7
- 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
|
@@ -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
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const teamNetworkAgentRegistrationSchema: z.ZodEnum<{
|
|
3
|
+
token: "token";
|
|
4
|
+
disabled: "disabled";
|
|
5
|
+
open: "open";
|
|
6
|
+
}>;
|
|
7
|
+
export declare const teamNetworkRoomVisibilitySchema: z.ZodEnum<{
|
|
8
|
+
public: "public";
|
|
9
|
+
private: "private";
|
|
10
|
+
}>;
|
|
11
|
+
export declare const teamNetworkRoomWritePolicySchema: z.ZodEnum<{
|
|
12
|
+
members: "members";
|
|
13
|
+
registered_agents: "registered_agents";
|
|
14
|
+
operators: "operators";
|
|
15
|
+
}>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const teamNetworkAgentRegistrationSchema = z.enum(["disabled", "token", "open"]);
|
|
3
|
+
export const teamNetworkRoomVisibilitySchema = z.enum(["public", "private"]);
|
|
4
|
+
export const teamNetworkRoomWritePolicySchema = z.enum([
|
|
5
|
+
"members",
|
|
6
|
+
"registered_agents",
|
|
7
|
+
"operators"
|
|
8
|
+
]);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const teamNetworkConsoleSchema: z.ZodObject<{
|
|
3
|
+
analytics: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4
|
+
provider: z.ZodLiteral<"google">;
|
|
5
|
+
measurement_id: z.ZodString;
|
|
6
|
+
}, z.core.$strict>], "provider">>;
|
|
7
|
+
}, z.core.$strict>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
const teamNetworkConsoleAnalyticsSchema = z
|
|
3
|
+
.discriminatedUnion("provider", [
|
|
4
|
+
z
|
|
5
|
+
.object({
|
|
6
|
+
provider: z.literal("google"),
|
|
7
|
+
measurement_id: z
|
|
8
|
+
.string()
|
|
9
|
+
.trim()
|
|
10
|
+
.min(1)
|
|
11
|
+
.regex(/^G-[A-Za-z0-9_-]+$/, "measurement_id must be a Google Analytics measurement ID")
|
|
12
|
+
})
|
|
13
|
+
.strict()
|
|
14
|
+
]);
|
|
15
|
+
export const teamNetworkConsoleSchema = z
|
|
16
|
+
.object({
|
|
17
|
+
analytics: teamNetworkConsoleAnalyticsSchema.optional()
|
|
18
|
+
})
|
|
19
|
+
.strict();
|
|
@@ -2,6 +2,11 @@ import { z } from "zod";
|
|
|
2
2
|
export { teamWorkspaceDocsSchema, teamWorkspaceSchema } from "./workspaceSchemas.js";
|
|
3
3
|
export type { TeamWorkspace, TeamWorkspaceDocs, TeamWorkspaceResource, TeamWorkspaceResource as TeamNetworkResource } from "./workspaceSchemas.js";
|
|
4
4
|
declare const teamNetworkAuthSchema: z.ZodObject<{
|
|
5
|
+
agent_registration: z.ZodOptional<z.ZodEnum<{
|
|
6
|
+
token: "token";
|
|
7
|
+
disabled: "disabled";
|
|
8
|
+
open: "open";
|
|
9
|
+
}>>;
|
|
5
10
|
client: z.ZodOptional<z.ZodObject<{
|
|
6
11
|
static_token: z.ZodOptional<z.ZodBoolean>;
|
|
7
12
|
token_env: z.ZodOptional<z.ZodString>;
|
|
@@ -13,6 +18,7 @@ declare const teamNetworkAuthSchema: z.ZodObject<{
|
|
|
13
18
|
open: "open";
|
|
14
19
|
bearer: "bearer";
|
|
15
20
|
}>;
|
|
21
|
+
public_read: z.ZodOptional<z.ZodBoolean>;
|
|
16
22
|
tokens: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
17
23
|
agents: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
18
24
|
id: z.ZodString;
|
|
@@ -57,6 +63,11 @@ declare const teamNetworkStoreSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
57
63
|
declare const teamNetworkServerSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
58
64
|
allowed_origins: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
59
65
|
auth: z.ZodObject<{
|
|
66
|
+
agent_registration: z.ZodOptional<z.ZodEnum<{
|
|
67
|
+
token: "token";
|
|
68
|
+
disabled: "disabled";
|
|
69
|
+
open: "open";
|
|
70
|
+
}>>;
|
|
60
71
|
client: z.ZodOptional<z.ZodObject<{
|
|
61
72
|
static_token: z.ZodOptional<z.ZodBoolean>;
|
|
62
73
|
token_env: z.ZodOptional<z.ZodString>;
|
|
@@ -68,6 +79,7 @@ declare const teamNetworkServerSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
68
79
|
open: "open";
|
|
69
80
|
bearer: "bearer";
|
|
70
81
|
}>;
|
|
82
|
+
public_read: z.ZodOptional<z.ZodBoolean>;
|
|
71
83
|
tokens: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
72
84
|
agents: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
73
85
|
id: z.ZodString;
|
|
@@ -81,6 +93,12 @@ declare const teamNetworkServerSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
81
93
|
}>>;
|
|
82
94
|
}, z.core.$strict>>>;
|
|
83
95
|
}, z.core.$strict>;
|
|
96
|
+
console: z.ZodOptional<z.ZodObject<{
|
|
97
|
+
analytics: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
98
|
+
provider: z.ZodLiteral<"google">;
|
|
99
|
+
measurement_id: z.ZodString;
|
|
100
|
+
}, z.core.$strict>], "provider">>;
|
|
101
|
+
}, z.core.$strict>>;
|
|
84
102
|
debug_events: z.ZodOptional<z.ZodBoolean>;
|
|
85
103
|
direct_messages: z.ZodOptional<z.ZodBoolean>;
|
|
86
104
|
human_ingress: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -128,6 +146,11 @@ declare const teamNetworkServerSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
128
146
|
url: z.ZodOptional<z.ZodString>;
|
|
129
147
|
}, z.core.$strict>, z.ZodObject<{
|
|
130
148
|
auth: z.ZodObject<{
|
|
149
|
+
agent_registration: z.ZodOptional<z.ZodEnum<{
|
|
150
|
+
token: "token";
|
|
151
|
+
disabled: "disabled";
|
|
152
|
+
open: "open";
|
|
153
|
+
}>>;
|
|
131
154
|
client: z.ZodOptional<z.ZodObject<{
|
|
132
155
|
static_token: z.ZodOptional<z.ZodBoolean>;
|
|
133
156
|
token_env: z.ZodOptional<z.ZodString>;
|
|
@@ -139,6 +162,7 @@ declare const teamNetworkServerSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
139
162
|
open: "open";
|
|
140
163
|
bearer: "bearer";
|
|
141
164
|
}>;
|
|
165
|
+
public_read: z.ZodOptional<z.ZodBoolean>;
|
|
142
166
|
tokens: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
143
167
|
agents: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
144
168
|
id: z.ZodString;
|
|
@@ -159,6 +183,15 @@ declare const teamNetworkRoomSchema: z.ZodObject<{
|
|
|
159
183
|
id: z.ZodString;
|
|
160
184
|
members: z.ZodArray<z.ZodString>;
|
|
161
185
|
name: z.ZodOptional<z.ZodString>;
|
|
186
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
187
|
+
public: "public";
|
|
188
|
+
private: "private";
|
|
189
|
+
}>>;
|
|
190
|
+
write_policy: z.ZodOptional<z.ZodEnum<{
|
|
191
|
+
members: "members";
|
|
192
|
+
registered_agents: "registered_agents";
|
|
193
|
+
operators: "operators";
|
|
194
|
+
}>>;
|
|
162
195
|
}, z.core.$strict>;
|
|
163
196
|
export declare const teamNetworkSchema: z.ZodObject<{
|
|
164
197
|
id: z.ZodString;
|
|
@@ -168,10 +201,24 @@ export declare const teamNetworkSchema: z.ZodObject<{
|
|
|
168
201
|
id: z.ZodString;
|
|
169
202
|
members: z.ZodArray<z.ZodString>;
|
|
170
203
|
name: z.ZodOptional<z.ZodString>;
|
|
204
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
205
|
+
public: "public";
|
|
206
|
+
private: "private";
|
|
207
|
+
}>>;
|
|
208
|
+
write_policy: z.ZodOptional<z.ZodEnum<{
|
|
209
|
+
members: "members";
|
|
210
|
+
registered_agents: "registered_agents";
|
|
211
|
+
operators: "operators";
|
|
212
|
+
}>>;
|
|
171
213
|
}, z.core.$strict>>;
|
|
172
214
|
server: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
173
215
|
allowed_origins: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
174
216
|
auth: z.ZodObject<{
|
|
217
|
+
agent_registration: z.ZodOptional<z.ZodEnum<{
|
|
218
|
+
token: "token";
|
|
219
|
+
disabled: "disabled";
|
|
220
|
+
open: "open";
|
|
221
|
+
}>>;
|
|
175
222
|
client: z.ZodOptional<z.ZodObject<{
|
|
176
223
|
static_token: z.ZodOptional<z.ZodBoolean>;
|
|
177
224
|
token_env: z.ZodOptional<z.ZodString>;
|
|
@@ -183,6 +230,7 @@ export declare const teamNetworkSchema: z.ZodObject<{
|
|
|
183
230
|
open: "open";
|
|
184
231
|
bearer: "bearer";
|
|
185
232
|
}>;
|
|
233
|
+
public_read: z.ZodOptional<z.ZodBoolean>;
|
|
186
234
|
tokens: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
187
235
|
agents: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
188
236
|
id: z.ZodString;
|
|
@@ -196,6 +244,12 @@ export declare const teamNetworkSchema: z.ZodObject<{
|
|
|
196
244
|
}>>;
|
|
197
245
|
}, z.core.$strict>>>;
|
|
198
246
|
}, z.core.$strict>;
|
|
247
|
+
console: z.ZodOptional<z.ZodObject<{
|
|
248
|
+
analytics: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
249
|
+
provider: z.ZodLiteral<"google">;
|
|
250
|
+
measurement_id: z.ZodString;
|
|
251
|
+
}, z.core.$strict>], "provider">>;
|
|
252
|
+
}, z.core.$strict>>;
|
|
199
253
|
debug_events: z.ZodOptional<z.ZodBoolean>;
|
|
200
254
|
direct_messages: z.ZodOptional<z.ZodBoolean>;
|
|
201
255
|
human_ingress: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -243,6 +297,11 @@ export declare const teamNetworkSchema: z.ZodObject<{
|
|
|
243
297
|
url: z.ZodOptional<z.ZodString>;
|
|
244
298
|
}, z.core.$strict>, z.ZodObject<{
|
|
245
299
|
auth: z.ZodObject<{
|
|
300
|
+
agent_registration: z.ZodOptional<z.ZodEnum<{
|
|
301
|
+
token: "token";
|
|
302
|
+
disabled: "disabled";
|
|
303
|
+
open: "open";
|
|
304
|
+
}>>;
|
|
246
305
|
client: z.ZodOptional<z.ZodObject<{
|
|
247
306
|
static_token: z.ZodOptional<z.ZodBoolean>;
|
|
248
307
|
token_env: z.ZodOptional<z.ZodString>;
|
|
@@ -254,6 +313,7 @@ export declare const teamNetworkSchema: z.ZodObject<{
|
|
|
254
313
|
open: "open";
|
|
255
314
|
bearer: "bearer";
|
|
256
315
|
}>;
|
|
316
|
+
public_read: z.ZodOptional<z.ZodBoolean>;
|
|
257
317
|
tokens: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
258
318
|
agents: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
259
319
|
id: z.ZodString;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { teamNetworkAgentRegistrationSchema, teamNetworkRoomVisibilitySchema, teamNetworkRoomWritePolicySchema } from "./teamNetworkAccessSchemas.js";
|
|
3
|
+
import { teamNetworkConsoleSchema } from "./teamNetworkConsoleSchemas.js";
|
|
2
4
|
export { teamWorkspaceDocsSchema, teamWorkspaceSchema } from "./workspaceSchemas.js";
|
|
3
5
|
const moltnetScopeSchema = z.enum(["observe", "write", "admin", "attach", "pair"]);
|
|
4
6
|
const countTruthy = (value) => value.filter((entry) => Boolean(entry)).length;
|
|
@@ -48,8 +50,10 @@ const teamNetworkAuthClientSchema = z
|
|
|
48
50
|
});
|
|
49
51
|
const teamNetworkAuthSchema = z
|
|
50
52
|
.object({
|
|
53
|
+
agent_registration: teamNetworkAgentRegistrationSchema.optional(),
|
|
51
54
|
client: teamNetworkAuthClientSchema.optional(),
|
|
52
55
|
mode: z.enum(["none", "bearer", "open"]),
|
|
56
|
+
public_read: z.boolean().optional(),
|
|
53
57
|
tokens: z.array(teamNetworkAuthTokenSchema).optional()
|
|
54
58
|
})
|
|
55
59
|
.strict()
|
|
@@ -69,10 +73,10 @@ const teamNetworkAuthSchema = z
|
|
|
69
73
|
}
|
|
70
74
|
return;
|
|
71
75
|
}
|
|
72
|
-
if (value.mode === "bearer" && !value.client) {
|
|
76
|
+
if (value.mode === "bearer" && !value.client && value.agent_registration !== "open") {
|
|
73
77
|
context.addIssue({
|
|
74
78
|
code: z.ZodIssueCode.custom,
|
|
75
|
-
message: "auth.mode bearer requires auth.client"
|
|
79
|
+
message: "auth.mode bearer requires auth.client unless agent_registration is open"
|
|
76
80
|
});
|
|
77
81
|
}
|
|
78
82
|
if (value.mode === "open" && value.client) {
|
|
@@ -94,6 +98,9 @@ const teamNetworkAuthSchema = z
|
|
|
94
98
|
});
|
|
95
99
|
}
|
|
96
100
|
}
|
|
101
|
+
if (value.mode === "open" && value.agent_registration && value.agent_registration !== "open") {
|
|
102
|
+
context.addIssue({ code: z.ZodIssueCode.custom, message: "auth.mode open requires agent_registration open when declared" });
|
|
103
|
+
}
|
|
97
104
|
if (value.tokens) {
|
|
98
105
|
const tokenIds = value.tokens.map((token) => token.id);
|
|
99
106
|
if (new Set(tokenIds).size !== tokenIds.length) {
|
|
@@ -182,6 +189,7 @@ const teamNetworkManagedServerSchema = z
|
|
|
182
189
|
.object({
|
|
183
190
|
allowed_origins: z.array(z.string().trim().min(1)).optional(),
|
|
184
191
|
auth: teamNetworkAuthSchema,
|
|
192
|
+
console: teamNetworkConsoleSchema.optional(),
|
|
185
193
|
debug_events: z.boolean().optional(),
|
|
186
194
|
direct_messages: z.boolean().optional(),
|
|
187
195
|
human_ingress: z.boolean().optional(),
|
|
@@ -201,13 +209,13 @@ const teamNetworkManagedServerSchema = z
|
|
|
201
209
|
message: "managed server with auth.mode bearer requires at least one auth token"
|
|
202
210
|
});
|
|
203
211
|
}
|
|
204
|
-
if (!value.auth.client
|
|
212
|
+
if (value.auth.client && !value.auth.client.token_id) {
|
|
205
213
|
context.addIssue({
|
|
206
214
|
code: z.ZodIssueCode.custom,
|
|
207
215
|
message: "managed bearer auth requires auth.client.token_id"
|
|
208
216
|
});
|
|
209
217
|
}
|
|
210
|
-
if (value.auth.client
|
|
218
|
+
if (value.auth.client && (value.auth.client.token_env || value.auth.client.token_path)) {
|
|
211
219
|
context.addIssue({
|
|
212
220
|
code: z.ZodIssueCode.custom,
|
|
213
221
|
message: "managed bearer auth requires auth.client.token_id"
|
|
@@ -243,6 +251,9 @@ const teamNetworkManagedServerSchema = z
|
|
|
243
251
|
message: "managed open auth client token source must be token_id"
|
|
244
252
|
});
|
|
245
253
|
}
|
|
254
|
+
if (value.auth.client.token_id && !value.auth.tokens?.some((token) => token.id === value.auth.client?.token_id)) {
|
|
255
|
+
context.addIssue({ code: z.ZodIssueCode.custom, message: `managed open auth references unknown token: ${value.auth.client.token_id}` });
|
|
256
|
+
}
|
|
246
257
|
}
|
|
247
258
|
});
|
|
248
259
|
const teamNetworkExternalServerSchema = z
|
|
@@ -287,7 +298,7 @@ const teamNetworkExternalServerSchema = z
|
|
|
287
298
|
message: "external open auth requires token_env or token_path"
|
|
288
299
|
});
|
|
289
300
|
}
|
|
290
|
-
if (value.auth.mode === "bearer") {
|
|
301
|
+
if (value.auth.mode === "bearer" && value.auth.client) {
|
|
291
302
|
const sourceCount = countTruthy([
|
|
292
303
|
value.auth.client.token_id,
|
|
293
304
|
value.auth.client.token_env,
|
|
@@ -308,8 +319,10 @@ const teamNetworkServerSchema = z.discriminatedUnion("mode", [
|
|
|
308
319
|
const teamNetworkRoomSchema = z
|
|
309
320
|
.object({
|
|
310
321
|
id: z.string().trim().min(1),
|
|
311
|
-
members: z.array(z.string().trim().min(1))
|
|
312
|
-
name: z.string().trim().min(1).optional()
|
|
322
|
+
members: z.array(z.string().trim().min(1)),
|
|
323
|
+
name: z.string().trim().min(1).optional(),
|
|
324
|
+
visibility: teamNetworkRoomVisibilitySchema.optional(),
|
|
325
|
+
write_policy: teamNetworkRoomWritePolicySchema.optional()
|
|
313
326
|
})
|
|
314
327
|
.strict();
|
|
315
328
|
export const teamNetworkSchema = 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;
|