@productbrain/mcp 0.0.1-beta.16 → 0.0.1-beta.18

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.
@@ -310,16 +310,18 @@ ${formatted}` }]
310
310
  inputSchema: {
311
311
  from: z.string().describe("Source entry ID, e.g. 'T-SUPPLIER'"),
312
312
  to: z.string().describe("Target entry ID, e.g. 'BR-001'"),
313
- type: z.string().describe("Relation type \u2014 use a recommended type or any descriptive string")
313
+ type: z.string().describe("Relation type \u2014 use a recommended type or any descriptive string"),
314
+ score: z.number().optional().describe("Suggestion score from suggest-links (improves feedback for weight tuning)")
314
315
  },
315
316
  annotations: { destructiveHint: false }
316
317
  },
317
- async ({ from, to, type }) => {
318
+ async ({ from, to, type, score }) => {
318
319
  requireWriteAccess();
319
320
  const result = await mcpMutation("chain.createEntryRelation", {
320
321
  fromEntryId: from,
321
322
  toEntryId: to,
322
- type
323
+ type,
324
+ suggestionScore: score ?? void 0
323
325
  });
324
326
  await recordSessionActivity({ relationCreated: result?.status !== "proposal_created" });
325
327
  const wsCtx = await getWorkspaceContext();
@@ -1471,12 +1473,16 @@ function registerHealthTools(server) {
1471
1473
  lines.push("---");
1472
1474
  lines.push("_Warning: Could not mark session as oriented. Write tools may be restricted._");
1473
1475
  }
1474
- mcpMutation("chain.recordSessionSignal", {
1475
- sessionId: agentSessionId,
1476
- signalType: "immediate_context_load",
1477
- metadata: { source: "orient" }
1478
- }).catch(() => {
1479
- });
1476
+ try {
1477
+ await mcpMutation("chain.recordSessionSignal", {
1478
+ sessionId: agentSessionId,
1479
+ signalType: "immediate_context_load",
1480
+ metadata: { source: "orient" }
1481
+ });
1482
+ } catch (err) {
1483
+ process.stderr.write(`[MCP] recordSessionSignal failed: ${err.message}
1484
+ `);
1485
+ }
1480
1486
  } else {
1481
1487
  lines.push("---");
1482
1488
  lines.push("_No active agent session. Call `agent-start` to begin a tracked session._");
@@ -4549,4 +4555,4 @@ export {
4549
4555
  SERVER_VERSION,
4550
4556
  createProductBrainServer
4551
4557
  };
4552
- //# sourceMappingURL=chunk-5V4JXM4G.js.map
4558
+ //# sourceMappingURL=chunk-TUNNDDD7.js.map