@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.
Files changed (301) hide show
  1. package/AGENTS.md +20 -5
  2. package/README.md +69 -55
  3. package/dist/examples/README.md +138 -77
  4. package/dist/examples/authoring/README.md +4 -4
  5. package/dist/examples/autoresearch/README.md +108 -16
  6. package/dist/examples/autoresearch/REQUIREMENTS.zh.md +13 -12
  7. package/dist/examples/autoresearch/config.d.ts +48 -5
  8. package/dist/examples/autoresearch/config.js +57 -23
  9. package/dist/examples/autoresearch/demo.d.ts +12 -4
  10. package/dist/examples/autoresearch/demo.js +65 -22
  11. package/dist/examples/autoresearch/eject.json +2 -0
  12. package/dist/examples/autoresearch/frontiercs2-config.d.ts +2 -0
  13. package/dist/examples/autoresearch/frontiercs2-config.js +14 -0
  14. package/dist/examples/autoresearch/frontiercs2.d.ts +18 -1
  15. package/dist/examples/autoresearch/frontiercs2.js +71 -14
  16. package/dist/examples/autoresearch/prepare-demo.d.ts +1 -0
  17. package/dist/examples/autoresearch/prepare-demo.js +46 -0
  18. package/dist/examples/autoresearch/prepare.d.ts +105 -53
  19. package/dist/examples/autoresearch/prepare.js +126 -57
  20. package/dist/examples/autoresearch/project.d.ts +6 -95
  21. package/dist/examples/autoresearch/project.js +131 -45
  22. package/dist/examples/autoresearch/research-service.d.ts +16 -1
  23. package/dist/examples/autoresearch/research-service.js +84 -44
  24. package/dist/examples/code/README.md +25 -17
  25. package/dist/examples/code/REQUIREMENTS.zh.md +3 -3
  26. package/dist/examples/code/config.d.ts +1 -0
  27. package/dist/examples/first-harness/AGENTS.md +25 -0
  28. package/dist/examples/first-harness/README.md +136 -0
  29. package/dist/examples/first-harness/config.d.ts +9 -8
  30. package/dist/examples/first-harness/config.js +33 -26
  31. package/dist/examples/first-harness/eject.json +14 -0
  32. package/dist/examples/first-harness/handoff.js +3 -3
  33. package/dist/examples/first-harness/harness.d.ts +14 -18
  34. package/dist/examples/first-harness/harness.js +102 -77
  35. package/dist/examples/first-harness/input/README.md +7 -0
  36. package/dist/examples/first-harness/session.js +2 -1
  37. package/dist/examples/first-harness/tsconfig.json +2 -1
  38. package/dist/examples/harness-session/README.md +4 -4
  39. package/dist/examples/lead-worker/README.md +1 -1
  40. package/dist/examples/lead-worker/project-config.d.ts +1 -0
  41. package/dist/examples/messages/README.md +2 -2
  42. package/dist/examples/notes/README.md +5 -5
  43. package/dist/examples/notes/config.d.ts +1 -0
  44. package/dist/examples/parallel-swarm/AGENTS.md +32 -0
  45. package/dist/examples/parallel-swarm/README.md +136 -0
  46. package/dist/examples/parallel-swarm/board-service.js +25 -8
  47. package/dist/examples/parallel-swarm/board.d.ts +31 -1
  48. package/dist/examples/parallel-swarm/board.js +98 -13
  49. package/dist/examples/parallel-swarm/config.d.ts +11 -0
  50. package/dist/examples/parallel-swarm/config.js +39 -0
  51. package/dist/examples/parallel-swarm/eject.json +5 -0
  52. package/dist/examples/parallel-swarm/harness.d.ts +26 -20
  53. package/dist/examples/parallel-swarm/harness.js +77 -76
  54. package/dist/examples/parallel-swarm/report.d.ts +12 -0
  55. package/dist/examples/parallel-swarm/report.js +30 -0
  56. package/dist/examples/peermesh/README.md +1 -1
  57. package/dist/examples/peermesh/project-config.d.ts +1 -0
  58. package/dist/examples/services/agent-control/README.md +1 -1
  59. package/dist/examples/services/mathlib-search/README.md +1 -1
  60. package/dist/examples/services/mcp-managed/README.md +1 -1
  61. package/dist/examples/services/persistent-board/README.md +6 -3
  62. package/dist/examples/subagents/AGENTS.md +35 -0
  63. package/dist/examples/subagents/README.md +129 -93
  64. package/dist/examples/subagents/config.d.ts +2 -10
  65. package/dist/examples/subagents/config.js +9 -16
  66. package/dist/examples/subagents/eject.json +17 -0
  67. package/dist/examples/subagents/handoff-config.d.ts +41 -0
  68. package/dist/examples/subagents/handoff-config.js +13 -0
  69. package/dist/examples/subagents/model.d.ts +3 -0
  70. package/dist/examples/subagents/model.js +19 -0
  71. package/dist/examples/substrate/README.md +12 -6
  72. package/dist/examples/substrate/config.d.ts +1 -0
  73. package/dist/examples/substrate/project-config.d.ts +1 -0
  74. package/dist/examples/super/README.md +34 -22
  75. package/dist/examples/super/actions.d.ts +1 -1
  76. package/dist/examples/super/actions.js +11 -11
  77. package/dist/examples/super/config.js +3 -3
  78. package/dist/examples/super/eject.json +1 -1
  79. package/dist/examples/super/location.js +1 -1
  80. package/dist/examples/super/operator.d.ts +1 -0
  81. package/dist/examples/super/operator.js +31 -0
  82. package/dist/examples/super/project.d.ts +0 -107
  83. package/dist/examples/super/project.js +1 -3
  84. package/dist/examples/taskpool/README.md +1 -1
  85. package/dist/examples/taskpool/config.d.ts +1 -0
  86. package/dist/examples/taskpool/deploy/service-hosts/service-authority-snapshot.d.ts +4 -4
  87. package/dist/scripts/anyswarm-arguments.d.ts +7 -25
  88. package/dist/scripts/anyswarm-arguments.js +69 -97
  89. package/dist/scripts/anyswarm-eject.js +1 -1
  90. package/dist/scripts/anyswarm-harnesses.d.ts +0 -1
  91. package/dist/scripts/anyswarm-harnesses.js +1 -22
  92. package/dist/scripts/anyswarm-installation.d.ts +7 -40
  93. package/dist/scripts/anyswarm-installation.js +17 -291
  94. package/dist/scripts/anyswarm-launch.d.ts +6 -36
  95. package/dist/scripts/anyswarm-launch.js +32 -81
  96. package/dist/scripts/anyswarm-progress.d.ts +6 -0
  97. package/dist/scripts/anyswarm-progress.js +133 -0
  98. package/dist/scripts/anyswarm-project.d.ts +1 -9
  99. package/dist/scripts/anyswarm-project.js +40 -127
  100. package/dist/scripts/anyswarm-source-runner.js +9 -41
  101. package/dist/scripts/anyswarm.js +6 -26
  102. package/dist/scripts/build-provenance.json +1 -1
  103. package/dist/scripts/generate-architecture-coverage.js +1 -1
  104. package/dist/scripts/generate-architecture-prompts.js +18 -10
  105. package/dist/scripts/local-environment.d.ts +13 -7
  106. package/dist/scripts/local-environment.js +73 -21
  107. package/dist/scripts/local-setup.d.ts +3 -0
  108. package/dist/scripts/local-setup.js +153 -118
  109. package/dist/scripts/pack-release.js +31 -4
  110. package/dist/src/core/index.js +1 -1
  111. package/dist/src/core/sandbox/opensandbox-backend.js +10 -4
  112. package/dist/src/core/sandbox/sandbox-connection.d.ts +9 -2
  113. package/dist/src/core/sandbox/sandbox-connection.js +22 -7
  114. package/dist/src/core/worker-image.js +1 -1
  115. package/dist/src/harness/project-harness.d.ts +1 -0
  116. package/dist/src/harness/project-harness.js +5 -4
  117. package/dist/src/harness/project-rpc-client.js +19 -0
  118. package/dist/src/harness/project-runtime.js +3 -1
  119. package/dist/src/harness/typescript-loader.d.ts +2 -0
  120. package/dist/src/harness/typescript-loader.js +26 -8
  121. package/dist/src/trace-viewer/command.mjs +6 -3
  122. package/dist/src/trace-viewer/public/app.js +239 -59
  123. package/dist/src/trace-viewer/public/index.html +5 -0
  124. package/dist/src/trace-viewer/public/style.css +22 -0
  125. package/dist/src/trace-viewer/reader.mjs +242 -26
  126. package/dist/src/trace-viewer/run-root.d.mts +1 -0
  127. package/dist/src/trace-viewer/run-root.mjs +7 -0
  128. package/dist/src/trace-viewer/server.mjs +3 -1
  129. package/docs/INDEX.md +11 -9
  130. package/docs/architecture/04-services.md +1 -1
  131. package/docs/architecture/06-observability-experiments.md +21 -7
  132. package/docs/architecture/07-run-configuration.md +118 -19
  133. package/docs/architecture/08-prompts.md +21 -2
  134. package/docs/architecture/10-service-api-reference.md +12 -5
  135. package/docs/architecture/12-code-coverage.md +157 -115
  136. package/docs/architecture/15-core-runtime.md +1 -1
  137. package/docs/architecture/16-pi-opensandbox-backend.md +2 -0
  138. package/docs/architecture/17-harness-reporting.md +79 -1
  139. package/docs/architecture/22-website.md +52 -20
  140. package/docs/architecture/23-project-harness.md +109 -37
  141. package/docs/architecture/26-code.md +20 -5
  142. package/docs/architecture/27-personal.md +23 -8
  143. package/docs/architecture/28-autoresearch.md +18 -12
  144. package/docs/architecture/INDEX.md +1 -2
  145. package/docs/architecture/prompts/11-first-sdk-harness.md +9 -9
  146. package/docs/architecture/prompts/16-parallel-swarm.md +46 -13
  147. package/docs/architecture/prompts/22-autoresearch.md +9 -2
  148. package/docs/architecture/prompts/source-manifest.json +76 -52
  149. package/docs/architecture/source-map.json +445 -105
  150. package/docs/designs/core-harness/01-core.md +2 -2
  151. package/docs/designs/core-harness/06-project-harness.md +3 -3
  152. package/docs/designs/core-harness/README.md +2 -2
  153. package/docs/en/agents.md +1 -1
  154. package/docs/en/autoresearch.md +41 -0
  155. package/docs/en/blog/100b-tokens.md +157 -0
  156. package/docs/en/build-your-harness.md +47 -22
  157. package/docs/en/changelog.md +29 -1
  158. package/docs/en/first-harness.md +40 -32
  159. package/docs/en/harnesses/index.md +23 -23
  160. package/docs/en/harnesses/lead-worker.md +1 -1
  161. package/docs/en/harnesses/peermesh.md +2 -2
  162. package/docs/en/harnesses/subagents.md +10 -31
  163. package/docs/en/harnesses/substrate.md +4 -4
  164. package/docs/en/harnesses/taskpool.md +2 -2
  165. package/docs/en/latest.md +30 -5
  166. package/docs/en/overview.md +22 -22
  167. package/docs/en/quickstart.md +69 -56
  168. package/docs/en/reference/api.md +1 -1
  169. package/docs/en/reference/cli.md +47 -85
  170. package/docs/en/sandbox.md +3 -3
  171. package/docs/en/trace-viewer.md +32 -12
  172. package/docs/operations/trace-viewer.md +26 -11
  173. package/docs/third-party-notices.md +0 -1
  174. package/docs/workflows/development.md +160 -118
  175. package/docs/workflows/release-and-docs-versioning.md +207 -54
  176. package/docs/workflows/release-cli-acceptance.md +162 -0
  177. package/docs/zh/agents.md +1 -1
  178. package/docs/zh/autoresearch.md +41 -0
  179. package/docs/zh/blog/100b-tokens.md +102 -0
  180. package/docs/zh/build-your-harness.md +48 -23
  181. package/docs/zh/changelog.md +29 -1
  182. package/docs/zh/first-harness.md +43 -35
  183. package/docs/zh/harnesses/index.md +23 -23
  184. package/docs/zh/harnesses/lead-worker.md +1 -1
  185. package/docs/zh/harnesses/peermesh.md +2 -2
  186. package/docs/zh/harnesses/subagents.md +10 -31
  187. package/docs/zh/harnesses/substrate.md +4 -4
  188. package/docs/zh/harnesses/taskpool.md +2 -2
  189. package/docs/zh/latest.md +30 -5
  190. package/docs/zh/overview.md +23 -23
  191. package/docs/zh/quickstart.md +66 -57
  192. package/docs/zh/reference/api.md +1 -1
  193. package/docs/zh/reference/cli.md +19 -79
  194. package/docs/zh/sandbox.md +3 -3
  195. package/docs/zh/trace-viewer.md +32 -12
  196. package/examples/README.md +138 -77
  197. package/examples/authoring/README.md +4 -4
  198. package/examples/autoresearch/README.md +108 -16
  199. package/examples/autoresearch/REQUIREMENTS.zh.md +13 -12
  200. package/examples/autoresearch/config.ts +64 -25
  201. package/examples/autoresearch/demo.ts +75 -22
  202. package/examples/autoresearch/eject.json +2 -0
  203. package/examples/autoresearch/frontiercs2-config.ts +15 -0
  204. package/examples/autoresearch/frontiercs2.ts +64 -11
  205. package/examples/autoresearch/prepare-demo.ts +44 -0
  206. package/examples/autoresearch/prepare.ts +134 -60
  207. package/examples/autoresearch/project.ts +120 -44
  208. package/examples/autoresearch/research-service.ts +91 -41
  209. package/examples/code/README.md +25 -17
  210. package/examples/code/REQUIREMENTS.zh.md +3 -3
  211. package/examples/first-harness/AGENTS.md +25 -0
  212. package/examples/first-harness/README.md +136 -0
  213. package/examples/first-harness/config.ts +41 -27
  214. package/examples/first-harness/eject.json +14 -0
  215. package/examples/first-harness/handoff.ts +3 -3
  216. package/examples/first-harness/harness.ts +104 -72
  217. package/examples/first-harness/input/README.md +7 -0
  218. package/examples/first-harness/session.ts +2 -1
  219. package/examples/first-harness/tsconfig.json +2 -1
  220. package/examples/harness-session/README.md +4 -4
  221. package/examples/lead-worker/README.md +1 -1
  222. package/examples/messages/README.md +2 -2
  223. package/examples/notes/README.md +5 -5
  224. package/examples/parallel-swarm/AGENTS.md +32 -0
  225. package/examples/parallel-swarm/README.md +136 -0
  226. package/examples/parallel-swarm/board-service.ts +28 -9
  227. package/examples/parallel-swarm/board.ts +107 -13
  228. package/examples/parallel-swarm/config.ts +47 -0
  229. package/examples/parallel-swarm/eject.json +5 -0
  230. package/examples/parallel-swarm/harness.ts +83 -71
  231. package/examples/parallel-swarm/report.ts +33 -0
  232. package/examples/peermesh/README.md +1 -1
  233. package/examples/services/agent-control/README.md +1 -1
  234. package/examples/services/mathlib-search/README.md +1 -1
  235. package/examples/services/mcp-managed/README.md +1 -1
  236. package/examples/services/persistent-board/README.md +6 -3
  237. package/examples/subagents/AGENTS.md +35 -0
  238. package/examples/subagents/README.md +129 -93
  239. package/examples/subagents/config.ts +9 -15
  240. package/examples/subagents/eject.json +17 -0
  241. package/examples/subagents/handoff-config.ts +14 -0
  242. package/examples/subagents/model.ts +20 -0
  243. package/examples/substrate/README.md +12 -6
  244. package/examples/super/README.md +34 -22
  245. package/examples/super/actions.ts +11 -11
  246. package/examples/super/config.ts +3 -3
  247. package/examples/super/eject.json +1 -1
  248. package/examples/super/location.ts +1 -1
  249. package/examples/super/operator.ts +28 -0
  250. package/examples/super/project.ts +1 -3
  251. package/examples/taskpool/README.md +1 -1
  252. package/npm-shrinkwrap.development.json +46 -1538
  253. package/npm-shrinkwrap.json +10 -43
  254. package/package.development.json +3 -6
  255. package/package.json +3 -5
  256. package/scripts/anyswarm-arguments.ts +67 -96
  257. package/scripts/anyswarm-eject.ts +1 -1
  258. package/scripts/anyswarm-harnesses.ts +1 -18
  259. package/scripts/anyswarm-installation.ts +18 -294
  260. package/scripts/anyswarm-launch.ts +30 -102
  261. package/scripts/anyswarm-progress.ts +125 -0
  262. package/scripts/anyswarm-project.ts +31 -123
  263. package/scripts/anyswarm-source-runner.ts +9 -36
  264. package/scripts/anyswarm.ts +4 -24
  265. package/scripts/generate-architecture-coverage.ts +1 -1
  266. package/scripts/generate-architecture-prompts.ts +21 -10
  267. package/scripts/local-environment.ts +79 -21
  268. package/scripts/local-setup.ts +150 -105
  269. package/scripts/pack-release.ts +28 -4
  270. package/src/core/index.ts +1 -1
  271. package/src/core/sandbox/opensandbox-backend.ts +10 -4
  272. package/src/core/sandbox/sandbox-connection.ts +22 -7
  273. package/src/core/worker-image.ts +1 -1
  274. package/src/harness/project-harness.ts +5 -4
  275. package/src/harness/project-rpc-client.ts +23 -0
  276. package/src/harness/project-runtime.ts +2 -1
  277. package/src/harness/typescript-loader.ts +28 -8
  278. package/src/trace-viewer/command.mjs +6 -3
  279. package/src/trace-viewer/public/app.js +239 -59
  280. package/src/trace-viewer/public/index.html +5 -0
  281. package/src/trace-viewer/public/style.css +22 -0
  282. package/src/trace-viewer/reader.mjs +242 -26
  283. package/src/trace-viewer/run-root.d.mts +1 -0
  284. package/src/trace-viewer/run-root.mjs +7 -0
  285. package/src/trace-viewer/server.mjs +3 -1
  286. package/dist/scripts/anyswarm-applications.d.ts +0 -19
  287. package/dist/scripts/anyswarm-applications.js +0 -19
  288. package/dist/scripts/anyswarm-tui-config.d.ts +0 -36
  289. package/dist/scripts/anyswarm-tui-config.js +0 -189
  290. package/dist/scripts/anyswarm-tui-session.d.ts +0 -66
  291. package/dist/scripts/anyswarm-tui-session.js +0 -304
  292. package/dist/scripts/anyswarm-tui-terminal.d.ts +0 -41
  293. package/dist/scripts/anyswarm-tui-terminal.js +0 -154
  294. package/dist/scripts/anyswarm-tui.d.ts +0 -2
  295. package/dist/scripts/anyswarm-tui.js +0 -1012
  296. package/docs/architecture/25-foreground-tui.md +0 -51
  297. package/scripts/anyswarm-applications.ts +0 -39
  298. package/scripts/anyswarm-tui-config.ts +0 -174
  299. package/scripts/anyswarm-tui-session.ts +0 -295
  300. package/scripts/anyswarm-tui-terminal.ts +0 -147
  301. package/scripts/anyswarm-tui.ts +0 -912
