@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/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
|
|
@@ -1,33 +1,125 @@
|
|
|
1
|
-
# AutoResearch
|
|
1
|
+
# AutoResearch with FrontierCS-2
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Run a team of independent research peers on the official `binary_fuse_filter` task. The peers write patches, inspect each other's work and share train feedback. At the end, the trusted evaluator runs the official final on the selected patch. Open Trace Viewer during the run or replay it afterward.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 1. Install and choose your backend
|
|
6
6
|
|
|
7
|
-
Use a Linux x86-64
|
|
7
|
+
Use a Linux x86-64 controller. The CLI supports Node.js 22.19 or newer. The exported TypeScript example is tested with Node.js 24 LTS. Install Git, Git LFS, Python 3, Docker Engine and Docker Buildx. For a new Debian 13 VM, install Docker Engine 29 and its Buildx plugin from Docker's apt repository. Debian 13's stock Docker 26 can pass the image-store check and still fail when Pumpkin tags a just-built image. [Install Docker Engine on Debian](https://docs.docker.com/engine/install/debian/)
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
sudo apt-get update
|
|
11
|
+
sudo apt-get install git git-lfs python3 ca-certificates curl xz-utils util-linux
|
|
12
|
+
sudo systemctl enable --now docker
|
|
13
|
+
docker version --format '{{ .Server.Version }}'
|
|
14
|
+
docker buildx version
|
|
15
|
+
docker info --format '{{ .DriverStatus }}'
|
|
12
16
|
```
|
|
13
17
|
|
|
14
|
-
|
|
18
|
+
If those Docker commands report permission denied on your own Linux VM, add your account to the Docker group with `sudo usermod -aG docker "$USER"` and open a fresh login session before retrying. Keep Docker management access on the controller. [AnySwarm setup guide](https://anyswarm.github.io/anyswarm/docs/quickstart/)
|
|
15
19
|
|
|
16
|
-
|
|
20
|
+
Before running AnySwarm setup, verify that the Docker output contains `io.containerd.snapshotter.v1`. Pumpkin needs the containerd image store to resolve pinned images by digest. On a fresh Linux VM where the marker is absent, add `"containerd-snapshotter": true` under `"features"` in `/etc/docker/daemon.json`, run `sudo systemctl restart docker`, and check again. Existing images and containers from the previous store become hidden when switching stores. On a shared host, choose or provision a suitable Docker context first. [Docker image store setup](https://docs.docker.com/engine/storage/containerd/)
|
|
17
21
|
|
|
18
|
-
|
|
22
|
+
Install the CLI from a release that includes this example using `npm install -g @anyswarm/core`, or use `npm install -g /path/to/anyswarm-core.tgz` for a supplied candidate archive. A user-owned Node installation lets you install these packages without `sudo`. If you choose Pi, install the executable before setup:
|
|
19
23
|
|
|
20
|
-
|
|
24
|
+
```sh
|
|
25
|
+
npm install -g @earendil-works/pi-coding-agent
|
|
26
|
+
anyswarm setup --backend pi
|
|
27
|
+
anyswarm doctor --smoke
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
If you choose Codex, install its executable, choose a Responses model, then use `anyswarm setup --backend codex` and `anyswarm doctor --smoke`. Use `--backend-path` if your executable is outside your shell path. For an existing deployment, set its Lifecycle URL and API key and use `anyswarm setup --mode existing`. Make the matching Worker image available on that deployment, configure `dns+nft` egress and a callback URL reachable from the Workers, then repeat `anyswarm doctor --mode existing --smoke`. Pumpkin and its judges still run on the controller's selected Docker daemon.
|
|
21
31
|
|
|
22
|
-
##
|
|
32
|
+
## 2. Export the example and configure your model and budget
|
|
23
33
|
|
|
24
34
|
```sh
|
|
25
|
-
|
|
26
|
-
|
|
35
|
+
anyswarm eject autoresearch --dir ./research-demo
|
|
36
|
+
cd ./research-demo
|
|
37
|
+
npm install
|
|
27
38
|
```
|
|
28
39
|
|
|
29
|
-
|
|
40
|
+
Edit `frontiercs2-config.ts`. Its default export is the shared configuration for prepare and run. The supplied template reads these values from the current shell. Use the provider’s full HTTP request URL. Load the token from your own credential store.
|
|
41
|
+
|
|
42
|
+
| Setting | What to supply |
|
|
43
|
+
| --- | --- |
|
|
44
|
+
| `ANYSWARM_MODEL_PROVIDER` | Your provider label |
|
|
45
|
+
| `ANYSWARM_MODEL_ID` | Exact model ID at the upstream |
|
|
46
|
+
| `ANYSWARM_MODEL_URL` | Full HTTP(S) request endpoint ending in `/v1/responses` or `/v1/chat/completions` for the built-in transports |
|
|
47
|
+
| `ANYSWARM_MODEL_PROTOCOL` | `responses` by default. For Pi with Chat Completions, set `chat-completions` |
|
|
48
|
+
| `ANYSWARM_MODEL_TOKEN` | Bearer token if the endpoint requires one. Load it into your shell from private storage |
|
|
49
|
+
| `ANYSWARM_AUTORESEARCH_STATE_DIR` | Optional path for prepared material and reference records |
|
|
50
|
+
|
|
51
|
+
For a Responses endpoint, replace the placeholders in this shell snippet. Keep the same shell or load the same settings before prepare and run.
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
export ANYSWARM_MODEL_PROVIDER='my-provider'
|
|
55
|
+
export ANYSWARM_MODEL_ID='model-id-from-my-provider'
|
|
56
|
+
export ANYSWARM_MODEL_URL='https://my-provider.example/v1/responses'
|
|
57
|
+
# Skip these two lines if your endpoint needs no bearer token.
|
|
58
|
+
read -rsp 'Model token: ' ANYSWARM_MODEL_TOKEN && printf '\n'
|
|
59
|
+
export ANYSWARM_MODEL_TOKEN
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
You can supply an ordinary `ModelConfig` in the TypeScript file instead. For a reasoning model outside the executor catalog, set its catalog-backed `capabilities` with `contextWindow`, `maxOutputTokens`, `tools: true` and `reasoning`. Use `model.upstream.headers` for custom authentication. Supply `executor`, `image`, `sandbox` and `connection` to override your saved setup.
|
|
63
|
+
|
|
64
|
+
The template reserves two peers, a shared 12-minute search window, four train admissions and 128 new model requests across the team. You can edit `goal` and `budget`. An omitted `maxModelRequests` leaves the Gateway's request count uncapped. Set `continueAfterTrainBudget: true` if peers should keep reviewing and testing locally until another stop condition. The app budget and Pumpkin's official grant are reported independently.
|
|
65
|
+
|
|
66
|
+
## 3. Check and prepare
|
|
67
|
+
|
|
68
|
+
```sh
|
|
69
|
+
npm exec -- anyswarm run ./prepare-demo.ts --config ./frontiercs2-config.ts --check
|
|
70
|
+
npm exec -- anyswarm run ./prepare-demo.ts --config ./frontiercs2-config.ts
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Read the `ACTION` lines to see which command or configuration field to fix. `--check` reports configuration, authentication, endpoint reachability, placement and available capacity. It makes a bounded HTTP HEAD probe to the model route and reports inference as unattempted. A successful real tool turn and continuation during the run establish actual inference.
|
|
74
|
+
|
|
75
|
+
| If a check reports an action | Where to start |
|
|
76
|
+
| --- | --- |
|
|
77
|
+
| `model-config` | Check the exact model ID and request endpoint. Codex uses Responses. Pi can also use Chat Completions. |
|
|
78
|
+
| `model-http` | Check controller DNS and outbound access. For HTTP 401/403, check the model token and provider access. |
|
|
79
|
+
| `opensandbox`, `callback` or `worker-image` | Repeat `anyswarm setup` and `anyswarm doctor --smoke` for the selected backend. Existing deployments also need a Worker-reachable callback and the matching image. |
|
|
80
|
+
| `run-capacity` or `storage` | Compare the plan below with the reported controller resources. Check both the state directory and `TMPDIR`. |
|
|
81
|
+
| `task-materials` | Run prepare. Use a different state directory when switching Docker contexts. |
|
|
82
|
+
| Pumpkin reports `can't be tagged` and `No such image` after a build | Check the server version and Buildx on the selected context. Try Docker Engine 29 with Docker's Buildx plugin and the containerd image store, then rerun prepare. |
|
|
83
|
+
|
|
84
|
+
| Phase | Controller plan when Workers are local |
|
|
85
|
+
| --- | --- |
|
|
86
|
+
| Prepare | 8 vCPU, 14 GiB RAM for the reference or bridge check, controller and build headroom |
|
|
87
|
+
| Run, two Workers | 10 vCPU, 18 GiB RAM |
|
|
88
|
+
| Run, four Workers | 14 vCPU, 26 GiB RAM |
|
|
89
|
+
|
|
90
|
+
Each Worker, the submission bridge and the active judge have a 2 vCPU / 4 GiB allowance. For remote Workers, check their capacity and image separately. The controller still needs its own Docker capacity. Allow 12 GiB on the state mount, 1 GiB for temporary files and at least 25,000 free inodes on both mounts. No GPU is required.
|
|
91
|
+
|
|
92
|
+
Preparation fetches the pinned task and dependencies, checks Pumpkin, completes a no-model reference train and final and validates the submission bridge. The first prepare can take several minutes. Repeat the same command to reuse verified material and keep existing records.
|
|
93
|
+
|
|
94
|
+
## 4. Run and verify the result
|
|
95
|
+
|
|
96
|
+
```sh
|
|
97
|
+
npm exec -- anyswarm run ./project.ts --config ./frontiercs2-config.ts --prompt 'Run the FrontierCS-2 task.' --output-dir ./runs
|
|
98
|
+
npm exec -- anyswarm trace --root ./runs
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Run the Trace command in another terminal to watch live. For a remote controller, use `ssh -N -L 8787:127.0.0.1:8787 user@controller` with your connection options. Open `http://127.0.0.1:8787` in your browser. Select the matching Run and use the **Research** track. Search by candidate ID or patch SHA-256, open the candidate and follow the related full-read, review, train and final records. **Related evidence** opens the saved patch with SHA-256 verification. The **Model** track shows the actual request intervals and saved upstream responses for each peer. Reopen the same Run after it finishes to replay it.
|
|
102
|
+
|
|
103
|
+
The Run directory contains:
|
|
104
|
+
|
|
105
|
+
- `research-result.json` with goal, model, budget, actual use, candidate list, best, selected, typed final result and separate cleanup receipts.
|
|
106
|
+
- `<runtime-id>/candidates/*.patch` with the immutable candidate files and `research-events.jsonl` with their research events.
|
|
107
|
+
- The `pumpkin/<run-id>/` record with the official admission and final verdict. Match the candidate's patch hash and the official payload digest in the research journal. Final metrics stay on the controller.
|
|
108
|
+
|
|
109
|
+
To inspect the selected patch against the clean baseline, copy the prepared state's `reference/tasks/binary_fuse_filter/repo` directory to scratch, then run `git apply --check /absolute/path/to/candidate.patch` and `git apply /absolute/path/to/candidate.patch` from the copy. The original official final is in the Run's Pumpkin record. Leave the prepared starter intact for the next run.
|
|
110
|
+
|
|
111
|
+
The final result distinguishes a valid score, objective attainment, rejection and an unconfirmed result. Set `targetScore` to add a numeric objective. The official comparison with the reference is recorded separately. The research timer starts when all peers are ready. Prepare, train settlement, final and cleanup take their own time. If cleanup is pending, use the recorded Runtime receipt and Pumpkin run/container IDs to check those specific resources. Keep those records until reconciliation.
|
|
112
|
+
|
|
113
|
+
## Use your own project and evaluator
|
|
114
|
+
|
|
115
|
+
```sh
|
|
116
|
+
anyswarm --harness autoresearch --config ./research.ts --prompt 'Your research objective' --output-dir ./runs
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Default-export a `ResearchConfiguration` from trusted TypeScript. Choose `targetPath` relative to the launch directory, or pass `--cwd`. Set `goal`, `direction` (`max` or `min`), optional `targetScore`, `budget`, `model`, `executor`, `image`, `sandbox` and `connection`. Use the exported `frontiercs2-config.ts` as the model and backend example.
|
|
120
|
+
|
|
121
|
+
Implement `evaluator.train(patch, signal, admitted)` and return `{ valid, score, feedback }`. Set `valid: true` for a legal zero score. Call `admitted(jobId)` when a trusted external job is accepted. Implement `evaluator.final(patch, signal)` returning `{ status, score, meetsObjective, evidence }`. Use `status: 'valid' | 'rejected' | 'unknown'`, `score: null` if unknown, and `meetsObjective: null` when no application objective was evaluated. Legacy JSON output remains visible as unconfirmed evidence. `start` and `close` own evaluator resources. Report pending resources through `evidence()`.
|
|
30
122
|
|
|
31
|
-
|
|
123
|
+
Keep model credentials, judges and Docker management on the host. Run candidate code only in evaluator-owned isolation, apply each patch to a clean baseline, bound every callback and honor its abort signal. Evaluate the selected patch independently and keep final feedback out of the search loop.
|
|
32
124
|
|
|
33
|
-
See
|
|
125
|
+
See the [中文需求和配置提示](REQUIREMENTS.zh.md).
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
# AutoResearch
|
|
1
|
+
# AutoResearch 需求与配置提示
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
用户选择 backend、模型、人数和预算后,同一份配置用于预检、准备和运行。成员平级,各自在独立 Sandbox 研究,可以分享候选、完整读取并互评。官方 train 反馈可用于搜索,final 只进入宿主结果。
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## 首次设置
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
```
|
|
7
|
+
1. 准备 Linux x86-64 控制端、Node.js 24 LTS、Git、Git LFS、Python 3、Docker 和 Buildx。新 Debian 13 VM 请从 Docker 官方 apt 仓库安装 Docker Engine 29 和 Buildx 插件。Debian 自带的 Docker 26 即使通过镜像存储检查,Pumpkin 给新构建的镜像打标签时仍可能报 `No such image`。`docker info --format '{{ .DriverStatus }}'` 必须显示 `io.containerd.snapshotter.v1`,Pumpkin 才能按 digest 找到镜像。请在 AnySwarm setup 之前打开这个镜像存储。切换会隐藏旧存储中的容器和镜像,共享主机请先选择合适的 Docker context。其他依赖和命令见 [README](README.md#1-install-and-choose-your-backend)、[Docker 安装文档](https://docs.docker.com/engine/install/debian/) 和 [镜像存储文档](https://docs.docker.com/engine/storage/containerd/)。
|
|
8
|
+
2. 先安装所选执行器。Pi 可用 `npm install -g @earendil-works/pi-coding-agent` 安装。安装 AnySwarm 后运行 `anyswarm setup --backend pi` 或 `anyswarm setup --backend codex`。已有 OpenSandbox 时使用 `--mode existing`,配置 Lifecycle 地址、鉴权、匹配的 Worker 镜像、`dns+nft` 和可达的回调。用 `anyswarm doctor --smoke` 检查连接及 Worker。
|
|
9
|
+
3. `anyswarm eject autoresearch --dir ./research-demo`,进入导出目录执行 `npm install`。编辑 `frontiercs2-config.ts`。模板所需的模型设置是 `ANYSWARM_MODEL_PROVIDER`、`ANYSWARM_MODEL_ID` 和请求 URL `ANYSWARM_MODEL_URL`。路由需要凭证时设置 `ANYSWARM_MODEL_TOKEN`。Pi 的 Chat Completions 路由需要另设 `ANYSWARM_MODEL_PROTOCOL=chat-completions`。也可直接传入普通 `ModelConfig`,并按模型目录填写推理与工具能力。
|
|
10
|
+
4. `npm exec -- anyswarm run ./prepare-demo.ts --config ./frontiercs2-config.ts --check`。先处理 `ACTION` 行,再去掉 `--check` 准备固定材料。首次准备执行独立的官方无模型 reference。重复准备复用已验证材料和镜像。四 Peer、GPT-6.1 Sol、60 分钟是本机验收配置,导出的模板由用户选择模型和预算。
|
|
11
|
+
5. `npm exec -- anyswarm run ./project.ts --config ./frontiercs2-config.ts --prompt '运行 FrontierCS-2 任务' --output-dir ./runs`。模板默认 2 Peer、12 分钟、4 次 train 和 128 次团队新模型请求。修改 `budget` 会同时影响准备计划和实际运行。完整命令、资源表和自定义评测入口见 [README](README.md)。
|
|
13
12
|
|
|
14
|
-
|
|
13
|
+
## 结果与验收
|
|
15
14
|
|
|
16
|
-
|
|
15
|
+
固定使用 FrontierCS-2 `7e48965c7cef2a567c2669c8e2f10b06386289c9` 的 `binary_fuse_filter` 和原有 Pumpkin 评测。Worker 只获得干净 starter 和公开 train 反馈。应用侧 train 上限、官方 grant 和团队模型预算分别记录。
|
|
17
16
|
|
|
18
|
-
|
|
17
|
+
在运行中或结束后执行 `npm exec -- anyswarm trace --root ./runs`。用候选 ID 或 patch SHA-256 找到同一次 Run 的候选、完整读取、具体 review、train 回执、最终选择和 final。若声称采用另一 Peer 的贡献,用实际 patch 差异核实改动。按 Model 泳道中的请求区间核对真实并行。合法低分、无效候选、终验未达业务目标和未确认结果独立记录。清理保留 Runtime 和评测器各自的状态与待核对资源。
|
|
18
|
+
|
|
19
|
+
验收从仓库外固定候选包开始。记录任务版本、候选包及 hash、真实 backend 和模型、用量、耗时、候选关系和两类清理。正式评测以 Pumpkin 原始回执为准。应用范围见 [#337](https://github.com/AnySwarm/anyswarm/issues/337),宿主入口见 [#351](https://github.com/AnySwarm/anyswarm/issues/351)。
|