spawnfile 0.1.11 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (220) hide show
  1. package/README.md +21 -3
  2. package/dist/auth/runtimeCredentials.js +18 -2
  3. package/dist/cli/devCommands.d.ts +3 -0
  4. package/dist/cli/devCommands.js +115 -0
  5. package/dist/cli/lifecycleCommands.js +103 -1
  6. package/dist/cli/modelCommands.js +3 -0
  7. package/dist/cli/resolveCommandInput.d.ts +19 -0
  8. package/dist/cli/resolveCommandInput.js +25 -0
  9. package/dist/cli/runCli.d.ts +10 -1
  10. package/dist/cli/runCli.js +41 -13
  11. package/dist/cli/runtimeCommands.js +1 -0
  12. package/dist/cli/statusCommand.d.ts +43 -0
  13. package/dist/cli/statusCommand.js +428 -0
  14. package/dist/cli/surfaceCommands.js +4 -0
  15. package/dist/compiler/agentSurfaces.js +2 -4
  16. package/dist/compiler/buildProject.d.ts +9 -1
  17. package/dist/compiler/buildProject.js +44 -5
  18. package/dist/compiler/compileProject.d.ts +2 -0
  19. package/dist/compiler/compileProject.js +22 -11
  20. package/dist/compiler/containerArtifacts.d.ts +1 -0
  21. package/dist/compiler/containerArtifacts.js +208 -32
  22. package/dist/compiler/containerArtifactsPlans.js +7 -4
  23. package/dist/compiler/containerArtifactsRender.d.ts +7 -1
  24. package/dist/compiler/containerArtifactsRender.js +31 -69
  25. package/dist/compiler/containerArtifactsTypes.d.ts +9 -0
  26. package/dist/compiler/containerEntrypointRender.js +22 -32
  27. package/dist/compiler/containerPackageRender.d.ts +15 -0
  28. package/dist/compiler/containerPackageRender.js +63 -0
  29. package/dist/compiler/containerTargetResources.js +3 -1
  30. package/dist/compiler/index.d.ts +1 -0
  31. package/dist/compiler/index.js +1 -0
  32. package/dist/compiler/moltnetArtifacts.js +21 -1
  33. package/dist/compiler/moltnetBinaries.d.ts +4 -1
  34. package/dist/compiler/moltnetBinaries.js +24 -3
  35. package/dist/compiler/moltnetClientConfig.d.ts +1 -1
  36. package/dist/compiler/moltnetClientConfig.js +14 -16
  37. package/dist/compiler/moltnetNodeConfig.js +2 -4
  38. package/dist/compiler/moltnetResolution.js +1 -1
  39. package/dist/compiler/moltnetRoomMemberships.js +1 -2
  40. package/dist/compiler/moltnetRuntimeConfig.d.ts +1 -1
  41. package/dist/compiler/moltnetRuntimeConfig.js +9 -10
  42. package/dist/compiler/networkBinding.d.ts +14 -0
  43. package/dist/compiler/networkBinding.js +34 -0
  44. package/dist/compiler/publishProject.d.ts +13 -0
  45. package/dist/compiler/publishProject.js +72 -0
  46. package/dist/compiler/runProject.d.ts +26 -12
  47. package/dist/compiler/runProject.js +109 -126
  48. package/dist/compiler/runProjectAuth.d.ts +5 -0
  49. package/dist/compiler/runProjectAuth.js +98 -0
  50. package/dist/compiler/runProjectDocker.d.ts +19 -0
  51. package/dist/compiler/runProjectDocker.js +202 -0
  52. package/dist/compiler/types.d.ts +1 -2
  53. package/dist/compiler/upProject.d.ts +6 -0
  54. package/dist/compiler/upProject.js +43 -8
  55. package/dist/compiler/view/buildOrganizationView.js +4 -1
  56. package/dist/compiler/view/declarations.d.ts +4 -0
  57. package/dist/compiler/view/declarations.js +104 -0
  58. package/dist/compiler/view/renderNetworks.js +1 -2
  59. package/dist/compiler/view/renderTree.js +6 -2
  60. package/dist/compiler/view/types.d.ts +64 -1
  61. package/dist/deployment/dockerInspect.d.ts +29 -0
  62. package/dist/deployment/dockerInspect.js +130 -0
  63. package/dist/deployment/dockerLabels.d.ts +16 -0
  64. package/dist/deployment/dockerLabels.js +32 -0
  65. package/dist/deployment/dockerLogs.d.ts +24 -0
  66. package/dist/deployment/dockerLogs.js +96 -0
  67. package/dist/deployment/dockerManager.d.ts +59 -0
  68. package/dist/deployment/dockerManager.js +76 -0
  69. package/dist/deployment/dockerProbeGateway.d.ts +16 -0
  70. package/dist/deployment/dockerProbeGateway.js +48 -0
  71. package/dist/deployment/dockerRecover.d.ts +17 -0
  72. package/dist/deployment/dockerRecover.js +129 -0
  73. package/dist/deployment/homeStore.d.ts +19 -0
  74. package/dist/deployment/homeStore.js +130 -0
  75. package/dist/deployment/index.d.ts +10 -0
  76. package/dist/deployment/index.js +10 -0
  77. package/dist/deployment/names.d.ts +3 -0
  78. package/dist/deployment/names.js +12 -0
  79. package/dist/deployment/record.d.ts +76 -0
  80. package/dist/deployment/record.js +174 -0
  81. package/dist/deployment/target.d.ts +35 -0
  82. package/dist/deployment/target.js +96 -0
  83. package/dist/dev/activity.d.ts +14 -0
  84. package/dist/dev/activity.js +48 -0
  85. package/dist/dev/docker.d.ts +16 -0
  86. package/dist/dev/docker.js +71 -0
  87. package/dist/dev/index.d.ts +2 -0
  88. package/dist/dev/index.js +2 -0
  89. package/dist/dev/project.d.ts +35 -0
  90. package/dist/dev/project.js +164 -0
  91. package/dist/distribution/buildDistributionReport.d.ts +22 -0
  92. package/dist/distribution/buildDistributionReport.js +51 -0
  93. package/dist/distribution/consumeImage.d.ts +29 -0
  94. package/dist/distribution/consumeImage.js +254 -0
  95. package/dist/distribution/consumeImageSupport.d.ts +18 -0
  96. package/dist/distribution/consumeImageSupport.js +63 -0
  97. package/dist/distribution/distributionReportSchema.d.ts +84 -0
  98. package/dist/distribution/distributionReportSchema.js +107 -0
  99. package/dist/distribution/dockerRunner.d.ts +5 -0
  100. package/dist/distribution/dockerRunner.js +21 -0
  101. package/dist/distribution/extractImage.d.ts +25 -0
  102. package/dist/distribution/extractImage.js +96 -0
  103. package/dist/distribution/fingerprint.d.ts +2 -0
  104. package/dist/distribution/fingerprint.js +14 -0
  105. package/dist/distribution/imageRef.d.ts +9 -0
  106. package/dist/distribution/imageRef.js +65 -0
  107. package/dist/distribution/imageRuntimeAuth.d.ts +19 -0
  108. package/dist/distribution/imageRuntimeAuth.js +71 -0
  109. package/dist/distribution/index.d.ts +24 -0
  110. package/dist/distribution/index.js +16 -0
  111. package/dist/distribution/preflight.d.ts +11 -0
  112. package/dist/distribution/preflight.js +65 -0
  113. package/dist/distribution/projectImageView.d.ts +8 -0
  114. package/dist/distribution/projectImageView.js +83 -0
  115. package/dist/distribution/projectName.d.ts +1 -0
  116. package/dist/distribution/projectName.js +12 -0
  117. package/dist/distribution/renderImageInterface.d.ts +30 -0
  118. package/dist/distribution/renderImageInterface.js +86 -0
  119. package/dist/distribution/tarReader.d.ts +10 -0
  120. package/dist/distribution/tarReader.js +69 -0
  121. package/dist/distribution/types.d.ts +80 -0
  122. package/dist/distribution/types.js +4 -0
  123. package/dist/distribution/verifyDistributionReport.d.ts +12 -0
  124. package/dist/distribution/verifyDistributionReport.js +29 -0
  125. package/dist/filesystem/paths.d.ts +6 -0
  126. package/dist/filesystem/paths.js +11 -0
  127. package/dist/manifest/loadManifest.js +22 -2
  128. package/dist/manifest/renderSpawnfile.js +2 -4
  129. package/dist/manifest/schemas.d.ts +17 -41
  130. package/dist/manifest/surfaceSchemas.d.ts +19 -47
  131. package/dist/manifest/surfaceSchemas.js +3 -6
  132. package/dist/report/createReport.d.ts +7 -1
  133. package/dist/report/createReport.js +28 -1
  134. package/dist/report/types.d.ts +43 -0
  135. package/dist/runtime/common.d.ts +2 -0
  136. package/dist/runtime/common.js +1 -1
  137. package/dist/runtime/container.d.ts +1 -0
  138. package/dist/runtime/container.js +82 -15
  139. package/dist/runtime/index.d.ts +1 -0
  140. package/dist/runtime/index.js +1 -0
  141. package/dist/runtime/install.d.ts +1 -11
  142. package/dist/runtime/install.js +27 -30
  143. package/dist/runtime/openclaw/adapter.js +9 -1
  144. package/dist/runtime/openclaw/configAuth.d.ts +15 -0
  145. package/dist/runtime/openclaw/configAuth.js +46 -0
  146. package/dist/runtime/openclaw/runAuth.d.ts +6 -0
  147. package/dist/runtime/openclaw/runAuth.js +7 -55
  148. package/dist/runtime/openclaw/statusProbes.d.ts +2 -0
  149. package/dist/runtime/openclaw/statusProbes.js +31 -0
  150. package/dist/runtime/pi/adapter.d.ts +4 -0
  151. package/dist/runtime/pi/adapter.js +198 -0
  152. package/dist/runtime/pi/appActivitySource.d.ts +1 -0
  153. package/dist/runtime/pi/appActivitySource.js +87 -0
  154. package/dist/runtime/pi/appCoreSource.d.ts +1 -0
  155. package/dist/runtime/pi/appCoreSource.js +354 -0
  156. package/dist/runtime/pi/appPreludeSource.d.ts +1 -0
  157. package/dist/runtime/pi/appPreludeSource.js +103 -0
  158. package/dist/runtime/pi/appSource.d.ts +1 -0
  159. package/dist/runtime/pi/appSource.js +8 -0
  160. package/dist/runtime/pi/appTemplate.d.ts +28 -0
  161. package/dist/runtime/pi/appTemplate.js +144 -0
  162. package/dist/runtime/pi/runAuth.d.ts +2 -0
  163. package/dist/runtime/pi/runAuth.js +68 -0
  164. package/dist/runtime/picoclaw/adapter.js +10 -0
  165. package/dist/runtime/picoclaw/runAuth.d.ts +7 -0
  166. package/dist/runtime/picoclaw/runAuth.js +8 -68
  167. package/dist/runtime/picoclaw/statusProbes.d.ts +2 -0
  168. package/dist/runtime/picoclaw/statusProbes.js +100 -0
  169. package/dist/runtime/registry.d.ts +0 -5
  170. package/dist/runtime/registry.js +5 -12
  171. package/dist/runtime/statusProbes.d.ts +16 -0
  172. package/dist/runtime/statusProbes.js +41 -0
  173. package/dist/runtime/types.d.ts +53 -1
  174. package/dist/shared/errors.d.ts +6 -0
  175. package/dist/shared/errors.js +9 -0
  176. package/dist/status/buildStatus.d.ts +13 -0
  177. package/dist/status/buildStatus.js +266 -0
  178. package/dist/status/compileReport.d.ts +96 -0
  179. package/dist/status/compileReport.js +230 -0
  180. package/dist/status/compiledContainerObservations.d.ts +5 -0
  181. package/dist/status/compiledContainerObservations.js +63 -0
  182. package/dist/status/deploymentLogs.d.ts +12 -0
  183. package/dist/status/deploymentLogs.js +45 -0
  184. package/dist/status/deployments.d.ts +14 -0
  185. package/dist/status/deployments.js +121 -0
  186. package/dist/status/imageStatusReport.d.ts +10 -0
  187. package/dist/status/imageStatusReport.js +73 -0
  188. package/dist/status/index.d.ts +14 -0
  189. package/dist/status/index.js +14 -0
  190. package/dist/status/moltnetProbes.d.ts +21 -0
  191. package/dist/status/moltnetProbes.js +240 -0
  192. package/dist/status/registryDrift.d.ts +28 -0
  193. package/dist/status/registryDrift.js +119 -0
  194. package/dist/status/renderStatus.d.ts +2 -0
  195. package/dist/status/renderStatus.js +230 -0
  196. package/dist/status/runtimeProbes.d.ts +13 -0
  197. package/dist/status/runtimeProbes.js +111 -0
  198. package/dist/status/selectionSubjects.d.ts +8 -0
  199. package/dist/status/selectionSubjects.js +77 -0
  200. package/dist/status/selectors.d.ts +14 -0
  201. package/dist/status/selectors.js +90 -0
  202. package/dist/status/traversal.d.ts +6 -0
  203. package/dist/status/traversal.js +15 -0
  204. package/dist/status/types.d.ts +113 -0
  205. package/dist/status/types.js +1 -0
  206. package/package.json +9 -2
  207. package/runtimes.yaml +44 -21
  208. package/dist/runtime/tinyclaw/adapter.d.ts +0 -2
  209. package/dist/runtime/tinyclaw/adapter.js +0 -284
  210. package/dist/runtime/tinyclaw/runAuth.d.ts +0 -2
  211. package/dist/runtime/tinyclaw/runAuth.js +0 -49
  212. package/dist/runtime/tinyclaw/scaffold-assets/AGENTS.md +0 -160
  213. package/dist/runtime/tinyclaw/scaffold-assets/CLAUDE.md +0 -5
  214. package/dist/runtime/tinyclaw/scaffold-assets/SOUL.md +0 -177
  215. package/dist/runtime/tinyclaw/scaffold.d.ts +0 -2
  216. package/dist/runtime/tinyclaw/scaffold.js +0 -24
  217. package/dist/runtime/tinyclaw/schedules.d.ts +0 -9
  218. package/dist/runtime/tinyclaw/schedules.js +0 -62
  219. package/dist/runtime/tinyclaw/surfaces.d.ts +0 -8
  220. 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
