@productbrain/mcp 0.0.1-beta.15977 → 0.0.1-beta.15991
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.
|
@@ -3800,17 +3800,27 @@ var OPEN_TASK_LIST_WORDS = {
|
|
|
3800
3800
|
/** After a task whose package parents are all done or archived, so the agent finishes it or closes it (Product Design 2026-10-30). */
|
|
3801
3801
|
packageClosed: "(its package is closed)",
|
|
3802
3802
|
under: (pkg) => `under ${pkg.name} (${pkg.entryId})`,
|
|
3803
|
+
/** A row in progress's wait (a depends_on link), with its target's state; over when the target is done, stopped or archived. */
|
|
3804
|
+
waitsOn: (target2, state) => `waits on ${target2}, ${state}`,
|
|
3805
|
+
waitOver: (target2, state) => `wait over: ${target2} is ${state}`,
|
|
3806
|
+
noWait: "no wait written",
|
|
3807
|
+
/** The read kept too few calls to look for this row's wait: not the same as none. */
|
|
3808
|
+
waitUnread: "wait not read",
|
|
3803
3809
|
/** Two or more rows share a level: nothing orders them inside it (DEC-2416). */
|
|
3804
3810
|
tied: (levels) => `Tasks not ranked inside ${levels.join(" or ")}.`,
|
|
3805
3811
|
/** Orient shows at most this many rows; the cut note names the command for the rest. */
|
|
3806
3812
|
shown: 5,
|
|
3807
3813
|
more: (shown, total, capped, allCommand) => `Showing ${shown} of ${total}${capped ? "+" : ""}. The rest: ${allCommand}`,
|
|
3814
|
+
/** The tasks list's page, n of N, before the command for the next page (TASK-1948); N reads "N+" on a capped read, as `more` does. */
|
|
3815
|
+
page: (first, last, total, capped) => `Showing ${first}\u2013${last} of ${total}${capped ? "+" : ""}.`,
|
|
3808
3816
|
allCommand: { cli: "pb tasks list", mcp: "`context action=tasks`" },
|
|
3809
3817
|
compact: (count, capped, roleName, team, planned = 0) => `${count}${capped ? "+" : ""} open task(s) of ${roleName}${inTeam(team)}${planned > 0 ? `; ${planned}${capped ? "+" : ""} more under planned packages` : ""}`,
|
|
3810
3818
|
/** Only for a read that was not cut: a capped read that found none prints its capped line instead, never this. */
|
|
3811
3819
|
empty: (roleName, team) => `${roleName} has no open tasks to list${inTeam(team)}.`,
|
|
3812
3820
|
/** Tasks whose only live packages are planned (DEC-2459 as amended 2026-11-16): said as a number, never left out in silence. */
|
|
3813
3821
|
underPlanned: (count, capped) => `${count}${capped ? "+" : ""} more under planned packages: counted, not listed.`,
|
|
3822
|
+
/** After the cap line only: the walk down the packages in progress stopped too, so a task under one may be missing (Voice, 2026-11-18). */
|
|
3823
|
+
walked: (read, of) => `Tasks read under ${read} of ${of} packages in progress. Others may be missing.`,
|
|
3814
3824
|
/** The tasks list's last line when another page follows. */
|
|
3815
3825
|
nextPage: (command) => `More: ${command}`,
|
|
3816
3826
|
/** Printed whenever the read stopped at its cap, so rows it never read are not taken for none (signed by Voice, 2026-10-30).
|
|
@@ -3832,7 +3842,13 @@ function openTaskCommand(surface, input = {}) {
|
|
|
3832
3842
|
function openTaskRowText(row) {
|
|
3833
3843
|
const w = OPEN_TASK_LIST_WORDS, t = row.doneWhen ?? { ticked: 0, total: 0 };
|
|
3834
3844
|
const marks = [row.noOwner && w.noOwner, row.packageClosed && w.packageClosed].filter(Boolean).map((m) => ` ${m}`).join("");
|
|
3835
|
-
const parts = [
|
|
3845
|
+
const parts = [
|
|
3846
|
+
entryStatusLabel(row.inProgress ? "in_progress" : "open"),
|
|
3847
|
+
WORK_PACKAGE_LIST_WORDS.ticks(t.ticked, t.total),
|
|
3848
|
+
row.due && taskDueMark(row.due),
|
|
3849
|
+
row.under && w.under(row.under),
|
|
3850
|
+
row.inProgress && (row.waitUnread ? w.waitUnread : row.wait ? (row.wait.over ? w.waitOver : w.waitsOn)(`${row.wait.name} (${row.wait.entryId})`, entryStatusLabel(row.wait.state)) : w.noWait)
|
|
3851
|
+
];
|
|
3836
3852
|
return `${priorityWord(row.priority)}${w.separator}${row.entryId} \u2014 ${row.name}${marks}${parts.filter(Boolean).map((p) => `${w.separator}${p}`).join("")}`;
|
|
3837
3853
|
}
|
|
3838
3854
|
function openTaskListLines(list, surface) {
|
|
@@ -3841,9 +3857,10 @@ function openTaskListLines(list, surface) {
|
|
|
3841
3857
|
const due = list.dueCounts && total > 0 ? [TASK_DUE_WORDS.counts(list.dueCounts.overdue, list.dueCounts.dueToday, list.dueCounts.read, list.capped)] : [];
|
|
3842
3858
|
const levels = [...new Set(rows.map((row) => priorityWord(row.priority)))].filter((word) => word !== NO_PRIORITY.word && rows.filter((row) => priorityWord(row.priority) === word).length > 1);
|
|
3843
3859
|
const lines = [...due, ...rows.map((row) => `${surface.bullet}${openTaskRowText(row)}`), ...levels.length > 0 ? [w.tied(levels)] : []];
|
|
3844
|
-
if (total > shown) lines.push(w.more(shown, total, list.capped, w.allCommand[surface.surface]));
|
|
3860
|
+
if (total > shown && surface.from === void 0) lines.push(w.more(shown, total, list.capped, w.allCommand[surface.surface]));
|
|
3861
|
+
if (total > shown && surface.from !== void 0 && shown > 0) lines.push(w.page(surface.from + 1, surface.from + shown, total, list.capped));
|
|
3845
3862
|
if (list.underPlanned) lines.push(w.underPlanned(list.underPlanned, list.capped));
|
|
3846
|
-
if (list.capped) lines.push(w.capped(list.cappedAt ?? total));
|
|
3863
|
+
if (list.capped) lines.push(w.capped(list.cappedAt ?? total), ...list.walked ? [w.walked(list.walked.read, list.walked.of)] : []);
|
|
3847
3864
|
return lines;
|
|
3848
3865
|
}
|
|
3849
3866
|
function openTaskLead(list, heading) {
|
|
@@ -3864,8 +3881,9 @@ var SEAT_DRAFTS_CUT_WORDS = {
|
|
|
3864
3881
|
cliNoneBrief: `no draft of yours found, ${DRAFTS_MAY_BE_MORE}`,
|
|
3865
3882
|
mcpNoneLine: `No draft of yours found; ${DRAFTS_MAY_BE_MORE}.`
|
|
3866
3883
|
};
|
|
3867
|
-
function
|
|
3868
|
-
|
|
3884
|
+
function cleanMarks(list, clean) {
|
|
3885
|
+
const mark = (m) => m && { ...m, entryId: clean(m.entryId), name: clean(m.name) };
|
|
3886
|
+
return list && { ...list, rows: list.rows.map((r) => ({ ...r, ...r.under ? { under: mark(r.under) } : {}, ...r.wait ? { wait: { ...mark(r.wait), state: clean(r.wait.state) } } : {} })) };
|
|
3869
3887
|
}
|
|
3870
3888
|
function openTaskCompactLines(list) {
|
|
3871
3889
|
if (!list || list.total === 0 && !list.capped && !list.underPlanned) return [];
|
|
@@ -4788,8 +4806,8 @@ Read what a role owns with \`context action=accountable\`.`,
|
|
|
4788
4806
|
function formatOpenTasks(page, roleId) {
|
|
4789
4807
|
const s = sanitizeSingleLineField;
|
|
4790
4808
|
const rows = page.rows.map((row) => ({ ...row, name: s(row.name), entryId: s(row.entryId) }));
|
|
4791
|
-
const list =
|
|
4792
|
-
const lines = [openTaskLead(list, (text) => `## ${text}`), ...openTaskListLines(list, { bullet: "- ", surface: "mcp" })];
|
|
4809
|
+
const list = cleanMarks({ ...page, role: { ...page.role, name: s(page.role.name) }, ...page.team === void 0 ? {} : { team: s(page.team) }, rows }, s);
|
|
4810
|
+
const lines = [openTaskLead(list, (text) => `## ${text}`), ...openTaskListLines(list, { bullet: "- ", surface: "mcp", total: page.total, from: page.from ?? 0 })];
|
|
4793
4811
|
if (page.nextCursor !== null) {
|
|
4794
4812
|
lines.push(OPEN_TASK_LIST_WORDS.nextPage(`\`${openTaskCommand("mcp", { ...roleId ? { role: s(roleId) } : {}, cursor: page.nextCursor })}\``));
|
|
4795
4813
|
}
|
|
@@ -6530,7 +6548,7 @@ function cleanOpenTasks(list) {
|
|
|
6530
6548
|
const s = sanitizeSingleLineField;
|
|
6531
6549
|
if (!list) return void 0;
|
|
6532
6550
|
const rows = list.rows.map((row) => ({ ...row, name: s(row.name), entryId: s(row.entryId) }));
|
|
6533
|
-
return
|
|
6551
|
+
return cleanMarks({ ...list, role: { ...list.role, name: s(list.role.name) }, ...list.team === void 0 ? {} : { team: s(list.team) }, rows }, s);
|
|
6534
6552
|
}
|
|
6535
6553
|
function buildOpenTaskSection(work) {
|
|
6536
6554
|
const lines = openTaskSectionLines(cleanOpenTasks(work.openTasks), { heading: (text) => `## ${text}`, bullet: "- ", surface: "mcp" });
|
|
@@ -12676,4 +12694,4 @@ export {
|
|
|
12676
12694
|
SERVER_VERSION,
|
|
12677
12695
|
createProductBrainServer
|
|
12678
12696
|
};
|
|
12679
|
-
//# sourceMappingURL=chunk-
|
|
12697
|
+
//# sourceMappingURL=chunk-IDNFQRTO.js.map
|