@productbrain/mcp 0.0.1-beta.8566 → 0.0.1-beta.8572

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.
@@ -1455,8 +1455,12 @@ var captureSinglePreviewOutputSchema = z3.object({
1455
1455
  // src/lib/readinessNotices.ts
1456
1456
  var READINESS_PROVISIONAL_LINE = "Readiness is provisional: its sample omitted accepted entries. Counts are lower bounds, apparent gaps may already be covered.";
1457
1457
 
1458
- // src/lib/bodyCap.ts
1458
+ // src/lib/limits.ts
1459
1459
  var ENTRY_BODY_MAX_CHARS = 15e4;
1460
+ var ENTRY_NAME_MAX_CHARS = 250;
1461
+ var SOURCE_EXCERPT_MAX_CHARS = 4e3;
1462
+ var LABEL_DESCRIPTION_MAX_CHARS = 2e3;
1463
+ var RELATION_BATCH_MAX = 25;
1460
1464
 
1461
1465
  // src/tools/smart-capture.ts
1462
1466
  var GENERIC_PROFILE = {
@@ -1853,7 +1857,7 @@ var CAPTURE_ACTIONS = ["capture"];
1853
1857
  var captureCompoundSchema = z4.object({
1854
1858
  action: z4.enum(CAPTURE_ACTIONS).optional().default("capture").describe("Create a single knowledge entry."),
1855
1859
  collection: z4.string().max(200).optional().describe("Collection slug, e.g. 'tensions', 'business-rules', 'glossary', 'decisions'. Optional \u2014 classifier auto-routes when omitted."),
1856
- name: z4.string().max(500).optional().describe("Display name \u2014 required."),
1860
+ name: z4.string().max(ENTRY_NAME_MAX_CHARS).optional().describe("Display name \u2014 required."),
1857
1861
  description: z4.string().max(ENTRY_BODY_MAX_CHARS).optional().describe("Full context \u2014 required."),
1858
1862
  context: z4.string().max(5e3).optional().describe("Optional additional context."),
1859
1863
  entryId: entryIdSchema,
@@ -1863,9 +1867,9 @@ var captureCompoundSchema = z4.object({
1863
1867
  links: z4.array(z4.object({
1864
1868
  to: z4.string().max(200).describe("Target entry ID (e.g. '<PREFIX>-<n>')"),
1865
1869
  type: z4.string().max(200).describe("Relation type (e.g. 'governs', 'related_to', 'informs')")
1866
- })).max(20).optional().describe("Relations to create after capture. Skips auto-link discovery when provided."),
1870
+ })).max(RELATION_BATCH_MAX).optional().describe("Relations to create after capture. Skips auto-link discovery when provided."),
1867
1871
  sourceRef: z4.string().max(2e3).optional().describe("URI or path of the source document backing this entry."),
1868
- sourceExcerpt: z4.string().max(5e3).optional().describe("Verbatim excerpt from the source backing this entry's claims."),
1872
+ sourceExcerpt: z4.string().max(SOURCE_EXCERPT_MAX_CHARS).optional().describe("Verbatim excerpt from the source backing this entry's claims."),
1869
1873
  preview: z4.boolean().optional().describe("If true, validates without writing."),
1870
1874
  suggestOnly: z4.boolean().optional().describe("If true, runs pre-write grounding and returns a groundingReport WITHOUT creating any entry."),
1871
1875
  format: z4.enum(["agent", "human"]).optional().describe("Response format for grounding data."),
@@ -3775,7 +3779,7 @@ var entriesSchema = z10.object({
3775
3779
  tag: z10.string().max(200).optional().describe("For 'list': filter by internal tag."),
3776
3780
  label: z10.string().max(200).optional().describe("For 'list': filter by label slug \u2014 matches entries across all collections."),
3777
3781
  query: z10.string().min(2).max(500).optional().describe("For 'search': search text (min 2 characters)."),
3778
- name: z10.string().max(500).optional().describe("For 'update': new display name."),
3782
+ name: z10.string().max(ENTRY_NAME_MAX_CHARS).optional().describe("For 'update': new display name."),
3779
3783
  workflowStatus: z10.string().max(200).optional().describe(
3780
3784
  "For 'update': collection workflow state. Valid values are collection-specific and server-owned \u2014 discover via `collections action=describe`. Invalid values are rejected with the valid set."
3781
3785
  ),
@@ -3797,7 +3801,7 @@ var entriesSchema = z10.object({
3797
3801
  sourceRef: z10.string().max(2e3).optional().describe(
3798
3802
  "For 'update': URI or path of the source document backing this entry. Write-once."
3799
3803
  ),
3800
- sourceExcerpt: z10.string().max(5e3).optional().describe(
3804
+ sourceExcerpt: z10.string().max(SOURCE_EXCERPT_MAX_CHARS).optional().describe(
3801
3805
  "For 'update': verbatim excerpt from the source backing this entry's claims. Write-once."
3802
3806
  ),
3803
3807
  steeringOverrideReason: z10.string().max(2e3).optional().describe(
@@ -4631,7 +4635,7 @@ var relationsSchema = z13.object({
4631
4635
  to: z13.string().max(200).optional().describe("For 'create'/'dismiss'/'delete': target entry ID."),
4632
4636
  type: z13.string().max(200).optional().describe("For 'create'/'dismiss'/'delete': relation type."),
4633
4637
  score: z13.number().optional().describe("For 'dismiss': suggestion score from action=suggest."),
4634
- relations: z13.array(relationItemSchema).min(1).max(20).optional().describe("For 'batch-create': array of {from, to, type}."),
4638
+ relations: z13.array(relationItemSchema).min(1).max(RELATION_BATCH_MAX).optional().describe("For 'batch-create': array of {from, to, type}."),
4635
4639
  // WP-316 S3: Preview gate — dry-run mode for action=create.
4636
4640
  preview: z13.boolean().optional().describe("For 'create': if true, validates the relation without writing. Returns what would happen. Default false."),
4637
4641
  entryId: z13.string().max(200).optional().describe("For 'find'/'suggest': entry ID, e.g. '<PREFIX>-<n>'."),
@@ -4649,7 +4653,7 @@ var relationsCreateVariant = z13.object({
4649
4653
  });
4650
4654
  var relationsBatchCreateVariant = z13.object({
4651
4655
  action: z13.literal("batch-create"),
4652
- relations: z13.array(relationItemSchema).min(1).max(20)
4656
+ relations: z13.array(relationItemSchema).min(1).max(RELATION_BATCH_MAX)
4653
4657
  });
4654
4658
  var relationsDismissVariant = z13.object({
4655
4659
  action: z13.literal("dismiss"),
@@ -6160,9 +6164,9 @@ import { z as z16 } from "zod/v3";
6160
6164
  var labelsSchema = z16.object({
6161
6165
  action: z16.enum(["list", "create", "update", "delete", "apply", "remove"]).describe("Action: list all labels, create/update/delete a label, or apply/remove a label on an entry"),
6162
6166
  slug: z16.string().max(200).optional().describe("Label slug (required for create/update/delete/apply/remove)"),
6163
- name: z16.string().max(500).optional().describe("Display name (required for create)"),
6167
+ name: z16.string().max(ENTRY_NAME_MAX_CHARS).optional().describe("Display name (required for create)"),
6164
6168
  color: z16.string().max(50).optional().describe("Hex color, e.g. '#ef4444'"),
6165
- description: z16.string().max(2e3).optional().describe("What this label means"),
6169
+ description: z16.string().max(LABEL_DESCRIPTION_MAX_CHARS).optional().describe("What this label means"),
6166
6170
  parentSlug: z16.string().max(200).optional().describe("Parent group slug for label hierarchy"),
6167
6171
  isGroup: z16.boolean().optional().describe("True if this is a group container, not a taggable label"),
6168
6172
  order: z16.number().optional().describe("Sort order within its group"),
@@ -6302,8 +6306,8 @@ var collectionsSchema = z17.object({
6302
6306
  "'list': browse all collections. 'update': update an existing collection. 'describe': full documentation for one collection \u2014 fields, option guides, usage guidance, examples. 'audit': health report for all collections \u2014 missing classification, icon, displayHint coverage, and field schema gaps. 'export': full system_collection_definitions export with classification metadata (thinkingLayer, classificationPriority, classificationCheck, classificationSignals, governanceRole, governanceFunction, timelineRole, canBeElementOf, descriptionFieldKey). Admin only. 'label-list'/'label-create'/'label-update'/'label-delete'/'label-apply'/'label-remove': manage workspace labels (absorbs the `labels` tool). Creating a new collection is not offered here \u2014 ask a platform admin to provision it, or enable the module ontology pack that owns the drawer."
6303
6307
  ),
6304
6308
  slug: z17.string().max(200).optional().describe("URL-safe identifier for create/update, e.g. 'glossary', 'tech-debt'. For label-*: label slug."),
6305
- name: z17.string().max(500).optional().describe("Display name for create, or new name for update. For label-create: label display name."),
6306
- description: z17.string().max(2e4).optional().describe("What this collection is for. For label-create/label-update: what the label means."),
6309
+ name: z17.string().max(ENTRY_NAME_MAX_CHARS).optional().describe("Display name for create, or new name for update. For label-create: label display name."),
6310
+ description: z17.string().max(2e4).optional().describe("What this collection is for. For label-create/label-update: what the label means (max 2,000 characters)."),
6307
6311
  purpose: z17.string().max(2e3).optional().describe("Why this collection exists \u2014 strategic reason"),
6308
6312
  icon: z17.string().max(50).optional().describe("Emoji icon for the collection"),
6309
6313
  navGroup: z17.enum(["daily", "strategic", "governance", "reference", "collections"]).optional().describe("Sidebar placement: 'daily', 'strategic', 'governance', 'reference', 'collections'"),
@@ -6331,7 +6335,7 @@ var collectionsDescribeVariant = z17.object({ action: z17.literal("describe"), s
6331
6335
  var collectionsUpdateVariant = z17.object({
6332
6336
  action: z17.literal("update"),
6333
6337
  slug: z17.string().max(200),
6334
- name: z17.string().max(500).optional(),
6338
+ name: z17.string().max(ENTRY_NAME_MAX_CHARS).optional(),
6335
6339
  description: z17.string().max(2e4).optional(),
6336
6340
  purpose: z17.string().max(2e3).optional(),
6337
6341
  icon: z17.string().max(50).optional(),
@@ -6355,9 +6359,9 @@ var collectionsLabelListVariant = z17.object({ action: z17.literal("label-list")
6355
6359
  var collectionsLabelCreateVariant = z17.object({
6356
6360
  action: z17.literal("label-create"),
6357
6361
  slug: z17.string().max(200),
6358
- name: z17.string().max(500),
6362
+ name: z17.string().max(ENTRY_NAME_MAX_CHARS),
6359
6363
  color: z17.string().max(50).optional(),
6360
- description: z17.string().max(2e3).optional(),
6364
+ description: z17.string().max(LABEL_DESCRIPTION_MAX_CHARS).optional(),
6361
6365
  parentSlug: z17.string().max(200).optional(),
6362
6366
  isGroup: z17.boolean().optional(),
6363
6367
  order: z17.number().optional()
@@ -6365,9 +6369,9 @@ var collectionsLabelCreateVariant = z17.object({
6365
6369
  var collectionsLabelUpdateVariant = z17.object({
6366
6370
  action: z17.literal("label-update"),
6367
6371
  slug: z17.string().max(200),
6368
- name: z17.string().max(500).optional(),
6372
+ name: z17.string().max(ENTRY_NAME_MAX_CHARS).optional(),
6369
6373
  color: z17.string().max(50).optional(),
6370
- description: z17.string().max(2e3).optional(),
6374
+ description: z17.string().max(LABEL_DESCRIPTION_MAX_CHARS).optional(),
6371
6375
  isGroup: z17.boolean().optional(),
6372
6376
  order: z17.number().optional()
6373
6377
  });
@@ -9929,7 +9933,7 @@ var workflowsSchema = z20.object({
9929
9933
  output: z20.union([z20.string(), workflowRunOutputInputSchema]).optional().describe("The round's output \u2014 either legacy synthesized text or a typed workflow run payload."),
9930
9934
  isFinal: z20.boolean().optional().describe("If true, finalize an existing durable workflow run from its terminal round and create the summary chain entry."),
9931
9935
  restart: z20.boolean().optional().describe("If true, start a new durable run from the workflow's first round in the current session."),
9932
- summaryName: z20.string().max(500).optional().describe("Optional name for final chain entry. If omitted, the workflow summary template is used."),
9936
+ summaryName: z20.string().max(ENTRY_NAME_MAX_CHARS).optional().describe("Optional name for final chain entry. If omitted, the workflow summary template is used."),
9933
9937
  summaryDescription: z20.string().max(ENTRY_BODY_MAX_CHARS).optional().describe("Optional override for the final chain entry description. Defaults to the final round output text."),
9934
9938
  summaryEntryId: z20.string().max(200).optional().describe("Link an existing entry as the run's summary instead of creating one. Used by facilitated workflows (e.g. shape) where the primary record is created by the specialized tool."),
9935
9939
  // WP-513: team+role to create the finalize summary AS OWNER of (rung 2 only).
@@ -9950,7 +9954,7 @@ var workflowsCheckpointVariant = z20.object({
9950
9954
  output: z20.union([z20.string(), workflowRunOutputInputSchema]),
9951
9955
  isFinal: z20.boolean().optional(),
9952
9956
  restart: z20.boolean().optional(),
9953
- summaryName: z20.string().max(500).optional(),
9957
+ summaryName: z20.string().max(ENTRY_NAME_MAX_CHARS).optional(),
9954
9958
  summaryDescription: z20.string().max(ENTRY_BODY_MAX_CHARS).optional(),
9955
9959
  summaryEntryId: z20.string().max(200).optional(),
9956
9960
  runId: z20.string().max(200).optional(),
@@ -12789,24 +12793,18 @@ var actions = ["submit", "list", "queue", "note", "group", "status"];
12789
12793
  var category = z28.enum(PRODUCT_FEEDBACK_CATEGORIES);
12790
12794
  var status = z28.enum(PRODUCT_FEEDBACK_STATUSES);
12791
12795
  var vendorStatus = z28.enum(VENDOR_SETTABLE_STATUSES);
12792
- var GATEWAY_MAX_STRING_BYTES = 10240;
12793
- var utf8Bytes = (value) => new TextEncoder().encode(value).length;
12794
- var fitsGatewayBytes = (value) => utf8Bytes(value) <= GATEWAY_MAX_STRING_BYTES;
12795
- var byteLimitMessage = (field) => ({
12796
- message: `${field} exceeds the gateway limit of ${GATEWAY_MAX_STRING_BYTES.toLocaleString("en-US")} UTF-8 bytes \u2014 multibyte characters can hit the byte limit well below the 10,000-character cap; shorten the text.`
12797
- });
12798
12796
  var MESSAGE_DISPLAY_LIMIT = 1e3;
12799
12797
  var FULL_MESSAGE_MAX_LIMIT = 5;
12800
12798
  var feedbackSchema = z28.object({
12801
12799
  action: z28.enum(actions).describe("submit requires message; list returns your own workspace's feedback (all statuses); queue is the vendor triage queue (system admins only) and accepts filters; note requires feedbackId+note; group requires feedbackIds+groupId (null clears); status requires feedbackId+status."),
12802
- message: z28.string().max(1e4).optional().describe("Required for submit: the product feedback text (max 10,000 chars and 10,240 UTF-8 bytes)."),
12800
+ message: z28.string().max(1e4).optional().describe("Required for submit: the product feedback text (max 10,000 characters)."),
12803
12801
  category: category.optional().describe("Submit/queue category; submit defaults to other."),
12804
12802
  command: z28.string().max(1e3).optional().describe("Optional submit command context; argument values are scrubbed server-side."),
12805
12803
  route: z28.string().max(500).optional().describe("Optional submit route context."),
12806
12804
  client: z28.string().max(100).optional().describe("Optional submit client label."),
12807
12805
  feedbackId: z28.string().max(200).optional().describe("Required for note/status: target feedback ID."),
12808
12806
  feedbackIds: z28.array(z28.string().max(200)).max(100).optional().describe("Required for group: 1\u2013100 target feedback IDs."),
12809
- note: z28.string().max(4e3).optional().describe("Required for note: replacement triage note (max 10,240 UTF-8 bytes)."),
12807
+ note: z28.string().max(4e3).optional().describe("Required for note: replacement triage note (max 4,000 characters)."),
12810
12808
  status: status.optional().describe("list/queue filter (any status, including 'screening'); the status action's required target value excludes 'screening' (system-only)."),
12811
12809
  groupId: z28.string().min(1).max(200).nullable().optional().describe("Group filter, or required group destination; null explicitly clears grouping."),
12812
12810
  workspaceId: z28.string().max(200).optional().describe("Queue-only filter (vendor cross-workspace triage); omitted means all workspaces. Has no effect on list \u2014 your own workspace is always injected server-side."),
@@ -12817,10 +12815,10 @@ var feedbackSchema = z28.object({
12817
12815
  full: z28.boolean().optional().describe(`list/queue only: return untruncated messages; allowed only when limit <= ${FULL_MESSAGE_MAX_LIMIT}.`)
12818
12816
  });
12819
12817
  var union = z28.discriminatedUnion("action", [
12820
- z28.object({ action: z28.literal("submit"), message: z28.string().min(1).max(1e4).refine(fitsGatewayBytes, byteLimitMessage("message")), category: category.optional(), command: z28.string().max(1e3).optional(), route: z28.string().max(500).optional(), client: z28.string().max(100).optional() }),
12818
+ z28.object({ action: z28.literal("submit"), message: z28.string().min(1).max(1e4), category: category.optional(), command: z28.string().max(1e3).optional(), route: z28.string().max(500).optional(), client: z28.string().max(100).optional() }),
12821
12819
  z28.object({ action: z28.literal("list"), status: status.optional(), limit: z28.number().int().min(1).max(100).optional(), cursor: z28.string().max(2e3).optional(), full: z28.boolean().optional() }),
12822
12820
  z28.object({ action: z28.literal("queue"), status: status.optional(), category: category.optional(), groupId: z28.string().min(1).max(200).optional(), workspaceId: z28.string().max(200).optional(), since: z28.number().optional(), before: z28.number().optional(), limit: z28.number().int().min(1).max(100).optional(), cursor: z28.string().max(2e3).optional(), full: z28.boolean().optional() }),
12823
- z28.object({ action: z28.literal("note"), feedbackId: z28.string().min(1).max(200), note: z28.string().max(4e3).refine(fitsGatewayBytes, byteLimitMessage("note")) }),
12821
+ z28.object({ action: z28.literal("note"), feedbackId: z28.string().min(1).max(200), note: z28.string().max(4e3) }),
12824
12822
  z28.object({ action: z28.literal("group"), feedbackIds: z28.array(z28.string().min(1).max(200)).min(1).max(100), groupId: z28.string().min(1).max(200).nullable() }),
12825
12823
  z28.object({ action: z28.literal("status"), feedbackId: z28.string().min(1).max(200), status: vendorStatus })
12826
12824
  ]);
@@ -14539,4 +14537,4 @@ export {
14539
14537
  createProductBrainServer,
14540
14538
  initFeatureFlags
14541
14539
  };
14542
- //# sourceMappingURL=chunk-JMZVBN2K.js.map
14540
+ //# sourceMappingURL=chunk-MN6WGFRO.js.map