@@ -1,41 +1,41 @@
1
1
  ---
2
- title: Choose a Harness
3
- description: Compare the five built-in multi-agent patterns in AnySwarm, run them with one command, or adapt them to build your own team.
4
- section: BUILT-IN HARNESSES
2
+ title: Choose an example
3
+ description: Choose a useful first task, SDK tutorial, application, collaboration reference, or advanced integration with explicit prerequisites.
4
+ section: EXAMPLES
5
5
  order: 10
6
6
  ---
7
7
 
8
- A **Harness** defines how a multi-agent team divides work, shares information, and decides when the job is done.
8
+ A **Harness** defines how a team divides work, shares information, checks results and ends. Choose an example by the job you want to do, then read the underlying collaboration policy. The [example catalog](../../../examples/README.md) owns the complete source, dependency and status inventory.
9
9
 
10
- `anyswarm` ships **five reference collaboration patterns** (`Subagents`, `TaskPool`, `PeerMesh`, `Substrate`, and `Lead-Worker`), plus two minimal starters (`notes` and `messages`). All of them share the exact same Sandboxes, Host Gateway, and Trace Viewer — only their Services and orchestration rules differ.
10
+ ## Three tiers
11
11
 
12
- > **How to use them**: after preparing a pattern's prerequisites, run `anyswarm --harness <name>` (each built-in name loads the standard Harness module from `examples/<name>/`). See the [example index](../../../examples/README.md) to run or adapt one; to build your own from scratch, start with [Your First SDK Harness](../first-harness.md) or [Build a Swarm Harness](../build-your-harness.md).
13
-
14
- ## Run in one command
15
-
16
- Once [Quickstart](../quickstart.md) is done, launch against any project folder:
12
+ | Tier | Purpose | Examples |
13
+ | --- | --- | --- |
14
+ | **1 · Start and learn** | Run one useful task; learn the SDK in two steps. | [Repository handoff with Subagents](../quickstart.md); [First Harness](../first-harness.md) → [Parallel Swarm](../build-your-harness.md). The SDK tutorials use 0.6.0 or a matching source build. |
15
+ | **2 · Applications and reference topologies** | Explore an application or adapt a collaboration mechanism. | [AutoResearch](../autoresearch.md), with its current FrontierCS-2 setup; [Subagents](subagents.md), [TaskPool](taskpool.md), [Substrate](substrate.md). |
16
+ | **3 · Advanced source and integrations** | Study a protocol, daemon or external service integration. | `super`, `code`, `harness-session`, focused Service examples; [PeerMesh](peermesh.md) and [Lead-Worker](lead-worker.md). Code development is paused. |
17
17
 
