@neurynae/toolcairn-mcp 0.10.13 → 0.10.15
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/index.js +19 -8
- package/package.json +2 -3
- package/dist/index.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1346,17 +1346,33 @@ var ARCHIVE_BATCH = 2500;
|
|
|
1346
1346
|
async function appendAudit(projectRoot, entry) {
|
|
1347
1347
|
await mkdir3(joinConfigDir(projectRoot), { recursive: true });
|
|
1348
1348
|
const auditPath = joinAuditPath(projectRoot);
|
|
1349
|
-
const line = `${JSON.stringify(entry)}
|
|
1349
|
+
const line = `${JSON.stringify(normalizeAuditEntry(entry))}
|
|
1350
1350
|
`;
|
|
1351
1351
|
await appendFile(auditPath, line, "utf-8");
|
|
1352
1352
|
await rotateIfNeeded(projectRoot, auditPath);
|
|
1353
1353
|
}
|
|
1354
|
+
function normalizeAuditEntry(entry) {
|
|
1355
|
+
return {
|
|
1356
|
+
action: entry.action,
|
|
1357
|
+
tool: entry.tool,
|
|
1358
|
+
timestamp: entry.timestamp,
|
|
1359
|
+
reason: entry.reason,
|
|
1360
|
+
mcp_tool: entry.mcp_tool ?? null,
|
|
1361
|
+
query_id: entry.query_id ?? null,
|
|
1362
|
+
duration_ms: entry.duration_ms ?? null,
|
|
1363
|
+
status: entry.status ?? "ok",
|
|
1364
|
+
outcome: entry.outcome ?? null,
|
|
1365
|
+
replaced_by: entry.replaced_by ?? null,
|
|
1366
|
+
candidates: entry.candidates ?? null,
|
|
1367
|
+
metadata: entry.metadata ?? null
|
|
1368
|
+
};
|
|
1369
|
+
}
|
|
1354
1370
|
async function bulkAppendAudit(projectRoot, entries) {
|
|
1355
1371
|
if (entries.length === 0)
|
|
1356
1372
|
return;
|
|
1357
1373
|
await mkdir3(joinConfigDir(projectRoot), { recursive: true });
|
|
1358
1374
|
const auditPath = joinAuditPath(projectRoot);
|
|
1359
|
-
const payload = entries.map((e) => `${JSON.stringify(e)}
|
|
1375
|
+
const payload = entries.map((e) => `${JSON.stringify(normalizeAuditEntry(e))}
|
|
1360
1376
|
`).join("");
|
|
1361
1377
|
await appendFile(auditPath, payload, "utf-8");
|
|
1362
1378
|
await rotateIfNeeded(projectRoot, auditPath);
|
|
@@ -4854,11 +4870,7 @@ var import_errors22 = __toESM(require_dist2(), 1);
|
|
|
4854
4870
|
var logger20 = (0, import_errors22.createMcpLogger)({ name: "@toolcairn/tools:read-project-config" });
|
|
4855
4871
|
var STALENESS_THRESHOLD_DAYS = 90;
|
|
4856
4872
|
var PENDING_OUTCOME_TTL_DAYS = 7;
|
|
4857
|
-
var RECOMMENDATION_MCP_TOOLS = /* @__PURE__ */ new Set([
|
|
4858
|
-
"search_tools",
|
|
4859
|
-
"search_tools_respond",
|
|
4860
|
-
"get_stack"
|
|
4861
|
-
]);
|
|
4873
|
+
var RECOMMENDATION_MCP_TOOLS = /* @__PURE__ */ new Set(["search_tools", "search_tools_respond", "get_stack"]);
|
|
4862
4874
|
function derivePendingOutcomes(entries) {
|
|
4863
4875
|
const cutoff = Date.now() - PENDING_OUTCOME_TTL_DAYS * 24 * 60 * 60 * 1e3;
|
|
4864
4876
|
const open = /* @__PURE__ */ new Map();
|
|
@@ -6568,4 +6580,3 @@ main().catch((error) => {
|
|
|
6568
6580
|
);
|
|
6569
6581
|
process.exit(1);
|
|
6570
6582
|
});
|
|
6571
|
-
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neurynae/toolcairn-mcp",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.15",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -25,8 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"files": [
|
|
27
27
|
"dist/",
|
|
28
|
-
"bin/"
|
|
29
|
-
"data/"
|
|
28
|
+
"bin/"
|
|
30
29
|
],
|
|
31
30
|
"engines": {
|
|
32
31
|
"node": ">=22.0.0"
|