@anyswarm/core 0.0.0-stage → 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/.dockerignore +9 -0
- package/.env.example +43 -0
- package/.gitmodules +3 -0
- package/AGENTS.md +74 -0
- package/GLOSSARY.md +72 -0
- package/LICENSE +18 -0
- package/README.md +138 -2
- package/deploy/README.md +70 -0
- package/deploy/opensandbox/config.toml +46 -0
- package/deploy/opensandbox-kubernetes/README.md +108 -0
- package/deploy/opensandbox-kubernetes/bom.json +33 -0
- package/deploy/opensandbox-kubernetes/chart.sh +42 -0
- package/deploy/opensandbox-kubernetes/inspect.mjs +70 -0
- package/deploy/opensandbox-kubernetes/prepare.mjs +111 -0
- package/deploy/opensandbox-kubernetes/site.example.json +22 -0
- package/deploy/worker/Dockerfile +76 -0
- package/deploy/worker/pi-models.json +119 -0
- package/deploy/worker/tsconfig.json +12 -0
- package/dist/deploy/README.md +70 -0
- package/dist/deploy/opensandbox/config.toml +46 -0
- package/dist/deploy/opensandbox-kubernetes/README.md +108 -0
- package/dist/deploy/opensandbox-kubernetes/bom.json +33 -0
- package/dist/deploy/opensandbox-kubernetes/chart.sh +42 -0
- package/dist/deploy/opensandbox-kubernetes/site.example.json +22 -0
- package/dist/deploy/worker/Dockerfile +76 -0
- package/dist/deploy/worker/pi-models.json +119 -0
- package/dist/deploy/worker/tsconfig.json +12 -0
- package/dist/examples/README.md +120 -0
- package/dist/examples/agent-session.d.ts +1 -0
- package/dist/examples/agent-session.js +70 -0
- 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/first-harness/config.d.ts +13 -0
- package/dist/examples/first-harness/config.js +27 -0
- package/dist/examples/first-harness/handoff.d.ts +17 -0
- package/dist/examples/first-harness/handoff.js +41 -0
- package/dist/examples/first-harness/harness.d.ts +49 -0
- package/dist/examples/first-harness/harness.js +110 -0
- package/dist/examples/first-harness/session.d.ts +1 -0
- package/dist/examples/first-harness/session.js +47 -0
- package/dist/examples/first-harness/tsconfig.json +12 -0
- package/dist/examples/harness-session/README.md +27 -0
- package/dist/examples/harness-session/connection.d.ts +5 -0
- package/dist/examples/harness-session/connection.js +10 -0
- package/dist/examples/harness-session/consume.d.ts +3 -0
- package/dist/examples/harness-session/consume.js +35 -0
- package/dist/examples/harness-session/project.d.ts +4 -0
- package/dist/examples/harness-session/project.js +55 -0
- package/dist/examples/harness-session/rpc.d.ts +1 -0
- package/dist/examples/harness-session/rpc.js +10 -0
- package/dist/examples/harness-session/sdk.d.ts +1 -0
- package/dist/examples/harness-session/sdk.js +5 -0
- package/dist/examples/harness-session/terminal.d.ts +1 -0
- package/dist/examples/harness-session/terminal.js +48 -0
- package/dist/examples/harness-session/tsconfig.json +27 -0
- package/dist/examples/lead-worker/README.md +90 -0
- package/dist/examples/lead-worker/dynamic-container.d.ts +26 -0
- package/dist/examples/lead-worker/dynamic-container.js +178 -0
- package/dist/examples/lead-worker/harness/dynamic-scheduler.d.ts +9 -0
- package/dist/examples/lead-worker/harness/dynamic-scheduler.js +83 -0
- package/dist/examples/lead-worker/harness/dynamic.d.ts +72 -0
- package/dist/examples/lead-worker/harness/dynamic.js +261 -0
- package/dist/examples/lead-worker/harness/git.d.ts +32 -0
- package/dist/examples/lead-worker/harness/git.js +167 -0
- package/dist/examples/lead-worker/harness/index.d.ts +298 -0
- package/dist/examples/lead-worker/harness/index.js +576 -0
- package/dist/examples/lead-worker/harness/prompts.d.ts +13 -0
- package/dist/examples/lead-worker/harness/prompts.js +21 -0
- package/dist/examples/lead-worker/harness/team.d.ts +3 -0
- package/dist/examples/lead-worker/harness/team.js +16 -0
- package/dist/examples/lead-worker/project-config.d.ts +47 -0
- package/dist/examples/lead-worker/project-config.js +43 -0
- package/dist/examples/lead-worker/project.d.ts +6 -0
- package/dist/examples/lead-worker/project.js +57 -0
- package/dist/examples/lead-worker/services/board.d.ts +38 -0
- package/dist/examples/lead-worker/services/board.js +303 -0
- package/dist/examples/lead-worker/tsconfig.json +27 -0
- package/dist/examples/messages/README.md +131 -0
- package/dist/examples/messages/handoff-config.d.ts +13 -0
- package/dist/examples/messages/handoff-config.js +38 -0
- package/dist/examples/messages/handoff.d.ts +87 -0
- package/dist/examples/messages/handoff.js +198 -0
- package/dist/examples/messages/messages.d.ts +16 -0
- package/dist/examples/messages/messages.js +86 -0
- package/dist/examples/messages/project.d.ts +24 -0
- package/dist/examples/messages/project.js +92 -0
- package/dist/examples/messages/tsconfig.handoff.json +12 -0
- package/dist/examples/notes/README.md +74 -0
- package/dist/examples/notes/config.d.ts +41 -0
- package/dist/examples/notes/config.js +34 -0
- package/dist/examples/notes/main.d.ts +7 -0
- package/dist/examples/notes/main.js +130 -0
- package/dist/examples/notes/notes.d.ts +5 -0
- package/dist/examples/notes/notes.js +42 -0
- package/dist/examples/notes/project.d.ts +27 -0
- package/dist/examples/notes/project.js +156 -0
- package/dist/examples/parallel-swarm/board-service.d.ts +4 -0
- package/dist/examples/parallel-swarm/board-service.js +82 -0
- package/dist/examples/parallel-swarm/board.d.ts +16 -0
- package/dist/examples/parallel-swarm/board.js +24 -0
- package/dist/examples/parallel-swarm/harness.d.ts +32 -0
- package/dist/examples/parallel-swarm/harness.js +91 -0
- package/dist/examples/peermesh/README.md +127 -0
- package/dist/examples/peermesh/config.d.ts +51 -0
- package/dist/examples/peermesh/config.js +13 -0
- package/dist/examples/peermesh/harness/delivery.d.ts +18 -0
- package/dist/examples/peermesh/harness/delivery.js +223 -0
- package/dist/examples/peermesh/harness/index.d.ts +60 -0
- package/dist/examples/peermesh/harness/index.js +143 -0
- package/dist/examples/peermesh/harness/provision.d.ts +21 -0
- package/dist/examples/peermesh/harness/provision.js +207 -0
- package/dist/examples/peermesh/harness/routed.d.ts +12 -0
- package/dist/examples/peermesh/harness/routed.js +122 -0
- package/dist/examples/peermesh/harness/router.d.ts +15 -0
- package/dist/examples/peermesh/harness/router.js +322 -0
- package/dist/examples/peermesh/harness/team.d.ts +52 -0
- package/dist/examples/peermesh/harness/team.js +294 -0
- package/dist/examples/peermesh/project-config.d.ts +57 -0
- package/dist/examples/peermesh/project-config.js +56 -0
- package/dist/examples/peermesh/project.d.ts +23 -0
- package/dist/examples/peermesh/project.js +160 -0
- package/dist/examples/peermesh/services/board-process.d.ts +7 -0
- package/dist/examples/peermesh/services/board-process.js +68 -0
- package/dist/examples/peermesh/services/event-source.d.ts +17 -0
- package/dist/examples/peermesh/services/event-source.js +177 -0
- package/dist/examples/peermesh/services/services.d.ts +66 -0
- package/dist/examples/peermesh/services/services.js +193 -0
- package/dist/examples/peermesh/tsconfig.json +27 -0
- package/dist/examples/services/README.md +28 -0
- package/dist/examples/services/agent-control/README.md +23 -0
- package/dist/examples/services/agent-control/flow.sh +12 -0
- package/dist/examples/services/agent-control/main.d.ts +1 -0
- package/dist/examples/services/agent-control/main.js +34 -0
- package/dist/examples/services/agent-control/run.d.ts +12 -0
- package/dist/examples/services/agent-control/run.js +36 -0
- package/dist/examples/services/agent-control/tsconfig.json +12 -0
- package/dist/examples/services/github-issues/README.md +22 -0
- package/dist/examples/services/github-issues/index.d.ts +6 -0
- package/dist/examples/services/github-issues/index.js +36 -0
- package/dist/examples/services/mathlib-search/Dockerfile +24 -0
- package/dist/examples/services/mathlib-search/README.md +45 -0
- package/dist/examples/services/mathlib-search/SKILL.md +50 -0
- package/dist/examples/services/mathlib-search/main.d.ts +1 -0
- package/dist/examples/services/mathlib-search/main.js +39 -0
- package/dist/examples/services/mathlib-search/references/loogle.md +12 -0
- package/dist/examples/services/mathlib-search/service.d.ts +72 -0
- package/dist/examples/services/mathlib-search/service.js +442 -0
- package/dist/examples/services/mathlib-search/service.json +64 -0
- package/dist/examples/services/mathlib-search/tsconfig.json +7 -0
- package/dist/examples/services/mcp-managed/README.md +68 -0
- package/dist/examples/services/mcp-managed/controller.d.ts +1 -0
- package/dist/examples/services/mcp-managed/controller.js +28 -0
- package/dist/examples/services/mcp-managed/host.d.ts +2 -0
- package/dist/examples/services/mcp-managed/host.js +32 -0
- package/dist/examples/services/mcp-managed/lifecycle.d.ts +1 -0
- package/dist/examples/services/mcp-managed/lifecycle.js +54 -0
- package/dist/examples/services/mcp-managed/mcp-server.d.ts +1 -0
- package/dist/examples/services/mcp-managed/mcp-server.js +48 -0
- package/dist/examples/services/mcp-managed/process-server.d.ts +1 -0
- package/dist/examples/services/mcp-managed/process-server.js +18 -0
- package/dist/examples/services/mcp-managed/recovery.d.ts +1 -0
- package/dist/examples/services/mcp-managed/recovery.js +85 -0
- package/dist/examples/services/mcp-managed/run.d.ts +1 -0
- package/dist/examples/services/mcp-managed/run.js +28 -0
- package/dist/examples/services/mcp-managed/service.d.ts +7 -0
- package/dist/examples/services/mcp-managed/service.js +43 -0
- package/dist/examples/services/mcp-managed/tsconfig.json +12 -0
- package/dist/examples/services/persistent-board/README.md +78 -0
- package/dist/examples/services/persistent-board/business.d.ts +23 -0
- package/dist/examples/services/persistent-board/business.js +60 -0
- package/dist/examples/services/persistent-board/index.d.ts +10 -0
- package/dist/examples/services/persistent-board/index.js +98 -0
- package/dist/examples/services/persistent-board/interface.d.ts +26 -0
- package/dist/examples/services/persistent-board/interface.js +16 -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/services/persistent-board/python/board.py +36 -0
- package/dist/examples/services/persistent-board/python/server.py +69 -0
- package/dist/examples/services/persistent-board/run.d.ts +1 -0
- package/dist/examples/services/persistent-board/run.js +73 -0
- package/dist/examples/services/persistent-board/tsconfig.json +12 -0
- package/dist/examples/subagents/README.md +109 -0
- package/dist/examples/subagents/business.d.ts +115 -0
- package/dist/examples/subagents/business.js +171 -0
- package/dist/examples/subagents/config.d.ts +43 -0
- package/dist/examples/subagents/config.js +36 -0
- package/dist/examples/subagents/harness/controller.d.ts +67 -0
- package/dist/examples/subagents/harness/controller.js +796 -0
- package/dist/examples/subagents/main.d.ts +1 -0
- package/dist/examples/subagents/main.js +70 -0
- package/dist/examples/subagents/project.d.ts +31 -0
- package/dist/examples/subagents/project.js +129 -0
- package/dist/examples/subagents/prompts/prompts.d.ts +3 -0
- package/dist/examples/subagents/prompts/prompts.js +6 -0
- package/dist/examples/subagents/services/collaboration-service.d.ts +7 -0
- package/dist/examples/subagents/services/collaboration-service.js +93 -0
- package/dist/examples/subagents/tsconfig.json +27 -0
- package/dist/examples/substrate/README.md +84 -0
- package/dist/examples/substrate/config.d.ts +46 -0
- package/dist/examples/substrate/config.js +8 -0
- package/dist/examples/substrate/harness/collaboration-evidence.d.ts +21 -0
- package/dist/examples/substrate/harness/collaboration-evidence.js +45 -0
- package/dist/examples/substrate/harness/index.d.ts +21 -0
- package/dist/examples/substrate/harness/index.js +247 -0
- package/dist/examples/substrate/main.d.ts +1 -0
- package/dist/examples/substrate/main.js +44 -0
- package/dist/examples/substrate/project-config.d.ts +42 -0
- package/dist/examples/substrate/project-config.js +37 -0
- package/dist/examples/substrate/project.d.ts +6 -0
- package/dist/examples/substrate/project.js +50 -0
- package/dist/examples/substrate/services/substrate.d.ts +16 -0
- package/dist/examples/substrate/services/substrate.js +140 -0
- package/dist/examples/substrate/tsconfig.json +27 -0
- 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/README.md +53 -0
- package/dist/examples/taskpool/cli.d.ts +176 -0
- package/dist/examples/taskpool/cli.js +185 -0
- package/dist/examples/taskpool/config.d.ts +41 -0
- package/dist/examples/taskpool/config.js +34 -0
- package/dist/examples/taskpool/deploy/service-hosts/Dockerfile +34 -0
- package/dist/examples/taskpool/deploy/service-hosts/README.md +119 -0
- package/dist/examples/taskpool/deploy/service-hosts/compose.yaml +78 -0
- package/dist/examples/taskpool/deploy/service-hosts/context-service-peer.d.ts +15 -0
- package/dist/examples/taskpool/deploy/service-hosts/context-service-peer.js +62 -0
- package/dist/examples/taskpool/deploy/service-hosts/coordinator-peer-client.d.ts +3 -0
- package/dist/examples/taskpool/deploy/service-hosts/coordinator-peer-client.js +67 -0
- package/dist/examples/taskpool/deploy/service-hosts/coordinator-peer-host.d.ts +2 -0
- package/dist/examples/taskpool/deploy/service-hosts/coordinator-peer-host.js +17 -0
- package/dist/examples/taskpool/deploy/service-hosts/independent-services.d.ts +15 -0
- package/dist/examples/taskpool/deploy/service-hosts/independent-services.js +195 -0
- package/dist/examples/taskpool/deploy/service-hosts/judge-peer-entrypoint.sh +8 -0
- package/dist/examples/taskpool/deploy/service-hosts/judge-service-peer.d.ts +16 -0
- package/dist/examples/taskpool/deploy/service-hosts/judge-service-peer.js +128 -0
- package/dist/examples/taskpool/deploy/service-hosts/peer-process-lifetime.d.ts +5 -0
- package/dist/examples/taskpool/deploy/service-hosts/peer-process-lifetime.js +37 -0
- package/dist/examples/taskpool/deploy/service-hosts/remote-context-service.d.ts +12 -0
- package/dist/examples/taskpool/deploy/service-hosts/remote-context-service.js +73 -0
- package/dist/examples/taskpool/deploy/service-hosts/remote-judge-service.d.ts +26 -0
- package/dist/examples/taskpool/deploy/service-hosts/remote-judge-service.js +128 -0
- package/dist/examples/taskpool/deploy/service-hosts/service-adapter.d.ts +25 -0
- package/dist/examples/taskpool/deploy/service-hosts/service-adapter.js +160 -0
- package/dist/examples/taskpool/deploy/service-hosts/service-authority-snapshot.d.ts +82 -0
- package/dist/examples/taskpool/deploy/service-hosts/service-authority-snapshot.js +85 -0
- package/dist/examples/taskpool/deploy/service-hosts/service-bundle.d.ts +68 -0
- package/dist/examples/taskpool/deploy/service-hosts/service-bundle.js +253 -0
- package/dist/examples/taskpool/deploy/service-hosts/service-commit-gate.d.ts +19 -0
- package/dist/examples/taskpool/deploy/service-hosts/service-commit-gate.js +71 -0
- package/dist/examples/taskpool/deploy/service-hosts/service-host-entrypoint.sh +20 -0
- package/dist/examples/taskpool/deploy/service-hosts/service-host.d.ts +29 -0
- package/dist/examples/taskpool/deploy/service-hosts/service-host.js +210 -0
- package/dist/examples/taskpool/deploy/service-hosts/service-manifest.d.ts +48 -0
- package/dist/examples/taskpool/deploy/service-hosts/service-manifest.js +182 -0
- package/dist/examples/taskpool/deploy/service-hosts/service-registry.d.ts +166 -0
- package/dist/examples/taskpool/deploy/service-hosts/service-registry.js +450 -0
- package/dist/examples/taskpool/deploy/service-hosts/start-context-service-peer.d.ts +2 -0
- package/dist/examples/taskpool/deploy/service-hosts/start-context-service-peer.js +9 -0
- package/dist/examples/taskpool/deploy/service-hosts/start-judge-service-peer.d.ts +2 -0
- package/dist/examples/taskpool/deploy/service-hosts/start-judge-service-peer.js +24 -0
- package/dist/examples/taskpool/deploy/service-hosts/start-service-host.d.ts +2 -0
- package/dist/examples/taskpool/deploy/service-hosts/start-service-host.js +169 -0
- package/dist/examples/taskpool/deploy/service-hosts/tsconfig.json +9 -0
- package/dist/examples/taskpool/errors.d.ts +44 -0
- package/dist/examples/taskpool/errors.js +50 -0
- package/dist/examples/taskpool/harness/agent-coordinator.d.ts +4 -0
- package/dist/examples/taskpool/harness/agent-coordinator.js +55 -0
- package/dist/examples/taskpool/harness/controller.d.ts +116 -0
- package/dist/examples/taskpool/harness/controller.js +718 -0
- package/dist/examples/taskpool/harness/harness.d.ts +4 -0
- package/dist/examples/taskpool/harness/harness.js +143 -0
- package/dist/examples/taskpool/harness/prepare-inputs.d.ts +16 -0
- package/dist/examples/taskpool/harness/prepare-inputs.js +77 -0
- package/dist/examples/taskpool/harness/task-handoff.d.ts +13 -0
- package/dist/examples/taskpool/harness/task-handoff.js +150 -0
- package/dist/examples/taskpool/persistence/envelope.d.ts +23 -0
- package/dist/examples/taskpool/persistence/envelope.js +47 -0
- package/dist/examples/taskpool/persistence/service-history.d.ts +5 -0
- package/dist/examples/taskpool/persistence/service-history.js +245 -0
- package/dist/examples/taskpool/persistence/service-peer-schema.d.ts +3 -0
- package/dist/examples/taskpool/persistence/service-peer-schema.js +18 -0
- package/dist/examples/taskpool/project.d.ts +26 -0
- package/dist/examples/taskpool/project.js +161 -0
- package/dist/examples/taskpool/prompts/agent-contract.d.ts +8 -0
- package/dist/examples/taskpool/prompts/agent-contract.js +40 -0
- package/dist/examples/taskpool/services/builtin-registry.d.ts +33 -0
- package/dist/examples/taskpool/services/builtin-registry.js +234 -0
- package/dist/examples/taskpool/services/judge/check-result.d.ts +85 -0
- package/dist/examples/taskpool/services/judge/check-result.js +331 -0
- package/dist/examples/taskpool/services/judge/checker-owner.d.ts +11 -0
- package/dist/examples/taskpool/services/judge/checker-owner.js +118 -0
- package/dist/examples/taskpool/services/judge/checker-process-limits.d.ts +23 -0
- package/dist/examples/taskpool/services/judge/checker-process-limits.js +169 -0
- package/dist/examples/taskpool/services/judge/final-tree-deployment.d.ts +63 -0
- package/dist/examples/taskpool/services/judge/final-tree-deployment.js +253 -0
- package/dist/examples/taskpool/services/judge/final-tree-proof.lean +45 -0
- package/dist/examples/taskpool/services/judge/fixture.d.ts +3 -0
- package/dist/examples/taskpool/services/judge/fixture.js +42 -0
- package/dist/examples/taskpool/services/judge/judge-schema.d.ts +2 -0
- package/dist/examples/taskpool/services/judge/judge-schema.js +87 -0
- package/dist/examples/taskpool/services/judge/judge-service.d.ts +91 -0
- package/dist/examples/taskpool/services/judge/judge-service.js +895 -0
- package/dist/examples/taskpool/services/judge/lean-adapter.d.ts +48 -0
- package/dist/examples/taskpool/services/judge/lean-adapter.js +370 -0
- package/dist/examples/taskpool/services/judge/lean-final-tree-verifier.d.ts +46 -0
- package/dist/examples/taskpool/services/judge/lean-final-tree-verifier.js +658 -0
- package/dist/examples/taskpool/services/judge/lean-module-build.lean +28 -0
- package/dist/examples/taskpool/services/judge/lean-module-checker.d.ts +13 -0
- package/dist/examples/taskpool/services/judge/lean-module-checker.js +220 -0
- package/dist/examples/taskpool/services/judge/lean-module-verify.LICENSE.txt +71 -0
- package/dist/examples/taskpool/services/judge/lean-module-verify.NOTICE.md +33 -0
- package/dist/examples/taskpool/services/judge/lean-module-verify.lean +51 -0
- package/dist/examples/taskpool/services/judge/lean-source-policy.d.ts +5 -0
- package/dist/examples/taskpool/services/judge/lean-source-policy.js +100 -0
- package/dist/examples/taskpool/services/judge/lock-final-tree-checker.d.ts +1 -0
- package/dist/examples/taskpool/services/judge/lock-final-tree-checker.js +11 -0
- package/dist/examples/taskpool/services/judge/workspace-check-source.d.ts +23 -0
- package/dist/examples/taskpool/services/judge/workspace-check-source.js +34 -0
- package/dist/examples/taskpool/services/material/context-schema.d.ts +1 -0
- package/dist/examples/taskpool/services/material/context-schema.js +104 -0
- package/dist/examples/taskpool/services/material/context-service.d.ts +18 -0
- package/dist/examples/taskpool/services/material/context-service.js +915 -0
- package/dist/examples/taskpool/services/mathlib/mathlib-service.d.ts +22 -0
- package/dist/examples/taskpool/services/mathlib/mathlib-service.js +43 -0
- package/dist/examples/taskpool/services/mathlib/search-contract.d.ts +44 -0
- package/dist/examples/taskpool/services/mathlib/search-contract.js +62 -0
- package/dist/examples/taskpool/services/mission/coordination-permissions.d.ts +2 -0
- package/dist/examples/taskpool/services/mission/coordination-permissions.js +8 -0
- package/dist/examples/taskpool/services/mission/manual-mission-review.d.ts +31 -0
- package/dist/examples/taskpool/services/mission/manual-mission-review.js +110 -0
- package/dist/examples/taskpool/services/mission/mission-coordination.d.ts +3 -0
- package/dist/examples/taskpool/services/mission/mission-coordination.js +78 -0
- package/dist/examples/taskpool/services/mission/mission-service.d.ts +9 -0
- package/dist/examples/taskpool/services/mission/mission-service.js +93 -0
- package/dist/examples/taskpool/services/mission/mission-submission-access.d.ts +5 -0
- package/dist/examples/taskpool/services/mission/mission-submission-access.js +19 -0
- package/dist/examples/taskpool/services/mission/mission-submission.d.ts +42 -0
- package/dist/examples/taskpool/services/mission/mission-submission.js +685 -0
- package/dist/examples/taskpool/services/mission/review-mission.d.ts +2 -0
- package/dist/examples/taskpool/services/mission/review-mission.js +61 -0
- package/dist/examples/taskpool/services/service-catalog.d.ts +7 -0
- package/dist/examples/taskpool/services/service-catalog.js +395 -0
- package/dist/examples/taskpool/services/task/agent-service.d.ts +45 -0
- package/dist/examples/taskpool/services/task/agent-service.js +213 -0
- package/dist/examples/taskpool/services/task/execution-budget.d.ts +8 -0
- package/dist/examples/taskpool/services/task/execution-budget.js +11 -0
- package/dist/examples/taskpool/services/task/schema.d.ts +3 -0
- package/dist/examples/taskpool/services/task/schema.js +311 -0
- package/dist/examples/taskpool/services/task/task-service.d.ts +138 -0
- package/dist/examples/taskpool/services/task/task-service.js +2623 -0
- package/dist/examples/taskpool/services/task/task-types.d.ts +5 -0
- package/dist/examples/taskpool/services/task/task-types.js +5 -0
- package/dist/examples/taskpool/services/workspace/execution-workspace.d.ts +23 -0
- package/dist/examples/taskpool/services/workspace/execution-workspace.js +584 -0
- package/dist/examples/taskpool/services/workspace/mission-workspace.d.ts +46 -0
- package/dist/examples/taskpool/services/workspace/mission-workspace.js +896 -0
- package/dist/examples/taskpool/services/workspace/publication-services.d.ts +41 -0
- package/dist/examples/taskpool/services/workspace/publication-services.js +442 -0
- package/dist/examples/taskpool/services/workspace/workspace-contract.d.ts +31 -0
- package/dist/examples/taskpool/services/workspace/workspace-contract.js +180 -0
- package/dist/examples/taskpool/services/workspace/workspace-manager.d.ts +65 -0
- package/dist/examples/taskpool/services/workspace/workspace-manager.js +364 -0
- package/dist/examples/taskpool/services/workspace/workspace-merge.d.ts +13 -0
- package/dist/examples/taskpool/services/workspace/workspace-merge.js +114 -0
- package/dist/examples/taskpool/services/workspace/workspace-public-reads.d.ts +10 -0
- package/dist/examples/taskpool/services/workspace/workspace-public-reads.js +15 -0
- package/dist/examples/taskpool/services/workspace/workspace-publication.d.ts +2 -0
- package/dist/examples/taskpool/services/workspace/workspace-publication.js +29 -0
- package/dist/examples/taskpool/services/workspace/workspace-repository.d.ts +62 -0
- package/dist/examples/taskpool/services/workspace/workspace-repository.js +399 -0
- package/dist/examples/taskpool/tsconfig.json +27 -0
- package/dist/scripts/anyswarm-applications.d.ts +19 -0
- package/dist/scripts/anyswarm-applications.js +19 -0
- package/dist/scripts/anyswarm-arguments.d.ts +73 -0
- package/dist/scripts/anyswarm-arguments.js +160 -0
- 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.d.ts +52 -0
- package/dist/scripts/anyswarm-installation.js +320 -0
- 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 -0
- package/dist/scripts/anyswarm-project.js +257 -0
- 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.d.ts +2 -0
- package/dist/scripts/anyswarm.js +134 -0
- package/dist/scripts/build-provenance.json +1 -0
- package/dist/scripts/build.d.ts +1 -0
- package/dist/scripts/build.js +62 -0
- package/dist/scripts/check-architecture.d.ts +2 -0
- package/dist/scripts/check-architecture.js +109 -0
- package/dist/scripts/codex-app-server-driver.d.ts +25 -0
- package/dist/scripts/codex-app-server-driver.js +270 -0
- package/dist/scripts/core-session-fork.d.ts +22 -0
- package/dist/scripts/core-session-fork.js +77 -0
- package/dist/scripts/core-work-dir.d.ts +35 -0
- package/dist/scripts/core-work-dir.js +284 -0
- package/dist/scripts/generate-architecture-api.d.ts +2 -0
- package/dist/scripts/generate-architecture-api.js +119 -0
- package/dist/scripts/generate-architecture-coverage.d.ts +2 -0
- package/dist/scripts/generate-architecture-coverage.js +101 -0
- package/dist/scripts/generate-architecture-prompts.d.ts +2 -0
- package/dist/scripts/generate-architecture-prompts.js +403 -0
- package/dist/scripts/git-credential-peermesh.d.ts +2 -0
- package/dist/scripts/git-credential-peermesh.js +44 -0
- package/dist/scripts/local-environment.d.ts +108 -0
- package/dist/scripts/local-environment.js +432 -0
- package/dist/scripts/local-setup-smoke.d.ts +42 -0
- package/dist/scripts/local-setup-smoke.js +185 -0
- package/dist/scripts/local-setup-upstream.d.ts +19 -0
- package/dist/scripts/local-setup-upstream.js +131 -0
- package/dist/scripts/local-setup-worker.d.ts +29 -0
- package/dist/scripts/local-setup-worker.js +119 -0
- package/dist/scripts/local-setup.d.ts +62 -0
- package/dist/scripts/local-setup.js +485 -0
- package/dist/scripts/opensandbox-agent-worker.d.ts +2 -0
- package/dist/scripts/opensandbox-agent-worker.js +924 -0
- package/dist/scripts/pack-release.d.ts +1 -0
- package/dist/scripts/pack-release.js +63 -0
- package/dist/scripts/pi-message-identity.d.ts +19 -0
- package/dist/scripts/pi-message-identity.js +130 -0
- package/dist/scripts/pi-rpc-submissions.d.ts +1 -0
- package/dist/scripts/pi-rpc-submissions.js +2 -0
- package/dist/scripts/pi-service-tools.d.ts +22 -0
- package/dist/scripts/pi-service-tools.js +129 -0
- package/dist/scripts/pi-session-bridge.d.ts +2 -0
- package/dist/scripts/pi-session-bridge.js +260 -0
- package/dist/scripts/pi-session-controller.d.ts +51 -0
- package/dist/scripts/pi-session-controller.js +300 -0
- package/dist/scripts/pi-session-diagnostics.d.ts +6 -0
- package/dist/scripts/pi-session-diagnostics.js +51 -0
- package/dist/scripts/project-install.d.ts +83 -0
- package/dist/scripts/project-install.js +405 -0
- package/dist/scripts/project-processes.d.ts +1 -0
- package/dist/scripts/project-processes.js +67 -0
- package/dist/scripts/read-harness-result.d.ts +2 -0
- package/dist/scripts/read-harness-result.js +29 -0
- package/dist/scripts/rpc-submissions.d.ts +21 -0
- package/dist/scripts/rpc-submissions.js +115 -0
- package/dist/scripts/run-harness.d.ts +2 -0
- package/dist/scripts/run-harness.js +82 -0
- package/dist/scripts/sandbox-project.d.ts +25 -0
- package/dist/scripts/sandbox-project.js +275 -0
- package/dist/scripts/setup +13 -0
- package/dist/scripts/setup-bootstrap.d.ts +1 -0
- package/dist/scripts/setup-bootstrap.js +172 -0
- package/dist/scripts/swarm.d.ts +2 -0
- package/dist/scripts/swarm.js +13 -0
- package/dist/scripts/test-focused.d.ts +1 -0
- package/dist/scripts/test-focused.js +41 -0
- package/dist/scripts/worker-executor-adapter.d.ts +29 -0
- package/dist/scripts/worker-executor-adapter.js +45 -0
- package/dist/src/cli/foreground-harnesses.d.ts +6 -0
- package/dist/src/cli/foreground-harnesses.js +119 -0
- package/dist/src/cli/swarm-cli.d.ts +22 -0
- package/dist/src/cli/swarm-cli.js +526 -0
- package/dist/src/core/agent-service.d.ts +25 -0
- package/dist/src/core/agent-service.js +154 -0
- package/dist/src/core/allocation-ledger.d.ts +182 -0
- package/dist/src/core/allocation-ledger.js +611 -0
- package/dist/src/core/artifact-collection.d.ts +39 -0
- package/dist/src/core/artifact-collection.js +168 -0
- package/dist/src/core/backend-config.d.ts +137 -0
- package/dist/src/core/backend-config.js +1 -0
- package/dist/src/core/bridge.d.ts +80 -0
- package/dist/src/core/bridge.js +334 -0
- package/dist/src/core/config.d.ts +12 -0
- package/dist/src/core/config.js +134 -0
- package/dist/src/core/error-diagnostics.d.ts +14 -0
- package/dist/src/core/error-diagnostics.js +130 -0
- package/dist/src/core/executor-adapter.d.ts +44 -0
- package/dist/src/core/executor-adapter.js +22 -0
- package/dist/src/core/file-controls.d.ts +33 -0
- package/dist/src/core/file-controls.js +164 -0
- package/dist/src/core/file-policy.d.ts +24 -0
- package/dist/src/core/file-policy.js +37 -0
- package/dist/src/core/files/core-collection.d.ts +44 -0
- package/dist/src/core/files/core-collection.js +183 -0
- package/dist/src/core/files/core-file-seed.d.ts +55 -0
- package/dist/src/core/files/core-file-seed.js +145 -0
- package/dist/src/core/files/file-tree-stream.d.ts +16 -0
- package/dist/src/core/files/file-tree-stream.js +175 -0
- 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 +47 -0
- package/dist/src/core/index.js +1563 -0
- package/dist/src/core/input-ledger.d.ts +5 -0
- package/dist/src/core/input-ledger.js +27 -0
- package/dist/src/core/mcp-service.d.ts +13 -0
- package/dist/src/core/mcp-service.js +230 -0
- package/dist/src/core/model/chat-completions-transport.d.ts +2 -0
- package/dist/src/core/model/chat-completions-transport.js +119 -0
- package/dist/src/core/model/model-access.d.ts +64 -0
- package/dist/src/core/model/model-access.js +235 -0
- package/dist/src/core/model/model-catalog.d.ts +10 -0
- package/dist/src/core/model/model-catalog.js +63 -0
- package/dist/src/core/model/model-request-validation.d.ts +5 -0
- package/dist/src/core/model/model-request-validation.js +31 -0
- package/dist/src/core/model/model-trace.d.ts +14 -0
- package/dist/src/core/model/model-trace.js +60 -0
- package/dist/src/core/model/model-transport.d.ts +40 -0
- package/dist/src/core/model/model-transport.js +19 -0
- package/dist/src/core/model/responses-budget-gateway.d.ts +33 -0
- package/dist/src/core/model/responses-budget-gateway.js +669 -0
- package/dist/src/core/operation-queue.d.ts +23 -0
- package/dist/src/core/operation-queue.js +60 -0
- package/dist/src/core/run-records.d.ts +132 -0
- package/dist/src/core/run-records.js +223 -0
- package/dist/src/core/runtime-admissions.d.ts +13 -0
- package/dist/src/core/runtime-admissions.js +29 -0
- package/dist/src/core/runtime-callback.d.ts +14 -0
- package/dist/src/core/runtime-callback.js +46 -0
- package/dist/src/core/runtime-management.d.ts +190 -0
- package/dist/src/core/runtime-management.js +748 -0
- package/dist/src/core/sandbox/executor-driver.d.ts +51 -0
- package/dist/src/core/sandbox/executor-driver.js +108 -0
- package/dist/src/core/sandbox/local-executor.d.ts +29 -0
- package/dist/src/core/sandbox/local-executor.js +203 -0
- package/dist/src/core/sandbox/local-worker.d.ts +25 -0
- package/dist/src/core/sandbox/local-worker.js +164 -0
- package/dist/src/core/sandbox/opensandbox-backend.d.ts +340 -0
- package/dist/src/core/sandbox/opensandbox-backend.js +1160 -0
- package/dist/src/core/sandbox/opensandbox-manager.d.ts +165 -0
- package/dist/src/core/sandbox/opensandbox-manager.js +896 -0
- package/dist/src/core/sandbox/opensandbox-metadata.d.ts +3 -0
- package/dist/src/core/sandbox/opensandbox-metadata.js +7 -0
- package/dist/src/core/sandbox/opensandbox-provider.d.ts +44 -0
- package/dist/src/core/sandbox/opensandbox-provider.js +42 -0
- package/dist/src/core/sandbox/opensandbox-sdk.d.ts +40 -0
- package/dist/src/core/sandbox/opensandbox-sdk.js +72 -0
- package/dist/src/core/sandbox/sandbox-connection.d.ts +61 -0
- package/dist/src/core/sandbox/sandbox-connection.js +231 -0
- package/dist/src/core/sandbox/sandbox-validation.d.ts +5 -0
- package/dist/src/core/sandbox/sandbox-validation.js +54 -0
- package/dist/src/core/sandbox/worker-client.d.ts +75 -0
- package/dist/src/core/sandbox/worker-client.js +573 -0
- package/dist/src/core/service-lifecycle-types.d.ts +39 -0
- package/dist/src/core/service-lifecycle-types.js +1 -0
- 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 +42 -0
- package/dist/src/core/service-observation-types.js +1 -0
- package/dist/src/core/service-process.d.ts +23 -0
- package/dist/src/core/service-process.js +182 -0
- package/dist/src/core/service-trace.d.ts +16 -0
- package/dist/src/core/service-trace.js +91 -0
- package/dist/src/core/service-types.d.ts +138 -0
- package/dist/src/core/service-types.js +1 -0
- package/dist/src/core/services.d.ts +109 -0
- package/dist/src/core/services.js +668 -0
- package/dist/src/core/session-config.d.ts +4 -0
- package/dist/src/core/session-config.js +76 -0
- package/dist/src/core/session-controls.d.ts +33 -0
- package/dist/src/core/session-controls.js +207 -0
- package/dist/src/core/session-types.d.ts +193 -0
- package/dist/src/core/session-types.js +1 -0
- package/dist/src/core/startup-prompt.d.ts +2 -0
- package/dist/src/core/startup-prompt.js +31 -0
- package/dist/src/core/types.d.ts +484 -0
- package/dist/src/core/types.js +1 -0
- package/dist/src/core/worker-control.d.ts +27 -0
- package/dist/src/core/worker-control.js +77 -0
- package/dist/src/core/worker-event-poll.d.ts +8 -0
- package/dist/src/core/worker-event-poll.js +48 -0
- package/dist/src/core/worker-event-stream.d.ts +59 -0
- package/dist/src/core/worker-event-stream.js +137 -0
- package/dist/src/core/worker-image.d.ts +15 -0
- package/dist/src/core/worker-image.js +37 -0
- package/dist/src/errors.d.ts +23 -0
- package/dist/src/errors.js +25 -0
- package/dist/src/harness/foreground-commands.d.ts +5 -0
- package/dist/src/harness/foreground-commands.js +200 -0
- package/dist/src/harness/git-tree.d.ts +7 -0
- package/dist/src/harness/git-tree.js +73 -0
- package/dist/src/harness/harness-event-stream.d.ts +21 -0
- package/dist/src/harness/harness-event-stream.js +100 -0
- package/dist/src/harness/harness-session-types.d.ts +270 -0
- package/dist/src/harness/harness-session-types.js +1 -0
- package/dist/src/harness/harness-session-view.d.ts +7 -0
- package/dist/src/harness/harness-session-view.js +89 -0
- package/dist/src/harness/harness-session.d.ts +9 -0
- package/dist/src/harness/harness-session.js +787 -0
- package/dist/src/harness/http.d.ts +9 -0
- package/dist/src/harness/http.js +46 -0
- package/dist/src/harness/input-admission.d.ts +15 -0
- package/dist/src/harness/input-admission.js +62 -0
- package/dist/src/harness/owned-resources.d.ts +38 -0
- package/dist/src/harness/owned-resources.js +46 -0
- package/dist/src/harness/project-git.d.ts +11 -0
- package/dist/src/harness/project-git.js +44 -0
- package/dist/src/harness/project-harness.d.ts +173 -0
- package/dist/src/harness/project-harness.js +322 -0
- package/dist/src/harness/project-input.d.ts +28 -0
- package/dist/src/harness/project-input.js +382 -0
- package/dist/src/harness/project-rpc-client.d.ts +46 -0
- package/dist/src/harness/project-rpc-client.js +218 -0
- package/dist/src/harness/project-rpc-lines.d.ts +17 -0
- package/dist/src/harness/project-rpc-lines.js +55 -0
- package/dist/src/harness/project-rpc.d.ts +12 -0
- package/dist/src/harness/project-rpc.js +303 -0
- package/dist/src/harness/project-runtime.d.ts +15 -0
- package/dist/src/harness/project-runtime.js +109 -0
- package/dist/src/harness/read-result.d.ts +16 -0
- package/dist/src/harness/read-result.js +90 -0
- package/dist/src/harness/run-input.d.ts +22 -0
- package/dist/src/harness/run-input.js +115 -0
- package/dist/src/harness/run-report.d.ts +35 -0
- package/dist/src/harness/run-report.js +97 -0
- package/dist/src/harness/typescript-loader.d.ts +2 -0
- package/dist/src/harness/typescript-loader.js +41 -0
- package/dist/src/protocol/http-request.d.ts +16 -0
- package/dist/src/protocol/http-request.js +32 -0
- package/dist/src/protocol/session-queries.d.ts +4 -0
- package/dist/src/protocol/session-queries.js +6 -0
- package/dist/src/protocol/stable-json.d.ts +1 -0
- package/dist/src/protocol/stable-json.js +7 -0
- package/dist/src/trace-viewer/command.mjs +75 -0
- package/dist/src/trace-viewer/public/app.js +2939 -0
- package/dist/src/trace-viewer/public/fonts/departure-mono.woff2 +0 -0
- package/dist/src/trace-viewer/public/fonts/inter.woff2 +0 -0
- package/dist/src/trace-viewer/public/fonts/space-grotesk.woff2 +0 -0
- package/dist/src/trace-viewer/public/index.html +312 -0
- package/dist/src/trace-viewer/public/licenses/departure-mono.txt +93 -0
- package/dist/src/trace-viewer/public/licenses/inter.txt +93 -0
- package/dist/src/trace-viewer/public/licenses/space-grotesk.txt +93 -0
- package/dist/src/trace-viewer/public/style.css +1436 -0
- package/dist/src/trace-viewer/reader.mjs +1932 -0
- package/dist/src/trace-viewer/server.mjs +191 -0
- package/dist/test-support/drop-peer-response.js +22 -0
- package/dist/test-support/judge-peer-fixture.js +32 -0
- package/dist/test-support/opensandbox-sdk-fixture.js +32 -0
- package/dist/test-support/project-install-rollback-probe.js +106 -0
- package/dist/test-support/sandbox-project-probe.js +217 -0
- package/dist/test-support/subagents/communication-fixture-controller.d.ts +25 -0
- package/dist/test-support/subagents/communication-fixture-controller.js +163 -0
- package/dist/test-support/subagents/communication-fixture-prompts.d.ts +6 -0
- package/dist/test-support/subagents/communication-fixture-prompts.js +16 -0
- package/dist/test-support/subagents/communication-fixture.d.ts +3 -0
- package/dist/test-support/subagents/communication-fixture.js +109 -0
- package/dist/test-support/subagents/stages.d.ts +30 -0
- package/dist/test-support/subagents/stages.js +146 -0
- package/docs/INDEX.md +47 -0
- package/docs/PROJECT.md +26 -0
- package/docs/architecture/00-overview.md +99 -0
- package/docs/architecture/01-agent-core.md +182 -0
- package/docs/architecture/02-execution.md +359 -0
- package/docs/architecture/03-mission-task.md +220 -0
- package/docs/architecture/04-services.md +476 -0
- package/docs/architecture/05-workspace-continuity.md +192 -0
- package/docs/architecture/06-observability-experiments.md +135 -0
- package/docs/architecture/07-run-configuration.md +279 -0
- package/docs/architecture/08-prompts.md +298 -0
- package/docs/architecture/09-known-boundaries.md +31 -0
- package/docs/architecture/10-service-api-reference.md +4689 -0
- package/docs/architecture/11-storage-reference.md +841 -0
- package/docs/architecture/12-code-coverage.md +811 -0
- package/docs/architecture/13-historical-resume.md +72 -0
- package/docs/architecture/15-core-runtime.md +288 -0
- package/docs/architecture/16-pi-opensandbox-backend.md +213 -0
- package/docs/architecture/17-harness-reporting.md +383 -0
- package/docs/architecture/18-peermesh-harness.md +226 -0
- package/docs/architecture/19-substrate-harness.md +158 -0
- package/docs/architecture/20-lead-worker-harness.md +166 -0
- package/docs/architecture/21-hour-matrix.md +35 -0
- package/docs/architecture/22-website.md +43 -0
- package/docs/architecture/23-project-harness.md +259 -0
- package/docs/architecture/24-runtime-recovery.md +106 -0
- 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 +76 -0
- package/docs/architecture/prompts/01-core-startup.md +105 -0
- package/docs/architecture/prompts/02-task-loop-and-tools.md +268 -0
- package/docs/architecture/prompts/03-runtime-turns.md +22 -0
- package/docs/architecture/prompts/04-runtime-messages.md +28 -0
- package/docs/architecture/prompts/06-tool-return-guidance.md +147 -0
- package/docs/architecture/prompts/07-notes-harness.md +55 -0
- package/docs/architecture/prompts/08-lead-worker-harness.md +177 -0
- package/docs/architecture/prompts/08-peermesh-harness.md +132 -0
- package/docs/architecture/prompts/08-subagents-harness.md +170 -0
- package/docs/architecture/prompts/08-taskpool-harness.md +170 -0
- package/docs/architecture/prompts/09-substrate-harness.md +208 -0
- package/docs/architecture/prompts/10-local-setup-probe.md +47 -0
- package/docs/architecture/prompts/11-first-sdk-harness.md +51 -0
- package/docs/architecture/prompts/14-sdk-handoff.md +53 -0
- package/docs/architecture/prompts/16-parallel-swarm.md +50 -0
- package/docs/architecture/prompts/17-persistent-board.md +21 -0
- package/docs/architecture/prompts/18-agent-control.md +23 -0
- package/docs/architecture/prompts/19-managed-mcp.md +14 -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 +1145 -0
- package/docs/architecture/source-map.json +4494 -0
- package/docs/assets/anyswarm-logo-dark.svg +10 -0
- package/docs/assets/anyswarm-logo-light.svg +10 -0
- package/docs/designs/core-harness/01-core.md +879 -0
- package/docs/designs/core-harness/02-harness.md +975 -0
- package/docs/designs/core-harness/03-delivery-and-validation.md +141 -0
- package/docs/designs/core-harness/04-taskpool-math.md +40 -0
- package/docs/designs/core-harness/05-substrate-fate.md +35 -0
- package/docs/designs/core-harness/06-project-harness.md +80 -0
- package/docs/designs/core-harness/README.md +119 -0
- package/docs/designs/dynamic-lead-worker.md +66 -0
- package/docs/designs/repository-layout.md +228 -0
- package/docs/en/agents.md +186 -0
- package/docs/en/build-your-harness.md +42 -0
- package/docs/en/changelog.md +126 -0
- package/docs/en/concepts.md +34 -0
- package/docs/en/first-harness.md +69 -0
- package/docs/en/gateway.md +49 -0
- package/docs/en/harnesses/index.md +69 -0
- package/docs/en/harnesses/lead-worker.md +126 -0
- package/docs/en/harnesses/peermesh.md +142 -0
- package/docs/en/harnesses/subagents.md +198 -0
- package/docs/en/harnesses/substrate.md +139 -0
- package/docs/en/harnesses/taskpool.md +105 -0
- package/docs/en/latest.md +29 -0
- package/docs/en/overview.md +35 -0
- package/docs/en/quickstart.md +171 -0
- package/docs/en/reference/api.md +190 -0
- package/docs/en/reference/cli.md +171 -0
- package/docs/en/reference/types.md +511 -0
- package/docs/en/runtime.md +228 -0
- package/docs/en/sandbox.md +89 -0
- package/docs/en/services.md +99 -0
- package/docs/en/trace-viewer.md +79 -0
- package/docs/operations/trace-viewer-pastel.png +0 -0
- package/docs/operations/trace-viewer.md +100 -0
- package/docs/third-party-notices.md +16 -0
- package/docs/workflows/development.md +157 -0
- package/docs/workflows/experiment.md +45 -0
- package/docs/workflows/release-and-docs-versioning.md +76 -0
- package/docs/zh/agents.md +186 -0
- package/docs/zh/build-your-harness.md +42 -0
- package/docs/zh/changelog.md +126 -0
- package/docs/zh/concepts.md +36 -0
- package/docs/zh/first-harness.md +69 -0
- package/docs/zh/gateway.md +49 -0
- package/docs/zh/harnesses/index.md +71 -0
- package/docs/zh/harnesses/lead-worker.md +126 -0
- package/docs/zh/harnesses/peermesh.md +142 -0
- package/docs/zh/harnesses/subagents.md +198 -0
- package/docs/zh/harnesses/substrate.md +139 -0
- package/docs/zh/harnesses/taskpool.md +105 -0
- package/docs/zh/latest.md +29 -0
- package/docs/zh/overview.md +35 -0
- package/docs/zh/quickstart.md +171 -0
- package/docs/zh/reference/api.md +190 -0
- package/docs/zh/reference/cli.md +171 -0
- package/docs/zh/reference/types.md +511 -0
- package/docs/zh/runtime.md +228 -0
- package/docs/zh/sandbox.md +89 -0
- package/docs/zh/services.md +99 -0
- package/docs/zh/trace-viewer.md +79 -0
- package/examples/README.md +120 -0
- package/examples/agent-session.ts +63 -0
- 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/first-harness/config.ts +31 -0
- package/examples/first-harness/handoff.ts +41 -0
- package/examples/first-harness/harness.ts +110 -0
- package/examples/first-harness/session.ts +43 -0
- package/examples/first-harness/tsconfig.json +12 -0
- package/examples/harness-session/README.md +27 -0
- package/examples/harness-session/connection.ts +11 -0
- package/examples/harness-session/consume.ts +32 -0
- package/examples/harness-session/package.json +15 -0
- package/examples/harness-session/project.ts +52 -0
- package/examples/harness-session/rpc.ts +8 -0
- package/examples/harness-session/sdk.ts +6 -0
- package/examples/harness-session/terminal.ts +31 -0
- package/examples/harness-session/tsconfig.json +27 -0
- package/examples/lead-worker/README.md +90 -0
- package/examples/lead-worker/dynamic-container.ts +170 -0
- package/examples/lead-worker/harness/dynamic-scheduler.ts +90 -0
- package/examples/lead-worker/harness/dynamic.ts +302 -0
- package/examples/lead-worker/harness/git.ts +130 -0
- package/examples/lead-worker/harness/index.ts +395 -0
- package/examples/lead-worker/harness/prompts.ts +25 -0
- package/examples/lead-worker/harness/team.ts +17 -0
- package/examples/lead-worker/package.json +21 -0
- package/examples/lead-worker/project-config.ts +44 -0
- package/examples/lead-worker/project.ts +63 -0
- package/examples/lead-worker/services/board.ts +202 -0
- package/examples/lead-worker/tsconfig.json +27 -0
- package/examples/messages/README.md +131 -0
- package/examples/messages/handoff-config.ts +47 -0
- package/examples/messages/handoff.ts +218 -0
- package/examples/messages/messages.ts +82 -0
- package/examples/messages/package.json +9 -0
- package/examples/messages/project.ts +90 -0
- package/examples/messages/tsconfig.handoff.json +12 -0
- package/examples/notes/README.md +74 -0
- package/examples/notes/config.ts +36 -0
- package/examples/notes/main.ts +130 -0
- package/examples/notes/notes.ts +43 -0
- package/examples/notes/project.ts +148 -0
- package/examples/parallel-swarm/board-service.ts +95 -0
- package/examples/parallel-swarm/board.ts +35 -0
- package/examples/parallel-swarm/harness.ts +90 -0
- package/examples/peermesh/README.md +127 -0
- package/examples/peermesh/config.ts +12 -0
- package/examples/peermesh/harness/delivery.ts +193 -0
- package/examples/peermesh/harness/index.ts +115 -0
- package/examples/peermesh/harness/provision.ts +168 -0
- package/examples/peermesh/harness/routed.ts +77 -0
- package/examples/peermesh/harness/router.ts +221 -0
- package/examples/peermesh/harness/team.ts +234 -0
- package/examples/peermesh/package.json +21 -0
- package/examples/peermesh/project-config.ts +57 -0
- package/examples/peermesh/project.ts +151 -0
- package/examples/peermesh/services/board-process.ts +54 -0
- package/examples/peermesh/services/event-source.ts +140 -0
- package/examples/peermesh/services/services.ts +181 -0
- package/examples/peermesh/tsconfig.json +27 -0
- package/examples/services/README.md +28 -0
- package/examples/services/agent-control/README.md +23 -0
- package/examples/services/agent-control/flow.sh +12 -0
- package/examples/services/agent-control/main.ts +35 -0
- package/examples/services/agent-control/package.json +9 -0
- package/examples/services/agent-control/run.ts +39 -0
- package/examples/services/agent-control/tsconfig.json +12 -0
- package/examples/services/github-issues/README.md +22 -0
- package/examples/services/github-issues/index.ts +38 -0
- package/examples/services/mathlib-search/Dockerfile +24 -0
- package/examples/services/mathlib-search/README.md +45 -0
- package/examples/services/mathlib-search/SKILL.md +50 -0
- package/examples/services/mathlib-search/main.ts +42 -0
- package/examples/services/mathlib-search/references/loogle.md +12 -0
- package/examples/services/mathlib-search/service.json +64 -0
- package/examples/services/mathlib-search/service.ts +459 -0
- package/examples/services/mathlib-search/tsconfig.json +7 -0
- package/examples/services/mcp-managed/README.md +68 -0
- package/examples/services/mcp-managed/controller.ts +27 -0
- package/examples/services/mcp-managed/host.ts +33 -0
- package/examples/services/mcp-managed/lifecycle.ts +53 -0
- package/examples/services/mcp-managed/mcp-server.ts +44 -0
- package/examples/services/mcp-managed/package.json +11 -0
- package/examples/services/mcp-managed/process-server.ts +18 -0
- package/examples/services/mcp-managed/recovery.ts +81 -0
- package/examples/services/mcp-managed/run.ts +30 -0
- package/examples/services/mcp-managed/service.ts +40 -0
- package/examples/services/mcp-managed/tsconfig.json +12 -0
- package/examples/services/persistent-board/README.md +78 -0
- package/examples/services/persistent-board/business.ts +74 -0
- package/examples/services/persistent-board/index.ts +97 -0
- package/examples/services/persistent-board/interface.ts +16 -0
- package/examples/services/persistent-board/live.ts +54 -0
- package/examples/services/persistent-board/package.json +9 -0
- package/examples/services/persistent-board/python/board.py +36 -0
- package/examples/services/persistent-board/python/server.py +69 -0
- package/examples/services/persistent-board/run.ts +95 -0
- package/examples/services/persistent-board/tsconfig.json +12 -0
- package/examples/subagents/README.md +109 -0
- package/examples/subagents/business.ts +204 -0
- package/examples/subagents/config.ts +38 -0
- package/examples/subagents/harness/controller.ts +757 -0
- package/examples/subagents/main.ts +65 -0
- package/examples/subagents/package.json +21 -0
- package/examples/subagents/project.ts +136 -0
- package/examples/subagents/prompts/prompts.ts +9 -0
- package/examples/subagents/services/collaboration-service.ts +103 -0
- package/examples/subagents/tsconfig.json +27 -0
- package/examples/substrate/README.md +84 -0
- package/examples/substrate/config.ts +9 -0
- package/examples/substrate/harness/collaboration-evidence.ts +46 -0
- package/examples/substrate/harness/index.ts +212 -0
- package/examples/substrate/main.ts +37 -0
- package/examples/substrate/package.json +21 -0
- package/examples/substrate/project-config.ts +38 -0
- package/examples/substrate/project.ts +61 -0
- package/examples/substrate/services/substrate.ts +117 -0
- package/examples/substrate/tsconfig.json +27 -0
- 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/README.md +53 -0
- package/examples/taskpool/cli.ts +177 -0
- package/examples/taskpool/config.ts +36 -0
- package/examples/taskpool/deploy/service-hosts/Dockerfile +34 -0
- package/examples/taskpool/deploy/service-hosts/README.md +119 -0
- package/examples/taskpool/deploy/service-hosts/compose.yaml +78 -0
- package/examples/taskpool/deploy/service-hosts/context-service-peer.ts +59 -0
- package/examples/taskpool/deploy/service-hosts/coordinator-peer-client.ts +63 -0
- package/examples/taskpool/deploy/service-hosts/coordinator-peer-host.ts +17 -0
- package/examples/taskpool/deploy/service-hosts/independent-services.ts +137 -0
- package/examples/taskpool/deploy/service-hosts/judge-peer-entrypoint.sh +8 -0
- package/examples/taskpool/deploy/service-hosts/judge-service-peer.ts +117 -0
- package/examples/taskpool/deploy/service-hosts/peer-process-lifetime.ts +25 -0
- package/examples/taskpool/deploy/service-hosts/remote-context-service.ts +70 -0
- package/examples/taskpool/deploy/service-hosts/remote-judge-service.ts +130 -0
- package/examples/taskpool/deploy/service-hosts/service-adapter.ts +164 -0
- package/examples/taskpool/deploy/service-hosts/service-authority-snapshot.ts +85 -0
- package/examples/taskpool/deploy/service-hosts/service-bundle.ts +236 -0
- package/examples/taskpool/deploy/service-hosts/service-commit-gate.ts +74 -0
- package/examples/taskpool/deploy/service-hosts/service-host-entrypoint.sh +20 -0
- package/examples/taskpool/deploy/service-hosts/service-host.ts +222 -0
- package/examples/taskpool/deploy/service-hosts/service-manifest.ts +184 -0
- package/examples/taskpool/deploy/service-hosts/service-registry.ts +473 -0
- package/examples/taskpool/deploy/service-hosts/start-context-service-peer.ts +9 -0
- package/examples/taskpool/deploy/service-hosts/start-judge-service-peer.ts +22 -0
- package/examples/taskpool/deploy/service-hosts/start-service-host.ts +157 -0
- package/examples/taskpool/deploy/service-hosts/tsconfig.json +9 -0
- package/examples/taskpool/errors.ts +52 -0
- package/examples/taskpool/harness/agent-coordinator.ts +50 -0
- package/examples/taskpool/harness/controller.ts +537 -0
- package/examples/taskpool/harness/harness.ts +120 -0
- package/examples/taskpool/harness/prepare-inputs.ts +69 -0
- package/examples/taskpool/harness/task-handoff.ts +121 -0
- package/examples/taskpool/package.json +21 -0
- package/examples/taskpool/persistence/envelope.ts +79 -0
- package/examples/taskpool/persistence/service-history.ts +227 -0
- package/examples/taskpool/persistence/service-peer-schema.ts +20 -0
- package/examples/taskpool/project.ts +180 -0
- package/examples/taskpool/prompts/agent-contract.ts +48 -0
- package/examples/taskpool/services/builtin-registry.ts +243 -0
- package/examples/taskpool/services/judge/check-result.ts +326 -0
- package/examples/taskpool/services/judge/checker-owner.ts +89 -0
- package/examples/taskpool/services/judge/checker-process-limits.ts +153 -0
- package/examples/taskpool/services/judge/final-tree-deployment.ts +247 -0
- package/examples/taskpool/services/judge/final-tree-proof.lean +45 -0
- package/examples/taskpool/services/judge/fixture.ts +42 -0
- package/examples/taskpool/services/judge/judge-schema.ts +88 -0
- package/examples/taskpool/services/judge/judge-service.ts +900 -0
- package/examples/taskpool/services/judge/lean-adapter.ts +375 -0
- package/examples/taskpool/services/judge/lean-final-tree-verifier.ts +629 -0
- package/examples/taskpool/services/judge/lean-module-build.lean +28 -0
- package/examples/taskpool/services/judge/lean-module-checker.ts +217 -0
- package/examples/taskpool/services/judge/lean-module-verify.LICENSE.txt +71 -0
- package/examples/taskpool/services/judge/lean-module-verify.NOTICE.md +33 -0
- package/examples/taskpool/services/judge/lean-module-verify.lean +51 -0
- package/examples/taskpool/services/judge/lean-source-policy.ts +92 -0
- package/examples/taskpool/services/judge/lock-final-tree-checker.ts +13 -0
- package/examples/taskpool/services/judge/workspace-check-source.ts +31 -0
- package/examples/taskpool/services/material/context-schema.ts +104 -0
- package/examples/taskpool/services/material/context-service.ts +899 -0
- package/examples/taskpool/services/mathlib/mathlib-service.ts +50 -0
- package/examples/taskpool/services/mathlib/search-contract.ts +65 -0
- package/examples/taskpool/services/mission/coordination-permissions.ts +9 -0
- package/examples/taskpool/services/mission/manual-mission-review.ts +102 -0
- package/examples/taskpool/services/mission/mission-coordination.ts +77 -0
- package/examples/taskpool/services/mission/mission-service.ts +81 -0
- package/examples/taskpool/services/mission/mission-submission-access.ts +18 -0
- package/examples/taskpool/services/mission/mission-submission.ts +673 -0
- package/examples/taskpool/services/mission/review-mission.ts +56 -0
- package/examples/taskpool/services/service-catalog.ts +410 -0
- package/examples/taskpool/services/task/agent-service.ts +185 -0
- package/examples/taskpool/services/task/execution-budget.ts +21 -0
- package/examples/taskpool/services/task/schema.ts +313 -0
- package/examples/taskpool/services/task/task-service.ts +2615 -0
- package/examples/taskpool/services/task/task-types.ts +5 -0
- package/examples/taskpool/services/workspace/execution-workspace.ts +498 -0
- package/examples/taskpool/services/workspace/mission-workspace.ts +818 -0
- package/examples/taskpool/services/workspace/publication-services.ts +381 -0
- package/examples/taskpool/services/workspace/workspace-contract.ts +182 -0
- package/examples/taskpool/services/workspace/workspace-manager.ts +360 -0
- package/examples/taskpool/services/workspace/workspace-merge.ts +100 -0
- package/examples/taskpool/services/workspace/workspace-public-reads.ts +15 -0
- package/examples/taskpool/services/workspace/workspace-publication.ts +23 -0
- package/examples/taskpool/services/workspace/workspace-repository.ts +361 -0
- package/examples/taskpool/tsconfig.json +27 -0
- package/npm-shrinkwrap.development.json +2199 -0
- package/npm-shrinkwrap.json +344 -0
- package/package.development.json +92 -0
- package/package.json +84 -4
- package/scripts/anyswarm-applications.ts +39 -0
- package/scripts/anyswarm-arguments.ts +170 -0
- 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 +324 -0
- package/scripts/anyswarm-launch.ts +108 -0
- package/scripts/anyswarm-project.ts +247 -0
- 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 +126 -0
- package/scripts/build.ts +64 -0
- package/scripts/check-architecture.ts +89 -0
- package/scripts/codex-app-server-driver.ts +254 -0
- package/scripts/core-session-fork.ts +80 -0
- package/scripts/core-work-dir.ts +279 -0
- package/scripts/generate-architecture-api.ts +110 -0
- package/scripts/generate-architecture-coverage.ts +85 -0
- package/scripts/generate-architecture-prompts.ts +443 -0
- package/scripts/git-credential-peermesh.ts +29 -0
- package/scripts/local-environment.ts +458 -0
- package/scripts/local-setup-smoke.ts +214 -0
- package/scripts/local-setup-upstream.ts +124 -0
- package/scripts/local-setup-worker.ts +130 -0
- package/scripts/local-setup.ts +490 -0
- package/scripts/opensandbox-agent-worker.ts +765 -0
- package/scripts/pack-release.ts +67 -0
- package/scripts/pi-message-identity.ts +122 -0
- package/scripts/pi-rpc-submissions.ts +2 -0
- package/scripts/pi-service-tools.ts +124 -0
- package/scripts/pi-session-bridge.ts +199 -0
- package/scripts/pi-session-controller.ts +252 -0
- package/scripts/pi-session-diagnostics.ts +38 -0
- package/scripts/project-install.ts +320 -0
- package/scripts/project-processes.ts +50 -0
- package/scripts/read-harness-result.ts +28 -0
- package/scripts/rpc-submissions.ts +107 -0
- package/scripts/run-harness.ts +61 -0
- package/scripts/sandbox-project.ts +235 -0
- package/scripts/setup +13 -0
- package/scripts/setup-bootstrap.ts +171 -0
- package/scripts/swarm.ts +15 -0
- package/scripts/test-focused.ts +45 -0
- package/scripts/worker-executor-adapter.ts +41 -0
- package/src/cli/foreground-harnesses.ts +96 -0
- package/src/cli/swarm-cli.ts +464 -0
- package/src/core/agent-service.ts +189 -0
- package/src/core/allocation-ledger.ts +632 -0
- package/src/core/artifact-collection.ts +197 -0
- package/src/core/backend-config.ts +107 -0
- package/src/core/bridge.ts +343 -0
- package/src/core/config.ts +133 -0
- package/src/core/error-diagnostics.ts +123 -0
- package/src/core/executor-adapter.ts +49 -0
- package/src/core/file-controls.ts +193 -0
- package/src/core/file-policy.ts +58 -0
- package/src/core/files/core-collection.ts +167 -0
- package/src/core/files/core-file-seed.ts +162 -0
- package/src/core/files/file-tree-stream.ts +159 -0
- package/src/core/host-identity.ts +11 -0
- package/src/core/index.ts +1550 -0
- package/src/core/input-ledger.ts +26 -0
- package/src/core/mcp-service.ts +226 -0
- package/src/core/model/chat-completions-transport.ts +111 -0
- package/src/core/model/model-access.ts +282 -0
- package/src/core/model/model-catalog.ts +76 -0
- package/src/core/model/model-request-validation.ts +32 -0
- package/src/core/model/model-trace.ts +55 -0
- package/src/core/model/model-transport.ts +59 -0
- package/src/core/model/responses-budget-gateway.ts +623 -0
- package/src/core/operation-queue.ts +71 -0
- package/src/core/run-records.ts +244 -0
- package/src/core/runtime-admissions.ts +34 -0
- package/src/core/runtime-callback.ts +61 -0
- package/src/core/runtime-management.ts +719 -0
- package/src/core/sandbox/executor-driver.ts +138 -0
- package/src/core/sandbox/local-executor.ts +207 -0
- package/src/core/sandbox/local-worker.ts +175 -0
- package/src/core/sandbox/opensandbox-backend.ts +1243 -0
- package/src/core/sandbox/opensandbox-manager.ts +901 -0
- package/src/core/sandbox/opensandbox-metadata.ts +10 -0
- package/src/core/sandbox/opensandbox-provider.ts +74 -0
- package/src/core/sandbox/opensandbox-sdk.ts +89 -0
- package/src/core/sandbox/sandbox-connection.ts +225 -0
- package/src/core/sandbox/sandbox-validation.ts +53 -0
- package/src/core/sandbox/worker-client.ts +549 -0
- package/src/core/service-lifecycle-types.ts +43 -0
- package/src/core/service-live-state.ts +156 -0
- package/src/core/service-observation-types.ts +39 -0
- package/src/core/service-process.ts +166 -0
- package/src/core/service-trace.ts +81 -0
- package/src/core/service-types.ts +111 -0
- package/src/core/services.ts +696 -0
- package/src/core/session-config.ts +58 -0
- package/src/core/session-controls.ts +198 -0
- package/src/core/session-types.ts +113 -0
- package/src/core/startup-prompt.ts +33 -0
- package/src/core/types.ts +444 -0
- package/src/core/worker-control.ts +81 -0
- package/src/core/worker-event-poll.ts +43 -0
- package/src/core/worker-event-stream.ts +154 -0
- package/src/core/worker-image.ts +43 -0
- package/src/errors.ts +31 -0
- package/src/harness/foreground-commands.ts +135 -0
- package/src/harness/git-tree.ts +73 -0
- package/src/harness/harness-event-stream.ts +108 -0
- package/src/harness/harness-session-types.ts +177 -0
- package/src/harness/harness-session-view.ts +97 -0
- package/src/harness/harness-session.ts +672 -0
- package/src/harness/http.ts +32 -0
- package/src/harness/input-admission.ts +42 -0
- package/src/harness/owned-resources.ts +41 -0
- package/src/harness/project-git.ts +50 -0
- package/src/harness/project-harness.ts +399 -0
- package/src/harness/project-input.ts +368 -0
- package/src/harness/project-rpc-client.ts +258 -0
- package/src/harness/project-rpc-lines.ts +64 -0
- package/src/harness/project-rpc.ts +304 -0
- package/src/harness/project-runtime.ts +109 -0
- package/src/harness/read-result.ts +83 -0
- package/src/harness/run-input.ts +103 -0
- package/src/harness/run-report.ts +107 -0
- package/src/harness/typescript-loader.ts +37 -0
- package/src/protocol/http-request.ts +47 -0
- package/src/protocol/session-queries.ts +7 -0
- package/src/protocol/stable-json.ts +5 -0
- package/src/trace-viewer/command.mjs +75 -0
- package/src/trace-viewer/public/app.js +2939 -0
- package/src/trace-viewer/public/fonts/departure-mono.woff2 +0 -0
- package/src/trace-viewer/public/fonts/inter.woff2 +0 -0
- package/src/trace-viewer/public/fonts/space-grotesk.woff2 +0 -0
- package/src/trace-viewer/public/index.html +312 -0
- package/src/trace-viewer/public/licenses/departure-mono.txt +93 -0
- package/src/trace-viewer/public/licenses/inter.txt +93 -0
- package/src/trace-viewer/public/licenses/space-grotesk.txt +93 -0
- package/src/trace-viewer/public/style.css +1436 -0
- package/src/trace-viewer/reader.mjs +1932 -0
- package/src/trace-viewer/server.mjs +191 -0
- package/test-support/drop-peer-response.ts +19 -0
- package/test-support/judge-peer-fixture.ts +32 -0
- package/test-support/opensandbox-sdk-fixture.ts +28 -0
- package/test-support/project-install-rollback-probe.ts +92 -0
- package/test-support/sandbox-project-probe.ts +208 -0
- package/test-support/subagents/communication-fixture-controller.ts +107 -0
- package/test-support/subagents/communication-fixture-prompts.ts +19 -0
- package/test-support/subagents/communication-fixture.ts +89 -0
- package/test-support/subagents/stages.ts +107 -0
- package/tsconfig.json +19 -0
package/.dockerignore
ADDED
package/.env.example
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Copy to a private .env, edit the entries you need, and export them before launch:
|
|
2
|
+
# set -a; . ./.env; set +a
|
|
3
|
+
# Configured commands also load an adjacent .env without replacing exported values.
|
|
4
|
+
# Keep credentials in the private file or your host secret store.
|
|
5
|
+
|
|
6
|
+
# Shared defaults read by built-in CLI Harnesses and SDK examples.
|
|
7
|
+
# The Worker image defaults to DEFAULT_WORKER_IMAGE for this SDK version.
|
|
8
|
+
# ANYSWARM_EXECUTOR=pi
|
|
9
|
+
# ANYSWARM_MODEL_PROVIDER=openai
|
|
10
|
+
# ANYSWARM_MODEL_ID=gpt-5.4
|
|
11
|
+
# ANYSWARM_MODEL_URL=https://api.openai.com/v1/responses
|
|
12
|
+
# ANYSWARM_MODEL_TOKEN=
|
|
13
|
+
# ANYSWARM_WORKER_IMAGE=ghcr.io/luna-shi/anyswarm-worker:0.4.0
|
|
14
|
+
# ANYSWARM_ADVERTISE_HOST=172.17.0.1
|
|
15
|
+
# ANYSWARM_LIFECYCLE_URL=http://127.0.0.1:8080/v1
|
|
16
|
+
# ANYSWARM_ENDPOINT_HOST=127.0.0.1
|
|
17
|
+
# ANYSWARM_LIFECYCLE_TOKEN=
|
|
18
|
+
#
|
|
19
|
+
# Per-Harness connection aliases (e.g. ANYSWARM_SUBAGENTS_*, ANYSWARM_NOTES_*) are
|
|
20
|
+
# fallbacks after the shared variables above.
|
|
21
|
+
# Other Environments receive image, model and backend settings through their
|
|
22
|
+
# trusted configuration module; see their example and Architecture chapter 07.
|
|
23
|
+
|
|
24
|
+
# Optional OpenSandbox manager defaults when the host omits explicit tokens.
|
|
25
|
+
# The Notes lifecycle token above is its explicit sandbox API credential.
|
|
26
|
+
# OPEN_SANDBOX_API_KEY=
|
|
27
|
+
# ANYSWARM_EXECD_ACCESS_TOKEN=
|
|
28
|
+
|
|
29
|
+
# Optional independently deployed Mathlib Search provider.
|
|
30
|
+
# MATHLIB_SEARCH_UPSTREAM_URL=http://loogle:8080
|
|
31
|
+
# MATHLIB_SEARCH_SOURCE_ROOT=/mounted/mathlib
|
|
32
|
+
# MATHLIB_SEARCH_PUBLIC_URL=http://mathlib-search:8787
|
|
33
|
+
# MATHLIB_SEARCH_TOKEN=
|
|
34
|
+
# MATHLIB_REVISION=locked-mathlib-revision
|
|
35
|
+
# LEAN_VERSION=locked-lean-toolchain
|
|
36
|
+
|
|
37
|
+
# Standalone service host (scripts/service-host.mjs): peer endpoints and mode.
|
|
38
|
+
# These values configure that host; they do not register Services in a Runtime.
|
|
39
|
+
# ANYSWARM_TASK_SERVICE_URL=http://task:8787
|
|
40
|
+
# ANYSWARM_CONTEXT_SERVICE_URL=http://context:8787
|
|
41
|
+
# ANYSWARM_JUDGE_SERVICE_URL=http://judge:8787
|
|
42
|
+
# ANYSWARM_CATALOG_SERVICE_URL=http://catalog:8787
|
|
43
|
+
# ANYSWARM_SERVICE_ISOLATED=true
|
package/.gitmodules
ADDED
package/AGENTS.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# AnySwarm — Coding Agent Instructions
|
|
2
|
+
|
|
3
|
+
These instructions apply to **Coding Agents developing AnySwarm**, not research Agents running inside it. They define the human/Agent decision boundary and the project-specific rules for using the installed **Matt Pocock engineering skills**.
|
|
4
|
+
|
|
5
|
+
## Current architecture and work requirements
|
|
6
|
+
|
|
7
|
+
The [architecture manual](docs/architecture/INDEX.md) is the maintained description of the current implementation. The [SDK and user guides](docs/INDEX.md) describe its supported public surface and are also the website's content source. Current code and schemas establish exact behavior; tests and experiments establish what has been verified. Keep these sources aligned in the same PR.
|
|
8
|
+
|
|
9
|
+
The [Core / Harness design](docs/designs/core-harness/README.md) and its linked extensions record reviewed product requirements and acceptance. Read them together with the relevant Issue and the owner's later explicit decisions; a later explicit decision supersedes an older conflicting clause without changing unrelated acceptance or resource limits. When an authorized change updates the design, include the design, implementation, migration, tests and documentation in the same PR. The design index links the [dynamic Lead-Worker extension](docs/designs/dynamic-lead-worker.md) and the open CLI/TUI work; current implemented behavior belongs in Architecture.
|
|
10
|
+
|
|
11
|
+
Human-approved GitHub Issues and explicit user instructions define work requirements, scope, acceptance and resources. Read the full relevant Issue, linked tickets, comments and accepted Agent Brief. Cite the exact revision of any reviewed design and preserve its acceptance. Superseded phase plans remain in Git history and linked Issues. Resource, research, merge and publication permissions follow the project rules below.
|
|
12
|
+
|
|
13
|
+
Use one Issue per complete implementation PR unless the owner explicitly requests a different split. Keep approvals, progress, dependencies and handoffs on GitHub. When source, the current manual and the approved change disagree, identify the discrepancy and resolve it within the authorized scope. Start from [docs/INDEX.md](docs/INDEX.md), [GLOSSARY.md](GLOSSARY.md), then the relevant source and tests; do not load every document by default.
|
|
14
|
+
|
|
15
|
+
## Human decisions and delegated autonomy
|
|
16
|
+
|
|
17
|
+
The human owner decides which research questions are valuable, their priority, what an Issue must deliver, and how success will be judged. Agents may propose new hypotheses with evidence but **must not select and execute a new research direction** without approval.
|
|
18
|
+
|
|
19
|
+
Within an approved Issue, an Agent may select implementation details and autonomously iterate **implement → review → test/probe → diagnose → fix → retest**. Use isolated branches/worktrees, not `main`. Create every new linked worktree under the primary repository checkout's `.worktree/<task-or-branch>/` directory. Do not create worktrees beside the primary checkout or nest them under another linked worktree. Keep `/.worktree/` ignored; existing active worktrees must not be relocated while a run or process still depends on their paths. Repeated deterministic checks and bounded diagnostic probes need no per-run human report or new approval when their environment, provider/model, budget, and time limits are already authorized.
|
|
20
|
+
|
|
21
|
+
For a change not already authorized by an explicit owner instruction or the applicable Issue, return to the Issue for human review before changing intended behavior, acceptance criteria, architecture scope, research hypotheses, benchmark/checker/fixture, provider/model, or resource budget. Paid/external experiments require explicit authorization or a previously approved allowance. Technical difficulty does not confer permission to widen the Issue.
|
|
22
|
+
|
|
23
|
+
## Default engineering workflow — Matt skills
|
|
24
|
+
|
|
25
|
+
Follow the **installed skills** when applicable; do not claim a skill ran if it is unavailable. These skills govern the engineering *procedure*, not product requirements or research approval.
|
|
26
|
+
|
|
27
|
+
- **`/to-spec`**: turn the agreed scope into a GitHub spec Issue using the current architecture, glossary, applicable reviewed design and later explicit owner decisions. Link the exact design revision and distinguish confirmed direction from proposals awaiting review.
|
|
28
|
+
- **`/to-tickets`** (optional): propose complete vertical slices with blocking edges; obtain human agreement before publishing GitHub sub-Issues and dependencies. Keep the agreed one-Issue/one-PR boundary unless the owner requests another split.
|
|
29
|
+
- **`/implement`**: implement one Issue or ticket, use **`/tdd`** at pre-agreed public seams, run relevant checks, and finish with **`/code-review`**.
|
|
30
|
+
- **`/implement-spec`**: implement an approved Issue/ticket graph on an integration branch with per-ticket branches/worktrees and fresh contexts where supported. Track dependencies on GitHub, not in local Markdown.
|
|
31
|
+
- **`/diagnosing-bugs`**: reproduce, minimize, instrument, fix, and regression-test difficult failures.
|
|
32
|
+
- **`/code-review`**: evaluate **Spec** against the applicable approved Issue/Agent Brief, its reviewed design revision and later explicit owner decisions. Evaluate **Standards** (repository conventions and code quality) separately.
|
|
33
|
+
- **`/pr`**: present a concise Summary, before/after Evidence, and Merge Danger (reversibility and blast radius).
|
|
34
|
+
|
|
35
|
+
An explicit request to invoke a skill permits its normal in-scope operations; it does **not** authorize unapproved spending, new research goals, unrelated Issue changes, or merging PRs.
|
|
36
|
+
|
|
37
|
+
## Verification, evidence, and closeout
|
|
38
|
+
|
|
39
|
+
- During local implementation, use `npm run test:focus -- <test-file-or-glob> ...` for changed behavior and affected callers. Run `git diff --check` for changes. For a merge candidate, verify the full Core CI result whenever CI selects it. Use local `npm test` when the Issue requires it, when reproducing a suite-wide failure, or when full CI cannot supply the required result.
|
|
40
|
+
- Pin the implementation commit and validate affected Agent/Bridge/Service/Runtime paths, authorization, idempotency, fencing, checker integrity, privacy, and cleanup as relevant. Report skipped checks honestly.
|
|
41
|
+
- Formal research runs follow [the experiment workflow](docs/workflows/experiment.md) and [historical evidence guidance](https://github.com/AnySwarm/anyswarm/blob/dc011003fa0354a881b7a3ba9ba901fe36cbcac9/.codex/skills/experiment-analysis/SKILL.md). Ordinary in-scope tests and diagnostic probes do not require an EXP ID or individual report.
|
|
42
|
+
- At meaningful milestones, link commits, tests/probes, PR review findings, real-run evidence, and remaining gaps **to the GitHub Issue/PR**; the Issue/PR remains the record of progress. Do not require human review after every debugging iteration.
|
|
43
|
+
- Update affected [Architecture](docs/architecture/INDEX.md) in the implementation PR, ready for review with the code. Reconcile the complete affected flow at Issue/stage closeout; documentation is part of completion. Never describe an unverified proposal as accepted or a passing tool call as scientific progress.
|
|
44
|
+
- Use plain **Results / Analysis / Next steps** in formal research reporting. Keep observations distinct from interpretations and unapproved recommendations.
|
|
45
|
+
- Keep raw Agent conversations, proof/candidate source, credentials, stdout/stderr, private state databases, and personal paths out of committed reports. Store raw experiment evidence only in ignored local `experiments/`.
|
|
46
|
+
- Keep active target designs in `docs/designs/`, linked to their Issue and review PR and clearly marked as pending implementation. Reconcile implemented behavior into Architecture and retire superseded plans through Git history. Do not create `STATUS.md`, `archive/`, historical redirect files, or `CONTEXT.md`.
|
|
47
|
+
- Do not merge PRs, close unrelated Issues, or run unapproved paid experiments without the user's authorization.
|
|
48
|
+
|
|
49
|
+
## Architecture documentation is a required deliverable
|
|
50
|
+
|
|
51
|
+
The owner reads `docs/architecture/` to understand the implementation **without reading source code**. It must be a complete implementation manual, not only module summaries or pointers to source. Code references support verification; they must not replace the explanation.
|
|
52
|
+
|
|
53
|
+
- For every runtime-affecting change, explain the entry point, call/event order, inputs and defaults, guards, state/storage writes, outputs, failure/retry/timeout behavior, cleanup, and observable evidence. Cover compatibility paths still executable in the reviewed tree and distinguish them from approved pending changes.
|
|
54
|
+
- Maintain the explicit file-to-chapter inventory in [source-map.json](docs/architecture/source-map.json). New or removed runtime, CLI, service, configuration, storage, UI or build files require a deliberate inventory update. A file mapping is a coverage aid, not proof that every behavior has been explained.
|
|
55
|
+
- Maintain full repository-controlled prompt text, composition conditions, dynamic field provenance and actual send paths in [Prompts](docs/architecture/08-prompts.md). Include discovery, ordinary turns, tool instructions, feedback, lifecycle rejection, notification, recovery, compaction/rotation and legacy paths. Distinguish composed snapshots from messages actually sent; external Pi/provider context is not recoverable from repository templates alone.
|
|
56
|
+
- Regenerate the prompt/API/storage references and source fingerprints with `npm run docs:generate`; then run `npm run docs:check` and `git diff --check`. Read the generated diff and update the explanatory chapters as well. Do not treat regeneration or a successful check as semantic approval.
|
|
57
|
+
- The implementation PR must link changed code areas to the changed architecture chapters, report the checks performed, and identify implemented limitations or unresolved discrepancies. If a change has no architecture effect, state the reason. At stage closeout, verify the final merged code revision, generated references, narrative, Issue acceptance and linked verification evidence together.
|
|
58
|
+
- Keep historical experiment reports in Git history. Register new formal runs and link reviewed conclusions in their originating Issue/PR; retain raw evidence only in ignored local directories. Explain current rationale and tradeoffs alongside the relevant architecture. Active designs explain a reviewed change; Architecture explains what actually runs. An accepted design is not evidence of implementation or successful research.
|
|
59
|
+
|
|
60
|
+
## Engineering record conventions
|
|
61
|
+
|
|
62
|
+
GitHub Issues and PRs in [AnySwarm/anyswarm](https://github.com/AnySwarm/anyswarm) own execution briefs, scope, dependencies, progress and evidence. Read the relevant Issue's body, comments, labels, linked tickets and accepted Agent Brief before implementing. Explicit user instructions take precedence over older plans. Record a reviewed design's exact revision when the Issue relies on it, and keep a requirement change with its implementation PR. Use structured tool arguments or `gh --body-file` for multiline text.
|
|
63
|
+
|
|
64
|
+
A readiness label records triage state; it does not independently authorize a new research question, spending, merging or publication. The repository uses these labels when they are needed:
|
|
65
|
+
|
|
66
|
+
| State | Label |
|
|
67
|
+
| --- | --- |
|
|
68
|
+
| Maintainer evaluation required | `needs-triage` |
|
|
69
|
+
| More information needed | `needs-info` |
|
|
70
|
+
| Scope sufficiently clear for implementation | `ready-for-agent` |
|
|
71
|
+
| Human decision or intervention required | `ready-for-human` |
|
|
72
|
+
| Work will not be pursued | `wontfix` |
|
|
73
|
+
|
|
74
|
+
Use [GLOSSARY.md](GLOSSARY.md), the [architecture manual](docs/architecture/INDEX.md) and the [SDK guides](docs/INDEX.md) for domain language. Mission, Task, Execution, Material and Workspace belong to TaskPool; other Harnesses do not need them. The English and Chinese guides are also the website source. Keep API examples aligned with public exports and runnable examples. The [development workflow](docs/workflows/development.md) contains the build and validation commands.
|
package/GLOSSARY.md
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# AnySwarm glossary
|
|
2
|
+
|
|
3
|
+
These terms describe the current implementation. Read [How AnySwarm works](docs/en/concepts.md) for the relationships and the [implementation manual](docs/architecture/INDEX.md) for exact behavior. TaskPool terms apply to that Harness and its domain Services; they are not prerequisites for using the Core SDK.
|
|
4
|
+
|
|
5
|
+
## Core and SDK
|
|
6
|
+
|
|
7
|
+
| Term | Meaning |
|
|
8
|
+
| --- | --- |
|
|
9
|
+
| **Harness** | The host application that composes Profiles, Services and a collaboration policy. It chooses when to create Agents, route work, check results and finish. |
|
|
10
|
+
| **HarnessContext** | The SDK-supplied argument to `Harness.run`. It carries captured input, the Run signal, and the registration callbacks for business input, observations and questions. |
|
|
11
|
+
| **HarnessSession** | The public handle for one foreground Harness Run. SDK and RPC clients share its admission, member controls, questions, live state and completion. |
|
|
12
|
+
| **Core** | The reusable library exposed through the `@anyswarm/core` package. Its root entry provides Sandbox and Runtime creation, Service author APIs and public types. |
|
|
13
|
+
| **Runtime** | One live Core instance managing its Agents, capacity, authenticated Service access, input delivery, observation and cleanup. |
|
|
14
|
+
| **Run** | One execution of a Harness, identified by the HarnessSession’s `runId`. It can use zero or more Runtimes, each with its own identity. |
|
|
15
|
+
| **Agent** | A Runtime-owned execution identity with its own Sandbox, working directory and Session. A settled Agent can receive another input. |
|
|
16
|
+
| **Profile** | A named Agent configuration containing its added system prompt, model, image, local tools, Service grants and optional control/file settings. Runtime creation captures its definition. A host can register additional immutable definitions during the Run. |
|
|
17
|
+
| **Backend** | The execution and resource integration used by the Runtime. The Runtime resolves the executor during assembly and uses a Sandbox Provider to allocate and control Agent resources. |
|
|
18
|
+
| **Executor** | The Agent implementation running inside the Sandbox: a supported Pi or Codex version, or an image-installed adapter. Capabilities such as context fork differ between executors. |
|
|
19
|
+
| **Sandbox** | An Agent's isolated execution environment. The public `createSandbox` factory registers reusable OpenSandbox connection settings or a trusted Provider implementation. |
|
|
20
|
+
| **Worker** | The container image and guest-side programs that implement the AnySwarm execution protocol, tools and selected executor. |
|
|
21
|
+
| **Sandbox Provider** | Trusted integration implementing Sandbox readiness, allocation, Worker transport, file transfer and cleanup. The default Provider connects through the OpenSandbox API. |
|
|
22
|
+
| **Slot** | One unit of a Runtime's configured Agent capacity. An idle or settled Agent still occupies it; confirmed cleanup releases it. |
|
|
23
|
+
| **Session** | An Agent's conversation and executor context retained across input turns. A Session is distinct from the current execution activity. |
|
|
24
|
+
| **Agent session controls** | The Runtime's `session` methods for one Agent's effective settings, messages, statistics, compaction, retry and queues. A HarnessSession exposes the operations the Harness has authorized for its members. |
|
|
25
|
+
| **Working directory** | An Agent's project files, private by default. A Harness can explicitly select a shared workspace or publish files through its Services. |
|
|
26
|
+
| **Service** | A named business capability with an operation interface and an adapter. Its business implementation may hold collaboration state or run in an existing application. |
|
|
27
|
+
| **Service Registry** | Host collection of Service definitions, names, and default tool modes used to assemble a Runtime. |
|
|
28
|
+
| **Tool** | An executor-native function. A backend provides local tools such as file operations. A Service tool calls a granted operation through the Host Bridge. |
|
|
29
|
+
| **Service reply** | The business result or public error with optional content and Bridge metadata identifying the logical operation, attempt and outcome. |
|
|
30
|
+
| **Bridge** | The trusted host boundary that authenticates Agent calls, discovers permitted operations, validates requests and invokes Service adapters. |
|
|
31
|
+
| **Model gateway** | The host handler for configured model requests, credentials, access checks and traces. It shares the Runtime callback listener with the authenticated Service Bridge and checks its own scoped credentials and budgets. |
|
|
32
|
+
|
|
33
|
+
## Inputs, observations and results
|
|
34
|
+
|
|
35
|
+
| Term | Meaning |
|
|
36
|
+
| --- | --- |
|
|
37
|
+
| **Request ID** | A caller-supplied identity for an operation that supports deduplication. Retry an uncertain request with the same identity and parameters. |
|
|
38
|
+
| **Input receipt** | The result of submitting input: accepted, unknown, or conditionally not accepted. An accepted receipt describes admission, not task correctness. |
|
|
39
|
+
| **Steer** | Input offered while the Agent is working, subject to the executor's supported steering modes. It is the default `send` mode. |
|
|
40
|
+
| **Follow-up** | Input queued for a subsequent execution opportunity. The API spelling is `followUp`. |
|
|
41
|
+
| **Settled** | The executor has stopped automatically continuing its current activity. The Agent, Session and Slot remain; the Harness still decides whether the task succeeded. |
|
|
42
|
+
| **Runtime event** | A live notification delivered through `onEvent`. Query current state through `get`, `list` or `runtime.state`. Persisted Worker ordering belongs to Run diagnostics. |
|
|
43
|
+
| **Business outcome** | The Harness's decision that its job completed, failed or was cancelled. It is recorded separately from cleanup and artifact verification. |
|
|
44
|
+
| **Artifact verification** | A host check of exported results. The bundled application finalizer records whether the configured check passed, failed, timed out or was not requested. |
|
|
45
|
+
| **Cleanup receipt** | A statement of confirmed execution/resource cleanup and anything pending or retained. A timeout does not prove that a resource was destroyed. |
|
|
46
|
+
|
|
47
|
+
See [Runtime](docs/en/runtime.md), [Agents & Profiles](docs/en/agents.md), [SDK & API Reference](docs/en/reference/api.md) and [types reference](docs/en/reference/types.md) for the actual method signatures and status values.
|
|
48
|
+
|
|
49
|
+
## TaskPool domain
|
|
50
|
+
|
|
51
|
+
TaskPool organizes work through a Mission and exclusive Task ownership. The current contracts are described in [Mission and Task](docs/architecture/03-mission-task.md), [Services](docs/architecture/04-services.md) and [Workspace](docs/architecture/05-workspace-continuity.md).
|
|
52
|
+
|
|
53
|
+
| Term | Meaning |
|
|
54
|
+
| --- | --- |
|
|
55
|
+
| **Mission** | The shared objective, resource boundary and final acceptance scope. A Mission is not taken as a Task. |
|
|
56
|
+
| **Task** | A bounded responsibility with its own objective, deliverable and completion conditions. It has at most one current executor. |
|
|
57
|
+
| **Execution** | The authorized interval in which one Agent owns a taken Task, including its finalization and cleanup. This domain object differs from a Core execution observation. |
|
|
58
|
+
| **Take** | Acquiring exclusive current responsibility for an eligible Task. Proposing a Task does not reserve it. |
|
|
59
|
+
| **Finish** | Ending the current Execution with an explicit outcome such as done, incomplete, blocked or cancelled. |
|
|
60
|
+
| **Material** | Versioned, immutable shared research content or attachments with production and use provenance. Publication alone does not establish usefulness or truth. |
|
|
61
|
+
| **Workspace** | The Mission's public project repository, including current main and immutable saved revisions. It is distinct from an Agent's private directory. |
|
|
62
|
+
| **Revision** | An immutable Workspace file version with explicit ancestry. Revision numbering alone does not establish ancestry. |
|
|
63
|
+
| **Main** | The current shared integration revision. Saving a revision does not advance main. |
|
|
64
|
+
| **Candidate** | An ordinary proposed file at a fixed Workspace revision and path, not an additional stored entity. |
|
|
65
|
+
| **Judge / CheckResult** | A checker and its result tied to immutable inputs and a configured checking environment. A diagnostic pass is separate from Task completion and Mission acceptance. |
|
|
66
|
+
| **Mission submission** | A fixed final delivery selected for acceptance, containing current main and an explicit Material selection. |
|
|
67
|
+
| **Handoff** | Continuing through public Task state, Materials and saved files after an earlier Agent ends. |
|
|
68
|
+
| **Dependency** | A genuine prerequisite for a Task, rather than a proposal-origin or management relationship. |
|
|
69
|
+
| **Dispute** | A reasoned question about a particular Material claim or section. |
|
|
70
|
+
| **Supersession** | Explicit replacement of a whole Material by a self-contained successor while retaining history. |
|
|
71
|
+
|
|
72
|
+
GitHub development Issues and PRs are engineering records, separate from research Tasks and Missions. The word “goal” can describe an objective; it does not introduce another Core object. Pending design terms belong in their Issue-linked design until the corresponding API is implemented.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 AnySwarm contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
|
6
|
+
associated documentation files (the "Software"), to deal in the Software without restriction, including
|
|
7
|
+
without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
+
copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
|
|
9
|
+
following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial
|
|
12
|
+
portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
|
15
|
+
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
|
|
16
|
+
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
17
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
18
|
+
USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,139 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<picture>
|
|
4
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/assets/anyswarm-logo-dark.svg" />
|
|
5
|
+
<source media="(prefers-color-scheme: light)" srcset="docs/assets/anyswarm-logo-light.svg" />
|
|
6
|
+
<img alt="AnySwarm" src="docs/assets/anyswarm-logo-light.svg" width="108" height="90" />
|
|
7
|
+
</picture>
|
|
8
|
+
|
|
9
|
+
<h1>AnySwarm</h1>
|
|
10
|
+
|
|
11
|
+
<p><strong>Build your own multi-agent Harness.</strong></p>
|
|
12
|
+
|
|
13
|
+
<p>A local-first TypeScript SDK and CLI for running isolated Agents, connecting them to shared Services, and observing checkable multi-agent Runs.</p>
|
|
14
|
+
|
|
15
|
+
<p>
|
|
16
|
+
<a href="https://github.com/AnySwarm/anyswarm/releases"><img alt="Releases" src="https://img.shields.io/github/v/release/AnySwarm/anyswarm?style=flat-square&color=111318" /></a>
|
|
17
|
+
<a href="https://github.com/AnySwarm/anyswarm/actions/workflows/ci.yml"><img alt="CI" src="https://img.shields.io/github/actions/workflow/status/AnySwarm/anyswarm/ci.yml?branch=main&style=flat-square&label=CI" /></a>
|
|
18
|
+
<a href="LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-blue?style=flat-square" /></a>
|
|
19
|
+
<img alt="Node.js 22.19+" src="https://img.shields.io/badge/node.js-22.19%2B-16a34a?style=flat-square" />
|
|
20
|
+
</p>
|
|
21
|
+
|
|
22
|
+
<p>
|
|
23
|
+
<a href="https://anyswarm.github.io/anyswarm/">Website</a> ·
|
|
24
|
+
<a href="docs/en/quickstart.md">Quickstart</a> ·
|
|
25
|
+
<a href="docs/en/latest.md">Releases</a> ·
|
|
26
|
+
<a href="docs/en/changelog.md">Changelog</a> ·
|
|
27
|
+
<a href="docs/en/build-your-harness.md">Build a Swarm Harness</a> ·
|
|
28
|
+
<a href="docs/zh/overview.md">中文文档</a>
|
|
29
|
+
</p>
|
|
30
|
+
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
AnySwarm separates **how Agents collaborate** from **how Agents are isolated and supervised**. You write the **Harness** — who starts work, what shared state and Services Agents can call, and what evidence establishes completion. The **Runtime** owns isolated OpenSandbox execution with a configured executor, host-gated model access, authenticated Service bridging, live observation, artifact collection, and verified cleanup.
|
|
36
|
+
|
|
37
|
+
## Why AnySwarm
|
|
38
|
+
|
|
39
|
+
- **One Runtime, any topology** — Swap between recursive Subagents, leased TaskPool, PeerMesh, Substrate, or Lead-Worker without modifying the Runtime.
|
|
40
|
+
- **Sandbox Provider interface** — Run `anyswarm setup --mode local`, or save an existing OpenSandbox endpoint and one Runtime callback with `anyswarm setup --mode existing`. Supply a custom Provider through the root SDK when you need a different Sandbox integration. Model API keys and external Service tokens stay on the trusted Controller.
|
|
41
|
+
- **Configurable executors, models and file budgets** — Use an installed Pi or Codex, optionally pin its exact version, or select an image-installed adapter. Use Responses with Pi or Codex, Chat Completions with Pi, or a trusted Host transport. Configure import, live file operations and export separately.
|
|
42
|
+
- **Single unified package** — `@anyswarm/core` bundles the TypeScript SDK, `anyswarm` CLI, `swarm` container CLI, built-in Harnesses, and the zero-dependency browser Trace Viewer (`anyswarm trace`).
|
|
43
|
+
|
|
44
|
+
## Quick start
|
|
45
|
+
|
|
46
|
+
Install the current stable CLI with Node.js 22.19+ and npm on Linux or macOS. Local OpenSandbox is separate: the current release requires a Linux Controller, Docker Engine and a supported npm-installed Pi or Codex. For native macOS local setup ([#339](https://github.com/AnySwarm/anyswarm/issues/339)), [install and start Docker Desktop for Mac](docs/en/quickstart.md#docker-on-macos) or start your existing local Linux container engine. The npm command does not install the engine.
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
# 1. Install the released CLI
|
|
50
|
+
npm install -g @anyswarm/core
|
|
51
|
+
anyswarm --version
|
|
52
|
+
|
|
53
|
+
# 2. Prepare OpenSandbox and save its connection
|
|
54
|
+
anyswarm setup --backend pi
|
|
55
|
+
|
|
56
|
+
# 3. Point AnySwarm at any streaming OpenAI Responses-compatible endpoint
|
|
57
|
+
export ANYSWARM_MODEL_URL="https://api.openai.com/v1/responses"
|
|
58
|
+
export ANYSWARM_MODEL_TOKEN="sk-..."
|
|
59
|
+
export ANYSWARM_MODEL_ID="gpt-5-mini"
|
|
60
|
+
|
|
61
|
+
# 4. Run a built-in Harness against your project
|
|
62
|
+
mkdir -p anyswarm-first-example
|
|
63
|
+
cd anyswarm-first-example
|
|
64
|
+
printf '# Hello from AnySwarm\n' > README.md
|
|
65
|
+
anyswarm --harness subagents --prompt 'Read README.md and report its heading.' --output-dir ./runs
|
|
66
|
+
|
|
67
|
+
# 5. Inspect timelines, model exchanges, and artifacts in the built-in Trace Viewer
|
|
68
|
+
anyswarm trace --root ./runs --port 8787
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
The [shell installer](docs/en/quickstart.md#1-install-anyswarm) also installs the CLI and enables `anyswarm update`. For an npm global install, update with `npm install -g @anyswarm/core@latest`.
|
|
72
|
+
|
|
73
|
+
The installed SDK builds the local Worker using its bundled materials and the selected host executor. Set `ANYSWARM_WORKER_IMAGE` when using a custom Worker image. Use `--harness` to select any built-in (`subagents`, `taskpool`, `peermesh`, `substrate`, `lead-worker`, `notes`, `messages`), a local ESM module, or an installed package. In `--mode rpc`, tasks arrive over JSONL with live `status` and `stop` control.
|
|
74
|
+
|
|
75
|
+
## Build with the TypeScript SDK
|
|
76
|
+
|
|
77
|
+
Install the TypeScript SDK in your Node.js project.
|
|
78
|
+
|
|
79
|
+
```sh
|
|
80
|
+
npm install @anyswarm/core
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
[v0.5.0](docs/en/latest.md#v050) is the first supported release of `@anyswarm/core`. Import Runtime, Service and Sandbox Provider APIs from this package. The [SDK reference](docs/en/reference/api.md#install-the-sdk) also covers verified source archives. The [First Harness tutorial](docs/en/first-harness.md) copies examples from the installed SDK.
|
|
84
|
+
|
|
85
|
+
- Core building blocks & Swarm tutorial: [Sandboxes](docs/en/sandbox.md) · [Runtime](docs/en/runtime.md) · [Agents](docs/en/agents.md) · [Host Gateway](docs/en/gateway.md) · [Services](docs/en/services.md) · [Build a Swarm Harness](docs/en/build-your-harness.md)
|
|
86
|
+
- Minimal runnable two-Agent script: [`examples/messages/handoff.ts`](examples/messages/handoff.ts)
|
|
87
|
+
- Exact signatures, CLI flags, and types: [API Reference](docs/en/reference/api.md) · [CLI Reference](docs/en/reference/cli.md) · [Types & Source Map](docs/en/reference/types.md)
|
|
88
|
+
|
|
89
|
+
## Built-in Harnesses
|
|
90
|
+
|
|
91
|
+
The repository includes five substantial Harnesses sharing the same Runtime with different collaboration policies:
|
|
92
|
+
|
|
93
|
+
| Harness | How Agents coordinate | Start here |
|
|
94
|
+
| --- | --- | --- |
|
|
95
|
+
| **Subagents** | A parent creates and directs children through a scoped Service; Pi can fork conversation context. | [Guide](docs/en/harnesses/subagents.md) · [Example](examples/subagents/README.md) |
|
|
96
|
+
| **TaskPool** | Agents exclusively claim leased Tasks and publish Materials and Workspace revisions toward a shared Mission. | [Guide](docs/en/harnesses/taskpool.md) · [Example](examples/taskpool/README.md) |
|
|
97
|
+
| **PeerMesh** | Peers coordinate with Git, Mattermost messages, and a shared Board, each with its own identity and branch. | [Guide](docs/en/harnesses/peermesh.md) · [Example](examples/peermesh/README.md) |
|
|
98
|
+
| **Substrate** | A fixed peer pool publishes, searches, reads, and cites immutable contributions (with optional Lean/FATE checking). | [Guide](docs/en/harnesses/substrate.md) · [Example](examples/substrate/README.md) |
|
|
99
|
+
| **Lead-Worker** | A lead and fixed or dynamic helpers coordinate through a Board and retain deliveries in Git. | [Guide](docs/en/harnesses/lead-worker.md) · [Example](examples/lead-worker/README.md) |
|
|
100
|
+
|
|
101
|
+
Use the [first SDK Harness](docs/en/first-harness.md) to write one two-Agent
|
|
102
|
+
definition for `createHarnessSession`, explicit foreground and RPC. The Run
|
|
103
|
+
handle manages input, questions, observations and completion.
|
|
104
|
+
|
|
105
|
+
See [example dependencies and ownership](examples/README.md) and [common deployment](deploy/README.md) for the services each mechanism needs.
|
|
106
|
+
|
|
107
|
+
Compare mechanisms in [Choose a Harness](docs/en/harnesses/index.md) or write your own in [Build Your Own Harness](docs/en/build-your-harness.md).
|
|
108
|
+
|
|
109
|
+
## Built-in Trace Viewer
|
|
110
|
+
|
|
111
|
+
Inspect saved or live Run timelines, Service handoffs, model exchanges, and exported artifacts in a local browser UI bundled inside `@anyswarm/core` (zero extra dependencies):
|
|
112
|
+
|
|
113
|
+
```sh
|
|
114
|
+
anyswarm trace --root ./runs --port 8787
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
When started inside an SSH session, `anyswarm trace` prints the matching `ssh -N -L` port-forwarding command automatically. See the [Trace Viewer guide](docs/operations/trace-viewer.md).
|
|
118
|
+
|
|
119
|
+
## Releases & documentation
|
|
120
|
+
|
|
121
|
+
- **Releases**: [Current release](docs/en/latest.md) · [发行版本 (中文)](docs/zh/latest.md) · [GitHub Releases](https://github.com/AnySwarm/anyswarm/releases)
|
|
122
|
+
- **Changelog**: [CHANGELOG.md](CHANGELOG.md) · [Website Changelog](docs/en/changelog.md) · [更新日志 (中文)](docs/zh/changelog.md)
|
|
123
|
+
- **Architecture & research**: [Architecture Manual](docs/architecture/INDEX.md) · [Research Context](docs/PROJECT.md) · [ProgramBench Pastel](benchmarks/programbench-pastel/README.md) · [PutnamBench TaskPool](benchmarks/putnambench-taskpool/README.md)
|
|
124
|
+
|
|
125
|
+
## Contributing & developing from source
|
|
126
|
+
|
|
127
|
+
```sh
|
|
128
|
+
git clone https://github.com/AnySwarm/anyswarm.git
|
|
129
|
+
cd anyswarm
|
|
130
|
+
npm ci --ignore-scripts
|
|
131
|
+
npm run build
|
|
132
|
+
npm test
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md), [Development Workflow](docs/workflows/development.md), and [SECURITY.md](SECURITY.md).
|
|
136
|
+
|
|
137
|
+
## License
|
|
138
|
+
|
|
139
|
+
[MIT](LICENSE)
|
package/deploy/README.md
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Common runtime deployment
|
|
2
|
+
|
|
3
|
+
This directory contains the shared OpenSandbox configuration and Worker image
|
|
4
|
+
recipe. Coordination Services belong to the examples that use them. Installing
|
|
5
|
+
the SDK does not require a global Task/Context/Judge/Catalog deployment.
|
|
6
|
+
|
|
7
|
+
## What setup prepares
|
|
8
|
+
|
|
9
|
+
| Component | Ownership | Normal user action |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| OpenSandbox Lifecycle service | Your deployment, or the local service created by `anyswarm setup --mode local`. | Connect to an existing authenticated service, or let local setup prepare it. |
|
|
12
|
+
| AnySwarm Worker image | Built locally by setup or the consuming SDK. | Prepare a Worker from the selected local Pi or Codex and reuse it on a matching cache hit. An existing service operator supplies a compatible image. |
|
|
13
|
+
| Runtime Bridge, model gateway and built-in `agent` Service | Created by each Runtime. | Configure the Runtime; these have no separate service container to deploy. |
|
|
14
|
+
| TaskPool, Subagents, Lead-Worker and Substrate Services | Their respective example. | The example creates its owned in-process Services/stores. Follow that example's README for extra facilities. |
|
|
15
|
+
| PeerMesh facilities and optional integrations | The application/operator. | Supply the endpoints and credentials listed by the selected example. Setup does not provision them. |
|
|
16
|
+
|
|
17
|
+
`anyswarm doctor` checks the selected setup/configuration. `anyswarm setup --mode local` additionally
|
|
18
|
+
prepares infrastructure and runs its bounded smoke check. Existing mode verifies authentication and saves connection settings. `anyswarm doctor --smoke` verifies bidirectional connectivity with a temporary Sandbox. Neither command
|
|
19
|
+
establishes that a real model completed an application task. See
|
|
20
|
+
[Quickstart](../docs/en/quickstart.md) for the commands and editable configuration.
|
|
21
|
+
|
|
22
|
+
## Image and configuration paths
|
|
23
|
+
|
|
24
|
+
- [`opensandbox/config.toml`](opensandbox/config.toml) is the common local provider configuration.
|
|
25
|
+
- [`worker/Dockerfile`](worker/Dockerfile) builds the Worker, executor CLIs and
|
|
26
|
+
agent-side `swarm` command. [`worker/pi-models.json`](worker/pi-models.json) is
|
|
27
|
+
the bundled Pi model catalog.
|
|
28
|
+
- [The release workflow](../.github/workflows/release.yml) verifies local Worker preparation and ships the build inputs in the SDK archive. The historical v0.4.0 images remain at their original registry references. Select the executable with `anyswarm setup --backend pi|codex`. Set `ANYSWARM_WORKER_IMAGE` to use a compatible custom image. Custom executor adapters supply their own image.
|
|
29
|
+
- An explicitly configured custom image is pulled when absent; setup does not
|
|
30
|
+
silently rebuild a different image under that reference.
|
|
31
|
+
|
|
32
|
+
For development or an explicit custom build, run from the checkout/package root:
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
anyswarm setup --mode local --backend pi
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
The optional TaskPool and Mathlib Search images use the source build recipes below.
|
|
39
|
+
|
|
40
|
+
## Optional example deployments
|
|
41
|
+
|
|
42
|
+
The [Task/Context/Judge/Catalog standalone recipe](../examples/taskpool/deploy/service-hosts/README.md) is a compatibility host for the
|
|
43
|
+
TaskPool domain. Its isolated Context/Judge processes do not implement the
|
|
44
|
+
complete coordinator protocol; see its README before using it. [Mathlib search](../examples/services/mathlib-search/README.md)
|
|
45
|
+
is a separately configured optional Service for Lean workloads. Neither is part
|
|
46
|
+
of default SDK setup. PeerMesh's MySQL database is a different dependency used
|
|
47
|
+
by the upstream Board.
|
|
48
|
+
|
|
49
|
+
## Administrator connection and policy
|
|
50
|
+
|
|
51
|
+
The local recipe pins stable OpenSandbox 1.2.1 Server, Execd and Egress digests. Its reviewed source revision is `db708c218771a8d311356f0e96552c15df6e097a`. The official SDK dependency is exactly `@alibaba-group/opensandbox@1.2.1` in the shrinkwrap. Local setup configures `dns+nft`, an authenticated loopback Lifecycle server, published data-plane endpoints and a compatible `anyswarm-core-v2` Worker. Inspect `anyswarm doctor --smoke` for the actual selected executor and verified export/delete result.
|
|
52
|
+
|
|
53
|
+
```sh
|
|
54
|
+
export OPEN_SANDBOX_API_KEY='<operator-provided-key>'
|
|
55
|
+
anyswarm setup --mode existing --endpoint https://sandbox.example.net \
|
|
56
|
+
--public-url https://runtime.example.net/anyswarm
|
|
57
|
+
anyswarm doctor --smoke
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
The operator must publish SDK endpoints reachable by the Controller and permit Sandbox callbacks to the single Runtime listener. Retain endpoint headers through proxies. Configure TLS or a trusted private network. The explicit deprecated server-proxy option exists for compatible deployments, with upstream maintenance limitations. Endpoint host rewriting receives a migration error.
|
|
61
|
+
|
|
62
|
+
Profile IP/port restrictions require actual packet-policy enforcement. `dns+nft` adds exact TCP ports for IPv4 targets and the Runtime callback. Platform deny policy remains authoritative. Verify allowed IP/port, the same IP at another port, unauthorized destinations and management access independently. DNS-only egress cannot establish that guarantee. Setup's deployment mode and authentication smoke supply narrower observations than a full policy matrix.
|
|
63
|
+
|
|
64
|
+
Built-in Runtime rejects legacy exact Workspace byte/inode requests and live shared mounts before creating resources. File transfer budgets remain configured through `filePolicy`. A trusted custom Provider can offer additional measured storage capabilities. Volume capacity, writable-layer quota and file-transfer limits have distinct scopes.
|
|
65
|
+
|
|
66
|
+
To uninstall a setup-managed service, first close all Runtimes using it and independently confirm their Sandbox deletions or retained ownership. Use Docker to inspect and remove the exact `anyswarm-opensandbox-<port>` service created by setup. Its owner-labelled state directory and saved user connection should be removed only when no retained resources depend on them. Never delete shared or externally operated volumes as part of individual Agent cleanup. A saved connection can be replaced through `anyswarm setup --mode existing`.
|
|
67
|
+
|
|
68
|
+
## Kubernetes cluster profile
|
|
69
|
+
|
|
70
|
+
The [Kubernetes deployment profile](opensandbox-kubernetes/README.md) renders the official OpenSandbox 1.2.1 umbrella chart from a pinned source commit and registry digests. It supplies a single-active Lifecycle Server, authenticated Ingress routing, persistent Server/Runtime volumes and read-only cluster inventory. The application supplies a matching Runtime image and its explicit bootstrap/recovery command. Cluster acceptance and capacity remain `not-run` until their approved protocol is executed.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Local Linux Docker profile for anyswarm setup. Loopback control plane only.
|
|
2
|
+
[server]
|
|
3
|
+
host = "127.0.0.1"
|
|
4
|
+
port = 8080
|
|
5
|
+
max_sandbox_timeout_seconds = 86400
|
|
6
|
+
|
|
7
|
+
[proxy]
|
|
8
|
+
resolve_internal = true
|
|
9
|
+
|
|
10
|
+
[log]
|
|
11
|
+
level = "INFO"
|
|
12
|
+
|
|
13
|
+
[runtime]
|
|
14
|
+
type = "docker"
|
|
15
|
+
execd_image = "opensandbox/execd:release-1.2.1@sha256:6b12d17844ac7167271488302c71934e47f76abb9ddab19ec8529bd1c1c56b23"
|
|
16
|
+
|
|
17
|
+
[storage]
|
|
18
|
+
allowed_host_paths = []
|
|
19
|
+
volume_default_size = "1Gi"
|
|
20
|
+
|
|
21
|
+
[store]
|
|
22
|
+
type = "sqlite"
|
|
23
|
+
path = "/root/.opensandbox/opensandbox.db"
|
|
24
|
+
|
|
25
|
+
[docker]
|
|
26
|
+
network_mode = "bridge"
|
|
27
|
+
port_range_min = 40000
|
|
28
|
+
port_range_max = 60000
|
|
29
|
+
publish_host = "127.0.0.1"
|
|
30
|
+
drop_capabilities = ["AUDIT_WRITE", "MKNOD", "NET_ADMIN", "NET_RAW", "SYS_ADMIN", "SYS_MODULE", "SYS_PTRACE", "SYS_TIME", "SYS_TTY_CONFIG"]
|
|
31
|
+
no_new_privileges = true
|
|
32
|
+
apparmor_profile = ""
|
|
33
|
+
pids_limit = 4096
|
|
34
|
+
seccomp_profile = ""
|
|
35
|
+
|
|
36
|
+
[ingress]
|
|
37
|
+
mode = "direct"
|
|
38
|
+
|
|
39
|
+
[egress]
|
|
40
|
+
image = "opensandbox/egress:release-1.2.1@sha256:84b98d3b5989a87389c977f6433f8cd3c7998d03aa15aaae41ebcb15b7eb8000"
|
|
41
|
+
mode = "dns+nft"
|
|
42
|
+
readiness_timeout_seconds = 30.0
|
|
43
|
+
|
|
44
|
+
[renew_intent]
|
|
45
|
+
enabled = false
|
|
46
|
+
min_interval_seconds = 60
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# OpenSandbox Kubernetes deployment
|
|
2
|
+
|
|
3
|
+
This profile uses the official OpenSandbox 1.2.1 umbrella chart at `db708c218771a8d311356f0e96552c15df6e097a`. It deploys ordinary BatchSandbox Pods behind the official Ingress gateway. The Lifecycle Server has one replica, the gateway has two, and the AnySwarm Runtime has one. Kubernetes places Agent Pods on nodes selected by the operator.
|
|
4
|
+
|
|
5
|
+
The implementation is tracked in [#273](https://github.com/AnySwarm/anyswarm/issues/273) and depends on [#272](https://github.com/AnySwarm/anyswarm/issues/272). Cluster acceptance and capacity measurements are `not-run` in this checkout. Running the real 2/8 tiers requires the owner's explicit experiment approval. The owner requires local mock Agent API simulation for 32/128/1,024 tiers, and the workload CLI refuses real cluster execution at those tiers. Rendering these manifests allocates no cluster resources.
|
|
6
|
+
|
|
7
|
+
## Prerequisites
|
|
8
|
+
|
|
9
|
+
Use Node.js 22.19+, Git, Helm 3.x, and `kubectl` authenticated to an existing cluster. The upstream chart accepts Kubernetes 1.21.1+. Record the actual cluster, container runtime, CNI, CSI and kernel versions before validation. At least two distinct worker VM or host instances are required for multi-node acceptance. Two containers serving as Kubernetes nodes establish a CI topology observation.
|
|
10
|
+
|
|
11
|
+
Prepare a StorageClass with persistent volumes available to the Server and Runtime. Review its access mode, node attachment, reclaim and fencing behavior. `ReadWriteOnce`, a one-replica Deployment, or SQLite alone supplies no proof that a Controller on an unreachable node has lost control of the Lifecycle API. The application recovery entry point must require its ownership and fencing evidence before resuming effects.
|
|
12
|
+
|
|
13
|
+
The CNI must implement the chosen network policy, and the workload namespace admission policy must permit OpenSandbox's egress sidecar to use its required `NET_ADMIN` capability. Verify the pinned upstream security requirements against the cluster's policy. The profile uses `dns+nft`; packet denial still requires the deployment probes in #272/#273.
|
|
14
|
+
|
|
15
|
+
Build and push matching Worker and application Runtime images under an authorized release process. Pin both registry digests in the site file. The Runtime image must contain the installed AnySwarm package, the application's Harness bootstrap/reconstruction code and its trusted configuration reader. Its entry point must read `/etc/anyswarm/config.json`, use `/var/lib/anyswarm` as persistent run storage, set `sandbox.egressMode` to `dns+nft`, bind the callback with `connection.bindHost` = `0.0.0.0` and `connection.bindPort` = `3100`, and consume the connection environment supplied by the Deployment. The application selects `createRuntime` for a new run or the public recovery entry point for an existing run with the required Service reconstruction contract.
|
|
16
|
+
|
|
17
|
+
The fixed Pod resource requests are initial deployment reservations, with explicit limits. They are configuration defaults awaiting measurement. Set Agent requests/limits in the application Sandbox configuration and record the resulting Pod resources in each test manifest. Account for the Worker, executor, Execd installer, egress sidecar, image/cache and workload storage. Capacity declarations require actual peak and sustained measurements.
|
|
18
|
+
|
|
19
|
+
## Prepare private deployment inputs
|
|
20
|
+
|
|
21
|
+
Copy `site.example.json` outside the source tree and replace every placeholder. Use an image reference containing `@sha256:` for the Worker and Runtime. Select prepared worker nodes with `sandboxNodeSelector`. Identify the installed CNI Pods with `cniNamespace` and `cniSelector`, and, when CSI is installed, its driver Pods with `csiNamespace` and `csiSelector`. Set `csiSelector` to `null` when storage uses an in-tree or non-CSI provisioner. Inventory verifies this against installed driver definitions and records the StorageClass provisioner.
|
|
22
|
+
|
|
23
|
+
The example uses authenticated HTTP over an explicitly trusted private cluster network. `gatewayAddress` is a private address without scheme or path, following the pinned upstream schema. Both Server announcement and gateway use URI routing and the same signing Secret. The Runtime Deployment sets `ANYSWARM_RUNTIME_PUBLIC_URL` to the stable IPv4 address of the `anyswarm-runtime` Service on port 3100. Kubernetes supplies the address in `ANYSWARM_RUNTIME_SERVICE_HOST`. The Sandbox can use the exact IP and port rule without a DNS query. The Lifecycle URL is `http://opensandbox-server.opensandbox-system.svc.cluster.local`. Controller-to-Worker traffic traverses the announced signed gateway route.
|
|
24
|
+
|
|
25
|
+
For external access, have the infrastructure operator supply authenticated TLS termination, reachable DNS, matching gateway announcement and certificate trust in both Controller and guest images. Preserve all endpoint route headers. Verify the endpoint scheme returned and selected by the SDK against that actual deployment. The included profile requires the private network declaration and fails when that condition is absent. It does not automatically create public LoadBalancer services or certificates.
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
node deploy/opensandbox-kubernetes/prepare.mjs /secure/site.json experiments/cluster-render
|
|
29
|
+
PATH=/path/to/helm/bin:$PATH \
|
|
30
|
+
deploy/opensandbox-kubernetes/chart.sh experiments/opensandbox-source experiments/cluster-render
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
`prepare.mjs` validates the site, produces JSON accepted by Kubernetes and Helm, and writes files with mode 0600 in a mode 0700 directory. `chart.sh` checks out the exact upstream commit, rejects tracked edits or a different commit, packages local chart dependencies, lints and renders the chart. It checks image digest pins, gateway routing/signing, dns+nft and the ordinary-Pod profile. It needs network access for the initial source fetch. The chart dependency build uses the pinned checkout's sibling charts. No Helm repository URL is required.
|
|
34
|
+
|
|
35
|
+
The prepared files are `values.json`, `resources.json`, `chart.yaml`, and `manifest-inputs.json`. The latter records source and configuration hashes, image references, listener and persistence locations. Keep these files private when site metadata is sensitive.
|
|
36
|
+
|
|
37
|
+
## Provision Secrets and install
|
|
38
|
+
|
|
39
|
+
Use the existing cluster's authorized deployment workflow. Review the rendered files before applying them. The following commands change the selected cluster.
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
kubectl apply -f experiments/cluster-render/resources.json
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Create the following Secrets through your existing secret manager or from local protected files. The same Lifecycle API key must be present in both namespaces. No key belongs in the site file, ConfigMap, Git, or a command-line literal.
|
|
46
|
+
|
|
47
|
+
| Namespace | Secret name from site file | Keys |
|
|
48
|
+
| --- | --- | --- |
|
|
49
|
+
| `opensandbox-system` | `apiKeySecret` | `api-key` |
|
|
50
|
+
| `anyswarm` | `apiKeySecret` | `api-key` with the same value |
|
|
51
|
+
| `opensandbox-system` | `signingKeySecret` | `keys` and `active-key` |
|
|
52
|
+
| `anyswarm` | `runtimeConfigSecret` | `config.json` and any application-managed configuration files |
|
|
53
|
+
|
|
54
|
+
The signing Secret follows the upstream key-ring contract. `active-key` contains a single lower-case alphanumeric key ID such as `a`. `keys` contains `a=<base64-secret>`, with a randomly generated signing secret of the size required by OpenSandbox. Create these files through the secret manager. The Server reads the active key and key ring through environment references. The gateway reads the same ring. Rotating an existing signing Secret requires a coordinated Server and gateway rollout because both read it at startup.
|
|
55
|
+
|
|
56
|
+
For example, with the default Secret names and already protected files, use file references. Invoke each command for the matching namespace and ensure your shell pipeline propagates errors.
|
|
57
|
+
|
|
58
|
+
```sh
|
|
59
|
+
kubectl create secret generic opensandbox-api-key -n opensandbox-system \
|
|
60
|
+
--from-file=api-key=/secure/opensandbox-api-key
|
|
61
|
+
kubectl create secret generic opensandbox-api-key -n anyswarm \
|
|
62
|
+
--from-file=api-key=/secure/opensandbox-api-key
|
|
63
|
+
kubectl create secret generic opensandbox-signing-keys -n opensandbox-system \
|
|
64
|
+
--from-file=keys=/secure/opensandbox-signing-keys \
|
|
65
|
+
--from-file=active-key=/secure/opensandbox-active-key
|
|
66
|
+
kubectl create secret generic anyswarm-runtime-config -n anyswarm \
|
|
67
|
+
--from-file=config.json=/secure/anyswarm-config.json
|
|
68
|
+
helm upgrade --install opensandbox experiments/opensandbox-source/manifests/charts/opensandbox \
|
|
69
|
+
--namespace opensandbox-system --values experiments/cluster-render/values.json \
|
|
70
|
+
--wait --timeout 10m
|
|
71
|
+
kubectl rollout status deployment/anyswarm-runtime -n anyswarm --timeout=5m
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
The initial resource apply creates the IPv4 callback Service before the Runtime Deployment. Kubernetes injects Service addresses when a Pod starts. Keep the existing Service and its ClusterIP over rollouts and recovery. Verify that the Runtime receives the numeric callback URL before it accepts work. An application bootstrap that sees an existing run must execute its recovery procedure with the original callback and run directory. An independent retained-resource maintenance process must acquire the same exclusive ownership before acting.
|
|
75
|
+
|
|
76
|
+
The Server SQLite volume is mounted at `/var/lib/opensandbox`; Runtime state is at `/var/lib/anyswarm`. The Server's Recreate rollout stops the old Server before starting the replacement. An interrupted Lifecycle request remains subject to resource reconciliation. Use the Server's ordinary Kubernetes RBAC and API configuration through the chart. The Runtime Pod has no Kubernetes service-account token mounted and uses only the authenticated OpenSandbox API.
|
|
77
|
+
|
|
78
|
+
## Inspect and validate
|
|
79
|
+
|
|
80
|
+
```sh
|
|
81
|
+
node deploy/opensandbox-kubernetes/inspect.mjs /secure/site.json experiments/cluster-inventory
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
This read-only command has a 30-second per-command deadline and bounded output. It stores raw inventories privately, checks two Ready selected nodes with distinct machine identities, verifies the one-Server/two-gateway/one-Runtime topology, and records actual Kubernetes, kubelet, runtime, CNI and CSI image IDs, CSI driver definitions and storage configuration. It fails if required queries or observations are unavailable. Keep the node and Pod inventories private. Attach independent VM/host-instance evidence to establish the required physical topology. The generated summary leaves connectivity, isolation and capacity marked `not-run`.
|
|
85
|
+
|
|
86
|
+
Run `anyswarm doctor --smoke` inside the configured Runtime environment, or from a Controller with the same private network routes and trusted configuration. Confirm all three chains through the normal SDK paths.
|
|
87
|
+
|
|
88
|
+
1. Authenticated Controller access to the Lifecycle API.
|
|
89
|
+
2. Controller access to the Worker through the exact announced gateway URL and headers.
|
|
90
|
+
3. Sandbox access to Runtime Bridge, Model Gateway and authorized Services, including file export and verified deletion.
|
|
91
|
+
|
|
92
|
+
A successful Lifecycle list alone is preflight evidence. The explicit smoke makes guest-originated Service and controlled-model requests. Run the full small two-Agent Pi and Codex probes before the cluster scale protocol. Packet policy tests must check allowed IP/port, forbidden destination/port, another Sandbox and the non-loopback management address independently from credential-denial tests.
|
|
93
|
+
|
|
94
|
+
## Upgrade, diagnose and uninstall
|
|
95
|
+
|
|
96
|
+
Render every upgrade into a fresh private directory and retain its manifest hashes. Check that Worker protocol and executor versions match the installed Controller. An infrastructure upgrade should stop input admission, persist closing or recovery intent as appropriate, and preserve the ledger and ownership. Expect a short Lifecycle API interruption during the single-active Server rollout. After rollout, re-run inventory and bidirectional smoke, then reconcile pending resources on their original deployment before accepting new work.
|
|
97
|
+
|
|
98
|
+
Inspect `kubectl get pods -n opensandbox-system`, `kubectl get batchsandboxes -n opensandbox`, and `kubectl get pvc -A`. Store full Pod descriptions, node identities, application state, stdout/stderr and logs only in ignored private evidence directories. Look for image pulls, scheduling requests/limits, unavailable storage attachments, gateway key/route mismatch, DNS, egress capability denial and callback reachability. A platform deny rule can block a legitimate application target. Preserve that diagnosis and adjust the reviewed policy or target through the operator workflow.
|
|
99
|
+
|
|
100
|
+
Before uninstall, persist Runtime closing intent, complete required exports, and independently reconcile every recorded allocation and every matching Sandbox/Pod. An unreachable node can still hold a running process even after API objects disappear. Keep unknown allocations and capacity until execution stop is confirmed or trusted infrastructure fencing proves termination.
|
|
101
|
+
|
|
102
|
+
Once ownership is resolved, remove the application Runtime Deployment and uninstall the exact `opensandbox` Helm release. The profile keeps PVCs and the upstream chart keeps CRDs. Operators retain responsibility for external volumes, the two PVCs, Secrets and namespaces. Verify the storage reclaim policy before any explicit PVC/PV deletion. Delete namespaces or shared CRDs only after independently confirming that other runs and deployments do not depend on them.
|
|
103
|
+
|
|
104
|
+
## Version provenance
|
|
105
|
+
|
|
106
|
+
`bom.json` records registry manifest digests fetched for the fixed upstream release. Each deployment manifest adds its selected Worker and Runtime digests and records installed infrastructure versions. The upstream chart itself remains at the exact source commit. See the [pinned upstream deployment manual](https://github.com/opensandbox-group/OpenSandbox/blob/db708c218771a8d311356f0e96552c15df6e097a/docs/deployment/index.md) for component contracts and the [pinned API schema](https://github.com/opensandbox-group/OpenSandbox/blob/db708c218771a8d311356f0e96552c15df6e097a/server/opensandbox_server/api/schema.py) for supported requests and limits.
|
|
107
|
+
|
|
108
|
+
The [capacity runner](../../benchmarks/kubernetes/README.md) uses real cluster deployment for 2/8 tiers and explicit local mock API simulation for 32/128/1,024 tiers. Its default is a `not-run` plan. Real cluster execution requires a hash-bound owner approval and independent VM/inventory preflight. Local mock execution uses explicit `--execute` and records its manifest hash. Workload success alone does not complete the fault matrix or authorize a capacity claim.
|