@productbrain/mcp 0.0.1-beta.2128 → 0.0.1-beta.2140

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.
@@ -2954,9 +2954,11 @@ var updateEntrySchema = z3.object({
2954
2954
  name: z3.string().optional().describe("New display name"),
2955
2955
  status: z3.union([
2956
2956
  z3.enum(["draft", "active", "deprecated", "archived"]),
2957
+ // BET-68 legacy shim: frozen historical workflow values still pass through
2958
+ // `status` (auto-routed with a warning) until the ~2026-09-03 sunset.
2957
2959
  z3.enum(WORKFLOW_STATUS_VALUES)
2958
- ]).optional().describe("Lifecycle status: draft | active | deprecated | archived. **Workflow values (open, pending, decided\u2026) 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.**"),
2959
- workflowStatus: z3.enum(WORKFLOW_STATUS_VALUES).optional().describe("Collection workflow state. Each collection restricts which values are valid (e.g. bets: 'shaped' | 'building' | 'shipped' | 'dropped'; assumptions: 'untested' | 'testing' | 'validated' | 'invalidated'; decisions: 'pending' | 'decided'; tensions: 'open' | 'processing' | 'decided' | 'closed'). The backend will reject values invalid for the target collection."),
2960
+ ]).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.**"),
2961
+ workflowStatus: z3.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."),
2960
2962
  data: z3.record(z3.unknown()).optional().describe("Fields to update (merged with existing data)"),
2961
2963
  order: z3.number().optional().describe("New sort order"),
2962
2964
  canonicalKey: z3.string().optional().describe("Semantic type (e.g. 'decision', 'tension'). Only changeable on draft/uncommitted entries."),
@@ -5762,6 +5764,15 @@ ${col.usageGuidance}`);
5762
5764
 
5763
5765
  ${col.purpose}`);
5764
5766
  }
5767
+ if (col.validWorkflowStatuses && col.validWorkflowStatuses.length > 0) {
5768
+ sections.push(
5769
+ `
5770
+ ## Workflow Statuses
5771
+
5772
+ Valid \`workflowStatus\` values for entries in this collection:
5773
+ ${col.validWorkflowStatuses.map((s) => `- ${s}`).join("\n")}`
5774
+ );
5775
+ }
5765
5776
  if (col.fields.length > 0) {
5766
5777
  const fieldDocs = col.fields.map((f) => {
5767
5778
  const parts = [];
@@ -5809,6 +5820,8 @@ ${refList}`);
5809
5820
  name: col.name,
5810
5821
  description: col.description,
5811
5822
  usageGuidance: col.usageGuidance ?? null,
5823
+ // WP-480 S2: null = unconstrained by design (STD-34), not "unknown".
5824
+ validWorkflowStatuses: col.validWorkflowStatuses && col.validWorkflowStatuses.length > 0 ? col.validWorkflowStatuses : null,
5812
5825
  fieldCount: col.fields.length,
5813
5826
  fields: col.fields.map((f) => ({
5814
5827
  key: f.key,
@@ -11989,11 +12002,6 @@ function domainDetailFromRetrieval(retrieval) {
11989
12002
  const evidenceGap = typeof retrieval.evidenceGap === "string" ? retrieval.evidenceGap : null;
11990
12003
  return reason || nextAction || evidenceGap ? { reason, nextAction, evidenceGap } : null;
11991
12004
  }
11992
- var NON_MEANINGFUL_TASK_RE = /^[\s​‌‍⁠]*$/u;
11993
- function taskIsMeaningful(task) {
11994
- if (typeof task !== "string") return false;
11995
- return !NON_MEANINGFUL_TASK_RE.test(task);
11996
- }
11997
12005
  function reportOrientWrapperBytes(toolResult, truncated, tier, taskProvided) {
11998
12006
  try {
11999
12007
  const fullToolOutput = JSON.stringify({ content: toolResult.content ?? [] });
@@ -12073,7 +12081,6 @@ function registerOrientTool(server) {
12073
12081
  async function _handleOrient({ mode = "full", tier, task, scope }) {
12074
12082
  const errors = [];
12075
12083
  const callTier = tier ?? (mode === "brief" ? "summary" : void 0);
12076
- const resolvedTier = callTier ?? (taskIsMeaningful(task) ? "summary" : "standard");
12077
12084
  if (scope && !task) {
12078
12085
  errors.push("--scope requires --task to filter governance. Scope was ignored.");
12079
12086
  }
@@ -12117,6 +12124,8 @@ async function _handleOrient({ mode = "full", tier, task, scope }) {
12117
12124
  orientView = await kernelQuery("chain.getOrientView", orientArgs);
12118
12125
  } catch {
12119
12126
  }
12127
+ const resolvedTier = orientView?.resolvedTier ?? callTier ?? "standard";
12128
+ const taskMeaningful = orientView?.taskMeaningful ?? false;
12120
12129
  let vocabCtx;
12121
12130
  try {
12122
12131
  const vocab = await kernelQuery("chain.getVocabulary", {});
@@ -12190,7 +12199,7 @@ async function _handleOrient({ mode = "full", tier, task, scope }) {
12190
12199
  [{ tool: "start_pb", description: "Guided workspace setup", parameters: {} }]
12191
12200
  )
12192
12201
  };
12193
- reportOrientWrapperBytes(blankResult, false, resolvedTier, taskIsMeaningful(task));
12202
+ reportOrientWrapperBytes(blankResult, false, resolvedTier, taskMeaningful);
12194
12203
  return blankResult;
12195
12204
  }
12196
12205
  const lines = [];
@@ -12386,7 +12395,7 @@ async function _handleOrient({ mode = "full", tier, task, scope }) {
12386
12395
  }
12387
12396
  )
12388
12397
  };
12389
- reportOrientWrapperBytes(briefResult, briefTruncated, resolvedTier, taskIsMeaningful(task));
12398
+ reportOrientWrapperBytes(briefResult, briefTruncated, resolvedTier, taskMeaningful);
12390
12399
  return briefResult;
12391
12400
  }
12392
12401
  const orientStage = readiness?.stage ?? "seeded";
@@ -12810,7 +12819,7 @@ async function _handleOrient({ mode = "full", tier, task, scope }) {
12810
12819
  }
12811
12820
  )
12812
12821
  };
12813
- reportOrientWrapperBytes(fullResult, fullTruncated, resolvedTier, taskIsMeaningful(task));
12822
+ reportOrientWrapperBytes(fullResult, fullTruncated, resolvedTier, taskMeaningful);
12814
12823
  return fullResult;
12815
12824
  }
12816
12825
 
@@ -14699,4 +14708,4 @@ export {
14699
14708
  createProductBrainServer,
14700
14709
  initFeatureFlags
14701
14710
  };
14702
- //# sourceMappingURL=chunk-3CONR5XB.js.map
14711
+ //# sourceMappingURL=chunk-C3AA44PZ.js.map