llm-wiki-kit 0.1.13 → 0.1.14

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/package.json +1 -1
  2. package/src/install.js +4 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "llm-wiki-kit",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "Hook-first living LLM Wiki runtime for Codex and Claude Code.",
5
5
  "type": "module",
6
6
  "files": [
package/src/install.js CHANGED
@@ -122,7 +122,10 @@ async function reconcileLocalBin(localBinPath) {
122
122
 
123
123
  function addHook(hooks, eventName, command, options = {}) {
124
124
  hooks[eventName] = Array.isArray(hooks[eventName]) ? hooks[eventName] : [];
125
- const already = JSON.stringify(hooks[eventName]).includes(command);
125
+ const already = hooks[eventName].some((entry) => (
126
+ Array.isArray(entry?.hooks) &&
127
+ entry.hooks.some((hook) => hook?.type === 'command' && hook?.command === command)
128
+ ));
126
129
  if (already) return false;
127
130
  const entry = {
128
131
  hooks: [