@productbrain/mcp 0.0.1-beta.8563 → 0.0.1-beta.8569

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,11 @@ 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 RELATION_BATCH_MAX = 25;
1460
1463
 
1461
1464
  // src/tools/smart-capture.ts
1462
1465
  var GENERIC_PROFILE = {
@@ -1853,7 +1856,7 @@ var CAPTURE_ACTIONS = ["capture"];
1853
1856
  var captureCompoundSchema = z4.object({
1854
1857
  action: z4.enum(CAPTURE_ACTIONS).optional().default("capture").describe("Create a single knowledge entry."),
1855
1858
  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."),
1859
+ name: z4.string().max(ENTRY_NAME_MAX_CHARS).optional().describe("Display name \u2014 required."),
1857
1860
  description: z4.string().max(ENTRY_BODY_MAX_CHARS).optional().describe("Full context \u2014 required."),
1858
1861
  context: z4.string().max(5e3).optional().describe("Optional additional context."),
1859
1862
  entryId: entryIdSchema,
@@ -1863,9 +1866,9 @@ var captureCompoundSchema = z4.object({
1863
1866
  links: z4.array(z4.object({
1864
1867
  to: z4.string().max(200).describe("Target entry ID (e.g. '<PREFIX>-<n>')"),
1865
1868
  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."),
1869
+ })).max(RELATION_BATCH_MAX).optional().describe("Relations to create after capture. Skips auto-link discovery when provided."),
1867
1870
  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."),
1871
+ sourceExcerpt: z4.string().max(SOURCE_EXCERPT_MAX_CHARS).optional().describe("Verbatim excerpt from the source backing this entry's claims."),
1869
1872
  preview: z4.boolean().optional().describe("If true, validates without writing."),
1870
1873
  suggestOnly: z4.boolean().optional().describe("If true, runs pre-write grounding and returns a groundingReport WITHOUT creating any entry."),
1871
1874
  format: z4.enum(["agent", "human"]).optional().describe("Response format for grounding data."),
@@ -3775,7 +3778,7 @@ var entriesSchema = z10.object({
3775
3778
  tag: z10.string().max(200).optional().describe("For 'list': filter by internal tag."),
3776
3779
  label: z10.string().max(200).optional().describe("For 'list': filter by label slug \u2014 matches entries across all collections."),
3777
3780
  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."),
3781
+ name: z10.string().max(ENTRY_NAME_MAX_CHARS).optional().describe("For 'update': new display name."),
3779
3782
  workflowStatus: z10.string().max(200).optional().describe(
3780
3783
  "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
3784
  ),
@@ -3797,7 +3800,7 @@ var entriesSchema = z10.object({
3797
3800
  sourceRef: z10.string().max(2e3).optional().describe(
3798
3801
  "For 'update': URI or path of the source document backing this entry. Write-once."
3799
3802
  ),
3800
- sourceExcerpt: z10.string().max(5e3).optional().describe(
3803
+ sourceExcerpt: z10.string().max(SOURCE_EXCERPT_MAX_CHARS).optional().describe(
3801
3804
  "For 'update': verbatim excerpt from the source backing this entry's claims. Write-once."
3802
3805
  ),
3803
3806
  steeringOverrideReason: z10.string().max(2e3).optional().describe(
@@ -4631,7 +4634,7 @@ var relationsSchema = z13.object({
4631
4634
  to: z13.string().max(200).optional().describe("For 'create'/'dismiss'/'delete': target entry ID."),
4632
4635
  type: z13.string().max(200).optional().describe("For 'create'/'dismiss'/'delete': relation type."),
4633
4636
  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}."),
4637
+ relations: z13.array(relationItemSchema).min(1).max(RELATION_BATCH_MAX).optional().describe("For 'batch-create': array of {from, to, type}."),
4635
4638
  // WP-316 S3: Preview gate — dry-run mode for action=create.
4636
4639
  preview: z13.boolean().optional().describe("For 'create': if true, validates the relation without writing. Returns what would happen. Default false."),
4637
4640
  entryId: z13.string().max(200).optional().describe("For 'find'/'suggest': entry ID, e.g. '<PREFIX>-<n>'."),
@@ -4649,7 +4652,7 @@ var relationsCreateVariant = z13.object({
4649
4652
  });
4650
4653
  var relationsBatchCreateVariant = z13.object({
4651
4654
  action: z13.literal("batch-create"),
4652
- relations: z13.array(relationItemSchema).min(1).max(20)
4655
+ relations: z13.array(relationItemSchema).min(1).max(RELATION_BATCH_MAX)
4653
4656
  });
4654
4657
  var relationsDismissVariant = z13.object({
4655
4658
  action: z13.literal("dismiss"),
@@ -6160,7 +6163,7 @@ import { z as z16 } from "zod/v3";
6160
6163
  var labelsSchema = z16.object({
6161
6164
  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
6165
  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)"),
6166
+ name: z16.string().max(ENTRY_NAME_MAX_CHARS).optional().describe("Display name (required for create)"),
6164
6167
  color: z16.string().max(50).optional().describe("Hex color, e.g. '#ef4444'"),
6165
6168
  description: z16.string().max(2e3).optional().describe("What this label means"),
6166
6169
  parentSlug: z16.string().max(200).optional().describe("Parent group slug for label hierarchy"),
@@ -6302,7 +6305,7 @@ var collectionsSchema = z17.object({
6302
6305
  "'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
6306
  ),
6304
6307
  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."),
6308
+ 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."),
6306
6309
  description: z17.string().max(2e4).optional().describe("What this collection is for. For label-create/label-update: what the label means."),
6307
6310
  purpose: z17.string().max(2e3).optional().describe("Why this collection exists \u2014 strategic reason"),
6308
6311
  icon: z17.string().max(50).optional().describe("Emoji icon for the collection"),
@@ -6331,7 +6334,7 @@ var collectionsDescribeVariant = z17.object({ action: z17.literal("describe"), s
6331
6334
  var collectionsUpdateVariant = z17.object({
6332
6335
  action: z17.literal("update"),
6333
6336
  slug: z17.string().max(200),
6334
- name: z17.string().max(500).optional(),
6337
+ name: z17.string().max(ENTRY_NAME_MAX_CHARS).optional(),
6335
6338
  description: z17.string().max(2e4).optional(),
6336
6339
  purpose: z17.string().max(2e3).optional(),
6337
6340
  icon: z17.string().max(50).optional(),
@@ -6355,7 +6358,7 @@ var collectionsLabelListVariant = z17.object({ action: z17.literal("label-list")
6355
6358
  var collectionsLabelCreateVariant = z17.object({
6356
6359
  action: z17.literal("label-create"),
6357
6360
  slug: z17.string().max(200),
6358
- name: z17.string().max(500),
6361
+ name: z17.string().max(ENTRY_NAME_MAX_CHARS),
6359
6362
  color: z17.string().max(50).optional(),
6360
6363
  description: z17.string().max(2e3).optional(),
6361
6364
  parentSlug: z17.string().max(200).optional(),
@@ -6365,7 +6368,7 @@ var collectionsLabelCreateVariant = z17.object({
6365
6368
  var collectionsLabelUpdateVariant = z17.object({
6366
6369
  action: z17.literal("label-update"),
6367
6370
  slug: z17.string().max(200),
6368
- name: z17.string().max(500).optional(),
6371
+ name: z17.string().max(ENTRY_NAME_MAX_CHARS).optional(),
6369
6372
  color: z17.string().max(50).optional(),
6370
6373
  description: z17.string().max(2e3).optional(),
6371
6374
  isGroup: z17.boolean().optional(),
@@ -9929,7 +9932,7 @@ var workflowsSchema = z20.object({
9929
9932
  output: z20.union([z20.string(), workflowRunOutputInputSchema]).optional().describe("The round's output \u2014 either legacy synthesized text or a typed workflow run payload."),
9930
9933
  isFinal: z20.boolean().optional().describe("If true, finalize an existing durable workflow run from its terminal round and create the summary chain entry."),
9931
9934
  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."),
9935
+ 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
9936
  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
9937
  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
9938
  // WP-513: team+role to create the finalize summary AS OWNER of (rung 2 only).
@@ -9950,7 +9953,7 @@ var workflowsCheckpointVariant = z20.object({
9950
9953
  output: z20.union([z20.string(), workflowRunOutputInputSchema]),
9951
9954
  isFinal: z20.boolean().optional(),
9952
9955
  restart: z20.boolean().optional(),
9953
- summaryName: z20.string().max(500).optional(),
9956
+ summaryName: z20.string().max(ENTRY_NAME_MAX_CHARS).optional(),
9954
9957
  summaryDescription: z20.string().max(ENTRY_BODY_MAX_CHARS).optional(),
9955
9958
  summaryEntryId: z20.string().max(200).optional(),
9956
9959
  runId: z20.string().max(200).optional(),
@@ -12789,24 +12792,18 @@ var actions = ["submit", "list", "queue", "note", "group", "status"];
12789
12792
  var category = z28.enum(PRODUCT_FEEDBACK_CATEGORIES);
12790
12793
  var status = z28.enum(PRODUCT_FEEDBACK_STATUSES);
12791
12794
  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
12795
  var MESSAGE_DISPLAY_LIMIT = 1e3;
12799
12796
  var FULL_MESSAGE_MAX_LIMIT = 5;
12800
12797
  var feedbackSchema = z28.object({
12801
12798
  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)."),
12799
+ message: z28.string().max(1e4).optional().describe("Required for submit: the product feedback text (max 10,000 characters)."),
12803
12800
  category: category.optional().describe("Submit/queue category; submit defaults to other."),
12804
12801
  command: z28.string().max(1e3).optional().describe("Optional submit command context; argument values are scrubbed server-side."),
12805
12802
  route: z28.string().max(500).optional().describe("Optional submit route context."),
12806
12803
  client: z28.string().max(100).optional().describe("Optional submit client label."),
12807
12804
  feedbackId: z28.string().max(200).optional().describe("Required for note/status: target feedback ID."),
12808
12805
  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)."),
12806
+ note: z28.string().max(4e3).optional().describe("Required for note: replacement triage note (max 4,000 characters)."),
12810
12807
  status: status.optional().describe("list/queue filter (any status, including 'screening'); the status action's required target value excludes 'screening' (system-only)."),
12811
12808
  groupId: z28.string().min(1).max(200).nullable().optional().describe("Group filter, or required group destination; null explicitly clears grouping."),
12812
12809
  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 +12814,10 @@ var feedbackSchema = z28.object({
12817
12814
  full: z28.boolean().optional().describe(`list/queue only: return untruncated messages; allowed only when limit <= ${FULL_MESSAGE_MAX_LIMIT}.`)
12818
12815
  });
12819
12816
  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() }),
12817
+ 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
12818
  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
12819
  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")) }),
12820
+ z28.object({ action: z28.literal("note"), feedbackId: z28.string().min(1).max(200), note: z28.string().max(4e3) }),
12824
12821
  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
12822
  z28.object({ action: z28.literal("status"), feedbackId: z28.string().min(1).max(200), status: vendorStatus })
12826
12823
  ]);
@@ -14539,4 +14536,4 @@ export {
14539
14536
  createProductBrainServer,
14540
14537
  initFeatureFlags
14541
14538
  };
14542
- //# sourceMappingURL=chunk-6OMZMXSM.js.map
14539
+ //# sourceMappingURL=chunk-6RJQSLLH.js.map