@productbrain/mcp 0.0.1-beta.10757 → 0.0.1-beta.10771

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.
@@ -3740,9 +3740,9 @@ async function handleSearch(server, query, collection, status2) {
3740
3740
  data: `Searching${scope} for "${query}"...`,
3741
3741
  logger: "product-os"
3742
3742
  });
3743
- const answer = await kernelQuery("chain.search", { query, collectionSlug: collection, status: status2 });
3744
- const results = answer.rows;
3745
- const platform = platformSearchLines(answer.platform);
3743
+ const answer2 = await kernelQuery("chain.search", { query, collectionSlug: collection, status: status2 });
3744
+ const results = answer2.rows;
3745
+ const platform = platformSearchLines(answer2.platform);
3746
3746
  const matches = results.length + platform.count;
3747
3747
  if (matches === 0) {
3748
3748
  const recorded = recordGap({ query, tool: "context", action: "search", gapType: "search_zero", collectionScope: collection });
@@ -3780,7 +3780,7 @@ async function handleSearch(server, query, collection, status2) {
3780
3780
  }).join("\n");
3781
3781
  const header = `## Search Result
3782
3782
 
3783
- # Search Results for "${query}"${scope} (${matches}${answer.truncated ? "+" : ""} match${matches === 1 ? "" : "es"})
3783
+ # Search Results for "${query}"${scope} (${matches}${answer2.truncated ? "+" : ""} match${matches === 1 ? "" : "es"})
3784
3784
 
3785
3785
  **By collection:** ${collSummary}`;
3786
3786
  const footer = `_Tip: Use \`collection\` param to scope search. Use context action=get with an entry ID for full details._`;
