@anyswarm/core 0.5.2 → 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 +19 -4
- package/README.md +68 -61
- package/dist/examples/README.md +134 -84
- package/dist/examples/autoresearch/README.md +106 -21
- package/dist/examples/autoresearch/REQUIREMENTS.zh.md +14 -6
- 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/frontiercs2-config.d.ts +2 -2
- package/dist/examples/autoresearch/frontiercs2-config.js +13 -2
- package/dist/examples/autoresearch/frontiercs2.d.ts +18 -1
- package/dist/examples/autoresearch/frontiercs2.js +71 -14
- package/dist/examples/autoresearch/prepare-demo.js +34 -3
- 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 -1
- package/dist/examples/autoresearch/project.js +130 -26
- package/dist/examples/autoresearch/research-service.d.ts +16 -1
- package/dist/examples/autoresearch/research-service.js +84 -44
- 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 +1 -1
- 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 +2 -2
- 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 +1 -1
- 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 +8 -15
- 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/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-progress.js +36 -5
- 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 +3 -3
- package/dist/scripts/local-environment.js +6 -1
- package/dist/scripts/local-setup.js +25 -18
- package/dist/scripts/pack-release.js +27 -3
- 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/harness/project-harness.js +3 -2
- package/dist/src/harness/project-rpc-client.js +19 -0
- 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 +9 -8
- package/docs/architecture/06-observability-experiments.md +21 -7
- package/docs/architecture/07-run-configuration.md +97 -12
- 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 +129 -86
- 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 +78 -0
- package/docs/architecture/22-website.md +53 -18
- package/docs/architecture/23-project-harness.md +63 -16
- package/docs/architecture/28-autoresearch.md +16 -22
- 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 +78 -54
- package/docs/architecture/source-map.json +396 -36
- package/docs/designs/core-harness/06-project-harness.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 +22 -1
- package/docs/en/first-harness.md +40 -32
- package/docs/en/harnesses/index.md +23 -23
- package/docs/en/harnesses/subagents.md +8 -29
- package/docs/en/latest.md +26 -5
- package/docs/en/overview.md +22 -22
- package/docs/en/quickstart.md +55 -21
- package/docs/en/reference/api.md +1 -1
- package/docs/en/trace-viewer.md +32 -12
- package/docs/operations/trace-viewer.md +25 -10
- package/docs/workflows/development.md +160 -120
- package/docs/workflows/release-and-docs-versioning.md +207 -55
- package/docs/workflows/release-cli-acceptance.md +124 -47
- 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 +22 -1
- package/docs/zh/first-harness.md +43 -35
- package/docs/zh/harnesses/index.md +23 -23
- package/docs/zh/harnesses/subagents.md +8 -29
- package/docs/zh/latest.md +26 -5
- package/docs/zh/overview.md +23 -23
- package/docs/zh/quickstart.md +51 -21
- package/docs/zh/reference/api.md +1 -1
- package/docs/zh/trace-viewer.md +32 -12
- package/examples/README.md +134 -84
- package/examples/autoresearch/README.md +106 -21
- package/examples/autoresearch/REQUIREMENTS.zh.md +14 -6
- package/examples/autoresearch/config.ts +64 -25
- package/examples/autoresearch/demo.ts +75 -22
- package/examples/autoresearch/frontiercs2-config.ts +13 -2
- package/examples/autoresearch/frontiercs2.ts +64 -11
- package/examples/autoresearch/prepare-demo.ts +32 -3
- package/examples/autoresearch/prepare.ts +134 -60
- package/examples/autoresearch/project.ts +119 -26
- package/examples/autoresearch/research-service.ts +91 -41
- 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 +1 -1
- package/examples/lead-worker/README.md +1 -1
- package/examples/messages/README.md +2 -2
- package/examples/notes/README.md +2 -2
- 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 +1 -1
- package/examples/subagents/AGENTS.md +35 -0
- package/examples/subagents/README.md +129 -93
- package/examples/subagents/config.ts +8 -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/taskpool/README.md +1 -1
- package/npm-shrinkwrap.development.json +9 -2
- package/npm-shrinkwrap.json +9 -2
- package/package.development.json +2 -1
- package/package.json +2 -1
- package/scripts/anyswarm-progress.ts +36 -6
- package/scripts/generate-architecture-coverage.ts +1 -1
- package/scripts/generate-architecture-prompts.ts +21 -10
- package/scripts/local-environment.ts +8 -1
- package/scripts/local-setup.ts +22 -17
- package/scripts/pack-release.ts +24 -3
- 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/harness/project-harness.ts +3 -2
- package/src/harness/project-rpc-client.ts +23 -0
- 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
|
@@ -1,77 +1,229 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
# Releases and documentation versions
|
|
2
|
+
|
|
3
|
+
`main`, an installable candidate, npm `next`, and npm `latest` have separate
|
|
4
|
+
purposes. Development can continue without publishing every merged change.
|
|
5
|
+
The [Release workflow](../../.github/workflows/release.yml) owns verification and
|
|
6
|
+
publication; this guide explains when to use each path and how to recover.
|
|
7
|
+
|
|
8
|
+
## Channels and version policy
|
|
9
|
+
|
|
10
|
+
| Surface | Meaning | How it changes |
|
|
11
|
+
| --- | --- | --- |
|
|
12
|
+
| `main` | Current development source | Reviewed PRs merge after required CI |
|
|
13
|
+
| CI candidate archive | Installable bytes from one recorded source revision | Relevant CI or a manual verification run; no public npm publication |
|
|
14
|
+
| npm `next` | Opt-in prerelease for external testing | Authorized manual `publish_next=true` from `main` |
|
|
15
|
+
| npm `latest` | Current supported stable release | Approved release PR, matching stable tag, verification and publication |
|
|
16
|
+
| Stable website guides | Instructions compatible with the published stable package | Reviewed stable manifest inputs; deployment verifies the package exists |
|
|
17
|
+
| Next website guides | Current `main` instructions, possibly ahead of npm `next` | Main documentation changes |
|
|
18
|
+
|
|
19
|
+
A candidate may share its package version with the stable release; identify it
|
|
20
|
+
by source commit and archive SHA-256. A next package has its own prerelease
|
|
21
|
+
version, and its source may lag the moving Next documentation. Pin the exact
|
|
22
|
+
prerelease to reproduce a report, and consult its bundled docs when needed.
|
|
23
|
+
|
|
24
|
+
For the current pre-1.0 project, use a patch release for compatible fixes and a
|
|
25
|
+
new minor line for new capabilities or incompatible public API/CLI behavior. Explain incompatible
|
|
26
|
+
changes and migration steps. Do not use the `0.x` label as a reason to silently
|
|
27
|
+
break users in a patch. Move to 1.0 when ready to commit to the stable API contract
|
|
28
|
+
specified by [SemVer](https://semver.org/spec/v2.0.0.html).
|
|
29
|
+
|
|
30
|
+
Ordinary PRs do not bump formal package versions. Add user-visible changes under
|
|
31
|
+
`Unreleased` in the root `CHANGELOG.md`, the canonical pending-change record.
|
|
32
|
+
The release PR consolidates these entries into the English and Chinese changelogs
|
|
33
|
+
and release notes. Ordinary PRs update affected bilingual usage guides, without
|
|
34
|
+
having to maintain three copies of every pending note. Documentation corrections
|
|
35
|
+
and internal changes alone do not require a package release.
|
|
36
|
+
|
|
37
|
+
## 1. Verify a candidate without publishing
|
|
38
|
+
|
|
39
|
+
Use Node.js 24 and the locked dependencies. Pack with `npm run pack:release`,
|
|
40
|
+
then verify that exact archive outside the checkout. The pack script stages the
|
|
41
|
+
public manifest and production lockfile while preserving development build
|
|
42
|
+
materials; it does not publish anything.
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
npm ci --ignore-scripts
|
|
46
|
+
candidate_dir=$(mktemp -d)
|
|
47
|
+
npm run pack:release -- "$candidate_dir"
|
|
48
|
+
sha256sum "$candidate_dir"/*.tgz
|
|
49
|
+
```
|
|
4
50
|
|
|
5
|
-
|
|
51
|
+
The [development workflow](development.md#repository-ci-checks)
|
|
52
|
+
describes the full cache preparation and frozen package tests. CI preserves the
|
|
53
|
+
archive, `SHA256SUMS` and `source.json`. The full test shards consume that same
|
|
54
|
+
archive. Record the CI result separately from artifact availability.
|
|
6
55
|
|
|
7
|
-
|
|
56
|
+
For the full release verifier, dispatch the workflow with both publication flags
|
|
57
|
+
off. Select the reviewed branch or use `main`:
|
|
8
58
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
59
|
+
```sh
|
|
60
|
+
gh workflow run release.yml --ref main
|
|
61
|
+
```
|
|
12
62
|
|
|
13
|
-
|
|
63
|
+
This performs candidate-only verification. Native setup, controlled-model
|
|
64
|
+
Quickstart and installed SDK checks require the workflow's Docker environment.
|
|
65
|
+
See [CLI acceptance](release-cli-acceptance.md) for manual host and upgrade checks.
|
|
14
66
|
|
|
15
|
-
|
|
67
|
+
## 2. Publish an opt-in next version
|
|
16
68
|
|
|
17
|
-
|
|
69
|
+
After the owner authorizes preview publication, dispatch from `main`:
|
|
18
70
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
4. The tag workflow publishes that exact archive to npm after GitHub publication. To retry the current GitHub Latest release, dispatch the Release workflow from `main` with `publish_npm` enabled. [Release verification](development.md#release-verification)
|
|
23
|
-
5. Poll the public registry for the exact version with a bounded timeout, download its `dist.tarball`, and compare its SHA-256 with the GitHub asset. Verify `dist.integrity`, then install that version by package name in a fresh project and in an isolated global npm prefix. Verify the SDK import, the `anyswarm` executable, install warnings and the production audit. npm scans packages before public availability. If the version is still pending after the verification timeout, resume verification later using the same archive. [npm publish-time scanning](https://github.blog/changelog/2026-07-28-npm-publish-time-malware-scanning-and-dual-use-metadata/)
|
|
24
|
-
6. After the new package is publicly installable, update the bilingual stable guides and version label and verify the Pages deployment. Check npm `latest` and the homepage npm command, and compile the affected examples from the installed SDK. Record the source commit, tag, archive SHA-256, npm version, CI run and deployed Pages revision separately. A GitHub Release, a public npm package and a deployed website are distinct milestones.
|
|
71
|
+
```sh
|
|
72
|
+
gh workflow run release.yml --ref main -f publish_next=true
|
|
73
|
+
```
|
|
25
74
|
|
|
26
|
-
`
|
|
75
|
+
`publish_next` and `publish_npm` cannot both be true. The workflow rejects next
|
|
76
|
+
publication from another ref. A normal main push does not publish either channel.
|
|
77
|
+
|
|
78
|
+
The workflow derives a version from the source's next minor line, run ID and
|
|
79
|
+
source SHA. For example, source version `0.5.2` can produce
|
|
80
|
+
`0.6.0-next.47107907008.g070b025305af`. The `g` prefix makes the SHA component a
|
|
81
|
+
valid nonnumeric SemVer identifier. A rerun of the same workflow run retains the
|
|
82
|
+
same version identity. Prefer rerunning the failed publication job so it downloads
|
|
83
|
+
the already verified artifact. Rerunning all jobs can rebuild the candidate; if
|
|
84
|
+
that produces different bytes for an existing version, publication must stop.
|
|
85
|
+
The formal source manifest and lockfile stay unchanged;
|
|
86
|
+
the override is applied only in the packed staging directory. Preview numbering
|
|
87
|
+
does not decide the eventual stable release version.
|
|
88
|
+
|
|
89
|
+
The next candidate is verified before it is published with `--tag next` through
|
|
90
|
+
the existing trusted publishing workflow. It has no stable Git tag or GitHub
|
|
91
|
+
Latest release. The publication path verifies that npm `latest` is unchanged,
|
|
92
|
+
then downloads the public registry tarball, checks its identity and installs the
|
|
93
|
+
exact version in fresh consumers. Stable and next publication share the
|
|
94
|
+
publication concurrency boundary.
|
|
95
|
+
|
|
96
|
+
Testers explicitly select this channel:
|
|
97
|
+
|
|
98
|
+
```sh
|
|
99
|
+
npm install -g @anyswarm/core@next
|
|
100
|
+
anyswarm --version
|
|
101
|
+
```
|
|
27
102
|
|
|
28
|
-
|
|
103
|
+
For a project SDK, use `npm install --save-exact @anyswarm/core@next` and commit
|
|
104
|
+
the lockfile. Report the resolved version rather than just the moving `next`
|
|
105
|
+
tag. Return the CLI to the supported release with
|
|
106
|
+
`npm install -g @anyswarm/core@latest`, using the same npm prefix.
|
|
107
|
+
|
|
108
|
+
## 3. Prepare and publish a stable release
|
|
109
|
+
|
|
110
|
+
1. Prepare one release PR from `main`. Update the package and lockfile versions,
|
|
111
|
+
release notes, affected examples, Worker/backend compatibility information,
|
|
112
|
+
and migration instructions. Both language guides must describe the resulting
|
|
113
|
+
behavior. Keep the stable website manifest on the currently published version
|
|
114
|
+
until the new distribution is verified.
|
|
115
|
+
2. Review the merge candidate with required Core and Website CI. Run the manual
|
|
116
|
+
Release verifier against the reviewed revision. Preserve its source identity
|
|
117
|
+
and record any manual host acceptance required for the changed paths.
|
|
118
|
+
3. After approval and merge, the release owner creates a matching `vX.Y.Z` tag at
|
|
119
|
+
the approved revision under the [tag ruleset](https://github.com/AnySwarm/anyswarm/rules/28373821).
|
|
120
|
+
The workflow requires a stable tag matching the source package version.
|
|
121
|
+
4. The tag workflow packs and verifies its final candidate. It uploads the
|
|
122
|
+
versioned tarball, the byte-identical `luna-shi-anyswarm.tgz` alias, and
|
|
123
|
+
`SHA256SUMS` to the tagged GitHub Release. npm publication uses those public
|
|
124
|
+
verified bytes; it must not manufacture another tarball with `npm pack`.
|
|
125
|
+
5. The npm job publishes the current GitHub Latest release, then verifies public
|
|
126
|
+
registry metadata, downloads the actual `dist.tarball`, checks its digest,
|
|
127
|
+
and installs the exact package by name in an empty project and an isolated
|
|
128
|
+
global npm prefix. It verifies the root SDK import and CLI version. A registry
|
|
129
|
+
metadata response alone does not complete this step.
|
|
130
|
+
6. Once both distributions pass, review the stable documentation manifest and
|
|
131
|
+
deploy the compatible guides. Record the source commit, tag, archive SHA-256,
|
|
132
|
+
npm version/channel, workflow run and website revision in the release record.
|
|
133
|
+
|
|
134
|
+
A next prerelease cannot become a stable version just by relabeling its bytes:
|
|
135
|
+
the stable package has a different manifest version and must pass verification
|
|
136
|
+
as its own candidate. Preserve byte identity across the distribution channels
|
|
137
|
+
for each individual version.
|
|
138
|
+
|
|
139
|
+
An older stable tag can remain a pinned GitHub Release. The current npm workflow
|
|
140
|
+
publishes GitHub Latest and does not automatically backport or promote an older
|
|
141
|
+
API line over it. Any future maintained older npm line needs its own explicit
|
|
142
|
+
channel policy.
|
|
143
|
+
|
|
144
|
+
## Publication credentials and public verification
|
|
145
|
+
|
|
146
|
+
The existing npm Trusted Publisher is bound to `AnySwarm/anyswarm` and
|
|
147
|
+
`release.yml`. Both stable and next publication use that workflow and its
|
|
148
|
+
`id-token: write` job; the configured publisher must permit direct `npm publish`.
|
|
149
|
+
Do not copy a long-lived token into the repository or run publication from a PR
|
|
150
|
+
check. Follow [npm Trusted Publishing](https://docs.npmjs.com/trusted-publishers/)
|
|
151
|
+
when changing publisher settings.
|
|
152
|
+
|
|
153
|
+
The post-publication verifier can also check an already public exact package:
|
|
154
|
+
|
|
155
|
+
```sh
|
|
156
|
+
ARCHIVE=/absolute/path/to/verified.tgz VERSION=0.6.0-next.47107907008.g070b025305af DIST_TAG=next node .github/verify-npm-release.mjs
|
|
157
|
+
```
|
|
29
158
|
|
|
30
|
-
Use
|
|
159
|
+
Use the recorded version, dist-tag and archive for the actual run. This command
|
|
160
|
+
checks a publication; it does not publish a package. Registry availability can
|
|
161
|
+
lag acceptance. Resume verification against the same version and bytes rather
|
|
162
|
+
than creating a new release solely because propagation exceeded a timeout.
|
|
31
163
|
|
|
32
164
|
## Failure and retry rules
|
|
33
165
|
|
|
34
|
-
Use these recovery steps when GitHub publication, npm publication, or verification fails.
|
|
35
|
-
|
|
36
166
|
| Failure point | Recovery |
|
|
37
167
|
| --- | --- |
|
|
38
|
-
|
|
|
39
|
-
| GitHub Latest exists, npm missing | Rerun the
|
|
40
|
-
| npm accepted
|
|
41
|
-
| npm version exists
|
|
42
|
-
|
|
|
43
|
-
|
|
|
44
|
-
|
|
|
45
|
-
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
168
|
+
| Candidate checks fail before publication | Fix the change and verify another candidate; do not describe it as released |
|
|
169
|
+
| GitHub Latest exists, npm missing | Rerun the npm job or dispatch `publish_npm=true` from `main`; reuse the public GitHub archive |
|
|
170
|
+
| npm accepted the version but it is not public yet | Resume bounded polling and public verification with the same version and bytes |
|
|
171
|
+
| The npm version already exists | Download it and compare bytes; equal bytes can resume verification, different bytes must stop the workflow |
|
|
172
|
+
| A next publication job needs a retry | Rerun that failed job to reuse the verified artifact and version identity; a rerun that rebuilds different bytes must stop for an existing version |
|
|
173
|
+
| Next is published and `latest` changed unexpectedly | Stop and inspect the registry/publishing race; do not report channel isolation as successful |
|
|
174
|
+
| Verified package has the wrong dist-tag | An authorized maintainer restores the intended tag after checking version and bytes; publishing permission does not imply arbitrary tag-management permission |
|
|
175
|
+
| npm succeeds but documentation deployment fails | Retry the tracked documentation deployment; do not republish npm |
|
|
176
|
+
| Published code is wrong | Publish a corrected new version after verification; preserve old tags and package bytes |
|
|
177
|
+
| A stable release finishes after a newer stable release | Preserve GitHub Latest and npm `latest` on the newest intended supported line |
|
|
178
|
+
|
|
179
|
+
To retry publication or verification for the current GitHub Latest release:
|
|
180
|
+
|
|
181
|
+
```sh
|
|
182
|
+
gh workflow run release.yml --ref main -f publish_npm=true
|
|
52
183
|
```
|
|
53
184
|
|
|
54
|
-
|
|
55
|
-
|
|
185
|
+
Published name/version pairs cannot be overwritten. The
|
|
186
|
+
[npm publish reference](https://docs.npmjs.com/cli/v11/commands/npm-publish/)
|
|
187
|
+
explains immutable versions and dist-tags. Keep the GitHub assets intact for
|
|
188
|
+
recovery; a successful npm step does not justify replacing them.
|
|
56
189
|
|
|
57
|
-
##
|
|
190
|
+
## Stable and development documentation
|
|
58
191
|
|
|
59
|
-
|
|
192
|
+
`website/docs-release.json` is the reviewed link between released software and
|
|
193
|
+
its instructions. It records:
|
|
60
194
|
|
|
61
|
-
|
|
195
|
+
- `schemaVersion`: manifest format.
|
|
196
|
+
- `version`: exact publicly available stable npm version.
|
|
197
|
+
- `packageRevision`: immutable source revision for that package.
|
|
198
|
+
- `docsRevision`: immutable compatible documentation revision.
|
|
199
|
+
- `corrections`: ordered tracked `website/docs-corrections/*.patch` files applied
|
|
200
|
+
to that documentation snapshot; the preparation output records their hashes.
|
|
62
201
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
Maintain an explicit release manifest containing package version, immutable package tag/SHA, documentation source SHA and support status. Build each historical route from its pinned documentation revision. The `v0.5.0` tag predates corrections to the npm instructions. Use a reviewed documentation revision compatible with the released package and record both revisions. Publish any correction to a historical snapshot as a tracked documentation revision.
|
|
70
|
-
|
|
71
|
-
Preserve the chosen version in sidebar links, previous/next links, article links, search results and example downloads. Language switching preserves **version and slug**. Version switching preserves **language and slug** when the page exists and goes to the selected version’s overview otherwise. Search uses the selected version by default. The label names the version of the documents being displayed.
|
|
202
|
+
Package and documentation revisions may differ when instructions were corrected
|
|
203
|
+
after the package release. Both pinned revisions must identify the manifest's
|
|
204
|
+
package name and version. Use a tracked correction when a compatible fix comes
|
|
205
|
+
from a later source line. Each correction remains reviewable and its identity
|
|
206
|
+
is checked by the website preparation process. Updating these inputs does not
|
|
207
|
+
require a package bump.
|
|
72
208
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
209
|
+
| Route under the site base | Content |
|
|
210
|
+
| --- | --- |
|
|
211
|
+
| `/docs/<slug>/`, `/zh/docs/<slug>/` | Stable manifest's compatible guides |
|
|
212
|
+
| `/docs/next/<slug>/`, `/zh/docs/next/<slug>/` | Current main guides, explicitly marked Next |
|
|
213
|
+
|
|
214
|
+
The website build prepares ignored snapshots from the pinned revisions. Every
|
|
215
|
+
build contains both channels. Navigation, language switching, search and example
|
|
216
|
+
source links preserve the selected channel; the Next label does not claim that
|
|
217
|
+
every main change is already on npm `next`.
|
|
218
|
+
|
|
219
|
+
For a stable documentation correction, keep the package version and revision,
|
|
220
|
+
select a reviewed compatible docs revision or add a tracked correction, then
|
|
221
|
+
review the stable and Next outputs. For a new stable release, change the manifest
|
|
222
|
+
only after the exact public npm package passes verification. Pages deployment
|
|
223
|
+
checks the manifest's package rather than using the mere existence of GitHub
|
|
224
|
+
Latest as proof. A main-only CLI/API change therefore updates Next without
|
|
225
|
+
silently changing stable instructions.
|
|
226
|
+
|
|
227
|
+
The current site maintains one supported stable channel and one development
|
|
228
|
+
channel. Historical release source and documents remain in immutable Git refs;
|
|
229
|
+
this workflow does not promise a website route for every old patch release.
|
|
@@ -1,30 +1,55 @@
|
|
|
1
1
|
# Release CLI acceptance
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
observed
|
|
3
|
+
Verify the exact package that users will receive. Record source commit, package
|
|
4
|
+
version/channel, archive SHA-256, Node/npm versions, OS/architecture, backend and
|
|
5
|
+
observed results. The [Release workflow](../../.github/workflows/release.yml)
|
|
6
|
+
provides automated candidate checks; this guide adds reproducible local and
|
|
7
|
+
manual acceptance for affected user paths.
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
A small documentation PR does not need every check here. Run the relevant
|
|
10
|
+
focused checks during development and use required CI for the merge gate.
|
|
11
|
+
A release candidate needs the package and native checks selected by the release
|
|
12
|
+
workflow, plus manual host checks when the change affects those hosts. Keep
|
|
13
|
+
unverified platforms and skipped checks explicit.
|
|
14
|
+
|
|
15
|
+
## 1. Build and freeze a candidate
|
|
16
|
+
|
|
17
|
+
Use a clean checkout and Node.js 24, matching CI. Pack once, then keep that archive
|
|
18
|
+
for installation and acceptance. The commands below use Linux checksum tools.
|
|
8
19
|
|
|
9
20
|
```sh
|
|
10
|
-
npm ci
|
|
11
|
-
npm run build
|
|
21
|
+
npm ci --ignore-scripts
|
|
12
22
|
npm run typecheck
|
|
13
23
|
npm run docs:check
|
|
14
|
-
|
|
15
|
-
npm run pack:release --
|
|
16
|
-
sha256sum
|
|
24
|
+
candidate_dir=$(mktemp -d)
|
|
25
|
+
candidate_archive=$(npm run --silent pack:release -- "$candidate_dir")
|
|
26
|
+
candidate_sha=$(sha256sum "$candidate_archive" | cut -d ' ' -f 1)
|
|
17
27
|
```
|
|
18
28
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
29
|
+
Inspect the archive manifest, production lockfile, included examples and CLI
|
|
30
|
+
entry points relevant to the change. Use the
|
|
31
|
+
[full cold-cache sequence](development.md#repository-ci-checks)
|
|
32
|
+
when reproducing CI package tests. The frozen install/eject checks can then run
|
|
33
|
+
against this exact archive:
|
|
22
34
|
|
|
23
|
-
|
|
35
|
+
```sh
|
|
36
|
+
ANYSWARM_TEST_PACKAGE_ARCHIVE="$candidate_archive" \
|
|
37
|
+
ANYSWARM_TEST_PACKAGE_SHA256="$candidate_sha" \
|
|
38
|
+
npm run test:focus -- test/anyswarm-candidate-install.test.ts
|
|
39
|
+
```
|
|
24
40
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
41
|
+
The checks must execute rather than skip. They install the CLI outside the
|
|
42
|
+
checkout, run an exported TypeScript Harness, modify its source, and check that
|
|
43
|
+
its local SDK stays bound to the archive. Record the source commit as well as
|
|
44
|
+
the displayed version: an ordinary candidate can share a stable version number.
|
|
45
|
+
CI artifacts include the same identity information and their run result.
|
|
46
|
+
|
|
47
|
+
## 2. Native setup and one-shot Run
|
|
48
|
+
|
|
49
|
+
Use a clean Linux VM outside the repository with Docker and a supported Pi or
|
|
50
|
+
Codex installation. macOS support requires its own real-host acceptance; a Linux
|
|
51
|
+
CI pass does not establish it. Follow [Quickstart](../en/quickstart.md) for host
|
|
52
|
+
configuration. Use a fresh user-owned prefix and AnySwarm configuration directory.
|
|
28
53
|
|
|
29
54
|
```sh
|
|
30
55
|
export PATH="$HOME/anyswarm-test/bin:$PATH"
|
|
@@ -34,7 +59,18 @@ anyswarm --version
|
|
|
34
59
|
anyswarm
|
|
35
60
|
anyswarm setup
|
|
36
61
|
anyswarm doctor --smoke
|
|
62
|
+
```
|
|
37
63
|
|
|
64
|
+
For the current CLI candidate, bare invocation must print the Quickstart and
|
|
65
|
+
exit 0 without creating project state. Setup and the controlled smoke must
|
|
66
|
+
verify Sandbox lifecycle, Worker, Bridge, file export and deletion. The automated
|
|
67
|
+
Release workflow also runs the installed Quickstart and first SDK Harness with
|
|
68
|
+
a local controlled model; it does not need a paid model account.
|
|
69
|
+
|
|
70
|
+
For a manual model-backed Run, use an already authorized provider configuration
|
|
71
|
+
and budget, then create a fresh project:
|
|
72
|
+
|
|
73
|
+
```sh
|
|
38
74
|
mkdir "$HOME/sample-project"
|
|
39
75
|
cd "$HOME/sample-project"
|
|
40
76
|
printf '# AnySwarm release smoke\n' > README.md
|
|
@@ -42,19 +78,16 @@ anyswarm --harness subagents --prompt 'Read README.md and report its heading.' -
|
|
|
42
78
|
anyswarm trace --root ./runs --port 8787 --open
|
|
43
79
|
```
|
|
44
80
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
command. Open the Viewer and inspect the actual Run, Agent and exported artifacts.
|
|
51
|
-
Verify that the Run's Sandbox is gone after completion. Replay separately if the
|
|
52
|
-
VM has no browser, using a loopback SSH port forward to the Viewer.
|
|
81
|
+
The saved result must contain the expected heading and a successful cleanup
|
|
82
|
+
receipt. Check terminal milestones, the final heading exactly once, artifact/report paths and the Trace command.
|
|
83
|
+
Inspect the same Run, Agent and exported artifacts in the Viewer, and verify
|
|
84
|
+
that its Sandbox is gone. Use a loopback SSH port forward when the VM has no
|
|
85
|
+
browser. Keep raw prompts and Run output private.
|
|
53
86
|
|
|
54
|
-
## Eject, edit and rerun
|
|
87
|
+
## 3. Eject, edit and rerun
|
|
55
88
|
|
|
56
|
-
|
|
57
|
-
|
|
89
|
+
Export into an empty directory outside the input project, install its local SDK,
|
|
90
|
+
and run the emitted TypeScript source.
|
|
58
91
|
|
|
59
92
|
```sh
|
|
60
93
|
anyswarm eject example --dir "$HOME/editable-harness"
|
|
@@ -63,23 +96,67 @@ npm install
|
|
|
63
96
|
npm exec -- anyswarm run ./harness.ts --prompt 'Verify the exported Harness' --output-dir ./runs
|
|
64
97
|
```
|
|
65
98
|
|
|
66
|
-
Verify the SDK archive
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
and
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
99
|
+
Verify the SDK archive digest against `anyswarm-source.json`. Check the report
|
|
100
|
+
for completed work and cleanup. Change the greeting in `business.ts` and rerun;
|
|
101
|
+
the report must contain the edited greeting. Upgrade the global CLI separately
|
|
102
|
+
and verify that this exported project's local start command still uses its
|
|
103
|
+
original archive dependency.
|
|
104
|
+
|
|
105
|
+
The authoring example completes without creating a Runtime. Open its actual
|
|
106
|
+
report directory with the project's installed `anyswarm trace` and verify its
|
|
107
|
+
greeting, outcome and cleanup in Files & results. The Viewer must not invent a
|
|
108
|
+
Runtime timeline or Agent metrics for this report. Start the Viewer against a
|
|
109
|
+
fresh default state root before a Run exists; after a Run is saved, its row must
|
|
110
|
+
appear automatically while the page is visible. Check a report deep link again
|
|
111
|
+
after a matching Runtime arrives, and retain the original URL until the user
|
|
112
|
+
chooses the Runtime link.
|
|
113
|
+
|
|
114
|
+
The installed first-Harness gate in `test/first-harness-installed.test.ts` also
|
|
115
|
+
copies the candidate's four original TypeScript files into a directory without
|
|
116
|
+
compiled neighbours. Its `source-rpc` route must reach the real Pi Worker,
|
|
117
|
+
answer the channel question and verify the exported bytes through CLI RPC. The
|
|
118
|
+
release workflow enables this route using
|
|
119
|
+
`ANYSWARM_FIRST_HARNESS_CANDIDATE_DIRECTORY`; an ordinary Core test run without
|
|
120
|
+
that installed environment skips it and does not establish real-Worker acceptance.
|
|
121
|
+
|
|
122
|
+
## 4. Upgrade an existing installation
|
|
123
|
+
|
|
124
|
+
Use a separate disposable npm prefix and configuration directory. Install the
|
|
125
|
+
previous stable version and run setup with it. Record the version and preserve
|
|
126
|
+
a byte-for-byte copy of its `opensandbox.json` connection settings.
|
|
127
|
+
|
|
128
|
+
Install the candidate archive with npm into that same prefix. Verify the new
|
|
129
|
+
version and compare the connection settings before running setup again. With
|
|
130
|
+
the candidate CLI, run `anyswarm update`: it should print the npm update command
|
|
131
|
+
for the installation scope without silently changing the installed package or
|
|
132
|
+
configuration. Do not assume an older release implements this newer behavior.
|
|
133
|
+
|
|
134
|
+
Run `anyswarm doctor --smoke` against the existing connection and verify Worker
|
|
135
|
+
export and deletion. If the package requires a Worker rebuild, record the first
|
|
136
|
+
result and follow the reported remedy. For a public stable upgrade, use the
|
|
137
|
+
printed npm command targeting `@anyswarm/core@latest`; for an opted-in preview,
|
|
138
|
+
select `@anyswarm/core@next` explicitly. Preserve the chosen prefix.
|
|
139
|
+
|
|
140
|
+
Stop the Viewer and remove disposable resources after recording acceptance.
|
|
141
|
+
A failed install or upgrade must leave enough evidence to distinguish package,
|
|
142
|
+
configuration, Worker and network failures.
|
|
143
|
+
|
|
144
|
+
## 5. Check the actual public npm distribution
|
|
145
|
+
|
|
146
|
+
The workflow's post-publication verification downloads the exact registry tarball,
|
|
147
|
+
compares it with the accepted archive, and installs the exact version by name
|
|
148
|
+
in a clean consumer and isolated global prefix. It checks the SDK root import
|
|
149
|
+
and CLI version. Metadata availability is not an installed-user result.
|
|
150
|
+
|
|
151
|
+
For an already published candidate, repeat only verification with the actual
|
|
152
|
+
recorded values:
|
|
153
|
+
|
|
154
|
+
```sh
|
|
155
|
+
ARCHIVE=/absolute/path/to/verified.tgz VERSION=0.6.0-next.47107907008.g070b025305af DIST_TAG=next node .github/verify-npm-release.mjs
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Next publication must leave `latest` unchanged. Stable publication must match
|
|
159
|
+
the intended supported release. Resume a delayed public-registry check with the
|
|
160
|
+
same version and archive; do not overwrite published bytes or increment the
|
|
161
|
+
version solely for propagation delay. See
|
|
162
|
+
[release recovery](release-and-docs-versioning.md#failure-and-retry-rules).
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: AutoResearch
|
|
3
|
+
description: 独立 Peer 协作研究、共享补丁互评,并使用可配置的模型与预算完成 FrontierCS-2 官方评测。
|
|
4
|
+
section: APPLICATIONS
|
|
5
|
+
order: 9
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
AutoResearch 是基于同一套 SDK 构建的有限研究应用。平级 Peer 在独立 Sandbox 中选择方向、提出 Patch,并查看和 Review 其他成员的候选。宿主负责共享 research Service、预算和 Evaluator。见[应用 README](../../examples/autoresearch/README.md)与[实现手册](../architecture/28-autoresearch.md)。
|
|
9
|
+
|
|
10
|
+
## 应用交付什么
|
|
11
|
+
|
|
12
|
+
输入包括目标工程、研究目标、评分方向、预算与可信评测代码。Peer 获得工作副本,通过研究 Service 共享候选发现。宿主在评测前冻结候选,评测结果绑定到具体候选身份,而不是接受 Agent 自报的分数。
|
|
13
|
+
|
|
14
|
+
结果保留候选作者与哈希、Review、已受理的训练评测、候选选择、最终评测与清理状态。用 `anyswarm trace --root ./runs` 关联检查这些记录。有效但低分的候选、无效候选和没有候选的 Run 是不同结果;Review 意见也不等于 Evaluator 结果。
|
|
15
|
+
|
|
16
|
+
## 运行 FrontierCS-2 官方任务
|
|
17
|
+
|
|
18
|
+
随附案例使用固定版本的 `binary_fuse_filter`。需要包含 [#359](https://github.com/AnySwarm/anyswarm/pull/359) 的 AnySwarm 构建、Linux x86-64 宿主、Git LFS、Python 3、启用 containerd 镜像存储的 Docker Engine 和 Buildx,以及启用 `dns+nft` 出站约束且完成鉴权的 OpenSandbox。先为选定的执行器准备 Worker,再配置支持的模型。[安装与后端要求](../../examples/autoresearch/README.md#1-install-and-choose-your-backend)
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
anyswarm eject autoresearch --dir ./research-demo
|
|
22
|
+
cd ./research-demo
|
|
23
|
+
npm install
|
|
24
|
+
# 配置自己的模型凭证,按需编辑 frontiercs2-config.ts。
|
|
25
|
+
npm exec -- anyswarm run ./prepare-demo.ts --config ./frontiercs2-config.ts --check
|
|
26
|
+
npm exec -- anyswarm run ./prepare-demo.ts --config ./frontiercs2-config.ts
|
|
27
|
+
npm run start -- --config ./frontiercs2-config.ts \
|
|
28
|
+
--prompt 'Run the FrontierCS-2 task.' --output-dir ./runs
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
模板提供两名 Peer、12 分钟共享工作窗口、4 次 train 受理和全队最多 128 次新模型请求。`--check` 检查依赖、路由和资源容量,模型推理由实际运行触发。准备阶段构建官方评测镜像并运行独立的无模型 reference。[资源与参考评测要求](../../examples/autoresearch/README.md#3-check-and-prepare)
|
|
32
|
+
|
|
33
|
+
其他项目可提供 `ResearchConfiguration` 和可信的 `train`、`final` 回调。候选代码在 Evaluator 自有的隔离环境中运行,基线材料和评分规则由宿主独立确定。[自定义工程与评测器](../../examples/autoresearch/README.md#use-your-own-project-and-evaluator)
|
|
34
|
+
|
|
35
|
+
## 已记录的验收证据
|
|
36
|
+
|
|
37
|
+
- 本机四 Peer 使用 GPT-6.1 Sol,独立 final **53.071242 / strict PASS**。记录绑定了候选字节、官方 train 和 final 载荷,并确认资源清理。[四 Peer 证据](https://github.com/AnySwarm/anyswarm/pull/359#issuecomment-7383137655)
|
|
38
|
+
- 本机两 Peer 使用 GPT-6.1 Sol,得到合法的独立 final,分数 **51.564952**,官方参考比较为 **strict FAIL**。记录包含跨 Peer 互评、派生候选,以及 Runtime 和 Evaluator 各自的清理。[两 Peer 证据](https://github.com/AnySwarm/anyswarm/pull/359#issuecomment-7384158140)
|
|
39
|
+
- 全新 Debian VM 完成安装和官方镜像构建,并进入官方 reference 评测。QEMU-TCG 环境中的 train 和 final 均触及限时。[VM 证据](https://github.com/AnySwarm/anyswarm/pull/359#issuecomment-7384227687)
|
|
40
|
+
|
|
41
|
+
官网的 `release-notes` 测试素材用于展示 Trace 操作。研究成绩来自上面单独链接的真实运行。如需先用较少依赖了解 SDK,可阅读[第一个 Harness](first-harness.md)或[并行 Swarm](build-your-harness.md)。
|