@productbrain/mcp 0.0.1-beta.16059 → 0.0.1-beta.16061
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.
|
@@ -3878,12 +3878,21 @@ var OPEN_TASK_LIST_WORDS = {
|
|
|
3878
3878
|
/** After a task whose package parents are all done or archived, so the agent finishes it or closes it (Product Design 2026-10-30). */
|
|
3879
3879
|
packageClosed: "(its package is closed)",
|
|
3880
3880
|
under: (pkg) => `under ${pkg.name} (${pkg.entryId})`,
|
|
3881
|
-
/** A row in progress's wait (a depends_on link), with its target's state; over when the target is done, stopped or archived.
|
|
3882
|
-
|
|
3881
|
+
/** A row in progress's wait (a depends_on link), with its target's state; over when the target is done, stopped or archived. When the
|
|
3882
|
+
* same target is also what the row rests on due later, its due line follows the state, so one link is said once (TASK-2086, Voice). */
|
|
3883
|
+
waitsOn: (target2, state, due) => `waits on ${target2}, ${state}${due ? `, ${due}` : ""}`,
|
|
3883
3884
|
waitOver: (target2, state) => `wait over: ${target2} is ${state}`,
|
|
3884
3885
|
/** QUE-1484 point 6: a wait on an entry whose kind has no finished stage, said plainly. */
|
|
3885
|
-
waitNever: (target2, state) => `waits on ${target2}, ${state}, which never finishes`,
|
|
3886
|
+
waitNever: (target2, state, due) => `waits on ${target2}, ${state}${due ? `, ${due}` : ""}, which never finishes`,
|
|
3886
3887
|
noWait: "no wait written",
|
|
3888
|
+
/** TASK-2086 (QUE-1519; Voice, round 2): a dated task that depends on an open entry due after it, with that entry's due line ("due 27 Nov"). */
|
|
3889
|
+
restsOn: (target2, due) => `rests on ${target2}, ${due}`,
|
|
3890
|
+
/** The read kept too few calls or bytes to look at what a dated row rests on: not the same as nothing due later. Each door adds its
|
|
3891
|
+
* command that shows the task's links (linksCommand), from the row's own id, so the step costs no read. */
|
|
3892
|
+
restsOnUnread: "what it rests on not read",
|
|
3893
|
+
linksCommand: { cli: (entryId) => `pb get ${entryId}`, mcp: (entryId) => `\`context action=get entryId="${entryId}"\`` },
|
|
3894
|
+
/** TASK-2086 (QUE-1519; Voice, round 2): after the due mark of an open task not started, its date 1 to DUE_SOON_DAYS days away. */
|
|
3895
|
+
dueSoon: (days) => `in ${days} day${days === 1 ? "" : "s"}, not started`,
|
|
3887
3896
|
/** The read kept too few calls to look for this row's wait: not the same as none. */
|
|
3888
3897
|
waitUnread: "wait not read",
|
|
3889
3898
|
/** Two or more rows share a level: nothing orders them inside it (DEC-2416). */
|
|
@@ -3919,22 +3928,27 @@ function openTaskCommand(surface, input = {}) {
|
|
|
3919
3928
|
const bare = OPEN_TASK_LIST_WORDS.allCommand.mcp.slice(1, -1);
|
|
3920
3929
|
return `${bare}${input.role ? ` roleId=${input.role}` : ""}${input.cursor !== void 0 ? ` cursor=${input.cursor}` : ""}`;
|
|
3921
3930
|
}
|
|
3922
|
-
function waitText(wait, unread) {
|
|
3931
|
+
function waitText(wait, unread, due) {
|
|
3923
3932
|
const w = OPEN_TASK_LIST_WORDS;
|
|
3924
3933
|
if (unread) return w.waitUnread;
|
|
3925
3934
|
if (!wait) return w.noWait;
|
|
3926
3935
|
const target2 = `${wait.name} (${wait.entryId})`, state = entryStatusLabel(wait.state);
|
|
3927
|
-
return wait.over ? w.waitOver(target2, state) : wait.never ? w.waitNever(target2, state) : w.waitsOn(target2, state);
|
|
3936
|
+
return wait.over ? w.waitOver(target2, state) : wait.never ? w.waitNever(target2, state, due) : w.waitsOn(target2, state, due);
|
|
3928
3937
|
}
|
|
3929
|
-
function openTaskRowText(row) {
|
|
3938
|
+
function openTaskRowText(row, surface) {
|
|
3930
3939
|
const w = OPEN_TASK_LIST_WORDS, t = row.doneWhen ?? { ticked: 0, total: 0 };
|
|
3931
3940
|
const marks = [row.noOwner && w.noOwner, row.packageClosed && w.packageClosed].filter(Boolean).map((m) => ` ${m}`).join("");
|
|
3941
|
+
const restsDue = row.restsOn && TASK_DUE_WORDS.line(row.restsOn.day);
|
|
3942
|
+
const once = row.wait !== void 0 && row.wait.entryId === row.restsOn?.entryId;
|
|
3943
|
+
const restsOn = row.restsOn ? !once && w.restsOn(`${row.restsOn.name} (${row.restsOn.entryId})`, restsDue) : row.restsOnUnread && `${w.restsOnUnread}: ${w.linksCommand[surface](row.entryId)}`;
|
|
3932
3944
|
const parts = [
|
|
3933
3945
|
entryStatusLabel(row.inProgress ? "in_progress" : "open"),
|
|
3934
3946
|
WORK_PACKAGE_LIST_WORDS.ticks(t.ticked, t.total),
|
|
3935
3947
|
row.due && taskDueMark(row.due),
|
|
3948
|
+
row.dueSoon !== void 0 && w.dueSoon(row.dueSoon),
|
|
3949
|
+
restsOn,
|
|
3936
3950
|
row.under && w.under(row.under),
|
|
3937
|
-
row.inProgress && waitText(row.wait, row.waitUnread)
|
|
3951
|
+
row.inProgress && waitText(row.wait, row.waitUnread, once ? restsDue : void 0)
|
|
3938
3952
|
];
|
|
3939
3953
|
return `${priorityWord(row.priority)}${w.separator}${row.entryId} \u2014 ${row.name}${marks}${parts.filter(Boolean).map((p) => `${w.separator}${p}`).join("")}`;
|
|
3940
3954
|
}
|
|
@@ -3943,7 +3957,7 @@ function openTaskListLines(list, surface) {
|
|
|
3943
3957
|
const total = surface.total ?? list.rows.length;
|
|
3944
3958
|
const due = list.dueCounts && total > 0 ? [TASK_DUE_WORDS.counts(list.dueCounts.overdue, list.dueCounts.dueToday, list.dueCounts.read, list.capped)] : [];
|
|
3945
3959
|
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);
|
|
3946
|
-
const lines = [...due, ...rows.map((row) => `${surface.bullet}${openTaskRowText(row)}`), ...levels.length > 0 ? [w.tied(levels)] : []];
|
|
3960
|
+
const lines = [...due, ...rows.map((row) => `${surface.bullet}${openTaskRowText(row, surface.surface)}`), ...levels.length > 0 ? [w.tied(levels)] : []];
|
|
3947
3961
|
if (total > shown && surface.from === void 0) lines.push(w.more(shown, total, list.capped, w.allCommand[surface.surface]));
|
|
3948
3962
|
if (total > shown && surface.from !== void 0 && shown > 0) lines.push(w.page(surface.from + 1, surface.from + shown, total, list.capped));
|
|
3949
3963
|
if (list.underPlanned) lines.push(w.underPlanned(list.underPlanned, list.capped));
|
|
@@ -3970,7 +3984,12 @@ var SEAT_DRAFTS_CUT_WORDS = {
|
|
|
3970
3984
|
};
|
|
3971
3985
|
function cleanMarks(list, clean) {
|
|
3972
3986
|
const mark = (m) => m && { ...m, entryId: clean(m.entryId), name: clean(m.name) };
|
|
3973
|
-
return list && { ...list, rows: list.rows.map((r) => ({
|
|
3987
|
+
return list && { ...list, rows: list.rows.map((r) => ({
|
|
3988
|
+
...r,
|
|
3989
|
+
...r.under ? { under: mark(r.under) } : {},
|
|
3990
|
+
...r.restsOn ? { restsOn: { ...mark(r.restsOn), day: clean(r.restsOn.day) } } : {},
|
|
3991
|
+
...r.wait ? { wait: { ...mark(r.wait), state: clean(r.wait.state) } } : {}
|
|
3992
|
+
})) };
|
|
3974
3993
|
}
|
|
3975
3994
|
function openTaskCompactLines(list) {
|
|
3976
3995
|
if (!list || list.total === 0 && !list.capped && !list.underPlanned) return [];
|
|
@@ -12786,4 +12805,4 @@ export {
|
|
|
12786
12805
|
SERVER_VERSION,
|
|
12787
12806
|
createProductBrainServer
|
|
12788
12807
|
};
|
|
12789
|
-
//# sourceMappingURL=chunk-
|
|
12808
|
+
//# sourceMappingURL=chunk-ZECP7Q6X.js.map
|