cannwork-rehearsal 0.5.0 → 0.5.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.
Files changed (2) hide show
  1. package/README.md +21 -3
  2. package/package.json +6 -6
package/README.md CHANGED
@@ -35,11 +35,15 @@ Notes:
35
35
 
36
36
  - The installed command is `cannbot` (the launcher is `bin/cannbot.js`). The former `cannwork` command is no longer installed; uninstall any previous global install and remove the old `cannwork` shim if your shell still resolves it.
37
37
  - Do not install with `--omit=optional`: the matching platform package is an optional dependency.
38
+ - Each platform package bundles the matching **cannbot 1.1.2** executable next to the `cannwork` binary (`cannbot.exe` on Windows, `cannbot` elsewhere). The launcher never falls back to a `cannbot` found on your `PATH`; if the bundled file is missing, launching `cannbot` fails with an inline error instead of starting a session. Expect the download/install size to grow by roughly 170 MB per platform.
38
39
  - Linux binaries link glibc; Alpine/musl is not covered yet — `OPENTUI_LIBC`/musl builds are not published.
39
- - The macOS binaries are not codesigned/notarized. If Gatekeeper blocks the binary, clear the quarantine flag:
40
+ - The macOS binaries (both `cannwork` and the bundled `cannbot`) are not codesigned/notarized. If Gatekeeper blocks them, clear the quarantine flag:
40
41
  ```bash
41
- xattr -d com.apple.quarantine "$(npm root -g)/cannwork-rehearsal-darwin-arm64/bin/cannwork"
42
+ for bin in cannwork cannbot; do
43
+ xattr -d com.apple.quarantine "$(npm root -g)/cannwork-rehearsal-darwin-arm64/bin/$bin" 2>/dev/null || true
44
+ done
42
45
  ```
46
+ If macOS still rejects the binary, ad-hoc re-sign it: `codesign --force --sign - "<path-to-binary>"`.
43
47
  - `cannwork-rehearsal` is the **trial-period release name**: it is published and installable on purpose so real users can try it while the official `@zhoufangchaojs/cannwork` name is not released yet. It will be retired (unpublished/deprecated) once the official name is published.
44
48
 
45
49
  ### Automatic update check
@@ -66,6 +70,17 @@ Start the app in watch mode:
66
70
  bun dev
