@neurynae/toolcairn-mcp 0.10.7 → 0.10.8
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 +30 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4503,14 +4503,37 @@ async function autoInitProject(input) {
|
|
|
4503
4503
|
cfg.project.languages = scan.languages;
|
|
4504
4504
|
cfg.project.frameworks = scan.frameworks;
|
|
4505
4505
|
cfg.project.subprojects = scan.subprojects;
|
|
4506
|
-
cfg.tools.confirmed = scan.tools;
|
|
4507
4506
|
cfg.scan_metadata = scan.scan_metadata;
|
|
4508
|
-
|
|
4507
|
+
if (!batchResolveFailed) {
|
|
4508
|
+
const priorConfirmedByKey = /* @__PURE__ */ new Map();
|
|
4509
|
+
for (const existing of cfg.tools.confirmed) {
|
|
4510
|
+
const eco = existing.locations?.[0]?.ecosystem ?? "";
|
|
4511
|
+
priorConfirmedByKey.set(`${eco}:${existing.name}`, existing);
|
|
4512
|
+
}
|
|
4513
|
+
cfg.tools.confirmed = scan.tools.map((fresh) => {
|
|
4514
|
+
const eco = fresh.locations?.[0]?.ecosystem ?? "";
|
|
4515
|
+
const prior = priorConfirmedByKey.get(`${eco}:${fresh.name}`);
|
|
4516
|
+
if (!prior)
|
|
4517
|
+
return fresh;
|
|
4518
|
+
return {
|
|
4519
|
+
...fresh,
|
|
4520
|
+
// Preserve add-time ordinals + user-set fields.
|
|
4521
|
+
chosen_at: prior.chosen_at ?? fresh.chosen_at,
|
|
4522
|
+
confirmed_at: prior.confirmed_at ?? prior.chosen_at ?? fresh.chosen_at,
|
|
4523
|
+
last_verified: now,
|
|
4524
|
+
chosen_reason: prior.chosen_reason && prior.chosen_reason.length > 0 ? prior.chosen_reason : fresh.chosen_reason,
|
|
4525
|
+
alternatives_considered: prior.alternatives_considered && prior.alternatives_considered.length > 0 ? prior.alternatives_considered : fresh.alternatives_considered,
|
|
4526
|
+
query_id: prior.query_id ?? fresh.query_id,
|
|
4527
|
+
notes: prior.notes ?? fresh.notes
|
|
4528
|
+
};
|
|
4529
|
+
});
|
|
4530
|
+
}
|
|
4531
|
+
const priorUnknownByKey = /* @__PURE__ */ new Map();
|
|
4509
4532
|
for (const existing of cfg.tools.unknown_in_graph ?? []) {
|
|
4510
|
-
|
|
4533
|
+
priorUnknownByKey.set(`${existing.ecosystem}:${existing.name}`, existing);
|
|
4511
4534
|
}
|
|
4512
4535
|
cfg.tools.unknown_in_graph = unknownFromScan.map((fresh) => {
|
|
4513
|
-
const prior =
|
|
4536
|
+
const prior = priorUnknownByKey.get(`${fresh.ecosystem}:${fresh.name}`);
|
|
4514
4537
|
if (prior?.suggested) {
|
|
4515
4538
|
return { ...fresh, suggested: true, suggested_at: prior.suggested_at };
|
|
4516
4539
|
}
|
|
@@ -6083,17 +6106,17 @@ async function main() {
|
|
|
6083
6106
|
if (authenticated) {
|
|
6084
6107
|
logger26.info({ user: creds.user_email }, "Authenticated \u2014 starting full server");
|
|
6085
6108
|
try {
|
|
6086
|
-
const summary = await runPostAuthInit({ agent: "claude"
|
|
6109
|
+
const summary = await runPostAuthInit({ agent: "claude" });
|
|
6087
6110
|
logger26.info(
|
|
6088
6111
|
{
|
|
6089
6112
|
roots: summary.roots_discovered.length,
|
|
6090
6113
|
provisioned: summary.projects.length,
|
|
6091
6114
|
unknown_tools_total: summary.unknown_tools_total
|
|
6092
6115
|
},
|
|
6093
|
-
"Startup auto-
|
|
6116
|
+
"Startup auto-refresh complete"
|
|
6094
6117
|
);
|
|
6095
6118
|
} catch (err) {
|
|
6096
|
-
logger26.warn({ err }, "Startup auto-
|
|
6119
|
+
logger26.warn({ err }, "Startup auto-refresh failed \u2014 continuing with tool registration");
|
|
6097
6120
|
}
|
|
6098
6121
|
server = await buildProdServer();
|
|
6099
6122
|
} else {
|