18
- ```bash
19
- cd my-project
20
- anyswarm --harness subagents --prompt "Fix the parser and add tests"
21
- ```
18
+ ## Know the prerequisites before you choose
22
19
 
23
- Built-in names: `subagents`, `taskpool`, `peermesh`, `substrate`, `lead-worker`, `notes`, `messages`. All patterns share OpenSandbox, a compatible Worker image, and model access; each pattern owns its collaboration Services and any extra facilities:
20
+ All live Agent examples need OpenSandbox, a compatible Worker/executor and model access. `anyswarm setup` prepares the common Runtime deployment. It does not deploy each application’s external services.
24
21
 
25
22
  | Examples | Additional facilities |
26
23
  | --- | --- |
27
- | Subagents, TaskPool, Notes, Messages, ordinary Substrate | Their standard entrypoints create the in-process Services and local stores they need — no external service stack required. |
28
- | PeerMesh | Configured Gitea and Mattermost, plus MySQL and the upstream Board process. |
29
- | Lead-Worker | Configured Gitea; its optional dynamic mode also needs a Docker image for the checking Service and candidate verifier. |
30
- | Optional Lean workloads | The TaskPool or Substrate FATE configuration supplies its checker/toolchain and may use [Mathlib Search](../../../examples/services/mathlib-search/README.md). |
24
+ | First Harness, Parallel Swarm, Subagents, TaskPool, ordinary Substrate | Their entrypoints create in-process Services and local stores. No additional business service deployment. |
25
+ | AutoResearch / FrontierCS-2 | Linux x86-64, Git LFS, Python, local Docker, prepared benchmark/checker images and the configured K3 route. See its [current requirements](../autoresearch.md). |
26
+ | PeerMesh | Gitea, Mattermost, MySQL and the upstream Board process. |
27
+ | Lead-Worker | Gitea; optional dynamic mode also needs the checking Service and candidate verifier image. |
28
+ | Optional Lean workloads | Their checker/toolchain and, where configured, [Mathlib Search](../../../examples/services/mathlib-search/README.md). |
29
+
30
+ PeerMesh and Lead-Worker require an OpenSandbox deployment enforcing Git network allowlists with `dns+nft`. See [deployment ownership](../../../deploy/README.md).
31
31
 
32
- Running `anyswarm setup` prepares the common runtime deployment. PeerMesh and Lead-Worker also require an OpenSandbox deployment enforcing Git network allowlists with `dns+nft`. See [deployment ownership](../../../deploy/README.md) for which components `anyswarm setup` manages and which external facilities you bring yourself.
32
+ ## Run or adapt a Harness
33
33
 
34
- ## Where the implementations live
34
+ Follow [Quickstart](../quickstart.md) to produce `report.md` from your repository with the existing `subagents` entrypoint. Built-in names also include `autoresearch`, `taskpool`, `peermesh`, `substrate`, `lead-worker`, `notes` and `messages`; each loads its example’s standard Harness module and still needs its configuration and prerequisites.
35
35
 
36
- The five mechanisms and their collaboration Services live in `examples/subagents`, `examples/taskpool`, `examples/peermesh`, `examples/substrate`, and `examples/lead-worker`. The shared CLI host only handles module loading, project capture, session lifecycle, and RPC framing; a built-in name is simply a convenience loader for the bundled example entry.
36
+ The shared CLI handles loading, initial directory capture, session lifecycle and RPC framing. The example owns its roles, Services and acceptance. Private Sandbox copies do not stay synchronized with the original directory, and exported results do not automatically overwrite it.
37
37
 