67
71
  ```
68
72
 
73
+ `bun dev` has no bundled cannbot binary: `process.execPath` is Bun itself, so the launcher cannot find a sibling `cannbot`. To exercise the cannbot agent from source, build cannbot first and point the override at it:
74
+
75
+ ```bash
76
+ # in ../cannbot-cli (branch release-1.1.2)
77
+ cd packages/opencode && bun run build
78
+ # back in cannwork
79
+ CANNWORK_CANNBOT_BIN="../cannbot-cli/packages/opencode/dist/cannbot-<os>-<arch>/bin/cannbot" bun dev
80
+ ```
81
+
82
+ Without the override, launching `cannbot` shows an inline error and does not create a session; it never falls back to `cannbot` on `PATH`.
83
+
69
84
  ## Credentials and login
70
85
 
71
86
  - The access token stays in process memory only and is never written to `~/.cannwork-tui/cannwork.json`.
@@ -90,13 +105,15 @@ Build artifacts are written to `dist/`.
90
105
 
91
106
  `build:publish` prepares any missing target-platform native packages (`@opentui/core-*`) automatically by fetching them from npm into `node_modules`, so the build machine needs network access on first run. Pass `--manifests-only` to assemble manifests without compiling.
92
107
 
108
+ It also bundles **cannbot 1.1.2** from a local `cannbot-cli` checkout. The checkout must be on `release-1.1.2` and contain `packages/opencode/package.json` at version `1.1.2`, with all five target artifacts already built under `packages/opencode/dist/`. cannwork does not compile cannbot: build those artifacts in `cannbot-cli` first. By default it looks for `<repo>/../cannbot-cli` and then `<repo>/../../cannbot-cli` (no global search); use `--cannbot-dir <dir>` (or `CANNWORK_CANNBOT_DIR`) to name a checkout explicitly. Explicit/env sources that are invalid abort immediately instead of falling back. A dirty checkout is not checked. Missing or empty target artifacts abort packaging before any upload.
109
+
93
110
  ## Maintainer release runbook
94
111
 
95
112
  Releases are published **manually by the maintainer** to <https://registry.npmjs.org/> in two phases: an unscoped **trial release** that is kept live for real users, then (later) the official scoped release, after which the trial name is retired. AI assistants and other automation must not run a real release — they may only read release files, run checks/tests/builds, and use `--dry-run`.
96
113
 
97
114
  ### Phase 1 — unscoped trial release (kept live)
98
115
 
99
- 1. Set `name` to `cannwork-rehearsal` and `version` to the intended version in the root `package.json` (single source of truth). The script never bumps the version or creates git tags for you.
116
+ 1. Set `name` to `cannwork-rehearsal` and `version` to the intended version in the root `package.json` (single source of truth). The script never bumps the version or creates git tags for you. Also make sure a local `cannbot-cli` checkout on `release-1.1.2` (version `1.1.2`) has the five prebuilt artifacts under `packages/opencode/dist/` and is reachable as `../cannbot-cli` / `../../cannbot-cli`, or pass `--cannbot-dir <dir>`.
100
117
  2. `npm login` (any account with publish rights).
101
118
  3. Optional preview: `bun run release --dry-run`. It prints the release plan (package names, version, package count, sub-packages-before-main order), runs typecheck + tests, cross-compiles, and verifies the packed artifacts **without uploading or asking for confirmation**.
102
119
  4. Real release: run `bun run release` in an **interactive terminal**. After checks, build, and artifact verification it prints the same plan and asks `确认发布 <name>@<version>…`; only `y` / `yes` continues. Any other input (including an empty line) cancels with exit code 0 and uploads nothing.
@@ -119,6 +136,7 @@ Releases are published **manually by the maintainer** to <https://registry.npmjs
119
136
  - `--yes` — skip the interactive confirmation. Only for rehearsals or explicitly authorized automation; a real release without a TTY is rejected unless this flag is present.
120
137
  - `--no-build` / `--skip-checks` — reuse existing artifacts / skip typecheck and tests (use with care).
121
138
  - `--root <dir>` — run against another checkout.
139
+ - `--cannbot-dir <dir>` — use a specific local `cannbot-cli` checkout (`release-1.1.2`) with the five prebuilt artifacts under `packages/opencode/dist/`, instead of the fixed probe order.
122
140
 
123
141
  Rollback: `npm unpublish` the affected version within the allowed window; afterwards `npm deprecate` and publish a fixed version.
124
142
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cannwork-rehearsal",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "cannbot": "bin/cannbot.js"
@@ -10,11 +10,11 @@
10
10
  "README.md"
11
11
  ],
12
12
  "optionalDependencies": {
13
- "cannwork-rehearsal-win32-x64": "0.5.0",
14
- "cannwork-rehearsal-linux-x64": "0.5.0",
15
- "cannwork-rehearsal-linux-arm64": "0.5.0",
16
- "cannwork-rehearsal-darwin-x64": "0.5.0",
17
- "cannwork-rehearsal-darwin-arm64": "0.5.0"
13
+ "cannwork-rehearsal-win32-x64": "0.5.1",
14
+ "cannwork-rehearsal-linux-x64": "0.5.1",
15
+ "cannwork-rehearsal-linux-arm64": "0.5.1",
16
+ "cannwork-rehearsal-darwin-x64": "0.5.1",
17
+ "cannwork-rehearsal-darwin-arm64": "0.5.1"
18
18
  },
19
19
  "publishConfig": {
20
20
  "registry": "https://registry.npmjs.org/",