@harnesspm/cli 0.0.0-snapshot.412a718 → 0.0.0-snapshot.cf808a1

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.
@@ -95,7 +95,7 @@ Both files have one field:
95
95
  - **Local work stays.** A working copy with uncommitted changes or unpushed commits is not fetched ([8.7](08-improving.md#87-shared-working-copies)), so an improvement in progress is never overwritten.
96
96
  - **New commits apply, executables included.** Claude Code runs the hook with `AI_AGENT=…_harness`, so this run may write hooks and permissions ([06-trust.md](06-trust.md#62-trusting-a-package), rule 4). Adding a harness trusts its future commits, as `"trust": true` trusts a team's own package after upgrades. A push to the harness's remote reaches the machine at the next session start. For a harness whose pushes you do not control, add an npm source with a fixed version, such as `npm:@acme/harness@1.2.0`, or pass `--no-hook` and run `update` yourself ([13.13](13-open-questions.md#1313-the-reviewed-state-in-hook-runs)).
97
97
  - **Several repositories.** A session that starts above several repositories, such as a cloud session with more than one, runs the hook in that folder. It applies each repository's entry there, as a sync in it would ([4.10](04-outputs.md#410-sessions-that-start-in-a-parent-folder)). Such a session reads the entries' rules and skills, not their hooks and permissions.
98
- - **Older hooks.** harnesspm 0.14 and earlier installed a hook that ran `sync`, and 0.16 and earlier named the package `@tenphi/harnesspm` ([10.1](10-cli.md#moving-from-tenphiharnesspm)). The next `sync` or `update` by a person or a hook turns it into today's hook, in place. A run of the agent's model leaves it, because the new command also fetches.
98
+ - **Older hooks.** harnesspm 0.14 and earlier installed a hook that ran `sync`, and 0.16 and earlier named the package `@tenphi/harnesspm` ([10.1](10-cli.md#moving-from-tenphiharnesspm)). The next `sync` or `update` by a person or a hook turns it into today's hook, in place. A hook under the earlier name runs the earlier package, which cannot do this, so a person runs `npx -y @harnesspm/cli update` once on each machine. A run of the agent's model leaves it, because the new command also fetches.
99
99
  - Claude Code uses what the hook writes in the same session: a `CLAUDE.local.md` and a `.claude/settings.local.json` written by a `SessionStart` hook were both read in cloud sessions.
100
100
  - Codex asks the person to review a new hook once, in `/hooks`.
101
101
  - `--no-hook` skips the hook. Project entries then apply only where `harnesspm sync` runs, and new commits only when you run `update`.
@@ -113,19 +113,25 @@ npm i -D @harnesspm/cli && npm rm @tenphi/harnesspm
113
113
  npx -y @harnesspm/cli init
114
114
  ```
115
115
 
116
+ A machine with an added harness ([07-added.md](07-added.md)) runs one command once, because its user-level hook still runs the earlier package:
117
+
118
+ ```shell
119
+ npx -y @harnesspm/cli update
120
+ ```
121
+
116
122
  `init` updates the install hook; the next `sync` rewrites the rest. Until then, and until harnesspm 1.0, harnesspm treats the earlier name as its own:
117
123
 
118
124
  | Where the earlier name is | What harnesspm does |
119
125
  |---|---|
120
126
  | The installed CLI file, `node_modules/@tenphi/harnesspm/dist/cli.js` | Hooks and MCP servers start it when `@harnesspm/cli` is not installed ([5.2](05-executables.md#52-hooks)). |
121
127
  | Hook commands and allow rules with `npx -y @tenphi/harnesspm` or that file | They grant the same as the current form. So `sync` replaces them even in a run of the agent's model, and nothing is held back ([6.2](06-trust.md#62-trusting-a-package), rule 4). |
122
- | The user-level `SessionStart` hook, `npx -y @tenphi/harnesspm update` or `sync` | A sync by a person, a setup script or a hook replaces it with `npx -y @harnesspm/cli update` ([7.5](07-added.md#75-applying-in-every-repository)). |
128
+ | The user-level `SessionStart` hook, `npx -y @tenphi/harnesspm update` or `sync` | It runs the earlier package, whose versions cannot rewrite it. A person runs `npx -y @harnesspm/cli update` once on each machine with an added harness; that run replaces it with `npx -y @harnesspm/cli update` ([7.5](07-added.md#75-applying-in-every-repository)). A later sync of the new version by a person, a setup script or a hook does the same. |
123
129
  | The project's `package.json` | `init` and the `harnesspm` command accept either name. `doctor` warns that the package moved and names the two commands above. |
124
130
  | The install hook | See [the install hook](#the-install-hook), point 6. |
125
131
  | Both packages installed | They ship the same harness, so `@harnesspm/cli` gives it and the other is left out, with no plugin name clash. |
126
132
  | `$schema` in `harnesspm.json` | The earlier URL keeps working, because the registry keeps the earlier package. `doctor` names the current one. |
127
133
 
128
- `@tenphi/harnesspm` is deprecated on npm, with a message that names the new package. Its versions stay installable. harnesspm 1.0 drops the earlier name: the list `OLD_PACKAGE_NAMES` in `src/util.ts` holds it.
134
+ `@tenphi/harnesspm` is deprecated on npm, with a message that names the new package and both commands above. No release of the new code goes out under the earlier name. Its versions stay installable. harnesspm 1.0 drops the earlier name: the list `OLD_PACKAGE_NAMES` in `src/util.ts` holds it.
129
135
 
130
136
  ## 10.2 Authors
131
137
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnesspm/cli",
3
- "version": "0.0.0-snapshot.412a718",
3
+ "version": "0.0.0-snapshot.cf808a1",
4
4
  "description": "The harness package manager: share agent rules, docs, skills and tools through npm packages",
5
5
  "license": "MIT",
6
6
  "type": "module",