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.
Files changed (198) hide show
  1. package/README.md +13 -2
  2. package/dist/cli/lifecycleCommands.js +101 -1
  3. package/dist/cli/modelCommands.js +3 -0
  4. package/dist/cli/resolveCommandInput.d.ts +19 -0
  5. package/dist/cli/resolveCommandInput.js +25 -0
  6. package/dist/cli/runCli.d.ts +4 -1
  7. package/dist/cli/runCli.js +37 -13
  8. package/dist/cli/runtimeCommands.js +1 -0
  9. package/dist/cli/statusCommand.d.ts +42 -0
  10. package/dist/cli/statusCommand.js +394 -0
  11. package/dist/cli/surfaceCommands.js +4 -0
  12. package/dist/compiler/agentSurfaces.js +2 -4
  13. package/dist/compiler/buildCompilePlanTeams.js +3 -1
  14. package/dist/compiler/compileProject.js +19 -10
  15. package/dist/compiler/compileProjectSupport.d.ts +1 -0
  16. package/dist/compiler/compileProjectSupport.js +1 -1
  17. package/dist/compiler/containerArtifacts.d.ts +1 -0
  18. package/dist/compiler/containerArtifacts.js +208 -32
  19. package/dist/compiler/containerArtifactsPlans.js +7 -4
  20. package/dist/compiler/containerArtifactsRender.d.ts +7 -1
  21. package/dist/compiler/containerArtifactsRender.js +6 -0
  22. package/dist/compiler/containerArtifactsTypes.d.ts +9 -0
  23. package/dist/compiler/containerEntrypointRender.js +18 -31
  24. package/dist/compiler/index.d.ts +1 -0
  25. package/dist/compiler/index.js +1 -0
  26. package/dist/compiler/moltnetArtifacts.d.ts +2 -0
  27. package/dist/compiler/moltnetArtifacts.js +58 -99
  28. package/dist/compiler/moltnetClientConfig.d.ts +2 -2
  29. package/dist/compiler/moltnetClientConfig.js +16 -23
  30. package/dist/compiler/moltnetConfigLowering.d.ts +3 -0
  31. package/dist/compiler/moltnetConfigLowering.js +13 -2
  32. package/dist/compiler/moltnetNodeConfig.d.ts +27 -0
  33. package/dist/compiler/moltnetNodeConfig.js +68 -0
  34. package/dist/compiler/moltnetResolution.js +1 -1
  35. package/dist/compiler/moltnetRoomMemberships.js +1 -2
  36. package/dist/compiler/moltnetRoomPolicyCompatibility.d.ts +4 -0
  37. package/dist/compiler/moltnetRoomPolicyCompatibility.js +28 -0
  38. package/dist/compiler/moltnetRuntimeConfig.d.ts +1 -1
  39. package/dist/compiler/moltnetRuntimeConfig.js +1 -13
  40. package/dist/compiler/networkBinding.d.ts +14 -0
  41. package/dist/compiler/networkBinding.js +34 -0
  42. package/dist/compiler/publishProject.d.ts +13 -0
  43. package/dist/compiler/publishProject.js +72 -0
  44. package/dist/compiler/runProject.d.ts +26 -12
  45. package/dist/compiler/runProject.js +102 -125
  46. package/dist/compiler/runProjectAuth.d.ts +5 -0
  47. package/dist/compiler/runProjectAuth.js +98 -0
  48. package/dist/compiler/runProjectDocker.d.ts +19 -0
  49. package/dist/compiler/runProjectDocker.js +57 -0
  50. package/dist/compiler/types.d.ts +3 -2
  51. package/dist/compiler/upProject.d.ts +6 -0
  52. package/dist/compiler/upProject.js +42 -8
  53. package/dist/compiler/view/buildOrganizationView.js +27 -3
  54. package/dist/compiler/view/declarations.d.ts +4 -0
  55. package/dist/compiler/view/declarations.js +104 -0
  56. package/dist/compiler/view/renderNetworks.js +12 -3
  57. package/dist/compiler/view/renderTree.js +16 -3
  58. package/dist/compiler/view/types.d.ts +77 -1
  59. package/dist/deployment/dockerInspect.d.ts +29 -0
  60. package/dist/deployment/dockerInspect.js +130 -0
  61. package/dist/deployment/dockerLabels.d.ts +16 -0
  62. package/dist/deployment/dockerLabels.js +32 -0
  63. package/dist/deployment/dockerLogs.d.ts +24 -0
  64. package/dist/deployment/dockerLogs.js +96 -0
  65. package/dist/deployment/dockerManager.d.ts +59 -0
  66. package/dist/deployment/dockerManager.js +76 -0
  67. package/dist/deployment/dockerProbeGateway.d.ts +16 -0
  68. package/dist/deployment/dockerProbeGateway.js +48 -0
  69. package/dist/deployment/homeStore.d.ts +19 -0
  70. package/dist/deployment/homeStore.js +130 -0
  71. package/dist/deployment/index.d.ts +9 -0
  72. package/dist/deployment/index.js +9 -0
  73. package/dist/deployment/names.d.ts +3 -0
  74. package/dist/deployment/names.js +12 -0
  75. package/dist/deployment/record.d.ts +76 -0
  76. package/dist/deployment/record.js +174 -0
  77. package/dist/deployment/target.d.ts +35 -0
  78. package/dist/deployment/target.js +96 -0
  79. package/dist/distribution/buildDistributionReport.d.ts +22 -0
  80. package/dist/distribution/buildDistributionReport.js +51 -0
  81. package/dist/distribution/consumeImage.d.ts +29 -0
  82. package/dist/distribution/consumeImage.js +254 -0
  83. package/dist/distribution/consumeImageSupport.d.ts +18 -0
  84. package/dist/distribution/consumeImageSupport.js +63 -0
  85. package/dist/distribution/distributionReportSchema.d.ts +84 -0
  86. package/dist/distribution/distributionReportSchema.js +107 -0
  87. package/dist/distribution/dockerRunner.d.ts +5 -0
  88. package/dist/distribution/dockerRunner.js +21 -0
  89. package/dist/distribution/extractImage.d.ts +25 -0
  90. package/dist/distribution/extractImage.js +96 -0
  91. package/dist/distribution/fingerprint.d.ts +2 -0
  92. package/dist/distribution/fingerprint.js +14 -0
  93. package/dist/distribution/imageRef.d.ts +9 -0
  94. package/dist/distribution/imageRef.js +65 -0
  95. package/dist/distribution/imageRuntimeAuth.d.ts +19 -0
  96. package/dist/distribution/imageRuntimeAuth.js +71 -0
  97. package/dist/distribution/index.d.ts +24 -0
  98. package/dist/distribution/index.js +16 -0
  99. package/dist/distribution/preflight.d.ts +11 -0
  100. package/dist/distribution/preflight.js +65 -0
  101. package/dist/distribution/projectImageView.d.ts +8 -0
  102. package/dist/distribution/projectImageView.js +83 -0
  103. package/dist/distribution/projectName.d.ts +1 -0
  104. package/dist/distribution/projectName.js +12 -0
  105. package/dist/distribution/renderImageInterface.d.ts +30 -0
  106. package/dist/distribution/renderImageInterface.js +86 -0
  107. package/dist/distribution/tarReader.d.ts +10 -0
  108. package/dist/distribution/tarReader.js +69 -0
  109. package/dist/distribution/types.d.ts +80 -0
  110. package/dist/distribution/types.js +4 -0
  111. package/dist/distribution/verifyDistributionReport.d.ts +12 -0
  112. package/dist/distribution/verifyDistributionReport.js +29 -0
  113. package/dist/filesystem/paths.d.ts +6 -0
  114. package/dist/filesystem/paths.js +11 -0
  115. package/dist/manifest/loadManifest.js +22 -2
  116. package/dist/manifest/renderSpawnfile.js +2 -4
  117. package/dist/manifest/renderSpawnfileNetworks.js +5 -0
  118. package/dist/manifest/schemas.d.ts +71 -41
  119. package/dist/manifest/surfaceSchemas.d.ts +19 -47
  120. package/dist/manifest/surfaceSchemas.js +3 -6
  121. package/dist/manifest/teamNetworkAccessSchemas.d.ts +15 -0
  122. package/dist/manifest/teamNetworkAccessSchemas.js +8 -0
  123. package/dist/manifest/teamNetworkConsoleSchemas.d.ts +7 -0
  124. package/dist/manifest/teamNetworkConsoleSchemas.js +19 -0
  125. package/dist/manifest/teamNetworkSchemas.d.ts +60 -0
  126. package/dist/manifest/teamNetworkSchemas.js +20 -7
  127. package/dist/report/createReport.d.ts +7 -1
  128. package/dist/report/createReport.js +28 -1
  129. package/dist/report/types.d.ts +43 -0
  130. package/dist/runtime/container.js +0 -16
  131. package/dist/runtime/index.d.ts +1 -0
  132. package/dist/runtime/index.js +1 -0
  133. package/dist/runtime/install.d.ts +0 -10
  134. package/dist/runtime/install.js +0 -45
  135. package/dist/runtime/openclaw/adapter.js +9 -1
  136. package/dist/runtime/openclaw/configAuth.d.ts +15 -0
  137. package/dist/runtime/openclaw/configAuth.js +46 -0
  138. package/dist/runtime/openclaw/runAuth.d.ts +6 -0
  139. package/dist/runtime/openclaw/runAuth.js +7 -55
  140. package/dist/runtime/openclaw/statusProbes.d.ts +2 -0
  141. package/dist/runtime/openclaw/statusProbes.js +31 -0
  142. package/dist/runtime/picoclaw/adapter.js +10 -0
  143. package/dist/runtime/picoclaw/runAuth.d.ts +7 -0
  144. package/dist/runtime/picoclaw/runAuth.js +8 -68
  145. package/dist/runtime/picoclaw/statusProbes.d.ts +2 -0
  146. package/dist/runtime/picoclaw/statusProbes.js +100 -0
  147. package/dist/runtime/registry.d.ts +0 -5
  148. package/dist/runtime/registry.js +2 -12
  149. package/dist/runtime/statusProbes.d.ts +16 -0
  150. package/dist/runtime/statusProbes.js +41 -0
  151. package/dist/runtime/types.d.ts +52 -1
  152. package/dist/shared/errors.d.ts +6 -0
  153. package/dist/shared/errors.js +9 -0
  154. package/dist/status/buildStatus.d.ts +13 -0
  155. package/dist/status/buildStatus.js +266 -0
  156. package/dist/status/compileReport.d.ts +96 -0
  157. package/dist/status/compileReport.js +230 -0
  158. package/dist/status/compiledContainerObservations.d.ts +5 -0
  159. package/dist/status/compiledContainerObservations.js +63 -0
  160. package/dist/status/deploymentLogs.d.ts +12 -0
  161. package/dist/status/deploymentLogs.js +45 -0
  162. package/dist/status/deployments.d.ts +14 -0
  163. package/dist/status/deployments.js +128 -0
  164. package/dist/status/imageStatusReport.d.ts +10 -0
  165. package/dist/status/imageStatusReport.js +73 -0
  166. package/dist/status/index.d.ts +14 -0
  167. package/dist/status/index.js +14 -0
  168. package/dist/status/moltnetProbes.d.ts +21 -0
  169. package/dist/status/moltnetProbes.js +240 -0
  170. package/dist/status/registryDrift.d.ts +28 -0
  171. package/dist/status/registryDrift.js +119 -0
  172. package/dist/status/renderStatus.d.ts +2 -0
  173. package/dist/status/renderStatus.js +230 -0
  174. package/dist/status/runtimeProbes.d.ts +13 -0
  175. package/dist/status/runtimeProbes.js +111 -0
  176. package/dist/status/selectionSubjects.d.ts +8 -0
  177. package/dist/status/selectionSubjects.js +77 -0
  178. package/dist/status/selectors.d.ts +14 -0
  179. package/dist/status/selectors.js +90 -0
  180. package/dist/status/traversal.d.ts +6 -0
  181. package/dist/status/traversal.js +15 -0
  182. package/dist/status/types.d.ts +113 -0
  183. package/dist/status/types.js +1 -0
  184. package/package.json +4 -2
  185. package/runtimes.yaml +22 -15
  186. package/dist/runtime/tinyclaw/adapter.d.ts +0 -2
  187. package/dist/runtime/tinyclaw/adapter.js +0 -284
  188. package/dist/runtime/tinyclaw/runAuth.d.ts +0 -2
  189. package/dist/runtime/tinyclaw/runAuth.js +0 -49
  190. package/dist/runtime/tinyclaw/scaffold-assets/AGENTS.md +0 -160
  191. package/dist/runtime/tinyclaw/scaffold-assets/CLAUDE.md +0 -5
  192. package/dist/runtime/tinyclaw/scaffold-assets/SOUL.md +0 -177
  193. package/dist/runtime/tinyclaw/scaffold.d.ts +0 -2
  194. package/dist/runtime/tinyclaw/scaffold.js +0 -24
  195. package/dist/runtime/tinyclaw/schedules.d.ts +0 -9
  196. package/dist/runtime/tinyclaw/schedules.js +0 -62
  197. package/dist/runtime/tinyclaw/surfaces.d.ts +0 -8
  198. package/dist/runtime/tinyclaw/surfaces.js +0 -94
