@productbrain/mcp 0.0.1-beta.4379 → 0.0.1-beta.4387
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,6 +7334,8 @@ 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'."),
|
|
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."),
|
|
7337
7339
|
// ENT-62
|
|
7338
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."),
|
|
7339
7341
|
// ENT-67
|
|
@@ -7366,6 +7368,9 @@ var collectionsCreateVariant = z16.object({
|
|
|
7366
7368
|
icon: z16.string().max(50).optional(),
|
|
7367
7369
|
navGroup: z16.enum(["daily", "strategic", "governance", "reference", "collections"]).optional(),
|
|
7368
7370
|
fields: z16.array(fieldSchema).min(1),
|
|
7371
|
+
axis: z16.enum(["work", "none", "pending"]),
|
|
7372
|
+
// required, mirrors the Convex door's axisValidator (PRRT_kwDORS4ils6ZiYjo)
|
|
7373
|
+
stageLabelMap: z16.record(z16.string(), z16.enum(["open", "in_progress", "done", "stopped", "tag"])).optional(),
|
|
7369
7374
|
defaultCanonicalKey: z16.string().max(200).optional(),
|
|
7370
7375
|
defaultWorkflowStatus: z16.string().max(200).optional(),
|
|
7371
7376
|
validWorkflowStatuses: z16.array(z16.string().max(200)).optional(),
|
|
@@ -7431,7 +7436,7 @@ var collectionsActionUnion = z16.discriminatedUnion("action", [
|
|
|
7431
7436
|
var COLLECTIONS_ACTION_SPECS = {
|
|
7432
7437
|
list: { params: [], description: "Browse all collections; no params." },
|
|
7433
7438
|
describe: { params: ["slug"], description: "slug is required." },
|
|
7434
|
-
create: { params: ["slug", "name", "description", "purpose", "icon", "navGroup", "fields", "defaultCanonicalKey", "defaultWorkflowStatus", "validWorkflowStatuses", "classificationCheck", "classificationPriority"], description: "slug, name, and
|
|
7439
|
+
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." },
|
|
7435
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." },
|
|
7436
7441
|
audit: { params: [], description: "Health report for all collections; no params." },
|
|
7437
7442
|
export: { params: [], description: "Full system_collection_definitions export; no params. Admin only." },
|
|
@@ -7454,7 +7459,7 @@ function registerCollectionsTools(server) {
|
|
|
7454
7459
|
data.icon,
|
|
7455
7460
|
data.navGroup ?? "collections",
|
|
7456
7461
|
data.fields,
|
|
7457
|
-
{ defaultCanonicalKey: data.defaultCanonicalKey, defaultWorkflowStatus: data.defaultWorkflowStatus, validWorkflowStatuses: data.validWorkflowStatuses, classificationCheck: data.classificationCheck, classificationPriority: data.classificationPriority }
|
|
7462
|
+
{ axis: data.axis, stageLabelMap: data.stageLabelMap, defaultCanonicalKey: data.defaultCanonicalKey, defaultWorkflowStatus: data.defaultWorkflowStatus, validWorkflowStatuses: data.validWorkflowStatuses, classificationCheck: data.classificationCheck, classificationPriority: data.classificationPriority }
|
|
7458
7463
|
),
|
|
7459
7464
|
update: (data) => {
|
|
7460
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;
|
|
@@ -7645,6 +7650,9 @@ ${formatted}` }],
|
|
|
7645
7650
|
)
|
|
7646
7651
|
};
|
|
7647
7652
|
}
|
|
7653
|
+
function metaFields(m) {
|
|
7654
|
+
return Object.fromEntries(Object.entries(m).filter(([, v]) => v !== void 0));
|
|
7655
|
+
}
|
|
7648
7656
|
async function handleCreate2(slug, name, description, purpose, icon, navGroup, fields, meta = {}) {
|
|
7649
7657
|
requireWriteAccess();
|
|
7650
7658
|
try {
|
|
@@ -7656,11 +7664,7 @@ async function handleCreate2(slug, name, description, purpose, icon, navGroup, f
|
|
|
7656
7664
|
icon,
|
|
7657
7665
|
navGroup,
|
|
7658
7666
|
fields,
|
|
7659
|
-
...meta
|
|
7660
|
-
...meta.defaultWorkflowStatus !== void 0 && { defaultWorkflowStatus: meta.defaultWorkflowStatus },
|
|
7661
|
-
...meta.validWorkflowStatuses !== void 0 && { validWorkflowStatuses: meta.validWorkflowStatuses },
|
|
7662
|
-
...meta.classificationCheck !== void 0 && { classificationCheck: meta.classificationCheck },
|
|
7663
|
-
...meta.classificationPriority !== void 0 && { classificationPriority: meta.classificationPriority },
|
|
7667
|
+
...metaFields(meta),
|
|
7664
7668
|
createdBy: getAgentSessionId() ? `agent:${getAgentSessionId()}` : "mcp"
|
|
7665
7669
|
});
|
|
7666
7670
|
invalidateCollectionCacheForScope();
|
|
@@ -7722,13 +7726,7 @@ async function handleUpdate(slug, name, description, purpose, icon, navGroup, fi
|
|
|
7722
7726
|
...icon !== void 0 && { icon },
|
|
7723
7727
|
...navGroup !== void 0 && { navGroup },
|
|
7724
7728
|
...fields !== void 0 && { fields },
|
|
7725
|
-
...meta
|
|
7726
|
-
...meta.defaultWorkflowStatus !== void 0 && { defaultWorkflowStatus: meta.defaultWorkflowStatus },
|
|
7727
|
-
...meta.validWorkflowStatuses !== void 0 && { validWorkflowStatuses: meta.validWorkflowStatuses },
|
|
7728
|
-
...meta.classificationCheck !== void 0 && { classificationCheck: meta.classificationCheck },
|
|
7729
|
-
...meta.classificationPriority !== void 0 && { classificationPriority: meta.classificationPriority },
|
|
7730
|
-
...meta.qualityCriteria !== void 0 && { qualityCriteria: meta.qualityCriteria },
|
|
7731
|
-
...meta.usageGuidance !== void 0 && { usageGuidance: meta.usageGuidance }
|
|
7729
|
+
...metaFields(meta)
|
|
7732
7730
|
});
|
|
7733
7731
|
invalidateCollectionCacheForScope();
|
|
7734
7732
|
invalidateProfileCacheForScope();
|
|
@@ -17043,4 +17041,4 @@ export {
|
|
|
17043
17041
|
createProductBrainServer,
|
|
17044
17042
|
initFeatureFlags
|
|
17045
17043
|
};
|
|
17046
|
-
//# sourceMappingURL=chunk-
|
|
17044
|
+
//# sourceMappingURL=chunk-HQ2VDJEJ.js.map
|