@productbrain/mcp 0.0.1-beta.12641 → 0.0.1-beta.12653

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.
@@ -230,6 +230,8 @@ var LINK_REFUSAL_WORDS = {
230
230
  personAccepts: "Only a person can accept this entry; a person accepts it in Product Brain.",
231
231
  notAccepted: (entryId) => `${entryId} was not accepted and stays a draft.`,
232
232
  notChanged: (entryId) => `${entryId} was not changed.`,
233
+ /** The accept preview's label for an accept that would not go through (signed row 31). */
234
+ wouldBeRefused: "Would be refused",
233
235
  /** The refusal panel's steps (CoherencyRefusalPanel.svelte): each step's title and its retry button, carried on the payload. */
234
236
  steps: {
235
237
  link: { title: "Link the authorizing entry", cta: "I've linked it \u2014 retry" },
@@ -1664,28 +1666,28 @@ var updateEntrySchema = z7.object({
1664
1666
  sourceRef: z7.string().optional().describe("URI or path of the source document backing this entry. Write-once: can only be set if currently empty."),
1665
1667
  sourceExcerpt: z7.string().optional().describe("Verbatim excerpt from the source that backs this entry's claims. Write-once: can only be set if currently empty."),
1666
1668
  // WP-465 slice ⑤ — relay-only (TEN-2233): validation/min-length/recording live in Convex.
1667
- steeringOverrideReason: z7.string().optional().describe("Typed override (\u226512 chars) that clears a steering coherency block on a misaligned governance write \u2014 always recorded with author attribution."),
1669
+ steeringOverrideReason: z7.string().optional().describe("Why it stands alone, at least 12 characters. Your name is kept with it."),
1668
1670
  qualityOverrideReason: z7.string().optional().describe("Why (\u226512 chars) to keep an accepted spine text its quality checklist failed \u2014 recorded as an override with who wrote it."),
1669
1671
  // TASK-954
1670
1672
  coherencyAcknowledgement: z7.object({
1671
- response: z7.enum(["linked", "accepted-fix", "diverged"]).describe("Explicit response to an acknowledge-required coherency challenge."),
1673
+ response: z7.enum(["linked", "accepted-fix", "diverged"]).describe("Your answer to why it stands alone."),
1672
1674
  entryId: z7.string().optional().describe("Authorizing entry being linked/accepted (required for 'linked' and 'accepted-fix')."),
1673
1675
  reason: z7.string().optional().describe("Divergence rationale (required for 'diverged', \u226512 chars).")
1674
- }).optional().describe("Explicit response to a coherency challenge (standard/strict workspace modes). One acknowledgement per challenge per entry per session.")
1676
+ }).optional().describe("Your answer when an entry links to nothing. One answer per entry per session.")
1675
1677
  });
1676
1678
  var commitEntrySchema = z7.object({
1677
1679
  entryId: z7.string().describe("Entry ID to accept, e.g. 'TEN-abc123', '<PREFIX>-<n>'"),
1678
1680
  // WP-316 S3: Preview gate — dry-run mode. Returns would-succeed result, no DB writes.
1679
1681
  preview: z7.boolean().optional().describe("If true, validates the accept without writing. Returns what would happen. Default false."),
1680
1682
  // WP-465 slice ⑤ — relay-only (TEN-2233): validation/recording live in Convex.
1681
- steeringOverrideReason: z7.string().optional().describe("Typed override (\u226512 chars) that clears a steering coherency block at the publish chokepoint \u2014 always recorded with author attribution."),
1683
+ steeringOverrideReason: z7.string().optional().describe("Why it stands alone, at least 12 characters. Your name is kept with it."),
1682
1684
  qualityOverrideReason: z7.string().optional().describe("Why (\u226512 chars) to accept over a failing quality checklist \u2014 recorded as an override with who wrote it."),
1683
1685
  // TASK-954
1684
1686
  coherencyAcknowledgement: z7.object({
1685
- response: z7.enum(["linked", "accepted-fix", "diverged"]).describe("Explicit response to an acknowledge-required coherency challenge."),
1687
+ response: z7.enum(["linked", "accepted-fix", "diverged"]).describe("Your answer to why it stands alone."),
1686
1688
  entryId: z7.string().optional().describe("Authorizing entry being linked/accepted (required for 'linked' and 'accepted-fix')."),
1687
1689
  reason: z7.string().optional().describe("Divergence rationale (required for 'diverged', \u226512 chars).")
1688
- }).optional().describe("Explicit response to a coherency challenge (standard/strict workspace modes)."),
1690
+ }).optional().describe("Your answer when an entry links to nothing."),
1689
1691
  replaces: z7.string().max(200).optional(),
1690
1692
  // TASK-1030: described once, on the served entries schema
1691
1693
  reason: z7.string().max(2e3).optional()
