@mote-farm/sandbox 0.3.0 → 0.4.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Runtime releases
2
2
 
3
+ ## 0.4.0-rc.1
4
+
5
+ - Sprite agents can call `get_farm_weather` for farms their owner can read. Each successful
6
+ lookup adds a weather card to the run's conversation. The gateway holds the QWeather key.
7
+
3
8
  ## 0.3.0
4
9
 
5
10
  - Promote `0.3.0-rc.1` to stable. Each run keeps its folder and Pi session across follow-ups,
package/README.md CHANGED
@@ -1,8 +1,9 @@
1
1
  # Mote Farm sandbox runtime
2
2
 
3
3
  One npm release contains the run service, Pi extension, setup scripts, and exact
4
- Pi coding-agent and agent-browser dependencies. Core contracts are bundled at build
5
- time. The service launches its own Pi dependency and uses tools exposed by setup
4
+ Pi coding-agent and agent-browser dependencies. npm resolves their transitive
5
+ dependencies at installation. Core contracts are bundled at build time.
6
+ The service launches its own Pi dependency and uses tools exposed by setup
6
7
  under `~/.mote-farm/bin`; unrelated global installations do not select the toolchain.
7
8
 
8
9
  The Worker installs this package and explicitly runs `mote-farm-sandbox-setup` before
@@ -13,40 +14,80 @@ npm 12 are prerequisites supplied by the Sprite image.
13
14
 
14
15
  ## Release
15
16
 
16
- From the repository root:
17
+ Maintainers usually publish `@mote-farm/sandbox` from a local checkout. GitHub Actions
18
+ can publish the same release entirely from a browser. Choose one route per version.
19
+
20
+ | Version in `sandbox/package.json` | npm tag | Used by |
21
+ | --- | --- | --- |
22
+ | `X.Y.Z-rc.N` | `next` | Staging |
23
+ | `X.Y.Z` | `latest` | Production |
24
+
25
+ Each provisioning or upgrade resolves its tag once and installs that exact version.
26
+
27
+ ### Prepare the release
28
+
29
+ Choose an unpublished version. Set `version` in `sandbox/package.json`, update
30
+ `sandbox/CHANGELOG.md`, and commit the release. In a checkout, `pnpm runtime:version`
31
+ sets the version from the repository root, for example `pnpm runtime:version 0.4.0-rc.1`.
32
+ If dependencies changed, run `pnpm install` and include the lockfile changes.
33
+
34
+ Publish a release candidate first. On staging, verify fresh provisioning and an in-place
35
+ upgrade on test Sprites. Check the installed version, retained files, Pi sessions and keys,
36
+ and that interrupted work stays interrupted. After acceptance, set the stable version
37
+ on the tested source, update the changelog and commit it. Deploy any required Worker API
38
+ changes before publishing the stable version.
39
+
40
+ ### Publish from a local machine
41
+
42
+ Check out the release commit with a clean working tree. Use `npm whoami` to check
43
+ that you're signed in as a maintainer of `@mote-farm/sandbox`. Use `npm login` to
44
+ sign in or switch accounts. From the repository root, run the tests and publish.
17
45
 
18
46
  ```sh
19
- pnpm runtime:version 0.2.0-rc.1
20
- pnpm install
21
- pnpm test
47
+ pnpm install --frozen-lockfile && pnpm test && pnpm runtime:publish
22
48
  ```
23
49
 
