spawnfile 0.1.0

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 (177) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +464 -0
  3. package/dist/.env.example +5 -0
  4. package/dist/Dockerfile +21 -0
  5. package/dist/auth/importers.d.ts +8 -0
  6. package/dist/auth/importers.js +93 -0
  7. package/dist/auth/index.d.ts +5 -0
  8. package/dist/auth/index.js +5 -0
  9. package/dist/auth/paths.d.ts +6 -0
  10. package/dist/auth/paths.js +18 -0
  11. package/dist/auth/profileStore.d.ts +10 -0
  12. package/dist/auth/profileStore.js +125 -0
  13. package/dist/auth/runtimeCredentials.d.ts +14 -0
  14. package/dist/auth/runtimeCredentials.js +76 -0
  15. package/dist/auth/types.d.ts +22 -0
  16. package/dist/auth/types.js +1 -0
  17. package/dist/cli/index.d.ts +2 -0
  18. package/dist/cli/index.js +4 -0
  19. package/dist/cli/runCli.d.ts +27 -0
  20. package/dist/cli/runCli.js +314 -0
  21. package/dist/compiler/addProjectNode.d.ts +21 -0
  22. package/dist/compiler/addProjectNode.js +126 -0
  23. package/dist/compiler/agentSurfaces.d.ts +4 -0
  24. package/dist/compiler/agentSurfaces.js +70 -0
  25. package/dist/compiler/buildCompilePlan.d.ts +2 -0
  26. package/dist/compiler/buildCompilePlan.js +258 -0
  27. package/dist/compiler/buildProject.d.ts +20 -0
  28. package/dist/compiler/buildProject.js +52 -0
  29. package/dist/compiler/compilePlanHelpers.d.ts +7 -0
  30. package/dist/compiler/compilePlanHelpers.js +39 -0
  31. package/dist/compiler/compileProject.d.ts +11 -0
  32. package/dist/compiler/compileProject.js +182 -0
  33. package/dist/compiler/containerArtifacts.d.ts +4 -0
  34. package/dist/compiler/containerArtifacts.js +64 -0
  35. package/dist/compiler/containerArtifactsPlans.d.ts +4 -0
  36. package/dist/compiler/containerArtifactsPlans.js +154 -0
  37. package/dist/compiler/containerArtifactsRender.d.ts +6 -0
  38. package/dist/compiler/containerArtifactsRender.js +237 -0
  39. package/dist/compiler/containerArtifactsTypes.d.ts +42 -0
  40. package/dist/compiler/containerArtifactsTypes.js +1 -0
  41. package/dist/compiler/discordSurface.d.ts +4 -0
  42. package/dist/compiler/discordSurface.js +28 -0
  43. package/dist/compiler/executionDefaults.d.ts +2 -0
  44. package/dist/compiler/executionDefaults.js +9 -0
  45. package/dist/compiler/helpers.d.ts +7 -0
  46. package/dist/compiler/helpers.js +35 -0
  47. package/dist/compiler/index.d.ts +9 -0
  48. package/dist/compiler/index.js +9 -0
  49. package/dist/compiler/initProject.d.ts +9 -0
  50. package/dist/compiler/initProject.js +46 -0
  51. package/dist/compiler/modelAuth.d.ts +2 -0
  52. package/dist/compiler/modelAuth.js +17 -0
  53. package/dist/compiler/modelEnv.d.ts +10 -0
  54. package/dist/compiler/modelEnv.js +97 -0
  55. package/dist/compiler/runProject.d.ts +34 -0
  56. package/dist/compiler/runProject.js +197 -0
  57. package/dist/compiler/runProjectAuth.d.ts +9 -0
  58. package/dist/compiler/runProjectAuth.js +59 -0
  59. package/dist/compiler/surfaceSupport.d.ts +2 -0
  60. package/dist/compiler/surfaceSupport.js +13 -0
  61. package/dist/compiler/surfaces.d.ts +21 -0
  62. package/dist/compiler/surfaces.js +59 -0
  63. package/dist/compiler/syncProjectAuth.d.ts +7 -0
  64. package/dist/compiler/syncProjectAuth.js +65 -0
  65. package/dist/compiler/types.d.ts +134 -0
  66. package/dist/compiler/types.js +1 -0
  67. package/dist/compiler/updateProjectModels.d.ts +20 -0
  68. package/dist/compiler/updateProjectModels.js +181 -0
  69. package/dist/container/rootfs/var/lib/spawnfile/instances/picoclaw/agent-assistant/picoclaw/config.json +16 -0
  70. package/dist/container/rootfs/var/lib/spawnfile/instances/picoclaw/agent-assistant/picoclaw/workspace/AGENTS.md +1 -0
  71. package/dist/e2e/cli.d.ts +1 -0
  72. package/dist/e2e/cli.js +40 -0
  73. package/dist/e2e/dockerAuth.d.ts +18 -0
  74. package/dist/e2e/dockerAuth.js +212 -0
  75. package/dist/e2e/fixtures.d.ts +2 -0
  76. package/dist/e2e/fixtures.js +49 -0
  77. package/dist/e2e/index.d.ts +4 -0
  78. package/dist/e2e/index.js +4 -0
  79. package/dist/e2e/runtimePrompts.d.ts +13 -0
  80. package/dist/e2e/runtimePrompts.js +132 -0
  81. package/dist/e2e/scenarios.d.ts +3 -0
  82. package/dist/e2e/scenarios.js +84 -0
  83. package/dist/e2e/types.d.ts +35 -0
  84. package/dist/e2e/types.js +1 -0
  85. package/dist/entrypoint.sh +71 -0
  86. package/dist/filesystem/index.d.ts +2 -0
  87. package/dist/filesystem/index.js +2 -0
  88. package/dist/filesystem/io.d.ts +11 -0
  89. package/dist/filesystem/io.js +57 -0
  90. package/dist/filesystem/paths.d.ts +6 -0
  91. package/dist/filesystem/paths.js +30 -0
  92. package/dist/manifest/index.d.ts +5 -0
  93. package/dist/manifest/index.js +5 -0
  94. package/dist/manifest/loadManifest.d.ts +12 -0
  95. package/dist/manifest/loadManifest.js +208 -0
  96. package/dist/manifest/renderSpawnfile.d.ts +2 -0
  97. package/dist/manifest/renderSpawnfile.js +211 -0
  98. package/dist/manifest/scaffold.d.ts +16 -0
  99. package/dist/manifest/scaffold.js +41 -0
  100. package/dist/manifest/schemas.d.ts +989 -0
  101. package/dist/manifest/schemas.js +314 -0
  102. package/dist/manifest/skillFrontmatter.d.ts +5 -0
  103. package/dist/manifest/skillFrontmatter.js +32 -0
  104. package/dist/manifest/surfaceSchemas.d.ts +148 -0
  105. package/dist/manifest/surfaceSchemas.js +162 -0
  106. package/dist/report/createDiagnostic.d.ts +2 -0
  107. package/dist/report/createDiagnostic.js +4 -0
  108. package/dist/report/createReport.d.ts +2 -0
  109. package/dist/report/createReport.js +7 -0
  110. package/dist/report/index.d.ts +4 -0
  111. package/dist/report/index.js +4 -0
  112. package/dist/report/types.d.ts +50 -0
  113. package/dist/report/types.js +1 -0
  114. package/dist/report/writeReport.d.ts +2 -0
  115. package/dist/report/writeReport.js +9 -0
  116. package/dist/runtime/common.d.ts +13 -0
  117. package/dist/runtime/common.js +63 -0
  118. package/dist/runtime/container.d.ts +8 -0
  119. package/dist/runtime/container.js +67 -0
  120. package/dist/runtime/index.d.ts +4 -0
  121. package/dist/runtime/index.js +4 -0
  122. package/dist/runtime/install.d.ts +51 -0
  123. package/dist/runtime/install.js +167 -0
  124. package/dist/runtime/openclaw/adapter.d.ts +2 -0
  125. package/dist/runtime/openclaw/adapter.js +194 -0
  126. package/dist/runtime/openclaw/runAuth.d.ts +2 -0
  127. package/dist/runtime/openclaw/runAuth.js +125 -0
  128. package/dist/runtime/openclaw/scaffold-assets/AGENTS.md +120 -0
  129. package/dist/runtime/openclaw/scaffold-assets/CLAUDE.md +5 -0
  130. package/dist/runtime/openclaw/scaffold-assets/IDENTITY.md +23 -0
  131. package/dist/runtime/openclaw/scaffold-assets/SOUL.md +36 -0
  132. package/dist/runtime/openclaw/scaffold.d.ts +2 -0
  133. package/dist/runtime/openclaw/scaffold.js +28 -0
  134. package/dist/runtime/openclaw/surfaces.d.ts +5 -0
  135. package/dist/runtime/openclaw/surfaces.js +253 -0
  136. package/dist/runtime/picoclaw/adapter.d.ts +2 -0
  137. package/dist/runtime/picoclaw/adapter.js +204 -0
  138. package/dist/runtime/picoclaw/runAuth.d.ts +2 -0
  139. package/dist/runtime/picoclaw/runAuth.js +117 -0
  140. package/dist/runtime/picoclaw/scaffold-assets/AGENTS.md +3 -0
  141. package/dist/runtime/picoclaw/scaffold-assets/CLAUDE.md +5 -0
  142. package/dist/runtime/picoclaw/scaffold-assets/IDENTITY.md +3 -0
  143. package/dist/runtime/picoclaw/scaffold-assets/SOUL.md +3 -0
  144. package/dist/runtime/picoclaw/scaffold.d.ts +2 -0
  145. package/dist/runtime/picoclaw/scaffold.js +28 -0
  146. package/dist/runtime/picoclaw/surfaces.d.ts +5 -0
  147. package/dist/runtime/picoclaw/surfaces.js +111 -0
  148. package/dist/runtime/registry.d.ts +41 -0
  149. package/dist/runtime/registry.js +134 -0
  150. package/dist/runtime/scaffoldAssets.d.ts +1 -0
  151. package/dist/runtime/scaffoldAssets.js +2 -0
  152. package/dist/runtime/tinyclaw/adapter.d.ts +2 -0
  153. package/dist/runtime/tinyclaw/adapter.js +263 -0
  154. package/dist/runtime/tinyclaw/runAuth.d.ts +2 -0
  155. package/dist/runtime/tinyclaw/runAuth.js +22 -0
  156. package/dist/runtime/tinyclaw/scaffold-assets/AGENTS.md +160 -0
  157. package/dist/runtime/tinyclaw/scaffold-assets/CLAUDE.md +5 -0
  158. package/dist/runtime/tinyclaw/scaffold-assets/SOUL.md +177 -0
  159. package/dist/runtime/tinyclaw/scaffold.d.ts +2 -0
  160. package/dist/runtime/tinyclaw/scaffold.js +24 -0
  161. package/dist/runtime/tinyclaw/surfaces.d.ts +8 -0
  162. package/dist/runtime/tinyclaw/surfaces.js +86 -0
  163. package/dist/runtime/types.d.ts +87 -0
  164. package/dist/runtime/types.js +1 -0
  165. package/dist/runtimes/picoclaw/agents/assistant/config.json +16 -0
  166. package/dist/runtimes/picoclaw/agents/assistant/workspace/AGENTS.md +1 -0
  167. package/dist/shared/constants.d.ts +7 -0
  168. package/dist/shared/constants.js +7 -0
  169. package/dist/shared/errors.d.ts +6 -0
  170. package/dist/shared/errors.js +9 -0
  171. package/dist/shared/index.d.ts +3 -0
  172. package/dist/shared/index.js +3 -0
  173. package/dist/shared/types.d.ts +9 -0
  174. package/dist/shared/types.js +1 -0
  175. package/dist/spawnfile-report.json +71 -0
  176. package/package.json +41 -0
  177. package/runtimes.yaml +62 -0
