llm-wiki-kit 0.1.8 → 0.1.9

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/README.md CHANGED
@@ -94,7 +94,7 @@ Most users should not need these during daily Claude Code/Codex work. They exist
94
94
 
95
95
  `llm-wiki update --check [--to <version-or-tag>]` is the online update check. It compares the installed package version with the npm registry target without changing files, and reports an available update only when the target version is newer than the installed version.
96
96
 
97
- `llm-wiki update` upgrades the global npm package, reinstalls the hook entries, and reapplies safe managed template updates across known project roots. Use `--current-only` when you intentionally want to update only the supplied workspace. Existing wiki content is not overwritten.
97
+ `llm-wiki update` upgrades the global npm package when npm has a newer target, reinstalls the hook entries, and reapplies safe managed template updates across known project roots. If the installed runtime already satisfies the registry target, it skips `npm install -g` and still runs post-update maintenance. Use `--current-only` when you intentionally want to update only the supplied workspace. Existing wiki content is not overwritten.
98
98
 
99
99
  `llm-wiki post-update --workspace <project>` reapplies the current runtime's hook entries and safe managed template updates without running `npm install -g`. Use `post-update --all --workspace <search-root>` to reapply templates across discovered project roots.
100
100
 
@@ -103,7 +103,8 @@ llm-wiki consolidate --workspace /path/to/project
103
103
 
104
104
  `update` applies changes explicitly only when the user runs it:
105
105
 
106
- - runs `npm install -g llm-wiki-kit@<target>`
106
+ - runs `npm install -g llm-wiki-kit@<target>` only when the registry target is newer than the installed runtime
107
+ - skips npm installation when the installed runtime already satisfies the target, then still runs post-update maintenance
107
108
  - restarts into the updated binary for `post-update`
108
109
  - reinstalls hook entries without duplicating them
109
110
  - patches only managed project files across known or discovered project roots
@@ -102,6 +102,8 @@ hash -r
102
102
  llm-wiki status --workspace /path/to/project
103
103
  ```
104
104
 
105
+ After a manual `sudo npm install -g llm-wiki-kit@latest`, a normal-user `llm-wiki update --workspace <search-root>` can be used to reapply hooks and managed templates. When the installed runtime already matches the registry target, `update` skips the npm install step and runs only post-update maintenance.
106
+
105
107
  If `readlink -f "$(command -v llm-wiki)"` points at a repository checkout such as `/mnt/d/dev_proj/llm-wiki-kit/bin/llm-wiki.js`, `npm install -g` is not updating that checkout. Either switch the shim to the npm package as above, or update the checkout itself with `git pull` and run it intentionally as source.
106
108
 
107
109
  Running `llm-wiki post-update --workspace /path/to/project` or `llm-wiki install --workspace /path/to/project --profile standard` also reconnects hook entries to the current runtime. `install` uses an npm/nvm global command when it already resolves to the current runtime, removes an older kit-managed local shim when it shadows that command, and creates a local shim only when no `PATH` command points at the current runtime.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "llm-wiki-kit",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "Hook-first living LLM Wiki runtime for Codex and Claude Code.",
5
5
  "type": "module",
6
6
  "files": [
package/src/update.js CHANGED
@@ -192,9 +192,16 @@ export async function update(options = {}) {
192
192
  }
193
193
 
194
194
  const target = options.to || 'latest';
195
- const installResult = runCommand(npmCommand(), ['install', '-g', `${packageName()}@${target}`], {
196
- timeout: options.timeout || 120000,
197
- });
195
+ const shouldRunNpmInstall = check.updateAvailable;
196
+ const installResult = shouldRunNpmInstall
197
+ ? runCommand(npmCommand(), ['install', '-g', `${packageName()}@${target}`], {
198
+ timeout: options.timeout || 120000,
199
+ })
200
+ : {
201
+ status: 0,
202
+ stdout: `skipped; installed ${check.installedVersion} is already >= target ${check.latestVersion}`,
203
+ stderr: '',
204
+ };
198
205
  assertCommandOk(installResult, 'npm install -g');
199
206
 
200
207
  const postArgs = [binCommand(), 'post-update', '--workspace', workspace, '--json'];
@@ -216,6 +223,7 @@ export async function update(options = {}) {
216
223
  target,
217
224
  scope: shouldUpdateAllProjects(options) ? 'all' : 'current',
218
225
  npmInstall: {
226
+ skipped: !shouldRunNpmInstall,
219
227
  stdout: installResult.stdout.trim(),
220
228
  stderr: installResult.stderr.trim(),
221
229
  },