@productbrain/mcp 0.0.1-beta.11441 → 0.0.1-beta.11453
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-CY37RSBU.js → chunk-WHSAYTTC.js} +14 -22
- package/dist/chunk-WHSAYTTC.js.map +1 -0
- package/dist/{chunk-LELPZ5YE.js → chunk-YKPPIGCW.js} +30 -5
- package/dist/chunk-YKPPIGCW.js.map +1 -0
- package/dist/cli/index.js +1 -1
- package/dist/http.js +2 -2
- package/dist/index.js +2 -2
- package/dist/{setup-UJJCEW4H.js → setup-KQ7BBZ2G.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-CY37RSBU.js.map +0 -1
- package/dist/chunk-LELPZ5YE.js.map +0 -1
- /package/dist/{setup-UJJCEW4H.js.map → setup-KQ7BBZ2G.js.map} +0 -0
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
KernelCallError,
|
|
3
3
|
PASS_SESSION_ID,
|
|
4
4
|
PASTE_NOW,
|
|
5
|
+
SPINE_RUNG_SEQUENCE,
|
|
5
6
|
WORKSPACE_CLOSED,
|
|
6
7
|
appUrl,
|
|
7
8
|
authorityRecovery,
|
|
@@ -34,7 +35,7 @@ import {
|
|
|
34
35
|
runWithToolContext,
|
|
35
36
|
setSessionOriented,
|
|
36
37
|
startAgentSession
|
|
37
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-YKPPIGCW.js";
|
|
38
39
|
|
|
39
40
|
// src/server.ts
|
|
40
41
|
import { McpServer as McpServer2 } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
@@ -190,29 +191,20 @@ function orientationRefusalResult(err, lines) {
|
|
|
190
191
|
}
|
|
191
192
|
var ORIENT_REQUIRED_NOTE = "workflow checkpoints and organisation-structure writes (membership, ownership, parent) still require an oriented session.";
|
|
192
193
|
|
|
193
|
-
// src/lib/spineRungs.ts
|
|
194
|
-
var SPINE_RUNG_SEQUENCE = [
|
|
195
|
-
{ relationType: "validates", targetKey: "key_result", gapIfMissing: "key_result_missing" },
|
|
196
|
-
{ relationType: "part_of", targetKey: "objective", gapIfMissing: "objective_missing" },
|
|
197
|
-
{ relationType: "part_of", targetKey: "strategy", gapIfMissing: "strategy_missing" },
|
|
198
|
-
{ relationType: "part_of", targetKey: "vision", gapIfMissing: "vision_missing" },
|
|
199
|
-
{ relationType: "part_of", targetKey: "purpose", gapIfMissing: "purpose_missing" }
|
|
200
|
-
];
|
|
201
|
-
|
|
202
194
|
// src/lib/checklist.ts
|
|
203
195
|
var FIRST_SPINE_SUBJECT = "work_package";
|
|
204
196
|
var kindWord = (kind) => kind.replace(/_/g, " ");
|
|
205
|
-
var withArticle = (word) => `${/^[aeiou]
|
|
206
|
-
var spineSubject = (kind) => {
|
|
207
|
-
const words = withArticle(
|
|
197
|
+
var withArticle = (word) => `${/^[aeiou]/i.test(word) ? "an" : "a"} ${word}`;
|
|
198
|
+
var spineSubject = (kind, label = kindWord) => {
|
|
199
|
+
const words = withArticle(label(kind));
|
|
208
200
|
return words[0].toUpperCase() + words.slice(1);
|
|
209
201
|
};
|
|
210
|
-
function rungLine(rung) {
|
|
202
|
+
function rungLine(rung, label = kindWord) {
|
|
211
203
|
const index = SPINE_RUNG_SEQUENCE.findIndex((spec) => spec.targetKey === rung);
|
|
212
204
|
if (index < 0) return null;
|
|
213
205
|
const { relationType: relationType2, targetKey } = SPINE_RUNG_SEQUENCE[index];
|
|
214
|
-
const parent = `an accepted ${
|
|
215
|
-
const subject = spineSubject(index === 0 ? FIRST_SPINE_SUBJECT : SPINE_RUNG_SEQUENCE[index - 1].targetKey);
|
|
206
|
+
const parent = `an accepted ${label(targetKey)}`;
|
|
207
|
+
const subject = spineSubject(index === 0 ? FIRST_SPINE_SUBJECT : SPINE_RUNG_SEQUENCE[index - 1].targetKey, label);
|
|
216
208
|
return relationType2 === "part_of" ? `${subject} hangs on ${parent} with ${relationType2}.` : `${subject} ${relationType2} ${parent}.`;
|
|
217
209
|
}
|
|
218
210
|
var SPINE_RUNG_LINES = SPINE_RUNG_SEQUENCE.map((spec) => rungLine(spec.targetKey));
|
|
@@ -257,11 +249,11 @@ var MARK = { met: "[x]", not_yet: "[ ]", judging: "[~]" };
|
|
|
257
249
|
function renderChecklist(canonicalKey, criteria, judging) {
|
|
258
250
|
const lines = CHECKLIST_LINES[canonicalKey];
|
|
259
251
|
if (!lines) return null;
|
|
260
|
-
return criteria.filter((c) => lines[c.id] !== void 0).map((c) => {
|
|
252
|
+
return criteria.filter((c) => (c.line ?? lines[c.id]) !== void 0).map((c) => {
|
|
261
253
|
const state = !c.passed ? "not_yet" : judging ? "judging" : "met";
|
|
262
254
|
const still = state === "judging" ? " (still judging)" : "";
|
|
263
255
|
const missing = state === "not_yet" && c.missing ? ` \u2014 missing: ${c.missing}` : "";
|
|
264
|
-
return `${MARK[state]} ${lines[c.id]}${still}${missing}`;
|
|
256
|
+
return `${MARK[state]} ${c.line ?? lines[c.id]}${still}${missing}`;
|
|
265
257
|
});
|
|
266
258
|
}
|
|
267
259
|
|
|
@@ -2740,7 +2732,7 @@ async function handleGet(entryId) {
|
|
|
2740
2732
|
if (e.sourceExcerpt) lines.push(`**Source excerpt:** ${e.sourceExcerpt}`);
|
|
2741
2733
|
const parsedOwner = parseOwnerOutput(e.owner);
|
|
2742
2734
|
if (parsedOwner) lines.push(formatOwnerLine2(parsedOwner));
|
|
2743
|
-
for (const line of [e.pendingMove, e.qualityOverride]) if (typeof line === "string") lines.push(sanitizeSingleLineField(line));
|
|
2735
|
+
for (const line of [e.pendingMove, e.qualityOverride, e.spineLine]) if (typeof line === "string") lines.push(sanitizeSingleLineField(line));
|
|
2744
2736
|
const restsOnChanged = Array.isArray(e.restsOnChanged) ? e.restsOnChanged : [];
|
|
2745
2737
|
for (const item of restsOnChanged) lines.push(sanitizeSingleLineField(restsOnLine(item)));
|
|
2746
2738
|
if (epistemic) lines.push(formatEpistemicLine(epistemic));
|
|
@@ -2788,8 +2780,8 @@ async function handleGet(entryId) {
|
|
|
2788
2780
|
...e.sourceRef ? { sourceRef: String(e.sourceRef) } : {},
|
|
2789
2781
|
...e.sourceExcerpt ? { sourceExcerpt: String(e.sourceExcerpt) } : {},
|
|
2790
2782
|
...parsedOwner ? { owner: parsedOwner } : {},
|
|
2791
|
-
|
|
2792
|
-
|
|
2783
|
+
// TASK-954, TASK-1027: the kernel's lines as served
|
|
2784
|
+
...Object.fromEntries(["pendingMove", "qualityOverride", "spineLine"].filter((k) => typeof e[k] === "string").map((k) => [k, e[k]])),
|
|
2793
2785
|
...restsOnChanged.length > 0 ? { restsOnChanged } : {},
|
|
2794
2786
|
// TEN-2191: surface the WHY and its quality in the structured payload too.
|
|
2795
2787
|
...why.length > 0 ? { why } : {},
|
|
@@ -12212,4 +12204,4 @@ export {
|
|
|
12212
12204
|
SERVER_VERSION,
|
|
12213
12205
|
createProductBrainServer
|
|
12214
12206
|
};
|
|
12215
|
-
//# sourceMappingURL=chunk-
|
|
12207
|
+
//# sourceMappingURL=chunk-WHSAYTTC.js.map
|