24
- Update this changelog and commit the tested source. Run **Publish sandbox runtime**
25
- in GitHub Actions with that exact committed version. Configure the npm package's
26
- trusted publisher for this repository, workflow `publish-sandbox.yml`, environment
27
- `npm`. The npm environment's protection rules control publication. The first npm
28
- publication may require an authorized maintainer bootstrap before trusted publishing
29
- can be configured. `pnpm runtime:publish` is the equivalent explicit local command
30
- using the maintainer's npm authentication.
31
-
32
- Prereleases must use `X.Y.Z-rc.N` and publish to `next`. Staging resolves `next` once
33
- per provisioning/upgrade and rejects stable versions. Test both fresh provisioning
34
- and an in-place upgrade, including files/sessions/keys retained, version verification,
35
- and interrupted runs remaining interrupted. Iterate with a new rc number.
36
-
37
- After staging acceptance, set `X.Y.Z` on the tested source, update the lockfile,
38
- validate the final package and publish. Stable versions go to `latest`; production
39
- rejects prereleases. Publishing never starts fleet upgrades. Deploy any required API
40
- changes before making the runtime stable. npm dependencies have exact direct pins;
41
- this does not lock their complete transitive trees.
42
-
43
- On first publication npm may also assign `latest` to the initial prerelease and
44
- refuse removing that tag (registry HTTP 400). Never treat the tag alone as proof
45
- of stability: the production resolver rejects every prerelease. Until the first
46
- stable publication replaces `latest`, production provisioning reports the release
47
- as unavailable. Staging explicitly uses `next`. Registry processing can take a
48
- few minutes after `npm publish` succeeds; verify the exact version is readable
49
- before starting a provisioning or upgrade acceptance test.
50
+ Complete npm's two-factor prompt when requested. The release script reads the version
51
+ from the manifest and selects the npm tag.
52
+
53
+ ### Publish from GitHub Actions
54
+
55
+ 1. Make sure the release commit is on `main`. To prepare a version-only release in a
56
+ browser, press `.` on the repository page, edit `sandbox/package.json` and
57
+ `sandbox/CHANGELOG.md` on a branch, and merge the pull request after CI passes.
58
+ 2. With repository write access, open **Actions → Publish sandbox runtime** and click
59
+ **Run workflow**. Select the `main` branch and enter the exact committed version,
60
+ such as `0.4.0-rc.1`, in the version field. Click **Run workflow** to submit.
61
+ [Open the publishing workflow](https://github.com/octona-ai/mote-farm/actions/workflows/publish-sandbox.yml)
62
+ 3. Open the run and wait for **Publish stable or prerelease** to succeed. The runner
63
+ checks the version, installs from the lockfile, runs `pnpm test`, and invokes the
64
+ same release script as the local route.
65
+
66
+ Both release channels use the GitHub environment `npm-publish`, restricted to the
67
+ `main` branch. Its OpenID Connect identity authenticates to npm. In the package's
68
+ **Settings → Trusted Publisher**, use organization `octona-ai`, repository
69
+ `mote-farm`, workflow filename `publish-sandbox.yml`, environment `npm-publish`,
70
+ and **Allow npm publish**. The names are case-sensitive.
71
+ [Package settings](https://www.npmjs.com/package/@mote-farm/sandbox/access) · [npm trusted publishing](https://docs.npmjs.com/trusted-publishers/)
72
+
73
+ To test that setup, select `main` and leave the version field empty when you click
74
+ **Run workflow**. A green **Check npm trust** job confirms npm issued a credential
75
+ for this package. The job discards the credential. Entering an unpublished version
76
+ exercises the direct-publish permission on a real release. For a newly added
77
+ publisher, check its validation status and deadline in the npm package settings.
78
+
79
+ ### Verify publication
80
+
81
+ Open the registry entry for the target environment and confirm its `version` matches
82
+ the release. The entry also exposes the tarball's SHA-512 in `dist.integrity`. From
83
+ a terminal, `npm view @mote-farm/sandbox dist-tags --json` shows both active versions.
84
+ [Staging (next)](https://registry.npmjs.org/@mote-farm/sandbox/next) · [Production (latest)](https://registry.npmjs.org/@mote-farm/sandbox/latest)
85
+
86
+ Registry processing can take a few minutes. If a publish is interrupted, check npm for
87
+ the exact version before switching routes. npm accepts each package version only once.
88
+ Existing sandbox owners choose **Settings → Sandbox → Upgrade & restart** to install it.
89
+
90
+ ## Development
50
91
 
51
92
  Development uses a local npm tarball generated by the same build/pack path; it does
52
93
  not publish or depend on the registry having this Farm version. Open **My sandbox**