@anyswarm/core 0.5.0 → 0.5.1
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 +11 -10
- package/deploy/worker/Dockerfile +12 -4
- package/dist/deploy/worker/Dockerfile +12 -4
- package/dist/examples/README.md +24 -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 +33 -0
- package/dist/examples/autoresearch/REQUIREMENTS.zh.md +18 -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 +15 -0
- package/dist/examples/autoresearch/frontiercs2.d.ts +87 -0
- package/dist/examples/autoresearch/frontiercs2.js +211 -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 +115 -0
- package/dist/examples/autoresearch/project.js +410 -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 +25 -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 +13 -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/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 +40 -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/outbox.d.ts +5 -0
- package/dist/examples/super/outbox.js +103 -0
- package/dist/examples/super/project.d.ts +111 -0
- package/dist/examples/super/project.js +253 -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-applications.d.ts +19 -0
- package/dist/scripts/anyswarm-applications.js +19 -0
- package/dist/scripts/anyswarm-arguments.d.ts +35 -5
- package/dist/scripts/anyswarm-arguments.js +87 -23
- 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 +2 -0
- package/dist/scripts/anyswarm-harnesses.js +31 -0
- package/dist/scripts/anyswarm-installation.js +19 -13
- package/dist/scripts/anyswarm-launch.d.ts +37 -0
- package/dist/scripts/anyswarm-launch.js +86 -0
- package/dist/scripts/anyswarm-project.d.ts +12 -2
- package/dist/scripts/anyswarm-project.js +121 -20
- package/dist/scripts/anyswarm-source-runner.d.ts +1 -0
- package/dist/scripts/anyswarm-source-runner.js +232 -0
- package/dist/scripts/anyswarm-tui-config.d.ts +36 -0
- package/dist/scripts/anyswarm-tui-config.js +189 -0
- package/dist/scripts/anyswarm-tui-session.d.ts +66 -0
- package/dist/scripts/anyswarm-tui-session.js +304 -0
- package/dist/scripts/anyswarm-tui-terminal.d.ts +41 -0
- package/dist/scripts/anyswarm-tui-terminal.js +154 -0
- package/dist/scripts/anyswarm-tui.d.ts +2 -0
- package/dist/scripts/anyswarm-tui.js +1012 -0
- package/dist/scripts/anyswarm.js +47 -2
- 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 +6 -1
- package/dist/scripts/local-environment.js +52 -16
- 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 +2 -2
- package/dist/scripts/local-setup.js +72 -12
- package/dist/scripts/opensandbox-agent-worker.js +2 -2
- package/dist/scripts/pack-release.d.ts +1 -0
- package/dist/scripts/pack-release.js +63 -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 +13 -1
- package/dist/src/harness/project-harness.js +36 -10
- 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 +3 -1
- 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 +3 -1
- package/docs/architecture/00-overview.md +1 -1
- package/docs/architecture/01-agent-core.md +1 -1
- package/docs/architecture/06-observability-experiments.md +1 -1
- package/docs/architecture/07-run-configuration.md +18 -12
- 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 +148 -84
- 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 -3
- package/docs/architecture/23-project-harness.md +124 -5
- package/docs/architecture/24-runtime-recovery.md +10 -3
- package/docs/architecture/25-foreground-tui.md +51 -0
- package/docs/architecture/26-code.md +39 -0
- package/docs/architecture/27-personal.md +43 -0
- package/docs/architecture/28-autoresearch.md +31 -0
- package/docs/architecture/INDEX.md +4 -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 +489 -21
- package/docs/designs/core-harness/06-project-harness.md +13 -2
- package/docs/designs/core-harness/README.md +5 -0
- package/docs/en/agents.md +1 -1
- package/docs/en/build-your-harness.md +3 -5
- package/docs/en/changelog.md +13 -4
- package/docs/en/first-harness.md +8 -11
- 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 +12 -123
- package/docs/en/overview.md +1 -1
- package/docs/en/quickstart.md +40 -16
- package/docs/en/reference/api.md +14 -4
- package/docs/en/reference/cli.md +58 -14
- package/docs/en/runtime.md +2 -2
- package/docs/en/services.md +4 -0
- package/docs/third-party-notices.md +1 -0
- package/docs/workflows/development.md +17 -12
- package/docs/workflows/release-and-docs-versioning.md +76 -0
- package/docs/zh/agents.md +1 -1
- package/docs/zh/build-your-harness.md +3 -5
- package/docs/zh/changelog.md +13 -4
- package/docs/zh/first-harness.md +8 -11
- 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 +13 -124
- package/docs/zh/overview.md +1 -1
- package/docs/zh/quickstart.md +40 -16
- package/docs/zh/reference/api.md +14 -4
- package/docs/zh/reference/cli.md +58 -14
- package/docs/zh/runtime.md +2 -2
- package/docs/zh/services.md +4 -0
- package/examples/README.md +24 -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 +33 -0
- package/examples/autoresearch/REQUIREMENTS.zh.md +18 -0
- package/examples/autoresearch/config.ts +90 -0
- package/examples/autoresearch/demo.ts +55 -0
- package/examples/autoresearch/eject.json +15 -0
- package/examples/autoresearch/frontiercs2.ts +237 -0
- package/examples/autoresearch/prepare.ts +267 -0
- package/examples/autoresearch/process.ts +50 -0
- package/examples/autoresearch/project.ts +397 -0
- package/examples/autoresearch/research-service.ts +302 -0
- package/examples/code/README.md +25 -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 +13 -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/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 +40 -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/outbox.ts +97 -0
- package/examples/super/project.ts +227 -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 +2199 -0
- package/npm-shrinkwrap.json +86 -1920
- package/package.development.json +92 -0
- package/package.json +13 -7
- package/scripts/anyswarm-applications.ts +39 -0
- package/scripts/anyswarm-arguments.ts +94 -28
- package/scripts/anyswarm-author.ts +25 -0
- package/scripts/anyswarm-eject.ts +145 -0
- package/scripts/anyswarm-harnesses.ts +27 -0
- package/scripts/anyswarm-installation.ts +19 -13
- package/scripts/anyswarm-launch.ts +108 -0
- package/scripts/anyswarm-project.ts +114 -21
- package/scripts/anyswarm-source-runner.ts +203 -0
- package/scripts/anyswarm-tui-config.ts +174 -0
- package/scripts/anyswarm-tui-session.ts +295 -0
- package/scripts/anyswarm-tui-terminal.ts +147 -0
- package/scripts/anyswarm-tui.ts +912 -0
- package/scripts/anyswarm.ts +43 -2
- 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 +55 -17
- package/scripts/local-setup-smoke.ts +3 -2
- package/scripts/local-setup-worker.ts +17 -7
- package/scripts/local-setup.ts +66 -13
- package/scripts/opensandbox-agent-worker.ts +2 -2
- package/scripts/pack-release.ts +67 -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 +36 -10
- 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 +2 -1
- 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
|
@@ -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
|
|
|
@@ -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
|
|
@@ -37,21 +37,27 @@ For the pinned source and retained-format inventory, see
|
|
|
37
37
|
|
|
38
38
|
The [release workflow](../../.github/workflows/release.yml) runs verification on manual dispatch or a pushed version tag. 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 performs an npm publication dry run, 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 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.1 continues to use Worker protocol `anyswarm-core-v2`. Local setup prepares a Worker from the installed package's build inputs.
|
|
41
|
+
|
|
40
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. A maintainer publishes to npm separately using the same release tarball. [Release procedure](../workflows/development.md#release-verification)
|
|
41
43
|
|
|
42
44
|
### Managed CLI installation and update
|
|
43
45
|
|
|
44
|
-
The official installer selects npm’s global prefix when writable, or the user’s `~/.local`. It uses the GitHub Latest API to resolve a stable tag, downloads the versioned archive and `SHA256SUMS`, then
|
|
46
|
+
The official installer selects npm’s global prefix when writable, or the user’s `~/.local`. It uses the GitHub Latest API to resolve a stable tag, downloads the versioned archive and `SHA256SUMS`, then streams the staged file through Node's SHA-256 implementation. A missing or malformed release digest, or a mismatch with the staged bytes, fails before npm runs. An explicit local archive is copied to a private temporary directory and hashed there; the digest records the staged bytes rather than authenticating the local source. Neither path needs a system checksum command. The temporary download is removed when the installer exits. npm installs production dependencies with lifecycle scripts disabled under a unique `<prefix>/lib/anyswarm/versions/release-*` directory. The staged CLI must execute and report the expected package identity and version. A private `install.json` records the package source, digest, prefix and version.
|
|
45
47
|
|
|
46
|
-
The executable symlinks under `<prefix>/bin` resolve through a shared `current` link. Activation checks for competing entries and serializes mutations with a Unix file lock. It
|
|
48
|
+
The executable symlinks under `<prefix>/bin` resolve through a shared `current` link. The two host aliases both point to `current/node_modules/.bin/anyswarm`. The Worker command `swarm` uses its separate executable. Activation verifies the staged targets and executable permissions before running `anyswarm --version`. A managed archive can omit the npm `anys` entry, as the published v0.5.0 archive did. On Darwin, for that exact verified release archive, the website installer gives its legacy activator a temporary compatibility wrapper that translates its fixed GNU flock call to the equivalent persistent lockf invocation. Activation checks for competing entries and serializes mutations with a Unix file lock: Linux uses `flock`, and macOS uses the system `/usr/bin/lockf -k` so waiters and future activations keep using the same lock file. Both wait up to 15 seconds for the lock before reporting failure. The lock helper signals readiness to the activator and holds the lock until the activator closes the helper's input. It converts the previous managed short link into the common host link when `current` points into the managed versions directory. It can replace existing npm symlinks only when each points to the exact executable under `@anyswarm/core`, the v0.4.1 name `@anyswarm/anyswarm`, or the v0.4.0 name `@luna-shi/anyswarm` in the selected prefix. Activation publishes the fully validated generation with atomic rename of `current`. It restores replaced entries if activation fails and leaves the old package available. The installer reports its actual entry and package root, and prints a PATH command when its bin directory is absent. If GitHub Latest still points to v0.4.0 and no managed generation exists, the installer recognizes that archived scope and uses the original global npm install path.
|
|
47
49
|
|
|
48
|
-
`anyswarm update` verifies that its own package and invoked executable belong to the active managed generation. It resolves the stable version before downloading, returns immediately if the current version is already at least as new, and otherwise stages the checked archive in the same prefix. The candidate-only override accepts `--archive <file> --sha256 <digest>`, including two different archives using the same version. A staged CLI version mismatch, download or npm failure leaves the active generation available. Concurrent managed updates compare the active generation under a Unix file lock. The operating system releases the lock if activation exits. Previous managed generations are retained for active applications and recovery. For a verified
|
|
50
|
+
`anyswarm update` verifies that its own package and invoked executable belong to the active managed generation. It resolves the stable version before downloading, returns immediately if the current version is already at least as new, and otherwise stages the checked archive in the same prefix. The candidate-only override accepts `--archive <file> --sha256 <digest>`, including two different archives using the same version. A staged CLI version mismatch, download or npm failure leaves the active generation available. Concurrent managed updates compare the active generation under a Unix file lock. The operating system releases the lock if activation exits. Previous managed generations are retained for active applications and recovery. For a verified global npm installation, update returns `preserved` with the existing version and an `npm install -g --prefix <prefix> @anyswarm/core@latest` command. It exits before resolving a release, staging a package or writing to that prefix. Running the installer explicitly can switch matching npm entry links to the managed generation while retaining the previous package files. For a project or other installation, update reports the installed path and a command for the user to run in its original scope. Project manifests, SDK locks, model configuration and backend programs are outside this update operation. The published v0.5.0 updater on Linux activates only the long alias when it upgrades to v0.5.1. Rerunning the current website installer in the same prefix activates both aliases. On macOS the same installation path uses the new package's platform-specific lock.
|
|
49
51
|
|
|
50
52
|
## Distribution file boundary
|
|
51
53
|
|
|
52
54
|
`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
55
|
|
|
54
|
-
The
|
|
56
|
+
`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 both CLI aliases, 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.
|
|
57
|
+
|
|
58
|
+
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.
|
|
59
|
+
|
|
60
|
+
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 use the checkout's original pair, included in the archive as `package.development.json` and `npm-shrinkwrap.development.json`. Those names keep npm from reading the development lock during a public CLI or SDK install. Each build stage restores that pair to the standard names before `npm ci --include=dev` and TypeScript compilation. The image-input test verifies the shipped COPY inputs, offline installation from both lock variants and the pinned development Pi version. Physical image build and startup are separate checks.
|
|
55
61
|
|
|
56
62
|
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
63
|
|
|
@@ -71,21 +77,21 @@ Setup writes schema 1 to `opensandbox.json` under `~/.config/anyswarm`, or `ANYS
|
|
|
71
77
|
|
|
72
78
|
### Existing or locally managed OpenSandbox
|
|
73
79
|
|
|
74
|
-
Local setup checks
|
|
80
|
+
Local setup checks the host platform, Node version and access to a local Unix Docker context. macOS requires a Linux daemon matching the native Mac architecture; it does not fall back to emulation. Setup and local doctor resolve the client Unix socket and read daemon information without changing the context. A failed check points users to install and start Docker Desktop for Mac, or start their existing local Linux engine, then check context and environment overrides. Neither npm nor setup installs or launches an engine. Explicit existing mode does not check Docker. Successful setup uses the existing owner-only connection write, and plain doctor remains read-only. The checkout bootstrap waits up to 180 seconds for its directory lock (`flock` on Linux, `/usr/bin/lockf` on macOS), checks or rebuilds the checkout, and forwards the selected endpoint, backend, configuration and callback options to the same CLI entry. The backend selection uses an explicit `--backend` with optional `--backend-path`, a matching saved selection, or a detected npm executable on PATH. With two detected backends and no selection, terminal setup prompts for one. A noninteractive invocation must choose in that case. An unavailable backend reports the installation path and the failed version or startup check. An explicit `--backend-version` selects a matching saved executable or searches PATH and persists the pin with the path. A caller can combine it with `--backend-path` to verify a particular installation. A project executor pin takes precedence for that project. Both CLI installation flags require a locally built Worker; repeating explicit backend selection without a pin restores automatic version tracking. Plain doctor probes the saved executable without preparing a Worker. Setup uses the same material discovery and Worker preparation as the local SDK path described below.
|
|
75
81
|
|
|
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.
|
|
82
|
+
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
83
|
|
|
78
84
|
### Probe and project diagnosis
|
|
79
85
|
|
|
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.
|
|
86
|
+
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
87
|
|
|
82
88
|
### CLI entry and authored projects
|
|
83
89
|
|
|
84
|
-
|
|
90
|
+
The two installed host names `anyswarm` and `anys` share an entry. With no arguments they open the streaming composer on a suitable interactive terminal. Help and version exit without inspecting project files. A noninteractive launch reports supported explicit foreground or RPC options and exits promptly. A project that exports a Harness can use `anys run ./harness.ts --config ./config.ts --cwd ./input --prompt '<task>'`. Previously generated project hosts can still execute their own JavaScript entry explicitly. See the [streaming terminal chapter](25-foreground-tui.md) for configuration repair and terminal restoration.
|
|
85
91
|
|
|
86
92
|
## Entry points
|
|
87
93
|
|
|
88
|
-
`src/harness/` contains common project input, host/RPC, reporting and cleanup support. Concrete mechanisms live in their owning example directories. `scripts/anyswarm-
|
|
94
|
+
`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
95
|
|
|
90
96
|
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
97
|
|
|
@@ -240,9 +246,9 @@ The launcher leaves model reasoning settings with the configured executor. The s
|
|
|
240
246
|
|
|
241
247
|
## Executor and file policy selection
|
|
242
248
|
|
|
243
|
-
The root SDK
|
|
249
|
+
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
250
|
|
|
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.
|
|
251
|
+
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
252
|
|
|
247
253
|
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
254
|
|
|
@@ -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.
|
|
@@ -40,19 +40,19 @@ This section is generated from executable exports and checked against the source
|
|
|
40
40
|
| [test-support/taskpool-legacy/services-bridge.ts](../../test-support/taskpool-legacy/services-bridge.ts) | `7bb38b8ef1d8930a89accbf2cdd72695c4c27f5754ab3b85ee43d3f44ada5ebd` |
|
|
41
41
|
| [examples/services/mathlib-search/service.json](../../examples/services/mathlib-search/service.json) | `caecf2c6344e0f2777b7135a3c6a7fccb3f93d618d11430480b800551038bfae` |
|
|
42
42
|
| [src/errors.ts](../../src/errors.ts) | `c2b15623faa55162f9e0474b9810d1c5f1eea6255520cd423b0dad155511dc65` |
|
|
43
|
-
| [src/core/index.ts](../../src/core/index.ts) | `
|
|
44
|
-
| [src/core/types.ts](../../src/core/types.ts) | `
|
|
45
|
-
| [src/core/services.ts](../../src/core/services.ts) | `
|
|
46
|
-
| [src/core/service-types.ts](../../src/core/service-types.ts) | `
|
|
43
|
+
| [src/core/index.ts](../../src/core/index.ts) | `a78f159604cb21264b987079532cf295832420374297d976e1f838e536a103d0` |
|
|
44
|
+
| [src/core/types.ts](../../src/core/types.ts) | `9245229cd72d6408cb0fe801b8e0181603d5afcb27c50fb689a2e8e404d446d5` |
|
|
45
|
+
| [src/core/services.ts](../../src/core/services.ts) | `5accc123c4c681a3c4d7aadad616e44e83725b52aead10250b172b127f784b1e` |
|
|
46
|
+
| [src/core/service-types.ts](../../src/core/service-types.ts) | `f30edaca5a6fe5d40b3ba90f49210af32aca3b773f74ff005fa0823556d21e93` |
|
|
47
47
|
| [src/core/service-lifecycle-types.ts](../../src/core/service-lifecycle-types.ts) | `d2eef2921b59ed7fdb6bbf91ee44802e96996bed85277c3f01193aad19767570` |
|
|
48
|
-
| [src/core/service-observation-types.ts](../../src/core/service-observation-types.ts) | `
|
|
49
|
-
| [src/core/service-process.ts](../../src/core/service-process.ts) | `
|
|
50
|
-
| [src/core/mcp-service.ts](../../src/core/mcp-service.ts) | `
|
|
51
|
-
| [src/core/sandbox/opensandbox-backend.ts](../../src/core/sandbox/opensandbox-backend.ts) | `
|
|
52
|
-
| [src/core/sandbox/executor-driver.ts](../../src/core/sandbox/executor-driver.ts) | `
|
|
48
|
+
| [src/core/service-observation-types.ts](../../src/core/service-observation-types.ts) | `150ea4a963166f7de86d0158f19e032f9518109fc2ad97cdfd6131ad1c429dc5` |
|
|
49
|
+
| [src/core/service-process.ts](../../src/core/service-process.ts) | `80ce634ac724c9bcff9ecd9b719266f70d8daeece3e3db92f557c67c94b91684` |
|
|
50
|
+
| [src/core/mcp-service.ts](../../src/core/mcp-service.ts) | `ea2cd9865f6252413ea52ee787d357c485470eb2328aaaee029986ed9d01a485` |
|
|
51
|
+
| [src/core/sandbox/opensandbox-backend.ts](../../src/core/sandbox/opensandbox-backend.ts) | `a7aa96e86f1d193929123872432d23454882a014839cd95f23d2a19a3c5cf634` |
|
|
52
|
+
| [src/core/sandbox/executor-driver.ts](../../src/core/sandbox/executor-driver.ts) | `6b3a8a1d93c5bbca00f2df00d75d593344cd02d642e563391e58910a70dbe828` |
|
|
53
53
|
| [src/core/backend-config.ts](../../src/core/backend-config.ts) | `be1c5c7db4876f5632f6f855af3e16e8f59c46a5a76b3f27a934508e15cbdf47` |
|
|
54
54
|
| [src/core/sandbox/opensandbox-provider.ts](../../src/core/sandbox/opensandbox-provider.ts) | `eb98901a846c1ce294621d7a173cec46787ba4bf18b4edc65afc5c867e968c37` |
|
|
55
|
-
| [src/core/sandbox/sandbox-connection.ts](../../src/core/sandbox/sandbox-connection.ts) | `
|
|
55
|
+
| [src/core/sandbox/sandbox-connection.ts](../../src/core/sandbox/sandbox-connection.ts) | `cb7f8d271b986b6dff9cdc29718f0bf03dbd4fe86cc11f12eaf5437edbc7f782` |
|
|
56
56
|
|
|
57
57
|
### TaskPool command operation surface
|
|
58
58
|
|
|
@@ -3100,9 +3100,10 @@ import type { CreateRuntimeOptions, RecoverRuntimeOptions, Runtime } from './typ
|
|
|
3100
3100
|
export type * from './session-types.js';
|
|
3101
3101
|
export { createHarnessSession } from '../harness/project-harness.js';
|
|
3102
3102
|
export type { Harness, HarnessContext, HarnessInput, HarnessInputHandler, HarnessInputPreparation, HarnessJson, HarnessStatusInfo, ProjectHarness, ProjectHarnessContext, ProjectHarnessResult, } from '../harness/project-harness.js';
|
|
3103
|
-
export type { HarnessAgentHandler, HarnessAgentReceipt, HarnessAgentRegistration, HarnessAgents, HarnessAnswer, HarnessAnswerReceipt, HarnessCapability, HarnessDescriptor, HarnessEvent, HarnessInputDescriptor, HarnessInputReceipt, HarnessLifetime, HarnessOperation, HarnessPhase, HarnessQuestion, HarnessQuestionKind, HarnessQuestionRequest, HarnessQuestionSource, HarnessRequest, HarnessDispatchRequest, HarnessResult, HarnessSession, HarnessSessionOptions, HarnessStartReceipt, HarnessState, HarnessStopReceipt, HarnessSubscriptionOptions, } from '../harness/harness-session-types.js';
|
|
3103
|
+
export type { HarnessAgentHandler, HarnessAgentReceipt, HarnessAgentRegistration, HarnessAgents, HarnessAnswer, HarnessAnswerReceipt, HarnessCapability, HarnessDescriptor, HarnessEvent, HarnessInputDescriptor, HarnessInputReceipt, HarnessLifetime, HarnessOperation, HarnessPhase, HarnessQuestion, HarnessQuestionKind, HarnessQuestionRequest, HarnessQuestionSource, HarnessRequest, HarnessDispatchRequest, HarnessResult, HarnessSession, HarnessServices, HarnessSessionOptions, HarnessStartReceipt, HarnessState, HarnessStopReceipt, HarnessSubscriptionOptions, } from '../harness/harness-session-types.js';
|
|
3104
3104
|
export { ProjectPreflightError } from '../harness/project-input.js';
|
|
3105
3105
|
export { HarnessRpcClient } from '../harness/project-rpc-client.js';
|
|
3106
|
+
export { runProjectRpc } from '../harness/project-rpc.js';
|
|
3106
3107
|
export type { HarnessRpcClientOptions, HarnessRpcReady, HarnessRpcTransport } from '../harness/project-rpc-client.js';
|
|
3107
3108
|
export { observeProjectRuntime, projectConfiguration, projectResult } from '../harness/project-runtime.js';
|
|
3108
3109
|
export { runInput, type RunInputResult } from '../harness/run-input.js';
|
|
@@ -3114,6 +3115,7 @@ export { httpClient } from '../harness/http.js';
|
|
|
3114
3115
|
export { checkGitProject, seedTeamRepository, seededCheckoutInstruction } from '../harness/project-git.js';
|
|
3115
3116
|
export { initializeGitRepository, importGitTree, commitGitTree, isGitTreePath } from '../harness/git-tree.js';
|
|
3116
3117
|
export { decodeFileSeed as decodeFileTree, snapshotFileSeed as snapshotFileTree, completeDigest as completeFileTreeDigest } from './files/core-file-seed.js';
|
|
3118
|
+
export { resolveFilePolicy } from './file-policy.js';
|
|
3117
3119
|
export { AnySwarmError } from '../errors.js';
|
|
3118
3120
|
export { requestHttp } from '../protocol/http-request.js';
|
|
3119
3121
|
export { stableStringify } from '../protocol/stable-json.js';
|
|
@@ -3126,7 +3128,7 @@ export { DEFAULT_WORKER_IMAGE, workerImageFor } from './worker-image.js';
|
|
|
3126
3128
|
export { ServiceRegistry, serviceFromManifest, inProcessService, httpService, createInProcessAdapter, createHttpJsonAdapter, createServiceReplyAdapter } from './services.js';
|
|
3127
3129
|
export { mcpService } from './mcp-service.js';
|
|
3128
3130
|
export type { McpServiceOptions, McpHttpServiceOptions, McpStdioServiceOptions } from './mcp-service.js';
|
|
3129
|
-
export type { ServiceStateMetadata, ServiceStatePresentation } from './service-observation-types.js';
|
|
3131
|
+
export type { ServiceLiveState, ServiceStateMetadata, ServiceStatePresentation, ServiceStateRead, ServiceStateSource } from './service-observation-types.js';
|
|
3130
3132
|
export { managedProcessLifecycle } from './service-process.js';
|
|
3131
3133
|
export type { ManagedProcessOptions } from './service-process.js';
|
|
3132
3134
|
export type { ServiceLifecycle, ServiceLifecycleContext, ServiceStorage, ServiceResources } from './service-lifecycle-types.js';
|
|
@@ -3152,6 +3154,7 @@ import type { ExecutorSelection } from './executor-adapter.js';
|
|
|
3152
3154
|
import type { FilePolicy } from './file-policy.js';
|
|
3153
3155
|
import type { ServiceRegistration, ServiceRegistry } from './services.js';
|
|
3154
3156
|
import type { ServiceStorage, ServiceResources } from './service-lifecycle-types.js';
|
|
3157
|
+
import type { ServiceStateRead, ServiceStateSource } from './service-observation-types.js';
|
|
3155
3158
|
import type { JsonValue, ServiceDefinition, ServiceToolMode, ServiceManifest } from './service-types.js';
|
|
3156
3159
|
import type { AgentSessionConfig, ContextInput, ContextInputReceipt, ContextSendOptions, RuntimeHooks, RuntimeSession, SessionEvent } from './session-types.js';
|
|
3157
3160
|
export {};
|
|
@@ -3611,6 +3614,8 @@ export interface Runtime {
|
|
|
3611
3614
|
register(input: RuntimeServiceRegistration): Promise<RuntimeServiceDefinition>;
|
|
3612
3615
|
get(id: string): RuntimeServiceDefinition | null;
|
|
3613
3616
|
list(): readonly RuntimeServiceDefinition[];
|
|
3617
|
+
listState(): readonly ServiceStateSource[];
|
|
3618
|
+
readState(serviceId: string): Promise<ServiceStateRead>;
|
|
3614
3619
|
start(input: ServiceRetirement): Promise<RuntimeServiceDefinition>;
|
|
3615
3620
|
stop(input: ServiceRetirement): Promise<RuntimeServiceDefinition>;
|
|
3616
3621
|
restart(input: ServiceRetirement): Promise<RuntimeServiceDefinition>;
|
|
@@ -3711,7 +3716,7 @@ export declare function invokeServiceReply(registration: ServiceRegistration, {
|
|
|
3711
3716
|
/** Business result helper for the in-process compatibility paths. Bridge uses the full reply. */
|
|
3712
3717
|
export declare function invokeService(registration: ServiceRegistration, invocation: ServiceInvocation, timeoutMs?: number): Promise<JsonValue>;
|
|
3713
3718
|
export type ServiceHandler = (input: JsonValue, context: ServiceRequest) => JsonValue | Promise<JsonValue>;
|
|
3714
|
-
export declare function inProcessService(definition: ServiceInterface, handlers: Readonly<Record<string, ServiceHandler
|
|
3719
|
+
export declare function inProcessService(definition: ServiceInterface, handlers: Readonly<Record<string, ServiceHandler>>, observation?: Pick<ServiceAdapter, 'readState'>): ServiceDefinition;
|
|
3715
3720
|
/** Bind an explicit provider-reply handler without inspecting arbitrary business values. */
|
|
3716
3721
|
export declare function createServiceReplyAdapter(invokeReply: NonNullable<ServiceAdapter['invokeReply']>): ServiceAdapter;
|
|
3717
3722
|
export declare function setAdapterPrivateValues(adapter: ServiceAdapter, values: readonly string[]): void;
|
|
@@ -3746,7 +3751,7 @@ export declare function createHttpJsonAdapter({ token, timeoutMs, fetchImpl }?:
|
|
|
3746
3751
|
#### dist/src/core/service-types.d.ts
|
|
3747
3752
|
|
|
3748
3753
|
```ts
|
|
3749
|
-
import type { ServiceStateMetadata } from './service-observation-types.js';
|
|
3754
|
+
import type { ServiceLiveState, ServiceStateMetadata } from './service-observation-types.js';
|
|
3750
3755
|
import type { ServiceLifecycle } from './service-lifecycle-types.js';
|
|
3751
3756
|
export type JsonValue = null | boolean | number | string | JsonValue[] | {
|
|
3752
3757
|
[key: string]: JsonValue;
|
|
@@ -3873,6 +3878,10 @@ export interface ServiceAdapter {
|
|
|
3873
3878
|
confirmQuiescent?(options: {
|
|
3874
3879
|
signal: AbortSignal;
|
|
3875
3880
|
}): boolean | Promise<boolean>;
|
|
3881
|
+
/** Optional host-only read of an explicitly public, bounded projection while ready. */
|
|
3882
|
+
readState?(options: {
|
|
3883
|
+
signal: AbortSignal;
|
|
3884
|
+
}): ServiceLiveState | Promise<ServiceLiveState>;
|
|
3876
3885
|
/** Optional bounded host-only snapshot called during retirement or Runtime close. */
|
|
3877
3886
|
exportState?(options: {
|
|
3878
3887
|
signal: AbortSignal;
|
|
@@ -3929,7 +3938,8 @@ export interface ServiceLifecycle {
|
|
|
3929
3938
|
#### dist/src/core/service-observation-types.d.ts
|
|
3930
3939
|
|
|
3931
3940
|
```ts
|
|
3932
|
-
|
|
3941
|
+
import type { JsonValue } from './service-types.js';
|
|
3942
|
+
/** Data-only display hints evaluated against a JSON state using JSON Pointer. */
|
|
3933
3943
|
export interface ServiceStatePresentation {
|
|
3934
3944
|
summary?: readonly {
|
|
3935
3945
|
label: string;
|
|
@@ -3951,6 +3961,25 @@ export interface ServiceStateMetadata {
|
|
|
3951
3961
|
description?: string;
|
|
3952
3962
|
presentation?: ServiceStatePresentation;
|
|
3953
3963
|
}
|
|
3964
|
+
/** Explicit public projection produced by a running Service. */
|
|
3965
|
+
export interface ServiceLiveState {
|
|
3966
|
+
readonly state: JsonValue;
|
|
3967
|
+
readonly capturedAt: string;
|
|
3968
|
+
readonly revision?: string;
|
|
3969
|
+
readonly presentation?: ServiceStatePresentation;
|
|
3970
|
+
}
|
|
3971
|
+
export interface ServiceStateSource {
|
|
3972
|
+
readonly name: string;
|
|
3973
|
+
readonly supported: boolean;
|
|
3974
|
+
}
|
|
3975
|
+
export type ServiceStateRead = (ServiceLiveState & {
|
|
3976
|
+
readonly status: 'available';
|
|
3977
|
+
}) | {
|
|
3978
|
+
readonly status: 'unsupported' | 'timeout' | 'error' | 'unavailable';
|
|
3979
|
+
readonly reason: string;
|
|
3980
|
+
/** Last successful capture by this Service instance, when available. */
|
|
3981
|
+
readonly capturedAt?: string;
|
|
3982
|
+
};
|
|
3954
3983
|
```
|
|
3955
3984
|
|
|
3956
3985
|
#### dist/src/core/service-process.d.ts
|
|
@@ -3977,7 +4006,7 @@ export type ProcessIdentity = {
|
|
|
3977
4006
|
export declare function processIdentity(pid: number): Promise<ProcessIdentity | undefined>;
|
|
3978
4007
|
export declare function matchProcessIdentity(prior: ProcessIdentity): Promise<ProcessIdentity | undefined>;
|
|
3979
4008
|
export declare function stopManagedProcess(prior: ProcessIdentity, signal: AbortSignal): Promise<void>;
|
|
3980
|
-
/**
|
|
4009
|
+
/** Same-host process ownership with argv execution and PID reuse protection. */
|
|
3981
4010
|
export declare function managedProcessLifecycle(options: ManagedProcessOptions): ServiceLifecycle;
|
|
3982
4011
|
```
|
|
3983
4012
|
|
|
@@ -4064,6 +4093,7 @@ interface BackendAgent {
|
|
|
4064
4093
|
started?: boolean;
|
|
4065
4094
|
executionEpoch?: number;
|
|
4066
4095
|
sessionReady?: boolean;
|
|
4096
|
+
executorVersion?: string;
|
|
4067
4097
|
loadedResources?: readonly unknown[];
|
|
4068
4098
|
activeMessageId?: string;
|
|
4069
4099
|
sessionCommands?: Map<string, {
|
|
@@ -4078,6 +4108,7 @@ interface BackendAgent {
|
|
|
4078
4108
|
decisions?: Set<string>;
|
|
4079
4109
|
workerStartDispatched?: boolean;
|
|
4080
4110
|
polling?: Promise<void>;
|
|
4111
|
+
eventRead?: Promise<boolean>;
|
|
4081
4112
|
submissions?: Map<string, InputSubmission>;
|
|
4082
4113
|
executionStopped?: boolean;
|
|
4083
4114
|
lease?: {
|
|
@@ -4352,9 +4383,8 @@ type Model = ModelConfig;
|
|
|
4352
4383
|
export interface ExecutorDriver {
|
|
4353
4384
|
readonly kind: string;
|
|
4354
4385
|
readonly name: string;
|
|
4355
|
-
readonly version
|
|
4386
|
+
readonly version?: string;
|
|
4356
4387
|
readonly capabilities: ExecutorCapabilities;
|
|
4357
|
-
readonly compatibleVersions: readonly string[];
|
|
4358
4388
|
readonly adapter?: ExecutorAdapter;
|
|
4359
4389
|
readonly defaultMaxOutputTokens?: null;
|
|
4360
4390
|
assertEnvironment?(environment: Readonly<Record<string, string>> | undefined): void;
|
|
@@ -4367,6 +4397,7 @@ export interface ExecutorDriver {
|
|
|
4367
4397
|
model: Model;
|
|
4368
4398
|
baseUrl: string;
|
|
4369
4399
|
forkSession: boolean;
|
|
4400
|
+
version: string;
|
|
4370
4401
|
}): {
|
|
4371
4402
|
command: 'pi';
|
|
4372
4403
|
args: string[];
|
|
@@ -4384,6 +4415,8 @@ export interface ExecutorDriver {
|
|
|
4384
4415
|
externalExecutor: ExecutorAdapter;
|
|
4385
4416
|
};
|
|
4386
4417
|
}
|
|
4418
|
+
/** Preserve the contract for explicitly prepared deployments without a version pin. */
|
|
4419
|
+
export declare function legacyImageExecutorVersion(kind: string): "0.172.0" | "1.3.0" | undefined;
|
|
4387
4420
|
export declare function createPiExecutor({ version }?: {
|
|
4388
4421
|
version?: string;
|
|
4389
4422
|
}): BuiltinExecutorSelection;
|
|
@@ -4600,6 +4633,7 @@ interface ConnectionInput {
|
|
|
4600
4633
|
apiKey?: string;
|
|
4601
4634
|
endpointHost?: string;
|
|
4602
4635
|
advertiseHost?: string;
|
|
4636
|
+
advertiseHostDiscovery?: 'docker-network';
|
|
4603
4637
|
publicUrl?: string;
|
|
4604
4638
|
image?: string;
|
|
4605
4639
|
useServerProxy?: boolean;
|
|
@@ -4616,6 +4650,7 @@ export declare function resolveSandboxConnectionWithSources(input?: ConnectionIn
|
|
|
4616
4650
|
lifecycleBaseUrl: string;
|
|
4617
4651
|
apiKey: string | undefined;
|
|
4618
4652
|
advertiseHost: string | undefined;
|
|
4653
|
+
advertiseHostDiscovery: "docker-network" | undefined;
|
|
4619
4654
|
publicUrl: string | undefined;
|
|
4620
4655
|
image: string | undefined;
|
|
4621
4656
|
useServerProxy: boolean | undefined;
|
|
@@ -66,9 +66,26 @@ Durable state can outlive a Session, but runtime recovery still has to validate
|
|
|
66
66
|
|
|
67
67
|
The SQL below is the complete exported create-schema text, including checks, keys and indexes. It is schema text, not an export of a user database. The `tasks` interpolation is expanded. Constructors initialize the current schema on new databases. Shared `operations` declarations intentionally appear in several owners because the services can share a SQLite connection.
|
|
68
68
|
|
|
69
|
+
### Personal inbox, work and delivery
|
|
70
|
+
|
|
71
|
+
Source: [examples/super/inbox.ts](../../examples/super/inbox.ts); source SHA-256: `501f767c001a5d981aa000c26c2eaf1f9ed30a960ba98114b788ad11f7945f65`.
|
|
72
|
+
|
|
73
|
+
```sql
|
|
74
|
+
PRAGMA journal_mode = WAL;
|
|
75
|
+
PRAGMA synchronous = FULL;
|
|
76
|
+
CREATE TABLE IF NOT EXISTS jobs (id TEXT PRIMARY KEY, thread INTEGER UNIQUE NOT NULL, pull INTEGER UNIQUE, data TEXT NOT NULL);
|
|
77
|
+
CREATE TABLE IF NOT EXISTS events (
|
|
78
|
+
seq INTEGER PRIMARY KEY, id TEXT UNIQUE NOT NULL, job TEXT NOT NULL, hash TEXT NOT NULL,
|
|
79
|
+
input TEXT NOT NULL, state TEXT NOT NULL, delivery TEXT, problem TEXT
|
|
80
|
+
);
|
|
81
|
+
CREATE INDEX IF NOT EXISTS events_queue ON events (job, state, seq);
|
|
82
|
+
CREATE TABLE IF NOT EXISTS conflicts (id TEXT PRIMARY KEY, detected TEXT NOT NULL);
|
|
83
|
+
CREATE TABLE IF NOT EXISTS metadata (key TEXT PRIMARY KEY, data TEXT NOT NULL);
|
|
84
|
+
```
|
|
85
|
+
|
|
69
86
|
### Core Runtime allocation ownership
|
|
70
87
|
|
|
71
|
-
Source: [src/core/allocation-ledger.ts](../../src/core/allocation-ledger.ts); source SHA-256: `
|
|
88
|
+
Source: [src/core/allocation-ledger.ts](../../src/core/allocation-ledger.ts); source SHA-256: `e01591de943cf331f4eea952f55d3631979af3412710a72b36693d8c4c2f63ae`.
|
|
72
89
|
|
|
73
90
|
```sql
|
|
74
91
|
CREATE TABLE IF NOT EXISTS allocation_run (id INTEGER PRIMARY KEY CHECK (id = 1), body TEXT NOT NULL);
|