@productbrain/mcp 0.0.1-beta.4387 → 0.0.1-beta.4397

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.
@@ -7334,7 +7334,7 @@ var collectionsSchema = z16.object({
7334
7334
  icon: z16.string().max(50).optional().describe("Emoji icon for the collection"),
7335
7335
  navGroup: z16.enum(["daily", "strategic", "governance", "reference", "collections"]).optional().describe("Sidebar placement: 'daily', 'strategic', 'governance', 'reference', 'collections'"),
7336
7336
  fields: z16.array(fieldSchema).max(200).optional().describe("Field definitions for create, or replacement schema for update (replaces all fields)"),
7337
- axis: z16.enum(["work", "none", "pending"]).optional().describe("REQUIRED for create: 'work' (needs stageLabelMap + validWorkflowStatuses), 'none', or 'pending'."),
7337
+ axis: z16.enum(["work", "none", "pending"]).optional().describe("REQUIRED for create: 'work' (needs stageLabelMap + validWorkflowStatuses), 'none', or 'pending'. For update: only settable on a non-system-stratum (custom) collection \u2014 the repair path for a legacy collection that predates the axis contract."),
7338
7338
  stageLabelMap: z16.record(z16.string(), z16.enum(["open", "in_progress", "done", "stopped", "tag"])).optional().describe("Required when axis is 'work': maps each valid workflowStatus to a canonical stage."),
7339
7339
  // ENT-62
7340
7340
  defaultCanonicalKey: z16.string().max(200).optional().describe("The canonical_key entries in this collection default to (e.g. 'decision', 'insight'). Consumers read from collection doc; code map is fallback."),
@@ -7386,6 +7386,9 @@ var collectionsUpdateVariant = z16.object({
7386
7386
  icon: z16.string().max(50).optional(),
7387
7387
  navGroup: z16.enum(["daily", "strategic", "governance", "reference", "collections"]).optional(),
7388
7388
  fields: z16.array(fieldSchema).optional(),
7389
+ axis: z16.enum(["work", "none", "pending"]).optional(),
7390
+ stageLabelMap: z16.record(z16.string(), z16.enum(["open", "in_progress", "done", "stopped", "tag"])).optional(),
7391
+ // WP-640 SWEEP (P1): axis/stageLabelMap repair legacy custom collections — see collections.ts's updateCollection.
7389
7392
  defaultCanonicalKey: z16.string().max(200).optional(),
7390
7393
  defaultWorkflowStatus: z16.string().max(200).optional(),
7391
7394
  validWorkflowStatuses: z16.array(z16.string().max(200)).optional(),
@@ -7437,7 +7440,7 @@ var COLLECTIONS_ACTION_SPECS = {
7437
7440
  list: { params: [], description: "Browse all collections; no params." },
7438
7441
  describe: { params: ["slug"], description: "slug is required." },
7439
7442
  create: { params: ["slug", "name", "description", "purpose", "icon", "navGroup", "fields", "axis", "stageLabelMap", "defaultCanonicalKey", "defaultWorkflowStatus", "validWorkflowStatuses", "classificationCheck", "classificationPriority"], description: "slug, name, fields, and axis are required. axis:'work' also requires stageLabelMap + validWorkflowStatuses." },
7440
- update: { params: ["slug", "name", "description", "purpose", "icon", "navGroup", "fields", "defaultCanonicalKey", "defaultWorkflowStatus", "validWorkflowStatuses", "classificationCheck", "classificationPriority", "qualityCriteria", "usageGuidance"], description: "slug is required; at least one other field must be provided." },
7443
+ update: { params: ["slug", "name", "description", "purpose", "icon", "navGroup", "fields", "axis", "stageLabelMap", "defaultCanonicalKey", "defaultWorkflowStatus", "validWorkflowStatuses", "classificationCheck", "classificationPriority", "qualityCriteria", "usageGuidance"], description: "slug is required; at least one other field must be provided. axis/stageLabelMap are only settable on a non-system-stratum collection (the repair path for a legacy custom collection missing its axis declaration)." },
7441
7444
  audit: { params: [], description: "Health report for all collections; no params." },
7442
7445
  export: { params: [], description: "Full system_collection_definitions export; no params. Admin only." },
7443
7446
  "label-list": { params: [], description: "List all labels; no params." },
@@ -7462,9 +7465,9 @@ function registerCollectionsTools(server) {
7462
7465
  { axis: data.axis, stageLabelMap: data.stageLabelMap, defaultCanonicalKey: data.defaultCanonicalKey, defaultWorkflowStatus: data.defaultWorkflowStatus, validWorkflowStatuses: data.validWorkflowStatuses, classificationCheck: data.classificationCheck, classificationPriority: data.classificationPriority }
7463
7466
  ),
7464
7467
  update: (data) => {
7465
- const hasChanges = data.name || data.description || data.purpose || data.icon || data.navGroup || data.fields || data.defaultCanonicalKey !== void 0 || data.defaultWorkflowStatus !== void 0 || data.validWorkflowStatuses !== void 0 || data.classificationCheck !== void 0 || data.classificationPriority !== void 0 || data.qualityCriteria !== void 0 || data.usageGuidance !== void 0;
7468
+ const hasChanges = data.name || data.description || data.purpose || data.icon || data.navGroup || data.fields || data.axis !== void 0 || data.stageLabelMap !== void 0 || data.defaultCanonicalKey !== void 0 || data.defaultWorkflowStatus !== void 0 || data.validWorkflowStatuses !== void 0 || data.classificationCheck !== void 0 || data.classificationPriority !== void 0 || data.qualityCriteria !== void 0 || data.usageGuidance !== void 0;
7466
7469
  if (!hasChanges) {
7467
- return Promise.resolve(validationResult("Provide at least one field to update (name, description, purpose, icon, navGroup, fields, defaultCanonicalKey, defaultWorkflowStatus, validWorkflowStatuses, classificationCheck, classificationPriority, qualityCriteria, or usageGuidance)."));
7470
+ return Promise.resolve(validationResult("Provide at least one field to update (name, description, purpose, icon, navGroup, fields, axis, stageLabelMap, defaultCanonicalKey, defaultWorkflowStatus, validWorkflowStatuses, classificationCheck, classificationPriority, qualityCriteria, or usageGuidance)."));
7468
7471
  }
7469
7472
  return handleUpdate(
7470
7473
  data.slug,
@@ -7474,7 +7477,7 @@ function registerCollectionsTools(server) {
7474
7477
  data.icon,
7475
7478
  data.navGroup,
7476
7479
  data.fields,
7477
- { defaultCanonicalKey: data.defaultCanonicalKey, defaultWorkflowStatus: data.defaultWorkflowStatus, validWorkflowStatuses: data.validWorkflowStatuses, classificationCheck: data.classificationCheck, classificationPriority: data.classificationPriority, qualityCriteria: data.qualityCriteria, usageGuidance: data.usageGuidance }
7480
+ { axis: data.axis, stageLabelMap: data.stageLabelMap, defaultCanonicalKey: data.defaultCanonicalKey, defaultWorkflowStatus: data.defaultWorkflowStatus, validWorkflowStatuses: data.validWorkflowStatuses, classificationCheck: data.classificationCheck, classificationPriority: data.classificationPriority, qualityCriteria: data.qualityCriteria, usageGuidance: data.usageGuidance }
7478
7481
  );
7479
7482
  },
7480
7483
  audit: () => handleAudit(),
@@ -7490,7 +7493,7 @@ function registerCollectionsTools(server) {
7490
7493
  "collections",
7491
7494
  {
7492
7495
  title: "Collections",
7493
- description: "Manage knowledge collections and workspace labels. Twelve actions:\n\n- **list**: Browse all collections \u2014 glossary, business rules, tracking events, etc. Returns slug, name, description, and field schema. Use before capture to see what exists.\n- **describe**: Full documentation for a single collection. Returns field help text, option decision guides, usage guidance, examples, and cross-references. Use when you need to understand a collection's purpose, field semantics, or option values.\n- **create**: Create a new collection. Provide slug, name, and field schema. Use when setting up a workspace or tracking a new type of knowledge.\n- **update**: Update an existing collection's name, description, purpose, icon, navGroup, or fields. Only provide the fields you want to change.\n- **audit**: Health report for all workspace collections. Checks classification metadata, icon presence, displayHint coverage per field, and field schema gaps vs system definitions. Returns total collections, count with issues, and per-collection issue list.\n- **export**: Full system_collection_definitions export as JSON. Includes all classification metadata (thinkingLayer, classificationPriority, classificationCheck, timelineRole, governanceRole, governanceFunction, etc.). Admin only.\n- **label-list/label-create/label-update/label-delete/label-apply/label-remove**: manage workspace labels (absorbs the `labels` tool) \u2014 list all labels, create/update/delete a label, or apply/remove a label on an entry. Labels can be applied to any entry across any collection for cross-domain filtering.",
7496
+ description: "Manage knowledge collections and workspace labels. Twelve actions:\n\n- **list**: Browse all collections \u2014 glossary, business rules, tracking events, etc. Returns slug, name, description, and field schema. Use before capture to see what exists.\n- **describe**: Full documentation for a single collection. Returns field help text, option decision guides, usage guidance, examples, and cross-references. Use when you need to understand a collection's purpose, field semantics, or option values.\n- **create**: Create a new collection. Provide slug, name, and field schema. Use when setting up a workspace or tracking a new type of knowledge.\n- **update**: Update an existing collection's name, description, purpose, icon, navGroup, fields, or (non-system collections only) axis/stageLabelMap. Only provide the fields you want to change.\n- **audit**: Health report for all workspace collections. Checks classification metadata, icon presence, displayHint coverage per field, and field schema gaps vs system definitions. Returns total collections, count with issues, and per-collection issue list.\n- **export**: Full system_collection_definitions export as JSON. Includes all classification metadata (thinkingLayer, classificationPriority, classificationCheck, timelineRole, governanceRole, governanceFunction, etc.). Admin only.\n- **label-list/label-create/label-update/label-delete/label-apply/label-remove**: manage workspace labels (absorbs the `labels` tool) \u2014 list all labels, create/update/delete a label, or apply/remove a label on an entry. Labels can be applied to any entry across any collection for cross-domain filtering.",
7494
7497
  inputSchema: collectionsSchema,
7495
7498
  annotations: { readOnlyHint: false, destructiveHint: true, openWorldHint: false }
7496
7499
  },
@@ -7731,7 +7734,7 @@ async function handleUpdate(slug, name, description, purpose, icon, navGroup, fi
7731
7734
  invalidateCollectionCacheForScope();
7732
7735
  invalidateProfileCacheForScope();
7733
7736
  invalidateHubCacheForScope();
7734
- const changes = [name && "name", description && "description", purpose && "purpose", icon && "icon", navGroup && "navGroup", fields && "fields", meta.defaultCanonicalKey !== void 0 && "defaultCanonicalKey", meta.defaultWorkflowStatus !== void 0 && "defaultWorkflowStatus", meta.validWorkflowStatuses !== void 0 && "validWorkflowStatuses", meta.classificationCheck !== void 0 && "classificationCheck", meta.classificationPriority !== void 0 && "classificationPriority", meta.qualityCriteria !== void 0 && "qualityCriteria", meta.usageGuidance !== void 0 && "usageGuidance"].filter(Boolean).join(", ");
7737
+ const changes = [name && "name", description && "description", purpose && "purpose", icon && "icon", navGroup && "navGroup", fields && "fields", meta.axis !== void 0 && "axis", meta.stageLabelMap !== void 0 && "stageLabelMap", meta.defaultCanonicalKey !== void 0 && "defaultCanonicalKey", meta.defaultWorkflowStatus !== void 0 && "defaultWorkflowStatus", meta.validWorkflowStatuses !== void 0 && "validWorkflowStatuses", meta.classificationCheck !== void 0 && "classificationCheck", meta.classificationPriority !== void 0 && "classificationPriority", meta.qualityCriteria !== void 0 && "qualityCriteria", meta.usageGuidance !== void 0 && "usageGuidance"].filter(Boolean).join(", ");
7735
7738
  return {
7736
7739
  content: [{
7737
7740
  type: "text",
@@ -17041,4 +17044,4 @@ export {
17041
17044
  createProductBrainServer,
17042
17045
  initFeatureFlags
17043
17046
  };
17044
- //# sourceMappingURL=chunk-HQ2VDJEJ.js.map
17047
+ //# sourceMappingURL=chunk-U4QDOV2F.js.map