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.
- package/README.md +21 -3
- package/dist/auth/runtimeCredentials.js +18 -2
- package/dist/cli/devCommands.d.ts +3 -0
- package/dist/cli/devCommands.js +115 -0
- package/dist/cli/lifecycleCommands.js +103 -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 +10 -1
- package/dist/cli/runCli.js +41 -13
- package/dist/cli/runtimeCommands.js +1 -0
- package/dist/cli/statusCommand.d.ts +43 -0
- package/dist/cli/statusCommand.js +428 -0
- package/dist/cli/surfaceCommands.js +4 -0
- package/dist/compiler/agentSurfaces.js +2 -4
- package/dist/compiler/buildProject.d.ts +9 -1
- package/dist/compiler/buildProject.js +44 -5
- package/dist/compiler/compileProject.d.ts +2 -0
- package/dist/compiler/compileProject.js +22 -11
- 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 +31 -69
- package/dist/compiler/containerArtifactsTypes.d.ts +9 -0
- package/dist/compiler/containerEntrypointRender.js +22 -32
- package/dist/compiler/containerPackageRender.d.ts +15 -0
- package/dist/compiler/containerPackageRender.js +63 -0
- package/dist/compiler/containerTargetResources.js +3 -1
- package/dist/compiler/index.d.ts +1 -0
- package/dist/compiler/index.js +1 -0
- package/dist/compiler/moltnetArtifacts.js +21 -1
- package/dist/compiler/moltnetBinaries.d.ts +4 -1
- package/dist/compiler/moltnetBinaries.js +24 -3
- package/dist/compiler/moltnetClientConfig.d.ts +1 -1
- package/dist/compiler/moltnetClientConfig.js +14 -16
- package/dist/compiler/moltnetNodeConfig.js +2 -4
- package/dist/compiler/moltnetResolution.js +1 -1
- package/dist/compiler/moltnetRoomMemberships.js +1 -2
- package/dist/compiler/moltnetRuntimeConfig.d.ts +1 -1
- package/dist/compiler/moltnetRuntimeConfig.js +9 -10
- 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 +109 -126
- 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 +202 -0
- package/dist/compiler/types.d.ts +1 -2
- package/dist/compiler/upProject.d.ts +6 -0
- package/dist/compiler/upProject.js +43 -8
- package/dist/compiler/view/buildOrganizationView.js +4 -1
- package/dist/compiler/view/declarations.d.ts +4 -0
- package/dist/compiler/view/declarations.js +104 -0
- package/dist/compiler/view/renderNetworks.js +1 -2
- package/dist/compiler/view/renderTree.js +6 -2
- package/dist/compiler/view/types.d.ts +64 -1
- package/dist/deployment/dockerInspect.d.ts +29 -0
- package/dist/deployment/dockerInspect.js +130 -0
- package/dist/deployment/dockerLabels.d.ts +16 -0
- package/dist/deployment/dockerLabels.js +32 -0
- package/dist/deployment/dockerLogs.d.ts +24 -0
- package/dist/deployment/dockerLogs.js +96 -0
- package/dist/deployment/dockerManager.d.ts +59 -0
- package/dist/deployment/dockerManager.js +76 -0
- package/dist/deployment/dockerProbeGateway.d.ts +16 -0
- package/dist/deployment/dockerProbeGateway.js +48 -0
- package/dist/deployment/dockerRecover.d.ts +17 -0
- package/dist/deployment/dockerRecover.js +129 -0
- package/dist/deployment/homeStore.d.ts +19 -0
- package/dist/deployment/homeStore.js +130 -0
- package/dist/deployment/index.d.ts +10 -0
- package/dist/deployment/index.js +10 -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/dev/activity.d.ts +14 -0
- package/dist/dev/activity.js +48 -0
- package/dist/dev/docker.d.ts +16 -0
- package/dist/dev/docker.js +71 -0
- package/dist/dev/index.d.ts +2 -0
- package/dist/dev/index.js +2 -0
- package/dist/dev/project.d.ts +35 -0
- package/dist/dev/project.js +164 -0
- package/dist/distribution/buildDistributionReport.d.ts +22 -0
- package/dist/distribution/buildDistributionReport.js +51 -0
- package/dist/distribution/consumeImage.d.ts +29 -0
- package/dist/distribution/consumeImage.js +254 -0
- package/dist/distribution/consumeImageSupport.d.ts +18 -0
- package/dist/distribution/consumeImageSupport.js +63 -0
- package/dist/distribution/distributionReportSchema.d.ts +84 -0
- package/dist/distribution/distributionReportSchema.js +107 -0
- package/dist/distribution/dockerRunner.d.ts +5 -0
- package/dist/distribution/dockerRunner.js +21 -0
- package/dist/distribution/extractImage.d.ts +25 -0
- package/dist/distribution/extractImage.js +96 -0
- package/dist/distribution/fingerprint.d.ts +2 -0
- package/dist/distribution/fingerprint.js +14 -0
- package/dist/distribution/imageRef.d.ts +9 -0
- package/dist/distribution/imageRef.js +65 -0
- package/dist/distribution/imageRuntimeAuth.d.ts +19 -0
- package/dist/distribution/imageRuntimeAuth.js +71 -0
- package/dist/distribution/index.d.ts +24 -0
- package/dist/distribution/index.js +16 -0
- package/dist/distribution/preflight.d.ts +11 -0
- package/dist/distribution/preflight.js +65 -0
- package/dist/distribution/projectImageView.d.ts +8 -0
- package/dist/distribution/projectImageView.js +83 -0
- package/dist/distribution/projectName.d.ts +1 -0
- package/dist/distribution/projectName.js +12 -0
- package/dist/distribution/renderImageInterface.d.ts +30 -0
- package/dist/distribution/renderImageInterface.js +86 -0
- package/dist/distribution/tarReader.d.ts +10 -0
- package/dist/distribution/tarReader.js +69 -0
- package/dist/distribution/types.d.ts +80 -0
- package/dist/distribution/types.js +4 -0
- package/dist/distribution/verifyDistributionReport.d.ts +12 -0
- package/dist/distribution/verifyDistributionReport.js +29 -0
- package/dist/filesystem/paths.d.ts +6 -0
- package/dist/filesystem/paths.js +11 -0
- package/dist/manifest/loadManifest.js +22 -2
- package/dist/manifest/renderSpawnfile.js +2 -4
- package/dist/manifest/schemas.d.ts +17 -41
- package/dist/manifest/surfaceSchemas.d.ts +19 -47
- package/dist/manifest/surfaceSchemas.js +3 -6
- package/dist/report/createReport.d.ts +7 -1
- package/dist/report/createReport.js +28 -1
- package/dist/report/types.d.ts +43 -0
- package/dist/runtime/common.d.ts +2 -0
- package/dist/runtime/common.js +1 -1
- package/dist/runtime/container.d.ts +1 -0
- package/dist/runtime/container.js +82 -15
- package/dist/runtime/index.d.ts +1 -0
- package/dist/runtime/index.js +1 -0
- package/dist/runtime/install.d.ts +1 -11
- package/dist/runtime/install.js +27 -30
- 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/pi/adapter.d.ts +4 -0
- package/dist/runtime/pi/adapter.js +198 -0
- package/dist/runtime/pi/appActivitySource.d.ts +1 -0
- package/dist/runtime/pi/appActivitySource.js +87 -0
- package/dist/runtime/pi/appCoreSource.d.ts +1 -0
- package/dist/runtime/pi/appCoreSource.js +354 -0
- package/dist/runtime/pi/appPreludeSource.d.ts +1 -0
- package/dist/runtime/pi/appPreludeSource.js +103 -0
- package/dist/runtime/pi/appSource.d.ts +1 -0
- package/dist/runtime/pi/appSource.js +8 -0
- package/dist/runtime/pi/appTemplate.d.ts +28 -0
- package/dist/runtime/pi/appTemplate.js +144 -0
- package/dist/runtime/pi/runAuth.d.ts +2 -0
- package/dist/runtime/pi/runAuth.js +68 -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 +5 -12
- package/dist/runtime/statusProbes.d.ts +16 -0
- package/dist/runtime/statusProbes.js +41 -0
- package/dist/runtime/types.d.ts +53 -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 +121 -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 +9 -2
- package/runtimes.yaml +44 -21
- 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
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { OrganizationView, OrganizationViewTreeNode } from "../compiler/index.js";
|
|
2
|
+
export declare const flattenOrganizationNodes: (view: OrganizationView) => OrganizationViewTreeNode[];
|
|
3
|
+
export declare const countNodesByKind: (nodes: OrganizationViewTreeNode[]) => {
|
|
4
|
+
agents: number;
|
|
5
|
+
teams: number;
|
|
6
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export const flattenOrganizationNodes = (view) => {
|
|
2
|
+
const nodes = [];
|
|
3
|
+
const visit = (node) => {
|
|
4
|
+
nodes.push(node);
|
|
5
|
+
for (const child of node.children) {
|
|
6
|
+
visit(child.node);
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
visit(view.root);
|
|
10
|
+
return nodes;
|
|
11
|
+
};
|
|
12
|
+
export const countNodesByKind = (nodes) => ({
|
|
13
|
+
agents: nodes.filter((node) => node.kind === "agent").length,
|
|
14
|
+
teams: nodes.filter((node) => node.kind === "team").length
|
|
15
|
+
});
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import type { OrganizationView } from "../compiler/index.js";
|
|
2
|
+
export type StatusSeverity = "error" | "ok" | "unknown" | "warn";
|
|
3
|
+
export type StatusExitCode = 0 | 1 | 2;
|
|
4
|
+
export type StatusOutputMode = "json" | "pretty" | "quiet";
|
|
5
|
+
export type StatusSelectorKind = "agent" | "network" | "runtime" | "team";
|
|
6
|
+
export interface StatusObservation {
|
|
7
|
+
details?: Record<string, unknown>;
|
|
8
|
+
key: string;
|
|
9
|
+
label: string;
|
|
10
|
+
message: string;
|
|
11
|
+
severity: StatusSeverity;
|
|
12
|
+
source: "compile_report" | "declared" | "deployment" | "input" | "network" | "runtime";
|
|
13
|
+
subject: string;
|
|
14
|
+
}
|
|
15
|
+
export interface StatusObservationCounts {
|
|
16
|
+
error: number;
|
|
17
|
+
ok: number;
|
|
18
|
+
unknown: number;
|
|
19
|
+
warn: number;
|
|
20
|
+
}
|
|
21
|
+
export interface StatusSelection {
|
|
22
|
+
kind: StatusSelectorKind;
|
|
23
|
+
label: string;
|
|
24
|
+
subjectKeys: string[];
|
|
25
|
+
value: string;
|
|
26
|
+
}
|
|
27
|
+
export interface StatusInputFailure {
|
|
28
|
+
exitCode: 2;
|
|
29
|
+
message: string;
|
|
30
|
+
}
|
|
31
|
+
export interface StatusCompileReportInfo {
|
|
32
|
+
compileFingerprint: string | null;
|
|
33
|
+
generatedAt: string | null;
|
|
34
|
+
outputDirectory: string | null;
|
|
35
|
+
path: string;
|
|
36
|
+
present: boolean;
|
|
37
|
+
root: string | null;
|
|
38
|
+
}
|
|
39
|
+
export interface StaticStatusSummary {
|
|
40
|
+
agents: number;
|
|
41
|
+
deployments: number;
|
|
42
|
+
networks: number;
|
|
43
|
+
runtimes: number;
|
|
44
|
+
teams: number;
|
|
45
|
+
}
|
|
46
|
+
export interface StatusDeploymentUnitLive {
|
|
47
|
+
checked: boolean;
|
|
48
|
+
containerId: string | null;
|
|
49
|
+
drift: string[];
|
|
50
|
+
exists: boolean | null;
|
|
51
|
+
exitCode: number | null;
|
|
52
|
+
finishedAt: string | null;
|
|
53
|
+
imageId: string | null;
|
|
54
|
+
message: string;
|
|
55
|
+
restartCount: number | null;
|
|
56
|
+
running: boolean | null;
|
|
57
|
+
severity: StatusSeverity;
|
|
58
|
+
startedAt: string | null;
|
|
59
|
+
status: string | null;
|
|
60
|
+
}
|
|
61
|
+
export interface StatusDeploymentUnitSummary {
|
|
62
|
+
containerId: string | null;
|
|
63
|
+
containerName: string | null;
|
|
64
|
+
contains: Array<{
|
|
65
|
+
id: string;
|
|
66
|
+
kind: string;
|
|
67
|
+
}>;
|
|
68
|
+
id: string;
|
|
69
|
+
imageId: string | null;
|
|
70
|
+
imageTag: string;
|
|
71
|
+
kind: "container";
|
|
72
|
+
live: StatusDeploymentUnitLive | null;
|
|
73
|
+
runtimeInstances: string[];
|
|
74
|
+
}
|
|
75
|
+
export interface StatusDeploymentSummary {
|
|
76
|
+
authProfile: string | null;
|
|
77
|
+
compileFingerprint: string;
|
|
78
|
+
createdAt: string;
|
|
79
|
+
manager: string;
|
|
80
|
+
name: string;
|
|
81
|
+
recordPath: string;
|
|
82
|
+
target: string;
|
|
83
|
+
units: StatusDeploymentUnitSummary[];
|
|
84
|
+
}
|
|
85
|
+
export interface StatusLiveRequest {
|
|
86
|
+
context: string | null;
|
|
87
|
+
deploymentName: string | null;
|
|
88
|
+
logs: boolean;
|
|
89
|
+
recover: boolean;
|
|
90
|
+
requested: boolean;
|
|
91
|
+
}
|
|
92
|
+
export interface StaticStatus {
|
|
93
|
+
compile: StatusCompileReportInfo;
|
|
94
|
+
deployments: StatusDeploymentSummary[];
|
|
95
|
+
inputPath: string;
|
|
96
|
+
live: StatusLiveRequest;
|
|
97
|
+
observations: StatusObservation[];
|
|
98
|
+
outputDirectory: string;
|
|
99
|
+
projectRoot: string | null;
|
|
100
|
+
selection: StatusSelection | null;
|
|
101
|
+
summary: StaticStatusSummary;
|
|
102
|
+
view: OrganizationView;
|
|
103
|
+
version: "spawnfile.status.v1";
|
|
104
|
+
}
|
|
105
|
+
export interface StatusCommandResult {
|
|
106
|
+
error?: string;
|
|
107
|
+
exitCode: StatusExitCode;
|
|
108
|
+
output?: string;
|
|
109
|
+
status?: StaticStatus;
|
|
110
|
+
}
|
|
111
|
+
export interface StatusRenderOptions {
|
|
112
|
+
mode: StatusOutputMode;
|
|
113
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spawnfile",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.13",
|
|
4
4
|
"description": "Canonical source compiler for autonomous agents and teams.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -25,13 +25,20 @@
|
|
|
25
25
|
"release:patch": "npm version patch && npm publish",
|
|
26
26
|
"release:minor": "npm version minor && npm publish",
|
|
27
27
|
"release:major": "npm version major && npm publish",
|
|
28
|
+
"runtime:images": "npm run runtime:openclaw-image && npm run runtime:picoclaw-image",
|
|
29
|
+
"runtime:openclaw-image": "docker build -f runtime-images/openclaw/Dockerfile -t noopolis/spawnfile-runtime-openclaw:2026.6.8-local runtime-images/openclaw",
|
|
30
|
+
"runtime:pi-base": "./scripts/build-pi-runtime-base.sh",
|
|
31
|
+
"runtime:picoclaw-image": "docker build -f runtime-images/picoclaw/Dockerfile -t noopolis/spawnfile-runtime-picoclaw:0.2.9-local runtime-images/picoclaw",
|
|
28
32
|
"runtimes": "./scripts/runtimes.sh",
|
|
29
33
|
"runtimes:sync": "./scripts/runtimes.sh && ./scripts/blueprints.sh",
|
|
30
34
|
"test:e2e:docker-auth": "tsx src/e2e/cli.ts",
|
|
31
35
|
"test:e2e:moltnet-team-chat": "tsx src/e2e/cli.ts moltnet-team-chat",
|
|
32
36
|
"test:e2e:operational-smoke": "tsx src/e2e/cli.ts operational-smoke",
|
|
33
37
|
"test": "vitest run",
|
|
34
|
-
"typecheck": "tsc --project tsconfig.json --noEmit"
|
|
38
|
+
"typecheck": "tsc --project tsconfig.json --noEmit",
|
|
39
|
+
"test:e2e:distribution-image": "tsx src/e2e/cli.ts distribution-image",
|
|
40
|
+
"test:e2e:distribution-roundtrip": "tsx src/e2e/cli.ts distribution-roundtrip",
|
|
41
|
+
"test:e2e:pi-harness-org": "tsx src/e2e/cli.ts pi-harness-org"
|
|
35
42
|
},
|
|
36
43
|
"dependencies": {
|
|
37
44
|
"commander": "^14.0.1",
|
package/runtimes.yaml
CHANGED
|
@@ -14,49 +14,72 @@
|
|
|
14
14
|
# pinned refs.
|
|
15
15
|
|
|
16
16
|
runtimes:
|
|
17
|
+
daimon:
|
|
18
|
+
remote: git@github.com:noopolis/daimon.git
|
|
19
|
+
ref: v0.1.0
|
|
20
|
+
default_branch: main
|
|
21
|
+
install:
|
|
22
|
+
kind: container_image
|
|
23
|
+
image: noopolis/spawnfile-runtime-daimon
|
|
24
|
+
tag: 0.1.0
|
|
25
|
+
status: active
|
|
26
|
+
|
|
17
27
|
openclaw:
|
|
18
28
|
remote: git@github.com:openclaw/openclaw.git
|
|
19
|
-
ref: v2026.
|
|
29
|
+
ref: v2026.6.8
|
|
20
30
|
default_branch: main
|
|
21
31
|
install:
|
|
22
|
-
kind:
|
|
23
|
-
|
|
24
|
-
|
|
32
|
+
kind: container_image
|
|
33
|
+
image: noopolis/spawnfile-runtime-openclaw
|
|
34
|
+
tag: 2026.6.8
|
|
25
35
|
status: active
|
|
26
36
|
|
|
27
37
|
picoclaw:
|
|
28
38
|
remote: git@github.com:sipeed/picoclaw.git
|
|
29
|
-
ref: v0.2.
|
|
39
|
+
ref: v0.2.9
|
|
30
40
|
default_branch: main
|
|
31
41
|
install:
|
|
32
|
-
kind:
|
|
33
|
-
|
|
34
|
-
tag:
|
|
35
|
-
binary: picoclaw
|
|
36
|
-
assets:
|
|
37
|
-
linux_amd64: picoclaw_Linux_x86_64.tar.gz
|
|
38
|
-
linux_arm64: picoclaw_Linux_arm64.tar.gz
|
|
42
|
+
kind: container_image
|
|
43
|
+
image: noopolis/spawnfile-runtime-picoclaw
|
|
44
|
+
tag: 0.2.9
|
|
39
45
|
status: active
|
|
40
46
|
|
|
41
|
-
|
|
42
|
-
remote: git@github.com:
|
|
43
|
-
ref: v0.
|
|
47
|
+
pi:
|
|
48
|
+
remote: git@github.com:earendil-works/pi.git
|
|
49
|
+
ref: v0.79.9
|
|
44
50
|
default_branch: main
|
|
45
51
|
install:
|
|
46
|
-
kind:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
asset: tinyagi-bundle.tar.gz
|
|
52
|
+
kind: npm
|
|
53
|
+
package: "@earendil-works/pi-coding-agent"
|
|
54
|
+
version: 0.79.9
|
|
50
55
|
status: active
|
|
51
56
|
|
|
57
|
+
hermes-agent:
|
|
58
|
+
remote: git@github.com:NousResearch/hermes-agent.git
|
|
59
|
+
ref: v2026.6.5
|
|
60
|
+
default_branch: main
|
|
61
|
+
status: exploratory
|
|
62
|
+
|
|
52
63
|
nullclaw:
|
|
53
64
|
remote: git@github.com:nullclaw/nullclaw.git
|
|
54
|
-
ref: v2026.
|
|
65
|
+
ref: v2026.5.29
|
|
66
|
+
default_branch: main
|
|
67
|
+
status: exploratory
|
|
68
|
+
|
|
69
|
+
opencode:
|
|
70
|
+
remote: git@github.com:anomalyco/opencode.git
|
|
71
|
+
ref: v1.16.2
|
|
72
|
+
default_branch: dev
|
|
73
|
+
status: exploratory
|
|
74
|
+
|
|
75
|
+
openfang:
|
|
76
|
+
remote: git@github.com:RightNow-AI/openfang.git
|
|
77
|
+
ref: v0.6.9
|
|
55
78
|
default_branch: main
|
|
56
79
|
status: exploratory
|
|
57
80
|
|
|
58
81
|
zeroclaw:
|
|
59
82
|
remote: git@github.com:zeroclaw-labs/zeroclaw.git
|
|
60
|
-
ref: v0.5
|
|
83
|
+
ref: v0.7.5
|
|
61
84
|
default_branch: master
|
|
62
85
|
status: exploratory
|
|
@@ -1,284 +0,0 @@
|
|
|
1
|
-
import { listEffectiveExecutionModelTargets } from "../../compiler/modelEnv.js";
|
|
2
|
-
import { SpawnfileError } from "../../shared/index.js";
|
|
3
|
-
import { createCapability, createAgentCapabilities, createDocumentFiles, createSkillFiles } from "../common.js";
|
|
4
|
-
import { prepareTinyClawRuntimeAuth } from "./runAuth.js";
|
|
5
|
-
import { createTinyClawAgentScaffold } from "./scaffold.js";
|
|
6
|
-
import { assertSupportedTinyClawSurfaces, buildTinyClawChannels, resolveTinyClawSurfaceTokenBindings } from "./surfaces.js";
|
|
7
|
-
import { createScheduleDiagnostics, createTinyClawSchedulesFile, scheduleOutcomeFor } from "./schedules.js";
|
|
8
|
-
const WORKSPACE_PLACEHOLDER = "<workspace-path>";
|
|
9
|
-
const SUPPORTED_TINYCLAW_OPENAI_MODEL_PREFIXES = ["gpt-5"];
|
|
10
|
-
const TINYCLAW_START_SCRIPT = `
|
|
11
|
-
set -euo pipefail
|
|
12
|
-
PIDS=()
|
|
13
|
-
node <runtime-root>/packages/main/dist/index.js &
|
|
14
|
-
PIDS+=("$!")
|
|
15
|
-
sleep 1
|
|
16
|
-
while IFS= read -r channel; do
|
|
17
|
-
case "$channel" in
|
|
18
|
-
discord)
|
|
19
|
-
node <runtime-root>/packages/channels/dist/discord.js &
|
|
20
|
-
PIDS+=("$!")
|
|
21
|
-
;;
|
|
22
|
-
telegram)
|
|
23
|
-
node <runtime-root>/packages/channels/dist/telegram.js &
|
|
24
|
-
PIDS+=("$!")
|
|
25
|
-
;;
|
|
26
|
-
whatsapp)
|
|
27
|
-
node <runtime-root>/packages/channels/dist/whatsapp.js &
|
|
28
|
-
PIDS+=("$!")
|
|
29
|
-
;;
|
|
30
|
-
esac
|
|
31
|
-
done < <(python3 - <<'PY'
|
|
32
|
-
import json
|
|
33
|
-
import os
|
|
34
|
-
|
|
35
|
-
settings_path = os.path.join(os.environ["TINYAGI_HOME"], "settings.json")
|
|
36
|
-
try:
|
|
37
|
-
with open(settings_path, encoding="utf-8") as handle:
|
|
38
|
-
settings = json.load(handle)
|
|
39
|
-
except FileNotFoundError:
|
|
40
|
-
raise SystemExit(0)
|
|
41
|
-
|
|
42
|
-
for channel in settings.get("channels", {}).get("enabled", []):
|
|
43
|
-
print(channel)
|
|
44
|
-
PY
|
|
45
|
-
)
|
|
46
|
-
terminate_children() {
|
|
47
|
-
for pid in "\${PIDS[@]:-}"; do
|
|
48
|
-
kill "$pid" 2>/dev/null || true
|
|
49
|
-
done
|
|
50
|
-
}
|
|
51
|
-
trap terminate_children INT TERM EXIT
|
|
52
|
-
status=0
|
|
53
|
-
for pid in "\${PIDS[@]}"; do
|
|
54
|
-
if ! wait "$pid"; then
|
|
55
|
-
status=1
|
|
56
|
-
fi
|
|
57
|
-
done
|
|
58
|
-
exit "$status"
|
|
59
|
-
`.trim();
|
|
60
|
-
const isSupportedTinyClawOpenAiModel = (modelName) => SUPPORTED_TINYCLAW_OPENAI_MODEL_PREFIXES.some((prefix) => modelName.startsWith(prefix));
|
|
61
|
-
const buildTinyClawSettings = (node) => {
|
|
62
|
-
const [primary] = listEffectiveExecutionModelTargets(node.execution);
|
|
63
|
-
const agentEntry = {
|
|
64
|
-
name: node.name,
|
|
65
|
-
provider: primary?.provider ?? "anthropic",
|
|
66
|
-
model: primary?.name ?? "opus",
|
|
67
|
-
working_directory: `${WORKSPACE_PLACEHOLDER}/${node.name}`
|
|
68
|
-
};
|
|
69
|
-
const channels = buildTinyClawChannels(node.surfaces);
|
|
70
|
-
const config = {
|
|
71
|
-
workspace: {
|
|
72
|
-
path: WORKSPACE_PLACEHOLDER,
|
|
73
|
-
name: "workspace"
|
|
74
|
-
},
|
|
75
|
-
channels: {
|
|
76
|
-
enabled: channels.enabled,
|
|
77
|
-
...channels.config
|
|
78
|
-
},
|
|
79
|
-
agents: {
|
|
80
|
-
[node.name]: agentEntry
|
|
81
|
-
},
|
|
82
|
-
models: {
|
|
83
|
-
provider: primary?.provider ?? "anthropic"
|
|
84
|
-
},
|
|
85
|
-
monitoring: {
|
|
86
|
-
heartbeat_interval: 3600
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
return `${JSON.stringify(config, null, 2)}\n`;
|
|
90
|
-
};
|
|
91
|
-
const parseJsonFile = (input, filePath) => {
|
|
92
|
-
const file = input.emittedFiles.find((entry) => entry.path === filePath);
|
|
93
|
-
if (!file) {
|
|
94
|
-
throw new Error(`TinyClaw target ${input.id} is missing ${filePath}`);
|
|
95
|
-
}
|
|
96
|
-
return JSON.parse(file.content);
|
|
97
|
-
};
|
|
98
|
-
const mergeTinyClawTargets = async (inputs) => {
|
|
99
|
-
const agentInputs = inputs.filter((input) => input.kind === "agent");
|
|
100
|
-
if (agentInputs.length === 0) {
|
|
101
|
-
return [];
|
|
102
|
-
}
|
|
103
|
-
const mergedAgents = {};
|
|
104
|
-
const mergedTeams = {};
|
|
105
|
-
const enabledChannels = new Set();
|
|
106
|
-
let hasDiscordChannel = false;
|
|
107
|
-
let hasWhatsappChannel = false;
|
|
108
|
-
let hasTelegramChannel = false;
|
|
109
|
-
const workspaceFiles = agentInputs.flatMap((input) => input.emittedFiles.filter((file) => file.path !== "settings.json"));
|
|
110
|
-
const schedulesFile = createTinyClawSchedulesFile(agentInputs);
|
|
111
|
-
let mergedBase = null;
|
|
112
|
-
for (const input of agentInputs) {
|
|
113
|
-
const settings = parseJsonFile(input, "settings.json");
|
|
114
|
-
const channels = settings.channels ?? {};
|
|
115
|
-
mergedBase ??= settings;
|
|
116
|
-
Object.assign(mergedAgents, settings.agents ?? {});
|
|
117
|
-
for (const channel of (channels.enabled ?? []).filter(Boolean)) {
|
|
118
|
-
enabledChannels.add(channel);
|
|
119
|
-
}
|
|
120
|
-
if (channels.discord) {
|
|
121
|
-
hasDiscordChannel = true;
|
|
122
|
-
}
|
|
123
|
-
if (channels.telegram) {
|
|
124
|
-
hasTelegramChannel = true;
|
|
125
|
-
}
|
|
126
|
-
if (channels.whatsapp) {
|
|
127
|
-
hasWhatsappChannel = true;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
for (const input of inputs.filter((entry) => entry.kind === "team")) {
|
|
131
|
-
if (!input.emittedFiles.some((file) => file.path === "tinyclaw-team.json")) {
|
|
132
|
-
continue;
|
|
133
|
-
}
|
|
134
|
-
const teamConfig = parseJsonFile(input, "tinyclaw-team.json");
|
|
135
|
-
Object.assign(mergedTeams, teamConfig.teams ?? {});
|
|
136
|
-
}
|
|
137
|
-
const mergedSettings = {
|
|
138
|
-
...(mergedBase ?? {}),
|
|
139
|
-
agents: mergedAgents,
|
|
140
|
-
...(Object.keys(mergedTeams).length > 0 ? { teams: mergedTeams } : {}),
|
|
141
|
-
channels: {
|
|
142
|
-
...((mergedBase?.channels ?? {})),
|
|
143
|
-
...(hasDiscordChannel ? { discord: {} } : {}),
|
|
144
|
-
...(hasTelegramChannel ? { telegram: {} } : {}),
|
|
145
|
-
...(hasWhatsappChannel ? { whatsapp: {} } : {}),
|
|
146
|
-
enabled: [...enabledChannels].sort()
|
|
147
|
-
},
|
|
148
|
-
workspace: {
|
|
149
|
-
...((mergedBase?.workspace ?? {})),
|
|
150
|
-
name: mergedBase?.workspace?.name ?? "workspace",
|
|
151
|
-
path: WORKSPACE_PLACEHOLDER
|
|
152
|
-
}
|
|
153
|
-
};
|
|
154
|
-
return [
|
|
155
|
-
{
|
|
156
|
-
files: [
|
|
157
|
-
...workspaceFiles,
|
|
158
|
-
...(schedulesFile ? [schedulesFile] : []),
|
|
159
|
-
{
|
|
160
|
-
content: `${JSON.stringify(mergedSettings, null, 2)}\n`,
|
|
161
|
-
path: "settings.json"
|
|
162
|
-
}
|
|
163
|
-
],
|
|
164
|
-
configEnvBindings: resolveTinyClawSurfaceTokenBindings(agentInputs),
|
|
165
|
-
id: "tinyclaw-runtime",
|
|
166
|
-
sourceIds: agentInputs.map((input) => input.id)
|
|
167
|
-
}
|
|
168
|
-
];
|
|
169
|
-
};
|
|
170
|
-
export const tinyClawAdapter = {
|
|
171
|
-
assertSupportedModelTarget(target) {
|
|
172
|
-
if (target.endpoint) {
|
|
173
|
-
throw new SpawnfileError("validation_error", "TinyClaw custom or local endpoints are not supported in Spawnfile v0.1");
|
|
174
|
-
}
|
|
175
|
-
if (target.provider === "anthropic") {
|
|
176
|
-
if (target.auth.method === "claude-code" || target.auth.method === "api_key") {
|
|
177
|
-
return;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
else if (target.provider === "openai") {
|
|
181
|
-
if (!isSupportedTinyClawOpenAiModel(target.name)) {
|
|
182
|
-
throw new SpawnfileError("validation_error", `TinyClaw OpenAI models must use the runtime's Codex/GPT-5 path; received ${target.name}`);
|
|
183
|
-
}
|
|
184
|
-
if (target.auth.method === "codex" || target.auth.method === "api_key") {
|
|
185
|
-
return;
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
else if (target.provider === "opencode" && target.auth.method === "none") {
|
|
189
|
-
return;
|
|
190
|
-
}
|
|
191
|
-
throw new SpawnfileError("validation_error", `TinyClaw does not support model auth method ${target.auth.method} for provider ${target.provider}`);
|
|
192
|
-
},
|
|
193
|
-
assertSupportedSurfaces(surfaces) {
|
|
194
|
-
assertSupportedTinyClawSurfaces(surfaces);
|
|
195
|
-
},
|
|
196
|
-
container: {
|
|
197
|
-
configFileName: "settings.json",
|
|
198
|
-
configEnvBindings: [
|
|
199
|
-
{
|
|
200
|
-
envName: "ANTHROPIC_API_KEY",
|
|
201
|
-
jsonPath: "models.anthropic.api_key"
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
envName: "OPENAI_API_KEY",
|
|
205
|
-
jsonPath: "models.openai.api_key"
|
|
206
|
-
}
|
|
207
|
-
],
|
|
208
|
-
homeEnv: "TINYAGI_HOME",
|
|
209
|
-
globalNpmPackages: ["@anthropic-ai/claude-code", "@openai/codex"],
|
|
210
|
-
instancePaths: {
|
|
211
|
-
configPathTemplate: "<instance-root>/tinyagi/<config-file>",
|
|
212
|
-
homePathTemplate: "<instance-root>/tinyagi",
|
|
213
|
-
sourceWorkspacePathTemplate: "<instance-root>/workspace/<agent-name>",
|
|
214
|
-
workspacePathTemplate: "<instance-root>/workspace"
|
|
215
|
-
},
|
|
216
|
-
port: 3777,
|
|
217
|
-
portEnv: "TINYAGI_API_PORT",
|
|
218
|
-
standaloneBaseImage: "node:22-bookworm-slim",
|
|
219
|
-
startCommand: ["bash", "-lc", TINYCLAW_START_SCRIPT],
|
|
220
|
-
systemDeps: ["bash", "ca-certificates", "curl", "g++", "make", "python3", "tar"]
|
|
221
|
-
},
|
|
222
|
-
systemInstructionSurface: {
|
|
223
|
-
placement: "append_pointer",
|
|
224
|
-
resolvePath({ node }) {
|
|
225
|
-
return `workspace/${node.name}/AGENTS.md`;
|
|
226
|
-
}
|
|
227
|
-
},
|
|
228
|
-
async compileAgent(node) {
|
|
229
|
-
const scheduleOutcome = scheduleOutcomeFor(node);
|
|
230
|
-
return {
|
|
231
|
-
capabilities: createAgentCapabilities(node, {
|
|
232
|
-
mcpOutcome: node.mcpServers.length > 0 ? "degraded" : "supported",
|
|
233
|
-
scheduleMessage: scheduleOutcome.message,
|
|
234
|
-
scheduleOutcome: scheduleOutcome.outcome
|
|
235
|
-
}),
|
|
236
|
-
diagnostics: createScheduleDiagnostics(node),
|
|
237
|
-
files: [
|
|
238
|
-
...createDocumentFiles(`workspace/${node.name}`, node.docs),
|
|
239
|
-
...createSkillFiles(`workspace/${node.name}/.agents/skills`, node.skills),
|
|
240
|
-
...createSkillFiles(`workspace/${node.name}/.claude/skills`, node.skills),
|
|
241
|
-
{
|
|
242
|
-
content: buildTinyClawSettings(node),
|
|
243
|
-
path: "settings.json"
|
|
244
|
-
}
|
|
245
|
-
]
|
|
246
|
-
};
|
|
247
|
-
},
|
|
248
|
-
async createContainerTargets(inputs) {
|
|
249
|
-
return mergeTinyClawTargets(inputs);
|
|
250
|
-
},
|
|
251
|
-
async compileTeam(node) {
|
|
252
|
-
const agentIds = node.members
|
|
253
|
-
.filter((member) => member.kind === "agent")
|
|
254
|
-
.map((member) => member.id);
|
|
255
|
-
const leadAgent = node.lead
|
|
256
|
-
? node.members.find((member) => member.id === node.lead && member.kind === "agent")
|
|
257
|
-
: null;
|
|
258
|
-
const teamConfig = {
|
|
259
|
-
name: node.name,
|
|
260
|
-
agents: agentIds,
|
|
261
|
-
...(leadAgent ? { leader_agent: leadAgent.id } : {})
|
|
262
|
-
};
|
|
263
|
-
return {
|
|
264
|
-
capabilities: [
|
|
265
|
-
createCapability("team.members", "supported"),
|
|
266
|
-
createCapability("team.mode", node.mode === "hierarchical" ? "supported" : "degraded", "TinyClaw only supports leader-led teams"),
|
|
267
|
-
createCapability("team.lead", leadAgent ? "supported" : "degraded", leadAgent ? "" : "TinyClaw requires a concrete leader_agent"),
|
|
268
|
-
createCapability("team.external", "degraded", "TinyClaw does not enforce external boundary"),
|
|
269
|
-
createCapability("team.shared", "supported"),
|
|
270
|
-
createCapability("team.nested", "degraded", "TinyClaw nested teams flatten in v0.1")
|
|
271
|
-
],
|
|
272
|
-
diagnostics: [],
|
|
273
|
-
files: [
|
|
274
|
-
{
|
|
275
|
-
content: `${JSON.stringify({ teams: { [node.name]: teamConfig } }, null, 2)}\n`,
|
|
276
|
-
path: "tinyclaw-team.json"
|
|
277
|
-
}
|
|
278
|
-
]
|
|
279
|
-
};
|
|
280
|
-
},
|
|
281
|
-
name: "tinyclaw",
|
|
282
|
-
prepareRuntimeAuth: prepareTinyClawRuntimeAuth,
|
|
283
|
-
scaffoldAgentProject: createTinyClawAgentScaffold
|
|
284
|
-
};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import path from "node:path";
|
|
2
|
-
import { loadImportedClaudeCodeCredential, loadImportedCodexCredential } from "../../auth/index.js";
|
|
3
|
-
import { ensureDirectory, readUtf8File, writeUtf8File } from "../../filesystem/index.js";
|
|
4
|
-
const resolveRootfsSourcePath = (outputDirectory, containerPath) => path.join(outputDirectory, "container", "rootfs", ...path.posix.relative("/", containerPath).split("/"));
|
|
5
|
-
const createMountArgs = (hostPath, containerPath) => [
|
|
6
|
-
"-v",
|
|
7
|
-
`${hostPath}:${containerPath}`
|
|
8
|
-
];
|
|
9
|
-
const writeRuntimeAuthFile = async (input, relativePath, content) => {
|
|
10
|
-
const hostPath = path.join(input.tempRoot, "runtime-auth", "tinyclaw", input.instance.id, ...relativePath.split("/"));
|
|
11
|
-
await ensureDirectory(path.dirname(hostPath));
|
|
12
|
-
await writeUtf8File(hostPath, content);
|
|
13
|
-
return hostPath;
|
|
14
|
-
};
|
|
15
|
-
const writePatchedSettings = async (input, config) => {
|
|
16
|
-
return writeRuntimeAuthFile(input, "settings.json", `${JSON.stringify(config, null, 2)}\n`);
|
|
17
|
-
};
|
|
18
|
-
export const prepareTinyClawRuntimeAuth = async (input) => {
|
|
19
|
-
const coveredModelSecrets = [];
|
|
20
|
-
const claudeCode = input.authProfile.imports["claude-code"]
|
|
21
|
-
? await loadImportedClaudeCodeCredential(input.authProfile.imports["claude-code"].path)
|
|
22
|
-
: null;
|
|
23
|
-
const codex = input.authProfile.imports.codex
|
|
24
|
-
? await loadImportedCodexCredential(input.authProfile.imports.codex.path)
|
|
25
|
-
: null;
|
|
26
|
-
if (input.instance.model_auth_methods.anthropic === "claude-code" &&
|
|
27
|
-
claudeCode) {
|
|
28
|
-
coveredModelSecrets.push("ANTHROPIC_API_KEY");
|
|
29
|
-
}
|
|
30
|
-
if (input.instance.model_auth_methods.openai === "codex" &&
|
|
31
|
-
codex) {
|
|
32
|
-
coveredModelSecrets.push("OPENAI_API_KEY");
|
|
33
|
-
}
|
|
34
|
-
const sourceConfig = JSON.parse(await readUtf8File(resolveRootfsSourcePath(input.outputDirectory, input.instance.config_path)));
|
|
35
|
-
const patchedConfigPath = await writePatchedSettings(input, sourceConfig);
|
|
36
|
-
const mountArgs = createMountArgs(patchedConfigPath, input.instance.config_path);
|
|
37
|
-
if (input.instance.home_path && input.instance.model_auth_methods.anthropic === "claude-code" && claudeCode) {
|
|
38
|
-
const mountedClaudePath = await writeRuntimeAuthFile(input, ".claude/.credentials.json", await readUtf8File(path.join(input.authProfile.imports["claude-code"].path, ".credentials.json")));
|
|
39
|
-
mountArgs.push(...createMountArgs(mountedClaudePath, path.posix.join(input.instance.home_path, ".claude", ".credentials.json")));
|
|
40
|
-
}
|
|
41
|
-
if (input.instance.home_path && input.instance.model_auth_methods.openai === "codex" && codex) {
|
|
42
|
-
const mountedAuthPath = await writeRuntimeAuthFile(input, ".codex/auth.json", await readUtf8File(path.join(input.authProfile.imports.codex.path, "auth.json")));
|
|
43
|
-
mountArgs.push(...createMountArgs(mountedAuthPath, path.posix.join(input.instance.home_path, ".codex", "auth.json")));
|
|
44
|
-
}
|
|
45
|
-
return {
|
|
46
|
-
coveredModelSecrets,
|
|
47
|
-
mountArgs
|
|
48
|
-
};
|
|
49
|
-
};
|