@anyswarm/core 0.5.1 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +20 -5
- package/README.md +69 -55
- package/dist/examples/README.md +138 -77
- package/dist/examples/authoring/README.md +4 -4
- package/dist/examples/autoresearch/README.md +108 -16
- package/dist/examples/autoresearch/REQUIREMENTS.zh.md +13 -12
- package/dist/examples/autoresearch/config.d.ts +48 -5
- package/dist/examples/autoresearch/config.js +57 -23
- package/dist/examples/autoresearch/demo.d.ts +12 -4
- package/dist/examples/autoresearch/demo.js +65 -22
- package/dist/examples/autoresearch/eject.json +2 -0
- package/dist/examples/autoresearch/frontiercs2-config.d.ts +2 -0
- package/dist/examples/autoresearch/frontiercs2-config.js +14 -0
- package/dist/examples/autoresearch/frontiercs2.d.ts +18 -1
- package/dist/examples/autoresearch/frontiercs2.js +71 -14
- package/dist/examples/autoresearch/prepare-demo.d.ts +1 -0
- package/dist/examples/autoresearch/prepare-demo.js +46 -0
- package/dist/examples/autoresearch/prepare.d.ts +105 -53
- package/dist/examples/autoresearch/prepare.js +126 -57
- package/dist/examples/autoresearch/project.d.ts +6 -95
- package/dist/examples/autoresearch/project.js +131 -45
- package/dist/examples/autoresearch/research-service.d.ts +16 -1
- package/dist/examples/autoresearch/research-service.js +84 -44
- package/dist/examples/code/README.md +25 -17
- package/dist/examples/code/REQUIREMENTS.zh.md +3 -3
- package/dist/examples/code/config.d.ts +1 -0
- package/dist/examples/first-harness/AGENTS.md +25 -0
- package/dist/examples/first-harness/README.md +136 -0
- package/dist/examples/first-harness/config.d.ts +9 -8
- package/dist/examples/first-harness/config.js +33 -26
- package/dist/examples/first-harness/eject.json +14 -0
- package/dist/examples/first-harness/handoff.js +3 -3
- package/dist/examples/first-harness/harness.d.ts +14 -18
- package/dist/examples/first-harness/harness.js +102 -77
- package/dist/examples/first-harness/input/README.md +7 -0
- package/dist/examples/first-harness/session.js +2 -1
- package/dist/examples/first-harness/tsconfig.json +2 -1
- package/dist/examples/harness-session/README.md +4 -4
- package/dist/examples/lead-worker/README.md +1 -1
- package/dist/examples/lead-worker/project-config.d.ts +1 -0
- package/dist/examples/messages/README.md +2 -2
- package/dist/examples/notes/README.md +5 -5
- package/dist/examples/notes/config.d.ts +1 -0
- package/dist/examples/parallel-swarm/AGENTS.md +32 -0
- package/dist/examples/parallel-swarm/README.md +136 -0
- package/dist/examples/parallel-swarm/board-service.js +25 -8
- package/dist/examples/parallel-swarm/board.d.ts +31 -1
- package/dist/examples/parallel-swarm/board.js +98 -13
- package/dist/examples/parallel-swarm/config.d.ts +11 -0
- package/dist/examples/parallel-swarm/config.js +39 -0
- package/dist/examples/parallel-swarm/eject.json +5 -0
- package/dist/examples/parallel-swarm/harness.d.ts +26 -20
- package/dist/examples/parallel-swarm/harness.js +77 -76
- package/dist/examples/parallel-swarm/report.d.ts +12 -0
- package/dist/examples/parallel-swarm/report.js +30 -0
- package/dist/examples/peermesh/README.md +1 -1
- package/dist/examples/peermesh/project-config.d.ts +1 -0
- package/dist/examples/services/agent-control/README.md +1 -1
- package/dist/examples/services/mathlib-search/README.md +1 -1
- package/dist/examples/services/mcp-managed/README.md +1 -1
- package/dist/examples/services/persistent-board/README.md +6 -3
- package/dist/examples/subagents/AGENTS.md +35 -0
- package/dist/examples/subagents/README.md +129 -93
- package/dist/examples/subagents/config.d.ts +2 -10
- package/dist/examples/subagents/config.js +9 -16
- package/dist/examples/subagents/eject.json +17 -0
- package/dist/examples/subagents/handoff-config.d.ts +41 -0
- package/dist/examples/subagents/handoff-config.js +13 -0
- package/dist/examples/subagents/model.d.ts +3 -0
- package/dist/examples/subagents/model.js +19 -0
- package/dist/examples/substrate/README.md +12 -6
- package/dist/examples/substrate/config.d.ts +1 -0
- package/dist/examples/substrate/project-config.d.ts +1 -0
- package/dist/examples/super/README.md +34 -22
- package/dist/examples/super/actions.d.ts +1 -1
- package/dist/examples/super/actions.js +11 -11
- package/dist/examples/super/config.js +3 -3
- package/dist/examples/super/eject.json +1 -1
- package/dist/examples/super/location.js +1 -1
- package/dist/examples/super/operator.d.ts +1 -0
- package/dist/examples/super/operator.js +31 -0
- package/dist/examples/super/project.d.ts +0 -107
- package/dist/examples/super/project.js +1 -3
- package/dist/examples/taskpool/README.md +1 -1
- package/dist/examples/taskpool/config.d.ts +1 -0
- package/dist/examples/taskpool/deploy/service-hosts/service-authority-snapshot.d.ts +4 -4
- package/dist/scripts/anyswarm-arguments.d.ts +7 -25
- package/dist/scripts/anyswarm-arguments.js +69 -97
- package/dist/scripts/anyswarm-eject.js +1 -1
- package/dist/scripts/anyswarm-harnesses.d.ts +0 -1
- package/dist/scripts/anyswarm-harnesses.js +1 -22
- package/dist/scripts/anyswarm-installation.d.ts +7 -40
- package/dist/scripts/anyswarm-installation.js +17 -291
- package/dist/scripts/anyswarm-launch.d.ts +6 -36
- package/dist/scripts/anyswarm-launch.js +32 -81
- package/dist/scripts/anyswarm-progress.d.ts +6 -0
- package/dist/scripts/anyswarm-progress.js +133 -0
- package/dist/scripts/anyswarm-project.d.ts +1 -9
- package/dist/scripts/anyswarm-project.js +40 -127
- package/dist/scripts/anyswarm-source-runner.js +9 -41
- package/dist/scripts/anyswarm.js +6 -26
- package/dist/scripts/build-provenance.json +1 -1
- package/dist/scripts/generate-architecture-coverage.js +1 -1
- package/dist/scripts/generate-architecture-prompts.js +18 -10
- package/dist/scripts/local-environment.d.ts +13 -7
- package/dist/scripts/local-environment.js +73 -21
- package/dist/scripts/local-setup.d.ts +3 -0
- package/dist/scripts/local-setup.js +153 -118
- package/dist/scripts/pack-release.js +31 -4
- package/dist/src/core/index.js +1 -1
- package/dist/src/core/sandbox/opensandbox-backend.js +10 -4
- package/dist/src/core/sandbox/sandbox-connection.d.ts +9 -2
- package/dist/src/core/sandbox/sandbox-connection.js +22 -7
- package/dist/src/core/worker-image.js +1 -1
- package/dist/src/harness/project-harness.d.ts +1 -0
- package/dist/src/harness/project-harness.js +5 -4
- package/dist/src/harness/project-rpc-client.js +19 -0
- package/dist/src/harness/project-runtime.js +3 -1
- package/dist/src/harness/typescript-loader.d.ts +2 -0
- package/dist/src/harness/typescript-loader.js +26 -8
- package/dist/src/trace-viewer/command.mjs +6 -3
- package/dist/src/trace-viewer/public/app.js +239 -59
- package/dist/src/trace-viewer/public/index.html +5 -0
- package/dist/src/trace-viewer/public/style.css +22 -0
- package/dist/src/trace-viewer/reader.mjs +242 -26
- package/dist/src/trace-viewer/run-root.d.mts +1 -0
- package/dist/src/trace-viewer/run-root.mjs +7 -0
- package/dist/src/trace-viewer/server.mjs +3 -1
- package/docs/INDEX.md +11 -9
- package/docs/architecture/04-services.md +1 -1
- package/docs/architecture/06-observability-experiments.md +21 -7
- package/docs/architecture/07-run-configuration.md +118 -19
- package/docs/architecture/08-prompts.md +21 -2
- package/docs/architecture/10-service-api-reference.md +12 -5
- package/docs/architecture/12-code-coverage.md +157 -115
- package/docs/architecture/15-core-runtime.md +1 -1
- package/docs/architecture/16-pi-opensandbox-backend.md +2 -0
- package/docs/architecture/17-harness-reporting.md +79 -1
- package/docs/architecture/22-website.md +52 -20
- package/docs/architecture/23-project-harness.md +109 -37
- package/docs/architecture/26-code.md +20 -5
- package/docs/architecture/27-personal.md +23 -8
- package/docs/architecture/28-autoresearch.md +18 -12
- package/docs/architecture/INDEX.md +1 -2
- package/docs/architecture/prompts/11-first-sdk-harness.md +9 -9
- package/docs/architecture/prompts/16-parallel-swarm.md +46 -13
- package/docs/architecture/prompts/22-autoresearch.md +9 -2
- package/docs/architecture/prompts/source-manifest.json +76 -52
- package/docs/architecture/source-map.json +445 -105
- package/docs/designs/core-harness/01-core.md +2 -2
- package/docs/designs/core-harness/06-project-harness.md +3 -3
- package/docs/designs/core-harness/README.md +2 -2
- package/docs/en/agents.md +1 -1
- package/docs/en/autoresearch.md +41 -0
- package/docs/en/blog/100b-tokens.md +157 -0
- package/docs/en/build-your-harness.md +47 -22
- package/docs/en/changelog.md +29 -1
- package/docs/en/first-harness.md +40 -32
- package/docs/en/harnesses/index.md +23 -23
- package/docs/en/harnesses/lead-worker.md +1 -1
- package/docs/en/harnesses/peermesh.md +2 -2
- package/docs/en/harnesses/subagents.md +10 -31
- package/docs/en/harnesses/substrate.md +4 -4
- package/docs/en/harnesses/taskpool.md +2 -2
- package/docs/en/latest.md +30 -5
- package/docs/en/overview.md +22 -22
- package/docs/en/quickstart.md +69 -56
- package/docs/en/reference/api.md +1 -1
- package/docs/en/reference/cli.md +47 -85
- package/docs/en/sandbox.md +3 -3
- package/docs/en/trace-viewer.md +32 -12
- package/docs/operations/trace-viewer.md +26 -11
- package/docs/third-party-notices.md +0 -1
- package/docs/workflows/development.md +160 -118
- package/docs/workflows/release-and-docs-versioning.md +207 -54
- package/docs/workflows/release-cli-acceptance.md +162 -0
- package/docs/zh/agents.md +1 -1
- package/docs/zh/autoresearch.md +41 -0
- package/docs/zh/blog/100b-tokens.md +102 -0
- package/docs/zh/build-your-harness.md +48 -23
- package/docs/zh/changelog.md +29 -1
- package/docs/zh/first-harness.md +43 -35
- package/docs/zh/harnesses/index.md +23 -23
- package/docs/zh/harnesses/lead-worker.md +1 -1
- package/docs/zh/harnesses/peermesh.md +2 -2
- package/docs/zh/harnesses/subagents.md +10 -31
- package/docs/zh/harnesses/substrate.md +4 -4
- package/docs/zh/harnesses/taskpool.md +2 -2
- package/docs/zh/latest.md +30 -5
- package/docs/zh/overview.md +23 -23
- package/docs/zh/quickstart.md +66 -57
- package/docs/zh/reference/api.md +1 -1
- package/docs/zh/reference/cli.md +19 -79
- package/docs/zh/sandbox.md +3 -3
- package/docs/zh/trace-viewer.md +32 -12
- package/examples/README.md +138 -77
- package/examples/authoring/README.md +4 -4
- package/examples/autoresearch/README.md +108 -16
- package/examples/autoresearch/REQUIREMENTS.zh.md +13 -12
- package/examples/autoresearch/config.ts +64 -25
- package/examples/autoresearch/demo.ts +75 -22
- package/examples/autoresearch/eject.json +2 -0
- package/examples/autoresearch/frontiercs2-config.ts +15 -0
- package/examples/autoresearch/frontiercs2.ts +64 -11
- package/examples/autoresearch/prepare-demo.ts +44 -0
- package/examples/autoresearch/prepare.ts +134 -60
- package/examples/autoresearch/project.ts +120 -44
- package/examples/autoresearch/research-service.ts +91 -41
- package/examples/code/README.md +25 -17
- package/examples/code/REQUIREMENTS.zh.md +3 -3
- package/examples/first-harness/AGENTS.md +25 -0
- package/examples/first-harness/README.md +136 -0
- package/examples/first-harness/config.ts +41 -27
- package/examples/first-harness/eject.json +14 -0
- package/examples/first-harness/handoff.ts +3 -3
- package/examples/first-harness/harness.ts +104 -72
- package/examples/first-harness/input/README.md +7 -0
- package/examples/first-harness/session.ts +2 -1
- package/examples/first-harness/tsconfig.json +2 -1
- package/examples/harness-session/README.md +4 -4
- package/examples/lead-worker/README.md +1 -1
- package/examples/messages/README.md +2 -2
- package/examples/notes/README.md +5 -5
- package/examples/parallel-swarm/AGENTS.md +32 -0
- package/examples/parallel-swarm/README.md +136 -0
- package/examples/parallel-swarm/board-service.ts +28 -9
- package/examples/parallel-swarm/board.ts +107 -13
- package/examples/parallel-swarm/config.ts +47 -0
- package/examples/parallel-swarm/eject.json +5 -0
- package/examples/parallel-swarm/harness.ts +83 -71
- package/examples/parallel-swarm/report.ts +33 -0
- package/examples/peermesh/README.md +1 -1
- package/examples/services/agent-control/README.md +1 -1
- package/examples/services/mathlib-search/README.md +1 -1
- package/examples/services/mcp-managed/README.md +1 -1
- package/examples/services/persistent-board/README.md +6 -3
- package/examples/subagents/AGENTS.md +35 -0
- package/examples/subagents/README.md +129 -93
- package/examples/subagents/config.ts +9 -15
- package/examples/subagents/eject.json +17 -0
- package/examples/subagents/handoff-config.ts +14 -0
- package/examples/subagents/model.ts +20 -0
- package/examples/substrate/README.md +12 -6
- package/examples/super/README.md +34 -22
- package/examples/super/actions.ts +11 -11
- package/examples/super/config.ts +3 -3
- package/examples/super/eject.json +1 -1
- package/examples/super/location.ts +1 -1
- package/examples/super/operator.ts +28 -0
- package/examples/super/project.ts +1 -3
- package/examples/taskpool/README.md +1 -1
- package/npm-shrinkwrap.development.json +46 -1538
- package/npm-shrinkwrap.json +10 -43
- package/package.development.json +3 -6
- package/package.json +3 -5
- package/scripts/anyswarm-arguments.ts +67 -96
- package/scripts/anyswarm-eject.ts +1 -1
- package/scripts/anyswarm-harnesses.ts +1 -18
- package/scripts/anyswarm-installation.ts +18 -294
- package/scripts/anyswarm-launch.ts +30 -102
- package/scripts/anyswarm-progress.ts +125 -0
- package/scripts/anyswarm-project.ts +31 -123
- package/scripts/anyswarm-source-runner.ts +9 -36
- package/scripts/anyswarm.ts +4 -24
- package/scripts/generate-architecture-coverage.ts +1 -1
- package/scripts/generate-architecture-prompts.ts +21 -10
- package/scripts/local-environment.ts +79 -21
- package/scripts/local-setup.ts +150 -105
- package/scripts/pack-release.ts +28 -4
- package/src/core/index.ts +1 -1
- package/src/core/sandbox/opensandbox-backend.ts +10 -4
- package/src/core/sandbox/sandbox-connection.ts +22 -7
- package/src/core/worker-image.ts +1 -1
- package/src/harness/project-harness.ts +5 -4
- package/src/harness/project-rpc-client.ts +23 -0
- package/src/harness/project-runtime.ts +2 -1
- package/src/harness/typescript-loader.ts +28 -8
- package/src/trace-viewer/command.mjs +6 -3
- package/src/trace-viewer/public/app.js +239 -59
- package/src/trace-viewer/public/index.html +5 -0
- package/src/trace-viewer/public/style.css +22 -0
- package/src/trace-viewer/reader.mjs +242 -26
- package/src/trace-viewer/run-root.d.mts +1 -0
- package/src/trace-viewer/run-root.mjs +7 -0
- package/src/trace-viewer/server.mjs +3 -1
- package/dist/scripts/anyswarm-applications.d.ts +0 -19
- package/dist/scripts/anyswarm-applications.js +0 -19
- package/dist/scripts/anyswarm-tui-config.d.ts +0 -36
- package/dist/scripts/anyswarm-tui-config.js +0 -189
- package/dist/scripts/anyswarm-tui-session.d.ts +0 -66
- package/dist/scripts/anyswarm-tui-session.js +0 -304
- package/dist/scripts/anyswarm-tui-terminal.d.ts +0 -41
- package/dist/scripts/anyswarm-tui-terminal.js +0 -154
- package/dist/scripts/anyswarm-tui.d.ts +0 -2
- package/dist/scripts/anyswarm-tui.js +0 -1012
- package/docs/architecture/25-foreground-tui.md +0 -51
- package/scripts/anyswarm-applications.ts +0 -39
- package/scripts/anyswarm-tui-config.ts +0 -174
- package/scripts/anyswarm-tui-session.ts +0 -295
- package/scripts/anyswarm-tui-terminal.ts +0 -147
- package/scripts/anyswarm-tui.ts +0 -912
package/AGENTS.md
CHANGED
|
@@ -1,16 +1,31 @@
|
|
|
1
1
|
# AnySwarm — Coding Agent Instructions
|
|
2
2
|
|
|
3
|
-
These instructions apply to **Coding Agents developing AnySwarm**, not research Agents running inside it. They define the human/Agent decision boundary and
|
|
3
|
+
These instructions apply to **Coding Agents developing AnySwarm**, not research Agents running inside it. They define the development and release workflow, the human/Agent decision boundary, and project-specific engineering requirements.
|
|
4
|
+
|
|
5
|
+
## Development and release workflow
|
|
6
|
+
|
|
7
|
+
Follow this complete loop for authorized work. The [development workflow](docs/workflows/development.md) provides commands; the [release guide](docs/workflows/release-and-docs-versioning.md) defines publication and recovery.
|
|
8
|
+
|
|
9
|
+
1. **Agree on the change.** Read the applicable Issue and later owner decisions. Small documentation corrections can go directly to a focused PR. For behavior, API, architecture or research changes, establish scope and acceptance in an Issue or an explicit owner instruction before implementation. Use one Issue per complete implementation PR unless the owner requests another split.
|
|
10
|
+
2. **Work on an isolated branch.** Keep the implementation, affected tests, public guides, examples and architecture explanation together. Follow the worktree placement rules below. Ordinary PRs leave the formal package version unchanged; user-visible changes belong in the root `CHANGELOG.md` `Unreleased` section, the canonical pending-change record. The release PR consolidates it into the bilingual release notes.
|
|
11
|
+
3. **Verify while developing.** Run the relevant `npm run test:focus -- ...` selections and `git diff --check`; run type, documentation and website checks for affected paths. Fix failures within scope. Full local tests are needed for a suite-wide failure, an explicit acceptance requirement, or when CI cannot provide the required evidence.
|
|
12
|
+
4. **Review the candidate.** Required Core and Website CI establish the merge gate. When Core CI selects the full suite, it builds and preserves a package candidate and runs installed-package checks against that archive with its recorded SHA-256. A version string alone does not identify a candidate. Do not replace a required archive check with a source-only check or count a skipped check as passing.
|
|
13
|
+
5. **Merge and accumulate.** After authorized review and merge, `main` may continue receiving changes. A main push updates development documentation and runs CI; it does not publish a stable package. Keep ordinary bug fixes and features independent of a formal release.
|
|
14
|
+
6. **Preview when requested.** With publication authorization, dispatch `release.yml` from `main` with `publish_next=true`. The workflow verifies an immutable candidate and assigns a unique prerelease version in staging, then publishes it to npm `next`. It does not change source package versions, create a stable tag or move npm `latest`. A preview is opt-in; publishing it is a separate action from creating or merging a PR.
|
|
15
|
+
7. **Prepare a stable release.** A release PR updates the package and lockfile versions, consolidates the root pending-change record into the English and Chinese release notes, and updates migration and compatibility information together. Verify the candidate through the manual Release workflow with both publication inputs off. After approval and merge, the release owner creates the matching `vX.Y.Z` tag at the approved revision. The tag workflow verifies and distributes the same archive through GitHub and npm, then checks the public npm bytes and installed SDK/CLI.
|
|
16
|
+
8. **Promote documentation and record evidence.** Once the exact stable package is publicly verified, review `website/docs-release.json` to bind the stable guides to that package and a compatible immutable documentation revision. Development guides follow `main` under `/docs/next/` and `/zh/docs/next/`. Documentation corrections can update the tracked documentation inputs without publishing another package. Record source commit, archive SHA-256, npm version/channel, checks and remaining gaps in the Issue/PR.
|
|
17
|
+
|
|
18
|
+
Implementation permission does not imply permission to merge, publish npm packages, create release tags, or expand experiment budgets. Continue all authorized preparation and verification before requesting any missing final approval.
|
|
4
19
|
|
|
5
20
|
## Current architecture and work requirements
|
|
6
21
|
|
|
7
22
|
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
23
|
|
|
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
|
|
24
|
+
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 scoped CLI work in [#351](https://github.com/AnySwarm/anyswarm/issues/351); current implemented behavior belongs in Architecture.
|
|
10
25
|
|
|
11
26
|
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
27
|
|
|
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.
|
|
28
|
+
Use one Issue per complete implementation PR unless the owner explicitly requests a different split; a small documentation correction does not need its own Issue. Keep approvals, progress, dependencies and handoffs on the applicable GitHub Issue/PR. 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
29
|
|
|
15
30
|
## Human decisions and delegated autonomy
|
|
16
31
|
|
|
@@ -20,9 +35,9 @@ Within an approved Issue, an Agent may select implementation details and autonom
|
|
|
20
35
|
|
|
21
36
|
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
37
|
|
|
23
|
-
##
|
|
38
|
+
## Engineering skills for coding agents
|
|
24
39
|
|
|
25
|
-
|
|
40
|
+
Use the **installed Matt Pocock engineering skills** when applicable; do not claim a skill ran if it is unavailable. The development loop above also applies without those skills. Human contributors do not need to install agent skills. Skills govern the engineering *procedure*, not product requirements or research approval.
|
|
26
41
|
|
|
27
42
|
- **`/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
43
|
- **`/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.
|
package/README.md
CHANGED
|
@@ -10,21 +10,21 @@
|
|
|
10
10
|
|
|
11
11
|
<p><strong>Build your own multi-agent Harness.</strong></p>
|
|
12
12
|
|
|
13
|
-
<p>
|
|
13
|
+
<p>Build teams of isolated Agents that share findings, use host Services, and leave inspectable results. Define the workflow in TypeScript or adapt it with your Coding Agent.</p>
|
|
14
14
|
|
|
15
15
|
<p>
|
|
16
|
-
<a href="https://github.com/AnySwarm/anyswarm/releases"
|
|
17
|
-
<a href="https://github.com/AnySwarm/anyswarm/actions/workflows/ci.yml"><img alt="CI" src="https://
|
|
16
|
+
<a href="https://github.com/AnySwarm/anyswarm/releases">GitHub Releases</a>
|
|
17
|
+
<a href="https://github.com/AnySwarm/anyswarm/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/AnySwarm/anyswarm/actions/workflows/ci.yml/badge.svg?branch=main" /></a>
|
|
18
18
|
<a href="LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-blue?style=flat-square" /></a>
|
|
19
19
|
<img alt="Node.js 22.19+" src="https://img.shields.io/badge/node.js-22.19%2B-16a34a?style=flat-square" />
|
|
20
20
|
</p>
|
|
21
21
|
|
|
22
22
|
<p>
|
|
23
|
+
<a href="https://anyswarm.github.io/anyswarm/trace-demo/index.html?run=p-limit-handoff">Replay a Real Run (No Install)</a> ·
|
|
23
24
|
<a href="https://anyswarm.github.io/anyswarm/">Website</a> ·
|
|
25
|
+
<a href="docs/en/blog/100b-tokens.md">100B-Token Essay</a> ·
|
|
24
26
|
<a href="docs/en/quickstart.md">Quickstart</a> ·
|
|
25
27
|
<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
28
|
<a href="docs/zh/overview.md">中文文档</a>
|
|
29
29
|
</p>
|
|
30
30
|
|
|
@@ -32,79 +32,91 @@
|
|
|
32
32
|
|
|
33
33
|
---
|
|
34
34
|
|
|
35
|
-
AnySwarm separates **how Agents collaborate** from **how Agents are isolated and
|
|
35
|
+
AnySwarm separates **how Agents collaborate (the Harness)** from **how Agents are isolated, supervised, and observed (the Runtime)**. You write a lightweight TypeScript Harness — roles, host-governed Services, and stopping conditions. The Runtime owns isolated OpenSandbox execution, host-gated model & credential access, authenticated Service bridging, dual-layer observability for Coding Agents and humans, artifact collection, and verified `Stop → Export → Delete` cleanup.
|
|
36
|
+
|
|
37
|
+
> Read the architecture essay: **[What Burning 100B Tokens on Agent Swarms Taught Us](docs/en/blog/100b-tokens.md)** · **[中文版文章](docs/zh/blog/100b-tokens.md)**
|
|
36
38
|
|
|
37
39
|
## Why AnySwarm
|
|
38
40
|
|
|
39
|
-
- **
|
|
40
|
-
- **
|
|
41
|
-
- **
|
|
42
|
-
- **
|
|
41
|
+
- **Host-governed Services over raw A2A** — Natural-language chatter cannot enforce atomic leases or verify tests ran. Every shared state mechanism is a typed host Service with JSON Schema validation, per-profile ACLs, and an unforgeable `caller` identity.
|
|
42
|
+
- **OpenSandbox isolation, host-only keys** — Run `anyswarm setup` to prepare local Docker OpenSandbox (and scale to Kubernetes / MicroVMs via `SandboxProvider`). Model API keys stay on the host Controller; each integration explicitly controls any credentials granted to an Agent.
|
|
43
|
+
- **Observability built for Coding Agents & humans** — Partitioned per-agent archives plus replayable Service state let Coding Agents diagnose stalls without blowing context, and open directly in the zero-dependency browser Trace Viewer (`anyswarm trace`).
|
|
44
|
+
- **One Runtime, any coordination contract** — Swap between hierarchical Subagents, leased TaskPool, ScaleMAS-style Substrate, or leaderless AutoResearch in user-space TypeScript without changing the Runtime.
|
|
43
45
|
|
|
44
|
-
##
|
|
46
|
+
## Real tasks, inspectable results
|
|
45
47
|
|
|
46
|
-
|
|
48
|
+
**Repository handoff.** Give `subagents` a real project directory. Root delegates entry points and run instructions to one child, modules and tests to another, then combines their file-backed findings into `report.md`. Inspect the member messages, source reads and exported report in the same Run. The browser replay below shows this workflow on the p-limit repository.
|
|
47
49
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
anyswarm --version
|
|
50
|
+
**AutoResearch.** Equal peers develop and review patches in separate Sandboxes. A host-controlled evaluator receives frozen candidates and records training and final results. The current [AutoResearch guide](docs/en/autoresearch.md) explains the FrontierCS-2 setup, candidate identities and evaluation boundary. The [recorded AutoResearch runs](https://github.com/AnySwarm/anyswarm/pull/359) preserve the real model, review, training and final evaluation evidence.
|
|
51
|
+
|
|
52
|
+
## Quick start: hand off a real repository
|
|
52
53
|
|
|
53
|
-
|
|
54
|
-
anyswarm setup --backend pi
|
|
54
|
+
[Open the p-limit replay](https://anyswarm.github.io/anyswarm/trace-demo/index.html?run=p-limit-handoff) and choose **Files & Results** to read the original `report.md`.
|
|
55
55
|
|
|
56
|
-
|
|
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"
|
|
56
|
+
Use Node.js 22.19+ with npm. Install [AnySwarm 0.6.0](docs/en/latest.md#v060) for the Subagents export, or use [a matching source build](docs/en/quickstart.md#build-and-install-from-source-main). With an older installation, check the [guide for the current published package](https://anyswarm.github.io/anyswarm/docs/quickstart/).
|
|
60
57
|
|
|
61
|
-
|
|
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
|
|
58
|
+
Start your local Docker engine and install a supported Pi or Codex backend. Use a streaming, tool-capable model you have access to. Setup checks infrastructure. Your model is exercised by the handoff itself.
|
|
66
59
|
|
|
67
|
-
|
|
60
|
+
```sh
|
|
61
|
+
anyswarm setup
|
|
62
|
+
|
|
63
|
+
export ANYSWARM_MODEL_URL='https://api.openai.com/v1/responses'
|
|
64
|
+
export ANYSWARM_MODEL_ID='gpt-5-mini'
|
|
65
|
+
export ANYSWARM_MODEL_TOKEN='<your-api-key>'
|
|
66
|
+
|
|
67
|
+
git clone https://github.com/sindresorhus/p-limit.git ./handoff-input
|
|
68
|
+
git -C ./handoff-input checkout --detach a8a6fbec4e0e866d6d779b10889bb4f5567e70eb
|
|
69
|
+
anyswarm eject subagents --dir ./handoff
|
|
70
|
+
(
|
|
71
|
+
cd ./handoff
|
|
72
|
+
npm install
|
|
73
|
+
npm start -- --config ./handoff-config.ts --cwd ../handoff-input \
|
|
74
|
+
--prompt 'Prepare an engineering handoff for this repository. Assign two different children: ask one to find its public entry points, exported types and how to run the repository checks, and ask the other to identify scheduling flow, core state and test coverage. Have both return independent concrete findings to Root with file paths and line numbers. Wait for both; cross-check their citations. Write a useful report.md with the architecture, verified commands, risks and open questions. Only create report.md; do not modify source, install dependencies or claim to have run checks you only read about.' \
|
|
75
|
+
--output-dir ../runs
|
|
76
|
+
)
|
|
68
77
|
anyswarm trace --root ./runs --port 8787
|
|
69
78
|
```
|
|
70
79
|
|
|
71
|
-
The [
|
|
80
|
+
The [independent VM runs](https://github.com/AnySwarm/anyswarm/issues/358#issuecomment-7385075753) used these time budgets with GPT-6.1 Sol. The exported configuration allows 360 seconds of work, 70 seconds per model request and 60 seconds for cleanup. It requires `report.md` as the sole collected file. Change the model settings to match your provider. To investigate your own project, replace `../handoff-input` with its path. Agents receive private copies. Look for the archived report in the printed artifact paths under `./runs`.
|
|
81
|
+
|
|
82
|
+
Check that the two delegated checks actually occurred, that `report.md` cites the captured files, and that export and cleanup completed. Generic Subagents records `acceptance: not-run`: Agent completion and exported bytes do not prove the report's conclusions. Repository size, model behavior and environment affect runtime. The [Quickstart](docs/en/quickstart.md) covers setup, timeouts and inspection.
|
|
72
83
|
|
|
73
|
-
|
|
84
|
+
To opt into a published preview, install `@anyswarm/core@next` explicitly and
|
|
85
|
+
record `anyswarm --version`. Next documentation follows `main` and may be newer
|
|
86
|
+
than the last preview package. For exact reproduction, use the installed
|
|
87
|
+
package's examples or a candidate archive with its recorded commit and SHA-256.
|
|
74
88
|
|
|
75
|
-
## Build with the
|
|
89
|
+
## Build with the SDK or your Coding Agent
|
|
76
90
|
|
|
77
|
-
|
|
91
|
+
Use the SDK tutorials in order: [First Harness](docs/en/first-harness.md) teaches a two-Agent Service handoff and exact exported-byte checks; [Parallel Swarm](docs/en/build-your-harness.md) adds three researchers, peer review and synthesis. Both use the same public Harness interface and one Runtime for the team.
|
|
92
|
+
|
|
93
|
+
Use AnySwarm 0.6.0 or a [matching source build](docs/en/quickstart.md#build-and-install-from-source-main) for these tutorials. When testing a candidate, retain its source commit and archive hash. The two eject targets first ship in 0.6.0.
|
|
78
94
|
|
|
79
95
|
```sh
|
|
80
|
-
|
|
96
|
+
anyswarm eject parallel-swarm --dir ./my-harness
|
|
97
|
+
cd ./my-harness
|
|
98
|
+
npm install
|
|
81
99
|
```
|
|
82
100
|
|
|
83
|
-
|
|
101
|
+
### Copy Prompt for Claude Code / Codex / Cursor
|
|
84
102
|
|
|
85
|
-
|
|
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)
|
|
103
|
+
The exported `AGENTS.md` is written for authors of their own Harness. The repository's [AGENTS.md](AGENTS.md) governs maintenance of AnySwarm itself.
|
|
88
104
|
|
|
89
|
-
|
|
105
|
+
```text
|
|
106
|
+
Help me adapt AnySwarm to my workflow. First confirm that the installed AnySwarm CLI supports `anyswarm eject parallel-swarm --dir ./my-harness`. Export it if ./my-harness does not already exist. Read ./my-harness/AGENTS.md and README.md, then the installed @anyswarm/core types. Ask me for the business objective, input directory, and acceptance criteria if they are missing. Modify the exported Harness using public SDK APIs, one Runtime for the team, private Agent workspaces, and host Services for shared state. Keep report export, evidence checks, timeouts, and cleanup explicit. Run the available local checks, then explain how to run it and what those checks do and do not verify. Do not overwrite my source project or start a paid model run without my approval.
|
|
107
|
+
```
|
|
90
108
|
|
|
91
|
-
|
|
109
|
+
## Three paths through the examples
|
|
92
110
|
|
|
93
|
-
|
|
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) |
|
|
111
|
+
All live examples need the common Runtime setup and model access. “No extra services” means their host creates the business Services locally; it does not remove Docker/OpenSandbox or model requirements.
|
|
100
112
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
113
|
+
| Tier | Purpose | Entry points and requirements |
|
|
114
|
+
| --- | --- | --- |
|
|
115
|
+
| **1 · Start and learn** | One useful CLI task, then two SDK lessons | [Subagents repository handoff](docs/en/quickstart.md); [First Harness](docs/en/first-harness.md) → [Parallel Swarm](docs/en/build-your-harness.md). |
|
|
116
|
+
| **2 · Applications and topology references** | Understand an application, or adapt a collaboration policy | [AutoResearch](docs/en/autoresearch.md), with its current FrontierCS-2 requirements; [Subagents](docs/en/harnesses/subagents.md), [TaskPool](docs/en/harnesses/taskpool.md) and [Substrate](docs/en/harnesses/substrate.md), with local business Services. |
|
|
117
|
+
| **3 · Advanced source and integrations** | Study routing, protocols, or external collaboration systems | `super`, `code`, `harness-session`, and focused Service examples. [PeerMesh](docs/en/harnesses/peermesh.md) needs Gitea, Mattermost, MySQL and its Board process; [Lead-Worker](docs/en/harnesses/lead-worker.md) needs Gitea. Code development is paused. |
|
|
106
118
|
|
|
107
|
-
|
|
119
|
+
See the [complete example index](examples/README.md) for implementation ownership, input/output contracts and status, or [choose a Harness](docs/en/harnesses/index.md) by collaboration mechanism.
|
|
108
120
|
|
|
109
121
|
## Built-in Trace Viewer
|
|
110
122
|
|
|
@@ -128,11 +140,13 @@ When started inside an SSH session, `anyswarm trace` prints the matching `ssh -N
|
|
|
128
140
|
git clone https://github.com/AnySwarm/anyswarm.git
|
|
129
141
|
cd anyswarm
|
|
130
142
|
npm ci --ignore-scripts
|
|
131
|
-
npm run
|
|
132
|
-
npm test
|
|
143
|
+
npm run typecheck
|
|
144
|
+
npm run test:focus -- test/core-thinking-levels.test.ts
|
|
133
145
|
```
|
|
134
146
|
|
|
135
|
-
|
|
147
|
+
These deterministic checks do not need a model account or running Sandbox.
|
|
148
|
+
Ordinary PRs merge into `main` without a version bump or npm publication; a
|
|
149
|
+
release PR prepares the stable version. See [CONTRIBUTING.md](CONTRIBUTING.md), [Development Workflow](docs/workflows/development.md), and [SECURITY.md](SECURITY.md).
|
|
136
150
|
|
|
137
151
|
## License
|
|
138
152
|
|
package/dist/examples/README.md
CHANGED
|
@@ -1,31 +1,68 @@
|
|
|
1
1
|
# Examples and Service integrations
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
example that uses it.
|
|
3
|
+
Choose an example by the task and the collaboration policy you need. A normal
|
|
4
|
+
Harness uses one Runtime to own its Agents, private Sandboxes and authenticated
|
|
5
|
+
Services. The examples also retain direct Runtime scripts, Service adapters and
|
|
6
|
+
zero-Runtime protocol fixtures where those teach a specific API more clearly.
|
|
8
7
|
|
|
9
|
-
Start with
|
|
10
|
-
Publisher and Writer, their Service handoff, a user answer and verified
|
|
11
|
-
artifact export. Its same default definition is used by SDK, foreground and
|
|
12
|
-
RPC. [HarnessSession clients](harness-session/README.md) exercise the public
|
|
13
|
-
protocol with a zero-Runtime fixture.
|
|
8
|
+
## Start with a real repository question
|
|
14
9
|
|
|
15
|
-
|
|
10
|
+
[Subagents](subagents/README.md) can prepare an engineering handoff for a real
|
|
11
|
+
local repository: Root delegates entry/configuration and modules/tests reading,
|
|
12
|
+
receives child findings, then writes a source-backed `report.md`. Replace the
|
|
13
|
+
question or directory to investigate your own work. There is no planted defect
|
|
14
|
+
or predetermined report.
|
|
16
15
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
| [substrate](substrate/README.md) · [Host](substrate/harness/index.ts) | Peers publish, retrieve and cite contributions. | SQLite publication Service. | Common infrastructure. The explicit FATE benchmark also needs Lean/Mathlib/checker dependencies. |
|
|
16
|
+
```sh
|
|
17
|
+
anyswarm --harness subagents --cwd /absolute/path/to/project \
|
|
18
|
+
--prompt 'Prepare an engineering handoff. Delegate entry points and configuration to one child, and modules and tests to another. Check their findings and write report.md with relative source paths and line ranges. Separate facts, inferences and checks not performed. Do not modify project source.' \
|
|
19
|
+
--output-dir /absolute/path/to/runs
|
|
20
|
+
anyswarm trace --root /absolute/path/to/runs --open
|
|
21
|
+
```
|
|
24
22
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
Complete `anyswarm setup` and configure a tool-capable model first. The host
|
|
24
|
+
captures one input snapshot; members work in separate copies, and exported
|
|
25
|
+
results do not overwrite the local source. Generic Subagents reports business
|
|
26
|
+
acceptance as `not-run`. Inspect the contributions, citations, exported report
|
|
27
|
+
and original cleanup receipt. A finished model turn is not a quality verdict.
|
|
28
|
+
|
|
29
|
+
## Three levels
|
|
30
|
+
|
|
31
|
+
| Level | Examples | Purpose and facilities |
|
|
32
|
+
| --- | --- | --- |
|
|
33
|
+
| 1: first use and SDK learning | [subagents](subagents/README.md), then [first-harness](first-harness/README.md) and [parallel-swarm](parallel-swarm/README.md) | A useful repository task; authenticated Service handoff and exact bytes; fixed parallel investigation and peer review. Saved Sandbox/executor plus a model endpoint, with no additional business services. |
|
|
34
|
+
| 2: applications and built-in coordination | [autoresearch](autoresearch/README.md); [subagents](subagents/README.md), [taskpool](taskpool/README.md), [substrate](substrate/README.md) | AutoResearch's research/evaluator application; dynamic delegation, exclusive Task leases and Workspace integration, or an immutable citation DAG. FrontierCS-2 has substantial judge/build resources; see #337 for the configurable example and real-model evidence. |
|
|
35
|
+
| 3: advanced source and integrations | [super](super/README.md), [code](code/README.md), [harness-session](harness-session/README.md), [peermesh](peermesh/README.md), [lead-worker](lead-worker/README.md) | Background routing, candidate patches and SDK/RPC questions; heavy Git/chat/database integrations. These are not equivalent first-run choices. Code core development is paused. |
|
|
36
|
+
|
|
37
|
+
AutoResearch's complete application and new real-model acceptance are owned by
|
|
38
|
+
[#337](https://github.com/AnySwarm/anyswarm/issues/337). This examples update does
|
|
39
|
+
not change its evaluator, provider, resources or acceptance criteria.
|
|
40
|
+
|
|
41
|
+
## Source and verification inventory
|
|
42
|
+
|
|
43
|
+
The table records what was changed or deliberately retained in #335. Follow the
|
|
44
|
+
local README for full commands and evidence. “Controlled tests” describe API and
|
|
45
|
+
failure-path coverage, not an assertion that a new real-model run succeeded.
|
|
46
|
+
|
|
47
|
+
| Example / treatment | Input and output | Main editable source | Objective checks and limits |
|
|
48
|
+
| --- | --- | --- | --- |
|
|
49
|
+
| [subagents](subagents/README.md): retain controller; add real task recipe and full eject | Captured directory + prompt → Root's collected files and collaboration state. | `project.ts`, `business.ts`, `config.ts`, `harness/controller.ts`, `services/`, `prompts/` | Existing caller, delivery, collection and pending-cleanup tests; source/export tests. Generic acceptance remains `not-run`; [Two real repository handoffs verified](https://github.com/AnySwarm/anyswarm/issues/358#issuecomment-7385075753). |
|
|
50
|
+
| [first-harness](first-harness/README.md): simplify lifecycle/configuration; default no questions; add eject | Prompt + preset/explicit channel → Publisher/Service/Writer handoff and `delivery.txt`. | `harness.ts`, `config.ts`, `handoff.ts`, `session.ts` | Authenticated publication/retrieval and exact sandbox/exported bytes. Explicit SDK/RPC questions remain. Controlled regression and installed-client gates are separate from native/model evidence. |
|
|
51
|
+
| [parallel-swarm](parallel-swarm/README.md): configure, verify evidence, preserve receipts; add eject | Captured repository + question → three investigators, two rounds, Board findings, synthesized `report.md`. | `harness.ts`, `config.ts`, `board.ts`, `board-service.ts`, `report.ts` | Each member contributes and cross-reviews; source path/line/excerpt checks; required report export. Does not prove semantic correctness or completeness. [Two real-model runs verified collaboration and export](https://github.com/AnySwarm/anyswarm/issues/335#issuecomment-7399586208). |
|
|
52
|
+
| [taskpool](taskpool/README.md): retain normal Harness | Directory + Mission prompt → Tasks, exclusive Execution leases, Workspace revisions and integrated files. | `project.ts`, `config.ts`, `harness/`, `services/` | Existing lease, fencing, publication and collection tests. No independent domain checker by default: acceptance `not-run`. Stores are created locally by the Harness. |
|
|
53
|
+
| [substrate](substrate/README.md): retain normal Harness | Directory + question → immutable publications and references in a citation DAG. | `project.ts`, `project-config.ts`, `harness/`, `services/` | Existing publication identity/reference/idempotency and cleanup tests. Local SQLite; generic acceptance `not-run`. The FATE benchmark has its own dependencies and checker. |
|
|
54
|
+
| [lead-worker](lead-worker/README.md): retain heavy integration | Captured project + assignments → scoped Git branches, read feedback and Lead submission. | `project.ts`, `project-config.ts`, `harness/`, `services/` | Existing Board/Git delivery checks and package tests. Requires Gitea; dynamic checker requires its Docker image. Fixture acceptance does not establish arbitrary task correctness. |
|
|
55
|
+
| [peermesh](peermesh/README.md): retain heavy integration | Captured project + work window → Board/chat/Git coordination and pinned main export. | `project.ts`, `project-config.ts`, `harness/`, `services/` | Existing identity, routed input, merge and cleanup tests. Requires Gitea, Mattermost, pinned Board/Python dependencies and initialized MySQL. |
|
|
56
|
+
| [notes](notes/README.md): retain both entries; correct stale helper description | Project observation, or explicit fixed fact → Service handoff and reader/follow-up files. | `project.ts`, `main.ts`, `config.ts`, `notes.ts` | Actual author/read records and exact exported bytes. Shared input/report helpers come from the public SDK, not removed adjacent files. |
|
|
57
|
+
| [messages](messages/README.md): retain adapter and direct host | Project observation, or random handoff text → exact received file. | `project.ts`, `handoff.ts`, `handoff-config.ts`, `messages.ts` | In-process or attached HTTP Service, per-role grants and bytes. An attached service keeps its original owner; close does not stop it. |
|
|
58
|
+
| [agent-session.ts](agent-session.ts): retain direct Runtime script | Explicit Runtime configuration, Profile and prompt → session observations and raw stop/close receipts. | `agent-session.ts` | Demonstrates configuration, context delivery, message/stat reads and bounded waits. It is not a business acceptance Harness. |
|
|
59
|
+
| [services](services/README.md): retain individual adapters | Operation-specific input → Service responses/state or controlled process lifecycle. | Each directory's `host.ts`, `run.ts`, adapters and manifests | Persistent Board, Agent Control and MCP have distinct lifecycle/authorization checks. GitHub Issues needs authenticated `gh`; Mathlib Search needs its explicit provider. |
|
|
60
|
+
| [harness-session](harness-session/README.md), [authoring](authoring/README.md): retain fixtures | Questions/input or simple configuration → deterministic local result. | `harness.ts` and SDK/RPC clients; authoring `business.ts` | Zero Runtime: protocol and source-authoring examples, not evidence of multi-Agent execution. |
|
|
61
|
+
| [super](super/README.md), [code](code/README.md): retain advanced applications | GitHub routing or bounded patch work with application-specific facilities. | Local README and source manifests | Core product changes are outside this ticket; no interactive Code first-run promotion. |
|
|
62
|
+
|
|
63
|
+
PeerMesh and Lead-Worker need the documented native-Git network policy in
|
|
64
|
+
addition to their services. They are heavy integration references, not
|
|
65
|
+
“zero-dependency” alternatives.
|
|
29
66
|
|
|
30
67
|
## Run an example from its directory
|
|
31
68
|
|
|
@@ -34,26 +71,38 @@ Prepare OpenSandbox, the Worker and a model route using
|
|
|
34
71
|
checkout. Install either the published SDK or a verified candidate archive,
|
|
35
72
|
then copy that installed SDK's example sources into your project. This keeps
|
|
36
73
|
the source and API together even when a candidate and release share a version
|
|
37
|
-
number.
|
|
74
|
+
number. The stable example below pins `0.5.2` and uses its supported `run`
|
|
75
|
+
command. Examples checked out from `main` must use a matching source candidate
|
|
76
|
+
rather than an older installed SDK.
|
|
38
77
|
|
|
39
78
|
```sh
|
|
40
79
|
npm init -y
|
|
41
|
-
npm install --ignore-scripts "${ANYSWARM_SDK_ARCHIVE:-@anyswarm/core@0.5.
|
|
80
|
+
npm install --ignore-scripts "${ANYSWARM_SDK_ARCHIVE:-@anyswarm/core@0.5.2}"
|
|
42
81
|
sdk=node_modules/@anyswarm/core
|
|
43
82
|
cp -R "$sdk"/examples/subagents demo
|
|
44
83
|
cd demo
|
|
45
|
-
../node_modules/.bin/
|
|
84
|
+
../node_modules/.bin/anyswarm run ./project.ts --cwd /absolute/path/to/project --prompt 'Implement and verify the requested change'
|
|
46
85
|
```
|
|
47
86
|
|
|
87
|
+
To test a published preview instead, install `@anyswarm/core@next` with
|
|
88
|
+
`--save-exact` in the empty project, then copy the examples from that installed
|
|
89
|
+
package as above. Record the resolved prerelease version and preserve the lockfile.
|
|
90
|
+
The website's Next channel follows `main` and can be ahead of that package; its
|
|
91
|
+
bundled documentation and examples describe the installed revision.
|
|
92
|
+
|
|
48
93
|
For another collaboration mechanism, replace `subagents` in the copy command
|
|
49
94
|
with `taskpool`, `peermesh`, `lead-worker` or `substrate`. The copied project
|
|
50
95
|
resolves the SDK from its parent installation. The CLI loads TS directly, including multi-file imports and TS configuration.
|
|
51
96
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
97
|
+
### Build and eject this checkout’s source
|
|
98
|
+
|
|
99
|
+
For a released built-in, use the normal CLI alias. For editable examples, install
|
|
100
|
+
a matching SDK candidate outside the checkout. The new `first-harness`,
|
|
101
|
+
`parallel-swarm` and `subagents` eject manifests are **not included in 0.5.2**.
|
|
102
|
+
Until a release includes them, build or obtain a candidate from this source:
|
|
55
103
|
|
|
56
104
|
```sh
|
|
105
|
+
# From the candidate source checkout:
|
|
57
106
|
npm ci --ignore-scripts
|
|
58
107
|
pack_dir=$(mktemp -d)
|
|
59
108
|
archive=$(npm run --silent pack:release -- "$pack_dir")
|
|
@@ -61,60 +110,72 @@ sha256sum "$archive"
|
|
|
61
110
|
export ANYSWARM_SDK_ARCHIVE="$archive"
|
|
62
111
|
```
|
|
63
112
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
directory before running its TypeScript entry.
|
|
113
|
+
Record the source commit and archive digest. In an empty directory outside that
|
|
114
|
+
checkout, install those exact bytes:
|
|
67
115
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
116
|
+
```sh
|
|
117
|
+
npm init -y
|
|
118
|
+
npm install --ignore-scripts "$ANYSWARM_SDK_ARCHIVE"
|
|
119
|
+
npm exec -- anyswarm eject parallel-swarm --dir ./my-swarm
|
|
120
|
+
cd my-swarm
|
|
121
|
+
npm install
|
|
122
|
+
npm start -- --cwd /absolute/path/to/project \
|
|
123
|
+
--prompt 'Explain the execution path, configuration and test coverage for the behavior we plan to change.' \
|
|
124
|
+
--output-dir /absolute/path/to/runs
|
|
125
|
+
```
|
|
74
126
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
127
|
+
Common model/executor environment settings take precedence over scoped
|
|
128
|
+
fallbacks; setup supplies the saved Sandbox connection and executor. Explicit
|
|
129
|
+
`--config ./config.ts` selects the complete trusted configuration. Input files,
|
|
130
|
+
model credentials and output directories have separate roles: keep credentials
|
|
131
|
+
on the host and put Run output outside the investigated repository.
|
|
79
132
|
|
|
80
|
-
|
|
133
|
+
For other collaboration examples, copy the complete directory from the same
|
|
134
|
+
installed SDK and run its local `project.ts` with `anyswarm run`. The existing
|
|
135
|
+
per-example package/build route remains supported:
|
|
81
136
|
|
|
82
137
|
```sh
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
138
|
+
sdk=node_modules/@anyswarm/core
|
|
139
|
+
cp -R "$sdk"/examples/taskpool demo
|
|
140
|
+
cd demo
|
|
141
|
+
../node_modules/.bin/anyswarm run ./project.ts \
|
|
142
|
+
--cwd /absolute/path/to/project --prompt 'Your actual task'
|
|
86
143
|
```
|
|
87
144
|
|
|
88
|
-
|
|
89
|
-
complete source and an SDK archive dependency bound to that package's contents.
|
|
90
|
-
Run `npm install` to install that local archive when moving the export to another
|
|
91
|
-
machine. `anyswarm-source.json` records source revision, SDK source, content and
|
|
92
|
-
archive digests. Application teams register the same source manifest for
|
|
93
|
-
`anys eject code`, `anys eject autoresearch` and `anys eject super`.
|
|
94
|
-
|
|
95
|
-
## Smaller SDK tutorials
|
|
145
|
+
## Export an editable Harness
|
|
96
146
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
and
|
|
147
|
+
Use **`parallel-swarm`** to start from readable fixed collaboration, `subagents`
|
|
148
|
+
for dynamic delegation, or `first-harness` to learn Service handoff. Their source
|
|
149
|
+
manifests include the actual configuration, business/controller code, Services
|
|
150
|
+
and an application-author `AGENTS.md`. No export depends on a sibling example.
|
|
151
|
+
|
|
152
|
+
`anyswarm-source.json` records source and SDK content/archive identity;
|
|
153
|
+
`.anyswarm-sdk/core.tgz` is the local SDK dependency. Run `npm install` and use
|
|
154
|
+
the exported project's `npm start` to preserve that identity. Edit the visible
|
|
155
|
+
business source and test the changed behavior with a real question. The root
|
|
156
|
+
repository's maintainer `AGENTS.md` is not the downstream author guide.
|
|
157
|
+
|
|
158
|
+
`anyswarm eject example --dir ./protocol-example` continues to export the
|
|
159
|
+
zero-Runtime authoring fixture. Code, Super and AutoResearch retain their own
|
|
160
|
+
application manifests and dependency requirements.
|
|
161
|
+
|
|
162
|
+
## Evidence handoff and remaining real runs
|
|
163
|
+
|
|
164
|
+
The new source-export/configuration/Board tests are deterministic API checks.
|
|
165
|
+
Installed-package checks execute copied source outside repository ancestry and
|
|
166
|
+
verify matching SDK bytes. Record their exact command and candidate identity in
|
|
167
|
+
the implementation PR. They do not substitute for native Sandbox execution.
|
|
168
|
+
|
|
169
|
+
Before publishing a new real-use Trace, run the Subagents handoff on a real
|
|
170
|
+
repository and a second question or directory; inspect child contributions,
|
|
171
|
+
Root's citations and report. Run the exported Parallel Swarm with a real model,
|
|
172
|
+
then change its question or visible business code and inspect the new findings.
|
|
173
|
+
Keep the model/executor, source snapshot, duration, artifacts and cleanup with
|
|
174
|
+
each Run. The owner has deferred these real-model acceptance runs; do not relabel
|
|
175
|
+
the website's current controlled Trace fixture as that evidence.
|
|
176
|
+
|
|
177
|
+
The [public guides](../docs/INDEX.md) and website consume these contracts under
|
|
178
|
+
[#358](https://github.com/AnySwarm/anyswarm/issues/358). Source code, configurations
|
|
179
|
+
and checks remain owned by the examples. See the
|
|
180
|
+
[Harness author contract](../docs/architecture/23-project-harness.md#authoring-an-example)
|
|
181
|
+
for the public SDK and lifecycle boundaries.
|
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
Run this complete example with the installed AnySwarm CLI.
|
|
4
4
|
|
|
5
5
|
```sh
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
anyswarm run ./harness.ts
|
|
7
|
+
anyswarm run ./harness.ts --config ./config.ts --prompt 'Create a greeting'
|
|
8
8
|
```
|
|
9
9
|
|
|
10
10
|
Edit `business.ts` and run the command again to change the result. `harness.ts`
|
|
11
11
|
defines the Harness lifecycle, `business.ts` contains its rule, and `config.ts`
|
|
12
12
|
provides its default public configuration. This example uses no model or Sandbox.
|
|
13
13
|
|
|
14
|
-
`
|
|
14
|
+
`anyswarm eject example --dir ./my-harness` exports these sources and a local SDK
|
|
15
15
|
archive. The generated package depends on that archive, so `npm install` retains
|
|
16
|
-
the exact candidate SDK. Direct `
|
|
16
|
+
the exact candidate SDK. Direct `anyswarm run` can also resolve the invoking CLI's SDK.
|
|
17
17
|
Use the same candidate CLI recorded in `anyswarm-source.json`.
|
|
18
18
|
|
|
19
19
|
Application authors use the same export mechanism by providing `eject.json` in
|