@productbrain/mcp 0.0.1-beta.12653 → 0.0.1-beta.12662

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.
@@ -232,6 +232,8 @@ var LINK_REFUSAL_WORDS = {
232
232
  notChanged: (entryId) => `${entryId} was not changed.`,
233
233
  /** The accept preview's label for an accept that would not go through (signed row 31). */
234
234
  wouldBeRefused: "Would be refused",
235
+ /** The accept preview's label for an accept that would go through, beside wouldBeRefused. */
236
+ wouldBeAccepted: "Would be accepted",
235
237
  /** The refusal panel's steps (CoherencyRefusalPanel.svelte): each step's title and its retry button, carried on the payload. */
236
238
  steps: {
237
239
  link: { title: "Link the authorizing entry", cta: "I've linked it \u2014 retry" },
@@ -982,6 +984,10 @@ var groundingDuplicateEntrySchema = z4.object({
982
984
  entryId: z4.string(),
983
985
  name: z4.string(),
984
986
  collectionSlug: z4.string(),
987
+ // The candidate's embedding cosine (kernel/capture/types.ts `score`), not a word overlap.
988
+ denseScore: z4.number(),
989
+ // The same value under the name released clients read. RULE-630: it leaves in a later PR, once
990
+ // the prod /health commit and main of 24 hours earlier both serve `denseScore`.
985
991
  overlapRatio: z4.number()
986
992
  });
987
993
  var groundingReportSchema = z4.object({
@@ -1304,7 +1310,7 @@ No DB writes \u2014 call without \`preview:true\` to capture for real.${result2.
1304
1310
  if (createdStatus !== void 0 && isTrustAccepted(createdStatus)) wasAutoCommittedServerSide = true;
1305
1311
  spineFloor = created.spineFloor;
1306
1312
  const matches = created.verdict?.kind === "ask" ? created.verdict.matches : [];
1307
- groundingReport.duplicates = matches.map((m) => ({ entryId: m.entryId, name: m.name, collectionSlug: m.collectionSlug, overlapRatio: m.score }));
1313
+ groundingReport.duplicates = matches.map((m) => ({ entryId: m.entryId, name: m.name, collectionSlug: m.collectionSlug, denseScore: m.score, overlapRatio: m.score }));
1308
1314
  if (created.verdict) groundingReport.scanTruncated = false;
1309
1315
  groundingCaveat = created.judged === false ? CAVEAT_JUDGE_LATE : "";
1310
1316
  } catch (error) {
@@ -1667,12 +1673,12 @@ var updateEntrySchema = z7.object({
1667
1673
  sourceExcerpt: z7.string().optional().describe("Verbatim excerpt from the source that backs this entry's claims. Write-once: can only be set if currently empty."),
1668
1674
  // WP-465 slice ⑤ — relay-only (TEN-2233): validation/min-length/recording live in Convex.
1669
1675
  steeringOverrideReason: z7.string().optional().describe("Why it stands alone, at least 12 characters. Your name is kept with it."),
1670
- qualityOverrideReason: z7.string().optional().describe("Why (\u226512 chars) to keep an accepted spine text its quality checklist failed \u2014 recorded as an override with who wrote it."),
1676
+ qualityOverrideReason: z7.string().optional().describe("Why a text keeps after its checklist failed, at least 12 characters. Your name is kept with it."),
1671
1677
  // TASK-954
1672
1678
  coherencyAcknowledgement: z7.object({
1673
1679
  response: z7.enum(["linked", "accepted-fix", "diverged"]).describe("Your answer to why it stands alone."),
1674
1680
  entryId: z7.string().optional().describe("Authorizing entry being linked/accepted (required for 'linked' and 'accepted-fix')."),
1675
- reason: z7.string().optional().describe("Divergence rationale (required for 'diverged', \u226512 chars).")
1681
+ reason: z7.string().optional().describe("Why you diverge, at least 12 characters; required for 'diverged'.")
1676
1682
  }).optional().describe("Your answer when an entry links to nothing. One answer per entry per session.")
1677
1683
  });
1678
1684
  var commitEntrySchema = z7.object({
@@ -1681,12 +1687,12 @@ var commitEntrySchema = z7.object({
1681
1687
  preview: z7.boolean().optional().describe("If true, validates the accept without writing. Returns what would happen. Default false."),
1682
1688
  // WP-465 slice ⑤ — relay-only (TEN-2233): validation/recording live in Convex.
1683
1689
  steeringOverrideReason: z7.string().optional().describe("Why it stands alone, at least 12 characters. Your name is kept with it."),
1684
- qualityOverrideReason: z7.string().optional().describe("Why (\u226512 chars) to accept over a failing quality checklist \u2014 recorded as an override with who wrote it."),
1690
+ qualityOverrideReason: z7.string().optional().describe("Why a text passes after its checklist failed. Your name is kept with it."),
1685
1691
  // TASK-954
1686
1692
  coherencyAcknowledgement: z7.object({
1687
1693
  response: z7.enum(["linked", "accepted-fix", "diverged"]).describe("Your answer to why it stands alone."),
1688
1694
  entryId: z7.string().optional().describe("Authorizing entry being linked/accepted (required for 'linked' and 'accepted-fix')."),
1689
- reason: z7.string().optional().describe("Divergence rationale (required for 'diverged', \u226512 chars).")
1695
+ reason: z7.string().optional().describe("Why you diverge, at least 12 characters; required for 'diverged'.")
1690
1696
  }).optional().describe("Your answer when an entry links to nothing."),
1691
1697
  replaces: z7.string().max(200).optional(),
1692
1698
  // TASK-1030: described once, on the served entries schema
@@ -1870,7 +1876,7 @@ async function handleCommitEntry({ entryId, preview, steeringOverrideReason, qua
1870
1876
  if (result2?.preview) {
1871
1877
  const wouldBlock = result2.wouldBlock === true;
1872
1878
  const previewContradictionAdvisory = result2?.contradictionAdvisory;
1873
- const previewVerdict = wouldBlock ? LINK_REFUSAL_WORDS.wouldBeRefused.toLowerCase() : "would be accepted";
1879
+ const previewVerdict = wouldBlock ? LINK_REFUSAL_WORDS.wouldBeRefused.toLowerCase() : LINK_REFUSAL_WORDS.wouldBeAccepted.toLowerCase();
1874
1880
  const previewEnvelope = success(
1875
1881
  `Preview: ${entryId} ${previewVerdict} \u2014 no DB writes`,
1876
1882
  {
@@ -2562,7 +2568,7 @@ var ENTRIES_ACTIONS = [
2562
2568
  var coherencyAcknowledgementFlatSchema = z12.object({
2563
2569
  response: z12.enum(["linked", "accepted-fix", "diverged"]).describe("Your answer to why it stands alone."),
2564
2570
  entryId: z12.string().max(200).optional().describe("Authorizing entry being linked/accepted (required for 'linked' and 'accepted-fix')."),
2565
- reason: z12.string().max(2e3).optional().describe("Divergence rationale (required for 'diverged', \u226512 chars).")
2571
+ reason: z12.string().max(2e3).optional().describe("Why you diverge, at least 12 characters; required for 'diverged'.")
2566
2572
  });
2567
2573
  var ENTRIES_MOVED = {
2568
2574
  preflight: "entries only writes. Check a collection's requirements with the read-only context tool: context action=preflight collection=..."
@@ -2608,7 +2614,7 @@ var entriesSchema = z12.object({
2608
2614
  "For 'update'/'accept': why it stands alone, at least 12 characters. Your name is kept with it."
2609
2615
  ),
2610
2616
  qualityOverrideReason: z12.string().max(2e3).optional().describe(
2611
- "For 'update'/'accept': why (\u226512 chars) to keep a spine text its quality checklist failed; recorded as an override with who wrote it."
2617
+ "For 'update'/'accept': why a text keeps or passes after its checklist failed; on update, at least 12 characters. Your name is kept with it."
2612
2618
  ),
2613
2619
  coherencyAcknowledgement: coherencyAcknowledgementFlatSchema.optional().describe(
2614
2620
  "For 'update'/'accept': your answer when an entry links to nothing."
@@ -11975,4 +11981,4 @@ export {
11975
11981
  SERVER_VERSION,
11976
11982
  createProductBrainServer
11977
11983
  };
11978
- //# sourceMappingURL=chunk-4PK3AGDW.js.map
11984
+ //# sourceMappingURL=chunk-HULJJZV4.js.map