@productbrain/mcp 0.0.1-beta.4359 → 0.0.1-beta.4379

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.
@@ -2315,10 +2315,10 @@ ${groundingReport.governance.map((g) => `- **${g.entryId}** ${g.name} [${g.colle
2315
2315
  if (userData && typeof userData === "object") Object.assign(data, userData);
2316
2316
  data[profile.descriptionField || "description"] = description;
2317
2317
  const colMeta = await getCollectionBySlug(resolvedCollection);
2318
- const isBetCapture = canonicalKey === "work_package" || colMeta?.defaultCanonicalKey === "work_package";
2318
+ const isWorkPackageCapture = canonicalKey === "work_package" || colMeta?.defaultCanonicalKey === "work_package";
2319
2319
  let entryWarnings = [];
2320
2320
  const isStrategyCapture = colMeta?.thinkingLayer === "strategy";
2321
- const shouldDecompose = (isStrategyCapture || isBetCapture) && description.trim().length > 0;
2321
+ const shouldDecompose = (isStrategyCapture || isWorkPackageCapture) && description.trim().length > 0;
2322
2322
  if (shouldDecompose) {
2323
2323
  try {
2324
2324
  const decomposed = await kernelCall(
@@ -2328,7 +2328,7 @@ ${groundingReport.governance.map((g) => `- **${g.entryId}** ${g.name} [${g.colle
2328
2328
  entryName: name,
2329
2329
  description,
2330
2330
  existingData: data,
2331
- ...isBetCapture ? { canonicalKey: "work_package" } : {},
2331
+ ...isWorkPackageCapture ? { canonicalKey: "work_package" } : {},
2332
2332
  ...colMeta?.thinkingLayer ? { thinkingLayer: colMeta.thinkingLayer } : {}
2333
2333
  }
2334
2334
  );
@@ -2343,7 +2343,7 @@ ${groundingReport.governance.map((g) => `- **${g.entryId}** ${g.name} [${g.colle
2343
2343
  entryWarnings.push("Content decomposition skipped (transient error). Entry saved with description only.");
2344
2344
  }
2345
2345
  }
2346
- canonicalizeSelects(data, col.fields ?? [], isBetCapture);
2346
+ canonicalizeSelects(data, col.fields ?? [], isWorkPackageCapture);
2347
2347
  const agentId = getAgentSessionId();
2348
2348
  let finalEntryId;
2349
2349
  let internalId;
@@ -2912,12 +2912,12 @@ Use \`entries action=get\` to inspect the existing entry, or \`entries action=up
2912
2912
  )
2913
2913
  });
2914
2914
  }
2915
- const isBetOrGoal = isBetCapture || resolvedCK === "bet" || resolvedCK === "goal";
2915
+ const isBetOrGoal = isWorkPackageCapture || resolvedCK === "bet" || resolvedCK === "goal";
2916
2916
  const hasStrategyLink = linksCreated.some((l) => l.targetCollection === "strategy");
2917
2917
  if (isBetOrGoal && !hasStrategyLink) {
2918
2918
  lines.push("");
2919
2919
  lines.push(
2920
- `**Strategy link:** This ${isBetCapture ? "bet" : "goal"} doesn't connect to any strategy entry. Consider linking before accepting. Use \`relations action=suggest entryId="${finalEntryId}"\` to find strategy entries to connect to.`
2920
+ `**Strategy link:** This ${isWorkPackageCapture ? "bet" : "goal"} doesn't connect to any strategy entry. Consider linking before accepting. Use \`relations action=suggest entryId="${finalEntryId}"\` to find strategy entries to connect to.`
2921
2921
  );
2922
2922
  await recordSessionActivity({ strategyLinkWarnedForEntryId: internalId });
2923
2923
  }
@@ -3899,44 +3899,12 @@ ${formatted}` }],
3899
3899
  }
3900
3900
 
3901
3901
  // src/tools/knowledge.ts
3902
- var WORKFLOW_STATUS_VALUES = [
3903
- // Generic / governed collections
3904
- "open",
3905
- "pending",
3906
- "proposed",
3907
- "accepted",
3908
- "needs-amendment",
3909
- "withdrawn",
3910
- "review",
3911
- "in-progress",
3912
- "decided",
3913
- "conflict",
3914
- "processing",
3915
- "closed",
3916
- // Chains (bet type) lifecycle
3917
- "shaped",
3918
- "bet",
3919
- "building",
3920
- "shipped",
3921
- // Assumptions lifecycle
3922
- "untested",
3923
- "testing",
3924
- "validated",
3925
- "invalidated",
3926
- // Insights lifecycle
3927
- "hypothesis",
3928
- "evidenced"
3929
- ];
3930
- var LEGACY_WORKFLOW_STATUSES = new Set(WORKFLOW_STATUS_VALUES);
3931
3902
  var updateEntrySchema = z7.object({
3932
3903
  entryId: z7.string().describe("Entry ID to update, e.g. 'T-SUPPLIER', '<PREFIX>-<n>'"),
3933
3904
  name: z7.string().optional().describe("New display name"),
3934
- status: z7.union([
3935
- z7.enum(["draft", "active", "deprecated", "archived"]),
3936
- // BET-68 legacy shim: frozen historical workflow values still pass through
3937
- // `status` (auto-routed with a warning) until the ~2026-09-03 sunset.
3938
- z7.enum(WORKFLOW_STATUS_VALUES)
3939
- ]).optional().describe("Lifecycle status: draft | active | deprecated | archived. **Workflow values are deprecated here \u2014 use `workflowStatus` instead. Passing a workflow value as `status` will be auto-routed with a warning until 2026-09-03, then hard-errored.**"),
3905
+ // Chain-ID-leak guard (check:chain-id-leaks): the retired legacy-shim ticket number stays in
3906
+ // the code comment above, never in this user-visible describe() string.
3907
+ status: z7.enum(["draft", "active", "deprecated", "archived"]).optional().describe("Lifecycle status: draft | active | deprecated | archived. Use `workflowStatus` for collection-specific workflow values \u2014 those are no longer accepted via `status`."),
3940
3908
  workflowStatus: z7.string().optional().describe("Collection workflow state. Valid values are collection-specific and server-owned \u2014 discover them via `collections action=describe` for the target collection. The server rejects invalid values and returns the valid set in the error."),
3941
3909
  data: z7.record(z7.unknown()).optional().describe("Fields to update (merged with existing data)"),
3942
3910
  order: z7.number().optional().describe("New sort order"),
@@ -3974,16 +3942,8 @@ async function handleUpdateEntry({ entryId, name, status: rawStatus, workflowSta
3974
3942
  if (data !== void 0) fieldsProvided.push("data");
3975
3943
  if (order !== void 0) fieldsProvided.push("order");
3976
3944
  if (canonicalKey !== void 0) fieldsProvided.push("canonicalKey");
3977
- let status2 = rawStatus;
3978
- let workflowStatus = rawWorkflowStatus;
3979
- let deprecationWarning;
3980
- if (rawStatus && LEGACY_WORKFLOW_STATUSES.has(rawStatus)) {
3981
- if (!workflowStatus) {
3982
- workflowStatus = rawStatus;
3983
- }
3984
- status2 = void 0;
3985
- deprecationWarning = `\u26A0\uFE0F Deprecation: \`status: '${rawStatus}'\` \u2014 use \`workflowStatus: '${rawStatus}'\` instead. Support ends ~2026-09-03.`;
3986
- }
3945
+ const status2 = rawStatus;
3946
+ const workflowStatus = rawWorkflowStatus;
3987
3947
  const updateResult = await kernelMutation("chain.updateEntry", {
3988
3948
  entryId,
3989
3949
  name,
@@ -4024,10 +3984,6 @@ async function handleUpdateEntry({ entryId, name, status: rawStatus, workflowSta
4024
3984
  responseLines.push("");
4025
3985
  responseLines.push("\u26A0\uFE0F No fields to update were provided \u2014 only `entryId` was set.");
4026
3986
  }
4027
- if (deprecationWarning) {
4028
- responseLines.push("");
4029
- responseLines.push(deprecationWarning);
4030
- }
4031
3987
  if ((updateResult.normalizationWarnings ?? []).length > 0) {
4032
3988
  responseLines.push("");
4033
3989
  responseLines.push("\u26A0\uFE0F **Normalization warnings:**");
@@ -4854,7 +4810,7 @@ var entriesSchema = z10.object({
4854
4810
  entryIds: z10.array(z10.string().max(200)).min(1).max(20).optional().describe("Entry IDs for 'batch', e.g. ['TYPE-strategy', 'STR-jljeg7']"),
4855
4811
  collection: z10.string().max(200).optional().describe("Collection slug \u2014 for 'list'/'search': scope filter, e.g. 'glossary', 'tracking-events'."),
4856
4812
  status: z10.string().max(200).optional().describe(
4857
- "For 'list'/'search': filter string (draft | active | deprecated | archived). For 'update': lifecycle value to set (draft | active | deprecated | archived \u2014 legacy workflow values still route through here with a deprecation warning until 2026-09-03; use `workflowStatus` instead)."
4813
+ "For 'list'/'search': filter string (draft | active | deprecated | archived). For 'update': lifecycle value to set (draft | active | deprecated | archived). Workflow values are no longer accepted via `status` \u2014 use `workflowStatus` instead (the legacy auto-routing shim retired early)."
4858
4814
  ),
4859
4815
  tag: z10.string().max(200).optional().describe("For 'list': filter by internal tag."),
4860
4816
  label: z10.string().max(200).optional().describe("For 'list': filter by label slug \u2014 matches entries across all collections."),
@@ -7133,7 +7089,7 @@ function formatConfidencePass(result2) {
7133
7089
  `_${changes.entries.length} entries modified${changes.truncated ? " (TRUNCATED)" : ""}_`,
7134
7090
  ""
7135
7091
  ];
7136
- lines.push(`## Active Bets (${result2.betCount})`);
7092
+ lines.push(`## Active Bets (${result2.workPackageCount})`);
7137
7093
  if (result2.activeBets.length > 0) {
7138
7094
  for (const bet of result2.activeBets) {
7139
7095
  const id = bet.entryId ? `**${bet.entryId}:** ` : "";
@@ -7162,7 +7118,7 @@ function formatConfidencePass(result2) {
7162
7118
  return {
7163
7119
  content: [{ type: "text", text: lines.join("\n") }],
7164
7120
  structuredContent: success(
7165
- `Confidence pass: ${changes.entries.length} changes, ${result2.betCount} active bets, ${result2.tensionCount} active tensions.`,
7121
+ `Confidence pass: ${changes.entries.length} changes, ${result2.workPackageCount} active bets, ${result2.tensionCount} active tensions.`,
7166
7122
  { ...result2, trustFilterActive: true }
7167
7123
  )
7168
7124
  };
@@ -17087,4 +17043,4 @@ export {
17087
17043
  createProductBrainServer,
17088
17044
  initFeatureFlags
17089
17045
  };
17090
- //# sourceMappingURL=chunk-MEQC3IGR.js.map
17046
+ //# sourceMappingURL=chunk-X7YAYWFK.js.map