@productbrain/mcp 0.0.1-beta.9784 → 0.0.1-beta.9791
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-ER5AXQN2.js → chunk-KLKLBPJD.js} +12 -7
- package/dist/chunk-KLKLBPJD.js.map +1 -0
- package/dist/{chunk-ZKRYGHNU.js → chunk-ME7NLZOZ.js} +1 -1
- package/dist/{chunk-ZKRYGHNU.js.map → chunk-ME7NLZOZ.js.map} +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/http.js +2 -2
- package/dist/index.js +2 -2
- package/dist/{setup-E2FLUBN2.js → setup-M3OBLVLN.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-ER5AXQN2.js.map +0 -1
- /package/dist/{setup-E2FLUBN2.js.map → setup-M3OBLVLN.js.map} +0 -0
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
trackQualityVerdict,
|
|
44
44
|
trackSessionCaptureRate,
|
|
45
45
|
trackZeroCaptureAuditFired
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-ME7NLZOZ.js";
|
|
47
47
|
|
|
48
48
|
// src/server.ts
|
|
49
49
|
import { McpServer as McpServer2 } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
@@ -2291,7 +2291,9 @@ var getHistorySchema = z5.object({
|
|
|
2291
2291
|
entryId: z5.string().describe("Entry ID, e.g. '<PREFIX>-<n>'")
|
|
2292
2292
|
});
|
|
2293
2293
|
async function handleGetHistory({ entryId }) {
|
|
2294
|
-
const
|
|
2294
|
+
const envelope = await kernelCallEnvelope("chain.listEntryHistory", { entryId });
|
|
2295
|
+
const history = envelope.data;
|
|
2296
|
+
const truncated = envelope._meta?.truncated === true;
|
|
2295
2297
|
if (history.length === 0) {
|
|
2296
2298
|
return successResult(
|
|
2297
2299
|
`No history found for ${entryId}.`,
|
|
@@ -2306,13 +2308,16 @@ async function handleGetHistory({ entryId }) {
|
|
|
2306
2308
|
const qualifier = h.legacyQualifier ? ` [${h.legacyQualifier}]` : "";
|
|
2307
2309
|
return `- **${date}** ${h.event} _(${sanitizeSingleLineField(h.displayAuthor)})_${changes}${qualifier}`;
|
|
2308
2310
|
}).join("\n");
|
|
2311
|
+
const cut = truncated ? `Older history left out: only the newest ${history.length} events were read.
|
|
2312
|
+
|
|
2313
|
+
` : "";
|
|
2309
2314
|
return {
|
|
2310
2315
|
content: [{ type: "text", text: `# History for \`${entryId}\` (${history.length} events)
|
|
2311
2316
|
|
|
2312
|
-
${formatted}` }],
|
|
2317
|
+
${cut}${formatted}` }],
|
|
2313
2318
|
structuredContent: success(
|
|
2314
2319
|
`Found ${history.length} history events for ${entryId}.`,
|
|
2315
|
-
{ entryId, eventCount: history.length, events: history }
|
|
2320
|
+
{ entryId, eventCount: history.length, events: history, truncated }
|
|
2316
2321
|
)
|
|
2317
2322
|
};
|
|
2318
2323
|
}
|
|
@@ -3501,7 +3506,7 @@ async function handleGet(entryId) {
|
|
|
3501
3506
|
lines.push(...relationLines(e.relations));
|
|
3502
3507
|
}
|
|
3503
3508
|
if (Array.isArray(e.history) && e.history.length > 0) {
|
|
3504
|
-
lines.push("", "## History (last 10)");
|
|
3509
|
+
lines.push("", "## History (last 10)", ...e.historyTruncated === true ? [`Older history left out: only the newest ${e.history.length} events were read.`] : []);
|
|
3505
3510
|
for (const h of e.history.slice(-10)) {
|
|
3506
3511
|
const date = new Date(h.timestamp).toISOString().split("T")[0];
|
|
3507
3512
|
const qualifier = h.legacyQualifier ? ` [${h.legacyQualifier}]` : "";
|
|
@@ -3610,7 +3615,7 @@ async function handleBatch(entryIds) {
|
|
|
3610
3615
|
lines.push(...relationLines(entry.relations));
|
|
3611
3616
|
}
|
|
3612
3617
|
if (Array.isArray(entry.history) && entry.history.length > 0) {
|
|
3613
|
-
lines.push("", "**History (last 5):**");
|
|
3618
|
+
lines.push("", "**History (last 5):**", ...entry.historyTruncated === true ? [`Older history left out: only the newest ${entry.history.length} events were read.`] : []);
|
|
3614
3619
|
for (const h of entry.history.slice(-5)) {
|
|
3615
3620
|
const date = new Date(h.timestamp).toISOString().split("T")[0];
|
|
3616
3621
|
lines.push(`- ${date}: ${h.event}`);
|
|
@@ -13065,4 +13070,4 @@ export {
|
|
|
13065
13070
|
createProductBrainServer,
|
|
13066
13071
|
initFeatureFlags
|
|
13067
13072
|
};
|
|
13068
|
-
//# sourceMappingURL=chunk-
|
|
13073
|
+
//# sourceMappingURL=chunk-KLKLBPJD.js.map
|