memindex 1.5.0 → 1.7.0
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/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +15 -12
- package/.codex-plugin/plugin.json +17 -14
- package/.qoder-plugin/plugin.json +1 -1
- package/README.md +89 -110
- package/THIRD_PARTY_LICENSES +7 -0
- package/dist/bug-report/index.js +54 -54
- package/dist/npx-cli/index.js +451 -443
- package/dist/opencode-plugin/index.js +33 -33
- package/integrations/dsh/package.json +1 -1
- package/integrations/openclaw/openclaw.plugin.json +1 -1
- package/package.json +15 -12
- package/plugin/.claude-plugin/plugin.json +15 -12
- package/plugin/.codex-plugin/plugin.json +15 -12
- package/plugin/.qoder-plugin/plugin.json +1 -1
- package/plugin/hooks/codex-hooks.json +14 -14
- package/plugin/hooks/hooks.json +8 -8
- package/plugin/hooks.json +4 -4
- package/plugin/package.json +1 -1
- package/plugin/plugin.json +1 -1
- package/plugin/scripts/context-generator.cjs +55 -54
- package/plugin/scripts/context-generator.cjs.map +2 -2
- package/plugin/scripts/hook-runner.cjs +248 -0
- package/plugin/scripts/hook-runner.cjs.map +6 -0
- package/plugin/scripts/mcp-server.cjs +99 -89
- package/plugin/scripts/mcp-server.cjs.map +2 -2
- package/plugin/scripts/qoder-hook-launcher.cjs +1 -1
- package/plugin/scripts/transcript-watcher.cjs +32 -32
- package/plugin/scripts/transcript-watcher.cjs.map +2 -2
- package/plugin/scripts/windows-hook-launcher.cjs +2 -2
- package/plugin/scripts/worker-service.cjs +655 -641
- package/plugin/scripts/worker-service.cjs.map +3 -3
- package/plugin/sqlite/SessionStore.js +90 -89
- package/plugin/sqlite/SessionStore.js.map +3 -3
- package/plugin/sqlite/observations/files.js +12 -12
- package/plugin/sqlite/observations/files.js.map +2 -2
- package/plugin/ui/assets/fonts/dm-sans-OFL.txt +93 -0
- package/plugin/ui/assets/fonts/dm-sans-latin.woff2 +0 -0
- package/plugin/ui/assets/fonts/ibm-plex-mono-OFL.txt +93 -0
- package/plugin/ui/assets/fonts/ibm-plex-mono-latin.woff2 +0 -0
- package/plugin/ui/assets/fonts/manrope-OFL.txt +93 -0
- package/plugin/ui/assets/fonts/manrope-latin.woff2 +0 -0
- package/plugin/ui/viewer-bundle.js +14 -14
- package/plugin/ui/viewer.html +450 -321
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "MemIndex (Persistent Memory)",
|
|
4
4
|
"description": "OpenClaw plugin for MemIndex. Records observations from embedded runner sessions and streams them to messaging channels.",
|
|
5
5
|
"kind": "memory",
|
|
6
|
-
"version": "1.
|
|
6
|
+
"version": "1.7.0",
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
8
|
"author": "memindex",
|
|
9
9
|
"homepage": "https://memindex.ai",
|
package/package.json
CHANGED
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "memindex",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Memory
|
|
3
|
+
"version": "1.7.0",
|
|
4
|
+
"description": "Memory for AI coding agents: what you decided, fixed and tried comes back in your next session. Works with Claude Code, Codex, Cursor, OpenCode, Windsurf and more.",
|
|
5
5
|
"keywords": [
|
|
6
|
-
"
|
|
6
|
+
"memory",
|
|
7
|
+
"ai-memory",
|
|
8
|
+
"persistent-memory",
|
|
9
|
+
"coding-agent",
|
|
10
|
+
"ai-agents",
|
|
7
11
|
"claude-code",
|
|
8
|
-
"
|
|
12
|
+
"codex",
|
|
13
|
+
"cursor",
|
|
14
|
+
"opencode",
|
|
15
|
+
"windsurf",
|
|
9
16
|
"mcp",
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"knowledge-graph",
|
|
14
|
-
"transcript",
|
|
15
|
-
"typescript",
|
|
16
|
-
"nodejs"
|
|
17
|
+
"context",
|
|
18
|
+
"developer-tools",
|
|
19
|
+
"llm"
|
|
17
20
|
],
|
|
18
21
|
"author": "Imogen Labs",
|
|
19
22
|
"license": "Apache-2.0",
|
|
@@ -21,7 +24,7 @@
|
|
|
21
24
|
"type": "git",
|
|
22
25
|
"url": "https://github.com/imogenlabs/memindex.git"
|
|
23
26
|
},
|
|
24
|
-
"homepage": "https://
|
|
27
|
+
"homepage": "https://memindex.ai",
|
|
25
28
|
"bugs": {
|
|
26
29
|
"url": "https://github.com/imogenlabs/memindex/issues"
|
|
27
30
|
},
|
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "memindex",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Memory
|
|
3
|
+
"version": "1.7.0",
|
|
4
|
+
"description": "Memory for AI coding agents: what you decided, fixed and tried comes back in your next session. Works with Claude Code, Codex, Cursor, OpenCode, Windsurf and more.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Imogen Labs"
|
|
7
7
|
},
|
|
8
8
|
"repository": "https://github.com/imogenlabs/memindex",
|
|
9
9
|
"license": "Apache-2.0",
|
|
10
10
|
"keywords": [
|
|
11
|
-
"
|
|
11
|
+
"memory",
|
|
12
|
+
"ai-memory",
|
|
13
|
+
"persistent-memory",
|
|
14
|
+
"coding-agent",
|
|
15
|
+
"ai-agents",
|
|
12
16
|
"claude-code",
|
|
13
|
-
"
|
|
17
|
+
"codex",
|
|
18
|
+
"cursor",
|
|
19
|
+
"opencode",
|
|
20
|
+
"windsurf",
|
|
14
21
|
"mcp",
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"knowledge-graph",
|
|
19
|
-
"transcript",
|
|
20
|
-
"typescript",
|
|
21
|
-
"nodejs"
|
|
22
|
+
"context",
|
|
23
|
+
"developer-tools",
|
|
24
|
+
"llm"
|
|
22
25
|
],
|
|
23
|
-
"homepage": "https://
|
|
26
|
+
"homepage": "https://memindex.ai"
|
|
24
27
|
}
|
|
@@ -1,26 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "memindex",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Memory
|
|
3
|
+
"version": "1.7.0",
|
|
4
|
+
"description": "Memory for AI coding agents: what you decided, fixed and tried comes back in your next session. Works with Claude Code, Codex, Cursor, OpenCode, Windsurf and more.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Imogen Labs",
|
|
7
7
|
"url": "https://github.com/imogenlabs"
|
|
8
8
|
},
|
|
9
|
-
"homepage": "https://
|
|
9
|
+
"homepage": "https://memindex.ai",
|
|
10
10
|
"repository": "https://github.com/imogenlabs/memindex",
|
|
11
11
|
"license": "Apache-2.0",
|
|
12
12
|
"keywords": [
|
|
13
|
-
"
|
|
13
|
+
"memory",
|
|
14
|
+
"ai-memory",
|
|
15
|
+
"persistent-memory",
|
|
16
|
+
"coding-agent",
|
|
17
|
+
"ai-agents",
|
|
14
18
|
"claude-code",
|
|
15
|
-
"
|
|
19
|
+
"codex",
|
|
20
|
+
"cursor",
|
|
21
|
+
"opencode",
|
|
22
|
+
"windsurf",
|
|
16
23
|
"mcp",
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"knowledge-graph",
|
|
21
|
-
"transcript",
|
|
22
|
-
"typescript",
|
|
23
|
-
"nodejs"
|
|
24
|
+
"context",
|
|
25
|
+
"developer-tools",
|
|
26
|
+
"llm"
|
|
24
27
|
],
|
|
25
28
|
"skills": "./skills/",
|
|
26
29
|
"mcpServers": "./.mcp.json",
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
"hooks": [
|
|
7
7
|
{
|
|
8
8
|
"type": "command",
|
|
9
|
-
"command": "_HP=$(printenv PATH 2>/dev/null || true); if [ -z \"$_HP\" ] && [ -n \"${SHELL:-}\" ]; then _HP=$(\"$SHELL\" -lc 'printf %s \"$PATH\"' 2>/dev/null || true); fi; _HP=$(printf '%s' \"$_HP\" | tr ' ' ':'); export PATH=\"${_HP:+$_HP:}$PATH\"; _C=\"${CLAUDE_CONFIG_DIR:-$HOME/.claude}\"; _E=\"${CLAUDE_PLUGIN_ROOT:-${PLUGIN_ROOT:-}}\"; _P=; if [ -n \"$_E\" ]; then _R=\"${_E%/}\"; [ -d \"$_R/plugin/scripts\" ] && _Q=\"$_R/plugin\" || _Q=\"$_R\"; [ -f \"$_Q/scripts/bun-runner.js\" ] && [ -f \"$_Q/scripts/
|
|
9
|
+
"command": "_HP=$(printenv PATH 2>/dev/null || true); if [ -z \"$_HP\" ] && [ -n \"${SHELL:-}\" ]; then _HP=$(\"$SHELL\" -lc 'printf %s \"$PATH\"' 2>/dev/null || true); fi; _HP=$(printf '%s' \"$_HP\" | tr ' ' ':'); export PATH=\"${_HP:+$_HP:}$PATH\"; _C=\"${CLAUDE_CONFIG_DIR:-$HOME/.claude}\"; _E=\"${CLAUDE_PLUGIN_ROOT:-${PLUGIN_ROOT:-}}\"; _P=; if [ -n \"$_E\" ]; then _R=\"${_E%/}\"; [ -d \"$_R/plugin/scripts\" ] && _Q=\"$_R/plugin\" || _Q=\"$_R\"; [ -f \"$_Q/scripts/bun-runner.js\" ] && [ -f \"$_Q/scripts/hook-runner.cjs\" ] && [ -d \"$_Q/node_modules/zod\" ] && _P=\"$_Q\"; fi; if [ -z \"$_P\" ]; then _F=; _P=$({ for _V in \"$_C/plugins/cache/memindex/memindex\"/[0-9]*/; do [ -d \"$_V\" ] || continue; [ -e \"${_V}.orphaned_at\" ] && continue; _B=${_V%/}; _B=${_B##*/}; case \"$_B\" in (*-*) _G=0;; (*) _G=1;; esac; _N=${_B%%-*}; _M1=${_N%%.*}; case \"$_N\" in (*.*) _T=${_N#*.};; (*) _T=0;; esac; _M2=${_T%%.*}; case \"$_T\" in (*.*) _U=${_T#*.};; (*) _U=0;; esac; _M3=${_U%%.*}; _M1=${_M1%%[!0-9]*}; _M2=${_M2%%[!0-9]*}; _M3=${_M3%%[!0-9]*}; printf '%08d%08d%08d%d %s\\n' \"${_M1:-0}\" \"${_M2:-0}\" \"${_M3:-0}\" \"$_G\" \"$_V\"; done 2>/dev/null | sort -r | sed 's/^[^ ]* //'; printf '%s\\n' \"$_C/plugins/marketplaces/memindex/plugin\"; } | while IFS= read -r _R; do _R=\"${_R%/}\"; [ -d \"$_R/plugin/scripts\" ] && _Q=\"$_R/plugin\" || _Q=\"$_R\"; [ -f \"$_Q/scripts/bun-runner.js\" ] && [ -f \"$_Q/scripts/hook-runner.cjs\" ] && [ -d \"$_Q/node_modules/zod\" ] && [ -z \"$_F\" ] && { _F=1; printf '%s\\n' \"$_Q\"; }; done); fi; [ -n \"$_P\" ] || { echo \"memindex: plugin scripts not found\" >&2; exit 1; }; command -v cygpath >/dev/null 2>&1 && { _W=$(cygpath -w \"$_P\" 2>/dev/null); [ -n \"$_W\" ] && _P=\"$_W\"; }; MEMINDEX_CODEX_HOOK=1 node \"$_P/scripts/bun-runner.js\" \"$_P/scripts/hook-runner.cjs\" hook codex context",
|
|
10
10
|
"timeout": 20,
|
|
11
|
-
"commandWindows": "node -e \"const fs=require('fs'),p=require('path'),o=require('os'),c=require('child_process');const h=o.homedir();const C=process.env.CLAUDE_CONFIG_DIR||p.join(h,'.claude');const roots=[];for(const v of [process.env.CLAUDE_PLUGIN_ROOT,process.env.PLUGIN_ROOT])if(v)roots.push(v);const cache=p.join(C,'plugins','cache','memindex','memindex');const S=n=>{const q=n.split('-')[0].split('.');return[parseInt(q[0],10)||0,parseInt(q[1],10)||0,parseInt(q[2],10)||0]};const W=(a,b)=>{const x=S(a),y=S(b);return(y[0]-x[0])||(y[1]-x[1])||(y[2]-x[2])||((a.indexOf('-')<0?0:1)-(b.indexOf('-')<0?0:1))||(a<b?1:a>b?-1:0)};try{roots.push(...fs.readdirSync(cache).filter(n=>{const ch=n.charAt(0);return ch>='0'&&ch<='9'}).map(n=>p.join(cache,n)).filter(r=>{try{return fs.statSync(r).isDirectory()&&!fs.existsSync(p.join(r,'.orphaned_at'))}catch{return false}}).sort((a,b)=>W(p.basename(a),p.basename(b))))}catch{}roots.push(p.join(C,'plugins','marketplaces', 'memindex','plugin'));let R=null;for(const k of roots){const r=fs.existsSync(p.join(k,'plugin','scripts'))?p.join(k,'plugin'):k;if(fs.existsSync(p.join(r,'scripts','bun-runner.js'))&&fs.existsSync(p.join(r,'scripts','
|
|
11
|
+
"commandWindows": "node -e \"const fs=require('fs'),p=require('path'),o=require('os'),c=require('child_process');const h=o.homedir();const C=process.env.CLAUDE_CONFIG_DIR||p.join(h,'.claude');const roots=[];for(const v of [process.env.CLAUDE_PLUGIN_ROOT,process.env.PLUGIN_ROOT])if(v)roots.push(v);const cache=p.join(C,'plugins','cache','memindex','memindex');const S=n=>{const q=n.split('-')[0].split('.');return[parseInt(q[0],10)||0,parseInt(q[1],10)||0,parseInt(q[2],10)||0]};const W=(a,b)=>{const x=S(a),y=S(b);return(y[0]-x[0])||(y[1]-x[1])||(y[2]-x[2])||((a.indexOf('-')<0?0:1)-(b.indexOf('-')<0?0:1))||(a<b?1:a>b?-1:0)};try{roots.push(...fs.readdirSync(cache).filter(n=>{const ch=n.charAt(0);return ch>='0'&&ch<='9'}).map(n=>p.join(cache,n)).filter(r=>{try{return fs.statSync(r).isDirectory()&&!fs.existsSync(p.join(r,'.orphaned_at'))}catch{return false}}).sort((a,b)=>W(p.basename(a),p.basename(b))))}catch{}roots.push(p.join(C,'plugins','marketplaces', 'memindex','plugin'));let R=null;for(const k of roots){const r=fs.existsSync(p.join(k,'plugin','scripts'))?p.join(k,'plugin'):k;if(fs.existsSync(p.join(r,'scripts','bun-runner.js'))&&fs.existsSync(p.join(r,'scripts','hook-runner.cjs'))&&fs.existsSync(p.join(r,'node_modules','zod'))){R=r;break}}if(!R){process.stderr.write('memindex: plugin scripts not found\\n');process.exit(1)}const env={...process.env,MEMINDEX_CODEX_HOOK:'1'};const workerArgs=['hook','codex','context'];const args=[p.join(R,'scripts','bun-runner.js'),p.join(R,'scripts','hook-runner.cjs'),...workerArgs];const res=c.spawnSync(process.execPath,args,{stdio:'inherit',env});if(res.error){process.stderr.write(String(res.error.message||res.error)+'\\n');process.exit(1)}process.exit(res.status==null?0:res.status)\""
|
|
12
12
|
}
|
|
13
13
|
]
|
|
14
14
|
}
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"hooks": [
|
|
19
19
|
{
|
|
20
20
|
"type": "command",
|
|
21
|
-
"command": "_HP=$(printenv PATH 2>/dev/null || true); if [ -z \"$_HP\" ] && [ -n \"${SHELL:-}\" ]; then _HP=$(\"$SHELL\" -lc 'printf %s \"$PATH\"' 2>/dev/null || true); fi; _HP=$(printf '%s' \"$_HP\" | tr ' ' ':'); export PATH=\"${_HP:+$_HP:}$PATH\"; _C=\"${CLAUDE_CONFIG_DIR:-$HOME/.claude}\"; _E=\"${CLAUDE_PLUGIN_ROOT:-${PLUGIN_ROOT:-}}\"; _P=; if [ -n \"$_E\" ]; then _R=\"${_E%/}\"; [ -d \"$_R/plugin/scripts\" ] && _Q=\"$_R/plugin\" || _Q=\"$_R\"; [ -f \"$_Q/scripts/bun-runner.js\" ] && [ -f \"$_Q/scripts/
|
|
21
|
+
"command": "_HP=$(printenv PATH 2>/dev/null || true); if [ -z \"$_HP\" ] && [ -n \"${SHELL:-}\" ]; then _HP=$(\"$SHELL\" -lc 'printf %s \"$PATH\"' 2>/dev/null || true); fi; _HP=$(printf '%s' \"$_HP\" | tr ' ' ':'); export PATH=\"${_HP:+$_HP:}$PATH\"; _C=\"${CLAUDE_CONFIG_DIR:-$HOME/.claude}\"; _E=\"${CLAUDE_PLUGIN_ROOT:-${PLUGIN_ROOT:-}}\"; _P=; if [ -n \"$_E\" ]; then _R=\"${_E%/}\"; [ -d \"$_R/plugin/scripts\" ] && _Q=\"$_R/plugin\" || _Q=\"$_R\"; [ -f \"$_Q/scripts/bun-runner.js\" ] && [ -f \"$_Q/scripts/hook-runner.cjs\" ] && [ -d \"$_Q/node_modules/zod\" ] && _P=\"$_Q\"; fi; if [ -z \"$_P\" ]; then _F=; _P=$({ for _V in \"$_C/plugins/cache/memindex/memindex\"/[0-9]*/; do [ -d \"$_V\" ] || continue; [ -e \"${_V}.orphaned_at\" ] && continue; _B=${_V%/}; _B=${_B##*/}; case \"$_B\" in (*-*) _G=0;; (*) _G=1;; esac; _N=${_B%%-*}; _M1=${_N%%.*}; case \"$_N\" in (*.*) _T=${_N#*.};; (*) _T=0;; esac; _M2=${_T%%.*}; case \"$_T\" in (*.*) _U=${_T#*.};; (*) _U=0;; esac; _M3=${_U%%.*}; _M1=${_M1%%[!0-9]*}; _M2=${_M2%%[!0-9]*}; _M3=${_M3%%[!0-9]*}; printf '%08d%08d%08d%d %s\\n' \"${_M1:-0}\" \"${_M2:-0}\" \"${_M3:-0}\" \"$_G\" \"$_V\"; done 2>/dev/null | sort -r | sed 's/^[^ ]* //'; printf '%s\\n' \"$_C/plugins/marketplaces/memindex/plugin\"; } | while IFS= read -r _R; do _R=\"${_R%/}\"; [ -d \"$_R/plugin/scripts\" ] && _Q=\"$_R/plugin\" || _Q=\"$_R\"; [ -f \"$_Q/scripts/bun-runner.js\" ] && [ -f \"$_Q/scripts/hook-runner.cjs\" ] && [ -d \"$_Q/node_modules/zod\" ] && [ -z \"$_F\" ] && { _F=1; printf '%s\\n' \"$_Q\"; }; done); fi; [ -n \"$_P\" ] || { echo \"memindex: plugin scripts not found\" >&2; exit 1; }; command -v cygpath >/dev/null 2>&1 && { _W=$(cygpath -w \"$_P\" 2>/dev/null); [ -n \"$_W\" ] && _P=\"$_W\"; }; MEMINDEX_CODEX_HOOK=1 node \"$_P/scripts/bun-runner.js\" \"$_P/scripts/hook-runner.cjs\" hook codex session-init",
|
|
22
22
|
"timeout": 20,
|
|
23
|
-
"commandWindows": "node -e \"const fs=require('fs'),p=require('path'),o=require('os'),c=require('child_process');const h=o.homedir();const C=process.env.CLAUDE_CONFIG_DIR||p.join(h,'.claude');const roots=[];for(const v of [process.env.CLAUDE_PLUGIN_ROOT,process.env.PLUGIN_ROOT])if(v)roots.push(v);const cache=p.join(C,'plugins','cache','memindex','memindex');const S=n=>{const q=n.split('-')[0].split('.');return[parseInt(q[0],10)||0,parseInt(q[1],10)||0,parseInt(q[2],10)||0]};const W=(a,b)=>{const x=S(a),y=S(b);return(y[0]-x[0])||(y[1]-x[1])||(y[2]-x[2])||((a.indexOf('-')<0?0:1)-(b.indexOf('-')<0?0:1))||(a<b?1:a>b?-1:0)};try{roots.push(...fs.readdirSync(cache).filter(n=>{const ch=n.charAt(0);return ch>='0'&&ch<='9'}).map(n=>p.join(cache,n)).filter(r=>{try{return fs.statSync(r).isDirectory()&&!fs.existsSync(p.join(r,'.orphaned_at'))}catch{return false}}).sort((a,b)=>W(p.basename(a),p.basename(b))))}catch{}roots.push(p.join(C,'plugins','marketplaces', 'memindex','plugin'));let R=null;for(const k of roots){const r=fs.existsSync(p.join(k,'plugin','scripts'))?p.join(k,'plugin'):k;if(fs.existsSync(p.join(r,'scripts','bun-runner.js'))&&fs.existsSync(p.join(r,'scripts','
|
|
23
|
+
"commandWindows": "node -e \"const fs=require('fs'),p=require('path'),o=require('os'),c=require('child_process');const h=o.homedir();const C=process.env.CLAUDE_CONFIG_DIR||p.join(h,'.claude');const roots=[];for(const v of [process.env.CLAUDE_PLUGIN_ROOT,process.env.PLUGIN_ROOT])if(v)roots.push(v);const cache=p.join(C,'plugins','cache','memindex','memindex');const S=n=>{const q=n.split('-')[0].split('.');return[parseInt(q[0],10)||0,parseInt(q[1],10)||0,parseInt(q[2],10)||0]};const W=(a,b)=>{const x=S(a),y=S(b);return(y[0]-x[0])||(y[1]-x[1])||(y[2]-x[2])||((a.indexOf('-')<0?0:1)-(b.indexOf('-')<0?0:1))||(a<b?1:a>b?-1:0)};try{roots.push(...fs.readdirSync(cache).filter(n=>{const ch=n.charAt(0);return ch>='0'&&ch<='9'}).map(n=>p.join(cache,n)).filter(r=>{try{return fs.statSync(r).isDirectory()&&!fs.existsSync(p.join(r,'.orphaned_at'))}catch{return false}}).sort((a,b)=>W(p.basename(a),p.basename(b))))}catch{}roots.push(p.join(C,'plugins','marketplaces', 'memindex','plugin'));let R=null;for(const k of roots){const r=fs.existsSync(p.join(k,'plugin','scripts'))?p.join(k,'plugin'):k;if(fs.existsSync(p.join(r,'scripts','bun-runner.js'))&&fs.existsSync(p.join(r,'scripts','hook-runner.cjs'))&&fs.existsSync(p.join(r,'node_modules','zod'))){R=r;break}}if(!R){process.stderr.write('memindex: plugin scripts not found\\n');process.exit(1)}const env={...process.env,MEMINDEX_CODEX_HOOK:'1'};const workerArgs=['hook','codex','session-init'];const args=[p.join(R,'scripts','bun-runner.js'),p.join(R,'scripts','hook-runner.cjs'),...workerArgs];const res=c.spawnSync(process.execPath,args,{stdio:'inherit',env});if(res.error){process.stderr.write(String(res.error.message||res.error)+'\\n');process.exit(1)}process.exit(res.status==null?0:res.status)\""
|
|
24
24
|
}
|
|
25
25
|
]
|
|
26
26
|
}
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"hooks": [
|
|
32
32
|
{
|
|
33
33
|
"type": "command",
|
|
34
|
-
"command": "if [ \"${MEMINDEX_DISABLE_TOOL_HOOKS:-${AGENT_MEM_DISABLE_TOOL_HOOKS:-}}\" = 1 ] || [ \"${MEMINDEX_DISABLE_FILE_CONTEXT:-${AGENT_MEM_DISABLE_FILE_CONTEXT:-}}\" = 1 ]; then exit 0; fi; _HP=$(printenv PATH 2>/dev/null || true); if [ -z \"$_HP\" ] && [ -n \"${SHELL:-}\" ]; then _HP=$(\"$SHELL\" -lc 'printf %s \"$PATH\"' 2>/dev/null || true); fi; _HP=$(printf '%s' \"$_HP\" | tr ' ' ':'); export PATH=\"${_HP:+$_HP:}$PATH\"; _C=\"${CLAUDE_CONFIG_DIR:-$HOME/.claude}\"; _E=\"${CLAUDE_PLUGIN_ROOT:-${PLUGIN_ROOT:-}}\"; _P=; if [ -n \"$_E\" ]; then _R=\"${_E%/}\"; [ -d \"$_R/plugin/scripts\" ] && _Q=\"$_R/plugin\" || _Q=\"$_R\"; [ -f \"$_Q/scripts/bun-runner.js\" ] && [ -f \"$_Q/scripts/
|
|
34
|
+
"command": "if [ \"${MEMINDEX_DISABLE_TOOL_HOOKS:-${AGENT_MEM_DISABLE_TOOL_HOOKS:-}}\" = 1 ] || [ \"${MEMINDEX_DISABLE_FILE_CONTEXT:-${AGENT_MEM_DISABLE_FILE_CONTEXT:-}}\" = 1 ]; then exit 0; fi; _HP=$(printenv PATH 2>/dev/null || true); if [ -z \"$_HP\" ] && [ -n \"${SHELL:-}\" ]; then _HP=$(\"$SHELL\" -lc 'printf %s \"$PATH\"' 2>/dev/null || true); fi; _HP=$(printf '%s' \"$_HP\" | tr ' ' ':'); export PATH=\"${_HP:+$_HP:}$PATH\"; _C=\"${CLAUDE_CONFIG_DIR:-$HOME/.claude}\"; _E=\"${CLAUDE_PLUGIN_ROOT:-${PLUGIN_ROOT:-}}\"; _P=; if [ -n \"$_E\" ]; then _R=\"${_E%/}\"; [ -d \"$_R/plugin/scripts\" ] && _Q=\"$_R/plugin\" || _Q=\"$_R\"; [ -f \"$_Q/scripts/bun-runner.js\" ] && [ -f \"$_Q/scripts/hook-runner.cjs\" ] && [ -d \"$_Q/node_modules/zod\" ] && _P=\"$_Q\"; fi; if [ -z \"$_P\" ]; then _F=; _P=$({ for _V in \"$_C/plugins/cache/memindex/memindex\"/[0-9]*/; do [ -d \"$_V\" ] || continue; [ -e \"${_V}.orphaned_at\" ] && continue; _B=${_V%/}; _B=${_B##*/}; case \"$_B\" in (*-*) _G=0;; (*) _G=1;; esac; _N=${_B%%-*}; _M1=${_N%%.*}; case \"$_N\" in (*.*) _T=${_N#*.};; (*) _T=0;; esac; _M2=${_T%%.*}; case \"$_T\" in (*.*) _U=${_T#*.};; (*) _U=0;; esac; _M3=${_U%%.*}; _M1=${_M1%%[!0-9]*}; _M2=${_M2%%[!0-9]*}; _M3=${_M3%%[!0-9]*}; printf '%08d%08d%08d%d %s\\n' \"${_M1:-0}\" \"${_M2:-0}\" \"${_M3:-0}\" \"$_G\" \"$_V\"; done 2>/dev/null | sort -r | sed 's/^[^ ]* //'; printf '%s\\n' \"$_C/plugins/marketplaces/memindex/plugin\"; } | while IFS= read -r _R; do _R=\"${_R%/}\"; [ -d \"$_R/plugin/scripts\" ] && _Q=\"$_R/plugin\" || _Q=\"$_R\"; [ -f \"$_Q/scripts/bun-runner.js\" ] && [ -f \"$_Q/scripts/hook-runner.cjs\" ] && [ -d \"$_Q/node_modules/zod\" ] && [ -z \"$_F\" ] && { _F=1; printf '%s\\n' \"$_Q\"; }; done); fi; [ -n \"$_P\" ] || { echo \"memindex: plugin scripts not found\" >&2; exit 1; }; command -v cygpath >/dev/null 2>&1 && { _W=$(cygpath -w \"$_P\" 2>/dev/null); [ -n \"$_W\" ] && _P=\"$_W\"; }; MEMINDEX_CODEX_HOOK=1 node \"$_P/scripts/bun-runner.js\" \"$_P/scripts/hook-runner.cjs\" hook codex file-context",
|
|
35
35
|
"timeout": 30,
|
|
36
|
-
"commandWindows": "node -e \"if((process.env.MEMINDEX_DISABLE_TOOL_HOOKS??process.env.AGENT_MEM_DISABLE_TOOL_HOOKS)==='1'||(process.env.MEMINDEX_DISABLE_FILE_CONTEXT??process.env.AGENT_MEM_DISABLE_FILE_CONTEXT)==='1')process.exit(0);const fs=require('fs'),p=require('path'),o=require('os'),c=require('child_process');const h=o.homedir();const C=process.env.CLAUDE_CONFIG_DIR||p.join(h,'.claude');const roots=[];for(const v of [process.env.CLAUDE_PLUGIN_ROOT,process.env.PLUGIN_ROOT])if(v)roots.push(v);const cache=p.join(C,'plugins','cache','memindex','memindex');const S=n=>{const q=n.split('-')[0].split('.');return[parseInt(q[0],10)||0,parseInt(q[1],10)||0,parseInt(q[2],10)||0]};const W=(a,b)=>{const x=S(a),y=S(b);return(y[0]-x[0])||(y[1]-x[1])||(y[2]-x[2])||((a.indexOf('-')<0?0:1)-(b.indexOf('-')<0?0:1))||(a<b?1:a>b?-1:0)};try{roots.push(...fs.readdirSync(cache).filter(n=>{const ch=n.charAt(0);return ch>='0'&&ch<='9'}).map(n=>p.join(cache,n)).filter(r=>{try{return fs.statSync(r).isDirectory()&&!fs.existsSync(p.join(r,'.orphaned_at'))}catch{return false}}).sort((a,b)=>W(p.basename(a),p.basename(b))))}catch{}roots.push(p.join(C,'plugins','marketplaces', 'memindex','plugin'));let R=null;for(const k of roots){const r=fs.existsSync(p.join(k,'plugin','scripts'))?p.join(k,'plugin'):k;if(fs.existsSync(p.join(r,'scripts','bun-runner.js'))&&fs.existsSync(p.join(r,'scripts','
|
|
36
|
+
"commandWindows": "node -e \"if((process.env.MEMINDEX_DISABLE_TOOL_HOOKS??process.env.AGENT_MEM_DISABLE_TOOL_HOOKS)==='1'||(process.env.MEMINDEX_DISABLE_FILE_CONTEXT??process.env.AGENT_MEM_DISABLE_FILE_CONTEXT)==='1')process.exit(0);const fs=require('fs'),p=require('path'),o=require('os'),c=require('child_process');const h=o.homedir();const C=process.env.CLAUDE_CONFIG_DIR||p.join(h,'.claude');const roots=[];for(const v of [process.env.CLAUDE_PLUGIN_ROOT,process.env.PLUGIN_ROOT])if(v)roots.push(v);const cache=p.join(C,'plugins','cache','memindex','memindex');const S=n=>{const q=n.split('-')[0].split('.');return[parseInt(q[0],10)||0,parseInt(q[1],10)||0,parseInt(q[2],10)||0]};const W=(a,b)=>{const x=S(a),y=S(b);return(y[0]-x[0])||(y[1]-x[1])||(y[2]-x[2])||((a.indexOf('-')<0?0:1)-(b.indexOf('-')<0?0:1))||(a<b?1:a>b?-1:0)};try{roots.push(...fs.readdirSync(cache).filter(n=>{const ch=n.charAt(0);return ch>='0'&&ch<='9'}).map(n=>p.join(cache,n)).filter(r=>{try{return fs.statSync(r).isDirectory()&&!fs.existsSync(p.join(r,'.orphaned_at'))}catch{return false}}).sort((a,b)=>W(p.basename(a),p.basename(b))))}catch{}roots.push(p.join(C,'plugins','marketplaces', 'memindex','plugin'));let R=null;for(const k of roots){const r=fs.existsSync(p.join(k,'plugin','scripts'))?p.join(k,'plugin'):k;if(fs.existsSync(p.join(r,'scripts','bun-runner.js'))&&fs.existsSync(p.join(r,'scripts','hook-runner.cjs'))&&fs.existsSync(p.join(r,'node_modules','zod'))){R=r;break}}if(!R){process.stderr.write('memindex: plugin scripts not found\\n');process.exit(1)}const env={...process.env,MEMINDEX_CODEX_HOOK:'1'};const workerArgs=['hook','codex','file-context'];const args=[p.join(R,'scripts','bun-runner.js'),p.join(R,'scripts','hook-runner.cjs'),...workerArgs];const res=c.spawnSync(process.execPath,args,{stdio:'inherit',env});if(res.error){process.stderr.write(String(res.error.message||res.error)+'\\n');process.exit(1)}process.exit(res.status==null?0:res.status)\""
|
|
37
37
|
}
|
|
38
38
|
]
|
|
39
39
|
}
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"hooks": [
|
|
45
45
|
{
|
|
46
46
|
"type": "command",
|
|
47
|
-
"command": "if [ \"${MEMINDEX_DISABLE_TOOL_HOOKS:-${AGENT_MEM_DISABLE_TOOL_HOOKS:-}}\" = 1 ] || [ \"${MEMINDEX_DISABLE_OBSERVATION:-${AGENT_MEM_DISABLE_OBSERVATION:-}}\" = 1 ]; then exit 0; fi; _HP=$(printenv PATH 2>/dev/null || true); if [ -z \"$_HP\" ] && [ -n \"${SHELL:-}\" ]; then _HP=$(\"$SHELL\" -lc 'printf %s \"$PATH\"' 2>/dev/null || true); fi; _HP=$(printf '%s' \"$_HP\" | tr ' ' ':'); export PATH=\"${_HP:+$_HP:}$PATH\"; _C=\"${CLAUDE_CONFIG_DIR:-$HOME/.claude}\"; _E=\"${CLAUDE_PLUGIN_ROOT:-${PLUGIN_ROOT:-}}\"; _P=; if [ -n \"$_E\" ]; then _R=\"${_E%/}\"; [ -d \"$_R/plugin/scripts\" ] && _Q=\"$_R/plugin\" || _Q=\"$_R\"; [ -f \"$_Q/scripts/bun-runner.js\" ] && [ -f \"$_Q/scripts/
|
|
47
|
+
"command": "if [ \"${MEMINDEX_DISABLE_TOOL_HOOKS:-${AGENT_MEM_DISABLE_TOOL_HOOKS:-}}\" = 1 ] || [ \"${MEMINDEX_DISABLE_OBSERVATION:-${AGENT_MEM_DISABLE_OBSERVATION:-}}\" = 1 ]; then exit 0; fi; _HP=$(printenv PATH 2>/dev/null || true); if [ -z \"$_HP\" ] && [ -n \"${SHELL:-}\" ]; then _HP=$(\"$SHELL\" -lc 'printf %s \"$PATH\"' 2>/dev/null || true); fi; _HP=$(printf '%s' \"$_HP\" | tr ' ' ':'); export PATH=\"${_HP:+$_HP:}$PATH\"; _C=\"${CLAUDE_CONFIG_DIR:-$HOME/.claude}\"; _E=\"${CLAUDE_PLUGIN_ROOT:-${PLUGIN_ROOT:-}}\"; _P=; if [ -n \"$_E\" ]; then _R=\"${_E%/}\"; [ -d \"$_R/plugin/scripts\" ] && _Q=\"$_R/plugin\" || _Q=\"$_R\"; [ -f \"$_Q/scripts/bun-runner.js\" ] && [ -f \"$_Q/scripts/hook-runner.cjs\" ] && [ -d \"$_Q/node_modules/zod\" ] && _P=\"$_Q\"; fi; if [ -z \"$_P\" ]; then _F=; _P=$({ for _V in \"$_C/plugins/cache/memindex/memindex\"/[0-9]*/; do [ -d \"$_V\" ] || continue; [ -e \"${_V}.orphaned_at\" ] && continue; _B=${_V%/}; _B=${_B##*/}; case \"$_B\" in (*-*) _G=0;; (*) _G=1;; esac; _N=${_B%%-*}; _M1=${_N%%.*}; case \"$_N\" in (*.*) _T=${_N#*.};; (*) _T=0;; esac; _M2=${_T%%.*}; case \"$_T\" in (*.*) _U=${_T#*.};; (*) _U=0;; esac; _M3=${_U%%.*}; _M1=${_M1%%[!0-9]*}; _M2=${_M2%%[!0-9]*}; _M3=${_M3%%[!0-9]*}; printf '%08d%08d%08d%d %s\\n' \"${_M1:-0}\" \"${_M2:-0}\" \"${_M3:-0}\" \"$_G\" \"$_V\"; done 2>/dev/null | sort -r | sed 's/^[^ ]* //'; printf '%s\\n' \"$_C/plugins/marketplaces/memindex/plugin\"; } | while IFS= read -r _R; do _R=\"${_R%/}\"; [ -d \"$_R/plugin/scripts\" ] && _Q=\"$_R/plugin\" || _Q=\"$_R\"; [ -f \"$_Q/scripts/bun-runner.js\" ] && [ -f \"$_Q/scripts/hook-runner.cjs\" ] && [ -d \"$_Q/node_modules/zod\" ] && [ -z \"$_F\" ] && { _F=1; printf '%s\\n' \"$_Q\"; }; done); fi; [ -n \"$_P\" ] || { echo \"memindex: plugin scripts not found\" >&2; exit 1; }; command -v cygpath >/dev/null 2>&1 && { _W=$(cygpath -w \"$_P\" 2>/dev/null); [ -n \"$_W\" ] && _P=\"$_W\"; }; MEMINDEX_CODEX_HOOK=1 node \"$_P/scripts/bun-runner.js\" \"$_P/scripts/hook-runner.cjs\" hook codex observation",
|
|
48
48
|
"timeout": 120,
|
|
49
|
-
"commandWindows": "node -e \"if((process.env.MEMINDEX_DISABLE_TOOL_HOOKS??process.env.AGENT_MEM_DISABLE_TOOL_HOOKS)==='1'||(process.env.MEMINDEX_DISABLE_OBSERVATION??process.env.AGENT_MEM_DISABLE_OBSERVATION)==='1')process.exit(0);const fs=require('fs'),p=require('path'),o=require('os'),c=require('child_process');const h=o.homedir();const C=process.env.CLAUDE_CONFIG_DIR||p.join(h,'.claude');const roots=[];for(const v of [process.env.CLAUDE_PLUGIN_ROOT,process.env.PLUGIN_ROOT])if(v)roots.push(v);const cache=p.join(C,'plugins','cache','memindex','memindex');const S=n=>{const q=n.split('-')[0].split('.');return[parseInt(q[0],10)||0,parseInt(q[1],10)||0,parseInt(q[2],10)||0]};const W=(a,b)=>{const x=S(a),y=S(b);return(y[0]-x[0])||(y[1]-x[1])||(y[2]-x[2])||((a.indexOf('-')<0?0:1)-(b.indexOf('-')<0?0:1))||(a<b?1:a>b?-1:0)};try{roots.push(...fs.readdirSync(cache).filter(n=>{const ch=n.charAt(0);return ch>='0'&&ch<='9'}).map(n=>p.join(cache,n)).filter(r=>{try{return fs.statSync(r).isDirectory()&&!fs.existsSync(p.join(r,'.orphaned_at'))}catch{return false}}).sort((a,b)=>W(p.basename(a),p.basename(b))))}catch{}roots.push(p.join(C,'plugins','marketplaces', 'memindex','plugin'));let R=null;for(const k of roots){const r=fs.existsSync(p.join(k,'plugin','scripts'))?p.join(k,'plugin'):k;if(fs.existsSync(p.join(r,'scripts','bun-runner.js'))&&fs.existsSync(p.join(r,'scripts','
|
|
49
|
+
"commandWindows": "node -e \"if((process.env.MEMINDEX_DISABLE_TOOL_HOOKS??process.env.AGENT_MEM_DISABLE_TOOL_HOOKS)==='1'||(process.env.MEMINDEX_DISABLE_OBSERVATION??process.env.AGENT_MEM_DISABLE_OBSERVATION)==='1')process.exit(0);const fs=require('fs'),p=require('path'),o=require('os'),c=require('child_process');const h=o.homedir();const C=process.env.CLAUDE_CONFIG_DIR||p.join(h,'.claude');const roots=[];for(const v of [process.env.CLAUDE_PLUGIN_ROOT,process.env.PLUGIN_ROOT])if(v)roots.push(v);const cache=p.join(C,'plugins','cache','memindex','memindex');const S=n=>{const q=n.split('-')[0].split('.');return[parseInt(q[0],10)||0,parseInt(q[1],10)||0,parseInt(q[2],10)||0]};const W=(a,b)=>{const x=S(a),y=S(b);return(y[0]-x[0])||(y[1]-x[1])||(y[2]-x[2])||((a.indexOf('-')<0?0:1)-(b.indexOf('-')<0?0:1))||(a<b?1:a>b?-1:0)};try{roots.push(...fs.readdirSync(cache).filter(n=>{const ch=n.charAt(0);return ch>='0'&&ch<='9'}).map(n=>p.join(cache,n)).filter(r=>{try{return fs.statSync(r).isDirectory()&&!fs.existsSync(p.join(r,'.orphaned_at'))}catch{return false}}).sort((a,b)=>W(p.basename(a),p.basename(b))))}catch{}roots.push(p.join(C,'plugins','marketplaces', 'memindex','plugin'));let R=null;for(const k of roots){const r=fs.existsSync(p.join(k,'plugin','scripts'))?p.join(k,'plugin'):k;if(fs.existsSync(p.join(r,'scripts','bun-runner.js'))&&fs.existsSync(p.join(r,'scripts','hook-runner.cjs'))&&fs.existsSync(p.join(r,'node_modules','zod'))){R=r;break}}if(!R){process.stderr.write('memindex: plugin scripts not found\\n');process.exit(1)}const env={...process.env,MEMINDEX_CODEX_HOOK:'1'};const workerArgs=['hook','codex','observation'];const args=[p.join(R,'scripts','bun-runner.js'),p.join(R,'scripts','hook-runner.cjs'),...workerArgs];const res=c.spawnSync(process.execPath,args,{stdio:'inherit',env});if(res.error){process.stderr.write(String(res.error.message||res.error)+'\\n');process.exit(1)}process.exit(res.status==null?0:res.status)\""
|
|
50
50
|
}
|
|
51
51
|
]
|
|
52
52
|
}
|
|
@@ -56,9 +56,9 @@
|
|
|
56
56
|
"hooks": [
|
|
57
57
|
{
|
|
58
58
|
"type": "command",
|
|
59
|
-
"command": "_HP=$(printenv PATH 2>/dev/null || true); if [ -z \"$_HP\" ] && [ -n \"${SHELL:-}\" ]; then _HP=$(\"$SHELL\" -lc 'printf %s \"$PATH\"' 2>/dev/null || true); fi; _HP=$(printf '%s' \"$_HP\" | tr ' ' ':'); export PATH=\"${_HP:+$_HP:}$PATH\"; _C=\"${CLAUDE_CONFIG_DIR:-$HOME/.claude}\"; _E=\"${CLAUDE_PLUGIN_ROOT:-${PLUGIN_ROOT:-}}\"; _P=; if [ -n \"$_E\" ]; then _R=\"${_E%/}\"; [ -d \"$_R/plugin/scripts\" ] && _Q=\"$_R/plugin\" || _Q=\"$_R\"; [ -f \"$_Q/scripts/bun-runner.js\" ] && [ -f \"$_Q/scripts/
|
|
59
|
+
"command": "_HP=$(printenv PATH 2>/dev/null || true); if [ -z \"$_HP\" ] && [ -n \"${SHELL:-}\" ]; then _HP=$(\"$SHELL\" -lc 'printf %s \"$PATH\"' 2>/dev/null || true); fi; _HP=$(printf '%s' \"$_HP\" | tr ' ' ':'); export PATH=\"${_HP:+$_HP:}$PATH\"; _C=\"${CLAUDE_CONFIG_DIR:-$HOME/.claude}\"; _E=\"${CLAUDE_PLUGIN_ROOT:-${PLUGIN_ROOT:-}}\"; _P=; if [ -n \"$_E\" ]; then _R=\"${_E%/}\"; [ -d \"$_R/plugin/scripts\" ] && _Q=\"$_R/plugin\" || _Q=\"$_R\"; [ -f \"$_Q/scripts/bun-runner.js\" ] && [ -f \"$_Q/scripts/hook-runner.cjs\" ] && [ -d \"$_Q/node_modules/zod\" ] && _P=\"$_Q\"; fi; if [ -z \"$_P\" ]; then _F=; _P=$({ for _V in \"$_C/plugins/cache/memindex/memindex\"/[0-9]*/; do [ -d \"$_V\" ] || continue; [ -e \"${_V}.orphaned_at\" ] && continue; _B=${_V%/}; _B=${_B##*/}; case \"$_B\" in (*-*) _G=0;; (*) _G=1;; esac; _N=${_B%%-*}; _M1=${_N%%.*}; case \"$_N\" in (*.*) _T=${_N#*.};; (*) _T=0;; esac; _M2=${_T%%.*}; case \"$_T\" in (*.*) _U=${_T#*.};; (*) _U=0;; esac; _M3=${_U%%.*}; _M1=${_M1%%[!0-9]*}; _M2=${_M2%%[!0-9]*}; _M3=${_M3%%[!0-9]*}; printf '%08d%08d%08d%d %s\\n' \"${_M1:-0}\" \"${_M2:-0}\" \"${_M3:-0}\" \"$_G\" \"$_V\"; done 2>/dev/null | sort -r | sed 's/^[^ ]* //'; printf '%s\\n' \"$_C/plugins/marketplaces/memindex/plugin\"; } | while IFS= read -r _R; do _R=\"${_R%/}\"; [ -d \"$_R/plugin/scripts\" ] && _Q=\"$_R/plugin\" || _Q=\"$_R\"; [ -f \"$_Q/scripts/bun-runner.js\" ] && [ -f \"$_Q/scripts/hook-runner.cjs\" ] && [ -d \"$_Q/node_modules/zod\" ] && [ -z \"$_F\" ] && { _F=1; printf '%s\\n' \"$_Q\"; }; done); fi; [ -n \"$_P\" ] || { echo \"memindex: plugin scripts not found\" >&2; exit 1; }; command -v cygpath >/dev/null 2>&1 && { _W=$(cygpath -w \"$_P\" 2>/dev/null); [ -n \"$_W\" ] && _P=\"$_W\"; }; MEMINDEX_CODEX_HOOK=1 node \"$_P/scripts/bun-runner.js\" \"$_P/scripts/hook-runner.cjs\" hook codex summarize",
|
|
60
60
|
"timeout": 60,
|
|
61
|
-
"commandWindows": "node -e \"const fs=require('fs'),p=require('path'),o=require('os'),c=require('child_process');const h=o.homedir();const C=process.env.CLAUDE_CONFIG_DIR||p.join(h,'.claude');const roots=[];for(const v of [process.env.CLAUDE_PLUGIN_ROOT,process.env.PLUGIN_ROOT])if(v)roots.push(v);const cache=p.join(C,'plugins','cache','memindex','memindex');const S=n=>{const q=n.split('-')[0].split('.');return[parseInt(q[0],10)||0,parseInt(q[1],10)||0,parseInt(q[2],10)||0]};const W=(a,b)=>{const x=S(a),y=S(b);return(y[0]-x[0])||(y[1]-x[1])||(y[2]-x[2])||((a.indexOf('-')<0?0:1)-(b.indexOf('-')<0?0:1))||(a<b?1:a>b?-1:0)};try{roots.push(...fs.readdirSync(cache).filter(n=>{const ch=n.charAt(0);return ch>='0'&&ch<='9'}).map(n=>p.join(cache,n)).filter(r=>{try{return fs.statSync(r).isDirectory()&&!fs.existsSync(p.join(r,'.orphaned_at'))}catch{return false}}).sort((a,b)=>W(p.basename(a),p.basename(b))))}catch{}roots.push(p.join(C,'plugins','marketplaces', 'memindex','plugin'));let R=null;for(const k of roots){const r=fs.existsSync(p.join(k,'plugin','scripts'))?p.join(k,'plugin'):k;if(fs.existsSync(p.join(r,'scripts','bun-runner.js'))&&fs.existsSync(p.join(r,'scripts','
|
|
61
|
+
"commandWindows": "node -e \"const fs=require('fs'),p=require('path'),o=require('os'),c=require('child_process');const h=o.homedir();const C=process.env.CLAUDE_CONFIG_DIR||p.join(h,'.claude');const roots=[];for(const v of [process.env.CLAUDE_PLUGIN_ROOT,process.env.PLUGIN_ROOT])if(v)roots.push(v);const cache=p.join(C,'plugins','cache','memindex','memindex');const S=n=>{const q=n.split('-')[0].split('.');return[parseInt(q[0],10)||0,parseInt(q[1],10)||0,parseInt(q[2],10)||0]};const W=(a,b)=>{const x=S(a),y=S(b);return(y[0]-x[0])||(y[1]-x[1])||(y[2]-x[2])||((a.indexOf('-')<0?0:1)-(b.indexOf('-')<0?0:1))||(a<b?1:a>b?-1:0)};try{roots.push(...fs.readdirSync(cache).filter(n=>{const ch=n.charAt(0);return ch>='0'&&ch<='9'}).map(n=>p.join(cache,n)).filter(r=>{try{return fs.statSync(r).isDirectory()&&!fs.existsSync(p.join(r,'.orphaned_at'))}catch{return false}}).sort((a,b)=>W(p.basename(a),p.basename(b))))}catch{}roots.push(p.join(C,'plugins','marketplaces', 'memindex','plugin'));let R=null;for(const k of roots){const r=fs.existsSync(p.join(k,'plugin','scripts'))?p.join(k,'plugin'):k;if(fs.existsSync(p.join(r,'scripts','bun-runner.js'))&&fs.existsSync(p.join(r,'scripts','hook-runner.cjs'))&&fs.existsSync(p.join(r,'node_modules','zod'))){R=r;break}}if(!R){process.stderr.write('memindex: plugin scripts not found\\n');process.exit(1)}const env={...process.env,MEMINDEX_CODEX_HOOK:'1'};const workerArgs=['hook','codex','summarize'];const args=[p.join(R,'scripts','bun-runner.js'),p.join(R,'scripts','hook-runner.cjs'),...workerArgs];const res=c.spawnSync(process.execPath,args,{stdio:'inherit',env});if(res.error){process.stderr.write(String(res.error.message||res.error)+'\\n');process.exit(1)}process.exit(res.status==null?0:res.status)\""
|
|
62
62
|
}
|
|
63
63
|
]
|
|
64
64
|
}
|
|
@@ -68,9 +68,9 @@
|
|
|
68
68
|
"hooks": [
|
|
69
69
|
{
|
|
70
70
|
"type": "command",
|
|
71
|
-
"command": "_HP=$(printenv PATH 2>/dev/null || true); if [ -z \"$_HP\" ] && [ -n \"${SHELL:-}\" ]; then _HP=$(\"$SHELL\" -lc 'printf %s \"$PATH\"' 2>/dev/null || true); fi; _HP=$(printf '%s' \"$_HP\" | tr ' ' ':'); export PATH=\"${_HP:+$_HP:}$PATH\"; _C=\"${CLAUDE_CONFIG_DIR:-$HOME/.claude}\"; _E=\"${CLAUDE_PLUGIN_ROOT:-${PLUGIN_ROOT:-}}\"; _P=; if [ -n \"$_E\" ]; then _R=\"${_E%/}\"; [ -d \"$_R/plugin/scripts\" ] && _Q=\"$_R/plugin\" || _Q=\"$_R\"; [ -f \"$_Q/scripts/bun-runner.js\" ] && [ -f \"$_Q/scripts/
|
|
71
|
+
"command": "_HP=$(printenv PATH 2>/dev/null || true); if [ -z \"$_HP\" ] && [ -n \"${SHELL:-}\" ]; then _HP=$(\"$SHELL\" -lc 'printf %s \"$PATH\"' 2>/dev/null || true); fi; _HP=$(printf '%s' \"$_HP\" | tr ' ' ':'); export PATH=\"${_HP:+$_HP:}$PATH\"; _C=\"${CLAUDE_CONFIG_DIR:-$HOME/.claude}\"; _E=\"${CLAUDE_PLUGIN_ROOT:-${PLUGIN_ROOT:-}}\"; _P=; if [ -n \"$_E\" ]; then _R=\"${_E%/}\"; [ -d \"$_R/plugin/scripts\" ] && _Q=\"$_R/plugin\" || _Q=\"$_R\"; [ -f \"$_Q/scripts/bun-runner.js\" ] && [ -f \"$_Q/scripts/hook-runner.cjs\" ] && [ -d \"$_Q/node_modules/zod\" ] && _P=\"$_Q\"; fi; if [ -z \"$_P\" ]; then _F=; _P=$({ for _V in \"$_C/plugins/cache/memindex/memindex\"/[0-9]*/; do [ -d \"$_V\" ] || continue; [ -e \"${_V}.orphaned_at\" ] && continue; _B=${_V%/}; _B=${_B##*/}; case \"$_B\" in (*-*) _G=0;; (*) _G=1;; esac; _N=${_B%%-*}; _M1=${_N%%.*}; case \"$_N\" in (*.*) _T=${_N#*.};; (*) _T=0;; esac; _M2=${_T%%.*}; case \"$_T\" in (*.*) _U=${_T#*.};; (*) _U=0;; esac; _M3=${_U%%.*}; _M1=${_M1%%[!0-9]*}; _M2=${_M2%%[!0-9]*}; _M3=${_M3%%[!0-9]*}; printf '%08d%08d%08d%d %s\\n' \"${_M1:-0}\" \"${_M2:-0}\" \"${_M3:-0}\" \"$_G\" \"$_V\"; done 2>/dev/null | sort -r | sed 's/^[^ ]* //'; printf '%s\\n' \"$_C/plugins/marketplaces/memindex/plugin\"; } | while IFS= read -r _R; do _R=\"${_R%/}\"; [ -d \"$_R/plugin/scripts\" ] && _Q=\"$_R/plugin\" || _Q=\"$_R\"; [ -f \"$_Q/scripts/bun-runner.js\" ] && [ -f \"$_Q/scripts/hook-runner.cjs\" ] && [ -d \"$_Q/node_modules/zod\" ] && [ -z \"$_F\" ] && { _F=1; printf '%s\\n' \"$_Q\"; }; done); fi; [ -n \"$_P\" ] || { echo \"memindex: plugin scripts not found\" >&2; exit 1; }; command -v cygpath >/dev/null 2>&1 && { _W=$(cygpath -w \"$_P\" 2>/dev/null); [ -n \"$_W\" ] && _P=\"$_W\"; }; MEMINDEX_CODEX_HOOK=1 node \"$_P/scripts/bun-runner.js\" \"$_P/scripts/hook-runner.cjs\" hook codex subagent-context",
|
|
72
72
|
"timeout": 20,
|
|
73
|
-
"commandWindows": "node -e \"const fs=require('fs'),p=require('path'),o=require('os'),c=require('child_process');const h=o.homedir();const C=process.env.CLAUDE_CONFIG_DIR||p.join(h,'.claude');const roots=[];for(const v of [process.env.CLAUDE_PLUGIN_ROOT,process.env.PLUGIN_ROOT])if(v)roots.push(v);const cache=p.join(C,'plugins','cache','memindex','memindex');const S=n=>{const q=n.split('-')[0].split('.');return[parseInt(q[0],10)||0,parseInt(q[1],10)||0,parseInt(q[2],10)||0]};const W=(a,b)=>{const x=S(a),y=S(b);return(y[0]-x[0])||(y[1]-x[1])||(y[2]-x[2])||((a.indexOf('-')<0?0:1)-(b.indexOf('-')<0?0:1))||(a<b?1:a>b?-1:0)};try{roots.push(...fs.readdirSync(cache).filter(n=>{const ch=n.charAt(0);return ch>='0'&&ch<='9'}).map(n=>p.join(cache,n)).filter(r=>{try{return fs.statSync(r).isDirectory()&&!fs.existsSync(p.join(r,'.orphaned_at'))}catch{return false}}).sort((a,b)=>W(p.basename(a),p.basename(b))))}catch{}roots.push(p.join(C,'plugins','marketplaces', 'memindex','plugin'));let R=null;for(const k of roots){const r=fs.existsSync(p.join(k,'plugin','scripts'))?p.join(k,'plugin'):k;if(fs.existsSync(p.join(r,'scripts','bun-runner.js'))&&fs.existsSync(p.join(r,'scripts','
|
|
73
|
+
"commandWindows": "node -e \"const fs=require('fs'),p=require('path'),o=require('os'),c=require('child_process');const h=o.homedir();const C=process.env.CLAUDE_CONFIG_DIR||p.join(h,'.claude');const roots=[];for(const v of [process.env.CLAUDE_PLUGIN_ROOT,process.env.PLUGIN_ROOT])if(v)roots.push(v);const cache=p.join(C,'plugins','cache','memindex','memindex');const S=n=>{const q=n.split('-')[0].split('.');return[parseInt(q[0],10)||0,parseInt(q[1],10)||0,parseInt(q[2],10)||0]};const W=(a,b)=>{const x=S(a),y=S(b);return(y[0]-x[0])||(y[1]-x[1])||(y[2]-x[2])||((a.indexOf('-')<0?0:1)-(b.indexOf('-')<0?0:1))||(a<b?1:a>b?-1:0)};try{roots.push(...fs.readdirSync(cache).filter(n=>{const ch=n.charAt(0);return ch>='0'&&ch<='9'}).map(n=>p.join(cache,n)).filter(r=>{try{return fs.statSync(r).isDirectory()&&!fs.existsSync(p.join(r,'.orphaned_at'))}catch{return false}}).sort((a,b)=>W(p.basename(a),p.basename(b))))}catch{}roots.push(p.join(C,'plugins','marketplaces', 'memindex','plugin'));let R=null;for(const k of roots){const r=fs.existsSync(p.join(k,'plugin','scripts'))?p.join(k,'plugin'):k;if(fs.existsSync(p.join(r,'scripts','bun-runner.js'))&&fs.existsSync(p.join(r,'scripts','hook-runner.cjs'))&&fs.existsSync(p.join(r,'node_modules','zod'))){R=r;break}}if(!R){process.stderr.write('memindex: plugin scripts not found\\n');process.exit(1)}const env={...process.env,MEMINDEX_CODEX_HOOK:'1'};const workerArgs=['hook','codex','subagent-context'];const args=[p.join(R,'scripts','bun-runner.js'),p.join(R,'scripts','hook-runner.cjs'),...workerArgs];const res=c.spawnSync(process.execPath,args,{stdio:'inherit',env});if(res.error){process.stderr.write(String(res.error.message||res.error)+'\\n');process.exit(1)}process.exit(res.status==null?0:res.status)\""
|
|
74
74
|
}
|
|
75
75
|
]
|
|
76
76
|
}
|
|
@@ -80,9 +80,9 @@
|
|
|
80
80
|
"hooks": [
|
|
81
81
|
{
|
|
82
82
|
"type": "command",
|
|
83
|
-
"command": "_HP=$(printenv PATH 2>/dev/null || true); if [ -z \"$_HP\" ] && [ -n \"${SHELL:-}\" ]; then _HP=$(\"$SHELL\" -lc 'printf %s \"$PATH\"' 2>/dev/null || true); fi; _HP=$(printf '%s' \"$_HP\" | tr ' ' ':'); export PATH=\"${_HP:+$_HP:}$PATH\"; _C=\"${CLAUDE_CONFIG_DIR:-$HOME/.claude}\"; _E=\"${CLAUDE_PLUGIN_ROOT:-${PLUGIN_ROOT:-}}\"; _P=; if [ -n \"$_E\" ]; then _R=\"${_E%/}\"; [ -d \"$_R/plugin/scripts\" ] && _Q=\"$_R/plugin\" || _Q=\"$_R\"; [ -f \"$_Q/scripts/bun-runner.js\" ] && [ -f \"$_Q/scripts/
|
|
83
|
+
"command": "_HP=$(printenv PATH 2>/dev/null || true); if [ -z \"$_HP\" ] && [ -n \"${SHELL:-}\" ]; then _HP=$(\"$SHELL\" -lc 'printf %s \"$PATH\"' 2>/dev/null || true); fi; _HP=$(printf '%s' \"$_HP\" | tr ' ' ':'); export PATH=\"${_HP:+$_HP:}$PATH\"; _C=\"${CLAUDE_CONFIG_DIR:-$HOME/.claude}\"; _E=\"${CLAUDE_PLUGIN_ROOT:-${PLUGIN_ROOT:-}}\"; _P=; if [ -n \"$_E\" ]; then _R=\"${_E%/}\"; [ -d \"$_R/plugin/scripts\" ] && _Q=\"$_R/plugin\" || _Q=\"$_R\"; [ -f \"$_Q/scripts/bun-runner.js\" ] && [ -f \"$_Q/scripts/hook-runner.cjs\" ] && [ -d \"$_Q/node_modules/zod\" ] && _P=\"$_Q\"; fi; if [ -z \"$_P\" ]; then _F=; _P=$({ for _V in \"$_C/plugins/cache/memindex/memindex\"/[0-9]*/; do [ -d \"$_V\" ] || continue; [ -e \"${_V}.orphaned_at\" ] && continue; _B=${_V%/}; _B=${_B##*/}; case \"$_B\" in (*-*) _G=0;; (*) _G=1;; esac; _N=${_B%%-*}; _M1=${_N%%.*}; case \"$_N\" in (*.*) _T=${_N#*.};; (*) _T=0;; esac; _M2=${_T%%.*}; case \"$_T\" in (*.*) _U=${_T#*.};; (*) _U=0;; esac; _M3=${_U%%.*}; _M1=${_M1%%[!0-9]*}; _M2=${_M2%%[!0-9]*}; _M3=${_M3%%[!0-9]*}; printf '%08d%08d%08d%d %s\\n' \"${_M1:-0}\" \"${_M2:-0}\" \"${_M3:-0}\" \"$_G\" \"$_V\"; done 2>/dev/null | sort -r | sed 's/^[^ ]* //'; printf '%s\\n' \"$_C/plugins/marketplaces/memindex/plugin\"; } | while IFS= read -r _R; do _R=\"${_R%/}\"; [ -d \"$_R/plugin/scripts\" ] && _Q=\"$_R/plugin\" || _Q=\"$_R\"; [ -f \"$_Q/scripts/bun-runner.js\" ] && [ -f \"$_Q/scripts/hook-runner.cjs\" ] && [ -d \"$_Q/node_modules/zod\" ] && [ -z \"$_F\" ] && { _F=1; printf '%s\\n' \"$_Q\"; }; done); fi; [ -n \"$_P\" ] || { echo \"memindex: plugin scripts not found\" >&2; exit 1; }; command -v cygpath >/dev/null 2>&1 && { _W=$(cygpath -w \"$_P\" 2>/dev/null); [ -n \"$_W\" ] && _P=\"$_W\"; }; MEMINDEX_CODEX_HOOK=1 node \"$_P/scripts/bun-runner.js\" \"$_P/scripts/hook-runner.cjs\" hook codex post-compact",
|
|
84
84
|
"timeout": 20,
|
|
85
|
-
"commandWindows": "node -e \"const fs=require('fs'),p=require('path'),o=require('os'),c=require('child_process');const h=o.homedir();const C=process.env.CLAUDE_CONFIG_DIR||p.join(h,'.claude');const roots=[];for(const v of [process.env.CLAUDE_PLUGIN_ROOT,process.env.PLUGIN_ROOT])if(v)roots.push(v);const cache=p.join(C,'plugins','cache','memindex','memindex');const S=n=>{const q=n.split('-')[0].split('.');return[parseInt(q[0],10)||0,parseInt(q[1],10)||0,parseInt(q[2],10)||0]};const W=(a,b)=>{const x=S(a),y=S(b);return(y[0]-x[0])||(y[1]-x[1])||(y[2]-x[2])||((a.indexOf('-')<0?0:1)-(b.indexOf('-')<0?0:1))||(a<b?1:a>b?-1:0)};try{roots.push(...fs.readdirSync(cache).filter(n=>{const ch=n.charAt(0);return ch>='0'&&ch<='9'}).map(n=>p.join(cache,n)).filter(r=>{try{return fs.statSync(r).isDirectory()&&!fs.existsSync(p.join(r,'.orphaned_at'))}catch{return false}}).sort((a,b)=>W(p.basename(a),p.basename(b))))}catch{}roots.push(p.join(C,'plugins','marketplaces', 'memindex','plugin'));let R=null;for(const k of roots){const r=fs.existsSync(p.join(k,'plugin','scripts'))?p.join(k,'plugin'):k;if(fs.existsSync(p.join(r,'scripts','bun-runner.js'))&&fs.existsSync(p.join(r,'scripts','
|
|
85
|
+
"commandWindows": "node -e \"const fs=require('fs'),p=require('path'),o=require('os'),c=require('child_process');const h=o.homedir();const C=process.env.CLAUDE_CONFIG_DIR||p.join(h,'.claude');const roots=[];for(const v of [process.env.CLAUDE_PLUGIN_ROOT,process.env.PLUGIN_ROOT])if(v)roots.push(v);const cache=p.join(C,'plugins','cache','memindex','memindex');const S=n=>{const q=n.split('-')[0].split('.');return[parseInt(q[0],10)||0,parseInt(q[1],10)||0,parseInt(q[2],10)||0]};const W=(a,b)=>{const x=S(a),y=S(b);return(y[0]-x[0])||(y[1]-x[1])||(y[2]-x[2])||((a.indexOf('-')<0?0:1)-(b.indexOf('-')<0?0:1))||(a<b?1:a>b?-1:0)};try{roots.push(...fs.readdirSync(cache).filter(n=>{const ch=n.charAt(0);return ch>='0'&&ch<='9'}).map(n=>p.join(cache,n)).filter(r=>{try{return fs.statSync(r).isDirectory()&&!fs.existsSync(p.join(r,'.orphaned_at'))}catch{return false}}).sort((a,b)=>W(p.basename(a),p.basename(b))))}catch{}roots.push(p.join(C,'plugins','marketplaces', 'memindex','plugin'));let R=null;for(const k of roots){const r=fs.existsSync(p.join(k,'plugin','scripts'))?p.join(k,'plugin'):k;if(fs.existsSync(p.join(r,'scripts','bun-runner.js'))&&fs.existsSync(p.join(r,'scripts','hook-runner.cjs'))&&fs.existsSync(p.join(r,'node_modules','zod'))){R=r;break}}if(!R){process.stderr.write('memindex: plugin scripts not found\\n');process.exit(1)}const env={...process.env,MEMINDEX_CODEX_HOOK:'1'};const workerArgs=['hook','codex','post-compact'];const args=[p.join(R,'scripts','bun-runner.js'),p.join(R,'scripts','hook-runner.cjs'),...workerArgs];const res=c.spawnSync(process.execPath,args,{stdio:'inherit',env});if(res.error){process.stderr.write(String(res.error.message||res.error)+'\\n');process.exit(1)}process.exit(res.status==null?0:res.status)\""
|
|
86
86
|
}
|
|
87
87
|
]
|
|
88
88
|
}
|
package/plugin/hooks/hooks.json
CHANGED
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
{
|
|
34
34
|
"type": "command",
|
|
35
35
|
"shell": "bash",
|
|
36
|
-
"command": "export PATH=\"$HOME/.local/bin:/usr/local/bin:/opt/homebrew/bin:$PATH\"; if [ -d \"$HOME/.nvm/versions/node\" ]; then export PATH=\"$HOME/.nvm/versions/node/v$(ls \"$HOME/.nvm/versions/node\" 2>/dev/null | sed 's/^v//' | sort -t. -k1,1n -k2,2n -k3,3n | tail -1)/bin:$PATH\"; fi; _C=\"${CLAUDE_CONFIG_DIR:-$HOME/.claude}\"; _E=\"${CLAUDE_PLUGIN_ROOT:-${PLUGIN_ROOT:-}}\"; _P=; if [ -n \"$_E\" ]; then _R=\"${_E%/}\"; [ -d \"$_R/plugin/scripts\" ] && _Q=\"$_R/plugin\" || _Q=\"$_R\"; [ -f \"$_Q/scripts/bun-runner.js\" ] && [ -f \"$_Q/scripts/
|
|
36
|
+
"command": "export PATH=\"$HOME/.local/bin:/usr/local/bin:/opt/homebrew/bin:$PATH\"; if [ -d \"$HOME/.nvm/versions/node\" ]; then export PATH=\"$HOME/.nvm/versions/node/v$(ls \"$HOME/.nvm/versions/node\" 2>/dev/null | sed 's/^v//' | sort -t. -k1,1n -k2,2n -k3,3n | tail -1)/bin:$PATH\"; fi; _C=\"${CLAUDE_CONFIG_DIR:-$HOME/.claude}\"; _E=\"${CLAUDE_PLUGIN_ROOT:-${PLUGIN_ROOT:-}}\"; _P=; if [ -n \"$_E\" ]; then _R=\"${_E%/}\"; [ -d \"$_R/plugin/scripts\" ] && _Q=\"$_R/plugin\" || _Q=\"$_R\"; [ -f \"$_Q/scripts/bun-runner.js\" ] && [ -f \"$_Q/scripts/hook-runner.cjs\" ] && _P=\"$_Q\"; fi; if [ -z \"$_P\" ]; then _F=; _P=$({ for _V in \"$_C/plugins/cache/memindex/memindex\"/[0-9]*/; do [ -d \"$_V\" ] || continue; [ -e \"${_V}.orphaned_at\" ] && continue; _B=${_V%/}; _B=${_B##*/}; case \"$_B\" in (*-*) _G=0;; (*) _G=1;; esac; _N=${_B%%-*}; _M1=${_N%%.*}; case \"$_N\" in (*.*) _T=${_N#*.};; (*) _T=0;; esac; _M2=${_T%%.*}; case \"$_T\" in (*.*) _U=${_T#*.};; (*) _U=0;; esac; _M3=${_U%%.*}; _M1=${_M1%%[!0-9]*}; _M2=${_M2%%[!0-9]*}; _M3=${_M3%%[!0-9]*}; printf '%08d%08d%08d%d %s\\n' \"${_M1:-0}\" \"${_M2:-0}\" \"${_M3:-0}\" \"$_G\" \"$_V\"; done 2>/dev/null | sort -r | sed 's/^[^ ]* //'; printf '%s\\n' \"$_C/plugins/marketplaces/memindex/plugin\"; } | while IFS= read -r _R; do _R=\"${_R%/}\"; [ -d \"$_R/plugin/scripts\" ] && _Q=\"$_R/plugin\" || _Q=\"$_R\"; [ -f \"$_Q/scripts/bun-runner.js\" ] && [ -f \"$_Q/scripts/hook-runner.cjs\" ] && [ -z \"$_F\" ] && { _F=1; printf '%s\\n' \"$_Q\"; }; done); fi; [ -n \"$_P\" ] || { echo \"memindex: plugin scripts not found\" >&2; exit 0; }; command -v cygpath >/dev/null 2>&1 && { _W=$(cygpath -w \"$_P\" 2>/dev/null); [ -n \"$_W\" ] && _P=\"$_W\"; }; { node \"$_P/scripts/bun-runner.js\" \"$_P/scripts/hook-runner.cjs\" hook claude-code context; } || { _S=$?; echo \"memindex: hook command failed (exit $_S)\" >&2; exit 0; }",
|
|
37
37
|
"timeout": 60
|
|
38
38
|
}
|
|
39
39
|
]
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
{
|
|
46
46
|
"type": "command",
|
|
47
47
|
"shell": "bash",
|
|
48
|
-
"command": "export PATH=\"$HOME/.local/bin:/usr/local/bin:/opt/homebrew/bin:$PATH\"; if [ -d \"$HOME/.nvm/versions/node\" ]; then export PATH=\"$HOME/.nvm/versions/node/v$(ls \"$HOME/.nvm/versions/node\" 2>/dev/null | sed 's/^v//' | sort -t. -k1,1n -k2,2n -k3,3n | tail -1)/bin:$PATH\"; fi; _C=\"${CLAUDE_CONFIG_DIR:-$HOME/.claude}\"; _E=\"${CLAUDE_PLUGIN_ROOT:-${PLUGIN_ROOT:-}}\"; _P=; if [ -n \"$_E\" ]; then _R=\"${_E%/}\"; [ -d \"$_R/plugin/scripts\" ] && _Q=\"$_R/plugin\" || _Q=\"$_R\"; [ -f \"$_Q/scripts/bun-runner.js\" ] && [ -f \"$_Q/scripts/
|
|
48
|
+
"command": "export PATH=\"$HOME/.local/bin:/usr/local/bin:/opt/homebrew/bin:$PATH\"; if [ -d \"$HOME/.nvm/versions/node\" ]; then export PATH=\"$HOME/.nvm/versions/node/v$(ls \"$HOME/.nvm/versions/node\" 2>/dev/null | sed 's/^v//' | sort -t. -k1,1n -k2,2n -k3,3n | tail -1)/bin:$PATH\"; fi; _C=\"${CLAUDE_CONFIG_DIR:-$HOME/.claude}\"; _E=\"${CLAUDE_PLUGIN_ROOT:-${PLUGIN_ROOT:-}}\"; _P=; if [ -n \"$_E\" ]; then _R=\"${_E%/}\"; [ -d \"$_R/plugin/scripts\" ] && _Q=\"$_R/plugin\" || _Q=\"$_R\"; [ -f \"$_Q/scripts/bun-runner.js\" ] && [ -f \"$_Q/scripts/hook-runner.cjs\" ] && _P=\"$_Q\"; fi; if [ -z \"$_P\" ]; then _F=; _P=$({ for _V in \"$_C/plugins/cache/memindex/memindex\"/[0-9]*/; do [ -d \"$_V\" ] || continue; [ -e \"${_V}.orphaned_at\" ] && continue; _B=${_V%/}; _B=${_B##*/}; case \"$_B\" in (*-*) _G=0;; (*) _G=1;; esac; _N=${_B%%-*}; _M1=${_N%%.*}; case \"$_N\" in (*.*) _T=${_N#*.};; (*) _T=0;; esac; _M2=${_T%%.*}; case \"$_T\" in (*.*) _U=${_T#*.};; (*) _U=0;; esac; _M3=${_U%%.*}; _M1=${_M1%%[!0-9]*}; _M2=${_M2%%[!0-9]*}; _M3=${_M3%%[!0-9]*}; printf '%08d%08d%08d%d %s\\n' \"${_M1:-0}\" \"${_M2:-0}\" \"${_M3:-0}\" \"$_G\" \"$_V\"; done 2>/dev/null | sort -r | sed 's/^[^ ]* //'; printf '%s\\n' \"$_C/plugins/marketplaces/memindex/plugin\"; } | while IFS= read -r _R; do _R=\"${_R%/}\"; [ -d \"$_R/plugin/scripts\" ] && _Q=\"$_R/plugin\" || _Q=\"$_R\"; [ -f \"$_Q/scripts/bun-runner.js\" ] && [ -f \"$_Q/scripts/hook-runner.cjs\" ] && [ -z \"$_F\" ] && { _F=1; printf '%s\\n' \"$_Q\"; }; done); fi; [ -n \"$_P\" ] || { echo \"memindex: plugin scripts not found\" >&2; exit 0; }; command -v cygpath >/dev/null 2>&1 && { _W=$(cygpath -w \"$_P\" 2>/dev/null); [ -n \"$_W\" ] && _P=\"$_W\"; }; { node \"$_P/scripts/bun-runner.js\" \"$_P/scripts/hook-runner.cjs\" hook claude-code session-init; } || { _S=$?; echo \"memindex: hook command failed (exit $_S)\" >&2; exit 0; }",
|
|
49
49
|
"timeout": 15
|
|
50
50
|
}
|
|
51
51
|
]
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
{
|
|
59
59
|
"type": "command",
|
|
60
60
|
"shell": "bash",
|
|
61
|
-
"command": "if [ \"${MEMINDEX_DISABLE_TOOL_HOOKS:-${AGENT_MEM_DISABLE_TOOL_HOOKS:-}}\" = 1 ] || [ \"${MEMINDEX_DISABLE_OBSERVATION:-${AGENT_MEM_DISABLE_OBSERVATION:-}}\" = 1 ]; then exit 0; fi; export PATH=\"$HOME/.local/bin:/usr/local/bin:/opt/homebrew/bin:$PATH\"; if [ -d \"$HOME/.nvm/versions/node\" ]; then export PATH=\"$HOME/.nvm/versions/node/v$(ls \"$HOME/.nvm/versions/node\" 2>/dev/null | sed 's/^v//' | sort -t. -k1,1n -k2,2n -k3,3n | tail -1)/bin:$PATH\"; fi; _C=\"${CLAUDE_CONFIG_DIR:-$HOME/.claude}\"; _E=\"${CLAUDE_PLUGIN_ROOT:-${PLUGIN_ROOT:-}}\"; _P=; if [ -n \"$_E\" ]; then _R=\"${_E%/}\"; [ -d \"$_R/plugin/scripts\" ] && _Q=\"$_R/plugin\" || _Q=\"$_R\"; [ -f \"$_Q/scripts/bun-runner.js\" ] && [ -f \"$_Q/scripts/
|
|
61
|
+
"command": "if [ \"${MEMINDEX_DISABLE_TOOL_HOOKS:-${AGENT_MEM_DISABLE_TOOL_HOOKS:-}}\" = 1 ] || [ \"${MEMINDEX_DISABLE_OBSERVATION:-${AGENT_MEM_DISABLE_OBSERVATION:-}}\" = 1 ]; then exit 0; fi; export PATH=\"$HOME/.local/bin:/usr/local/bin:/opt/homebrew/bin:$PATH\"; if [ -d \"$HOME/.nvm/versions/node\" ]; then export PATH=\"$HOME/.nvm/versions/node/v$(ls \"$HOME/.nvm/versions/node\" 2>/dev/null | sed 's/^v//' | sort -t. -k1,1n -k2,2n -k3,3n | tail -1)/bin:$PATH\"; fi; _C=\"${CLAUDE_CONFIG_DIR:-$HOME/.claude}\"; _E=\"${CLAUDE_PLUGIN_ROOT:-${PLUGIN_ROOT:-}}\"; _P=; if [ -n \"$_E\" ]; then _R=\"${_E%/}\"; [ -d \"$_R/plugin/scripts\" ] && _Q=\"$_R/plugin\" || _Q=\"$_R\"; [ -f \"$_Q/scripts/bun-runner.js\" ] && [ -f \"$_Q/scripts/hook-runner.cjs\" ] && _P=\"$_Q\"; fi; if [ -z \"$_P\" ]; then _F=; _P=$({ for _V in \"$_C/plugins/cache/memindex/memindex\"/[0-9]*/; do [ -d \"$_V\" ] || continue; [ -e \"${_V}.orphaned_at\" ] && continue; _B=${_V%/}; _B=${_B##*/}; case \"$_B\" in (*-*) _G=0;; (*) _G=1;; esac; _N=${_B%%-*}; _M1=${_N%%.*}; case \"$_N\" in (*.*) _T=${_N#*.};; (*) _T=0;; esac; _M2=${_T%%.*}; case \"$_T\" in (*.*) _U=${_T#*.};; (*) _U=0;; esac; _M3=${_U%%.*}; _M1=${_M1%%[!0-9]*}; _M2=${_M2%%[!0-9]*}; _M3=${_M3%%[!0-9]*}; printf '%08d%08d%08d%d %s\\n' \"${_M1:-0}\" \"${_M2:-0}\" \"${_M3:-0}\" \"$_G\" \"$_V\"; done 2>/dev/null | sort -r | sed 's/^[^ ]* //'; printf '%s\\n' \"$_C/plugins/marketplaces/memindex/plugin\"; } | while IFS= read -r _R; do _R=\"${_R%/}\"; [ -d \"$_R/plugin/scripts\" ] && _Q=\"$_R/plugin\" || _Q=\"$_R\"; [ -f \"$_Q/scripts/bun-runner.js\" ] && [ -f \"$_Q/scripts/hook-runner.cjs\" ] && [ -z \"$_F\" ] && { _F=1; printf '%s\\n' \"$_Q\"; }; done); fi; [ -n \"$_P\" ] || { echo \"memindex: plugin scripts not found\" >&2; exit 0; }; command -v cygpath >/dev/null 2>&1 && { _W=$(cygpath -w \"$_P\" 2>/dev/null); [ -n \"$_W\" ] && _P=\"$_W\"; }; { node \"$_P/scripts/bun-runner.js\" \"$_P/scripts/hook-runner.cjs\" hook claude-code observation; } || { _S=$?; echo \"memindex: hook command failed (exit $_S)\" >&2; exit 0; }",
|
|
62
62
|
"timeout": 120,
|
|
63
63
|
"async": true
|
|
64
64
|
}
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
{
|
|
73
73
|
"type": "command",
|
|
74
74
|
"shell": "bash",
|
|
75
|
-
"command": "if [ \"${MEMINDEX_DISABLE_TOOL_HOOKS:-${AGENT_MEM_DISABLE_TOOL_HOOKS:-}}\" = 1 ] || [ \"${MEMINDEX_DISABLE_OBSERVATION:-${AGENT_MEM_DISABLE_OBSERVATION:-}}\" = 1 ]; then exit 0; fi; export PATH=\"$HOME/.local/bin:/usr/local/bin:/opt/homebrew/bin:$PATH\"; if [ -d \"$HOME/.nvm/versions/node\" ]; then export PATH=\"$HOME/.nvm/versions/node/v$(ls \"$HOME/.nvm/versions/node\" 2>/dev/null | sed 's/^v//' | sort -t. -k1,1n -k2,2n -k3,3n | tail -1)/bin:$PATH\"; fi; _C=\"${CLAUDE_CONFIG_DIR:-$HOME/.claude}\"; _E=\"${CLAUDE_PLUGIN_ROOT:-${PLUGIN_ROOT:-}}\"; _P=; if [ -n \"$_E\" ]; then _R=\"${_E%/}\"; [ -d \"$_R/plugin/scripts\" ] && _Q=\"$_R/plugin\" || _Q=\"$_R\"; [ -f \"$_Q/scripts/bun-runner.js\" ] && [ -f \"$_Q/scripts/
|
|
75
|
+
"command": "if [ \"${MEMINDEX_DISABLE_TOOL_HOOKS:-${AGENT_MEM_DISABLE_TOOL_HOOKS:-}}\" = 1 ] || [ \"${MEMINDEX_DISABLE_OBSERVATION:-${AGENT_MEM_DISABLE_OBSERVATION:-}}\" = 1 ]; then exit 0; fi; export PATH=\"$HOME/.local/bin:/usr/local/bin:/opt/homebrew/bin:$PATH\"; if [ -d \"$HOME/.nvm/versions/node\" ]; then export PATH=\"$HOME/.nvm/versions/node/v$(ls \"$HOME/.nvm/versions/node\" 2>/dev/null | sed 's/^v//' | sort -t. -k1,1n -k2,2n -k3,3n | tail -1)/bin:$PATH\"; fi; _C=\"${CLAUDE_CONFIG_DIR:-$HOME/.claude}\"; _E=\"${CLAUDE_PLUGIN_ROOT:-${PLUGIN_ROOT:-}}\"; _P=; if [ -n \"$_E\" ]; then _R=\"${_E%/}\"; [ -d \"$_R/plugin/scripts\" ] && _Q=\"$_R/plugin\" || _Q=\"$_R\"; [ -f \"$_Q/scripts/bun-runner.js\" ] && [ -f \"$_Q/scripts/hook-runner.cjs\" ] && _P=\"$_Q\"; fi; if [ -z \"$_P\" ]; then _F=; _P=$({ for _V in \"$_C/plugins/cache/memindex/memindex\"/[0-9]*/; do [ -d \"$_V\" ] || continue; [ -e \"${_V}.orphaned_at\" ] && continue; _B=${_V%/}; _B=${_B##*/}; case \"$_B\" in (*-*) _G=0;; (*) _G=1;; esac; _N=${_B%%-*}; _M1=${_N%%.*}; case \"$_N\" in (*.*) _T=${_N#*.};; (*) _T=0;; esac; _M2=${_T%%.*}; case \"$_T\" in (*.*) _U=${_T#*.};; (*) _U=0;; esac; _M3=${_U%%.*}; _M1=${_M1%%[!0-9]*}; _M2=${_M2%%[!0-9]*}; _M3=${_M3%%[!0-9]*}; printf '%08d%08d%08d%d %s\\n' \"${_M1:-0}\" \"${_M2:-0}\" \"${_M3:-0}\" \"$_G\" \"$_V\"; done 2>/dev/null | sort -r | sed 's/^[^ ]* //'; printf '%s\\n' \"$_C/plugins/marketplaces/memindex/plugin\"; } | while IFS= read -r _R; do _R=\"${_R%/}\"; [ -d \"$_R/plugin/scripts\" ] && _Q=\"$_R/plugin\" || _Q=\"$_R\"; [ -f \"$_Q/scripts/bun-runner.js\" ] && [ -f \"$_Q/scripts/hook-runner.cjs\" ] && [ -z \"$_F\" ] && { _F=1; printf '%s\\n' \"$_Q\"; }; done); fi; [ -n \"$_P\" ] || { echo \"memindex: plugin scripts not found\" >&2; exit 0; }; command -v cygpath >/dev/null 2>&1 && { _W=$(cygpath -w \"$_P\" 2>/dev/null); [ -n \"$_W\" ] && _P=\"$_W\"; }; { node \"$_P/scripts/bun-runner.js\" \"$_P/scripts/hook-runner.cjs\" hook claude-code observation; } || { _S=$?; echo \"memindex: hook command failed (exit $_S)\" >&2; exit 0; }",
|
|
76
76
|
"timeout": 120,
|
|
77
77
|
"async": true
|
|
78
78
|
}
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
{
|
|
87
87
|
"type": "command",
|
|
88
88
|
"shell": "bash",
|
|
89
|
-
"command": "if [ \"${MEMINDEX_DISABLE_TOOL_HOOKS:-${AGENT_MEM_DISABLE_TOOL_HOOKS:-}}\" = 1 ] || [ \"${MEMINDEX_DISABLE_FILE_CONTEXT:-${AGENT_MEM_DISABLE_FILE_CONTEXT:-}}\" = 1 ]; then exit 0; fi; export PATH=\"$HOME/.local/bin:/usr/local/bin:/opt/homebrew/bin:$PATH\"; if [ -d \"$HOME/.nvm/versions/node\" ]; then export PATH=\"$HOME/.nvm/versions/node/v$(ls \"$HOME/.nvm/versions/node\" 2>/dev/null | sed 's/^v//' | sort -t. -k1,1n -k2,2n -k3,3n | tail -1)/bin:$PATH\"; fi; _C=\"${CLAUDE_CONFIG_DIR:-$HOME/.claude}\"; _E=\"${CLAUDE_PLUGIN_ROOT:-${PLUGIN_ROOT:-}}\"; _P=; if [ -n \"$_E\" ]; then _R=\"${_E%/}\"; [ -d \"$_R/plugin/scripts\" ] && _Q=\"$_R/plugin\" || _Q=\"$_R\"; [ -f \"$_Q/scripts/bun-runner.js\" ] && [ -f \"$_Q/scripts/
|
|
89
|
+
"command": "if [ \"${MEMINDEX_DISABLE_TOOL_HOOKS:-${AGENT_MEM_DISABLE_TOOL_HOOKS:-}}\" = 1 ] || [ \"${MEMINDEX_DISABLE_FILE_CONTEXT:-${AGENT_MEM_DISABLE_FILE_CONTEXT:-}}\" = 1 ]; then exit 0; fi; export PATH=\"$HOME/.local/bin:/usr/local/bin:/opt/homebrew/bin:$PATH\"; if [ -d \"$HOME/.nvm/versions/node\" ]; then export PATH=\"$HOME/.nvm/versions/node/v$(ls \"$HOME/.nvm/versions/node\" 2>/dev/null | sed 's/^v//' | sort -t. -k1,1n -k2,2n -k3,3n | tail -1)/bin:$PATH\"; fi; _C=\"${CLAUDE_CONFIG_DIR:-$HOME/.claude}\"; _E=\"${CLAUDE_PLUGIN_ROOT:-${PLUGIN_ROOT:-}}\"; _P=; if [ -n \"$_E\" ]; then _R=\"${_E%/}\"; [ -d \"$_R/plugin/scripts\" ] && _Q=\"$_R/plugin\" || _Q=\"$_R\"; [ -f \"$_Q/scripts/bun-runner.js\" ] && [ -f \"$_Q/scripts/hook-runner.cjs\" ] && _P=\"$_Q\"; fi; if [ -z \"$_P\" ]; then _F=; _P=$({ for _V in \"$_C/plugins/cache/memindex/memindex\"/[0-9]*/; do [ -d \"$_V\" ] || continue; [ -e \"${_V}.orphaned_at\" ] && continue; _B=${_V%/}; _B=${_B##*/}; case \"$_B\" in (*-*) _G=0;; (*) _G=1;; esac; _N=${_B%%-*}; _M1=${_N%%.*}; case \"$_N\" in (*.*) _T=${_N#*.};; (*) _T=0;; esac; _M2=${_T%%.*}; case \"$_T\" in (*.*) _U=${_T#*.};; (*) _U=0;; esac; _M3=${_U%%.*}; _M1=${_M1%%[!0-9]*}; _M2=${_M2%%[!0-9]*}; _M3=${_M3%%[!0-9]*}; printf '%08d%08d%08d%d %s\\n' \"${_M1:-0}\" \"${_M2:-0}\" \"${_M3:-0}\" \"$_G\" \"$_V\"; done 2>/dev/null | sort -r | sed 's/^[^ ]* //'; printf '%s\\n' \"$_C/plugins/marketplaces/memindex/plugin\"; } | while IFS= read -r _R; do _R=\"${_R%/}\"; [ -d \"$_R/plugin/scripts\" ] && _Q=\"$_R/plugin\" || _Q=\"$_R\"; [ -f \"$_Q/scripts/bun-runner.js\" ] && [ -f \"$_Q/scripts/hook-runner.cjs\" ] && [ -z \"$_F\" ] && { _F=1; printf '%s\\n' \"$_Q\"; }; done); fi; [ -n \"$_P\" ] || { echo \"memindex: plugin scripts not found\" >&2; exit 0; }; command -v cygpath >/dev/null 2>&1 && { _W=$(cygpath -w \"$_P\" 2>/dev/null); [ -n \"$_W\" ] && _P=\"$_W\"; }; { node \"$_P/scripts/bun-runner.js\" \"$_P/scripts/hook-runner.cjs\" hook claude-code file-context; } || { _S=$?; echo \"memindex: hook command failed (exit $_S)\" >&2; exit 0; }",
|
|
90
90
|
"timeout": 15
|
|
91
91
|
}
|
|
92
92
|
]
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
{
|
|
99
99
|
"type": "command",
|
|
100
100
|
"shell": "bash",
|
|
101
|
-
"command": "export PATH=\"$HOME/.local/bin:/usr/local/bin:/opt/homebrew/bin:$PATH\"; if [ -d \"$HOME/.nvm/versions/node\" ]; then export PATH=\"$HOME/.nvm/versions/node/v$(ls \"$HOME/.nvm/versions/node\" 2>/dev/null | sed 's/^v//' | sort -t. -k1,1n -k2,2n -k3,3n | tail -1)/bin:$PATH\"; fi; _C=\"${CLAUDE_CONFIG_DIR:-$HOME/.claude}\"; _E=\"${CLAUDE_PLUGIN_ROOT:-${PLUGIN_ROOT:-}}\"; _P=; if [ -n \"$_E\" ]; then _R=\"${_E%/}\"; [ -d \"$_R/plugin/scripts\" ] && _Q=\"$_R/plugin\" || _Q=\"$_R\"; [ -f \"$_Q/scripts/bun-runner.js\" ] && [ -f \"$_Q/scripts/
|
|
101
|
+
"command": "export PATH=\"$HOME/.local/bin:/usr/local/bin:/opt/homebrew/bin:$PATH\"; if [ -d \"$HOME/.nvm/versions/node\" ]; then export PATH=\"$HOME/.nvm/versions/node/v$(ls \"$HOME/.nvm/versions/node\" 2>/dev/null | sed 's/^v//' | sort -t. -k1,1n -k2,2n -k3,3n | tail -1)/bin:$PATH\"; fi; _C=\"${CLAUDE_CONFIG_DIR:-$HOME/.claude}\"; _E=\"${CLAUDE_PLUGIN_ROOT:-${PLUGIN_ROOT:-}}\"; _P=; if [ -n \"$_E\" ]; then _R=\"${_E%/}\"; [ -d \"$_R/plugin/scripts\" ] && _Q=\"$_R/plugin\" || _Q=\"$_R\"; [ -f \"$_Q/scripts/bun-runner.js\" ] && [ -f \"$_Q/scripts/hook-runner.cjs\" ] && _P=\"$_Q\"; fi; if [ -z \"$_P\" ]; then _F=; _P=$({ for _V in \"$_C/plugins/cache/memindex/memindex\"/[0-9]*/; do [ -d \"$_V\" ] || continue; [ -e \"${_V}.orphaned_at\" ] && continue; _B=${_V%/}; _B=${_B##*/}; case \"$_B\" in (*-*) _G=0;; (*) _G=1;; esac; _N=${_B%%-*}; _M1=${_N%%.*}; case \"$_N\" in (*.*) _T=${_N#*.};; (*) _T=0;; esac; _M2=${_T%%.*}; case \"$_T\" in (*.*) _U=${_T#*.};; (*) _U=0;; esac; _M3=${_U%%.*}; _M1=${_M1%%[!0-9]*}; _M2=${_M2%%[!0-9]*}; _M3=${_M3%%[!0-9]*}; printf '%08d%08d%08d%d %s\\n' \"${_M1:-0}\" \"${_M2:-0}\" \"${_M3:-0}\" \"$_G\" \"$_V\"; done 2>/dev/null | sort -r | sed 's/^[^ ]* //'; printf '%s\\n' \"$_C/plugins/marketplaces/memindex/plugin\"; } | while IFS= read -r _R; do _R=\"${_R%/}\"; [ -d \"$_R/plugin/scripts\" ] && _Q=\"$_R/plugin\" || _Q=\"$_R\"; [ -f \"$_Q/scripts/bun-runner.js\" ] && [ -f \"$_Q/scripts/hook-runner.cjs\" ] && [ -z \"$_F\" ] && { _F=1; printf '%s\\n' \"$_Q\"; }; done); fi; [ -n \"$_P\" ] || { echo \"memindex: plugin scripts not found\" >&2; exit 0; }; command -v cygpath >/dev/null 2>&1 && { _W=$(cygpath -w \"$_P\" 2>/dev/null); [ -n \"$_W\" ] && _P=\"$_W\"; }; { node \"$_P/scripts/bun-runner.js\" \"$_P/scripts/hook-runner.cjs\" hook claude-code summarize; } || { _S=$?; echo \"memindex: hook command failed (exit $_S)\" >&2; exit 0; }",
|
|
102
102
|
"timeout": 120
|
|
103
103
|
}
|
|
104
104
|
],
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
{
|
|
112
112
|
"type": "command",
|
|
113
113
|
"shell": "bash",
|
|
114
|
-
"command": "export PATH=\"$HOME/.local/bin:/usr/local/bin:/opt/homebrew/bin:$PATH\"; if [ -d \"$HOME/.nvm/versions/node\" ]; then export PATH=\"$HOME/.nvm/versions/node/v$(ls \"$HOME/.nvm/versions/node\" 2>/dev/null | sed 's/^v//' | sort -t. -k1,1n -k2,2n -k3,3n | tail -1)/bin:$PATH\"; fi; _C=\"${CLAUDE_CONFIG_DIR:-$HOME/.claude}\"; _E=\"${CLAUDE_PLUGIN_ROOT:-${PLUGIN_ROOT:-}}\"; _P=; if [ -n \"$_E\" ]; then _R=\"${_E%/}\"; [ -d \"$_R/plugin/scripts\" ] && _Q=\"$_R/plugin\" || _Q=\"$_R\"; [ -f \"$_Q/scripts/bun-runner.js\" ] && [ -f \"$_Q/scripts/
|
|
114
|
+
"command": "export PATH=\"$HOME/.local/bin:/usr/local/bin:/opt/homebrew/bin:$PATH\"; if [ -d \"$HOME/.nvm/versions/node\" ]; then export PATH=\"$HOME/.nvm/versions/node/v$(ls \"$HOME/.nvm/versions/node\" 2>/dev/null | sed 's/^v//' | sort -t. -k1,1n -k2,2n -k3,3n | tail -1)/bin:$PATH\"; fi; _C=\"${CLAUDE_CONFIG_DIR:-$HOME/.claude}\"; _E=\"${CLAUDE_PLUGIN_ROOT:-${PLUGIN_ROOT:-}}\"; _P=; if [ -n \"$_E\" ]; then _R=\"${_E%/}\"; [ -d \"$_R/plugin/scripts\" ] && _Q=\"$_R/plugin\" || _Q=\"$_R\"; [ -f \"$_Q/scripts/bun-runner.js\" ] && [ -f \"$_Q/scripts/hook-runner.cjs\" ] && _P=\"$_Q\"; fi; if [ -z \"$_P\" ]; then _F=; _P=$({ for _V in \"$_C/plugins/cache/memindex/memindex\"/[0-9]*/; do [ -d \"$_V\" ] || continue; [ -e \"${_V}.orphaned_at\" ] && continue; _B=${_V%/}; _B=${_B##*/}; case \"$_B\" in (*-*) _G=0;; (*) _G=1;; esac; _N=${_B%%-*}; _M1=${_N%%.*}; case \"$_N\" in (*.*) _T=${_N#*.};; (*) _T=0;; esac; _M2=${_T%%.*}; case \"$_T\" in (*.*) _U=${_T#*.};; (*) _U=0;; esac; _M3=${_U%%.*}; _M1=${_M1%%[!0-9]*}; _M2=${_M2%%[!0-9]*}; _M3=${_M3%%[!0-9]*}; printf '%08d%08d%08d%d %s\\n' \"${_M1:-0}\" \"${_M2:-0}\" \"${_M3:-0}\" \"$_G\" \"$_V\"; done 2>/dev/null | sort -r | sed 's/^[^ ]* //'; printf '%s\\n' \"$_C/plugins/marketplaces/memindex/plugin\"; } | while IFS= read -r _R; do _R=\"${_R%/}\"; [ -d \"$_R/plugin/scripts\" ] && _Q=\"$_R/plugin\" || _Q=\"$_R\"; [ -f \"$_Q/scripts/bun-runner.js\" ] && [ -f \"$_Q/scripts/hook-runner.cjs\" ] && [ -z \"$_F\" ] && { _F=1; printf '%s\\n' \"$_Q\"; }; done); fi; [ -n \"$_P\" ] || { echo \"memindex: plugin scripts not found\" >&2; exit 0; }; command -v cygpath >/dev/null 2>&1 && { _W=$(cygpath -w \"$_P\" 2>/dev/null); [ -n \"$_W\" ] && _P=\"$_W\"; }; { node \"$_P/scripts/bun-runner.js\" \"$_P/scripts/hook-runner.cjs\" hook claude-code summarize; } || { _S=$?; echo \"memindex: hook command failed (exit $_S)\" >&2; exit 0; }",
|
|
115
115
|
"timeout": 120,
|
|
116
116
|
"async": true
|
|
117
117
|
}
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
{
|
|
125
125
|
"type": "command",
|
|
126
126
|
"shell": "bash",
|
|
127
|
-
"command": "export PATH=\"$HOME/.local/bin:/usr/local/bin:/opt/homebrew/bin:$PATH\"; if [ -d \"$HOME/.nvm/versions/node\" ]; then export PATH=\"$HOME/.nvm/versions/node/v$(ls \"$HOME/.nvm/versions/node\" 2>/dev/null | sed 's/^v//' | sort -t. -k1,1n -k2,2n -k3,3n | tail -1)/bin:$PATH\"; fi; _C=\"${CLAUDE_CONFIG_DIR:-$HOME/.claude}\"; _E=\"${CLAUDE_PLUGIN_ROOT:-${PLUGIN_ROOT:-}}\"; _P=; if [ -n \"$_E\" ]; then _R=\"${_E%/}\"; [ -d \"$_R/plugin/scripts\" ] && _Q=\"$_R/plugin\" || _Q=\"$_R\"; [ -f \"$_Q/scripts/bun-runner.js\" ] && [ -f \"$_Q/scripts/
|
|
127
|
+
"command": "export PATH=\"$HOME/.local/bin:/usr/local/bin:/opt/homebrew/bin:$PATH\"; if [ -d \"$HOME/.nvm/versions/node\" ]; then export PATH=\"$HOME/.nvm/versions/node/v$(ls \"$HOME/.nvm/versions/node\" 2>/dev/null | sed 's/^v//' | sort -t. -k1,1n -k2,2n -k3,3n | tail -1)/bin:$PATH\"; fi; _C=\"${CLAUDE_CONFIG_DIR:-$HOME/.claude}\"; _E=\"${CLAUDE_PLUGIN_ROOT:-${PLUGIN_ROOT:-}}\"; _P=; if [ -n \"$_E\" ]; then _R=\"${_E%/}\"; [ -d \"$_R/plugin/scripts\" ] && _Q=\"$_R/plugin\" || _Q=\"$_R\"; [ -f \"$_Q/scripts/bun-runner.js\" ] && [ -f \"$_Q/scripts/hook-runner.cjs\" ] && _P=\"$_Q\"; fi; if [ -z \"$_P\" ]; then _F=; _P=$({ for _V in \"$_C/plugins/cache/memindex/memindex\"/[0-9]*/; do [ -d \"$_V\" ] || continue; [ -e \"${_V}.orphaned_at\" ] && continue; _B=${_V%/}; _B=${_B##*/}; case \"$_B\" in (*-*) _G=0;; (*) _G=1;; esac; _N=${_B%%-*}; _M1=${_N%%.*}; case \"$_N\" in (*.*) _T=${_N#*.};; (*) _T=0;; esac; _M2=${_T%%.*}; case \"$_T\" in (*.*) _U=${_T#*.};; (*) _U=0;; esac; _M3=${_U%%.*}; _M1=${_M1%%[!0-9]*}; _M2=${_M2%%[!0-9]*}; _M3=${_M3%%[!0-9]*}; printf '%08d%08d%08d%d %s\\n' \"${_M1:-0}\" \"${_M2:-0}\" \"${_M3:-0}\" \"$_G\" \"$_V\"; done 2>/dev/null | sort -r | sed 's/^[^ ]* //'; printf '%s\\n' \"$_C/plugins/marketplaces/memindex/plugin\"; } | while IFS= read -r _R; do _R=\"${_R%/}\"; [ -d \"$_R/plugin/scripts\" ] && _Q=\"$_R/plugin\" || _Q=\"$_R\"; [ -f \"$_Q/scripts/bun-runner.js\" ] && [ -f \"$_Q/scripts/hook-runner.cjs\" ] && [ -z \"$_F\" ] && { _F=1; printf '%s\\n' \"$_Q\"; }; done); fi; [ -n \"$_P\" ] || { echo \"memindex: plugin scripts not found\" >&2; exit 0; }; command -v cygpath >/dev/null 2>&1 && { _W=$(cygpath -w \"$_P\" 2>/dev/null); [ -n \"$_W\" ] && _P=\"$_W\"; }; { node \"$_P/scripts/bun-runner.js\" \"$_P/scripts/hook-runner.cjs\" hook claude-code session-end; } || { _S=$?; echo \"memindex: hook command failed (exit $_S)\" >&2; exit 0; }",
|
|
128
128
|
"async": true
|
|
129
129
|
}
|
|
130
130
|
]
|
package/plugin/hooks.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"PreInvocation": [
|
|
4
4
|
{
|
|
5
5
|
"type": "command",
|
|
6
|
-
"command": "node -e ((p,s,r)=>{s(process.execPath,[p.join(r,\"scripts\",\"version-check.js\")],{env:{...process.env,CLAUDE_PLUGIN_ROOT:r,MEMINDEX_WORKER_SCRIPT_PATH:p.join(r,\"scripts\",\"worker-service.cjs\")},stdio:[\"ignore\",\"ignore\",\"inherit\"]});process.exit(s(process.execPath,[p.join(r,\"scripts\",\"bun-runner.js\"),p.join(r,\"scripts\",\"
|
|
6
|
+
"command": "node -e ((p,s,r)=>{s(process.execPath,[p.join(r,\"scripts\",\"version-check.js\")],{env:{...process.env,CLAUDE_PLUGIN_ROOT:r,MEMINDEX_WORKER_SCRIPT_PATH:p.join(r,\"scripts\",\"worker-service.cjs\")},stdio:[\"ignore\",\"ignore\",\"inherit\"]});process.exit(s(process.execPath,[p.join(r,\"scripts\",\"bun-runner.js\"),p.join(r,\"scripts\",\"hook-runner.cjs\"),\"hook\",\"antigravity-cli\",\"session-init-context\"],{env:{...process.env,CLAUDE_PLUGIN_ROOT:r,MEMINDEX_WORKER_SCRIPT_PATH:p.join(r,\"scripts\",\"worker-service.cjs\")},stdio:\"inherit\"}).status??1);})(require(\"node:path\"),require(\"node:child_process\").spawnSync,require(\"node:path\").join(require(\"node:os\").homedir(),\".gemini\",\"config\",\"plugins\",\"memindex\"))",
|
|
7
7
|
"timeout": 180
|
|
8
8
|
}
|
|
9
9
|
],
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"hooks": [
|
|
14
14
|
{
|
|
15
15
|
"type": "command",
|
|
16
|
-
"command": "node -e ((p,s,r)=>{process.exit(s(process.execPath,[p.join(r,\"scripts\",\"bun-runner.js\"),p.join(r,\"scripts\",\"
|
|
16
|
+
"command": "node -e ((p,s,r)=>{process.exit(s(process.execPath,[p.join(r,\"scripts\",\"bun-runner.js\"),p.join(r,\"scripts\",\"hook-runner.cjs\"),\"hook\",\"antigravity-cli\",\"observation\"],{env:{...process.env,CLAUDE_PLUGIN_ROOT:r,MEMINDEX_WORKER_SCRIPT_PATH:p.join(r,\"scripts\",\"worker-service.cjs\")},stdio:\"inherit\"}).status??1);})(require(\"node:path\"),require(\"node:child_process\").spawnSync,require(\"node:path\").join(require(\"node:os\").homedir(),\".gemini\",\"config\",\"plugins\",\"memindex\"))",
|
|
17
17
|
"timeout": 30
|
|
18
18
|
}
|
|
19
19
|
]
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
"PostInvocation": [
|
|
23
23
|
{
|
|
24
24
|
"type": "command",
|
|
25
|
-
"command": "node -e ((p,s,r)=>{process.exit(s(process.execPath,[p.join(r,\"scripts\",\"bun-runner.js\"),p.join(r,\"scripts\",\"
|
|
25
|
+
"command": "node -e ((p,s,r)=>{process.exit(s(process.execPath,[p.join(r,\"scripts\",\"bun-runner.js\"),p.join(r,\"scripts\",\"hook-runner.cjs\"),\"hook\",\"antigravity-cli\",\"observation\"],{env:{...process.env,CLAUDE_PLUGIN_ROOT:r,MEMINDEX_WORKER_SCRIPT_PATH:p.join(r,\"scripts\",\"worker-service.cjs\")},stdio:\"inherit\"}).status??1);})(require(\"node:path\"),require(\"node:child_process\").spawnSync,require(\"node:path\").join(require(\"node:os\").homedir(),\".gemini\",\"config\",\"plugins\",\"memindex\"))",
|
|
26
26
|
"timeout": 30
|
|
27
27
|
}
|
|
28
28
|
],
|
|
29
29
|
"Stop": [
|
|
30
30
|
{
|
|
31
31
|
"type": "command",
|
|
32
|
-
"command": "node -e ((p,s,r)=>{process.exit(s(process.execPath,[p.join(r,\"scripts\",\"bun-runner.js\"),p.join(r,\"scripts\",\"
|
|
32
|
+
"command": "node -e ((p,s,r)=>{process.exit(s(process.execPath,[p.join(r,\"scripts\",\"bun-runner.js\"),p.join(r,\"scripts\",\"hook-runner.cjs\"),\"hook\",\"antigravity-cli\",\"summarize\"],{env:{...process.env,CLAUDE_PLUGIN_ROOT:r,MEMINDEX_WORKER_SCRIPT_PATH:p.join(r,\"scripts\",\"worker-service.cjs\")},stdio:\"inherit\"}).status??1);})(require(\"node:path\"),require(\"node:child_process\").spawnSync,require(\"node:path\").join(require(\"node:os\").homedir(),\".gemini\",\"config\",\"plugins\",\"memindex\"))",
|
|
33
33
|
"timeout": 30
|
|
34
34
|
}
|
|
35
35
|
]
|