@@ -1868,8 +1870,9 @@ async function handleCommitEntry({ entryId, preview, steeringOverrideReason, qua
1868
1870
  if (result2?.preview) {
1869
1871
  const wouldBlock = result2.wouldBlock === true;
1870
1872
  const previewContradictionAdvisory = result2?.contradictionAdvisory;
1873
+ const previewVerdict = wouldBlock ? LINK_REFUSAL_WORDS.wouldBeRefused.toLowerCase() : "would be accepted";
1871
1874
  const previewEnvelope = success(
1872
- `Preview: ${wouldBlock ? "would BLOCK accept" : "would accept"} ${entryId} \u2014 no DB writes`,
1875
+ `Preview: ${entryId} ${previewVerdict} \u2014 no DB writes`,
1873
1876
  {
1874
1877
  entryId,
1875
1878
  name: entry.name,
@@ -1888,17 +1891,17 @@ async function handleCommitEntry({ entryId, preview, steeringOverrideReason, qua
1888
1891
  }
1889
1892
  const blockingNote = wouldBlock && result2.blockingReason ? `
1890
1893
 
1891
- **Would be blocked:** ${result2.blockingReason}` : wouldBlock ? `
1894
+ **${LINK_REFUSAL_WORDS.wouldBeRefused}:** ${result2.blockingReason}` : wouldBlock ? `
1892
1895
 
1893
- **Would be refused** on a real accept.` : "";
1896
+ **${LINK_REFUSAL_WORDS.wouldBeRefused}** on a real accept.` : "";
1894
1897
  const advisoryNote = previewContradictionAdvisory ? `
1895
1898
 
1896
1899
  \u26A0 Contradiction advisory (would be attached on a real accept): ${previewContradictionAdvisory.reason}
1897
1900
  ${previewContradictionAdvisory.conflictDetails.map((c) => `- \`${c.chainEntryId}\` ${c.chainEntryName}: ${c.explanation}`).join("\n")}` : "";
1898
1901
  return {
1899
- content: [{ type: "text", text: `# Preview: would ${wouldBlock ? "BLOCK accept" : "accept"} ${entryId}
1902
+ content: [{ type: "text", text: `# Preview: ${entryId} ${previewVerdict}
1900
1903
 
1901
- Current status: \`${result2.currentStatus}\` \u2192 would become \`${result2.wouldSetStatus}\`.${blockingNote}${advisoryNote}
1904
+ Current status: \`${result2.currentStatus}\`${wouldBlock ? "" : ` \u2192 would become \`${result2.wouldSetStatus}\``}.${blockingNote}${advisoryNote}
1902
1905
 
1903
1906
  No DB writes \u2014 call without \`preview:true\` to accept for real.` }],
1904
1907
  structuredContent: previewEnvelope
@@ -2557,7 +2560,7 @@ var ENTRIES_ACTIONS = [
2557
2560
  "replace"
2558
2561
  ];
2559
2562
  var coherencyAcknowledgementFlatSchema = z12.object({
2560
- response: z12.enum(["linked", "accepted-fix", "diverged"]).describe("Explicit response to an acknowledge-required coherency challenge."),
2563
+ response: z12.enum(["linked", "accepted-fix", "diverged"]).describe("Your answer to why it stands alone."),
2561
2564
  entryId: z12.string().max(200).optional().describe("Authorizing entry being linked/accepted (required for 'linked' and 'accepted-fix')."),
2562
2565
  reason: z12.string().max(2e3).optional().describe("Divergence rationale (required for 'diverged', \u226512 chars).")
2563
2566
  });
@@ -2602,13 +2605,13 @@ var entriesSchema = z12.object({
2602
2605
  "For 'update': verbatim excerpt from the source backing this entry's claims. Write-once."
2603
2606
  ),
2604
2607
  steeringOverrideReason: z12.string().max(2e3).optional().describe(
2605
- "For 'update'/'accept': typed override (\u226512 chars) that clears a steering coherency block."
2608
+ "For 'update'/'accept': why it stands alone, at least 12 characters. Your name is kept with it."
2606
2609
  ),
2607
2610
  qualityOverrideReason: z12.string().max(2e3).optional().describe(
2608
2611
  "For 'update'/'accept': why (\u226512 chars) to keep a spine text its quality checklist failed; recorded as an override with who wrote it."
2609
2612
  ),
2610
2613
  coherencyAcknowledgement: coherencyAcknowledgementFlatSchema.optional().describe(
2611
- "For 'update'/'accept': explicit response to a coherency challenge (standard/strict workspace modes)."
2614
+ "For 'update'/'accept': your answer when an entry links to nothing."
2612
2615
  ),
2613
2616
  preview: z12.boolean().optional().describe(
2614
2617
  "For 'accept': if true, validates the accept without writing \u2014 returns what would happen."
@@ -11972,4 +11975,4 @@ export {
11972
11975
  SERVER_VERSION,
11973
11976
  createProductBrainServer
11974
11977
  };
11975
- //# sourceMappingURL=chunk-ZEPTOVY7.js.map
11978
+ //# sourceMappingURL=chunk-4PK3AGDW.js.map