- read: z.ZodOptional<z.ZodEnum<{
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
- read: z.ZodOptional<z.ZodEnum<{
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
- read: z.ZodOptional<z.ZodEnum<{
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
- read: z.ZodOptional<z.ZodEnum<{
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
- read: z.ZodOptional<z.ZodEnum<{
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
- read: z.ZodOptional<z.ZodEnum<{
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
- read: z.ZodOptional<z.ZodEnum<{
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
- read: z.ZodOptional<z.ZodEnum<{
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, MoltnetRead, MoltnetReply, MoltnetRoomBehavior, MoltnetSurface, SlackSurface, SlackSurfaceAccess, SurfacesBlock, TelegramSurface, TelegramSurfaceAccess, WebhookSurface, WhatsAppSurface, WhatsAppSurfaceAccess } from "./surfaceSchemas.js";
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 moltnetReadSchema: z.ZodEnum<{
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
- read: z.ZodOptional<z.ZodEnum<{
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
- read: z.ZodOptional<z.ZodEnum<{
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
- read: z.ZodOptional<z.ZodEnum<{
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
- read: z.ZodOptional<z.ZodEnum<{
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
- read: z.ZodOptional<z.ZodEnum<{
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
- read: z.ZodOptional<z.ZodEnum<{
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
- read: z.ZodOptional<z.ZodEnum<{
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
- read: z.ZodOptional<z.ZodEnum<{
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 moltnetReadSchema = z.enum(["all", "mentions", "thread_only"]);
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
- read: moltnetReadSchema.optional(),
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
- read: moltnetReadSchema.optional(),
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 declare const createCompileReport: (root: string, nodes: NodeReport[], diagnostics?: DiagnosticReport[], container?: ContainerReport) => CompileReport;
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
- export const createCompileReport = (root, nodes, diagnostics = [], container) => ({
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
  });
@@ -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
  }
@@ -7,6 +7,8 @@ export declare const createDocumentFiles: (baseDirectory: string, documents: Res
7
7
  export declare const createSkillFiles: (baseDirectory: string, skills: ResolvedSkill[]) => EmittedFile[];
8
8
  export declare const createAgentCapabilities: (node: ResolvedAgentNode, options?: {
9
9
  mcpOutcome?: CapabilityReport["outcome"];
10
+ moltnetMessage?: string;
11
+ moltnetOutcome?: CapabilityReport["outcome"];
10
12
  sandboxOutcome?: CapabilityReport["outcome"];
11
13
  scheduleMessage?: string;
12
14
  scheduleOutcome?: CapabilityReport["outcome"];
@@ -48,7 +48,7 @@ export const createAgentCapabilities = (node, options = {}) => {
48
48
  capabilities.push(createCapability("surfaces.discord", "supported"));
49
49
  }
50
50
  if (node.surfaces?.moltnet) {
51
- capabilities.push(createCapability("surfaces.moltnet", "supported"));
51
+ capabilities.push(createCapability("surfaces.moltnet", options.moltnetOutcome ?? "supported", options.moltnetMessage));
52
52
  }
53
53
  if (node.surfaces?.telegram) {
54
54
  capabilities.push(createCapability("surfaces.telegram", "supported"));
@@ -1,5 +1,6 @@
1
1
  export declare const RUNTIME_INSTALL_ROOT = "/opt/spawnfile/runtime-installs";
2
2
  export interface RuntimeInstallRecipe {
3
+ baseImage?: string;
3
4
  commands: string[];
4
5
  copyCommands: string[];
5
6
  runtimeName: string;
@@ -1,7 +1,14 @@
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}`;
4
+ const PI_RUNTIME_BASE_IMAGE_ENV = "SPAWNFILE_PI_RUNTIME_BASE_IMAGE";
5
+ const DAIMON_RUNTIME_IMAGE_ENV = "SPAWNFILE_DAIMON_RUNTIME_IMAGE";
6
+ const DAIMON_RUNTIME_BASE_IMAGE_ENV = "SPAWNFILE_DAIMON_RUNTIME_BASE_IMAGE";
7
+ const OPENCLAW_RUNTIME_IMAGE_ENV = "SPAWNFILE_OPENCLAW_RUNTIME_IMAGE";
8
+ const PICOCLAW_RUNTIME_IMAGE_ENV = "SPAWNFILE_PICOCLAW_RUNTIME_IMAGE";
9
+ const PI_AI_PACKAGE_NAME = "@earendil-works/pi-ai";
10
+ const PI_CODING_AGENT_PACKAGE_NAME = "@earendil-works/pi-coding-agent";
11
+ const PI_PACKAGE_VERSION = "0.79.9";
5
12
  const assertArtifactInstallSelection = (runtimeName, selection) => {
6
13
  if (selection.kind !== "source_repo") {
7
14
  return;
@@ -12,29 +19,50 @@ const createPicoClawArchiveInstallCommands = (runtimeRoot, selection) => [
12
19
  `mkdir -p ${runtimeRoot}/bin`,
13
20
  `arch="$(dpkg --print-architecture)" && case "$arch" in amd64) asset=${JSON.stringify(selection.versionedAssets.linux_amd64)} ;; arm64) asset=${JSON.stringify(selection.versionedAssets.linux_arm64)} ;; *) echo "Unsupported PicoClaw release architecture: $arch" >&2; exit 1 ;; esac && url="https://github.com/${selection.repository}/releases/download/${selection.tag}/$asset" && curl -fsSL -o /tmp/picoclaw.tar.gz "$url" && rm -rf /tmp/picoclaw-extract && mkdir -p /tmp/picoclaw-extract && tar -xzf /tmp/picoclaw.tar.gz -C /tmp/picoclaw-extract && binary_path="$(find /tmp/picoclaw-extract -type f -name ${JSON.stringify(selection.binaryName)} | head -n 1)" && [ -n "$binary_path" ] && install -m 0755 "$binary_path" ${runtimeRoot}/bin/${selection.binaryName} && ln -sf ${runtimeRoot}/bin/${selection.binaryName} /usr/local/bin/${selection.binaryName} && rm -rf /tmp/picoclaw.tar.gz /tmp/picoclaw-extract`
14
21
  ];
22
+ const createRuntimeImageCopyCommand = (imageRef, runtimeRoot) => `COPY --from=${imageRef} ${runtimeRoot} ${runtimeRoot}`;
23
+ const resolveRuntimeImageRef = (envName, selection) => process.env[envName]?.trim() ||
24
+ (selection.kind === "container_image"
25
+ ? `${selection.image}:${selection.tag}`
26
+ : undefined);
15
27
  export const createRuntimeInstallRecipe = async (runtimeName) => {
16
28
  const selection = await resolveRuntimeInstallSelection(runtimeName);
17
29
  assertArtifactInstallSelection(runtimeName, selection);
18
30
  const installRoot = `${RUNTIME_INSTALL_ROOT}/${runtimeName}`;
19
31
  switch (runtimeName) {
20
32
  case "openclaw": {
21
- if (selection.kind !== "container_image" && selection.kind !== "npm") {
33
+ const openClawRuntimeImage = resolveRuntimeImageRef(OPENCLAW_RUNTIME_IMAGE_ENV, selection);
34
+ if (openClawRuntimeImage) {
35
+ return {
36
+ commands: [],
37
+ copyCommands: [createRuntimeImageCopyCommand(openClawRuntimeImage, installRoot)],
38
+ runtimeName,
39
+ runtimeRoot: installRoot
40
+ };
41
+ }
42
+ if (selection.kind !== "npm") {
22
43
  throw new SpawnfileError("runtime_error", `Runtime ${runtimeName} has no compiled artifact recipe for ${selection.kind}`);
23
44
  }
24
45
  return {
25
- commands: selection.kind === "container_image"
26
- ? []
27
- : [`npm install -g --omit=dev --no-fund --no-audit ${selection.packageName}@${selection.version}`],
28
- copyCommands: selection.kind === "container_image"
29
- ? [`COPY --from=${selection.image}:${selection.tag} /app ${installRoot}`]
30
- : [],
46
+ commands: [
47
+ `npm install -g --omit=dev --no-fund --no-audit ${selection.packageName}@${selection.version}`
48
+ ],
49
+ copyCommands: [],
31
50
  runtimeName,
32
- runtimeRoot: selection.kind === "container_image"
33
- ? installRoot
34
- : `/usr/local/lib/node_modules/${selection.packageName}`
51
+ runtimeRoot: `/usr/local/lib/node_modules/${selection.packageName}`
35
52
  };
36
53
  }
37
54
  case "picoclaw": {
55
+ const picoClawRuntimeImage = resolveRuntimeImageRef(PICOCLAW_RUNTIME_IMAGE_ENV, selection);
56
+ if (picoClawRuntimeImage) {
57
+ return {
58
+ commands: [
59
+ `mkdir -p /usr/local/bin && ln -sf ${installRoot}/bin/picoclaw /usr/local/bin/picoclaw`
60
+ ],
61
+ copyCommands: [createRuntimeImageCopyCommand(picoClawRuntimeImage, installRoot)],
62
+ runtimeName,
63
+ runtimeRoot: installRoot
64
+ };
65
+ }
38
66
  if (selection.kind !== "github_release_archive") {
39
67
  throw new SpawnfileError("runtime_error", `Runtime ${runtimeName} has no compiled artifact recipe for ${selection.kind}`);
40
68
  }
@@ -45,21 +73,60 @@ export const createRuntimeInstallRecipe = async (runtimeName) => {
45
73
  runtimeRoot: installRoot
46
74
  };
47
75
  }
48
- case "tinyclaw": {
49
- if (selection.kind !== "github_release_bundle") {
76
+ case "daimon": {
77
+ const daimonRuntimeImage = process.env[DAIMON_RUNTIME_IMAGE_ENV]?.trim() ||
78
+ process.env[DAIMON_RUNTIME_BASE_IMAGE_ENV]?.trim() ||
79
+ (selection.kind === "container_image"
80
+ ? `${selection.image}:${selection.tag}`
81
+ : undefined);
82
+ if (daimonRuntimeImage) {
83
+ return {
84
+ commands: [],
85
+ copyCommands: [createRuntimeImageCopyCommand(daimonRuntimeImage, installRoot)],
86
+ runtimeName,
87
+ runtimeRoot: installRoot
88
+ };
89
+ }
90
+ if (selection.kind !== "npm") {
50
91
  throw new SpawnfileError("runtime_error", `Runtime ${runtimeName} has no compiled artifact recipe for ${selection.kind}`);
51
92
  }
93
+ const npmPackages = [
94
+ `${selection.packageName}@${selection.version}`,
95
+ `${PI_CODING_AGENT_PACKAGE_NAME}@${PI_PACKAGE_VERSION}`,
96
+ `${PI_AI_PACKAGE_NAME}@${PI_PACKAGE_VERSION}`
97
+ ];
52
98
  return {
53
99
  commands: [
54
100
  `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`
101
+ `cd ${installRoot} && npm install --omit=dev --no-fund --no-audit ${npmPackages.join(" ")}`
57
102
  ],
58
103
  copyCommands: [],
59
104
  runtimeName,
60
105
  runtimeRoot: installRoot
61
106
  };
62
107
  }
108
+ case "pi": {
109
+ if (selection.kind !== "npm") {
110
+ throw new SpawnfileError("runtime_error", `Runtime ${runtimeName} has no compiled artifact recipe for ${selection.kind}`);
111
+ }
112
+ const prebuiltBaseImage = process.env[PI_RUNTIME_BASE_IMAGE_ENV]?.trim() || undefined;
113
+ const npmPackages = [
114
+ `${selection.packageName}@${selection.version}`,
115
+ `${PI_AI_PACKAGE_NAME}@${selection.version}`
116
+ ];
117
+ return {
118
+ ...(prebuiltBaseImage ? { baseImage: prebuiltBaseImage } : {}),
119
+ commands: prebuiltBaseImage
120
+ ? [`mkdir -p ${installRoot}`]
121
+ : [
122
+ `mkdir -p ${installRoot}`,
123
+ `cd ${installRoot} && npm install --omit=dev --no-fund --no-audit ${npmPackages.join(" ")}`
124
+ ],
125
+ copyCommands: [],
126
+ runtimeName,
127
+ runtimeRoot: installRoot
128
+ };
129
+ }
63
130
  /* c8 ignore next 5 -- compileable runtimes are exhaustively covered above */
64
131
  default:
65
132
  throw new SpawnfileError("runtime_error", `Runtime ${runtimeName} has no container install recipe`);
@@ -1,4 +1,5 @@
1
1
  export * from "./container.js";
2
2
  export * from "./install.js";
3
3
  export * from "./registry.js";
4
+ export * from "./statusProbes.js";
4
5
  export * from "./types.js";
@@ -1,4 +1,5 @@
1
1
  export * from "./container.js";
2
2
  export * from "./install.js";
3
3
  export * from "./registry.js";
4
+ export * from "./statusProbes.js";
4
5
  export * from "./types.js";
@@ -1,5 +1,5 @@
1
1
  export type RuntimeInstallSelection = {
2
- ecosystem: "node";
2
+ ecosystem: "go" | "node";
3
3
  image: string;
4
4
  installHint: string;
5
5
  kind: "container_image";
@@ -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;