memindex 1.4.5 → 1.5.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 +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/.qoder-plugin/plugin.json +1 -1
- package/README.md +8 -2
- package/dist/bug-report/index.js +94 -83
- package/dist/npx-cli/index.js +300 -299
- package/dist/opencode-plugin/index.js +40 -40
- package/dist/pi-extension/TYPEBOX-PROVENANCE.json +4 -4
- package/dist/pi-extension/index.js +9 -9
- package/integrations/dsh/lib/index.js +19 -19
- package/integrations/dsh/package.json +1 -1
- package/integrations/openclaw/install.sh +16 -10
- package/integrations/openclaw/openclaw.plugin.json +1 -5
- package/integrations/openclaw/test-install.sh +20 -13
- package/integrations/pi/TYPEBOX-PROVENANCE.json +4 -4
- package/package.json +5 -5
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/.codex-plugin/plugin.json +1 -1
- package/plugin/.qoder-plugin/plugin.json +1 -1
- package/plugin/hooks/codex-hooks.json +12 -0
- package/plugin/package.json +1 -1
- package/plugin/scripts/context-generator.cjs +65 -63
- package/plugin/scripts/context-generator.cjs.map +3 -3
- package/plugin/scripts/mcp-server.cjs +71 -70
- package/plugin/scripts/mcp-server.cjs.map +3 -3
- package/plugin/scripts/statusline.cjs +1 -1
- package/plugin/scripts/transcript-watcher.cjs +36 -35
- package/plugin/scripts/transcript-watcher.cjs.map +3 -3
- package/plugin/scripts/worker-service.cjs +714 -674
- package/plugin/scripts/worker-service.cjs.map +3 -3
- package/plugin/skills/cloud-sync/SKILL.md +5 -5
- package/plugin/skills/distill/SKILL.md +22 -0
- package/plugin/skills/how-it-works/SKILL.md +1 -1
- package/plugin/skills/how-it-works/onboarding-explainer.md +1 -1
- package/plugin/skills/import-chats/SKILL.md +22 -0
- package/plugin/skills/import-jira/SKILL.md +22 -0
- package/plugin/skills/import-reviews/SKILL.md +22 -0
- package/plugin/skills/mode-creator/SKILL.md +7 -1
- package/plugin/skills/pin/SKILL.md +26 -0
- package/plugin/skills/savings/SKILL.md +22 -0
- package/plugin/skills/timeline-report/SKILL.md +8 -8
- package/plugin/skills/weekly-digests/SKILL.md +5 -5
- package/plugin/skills/worker-request.mjs +45 -0
- package/plugin/sqlite/SessionStore.js +109 -109
- package/plugin/sqlite/SessionStore.js.map +3 -3
- package/plugin/sqlite/observations/files.js +12 -9
- package/plugin/sqlite/observations/files.js.map +3 -3
- package/plugin/ui/viewer-bundle.js +18 -18
- package/integrations/openclaw/skills/agent-cost-report/CHECKSUMS.txt +0 -50
- package/integrations/openclaw/skills/agent-cost-report/SKILL.md +0 -241
- package/integrations/openclaw/skills/agent-cost-report/scripts/acr/__init__.py +0 -1
- package/integrations/openclaw/skills/agent-cost-report/scripts/acr/behavior.py +0 -303
- package/integrations/openclaw/skills/agent-cost-report/scripts/acr/classify.py +0 -83
- package/integrations/openclaw/skills/agent-cost-report/scripts/acr/costs.py +0 -119
- package/integrations/openclaw/skills/agent-cost-report/scripts/acr/devices.py +0 -88
- package/integrations/openclaw/skills/agent-cost-report/scripts/acr/evidence.py +0 -160
- package/integrations/openclaw/skills/agent-cost-report/scripts/acr/labels.py +0 -115
- package/integrations/openclaw/skills/agent-cost-report/scripts/acr/measure.py +0 -89
- package/integrations/openclaw/skills/agent-cost-report/scripts/acr/mistakes.py +0 -310
- package/integrations/openclaw/skills/agent-cost-report/scripts/acr/patterns.py +0 -391
- package/integrations/openclaw/skills/agent-cost-report/scripts/acr/period.py +0 -98
- package/integrations/openclaw/skills/agent-cost-report/scripts/acr/prices.py +0 -95
- package/integrations/openclaw/skills/agent-cost-report/scripts/acr/render.py +0 -586
- package/integrations/openclaw/skills/agent-cost-report/scripts/acr/rollup.py +0 -355
- package/integrations/openclaw/skills/agent-cost-report/scripts/acr/rules.json +0 -4
- package/integrations/openclaw/skills/agent-cost-report/scripts/acr/rules.py +0 -76
- package/integrations/openclaw/skills/agent-cost-report/scripts/acr/sample.py +0 -45
- package/integrations/openclaw/skills/agent-cost-report/scripts/acr/snapshot.py +0 -53
- package/integrations/openclaw/skills/agent-cost-report/scripts/acr/sync.py +0 -79
- package/integrations/openclaw/skills/agent-cost-report/scripts/acr/transcripts.py +0 -126
- package/integrations/openclaw/skills/agent-cost-report/scripts/acr/wins.py +0 -341
- package/integrations/openclaw/skills/agent-cost-report/scripts/acr.py +0 -219
- package/integrations/openclaw/skills/agent-cost-report/scripts/tests/_db.py +0 -49
- package/integrations/openclaw/skills/agent-cost-report/scripts/tests/_paths.py +0 -9
- package/integrations/openclaw/skills/agent-cost-report/scripts/tests/fixtures/codex/sessions/2026/09/18/rollout-codex-1.jsonl +0 -4
- package/integrations/openclaw/skills/agent-cost-report/scripts/tests/fixtures/make_report_fixtures.py +0 -46
- package/integrations/openclaw/skills/agent-cost-report/scripts/tests/fixtures/prices_sample.json +0 -6
- package/integrations/openclaw/skills/agent-cost-report/scripts/tests/fixtures/projects/-workspace-proj-a/sess-aaaa.jsonl +0 -8
- package/integrations/openclaw/skills/agent-cost-report/scripts/tests/fixtures/projects/-workspace-proj-b/sess-bbbb.jsonl +0 -1
- package/integrations/openclaw/skills/agent-cost-report/scripts/tests/fixtures/report-1day.json +0 -823
- package/integrations/openclaw/skills/agent-cost-report/scripts/tests/fixtures/report-30day.json +0 -2213
- package/integrations/openclaw/skills/agent-cost-report/scripts/tests/fixtures/report-7day.json +0 -1252
- package/integrations/openclaw/skills/agent-cost-report/scripts/tests/fixtures/report-empty.json +0 -536
- package/integrations/openclaw/skills/agent-cost-report/scripts/tests/fixtures/report-session.json +0 -662
- package/integrations/openclaw/skills/agent-cost-report/scripts/tests/test_behavior.py +0 -299
- package/integrations/openclaw/skills/agent-cost-report/scripts/tests/test_devices.py +0 -99
- package/integrations/openclaw/skills/agent-cost-report/scripts/tests/test_labels.py +0 -96
- package/integrations/openclaw/skills/agent-cost-report/scripts/tests/test_measure.py +0 -120
- package/integrations/openclaw/skills/agent-cost-report/scripts/tests/test_pdf_windows.py +0 -54
- package/integrations/openclaw/skills/agent-cost-report/scripts/tests/test_period.py +0 -137
- package/integrations/openclaw/skills/agent-cost-report/scripts/tests/test_prices.py +0 -126
- package/integrations/openclaw/skills/agent-cost-report/scripts/tests/test_render.py +0 -238
- package/integrations/openclaw/skills/agent-cost-report/scripts/tests/test_render_encoding.py +0 -70
- package/integrations/openclaw/skills/agent-cost-report/scripts/tests/test_rollup.py +0 -263
- package/integrations/openclaw/skills/agent-cost-report/scripts/tests/test_snapshot.py +0 -63
- package/integrations/openclaw/skills/agent-cost-report/scripts/tests/test_sync.py +0 -52
- package/integrations/openclaw/skills/agent-cost-report/scripts/tests/test_transcript_encoding.py +0 -109
- package/integrations/openclaw/skills/agent-cost-report/scripts/tests/test_transcripts.py +0 -151
- package/integrations/openclaw/skills/agent-cost-report/scripts/tests/test_wins.py +0 -222
- package/plugin/skills/agent-cost-report/CHECKSUMS.txt +0 -50
- package/plugin/skills/agent-cost-report/SKILL.md +0 -241
- package/plugin/skills/agent-cost-report/scripts/acr/__init__.py +0 -1
- package/plugin/skills/agent-cost-report/scripts/acr/behavior.py +0 -303
- package/plugin/skills/agent-cost-report/scripts/acr/classify.py +0 -83
- package/plugin/skills/agent-cost-report/scripts/acr/costs.py +0 -119
- package/plugin/skills/agent-cost-report/scripts/acr/devices.py +0 -88
- package/plugin/skills/agent-cost-report/scripts/acr/evidence.py +0 -160
- package/plugin/skills/agent-cost-report/scripts/acr/labels.py +0 -115
- package/plugin/skills/agent-cost-report/scripts/acr/measure.py +0 -89
- package/plugin/skills/agent-cost-report/scripts/acr/mistakes.py +0 -310
- package/plugin/skills/agent-cost-report/scripts/acr/patterns.py +0 -391
- package/plugin/skills/agent-cost-report/scripts/acr/period.py +0 -98
- package/plugin/skills/agent-cost-report/scripts/acr/prices.py +0 -95
- package/plugin/skills/agent-cost-report/scripts/acr/render.py +0 -586
- package/plugin/skills/agent-cost-report/scripts/acr/rollup.py +0 -355
- package/plugin/skills/agent-cost-report/scripts/acr/rules.json +0 -4
- package/plugin/skills/agent-cost-report/scripts/acr/rules.py +0 -76
- package/plugin/skills/agent-cost-report/scripts/acr/sample.py +0 -45
- package/plugin/skills/agent-cost-report/scripts/acr/snapshot.py +0 -53
- package/plugin/skills/agent-cost-report/scripts/acr/sync.py +0 -79
- package/plugin/skills/agent-cost-report/scripts/acr/transcripts.py +0 -126
- package/plugin/skills/agent-cost-report/scripts/acr/wins.py +0 -341
- package/plugin/skills/agent-cost-report/scripts/acr.py +0 -219
- package/plugin/skills/agent-cost-report/scripts/tests/_db.py +0 -49
- package/plugin/skills/agent-cost-report/scripts/tests/_paths.py +0 -9
- package/plugin/skills/agent-cost-report/scripts/tests/fixtures/codex/sessions/2026/09/18/rollout-codex-1.jsonl +0 -4
- package/plugin/skills/agent-cost-report/scripts/tests/fixtures/make_report_fixtures.py +0 -46
- package/plugin/skills/agent-cost-report/scripts/tests/fixtures/prices_sample.json +0 -6
- package/plugin/skills/agent-cost-report/scripts/tests/fixtures/projects/-workspace-proj-a/sess-aaaa.jsonl +0 -8
- package/plugin/skills/agent-cost-report/scripts/tests/fixtures/projects/-workspace-proj-b/sess-bbbb.jsonl +0 -1
- package/plugin/skills/agent-cost-report/scripts/tests/fixtures/report-1day.json +0 -823
- package/plugin/skills/agent-cost-report/scripts/tests/fixtures/report-30day.json +0 -2213
- package/plugin/skills/agent-cost-report/scripts/tests/fixtures/report-7day.json +0 -1252
- package/plugin/skills/agent-cost-report/scripts/tests/fixtures/report-empty.json +0 -536
- package/plugin/skills/agent-cost-report/scripts/tests/fixtures/report-session.json +0 -662
- package/plugin/skills/agent-cost-report/scripts/tests/test_behavior.py +0 -299
- package/plugin/skills/agent-cost-report/scripts/tests/test_devices.py +0 -99
- package/plugin/skills/agent-cost-report/scripts/tests/test_labels.py +0 -96
- package/plugin/skills/agent-cost-report/scripts/tests/test_measure.py +0 -120
- package/plugin/skills/agent-cost-report/scripts/tests/test_pdf_windows.py +0 -54
- package/plugin/skills/agent-cost-report/scripts/tests/test_period.py +0 -137
- package/plugin/skills/agent-cost-report/scripts/tests/test_prices.py +0 -126
- package/plugin/skills/agent-cost-report/scripts/tests/test_render.py +0 -238
- package/plugin/skills/agent-cost-report/scripts/tests/test_render_encoding.py +0 -70
- package/plugin/skills/agent-cost-report/scripts/tests/test_rollup.py +0 -263
- package/plugin/skills/agent-cost-report/scripts/tests/test_snapshot.py +0 -63
- package/plugin/skills/agent-cost-report/scripts/tests/test_sync.py +0 -52
- package/plugin/skills/agent-cost-report/scripts/tests/test_transcript_encoding.py +0 -109
- package/plugin/skills/agent-cost-report/scripts/tests/test_transcripts.py +0 -151
- package/plugin/skills/agent-cost-report/scripts/tests/test_wins.py +0 -222
- package/plugin/skills/babysit/SKILL.md +0 -87
- package/plugin/skills/design-is/SKILL.md +0 -312
- package/plugin/skills/do/SKILL.md +0 -45
- package/plugin/skills/learn-codebase/SKILL.md +0 -21
- package/plugin/skills/make-plan/SKILL.md +0 -67
- package/plugin/skills/oh-my-issues/SKILL.md +0 -226
- package/plugin/skills/pathfinder/SKILL.md +0 -111
- package/plugin/skills/screenpipe/SKILL.md +0 -78
- package/plugin/skills/screenpipe/screenpipe.mjs +0 -196
- package/plugin/skills/smart-explore/SKILL.md +0 -193
- package/plugin/skills/standup/SKILL.md +0 -142
- package/plugin/skills/standup/agent-brief.md +0 -47
- package/plugin/skills/standup/standup.mjs +0 -586
- package/plugin/skills/what-the/SKILL.md +0 -6
- package/plugin/skills/wowerpoint/SKILL.md +0 -205
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var K=require("os");var _=require("fs"),
|
|
1
|
+
"use strict";var K=require("os");var _=require("fs"),A=require("http"),N=require("path"),G=900*1e3,Y="note writing is paused (MEMINDEX_OBSERVER_ENABLED is false). Search and past memory still work";function k(t){let e=typeof t=="string"?t.trim():"";return e&&e!=="localhost"&&e!=="0.0.0.0"&&e!=="::"?e:"127.0.0.1"}function M(t,e=Date.now()){try{let r=JSON.parse((0,_.readFileSync)((0,N.join)(t,"state","hook-failures.json"),"utf-8")),n=typeof r.consecutiveFailures=="number"?Math.floor(r.consecutiveFailures):0,o=typeof r.lastFailureAt=="number"?r.lastFailureAt:0;if(n>0&&e-o<G)return{count:n,lastFailureAt:o}}catch{}return null}function T(t,e,r){return new Promise(n=>{let o=!1,s=d=>{o||(o=!0,clearTimeout(f),n(d))},a=(0,A.request)({host:t,port:e,path:"/api/readiness",method:"GET"},d=>{let O=[];d.on("data",g=>O.push(g)),d.on("end",()=>{let g={};try{let x=JSON.parse(Buffer.concat(O).toString("utf-8"));x&&typeof x=="object"&&(g=x)}catch{}s({reachable:!0,httpStatus:d.statusCode??0,body:g})}),d.on("error",()=>s({reachable:!1}))}),f=setTimeout(()=>{s({reachable:!1}),a.destroy()},r);a.on("error",()=>s({reachable:!1})),a.end()})}function I(t,e){if(!t.reachable)return{saving:!1,reason:"the memory worker is not running. Run: npx memindex start"};if(t.httpStatus!==200||t.body.status!=="ready")return t.body.status==="failed"&&t.body.reason?{saving:!1,reason:t.body.reason}:{saving:!1,reason:"the memory worker is still starting. If this stays, run: npx memindex doctor"};if(t.body.notesPaused)return{saving:!1,paused:!0,reason:Y};if(e){let r=e.count===1?"save has":"saves have";return{saving:!1,reason:`${e.count} ${r} failed in the last 15 minutes. Run: npx memindex doctor`}}return{saving:!0,lastSavedAt:typeof t.body.lastSavedAt=="number"?t.body.lastSavedAt:null}}function q(t,e){let r=Math.max(0,Math.floor((e-t)/1e3));return r<60?"just now":r<3600?`${Math.floor(r/60)} min ago`:r<86400?`${Math.floor(r/3600)} h ago`:`${Math.floor(r/86400)} d ago`}function W(t,e){let r="\x1B[1;31m",n="\x1B[32m",o="\x1B[33m",s="\x1B[2m",a="\x1B[0m";return t.paused?`${o}memory: notes paused${a} ${s}(MEMINDEX_OBSERVER_ENABLED is false; search still works)${a}`:t.saving?t.lastSavedAt===null?`${n}memory: ready, nothing saved yet${a}`:`${n}memory: saved ${q(t.lastSavedAt,e)}${a}`:`${r}\u2717 MEMORY NOT SAVING${a} ${s}(${t.reason})${a}`}var H=require("fs"),C=require("path");var i=require("fs");var mt=Promise.resolve();var St=process.platform==="win32";function V(t){return t.replace(/^\uFEFF/,"")}function z(t){return JSON.parse(V(t))}function m(t){return z((0,i.readFileSync)(t,"utf-8"))}var B=require("fs"),J=require("os"),w=require("path");var S="MEMINDEX_",Q="AGENT_MEM_",y=[Q];function P(t){return t.startsWith(S)||y.some(e=>t.startsWith(e))}function Z(t=process.env){for(let e of y)for(let r of Object.keys(t)){if(!r.startsWith(e))continue;let n=S+r.slice(e.length);t[n]===void 0&&(t[n]=t[r])}}function F(t){let e=null;for(let r of y)for(let n of Object.keys(t)){if(!n.startsWith(r))continue;let o=S+n.slice(r.length);(e??t)[o]===void 0&&(e??={...t},e[o]=t[n])}return e??t}Z();var $=require("os"),j=require("path");function h(t,e=process.platform,r=(0,$.homedir)()){return typeof t!="string"||t.length===0?t:t==="~"?r:t.startsWith("~/")||e==="win32"&&t.startsWith("~\\")?(0,j.join)(r,t.slice(2)):t}var tt=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);function et(t){let e=t.env;return tt(e)&&Object.keys(e).some(P)?"nested":"flat"}function E(t){return et(t)==="nested"?t.env:t}function l(t=process.env,e=(0,J.homedir)()){if(t.MEMINDEX_DATA_DIR)return h(t.MEMINDEX_DATA_DIR,process.platform,e);let r=(0,w.join)(e,".memindex"),n=(0,w.join)(r,"settings.json");try{if((0,B.existsSync)(n)){let o=m(n);if(o===null||typeof o!="object"||Array.isArray(o))return r;let s=F(E(o));if(typeof s.MEMINDEX_DATA_DIR=="string"&&s.MEMINDEX_DATA_DIR)return h(s.MEMINDEX_DATA_DIR,process.platform,e)}}catch{}return r}var D=require("crypto"),L=require("fs"),c=require("os"),u=require("path");var rt=4e4,nt=9e3,ot=["/tmp","/private/tmp","/var/folders","/private/var/folders"];function p(t){let e=(0,u.resolve)(t),r=[],n=e;for(;;)try{return(0,u.join)(L.realpathSync.native(n),...r.reverse())}catch{let o=(0,u.dirname)(n);if(o===n)return e;r.push((0,u.basename)(n)),n=o}}function st(t,e){let r=p(e);return t===r||t.startsWith(r.endsWith(u.sep)?r:r+u.sep)}function it(t,e=(0,c.homedir)()){let r=p(t),n=p(e);return(process.platform==="win32"?[(0,c.tmpdir)()]:[(0,c.tmpdir)(),...ot]).some(s=>p(s)!==n&&st(r,s))}function b(t=process.env,e=(0,c.homedir)()){return t.MEMINDEX_TEST_FORBIDDEN_DATA_DIR?!0:it(l(t,e),e)}var at=39e3,ut=500;function ct(t){return(0,D.createHash)("sha256").update(u.win32.resolve(t).toLowerCase()).digest().readUInt32BE(0)%ut}function R(t=process.platform,e=(0,c.homedir)()){return t==="win32"?at+ct(e):38700+(process.getuid?.()??77)%100}function v(t){let e=(0,D.createHash)("sha256").update(p(t)).digest();return rt+e.readUInt32BE(0)%nt}function X(t=process.env,e=(0,c.homedir)()){return b(t,e)?v(l(t,e)):R(process.platform,e)}function U(t,e){let r=l(t,e),n={};try{let a=(0,C.join)(r,"settings.json");if((0,H.existsSync)(a)){let f=m(a);f&&typeof f=="object"&&!Array.isArray(f)&&(n=E(f))}}catch{}let o=parseInt(String(t.MEMINDEX_WORKER_PORT??n.MEMINDEX_WORKER_PORT??""),10),s=Number.isFinite(o)?o:X(t,e);return s===R(process.platform,e)&&b(t,e)&&(s=v(r)),{dataDir:r,host:k(t.MEMINDEX_WORKER_HOST??n.MEMINDEX_WORKER_HOST),port:s}}async function ft(){process.stdin.resume();let t=Date.now(),{dataDir:e,host:r,port:n}=U(process.env,(0,K.homedir)()),o=await T(r,n,500);process.stdout.write(W(I(o,M(e,t)),t)),process.exit(0)}ft();
|