@anyswarm/core 0.5.0 → 0.5.2
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/AGENTS.md +1 -1
- package/README.md +21 -13
- package/deploy/worker/Dockerfile +12 -4
- package/dist/deploy/worker/Dockerfile +12 -4
- package/dist/examples/README.md +35 -12
- package/dist/examples/authoring/README.md +24 -0
- package/dist/examples/authoring/business.d.ts +2 -0
- package/dist/examples/authoring/business.js +4 -0
- package/dist/examples/authoring/config.d.ts +5 -0
- package/dist/examples/authoring/config.js +2 -0
- package/dist/examples/authoring/eject.json +5 -0
- package/dist/examples/authoring/harness.d.ts +4 -0
- package/dist/examples/authoring/harness.js +19 -0
- package/dist/examples/autoresearch/README.md +40 -0
- package/dist/examples/autoresearch/REQUIREMENTS.zh.md +11 -0
- package/dist/examples/autoresearch/config.d.ts +51 -0
- package/dist/examples/autoresearch/config.js +57 -0
- package/dist/examples/autoresearch/demo.d.ts +11 -0
- package/dist/examples/autoresearch/demo.js +52 -0
- package/dist/examples/autoresearch/eject.json +17 -0
- package/dist/examples/autoresearch/frontiercs2-config.d.ts +2 -0
- package/dist/examples/autoresearch/frontiercs2-config.js +3 -0
- package/dist/examples/autoresearch/frontiercs2.d.ts +87 -0
- package/dist/examples/autoresearch/frontiercs2.js +211 -0
- package/dist/examples/autoresearch/prepare-demo.d.ts +1 -0
- package/dist/examples/autoresearch/prepare-demo.js +15 -0
- package/dist/examples/autoresearch/prepare.d.ts +95 -0
- package/dist/examples/autoresearch/prepare.js +257 -0
- package/dist/examples/autoresearch/process.d.ts +13 -0
- package/dist/examples/autoresearch/process.js +48 -0
- package/dist/examples/autoresearch/project.d.ts +21 -0
- package/dist/examples/autoresearch/project.js +392 -0
- package/dist/examples/autoresearch/research-service.d.ts +106 -0
- package/dist/examples/autoresearch/research-service.js +255 -0
- package/dist/examples/code/README.md +33 -0
- package/dist/examples/code/REQUIREMENTS.zh.md +11 -0
- package/dist/examples/code/candidate.d.ts +19 -0
- package/dist/examples/code/candidate.js +80 -0
- package/dist/examples/code/config.d.ts +32 -0
- package/dist/examples/code/config.js +18 -0
- package/dist/examples/code/eject.json +5 -0
- package/dist/examples/code/project.d.ts +3 -0
- package/dist/examples/code/project.js +605 -0
- package/dist/examples/code/prompts.d.ts +5 -0
- package/dist/examples/code/prompts.js +12 -0
- package/dist/examples/code/verification.d.ts +19 -0
- package/dist/examples/code/verification.js +268 -0
- package/dist/examples/code/worktree.d.ts +17 -0
- package/dist/examples/code/worktree.js +233 -0
- package/dist/examples/harness-session/README.md +3 -6
- package/dist/examples/lead-worker/harness/dynamic-scheduler.d.ts +2 -1
- package/dist/examples/lead-worker/harness/dynamic-scheduler.js +5 -2
- package/dist/examples/lead-worker/harness/index.d.ts +60 -0
- package/dist/examples/lead-worker/harness/index.js +77 -6
- package/dist/examples/lead-worker/project.js +2 -2
- package/dist/examples/lead-worker/services/board.d.ts +5 -0
- package/dist/examples/lead-worker/services/board.js +19 -1
- package/dist/examples/messages/README.md +5 -5
- package/dist/examples/messages/handoff.d.ts +2 -0
- package/dist/examples/messages/handoff.js +5 -1
- package/dist/examples/messages/project.js +52 -2
- package/dist/examples/notes/README.md +13 -18
- package/dist/examples/notes/project.js +67 -6
- package/dist/examples/peermesh/harness/router.js +3 -1
- package/dist/examples/peermesh/harness/team.d.ts +8 -0
- package/dist/examples/peermesh/harness/team.js +13 -0
- package/dist/examples/peermesh/project.js +22 -4
- package/dist/examples/services/agent-control/README.md +3 -3
- package/dist/examples/services/mathlib-search/Dockerfile +4 -2
- package/dist/examples/services/mathlib-search/README.md +1 -1
- package/dist/examples/services/mcp-managed/README.md +2 -2
- package/dist/examples/services/persistent-board/README.md +16 -3
- package/dist/examples/services/persistent-board/business.d.ts +7 -0
- package/dist/examples/services/persistent-board/business.js +7 -0
- package/dist/examples/services/persistent-board/index.js +10 -0
- package/dist/examples/services/persistent-board/live.d.ts +3 -0
- package/dist/examples/services/persistent-board/live.js +58 -0
- package/dist/examples/subagents/README.md +5 -5
- package/dist/examples/subagents/business.js +3 -1
- package/dist/examples/subagents/config.js +3 -3
- package/dist/examples/subagents/harness/controller.d.ts +15 -0
- package/dist/examples/subagents/harness/controller.js +181 -32
- package/dist/examples/subagents/project.d.ts +2 -0
- package/dist/examples/subagents/project.js +43 -34
- package/dist/examples/subagents/prompts/prompts.d.ts +1 -0
- package/dist/examples/subagents/prompts/prompts.js +3 -0
- package/dist/examples/subagents/services/collaboration-service.d.ts +3 -2
- package/dist/examples/subagents/services/collaboration-service.js +14 -2
- package/dist/examples/substrate/README.md +2 -2
- package/dist/examples/substrate/harness/index.d.ts +1 -1
- package/dist/examples/substrate/harness/index.js +77 -12
- package/dist/examples/substrate/project.js +4 -1
- package/dist/examples/super/README.md +52 -0
- package/dist/examples/super/actions.d.ts +95 -0
- package/dist/examples/super/actions.js +230 -0
- package/dist/examples/super/artifact.d.ts +4 -0
- package/dist/examples/super/artifact.js +51 -0
- package/dist/examples/super/config.d.ts +80 -0
- package/dist/examples/super/config.js +83 -0
- package/dist/examples/super/coordinator.d.ts +33 -0
- package/dist/examples/super/coordinator.js +151 -0
- package/dist/examples/super/daemon.d.ts +11 -0
- package/dist/examples/super/daemon.js +109 -0
- package/dist/examples/super/decisions.d.ts +8 -0
- package/dist/examples/super/decisions.js +52 -0
- package/dist/examples/super/eject.json +5 -0
- package/dist/examples/super/execution.d.ts +11 -0
- package/dist/examples/super/execution.js +136 -0
- package/dist/examples/super/github.d.ts +62 -0
- package/dist/examples/super/github.js +269 -0
- package/dist/examples/super/inbox.d.ts +162 -0
- package/dist/examples/super/inbox.js +284 -0
- package/dist/examples/super/location.d.ts +5 -0
- package/dist/examples/super/location.js +64 -0
- package/dist/examples/super/operator.d.ts +1 -0
- package/dist/examples/super/operator.js +31 -0
- package/dist/examples/super/outbox.d.ts +5 -0
- package/dist/examples/super/outbox.js +103 -0
- package/dist/examples/super/project.d.ts +4 -0
- package/dist/examples/super/project.js +251 -0
- package/dist/examples/super/prompts.d.ts +3 -0
- package/dist/examples/super/prompts.js +25 -0
- package/dist/examples/taskpool/deploy/service-hosts/Dockerfile +4 -2
- package/dist/examples/taskpool/harness/controller.d.ts +35 -6
- package/dist/examples/taskpool/harness/controller.js +73 -7
- package/dist/examples/taskpool/project.js +18 -2
- package/dist/scripts/anyswarm-arguments.d.ts +18 -6
- package/dist/scripts/anyswarm-arguments.js +88 -52
- package/dist/scripts/anyswarm-author.d.ts +5 -0
- package/dist/scripts/anyswarm-author.js +24 -0
- package/dist/scripts/anyswarm-eject.d.ts +11 -0
- package/dist/scripts/anyswarm-eject.js +164 -0
- package/dist/scripts/anyswarm-harnesses.d.ts +1 -0
- package/dist/scripts/anyswarm-harnesses.js +10 -0
- package/dist/scripts/anyswarm-installation.d.ts +7 -40
- package/dist/scripts/anyswarm-installation.js +17 -285
- package/dist/scripts/anyswarm-launch.d.ts +7 -0
- package/dist/scripts/anyswarm-launch.js +37 -0
- package/dist/scripts/anyswarm-progress.d.ts +6 -0
- package/dist/scripts/anyswarm-progress.js +102 -0
- package/dist/scripts/anyswarm-project.d.ts +3 -1
- package/dist/scripts/anyswarm-project.js +49 -35
- package/dist/scripts/anyswarm-source-runner.d.ts +1 -0
- package/dist/scripts/anyswarm-source-runner.js +200 -0
- package/dist/scripts/anyswarm.js +28 -3
- package/dist/scripts/build-provenance.json +1 -0
- package/dist/scripts/build.js +7 -1
- package/dist/scripts/generate-architecture-api.js +2 -0
- package/dist/scripts/generate-architecture-prompts.js +24 -2
- package/dist/scripts/local-environment.d.ts +13 -2
- package/dist/scripts/local-environment.js +111 -28
- package/dist/scripts/local-setup-smoke.js +3 -2
- package/dist/scripts/local-setup-worker.d.ts +1 -1
- package/dist/scripts/local-setup-worker.js +15 -6
- package/dist/scripts/local-setup.d.ts +5 -2
- package/dist/scripts/local-setup.js +167 -79
- package/dist/scripts/opensandbox-agent-worker.js +2 -2
- package/dist/scripts/pack-release.d.ts +1 -0
- package/dist/scripts/pack-release.js +66 -0
- package/dist/scripts/pi-session-bridge.js +11 -3
- package/dist/scripts/run-harness.js +3 -1
- package/dist/scripts/setup-bootstrap.js +43 -6
- package/dist/src/core/allocation-ledger.js +4 -3
- package/dist/src/core/host-identity.d.ts +2 -0
- package/dist/src/core/host-identity.js +11 -0
- package/dist/src/core/index.d.ts +4 -2
- package/dist/src/core/index.js +12 -4
- package/dist/src/core/mcp-service.js +2 -2
- package/dist/src/core/runtime-management.d.ts +6 -0
- package/dist/src/core/runtime-management.js +24 -0
- package/dist/src/core/sandbox/executor-driver.d.ts +4 -2
- package/dist/src/core/sandbox/executor-driver.js +12 -14
- package/dist/src/core/sandbox/local-executor.d.ts +13 -1
- package/dist/src/core/sandbox/local-executor.js +69 -19
- package/dist/src/core/sandbox/local-worker.js +32 -21
- package/dist/src/core/sandbox/opensandbox-backend.d.ts +2 -0
- package/dist/src/core/sandbox/opensandbox-backend.js +36 -11
- package/dist/src/core/sandbox/sandbox-connection.d.ts +2 -0
- package/dist/src/core/sandbox/sandbox-connection.js +14 -6
- package/dist/src/core/service-live-state.d.ts +14 -0
- package/dist/src/core/service-live-state.js +161 -0
- package/dist/src/core/service-observation-types.d.ts +21 -1
- package/dist/src/core/service-process.d.ts +1 -1
- package/dist/src/core/service-process.js +45 -4
- package/dist/src/core/service-types.d.ts +5 -1
- package/dist/src/core/services.d.ts +1 -1
- package/dist/src/core/services.js +8 -3
- package/dist/src/core/types.d.ts +3 -0
- package/dist/src/core/worker-image.js +3 -3
- package/dist/src/harness/harness-session-types.d.ts +10 -0
- package/dist/src/harness/harness-session.js +42 -5
- package/dist/src/harness/project-harness.d.ts +14 -1
- package/dist/src/harness/project-harness.js +38 -12
- package/dist/src/harness/project-input.js +81 -15
- package/dist/src/harness/project-rpc-client.d.ts +1 -0
- package/dist/src/harness/project-rpc-client.js +5 -0
- package/dist/src/harness/project-rpc.d.ts +8 -2
- package/dist/src/harness/project-rpc.js +31 -7
- package/dist/src/harness/project-runtime.js +6 -2
- package/dist/src/harness/typescript-loader.d.ts +2 -0
- package/dist/src/harness/typescript-loader.js +41 -0
- package/dist/src/trace-viewer/public/app.js +6 -5
- package/dist/src/trace-viewer/reader.mjs +42 -2
- package/docs/INDEX.md +5 -2
- package/docs/architecture/00-overview.md +1 -1
- package/docs/architecture/01-agent-core.md +1 -1
- package/docs/architecture/04-services.md +1 -1
- package/docs/architecture/06-observability-experiments.md +1 -1
- package/docs/architecture/07-run-configuration.md +38 -18
- package/docs/architecture/08-prompts.md +22 -0
- package/docs/architecture/10-service-api-reference.md +53 -18
- package/docs/architecture/11-storage-reference.md +18 -1
- package/docs/architecture/12-code-coverage.md +152 -89
- package/docs/architecture/15-core-runtime.md +8 -0
- package/docs/architecture/16-pi-opensandbox-backend.md +5 -5
- package/docs/architecture/17-harness-reporting.md +1 -1
- package/docs/architecture/19-substrate-harness.md +28 -1
- package/docs/architecture/20-lead-worker-harness.md +34 -1
- package/docs/architecture/22-website.md +5 -6
- package/docs/architecture/23-project-harness.md +152 -8
- package/docs/architecture/24-runtime-recovery.md +10 -3
- package/docs/architecture/26-code.md +54 -0
- package/docs/architecture/27-personal.md +58 -0
- package/docs/architecture/28-autoresearch.md +43 -0
- package/docs/architecture/INDEX.md +3 -0
- package/docs/architecture/prompts/08-lead-worker-harness.md +4 -2
- package/docs/architecture/prompts/08-subagents-harness.md +21 -0
- package/docs/architecture/prompts/21-personal.md +44 -0
- package/docs/architecture/prompts/22-autoresearch.md +63 -0
- package/docs/architecture/prompts/26-code.md +55 -0
- package/docs/architecture/prompts/source-manifest.json +152 -33
- package/docs/architecture/source-map.json +473 -25
- package/docs/designs/core-harness/01-core.md +2 -2
- package/docs/designs/core-harness/06-project-harness.md +13 -2
- package/docs/designs/core-harness/README.md +7 -2
- package/docs/en/agents.md +1 -1
- package/docs/en/build-your-harness.md +3 -5
- package/docs/en/changelog.md +20 -4
- package/docs/en/first-harness.md +9 -12
- package/docs/en/harnesses/lead-worker.md +1 -1
- package/docs/en/harnesses/peermesh.md +2 -2
- package/docs/en/harnesses/subagents.md +2 -2
- package/docs/en/harnesses/substrate.md +4 -4
- package/docs/en/harnesses/taskpool.md +2 -2
- package/docs/en/latest.md +14 -121
- package/docs/en/overview.md +1 -1
- package/docs/en/quickstart.md +42 -39
- package/docs/en/reference/api.md +14 -4
- package/docs/en/reference/cli.md +53 -47
- package/docs/en/runtime.md +2 -2
- package/docs/en/sandbox.md +3 -3
- package/docs/en/services.md +4 -0
- package/docs/operations/trace-viewer.md +1 -1
- package/docs/workflows/development.md +28 -21
- package/docs/workflows/release-and-docs-versioning.md +77 -0
- package/docs/workflows/release-cli-acceptance.md +85 -0
- package/docs/zh/agents.md +1 -1
- package/docs/zh/build-your-harness.md +3 -5
- package/docs/zh/changelog.md +20 -4
- package/docs/zh/first-harness.md +9 -12
- package/docs/zh/harnesses/lead-worker.md +1 -1
- package/docs/zh/harnesses/peermesh.md +2 -2
- package/docs/zh/harnesses/subagents.md +2 -2
- package/docs/zh/harnesses/substrate.md +4 -4
- package/docs/zh/harnesses/taskpool.md +2 -2
- package/docs/zh/latest.md +15 -122
- package/docs/zh/overview.md +1 -1
- package/docs/zh/quickstart.md +42 -39
- package/docs/zh/reference/api.md +14 -4
- package/docs/zh/reference/cli.md +24 -40
- package/docs/zh/runtime.md +2 -2
- package/docs/zh/sandbox.md +3 -3
- package/docs/zh/services.md +4 -0
- package/examples/README.md +35 -12
- package/examples/authoring/README.md +24 -0
- package/examples/authoring/business.ts +4 -0
- package/examples/authoring/config.ts +2 -0
- package/examples/authoring/eject.json +5 -0
- package/examples/authoring/harness.ts +21 -0
- package/examples/autoresearch/README.md +40 -0
- package/examples/autoresearch/REQUIREMENTS.zh.md +11 -0
- package/examples/autoresearch/config.ts +90 -0
- package/examples/autoresearch/demo.ts +55 -0
- package/examples/autoresearch/eject.json +17 -0
- package/examples/autoresearch/frontiercs2-config.ts +4 -0
- package/examples/autoresearch/frontiercs2.ts +237 -0
- package/examples/autoresearch/prepare-demo.ts +15 -0
- package/examples/autoresearch/prepare.ts +267 -0
- package/examples/autoresearch/process.ts +50 -0
- package/examples/autoresearch/project.ts +380 -0
- package/examples/autoresearch/research-service.ts +302 -0
- package/examples/code/README.md +33 -0
- package/examples/code/REQUIREMENTS.zh.md +11 -0
- package/examples/code/candidate.ts +89 -0
- package/examples/code/config.ts +19 -0
- package/examples/code/eject.json +5 -0
- package/examples/code/project.ts +581 -0
- package/examples/code/prompts.ts +16 -0
- package/examples/code/verification.ts +239 -0
- package/examples/code/worktree.ts +188 -0
- package/examples/harness-session/README.md +3 -6
- package/examples/lead-worker/harness/dynamic-scheduler.ts +6 -3
- package/examples/lead-worker/harness/index.ts +61 -6
- package/examples/lead-worker/project.ts +2 -2
- package/examples/lead-worker/services/board.ts +14 -1
- package/examples/messages/README.md +5 -5
- package/examples/messages/handoff.ts +6 -2
- package/examples/messages/project.ts +47 -2
- package/examples/notes/README.md +13 -18
- package/examples/notes/project.ts +57 -9
- package/examples/peermesh/harness/router.ts +2 -2
- package/examples/peermesh/harness/team.ts +11 -0
- package/examples/peermesh/project.ts +19 -4
- package/examples/services/agent-control/README.md +3 -3
- package/examples/services/mathlib-search/Dockerfile +4 -2
- package/examples/services/mathlib-search/README.md +1 -1
- package/examples/services/mcp-managed/README.md +2 -2
- package/examples/services/persistent-board/README.md +16 -3
- package/examples/services/persistent-board/business.ts +10 -0
- package/examples/services/persistent-board/index.ts +10 -0
- package/examples/services/persistent-board/live.ts +54 -0
- package/examples/subagents/README.md +5 -5
- package/examples/subagents/business.ts +3 -1
- package/examples/subagents/config.ts +4 -3
- package/examples/subagents/harness/controller.ts +161 -29
- package/examples/subagents/project.ts +47 -33
- package/examples/subagents/prompts/prompts.ts +4 -0
- package/examples/subagents/services/collaboration-service.ts +14 -2
- package/examples/substrate/README.md +2 -2
- package/examples/substrate/harness/index.ts +67 -11
- package/examples/substrate/project.ts +5 -1
- package/examples/super/README.md +52 -0
- package/examples/super/actions.ts +196 -0
- package/examples/super/artifact.ts +56 -0
- package/examples/super/config.ts +95 -0
- package/examples/super/coordinator.ts +158 -0
- package/examples/super/daemon.ts +84 -0
- package/examples/super/decisions.ts +46 -0
- package/examples/super/eject.json +5 -0
- package/examples/super/execution.ts +131 -0
- package/examples/super/github.ts +242 -0
- package/examples/super/inbox.ts +306 -0
- package/examples/super/location.ts +54 -0
- package/examples/super/operator.ts +28 -0
- package/examples/super/outbox.ts +97 -0
- package/examples/super/project.ts +225 -0
- package/examples/super/prompts.ts +27 -0
- package/examples/taskpool/deploy/service-hosts/Dockerfile +4 -2
- package/examples/taskpool/harness/controller.ts +59 -7
- package/examples/taskpool/project.ts +18 -2
- package/npm-shrinkwrap.development.json +700 -0
- package/npm-shrinkwrap.json +95 -1969
- package/package.development.json +88 -0
- package/package.json +11 -8
- package/scripts/anyswarm-arguments.ts +91 -54
- package/scripts/anyswarm-author.ts +25 -0
- package/scripts/anyswarm-eject.ts +145 -0
- package/scripts/anyswarm-harnesses.ts +10 -0
- package/scripts/anyswarm-installation.ts +18 -288
- package/scripts/anyswarm-launch.ts +36 -0
- package/scripts/anyswarm-progress.ts +95 -0
- package/scripts/anyswarm-project.ts +35 -34
- package/scripts/anyswarm-source-runner.ts +176 -0
- package/scripts/anyswarm.ts +24 -3
- package/scripts/build.ts +8 -1
- package/scripts/generate-architecture-api.ts +2 -0
- package/scripts/generate-architecture-prompts.ts +35 -2
- package/scripts/local-environment.ts +117 -28
- package/scripts/local-setup-smoke.ts +3 -2
- package/scripts/local-setup-worker.ts +17 -7
- package/scripts/local-setup.ts +166 -73
- package/scripts/opensandbox-agent-worker.ts +2 -2
- package/scripts/pack-release.ts +70 -0
- package/scripts/pi-session-bridge.ts +10 -2
- package/scripts/run-harness.ts +3 -1
- package/scripts/setup-bootstrap.ts +41 -6
- package/src/core/allocation-ledger.ts +5 -3
- package/src/core/host-identity.ts +11 -0
- package/src/core/index.ts +12 -6
- package/src/core/mcp-service.ts +2 -2
- package/src/core/runtime-management.ts +22 -0
- package/src/core/sandbox/executor-driver.ts +15 -18
- package/src/core/sandbox/local-executor.ts +65 -19
- package/src/core/sandbox/local-worker.ts +29 -21
- package/src/core/sandbox/opensandbox-backend.ts +36 -11
- package/src/core/sandbox/sandbox-connection.ts +14 -5
- package/src/core/service-live-state.ts +156 -0
- package/src/core/service-observation-types.ts +23 -1
- package/src/core/service-process.ts +36 -3
- package/src/core/service-types.ts +3 -1
- package/src/core/services.ts +8 -3
- package/src/core/types.ts +3 -0
- package/src/core/worker-image.ts +3 -3
- package/src/harness/harness-session-types.ts +13 -1
- package/src/harness/harness-session.ts +40 -7
- package/src/harness/project-harness.ts +38 -12
- package/src/harness/project-input.ts +73 -15
- package/src/harness/project-rpc-client.ts +5 -0
- package/src/harness/project-rpc.ts +29 -8
- package/src/harness/project-runtime.ts +4 -2
- package/src/harness/typescript-loader.ts +37 -0
- package/src/trace-viewer/public/app.js +6 -5
- package/src/trace-viewer/reader.mjs +42 -2
|
@@ -13,6 +13,7 @@ const TRACK_DEFS = [
|
|
|
13
13
|
{ key: "model", label: "Model", color: "var(--purple)" },
|
|
14
14
|
{ key: "tool", label: "Tools", color: "var(--amber)" },
|
|
15
15
|
{ key: "service", label: "Service", color: "var(--teal)" },
|
|
16
|
+
{ key: "research", label: "Research", color: "var(--teal)" },
|
|
16
17
|
];
|
|
17
18
|
|
|
18
19
|
const state = {
|
|
@@ -1125,10 +1126,8 @@ function renderSwimlane() {
|
|
|
1125
1126
|
let curY = rulerH;
|
|
1126
1127
|
const geom = [];
|
|
1127
1128
|
for (const ag of agents) {
|
|
1128
|
-
const
|
|
1129
|
-
|
|
1130
|
-
);
|
|
1131
|
-
const tracks = TRACK_DEFS.filter((td) => td.key !== "service" || hasSvc);
|
|
1129
|
+
const active = new Set(state.timelineItems.filter(item => laneContains(ag, item.agentId)).map(item => item.kind));
|
|
1130
|
+
const tracks = TRACK_DEFS.filter(track => !["service", "research"].includes(track.key) || active.has(track.key));
|
|
1132
1131
|
const startY = curY;
|
|
1133
1132
|
const rowY = {};
|
|
1134
1133
|
curY += headH;
|
|
@@ -1453,7 +1452,7 @@ function renderSwimlane() {
|
|
|
1453
1452
|
it.startedAt - state.domainStart <= state.winEnd,
|
|
1454
1453
|
);
|
|
1455
1454
|
const isPointTrack =
|
|
1456
|
-
td.key === "input" || (td.key === "tool" && !run.hasNative);
|
|
1455
|
+
td.key === "input" || td.key === "research" || (td.key === "tool" && !run.hasNative);
|
|
1457
1456
|
const { rects, merged, overlaps } = layoutTrackBars(
|
|
1458
1457
|
trackItems,
|
|
1459
1458
|
xOf,
|
|
@@ -1759,6 +1758,7 @@ function renderTrajectory() {
|
|
|
1759
1758
|
tool: state.timelineItems.filter((i) => i.kind === "tool").length,
|
|
1760
1759
|
service: state.timelineItems.filter((i) => i.kind === "service").length,
|
|
1761
1760
|
input: state.timelineItems.filter((i) => i.kind === "input").length,
|
|
1761
|
+
research: state.timelineItems.filter((i) => i.kind === "research").length,
|
|
1762
1762
|
error: state.timelineItems.filter((i) => i.isError).length,
|
|
1763
1763
|
};
|
|
1764
1764
|
const pills = $("#track-filter-pills");
|
|
@@ -1770,6 +1770,7 @@ function renderTrajectory() {
|
|
|
1770
1770
|
["service", `Service (${counts.service})`],
|
|
1771
1771
|
["input", `Input (${counts.input})`],
|
|
1772
1772
|
];
|
|
1773
|
+
if (counts.research) defs.push(["research", `Research (${counts.research})`]);
|
|
1773
1774
|
if (counts.error) defs.push(["error", `Errors (${counts.error})`]);
|
|
1774
1775
|
for (const [key, label] of defs) {
|
|
1775
1776
|
const b = button(
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
1
2
|
import { createHash } from "node:crypto";
|
|
2
3
|
import { deflateRawSync, inflateRawSync } from "node:zlib";
|
|
3
4
|
import { constants } from "node:fs";
|
|
@@ -55,6 +56,32 @@ function failure(message, status = 400) {
|
|
|
55
56
|
return Object.assign(new Error(message), { status, statusCode: status });
|
|
56
57
|
}
|
|
57
58
|
|
|
59
|
+
const darwin = process.platform === "darwin";
|
|
60
|
+
|
|
61
|
+
async function openedFilePath(handle) {
|
|
62
|
+
if (!darwin) return realpath(`/proc/self/fd/${handle.fd}`);
|
|
63
|
+
// Use the inherited descriptor, not the original pathname. Darwin fcntl(2)
|
|
64
|
+
// F_GETPATH is 50, with a MAXPATHLEN (1024-byte) output buffer.
|
|
65
|
+
return new Promise((resolvePath, reject) => {
|
|
66
|
+
const helper = spawn("/usr/bin/perl", ["-e", String.raw`
|
|
67
|
+
open(my $file, "<&=3") or exit 1;
|
|
68
|
+
my $path = "\0" x 1024;
|
|
69
|
+
defined fcntl($file, 50, $path) or exit 1;
|
|
70
|
+
$path =~ s/\x00.*\z//s;
|
|
71
|
+
print $path;
|
|
72
|
+
`], { stdio: ["ignore", "pipe", "ignore", handle.fd], env: { PATH: "/usr/bin:/bin" },
|
|
73
|
+
signal: AbortSignal.timeout(2000) });
|
|
74
|
+
const chunks = [];
|
|
75
|
+
helper.stdout.on("data", chunk => chunks.push(chunk));
|
|
76
|
+
helper.once("error", () => reject(failure("Could not verify the opened file path", 403)));
|
|
77
|
+
helper.once("close", code => {
|
|
78
|
+
const path = Buffer.concat(chunks).toString("utf8");
|
|
79
|
+
if (code !== 0 || !isAbsolute(path)) reject(failure("Could not verify the opened file path", 403));
|
|
80
|
+
else resolvePath(path);
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
|
|
58
85
|
/** Reads only files under a configured root, including after an open races with a rename. */
|
|
59
86
|
async function safeOpen(root, name) {
|
|
60
87
|
if (typeof name !== "string" || name.includes("\0") || isAbsolute(name))
|
|
@@ -70,10 +97,10 @@ async function safeOpen(root, name) {
|
|
|
70
97
|
}
|
|
71
98
|
const handle = await open(
|
|
72
99
|
target,
|
|
73
|
-
constants.O_RDONLY | constants.
|
|
100
|
+
constants.O_RDONLY | constants.O_NONBLOCK | (darwin ? 0x20000000 : constants.O_NOFOLLOW),
|
|
74
101
|
);
|
|
75
102
|
try {
|
|
76
|
-
const openedPath = await
|
|
103
|
+
const openedPath = await openedFilePath(handle);
|
|
77
104
|
if (!inside(root, openedPath))
|
|
78
105
|
throw failure("Opened file escapes the Run directory", 403);
|
|
79
106
|
const stat = await handle.stat();
|
|
@@ -340,6 +367,7 @@ class RunIndex {
|
|
|
340
367
|
this.gaps = [];
|
|
341
368
|
this.gapKeys = new Set();
|
|
342
369
|
this.spans = [];
|
|
370
|
+
this.researchPoints = [];
|
|
343
371
|
this.inputObservations = [];
|
|
344
372
|
this.sessionToolResults = [];
|
|
345
373
|
this.relations = [];
|
|
@@ -492,6 +520,16 @@ class RunIndex {
|
|
|
492
520
|
...(record.type === "session-event" ? { operationId: record.event.operationId, configuration: record.event.configuration } : {}) });
|
|
493
521
|
this.configurationRecords.set(agentId, observations);
|
|
494
522
|
}
|
|
523
|
+
if (kind === "research") {
|
|
524
|
+
if (agent && record.operation === "peer.ready" && typeof record.label === "string")
|
|
525
|
+
agent.label = searchName(record.label) ?? agent.label;
|
|
526
|
+
this.researchPoints.push({
|
|
527
|
+
id: event.id, agentId, kind, label: event.label, time: event.time,
|
|
528
|
+
detail: [record.candidate, record.sha256, record.basedOn, record.basedOnSha256, record.detail, typeof record.score === "number" ? String(record.score) : undefined]
|
|
529
|
+
.filter(value => typeof value === "string").join(" · ").slice(0, 540),
|
|
530
|
+
status: record.operation === "train.unknown" ? "failed" : "recorded", evidenceIds: [event.id],
|
|
531
|
+
});
|
|
532
|
+
}
|
|
495
533
|
if (record.type === "spawn" && agent) {
|
|
496
534
|
this.coreAgents.add(agentId);
|
|
497
535
|
if (record.profile) agent.profile = record.profile;
|
|
@@ -1085,6 +1123,7 @@ class RunIndex {
|
|
|
1085
1123
|
});
|
|
1086
1124
|
}
|
|
1087
1125
|
await this.jsonl("evidence.jsonl");
|
|
1126
|
+
await this.jsonl("research-events.jsonl", "research");
|
|
1088
1127
|
const names = await readdir(this.path);
|
|
1089
1128
|
for (const name of names.filter(name => /^service-calls(?:-recovery-\d+)?\.jsonl$/.test(name)).sort()) {
|
|
1090
1129
|
await this.jsonl(name, "service");
|
|
@@ -1232,6 +1271,7 @@ class RunIndex {
|
|
|
1232
1271
|
...this.spans,
|
|
1233
1272
|
...openSpans,
|
|
1234
1273
|
...this.inputObservations,
|
|
1274
|
+
...this.researchPoints,
|
|
1235
1275
|
...(!this.hasNative ? this.sessionToolResults : []),
|
|
1236
1276
|
];
|
|
1237
1277
|
}
|
package/docs/INDEX.md
CHANGED
|
@@ -14,7 +14,7 @@ Start with the user guides to run a Harness or build your own. The English and C
|
|
|
14
14
|
| Build a parallel Swarm step by step | [Build a Swarm Harness](en/build-your-harness.md) | [实战:构建 Swarm Harness](zh/build-your-harness.md) |
|
|
15
15
|
| Compare the five collaboration patterns | [Choose a Harness](en/harnesses/index.md) | [选择 Harness](zh/harnesses/index.md) |
|
|
16
16
|
| Look up SDK exports, CLI flags & types | [API](en/reference/api.md) · [CLI](en/reference/cli.md) · [Types](en/reference/types.md) | [API](zh/reference/api.md) · [CLI](zh/reference/cli.md) · [类型](zh/reference/types.md) |
|
|
17
|
-
| Track the latest release & changelog | [Releases
|
|
17
|
+
| Track the latest release & changelog | [Releases](en/latest.md) · [Changelog](en/changelog.md) | [最新版本](zh/latest.md) · [更新日志](zh/changelog.md) |
|
|
18
18
|
|
|
19
19
|
## Understand or change the implementation
|
|
20
20
|
|
|
@@ -23,8 +23,11 @@ Start with the user guides to run a Harness or build your own. The English and C
|
|
|
23
23
|
| Reference | Purpose |
|
|
24
24
|
| --- | --- |
|
|
25
25
|
| [Development](workflows/development.md) | Build, validate and contribute changes. |
|
|
26
|
+
| [Release CLI acceptance](workflows/release-cli-acceptance.md) | Verify the installed CLI, one-shot Runs, Trace, eject and npm upgrades. |
|
|
27
|
+
| [Release updates and documentation versions](workflows/release-and-docs-versioning.md) | Publish the next release and plan versioned guides. |
|
|
26
28
|
| [Coding Agent instructions](../AGENTS.md) | Project-specific work rules, permissions and documentation requirements. |
|
|
27
29
|
| [Engineering record conventions](../AGENTS.md#engineering-record-conventions) | Issue scope, evidence and triage conventions. |
|
|
30
|
+
| [AutoResearch](architecture/28-autoresearch.md) | Prepare the FrontierCS-2 demo, watch peer research and inspect official evaluation records. |
|
|
28
31
|
| [Trace Viewer](operations/trace-viewer.md) | Inspect saved and active Run records. |
|
|
29
32
|
| [Website implementation](architecture/22-website.md) | Content loading, links, bilingual build and deployment. |
|
|
30
33
|
| [Research context](PROJECT.md) · [Experiment workflow](workflows/experiment.md) | Research questions, resources and evidence standards. |
|
|
@@ -34,7 +37,7 @@ Start with the user guides to run a Harness or build your own. The English and C
|
|
|
34
37
|
|
|
35
38
|
The user guides describe the supported public surface. The architecture manual describes how the current tree implements it. Source code and generated references establish exact fields and defaults; tests and experiments establish what was verified. Changes to this baseline need corresponding documentation in their implementation PR.
|
|
36
39
|
|
|
37
|
-
The [Core / Harness design](designs/core-harness/README.md) retains reviewed, version-bound decisions and acceptance criteria. Read it with the applicable Issue and later explicit owner decisions; older first-release limits do not override those changes. The design index links the [dynamic Lead-Worker contract](designs/dynamic-lead-worker.md) and CLI
|
|
40
|
+
The [Core / Harness design](designs/core-harness/README.md) retains reviewed, version-bound decisions and acceptance criteria. Read it with the applicable Issue and later explicit owner decisions; older first-release limits do not override those changes. The design index links the [dynamic Lead-Worker contract](designs/dynamic-lead-worker.md) and CLI scope in [#351](https://github.com/AnySwarm/anyswarm/issues/351). Current implementation belongs in Architecture; remaining acceptance stays in the original Issue/PR. Design updates, code, migration, tests and documentation are reviewed together in the implementation PR.
|
|
38
41
|
|
|
39
42
|
The five collaboration projects own their Harnesses and Services under `examples/`. TaskPool also owns its domain stores and compatibility hosts. The [example index](../examples/README.md) explains how to install and build them with the published SDK or a source build. The [repository migration](designs/repository-layout.md) records the audit and verification scope, and the [deployment guide](../deploy/README.md) describes common infrastructure.
|
|
40
43
|
|
|
@@ -96,4 +96,4 @@ The [known boundaries](09-known-boundaries.md) belong to the current contract. T
|
|
|
96
96
|
|
|
97
97
|
AnySwarm ships one package, `@anyswarm/core`. The host invokes `anyswarm`, and the Agent invokes `swarm` in its Sandbox. The Controller and Worker share `ANYSWARM_*` variables and `x-anyswarm-*` headers. The Worker advertises `anyswarm-core-v2` and installs its programs under `/opt/anyswarm`. Runtime startup and recovery attest the Worker protocol before using its control and event interfaces. An incompatible Worker fails the protocol check; a failed startup retains ownership until allocation cleanup is confirmed.
|
|
98
98
|
|
|
99
|
-
Setup writes private connection settings under `~/.config/anyswarm/` and local Lifecycle keys under `~/.cache/anyswarm/opensandbox/`. Editable projects use `.anyswarm/`; default foreground run output is under the `anyswarm/runs` path of the user state directory. Existing release settings and editable projects require migration. Keep the previous host and Worker available for any in-progress recovery, and use an explicit trace root to inspect older saved reports. See the [upgrade steps](
|
|
99
|
+
Setup writes private connection settings under `~/.config/anyswarm/` and local Lifecycle keys under `~/.cache/anyswarm/opensandbox/`. Editable projects use `.anyswarm/`; default foreground run output is under the `anyswarm/runs` path of the user state directory. Existing release settings and editable projects require migration. Keep the previous host and Worker available for any in-progress recovery, and use an explicit trace root to inspect older saved reports. See the [upgrade steps](https://github.com/AnySwarm/anyswarm/blob/v0.5.0/docs/en/latest.md#migrate-from-v030).
|
|
@@ -33,7 +33,7 @@ For Pi, the Core backend supplies the rendered startup system prompt at `/worksp
|
|
|
33
33
|
|
|
34
34
|
The backend checks a successful `get_state` response with a ten-second wait before reporting readiness. Input acknowledgements and semantic settlement remain different: Core owns the request ledger and the backend submits each prompt once, then queries the same Worker RPC result after a lost acknowledgement. It does not resend that prompt to recover a receipt. The backend consumes retained Worker records by contiguous sequence, ignores an already consumed prefix and reports a fatal history gap instead of fabricating output or a later settlement. It polls the authenticated RPC endpoint rather than using the retired adapter's SSE reconnect/fallback loop. Its actual output, failure, exit and stop handling are described in [Core Runtime](15-core-runtime.md); settlement does not release capacity.
|
|
35
35
|
|
|
36
|
-
Version evidence comes from the guest used for startup. `OpenSandboxManager.agentVersions` executes the configured CLI and `node --version` through the authenticated guest command endpoint, checks successful exit and parses exact semantic versions. The Core backend
|
|
36
|
+
Version evidence comes from the guest used for startup. `OpenSandboxManager.agentVersions` executes the configured CLI and `node --version` through the authenticated guest command endpoint, checks successful exit and parses exact semantic versions. The Core backend requires an exact observed CLI version. It compares the observed version to the caller pin, prepared local Worker version or historical explicit-image expectation in that order. It passes the observed version into startup, records it with the spawn receipt and retains it per Agent for durable recovery. It does not query the npm registry or use a separate host-generated version manifest. [Guest version resolution](../../src/core/sandbox/opensandbox-manager.ts) and [backend startup](../../src/core/sandbox/opensandbox-backend.ts) own this path.
|
|
37
37
|
|
|
38
38
|
### 2.3 Retained Worker and provider contracts
|
|
39
39
|
|
|
@@ -148,7 +148,7 @@ Sources: [bundle loader](../../examples/taskpool/deploy/service-hosts/service-bu
|
|
|
148
148
|
|
|
149
149
|
Offline help at the root and Task group lists Task commands, including `create`. `swarm task create --help` supplies the required flags, accepted priorities, the JSON shape for completion conditions, a complete command and the returned Task ID. The live Bridge manifest from `swarm service view task --json` shows which commands the host actually enabled. The normal Task adapter binds Mission and Workspace from its own trusted state when an Agent sends a proposal.
|
|
150
150
|
|
|
151
|
-
`dist/scripts/swarm.js`
|
|
151
|
+
The Worker image links `/usr/local/bin/swarm` to the bundled `dist/scripts/swarm.js` independently of the public npm executable. This non-interactive entry point delegates parsing/invocation to `src/cli/swarm-cli.ts`. Registered Agents use its protected Bridge mode described under [Agent CLI routing](#agent-cli-routing); the direct endpoint/explicit-envelope description here applies to trusted operator calls. swarm --help, swarm service --help, and each domain's --help are offline and explain endpoint variables, JSON/file/stdin input, actor identity and command families. swarm service list reads the configured service manifests; service view reads one manifest. Each built-in CLI command resolves one registered operation, compose a typed operation envelope, send a JSON envelope/input/role request to the HTTP route and print one JSON result on stdout. Command-level help describes required flags and input/output shape. Requests have a bounded timeout (default 30 seconds, maximum 2,147,483,647 milliseconds). Diagnostics and structured failures go to stderr; invalid usage exits 2, HTTP/provider failures or timeouts exit 1, and a successful Judge request whose business verdict is FAIL/source_failure/mathematical_failure/incorrect exits 3 while still printing the authoritative result.
|
|
152
152
|
|
|
153
153
|
The CLI is a client of an already hosted service. It does not construct a domain service, open a service database, or keep long-running work in the Agent sandbox. ANYSWARM_<SERVICE>_SERVICE_URL and the optional bearer token identify the endpoint; ANYSWARM_SERVICE_ENDPOINTS can supply a JSON discovery list for service list. The CLI's request ID is an idempotency key only when the receiving Service honors the envelope operation identity; the CLI does not retry a write after a lost response.
|
|
154
154
|
|
|
@@ -24,7 +24,7 @@ Each browser request must use a loopback Host header. Browser cross-site request
|
|
|
24
24
|
|
|
25
25
|
The reader discovers `runtime.json` in the configured directory and its nested Run output directories. It caches a rebuildable in-memory metadata index per opened Run and retains the Runtime identity plus each indexed record's relative file and byte or line reference. The reader decodes schema 1, including the historical `bots`, `botId` and `environment-report.json` fields and current `agents`, `agentId` and `harness-report.json` fields. Legacy records without native timing or archive data expose those gaps. Unknown Service operations keep their generic identities and raw evidence. A model result with a different Runtime ID records a `runtime-mismatch` gap without closing the local request or advancing the result file's cursor. A corrected result is indexed on a later refresh and delivered once when resuming a cursor issued during rejection, whether the corrected file is shorter, longer or the same size.
|
|
26
26
|
|
|
27
|
-
The reader allows file access to discovered evidence. Raw detail rejects an invalidated source identity after truncation, replacement or changed record bytes. It rejects path escapes, symlinks, hard links and non-regular files.
|
|
27
|
+
The reader allows file access to discovered evidence. Raw detail rejects an invalidated source identity after truncation, replacement or changed record bytes. It rejects path escapes, symlinks, hard links and non-regular files. On Linux the Viewer checks the opened descriptor's path via `/proc/self/fd`. On macOS opening uses Darwin's `O_NOFOLLOW_ANY` and verifies the opened descriptor's path using `fcntl(F_GETPATH)` through the system Perl helper, without passing the original path or its bytes to the helper. An unverified path (including a helper failure or two-second timeout) is refused, and the descriptor is closed. The returned absolute path must stay under the canonical Run root on both platforms. Browsers connect over HTTP from any OS. See [Runtime evidence and Harness reports](17-harness-reporting.md) for producer details.
|
|
28
28
|
|
|
29
29
|
All routes are relative to the viewer origin. Run and record IDs are URL-encoded path segments.
|
|
30
30
|
|
|
@@ -20,7 +20,7 @@ intact for Node to resolve. The suite exercises external boundaries with
|
|
|
20
20
|
deliberately invalid inputs and partial mocks. The separate installed-consumer
|
|
21
21
|
check typechecks valid and invalid uses of the generated public declarations.
|
|
22
22
|
|
|
23
|
-
The package root exposes the public Core factories, Service interfaces, executor declarations, image helpers and their types through the JavaScript and declaration entry under `dist/src/core/`. `npm pack
|
|
23
|
+
The package root exposes the public Core factories, Service interfaces, executor declarations, image helpers and their types through the JavaScript and declaration entry under `dist/src/core/`. `npm run pack:release -- <output-directory>` builds the distribution. Installing that archive or its npm release makes the compiled programs available. Run `npm run docs:generate`, `npm run docs:check` and `npm test` from a source checkout. Each builds first. Editable hosts supply Sandbox configuration to `createSandbox` and configure executor, model and connection on the Runtime. Core Worker startup checks `file-tree-v1`, and local setup's Worker profile and reuse check require its matching image label.
|
|
24
24
|
|
|
25
25
|
The Worker uses the compiled code shipped by the importing SDK package. The separate Service images compile their own host entries. The final images install production dependencies from the package lock.
|
|
26
26
|
Worker startup keeps the image's `/opt/anyswarm/agent-worker.mjs` entrypoint via
|
|
@@ -35,23 +35,37 @@ For the pinned source and retained-format inventory, see
|
|
|
35
35
|
|
|
36
36
|
## GitHub Release distribution
|
|
37
37
|
|
|
38
|
-
The [release workflow](../../.github/workflows/release.yml) runs verification on
|
|
38
|
+
The [release workflow](../../.github/workflows/release.yml) runs verification on a pushed version tag or a manual dispatch with `publish_npm` left off. It requires a stable package version, checks that any selected tag matches it, and requires the public `AnySwarm/anyswarm` repository for a tag publication. Verification packs the compiled `@anyswarm/core` package and renames the tarball to the existing GitHub versioned asset name `luna-shi-anyswarm-<version>.tgz`. It installs that same archive in a temporary consumer, runs the Core suite, and uploads the archive plus a byte-identical `luna-shi-anyswarm.tgz` alias and checksums as a workflow artifact. The installed Quickstart uses the default local-setup path. On a fresh runner, it builds the bundled Worker before testing the candidate with controlled local model responses, so verification can run before any registry publication.
|
|
39
39
|
|
|
40
|
-
The
|
|
40
|
+
The SDK reads its version from the enclosing `@anyswarm/core` package manifest in both the checkout and the compiled install. If neither manifest path can be read, the build's version constant supplies the fallback. Version 0.5.2 continues to use Worker protocol `anyswarm-core-v2`. Local setup prepares a Worker from the installed package's build inputs.
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
The publication job verifies both archive names and the checksum file. A new tag is staged as a draft and made public after asset verification. Only the highest stable published version becomes GitHub Latest. A retry checks assets for an already published tag. Installed verification prepares the candidate’s Worker from an explicit Pi installation on the runner. [Release procedure](../workflows/development.md#release-verification)
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
### npm publication
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
A successful GitHub Release job enables the npm job for a tagged push. A manual dispatch from `main` with `publish_npm` enabled skips the candidate build and goes directly to the same npm job. It reads GitHub Latest, requires a stable tag, and skips a tagged push for an older Release. It downloads the versioned archive, alias and checksum file from the public Release. Both hashes, byte equality and the archive's package name and version must match before the publish step can start.
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
The npm job shares the stable release concurrency group and checks the public npm registry before publishing. It refuses to move npm `latest` backward. A version that already has the archive's SHA-512 skips the upload, while a different registered digest fails the job. A new version is published under `latest` using GitHub Actions OIDC. The hosted runner has GitHub contents read access and OIDC token issuance. npm must authorize `AnySwarm/anyswarm` and `release.yml` as a trusted publisher with direct publishing enabled. The job polls for the expected npm `latest` and archive integrity for up to 15 minutes to allow for registry processing. An npm failure leaves the GitHub Release available. The manual dispatch can retry once auth or registry availability is restored.
|
|
49
|
+
|
|
50
|
+
### npm CLI installation and update
|
|
51
|
+
|
|
52
|
+
The package declares one npm executable, `anyswarm`, which points to the compiled host entry. A global npm install owns both `<prefix>/lib/node_modules/@anyswarm/core` and `<prefix>/bin/anyswarm` on Linux and macOS. A project install makes the same command available at `node_modules/.bin/anyswarm`. The Worker Dockerfile copies the bundled `dist/scripts/swarm.js` and creates its own `/usr/local/bin/swarm` in the image. Agent Service calls use that image-owned link and the existing Bridge authorization.
|
|
53
|
+
|
|
54
|
+
The homepage and Quickstart use `npm install -g @anyswarm/core` with Node.js 22.19 or later. npm resolves the registry package, checks its engine declaration, selects its global prefix, and owns installation and link failures. The local tarball path uses `npm install -g --prefix <prefix> <archive>`. Release verification does this outside the checkout, with lifecycle scripts disabled, and compares the installed executable's version to the candidate. The worktree, installed package, and user configuration remain independent.
|
|
55
|
+
|
|
56
|
+
Use `npm install -g @anyswarm/core@latest` for updates and `npm uninstall -g @anyswarm/core` for removal. Run `npm prefix -g` to identify the selected prefix and ensure its `bin` is on PATH. Use a writable prefix for permission errors. The old script-managed releases left links into `lib/anyswarm/current`. Clear only confirmed AnySwarm links when switching those installations to npm.
|
|
57
|
+
|
|
58
|
+
`anyswarm update` prints guidance for the active installation. It reads its package version, verifies that the invoked entry resolves to the global npm package and checks the corresponding `npm root -g` with a ten-second deadline. For a verified global install it reports the existing version, executable and an npm command pinned to that prefix, with result `preserved` and exit status 0. A terminal prints the guidance as text. Piped stdout contains the structured report. For a project or other installation it shows the package location and tells the caller how to use its original installation scope and exits 1. The command does not fetch releases, change packages or change local OpenSandbox configuration.
|
|
49
59
|
|
|
50
60
|
## Distribution file boundary
|
|
51
61
|
|
|
52
62
|
`package.json` admits the compiled runtime, CLI, examples and explicit installed verification fixtures, their required source and assets, `docs`, the compiler configuration and Docker context exclusions, and the tracked root glossary, Agent instructions, dependency shrinkwrap, environment example and submodule declaration. npm also includes its mandatory package metadata and README. Runtime code, Worker/image preparation inputs, model catalog, prompts/skills, foreground/result scripts and editable example resources remain in the tarball. The archive excludes `test/` and `dist/test/`. Installed parity tests stage controlled test backends themselves. FATE, Orders and the historical TaskPool Runtime are built from a source checkout. They are excluded from the SDK archive. The opt-in installed integration tests stage their own benchmark assets when they run. The optional TaskPool and Mathlib Search images compile their standalone host entrypoints and transitive dependencies using dedicated configurations. The Worker build stages compiled Runtime and Worker files from the same installed package. It uses the compiled TaskPool CLI table to preserve its shorthand commands. The selected executor files are supplied by the host after package installation.
|
|
53
63
|
|
|
54
|
-
The
|
|
64
|
+
`npm ci` in the checkout uses the tracked v3 shrinkwrap, which includes development dependencies. The checkout manifest is private. [Release packaging](../../scripts/pack-release.ts) builds by default and accepts `--skip-build` for checks that already compiled the tree. It uses npm's packlist to stage the distribution in a temporary directory, then writes a public manifest and removes development metadata and dev-only entries from the staged root shrinkwrap. It keeps production resolutions and integrity values from the checkout lock. The MCP client resolves `cross-spawn` 7.1.2 independently of the Pi development tool's 7.0.6 pin. The command writes the final archive to the supplied output directory, prints its absolute path and removes staging on success or failure. The registry and GitHub Release use the same final archive. Release verification serves it through a local registry and installs it by package name into an empty project and a separate global prefix. It checks the single public CLI, the Worker executable separately, the SDK import and the production audit. Manual verification accepts a candidate that shares a version with the current release. Tag runs additionally ask public npm to validate publication with a dry-run, so version reuse fails before publication.
|
|
65
|
+
|
|
66
|
+
The packaging command sets a `022` umask before building, staging and packing. npm records existing member permissions, which can depend on the umask used to create the checkout. Before the final pack, the command sets staged regular files to `0755` if they have an execute bit and `0644` otherwise. Staging uses a private temporary directory and the checkout keeps its original permissions. Record the clean commit, Node and npm versions, and final SHA-256 with installed acceptance evidence.
|
|
67
|
+
|
|
68
|
+
The Worker, TaskPool service-host and Mathlib Search image runtime stages copy the root manifest and shrinkwrap alongside each other, then use `npm ci --omit=dev --ignore-scripts`. The two Service build stages restore the archive's `package.development.json` and `npm-shrinkwrap.development.json` to their standard names and run `npm ci --include=dev` before TypeScript compilation. Packaging builds this pair from the checked-in lock offline with the executor-only Pi development dependency removed. The published runtime manifest and lock also omit the compiler and Node types. The image-input test verifies the shipped COPY inputs, offline installation from both lock variants and the pinned compiler. Pi is selected from the separately installed executor. Physical image build and startup are separate checks.
|
|
55
69
|
|
|
56
70
|
The archive license and image-context audits use the same package selection as external installation. When `ANYSWARM_TEST_PACKAGE_ARCHIVE` and `ANYSWARM_TEST_PACKAGE_SHA256` are supplied, the fixture validates the pair, reads and hashes the selected bytes, and writes a private snapshot before any tar or npm consumption. These audits inspect that snapshot and report missing required files from it. Without an explicit selection they pack the current checkout. An incorrect or incomplete frozen selection fails before packing a substitute. Regression checks provide a validly hashed archive missing the required license and Dockerfile and require each corresponding audit to fail on the missing file.
|
|
57
71
|
|
|
@@ -61,31 +75,37 @@ The archive includes the exact upstream Apache 2.0 license text beside the adapt
|
|
|
61
75
|
|
|
62
76
|
## Local setup and doctor
|
|
63
77
|
|
|
64
|
-
The installed CLI parses flags before importing local setup. From a checkout, `./scripts/setup` builds the project as necessary and calls the same entry point. `--config` imports an explicit trusted ESM module and reads its adjacent `.env` without overriding previously set environment variables. The Runtime configuration preflight validates the resolved Sandbox, Runtime, model routes and file policy before smoke. Missing model
|
|
78
|
+
The installed CLI parses flags before importing local setup. From a checkout, `./scripts/setup` builds the project as necessary and calls the same entry point. `--config` imports an explicit trusted ESM module and reads its adjacent `.env` without overriding previously set environment variables. The Runtime configuration preflight validates the resolved Sandbox, Runtime, model routes and file policy before smoke. An invalid active route blocks the probe. Missing model settings have their own state and remedy and do not block the controlled infrastructure smoke. Setup never contacts the configured model upstream. The first default Subagents Run reports the exact missing setting when its built-in configuration has no model URL or when Codex needs an explicit model ID. That preflight failure uses the normal configuration failure code and records cleanup complete before allocation.
|
|
65
79
|
|
|
66
80
|
### Connection resolution and checkout preparation
|
|
67
81
|
|
|
68
|
-
|
|
82
|
+
The CLI resolves explicit configuration and flags, supported environment settings, the owner-only saved connection and then the default Lifecycle URL `http://127.0.0.1:8080/v1`. Setup defaults to the managed local profile and reuses credentials and backend/image settings for a matching endpoint. It can reuse a loopback connection saved in existing mode. Plain doctor also recognizes an explicitly configured loopback service even when it has no local ownership record. Managed local setup accepts HTTP Lifecycle on `localhost` or `127.0.0.1` with the standard `/v1` path. A configured nonloopback address in the default path is reported with its configuration source before any Lifecycle request. That check leaves the saved file in place. Use an explicit managed endpoint to replace a conflicting saved configuration after a successful probe.
|
|
83
|
+
|
|
84
|
+
`setup --mode existing` authenticates against the explicitly configured endpoint and saves it. `doctor --mode existing` reads that same connection and verifies it without Docker. Existing-mode smoke requires an explicit prepared Worker image from the operator. Plain doctor makes a bounded read-only Lifecycle and authentication check and allocates no Sandbox. The SDK connection resolver still accepts explicitly configured remote services.
|
|
69
85
|
|
|
70
86
|
Setup writes schema 1 to `opensandbox.json` under `~/.config/anyswarm`, or `ANYSWARM_CONFIG_DIR` when selected. The directory must be owner-controlled. Reads and atomic 0600 writes protect the endpoint credentials, optional explicit Worker override, callback, management mode, managed container ID, backend kind and executable entry, and actual prepared image ID. The prepared ID is diagnostic evidence; the SDK checks current build inputs before choosing an image. Previous schema-less saved connections are ignored. The operator can rerun setup with this release’s desired mode and endpoint.
|
|
71
87
|
|
|
72
88
|
### Existing or locally managed OpenSandbox
|
|
73
89
|
|
|
74
|
-
|
|
90
|
+
Setup and doctor report the OS, architecture, and Node version and path. A separate advisory report records Git and npm versions and paths, or how to resolve a missing command. These advisory checks also work when running directly from a checkout or installed executable without npm on PATH. In managed local mode with no selected image or adapter, they look for a compatible Pi or Codex installation. Setup gives explicit backend flags priority, then uses a matching saved executable or checks PATH. For each backend the PATH search continues past unsupported wrappers and installations until a compatible executable is verified. If only one backend is compatible, setup selects it. An interactive setup can ask which backend to use when both are compatible. Automation selects one with `--backend` when the choice is ambiguous. The preflight reports the selected executable and actual version. An explicit `--backend-version` prefers a matching saved executable and searches PATH for the requested version. Combine it with `--backend-path` to verify a particular installation. Both flags require a locally built Worker. The optional pin is saved with the executable. Repeating explicit backend selection without a pin restores automatic version tracking. A project executor pin takes precedence for that project.
|
|
91
|
+
|
|
92
|
+
The local Docker check runs even when the backend is missing or fails verification so setup and doctor can report both failures before preparing anything. It resolves the current Unix socket and reads daemon information under bounded subprocess waits. The diagnostics distinguish a missing Docker CLI, a nonlocal context, unavailable daemon or socket, denied socket access, and an incompatible daemon. Linux install guidance uses the host's distribution family. A reachable engine reports its version, CLI version and active context when Docker supplies them. On macOS the missing-engine remedy checks standard system and user Applications directories for Docker Desktop and offers launch guidance when present. macOS requires a Linux daemon matching the native architecture and suggests Docker Desktop or the user's existing local engine. Diagnostics do not install dependencies or change contexts. Plain doctor verifies the saved executable and the local engine without building a Worker. Missing local Lifecycle prompts the user to run setup. Phase progress goes to stderr, with elapsed timings and a heartbeat during long operations. The final report goes to stdout as JSON.
|
|
93
|
+
|
|
94
|
+
The checkout bootstrap waits up to 180 seconds for its directory lock (`flock` on Linux or `/usr/bin/lockf` on macOS), builds as needed, and forwards endpoint, backend, configuration and callback options to the same CLI entry. Setup uses the same material discovery and Worker preparation as the local SDK path described below.
|
|
75
95
|
|
|
76
|
-
The deployment uses the pinned OpenSandbox server, Execd and Egress images. Provider mutations use a per-port local lock. The inspected container name selects a candidate; its setup labels, owner token, state paths, Docker mount and network configuration, and recorded container ID establish ownership. A matching stopped service is started by ID. A different same-name container, a port occupied by another process and failed Lifecycle authentication have distinct diagnoses. Local provider preparation creates a key and state directory only when needed. Failure cleanup only deletes infrastructure attributable to that attempt, and leaves resources in place when deletion cannot be confirmed or a Sandbox still uses them.
|
|
96
|
+
The deployment uses the pinned OpenSandbox server, Execd and Egress images. On macOS it selects native Linux images and runs the server on a Docker bridge with the Lifecycle port published on Mac loopback only. The server listens on the container interface and uses the daemon VM's `/var/run/docker.sock`, not the Mac client's Unix socket. The Runtime reaches Execd, Worker and egress endpoints through the authenticated server proxy; the Linux host-network path is unchanged. Provider mutations use a per-port local lock (`flock` on Linux or persistent-file `lockf -k` on macOS). A different platform profile is not adopted. The inspected container name selects a candidate; its setup labels, owner token, state paths, Docker mount and network configuration, and recorded container ID establish ownership. The macOS profile requires the exact loopback port publication and VM socket bind. A matching stopped service is started by ID. A different same-name container, a port occupied by another process and failed Lifecycle authentication have distinct diagnoses. Local provider preparation creates a key and state directory only when needed. Failure cleanup only deletes infrastructure attributable to that attempt, and leaves resources in place when deletion cannot be confirmed or a Sandbox still uses them.
|
|
77
97
|
|
|
78
98
|
### Probe and project diagnosis
|
|
79
99
|
|
|
80
|
-
Local setup runs a bounded temporary Runtime using the actual Worker image ID. The controller checks authenticated Lifecycle access, the Guest executor, Bridge and controlled model, a file write/read, exported bytes and Sandbox deletion. The smoke completion and provider ownership are separate receipts. After the probe succeeds, setup saves the connection and selection and retains the managed provider for later Runs. An interrupted or failed smoke closes its temporary endpoints and reports pending cleanup evidence when needed. `doctor --smoke` uses the same probe, without building a missing image or starting a stopped provider. Plain `doctor` reports configuration and Lifecycle reachability, including a saved preparation identity when available. Lifecycle startup and restart wait for at most 90 seconds after Docker accepts the start. Setup reports HTTP 401 or 403 as soon as the Lifecycle service rejects the selected key.
|
|
100
|
+
Before the macOS local smoke, a disposable container from the prepared Worker image resolves `host.docker.internal`. Unless the operator chose a callback explicitly, setup requires one non-loopback IPv4 answer and uses its numeric address for the callback URL and exact-port egress allowlist. Setup persists whether it discovered the address. Repeated setup refreshes only a previously detected address, while doctor compares it against the saved value and reports a required setup refresh if it changed. Explicit and legacy unmarked saved addresses are used as stored. Local macOS smoke also rejects explicit Worker images whose declared OS and architecture differ from the native Linux target. An ambiguous or missing result fails the probe without granting broader network access. Local setup runs a bounded temporary Runtime using the actual Worker image ID. The controller checks authenticated Lifecycle access, the Guest executor, Bridge and controlled model, a file write/read, exported bytes and Sandbox deletion. The smoke completion and provider ownership are separate receipts. After the probe succeeds, setup saves the connection and selection and retains the managed provider for later Runs. An interrupted or failed smoke closes its temporary endpoints and reports pending cleanup evidence when needed. `doctor --smoke` uses the same probe, without building a missing image or starting a stopped provider. Plain `doctor` reports configuration and Lifecycle reachability, including a saved preparation identity when available. Lifecycle startup and restart wait for at most 90 seconds after Docker accepts the start. Setup reports HTTP 401 or 403 as soon as the Lifecycle service rejects the selected key.
|
|
81
101
|
|
|
82
102
|
### CLI entry and authored projects
|
|
83
103
|
|
|
84
|
-
With no arguments or `--help`,
|
|
104
|
+
The installed host command is `anyswarm`. With no arguments or with `--help`, it prints Quickstart and exits 0 without loading project configuration, creating Run records, or allocating a Sandbox. `--version` reads the installed package manifest. Invalid commands exit 2 with usage. Setup and doctor are explicit commands. See [Harness entry and lifecycle](23-project-harness.md) for source, one-shot and RPC admission, and [release CLI acceptance](../workflows/release-cli-acceptance.md) for installed verification.
|
|
85
105
|
|
|
86
106
|
## Entry points
|
|
87
107
|
|
|
88
|
-
`src/harness/` contains common project input, host/RPC, reporting and cleanup support. Concrete mechanisms live in their owning example directories. `scripts/anyswarm-
|
|
108
|
+
`src/harness/` contains common project input, host/RPC, reporting and cleanup support. Concrete mechanisms live in their owning example directories. `scripts/anyswarm-harnesses.ts` maps installed CLI names to Harness and application entrypoints. The legacy TaskPool/PeerMesh foreground switch is CLI-specific code in `src/cli/foreground-harnesses.ts`. The [repository implementation plan](../designs/repository-layout.md) records the remaining private-helper and TaskPool domain extraction.
|
|
89
109
|
|
|
90
110
|
The shipped `.env.example` lists common connection variables, model settings for the Notes example and standalone Service hosting. Built-in project entry points and configured doctor use the shared ESM and adjacent environment loader. SDK code can call `resolveSandboxConnection` explicitly. For Notes, the model URL is the full `/v1/responses` endpoint. Pi is the default executor. Codex uses an explicitly chosen model ID. The model token stays behind the host Model Gateway. Other Harnesses can supply trusted options through their own configuration modules. [Notes configuration](../../examples/notes/config.ts) · [Environment example](../../.env.example)
|
|
91
111
|
|
|
@@ -133,7 +153,7 @@ The built-in Trace Viewer (`src/trace-viewer/`) opens an output root containing
|
|
|
133
153
|
|
|
134
154
|
The [CI workflow](../../.github/workflows/ci.yml) runs on PRs targeting `main` and pushes to `main`. Each PR run checks out GitHub's test merge commit and compares it with its first parent, including a whitespace check. A push compares with the previous tip and fetches that commit if needed. The [change selector](../../.github/ci-scope.sh) reads added and deleted paths separately, including both sides of moves. It selects full Core and website checks if the comparison is unavailable or a changed path is outside the known documentation and website inputs. An update cancels the older run for the same PR. The token has read access to repository contents, and checkout leaves no Git credentials in the working tree.
|
|
135
155
|
|
|
136
|
-
Documentation, website, README image and architecture inventory edits get the offline generated-reference and repository-link checks. Changes to the
|
|
156
|
+
Documentation, website, README image and architecture inventory edits get the offline generated-reference and repository-link checks. Changes to the homepage npm command or either Quickstart also check that those commands agree. Website and guide changes build both locales. The website build also runs on full Core changes because the guides link to files in the repository and the site serves SDK examples. [Website CI](22-website.md#build-and-render)
|
|
137
157
|
|
|
138
158
|
Full coverage runs the Core test files in three parallel Linux runners. Each runner uses a fresh npm cache, builds and packs Core, and installs the tarball and Harness Session example in temporary directories. Those installs seed registry metadata so the package tests can run offline. The runner removes its temporary files and uses Node's test sharding over a sorted list of compiled test files. Tests run serially within each runner. The shards include the compiled Trace Viewer reader and server tests, including the installed-package check for `anyswarm trace`. Local `npm test` still runs the whole suite. Opt-in native and model tests stay disabled.
|
|
139
159
|
|
|
@@ -240,9 +260,9 @@ The launcher leaves model reasoning settings with the configured executor. The s
|
|
|
240
260
|
|
|
241
261
|
## Executor and file policy selection
|
|
242
262
|
|
|
243
|
-
The root SDK
|
|
263
|
+
The root SDK accepts the installed version of npm-distributed Pi or Codex, with an optional exact version selection. Darwin also accepts standalone Codex when the same release is available as a Linux npm package. Host production dependencies do not install an Agent. `DEFAULT_WORKER_IMAGE` requests a local Worker for the Runtime executor. `workerImageFor(executor)` can also require a built-in kind or an exact version, or return an adapter’s explicit image. External OpenSandbox and custom Providers can use explicitly prepared images.
|
|
244
264
|
|
|
245
|
-
For a local Worker the SDK picks the selected executable from the matching saved connection, explicit `localWorker.backendPath`, or PATH. It resolves npm’s bin link and validates the package entry, dependencies and actual version with a temporary home.
|
|
265
|
+
For a local Worker the SDK picks the selected executable from the matching saved connection, explicit `localWorker.backendPath`, or PATH. It resolves npm’s bin link and validates the package entry, dependencies and actual version with a temporary home. On Linux it snapshots only that npm install’s program files and resolved dependencies. The collection excludes local credential and configuration files and does not read an Agent’s login directory. On macOS the verified host npm package selects the distribution and exact version only. A disposable container from the pinned Node base installs that version from the public npm registry for the native Linux platform, with npm lifecycle scripts and bin-link generation disabled. It writes a deterministic tar of the Linux dependency tree into private staging, and the Controller rechecks the host selection and hashes the staged tar. The container uses a private AnySwarm npm download cache per Linux platform and receives no host npm installation or login configuration. Every preparation resolves the exact release and hashes the resulting Linux material before reusing a Worker. It reports the executable entry from the Linux package metadata, which may differ from the Mac entry. Preparation waits up to ten minutes and attempts to remove its named temporary container on error or interruption. The Worker staging directory contains that archive, its SHA-256 and the owning SDK’s bundled compiled code, Dockerfile, catalog and npm shrinkwrap. The build identity includes the SDK content, executor content and real version, and Docker platform. The Node base image is pinned by digest. Builds can fetch upstream OS and npm dependencies. The slim base uses Node's bundled trust roots for Debian's HTTPS apt fetch before installing the OS CA bundle. A cache hit requires the matching inputs, protocol and file transport labels, and on macOS a native Linux image architecture. Rechecking the Linux npm material on macOS can contact the registry even on a Worker image cache hit; changed dependencies produce a different identity. A build verifies the copied program archive before extraction and probes the installed Guest version before tagging. The Pi build loads the bridge’s required SDK entry points and Codex verifies its App Server entry point before returning the image. The controlled setup smoke then exercises the real runtime protocol. Build or compatibility failure is reported before business Agent allocation. A failed build leaves older Worker identities untouched.
|
|
246
266
|
|
|
247
267
|
The installed program and dependencies stay in the image used by the Run. The SDK resolves the Worker during Runtime construction, before listeners and business Agents. It replaces local selection values with one actual image ID and records the selected program and Worker identity in the Runtime report. A durable Runtime also saves the original selection in its Run directory, and recovery reuses that selection. Runtime startup separately probes the executable inside the real Sandbox. A new Runtime recomputes content identity and can build a replacement after the host changes. Registering a later Profile in a Runtime can reuse its pinned Worker. `localWorker.onProgress` reports selection and build or cache progress to the host application.
|
|
248
268
|
|
|
@@ -26,6 +26,8 @@ The fixed SDK Messages fixture stages the Writer and Reader Profile prompts thro
|
|
|
26
26
|
|
|
27
27
|
## Common project inputs
|
|
28
28
|
|
|
29
|
+
Code sends the user task to the writable Root and each `code.spawn_agent` assignment to its child editor through `runInput`. Both receive a project copy from the start-of-turn capture. Root is instructed to work alone for ordinary tasks and use `code.wait_agent` to collect and review delegated work. Pi receives the granted direct Service tools. The CLI hint is appended for Codex and any other executor using CLI Service tools. After integration the host can ask whether to run a command suggested by the pre-edit manifest. The question goes through `context.askUser` to the owner client. [Code prompts](prompts/26-code.md)
|
|
30
|
+
|
|
29
31
|
The host saves the initial user prompt and sends it through the selected Harness. Subagents directs it to Root. TaskPool persists it as the Mission goal and includes it in read-only discovery. PeerMesh writes it to the run issue and starts the same kickoff batch for the peers. Substrate includes it between each cycle header and the repository's collaboration instruction. Lead–Worker sends it as the goal of its first Lead turn. With a fixed team, a later integration turn carries Board feedback sequences from the actual helpers. With a dynamic team, the scheduler sends committed Board updates as they become available.
|
|
30
32
|
|
|
31
33
|
Notes uses role-specific project observations and a reader instruction describing the evidence artifact. After confirming the reader's retrieval, the Host sends the original task, the first artifact path and a new follow-up path to the same reader through `runInput`. Both paths derive from the Session Run ID. Messages wraps the original task with scoped put/get instructions and supplies the Run-specific reader file in the retrieval prompt. The writer creates the message from the installed project. See the generated [Notes](prompts/07-notes-harness.md), [Messages](prompts/14-sdk-handoff.md), [PeerMesh](prompts/08-peermesh-harness.md), [Lead–Worker](prompts/08-lead-worker-harness.md) and [TaskPool](prompts/08-taskpool-harness.md) references.
|
|
@@ -136,6 +138,10 @@ The team entrypoint in `examples/peermesh/harness/team.ts` installs the [complet
|
|
|
136
138
|
|
|
137
139
|
The T14 opt-in controlled native test uses fixed texts `T14_FIXED_KICKOFF`, `T14_FIXED_EXTERNAL`, and `T14_FIXED_USER`. The middle text is posted to the actual run PR and discovered through the HTTP subscription. The third marker is prefixed by the provisioned peer username in an actual Mattermost mention, discovered by that same subscription. Its three scripted Bash calls and outputs `ROUTER_1_OK`/`ROUTER_2_OK`/`ROUTER_3_OK` are local fixture responses, not hosted reasoning. The gate disables nudges; bounded nudge behavior is checked deterministically.
|
|
138
140
|
|
|
141
|
+
## AutoResearch peers
|
|
142
|
+
|
|
143
|
+
Each peer Profile appends the same research Service and patch guidance. The Harness sends a first turn with the assigned label, trusted goal and captured Run prompt. The demo action supplies the fixed FrontierCS-2 objective as both its trusted goal and initial prompt. Later autonomous turns use a short, fixed nudge. After a peer submits a readable immutable patch, the Harness can send the other peers a review notice by conditional active steer or append it to an ordinary follow-up, once per peer in that path if the review remains pending. The candidate ID and SHA-256 come from the accepted snapshot. The notice instructs peers to decode the authorized patch bytes and publish their own concrete observation. A terminal message to a specific peer uses the public owner steer path; the Harness forwards the user's text as provided and only while the native turn is active. The Board is read by workers through authorized Service calls. Official public train feedback is available there, and hidden final feedback never enters a peer prompt. [Complete prompt bodies and send sites](prompts/22-autoresearch.md)
|
|
144
|
+
|
|
139
145
|
## Local setup probe
|
|
140
146
|
|
|
141
147
|
The probe supplies one fixed Profile instruction to the ordinary Pi startup prompt and sends one host follow-up after the Agent becomes idle. The controlled Responses server returns two fixed tools in order and a final status after verifying the read result. The [complete probe texts](prompts/10-local-setup-probe.md) record the Profile, follow-up, tool arguments and final output. The local setup receipt checks the actual Service caller, model request sequence and exported bytes.
|
|
@@ -146,6 +152,18 @@ The ordinary Harness stages the [complete Root and Child Profile instructions](p
|
|
|
146
152
|
|
|
147
153
|
The optional Pastel example driver uses the repository-owned [initial task and HSL follow-up](prompts/08-subagents-harness.md). The task asks Root to choose and coordinate its own team, make an early buildable delivery with tests, incorporate early concrete contributions and verify the stated formats with representative reference probes. The HSL input asks Root to notify affected members and is sent after the first observed active Root model request. The ordinary runner uses the task supplied by its caller.
|
|
148
154
|
|
|
155
|
+
Owner controls also send repository-owned notifications to the affected member's direct parent. The three exact texts, generated from the same `ownerInterventionText` helper used by the controller, are:
|
|
156
|
+
|
|
157
|
+
```text
|
|
158
|
+
user-steer: the Run owner steered this member
|
|
159
|
+
user-interrupt: the Run owner interrupted this member
|
|
160
|
+
user-stop: the Run owner stopped this member
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
`reportIntervention` creates a notice only while the team accepts work and the member has a parent. Steer notifications follow confirmed input admission; interrupt and stop notifications follow confirmed native effects, including reconciliation of an originally unknown receipt. The message ID is `owner:` plus the original public control request ID; `from` is the affected member's absolute path and `eventSeq` is the next controller event sequence. Steer uses kind `message`; interrupt and stop use kind `result` with outcome `failed`. The parent relationship comes from the controller's member tree. No user text is interpolated into these fixed notices.
|
|
164
|
+
|
|
165
|
+
The controller serializes mailbox admission for that parent, reserves the notice and calls `offer`. A waiting parent can consume the notice through its collaboration wait response. Otherwise `offer` sends the JSON message envelope, excluding internal delivery `state`, through `runtime.send(parentId, body, {requestId: message.id, source: message.from, mode: 'steer', wakeIfIdle: false})`. Held or stopped parents retain pending notices, as does a paused or controlled Root. Unknown native admission keeps the original message identity for reconciliation; failed delivery is recorded in the bounded controller diagnostics. These notifications do not restart an idle parent. [Complete generated texts](prompts/08-subagents-harness.md)
|
|
166
|
+
|
|
149
167
|
The following inputs belong to the separate communication fixture.
|
|
150
168
|
|
|
151
169
|
The [Subagents prompts](prompts/08-subagents-harness.md) contain the complete default parent/child Profile text and every four-to-eight-Agent parent prompt/default goal variant. The host-frozen `childCount` selects `parentPromptFor` and, if no goal is supplied, `initialGoalFor`; count 2 preserves the original texts verbatim. The host stages those role prompts without composing a shared conversation. It sends configured `goal` and up to four `supplements` through the controller with fresh `user-N` identities and explicit `followUp`. The parent creates child input and followup text through native Bash Agent Service calls, subject to Profile and direct-child authorization; those future model-authored strings are not repository templates.
|
|
@@ -274,3 +292,7 @@ When Subagents is opened with a question-capable client, its Service registry al
|
|
|
274
292
|
The standalone [persistent Board example prompts](prompts/17-persistent-board.md) contain the shared `addedSystemPrompt` and every finite business input. Both initial members receive the same Board guidance. The publisher receives the exact finding text and verification request; the independent reader receives a read request; after the publisher stops, the replacement receives a read-after-replacement request. Each input passes through `runInput` to `Runtime.send` and waits for its own settled event. Direct/code selects no local tools; CLI selects Bash. Registry permissions grant only Board publish/list.
|
|
275
293
|
|
|
276
294
|
The [Agent control example](prompts/18-agent-control.md) stages the shell script as a lead Agent's initial file. The Host submits its fixed user input with `runInput`. The lead's Bash invokes four granted `agent` operations. The child receives the script's follow-up text through the built-in Service's normal input admission path and has no Service grants.
|
|
295
|
+
|
|
296
|
+
## Personal Router and member dispatch
|
|
297
|
+
|
|
298
|
+
The [generated Personal prompts](prompts/21-personal.md) preserve the complete Router, Worker and Reviewer Profile additions. Runtime Profile startup sends the role prompt when opening the Agent. The Harness then sends JSON through `runInput`. The opening Router input includes the bound work request from GitHub or the owner, prior question, full first request, bounded excerpts of replies and up to six recent delivered turns, and previously changed paths from the journal. Later inputs carry the work ID, member identity and Host-observed action feedback. Workers and Reviewers receive the Router's assignment and the approved paths. Repo files arrive separately as staged files. The Host requests review if the Router tries to deliver edits before a Reviewer has checked their current bytes. Approval and rejection act on the saved artifact without sending a model input. The Host combines the Router question or the saved change and review summaries into the decision card. An answer enters the Inbox as a new owner turn.
|