@productbrain/mcp 0.0.1-beta.8059 → 0.0.1-beta.8084

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.
@@ -566,7 +566,16 @@ var TOOL_NAME_MIGRATIONS = /* @__PURE__ */ new Map([
566
566
  ["audit", 'quality action="audit"'],
567
567
  // WP-776 S2a (DEC-1771): the `workspace` tool's proposals-list/proposals-respond/proposals-count
568
568
  // actions this row targeted are themselves deleted along with the relation-consent proposal
569
- // system — retargeted to a NOTICE row, same shape as skills/record_activation above.
569
+ // system — retargeted to a NOTICE row, same shape as skills/record_activation above. #1270
570
+ // round 9 (P2, m1fea): a LATER commit on this same lane (d1a6416c2, PRRT_kwDORS4ils6munUS)
571
+ // deleted this row outright, reasoning "RULE-632 forbids carrying a translation for a retired
572
+ // name indefinitely" — that reasoning is wrong for a NOTICE row: it is not a translation to a
573
+ // still-working replacement (which RULE-632 targets), it is permanent coaching that a name is
574
+ // gone for good, the SAME shape every neighboring retired-notice row here keeps indefinitely.
575
+ // Deleting it made an agent attempt a tool that no longer exists instead of getting the explicit
576
+ // closed-system guidance, and left tool-harness.test.ts's own doc comment (which still narrates
577
+ // "governance-proposals is retargeted... to a NOTICE row") describing behavior the code no
578
+ // longer had. Restored verbatim.
570
579
  ["governance-proposals", "closed \u2014 the relation-consent proposal system has been retired. There is no supported way to list/respond/count consent proposals through MCP."],
571
580
  // WP-757 TASK-224 F2 (DEC-1722): the `chain` and `chain-review` MCP tools these two rows
572
581
  // targeted are themselves deleted along with gitchain — retargeted from executable
@@ -1504,7 +1513,8 @@ var captureSchema = z4.object({
1504
1513
  entryId: entryIdSchema,
1505
1514
  canonicalKey: z4.string().optional().describe("Semantic type (e.g. 'decision', 'tension', 'vision'). Auto-assigned from collection if omitted."),
1506
1515
  data: z4.record(z4.unknown()).optional().describe("Explicit field values when you know the schema (e.g. canonical_key, cardinality_rule, required_fields). Merged with inferred values; user-provided wins."),
1507
- why: z4.string().optional().describe("Reasoning behind this entry \u2014 hard-required for decision/rule/strategy/purpose/vision/objective."),
1516
+ why: z4.string().optional().describe("Reasoning behind this entry \u2014 hard-required for purpose/vision/strategy/objective/decision/rule/key_result/product."),
1517
+ // TASK-380: mirrors whyPolicy.ts
1508
1518
  links: z4.array(z4.object({
1509
1519
  to: z4.string().describe("Target entry ID (e.g. '<PREFIX>-<n>')"),
1510
1520
  type: z4.string().describe("Relation type (e.g. 'governs', 'related_to', 'informs')")
@@ -4725,13 +4735,15 @@ No DB writes \u2014 call without \`preview:true\` to see the real refusal.`
4725
4735
  structuredContent: success(
4726
4736
  `Preview: "${result2.originalType ?? type}" would be refused as a common misuse.`,
4727
4737
  {
4728
- status: "preview",
4738
+ status: "preview-blocked",
4729
4739
  from,
4730
4740
  to,
4731
4741
  type,
4732
4742
  chainDebtPrevented: true,
4733
4743
  originalType: result2.originalType ?? type,
4734
- suggestedAlternatives: result2.suggestedAlternatives
4744
+ suggestedAlternatives: result2.suggestedAlternatives,
4745
+ wouldBlock: true,
4746
+ blockingReason: `"${result2.originalType ?? type}" is a common misuse for this entry pair.`
4735
4747
  },
4736
4748
  []
4737
4749
  )
@@ -11914,6 +11926,28 @@ async function handleCommitConstellation(args) {
11914
11926
  )
11915
11927
  };
11916
11928
  }
11929
+ if (code === "CONSTELLATION_COMMIT_REFUSED") {
11930
+ const conflictIds = Array.isArray(diagnostics?.conflictIds) ? diagnostics.conflictIds : [];
11931
+ const offenderLines = conflictIds.map((c) => `- \`${c.entryId}\` ${c.name}: ${c.reason}`).join("\n");
11932
+ return {
11933
+ content: [{
11934
+ type: "text",
11935
+ text: [
11936
+ `# Constellation commit refused`,
11937
+ "",
11938
+ `\`${betId}\` was not accepted \u2014 the root itself was refused, so nothing was committed.`,
11939
+ ...offenderLines ? ["", offenderLines] : []
11940
+ ].join("\n")
11941
+ }],
11942
+ structuredContent: failure(
11943
+ "CONSTELLATION_COMMIT_REFUSED",
11944
+ msg,
11945
+ "Resolve the authority conflict (route through the accountable role or Team Lead) and retry commit-constellation.",
11946
+ [{ tool: "session", description: "Retry once authority is resolved", parameters: { action: "commit-constellation", betEntryId: betId } }],
11947
+ { conflictIds }
11948
+ )
11949
+ };
11950
+ }
11917
11951
  if (code === "CONTRADICTION_BLOCKED") {
11918
11952
  return {
11919
11953
  content: [{
@@ -14582,4 +14616,4 @@ export {
14582
14616
  createProductBrainServer,
14583
14617
  initFeatureFlags
14584
14618
  };
14585
- //# sourceMappingURL=chunk-AS7ZMCGQ.js.map
14619
+ //# sourceMappingURL=chunk-WPFOCSKI.js.map