38
- Every example can be copied into a standalone directory, installed against `@anyswarm/core`, and built independently using only public package exports. See the [example index](../../../examples/README.md#run-an-example-from-its-directory) for setup commands and external facilities.
38
+ To customize, use the [SDK tutorials and author prompt](../build-your-harness.md), respecting the version boundary documented there. An ordinary team shares one Runtime. Task completion, independent business acceptance, export and cleanup remain separate facts.
39
39
 
40
40
  ## Five collaboration patterns at a glance
41
41
 
@@ -113,7 +113,7 @@ From a built checkout, prepare OpenSandbox, a compatible Pi Worker image, a Gite
113
113
 
114
114
  ```bash
115
115
  # Set run ID, immutable worker image, OpenSandbox URL, Gitea admin credentials, and model URL
116
- anys run ./benchmarks/lead-worker-orders/main.ts ./benchmarks/lead-worker-orders/config.ts
116
+ anyswarm run ./benchmarks/lead-worker-orders/main.ts ./benchmarks/lead-worker-orders/config.ts
117
117
  ```
118
118
 
119
119
  On close, the host fences new Board writes and calls `runtime.close()`. It closes the Board connection and revokes owned Gitea credentials only after Core confirms stopped execution and complete cleanup. Unknown execution, required export failures or Board evidence failures leave dependencies pending for reconciliation. The shared repository, Board database, commits and PRs remain for review. Inspect `harness-report.json` for business failure, delivered and unfinished work, uncertain inputs, cleanup and report-save outcomes.
@@ -113,7 +113,7 @@ export ANYSWARM_PEERMESH_MODEL_URL='https://your-model-endpoint/v1/responses'
113
113
  export ANYSWARM_PEERMESH_PEERS=4
114
114
  # Plus Gitea, Mattermost, and Board MySQL DSN host variables
115
115
 
116
- anys run ./scripts/run-harness.ts --config ./examples/peermesh/config.ts
116
+ anyswarm run ./scripts/run-harness.ts --config ./examples/peermesh/config.ts
117
117
  ```
118
118
 
119
119
  Once `ready` is emitted, send JSON-line commands over `stdin` to observe or steer peers, or let the team run to its configured `durationMs`:
@@ -128,7 +128,7 @@ Inspect saved reports, merge receipts, and archive digests afterward:
128
128
 
129
129
  ```bash
130
130
  runtime_id=RUNTIME_ID_FROM_RESULT
131
- anys run ./scripts/read-harness-result.ts \
131
+ anyswarm run ./scripts/read-harness-result.ts \
132
132
  --run-directory "./peermesh-runs/$runtime_id" \
133
133
  --runtime-id "$runtime_id"
134
134
  ```
@@ -7,46 +7,25 @@ order: 10
7
7
 
8
8
  **Subagents** models a hierarchical team where a lead Agent (`/root`) breaks down work, spawns named child Agents recursively (up to `maxDepth`), steers busy children without waking idle ones, and integrates child results. Source: [examples/subagents](https://github.com/AnySwarm/anyswarm/tree/main/examples/subagents).
9
9
 
10
- ## Quick run (CLI)
10
+ ## Quick run: repository handoff
11
11
 
12
- With `ANYSWARM_MODEL_URL` and `ANYSWARM_MODEL_TOKEN` configured (see [Quickstart](../quickstart.md)), run Subagents directly against any project directory:
12
+ Follow [Quickstart](../quickstart.md) to inspect your own repository and export `report.md`. Root receives your prompt and decides how to delegate. The suggested task asks separate children to inspect entry points and run commands, then modules and tests, before Root checks file references and integrates the findings.
13
13
 
14
- ```bash
15
- cd my-project
16
- anyswarm --harness subagents --prompt "Fix the parser using the project tests"
17
- ```
18
-
19
- Subagents sends your prompt to `/root` and seeds each Sandbox with the captured project tree (separate isolated directories per Agent). In `--mode rpc`, follow-up user inputs route directly to `/root`. See the sections below for its interactive session controls, `collaboration` Service protocol, mailbox controller, and source-level embedding.
14
+ `--cwd` selects the directory captured at Run start. Each Agent receives a private copy; new local edits are not synchronized, and Sandbox changes are not written back. Results are collected into the Run output. Generic Subagents does not independently grade the report (`acceptance.status: "not-run"`). A task-lifetime run closes the team after its final outcome; ongoing client sessions are an advanced SDK/RPC option.
20
15
 
21
- ## Interactive session and controls
16
+ ## Advanced SDK/RPC sessions and controls
22
17
 
23
18
  The Subagents module default-exports a standard `Harness` (see [Your First SDK Harness](../first-harness.md)) shared across SDK `createHarnessSession`, explicit foreground CLI, and JSONL RPC, owning both workflow coordination and resource cleanup:
24
19
 
25
- - **Continuous conversation (`--lifetime interactive`)**: keeps `/root` alive across replies, accepts plain text or `{ text, mode }` inputs, and exposes currently permitted settings and structured context controls via `describe()`.
20
+ - **Continuous RPC conversation (`--mode rpc --lifetime interactive`)**: keeps `/root` alive across replies, accepts plain text or `{ text, mode }` inputs, and exposes currently permitted settings and structured context controls via `describe()`.
26
21
  - **Safe interruption**: interrupting `/root` fences its previous execution while allowing active children to finish; child results arriving after an interrupt stay queued in the inbox until the next explicit user input.
27
- - **User questions (`--interaction questions`)**: when enabled, Agents can invoke `swarm service invoke user-interaction ask` to pose authorized questions to the client.
22
+ - **RPC user questions (`--mode rpc --interaction questions`)**: when enabled, Agents can invoke `swarm service invoke user-interaction ask` to pose authorized questions to the client.
28
23
 
29
24
  ### Verify parent-child delegation
30
25
 
31
- With the same model configuration, run this check in a fresh project directory.
32
- The child spawn Service call allows up to 60 seconds within the default 120-second Run work deadline. For a slower host, set `workTimeoutMs` in your Subagents configuration and pass the file with `anyswarm --config`.
33
-
34
- ```bash
35
- mkdir -p anyswarm-delegation-check && cd anyswarm-delegation-check
36
- printf '# Release checklist\n' > README.md
37
- prompt=$(cat <<'PROMPT'
38
- Delegate the README heading check to one child and report the exact heading the child returns. Let the child read the file. Use the bash tool with a 75 second tool timeout for each command. First run:
39
- swarm collaboration spawn_agent --task-name reviewer --message 'Use the read tool to read README.md and return its exact first heading.' --fork-turns none --request-id reviewer-start --timeout-ms 65000
40
- After spawn succeeds, run:
41
- printf '{"timeout_ms":60000}\n' | swarm collaboration wait_agent --stdin --request-id wait-reviewer --timeout-ms 65000
42
- Wait for the reviewer result before reporting the heading.
43
- PROMPT
44
- )
45
- anyswarm --harness subagents --prompt "$prompt" --output-dir ./runs
46
- anyswarm trace --root ./runs --port 8787 --open
47
- ```
26
+ After the repository task, use Trace Viewer to inspect the actual `collaboration.spawn_agent` calls, distinct child identities and file-read results. Confirm Root received each child's findings, and open the exported `report.md` through its recorded artifact path. Check whether child activity overlapped rather than inferring parallelism from the prompt.
48
27
 
49
- In Trace Viewer, check that `/root` spawned `/root/reviewer` and the child's `read` tool returned `# Release checklist`. Open the root's `wait_agent` Service call to confirm it received the child's result. The CLI should report that heading and `cleanup.status: "complete"`.
28
+ The child spawn Service call allows up to 60 seconds within the default 120-second work deadline. Configure `workTimeoutMs` for a slower model or host. Export and cleanup must be inspected separately from business outcome. The default root collection covers the workspace up to 16 MiB; a focused configuration can require only `report.md`. These checks establish what happened and which bytes were retained, not whether every engineering conclusion is correct.
50
29
 
51
30
  ## 1. Registered Service (`collaboration`)
52
31
 
@@ -162,10 +141,10 @@ export ANYSWARM_MODEL_TOKEN='your-bearer-token'
162
141
  # Optional: override the default prebuilt Worker image
163
142
  # export ANYSWARM_WORKER_IMAGE='your-registry.example/compatible-worker:tag'
164
143
 
165
- anys run ./examples/subagents/main.ts ./examples/subagents/config.ts \
144
+ anyswarm run ./examples/subagents/main.ts ./examples/subagents/config.ts \
166
145
  'Split this task into two independent checks and summarize the results.'
167
146
 
168
- anys run ./examples/subagents/main.ts ./examples/subagents/config.ts --interactive
147
+ anyswarm run ./examples/subagents/main.ts ./examples/subagents/config.ts --interactive
169
148
  ```
170
149
 
171
150
  Or embed `createSubagentsHarness` in Node.js:
@@ -96,11 +96,11 @@ export ANYSWARM_SUBSTRATE_RUN=research-01
96
96
  export ANYSWARM_SUBSTRATE_MODEL_URL='https://your-model-endpoint/v1/responses'
97
97
  export ANYSWARM_SUBSTRATE_MODEL_TOKEN='your-bearer-token'
98
98
 
99
- anys run ./examples/substrate/main.ts ./examples/substrate/config.ts > substrate-result.json
99
+ anyswarm run ./examples/substrate/main.ts ./examples/substrate/config.ts > substrate-result.json
100
100
 
101
101
  # Read saved receipts without loading model configuration:
102
102
  runtime_id=RUNTIME_ID_FROM_RESULT
103
- anys run ./examples/substrate/main.ts --result "./substrate-runs/$runtime_id" --runtime-id "$runtime_id"
103
+ anyswarm run ./examples/substrate/main.ts --result "./substrate-runs/$runtime_id" --runtime-id "$runtime_id"
104
104
  ```
105
105
 
106
106
  [collaboration-evidence.ts](https://github.com/AnySwarm/anyswarm/blob/main/examples/substrate/harness/collaboration-evidence.ts) audits `substrate_contents`, `substrate_references`, and `substrate_reads` to inspect a cross-peer reuse chain:
@@ -127,8 +127,8 @@ export ANYSWARM_FATE_BENCHMARK=FATE-X
127
127
  export ANYSWARM_FATE_PROJECT=/path/to/fate-x
128
128
  export ANYSWARM_FATE_LEAN=/path/to/lean-4.28.0
129
129
 
130
- anys run ./benchmarks/fate/main.ts --fate-prepare "$ANYSWARM_FATE_PROJECT" "$ANYSWARM_FATE_LEAN" FATE-X
131
- anys run ./benchmarks/fate/main.ts --fate-run ./benchmarks/fate/fate-config.ts
130
+ anyswarm run ./benchmarks/fate/main.ts --fate-prepare "$ANYSWARM_FATE_PROJECT" "$ANYSWARM_FATE_LEAN" FATE-X
131
+ anyswarm run ./benchmarks/fate/main.ts --fate-run ./benchmarks/fate/fate-config.ts
132
132
  ```
133
133
 
134
134
  ## Source files
@@ -84,7 +84,7 @@ For custom store compositions via the repository's foreground runner, provide an
84
84
  After building the repository and creating that host module:
85
85
 
86
86
  ```bash
87
- anys run ./scripts/run-harness.ts --config ./my-taskpool-config.ts
87
+ anyswarm run ./scripts/run-harness.ts --config ./my-taskpool-config.ts
88
88
  ```
89
89
 
90
90
  The host accepts JSON-line `status`, Task-directed `input`, and `stop` commands. Task-directed input is resolved against the current Execution owner. It is not an arbitrary direct message to an Agent. The final record contains the Runtime identity and report path; the [foreground protocol](../../architecture/17-harness-reporting.md#foreground-harness-control) defines its commands and result codes.
@@ -92,7 +92,7 @@ The host accepts JSON-line `status`, Task-directed `input`, and `stop` commands.
92
92
  Saved reports can be read without loading model configuration:
93
93
 
94
94
  ```bash
95
- anys run ./scripts/read-harness-result.ts \
95
+ anyswarm run ./scripts/read-harness-result.ts \
96
96
  --run-directory ./runs/RUNTIME_ID_FROM_RESULT \
97
97
  --runtime-id RUNTIME_ID_FROM_RESULT
98
98
  ```
package/docs/en/latest.md CHANGED
@@ -5,25 +5,50 @@ section: RELEASES
5
5
  order: 15
6
6
  ---
7
7
 
8
- ## v0.5.0
8
+ ## v0.6.0
9
+
10
+ This distribution includes editable Harness exports, live and saved Trace improvements, and Node 26 TypeScript support. See the [v0.6.0 changelog](changelog.md#v060). When the version is available in the public registry, install it with npm:
9
11
 
10
- v0.5.0 is the first supported release of `@anyswarm/core`. It introduces the current Service registration and Profile APIs. See the [v0.5.0 changelog](changelog.md#v050) for the changes.
12
+ ```sh
13
+ npm install -g @anyswarm/core@0.6.0
14
+ anyswarm --version
15
+ ```
16
+
17
+ In your project directory, install the SDK:
18
+
19
+ ```sh
20
+ npm install @anyswarm/core@0.6.0
21
+ ```
22
+
23
+ For a prepublication candidate, follow the [source installation instructions](quickstart.md#build-and-install-from-source-main).
24
+
25
+ ## v0.5.2
26
+
27
+ v0.5.2 makes npm the installation and upgrade path. Running `anyswarm` without arguments prints Quickstart. One-shot Harness runs show progress and a browser Trace command. See the [v0.5.2 changelog](changelog.md#v052) for migration instructions.
11
28
 
12
29
  Install the CLI globally with npm and check the installed version.
13
30
 
14
31
  ```sh
15
- npm install -g @anyswarm/core@0.5.0
32
+ npm install -g @anyswarm/core@0.5.2
16
33
  anyswarm --version
17
34
  ```
18
35
 
19
- The [Quickstart](quickstart.md#1-install-anyswarm) also shows how to install a managed CLI from the [v0.5.0 GitHub Release](https://github.com/AnySwarm/anyswarm/releases/tag/v0.5.0).
36
+ The [v0.5.2 GitHub Release](https://github.com/AnySwarm/anyswarm/releases/tag/v0.5.2) also includes the npm archive.
20
37
 
21
38
  To add the SDK as a dependency, run this command in your project.
22
39
 
23
40
  ```sh
24
- npm install @anyswarm/core@0.5.0
41
+ npm install @anyswarm/core@0.5.2
25
42
  ```
26
43
 
27
44
  See [Install the SDK](reference/api.md#install-the-sdk) for SDK imports and the project-local CLI.
28
45
 
46
+ ## v0.5.1
47
+
48
+ See the [v0.5.1 changelog](changelog.md#v051) for the previous CLI and platform support.
49
+
50
+ ## v0.5.0
51
+
52
+ v0.5.0 was the first supported release of `@anyswarm/core`. See the [v0.5.0 changelog](changelog.md#v050) for that release.
53
+
29
54
  Earlier releases used different npm package names. Their source and release artifacts are in the [GitHub release history](https://github.com/AnySwarm/anyswarm/releases).
@@ -1,35 +1,35 @@
1
1
  ---
2
2
  title: Overview
3
- description: Learn what AnySwarm solves, how the docs follow the six core building blocks, and where to jump in.
3
+ description: Run useful multi-agent workflows, inspect their evidence, and adapt collaboration with the AnySwarm TypeScript SDK.
4
4
  section: GET STARTED
5
5
  order: 0
6
6
  ---
7
7
 
8
- **`anyswarm`** (`@anyswarm/core`) is a local-first framework for building, isolating, and observing multi-agent systems.
8
+ AnySwarm is a TypeScript SDK and CLI for teams of Agents that need isolated workspaces, shared state, and inspectable results. A **Harness** defines the roles, collaboration and stopping rules. A **Runtime** runs the team, authenticates its Service calls and collects its records and artifacts.
9
9
 
10
- It cleanly separates **how your agents collaborate** from **how they are isolated and run**:
10
+ ## Start from a job
11
11
 
12
- - **You write the Harness** — deciding the roles, shared coordination Services, and orchestration logic.
13
- - **AnySwarm provides the foundation** — isolated containers (Sandboxes), the run control plane (Runtime), the trusted Host Gateway, and the built-in browser Trace Viewer.
12
+ | Job | How members work | What to inspect |
13
+ | --- | --- | --- |
14
+ | [Repository handoff](quickstart.md) | Root delegates independent source inspection to children, checks their references and writes `report.md`. | The children’s file reads, returned findings and exported report. Generic Subagents does not independently certify its conclusions. |
15
+ | [AutoResearch](autoresearch.md) | Peers explore and review patches; a host-controlled Evaluator scores frozen candidates. | Candidate identities, reviews, training feedback and final evaluation. The editable two-peer FrontierCS-2 example has its own model, evaluator and resource requirements. |
14
16
 
15
- The TypeScript SDK, host `anyswarm` CLI, in-sandbox `swarm` CLI, and `anyswarm trace` all ship in one `@anyswarm/core` package.
17
+ Open the [recorded p-limit handoff](https://anyswarm.github.io/anyswarm/trace-demo/index.html?run=p-limit-handoff) without installing anything. Choose **Files & Results** to read the original report.
16
18
 
17
- ## How the docs are organized
19
+ ## Three paths through the examples
18
20
 
19
- The guide walks through the **six building blocks** from the homepage one by one, then puts them together in two hands-on tutorials:
21
+ 1. **Tier 1 — run a task or learn the SDK.** Use [Quickstart](quickstart.md) on your repository. To author a Harness, follow [First Harness](first-harness.md) → [Parallel Swarm](build-your-harness.md). The SDK tutorials use 0.6.0 or a matching source build.
22
+ 2. **Tier 2 — applications and collaboration references.** Read [AutoResearch](autoresearch.md), then study [Subagents](harnesses/subagents.md), [TaskPool](harnesses/taskpool.md) or [Substrate](harnesses/substrate.md). These three topology entrypoints create their business Services locally, on top of the shared Runtime setup.
23
+ 3. **Tier 3 — advanced source and integrations.** `super`, `code`, `harness-session` and individual Service examples are developer references. Code development is paused. [PeerMesh](harnesses/peermesh.md) requires Gitea, Mattermost, MySQL and its Board process; [Lead-Worker](harnesses/lead-worker.md) requires Gitea. See the [complete example catalog](../../examples/README.md).
20
24
 
21
- 1. **Get Started**: [Quickstart](quickstart.md) (install and run your first swarm) → [Core Concepts](concepts.md) (the big picture in 2 minutes).
22
- 2. **Core Building Blocks**:
23
- - [Sandboxes](sandbox.md) — per-Agent sandboxes, network policies, resource limits, and Kubernetes deployment.
24
- - [Runtime](runtime.md) — creating a run, syncing files, subscribing to events, live updates, clean shutdown, and durable recovery.
25
- - [Agents & Profiles](agents.md) — role templates, persistent sessions, sending messages, interrupts, session controls, and compaction hooks.
26
- - [Host Gateway](gateway.md) — how Service Bridge and Model Gateway guard identity, schemas, callbacks, and API keys.
27
- - [Services & Permissions](services.md) — why coordination uses host Services instead of local tools, wrapping your own classes or HTTP APIs, and static/dynamic permissions.
28
- - [Trace Viewer](trace-viewer.md) — interactive swimlane demo right in the docs, plus launching `anyswarm trace` locally or over SSH.
29
- 3. **Tutorials**:
30
- - [Build Your First SDK Harness](first-harness.md) — build a two-Agent interactive handoff app using the standard `Harness` contract.
31
- - [Build a Swarm Harness](build-your-harness.md) — build a parallel multi-agent Research Swarm step by step.
32
- 4. **Built-in Harnesses**: [Choose a Harness](harnesses/index.md) — run or adapt `Subagents`, `TaskPool`, `PeerMesh`, `Substrate`, and `Lead-Worker`.
33
- 5. **Reference & Releases**: [SDK & API Reference](reference/api.md) · [CLI Reference](reference/cli.md) · [Types & Source Map](reference/types.md) · [Releases](latest.md) · [Changelog](changelog.md).
25
+ ## Understand the building blocks
34
26
 
35
- > Looking for internal implementation details or maintainer specs? See the repository's [Architecture Manual](https://github.com/AnySwarm/anyswarm/blob/main/docs/architecture/INDEX.md).
27
+ Read [Core Concepts](concepts.md), then use the reference you need: [Sandboxes](sandbox.md), [Runtime](runtime.md), [Agents & Profiles](agents.md), [Host Gateway](gateway.md), [Services & Permissions](services.md), or [Trace Viewer](trace-viewer.md). An ordinary multi-agent Harness uses one Runtime for the team; Agents do not require separate host applications.
28
+
29
+ Local input is captured at the beginning of a Run and copied into private Sandboxes. Collaboration Services make shared state explicit. Exported artifacts and cleanup receipts are separate from business acceptance, and outputs do not automatically overwrite the input directory.
30
+
31
+ ## Customize with your coding agent
32
+
33
+ The [copyable author prompt](build-your-harness.md#coding-agent-prompt) exports a real `parallel-swarm` project, reads its consumer `AGENTS.md` and installed SDK types, then adapts the workflow to your requirements. It does not use the AnySwarm maintainer instructions as your application guide.
34
+
35
+ Exact APIs and supported flags are in [SDK & API Reference](reference/api.md), [CLI Reference](reference/cli.md) and [Types & Source Map](reference/types.md). Check [Releases](latest.md) for published behavior. The [Architecture Manual](../architecture/INDEX.md) explains the implementation and its boundaries.
@@ -1,35 +1,37 @@
1
1
  ---
2
2
  title: Quickstart
3
- description: Prepare Linux prerequisites, install AnySwarm, initialize OpenSandbox and the Worker image, and run a first Sandbox and file-reading check.
3
+ description: Prepare the shared Runtime, then use Subagents to inspect a real repository and export an engineering handoff report.
4
4
  section: GET STARTED
5
5
  order: 1
6
6
  ---
7
7
 
8
8
  To build an application with the TypeScript SDK, follow [Build your first SDK Harness](first-harness.md).
9
9
 
10
- AnySwarm ships its CLI and TypeScript SDK in one package and runs Agents inside [OpenSandbox](sandbox.md) containers. You can run OpenSandbox locally with Docker Engine or connect to an existing OpenSandbox service.
10
+ AnySwarm ships its CLI and TypeScript SDK in one package and runs Agents inside [OpenSandbox](sandbox.md) containers. This guide runs OpenSandbox and Workers on your machine using Docker.
11
11
 
12
- This guide covers [v0.5.0](latest.md#v050), the first supported release of `@anyswarm/core`.
12
+ On GitHub's `main` branch and in the site's **Next** channel, this guide follows
13
+ current development. Use the [stable Quickstart](https://anyswarm.github.io/anyswarm/docs/quickstart/)
14
+ for the supported published package. The stable site's version label identifies
15
+ its package; Next documentation can be ahead of the last npm preview.
13
16
 
14
17
  ## Prerequisites
15
18
 
16
19
  | Dependency | Requirement | Verify |
17
20
  | --- | --- | --- |
18
- | **Linux** | Controller host (e.g., Ubuntu / Debian) | `uname -s` |
19
- | **Node.js** | `>= 22.19` (install LTS from [nodejs.org](https://nodejs.org/en/download); Ubuntu 24.04 and Debian 13 repos ship older versions) | `node --version` |
21
+ | **Linux or macOS** | Controller host (e.g., Ubuntu, Debian, or macOS with Docker Desktop) | `uname -s` |
22
+ | **Node.js** | `>= 22.19`; Node.js 24 is recommended (install LTS from [nodejs.org](https://nodejs.org/en/download); Ubuntu 24.04 and Debian 13 repos ship older versions) | `node --version` |
20
23
  | **npm** | Install with Node.js | `npm --version` |
21
24
  | **Git** | Required for the source checkout and project capture | `git --version` |
22
- | **curl** | Required to download the installer | `curl --version` |
23
- | **Docker Engine** | Required for local OpenSandbox only; skip when using an existing service ([install guide](https://docs.docker.com/engine/install/)) | `docker info` |
25
+ | **Docker Engine** | A running local Linux container engine ([install guide](https://docs.docker.com/engine/install/)) | `docker info` |
24
26
 
25
27
  On Ubuntu or Debian with local Docker, install the system dependencies and start Docker:
26
28
 
27
29
  ```bash
28
- sudo apt-get update && sudo apt-get install -y docker.io git curl ca-certificates
30
+ sudo apt-get update && sudo apt-get install -y docker.io git ca-certificates
29
31
  sudo systemctl enable --now docker.service
30
32
  ```
31
33
 
32
- For an existing OpenSandbox service, install only `git curl ca-certificates` and skip the Docker service and group steps.
34
+ Linux rootless Docker needs Engine 29.5 or newer for the host-network port used by managed OpenSandbox. An existing endpoint is also supported. [Docker rootless networking](https://docs.docker.com/engine/security/rootless/troubleshoot/#--nethost-doesnt-listen-ports-on-the-host-network-namespace)
33
35
 
34
36
  If the Docker socket denies access, an administrator can run `sudo usermod -aG docker alice`, replacing `alice` with the account that runs AnySwarm. Sign in again as that account and run `id` and `docker info`. The [`docker` group grants root-equivalent access](https://docs.docker.com/engine/install/linux-postinstall/).
35
37
 
@@ -45,15 +47,15 @@ docker context show
45
47
  docker info --format '{{.OSType}}/{{.Architecture}}'
46
48
  ```
47
49
 
48
- If the wrong context is selected, run `docker context use <local-context>` and check whether `DOCKER_CONTEXT` or `DOCKER_HOST` overrides it. The expected daemon is Linux ARM64 on Apple Silicon, or Linux x86-64 on Intel; setup does not use emulation. If a separately installed Docker client reports `docker-credential-desktop` not found, put Docker Desktop's CLI tools on PATH in its settings, or add `/Applications/Docker.app/Contents/Resources/bin` to PATH. Use Node.js 24 LTS for TypeScript author commands; Node.js 26 removed the transform mode they currently use.
50
+ If the wrong context is selected, run `docker context use <local-context>` and check whether `DOCKER_CONTEXT` or `DOCKER_HOST` overrides it. The expected daemon is Linux ARM64 on Apple Silicon, or Linux x86-64 on Intel; setup does not use emulation. If a separately installed Docker client reports `docker-credential-desktop` not found, put Docker Desktop's CLI tools on PATH in its settings, or add `/Applications/Docker.app/Contents/Resources/bin` to PATH.
49
51
 
50
- The published v0.5.0 local setup still requires a Linux Controller. To try native macOS setup, build and install the current source candidate below and select a supported backend. The controlled-model macOS checks for [#339](https://github.com/AnySwarm/anyswarm/issues/339) use Apple Silicon and Docker Desktop, with npm Pi 1.3.0 and 1.7.0 and standalone Codex 0.173.0. Intel and other container engines need separate verification.
52
+ The v0.5.1 release supports native macOS setup with a supported backend. The controlled-model macOS checks for [#339](https://github.com/AnySwarm/anyswarm/issues/339) use Apple Silicon and Docker Desktop, with npm Pi 1.3.0 and 1.7.0 and standalone Codex 0.173.0. Intel and other container engines need separate verification.
51
53
 
52
54
  ## 1. Install AnySwarm
53
55
 
54
56
  ### Install a published release
55
57
 
56
- Choose one way to install the AnySwarm CLI. Both require Node.js 22.19+ and npm. The npm command is the same on macOS and Linux; npm installs the package dependencies, and a running Docker engine is not required for this step.
58
+ Install the CLI with Node.js 22.19 or newer and npm. The command is the same on Linux and macOS. Docker is needed when you run setup.
57
59
 
58
60
  ```bash
59
61
  npm install -g @anyswarm/core
@@ -62,71 +64,71 @@ anyswarm --version
62
64
 
63
65
  The `-g` flag installs the command into npm's global bin directory. If your shell cannot find it, check that `$(npm prefix -g)/bin` is on your PATH and that your shell is using the Node.js installation you used to install the CLI.
64
66
 
65
- You can also install a managed copy of the CLI from GitHub Releases.
67
+ If you are writing a Harness in TypeScript, follow [Install the SDK](reference/api.md#install-the-sdk) to add it as a project dependency.
68
+
69
+ ### Opt into a published preview (`next`)
70
+
71
+ Use this channel only when you want to test unreleased changes:
66
72
 
67
73
  ```bash
68
- curl -fsSL https://anyswarm.github.io/anyswarm/install.sh | sh
74
+ npm install -g @anyswarm/core@next
75
+ anyswarm --version
69
76
  ```
70
77
 
71
- The script reports the version, CLI path, and verified archive source. Apply the printed PATH command if needed, then run `anyswarm --version`.
72
-
73
- If you are writing a Harness in TypeScript, follow [Install the SDK](reference/api.md#install-the-sdk) to add it as a project dependency.
78
+ Record the resolved prerelease version when reporting a problem. For a project
79
+ SDK, use `npm install --save-exact @anyswarm/core@next` and keep the lockfile.
80
+ The Next website follows `main`, so use the installed package's examples and
81
+ bundled docs when its source differs from the current page. Return to stable
82
+ with `npm install -g @anyswarm/core@latest` using the same npm prefix. Preview
83
+ publication is deliberate; a change on `main` may not yet be available on `next`.
74
84
 
75
85
  ### Build and install from source (`main`)
76
86
 
77
- Run these commands from the repository root. `npm run pack:release` builds the distribution archive. The installer stages the CLI under `$HOME/.local`.
87
+ Run these commands from the repository root. `npm run pack:release` builds the distribution archive. The last command installs the archive into the selected npm prefix.
78
88
 
79
89
  ```bash
80
90
  git clone https://github.com/AnySwarm/anyswarm.git && cd anyswarm
81
91
  npm ci --no-audit --no-fund
82
92
  pack_dir=$(mktemp -d)
83
93
  npm run pack:release -- "$pack_dir"
84
- npm_config_prefix="$HOME/.local" sh website/public/install.sh --archive "$pack_dir"/*.tgz
94
+ npm install -g --prefix "$HOME/.local" "$pack_dir"/*.tgz
85
95
  export PATH="$HOME/.local/bin:$PATH"
86
96
  anyswarm --version
87
97
  ```
88
98
 
89
- The candidate can share its package version with the release. Record the source commit and the tarball SHA-256 to identify it. Keep the candidate tarball if you want to install the same SDK in an [independent example project](../../examples/README.md).
99
+ For a source-only tutorial or an unmerged change, check out its reviewed branch or commit before packaging; the default `main` checkout contains only merged work. The candidate can share its package version with the release. Record the source commit and the tarball SHA-256 to identify it. Keep the candidate tarball if you want to install the same SDK in an [independent example project](../../examples/README.md).
90
100
 
91
101
  ### Update the CLI
92
102
 
93
- - Global npm install. Run `npm install -g @anyswarm/core@latest` with the same Node.js installation and npm prefix.
94
- - Shell installer. Run `anyswarm update` to check the GitHub Release checksum and validate the new CLI before switching. A failed update leaves the prior CLI available.
103
+ Use the same npm prefix for both channels. `anyswarm update` prints the stable update command. To stay on the preview channel, explicitly install `@anyswarm/core@next` again.
104
+
105
+ Run `npm install -g @anyswarm/core@latest` to update or `npm uninstall -g @anyswarm/core` to uninstall. Use the same Node.js installation and npm prefix. If npm reports `EACCES`, switch to a user-owned Node installation or install to a writable prefix, for example `npm install -g --prefix "$HOME/.local" @anyswarm/core`. Add `$HOME/.local/bin` to PATH and reuse that prefix for updates and removal.
95
106
 
96
- For the first upgrade from a managed v0.5.0 installation, rerun the current shell installer in the same prefix. This adds the `anys` alias. On macOS, it also uses the current activation lock.
107
+ If you used the old shell installer for v0.5.0 or v0.5.1, check the `anyswarm`, `anys`, and `swarm` links in `$(npm prefix -g)/bin`. Clear only links that point into the old AnySwarm installation under `lib/anyswarm/current`, then install with npm. AnySwarm configuration lives outside the CLI installation.
97
108
 
98
109
  To update a project's SDK, use its package manager in the project directory.
99
110
 
100
111
  ## 2. Prepare OpenSandbox and the Worker
101
112
 
102
- Use the Pi or Codex installation you already have. On Linux, use a supported npm package layout. On macOS, setup also accepts the standalone Codex executable when the same release is available for Linux from npm. If you need Pi, install it with `npm install --global @earendil-works/pi-coding-agent`. Then select an installed backend.
113
+ Run setup on the machine where you want OpenSandbox and the Worker to run.
103
114
 
104
115
  ```bash
105
- pi --version
106
- anyswarm setup --backend pi
107
- anyswarm doctor --smoke
116
+ anyswarm setup
108
117
  ```
109
118
 
119
+ Setup detects the OS and Node version, checks the local Docker engine, and looks for your saved settings or an installed Pi or Codex backend. If a prerequisite is missing, follow the reported commands and rerun setup. Use `anyswarm doctor` for a read-only check of the same local prerequisites and Lifecycle connection.
120
+
121
+ If you need a backend, install Pi with `npm install -g @earendil-works/pi-coding-agent` or Codex with `npm install -g @openai/codex`. On macOS, setup also accepts standalone Codex when the same release is available for Linux from npm. Setup selects the only compatible backend when it finds one. When both are compatible, terminal setup can ask you to choose. In automation, use `anyswarm setup --backend pi` or `anyswarm setup --backend codex`.
122
+
110
123
  Bare setup reuses the saved executable path. To choose a different installation, supply `--backend pi --backend-path /absolute/path/to/bin/pi` or the corresponding Codex options. To require an installed version, add `--backend-version 1.7.0` (substitute the version you intend to use). A saved version pin rejects an executable that later reports a different version. Repeat explicit backend selection without a pin to follow upgrades to that installation.
111
124
 
112
125
  On macOS, setup prepares the same release's Linux package inside a native Docker container. It verifies the Worker version and runs the executor startup and controlled protocol smoke before saving the connection. Without a saved selection, an interactive terminal prompts when both backends are installed. Use `--backend` in automation when both are present.
113
126
 
114
127
  For a new local configuration, setup defaults to `127.0.0.1:8080`, builds a Worker from the selected installation and SDK package, and pulls the pinned upstream OpenSandbox 1.2.1 components. It saves the managed connection after a controlled smoke verifies Worker, Bridge, Gateway, files, export and deletion. Expect `"ok": true` and `"infrastructure": "ready"`. Repeating setup restores a stopped managed service and reruns the smoke. Test with `ANYSWARM_CONFIG_DIR=/path/to/private-directory` and a free loopback port if needed.
115
128
 
116
- Setup builds AnySwarm Workers locally. A matching Docker image is reused by content identity. Base image, apt and npm dependencies can require Internet access. Model routes and credentials still come from your explicit AnySwarm environment or project configuration. The controlled setup smoke does not verify those model credentials.
129
+ Setup builds AnySwarm Workers locally. A matching Docker image is reused by content identity. Base image, apt and npm dependencies can require Internet access. Model routes and credentials still come from your explicit AnySwarm environment or project configuration. The controlled setup smoke does not verify those model credentials. Use `anyswarm doctor --smoke` to repeat the controlled probe.
117
130
 
118
- ### Connect to an existing OpenSandbox
119
-
120
- ```bash
121
- export OPEN_SANDBOX_API_KEY='<operator-provided-key>'
122
- anyswarm setup --mode existing --endpoint https://sandbox.example.net \
123
- --public-url https://runtime.example.net/anyswarm
124
- anyswarm doctor --smoke
125
- ```
126
-
127
- Existing setup verifies authentication and saves the endpoint, key and callback in owner-only user configuration. The remote Controller needs Node and network access. Its operator prepares a matching Worker image on the service. Set `ANYSWARM_WORKER_IMAGE` to that image before the probe and your project run. `doctor` performs a read-only configuration and Lifecycle check. `doctor --smoke` allocates a temporary Sandbox and verifies Controller-to-Worker and Sandbox-to-Runtime traffic before confirming export and deletion. An unavailable saved remote connection produces an error for that connection.
128
-
129
- `connection.publicUrl` is one callback address for Bridge and model requests. A reverse proxy should forward that path prefix to the Runtime's `bindHost` and fixed `bindPort`. Local setup discovers its reachable host and available port. See [Sandboxes](sandbox.md) and [Host Gateway](gateway.md).
131
+ The local service runs on the same machine as the CLI. To use a service you operate, see [Connect an existing OpenSandbox service](sandbox.md).
130
132
 
131
133
  ### Diagnose image availability
132
134
 
@@ -134,38 +136,49 @@ Setup prints the image it is preparing and reports elapsed time while a phase is
134
136
 
135
137
  For a local Worker, read the reported build phase and retry after fixing its prerequisite. Setup reports the SDK version and content, the selected executable and its identity, the Worker image ID, and whether it built or reused the image.
136
138
 
137
- ## 3. Run a Sandbox and file-reading check
139
+ ## 3. Prepare an engineering handoff for your repository
138
140
 
139
- The setup smoke uses a controlled model response. This example uses your actual upstream and runs one Agent. The [browser replay](https://anyswarm.github.io/anyswarm/trace-demo/) is available without a model credential.
141
+ Use AnySwarm 0.6.0 or a [matching source build](#build-and-install-from-source-main) to export the same settings used for the [recorded p-limit run](https://github.com/AnySwarm/anyswarm/issues/358#issuecomment-7385075753). The command uses a small, pinned public repository. Once you have tried it, replace the input path with a focused directory in your own project.
140
142
 
141
- Export any streaming OpenAI Responses-compatible endpoint and API key (OpenAI shown below), then run the built-in `subagents` Harness in a fresh directory:
143
+ Set your streaming model endpoint and credentials before running. The example below uses OpenAI Responses. The recorded VM Run used GPT-6.1 Sol through its configured Responses provider. See the [CLI Reference](reference/cli.md) for protocol and executor options.
142
144
 
143
145
  ```bash
144
146
  export ANYSWARM_MODEL_URL='https://api.openai.com/v1/responses'
145
147
  export ANYSWARM_MODEL_ID='gpt-5-mini'
146
148
  export ANYSWARM_MODEL_TOKEN='<your-api-key>'
147
149
 
148
- mkdir -p anyswarm-first-example && cd anyswarm-first-example
149
- printf '# Hello from AnySwarm\n' > README.md
150
- anyswarm --harness subagents --prompt 'Read README.md and report its heading.' --output-dir ./runs
150
+ git clone https://github.com/sindresorhus/p-limit.git ./handoff-input
151
+ git -C ./handoff-input checkout --detach a8a6fbec4e0e866d6d779b10889bb4f5567e70eb
152
+ anyswarm eject subagents --dir ./handoff
153
+ (
154
+ cd ./handoff
155
+ npm install
156
+ npm start -- --config ./handoff-config.ts --cwd ../handoff-input \
157
+ --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.' \
158
+ --output-dir ../runs
159
+ )
151
160
  ```
152
161
 
153
- Expect exit code 0, `outcome: "completed"`, the heading `# Hello from AnySwarm` in the business output, and `cleanup.status: "complete"`. Trace Viewer can show the `read` tool result.
154
-
155
- See the [CLI Reference](reference/cli.md) for other model providers and executor options (such as Codex).
162
+ The handoff configuration allows 360 seconds of work, 70 seconds per model request and 60 seconds for cleanup. It sets room for Root and two immediate children and requires one `report.md` of up to 1 MiB. These are limits. Running time depends on the model, environment and input. The generic built-in Harness keeps its own shorter defaults. The host captures a snapshot, each Agent works in a private copy, and the result is exported under `./runs`. Follow the printed artifact path to the report.
156
163
 
157
- ## 4. Inspect the run in Trace Viewer
164
+ ## 4. Inspect the report and the work behind it
158
165
 
159
166
  ```bash
160
- anyswarm trace --root ./runs --port 8787 --open
167
+ anyswarm trace --root ./runs --port 8787
161
168
  ```
162
169
 
163
- From your local machine, reuse the SSH destination and options you used to sign in. For example, if you connect with `ssh -p 2222 dev@vm-host`, use `ssh -p 2222 -N -L 8787:127.0.0.1:8787 dev@vm-host`, then open `http://127.0.0.1:8787`. In **Files & results**, check the business result and cleanup status for the same Run.
170
+ Open the printed local URL. For a remote host, use SSH forwarding, for example `ssh -N -L 8787:127.0.0.1:8787 user@host`, then open `http://127.0.0.1:8787` locally.
171
+
172
+ For the same Run, check:
173
+
174
+ - **Work:** Root created the requested children, they inspected different parts of the repository, and Root received their findings. The timeline shows whether their work actually overlapped.
175
+ - **Report:** find `report.md` through the final artifact paths or **Files & results**. Check cited paths and line ranges against the captured files. Commands that were only found in documentation must be distinguished from commands actually executed.
176
+ - **Status:** read business outcome, artifact export and cleanup separately. A completed Agent turn is not an independent check of report quality. Generic Subagents reports `acceptance.status: "not-run"`; the conclusions still need review. Missing files, incomplete export or pending cleanup require attention even when a final answer exists.
164
177
 
165
- Use the same model to [verify parent-child delegation](harnesses/subagents.md#verify-parent-child-delegation) in Trace Viewer. The [two-Agent SDK Harness](first-harness.md) also checks a Service handoff and a delivery file that reflects your terminal reply.
178
+ Open the [recorded p-limit handoff](./trace-viewer.md) to inspect how Root and two children worked on a public repository and to read their exported `report.md`. The replay needs no installation or credentials.
166
179
 
167
180
  ## Next steps
168
181
 
169
- - [Core Concepts](concepts.md) — understand the six building blocks in two minutes.
170
- - [Choose a Harness](harnesses/index.md) — compare all five built-in multi-agent patterns.
171
- - [Build a Swarm Harness](build-your-harness.md) — write your own coordination loop with the [TypeScript SDK](reference/api.md).
182
+ - [Choose an example](harnesses/index.md) — applications, collaboration references and advanced integrations in three tiers.
183
+ - [First SDK Harness](first-harness.md) → [Parallel Swarm](build-your-harness.md) — learn the Service handoff, byte checks, parallel review and synthesis.
184
+ - [AutoResearch](autoresearch.md) — understand the current research application and its evaluator requirements.