@@ -0,0 +1,86 @@
1
+ import { SpawnfileError } from "../../shared/index.js";
2
+ export const buildTinyClawChannels = (surfaces) => {
3
+ const enabled = [];
4
+ const config = {};
5
+ if (surfaces?.discord) {
6
+ enabled.push("discord");
7
+ config.discord = {};
8
+ }
9
+ if (surfaces?.telegram) {
10
+ enabled.push("telegram");
11
+ config.telegram = {};
12
+ }
13
+ if (surfaces?.whatsapp) {
14
+ enabled.push("whatsapp");
15
+ config.whatsapp = {};
16
+ }
17
+ return {
18
+ config,
19
+ enabled
20
+ };
21
+ };
22
+ const resolveSurfaceTokenBinding = (inputs, surfaceName, getEnvName, jsonPath) => {
23
+ const surfaceLabel = surfaceName[0].toUpperCase() + surfaceName.slice(1);
24
+ const envNames = [
25
+ ...new Set(inputs.flatMap((input) => {
26
+ if (input.kind !== "agent" || input.value.kind !== "agent") {
27
+ return [];
28
+ }
29
+ const envName = getEnvName(input.value);
30
+ return envName ? [envName] : [];
31
+ }))
32
+ ];
33
+ if (envNames.length === 0) {
34
+ return undefined;
35
+ }
36
+ if (envNames.length > 1) {
37
+ throw new SpawnfileError("validation_error", `TinyClaw runtime target declares conflicting ${surfaceLabel} bot token secrets: ${envNames.join(", ")}`);
38
+ }
39
+ return [
40
+ {
41
+ envName: envNames[0],
42
+ jsonPath
43
+ }
44
+ ];
45
+ };
46
+ export const resolveTinyClawSurfaceTokenBindings = (inputs) => {
47
+ const bindings = [
48
+ ...(resolveSurfaceTokenBinding(inputs, "discord", (node) => node.surfaces?.discord?.botTokenSecret, "channels.discord.bot_token") ?? []),
49
+ ...(resolveSurfaceTokenBinding(inputs, "telegram", (node) => node.surfaces?.telegram?.botTokenSecret, "channels.telegram.bot_token") ?? [])
50
+ ];
51
+ return bindings.length > 0 ? bindings : undefined;
52
+ };
53
+ export const assertSupportedTinyClawSurfaces = (surfaces) => {
54
+ const discordAccess = surfaces?.discord?.access;
55
+ if (discordAccess) {
56
+ if (discordAccess.mode !== "pairing") {
57
+ throw new SpawnfileError("validation_error", "TinyClaw Discord only supports pairing access in Spawnfile v0.1");
58
+ }
59
+ if (discordAccess.users.length > 0 ||
60
+ discordAccess.guilds.length > 0 ||
61
+ discordAccess.channels.length > 0) {
62
+ throw new SpawnfileError("validation_error", "TinyClaw Discord does not support declarative users, guilds, or channels in Spawnfile v0.1");
63
+ }
64
+ }
65
+ const telegramAccess = surfaces?.telegram?.access;
66
+ if (telegramAccess) {
67
+ if (telegramAccess.mode !== "pairing") {
68
+ throw new SpawnfileError("validation_error", "TinyClaw Telegram only supports pairing access in Spawnfile v0.1");
69
+ }
70
+ if (telegramAccess.users.length > 0 || telegramAccess.chats.length > 0) {
71
+ throw new SpawnfileError("validation_error", "TinyClaw Telegram does not support declarative users or chats in Spawnfile v0.1");
72
+ }
73
+ }
74
+ const whatsappAccess = surfaces?.whatsapp?.access;
75
+ if (whatsappAccess) {
76
+ if (whatsappAccess.mode !== "pairing") {
77
+ throw new SpawnfileError("validation_error", "TinyClaw WhatsApp only supports pairing access in Spawnfile v0.1");
78
+ }
79
+ if (whatsappAccess.users.length > 0 || whatsappAccess.groups.length > 0) {
80
+ throw new SpawnfileError("validation_error", "TinyClaw WhatsApp does not support declarative users or groups in Spawnfile v0.1");
81
+ }
82
+ }
83
+ if (surfaces?.slack) {
84
+ throw new SpawnfileError("validation_error", "TinyClaw does not support Slack in Spawnfile v0.1");
85
+ }
86
+ };
@@ -0,0 +1,87 @@
1
+ import type { EffectiveModelTarget, ResolvedAgentNode, ResolvedAgentSurfaces, ResolvedTeamNode } from "../compiler/types.js";
2
+ import type { ResolvedAuthProfile } from "../auth/index.js";
3
+ import type { AgentManifest } from "../manifest/index.js";
4
+ import type { CapabilityReport, DiagnosticReport } from "../report/index.js";
5
+ import type { ContainerRuntimeInstanceReport } from "../report/index.js";
6
+ export interface EmittedFile {
7
+ content: string;
8
+ path: string;
9
+ }
10
+ export interface RuntimeAgentScaffold {
11
+ files: EmittedFile[];
12
+ manifest: AgentManifest;
13
+ }
14
+ export interface ContainerTargetInput {
15
+ emittedFiles: EmittedFile[];
16
+ id: string;
17
+ kind: "agent" | "team";
18
+ slug: string;
19
+ value: ResolvedAgentNode | ResolvedTeamNode;
20
+ }
21
+ export interface ContainerTargetEnvFile {
22
+ envName: string;
23
+ relativePath: string;
24
+ }
25
+ export interface ContainerTarget {
26
+ configEnvBindings?: RuntimeContainerConfigEnvBinding[];
27
+ envFiles?: ContainerTargetEnvFile[];
28
+ files: EmittedFile[];
29
+ id: string;
30
+ sourceIds?: string[];
31
+ }
32
+ export interface RuntimeContainerInstancePaths {
33
+ configPathTemplate: string;
34
+ homePathTemplate?: string;
35
+ workspacePathTemplate: string;
36
+ }
37
+ export interface RuntimeContainerConfigEnvBinding {
38
+ envName: string;
39
+ jsonPath: string;
40
+ }
41
+ export interface RuntimeContainerMeta {
42
+ configFileName: string;
43
+ configEnvBindings?: RuntimeContainerConfigEnvBinding[];
44
+ configPathEnv?: string;
45
+ env?: Array<{
46
+ description: string;
47
+ name: string;
48
+ required: boolean;
49
+ }>;
50
+ homeEnv?: string;
51
+ instancePaths: RuntimeContainerInstancePaths;
52
+ globalNpmPackages?: string[];
53
+ port?: number;
54
+ portEnv?: string;
55
+ standaloneBaseImage: string;
56
+ startCommand: string[];
57
+ staticEnv?: Record<string, string>;
58
+ systemDeps: string[];
59
+ }
60
+ export interface RuntimeAuthPreparationInput {
61
+ authProfile: ResolvedAuthProfile;
62
+ env: Record<string, string>;
63
+ instance: ContainerRuntimeInstanceReport;
64
+ outputDirectory: string;
65
+ tempRoot: string;
66
+ }
67
+ export interface RuntimeAuthPreparationResult {
68
+ coveredModelSecrets: string[];
69
+ mountArgs: string[];
70
+ }
71
+ export interface AdapterCompileResult {
72
+ capabilities: CapabilityReport[];
73
+ diagnostics: DiagnosticReport[];
74
+ files: EmittedFile[];
75
+ }
76
+ export interface RuntimeAdapter {
77
+ assertSupportedModelTarget(target: EffectiveModelTarget): void;
78
+ assertSupportedSurfaces?(surfaces: ResolvedAgentSurfaces | undefined): void;
79
+ container: RuntimeContainerMeta;
80
+ compileAgent(node: ResolvedAgentNode): Promise<AdapterCompileResult>;
81
+ compileTeam?(node: ResolvedTeamNode): Promise<AdapterCompileResult>;
82
+ createContainerTargets?(inputs: ContainerTargetInput[]): Promise<ContainerTarget[]>;
83
+ name: string;
84
+ prepareRuntimeAuth?(input: RuntimeAuthPreparationInput): Promise<RuntimeAuthPreparationResult>;
85
+ scaffoldAgentProject?(): RuntimeAgentScaffold;
86
+ validateRuntimeOptions?(options: Record<string, unknown>): DiagnosticReport[];
87
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,16 @@
1
+ {
2
+ "agents": {
3
+ "defaults": {
4
+ "workspace": "<workspace-path>",
5
+ "restrict_to_workspace": true,
6
+ "model_name": "claude-sonnet-4.6"
7
+ }
8
+ },
9
+ "model_list": [
10
+ {
11
+ "api_key": "file://secrets/ANTHROPIC_API_KEY",
12
+ "model_name": "claude-sonnet-4.6",
13
+ "model": "anthropic/claude-sonnet-4.6"
14
+ }
15
+ ]
16
+ }
@@ -0,0 +1 @@
1
+ You are a concise assistant. Reply with exactly the requested token and nothing else.
@@ -0,0 +1,7 @@
1
+ export declare const DEFAULT_OUTPUT_DIRECTORY = ".spawn";
2
+ export declare const DEFAULT_DISCORD_BOT_TOKEN_SECRET = "DISCORD_BOT_TOKEN";
3
+ export declare const DEFAULT_SLACK_APP_TOKEN_SECRET = "SLACK_APP_TOKEN";
4
+ export declare const DEFAULT_SLACK_BOT_TOKEN_SECRET = "SLACK_BOT_TOKEN";
5
+ export declare const DEFAULT_TELEGRAM_BOT_TOKEN_SECRET = "TELEGRAM_BOT_TOKEN";
6
+ export declare const MANIFEST_FILENAME = "Spawnfile";
7
+ export declare const REPORT_FILENAME = "spawnfile-report.json";
@@ -0,0 +1,7 @@
1
+ export const DEFAULT_OUTPUT_DIRECTORY = ".spawn";
2
+ export const DEFAULT_DISCORD_BOT_TOKEN_SECRET = "DISCORD_BOT_TOKEN";
3
+ export const DEFAULT_SLACK_APP_TOKEN_SECRET = "SLACK_APP_TOKEN";
4
+ export const DEFAULT_SLACK_BOT_TOKEN_SECRET = "SLACK_BOT_TOKEN";
5
+ export const DEFAULT_TELEGRAM_BOT_TOKEN_SECRET = "TELEGRAM_BOT_TOKEN";
6
+ export const MANIFEST_FILENAME = "Spawnfile";
7
+ export const REPORT_FILENAME = "spawnfile-report.json";
@@ -0,0 +1,6 @@
1
+ export type SpawnfileErrorCode = "adapter_error" | "compile_error" | "invalid_manifest" | "io_error" | "runtime_error" | "validation_error";
2
+ export declare class SpawnfileError extends Error {
3
+ readonly code: SpawnfileErrorCode;
4
+ constructor(code: SpawnfileErrorCode, message: string);
5
+ }
6
+ export declare const isSpawnfileError: (value: unknown) => value is SpawnfileError;
@@ -0,0 +1,9 @@
1
+ export class SpawnfileError extends Error {
2
+ code;
3
+ constructor(code, message) {
4
+ super(message);
5
+ this.code = code;
6
+ this.name = "SpawnfileError";
7
+ }
8
+ }
9
+ export const isSpawnfileError = (value) => value instanceof SpawnfileError;
@@ -0,0 +1,3 @@
1
+ export * from "./constants.js";
2
+ export * from "./errors.js";
3
+ export * from "./types.js";
@@ -0,0 +1,3 @@
1
+ export * from "./constants.js";
2
+ export * from "./errors.js";
3
+ export * from "./types.js";
@@ -0,0 +1,9 @@
1
+ export type JsonPrimitive = boolean | null | number | string;
2
+ export type JsonValue = JsonObject | JsonPrimitive | JsonValue[];
3
+ export type ModelAuthMethod = "api_key" | "claude-code" | "codex" | "none";
4
+ export type ModelEndpointCompatibility = "anthropic" | "openai";
5
+ export type RuntimeLifecycleStatus = "active" | "deprecated" | "exploratory";
6
+ export interface JsonObject {
7
+ [key: string]: JsonValue;
8
+ }
9
+ export type StringMap = Record<string, string>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,71 @@
1
+ {
2
+ "container": {
3
+ "dockerfile": "Dockerfile",
4
+ "entrypoint": "entrypoint.sh",
5
+ "env_example": ".env.example",
6
+ "model_secrets_required": [
7
+ "ANTHROPIC_API_KEY"
8
+ ],
9
+ "ports": [
10
+ 18790
11
+ ],
12
+ "runtime_instances": [
13
+ {
14
+ "config_path": "/var/lib/spawnfile/instances/picoclaw/agent-assistant/picoclaw/config.json",
15
+ "home_path": "/var/lib/spawnfile/instances/picoclaw/agent-assistant/picoclaw",
16
+ "id": "agent-assistant",
17
+ "model_secrets_required": [
18
+ "ANTHROPIC_API_KEY"
19
+ ],
20
+ "runtime": "picoclaw"
21
+ }
22
+ ],
23
+ "runtime_homes": [
24
+ "/var/lib/spawnfile/instances/picoclaw/agent-assistant/picoclaw"
25
+ ],
26
+ "runtime_secrets_required": [],
27
+ "runtimes_installed": [
28
+ "picoclaw"
29
+ ],
30
+ "secrets_required": [
31
+ "ANTHROPIC_API_KEY"
32
+ ]
33
+ },
34
+ "diagnostics": [],
35
+ "nodes": [
36
+ {
37
+ "capabilities": [
38
+ {
39
+ "key": "docs.system",
40
+ "message": "",
41
+ "outcome": "supported"
42
+ },
43
+ {
44
+ "key": "execution.model",
45
+ "message": "",
46
+ "outcome": "supported"
47
+ },
48
+ {
49
+ "key": "execution.workspace",
50
+ "message": "",
51
+ "outcome": "supported"
52
+ },
53
+ {
54
+ "key": "execution.sandbox",
55
+ "message": "",
56
+ "outcome": "supported"
57
+ }
58
+ ],
59
+ "diagnostics": [],
60
+ "id": "agent:assistant",
61
+ "kind": "agent",
62
+ "output_dir": "runtimes/picoclaw/agents/assistant",
63
+ "runtime": "picoclaw",
64
+ "runtime_ref": "v0.2.3",
65
+ "runtime_status": "active",
66
+ "source": "/tmp/spawnfile-e2e/picoclaw-anthropic/Spawnfile"
67
+ }
68
+ ],
69
+ "root": "/tmp/spawnfile-e2e/picoclaw-anthropic/Spawnfile",
70
+ "spawnfile_version": "0.1"
71
+ }
package/package.json ADDED
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "spawnfile",
3
+ "version": "0.1.0",
4
+ "description": "Canonical source compiler for autonomous agents and teams.",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "bin": {
8
+ "spawnfile": "dist/cli/index.js"
9
+ },
10
+ "files": [
11
+ "dist",
12
+ "runtimes.yaml"
13
+ ],
14
+ "engines": {
15
+ "node": ">=22.0.0"
16
+ },
17
+ "scripts": {
18
+ "blueprints": "./scripts/blueprints.sh",
19
+ "build": "tsc --project tsconfig.build.json && node ./scripts/copy-runtime-scaffold-assets.mjs",
20
+ "clean": "rm -rf coverage dist",
21
+ "coverage": "vitest run --coverage",
22
+ "dev": "tsx src/cli/index.ts",
23
+ "runtimes": "./scripts/runtimes.sh",
24
+ "runtimes:sync": "./scripts/runtimes.sh && ./scripts/blueprints.sh",
25
+ "test:e2e:docker-auth": "tsx src/e2e/cli.ts",
26
+ "test": "vitest run",
27
+ "typecheck": "tsc --project tsconfig.json --noEmit"
28
+ },
29
+ "dependencies": {
30
+ "commander": "^14.0.1",
31
+ "yaml": "^2.8.1",
32
+ "zod": "^4.1.12"
33
+ },
34
+ "devDependencies": {
35
+ "@types/node": "^24.6.0",
36
+ "@vitest/coverage-v8": "^3.2.4",
37
+ "tsx": "^4.20.6",
38
+ "typescript": "^5.9.3",
39
+ "vitest": "^3.2.4"
40
+ }
41
+ }
package/runtimes.yaml ADDED
@@ -0,0 +1,62 @@
1
+ # Runtime registry
2
+ #
3
+ # Each entry pins the stable version of a runtime that the Spawnfile
4
+ # compiler currently targets or is researching.
5
+ #
6
+ # Fields:
7
+ # remote Git clone URL
8
+ # ref Pinned git ref — should be the latest stable tag
9
+ # default_branch The repo's main branch (for fetch)
10
+ # install Pinned install strategy for the verified runtime version
11
+ # status active (has adapter) | exploratory (research only)
12
+ #
13
+ # Run ./scripts/runtimes.sh to clone or update all entries to their
14
+ # pinned refs.
15
+
16
+ runtimes:
17
+ openclaw:
18
+ remote: git@github.com:openclaw/openclaw.git
19
+ ref: v2026.3.13-1
20
+ default_branch: main
21
+ install:
22
+ kind: npm
23
+ package: openclaw
24
+ version: 2026.3.13
25
+ status: active
26
+
27
+ picoclaw:
28
+ remote: git@github.com:sipeed/picoclaw.git
29
+ ref: v0.2.3
30
+ default_branch: main
31
+ install:
32
+ kind: github_release_archive
33
+ repository: sipeed/picoclaw
34
+ tag: v0.2.3
35
+ binary: picoclaw
36
+ assets:
37
+ linux_amd64: picoclaw_Linux_x86_64.tar.gz
38
+ linux_arm64: picoclaw_Linux_arm64.tar.gz
39
+ status: active
40
+
41
+ tinyclaw:
42
+ remote: git@github.com:TinyAGI/tinyclaw.git
43
+ ref: v0.0.15
44
+ default_branch: main
45
+ install:
46
+ kind: github_release_bundle
47
+ repository: TinyAGI/tinyagi
48
+ tag: v0.0.15
49
+ asset: tinyagi-bundle.tar.gz
50
+ status: active
51
+
52
+ nullclaw:
53
+ remote: git@github.com:nullclaw/nullclaw.git
54
+ ref: v2026.3.17
55
+ default_branch: main
56
+ status: exploratory
57
+
58
+ zeroclaw:
59
+ remote: git@github.com:zeroclaw-labs/zeroclaw.git
60
+ ref: v0.5.0
61
+ default_branch: master
62
+ status: exploratory