@productbrain/mcp 0.0.1-beta.14061 → 0.0.1-beta.14069

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.
@@ -11210,7 +11210,12 @@ var RESOLUTION_WORDS = {
11210
11210
  recorded: (choice2) => `Recorded: ${choice2}.`,
11211
11211
  /** TASK-1560 (QUE-518, QUE-501): what the propose verb does, as pb's help and the MCP tool say it (Voice signs). */
11212
11212
  proposeHelp: "Propose the answer to a possible clash; its owner confirms it",
11213
- tool: "Possible clashes between entries: list, resolve or propose an answer.",
11213
+ /** TASK-1571 (QUE-554, DEC-2299): what only a person does, as the person-only floor says it ("Only a person answers a possible
11214
+ * clash."); the CLI and MCP read it to add their propose command to the gateway's refusal. */
11215
+ answerVerb: "answers a possible clash",
11216
+ tool: "List possible clashes; propose an answer; a person answers in Cortex.",
11217
+ /** TASK-1571 (TEN-6206): the answer verbs' help on the CLI and MCP, which the gateway now refuses for every caller (QUE-554). */
11218
+ answerHelp: "A key proposes; a person answers in Cortex.",
11214
11219
  /** 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.
11215
11220
  * A plus after a count means more exist than were read (RULE-17). */
11216
11221
  openHeader: (open, closed) => `Open contradictions (${open.n}${open.more ? "+" : ""})${closed ? `, ${closed.n}${closed.more ? "+" : ""} closed` : ""}`,
@@ -11246,7 +11251,7 @@ var conflictsActionUnion = z32.discriminatedUnion("action", [
11246
11251
  ]);
11247
11252
  var CONFLICTS_ACTION_SPECS = {
11248
11253
  list: { params: ["mode"], description: "mode: actionable by default." },
11249
- resolve: { params: ["issueId", "choice", "target", "reason", "verdict"], description: "issueId and choice (or real|noise)." },
11254
+ resolve: { params: ["issueId", "choice", "target", "reason", "verdict"], description: RESOLUTION_WORDS.answerHelp },
11250
11255
  propose: { params: ["issueId", "choice", "target", "reason"], description: "issueId and choice; the owner confirms it." }
11251
11256
  };
11252
11257
  async function handleConflictsList(listMode = "actionable") {
@@ -11258,11 +11263,20 @@ async function handleConflictsList(listMode = "actionable") {
11258
11263
  const answered = rows.filter((r) => r.answered).length;
11259
11264
  const open = rows.length - answered;
11260
11265
  const count = `${open}${truncated ? "+" : ""} contradiction${open === 1 && !truncated ? "" : "s"}`;
11261
- 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("|")}`;
11266
+ 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}. Propose an answer for its owner to confirm: conflicts action=propose issueId=<id> choice=${CONFLICT_RESOLUTIONS.join("|")}`;
11262
11267
  const order = rows[0]?.rankOrderNote ? [sanitizeSingleLineField(rows[0].rankOrderNote)] : [];
11263
11268
  return successResult([summary, ...order, ...lines].join("\n"), summary, { mode: listMode, rows });
11264
11269
  }
11265
- async function handleConflictsResolve(issueId, { choice: pick, target: entry, reason: why, verdict: word }) {
11270
+ var PROPOSE_INSTEAD = (refusal, issueId) => `${refusal} Propose it: conflicts action=propose issueId=${issueId} choice=${CONFLICT_RESOLUTIONS.join("|")}`;
11271
+ async function handleConflictsResolve(issueId, args) {
11272
+ try {
11273
+ return await resolveOnce(issueId, args);
11274
+ } catch (err) {
11275
+ if (err instanceof Error && err.message.includes(RESOLUTION_WORDS.answerVerb)) return validationResult(PROPOSE_INSTEAD(err.message, issueId));
11276
+ throw err;
11277
+ }
11278
+ }
11279
+ async function resolveOnce(issueId, { choice: pick, target: entry, reason: why, verdict: word }) {
11266
11280
  if (!pick === !word) return validationResult(pick ? RESOLUTION_WORDS.both : RESOLUTION_WORDS.choose);
11267
11281
  requireWriteAccess();
11268
11282
  if (pick) {
@@ -12143,4 +12157,4 @@ export {
12143
12157
  SERVER_VERSION,
12144
12158
  createProductBrainServer
12145
12159
  };
12146
- //# sourceMappingURL=chunk-NTWUV44F.js.map
12160
+ //# sourceMappingURL=chunk-GJ5R7G3X.js.map