@@ -1,24 +0,0 @@
1
- import { createAgentScaffoldManifest } from "../../manifest/index.js";
2
- import { loadRuntimeScaffoldAsset } from "../scaffoldAssets.js";
3
- export const createTinyClawAgentScaffold = () => ({
4
- files: [
5
- {
6
- content: loadRuntimeScaffoldAsset(import.meta.url, "SOUL.md"),
7
- path: "SOUL.md"
8
- },
9
- {
10
- content: loadRuntimeScaffoldAsset(import.meta.url, "AGENTS.md"),
11
- path: "AGENTS.md"
12
- }
13
- ],
14
- manifest: createAgentScaffoldManifest({
15
- authMethod: "claude-code",
16
- docs: {
17
- soul: "SOUL.md",
18
- system: "AGENTS.md"
19
- },
20
- modelName: "claude-sonnet-4-6",
21
- provider: "anthropic",
22
- runtime: "tinyclaw"
23
- })
24
- });
@@ -1,9 +0,0 @@
1
- import type { ResolvedAgentNode } from "../../compiler/types.js";
2
- import type { CapabilityReport } from "../../report/index.js";
3
- import type { ContainerTargetInput, EmittedFile } from "../types.js";
4
- export declare const createTinyClawSchedulesFile: (inputs: ContainerTargetInput[]) => EmittedFile | null;
5
- export declare const scheduleOutcomeFor: (node: ResolvedAgentNode) => {
6
- message?: string;
7
- outcome?: CapabilityReport["outcome"];
8
- };
9
- export declare const createScheduleDiagnostics: (node: ResolvedAgentNode) => import("../../report/types.js").DiagnosticReport[];
@@ -1,62 +0,0 @@
1
- import { createDiagnostic } from "../common.js";
2
- const TINYCLAW_SCHEDULE_CHANNEL = "schedule";
3
- const TINYCLAW_SCHEDULE_SENDER = "Spawnfile Scheduler";
4
- const createTinyClawSchedule = (node) => {
5
- if (!node.schedule || node.schedule.kind !== "cron") {
6
- return null;
7
- }
8
- return {
9
- agentId: node.name,
10
- channel: TINYCLAW_SCHEDULE_CHANNEL,
11
- createdAt: 0,
12
- cron: node.schedule.cron,
13
- enabled: true,
14
- id: `spawnfile-${node.name}`,
15
- label: `Spawnfile schedule for ${node.name}`,
16
- message: node.schedule.prompt ?? "Run the scheduled Spawnfile task.",
17
- sender: TINYCLAW_SCHEDULE_SENDER
18
- };
19
- };
20
- export const createTinyClawSchedulesFile = (inputs) => {
21
- const schedules = inputs
22
- .flatMap((input) => {
23
- if (input.kind !== "agent" || input.value.kind !== "agent") {
24
- return [];
25
- }
26
- return [createTinyClawSchedule(input.value)];
27
- })
28
- .filter((schedule) => Boolean(schedule))
29
- .sort((left, right) => left.id.localeCompare(right.id));
30
- return schedules.length > 0
31
- ? {
32
- content: `${JSON.stringify(schedules, null, 2)}\n`,
33
- path: "home/schedules.json"
34
- }
35
- : null;
36
- };
37
- export const scheduleOutcomeFor = (node) => {
38
- if (!node.schedule) {
39
- return {};
40
- }
41
- if (node.schedule.kind === "cron") {
42
- return {
43
- message: "TinyClaw native cron scheduler is emitted as schedules.json",
44
- outcome: "supported"
45
- };
46
- }
47
- if (node.schedule.kind === "disabled") {
48
- return {
49
- message: "Disabled schedule emits no wake registration",
50
- outcome: "supported"
51
- };
52
- }
53
- return {
54
- message: "TinyClaw native schedule lowering supports cron schedules in Spawnfile v0.1",
55
- outcome: "degraded"
56
- };
57
- };
58
- export const createScheduleDiagnostics = (node) => node.schedule?.kind === "every"
59
- ? [
60
- createDiagnostic("warn", "TinyClaw native schedule lowering supports cron schedules in Spawnfile v0.1; every schedules are degraded")
61
- ]
62
- : [];
@@ -1,8 +0,0 @@
1
- import type { ResolvedAgentSurfaces } from "../../compiler/types.js";
2
- import type { ContainerTarget, ContainerTargetInput } from "../types.js";
3
- export declare const buildTinyClawChannels: (surfaces: ResolvedAgentSurfaces | undefined) => {
4
- config: Record<string, unknown>;
5
- enabled: string[];
6
- };
7
- export declare const resolveTinyClawSurfaceTokenBindings: (inputs: ContainerTargetInput[]) => ContainerTarget["configEnvBindings"];
8
- export declare const assertSupportedTinyClawSurfaces: (surfaces: ResolvedAgentSurfaces | undefined) => void;
@@ -1,94 +0,0 @@
1
- import { listInteractiveSurfaceScopes } from "../../compiler/interactiveSurfaceScopes.js";
2
- import { SpawnfileError } from "../../shared/index.js";
3
- export const buildTinyClawChannels = (surfaces) => {
4
- const enabled = [];
5
- const config = {};
6
- if (surfaces?.discord) {
7
- enabled.push("discord");
8
- config.discord = {};
9
- }
10
- if (surfaces?.telegram) {
11
- enabled.push("telegram");
12
- config.telegram = {};
13
- }
14
- if (surfaces?.whatsapp) {
15
- enabled.push("whatsapp");
16
- config.whatsapp = {};
17
- }
18
- return {
19
- config,
20
- enabled
21
- };
22
- };
23
- const resolveSurfaceTokenBinding = (inputs, surfaceName, getEnvName, jsonPath) => {
24
- const surfaceLabel = surfaceName[0].toUpperCase() + surfaceName.slice(1);
25
- const envNames = [
26
- ...new Set(inputs.flatMap((input) => {
27
- if (input.kind !== "agent" || input.value.kind !== "agent") {
28
- return [];
29
- }
30
- const envName = getEnvName(input.value);
31
- return envName ? [envName] : [];
32
- }))
33
- ];
34
- if (envNames.length === 0) {
35
- return undefined;
36
- }
37
- if (envNames.length > 1) {
38
- throw new SpawnfileError("validation_error", `TinyClaw runtime target declares conflicting ${surfaceLabel} bot token secrets: ${envNames.join(", ")}`);
39
- }
40
- return [
41
- {
42
- envName: envNames[0],
43
- jsonPath
44
- }
45
- ];
46
- };
47
- export const resolveTinyClawSurfaceTokenBindings = (inputs) => {
48
- const bindings = [
49
- ...(resolveSurfaceTokenBinding(inputs, "discord", (node) => node.surfaces?.discord?.botTokenSecret, "channels.discord.bot_token") ?? []),
50
- ...(resolveSurfaceTokenBinding(inputs, "telegram", (node) => node.surfaces?.telegram?.botTokenSecret, "channels.telegram.bot_token") ?? [])
51
- ];
52
- return bindings.length > 0 ? bindings : undefined;
53
- };
54
- export const assertSupportedTinyClawSurfaces = (surfaces) => {
55
- if (surfaces?.http) {
56
- throw new SpawnfileError("validation_error", "TinyClaw does not support portable HTTP surfaces in Spawnfile v0.1");
57
- }
58
- const discordAccess = surfaces?.discord?.access;
59
- if (discordAccess) {
60
- if (discordAccess.mode !== "pairing") {
61
- throw new SpawnfileError("validation_error", "TinyClaw Discord only supports pairing access in Spawnfile v0.1");
62
- }
63
- if (discordAccess.users.length > 0 ||
64
- discordAccess.guilds.length > 0 ||
65
- discordAccess.channels.length > 0) {
66
- throw new SpawnfileError("validation_error", "TinyClaw Discord does not support declarative users, guilds, or channels in Spawnfile v0.1");
67
- }
68
- }
69
- const telegramAccess = surfaces?.telegram?.access;
70
- if (telegramAccess) {
71
- if (telegramAccess.mode !== "pairing") {
72
- throw new SpawnfileError("validation_error", "TinyClaw Telegram only supports pairing access in Spawnfile v0.1");
73
- }
74
- if (telegramAccess.users.length > 0 || telegramAccess.chats.length > 0) {
75
- throw new SpawnfileError("validation_error", "TinyClaw Telegram does not support declarative users or chats in Spawnfile v0.1");
76
- }
77
- }
78
- const whatsappAccess = surfaces?.whatsapp?.access;
79
- if (whatsappAccess) {
80
- if (whatsappAccess.mode !== "pairing") {
81
- throw new SpawnfileError("validation_error", "TinyClaw WhatsApp only supports pairing access in Spawnfile v0.1");
82
- }
83
- if (whatsappAccess.users.length > 0 || whatsappAccess.groups.length > 0) {
84
- throw new SpawnfileError("validation_error", "TinyClaw WhatsApp does not support declarative users or groups in Spawnfile v0.1");
85
- }
86
- }
87
- if (surfaces?.slack) {
88
- throw new SpawnfileError("validation_error", "TinyClaw does not support Slack in Spawnfile v0.1");
89
- }
90
- const interactiveScopes = listInteractiveSurfaceScopes(surfaces);
91
- if (interactiveScopes.length > 1) {
92
- throw new SpawnfileError("validation_error", `TinyClaw preserves only one interactive conversation scope in Spawnfile v0.1; declared ${interactiveScopes.join(", ")}`);
93
- }
94
- };