@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
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# 项目 Harness 的共同入口
|
|
2
2
|
|
|
3
|
+
[#334](https://github.com/AnySwarm/anyswarm/issues/334) 以 [45775d7 设计修订](https://github.com/AnySwarm/anyswarm/tree/45775d7312e62a791ab8a097c5e7715dc3c9d548/docs/designs/core-harness) 为基线,替代 #280 的冲突条款。已批准的入口使用同义的 `anys` 和 `anyswarm`,交互终端按 [#344 最新决定](https://github.com/AnySwarm/anyswarm/issues/344) 进入单页流式 TUI,使用 `/use` 或 `-u` 选择 Harness,业务命令通过 Slash 路由。Run 拥有者可以控制任意已登记成员,动作以 Agent ID 和 requestId 标识,Harness 负责同步任务与生命周期。Service 显式提供独立的只读实时状态。作者以 TypeScript 源码和配置为入口,发行包继续使用构建产物,显式 JS/MJS 入口保持兼容。三应用用同一个源码导出机制,业务代码及导出清单分别由应用工单交付。安装包、PTY、成员控制、状态变化和导出后的修改验证按 #334 验收。
|
|
4
|
+
|
|
3
5
|
本页记录随 [#257](https://github.com/AnySwarm/anyswarm/issues/257) 实施 PR 一起评审的共同入口合同;当前实现见 [Project Harness](../../architecture/23-project-harness.md),验收状态由原 Issue/PR 跟踪。Core 文件、事件和停止合同以 [#255](https://github.com/AnySwarm/anyswarm/issues/255) 的最终实现版本为准。仓库的 [Architecture](../../architecture/INDEX.md) 说明已实现的行为。
|
|
4
6
|
|
|
5
7
|
## #281 作者合同与可恢复的交互
|
|
@@ -13,6 +15,10 @@
|
|
|
13
15
|
|
|
14
16
|
当前实现、预算和失败语义见 [Harness 生命周期](../../architecture/23-project-harness.md)。两种 Pi 及包外候选的验收归 #281。
|
|
15
17
|
|
|
18
|
+
## #337 AutoResearch
|
|
19
|
+
|
|
20
|
+
[#337](https://github.com/AnySwarm/anyswarm/issues/337) 采用 [45775d7 的 Core 和 Harness 合同](https://github.com/AnySwarm/anyswarm/tree/45775d7312e62a791ab8a097c5e7715dc3c9d548/docs/designs/core-harness)。demo 使用四个平级 Kimi K3 成员,成员自行认领方向、交流、复核与采用候选。宿主负责共享预算、可信评测和收尾。后续 [#344](https://github.com/AnySwarm/anyswarm/issues/344) 统一终端和 Slash 入口,终端保留轻量活动与成员控制,Trace Viewer 展示完整研究记录。自定义 evaluator 配置与正式 benchmark 适配复用同一 Harness。包外、正式评测和资源验收沿用 #337。[AutoResearch 实现](../../architecture/28-autoresearch.md)
|
|
21
|
+
|
|
16
22
|
## 模块与路径
|
|
17
23
|
|
|
18
24
|
```ts
|
|
@@ -21,7 +27,7 @@ type HarnessInput = { cwd: string; prompt: string };
|
|
|
21
27
|
|
|
22
28
|
普通命令从启动目录解析相对 `--cwd`、模块路径和包名。省略 `--cwd` 时使用启动目录。解析得到的绝对项目路径和 prompt 原文构成此次任务。模型、Sandbox、Service、并发、期限和输出位置由运行配置提供。
|
|
23
29
|
|
|
24
|
-
|
|
30
|
+
模块默认导出包含 `apiVersion: 1`、`id` 和 `run(context)` 的对象。加载器先解析内置名、显式本地 TypeScript 或 ESM 文件,或从启动目录解析已安装包入口,再校验模块形状和版本。模块使用自身的 `import.meta.url` 解析附带资源,导入时保持无运行分配、无终端 I/O。安装后的 CLI 运行编译产物,显式作者入口支持本地多文件 TypeScript。
|
|
25
31
|
|
|
26
32
|
应用层宿主为 `run` 提供任务、固定初始树及其摘要、运行配置、Run ID、输出目录、AbortSignal 和状态及事件上报函数。Harness 选择用户任务的接收者和文件版本,创建 Runtime 与协作设施,并返回业务、产物和资源回执。Host 保存公共结果和报告。二者通过 AbortSignal 请求停止,资源由创建它的一方收尾。
|
|
27
33
|
|
|
@@ -32,7 +38,7 @@ type HarnessInput = { cwd: string; prompt: string };
|
|
|
32
38
|
1. Host 校验项目目录,选择 Run 输出目录。默认位置在项目外。显式置于项目内的 Run 目录从本次捕获范围排除。
|
|
33
39
|
2. Git 项目枚举选定目录内实际存在的已跟踪文件和未被忽略的未跟踪文件,读取当前工作树字节。非 Git 项目枚举普通文件。Git 管理路径排除,普通隐藏文件参与相同的选择。
|
|
34
40
|
3. 按 Core FileTree 校验归一化路径、对象类型、模式、原始字节与配额。使用根目录约束和文件打开前后检查抵御路径替换,在检测到源发生变化时有界重试或明确失败。选定范围内的 Gitlink 报出路径并拒绝。已加载且满足配额的 Git LFS 文件按当前字节读取,尚未加载的 LFS 指针报出路径并拒绝。空目录按 FileTree 规则没有条目。捕获设总时限、路径深度和遍历条目上限。捕获记录包括选择规则、文件数量、字节量和总摘要,并保存每个文件的相对路径、字节量、模式和摘要。目录遍历可以检测到具体变化,整个工作树在遍历期间仍可能发生并发修改。
|
|
35
|
-
4. Harness 每次创建项目 Agent 时显式传入选择的树及版本来源。Core 安装到 Sandbox 的 `/workspace/project`
|
|
41
|
+
4. Harness 每次创建项目 Agent 时显式传入选择的树及版本来源。Core 安装到 Sandbox 的 `/workspace/project` 后才允许首轮任务。初始树捕获一次。后续成员使用它或明确选定的固定业务版本。运行中的成员写入留在私有工作目录。结果保存至 Run 输出目录。Code 可按同一规则重新捕获用户目录,用于后续轮次及候选合并。
|
|
36
42
|
|
|
37
43
|
Team Git 使用同一树初始化固定提交,以单次提交保存字节和模式。Agent 在首轮执行前已有该版本的项目文件。Git 初始化在已填充的目录中建立与固定版本一致的 Git 索引、远端和成员分支,保留现有项目字节。Role 脚本及控制状态存放在运行设施路径。
|
|
38
44
|
|
|
@@ -42,6 +48,7 @@ Team Git 使用同一树初始化固定提交,以单次提交保存字节和
|
|
|
42
48
|
|
|
43
49
|
| 控制 | 行为 |
|
|
44
50
|
| --- | --- |
|
|
51
|
+
| Code | [#336](https://github.com/AnySwarm/anyswarm/issues/336) 默认由可写 Root 在隔离项目副本中直接编辑。用户用自然语言要求委派时,Root 可在本轮最多启动两个独立子 Agent,并收取结果。宿主合并、验证并把授权改动写回当前项目。入口、状态及失败行为见 [Code Architecture](../../architecture/26-code.md)。 |
|
|
45
52
|
| `run` | RPC 从请求取得任务。复用相同 ID 与参数返回原接纳回执。改参冲突,另一启动请求被拒绝。 |
|
|
46
53
|
| `status` | 查询当前宿主、已知 Agent 和业务状态。启动前、启动中、运行、停止中与终态分别记录。 |
|
|
47
54
|
| `input` | 根据 Harness 声明和运行状态路由,串行接纳,保留原请求身份和实际回执。 |
|
|
@@ -67,3 +74,7 @@ Harness 在异步捕获、设施或 Agent 创建返回后复核停止状态。
|
|
|
67
74
|
## 验证方式
|
|
68
75
|
|
|
69
76
|
CLI、RPC、Worker 和安装后的调用路径执行 [#257 的 A1–A12](https://github.com/AnySwarm/anyswarm/issues/257)。以两组不同的目录内容和 prompt 验证任务确实改变,并在 Sandbox 核对实际 cwd、字节和模式。失败测试覆盖安装前后、等待中与停止后的创建和输入竞态。以同一个候选 tarball 在 checkout 外测试内置、显式 ESM 文件和已安装包入口。五个主要 Harness 各验证一次有界真实模型协作及其产物和收尾,Notes 与 Messages 验证真实 Service 交接。结果记录绑定候选提交、包摘要和 Worker 版本。
|
|
77
|
+
|
|
78
|
+
## Personal 后台应用
|
|
79
|
+
|
|
80
|
+
[#338](https://github.com/AnySwarm/anyswarm/issues/338) 和 [#340 的 owner 决定](https://github.com/AnySwarm/anyswarm/pull/340#issuecomment-7346879555) 在 [45775d7 版入口设计](https://github.com/AnySwarm/anyswarm/blob/45775d7312e62a791ab8a097c5e7715dc3c9d548/docs/designs/core-harness/06-project-harness.md) 基础上增加应用拥有的后台生命周期。统一流式 TUI 通过 `observe` 连接既有 Session,Slash Action 提供启动、查询和单笔审批。退出观察客户端后后台继续运行。用户和 Inbox 把业务输入交给 Router。Router 在一个 Runtime 中调度 Worker 和 Reviewer,应用负责来源授权、持久化、工作队列、按任务发布和外部回复。验收通过候选安装包完成真实来源、实际产物、原会话回执及后续修改。详见 [Personal 实现手册](../../architecture/27-personal.md)。
|
|
@@ -112,3 +112,8 @@ TaskPool 现有宿主注入 `snapshotProject` 和已支持的公共 Workspace、
|
|
|
112
112
|
[#273](https://github.com/AnySwarm/anyswarm/issues/273) 在 #272 的统一 SDK 接入上增加 Kubernetes 部署、资源账本、受限恢复、长轮询和分级验证。核查基线为 `main@b747b89affd2931863c156fc64e70a29f7ba13c9`;本轮 owner 允许 #273 草稿叠加在 #272 实施分支上。该决定不改变一票一个完整 PR,也不授权合并或大规模实验。
|
|
113
113
|
|
|
114
114
|
当前恢复实现采用同主机、同 OS boot 的独占 SQLite writer,拒绝无法证明旧 Controller 已失权的跨节点接管。应用负责可验证的 Harness 和 Service 重建;动态 Service 必须重新解析适配器。关闭意图、未知资源、原始输入身份、事件游标和有限保留截止时间均需持久化。节点 API 404 不证明旧进程停止。实现说明见 [Architecture](../../architecture/24-runtime-recovery.md)。后续 owner 决定将大于等于 32 个 Sandbox 的验证改为 mock API 模拟 Agent,重点验证 Sandbox 的分配、容量占用、游标、输入重放、故障收敛与回收。32/128/1,024 档通过本机 HTTP 模拟外部 Lifecycle、Execd 和 Agent API,不启动 VM、Pod 或真实执行器;CLI 在这些档位拒绝真实集群路径。2/8 档保留至少两个独立 worker VM 上的真实 Worker 闭环、故障、时延与对账验收。模拟档的结果只建立软件合同证据。owner 已授权本轮有界 2/8 档实机验收由执行者自行完成。后续大规模实机实验仍须获得 owner 批准。
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
### Local executor version selection
|
|
118
|
+
|
|
119
|
+
For [#339](https://github.com/AnySwarm/anyswarm/issues/339), the owner approved following the selected installed Pi or Codex release by default and allowing an exact user-selected version. The local Worker must use that release for its native Linux platform. Executable identity, guest version, session readiness and the controlled smoke establish compatibility. These requirements supersede the earlier fixed version selection for this path. [Current implementation](../../architecture/07-run-configuration.md#executor-and-file-policy-selection)
|
package/docs/en/agents.md
CHANGED
|
@@ -179,7 +179,7 @@ To cap automatic context compactions (for example, stopping an Agent before a 4t
|
|
|
179
179
|
### Session events and runnable example
|
|
180
180
|
|
|
181
181
|
- **Session event stream**: Subscribe to `runtime.onEvent()` before sending work. Session events arrive as `{ type: 'session', agentId, event }`. Streaming `messageStart`, `textDelta`, and `messageEnd` events share a `messageId` (accumulate deltas per message and content block, then replace with the final `messageEnd` payload); `toolActivity` lists currently running tool calls. Session totals and current context usage are reported separately (forked history can contribute to session totals), and cost is `null` when model pricing is unconfigured.
|
|
182
|
-
- **Runnable example**: See `examples/agent-session.ts` for a complete program demonstrating the 3-compaction stop policy, `append`/`nextTurn` context injection, state/stats/message inspection, and shutdown receipts.
|
|
182
|
+
- **Runnable example**: See `examples/agent-session.ts` for a complete program demonstrating the 3-compaction stop policy, `append`/`nextTurn` context injection, state/stats/message inspection, and shutdown receipts. Run `anys run ./examples/agent-session.ts /absolute/config.ts worker 'Your prompt'` (the config module default-exports `CreateRuntimeOptions` with a 120s work window and 30s cleanup window).
|
|
183
183
|
|
|
184
184
|
---
|
|
185
185
|
|
|
@@ -9,16 +9,15 @@ This guide uses the same installed SDK and public Harness interface as the [firs
|
|
|
9
9
|
|
|
10
10
|
## Install the example
|
|
11
11
|
|
|
12
|
-
Follow [first Harness setup](first-harness.md#2-install-and-connect) in an empty directory to install the
|
|
12
|
+
Follow [first Harness setup](first-harness.md#2-install-and-connect) in an empty directory to install the verified source archive, prepare the Worker and configure a streaming Responses endpoint. Copy the TypeScript sources from that installed SDK.
|
|
13
13
|
|
|
14
14
|
```bash
|
|
15
15
|
sdk=node_modules/@anyswarm/core
|
|
16
16
|
example="$sdk"/examples
|
|
17
17
|
cp "$example"/parallel-swarm/{board.ts,board-service.ts,harness.ts} .
|
|
18
|
-
cp "$example"/first-harness/tsconfig.json .
|
|
19
18
|
```
|
|
20
19
|
|
|
21
|
-
Use a separate directory for this Harness if you already copied First Harness sources elsewhere. Keep the installed SDK
|
|
20
|
+
Use a separate directory for this Harness if you already copied First Harness sources elsewhere. Keep the installed SDK and its copied TypeScript examples together. To edit current repository sources, install their matching [source archive](../../examples/README.md#run-an-example-from-its-directory) before copying them.
|
|
22
21
|
|
|
23
22
|
## Share findings through a Service
|
|
24
23
|
|
|
@@ -33,10 +32,9 @@ The scheduler must reserve each Agent’s input for the duration of its turn. In
|
|
|
33
32
|
## Run it and inspect the report
|
|
34
33
|
|
|
35
34
|
```bash
|
|
36
|
-
./node_modules/.bin/tsc
|
|
37
35
|
mkdir -p input
|
|
38
36
|
printf 'export const cache = new Map<string, string>();\n' > input/cache.ts
|
|
39
|
-
./node_modules/.bin/
|
|
37
|
+
./node_modules/.bin/anys run ./harness.ts --cwd ./input \
|
|
40
38
|
--prompt 'Review cache.ts for resource risks and publish concrete findings.' --output-dir ./runs
|
|
41
39
|
./node_modules/.bin/anyswarm trace --root ./runs
|
|
42
40
|
```
|
package/docs/en/changelog.md
CHANGED
|
@@ -5,16 +5,25 @@ section: RELEASES
|
|
|
5
5
|
order: 16
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
All notable changes to **AnySwarm** (`@anyswarm/core`) are tracked here and in the repository's [`CHANGELOG.md`](../../CHANGELOG.md). For
|
|
8
|
+
All notable changes to **AnySwarm** (`@anyswarm/core`) are tracked here and in the repository's [`CHANGELOG.md`](../../CHANGELOG.md). For the current install commands, see [Releases](latest.md).
|
|
9
|
+
|
|
10
|
+
## v0.5.1
|
|
11
|
+
|
|
12
|
+
- AutoResearch runs four equal Kimi K3 peers on the official FrontierCS-2 demo and shows research activity in the terminal stream and in live Trace. Configure a trusted evaluator for your project or export the editable Harness. [CLI reference](reference/cli.md#autoresearch). End-to-end acceptance on the default Kimi K3 route is tracked in [#337](https://github.com/AnySwarm/anyswarm/issues/337).
|
|
13
|
+
- Personal receives GitHub requests in a detached Router-led Harness with inline decisions and per-work Draft PR approval.
|
|
14
|
+
- Native macOS setup with Docker Desktop uses the selected Pi or Codex installation and supports exact version pins.
|
|
15
|
+
- On Linux, run `anys -u code` to edit the current project with one Agent and delegate in chat when needed. Inspect patches and answer questions in the shared terminal, or export the application with `anys eject code`. [CLI reference](reference/cli.md)
|
|
16
|
+
- The installed `anys` alias opens the same streaming composer as `anyswarm`, with generic Harness selection, inline decisions and per-member controls. `anys run` loads TypeScript sources and `anys eject example` exports an editable Harness with its SDK candidate. [CLI reference](reference/cli.md).
|
|
17
|
+
- The homepage offers global npm and shell installation for the CLI and links to SDK installation separately. The public package lock excludes checkout-only dependencies. [Quickstart](quickstart.md#1-install-anyswarm).
|
|
9
18
|
|
|
10
19
|
## v0.5.0
|
|
11
20
|
|
|
12
|
-
-
|
|
21
|
+
- The SDK is available on npm as [`@anyswarm/core@0.5.0`](https://www.npmjs.com/package/@anyswarm/core/v/0.5.0). Update the project dependency and imports together. The first managed CLI upgrade across the package rename uses the official installer with the existing prefix.
|
|
13
22
|
- Register operation interfaces backed by in-process, HTTP, MCP or external CLI providers. Pi supports direct, code and CLI tool modes. Move Profile `prompt` to `addedSystemPrompt` and `session.tools` to `tools`. Runtime manages a single Service instance and Trace Viewer shows exported state. [Services guide](services.md).
|
|
14
23
|
|
|
15
24
|
## v0.4.1
|
|
16
25
|
|
|
17
|
-
- The
|
|
26
|
+
- The [GitHub release archive](https://github.com/AnySwarm/anyswarm/releases/tag/v0.4.1) contains the v0.4.1 SDK under its original name, `@anyswarm/anyswarm`. Existing v0.4.0 CLI installations can migrate once through the official installer.
|
|
18
27
|
|
|
19
28
|
- Add atomic `anyswarm update` for managed CLI installations. Global npm users can switch once with the official installer. SDK projects select their own dependencies.
|
|
20
29
|
- Linux setup and the SDK build Workers locally from the selected installed Pi or Codex. Repeated setup reuses or restarts its managed OpenSandbox service.
|
|
@@ -25,7 +34,7 @@ All notable changes to **AnySwarm** (`@anyswarm/core`) are tracked here and in t
|
|
|
25
34
|
|
|
26
35
|
## v0.4.0
|
|
27
36
|
|
|
28
|
-
- AnySwarm has a new SDK package, host CLI and Worker namespace. See the [migration guide](latest.md#migrate-from-v030).
|
|
37
|
+
- AnySwarm has a new SDK package, host CLI and Worker namespace. See the [migration guide](https://github.com/AnySwarm/anyswarm/blob/v0.5.0/docs/en/latest.md#migrate-from-v030).
|
|
29
38
|
|
|
30
39
|
- Custom Pi models can map AnySwarm thinking levels to provider values. Startup and session configuration reject explicit unsupported levels.
|
|
31
40
|
|
package/docs/en/first-harness.md
CHANGED
|
@@ -9,7 +9,7 @@ A publisher reads a reference from its workspace and asks you where to send it.
|
|
|
9
9
|
|
|
10
10
|
## 1. Pick your SDK version
|
|
11
11
|
|
|
12
|
-
This tutorial uses
|
|
12
|
+
This tutorial uses `anys run` from the [current source build](quickstart.md#build-and-install-from-source-main). Verify the archive's SHA-256 and set `ANYSWARM_SDK_ARCHIVE` to its absolute path. Copy the examples from that installed package. If you installed the published v0.5.0 package, follow its [versioned tutorial](https://github.com/AnySwarm/anyswarm/blob/v0.5.0/docs/en/first-harness.md).
|
|
13
13
|
|
|
14
14
|
## 2. Install and connect
|
|
15
15
|
|
|
@@ -17,9 +17,7 @@ In a fresh directory, install the SDK as a normal dependency and run its own CLI
|
|
|
17
17
|
|
|
18
18
|
```bash
|
|
19
19
|
npm init -y
|
|
20
|
-
npm
|
|
21
|
-
npm install "${ANYSWARM_SDK_ARCHIVE:-@anyswarm/core@0.5.0}"
|
|
22
|
-
npm install --save-dev typescript @types/node
|
|
20
|
+
npm install "${ANYSWARM_SDK_ARCHIVE:?Set the absolute path to the verified SDK archive}"
|
|
23
21
|
```
|
|
24
22
|
|
|
25
23
|
To prepare a new local OpenSandbox, first [install a supported Pi](quickstart.md#2-prepare-opensandbox-and-the-worker), then run `./node_modules/.bin/anyswarm setup --mode local --backend pi`. With an existing deployment, [configure its endpoint, authentication, callback and Worker image](quickstart.md#connect-to-an-existing-opensandbox), then run `./node_modules/.bin/anyswarm setup --mode existing` and `./node_modules/.bin/anyswarm doctor --smoke`.
|
|
@@ -38,26 +36,25 @@ read -rsp 'Model API token: ' ANYSWARM_MODEL_TOKEN && export ANYSWARM_MODEL_TOKE
|
|
|
38
36
|
|
|
39
37
|
### Add the standard Harness and run it
|
|
40
38
|
|
|
41
|
-
Copy the
|
|
39
|
+
Copy the TypeScript sources from the SDK you installed. The installed CLI runs them directly.
|
|
42
40
|
|
|
43
41
|
```bash
|
|
44
42
|
sdk=node_modules/@anyswarm/core
|
|
45
43
|
example="$sdk"/examples/first-harness
|
|
46
|
-
cp "$example"/{harness.ts,session.ts,handoff.ts,config.ts
|
|
44
|
+
cp "$example"/{harness.ts,session.ts,handoff.ts,config.ts} .
|
|
47
45
|
```
|
|
48
46
|
|
|
49
47
|
The module's default export is a `Harness` with `apiVersion: 1`, `id: 'first-harness'` and `run(context)`. The [current repository version](../../examples/first-harness/harness.ts) uses the new Service registration API and pairs with the archive built from that source.
|
|
50
48
|
|
|
51
49
|
The Harness owns two Profiles and the Handoff Service. The publisher reads the unique reference from its Sandbox and publishes it with a question. `runInput` waits for the exclusive publisher turn. The Harness checks the Service's authenticated publisher, then calls `context.askUser` with that Agent and the Run signal. The writer fetches the same reference with its own permission and uses your answer in `delivery.txt`. The Harness checks the bytes in the Sandbox, requests required export and checks the exported bytes again. The Session manages question identities, answer admission, observation and the final Run report.
|
|
52
50
|
|
|
53
|
-
`session.ts` handles terminal input and passes the reply to `respond`.
|
|
51
|
+
`session.ts` handles terminal input and passes the reply to `respond`. Run the TypeScript sources with the same definition in process, over RPC, or in one-shot foreground mode.
|
|
54
52
|
|
|
55
53
|
```bash
|
|
56
|
-
./node_modules/.bin/tsc
|
|
57
54
|
mkdir -p input
|
|
58
|
-
|
|
59
|
-
PATH="$PWD/node_modules/.bin:$PATH"
|
|
60
|
-
ANYSWARM_FIRST_CHANNEL=beta-east ./node_modules/.bin/
|
|
55
|
+
./node_modules/.bin/anys run ./session.ts ./input 'Prepare a release handoff.'
|
|
56
|
+
PATH="$PWD/node_modules/.bin:$PATH" ./node_modules/.bin/anys run ./session.ts --rpc ./input 'Prepare a release handoff.'
|
|
57
|
+
ANYSWARM_FIRST_CHANNEL=beta-east ./node_modules/.bin/anys run ./harness.ts --cwd ./input --prompt 'Prepare a release handoff.'
|
|
61
58
|
```
|
|
62
59
|
|
|
63
60
|
Use a separate input directory so capture excludes the example's dependencies and Run output. Both clients prompt for a channel such as `beta-east`. The one-shot foreground takes its channel from `ANYSWARM_FIRST_CHANNEL` and prints a final JSON record. JSONL clients may run explicit foreground with `--interaction questions` and answer by `questionId`. A successful run has `outcome: "completed"`, `acceptance.status: "verified"`, `export.status: "complete"` and `cleanup.status: "complete"`. Read the file named by the acceptance receipt, check its `channel=` line and compare its SHA‑256. Use the same Run's `reportPath` for the complete Host report.
|
|
@@ -113,7 +113,7 @@ From a built checkout, prepare OpenSandbox, a compatible Pi Worker image, a Gite
|
|
|
113
113
|
|
|
114
114
|
```bash
|
|
115
115
|
# Set run ID, immutable worker image, OpenSandbox URL, Gitea admin credentials, and model URL
|
|
116
|
-
|
|
116
|
+
anys run ./benchmarks/lead-worker-orders/main.ts ./benchmarks/lead-worker-orders/config.ts
|
|
117
117
|
```
|
|
118
118
|
|
|
119
119
|
On close, the host fences new Board writes and calls `runtime.close()`. It closes the Board connection and revokes owned Gitea credentials only after Core confirms stopped execution and complete cleanup. Unknown execution, required export failures or Board evidence failures leave dependencies pending for reconciliation. The shared repository, Board database, commits and PRs remain for review. Inspect `harness-report.json` for business failure, delivered and unfinished work, uncertain inputs, cleanup and report-save outcomes.
|
|
@@ -113,7 +113,7 @@ export ANYSWARM_PEERMESH_MODEL_URL='https://your-model-endpoint/v1/responses'
|
|
|
113
113
|
export ANYSWARM_PEERMESH_PEERS=4
|
|
114
114
|
# Plus Gitea, Mattermost, and Board MySQL DSN host variables
|
|
115
115
|
|
|
116
|
-
|
|
116
|
+
anys run ./scripts/run-harness.ts --config ./examples/peermesh/config.ts
|
|
117
117
|
```
|
|
118
118
|
|
|
119
119
|
Once `ready` is emitted, send JSON-line commands over `stdin` to observe or steer peers, or let the team run to its configured `durationMs`:
|
|
@@ -128,7 +128,7 @@ Inspect saved reports, merge receipts, and archive digests afterward:
|
|
|
128
128
|
|
|
129
129
|
```bash
|
|
130
130
|
runtime_id=RUNTIME_ID_FROM_RESULT
|
|
131
|
-
|
|
131
|
+
anys run ./scripts/read-harness-result.ts \
|
|
132
132
|
--run-directory "./peermesh-runs/$runtime_id" \
|
|
133
133
|
--runtime-id "$runtime_id"
|
|
134
134
|
```
|
|
@@ -162,10 +162,10 @@ export ANYSWARM_MODEL_TOKEN='your-bearer-token'
|
|
|
162
162
|
# Optional: override the default prebuilt Worker image
|
|
163
163
|
# export ANYSWARM_WORKER_IMAGE='your-registry.example/compatible-worker:tag'
|
|
164
164
|
|
|
165
|
-
|
|
165
|
+
anys run ./examples/subagents/main.ts ./examples/subagents/config.ts \
|
|
166
166
|
'Split this task into two independent checks and summarize the results.'
|
|
167
167
|
|
|
168
|
-
|
|
168
|
+
anys run ./examples/subagents/main.ts ./examples/subagents/config.ts --interactive
|
|
169
169
|
```
|
|
170
170
|
|
|
171
171
|
Or embed `createSubagentsHarness` in Node.js:
|
|
@@ -96,11 +96,11 @@ export ANYSWARM_SUBSTRATE_RUN=research-01
|
|
|
96
96
|
export ANYSWARM_SUBSTRATE_MODEL_URL='https://your-model-endpoint/v1/responses'
|
|
97
97
|
export ANYSWARM_SUBSTRATE_MODEL_TOKEN='your-bearer-token'
|
|
98
98
|
|
|
99
|
-
|
|
99
|
+
anys run ./examples/substrate/main.ts ./examples/substrate/config.ts > substrate-result.json
|
|
100
100
|
|
|
101
101
|
# Read saved receipts without loading model configuration:
|
|
102
102
|
runtime_id=RUNTIME_ID_FROM_RESULT
|
|
103
|
-
|
|
103
|
+
anys run ./examples/substrate/main.ts --result "./substrate-runs/$runtime_id" --runtime-id "$runtime_id"
|
|
104
104
|
```
|
|
105
105
|
|
|
106
106
|
[collaboration-evidence.ts](https://github.com/AnySwarm/anyswarm/blob/main/examples/substrate/harness/collaboration-evidence.ts) audits `substrate_contents`, `substrate_references`, and `substrate_reads` to inspect a cross-peer reuse chain:
|
|
@@ -127,8 +127,8 @@ export ANYSWARM_FATE_BENCHMARK=FATE-X
|
|
|
127
127
|
export ANYSWARM_FATE_PROJECT=/path/to/fate-x
|
|
128
128
|
export ANYSWARM_FATE_LEAN=/path/to/lean-4.28.0
|
|
129
129
|
|
|
130
|
-
|
|
131
|
-
|
|
130
|
+
anys run ./benchmarks/fate/main.ts --fate-prepare "$ANYSWARM_FATE_PROJECT" "$ANYSWARM_FATE_LEAN" FATE-X
|
|
131
|
+
anys run ./benchmarks/fate/main.ts --fate-run ./benchmarks/fate/fate-config.ts
|
|
132
132
|
```
|
|
133
133
|
|
|
134
134
|
## Source files
|
|
@@ -84,7 +84,7 @@ For custom store compositions via the repository's foreground runner, provide an
|
|
|
84
84
|
After building the repository and creating that host module:
|
|
85
85
|
|
|
86
86
|
```bash
|
|
87
|
-
|
|
87
|
+
anys run ./scripts/run-harness.ts --config ./my-taskpool-config.ts
|
|
88
88
|
```
|
|
89
89
|
|
|
90
90
|
The host accepts JSON-line `status`, Task-directed `input`, and `stop` commands. Task-directed input is resolved against the current Execution owner. It is not an arbitrary direct message to an Agent. The final record contains the Runtime identity and report path; the [foreground protocol](../../architecture/17-harness-reporting.md#foreground-harness-control) defines its commands and result codes.
|
|
@@ -92,7 +92,7 @@ The host accepts JSON-line `status`, Task-directed `input`, and `stop` commands.
|
|
|
92
92
|
Saved reports can be read without loading model configuration:
|
|
93
93
|
|
|
94
94
|
```bash
|
|
95
|
-
|
|
95
|
+
anys run ./scripts/read-harness-result.ts \
|
|
96
96
|
--run-directory ./runs/RUNTIME_ID_FROM_RESULT \
|
|
97
97
|
--runtime-id RUNTIME_ID_FROM_RESULT
|
|
98
98
|
```
|
package/docs/en/latest.md
CHANGED
|
@@ -1,140 +1,29 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: Releases
|
|
3
|
-
description: Install the current
|
|
2
|
+
title: Releases
|
|
3
|
+
description: Install the current AnySwarm SDK and CLI and find release notes.
|
|
4
4
|
section: RELEASES
|
|
5
5
|
order: 15
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
##
|
|
8
|
+
## v0.5.0
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
v0.5.0 is the first supported release of `@anyswarm/core`. It introduces the current Service registration and Profile APIs. See the [v0.5.0 changelog](changelog.md#v050) for the changes.
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
## v0.4.1
|
|
15
|
-
|
|
16
|
-
AnySwarm v0.4.1 is available on GitHub and npm. It adds managed CLI updates, local Worker builds from supported Pi or Codex installations, and richer Run diagnostics.
|
|
17
|
-
|
|
18
|
-
| Distribution | Links |
|
|
19
|
-
| --- | --- |
|
|
20
|
-
| CLI | [GitHub Release](https://github.com/AnySwarm/anyswarm/releases/tag/v0.4.1) · [SHA256SUMS](https://github.com/AnySwarm/anyswarm/releases/download/v0.4.1/SHA256SUMS) · [Quickstart](quickstart.md) |
|
|
21
|
-
| TypeScript SDK | [@anyswarm/anyswarm on npm](https://www.npmjs.com/package/@anyswarm/anyswarm/v/0.4.1) · [First SDK Harness](first-harness.md) |
|
|
22
|
-
| Changes | [Changelog](changelog.md#v041) |
|
|
23
|
-
|
|
24
|
-
To install this SDK version in a project, run:
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
npm install @anyswarm/anyswarm@0.4.1
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
When moving an existing project from v0.4.0, update its imports from `@luna-shi/anyswarm` to `@anyswarm/anyswarm`, run `npm uninstall @luna-shi/anyswarm` in that project, and commit the updated dependency lock. Update the global CLI separately.
|
|
31
|
-
|
|
32
|
-
## Upgrade from v0.4.0 to the managed installer
|
|
33
|
-
|
|
34
|
-
To migrate a v0.4.0 CLI, run the [official installer](quickstart.md#1-install-anyswarm) once. If npm installed your current CLI in a custom writable prefix, set `npm_config_prefix` for the installer to use that directory. The installer reports the active CLI path. Later CLI upgrades use `anyswarm update`.
|
|
35
|
-
|
|
36
|
-
The managed release ignores saved v0.4.0 OpenSandbox connection files. Bring forward any custom endpoint explicitly during setup. To prepare a managed service on the previous port, with Pi selected for example, run:
|
|
12
|
+
Install the CLI globally with npm and check the installed version.
|
|
37
13
|
|
|
38
14
|
```sh
|
|
39
|
-
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
Replace the sample address with your own. If the old container still owns that port and the new CLI cannot verify ownership, finish its Runs with the old version and retire the container before preparing a managed service there. To keep an already-running service, use [existing-service mode](quickstart.md#connect-to-an-existing-opensandbox) with its endpoint and credentials. Pass your old callback URL with `--public-url` if you set a custom one.
|
|
43
|
-
|
|
44
|
-
## Features available in v0.4.0
|
|
45
|
-
|
|
46
|
-
### 1. OpenSandbox SDK 1.2.1, unified callbacks, and Kubernetes support
|
|
47
|
-
|
|
48
|
-
- **Official SDK integration**: Both local and remote connections now run through OpenSandbox SDK 1.2.1. `anyswarm setup` persists your endpoint, credentials, and callback URL in owner-only user config shared across `setup`, `doctor`, and built-in Harnesses.
|
|
49
|
-
- **Single callback URL (`connection.publicUrl`)**: Each Runtime serves both Service Bridge (`/bridge`) and Model Gateway (`/model/<alias>`) from one callback origin, preserving reverse-proxy path prefixes and replacing the old dual-URL `{port}` templates.
|
|
50
|
-
- **Custom providers & Kubernetes guide**: Plug in any external sandbox backend via `createSandbox({ provider })`, use the pinned [OpenSandbox Kubernetes deployment guide](../../deploy/opensandbox-kubernetes/README.md), and enable packet-level allowlists with `egressMode: 'dns+nft'`.
|
|
51
|
-
|
|
52
|
-
### 2. Unified `Harness` contract & `HarnessSession`
|
|
53
|
-
|
|
54
|
-
- **Write once, run three ways**: The root `@luna-shi/anyswarm` entry exports the standard `Harness` and `HarnessContext` contract. The same module runs in-process via `createHarnessSession()`, in the foreground CLI (`anyswarm --harness`), and over JSONL RPC via `HarnessRpcClient`.
|
|
55
|
-
- **Interactive turns & user questions**: Keep runs interactive with `--lifetime interactive`, request terminal or client input with `--interaction questions` and `context.askUser()`, and inspect or control individual Agents while a run is active.
|
|
56
|
-
- **Standalone examples & new walkthrough**: The five collaboration examples can each be installed and built outside the repository against a matching SDK archive. Follow [Build Your First SDK Harness](first-harness.md) for a step-by-step two-Agent handoff tutorial.
|
|
57
|
-
|
|
58
|
-
### 3. Per-Agent session controls & compaction hooks
|
|
59
|
-
|
|
60
|
-
- **`runtime.session` API**: Native Pi workers now expose `configure`, `compact`, `abortRetry`, `clearQueue`, `getState`, `getStats`, and `getMessages` for each Agent.
|
|
61
|
-
- **Structured context injection**: Send structured context payloads via `runtime.send()` with explicit `delivery` timing (`'append'`, `'nextTurn'`, `'steer'`, or `'followUp'`).
|
|
62
|
-
- **Compaction guard (`hooks.beforeCompact`)**: Register a host policy in `createRuntime()` to cap automatic compactions and cleanly stop, archive, and export an Agent before an unwanted compaction cycle (see [Agent session settings and context](agents.md#6-session-controls-and-structured-context)).
|
|
63
|
-
|
|
64
|
-
### 4. Opt-in durable recovery & `anyswarm recover`
|
|
65
|
-
|
|
66
|
-
- **Recover interrupted runs**: Enable `persistence` in `createRuntime()` to store durable allocation ownership on the host, then resume an interrupted run on the same Linux host (within the same OS boot) via `recoverRuntime()` and reattach dynamic Services through `restoreService`.
|
|
67
|
-
- **Cleanup-only recovery CLI**: Run `anyswarm recover --run-dir <dir> --config <module>` to reclaim cleanup authority, run `close()`, and confirm full archival and sandbox deletion (exits `0` only when cleanup is complete).
|
|
68
|
-
- **Cursor-based event streaming & probes**: Workers stream events over bounded cursor long polling, and `runtime.probeWorkerEvent()` measures end-to-end authenticated event latency without calling a model (see [Durable recovery and Kubernetes](runtime.md#6-durable-recovery-and-kubernetes)).
|
|
69
|
-
|
|
70
|
-
### 5. Expanded executors, model protocols, and large-directory transfers
|
|
71
|
-
|
|
72
|
-
- **Pluggable executors & Chat Completions**: Select verified Pi versions or image-installed custom executor adapters; Pi now supports streaming **Chat Completions** alongside Responses, and the host accepts custom trusted model transports.
|
|
73
|
-
- **Local Worker setup**. `anyswarm setup` reuses a compatible local Worker or builds a missing or incompatible built-in Worker from the installed package. The [Quickstart](quickstart.md) includes the verified README run and Trace Viewer steps.
|
|
74
|
-
- **Disk-backed transfers & smoother CLI UX**: Separate import, live-sync, and export file budgets with disk-backed chunked transfers handle larger project folders. The installer now falls back to `$HOME/.local` automatically, `anyswarm --version` reports the installed build, and `swarm service invoke ... --help` prints required fields and derived examples.
|
|
75
|
-
|
|
76
|
-
## Install or upgrade
|
|
77
|
-
|
|
78
|
-
To pin the historical v0.4.0 release, verify its archive in a fresh download directory and install it for the current user.
|
|
79
|
-
|
|
80
|
-
```bash
|
|
81
|
-
mkdir -p anyswarm-v0.4.0 && cd anyswarm-v0.4.0
|
|
82
|
-
curl -fLO https://github.com/AnySwarm/anyswarm/releases/download/v0.4.0/luna-shi-anyswarm-0.4.0.tgz
|
|
83
|
-
curl -fLO https://github.com/AnySwarm/anyswarm/releases/download/v0.4.0/SHA256SUMS
|
|
84
|
-
sha256sum -c --ignore-missing SHA256SUMS
|
|
85
|
-
npm install -g --prefix "$HOME/.local" --ignore-scripts "./luna-shi-anyswarm-0.4.0.tgz"
|
|
86
|
-
export PATH="$HOME/.local/bin:$PATH"
|
|
15
|
+
npm install -g @anyswarm/core@0.5.0
|
|
87
16
|
anyswarm --version
|
|
88
17
|
```
|
|
89
18
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
## Migrate from v0.3.0
|
|
93
|
-
|
|
94
|
-
1. Finish or recover active Runs with the original Controller and Worker. Confirm Sandbox deletion or record retained ownership before replacing either component. Use `anyswarm trace --root <old-runs-dir>` to read saved Run reports from the previous root.
|
|
95
|
-
2. Remove the old global package from the npm prefix that installed it before installing AnySwarm in the same prefix. npm rejects the install while the previous package owns the shared `swarm` binary. For the user prefix:
|
|
96
|
-
|
|
97
|
-
```sh
|
|
98
|
-
npm uninstall --global --prefix "$HOME/.local" @luna-shi/murm
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
Install `@luna-shi/anyswarm`, replace the old dependency and SDK imports in each project, update the npm lockfile, and use `anyswarm` in host scripts. The guest command remains `swarm`.
|
|
102
|
-
3. Replace the `MURM_` environment prefix with `ANYSWARM_`. Rerun `anyswarm setup` to populate private configuration under `~/.config/anyswarm/`. If an old local service still occupies port 8080, retire it after confirming its Sandboxes are gone, or select a free port using `ANYSWARM_LIFECYCLE_URL`.
|
|
103
|
-
4. For v0.4.0 use `ghcr.io/luna-shi/anyswarm-worker:0.4.0` or its matching executor-specific tag. Rebuild custom Worker images and executor adapters with the matching AnySwarm protocol. Update custom transports and proxy header allowlists to the matching `x-anyswarm-*` headers. Upgrade separately deployed TaskPool Service hosts with the Controller. The renamed Catalog description changes its manifest hash, so a mixed-version Catalog fails the readiness check. See the [Worker protocol](../architecture/16-pi-opensandbox-backend.md) and [Bridge](../architecture/04-services.md) chapters.
|
|
19
|
+
The [Quickstart](quickstart.md#1-install-anyswarm) also shows how to install a managed CLI from the [v0.5.0 GitHub Release](https://github.com/AnySwarm/anyswarm/releases/tag/v0.5.0).
|
|
104
20
|
|
|
105
|
-
|
|
21
|
+
To add the SDK as a dependency, run this command in your project.
|
|
106
22
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
> Need to maintain an existing `v0.2.0` host? See the [v0.2.0 release](https://github.com/AnySwarm/anyswarm/releases/tag/v0.2.0) and the [v0.2.0 host setup guide](https://github.com/AnySwarm/anyswarm/blob/v0.2.0/docs/en/quickstart.md).
|
|
110
|
-
|
|
111
|
-
- **Removed built-in `local-docker` and shared host mounts**: The legacy Landlock ABI 5+ / rootful `sudo` `local-docker` backend, exact byte/inode tmpfs quotas, and live shared workspace mounts have been removed from the built-in provider. Use `runtime.files` or shared Services for file handoffs, and OpenSandbox `dns+nft` for IP/port egress allowlists.
|
|
112
|
-
- **Worker protocol upgraded to `murm-core-v2`**: Upgrade the host CLI/SDK and Worker image together (run `murm setup` to refresh local images); older worker images fail fast on handshake with a protocol mismatch error.
|
|
113
|
-
- **Connection config migration**: Prefer `endpoint` over the deprecated `lifecycleBaseUrl` alias in `createSandbox()`, and migrate dual Bridge/Gateway callback URLs to a single `connection.publicUrl` (see [Sandbox migration table](sandbox.md#4-resources-and-migration-from-v020)).
|
|
114
|
-
- **Service CLI syntax & benchmark entrypoints**: Startup prompts now advertise `swarm service invoke <service> <operation>` (TaskPool retains its shorthand commands). Fixed Lead-Worker and FATE benchmark runners moved under `dist/benchmarks/`.
|
|
115
|
-
|
|
116
|
-
See the **[Changelog](changelog.md)** for full release history, or try the interactive **[Trace Viewer](trace-viewer.md)**.
|
|
117
|
-
|
|
118
|
-
## Install v0.2.0
|
|
119
|
-
|
|
120
|
-
Install the pinned v0.2.0 archive with npm. Its CLI predates `murm --version`, so use npm to verify what installed.
|
|
121
|
-
|
|
122
|
-
```bash
|
|
123
|
-
prefix="$HOME/.local"
|
|
124
|
-
npm install -g --prefix "$prefix" --ignore-scripts --allow-remote=root \
|
|
125
|
-
https://github.com/AnySwarm/anyswarm/releases/download/v0.2.0/luna-shi-murm-0.2.0.tgz
|
|
126
|
-
export PATH="$prefix/bin:$PATH"
|
|
127
|
-
MURM_ROOT="$(npm root -g --prefix "$prefix")/@luna-shi/murm"
|
|
128
|
-
printf '%s\n' "$MURM_ROOT"
|
|
129
|
-
npm ls -g --prefix "$prefix" @luna-shi/murm --depth=0
|
|
23
|
+
```sh
|
|
24
|
+
npm install @anyswarm/core@0.5.0
|
|
130
25
|
```
|
|
131
26
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
A clean Debian 13.8 installation reproduced Agent startup failure after both sudo checks in the v0.2.0 guide passed. This release still requires an administrator-managed strict-local host setup. For a first local Run, use the [Quickstart](quickstart.md), which uses OpenSandbox APIs for Agent startup and cleanup.
|
|
135
|
-
|
|
136
|
-
For a project SDK dependency, use the same pinned archive URL without `-g` and `--prefix`. npm 12+ requires `--allow-remote=root` when a lockfile contains the GitHub Release tarball URL.
|
|
137
|
-
|
|
138
|
-
## Host requirements
|
|
27
|
+
See [Install the SDK](reference/api.md#install-the-sdk) for SDK imports and the project-local CLI.
|
|
139
28
|
|
|
140
|
-
|
|
29
|
+
Earlier releases used different npm package names. Their source and release artifacts are in the [GitHub release history](https://github.com/AnySwarm/anyswarm/releases).
|
package/docs/en/overview.md
CHANGED
|
@@ -30,6 +30,6 @@ The guide walks through the **six building blocks** from the homepage one by one
|
|
|
30
30
|
- [Build Your First SDK Harness](first-harness.md) — build a two-Agent interactive handoff app using the standard `Harness` contract.
|
|
31
31
|
- [Build a Swarm Harness](build-your-harness.md) — build a parallel multi-agent Research Swarm step by step.
|
|
32
32
|
4. **Built-in Harnesses**: [Choose a Harness](harnesses/index.md) — run or adapt `Subagents`, `TaskPool`, `PeerMesh`, `Substrate`, and `Lead-Worker`.
|
|
33
|
-
5. **Reference & Releases**: [SDK & API Reference](reference/api.md) · [CLI Reference](reference/cli.md) · [Types & Source Map](reference/types.md) · [Releases
|
|
33
|
+
5. **Reference & Releases**: [SDK & API Reference](reference/api.md) · [CLI Reference](reference/cli.md) · [Types & Source Map](reference/types.md) · [Releases](latest.md) · [Changelog](changelog.md).
|
|
34
34
|
|
|
35
35
|
> Looking for internal implementation details or maintainer specs? See the repository's [Architecture Manual](https://github.com/AnySwarm/anyswarm/blob/main/docs/architecture/INDEX.md).
|
package/docs/en/quickstart.md
CHANGED
|
@@ -9,7 +9,7 @@ To build an application with the TypeScript SDK, follow [Build your first SDK Ha
|
|
|
9
9
|
|
|
10
10
|
AnySwarm ships its CLI and TypeScript SDK in one package and runs Agents inside [OpenSandbox](sandbox.md) containers. You can run OpenSandbox locally with Docker Engine or connect to an existing OpenSandbox service.
|
|
11
11
|
|
|
12
|
-
This guide covers
|
|
12
|
+
This guide covers [v0.5.0](latest.md#v050), the first supported release of `@anyswarm/core`.
|
|
13
13
|
|
|
14
14
|
## Prerequisites
|
|
15
15
|
|
|
@@ -33,37 +33,54 @@ For an existing OpenSandbox service, install only `git curl ca-certificates` and
|
|
|
33
33
|
|
|
34
34
|
If the Docker socket denies access, an administrator can run `sudo usermod -aG docker alice`, replacing `alice` with the account that runs AnySwarm. Sign in again as that account and run `id` and `docker info`. The [`docker` group grants root-equivalent access](https://docs.docker.com/engine/install/linux-postinstall/).
|
|
35
35
|
|
|
36
|
+
### Docker on macOS
|
|
37
|
+
|
|
38
|
+
**Before running local setup:** install [Docker Desktop for Mac](https://docs.docker.com/desktop/setup/install/mac-install/), open Docker, and wait for the engine to start. If you already use another local Linux container engine such as [OrbStack](https://orbstack.dev/download), start it instead. The `docker` CLI alone (for example, `brew install docker`) is not enough. AnySwarm installs its npm dependencies, but neither the npm command nor `anyswarm setup` installs or starts Docker Desktop for you.
|
|
39
|
+
|
|
40
|
+
Check that the running engine is selected in the terminal where you will run AnySwarm:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
docker context ls
|
|
44
|
+
docker context show
|
|
45
|
+
docker info --format '{{.OSType}}/{{.Architecture}}'
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
If the wrong context is selected, run `docker context use <local-context>` and check whether `DOCKER_CONTEXT` or `DOCKER_HOST` overrides it. The expected daemon is Linux ARM64 on Apple Silicon, or Linux x86-64 on Intel; setup does not use emulation. If a separately installed Docker client reports `docker-credential-desktop` not found, put Docker Desktop's CLI tools on PATH in its settings, or add `/Applications/Docker.app/Contents/Resources/bin` to PATH. Use Node.js 24 LTS for TypeScript author commands; Node.js 26 removed the transform mode they currently use.
|
|
49
|
+
|
|
50
|
+
The published v0.5.0 local setup still requires a Linux Controller. To try native macOS setup, build and install the current source candidate below and select a supported backend. The controlled-model macOS checks for [#339](https://github.com/AnySwarm/anyswarm/issues/339) use Apple Silicon and Docker Desktop, with npm Pi 1.3.0 and 1.7.0 and standalone Codex 0.173.0. Intel and other container engines need separate verification.
|
|
51
|
+
|
|
36
52
|
## 1. Install AnySwarm
|
|
37
53
|
|
|
38
54
|
### Install a published release
|
|
39
55
|
|
|
56
|
+
Choose one way to install the AnySwarm CLI. Both require Node.js 22.19+ and npm. The npm command is the same on macOS and Linux; npm installs the package dependencies, and a running Docker engine is not required for this step.
|
|
57
|
+
|
|
40
58
|
```bash
|
|
41
|
-
|
|
59
|
+
npm install -g @anyswarm/core
|
|
60
|
+
anyswarm --version
|
|
42
61
|
```
|
|
43
62
|
|
|
44
|
-
|
|
63
|
+
The `-g` flag installs the command into npm's global bin directory. If your shell cannot find it, check that `$(npm prefix -g)/bin` is on your PATH and that your shell is using the Node.js installation you used to install the CLI.
|
|
45
64
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
Run this command in your Node.js project directory.
|
|
65
|
+
You can also install a managed copy of the CLI from GitHub Releases.
|
|
49
66
|
|
|
50
67
|
```bash
|
|
51
|
-
|
|
68
|
+
curl -fsSL https://anyswarm.github.io/anyswarm/install.sh | sh
|
|
52
69
|
```
|
|
53
70
|
|
|
54
|
-
|
|
71
|
+
The script reports the version, CLI path, and verified archive source. Apply the printed PATH command if needed, then run `anyswarm --version`.
|
|
55
72
|
|
|
56
|
-
|
|
73
|
+
If you are writing a Harness in TypeScript, follow [Install the SDK](reference/api.md#install-the-sdk) to add it as a project dependency.
|
|
57
74
|
|
|
58
75
|
### Build and install from source (`main`)
|
|
59
76
|
|
|
60
|
-
Run these commands from the repository root. `npm
|
|
77
|
+
Run these commands from the repository root. `npm run pack:release` builds the distribution archive. The installer stages the CLI under `$HOME/.local`.
|
|
61
78
|
|
|
62
79
|
```bash
|
|
63
80
|
git clone https://github.com/AnySwarm/anyswarm.git && cd anyswarm
|
|
64
81
|
npm ci --no-audit --no-fund
|
|
65
82
|
pack_dir=$(mktemp -d)
|
|
66
|
-
npm pack --
|
|
83
|
+
npm run pack:release -- "$pack_dir"
|
|
67
84
|
npm_config_prefix="$HOME/.local" sh website/public/install.sh --archive "$pack_dir"/*.tgz
|
|
68
85
|
export PATH="$HOME/.local/bin:$PATH"
|
|
69
86
|
anyswarm --version
|
|
@@ -71,21 +88,28 @@ anyswarm --version
|
|
|
71
88
|
|
|
72
89
|
The candidate can share its package version with the release. Record the source commit and the tarball SHA-256 to identify it. Keep the candidate tarball if you want to install the same SDK in an [independent example project](../../examples/README.md).
|
|
73
90
|
|
|
74
|
-
### Update
|
|
91
|
+
### Update the CLI
|
|
75
92
|
|
|
76
|
-
|
|
93
|
+
- Global npm install. Run `npm install -g @anyswarm/core@latest` with the same Node.js installation and npm prefix.
|
|
94
|
+
- Shell installer. Run `anyswarm update` to check the GitHub Release checksum and validate the new CLI before switching. A failed update leaves the prior CLI available.
|
|
95
|
+
|
|
96
|
+
For the first upgrade from a managed v0.5.0 installation, rerun the current shell installer in the same prefix. This adds the `anys` alias. On macOS, it also uses the current activation lock.
|
|
97
|
+
|
|
98
|
+
To update a project's SDK, use its package manager in the project directory.
|
|
77
99
|
|
|
78
100
|
## 2. Prepare OpenSandbox and the Worker
|
|
79
101
|
|
|
80
|
-
|
|
102
|
+
Use the Pi or Codex installation you already have. On Linux, use a supported npm package layout. On macOS, setup also accepts the standalone Codex executable when the same release is available for Linux from npm. If you need Pi, install it with `npm install --global @earendil-works/pi-coding-agent`. Then select an installed backend.
|
|
81
103
|
|
|
82
104
|
```bash
|
|
83
|
-
npm install --global @earendil-works/pi-coding-agent@1.3.0
|
|
84
105
|
pi --version
|
|
85
106
|
anyswarm setup --backend pi
|
|
107
|
+
anyswarm doctor --smoke
|
|
86
108
|
```
|
|
87
109
|
|
|
88
|
-
|
|
110
|
+
Bare setup reuses the saved executable path. To choose a different installation, supply `--backend pi --backend-path /absolute/path/to/bin/pi` or the corresponding Codex options. To require an installed version, add `--backend-version 1.7.0` (substitute the version you intend to use). A saved version pin rejects an executable that later reports a different version. Repeat explicit backend selection without a pin to follow upgrades to that installation.
|
|
111
|
+
|
|
112
|
+
On macOS, setup prepares the same release's Linux package inside a native Docker container. It verifies the Worker version and runs the executor startup and controlled protocol smoke before saving the connection. Without a saved selection, an interactive terminal prompts when both backends are installed. Use `--backend` in automation when both are present.
|
|
89
113
|
|
|
90
114
|
For a new local configuration, setup defaults to `127.0.0.1:8080`, builds a Worker from the selected installation and SDK package, and pulls the pinned upstream OpenSandbox 1.2.1 components. It saves the managed connection after a controlled smoke verifies Worker, Bridge, Gateway, files, export and deletion. Expect `"ok": true` and `"infrastructure": "ready"`. Repeating setup restores a stopped managed service and reruns the smoke. Test with `ANYSWARM_CONFIG_DIR=/path/to/private-directory` and a free loopback port if needed.
|
|
91
115
|
|