@productbrain/mcp 0.0.1-beta.13 → 0.0.1-beta.15
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.
- package/dist/{chunk-JIJC25ZP.js → chunk-3QNBVXRP.js} +20 -7
- package/dist/chunk-3QNBVXRP.js.map +1 -0
- package/dist/{chunk-4ETXQ24K.js → chunk-47LO6K2R.js} +43 -5
- package/dist/chunk-47LO6K2R.js.map +1 -0
- package/dist/http.js +2 -2
- package/dist/index.js +2 -2
- package/dist/{smart-capture-LD5DEUCX.js → smart-capture-4DNBNMRG.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-4ETXQ24K.js.map +0 -1
- package/dist/chunk-JIJC25ZP.js.map +0 -1
- /package/dist/{smart-capture-LD5DEUCX.js.map → smart-capture-4DNBNMRG.js.map} +0 -0
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
requireWriteAccess,
|
|
14
14
|
setSessionOriented,
|
|
15
15
|
startAgentSession
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-47LO6K2R.js";
|
|
17
17
|
|
|
18
18
|
// src/server.ts
|
|
19
19
|
import { McpServer as McpServer2 } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
@@ -119,7 +119,8 @@ ${formatted}` }]
|
|
|
119
119
|
const lines = [
|
|
120
120
|
`# ${entry.entryId ? `${entry.entryId}: ` : ""}${entry.name}`,
|
|
121
121
|
"",
|
|
122
|
-
`**Status:** ${entry.status}
|
|
122
|
+
`**Status:** ${entry.status}`,
|
|
123
|
+
`**Type:** ${entry.canonicalKey ?? "untyped"}`
|
|
123
124
|
];
|
|
124
125
|
if (entry.data && typeof entry.data === "object") {
|
|
125
126
|
lines.push("");
|
|
@@ -163,12 +164,13 @@ ${formatted}` }]
|
|
|
163
164
|
status: z.string().optional().describe("New status: draft | active | verified | deprecated"),
|
|
164
165
|
data: z.record(z.unknown()).optional().describe("Fields to update (merged with existing data)"),
|
|
165
166
|
order: z.number().optional().describe("New sort order"),
|
|
167
|
+
canonicalKey: z.string().optional().describe("Semantic type (e.g. 'decision', 'tension'). Only changeable on draft/uncommitted entries."),
|
|
166
168
|
autoPublish: z.boolean().optional().default(false).describe("Only true when user explicitly asks to publish. Default false = draft. Never auto-publish without user confirmation."),
|
|
167
169
|
changeNote: z.string().optional().describe("Short human-readable summary for history (e.g. 'Updated description to F1-themed copy'). If omitted, a friendly default is generated from fields changed.")
|
|
168
170
|
},
|
|
169
171
|
annotations: { idempotentHint: true, destructiveHint: false }
|
|
170
172
|
},
|
|
171
|
-
async ({ entryId, name, status, data, order, autoPublish, changeNote }) => {
|
|
173
|
+
async ({ entryId, name, status, data, order, canonicalKey, autoPublish, changeNote }) => {
|
|
172
174
|
try {
|
|
173
175
|
requireWriteAccess();
|
|
174
176
|
const id = await mcpMutation("chain.updateEntry", {
|
|
@@ -177,6 +179,7 @@ ${formatted}` }]
|
|
|
177
179
|
status,
|
|
178
180
|
data,
|
|
179
181
|
order,
|
|
182
|
+
canonicalKey,
|
|
180
183
|
autoPublish,
|
|
181
184
|
changeNote,
|
|
182
185
|
changedBy: getAgentSessionId() ? `agent:${getAgentSessionId()}` : void 0
|
|
@@ -253,10 +256,11 @@ Process criteria (TBD): e.g. 3+ users approved, or 7 days without valid concerns
|
|
|
253
256
|
const id = e.entryId ? `**${e.entryId}:** ` : "";
|
|
254
257
|
const col = collMap.get(e.collectionId);
|
|
255
258
|
const colTag = col ? ` [${col.slug}]` : "";
|
|
259
|
+
const typeTag = e.canonicalKey ? ` (${e.canonicalKey})` : "";
|
|
256
260
|
const desc = extractPreview(e.data, 150);
|
|
257
261
|
const preview = desc ? `
|
|
258
262
|
${desc}` : "";
|
|
259
|
-
return `- ${id}${e.name} \`${e.status}\`${colTag}${preview}`;
|
|
263
|
+
return `- ${id}${e.name} \`${e.status}\`${colTag}${typeTag}${preview}`;
|
|
260
264
|
}).join("\n");
|
|
261
265
|
const header = `# Search Results for "${query}"${scope} (${results.length} match${results.length === 1 ? "" : "es"})
|
|
262
266
|
|
|
@@ -870,7 +874,7 @@ Use \`list-collections\` to verify the result.`
|
|
|
870
874
|
},
|
|
871
875
|
async ({ entryId }) => {
|
|
872
876
|
requireWriteAccess();
|
|
873
|
-
const { runContradictionCheck } = await import("./smart-capture-
|
|
877
|
+
const { runContradictionCheck } = await import("./smart-capture-4DNBNMRG.js");
|
|
874
878
|
const entry = await mcpQuery("chain.getEntry", { entryId });
|
|
875
879
|
if (!entry) {
|
|
876
880
|
return {
|
|
@@ -1381,7 +1385,16 @@ function registerHealthTools(server) {
|
|
|
1381
1385
|
lines.push(`Readiness: ${readiness.score}% (${readiness.passedChecks}/${readiness.totalChecks}).`);
|
|
1382
1386
|
lines.push("");
|
|
1383
1387
|
if (orientEntries) {
|
|
1384
|
-
const fmt = (e) =>
|
|
1388
|
+
const fmt = (e) => {
|
|
1389
|
+
const type = e.canonicalKey ?? "generic";
|
|
1390
|
+
const stratum = e.stratum ?? "?";
|
|
1391
|
+
return `- \`${e.entryId ?? e._id}\` [${type} \xB7 ${stratum}] ${e.name}`;
|
|
1392
|
+
};
|
|
1393
|
+
if (orientEntries.activeBets?.length > 0) {
|
|
1394
|
+
lines.push("## Active bets");
|
|
1395
|
+
orientEntries.activeBets.forEach((e) => lines.push(fmt(e)));
|
|
1396
|
+
lines.push("");
|
|
1397
|
+
}
|
|
1385
1398
|
if (orientEntries.activeGoals.length > 0) {
|
|
1386
1399
|
lines.push("## Active goals");
|
|
1387
1400
|
orientEntries.activeGoals.forEach((e) => lines.push(fmt(e)));
|
|
@@ -4527,4 +4540,4 @@ export {
|
|
|
4527
4540
|
SERVER_VERSION,
|
|
4528
4541
|
createProductBrainServer
|
|
4529
4542
|
};
|
|
4530
|
-
//# sourceMappingURL=chunk-
|
|
4543
|
+
//# sourceMappingURL=chunk-3QNBVXRP.js.map
|