@anyswarm/core 0.5.0 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +1 -1
- package/README.md +21 -13
- package/deploy/worker/Dockerfile +12 -4
- package/dist/deploy/worker/Dockerfile +12 -4
- package/dist/examples/README.md +35 -12
- package/dist/examples/authoring/README.md +24 -0
- package/dist/examples/authoring/business.d.ts +2 -0
- package/dist/examples/authoring/business.js +4 -0
- package/dist/examples/authoring/config.d.ts +5 -0
- package/dist/examples/authoring/config.js +2 -0
- package/dist/examples/authoring/eject.json +5 -0
- package/dist/examples/authoring/harness.d.ts +4 -0
- package/dist/examples/authoring/harness.js +19 -0
- package/dist/examples/autoresearch/README.md +40 -0
- package/dist/examples/autoresearch/REQUIREMENTS.zh.md +11 -0
- package/dist/examples/autoresearch/config.d.ts +51 -0
- package/dist/examples/autoresearch/config.js +57 -0
- package/dist/examples/autoresearch/demo.d.ts +11 -0
- package/dist/examples/autoresearch/demo.js +52 -0
- package/dist/examples/autoresearch/eject.json +17 -0
- package/dist/examples/autoresearch/frontiercs2-config.d.ts +2 -0
- package/dist/examples/autoresearch/frontiercs2-config.js +3 -0
- package/dist/examples/autoresearch/frontiercs2.d.ts +87 -0
- package/dist/examples/autoresearch/frontiercs2.js +211 -0
- package/dist/examples/autoresearch/prepare-demo.d.ts +1 -0
- package/dist/examples/autoresearch/prepare-demo.js +15 -0
- package/dist/examples/autoresearch/prepare.d.ts +95 -0
- package/dist/examples/autoresearch/prepare.js +257 -0
- package/dist/examples/autoresearch/process.d.ts +13 -0
- package/dist/examples/autoresearch/process.js +48 -0
- package/dist/examples/autoresearch/project.d.ts +21 -0
- package/dist/examples/autoresearch/project.js +392 -0
- package/dist/examples/autoresearch/research-service.d.ts +106 -0
- package/dist/examples/autoresearch/research-service.js +255 -0
- package/dist/examples/code/README.md +33 -0
- package/dist/examples/code/REQUIREMENTS.zh.md +11 -0
- package/dist/examples/code/candidate.d.ts +19 -0
- package/dist/examples/code/candidate.js +80 -0
- package/dist/examples/code/config.d.ts +32 -0
- package/dist/examples/code/config.js +18 -0
- package/dist/examples/code/eject.json +5 -0
- package/dist/examples/code/project.d.ts +3 -0
- package/dist/examples/code/project.js +605 -0
- package/dist/examples/code/prompts.d.ts +5 -0
- package/dist/examples/code/prompts.js +12 -0
- package/dist/examples/code/verification.d.ts +19 -0
- package/dist/examples/code/verification.js +268 -0
- package/dist/examples/code/worktree.d.ts +17 -0
- package/dist/examples/code/worktree.js +233 -0
- package/dist/examples/harness-session/README.md +3 -6
- package/dist/examples/lead-worker/harness/dynamic-scheduler.d.ts +2 -1
- package/dist/examples/lead-worker/harness/dynamic-scheduler.js +5 -2
- package/dist/examples/lead-worker/harness/index.d.ts +60 -0
- package/dist/examples/lead-worker/harness/index.js +77 -6
- package/dist/examples/lead-worker/project.js +2 -2
- package/dist/examples/lead-worker/services/board.d.ts +5 -0
- package/dist/examples/lead-worker/services/board.js +19 -1
- package/dist/examples/messages/README.md +5 -5
- package/dist/examples/messages/handoff.d.ts +2 -0
- package/dist/examples/messages/handoff.js +5 -1
- package/dist/examples/messages/project.js +52 -2
- package/dist/examples/notes/README.md +13 -18
- package/dist/examples/notes/project.js +67 -6
- package/dist/examples/peermesh/harness/router.js +3 -1
- package/dist/examples/peermesh/harness/team.d.ts +8 -0
- package/dist/examples/peermesh/harness/team.js +13 -0
- package/dist/examples/peermesh/project.js +22 -4
- package/dist/examples/services/agent-control/README.md +3 -3
- package/dist/examples/services/mathlib-search/Dockerfile +4 -2
- package/dist/examples/services/mathlib-search/README.md +1 -1
- package/dist/examples/services/mcp-managed/README.md +2 -2
- package/dist/examples/services/persistent-board/README.md +16 -3
- package/dist/examples/services/persistent-board/business.d.ts +7 -0
- package/dist/examples/services/persistent-board/business.js +7 -0
- package/dist/examples/services/persistent-board/index.js +10 -0
- package/dist/examples/services/persistent-board/live.d.ts +3 -0
- package/dist/examples/services/persistent-board/live.js +58 -0
- package/dist/examples/subagents/README.md +5 -5
- package/dist/examples/subagents/business.js +3 -1
- package/dist/examples/subagents/config.js +3 -3
- package/dist/examples/subagents/harness/controller.d.ts +15 -0
- package/dist/examples/subagents/harness/controller.js +181 -32
- package/dist/examples/subagents/project.d.ts +2 -0
- package/dist/examples/subagents/project.js +43 -34
- package/dist/examples/subagents/prompts/prompts.d.ts +1 -0
- package/dist/examples/subagents/prompts/prompts.js +3 -0
- package/dist/examples/subagents/services/collaboration-service.d.ts +3 -2
- package/dist/examples/subagents/services/collaboration-service.js +14 -2
- package/dist/examples/substrate/README.md +2 -2
- package/dist/examples/substrate/harness/index.d.ts +1 -1
- package/dist/examples/substrate/harness/index.js +77 -12
- package/dist/examples/substrate/project.js +4 -1
- package/dist/examples/super/README.md +52 -0
- package/dist/examples/super/actions.d.ts +95 -0
- package/dist/examples/super/actions.js +230 -0
- package/dist/examples/super/artifact.d.ts +4 -0
- package/dist/examples/super/artifact.js +51 -0
- package/dist/examples/super/config.d.ts +80 -0
- package/dist/examples/super/config.js +83 -0
- package/dist/examples/super/coordinator.d.ts +33 -0
- package/dist/examples/super/coordinator.js +151 -0
- package/dist/examples/super/daemon.d.ts +11 -0
- package/dist/examples/super/daemon.js +109 -0
- package/dist/examples/super/decisions.d.ts +8 -0
- package/dist/examples/super/decisions.js +52 -0
- package/dist/examples/super/eject.json +5 -0
- package/dist/examples/super/execution.d.ts +11 -0
- package/dist/examples/super/execution.js +136 -0
- package/dist/examples/super/github.d.ts +62 -0
- package/dist/examples/super/github.js +269 -0
- package/dist/examples/super/inbox.d.ts +162 -0
- package/dist/examples/super/inbox.js +284 -0
- package/dist/examples/super/location.d.ts +5 -0
- package/dist/examples/super/location.js +64 -0
- package/dist/examples/super/operator.d.ts +1 -0
- package/dist/examples/super/operator.js +31 -0
- package/dist/examples/super/outbox.d.ts +5 -0
- package/dist/examples/super/outbox.js +103 -0
- package/dist/examples/super/project.d.ts +4 -0
- package/dist/examples/super/project.js +251 -0
- package/dist/examples/super/prompts.d.ts +3 -0
- package/dist/examples/super/prompts.js +25 -0
- package/dist/examples/taskpool/deploy/service-hosts/Dockerfile +4 -2
- package/dist/examples/taskpool/harness/controller.d.ts +35 -6
- package/dist/examples/taskpool/harness/controller.js +73 -7
- package/dist/examples/taskpool/project.js +18 -2
- package/dist/scripts/anyswarm-arguments.d.ts +18 -6
- package/dist/scripts/anyswarm-arguments.js +88 -52
- package/dist/scripts/anyswarm-author.d.ts +5 -0
- package/dist/scripts/anyswarm-author.js +24 -0
- package/dist/scripts/anyswarm-eject.d.ts +11 -0
- package/dist/scripts/anyswarm-eject.js +164 -0
- package/dist/scripts/anyswarm-harnesses.d.ts +1 -0
- package/dist/scripts/anyswarm-harnesses.js +10 -0
- package/dist/scripts/anyswarm-installation.d.ts +7 -40
- package/dist/scripts/anyswarm-installation.js +17 -285
- package/dist/scripts/anyswarm-launch.d.ts +7 -0
- package/dist/scripts/anyswarm-launch.js +37 -0
- package/dist/scripts/anyswarm-progress.d.ts +6 -0
- package/dist/scripts/anyswarm-progress.js +102 -0
- package/dist/scripts/anyswarm-project.d.ts +3 -1
- package/dist/scripts/anyswarm-project.js +49 -35
- package/dist/scripts/anyswarm-source-runner.d.ts +1 -0
- package/dist/scripts/anyswarm-source-runner.js +200 -0
- package/dist/scripts/anyswarm.js +28 -3
- package/dist/scripts/build-provenance.json +1 -0
- package/dist/scripts/build.js +7 -1
- package/dist/scripts/generate-architecture-api.js +2 -0
- package/dist/scripts/generate-architecture-prompts.js +24 -2
- package/dist/scripts/local-environment.d.ts +13 -2
- package/dist/scripts/local-environment.js +111 -28
- package/dist/scripts/local-setup-smoke.js +3 -2
- package/dist/scripts/local-setup-worker.d.ts +1 -1
- package/dist/scripts/local-setup-worker.js +15 -6
- package/dist/scripts/local-setup.d.ts +5 -2
- package/dist/scripts/local-setup.js +167 -79
- package/dist/scripts/opensandbox-agent-worker.js +2 -2
- package/dist/scripts/pack-release.d.ts +1 -0
- package/dist/scripts/pack-release.js +66 -0
- package/dist/scripts/pi-session-bridge.js +11 -3
- package/dist/scripts/run-harness.js +3 -1
- package/dist/scripts/setup-bootstrap.js +43 -6
- package/dist/src/core/allocation-ledger.js +4 -3
- package/dist/src/core/host-identity.d.ts +2 -0
- package/dist/src/core/host-identity.js +11 -0
- package/dist/src/core/index.d.ts +4 -2
- package/dist/src/core/index.js +12 -4
- package/dist/src/core/mcp-service.js +2 -2
- package/dist/src/core/runtime-management.d.ts +6 -0
- package/dist/src/core/runtime-management.js +24 -0
- package/dist/src/core/sandbox/executor-driver.d.ts +4 -2
- package/dist/src/core/sandbox/executor-driver.js +12 -14
- package/dist/src/core/sandbox/local-executor.d.ts +13 -1
- package/dist/src/core/sandbox/local-executor.js +69 -19
- package/dist/src/core/sandbox/local-worker.js +32 -21
- package/dist/src/core/sandbox/opensandbox-backend.d.ts +2 -0
- package/dist/src/core/sandbox/opensandbox-backend.js +36 -11
- package/dist/src/core/sandbox/sandbox-connection.d.ts +2 -0
- package/dist/src/core/sandbox/sandbox-connection.js +14 -6
- package/dist/src/core/service-live-state.d.ts +14 -0
- package/dist/src/core/service-live-state.js +161 -0
- package/dist/src/core/service-observation-types.d.ts +21 -1
- package/dist/src/core/service-process.d.ts +1 -1
- package/dist/src/core/service-process.js +45 -4
- package/dist/src/core/service-types.d.ts +5 -1
- package/dist/src/core/services.d.ts +1 -1
- package/dist/src/core/services.js +8 -3
- package/dist/src/core/types.d.ts +3 -0
- package/dist/src/core/worker-image.js +3 -3
- package/dist/src/harness/harness-session-types.d.ts +10 -0
- package/dist/src/harness/harness-session.js +42 -5
- package/dist/src/harness/project-harness.d.ts +14 -1
- package/dist/src/harness/project-harness.js +38 -12
- package/dist/src/harness/project-input.js +81 -15
- package/dist/src/harness/project-rpc-client.d.ts +1 -0
- package/dist/src/harness/project-rpc-client.js +5 -0
- package/dist/src/harness/project-rpc.d.ts +8 -2
- package/dist/src/harness/project-rpc.js +31 -7
- package/dist/src/harness/project-runtime.js +6 -2
- package/dist/src/harness/typescript-loader.d.ts +2 -0
- package/dist/src/harness/typescript-loader.js +41 -0
- package/dist/src/trace-viewer/public/app.js +6 -5
- package/dist/src/trace-viewer/reader.mjs +42 -2
- package/docs/INDEX.md +5 -2
- package/docs/architecture/00-overview.md +1 -1
- package/docs/architecture/01-agent-core.md +1 -1
- package/docs/architecture/04-services.md +1 -1
- package/docs/architecture/06-observability-experiments.md +1 -1
- package/docs/architecture/07-run-configuration.md +38 -18
- package/docs/architecture/08-prompts.md +22 -0
- package/docs/architecture/10-service-api-reference.md +53 -18
- package/docs/architecture/11-storage-reference.md +18 -1
- package/docs/architecture/12-code-coverage.md +152 -89
- package/docs/architecture/15-core-runtime.md +8 -0
- package/docs/architecture/16-pi-opensandbox-backend.md +5 -5
- package/docs/architecture/17-harness-reporting.md +1 -1
- package/docs/architecture/19-substrate-harness.md +28 -1
- package/docs/architecture/20-lead-worker-harness.md +34 -1
- package/docs/architecture/22-website.md +5 -6
- package/docs/architecture/23-project-harness.md +152 -8
- package/docs/architecture/24-runtime-recovery.md +10 -3
- package/docs/architecture/26-code.md +54 -0
- package/docs/architecture/27-personal.md +58 -0
- package/docs/architecture/28-autoresearch.md +43 -0
- package/docs/architecture/INDEX.md +3 -0
- package/docs/architecture/prompts/08-lead-worker-harness.md +4 -2
- package/docs/architecture/prompts/08-subagents-harness.md +21 -0
- package/docs/architecture/prompts/21-personal.md +44 -0
- package/docs/architecture/prompts/22-autoresearch.md +63 -0
- package/docs/architecture/prompts/26-code.md +55 -0
- package/docs/architecture/prompts/source-manifest.json +152 -33
- package/docs/architecture/source-map.json +473 -25
- package/docs/designs/core-harness/01-core.md +2 -2
- package/docs/designs/core-harness/06-project-harness.md +13 -2
- package/docs/designs/core-harness/README.md +7 -2
- package/docs/en/agents.md +1 -1
- package/docs/en/build-your-harness.md +3 -5
- package/docs/en/changelog.md +20 -4
- package/docs/en/first-harness.md +9 -12
- package/docs/en/harnesses/lead-worker.md +1 -1
- package/docs/en/harnesses/peermesh.md +2 -2
- package/docs/en/harnesses/subagents.md +2 -2
- package/docs/en/harnesses/substrate.md +4 -4
- package/docs/en/harnesses/taskpool.md +2 -2
- package/docs/en/latest.md +14 -121
- package/docs/en/overview.md +1 -1
- package/docs/en/quickstart.md +42 -39
- package/docs/en/reference/api.md +14 -4
- package/docs/en/reference/cli.md +53 -47
- package/docs/en/runtime.md +2 -2
- package/docs/en/sandbox.md +3 -3
- package/docs/en/services.md +4 -0
- package/docs/operations/trace-viewer.md +1 -1
- package/docs/workflows/development.md +28 -21
- package/docs/workflows/release-and-docs-versioning.md +77 -0
- package/docs/workflows/release-cli-acceptance.md +85 -0
- package/docs/zh/agents.md +1 -1
- package/docs/zh/build-your-harness.md +3 -5
- package/docs/zh/changelog.md +20 -4
- package/docs/zh/first-harness.md +9 -12
- package/docs/zh/harnesses/lead-worker.md +1 -1
- package/docs/zh/harnesses/peermesh.md +2 -2
- package/docs/zh/harnesses/subagents.md +2 -2
- package/docs/zh/harnesses/substrate.md +4 -4
- package/docs/zh/harnesses/taskpool.md +2 -2
- package/docs/zh/latest.md +15 -122
- package/docs/zh/overview.md +1 -1
- package/docs/zh/quickstart.md +42 -39
- package/docs/zh/reference/api.md +14 -4
- package/docs/zh/reference/cli.md +24 -40
- package/docs/zh/runtime.md +2 -2
- package/docs/zh/sandbox.md +3 -3
- package/docs/zh/services.md +4 -0
- package/examples/README.md +35 -12
- package/examples/authoring/README.md +24 -0
- package/examples/authoring/business.ts +4 -0
- package/examples/authoring/config.ts +2 -0
- package/examples/authoring/eject.json +5 -0
- package/examples/authoring/harness.ts +21 -0
- package/examples/autoresearch/README.md +40 -0
- package/examples/autoresearch/REQUIREMENTS.zh.md +11 -0
- package/examples/autoresearch/config.ts +90 -0
- package/examples/autoresearch/demo.ts +55 -0
- package/examples/autoresearch/eject.json +17 -0
- package/examples/autoresearch/frontiercs2-config.ts +4 -0
- package/examples/autoresearch/frontiercs2.ts +237 -0
- package/examples/autoresearch/prepare-demo.ts +15 -0
- package/examples/autoresearch/prepare.ts +267 -0
- package/examples/autoresearch/process.ts +50 -0
- package/examples/autoresearch/project.ts +380 -0
- package/examples/autoresearch/research-service.ts +302 -0
- package/examples/code/README.md +33 -0
- package/examples/code/REQUIREMENTS.zh.md +11 -0
- package/examples/code/candidate.ts +89 -0
- package/examples/code/config.ts +19 -0
- package/examples/code/eject.json +5 -0
- package/examples/code/project.ts +581 -0
- package/examples/code/prompts.ts +16 -0
- package/examples/code/verification.ts +239 -0
- package/examples/code/worktree.ts +188 -0
- package/examples/harness-session/README.md +3 -6
- package/examples/lead-worker/harness/dynamic-scheduler.ts +6 -3
- package/examples/lead-worker/harness/index.ts +61 -6
- package/examples/lead-worker/project.ts +2 -2
- package/examples/lead-worker/services/board.ts +14 -1
- package/examples/messages/README.md +5 -5
- package/examples/messages/handoff.ts +6 -2
- package/examples/messages/project.ts +47 -2
- package/examples/notes/README.md +13 -18
- package/examples/notes/project.ts +57 -9
- package/examples/peermesh/harness/router.ts +2 -2
- package/examples/peermesh/harness/team.ts +11 -0
- package/examples/peermesh/project.ts +19 -4
- package/examples/services/agent-control/README.md +3 -3
- package/examples/services/mathlib-search/Dockerfile +4 -2
- package/examples/services/mathlib-search/README.md +1 -1
- package/examples/services/mcp-managed/README.md +2 -2
- package/examples/services/persistent-board/README.md +16 -3
- package/examples/services/persistent-board/business.ts +10 -0
- package/examples/services/persistent-board/index.ts +10 -0
- package/examples/services/persistent-board/live.ts +54 -0
- package/examples/subagents/README.md +5 -5
- package/examples/subagents/business.ts +3 -1
- package/examples/subagents/config.ts +4 -3
- package/examples/subagents/harness/controller.ts +161 -29
- package/examples/subagents/project.ts +47 -33
- package/examples/subagents/prompts/prompts.ts +4 -0
- package/examples/subagents/services/collaboration-service.ts +14 -2
- package/examples/substrate/README.md +2 -2
- package/examples/substrate/harness/index.ts +67 -11
- package/examples/substrate/project.ts +5 -1
- package/examples/super/README.md +52 -0
- package/examples/super/actions.ts +196 -0
- package/examples/super/artifact.ts +56 -0
- package/examples/super/config.ts +95 -0
- package/examples/super/coordinator.ts +158 -0
- package/examples/super/daemon.ts +84 -0
- package/examples/super/decisions.ts +46 -0
- package/examples/super/eject.json +5 -0
- package/examples/super/execution.ts +131 -0
- package/examples/super/github.ts +242 -0
- package/examples/super/inbox.ts +306 -0
- package/examples/super/location.ts +54 -0
- package/examples/super/operator.ts +28 -0
- package/examples/super/outbox.ts +97 -0
- package/examples/super/project.ts +225 -0
- package/examples/super/prompts.ts +27 -0
- package/examples/taskpool/deploy/service-hosts/Dockerfile +4 -2
- package/examples/taskpool/harness/controller.ts +59 -7
- package/examples/taskpool/project.ts +18 -2
- package/npm-shrinkwrap.development.json +700 -0
- package/npm-shrinkwrap.json +95 -1969
- package/package.development.json +88 -0
- package/package.json +11 -8
- package/scripts/anyswarm-arguments.ts +91 -54
- package/scripts/anyswarm-author.ts +25 -0
- package/scripts/anyswarm-eject.ts +145 -0
- package/scripts/anyswarm-harnesses.ts +10 -0
- package/scripts/anyswarm-installation.ts +18 -288
- package/scripts/anyswarm-launch.ts +36 -0
- package/scripts/anyswarm-progress.ts +95 -0
- package/scripts/anyswarm-project.ts +35 -34
- package/scripts/anyswarm-source-runner.ts +176 -0
- package/scripts/anyswarm.ts +24 -3
- package/scripts/build.ts +8 -1
- package/scripts/generate-architecture-api.ts +2 -0
- package/scripts/generate-architecture-prompts.ts +35 -2
- package/scripts/local-environment.ts +117 -28
- package/scripts/local-setup-smoke.ts +3 -2
- package/scripts/local-setup-worker.ts +17 -7
- package/scripts/local-setup.ts +166 -73
- package/scripts/opensandbox-agent-worker.ts +2 -2
- package/scripts/pack-release.ts +70 -0
- package/scripts/pi-session-bridge.ts +10 -2
- package/scripts/run-harness.ts +3 -1
- package/scripts/setup-bootstrap.ts +41 -6
- package/src/core/allocation-ledger.ts +5 -3
- package/src/core/host-identity.ts +11 -0
- package/src/core/index.ts +12 -6
- package/src/core/mcp-service.ts +2 -2
- package/src/core/runtime-management.ts +22 -0
- package/src/core/sandbox/executor-driver.ts +15 -18
- package/src/core/sandbox/local-executor.ts +65 -19
- package/src/core/sandbox/local-worker.ts +29 -21
- package/src/core/sandbox/opensandbox-backend.ts +36 -11
- package/src/core/sandbox/sandbox-connection.ts +14 -5
- package/src/core/service-live-state.ts +156 -0
- package/src/core/service-observation-types.ts +23 -1
- package/src/core/service-process.ts +36 -3
- package/src/core/service-types.ts +3 -1
- package/src/core/services.ts +8 -3
- package/src/core/types.ts +3 -0
- package/src/core/worker-image.ts +3 -3
- package/src/harness/harness-session-types.ts +13 -1
- package/src/harness/harness-session.ts +40 -7
- package/src/harness/project-harness.ts +38 -12
- package/src/harness/project-input.ts +73 -15
- package/src/harness/project-rpc-client.ts +5 -0
- package/src/harness/project-rpc.ts +29 -8
- package/src/harness/project-runtime.ts +4 -2
- package/src/harness/typescript-loader.ts +37 -0
- package/src/trace-viewer/public/app.js +6 -5
- package/src/trace-viewer/reader.mjs +42 -2
package/docs/en/quickstart.md
CHANGED
|
@@ -1,108 +1,111 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Quickstart
|
|
3
|
-
description: Prepare Linux prerequisites, install AnySwarm, initialize OpenSandbox and the Worker image, and run a first Sandbox and file-reading check.
|
|
3
|
+
description: Prepare Linux or macOS prerequisites, install AnySwarm, initialize OpenSandbox and the Worker image, and run a first Sandbox and file-reading check.
|
|
4
4
|
section: GET STARTED
|
|
5
5
|
order: 1
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
To build an application with the TypeScript SDK, follow [Build your first SDK Harness](first-harness.md).
|
|
9
9
|
|
|
10
|
-
AnySwarm ships its CLI and TypeScript SDK in one package and runs Agents inside [OpenSandbox](sandbox.md) containers.
|
|
10
|
+
AnySwarm ships its CLI and TypeScript SDK in one package and runs Agents inside [OpenSandbox](sandbox.md) containers. This guide runs OpenSandbox and Workers on your machine using Docker.
|
|
11
11
|
|
|
12
|
-
This guide covers
|
|
12
|
+
This guide covers [AnySwarm v0.5.1](latest.md#v051).
|
|
13
13
|
|
|
14
14
|
## Prerequisites
|
|
15
15
|
|
|
16
16
|
| Dependency | Requirement | Verify |
|
|
17
17
|
| --- | --- | --- |
|
|
18
|
-
| **Linux** | Controller host (e.g., Ubuntu
|
|
18
|
+
| **Linux or macOS** | Controller host (e.g., Ubuntu, Debian, or macOS with Docker Desktop) | `uname -s` |
|
|
19
19
|
| **Node.js** | `>= 22.19` (install LTS from [nodejs.org](https://nodejs.org/en/download); Ubuntu 24.04 and Debian 13 repos ship older versions) | `node --version` |
|
|
20
20
|
| **npm** | Install with Node.js | `npm --version` |
|
|
21
21
|
| **Git** | Required for the source checkout and project capture | `git --version` |
|
|
22
|
-
| **
|
|
23
|
-
| **Docker Engine** | Required for local OpenSandbox only; skip when using an existing service ([install guide](https://docs.docker.com/engine/install/)) | `docker info` |
|
|
22
|
+
| **Docker Engine** | A running local Linux container engine ([install guide](https://docs.docker.com/engine/install/)) | `docker info` |
|
|
24
23
|
|
|
25
24
|
On Ubuntu or Debian with local Docker, install the system dependencies and start Docker:
|
|
26
25
|
|
|
27
26
|
```bash
|
|
28
|
-
sudo apt-get update && sudo apt-get install -y docker.io git
|
|
27
|
+
sudo apt-get update && sudo apt-get install -y docker.io git ca-certificates
|
|
29
28
|
sudo systemctl enable --now docker.service
|
|
30
29
|
```
|
|
31
30
|
|
|
32
|
-
For an existing OpenSandbox service, install only `git curl ca-certificates` and skip the Docker service and group steps.
|
|
33
|
-
|
|
34
31
|
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
32
|
|
|
36
|
-
|
|
33
|
+
### Docker on macOS
|
|
37
34
|
|
|
38
|
-
|
|
35
|
+
**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.
|
|
36
|
+
|
|
37
|
+
Check that the running engine is selected in the terminal where you will run AnySwarm:
|
|
39
38
|
|
|
40
39
|
```bash
|
|
41
|
-
|
|
40
|
+
docker context ls
|
|
41
|
+
docker context show
|
|
42
|
+
docker info --format '{{.OSType}}/{{.Architecture}}'
|
|
42
43
|
```
|
|
43
44
|
|
|
44
|
-
|
|
45
|
+
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.
|
|
45
46
|
|
|
46
|
-
|
|
47
|
+
The v0.5.1 release supports native macOS setup with 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.
|
|
48
|
+
|
|
49
|
+
## 1. Install AnySwarm
|
|
50
|
+
|
|
51
|
+
### Install a published release
|
|
47
52
|
|
|
48
|
-
|
|
53
|
+
Install the CLI with Node.js 22.19 or newer and npm. The command is the same on Linux and macOS. Docker is needed when you run setup.
|
|
49
54
|
|
|
50
55
|
```bash
|
|
51
|
-
npm install @anyswarm/
|
|
56
|
+
npm install -g @anyswarm/core
|
|
57
|
+
anyswarm --version
|
|
52
58
|
```
|
|
53
59
|
|
|
54
|
-
|
|
60
|
+
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.
|
|
55
61
|
|
|
56
|
-
|
|
62
|
+
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
63
|
|
|
58
64
|
### Build and install from source (`main`)
|
|
59
65
|
|
|
60
|
-
Run these commands from the repository root. `npm
|
|
66
|
+
Run these commands from the repository root. `npm run pack:release` builds the distribution archive. The last command installs the archive into the selected npm prefix.
|
|
61
67
|
|
|
62
68
|
```bash
|
|
63
69
|
git clone https://github.com/AnySwarm/anyswarm.git && cd anyswarm
|
|
64
70
|
npm ci --no-audit --no-fund
|
|
65
71
|
pack_dir=$(mktemp -d)
|
|
66
|
-
npm pack --
|
|
67
|
-
|
|
72
|
+
npm run pack:release -- "$pack_dir"
|
|
73
|
+
npm install -g --prefix "$HOME/.local" "$pack_dir"/*.tgz
|
|
68
74
|
export PATH="$HOME/.local/bin:$PATH"
|
|
69
75
|
anyswarm --version
|
|
70
76
|
```
|
|
71
77
|
|
|
72
78
|
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
79
|
|
|
74
|
-
### Update
|
|
80
|
+
### Update the CLI
|
|
81
|
+
|
|
82
|
+
Run `npm install -g @anyswarm/core@latest` to update or `npm uninstall -g @anyswarm/core` to uninstall. Use the same Node.js installation and npm prefix. If npm reports `EACCES`, switch to a user-owned Node installation or install to a writable prefix, for example `npm install -g --prefix "$HOME/.local" @anyswarm/core`. Add `$HOME/.local/bin` to PATH and reuse that prefix for updates and removal.
|
|
75
83
|
|
|
76
|
-
|
|
84
|
+
If you used the old shell installer for v0.5.0 or v0.5.1, check the `anyswarm`, `anys`, and `swarm` links in `$(npm prefix -g)/bin`. Clear only links that point into the old AnySwarm installation under `lib/anyswarm/current`, then install with npm. AnySwarm configuration lives outside the CLI installation.
|
|
85
|
+
|
|
86
|
+
To update a project's SDK, use its package manager in the project directory.
|
|
77
87
|
|
|
78
88
|
## 2. Prepare OpenSandbox and the Worker
|
|
79
89
|
|
|
80
|
-
|
|
90
|
+
Run setup on the machine where you want OpenSandbox and the Worker to run.
|
|
81
91
|
|
|
82
92
|
```bash
|
|
83
|
-
|
|
84
|
-
pi --version
|
|
85
|
-
anyswarm setup --backend pi
|
|
93
|
+
anyswarm setup
|
|
86
94
|
```
|
|
87
95
|
|
|
88
|
-
Setup
|
|
96
|
+
Setup detects the OS and Node version, checks the local Docker engine, and looks for your saved settings or an installed Pi or Codex backend. If a prerequisite is missing, follow the reported commands and rerun setup. Use `anyswarm doctor` for a read-only check of the same local prerequisites and Lifecycle connection.
|
|
89
97
|
|
|
90
|
-
|
|
98
|
+
If you need a backend, install Pi with `npm install -g @earendil-works/pi-coding-agent` or Codex with `npm install -g @openai/codex`. On macOS, setup also accepts standalone Codex when the same release is available for Linux from npm. Setup selects the only compatible backend when it finds one. When both are compatible, terminal setup can ask you to choose. In automation, use `anyswarm setup --backend pi` or `anyswarm setup --backend codex`.
|
|
91
99
|
|
|
92
|
-
|
|
100
|
+
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.
|
|
93
101
|
|
|
94
|
-
|
|
102
|
+
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.
|
|
95
103
|
|
|
96
|
-
|
|
97
|
-
export OPEN_SANDBOX_API_KEY='<operator-provided-key>'
|
|
98
|
-
anyswarm setup --mode existing --endpoint https://sandbox.example.net \
|
|
99
|
-
--public-url https://runtime.example.net/anyswarm
|
|
100
|
-
anyswarm doctor --smoke
|
|
101
|
-
```
|
|
104
|
+
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.
|
|
102
105
|
|
|
103
|
-
|
|
106
|
+
Setup builds AnySwarm Workers locally. A matching Docker image is reused by content identity. Base image, apt and npm dependencies can require Internet access. Model routes and credentials still come from your explicit AnySwarm environment or project configuration. The controlled setup smoke does not verify those model credentials. Use `anyswarm doctor --smoke` to repeat the controlled probe.
|
|
104
107
|
|
|
105
|
-
|
|
108
|
+
The local service runs on the same machine as the CLI. To use a service you operate, see [Connect an existing OpenSandbox service](sandbox.md).
|
|
106
109
|
|
|
107
110
|
### Diagnose image availability
|
|
108
111
|
|
package/docs/en/reference/api.md
CHANGED
|
@@ -5,11 +5,19 @@ section: REFERENCE
|
|
|
5
5
|
order: 15
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
This reference covers the public runtime exports, method contracts, and error recovery rules for **`@anyswarm/core
|
|
8
|
+
This reference covers the public runtime exports, method contracts, and error recovery rules for **`@anyswarm/core`**. For conceptual guides, start with [Runtime & Agents](../runtime.md) and [Services & Permissions](../services.md); for exact TypeScript declarations, see [Types & Source Map](./types.md); for host and container CLIs, see [CLI Reference](./cli.md).
|
|
9
9
|
|
|
10
10
|
## Install the SDK
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Run this command in your Node.js project to add the TypeScript SDK as a dependency. Use Node.js 22.19 or later.
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm install @anyswarm/core
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Import the SDK from `@anyswarm/core`. The same install exposes the project-local CLI through `npm exec -- anyswarm`. To run `anyswarm` directly from any directory, use a [global CLI install](../quickstart.md#1-install-anyswarm).
|
|
19
|
+
|
|
20
|
+
For a verified [source build](../quickstart.md#build-and-install-from-source-main), install its archive with the command below. The [release page](../latest.md#v051) shows how to pin the released SDK.
|
|
13
21
|
|
|
14
22
|
```bash
|
|
15
23
|
npm install --ignore-scripts /path/to/verified-anyswarm.tgz
|
|
@@ -26,9 +34,11 @@ All public values and TypeScript types are imported from the single root entry `
|
|
|
26
34
|
| `createSandbox(config)` | Function | Creates a reusable OpenSandbox connection handle or plugs in a custom `{ provider }` `SandboxProvider`. |
|
|
27
35
|
| `resolveSandboxConnection(overrides?)` | Function | Resolves Lifecycle URL, local token, and image defaults matching the CLI (use only in trusted host config). |
|
|
28
36
|
| `createRuntime(options)` | Async function | Opens a Run control plane (`outputDir/<runtimeId>/`, Service Bridge, Model Gateway) with configurable `executor`, `filePolicy`, and durable persistence options. |
|
|
37
|
+
| `resolveFilePolicy(policy?)` | Function | Validates and fills file budgets with the defaults used by Runtime and the project host. Harness authors can use the resolved limits for local candidate checks. |
|
|
29
38
|
| `recoverRuntime(options)` | Async function | Reopens a durable Run under verified same-host, same-boot ownership; supports cleanup-only mode and dynamic Service restoration. |
|
|
30
39
|
| `createHarnessSession(harness, options)` / `HarnessRpcClient` | Function / Class | Drives a standard `Harness` in-process or over a JSONL child-process pipe with live events, questions, and member controls. |
|
|
31
|
-
| `
|
|
40
|
+
| `runProjectRpc(session, input, write, launchDirectory, initialInput?, options?)` | Function | Serves HarnessSession JSONL over a host-owned stream. `detachOnDisconnect` keeps the Session running when that observer disconnects. |
|
|
41
|
+
| `createPiExecutor({ version })` / `createCodexExecutor({ version })` | Function | Pins an exact built-in executor version when supplied; `'pi'` / `'codex'` shorthands remain supported. |
|
|
32
42
|
| `createExecutorAdapter(declaration)` / `EXECUTOR_ADAPTER_PROTOCOL` | Function / Constant | Declares an image-installed external executor adapter (`anyswarm-executor-v1`). |
|
|
33
43
|
| `DEFAULT_WORKER_IMAGE` / `workerImageFor(selection)` | Constant / Function | Select local Worker preparation for the Runtime’s executor, or select a particular executor and optionally pin its version. |
|
|
34
44
|
| `getExecutorCapabilities(selection)` | Function | Static capability lookup for a configured executor (no network side effects). |
|
|
@@ -88,7 +98,7 @@ const runtime = await createRuntime({
|
|
|
88
98
|
|
|
89
99
|
- **`models`**: defaults to streaming Responses; Pi also supports `protocol: 'chat-completions'` and `capabilities: { contextWindow, maxOutputTokens, tools, reasoning }`; trusted host modules can supply a custom `ModelTransport`. Upstream credentials stay strictly on the host.
|
|
90
100
|
- **`filePolicy`**: independently configure `initial`, `snapshot`, `replace`, `export`, and `session` limits (`maxBytes`, `maxFileBytes`, `maxFiles`, `maxEntries`, `timeoutMs`) plus `controllerSpoolBytes` and `workerSpoolBytes`.
|
|
91
|
-
- **`getExecutorCapabilities(selection)`**: Pi
|
|
101
|
+
- **`getExecutorCapabilities(selection)`**: Pi supports `contextFork`, `activeSteer`, `followUp`, and `one-at-a-time`; Codex supports `activeSteer`, `followUp`, and `all` without context forking.
|
|
92
102
|
|
|
93
103
|
## Agent lifecycle
|
|
94
104
|
|
package/docs/en/reference/cli.md
CHANGED
|
@@ -5,56 +5,62 @@ section: REFERENCE
|
|
|
5
5
|
order: 16
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
The host command is `anyswarm`. Run it without arguments for Quickstart, or add
|
|
9
|
+
`--help` to a command for its options. The Worker image separately supplies
|
|
10
|
+
`swarm` for Agent calls to Services over the Bridge.
|
|
9
11
|
|
|
10
|
-
## Host
|
|
12
|
+
## Host commands
|
|
11
13
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
| Command | Purpose |
|
|
14
|
+
| Workflow | Commands |
|
|
15
15
|
| --- | --- |
|
|
16
|
-
|
|
|
17
|
-
| `anyswarm
|
|
18
|
-
|
|
|
19
|
-
|
|
|
20
|
-
|
|
|
21
|
-
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
16
|
+
| Prepare and verify local execution | `anyswarm setup`, `anyswarm doctor --smoke` |
|
|
17
|
+
| Upgrade the installed CLI | `anyswarm update` prints the npm command for the current global installation. Run the printed command from the same Node/npm environment. |
|
|
18
|
+
| Run an editable Harness | `anyswarm run ./project.ts --cwd ./input --config ./config.ts --prompt "Inspect the project"` |
|
|
19
|
+
| Run a built-in Harness or connect a client | `anyswarm --harness subagents --prompt "Read README.md" --output-dir ./runs`, or `anyswarm --harness subagents --mode rpc` |
|
|
20
|
+
| Export source and the exact SDK | `anyswarm eject example --dir ./my-harness` |
|
|
21
|
+
| Inspect records or recover pending cleanup | `anyswarm trace --root ./runs --port 8787 --open`, `anyswarm recover --run-dir <dir> --config <module>` |
|
|
22
|
+
|
|
23
|
+
`anyswarm --version` prints the installed package version. See [Quickstart](../quickstart.md) for local setup, explicit existing OpenSandbox connections and npm installation.
|
|
24
|
+
|
|
25
|
+
## Run a Harness
|
|
26
|
+
|
|
27
|
+
Pick a built-in name, an explicit TypeScript or ESM module, or an installed npm
|
|
28
|
+
package resolved from the invocation directory. Built-ins are `subagents`,
|
|
29
|
+
`autoresearch`, `taskpool`, `peermesh`, `substrate`, `lead-worker`, `notes` and
|
|
30
|
+
`messages`. The project defaults to the invocation directory. `--config`
|
|
31
|
+
selects a trusted module and `--output-dir` selects the Run records root.
|
|
32
|
+
Set `--cwd` to capture a different project.
|
|
33
|
+
|
|
34
|
+
A one-shot Run starts from the supplied prompt. `run` supplies a default prompt
|
|
35
|
+
when a source Harness is launched without one. On a terminal, stdout shows Run
|
|
36
|
+
and Agent milestones, visible Service changes, exported artifact paths, cleanup,
|
|
37
|
+
and the command to view Trace. Redirect stdout for a single JSON result or
|
|
38
|
+
launch error. Source and Harness diagnostics go to stderr. `run` also executes
|
|
39
|
+
ordinary trusted source scripts with their original arguments.
|
|
40
|
+
|
|
41
|
+
For multiple turns, start `--mode rpc`, wait for the JSONL `ready` frame, and
|
|
42
|
+
send a `run` request with `cwd` and `prompt`. Use `--lifetime interactive` if
|
|
43
|
+
the Harness supports it and `--interaction questions` if the client can answer.
|
|
44
|
+
The stream carries replies, events and the final result on stdout. Use
|
|
45
|
+
`describe` for available controls and `stop` to initiate cleanup. [HarnessSession example](../../../examples/harness-session/README.md)
|
|
46
|
+
|
|
47
|
+
After ejecting, run `npm install` inside the export and start the editable
|
|
48
|
+
entry with its local CLI, for example `npm run start -- --prompt "Inspect the project"`.
|
|
49
|
+
See [Code](../../../examples/code/README.md) and [Personal](../../../examples/super/README.md)
|
|
50
|
+
for advanced SDK examples.
|
|
51
|
+
|
|
52
|
+
### AutoResearch
|
|
53
|
+
|
|
54
|
+
AutoResearch is the non-interactive research showcase. It starts equal
|
|
55
|
+
peers in private Sandboxes, coordinates them through the research Service,
|
|
56
|
+
and records train, candidate and final evidence for [Trace Viewer](../trace-viewer.md).
|
|
57
|
+
|
|
58
|
+
```sh
|
|
59
|
+
anyswarm --harness autoresearch --config ./research.ts --prompt "Your objective" --output-dir ./runs
|
|
46
60
|
```
|
|
47
61
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
- **RPC protocol (`--mode rpc`)**: emits JSONL frames on `stdout` and diagnostics on `stderr`. Wait for `ready`, then send a `run` request containing `cwd` and `prompt`.
|
|
51
|
-
|
|
52
|
-
### Session options and controls
|
|
53
|
-
|
|
54
|
-
- **Lifetime (`--lifetime task|interactive`)**: defaults to single-task `task` mode. Harnesses that support ongoing sessions (such as Subagents) accept `interactive`, keeping the session alive until a configured deadline or explicit `stop`.
|
|
55
|
-
- **User questions (`--interaction none|questions`)**: defaults to `none`. Set `questions` when the client can answer authorized mid-Run questions from Agents.
|
|
56
|
-
- **Control channel**: foreground invocations with `--prompt` start immediately; when `interactive` or `questions` is enabled, subsequent commands flow over JSONL. `--mode rpc` waits for a `run` command before starting.
|
|
57
|
-
- **Supported operations**: `describe` (discover capabilities), `status` (read snapshot), `answer` (respond by `questionId`), and `stop` (close the Run); native member queries and controls include `agent.getState`, `agent.getStats`, `agent.getMessages`, plus `agent.configure`, `agent.compact`, `agent.abortRetry`, `agent.clearQueue`, `agent.send`, `agent.interrupt`, and `agent.stop` (each Harness and executor decides which operations are permitted). The final result records report-save status and cleanup facts separately.
|
|
62
|
+
Use [the AutoResearch guide](../../../examples/autoresearch/README.md) to prepare the
|
|
63
|
+
pinned FrontierCS-2 demo or export and edit the Harness.
|
|
58
64
|
|
|
59
65
|
## Unified environment variables
|
|
60
66
|
|
|
@@ -112,7 +118,7 @@ swarm agent stop <agent-id> --request-id stop-1
|
|
|
112
118
|
When working directly inside a built `anyswarm` source checkout, two additional developer scripts drive configured `taskpool` or `peermesh` fixtures over JSON-line `stdin` (`status`, `kickoff`, `input`, `wait`, `stop`) and inspect saved reports offline:
|
|
113
119
|
|
|
114
120
|
```bash
|
|
115
|
-
node dist/scripts/run-harness.js --config <host-config.
|
|
121
|
+
node dist/scripts/run-harness.js --config <host-config.ts>
|
|
116
122
|
node dist/scripts/read-harness-result.js --run-directory <dir> --runtime-id <id>
|
|
117
123
|
```
|
|
118
124
|
|
|
@@ -121,7 +127,7 @@ node dist/scripts/read-harness-result.js --run-directory <dir> --runtime-id <id>
|
|
|
121
127
|
## `anyswarm recover` (durable cleanup recovery)
|
|
122
128
|
|
|
123
129
|
```bash
|
|
124
|
-
anyswarm recover --run-dir /private/runs/original-runtime-id --config /private/recovery.
|
|
130
|
+
anyswarm recover --run-dir /private/runs/original-runtime-id --config /private/recovery.ts
|
|
125
131
|
```
|
|
126
132
|
|
|
127
133
|
The config module default-exports either the original Runtime options object or a zero-argument async factory returning it. This command performs cleanup-only recovery, calls `close()`, prints the receipt, and exits `0` only when cleanup completes. Recovery requires same-host, same-boot exclusive writer ownership and matching durable persistence settings; unresolved resources remain tracked in the ledger until reconciliation confirms stop and deletion. Retry failed required exports before the reported `expiresAt`. See [Runtime durable recovery](../runtime.md#6-durable-recovery-and-kubernetes).
|
package/docs/en/runtime.md
CHANGED
|
@@ -64,7 +64,7 @@ const runtime = await createRuntime({
|
|
|
64
64
|
|
|
65
65
|
`createRuntime()` sets up the run directory, Model Gateway, and Service Bridge, but starts **zero sandboxes** until your Harness explicitly calls `runtime.spawn()` (covered next in [Agents & Profiles](agents.md)).
|
|
66
66
|
|
|
67
|
-
> **Flexible executors & model protocols**: beyond the `'pi'`
|
|
67
|
+
> **Flexible executors & model protocols**: beyond the `'pi'` and `'codex'` shorthands, which use the installed version, use `createPiExecutor({ version: '1.4.0' })`, `createCodexExecutor(...)`, or `createExecutorAdapter(...)` for image-installed executors. Pi supports both **Responses** and **Chat Completions** (see [SDK & API Reference](reference/api.md)).
|
|
68
68
|
|
|
69
69
|
### Custom reasoning models
|
|
70
70
|
|
|
@@ -208,7 +208,7 @@ const runtime = await recoverRuntime({
|
|
|
208
208
|
- **Cleanup-only recovery (CLI)**: To reclaim cleanup authority and finish archiving/deleting sandboxes without resuming work, set `cleanupOnly: true` or run:
|
|
209
209
|
|
|
210
210
|
```bash
|
|
211
|
-
anyswarm recover --run-dir /private/runs/original-runtime-id --config /private/recovery.
|
|
211
|
+
anyswarm recover --run-dir /private/runs/original-runtime-id --config /private/recovery.ts
|
|
212
212
|
```
|
|
213
213
|
|
|
214
214
|
The config module's default export can be the original `options` object or a zero-argument async factory returning it. `anyswarm recover` runs cleanup-only recovery, calls `close()`, prints the receipt, and exits `0` only when cleanup is complete (otherwise `1`, keeping pending items recorded). When a required export fails, the sandbox is retained until `expiresAt` — fix the issue and retry before expiry (check for `retain-at-risk` if the backend could not confirm the requested retention window).
|
package/docs/en/sandbox.md
CHANGED
|
@@ -23,10 +23,10 @@ export OPEN_SANDBOX_API_KEY='<operator-provided-key>'
|
|
|
23
23
|
anyswarm setup --mode existing \
|
|
24
24
|
--endpoint https://sandbox.example.net \
|
|
25
25
|
--public-url https://runtime.example.net/anyswarm
|
|
26
|
-
anyswarm doctor --smoke
|
|
26
|
+
anyswarm doctor --mode existing --smoke
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
Existing mode verifies your management API key and saves the connection in owner-only user config without launching a container. Running `anyswarm doctor --smoke` then creates and deletes a temporary sandbox to verify host-to-worker access, Runtime callbacks, file export, and cleanup.
|
|
29
|
+
Existing mode verifies your management API key and saves the connection in owner-only user config without launching a container. Running `anyswarm doctor --mode existing --smoke` then creates and deletes a temporary sandbox to verify host-to-worker access, Runtime callbacks, file export, and cleanup.
|
|
30
30
|
|
|
31
31
|
In remote mode, the OpenSandbox operator supplies the Worker image, which you select with `ANYSWARM_WORKER_IMAGE`; your host machine running `anyswarm` only needs Node.js and network access. Protect credentials with TLS (HTTPS) or a trusted private network.
|
|
32
32
|
|
|
@@ -49,7 +49,7 @@ const remote = createSandbox({
|
|
|
49
49
|
|
|
50
50
|
Configuration precedence is: **explicit SDK/CLI options → environment variables → saved user config (owner-only permissions) → local defaults**. `createSandbox()` validates and snapshots settings without launching containers; allocation starts only when you call `runtime.spawn()`.
|
|
51
51
|
|
|
52
|
-
When sandboxes run on a remote host or behind a reverse proxy, pass `connection: { publicUrl: 'https://runtime.example.net/anyswarm' }` to `createRuntime()` to advertise a single reachable callback URL (reverse-proxy path prefixes are preserved; use `bindHost` and `bindPort` only when you need custom listener binding). `anyswarm doctor` reports the active callback origin, and `anyswarm doctor --smoke` points to the callback address, port, and proxy routes if sandboxes cannot call back. Configure OpenSandbox to publish reachable container endpoints and required headers.
|
|
52
|
+
When sandboxes run on a remote host or behind a reverse proxy, pass `connection: { publicUrl: 'https://runtime.example.net/anyswarm' }` to `createRuntime()` to advertise a single reachable callback URL (reverse-proxy path prefixes are preserved; use `bindHost` and `bindPort` only when you need custom listener binding). `anyswarm doctor --mode existing` reports the active callback origin, and `anyswarm doctor --mode existing --smoke` points to the callback address, port, and proxy routes if sandboxes cannot call back. Configure OpenSandbox to publish reachable container endpoints and required headers.
|
|
53
53
|
|
|
54
54
|
## 4. Resources and migration from v0.2.0
|
|
55
55
|
|
package/docs/en/services.md
CHANGED
|
@@ -88,6 +88,10 @@ Use `runtime.services.get/list` to inspect readiness, ownership and available ma
|
|
|
88
88
|
|
|
89
89
|
Close and retire fence new calls and drain in-flight work. The optional `exportState` hook supplies public observation JSON for [Trace Viewer](trace-viewer.md). Optional metadata can give a capture timestamp, business revision, field descriptions, summary values and table columns. The state export is separate from business durability. The Service owns its original database and successful commit. [Runtime recovery](runtime.md) explains the retained Run and storage requirements.
|
|
90
90
|
|
|
91
|
+
To display business state during a Run, implement `ServiceAdapter.readState({ signal })`. Its return value is `{ state, capturedAt, revision?, presentation? }`. Select public fields explicitly and use the signal for any I/O. Supply an ISO capture timestamp and use JSON Pointer paths for summary fields and table columns. SDK and RPC clients can use optional presentation hints to render the returned state.
|
|
92
|
+
|
|
93
|
+
The Runtime owner can call `runtime.services.listState()` and `runtime.services.readState(name)`. A HarnessSession client uses `session.services.list()` and `session.services.read(runtimeId, name)`. Reads are limited to one second and 64 KiB each. A read can return `unsupported`, `unavailable`, `timeout`, or `error`, with the previous capture time when available. The adapter hook is host-only. See the [Persistent Board example](../../examples/services/persistent-board/README.md#watch-a-live-board) for a package-root Service adapter and Harness.
|
|
94
|
+
|
|
91
95
|
## Migrate existing SDK code
|
|
92
96
|
|
|
93
97
|
Replace `registerService({ manifest, adapter })` with `register(name, definition)`. Integrations that still use a legacy hosted manifest can adapt it with `services.register(...serviceFromManifest({ manifest, adapter }))`. Move `Profile.session.tools` to `Profile.tools` and `Profile.prompt` to `Profile.addedSystemPrompt`. Read `.result` from a successful generic CLI reply and use stderr for local usage errors. Existing Trace files remain readable.
|
|
@@ -16,7 +16,7 @@ Open [the demo Run](http://127.0.0.1:8787/#run=release-notes). The synthetic Sub
|
|
|
16
16
|
The Trace Viewer is bundled directly inside `@anyswarm/core` (`src/trace-viewer/`) with zero extra dependencies:
|
|
17
17
|
|
|
18
18
|
```bash
|
|
19
|
-
|
|
19
|
+
npm install -g @anyswarm/core
|
|
20
20
|
anyswarm trace /path/to/private/runs --port 8787 --open
|
|
21
21
|
```
|
|
22
22
|
|
|
@@ -61,7 +61,7 @@ coverage.
|
|
|
61
61
|
| --- | --- |
|
|
62
62
|
| README, internal Markdown or architecture inventory | Generated references and repository links |
|
|
63
63
|
| Website, bilingual guides or documentation images | Generated references, repository links and website build |
|
|
64
|
-
|
|
|
64
|
+
| Homepage npm install command or either Quickstart | Website build, focused npm command checks and documentation checks |
|
|
65
65
|
| Core, tests, workflow or other inputs | Typecheck, full tests, generated references, repository links and website build |
|
|
66
66
|
|
|
67
67
|
The full suite runs on three parallel Core runners, including the Viewer reader
|
|
@@ -80,7 +80,7 @@ cache and install the packed Core in a temporary consumer before running tests.
|
|
|
80
80
|
export npm_config_cache="$package_dir/npm-cache"
|
|
81
81
|
npm ci --no-audit --no-fund
|
|
82
82
|
npm run typecheck
|
|
83
|
-
npm pack --
|
|
83
|
+
npm run pack:release -- "$package_dir"
|
|
84
84
|
npm install --prefix "$package_dir/consumer" --prefer-offline --omit=dev --ignore-scripts --no-audit --no-fund "$package_dir"/*.tgz
|
|
85
85
|
tar -xzf "$package_dir"/*.tgz -C "$package_dir" package/examples/harness-session/package.json
|
|
86
86
|
npm install --prefix "$package_dir/package/examples/harness-session" --prefer-offline --no-save --ignore-scripts --no-audit --no-fund "$package_dir"/*.tgz
|
|
@@ -90,8 +90,9 @@ cache and install the packed Core in a temporary consumer before running tests.
|
|
|
90
90
|
|
|
91
91
|
`npm ci` can fetch the locked tarballs without caching the registry metadata that
|
|
92
92
|
an offline installation of the packed Core needs. The temporary consumer seeds
|
|
93
|
-
that metadata in the same cache used by the tests.
|
|
94
|
-
install offline.
|
|
93
|
+
that metadata in the same cache used by the tests. Archive-based tests then
|
|
94
|
+
install offline. The by-name install test serves the candidate through a local
|
|
95
|
+
registry and can fetch public dependency metadata from npm.
|
|
95
96
|
|
|
96
97
|
For **Website CI**,
|
|
97
98
|
run `npm ci` inside `website/`, then
|
|
@@ -101,9 +102,15 @@ deploys the merged site separately.
|
|
|
101
102
|
|
|
102
103
|
## Release verification
|
|
103
104
|
|
|
104
|
-
|
|
105
|
+
For a local candidate, record the clean source commit, Node and npm versions, the
|
|
106
|
+
`npm ci` and `npm run pack:release` commands, and the archive SHA-256. Use those
|
|
107
|
+
same tool versions when reproducing a candidate. The release pack script builds
|
|
108
|
+
and stages with `umask 022` and normalizes staged regular-file modes to `0755` for
|
|
109
|
+
executables and `0644` for other files, including files from restrictive checkouts.
|
|
110
|
+
|
|
111
|
+
Run the [Release workflow](../../.github/workflows/release.yml) manually with `publish_npm` off to verify a
|
|
105
112
|
candidate and download the two tarball filenames and their SHA-256 checksums from
|
|
106
|
-
the workflow artifact. The verifier installs the exact tarball through
|
|
113
|
+
the workflow artifact. The verifier installs the exact tarball globally with npm and installs it by package name through a local registry outside the checkout. It runs local setup, the README Quickstart with a controlled model, and the first SDK Harness through the SDK, the RPC client, the one-shot CLI, and direct JSONL RPC with a question and answer. The README test checks actual file-tool bytes, CLI and installed Viewer agreement, and Sandbox deletion. Manual runs can verify a candidate with the same version as an existing release. After the source repository is
|
|
107
114
|
public and the release owner approves the tested revision, `LuNa-shi` pushes a
|
|
108
115
|
`v<version>` tag for the matching stable package version under the
|
|
109
116
|
[version-tag ruleset](https://github.com/AnySwarm/anyswarm/rules/28373821).
|
|
@@ -113,27 +120,27 @@ The workflow verifies that the candidate builds its Worker locally using the pac
|
|
|
113
120
|
The tag job uploads the verified versioned tarball, the byte-identical
|
|
114
121
|
`luna-shi-anyswarm.tgz` alias and `SHA256SUMS` to the tagged Release before
|
|
115
122
|
publishing it. An older stable tag can still be published as a pinned Release.
|
|
116
|
-
|
|
123
|
+
npm resolves CLI installs and updates using its configured registry. Verify that the candidate installs and upgrades in the same isolated global npm prefix, exposes only `anyswarm` on the host, and can be removed with npm.
|
|
117
124
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
its
|
|
125
|
+
After GitHub publication, the npm job downloads and verifies the same public
|
|
126
|
+
archive. It uses [npm Trusted Publishing](https://docs.npmjs.com/trusted-publishers/)
|
|
127
|
+
registered to `AnySwarm/anyswarm` and `release.yml`. Direct `npm publish`
|
|
128
|
+
must be enabled for that publisher. The job publishes the current GitHub
|
|
129
|
+
Latest version and checks its public npm integrity and `latest` tag.
|
|
123
130
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
`anyswarm` organization publishes those verified bytes from the release directory:
|
|
131
|
+
If the GitHub Release is available and npm publication needs a retry, use the
|
|
132
|
+
Release workflow dispatch from `main`:
|
|
127
133
|
|
|
128
134
|
```sh
|
|
129
|
-
|
|
135
|
+
gh workflow run release.yml --ref main -f publish_npm=true
|
|
130
136
|
```
|
|
131
137
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
the
|
|
136
|
-
|
|
138
|
+
Verify the installed SDK and CLI from npm by package name in an empty
|
|
139
|
+
directory. Download the npm tarball and compare its SHA-256 with the GitHub asset.
|
|
140
|
+
After both distributions are public, update the bilingual release page and
|
|
141
|
+
the documented version in `website/src/components/TopNav.astro`.
|
|
142
|
+
See [Release updates and documentation versions](release-and-docs-versioning.md)
|
|
143
|
+
for retry handling, Trusted Publishing and the proposed website version selector.
|
|
137
144
|
|
|
138
145
|
## Documentation changes
|
|
139
146
|
|