create-pmos 0.711.0 → 0.712.0
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/package.json +9 -3
- package/payload/KIT-VERSION +1 -1
- package/payload/planning/evals/eval-calibration.md +1 -1
- package/payload/planning/okrs/health-budgets.md +1 -1
- package/payload/state/discoveries.md +1 -1
- package/workspace/changelog.json +8 -2
- package/workspace/guide/layout.md +3 -3
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/public/pm/bd-backlog.css +1 -1
- package/workspace/public/pm/bd-backlog.js +9 -3
- package/workspace/public/pm/cozy-home.css +7 -0
- package/workspace/public/pm/cozy-task-pop.css +7 -0
- package/workspace/public/pm/home-ask.js +19 -1
- package/workspace/public/pm/home-chat.js +16 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.712.0",
|
|
4
4
|
"description": "Scaffold the PMOS portable kit — run the PMOS product-management workflow (initiative → lane-fit spec → contract → build → three gates, with work-type lanes for features, research, maintenance, incidents, and content) entirely inside your own repo, with all state as git-versioned files. Includes `workflow-sweep`, which audits the state every board derives from and separates real defects from work you simply have not done. `create-pmos workspace` also installs + launches the local Terminal Workspace GUI. No database, no network, no telemetry.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
],
|
|
35
35
|
"pmosChanges": [
|
|
36
36
|
{
|
|
37
|
-
"v": "0.
|
|
38
|
-
"at": "2026-11-22T14:19
|
|
37
|
+
"v": "0.712.0",
|
|
38
|
+
"at": "2026-11-22T14:42:19.445Z",
|
|
39
39
|
"f": 4,
|
|
40
40
|
"prs": [
|
|
41
41
|
{
|
|
@@ -43,6 +43,12 @@
|
|
|
43
43
|
"t": "Phone Today opens first, Ask PMOS by work, and Work on the phone (job #1540)",
|
|
44
44
|
"s": "Phone Today opens first, Ask PMOS by work, and Work on the phone (job #1540)",
|
|
45
45
|
"k": "new"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"n": 1556,
|
|
49
|
+
"t": "Phone follow-up — tap for why and Undo on proposals, Work tab names, task without cards (job 1540)",
|
|
50
|
+
"s": "Phone follow-up — tap for why and Undo on proposals, Work tab names, task without cards (job 1540)",
|
|
51
|
+
"k": "new"
|
|
46
52
|
}
|
|
47
53
|
]
|
|
48
54
|
},
|
package/payload/KIT-VERSION
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Reference
|
|
3
3
|
title: "Eval calibration log"
|
|
4
4
|
description: "Append-only record of every PM override of an evaluator verdict."
|
|
5
|
-
generated: {by: process:create-pmos, at: "2026-11-22T14:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-22T14:42:15Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Reference
|
|
3
3
|
title: "Health budgets"
|
|
4
4
|
description: "Closed registry of health-budget anchors (D59), edited only by the PM."
|
|
5
|
-
generated: {by: process:create-pmos, at: "2026-11-22T14:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-22T14:42:15Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Reference
|
|
3
3
|
title: "Discoveries and friction log"
|
|
4
4
|
description: "Append-only record of what runs discovered and where the process rubbed."
|
|
5
|
-
generated: {by: process:create-pmos, at: "2026-11-22T14:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-22T14:42:15Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
package/workspace/changelog.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[
|
|
2
2
|
{
|
|
3
|
-
"v": "0.
|
|
4
|
-
"at": "2026-11-22T14:19
|
|
3
|
+
"v": "0.712.0",
|
|
4
|
+
"at": "2026-11-22T14:42:19.445Z",
|
|
5
5
|
"f": 4,
|
|
6
6
|
"prs": [
|
|
7
7
|
{
|
|
@@ -9,6 +9,12 @@
|
|
|
9
9
|
"t": "Phone Today opens first, Ask PMOS by work, and Work on the phone (job #1540)",
|
|
10
10
|
"s": "Phone Today opens first, Ask PMOS by work, and Work on the phone (job #1540)",
|
|
11
11
|
"k": "new"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"n": 1556,
|
|
15
|
+
"t": "Phone follow-up — tap for why and Undo on proposals, Work tab names, task without cards (job 1540)",
|
|
16
|
+
"s": "Phone follow-up — tap for why and Undo on proposals, Work tab names, task without cards (job 1540)",
|
|
17
|
+
"k": "new"
|
|
12
18
|
}
|
|
13
19
|
]
|
|
14
20
|
},
|
|
@@ -272,9 +272,9 @@ A phone has its own layout. It is not the computer's page made smaller. There is
|
|
|
272
272
|
|
|
273
273
|
- **⋯** is at the top right of every screen. It opens **Waiting on you** with a count (only when something waits), **Live now** (only while something runs), **Today**, **Work**, **Ask PMOS** and **Settings**. A blue dot on ⋯ means that something waits on you. When an item is open, its own menu items are at the top of the same menu.
|
|
274
274
|
- **Today** opens first. **Where it stands** says what leads today and why, and which dates are late. Under it is at most one ✦ proposal. Press it to read what changes and why, then press ✓ or ✕. The log has the **All** filter: Reply, Do, Decide or Send. A row has two lines: the title, then the job, the work and how late it is. A dot is before each row: red when it is late, blue for today, grey for Can wait. When PMOS has a fix for a row, the fix is under it with ✦. Swipe a row to the right to do, accept or send it, and to the left to drop it or put it off. Each swipe shows **Undo**. **Can wait** is one folded line. The box at the bottom logs a task, an event or a note; where the browser can listen, the microphone writes what you say into the box. After a recording, the first line says where PMOS filed it, with **Undo**.
|
|
275
|
-
- **Work** is the list of initiatives: the product, search and filter, **Initiatives** and **
|
|
276
|
-
- **An initiative** opens full screen: **Where it stands** with one ✦ proposal and the next 3 dates, the **Stages** as one strip with the stage now marked, the **Work breakdown** of the stage now (a red dot when late, blue in progress, an empty ring to do, a tick when done, the Jira key, subtasks under their task), one line that opens the other stages, **The case**, and **Artefacts**. There is no timeline on a phone. Swipe a ✦ line to the right to say yes and to the left to say no; press it to read why. A task, a milestone or an artefact opens full screen with ← back to the initiative. The box at the bottom asks PMOS about this work.
|
|
277
|
-
- **Ask PMOS** lists your chats grouped by the work they are about, with its product. "Not in a work yet" is last. A blue dot after the time marks a chat that waits for you. Write in the box at the bottom to start a new chat. In a chat, when PMOS asks before it changes or sends something, the ask is a blue-lined line: swipe it to the right to allow it, and to the left to say no.
|
|
275
|
+
- **Work** is the list of initiatives: the product, search and filter, the tabs **Initiatives**, **Backlog** with its count (for example **Backlog 14**) and **Sprint**, a short **Where it stands**, and the groups At risk or late, On track and No signal. A row shows its stage, its next milestone and how many milestones are late. A Project also shows its end date.
|
|
276
|
+
- **An initiative** opens full screen: **Where it stands** with one ✦ proposal and the next 3 dates, the **Stages** as one strip with the stage now marked, the **Work breakdown** of the stage now (a red dot when late, blue in progress, an empty ring to do, a tick when done, the Jira key, subtasks under their task), one line that opens the other stages, **The case**, and **Artefacts**. There is no timeline on a phone. Swipe a ✦ line to the right to say yes and to the left to say no; press it to read why. A task, a milestone or an artefact opens full screen with ← back to the initiative, as one page with no boxes. The box at the bottom asks PMOS about this work.
|
|
277
|
+
- **Ask PMOS** lists your chats grouped by the work they are about, with its product. "Not in a work yet" is last. A blue dot after the time marks a chat that waits for you. Write in the box at the bottom to start a new chat. In a chat, when PMOS asks before it changes or sends something, the ask is a blue-lined line: swipe it to the right to allow it, and to the left to say no. Press **Why** under it to read why PMOS asks. After you allow a change, a line says **Done** with what changed and **Undo**, until you write again.
|
|
278
278
|
- **Settings** has the theme (Light, Dark or Auto) and the version with **Check update**. Connectors, workspaces and updates are on your computer.
|
|
279
279
|
- **Recording** shows the red dot, the time, the meeting's name and a small red stop at the top. Under it: the shared screen cut to the slide, with the slides (only while a screen is shared); **So far**, newest first, each point with its time; and **PMOS proposes**, the line to tell the call. Swipe it to the right to copy it, and to the left to put it away. When you stop, Today opens.
|
|
280
280
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmos-workspace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.712.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pmos-workspace",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.712.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@anthropic-ai/sdk": "^1.3.0",
|
package/workspace/package.json
CHANGED
|
@@ -8,7 +8,7 @@ body.bd-page.bk-on .bd-hd .bd-tools { margin-left: auto; }
|
|
|
8
8
|
.bk-sw { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--radius-pill); background: var(--cz-well); margin-left: var(--space-12); flex: none; }
|
|
9
9
|
.bk-sw button { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 14px; border-radius: var(--radius-pill); font-size: var(--fs-row); font-weight: var(--fw-regular); color: var(--cz-ink2); }
|
|
10
10
|
.bk-sw button.on { background: var(--cz-card); color: var(--cz-ink); font-weight: var(--fw-strong); box-shadow: 0 1px 3px rgba(30, 34, 42, .12); }
|
|
11
|
-
.bk-sw .k { font-weight: var(--fw-regular); color: var(--cz-ink3); }
|
|
11
|
+
.bk-sw .k, .bk-sw .bk-swn { font-weight: var(--fw-regular); color: var(--cz-ink3); }
|
|
12
12
|
.bk-sw button:focus-visible, .bk-chip:focus-visible, .bk-gt:focus-visible, .bk-t:focus-visible, .bk-ib:focus-visible, .bk-rvb:focus-visible, .bk-yes:focus-visible, .bk-lnk:focus-visible, .bk-ck:focus-visible, .bk-bar button:focus-visible, .bk-pop button:focus-visible, .bk-go:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2px; }
|
|
13
13
|
|
|
14
14
|
.bk-host { max-width: 1272px; padding-bottom: 96px; }
|
|
@@ -111,11 +111,17 @@ export async function load() {
|
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
/* ── the switch in Work's header ──────────────────────────────────────────────────────────────────────────────── */
|
|
114
|
+
/** Work's three tab names: a desk says "This sprint" and no count; a phone says "Backlog 14" and "Sprint" (PhoneWorkDS, job 1540).
|
|
115
|
+
* Zero is silence: no count when the Backlog is empty or not read yet. */
|
|
116
|
+
export const tabNames = (phone, n) => [['ini', 'Initiatives'], ['bk', 'Backlog' + (phone && n > 0 ? ` <span class="bk-swn">${Number(n)}</span>` : '')], ['sp', phone ? 'Sprint' : 'This sprint']];
|
|
117
|
+
const phoneNow = () => typeof matchMedia === 'function' && matchMedia('(max-width: 760px)').matches;
|
|
114
118
|
function drawSwitch() {
|
|
115
119
|
if (!sw) return;
|
|
116
120
|
const t = tabOf(), tb = (k, n) => `<button type="button" role="tab" aria-selected="${t === k}" class="pm-tab${t === k ? ' on' : ''}" data-bksw="${k}">${n}</button>`;
|
|
117
|
-
// one Tabs part for the three (WorkDS); no count on a tab: Where it stands says what matters (say it once)
|
|
118
|
-
|
|
121
|
+
// one Tabs part for the three (WorkDS); no count on a desk tab: Where it stands says what matters (say it once).
|
|
122
|
+
// A phone (PhoneWorkDS, job 1540) has no Where it stands over the Backlog, so its tab carries the count, and the short name "Sprint"
|
|
123
|
+
const ph = phoneNow();
|
|
124
|
+
sw.innerHTML = tabNames(ph, ph && DATA ? backlogOf().length : 0).map(([k, n]) => tb(k, n)).join('');
|
|
119
125
|
}
|
|
120
126
|
function apply() {
|
|
121
127
|
const bk = on();
|
|
@@ -700,7 +706,7 @@ export function sync(api) {
|
|
|
700
706
|
sw = document.createElement('span'); sw.className = 'bk-sw pm-tabs'; sw.setAttribute('role', 'tablist'); sw.setAttribute('aria-label', 'Work'); // the system's Tabs (design-system ui/components/Tabs)
|
|
701
707
|
// on a desk the switch sits in the toolbar after the product picker; on a phone the toolbar is full, so it takes its own line above the list
|
|
702
708
|
const PH = matchMedia('(max-width: 760px)');
|
|
703
|
-
const place = () => { if (PH.matches) ib.insertAdjacentElement('beforebegin', sw); else (crumb.closest('.wk-path') || crumb).insertAdjacentElement('afterend', sw); sw.classList.toggle('bk-sw-row', PH.matches); };
|
|
709
|
+
const place = () => { if (PH.matches) ib.insertAdjacentElement('beforebegin', sw); else (crumb.closest('.wk-path') || crumb).insertAdjacentElement('afterend', sw); sw.classList.toggle('bk-sw-row', PH.matches); drawSwitch(); };
|
|
704
710
|
place(); PH.addEventListener('change', place);
|
|
705
711
|
sw.addEventListener('click', (e) => { const b = e.target.closest('[data-bksw]'); if (b) setOn(b.dataset.bksw); });
|
|
706
712
|
host = document.createElement('div'); host.id = 'bkBody'; host.className = 'bk-host'; host.hidden = true;
|
|
@@ -271,6 +271,13 @@ body.cz-home { min-height: 100vh; overflow: hidden; }
|
|
|
271
271
|
.hm-askk s { color: var(--cz-ink3); }
|
|
272
272
|
/* PhoneTodayDS (job 1540): on a phone a live Allow · No ask is a blue-lined line that swipes; its icon answers stay for the keyboard */
|
|
273
273
|
.hm-swh { display: none; }
|
|
274
|
+
/* tap for why and Done · Undo after an allowed change (PhoneTodayDS, job 1540) */
|
|
275
|
+
.hm-why { margin: var(--space-4) 0 0; font-size: var(--fs-meta); line-height: var(--lh-meta); color: var(--cz-ink2); }
|
|
276
|
+
.hm-why summary { cursor: pointer; color: var(--cz-blueink); width: max-content; }
|
|
277
|
+
.hm-why summary:focus-visible, .hm-undo:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2px; }
|
|
278
|
+
.hm-why p { margin: var(--space-4) 0 0; }
|
|
279
|
+
.hm-done { margin: var(--space-8) 0; font-size: var(--fs-row); color: var(--cz-ink); }
|
|
280
|
+
.hm-undo { all: unset; cursor: pointer; color: var(--cz-blueink); text-decoration: underline; }
|
|
274
281
|
@media (max-width: 760px) {
|
|
275
282
|
.hm-askk[data-sw-right] { background: none; box-shadow: inset 2px 0 0 var(--cz-blue); border-radius: 0; padding: var(--space-4) 0 var(--space-4) var(--space-16); touch-action: pan-y; }
|
|
276
283
|
.hm-askk[data-sw-right] .q { color: var(--cz-blueink); }
|
|
@@ -77,4 +77,11 @@ button.ctp-cr:hover { text-decoration: underline; }
|
|
|
77
77
|
@media (max-width: 760px) {
|
|
78
78
|
.ctp.ctp-full, .ctp.ctp-full.ctp-solo { left: 0; top: 0; right: 0; bottom: 0; width: auto; height: auto; max-width: none; border-radius: 0; box-shadow: none; padding: calc(env(safe-area-inset-top, 0px) + var(--space-12)) var(--space-16) calc(env(safe-area-inset-bottom, 0px) + var(--space-24)); overflow: auto; }
|
|
79
79
|
.ctp-full .ctp-hx { max-width: none; }
|
|
80
|
+
/* no cards on a phone (PhoneWorkDS, job 1540): the task reads as one page, its parts split by a hair line, not boxed */
|
|
81
|
+
.ctp-full .ctp-path > :not(:last-child) { display: none; }
|
|
82
|
+
.ctp-full .pm-block { background: none; border: 0; box-shadow: none; border-radius: 0; padding: var(--space-16) 0; border-top: 1px solid var(--cz-hair); }
|
|
83
|
+
.ctp-full .tkc-f { background: none; box-shadow: none; border-radius: 0; padding-left: 0; padding-right: 0; }
|
|
84
|
+
.ctp-full .ovw.tk-ini { background: none; padding-left: 0; padding-right: 0; border-radius: 0; }
|
|
85
|
+
.ctp-full .pm-block.list .head, .ctp-full .pm-block.list .pm-li { padding-left: 0; padding-right: 0; }
|
|
86
|
+
.ctp-full .ctp-b { padding: 0; }
|
|
80
87
|
}
|
|
@@ -57,7 +57,11 @@ export function permissionAsk(conv) {
|
|
|
57
57
|
const more = opts.filter((o) => o !== allow && o !== deny);
|
|
58
58
|
const send = !!ch && OUTSIDE.test(ch.system || '') && WRITE.test(ch.tool || '');
|
|
59
59
|
const verb = ch && ch.tool && !/^mcp__/.test(ch.tool) ? ch.tool + ' ' : '';
|
|
60
|
+
// tap for why (PhoneTodayDS, job 1540): PMOS's own words just before it asked, so the PM need not scroll up to see the reason
|
|
61
|
+
const said = (Array.isArray(c.messages) ? c.messages : []).filter((m) => m.role === 'assistant').pop();
|
|
62
|
+
const why = said ? clip(splitAsk(said.text).text, 300) : '';
|
|
60
63
|
return {
|
|
64
|
+
why,
|
|
61
65
|
kind: send ? 'send' : 'file',
|
|
62
66
|
label: send ? 'Asks before it sends to ' + ch.system : 'Asks before it goes on',
|
|
63
67
|
title: ch ? (send ? ch.what : verb + ch.what) : c.ask.question,
|
|
@@ -118,7 +122,8 @@ export function askCardHtml(a, { live = true, role = 'PMOS' } = {}) {
|
|
|
118
122
|
const yes = a.answers.find((x) => x.icon === 'yes'), no = a.answers.find((x) => x.icon === 'no');
|
|
119
123
|
const sw = live && yes && no ? ` data-sw-right="yes" data-sw-left="no"` : '';
|
|
120
124
|
const hint = sw ? `<p class="hm-swh">${esc('Swipe right: ' + yes.label + ' · left: ' + no.label)}</p>` : '';
|
|
121
|
-
|
|
125
|
+
const why = live && a.why && a.why !== a.title ? `<details class="hm-why"><summary>Why</summary><p>${esc(a.why)}</p></details>` : '';
|
|
126
|
+
return `<div class="hm-askw" role="group" aria-label="${esc(role)} asks before it goes on"><div class="hm-askk" data-ask-kind="${a.kind}"${sw}><p class="k">${esc(a.label)}</p><b class="q">${esc(a.title)}</b>${ft}${hint}${why}`
|
|
122
127
|
+ `<div class="acts">${a.answers.map((x) => iconBtn({ ...x, off: !live, sw: x === yes ? 'yes' : x === no ? 'no' : '' })).join('')}${more}</div></div></div>`;
|
|
123
128
|
}
|
|
124
129
|
|
|
@@ -137,3 +142,16 @@ export function openAsk(conv) {
|
|
|
137
142
|
}
|
|
138
143
|
return false;
|
|
139
144
|
}
|
|
145
|
+
|
|
146
|
+
/** What a change PMOS was allowed to make says after it, with one Undo (PhoneTodayDS, job 1540: "Done: COM-412 is due 27 Nov. Undo").
|
|
147
|
+
* a = the card the PM answered (permissionAsk). Undo asks PMOS in words to put it back; a send to another system cannot be taken back
|
|
148
|
+
* by PMOS alone, so its Undo asks PMOS to undo it there and say what it could not. null when the card held no change. */
|
|
149
|
+
export function doneLine(a) {
|
|
150
|
+
if (!a || !a.title || (a.kind !== 'file' && a.kind !== 'send')) return null;
|
|
151
|
+
const what = clip(a.title, 160);
|
|
152
|
+
const undo = a.from || a.to
|
|
153
|
+
? `Undo that change: put back "${clip(a.from, 200)}" in place of "${clip(a.to, 200)}" (${what}).`
|
|
154
|
+
: `Undo that change: ${what}.`;
|
|
155
|
+
return { text: what, undo };
|
|
156
|
+
}
|
|
157
|
+
export const doneLineHtml = (d) => d ? `<p class="hm-done" role="status">Done: ${esc(d.text)}. <button type="button" class="hm-undo" data-chat-say="${esc(d.undo)}">Undo</button></p>` : '';
|
|
@@ -31,7 +31,7 @@ import { splitReport, reportChipHtml, blockSig } from './report-chat.js';
|
|
|
31
31
|
import { turnsOf } from './chat-context.js';
|
|
32
32
|
import { askCardHtml, answerText } from './chat-ask.js';
|
|
33
33
|
import { wireSwipe } from './cozy-phone-swipe.js'; // a phone: the ask card swipes (PhoneTodayDS, job #1540)
|
|
34
|
-
import { permissionAsk, splitAsk, blockAsk, iconBtn, openAsk, askCardHtml as kindCardHtml } from './home-ask.js';
|
|
34
|
+
import { permissionAsk, splitAsk, blockAsk, iconBtn, openAsk, askCardHtml as kindCardHtml, doneLine, doneLineHtml } from './home-ask.js';
|
|
35
35
|
import { splitChase, runStop, sweepLine, stopText } from './home-sweep.js';
|
|
36
36
|
import { splitSrc, srcHtml } from './chat-src.js'; // chief-of-staff C1: where each answer came from
|
|
37
37
|
import { splitFiles, filesHtml, sizeText, MAX_BYTES, MAX_FILES, setAttachSink } from './premium-attach.js';
|
|
@@ -215,6 +215,15 @@ export function mountChat(el, host) {
|
|
|
215
215
|
const a = permissionAsk(C.conv);
|
|
216
216
|
return a ? kindCardHtml(a, { role: R.role.name }) : '';
|
|
217
217
|
}
|
|
218
|
+
/** The last allowed change: "Done: … Undo", kept until the PM writes again (a new PM turn, or the next ask, takes its place). */
|
|
219
|
+
function doneHtml() {
|
|
220
|
+
if (!C.done) return '';
|
|
221
|
+
const users = ((C.conv && C.conv.messages) || []).filter((m) => m.role === 'user').length;
|
|
222
|
+
const ask = C.conv && C.conv.ask;
|
|
223
|
+
if (users > C.done.n || (ask && ask.question !== C.done.q)) { C.done = null; return ''; }
|
|
224
|
+
if (ask) return ''; // the answered prompt is still on screen until the next read
|
|
225
|
+
return doneLineHtml(C.done);
|
|
226
|
+
}
|
|
218
227
|
function queuedHtml() {
|
|
219
228
|
const q = host.queued ? host.queued(sid()) : [];
|
|
220
229
|
// as typed: PMOS wraps a report ask or a /goal in its rule, adds the files line, and a live session joins the lines (batch 22 item 10:
|
|
@@ -290,7 +299,7 @@ export function mountChat(el, host) {
|
|
|
290
299
|
const goal = C.th && C.th.goal;
|
|
291
300
|
const parts = items.map((it, i) => msgHtml(it, i, R));
|
|
292
301
|
placeDivider(parts, items, goal);
|
|
293
|
-
let html = (t.intro && !(t.intro.onlyEmpty && items.length) ? introHtml(t.intro, !items.length) : '') + parts.join('') + askHtml(R) + (R.stop && R.lastAgent < 0 ? dividerHtml(R.stop) : '') + pendHtml() + queuedHtml();
|
|
302
|
+
let html = (t.intro && !(t.intro.onlyEmpty && items.length) ? introHtml(t.intro, !items.length) : '') + parts.join('') + askHtml(R) + doneHtml() + (R.stop && R.lastAgent < 0 ? dividerHtml(R.stop) : '') + pendHtml() + queuedHtml();
|
|
294
303
|
html += GU.choiceHtml(); // /goal while a goal works here: In a new chat, or Here instead
|
|
295
304
|
for (const n of C.notes || []) if (t.ini && n.ini === t.ini) html += `<p class="hm-note hm-you">${esc(n.text)}</p>`;
|
|
296
305
|
if (C.th && C.th.working) html += `<p class="hm-note" role="status">The agent is answering. You can write again when it has.</p>`;
|
|
@@ -627,7 +636,11 @@ export function mountChat(el, host) {
|
|
|
627
636
|
if ('hmRetry' in d) { const u = ((C.conv && C.conv.messages) || []).filter((m) => m.role === 'user').pop(); if (u) send(u.text); return; }
|
|
628
637
|
if (d.hmWi) { const it = C.items[+d.hmWi]; if (it) host.workItem(it.text, C.t); return; }
|
|
629
638
|
if (d.hmPill) { const p = C.t.intro.pills[+d.hmPill]; if (p && p.go) { b.disabled = true; await p.go(b); b.disabled = false; } return; }
|
|
630
|
-
if (d.hmPress) {
|
|
639
|
+
if (d.hmPress) {
|
|
640
|
+
// an allowed change says Done with one Undo under the chat until the PM writes again (PhoneTodayDS, job 1540)
|
|
641
|
+
if ('swYes' in d) { const dl = doneLine(permissionAsk(C.conv)); C.done = dl ? { ...dl, q: C.conv && C.conv.ask ? C.conv.ask.question : '', n: ((C.conv && C.conv.messages) || []).filter((m) => m.role === 'user').length } : null; }
|
|
642
|
+
b.disabled = true; press(d.hmPress); return;
|
|
643
|
+
}
|
|
631
644
|
if ('hmPmore' in d) { const m = b.nextElementSibling; m.hidden = !m.hidden; return; }
|
|
632
645
|
if ('hmTerm' in d) { host.openTerminal(sid()); return; }
|
|
633
646
|
if ('hmCopyterm' in d) { const cmd = C.th && C.th.resume; try { await navigator.clipboard.writeText(cmd); host.toast('Copied. Paste it in Terminal on the computer PMOS runs on.'); } catch { host.toast('Copy did not work here. The command: ' + cmd); } return; }
|