@productbrain/mcp 0.0.1-beta.12644 → 0.0.1-beta.12658
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.
|
@@ -230,6 +230,10 @@ var LINK_REFUSAL_WORDS = {
|
|
|
230
230
|
personAccepts: "Only a person can accept this entry; a person accepts it in Product Brain.",
|
|
231
231
|
notAccepted: (entryId) => `${entryId} was not accepted and stays a draft.`,
|
|
232
232
|
notChanged: (entryId) => `${entryId} was not changed.`,
|
|
233
|
+
/** The accept preview's label for an accept that would not go through (signed row 31). */
|
|
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",
|
|
233
237
|
/** The refusal panel's steps (CoherencyRefusalPanel.svelte): each step's title and its retry button, carried on the payload. */
|
|
234
238
|
steps: {
|
|
235
239
|
link: { title: "Link the authorizing entry", cta: "I've linked it \u2014 retry" },
|
|
@@ -1664,28 +1668,28 @@ var updateEntrySchema = z7.object({
|
|
|
1664
1668
|
sourceRef: z7.string().optional().describe("URI or path of the source document backing this entry. Write-once: can only be set if currently empty."),
|
|
1665
1669
|
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."),
|
|
1666
1670
|
// WP-465 slice ⑤ — relay-only (TEN-2233): validation/min-length/recording live in Convex.
|
|
1667
|
-
steeringOverrideReason: z7.string().optional().describe("
|
|
1671
|
+
steeringOverrideReason: z7.string().optional().describe("Why it stands alone, at least 12 characters. Your name is kept with it."),
|
|
1668
1672
|
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."),
|
|
1669
1673
|
// TASK-954
|
|
1670
1674
|
coherencyAcknowledgement: z7.object({
|
|
1671
|
-
response: z7.enum(["linked", "accepted-fix", "diverged"]).describe("
|
|
1675
|
+
response: z7.enum(["linked", "accepted-fix", "diverged"]).describe("Your answer to why it stands alone."),
|
|
1672
1676
|
entryId: z7.string().optional().describe("Authorizing entry being linked/accepted (required for 'linked' and 'accepted-fix')."),
|
|
1673
1677
|
reason: z7.string().optional().describe("Divergence rationale (required for 'diverged', \u226512 chars).")
|
|
1674
|
-
}).optional().describe("
|
|
1678
|
+
}).optional().describe("Your answer when an entry links to nothing. One answer per entry per session.")
|
|
1675
1679
|
});
|
|
1676
1680
|
var commitEntrySchema = z7.object({
|
|
1677
1681
|
entryId: z7.string().describe("Entry ID to accept, e.g. 'TEN-abc123', '<PREFIX>-<n>'"),
|
|
1678
1682
|
// WP-316 S3: Preview gate — dry-run mode. Returns would-succeed result, no DB writes.
|
|
1679
1683
|
preview: z7.boolean().optional().describe("If true, validates the accept without writing. Returns what would happen. Default false."),
|
|
1680
1684
|
// WP-465 slice ⑤ — relay-only (TEN-2233): validation/recording live in Convex.
|
|
1681
|
-
steeringOverrideReason: z7.string().optional().describe("
|
|
1682
|
-
qualityOverrideReason: z7.string().optional().describe("Why
|
|
1685
|
+
steeringOverrideReason: z7.string().optional().describe("Why it stands alone, at least 12 characters. Your name is kept with it."),
|
|
1686
|
+
qualityOverrideReason: z7.string().optional().describe("Why a text passes after its checklist failed. Your name is kept with it."),
|
|
1683
1687
|
// TASK-954
|
|
1684
1688
|
coherencyAcknowledgement: z7.object({
|
|
1685
|
-
response: z7.enum(["linked", "accepted-fix", "diverged"]).describe("
|
|
1689
|
+
response: z7.enum(["linked", "accepted-fix", "diverged"]).describe("Your answer to why it stands alone."),
|
|
1686
1690
|
entryId: z7.string().optional().describe("Authorizing entry being linked/accepted (required for 'linked' and 'accepted-fix')."),
|
|
1687
1691
|
reason: z7.string().optional().describe("Divergence rationale (required for 'diverged', \u226512 chars).")
|
|
1688
|
-
}).optional().describe("
|
|
1692
|
+
}).optional().describe("Your answer when an entry links to nothing."),
|
|
1689
1693
|
replaces: z7.string().max(200).optional(),
|
|
1690
1694
|
// TASK-1030: described once, on the served entries schema
|
|
1691
1695
|
reason: z7.string().max(2e3).optional()
|
|
@@ -1868,8 +1872,9 @@ async function handleCommitEntry({ entryId, preview, steeringOverrideReason, qua
|
|
|
1868
1872
|
if (result2?.preview) {
|
|
1869
1873
|
const wouldBlock = result2.wouldBlock === true;
|
|
1870
1874
|
const previewContradictionAdvisory = result2?.contradictionAdvisory;
|
|
1875
|
+
const previewVerdict = wouldBlock ? LINK_REFUSAL_WORDS.wouldBeRefused.toLowerCase() : LINK_REFUSAL_WORDS.wouldBeAccepted.toLowerCase();
|
|
1871
1876
|
const previewEnvelope = success(
|
|
1872
|
-
`Preview: ${
|
|
1877
|
+
`Preview: ${entryId} ${previewVerdict} \u2014 no DB writes`,
|
|
1873
1878
|
{
|
|
1874
1879
|
entryId,
|
|
1875
1880
|
name: entry.name,
|
|
@@ -1888,17 +1893,17 @@ async function handleCommitEntry({ entryId, preview, steeringOverrideReason, qua
|
|
|
1888
1893
|
}
|
|
1889
1894
|
const blockingNote = wouldBlock && result2.blockingReason ? `
|
|
1890
1895
|
|
|
1891
|
-
|
|
1896
|
+
**${LINK_REFUSAL_WORDS.wouldBeRefused}:** ${result2.blockingReason}` : wouldBlock ? `
|
|
1892
1897
|
|
|
1893
|
-
**
|
|
1898
|
+
**${LINK_REFUSAL_WORDS.wouldBeRefused}** on a real accept.` : "";
|
|
1894
1899
|
const advisoryNote = previewContradictionAdvisory ? `
|
|
1895
1900
|
|
|
1896
1901
|
\u26A0 Contradiction advisory (would be attached on a real accept): ${previewContradictionAdvisory.reason}
|
|
1897
1902
|
${previewContradictionAdvisory.conflictDetails.map((c) => `- \`${c.chainEntryId}\` ${c.chainEntryName}: ${c.explanation}`).join("\n")}` : "";
|
|
1898
1903
|
return {
|
|
1899
|
-
content: [{ type: "text", text: `# Preview:
|
|
1904
|
+
content: [{ type: "text", text: `# Preview: ${entryId} ${previewVerdict}
|
|
1900
1905
|
|
|
1901
|
-
Current status: \`${result2.currentStatus}
|
|
1906
|
+
Current status: \`${result2.currentStatus}\`${wouldBlock ? "" : ` \u2192 would become \`${result2.wouldSetStatus}\``}.${blockingNote}${advisoryNote}
|
|
1902
1907
|
|
|
1903
1908
|
No DB writes \u2014 call without \`preview:true\` to accept for real.` }],
|
|
1904
1909
|
structuredContent: previewEnvelope
|
|
@@ -2557,7 +2562,7 @@ var ENTRIES_ACTIONS = [
|
|
|
2557
2562
|
"replace"
|
|
2558
2563
|
];
|
|
2559
2564
|
var coherencyAcknowledgementFlatSchema = z12.object({
|
|
2560
|
-
response: z12.enum(["linked", "accepted-fix", "diverged"]).describe("
|
|
2565
|
+
response: z12.enum(["linked", "accepted-fix", "diverged"]).describe("Your answer to why it stands alone."),
|
|
2561
2566
|
entryId: z12.string().max(200).optional().describe("Authorizing entry being linked/accepted (required for 'linked' and 'accepted-fix')."),
|
|
2562
2567
|
reason: z12.string().max(2e3).optional().describe("Divergence rationale (required for 'diverged', \u226512 chars).")
|
|
2563
2568
|
});
|
|
@@ -2602,13 +2607,13 @@ var entriesSchema = z12.object({
|
|
|
2602
2607
|
"For 'update': verbatim excerpt from the source backing this entry's claims. Write-once."
|
|
2603
2608
|
),
|
|
2604
2609
|
steeringOverrideReason: z12.string().max(2e3).optional().describe(
|
|
2605
|
-
"For 'update'/'accept':
|
|
2610
|
+
"For 'update'/'accept': why it stands alone, at least 12 characters. Your name is kept with it."
|
|
2606
2611
|
),
|
|
2607
2612
|
qualityOverrideReason: z12.string().max(2e3).optional().describe(
|
|
2608
|
-
"For 'update'/'accept': why
|
|
2613
|
+
"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."
|
|
2609
2614
|
),
|
|
2610
2615
|
coherencyAcknowledgement: coherencyAcknowledgementFlatSchema.optional().describe(
|
|
2611
|
-
"For 'update'/'accept':
|
|
2616
|
+
"For 'update'/'accept': your answer when an entry links to nothing."
|
|
2612
2617
|
),
|
|
2613
2618
|
preview: z12.boolean().optional().describe(
|
|
2614
2619
|
"For 'accept': if true, validates the accept without writing \u2014 returns what would happen."
|
|
@@ -11972,4 +11977,4 @@ export {
|
|
|
11972
11977
|
SERVER_VERSION,
|
|
11973
11978
|
createProductBrainServer
|
|
11974
11979
|
};
|
|
11975
|
-
//# sourceMappingURL=chunk-
|
|
11980
|
+
//# sourceMappingURL=chunk-NAY6UWWU.js.map
|