claude-memory-layer 1.0.52 → 1.0.53
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/dist/cli/index.js +39 -11
- package/dist/cli/index.js.map +3 -3
- package/dist/mcp/index.js +3 -3
- package/dist/mcp/index.js.map +2 -2
- package/dist/server/api/index.js +2 -0
- package/dist/server/api/index.js.map +2 -2
- package/dist/server/index.js +2 -0
- package/dist/server/index.js.map +2 -2
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -18435,6 +18435,8 @@ function summarizeProjectOutbox(outbox) {
|
|
|
18435
18435
|
pending: (embedding.pending || 0) + (vector.pending || 0),
|
|
18436
18436
|
processing: (embedding.processing || 0) + (vector.processing || 0),
|
|
18437
18437
|
failed: (embedding.failed || 0) + (vector.failed || 0),
|
|
18438
|
+
retryableFailed: (embedding.retryableFailed || 0) + (vector.retryableFailed || 0),
|
|
18439
|
+
quarantinedFailed: (embedding.quarantinedFailed || 0) + (vector.quarantinedFailed || 0),
|
|
18438
18440
|
stuckProcessing: (embedding.stuckProcessing || 0) + (vector.stuckProcessing || 0)
|
|
18439
18441
|
};
|
|
18440
18442
|
}
|
|
@@ -20900,14 +20902,12 @@ function resolveVectorStatusCommandOptions(options, cwd = process.cwd()) {
|
|
|
20900
20902
|
if (options.project !== void 0 && options.project.trim().length === 0) {
|
|
20901
20903
|
throw new Error("--project must not be empty");
|
|
20902
20904
|
}
|
|
20903
|
-
return { projectPath: options.project ?? cwd };
|
|
20905
|
+
return { projectPath: options.project ?? cwd, json: options.json === true };
|
|
20904
20906
|
}
|
|
20905
20907
|
function formatVectorStatusReport(input) {
|
|
20906
|
-
const
|
|
20907
|
-
const vector =
|
|
20908
|
-
const
|
|
20909
|
-
const status = totals.failed > 0 || totals.stuckProcessing > 0 ? "needs-attention" : "ok";
|
|
20910
|
-
const oldestProcessingAge = maxNullable2(embedding.oldestProcessingAgeMs, vector.oldestProcessingAgeMs);
|
|
20908
|
+
const report = buildVectorStatusReport(input);
|
|
20909
|
+
const { embedding, vector, totals } = report.outbox;
|
|
20910
|
+
const oldestProcessingAge = report.oldestProcessingAgeMs;
|
|
20911
20911
|
const lines = [
|
|
20912
20912
|
"Vector Outbox Status",
|
|
20913
20913
|
`Vector count: ${input.stats.vectorCount}`,
|
|
@@ -20920,13 +20920,40 @@ function formatVectorStatusReport(input) {
|
|
|
20920
20920
|
"",
|
|
20921
20921
|
`Totals: pending=${totals.pending}, processing=${totals.processing}, failed=${totals.failed}, retryableFailed=${totals.retryableFailed ?? 0}, quarantinedFailed=${totals.quarantinedFailed ?? 0}, stuck=${totals.stuckProcessing}, total=${totals.total}`,
|
|
20922
20922
|
`Oldest processing age: ${formatDuration2(oldestProcessingAge)}`,
|
|
20923
|
-
`Status: ${status}`
|
|
20923
|
+
`Status: ${report.status}`
|
|
20924
20924
|
];
|
|
20925
|
-
if (
|
|
20925
|
+
if (report.recommendedAction === "run-recovery") {
|
|
20926
20926
|
lines.push("", "Next step: claude-memory-layer process --dry-run-recovery");
|
|
20927
|
+
} else if (report.recommendedAction === "inspect-quarantined") {
|
|
20928
|
+
lines.push("", "Next step: inspect quarantined outbox failures; recovery has no retryable failed rows.");
|
|
20927
20929
|
}
|
|
20928
20930
|
return lines.join("\n");
|
|
20929
20931
|
}
|
|
20932
|
+
function formatVectorStatusJsonReport(input) {
|
|
20933
|
+
return JSON.stringify(buildVectorStatusReport(input), null, 2);
|
|
20934
|
+
}
|
|
20935
|
+
function buildVectorStatusReport(input) {
|
|
20936
|
+
const embedding = normalizeQueue(input.outbox.embedding);
|
|
20937
|
+
const vector = normalizeQueue(input.outbox.vector);
|
|
20938
|
+
const totals = sumQueues(embedding, vector);
|
|
20939
|
+
const status = totals.failed > 0 || totals.stuckProcessing > 0 ? "needs-attention" : "ok";
|
|
20940
|
+
const oldestProcessingAgeMs = maxNullable2(embedding.oldestProcessingAgeMs, vector.oldestProcessingAgeMs);
|
|
20941
|
+
return {
|
|
20942
|
+
storage: {
|
|
20943
|
+
totalEvents: numberOrZero(input.stats.totalEvents),
|
|
20944
|
+
vectorCount: numberOrZero(input.stats.vectorCount)
|
|
20945
|
+
},
|
|
20946
|
+
outbox: { embedding, vector, totals },
|
|
20947
|
+
status,
|
|
20948
|
+
recommendedAction: selectRecommendedAction(totals),
|
|
20949
|
+
oldestProcessingAgeMs
|
|
20950
|
+
};
|
|
20951
|
+
}
|
|
20952
|
+
function selectRecommendedAction(totals) {
|
|
20953
|
+
if ((totals.retryableFailed ?? 0) > 0 || totals.stuckProcessing > 0) return "run-recovery";
|
|
20954
|
+
if ((totals.quarantinedFailed ?? 0) > 0) return "inspect-quarantined";
|
|
20955
|
+
return "none";
|
|
20956
|
+
}
|
|
20930
20957
|
function normalizeQueue(queue) {
|
|
20931
20958
|
return {
|
|
20932
20959
|
pending: numberOrZero(queue.pending),
|
|
@@ -21602,7 +21629,7 @@ async function runOperationCli(action, label) {
|
|
|
21602
21629
|
}
|
|
21603
21630
|
}
|
|
21604
21631
|
var program = new Command();
|
|
21605
|
-
program.name("claude-memory-layer").description("Claude Code Memory Plugin CLI").version("1.0.
|
|
21632
|
+
program.name("claude-memory-layer").description("Claude Code Memory Plugin CLI").version("1.0.53");
|
|
21606
21633
|
program.command("market-context").description("Fetch read-only DART/FRED/Finnhub context with structured MarketContextSnapshot bull/bear/risk/catalyst analysis").option("--company <name>", "Company name for DART fallback search and report subject").option("--dart-corp-code <code>", "Exact DART corp_code for issuer-specific filings").option("--symbol <ticker>", "Listed ticker for Finnhub company profile").option("--providers <list>", "Comma-separated providers: dart,fred,finnhub").option("--fred-series <list>", "Comma-separated FRED series IDs").option("--json", "Print structured JSON including analysis.marketSnapshot").option("--no-snapshot", "Disable MarketContextSnapshot and DART company snapshot analysis").action(async (options) => {
|
|
21607
21634
|
try {
|
|
21608
21635
|
await runMarketContextCommand(options);
|
|
@@ -21816,7 +21843,7 @@ program.command("stats").description("View memory statistics").option("-p, --pro
|
|
|
21816
21843
|
process.exit(1);
|
|
21817
21844
|
}
|
|
21818
21845
|
});
|
|
21819
|
-
program.command("vector-status").description("Show aggregate vector outbox status").option("-p, --project <path>", "Project path (defaults to cwd)").action(async (options) => {
|
|
21846
|
+
program.command("vector-status").description("Show aggregate vector outbox status").option("-p, --project <path>", "Project path (defaults to cwd)").option("--json", "Print aggregate vector outbox status as JSON for automation").action(async (options) => {
|
|
21820
21847
|
let service;
|
|
21821
21848
|
try {
|
|
21822
21849
|
const vectorOptions = resolveVectorStatusCommandOptions(options);
|
|
@@ -21825,7 +21852,8 @@ program.command("vector-status").description("Show aggregate vector outbox statu
|
|
|
21825
21852
|
service.getStats(),
|
|
21826
21853
|
service.getOutboxStats()
|
|
21827
21854
|
]);
|
|
21828
|
-
|
|
21855
|
+
const rendered = vectorOptions.json ? formatVectorStatusJsonReport({ stats, outbox }) : formatVectorStatusReport({ stats, outbox });
|
|
21856
|
+
console.log(rendered);
|
|
21829
21857
|
} catch (error) {
|
|
21830
21858
|
const message = error instanceof Error && error.message.startsWith("--") ? error.message : "Vector status failed";
|
|
21831
21859
|
console.error(message);
|