create-pmos 0.278.0 → 0.279.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 +1 -1
- 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/briefing-premium-test.js +16 -1
- package/workspace/guide/briefing-premium.md +1 -1
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/public/pm/premium-shell.js +14 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.279.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": {
|
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-10-18T18:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-18T18:35:33Z"}
|
|
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-10-18T18:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-18T18:35:33Z"}
|
|
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-10-18T18:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-18T18:35:33Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -150,8 +150,23 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
|
|
|
150
150
|
ok('X8 the list re-reads and drops it, and the badge follows', !!(await until(() => p.evaluate(() => document.querySelectorAll('#oMain .ssr').length === 1 && document.querySelector('#sessBdg').textContent === '1'), 8000)));
|
|
151
151
|
const bare = await fetch(BASE + '/api/session/remove', { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ id: 'sess-1' }) });
|
|
152
152
|
ok('X9 Stop is a page press: no nonce, no end (403)', bare.status === 403, String(bare.status));
|
|
153
|
+
/* premium-run-questions: a session whose card is asking shows the agent's own question and its offered options; a press is the one write, /api/runs/answer */
|
|
154
|
+
let asking = true; const answers = [];
|
|
155
|
+
await p.route('**/api/runs', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, cards: asking ? { 'sess-1': { state: 'asking', asked: 'q-7', ask: { id: 'q-7', q: 'Which folder should the brief go in?', options: [{ label: 'planning/briefs', rec: true }, { label: 'planning/research' }] } } } : {} }) }));
|
|
156
|
+
await p.route('**/api/runs/answer', (r) => { answers.push({ ...JSON.parse(r.request().postData()), hasNonce: !!r.request().headers()['x-pmos-nonce'] }); asking = false; r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true }) }); });
|
|
157
|
+
await p.keyboard.press('Escape'); await p.click('#sessBtn');
|
|
158
|
+
const q = await until(() => p.evaluate(() => { const b = document.querySelector('#oMain .ssq'); return b ? b.textContent : ''; }), 8000);
|
|
159
|
+
ok('Q1 a session that is asking shows its question and the options it offered, in its own words', /Which folder should the brief go in\?/.test(q) && /planning\/briefs/.test(q) && /planning\/research/.test(q), q);
|
|
160
|
+
ok('Q2 no question shows on a session that is not asking', (await p.evaluate(() => document.querySelectorAll('#oMain .ssq').length)) === 1);
|
|
161
|
+
await p.click('#oMain [data-ans="sess-1"][data-opt="planning/research"]');
|
|
162
|
+
await until(() => answers.length, 6000);
|
|
163
|
+
ok('Q3 a press sends the chosen option to /api/runs/answer with the run, the request id and the page nonce', answers.length === 1 && answers[0].run === 'sess-1' && answers[0].request === 'q-7' && answers[0].behavior === 'answer' && answers[0].message === 'planning/research' && answers[0].hasNonce, JSON.stringify(answers));
|
|
164
|
+
ok('Q4 the question leaves the row once answered, and the toast says so', !!(await until(() => p.evaluate(() => !document.querySelector('#oMain .ssq') && /Answered/.test(document.querySelector('#toast').textContent)), 6000)));
|
|
165
|
+
const bareAns = await fetch(BASE + '/api/runs/answer', { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ run: 'sess-1', request: 'q-7', behavior: 'answer', message: 'planning/research' }) });
|
|
166
|
+
ok('Q5 answering is a page press: no nonce, no answer (403)', bareAns.status === 403, String(bareAns.status));
|
|
167
|
+
await p.unroute('**/api/runs'); await p.unroute('**/api/runs/answer');
|
|
153
168
|
await p.keyboard.press('Escape'); await p.unroute('**/api/sessions'); await p.unroute('**/api/session/remove');
|
|
154
|
-
for (let i = A.reqs.length - 1; i >= 0; i--) if (/^POST \/api\/session\/remove$/.test(A.reqs[i])) A.reqs.splice(i, 1); }
|
|
169
|
+
for (let i = A.reqs.length - 1; i >= 0; i--) if (/^POST \/api\/(session\/remove|runs\/answer)$/.test(A.reqs[i])) A.reqs.splice(i, 1); }
|
|
155
170
|
|
|
156
171
|
/* R2 */
|
|
157
172
|
const hero = await p.evaluate(() => ({ text: document.querySelector('#brief').textContent, k: [...document.querySelectorAll('#brief .k')].map((x) => x.textContent) }));
|
|
@@ -15,7 +15,7 @@ Every premium page has an **Open the console** button beside the theme button. I
|
|
|
15
15
|
|
|
16
16
|
Every premium page also has a **Search** button and a bell. Ctrl K (or `/`) opens the search over places, initiatives, documents and your running sessions; Enter opens the result. The bell counts the same things the Briefing lists under what you need to do, and a press opens the Briefing. Both only read; neither changes a record. Every premium page has a **Settings** button beside it. It opens one dialog with two sections. **Workspaces** lists the repositories PMOS works in, with Add (a folder path) and Remove; Remove forgets the address and never deletes the folder, and a refusal shows the server's reason. **Connectors** has an On/Off switch for each source the Briefing reads. Each press saves that one record. Every other setting runs on a default and stays in the console; the dialog links to it. Remove needs the page's launch nonce, so an agent session cannot call it.
|
|
17
17
|
|
|
18
|
-
Every premium page has an **Agent sessions** button beside the console button, with a count of the sessions running. It opens a dialog that lists each running session and background run with its note, state and start time. **Stop** asks first and says what it ends, then ends the session and closes its terminal. If the session has not exited yet, the row says so and offers Stop again.
|
|
18
|
+
Every premium page has an **Agent sessions** button beside the console button, with a count of the sessions running. It opens a dialog that lists each running session and background run with its note, state and start time. **Stop** asks first and says what it ends, then ends the session and closes its terminal. If the session has not exited yet, the row says so and offers Stop again. When a session has asked a question, its row shows the question in the agent's own words with the options it offered; a press sends that option as your answer, and the question leaves the row. A permission request ("Wants to run"), terminals and new sessions stay in the console; the dialog links to it. Answering needs the page's launch nonce, so an agent session cannot call it.
|
|
19
19
|
|
|
20
20
|
## Products
|
|
21
21
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmos-workspace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.279.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.279.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@xterm/addon-fit": "^0.11.0",
|
package/workspace/package.json
CHANGED
|
@@ -402,6 +402,8 @@ export async function openSettings() {
|
|
|
402
402
|
* session and a run's questions stay in the console. Every word on a row is a field of the session record. */
|
|
403
403
|
const sessLive = (s) => s && s.shown !== 'exited';
|
|
404
404
|
const readSessions = async () => { const r = await pmGet('/api/sessions'); return r && Array.isArray(r.sessions) ? r.sessions.filter(sessLive) : null; };
|
|
405
|
+
// The cards the console's run card reads (GET /api/runs): a session whose card is asking carries the agent's own question and the options it offered.
|
|
406
|
+
const readAsks = async () => { const r = await pmGet('/api/runs'); const out = {}; if (r && r.ok && r.cards) for (const [id, c] of Object.entries(r.cards)) if (c && c.state === 'asking' && c.ask && c.ask.q && Array.isArray(c.ask.options) && c.ask.options.length) out[id] = { request: c.asked || c.ask.id, q: c.ask.q, options: c.ask.options }; return out; };
|
|
405
407
|
const sessAgo = (t) => { const ms = Date.now() - new Date(t).getTime(); if (!(ms >= 0)) return ''; const m = Math.max(1, Math.round(ms / 60000)); return 'Started ' + (m < 60 ? m + ' min ago' : Math.floor(m / 60) + ' h ' + (m % 60) + ' min ago'); };
|
|
406
408
|
function sessBadge(n) { const b = $('#sessBdg'); if (!b) return; b.textContent = String(n || ''); b.hidden = !n; const a = $('#sessBtn'); if (a) a.setAttribute('aria-label', 'Agent sessions, ' + (n ? n + ' running' : 'none running')); }
|
|
407
409
|
{
|
|
@@ -413,7 +415,7 @@ function sessBadge(n) { const b = $('#sessBdg'); if (!b) return; b.textContent =
|
|
|
413
415
|
}
|
|
414
416
|
}
|
|
415
417
|
export async function openSessions() {
|
|
416
|
-
const M = { list: null, ask: null, busy: null, slow: null, done: null, err: '' };
|
|
418
|
+
const M = { list: null, ask: null, busy: null, slow: null, done: null, err: '', asks: {}, ans: null };
|
|
417
419
|
const draw = () => {
|
|
418
420
|
const l = M.list, n = l ? l.length : 0;
|
|
419
421
|
$('#dTitle').textContent = l === null ? 'Agent sessions' : n ? n + ' running' : 'None running';
|
|
@@ -425,19 +427,28 @@ export async function openSessions() {
|
|
|
425
427
|
<div class="ssb"><h3>${esc(x.name)}</h3><p class="ssn">${esc(x.note || 'No note')}</p>
|
|
426
428
|
<p class="ssm">${[x.headless ? 'Background run' : '', x.agent, x.label, x.cwd, sessAgo(x.created), x.automatic ? 'Started by PMOS' : ''].filter(Boolean).map((t) => `<span>${esc(t)}</span>`).join('')}</p></div>
|
|
427
429
|
<button type="button" class="cta alt" data-stop="${esc(x.id)}" aria-label="Stop ${esc(x.name)}"${ask || busy || slow ? ' disabled' : ''}>${busy ? 'Ending…' : 'Stop'}</button>
|
|
430
|
+
${M.asks[x.id] ? `<div class="ssc ssq" role="group" aria-label="${esc(x.name)} asks"><p><b>${esc(M.asks[x.id].q)}</b></p><div class="ssx">${M.asks[x.id].options.map((o) => `<button type="button" class="cta${o.rec ? '' : ' alt'}" data-ans="${esc(x.id)}" data-opt="${esc(o.label)}"${M.ans ? ' disabled' : ''}>${esc(o.label)}</button>`).join('')}</div></div>` : ''}
|
|
428
431
|
${ask && !busy ? `<div class="ssc" role="group" aria-label="Confirm stop"><p><b>Stop “${esc(x.name)}”?</b> ${what} Files it already wrote stay where they are.</p><div class="ssx"><button type="button" class="cta bad" data-yes="${esc(x.id)}">Stop</button><button type="button" class="cta alt" data-no="${esc(x.id)}">Keep running</button></div></div>` : ''}
|
|
429
432
|
${slow ? `<div class="ssc" role="group" aria-label="Still running"><p><b>Asked “${esc(x.name)}” to end.</b> It has not exited yet. Press Stop again to remove it.</p><div class="ssx"><button type="button" class="cta bad" data-yes="${esc(x.id)}">Stop again</button><button type="button" class="cta alt" data-no="${esc(x.id)}">Keep running</button></div></div>` : ''}</li>`;
|
|
430
433
|
}).join('')}</ul>` : '<div class="sse"><b>No agent sessions running.</b><p>New sessions start in the console.</p></div>';
|
|
431
434
|
$('#oMain').innerHTML = `<article class="paper doc"><div class="addf">${rows}
|
|
432
435
|
<p class="note" id="ssM" role="status" style="margin:0;min-height:1.2em">${esc(M.err)}</p>
|
|
433
|
-
<p class="note" style="margin:0">Terminals
|
|
436
|
+
<p class="note" style="margin:0">Terminals and new sessions stay in the console. <a href="/console.html">Open the console</a>.</p></div></article>`;
|
|
434
437
|
};
|
|
435
438
|
openDlg({ eye: 'Agent sessions · real data', title: 'Agent sessions', say: 'The sessions running now. Stop ends one.', stream: turnA(ptx('The sessions running now, read from the same list the console shows. Stop ends one and says so.')), noteKey: null, pane: '<article class="paper doc"></article>', label: 'Sessions' });
|
|
436
439
|
$('#askF').hidden = true; setMode('detail'); draw();
|
|
437
|
-
const load = async () => { M.list = await readSessions(); if (M.list === null) { M.list = []; M.err = 'The sessions could not be read.'; } else sessBadge(M.list.length); draw(); };
|
|
440
|
+
const load = async () => { M.list = await readSessions(); M.asks = M.list ? await readAsks() : {}; if (M.list === null) { M.list = []; M.err = 'The sessions could not be read.'; } else sessBadge(M.list.length); draw(); };
|
|
438
441
|
const focusNext = () => { const b = $('#oMain [data-stop]:not([disabled])') || $('#dTitle'); if (b) b.focus(); };
|
|
439
442
|
$('#oMain').onclick = async (e) => {
|
|
440
443
|
if (M.busy) return;
|
|
444
|
+
const an = e.target.closest('[data-ans]');
|
|
445
|
+
if (an) {
|
|
446
|
+
const id = an.dataset.ans, a = M.asks[id]; if (!a) return;
|
|
447
|
+
M.ans = id; M.err = ''; draw();
|
|
448
|
+
const r = await pmPost('/api/runs/answer', { run: id, request: a.request, behavior: 'answer', message: an.dataset.opt }); M.ans = null;
|
|
449
|
+
if (r && r.ok) { toast('Answered. The agent continues with your choice.'); delete M.asks[id]; } else M.err = (r && (r.error || r.reason)) || 'Not answered.';
|
|
450
|
+
draw(); return;
|
|
451
|
+
}
|
|
441
452
|
const st = e.target.closest('[data-stop]'), yes = e.target.closest('[data-yes]'), no = e.target.closest('[data-no]');
|
|
442
453
|
M.err = '';
|
|
443
454
|
if (st) { M.ask = st.dataset.stop; M.slow = null; draw(); const k = $(`#oMain [data-no="${M.ask}"]`); if (k) k.focus(); }
|