@easbot/memory 0.3.17 → 0.3.19
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.en.md +101 -0
- package/README.md +116 -11
- package/dist/chunks/chunk-4GSXSIV5.cjs +1 -0
- package/dist/chunks/chunk-5Q6SIVSP.cjs +50 -0
- package/dist/chunks/chunk-6CQMBEIQ.mjs +1 -0
- package/dist/chunks/chunk-746FKSL5.mjs +50 -0
- package/dist/chunks/chunk-ARA4LMAI.mjs +1 -0
- package/dist/chunks/chunk-CN6WBJLX.mjs +60 -0
- package/dist/chunks/{chunk-OIUUTVLL.cjs → chunk-EGWJG65Q.cjs} +22 -4
- package/dist/chunks/chunk-J5XF2W4Z.cjs +1 -0
- package/dist/chunks/chunk-JDPZ5U53.mjs +71 -0
- package/dist/chunks/chunk-QHPGDNEG.cjs +1 -0
- package/dist/chunks/{chunk-MWRDF6VN.mjs → chunk-QYBWHFOX.mjs} +1 -1
- package/dist/chunks/chunk-SWYQLQ7Z.mjs +1 -0
- package/dist/chunks/chunk-WQB4D6DZ.cjs +1 -0
- package/dist/chunks/chunk-X66LENNV.cjs +60 -0
- package/dist/chunks/cli-handler-CN4Q7BCY.mjs +1 -0
- package/dist/chunks/cli-handler-IRPYADZF.cjs +1 -0
- package/dist/chunks/consolidate-PUOAAQN3.cjs +2 -0
- package/dist/chunks/consolidate-UEYNLKQN.mjs +2 -0
- package/dist/chunks/doctor-KPAZWVVZ.mjs +1 -0
- package/dist/chunks/doctor-U4HOSXGW.cjs +1 -0
- package/dist/chunks/extract-7FFIDVG3.cjs +2 -0
- package/dist/chunks/extract-EOZJMLTP.mjs +2 -0
- package/dist/chunks/{forget-A4UJI3LE.mjs → forget-5AXV3GHW.mjs} +1 -1
- package/dist/chunks/forget-GBMYCUPJ.cjs +3 -0
- package/dist/chunks/graph-KOJYJTA4.cjs +3 -0
- package/dist/chunks/{graph-XZ46LEO7.mjs → graph-Y6AYRFCN.mjs} +1 -1
- package/dist/chunks/init-B24TNUSD.cjs +1 -0
- package/dist/chunks/init-HGEBZTJW.mjs +1 -0
- package/dist/chunks/llm-RMPVWEVP.cjs +1 -0
- package/dist/chunks/llm-UHTBU2HA.mjs +1 -0
- package/dist/chunks/{mcp-BOD4ZOZS.mjs → mcp-BMAB3TT7.mjs} +1 -1
- package/dist/chunks/{mcp-BXVXTUJK.cjs → mcp-BS6XHEBR.cjs} +1 -1
- package/dist/chunks/recall-LKETADTB.cjs +2 -0
- package/dist/chunks/recall-UPGGKBNX.mjs +2 -0
- package/dist/chunks/remember-KCQN2UWN.mjs +2 -0
- package/dist/chunks/remember-VZF4O7ZF.cjs +2 -0
- package/dist/chunks/status-2BFVXY5J.cjs +1 -0
- package/dist/chunks/status-HGN2YLKJ.mjs +1 -0
- package/dist/chunks/stdio-server-GABA2MLR.cjs +1 -0
- package/dist/chunks/stdio-server-JPMLMEWY.mjs +1 -0
- package/dist/chunks/sync-7Y2DEDDW.mjs +2 -0
- package/dist/chunks/sync-W5A2O5TS.cjs +2 -0
- package/dist/cli.cjs +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/index.cjs +4 -4
- package/dist/index.d.cts +87 -38
- package/dist/index.d.ts +87 -38
- package/dist/index.mjs +4 -4
- package/package.json +9 -8
- package/dist/chunks/chunk-BSKFK4RC.mjs +0 -1
- package/dist/chunks/chunk-DFWC6WII.mjs +0 -53
- package/dist/chunks/chunk-DXU5WPK3.cjs +0 -42
- package/dist/chunks/chunk-EECBJNZI.mjs +0 -59
- package/dist/chunks/chunk-FMEXQ5YE.cjs +0 -59
- package/dist/chunks/chunk-HSK27DQ7.cjs +0 -1
- package/dist/chunks/chunk-I6XVFDN2.mjs +0 -42
- package/dist/chunks/chunk-QNDG7BTB.cjs +0 -1
- package/dist/chunks/chunk-RSJ2KT6X.cjs +0 -1
- package/dist/chunks/chunk-TPSRK4M3.mjs +0 -1
- package/dist/chunks/cli-handler-6VTKYXXM.mjs +0 -1
- package/dist/chunks/cli-handler-HNPA3STD.cjs +0 -1
- package/dist/chunks/consolidate-6P7LUPPL.cjs +0 -2
- package/dist/chunks/consolidate-NYH4IKJK.mjs +0 -2
- package/dist/chunks/doctor-IJJ5UYGT.cjs +0 -2
- package/dist/chunks/doctor-MZSZGVRL.mjs +0 -2
- package/dist/chunks/extract-6B7OD3VK.mjs +0 -2
- package/dist/chunks/extract-ERTOHQV6.cjs +0 -2
- package/dist/chunks/forget-KLFM5SBQ.cjs +0 -3
- package/dist/chunks/graph-P5ZHB4ZM.cjs +0 -3
- package/dist/chunks/init-CCOSHE3F.cjs +0 -3
- package/dist/chunks/init-WEPU32KF.mjs +0 -3
- package/dist/chunks/recall-BV4Z7HUJ.mjs +0 -2
- package/dist/chunks/recall-FEINUJKO.cjs +0 -2
- package/dist/chunks/remember-ESVRA73C.mjs +0 -2
- package/dist/chunks/remember-YNSY2JJB.cjs +0 -2
- package/dist/chunks/status-KVM7I6YC.cjs +0 -2
- package/dist/chunks/status-QQZS3ZCN.mjs +0 -2
- package/dist/chunks/stdio-server-MQKTUGNG.cjs +0 -1
- package/dist/chunks/stdio-server-ZLMSUTC5.mjs +0 -1
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {b,c}from'./chunk-MWRDF6VN.mjs';import'./chunk-BSKFK4RC.mjs';import {u,w as w$1}from'./chunk-I6XVFDN2.mjs';import'./chunk-DFWC6WII.mjs';import'./chunk-WDVDYZ25.mjs';import'./chunk-HQBRVVXS.mjs';async function C(t){let n=t.agentId?.trim()||"default",o=t.workspaceDir??process.cwd();return u("consolidate",{windowDays:t.windowDays??30,dryRun:false},w$1(n,o))}function f(t){let n=t;return [b("consolidate",{},"Consolidation complete ({{totalFacts}} total / deduped {{dedupedCount}} / archived {{archivedCount}}):"),c("consolidate",{totalFacts:String(n.totalFacts),dedupedCount:String(n.dedupedCount),archivedCount:String(n.archivedCount)}," - total: {{totalFacts}}, deduped: {{dedupedCount}}, archived: {{archivedCount}}"),` - skipped: ${n.skippedCount}, duration: ${n.durationMs}ms`].join(`
|
|
2
|
-
`)}function w(t){let n={};for(let o=0;o<t.length;o++){let e=t[o];if(e===void 0)continue;let i=t[o+1];e==="--agent"?(n.agentId=i,o++):e==="--window-days"?(n.windowDays=Number(i),o++):e==="--json"?n.json=true:(e==="--help"||e==="-h")&&(n.help=true);}return n}export{f as formatConsolidateText,w as parseConsolidateOptions,C as runConsolidate};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkHSK27DQ7_cjs=require('./chunk-HSK27DQ7.cjs');require('./chunk-RSJ2KT6X.cjs');var chunkDXU5WPK3_cjs=require('./chunk-DXU5WPK3.cjs');require('./chunk-OIUUTVLL.cjs'),require('./chunk-CPRDIUQ4.cjs'),require('./chunk-NVGACA7W.cjs');async function g(e){let o=e.agentId,t=e.workspaceDir??process.cwd();return chunkDXU5WPK3_cjs.u("doctor",{repair:e.repair??false},chunkDXU5WPK3_cjs.w(o,t))}function d(e){let o=e,t=o.healthy?"PASS":"ISSUES",r=[chunkHSK27DQ7_cjs.b("doctor",{status:t},"doctor: {{status}}")];for(let n of o.checks){let p=n.passed?"OK":"WARN";r.push(chunkHSK27DQ7_cjs.c("doctor",{name:n.name,message:n.message},` - [${p}] {{name}}: {{message}}`));}return r.join(`
|
|
2
|
-
`)}function h(e){let o={};for(let t=0;t<e.length;t++){let r=e[t];r!==void 0&&(r==="--repair"?o.repair=true:r==="--json"?o.json=true:(r==="--help"||r==="-h")&&(o.help=true));}return o}exports.formatDoctorText=d;exports.parseDoctorOptions=h;exports.runDoctor=g;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {b,c}from'./chunk-MWRDF6VN.mjs';import'./chunk-BSKFK4RC.mjs';import {u,w}from'./chunk-I6XVFDN2.mjs';import'./chunk-DFWC6WII.mjs';import'./chunk-WDVDYZ25.mjs';import'./chunk-HQBRVVXS.mjs';async function d(e){let o=e.agentId,t=e.workspaceDir??process.cwd();return u("doctor",{repair:e.repair??false},w(o,t))}function h(e){let o=e,t=o.healthy?"PASS":"ISSUES",r=[b("doctor",{status:t},"doctor: {{status}}")];for(let n of o.checks){let p=n.passed?"OK":"WARN";r.push(c("doctor",{name:n.name,message:n.message},` - [${p}] {{name}}: {{message}}`));}return r.join(`
|
|
2
|
-
`)}function D(e){let o={};for(let t=0;t<e.length;t++){let r=e[t];r!==void 0&&(r==="--repair"?o.repair=true:r==="--json"?o.json=true:(r==="--help"||r==="-h")&&(o.help=true));}return o}export{h as formatDoctorText,D as parseDoctorOptions,d as runDoctor};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {b,c}from'./chunk-MWRDF6VN.mjs';import'./chunk-BSKFK4RC.mjs';import {u,w}from'./chunk-I6XVFDN2.mjs';import'./chunk-DFWC6WII.mjs';import'./chunk-WDVDYZ25.mjs';import'./chunk-HQBRVVXS.mjs';async function m(r){if(!r.sessionId?.trim())throw new Error("extract: --session is required");let e=r.agentId?.trim()||"default",t=r.workspaceDir??process.cwd();return u("extract",{sessionId:r.sessionId,lastN:r.lastN??10,fromMessageId:r.fromMessageId},w(e,t))}function p(r){let e=r,t=[b("extract",{extractedCount:e.extractedCount},"Extracted {{extractedCount}} fact(s) from {{fromMessageId}}..{{toMessageId}}")];for(let s of e.factIds)t.push(c("extract",{id:s}," - {{id}}"));if(e.entities&&e.entities.length>0){t.push(""),t.push("entities:");for(let s of e.entities)t.push(` - ${s.name} (${s.type})`);}if(e.relations&&e.relations.length>0){t.push(""),t.push("relations:");for(let s of e.relations)t.push(` - ${s.source} --${s.relation}--> ${s.target}`);}return t.join(`
|
|
2
|
-
`)}function x(r){let e={};for(let t=0;t<r.length;t++){let s=r[t];if(s===void 0)continue;let n=r[t+1];s==="--agent"?(e.agentId=n,t++):s==="--session"?(e.sessionId=n,t++):s==="--last-n"?(e.lastN=Number(n),t++):s==="--from-msg"?(e.fromMessageId=n,t++):s==="--json"?e.json=true:(s==="--help"||s==="-h")&&(e.help=true);}return e}export{p as formatExtractText,x as parseExtractOptions,m as runExtract};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkHSK27DQ7_cjs=require('./chunk-HSK27DQ7.cjs');require('./chunk-RSJ2KT6X.cjs');var chunkDXU5WPK3_cjs=require('./chunk-DXU5WPK3.cjs');require('./chunk-OIUUTVLL.cjs'),require('./chunk-CPRDIUQ4.cjs'),require('./chunk-NVGACA7W.cjs');async function l(r){if(!r.sessionId?.trim())throw new Error("extract: --session is required");let e=r.agentId?.trim()||"default",t=r.workspaceDir??process.cwd();return chunkDXU5WPK3_cjs.u("extract",{sessionId:r.sessionId,lastN:r.lastN??10,fromMessageId:r.fromMessageId},chunkDXU5WPK3_cjs.w(e,t))}function m(r){let e=r,t=[chunkHSK27DQ7_cjs.b("extract",{extractedCount:e.extractedCount},"Extracted {{extractedCount}} fact(s) from {{fromMessageId}}..{{toMessageId}}")];for(let s of e.factIds)t.push(chunkHSK27DQ7_cjs.c("extract",{id:s}," - {{id}}"));if(e.entities&&e.entities.length>0){t.push(""),t.push("entities:");for(let s of e.entities)t.push(` - ${s.name} (${s.type})`);}if(e.relations&&e.relations.length>0){t.push(""),t.push("relations:");for(let s of e.relations)t.push(` - ${s.source} --${s.relation}--> ${s.target}`);}return t.join(`
|
|
2
|
-
`)}function p(r){let e={};for(let t=0;t<r.length;t++){let s=r[t];if(s===void 0)continue;let n=r[t+1];s==="--agent"?(e.agentId=n,t++):s==="--session"?(e.sessionId=n,t++):s==="--last-n"?(e.lastN=Number(n),t++):s==="--from-msg"?(e.fromMessageId=n,t++):s==="--json"?e.json=true:(s==="--help"||s==="-h")&&(e.help=true);}return e}exports.formatExtractText=m;exports.parseExtractOptions=p;exports.runExtract=l;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkHSK27DQ7_cjs=require('./chunk-HSK27DQ7.cjs');require('./chunk-RSJ2KT6X.cjs');var chunkDXU5WPK3_cjs=require('./chunk-DXU5WPK3.cjs');require('./chunk-OIUUTVLL.cjs'),require('./chunk-CPRDIUQ4.cjs'),require('./chunk-NVGACA7W.cjs');async function g(n){let e=n.agentId?.trim()||"default",t=n.workspaceDir??process.cwd();return chunkDXU5WPK3_cjs.u("forget",{factId:n.factId,category:n.category,fromTime:n.fromTime,toTime:n.toTime,maxDelete:n.maxDelete??1e3,dryRun:n.dryRun??false},chunkDXU5WPK3_cjs.w(e,t))}function p(n){let e=n,t=[];if(e.deletedCount===0&&e.deletedIds.length===0)return t.push(chunkHSK27DQ7_cjs.a("forget","(no records to delete)")),t.join(`
|
|
2
|
-
`);t.push(chunkHSK27DQ7_cjs.b("forget",{deletedCount:e.deletedCount,dryRun:String(e.dryRun)},e.dryRun?"[DRY RUN] Would delete {{deletedCount}}":"Deleted {{deletedCount}}")),e.truncatedCount>0&&t.push(`(truncated: ${e.truncatedCount} more)`);for(let r of e.deletedIds)t.push(chunkHSK27DQ7_cjs.c("forget",{id:r}," - {{id}}"));return t.join(`
|
|
3
|
-
`)}function y(n){let e={};for(let t=0;t<n.length;t++){let r=n[t];if(r===void 0)continue;let o=n[t+1];r==="--agent"?(e.agentId=o,t++):r==="--fact-id"?(e.factId=o,t++):r==="--category"?(e.category=o,t++):r==="--from"?(e.fromTime=o,t++):r==="--to"?(e.toTime=o,t++):r==="--max-delete"?(e.maxDelete=Number(o),t++):r==="--dry-run"?e.dryRun=true:r==="--json"?e.json=true:(r==="--help"||r==="-h")&&(e.help=true);}return e}exports.formatForgetText=p;exports.parseForgetOptions=y;exports.runForget=g;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkHSK27DQ7_cjs=require('./chunk-HSK27DQ7.cjs');require('./chunk-RSJ2KT6X.cjs');var chunkDXU5WPK3_cjs=require('./chunk-DXU5WPK3.cjs');require('./chunk-OIUUTVLL.cjs'),require('./chunk-CPRDIUQ4.cjs'),require('./chunk-NVGACA7W.cjs');async function l(t){let r=t.agentId?.trim()||"default",n=t.workspaceDir??process.cwd();return chunkDXU5WPK3_cjs.u("graph_query",{kind:t.kind??"nodes",query:t.query,startNodeId:t.startNodeId,depth:t.depth,maxNodes:t.maxNodes,scope:t.scope??"agent_only"},chunkDXU5WPK3_cjs.w(r,n))}function c(t){let r=t,n=[chunkHSK27DQ7_cjs.b("graph",{totalNodes:r.totalNodes??r.nodes.length},"KG query (scope={{scope}}, {{totalNodes}} node(s)):")];if(r.nodes.length===0)return n.push(chunkHSK27DQ7_cjs.a("graph","(no nodes matched)")),n.join(`
|
|
2
|
-
`);n.push(`nodes (${r.nodes.length}):`);for(let e of r.nodes){e.ownerAgentId?` [owner=${e.ownerAgentId}]`:" [shared]";n.push(chunkHSK27DQ7_cjs.c("graph",{id:String(e.id),name:e.name,type:e.type}," - #{{id}} {{name}} ({{type}})"));}n.push(`edges (${r.edges.length}):`);for(let e of r.edges)n.push(` - #${e.id} ${e.source} --${e.relation}--> ${e.target}`);return n.join(`
|
|
3
|
-
`)}function f(t){let r={};for(let n=0;n<t.length;n++){let e=t[n];if(e===void 0)continue;let o=t[n+1];e==="--agent"?(r.agentId=o,n++):e==="--kind"?(r.kind=o,n++):e==="--query"?(r.query=o,n++):e==="--start-node"?(r.startNodeId=Number(o),n++):e==="--depth"?(r.depth=Number(o),n++):e==="--max-nodes"?(r.maxNodes=Number(o),n++):e==="--scope"?(r.scope=o,n++):e==="--json"?r.json=true:(e==="--help"||e==="-h")&&(r.help=true);}return r}exports.formatGraphText=c;exports.parseGraphOptions=f;exports.runGraph=l;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkHSK27DQ7_cjs=require('./chunk-HSK27DQ7.cjs');require('./chunk-RSJ2KT6X.cjs');var chunkDXU5WPK3_cjs=require('./chunk-DXU5WPK3.cjs');require('./chunk-OIUUTVLL.cjs');var chunkCPRDIUQ4_cjs=require('./chunk-CPRDIUQ4.cjs');require('./chunk-NVGACA7W.cjs');async function u(i){if(!i.workspaceDir?.trim())throw new Error("init: --workspace-dir is required");let t=i.agentId??"",e=i.ctxWorkspaceDir??process.cwd();return chunkDXU5WPK3_cjs.u("init",{workspaceDir:i.workspaceDir,dbPath:chunkCPRDIUQ4_cjs.j(e),force:i.force??false},chunkDXU5WPK3_cjs.w(t,e))}function b(i){let t=i;return [chunkHSK27DQ7_cjs.b("init",{},"Initialization complete:"),chunkHSK27DQ7_cjs.c("init",{dbPath:t.dbPath,migrationsApplied:String(t.migrationsApplied),tablesCreated:String(t.tablesCreated),...t.configPath?{configPath:`${t.configPath} (${t.configCreated?"created":"exists"})`}:{}}," - db={{dbPath}}, migrations={{migrationsApplied}}, tables={{tablesCreated}}"+(t.configPath?`
|
|
2
|
-
- config: {{configPath}}`:"")),` - workspace: ${t.workspaceDir}, duration: ${t.durationMs}ms`].join(`
|
|
3
|
-
`)}function h(i){let t={};for(let e=0;e<i.length;e++){let n=i[e];if(n===void 0)continue;let r=i[e+1];n==="--workspace-dir"?(t.workspaceDir=r,e++):n==="--agent"?(t.agentId=r,e++):n==="--force"?t.force=true:n==="--json"?t.json=true:(n==="--help"||n==="-h")&&(t.help=true);}return t}exports.formatInitText=b;exports.parseInitOptions=h;exports.runInit=u;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import {b as b$1,c}from'./chunk-MWRDF6VN.mjs';import'./chunk-BSKFK4RC.mjs';import {u,w}from'./chunk-I6XVFDN2.mjs';import'./chunk-DFWC6WII.mjs';import {j}from'./chunk-WDVDYZ25.mjs';import'./chunk-HQBRVVXS.mjs';async function b(i){if(!i.workspaceDir?.trim())throw new Error("init: --workspace-dir is required");let t=i.agentId??"",e=i.ctxWorkspaceDir??process.cwd();return u("init",{workspaceDir:i.workspaceDir,dbPath:j(e),force:i.force??false},w(t,e))}function h(i){let t=i;return [b$1("init",{},"Initialization complete:"),c("init",{dbPath:t.dbPath,migrationsApplied:String(t.migrationsApplied),tablesCreated:String(t.tablesCreated),...t.configPath?{configPath:`${t.configPath} (${t.configCreated?"created":"exists"})`}:{}}," - db={{dbPath}}, migrations={{migrationsApplied}}, tables={{tablesCreated}}"+(t.configPath?`
|
|
2
|
-
- config: {{configPath}}`:"")),` - workspace: ${t.workspaceDir}, duration: ${t.durationMs}ms`].join(`
|
|
3
|
-
`)}function k(i){let t={};for(let e=0;e<i.length;e++){let n=i[e];if(n===void 0)continue;let r=i[e+1];n==="--workspace-dir"?(t.workspaceDir=r,e++):n==="--agent"?(t.agentId=r,e++):n==="--force"?t.force=true:n==="--json"?t.json=true:(n==="--help"||n==="-h")&&(t.help=true);}return t}export{h as formatInitText,k as parseInitOptions,b as runInit};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {a}from'./chunk-BSKFK4RC.mjs';import {u,w}from'./chunk-I6XVFDN2.mjs';import'./chunk-DFWC6WII.mjs';import'./chunk-WDVDYZ25.mjs';import'./chunk-HQBRVVXS.mjs';async function f(n){if(!n.query?.trim())throw new Error("recall: --query is required");let e=n.agentId?.trim()||"default",t=n.workspaceDir??process.cwd();return u("recall",{query:n.query,maxResults:n.limit??10,category:n.category,minImportance:n.minImportance},w(e,t))}function g(n){let e=n;if(e.total===0)return a("memory.recall.empty",{fallback:"(no facts)"});let t=[a("memory.recall.summary",{vars:{total:e.total},fallback:`Found ${e.total} fact(s):`})];for(let r of e.hits)t.push(a("memory.recall.item",{vars:{id:r.memoryId,category:r.category,importance:String(r.importance),score:r.score.toFixed(3),content:r.snippet},fallback:" - {{id}} [{{category}}/imp={{importance}}/score={{score}}] {{content}}"}));return t.join(`
|
|
2
|
-
`)}function y(n){let e={};for(let t=0;t<n.length;t++){let r=n[t];if(r===void 0)continue;let o=n[t+1];r==="--agent"?(e.agentId=o,t++):r==="--query"?(e.query=o,t++):r==="--limit"?(e.limit=Number(o),t++):r==="--category"?(e.category=o,t++):r==="--min-importance"?(e.minImportance=Number(o),t++):r==="--json"?e.json=true:(r==="--help"||r==="-h")&&(e.help=true);}return e}export{g as formatRecallText,y as parseRecallOptions,f as runRecall};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkRSJ2KT6X_cjs=require('./chunk-RSJ2KT6X.cjs'),chunkDXU5WPK3_cjs=require('./chunk-DXU5WPK3.cjs');require('./chunk-OIUUTVLL.cjs'),require('./chunk-CPRDIUQ4.cjs'),require('./chunk-NVGACA7W.cjs');async function p(n){if(!n.query?.trim())throw new Error("recall: --query is required");let e=n.agentId?.trim()||"default",t=n.workspaceDir??process.cwd();return chunkDXU5WPK3_cjs.u("recall",{query:n.query,maxResults:n.limit??10,category:n.category,minImportance:n.minImportance},chunkDXU5WPK3_cjs.w(e,t))}function f(n){let e=n;if(e.total===0)return chunkRSJ2KT6X_cjs.a("memory.recall.empty",{fallback:"(no facts)"});let t=[chunkRSJ2KT6X_cjs.a("memory.recall.summary",{vars:{total:e.total},fallback:`Found ${e.total} fact(s):`})];for(let r of e.hits)t.push(chunkRSJ2KT6X_cjs.a("memory.recall.item",{vars:{id:r.memoryId,category:r.category,importance:String(r.importance),score:r.score.toFixed(3),content:r.snippet},fallback:" - {{id}} [{{category}}/imp={{importance}}/score={{score}}] {{content}}"}));return t.join(`
|
|
2
|
-
`)}function g(n){let e={};for(let t=0;t<n.length;t++){let r=n[t];if(r===void 0)continue;let o=n[t+1];r==="--agent"?(e.agentId=o,t++):r==="--query"?(e.query=o,t++):r==="--limit"?(e.limit=Number(o),t++):r==="--category"?(e.category=o,t++):r==="--min-importance"?(e.minImportance=Number(o),t++):r==="--json"?e.json=true:(r==="--help"||r==="-h")&&(e.help=true);}return e}exports.formatRecallText=f;exports.parseRecallOptions=g;exports.runRecall=p;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {b as b$1,c}from'./chunk-MWRDF6VN.mjs';import'./chunk-BSKFK4RC.mjs';import {u,w}from'./chunk-I6XVFDN2.mjs';import'./chunk-DFWC6WII.mjs';import'./chunk-WDVDYZ25.mjs';import'./chunk-HQBRVVXS.mjs';async function p(r){if(!r.content?.trim())throw new Error("remember: --content is required");if(!r.category?.trim())throw new Error("remember: --category is required");if(r.importance===void 0)throw new Error("remember: --importance is required (1-10)");let e=r.agentId?.trim()||"default",t=r.workspaceDir??process.cwd();return u("remember",{content:r.content,category:r.category,importance:r.importance,tags:r.tags,sessionId:r.sessionId},w(e,t))}function l(r){let e=r,t=[b$1("remember",{},"Memory persisted:"),c("remember",{id:e.fact.id,category:e.fact.category,importance:String(e.fact.importance??5)}," - id={{id}} category={{category}} importance={{importance}}"),` - createdAt: ${e.fact.createdAt}`];return e.deduplicated&&t.push(" - (deduplicated; no new fact inserted)"),t.join(`
|
|
2
|
-
`)}function b(r){let e={};for(let t=0;t<r.length;t++){let i=r[t];if(i===void 0)continue;let n=r[t+1];i==="--agent"&&n!==void 0?(e.agentId=n,t++):i==="--content"&&n!==void 0?(e.content=n,t++):i==="--category"&&n!==void 0?(e.category=n,t++):i==="--importance"&&n!==void 0?(e.importance=Number(n),t++):i==="--tag"&&n!==void 0?(e.tags=[...e.tags??[],n],t++):i==="--session"&&n!==void 0?(e.sessionId=n,t++):i==="--json"?e.json=true:(i==="--help"||i==="-h")&&(e.help=true);}return e}export{l as formatRememberText,b as parseRememberOptions,p as runRemember};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkHSK27DQ7_cjs=require('./chunk-HSK27DQ7.cjs');require('./chunk-RSJ2KT6X.cjs');var chunkDXU5WPK3_cjs=require('./chunk-DXU5WPK3.cjs');require('./chunk-OIUUTVLL.cjs'),require('./chunk-CPRDIUQ4.cjs'),require('./chunk-NVGACA7W.cjs');async function u(r){if(!r.content?.trim())throw new Error("remember: --content is required");if(!r.category?.trim())throw new Error("remember: --category is required");if(r.importance===void 0)throw new Error("remember: --importance is required (1-10)");let e=r.agentId?.trim()||"default",t=r.workspaceDir??process.cwd();return chunkDXU5WPK3_cjs.u("remember",{content:r.content,category:r.category,importance:r.importance,tags:r.tags,sessionId:r.sessionId},chunkDXU5WPK3_cjs.w(e,t))}function p(r){let e=r,t=[chunkHSK27DQ7_cjs.b("remember",{},"Memory persisted:"),chunkHSK27DQ7_cjs.c("remember",{id:e.fact.id,category:e.fact.category,importance:String(e.fact.importance??5)}," - id={{id}} category={{category}} importance={{importance}}"),` - createdAt: ${e.fact.createdAt}`];return e.deduplicated&&t.push(" - (deduplicated; no new fact inserted)"),t.join(`
|
|
2
|
-
`)}function l(r){let e={};for(let t=0;t<r.length;t++){let i=r[t];if(i===void 0)continue;let n=r[t+1];i==="--agent"&&n!==void 0?(e.agentId=n,t++):i==="--content"&&n!==void 0?(e.content=n,t++):i==="--category"&&n!==void 0?(e.category=n,t++):i==="--importance"&&n!==void 0?(e.importance=Number(n),t++):i==="--tag"&&n!==void 0?(e.tags=[...e.tags??[],n],t++):i==="--session"&&n!==void 0?(e.sessionId=n,t++):i==="--json"?e.json=true:(i==="--help"||i==="-h")&&(e.help=true);}return e}exports.formatRememberText=p;exports.parseRememberOptions=l;exports.runRemember=u;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkHSK27DQ7_cjs=require('./chunk-HSK27DQ7.cjs');require('./chunk-RSJ2KT6X.cjs');var chunkDXU5WPK3_cjs=require('./chunk-DXU5WPK3.cjs');require('./chunk-OIUUTVLL.cjs'),require('./chunk-CPRDIUQ4.cjs'),require('./chunk-NVGACA7W.cjs');async function b(n){let t=n.agentId,e=n.workspaceDir??process.cwd();return chunkDXU5WPK3_cjs.u("status",{agentId:t},chunkDXU5WPK3_cjs.w(t,e))}function d(n){let t=n,e=[];e.push(chunkHSK27DQ7_cjs.b("status",{},"Memory status:"));let o=[["dbPath",t.dbPath??""],["workspaceDir",t.workspaceDir??""],["factsCount",String(t.factsCount??0)],["nodesCount",String(t.nodesCount??0)],["edgesCount",String(t.edgesCount??0)],["ftsAvailable",t.ftsAvailable?"yes":"no"],["vectorEnabled",t.vectorEnabled?"yes":"no"],["kgScopeEnabled",t.kgScopeEnabled?"yes":"no"],["healthy",t.healthy?"yes":"no"]];for(let[s,r]of o)e.push(chunkHSK27DQ7_cjs.c("status",{key:s,value:r}," - {{key}}: {{value}}"));e.push(""),e.push(" - factsByCategory:");for(let[s,r]of Object.entries(t.factsByCategory))e.push(chunkHSK27DQ7_cjs.c("status",{key:s,value:String(r)}," - {{key}}: {{value}}"));return e.join(`
|
|
2
|
-
`)}function y(n){let t={};for(let e=0;e<n.length;e++){let o=n[e];if(o===void 0)continue;let s=n[e+1];o==="--agent"?(t.agentId=s,e++):o==="--json"?t.json=true:(o==="--help"||o==="-h")&&(t.help=true);}return t}exports.formatStatusText=d;exports.parseStatusOptions=y;exports.runStatus=b;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {b,c}from'./chunk-MWRDF6VN.mjs';import'./chunk-BSKFK4RC.mjs';import {u,w}from'./chunk-I6XVFDN2.mjs';import'./chunk-DFWC6WII.mjs';import'./chunk-WDVDYZ25.mjs';import'./chunk-HQBRVVXS.mjs';async function d(n){let t=n.agentId,e=n.workspaceDir??process.cwd();return u("status",{agentId:t},w(t,e))}function y(n){let t=n,e=[];e.push(b("status",{},"Memory status:"));let o=[["dbPath",t.dbPath??""],["workspaceDir",t.workspaceDir??""],["factsCount",String(t.factsCount??0)],["nodesCount",String(t.nodesCount??0)],["edgesCount",String(t.edgesCount??0)],["ftsAvailable",t.ftsAvailable?"yes":"no"],["vectorEnabled",t.vectorEnabled?"yes":"no"],["kgScopeEnabled",t.kgScopeEnabled?"yes":"no"],["healthy",t.healthy?"yes":"no"]];for(let[s,r]of o)e.push(c("status",{key:s,value:r}," - {{key}}: {{value}}"));e.push(""),e.push(" - factsByCategory:");for(let[s,r]of Object.entries(t.factsByCategory))e.push(c("status",{key:s,value:String(r)}," - {{key}}: {{value}}"));return e.join(`
|
|
2
|
-
`)}function h(n){let t={};for(let e=0;e<n.length;e++){let o=n[e];if(o===void 0)continue;let s=n[e+1];o==="--agent"?(t.agentId=s,e++):o==="--json"?t.json=true:(o==="--help"||o==="-h")&&(t.help=true);}return t}export{y as formatStatusText,h as parseStatusOptions,d as runStatus};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkFMEXQ5YE_cjs=require('./chunk-FMEXQ5YE.cjs');require('./chunk-DXU5WPK3.cjs'),require('./chunk-OIUUTVLL.cjs'),require('./chunk-CPRDIUQ4.cjs'),require('./chunk-NVGACA7W.cjs');Object.defineProperty(exports,"MemoryStdioServer",{enumerable:true,get:function(){return chunkFMEXQ5YE_cjs.b}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{b as MemoryStdioServer}from'./chunk-EECBJNZI.mjs';import'./chunk-I6XVFDN2.mjs';import'./chunk-DFWC6WII.mjs';import'./chunk-WDVDYZ25.mjs';import'./chunk-HQBRVVXS.mjs';
|