@productbrain/mcp 0.0.1-beta.13808 → 0.0.1-beta.13815

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.
@@ -11223,7 +11223,17 @@ var RESOLUTION_WORDS = {
11223
11223
  reasonTooLong: signed(`Keep the reason to one line of ${CONFLICT_RESOLUTION_REASON_MAX} characters or fewer.`),
11224
11224
  target: "replaces or refines: the entry it replaces or refines, one of the two",
11225
11225
  reason: `For unrelated: one line on why (${CONFLICT_RESOLUTION_REASON_MAX} characters at most); for an amendment: why the answer changes`,
11226
- recorded: (choice2) => `Recorded: ${choice2}.`
11226
+ recorded: (choice2) => `Recorded: ${choice2}.`,
11227
+ /** The list's header, one for the CLI and the MCP (DEC-2443): the open contradictions, then the closed ones beside them when `closed` is given.
11228
+ * A plus after a count means more exist than were read (RULE-17). */
11229
+ openHeader: (open, closed) => `Open contradictions (${open.n}${open.more ? "+" : ""})${closed ? `, ${closed.n}${closed.more ? "+" : ""} closed` : ""}`,
11230
+ /** The list when nothing is open (all) or nothing is unanswered (the default list); the surface adds how to see the rest. */
11231
+ noneOpen: "No open contradictions.",
11232
+ noneUnanswered: "No unanswered contradictions.",
11233
+ /** A stored answer as a person reads it: never the stored code. */
11234
+ answer: (answer2) => answer2 === "real" ? "real" : "false alarm",
11235
+ /** The receipt for an answer given in the older form (real or noise), on the CLI and MCP alike. */
11236
+ answeredAs: (answer2) => answer2 === "real" ? "Answered as real: the contradiction stays open until an entry changes." : "Answered as a false alarm: the contradiction is closed."
11227
11237
  };
11228
11238
 
11229
11239
  // src/tools/conflicts.ts
@@ -11235,7 +11245,7 @@ var target = z32.string().max(200).optional();
11235
11245
  var reason = z32.string().max(CONFLICT_RESOLUTION_REASON_MAX, RESOLUTION_WORDS.reasonTooLong).optional();
11236
11246
  var conflictsSchema = z32.object({
11237
11247
  action: z32.enum(ACTIONS),
11238
- mode: mode.optional().describe("list: all adds judged."),
11248
+ mode: mode.optional().describe("list: all adds answered and snoozed ones."),
11239
11249
  issueId: z32.string().max(200).optional().describe("resolve: id from list."),
11240
11250
  choice: choice.optional(),
11241
11251
  target,
@@ -11248,15 +11258,17 @@ var conflictsActionUnion = z32.discriminatedUnion("action", [
11248
11258
  ]);
11249
11259
  var CONFLICTS_ACTION_SPECS = {
11250
11260
  list: { params: ["mode"], description: "mode: actionable by default." },
11251
- resolve: { params: ["issueId", "choice", "target", "reason", "verdict"], description: "issueId and choice (or verdict)." }
11261
+ resolve: { params: ["issueId", "choice", "target", "reason", "verdict"], description: "issueId and choice (or real|noise)." }
11252
11262
  };
11253
11263
  async function handleConflictsList(listMode = "actionable") {
11254
11264
  const rows = await kernelCall("conflicts.list", { mode: listMode });
11255
11265
  const side = (name, id) => `${sanitizeSingleLineField(name)} (${id ? sanitizeSingleLineField(id) : "gone"})`;
11256
- const lines = rows.map((r) => `${r.id} \xB7 ${side(r.entryAName, r.entryAId)} \u2194 ${side(r.entryBName, r.entryBId)} \xB7 ${r.conflictType} ${r.confidence.toFixed(2)}${r.rankLabel ? ` \xB7 ${sanitizeSingleLineField(r.rankLabel)}` : ""} \xB7 ${sanitizeSingleLineField(r.explanation)}` + (r.guidance ? ` \xB7 ${sanitizeSingleLineField(r.guidance)}` : ""));
11266
+ const lines = rows.map((r) => `${r.id} \xB7 ${side(r.entryAName, r.entryAId)} \u2194 ${side(r.entryBName, r.entryBId)} \xB7 ${r.conflictType} ${r.confidence.toFixed(2)}${r.rankLabel ? ` \xB7 ${sanitizeSingleLineField(r.rankLabel)}` : ""} \xB7 ${sanitizeSingleLineField(r.explanation)}` + (r.guidance ? ` \xB7 ${sanitizeSingleLineField(r.guidance)}` : "") + (r.resolvedLine ? ` \xB7 ${sanitizeSingleLineField(r.resolvedLine)}` : ""));
11257
11267
  const truncated = rows[0]?.listTruncated === true;
11258
- const count = `${rows.length}${truncated ? "+" : ""} contradiction${rows.length === 1 && !truncated ? "" : "s"}`;
11259
- const summary = rows.length === 0 ? listMode === "all" ? "No open contradictions." : "No contradictions await your verdict. mode=all shows judged and snoozed rows." : listMode === "all" ? `${count} open, judged and snoozed included.` : `${count}. Resolve one: conflicts action=resolve issueId=<id> choice=${CONFLICT_RESOLUTIONS.join("|")}`;
11268
+ const answered = rows.filter((r) => r.answered).length;
11269
+ const open = rows.length - answered;
11270
+ const count = `${open}${truncated ? "+" : ""} contradiction${open === 1 && !truncated ? "" : "s"}`;
11271
+ const summary = rows.length === 0 ? listMode === "all" ? RESOLUTION_WORDS.noneOpen : `${RESOLUTION_WORDS.noneUnanswered} mode=all shows answered and snoozed ones.` : listMode === "all" ? RESOLUTION_WORDS.openHeader({ n: open, more: truncated }, answered > 0 || rows[0]?.closedTruncated ? { n: answered, more: rows[0]?.closedTruncated === true } : void 0) : `${count}. Resolve one: conflicts action=resolve issueId=<id> choice=${CONFLICT_RESOLUTIONS.join("|")}`;
11260
11272
  const order = rows[0]?.rankOrderNote ? [sanitizeSingleLineField(rows[0].rankOrderNote)] : [];
11261
11273
  return successResult([summary, ...order, ...lines].join("\n"), summary, { mode: listMode, rows });
11262
11274
  }
@@ -11277,7 +11289,7 @@ async function handleConflictsResolve(issueId, { choice: pick, target: entry, re
11277
11289
  issueId,
11278
11290
  verdict: word === "noise" ? "false_alarm" : "real"
11279
11291
  });
11280
- const message = word === "real" ? "Verdict recorded: real. The row stays open until one entry changes." : "Verdict recorded: noise. The row is closed.";
11292
+ const message = RESOLUTION_WORDS.answeredAs(word === "noise" ? "false_alarm" : "real");
11281
11293
  return successResult(message, message, { issueId, verdict: word, result: result2 });
11282
11294
  }
11283
11295
  function registerConflictsTool(server) {
@@ -12127,4 +12139,4 @@ export {
12127
12139
  SERVER_VERSION,
12128
12140
  createProductBrainServer
12129
12141
  };
12130
- //# sourceMappingURL=chunk-KYQQAZVI.js.map
12142
+ //# sourceMappingURL=chunk-AHDK7KO5.js.map