@@ -3802,7 +3802,7 @@ async function handleSearch(server, query, collection, status2) {
3802
3802
  return {
3803
3803
  content: [{ type: "text", text: `${header}
3804
3804
 
3805
- ${[...platform.lines, formatted, answer.cutLine].filter(Boolean).join("\n")}
3805
+ ${[...platform.lines, formatted, answer2.cutLine].filter(Boolean).join("\n")}
3806
3806
 
3807
3807
  ${footer}` }],
3808
3808
  structuredContent: success(`Found ${total} entries${platform.count ? ` and ${platform.count} platform glossary terms` : ""} matching '${query}'.`, {
@@ -3810,8 +3810,8 @@ ${footer}` }],
3810
3810
  results: structuredResults,
3811
3811
  entries: entriesForView,
3812
3812
  total,
3813
- truncated: answer.truncated,
3814
- cutLine: answer.cutLine,
3813
+ truncated: answer2.truncated,
3814
+ cutLine: answer2.cutLine,
3815
3815
  query
3816
3816
  })
3817
3817
  };
@@ -11669,16 +11669,20 @@ var PRODUCT_FEEDBACK_STATUSES = ["new", "triaged", "planned", "resolved", "dismi
11669
11669
  var VENDOR_SETTABLE_STATUSES = PRODUCT_FEEDBACK_STATUSES.filter(
11670
11670
  (status2) => status2 !== "screening"
11671
11671
  );
11672
+ var FEEDBACK_TENSION_ID_PATTERN = /^TEN-[1-9][0-9]*$/;
11673
+ var MAX_FEEDBACK_ANSWER_LENGTH = 240;
11672
11674
 
11673
11675
  // src/tools/feedback.ts
11674
11676
  var actions = ["submit", "list", "queue", "note", "group", "status"];
11675
11677
  var category = z30.enum(PRODUCT_FEEDBACK_CATEGORIES);
11676
11678
  var status = z30.enum(PRODUCT_FEEDBACK_STATUSES);
11677
11679
  var vendorStatus = z30.enum(VENDOR_SETTABLE_STATUSES);
11680
+ var tensionId = z30.string().regex(FEEDBACK_TENSION_ID_PATTERN);
11681
+ var answer = z30.string().trim().min(1).max(MAX_FEEDBACK_ANSWER_LENGTH);
11678
11682
  var MESSAGE_DISPLAY_LIMIT = 1e3;
11679
11683
  var FULL_MESSAGE_MAX_LIMIT = 5;
11680
11684
  var feedbackSchema = z30.object({
11681
- action: z30.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."),
11685
+ action: z30.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 and may carry tensionId and answer."),
11682
11686
  message: z30.string().max(1e4).optional().describe("Required for submit: the product feedback text (max 10,000 characters)."),
11683
11687
  category: category.optional().describe("Submit/queue category; submit defaults to other."),
11684
11688
  command: z30.string().max(1e3).optional().describe("Optional submit command context; argument values are scrubbed server-side."),
@@ -11688,6 +11692,8 @@ var feedbackSchema = z30.object({
11688
11692
  feedbackIds: z30.array(z30.string().max(200)).max(100).optional().describe("Required for group: 1\u2013100 target feedback IDs."),
11689
11693
  note: z30.string().max(4e3).optional().describe("Required for note: replacement triage note (max 4,000 characters)."),
11690
11694
  status: status.optional().describe("list/queue filter (any status, including 'screening'); the status action's required target value excludes 'screening' (system-only)."),
11695
+ tensionId: tensionId.optional().describe("status only: the tension the report joined, its display id TEN- and a number (vendor-only, never shown to the reporter)."),
11696
+ answer: answer.optional().describe(`status only: the one sentence the reporter reads under their report, dated (max ${MAX_FEEDBACK_ANSWER_LENGTH} characters).`),
11691
11697
  groupId: z30.string().min(1).max(200).nullable().optional().describe("Group filter, or required group destination; null explicitly clears grouping."),
11692
11698
  workspaceId: z30.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."),
11693
11699
  since: z30.number().optional().describe("Queue-only lower createdAt window bound (inclusive) in epoch milliseconds."),
@@ -11702,7 +11708,7 @@ var union = z30.discriminatedUnion("action", [
11702
11708
  z30.object({ action: z30.literal("queue"), status: status.optional(), category: category.optional(), groupId: z30.string().min(1).max(200).optional(), workspaceId: z30.string().max(200).optional(), since: z30.number().optional(), before: z30.number().optional(), limit: z30.number().int().min(1).max(100).optional(), cursor: z30.string().max(2e3).optional(), full: z30.boolean().optional() }),
11703
11709
  z30.object({ action: z30.literal("note"), feedbackId: z30.string().min(1).max(200), note: z30.string().max(4e3) }),
11704
11710
  z30.object({ action: z30.literal("group"), feedbackIds: z30.array(z30.string().min(1).max(200)).min(1).max(100), groupId: z30.string().min(1).max(200).nullable() }),
11705
- z30.object({ action: z30.literal("status"), feedbackId: z30.string().min(1).max(200), status: vendorStatus })
11711
+ z30.object({ action: z30.literal("status"), feedbackId: z30.string().min(1).max(200), status: vendorStatus, tensionId: tensionId.optional(), answer: answer.optional() })
11706
11712
  ]);
11707
11713
  var specs = {
11708
11714
  submit: { params: ["message", "category", "command", "route", "client"], description: "message is required; category defaults to other." },
@@ -11711,7 +11717,10 @@ var specs = {
11711
11717
  queue: { params: ["status", "category", "groupId", "workspaceId", "since", "before", "limit", "cursor", "full"], description: "Vendor cross-workspace triage queue (system admins only); filters are optional, status defaults to new; cursor pages, full lifts message truncation for limit <= 5." },
11712
11718
  note: { params: ["feedbackId", "note"], description: "feedbackId and note are required." },
11713
11719
  group: { params: ["feedbackIds", "groupId"], description: "feedbackIds and groupId are required; null clears a group." },
11714
- status: { params: ["feedbackId", "status"], description: "feedbackId and status are required; status cannot be set to 'screening' (system-only)." }
11720
+ status: {
11721
+ params: ["feedbackId", "status", "tensionId", "answer"],
11722
+ description: "feedbackId and status are required; status cannot be set to 'screening' (system-only); optional tensionId and answer are written in the same call."
11723
+ }
11715
11724
  };
11716
11725
  function result(action, data) {
11717
11726
  const summary = action === "submit" ? "Feedback submitted." : `Feedback ${action} complete.`;
@@ -12840,4 +12849,4 @@ export {
12840
12849
  createProductBrainServer,
12841
12850
  initFeatureFlags
12842
12851
  };
12843
- //# sourceMappingURL=chunk-UNDEFOTU.js.map
12852
+ //# sourceMappingURL=chunk-NIYRIGLR.js.map