create-pmos 0.344.0 → 0.346.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-pmos",
3
- "version": "0.344.0",
3
+ "version": "0.346.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": {
@@ -32,6 +32,35 @@
32
32
  "audit"
33
33
  ],
34
34
  "pmosChanges": [
35
+ {
36
+ "v": "0.346.0",
37
+ "at": "2026-10-20T05:59:24.111Z",
38
+ "f": 2,
39
+ "prs": [
40
+ {
41
+ "n": 942,
42
+ "t": "Artifact, Google Doc and Confluence links in a premium chat panel open beside the conversation",
43
+ "s": "A Google Doc or Confluence link, in Claude's words or in a page the viewer shows, opens as a tab beside the conversation."
44
+ },
45
+ {
46
+ "n": 943,
47
+ "t": "Text fields no longer zoom the premium pages on a phone",
48
+ "s": "On a touch screen every premium text field (input, textarea, select) uses 16 px type, so focus does not zoom the page."
49
+ }
50
+ ]
51
+ },
52
+ {
53
+ "v": "0.345.0",
54
+ "at": "2026-10-20T05:50:20.786Z",
55
+ "f": 2,
56
+ "prs": [
57
+ {
58
+ "n": 941,
59
+ "t": "Agent results wait in the bell, with deep links to each one",
60
+ "s": "The bell is an inbox of what the agent made that waits on the PM."
61
+ }
62
+ ]
63
+ },
35
64
  {
36
65
  "v": "0.344.0",
37
66
  "at": "2026-10-20T05:29:13.194Z",
@@ -262,45 +291,6 @@
262
291
  "s": "Before opens with a \"Prepared for this meeting\" box holding that brief: In short, What matters today (To settle in planning for a planning meeting) with each item's tag and date, Since the last one with its decisions…"
263
292
  }
264
293
  ]
265
- },
266
- {
267
- "v": "0.326.0",
268
- "at": "2026-10-19T22:57:26.019Z",
269
- "f": 2,
270
- "prs": [
271
- {
272
- "n": 908,
273
- "t": "The Jira backlog of a board as a viewer tab",
274
- "s": "Open the backlog appears in the Board's Sprint dialog and on its sprint tab."
275
- },
276
- {
277
- "n": 916,
278
- "t": "Note recording in the premium viewer",
279
- "s": "The Briefing's top bar has Record (an untitled note now) with an arrow listing today's meetings that can still be recorded, and New note."
280
- },
281
- {
282
- "n": 910,
283
- "t": "Hide whole-line HTML comments on the document page; log the S2 run",
284
- "s": "A whole-line HTML comment is kept in the page as a hidden block and is never drawn."
285
- }
286
- ]
287
- },
288
- {
289
- "v": "0.325.0",
290
- "at": "2026-10-19T22:48:34.964Z",
291
- "f": 2,
292
- "prs": [
293
- {
294
- "n": 912,
295
- "t": "An initiative and its tasks open as viewer tabs",
296
- "s": "The Board's initiative dialog (popup mode) and the initiative's own dialog have Open the full record, and a task's dialog has Open the initiative."
297
- },
298
- {
299
- "n": 913,
300
- "t": "Notes list in the premium dialog, a note beside it, one stage interface for the note sheet",
301
- "s": "The Briefing's Calendar card has a Notes button (in the header on a wide screen; under the day on a phone, where the header has no room beside the full-calendar and fold buttons)."
302
- }
303
- ]
304
294
  }
305
295
  ]
306
296
  }
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@9547ca75
1
+ kernel-source: pmos@2d93810f
2
2
  assembled: 2026-10-20
3
3
  mode: vendor
@@ -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-20T05:29:11Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-20T05:59:18Z"}
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-20T05:29:11Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-20T05:59:18Z"}
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-20T05:29:11Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-20T05:59:18Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -60,7 +60,7 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
60
60
 
61
61
  /* The console's Needs you reads (premium-brief.js): off by default, so the page keeps the model's records-only hero and rows, which most of
62
62
  * this suite checks. `console` stubs them: { briefing, page, agent }; the C block checks that path. */
63
- const open = async ({ w = 1280, h = 900, theme = 'light', model = MODEL, ctxOpts = {}, pre = null, console: cn = null } = {}) => {
63
+ const open = async ({ w = 1280, h = 900, theme = 'light', model = MODEL, ctxOpts = {}, pre = null, console: cn = null, inbox = null } = {}) => {
64
64
  const ctx = await browser.newContext({ viewport: { width: w, height: h }, ...ctxOpts });
65
65
  const page = await ctx.newPage();
66
66
  const errors = [], reqs = [];
@@ -70,13 +70,19 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
70
70
  const json = (body) => (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify(body) });
71
71
  if (cn) { await page.route('**/api/brief-page*', json(cn.page)); await page.route('**/api/briefing', json(cn.briefing)); await page.route('**/api/needs?*', json({ needs: cn.agent || [] })); }
72
72
  if (cn && cn.props) await page.route('**/api/driver/open*', (r) => { const k = new URL(r.request().url()).searchParams.get('target_kind'); return json({ ok: true, ws: 'w0', mode: 'approve', targets: cn.props[k] || {} })(r); });
73
+ if (inbox) await page.route('**/api/inbox', json(inbox));
73
74
  if (pre) await page.addInitScript(pre);
74
75
  await page.goto(BASE + '/premium.html?theme=' + theme);
75
76
  const up = await until(() => page.evaluate(() => document.querySelectorAll('#rank .rr').length > 0 || !document.querySelector('#calm').hidden), 20000);
76
77
  return { ctx, page, errors, reqs, up };
77
78
  };
78
79
 
79
- const A = await open();
80
+ /* the bell's inbox (premium-agent-inbox): two new agent results and one piece of work still waiting */
81
+ const ibIt = (id, kind, title, open, pws, at) => ({ id, kind, title, open, pws, at, ws: pws, product: 'IDPF', session: kind.startsWith('goal') ? open.slice(4) : 'src:drv:' + pws + ':x', target: kind.startsWith('goal') ? null : { kind: 'initiative', id: 'checkout', title: 'Checkout' }, isNew: true });
82
+ const INBOX = { ok: true, count: 4, newCount: 2, more: 0, oldest: Date.now() - 5 * 86400000, seenAt: null,
83
+ items: [ibIt('prop:w0:p1', 'proposal', 'Problem statement: Checkout drops one in five carts', 'prop:p1', 'w0', Date.now() - 12 * 60000), ibIt('goal:src:this-page', 'goal-done', 'Check the goal Claude finished: Ship it', 'row:goal:src:this-page', '', Date.now() - 60 * 60000)],
84
+ bundles: [{ key: 'w0|initiative|checkout', title: 'Checkout', product: 'IDPF', count: 2, oldest: Date.now() - 5 * 86400000, open: 'target:initiative:checkout', pws: 'w0', sub: '2 proposals' }] };
85
+ const A = await open({ inbox: INBOX });
80
86
  ok('0 the page draws the list', A.up);
81
87
  if (!A.up) return finish(1);
82
88
  const p = A.page;
@@ -97,8 +103,7 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
97
103
  await p.route('**/api/sessions', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ sessions: [{ id: 's1', name: 'Fix the footer', state: 'idle', cwd: '.' }, { id: 's2', name: 'Nightly run', state: 'idle', automatic: true }] }) }));
98
104
  await p.click('#moreBtn');
99
105
  const sb = await until(() => p.evaluate(() => { const s = document.querySelector('#pvSearch'), b = document.querySelector('#pvBell'), g = document.querySelector('#pvBdg'); if (!s || !b || !g || g.hidden) return null; const rs = s.getBoundingClientRect(), rb = b.getBoundingClientRect(); return { sw: Math.round(rs.width), sh: Math.round(rs.height), bw: Math.round(rb.width), bh: Math.round(rb.height), n: g.textContent, lab: b.getAttribute('aria-label') }; }), 8000);
100
- const want = MODEL.list.count;
101
- ok('SB1 the ⋯ menu has Search and the header has the bell, 44 px, and the bell counts what the Briefing lists', sb && sb.sw >= 44 && sb.sh >= 44 && sb.bw >= 44 && sb.bh >= 44 && sb.n === String(want) && sb.lab === 'Needs you: ' + want, JSON.stringify(sb));
106
+ ok('SB1 the ⋯ menu has Search and the header has the bell, 44 px, and the bell counts the agent\'s new results', sb && sb.sw >= 44 && sb.sh >= 44 && sb.bw >= 44 && sb.bh >= 44 && sb.n === '2' && sb.lab === 'Needs you: 2 new from the agent', JSON.stringify(sb));
102
107
  await p.keyboard.press('Escape');
103
108
  await p.keyboard.press('Control+k');
104
109
  const pal = await until(() => p.evaluate(() => { const o = document.querySelector('#pvOv'); return o && !o.hidden && document.activeElement && document.activeElement.id === 'pvQ' ? { rail: document.querySelector('.rail').inert, groups: [...document.querySelectorAll('#pvList .pv-grp')].map((x) => x.textContent) } : null; }), 6000);
@@ -113,10 +118,10 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
113
118
  const closed = await until(() => p.evaluate(() => document.querySelector('#pvOv').hidden && !document.querySelector('.rail').inert && document.activeElement.id === 'moreBtn'), 4000);
114
119
  ok('SB5 Escape closes it and puts the focus back on the ⋯ button', !!closed);
115
120
  await p.click('#pvBell');
116
- const rows = await until(() => p.evaluate(() => { const o = document.querySelector('#pvOv'); return !o.hidden ? document.querySelectorAll('#pvList .pv-row').length : 0; }), 6000);
117
- ok('SB6 the bell lists the Briefing rows and a row opens the Briefing', rows === MODEL.list.rows.length, String(rows));
121
+ const bell = await until(() => p.evaluate(() => { const o = document.querySelector('#pvOv'); return !o.hidden && document.querySelector('#pvList .ib-it') ? { items: document.querySelectorAll('#pvList .ib-it').length, sess: document.querySelectorAll('#pvList .ib-it .cta.alt').length, bun: document.querySelectorAll('#pvList .ib-bun').length, yours: /Your own work/.test(document.querySelector('#pvList').textContent) } : null; }), 6000);
122
+ ok('SB6 the bell lists each new agent result with its action, a Session button for a proposal, a line per piece of work still waiting, and a line for your own work', bell && bell.items === 2 && bell.sess === 1 && bell.bun === 1 && bell.yours, JSON.stringify(bell));
118
123
  await p.keyboard.press('Escape');
119
- ok('SB7 search and the bell only read: no POST left the page', !A.reqs.some((x) => x.startsWith('POST ')));
124
+ ok('SB7 search and the bell only read: the one POST is closing the bell, which marks the new results seen', A.reqs.filter((x) => x.startsWith('POST ')).every((x) => x === 'POST /api/inbox/seen'), A.reqs.filter((x) => x.startsWith('POST ')).join());
120
125
  }
121
126
  /* premium-settings: the dialog holds Workspaces and Connectors only; each press goes to its existing route */
122
127
  { await p.click('#moreBtn'); const bt = await p.evaluate(() => { const b = document.querySelector('#settingsBtn'); if (!b) return null; const r = b.getBoundingClientRect(); return { label: b.textContent.trim(), w: Math.round(r.width), h: Math.round(r.height) }; });
@@ -311,7 +316,7 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
311
316
  await until(() => p.evaluate(() => !document.querySelector('#dlg').classList.contains('on')));
312
317
 
313
318
  /* R10 */
314
- ok('R10 a page where nothing was pressed to record sent only GET requests (the one confirmed Start aside)', A.reqs.every((r) => r.startsWith('GET ') || r === 'POST /api/agent/start'), A.reqs.filter((r) => !r.startsWith('GET ')).join());
319
+ ok('R10 a page where nothing was pressed to record sent only GET requests (the one confirmed Start and closing the bell aside)', A.reqs.every((r) => r.startsWith('GET ') || r === 'POST /api/agent/start' || r === 'POST /api/inbox/seen'), A.reqs.filter((r) => !r.startsWith('GET ')).join());
315
320
  ok('0 no page error', A.errors.length === 0, A.errors.join(' | '));
316
321
 
317
322
  /* slice 2: the buttons that record (initiative briefing-premium-writes). The POST routes are answered by the test, so no real file is written;
@@ -513,15 +518,16 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
513
518
  props: { initiative: { checkout: [{ id: 'p1', what: 'problem', at: '2026-10-19T09:00:00Z', data: { text: 'Checkout drops one in five carts at the address step.' } }, { id: 'p2', what: 'evidence', at: '2026-10-19T09:05:00Z', data: { text: 'Funnel export, 30 days.' } }],
514
519
  search: [{ id: 'p3', what: 'problem', at: '2026-10-19T09:10:00Z', data: { text: 'A draft on another initiative.' } }] } },
515
520
  };
516
- const C = await open({ console: CN });
521
+ const CIB = { ...INBOX, count: 2, newCount: 1, items: [INBOX.items[0]] };
522
+ const C = await open({ console: CN, inbox: CIB });
517
523
  const cp = C.page;
518
- await until(() => cp.evaluate(() => document.querySelectorAll('#rank .rr').length === 3 && /^The same paragraph as The brief/.test(document.querySelector('#brief').title || '')));
524
+ await until(() => cp.evaluate(() => document.querySelectorAll('#rank .rr').length === 2 && /^The same paragraph as The brief/.test(document.querySelector('#brief').title || '')));
519
525
  const want = await cp.evaluate(() => import('/pm/premium-brief.js').then((m) => m.consoleReads().then((r) => ({ brief: m.briefOf(r).parts.map((x) => x.t).join(''), titles: m.needsListOf(r).map((x) => x.title) }))));
520
526
  const got = await cp.evaluate(() => ({ brief: document.querySelector('#brief').textContent, titles: [...document.querySelectorAll('#rank .rr .rt')].map((t) => t.childNodes[0].textContent), skip: document.querySelectorAll('#rank .rr .skip').length, cap: document.querySelector('#movesCap').textContent, dn: document.querySelector('#dN').textContent, bell: document.querySelector('#pvBdg').textContent, links: document.querySelectorAll('#rank .rr[data-link]').length }));
521
527
  ok('C1 the hero is the console brief, word for word', got.brief === want.brief && /3 things need you/.test(got.brief), got.brief);
522
- ok('C2 the list is the console\'s Needs you, in its order', got.titles.join('|') === want.titles.join('|') && got.titles.length === 3, JSON.stringify(got.titles));
528
+ ok('C2 the list is the console\'s Needs you, in its order, without the agent\'s drafts row: that waits in the bell', got.titles.join('|') === want.titles.filter((t) => !/^Agent has/.test(t)).join('|') && got.titles.length === 2 && want.titles.length === 3, JSON.stringify(got.titles));
523
529
  ok('C3 a console row has no "If you skip" line and no meeting link: no record holds them', got.skip === 0 && got.links === 0, JSON.stringify(got));
524
- ok('C4 the header, the dock and the bell count the same three rows', /3 rows left/.test(got.cap) && got.dn === '3' && got.bell === '3', JSON.stringify(got));
530
+ ok('C4 the header and the dock count the same two rows, and the bell counts the agent\'s new result', /2 rows left/.test(got.cap) && got.dn === '2' && got.bell === '1', JSON.stringify(got));
525
531
  const dec = await cp.evaluate(() => [...document.querySelectorAll('#rank .rr')].findIndex((r) => /Pick the launch market/.test(r.textContent)));
526
532
  await cp.locator('#rank .rr .rhd').nth(dec).click();
527
533
  await until(() => cp.evaluate(() => document.querySelector('#dlg').classList.contains('on')));
@@ -533,15 +539,23 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
533
539
  await cp.locator('#rank .rr .rhd').nth(own).click();
534
540
  await until(() => cp.evaluate(() => /premium-work\.html/.test(location.pathname)));
535
541
  ok('C6 your own item opens on My work, on that item', await cp.evaluate(() => location.pathname === '/premium-work.html' && new URLSearchParams(location.search).get('item') === 'w1'), await cp.evaluate(() => location.href));
536
- await cp.goBack(); await until(() => cp.evaluate(() => location.pathname === '/premium.html' && document.querySelectorAll('#rank .rr').length === 3), 20000);
537
- const ag = await cp.evaluate(() => [...document.querySelectorAll('#rank .rr')].findIndex((r) => /Agent has 2 drafts on Checkout/.test(r.textContent)));
538
- await cp.locator('#rank .rr .rhd').nth(ag).click();
542
+ await cp.goBack(); await until(() => cp.evaluate(() => location.pathname === '/premium.html' && document.querySelectorAll('#rank .rr').length === 2), 20000);
543
+ await cp.click('#pvBell');
544
+ await until(() => cp.evaluate(() => !!document.querySelector('#pvList .ib-bun')), 6000);
545
+ await cp.locator('#pvList .ib-bun').first().click();
539
546
  await until(() => cp.evaluate(() => document.querySelector('#dlg').classList.contains('on') && document.querySelectorAll('#oMain .bd-it').length > 0));
540
547
  const pd = await cp.evaluate(() => ({ path: location.pathname, title: document.querySelector('#dTitle').textContent, ids: [...document.querySelectorAll('#oMain .bd-it')].map((x) => x.dataset.id), keep: !!document.querySelector('#oMain [data-bda="pkeep"]'), all: !!document.querySelector('#oMain [data-bda="pall"]') }));
541
- ok('C8 an agent drafts row stays on the Briefing and opens Agent proposals with that initiative\'s drafts only', pd.path === '/premium.html' && pd.title === 'Agent proposals' && pd.ids.join() === 'p1,p2' && pd.keep && pd.all, JSON.stringify(pd));
548
+ ok('C8 a piece of work in the bell opens Agent proposals on the Briefing with that initiative\'s drafts only', pd.path === '/premium.html' && pd.title === 'Agent proposals' && pd.ids.join() === 'p1,p2' && pd.keep && pd.all, JSON.stringify(pd));
542
549
  await cp.locator('#oMain [data-bda="pall"]').click();
543
550
  ok('C9 Show all proposals lists every proposal', await until(() => cp.evaluate(() => [...document.querySelectorAll('#oMain .bd-it')].map((x) => x.dataset.id).sort().join() === 'p1,p2,p3')));
544
551
  await cp.keyboard.press('Escape');
552
+ await until(() => cp.evaluate(() => !document.querySelector('#dlg').classList.contains('on')));
553
+ await cp.click('#pvBell');
554
+ await until(() => cp.evaluate(() => !!document.querySelector('#pvList .ib-it [data-ibo="prop:p1"]')), 6000);
555
+ await cp.locator('#pvList .ib-it [data-ibo="prop:p1"]').click();
556
+ const one = await until(() => cp.evaluate(() => { const ids = [...document.querySelectorAll('#oMain .bd-it')].map((x) => x.dataset.id); return document.querySelector('#dlg').classList.contains('on') && ids.length ? { ids, back: !!document.querySelector('#oMain [data-bda="pbell"]'), path: location.pathname } : null; }), 6000);
557
+ ok('C10 a new proposal in the bell opens that one proposal, with a way back to the bell', one && one.ids.join() === 'p1' && one.back && one.path === '/premium.html', JSON.stringify(one));
558
+ await cp.keyboard.press('Escape');
545
559
  ok('C7 no page error on the console path', C.errors.length === 0, C.errors.join(' | '));
546
560
  await C.ctx.close();
547
561
  /* a portfolio documents drafts row opens the draft in the document sheet, on the Briefing (premium-rows-stay-premium) */
@@ -601,6 +615,14 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
601
615
  ok(`0 no page error at 390 px (${th})`, R.errors.length === 0, R.errors.join(' | '));
602
616
  await R.ctx.close();
603
617
  }
618
+ { // a touch phone: iOS zooms the page in when a text field under 16 px gets focus, and the reply box then runs off the right edge
619
+ const R = await open({ w: 390, h: 844, ctxOpts: { isMobile: true, hasTouch: true } });
620
+ await R.page.click('#rank .rhd');
621
+ await until(() => R.page.evaluate(() => document.querySelector('#dlg').classList.contains('on') && document.querySelector('#askIn')), 3000);
622
+ const fs16 = await R.page.evaluate(() => [...document.querySelectorAll('input,textarea,select')].filter((e) => !/checkbox|radio|range|button|submit|reset|file|color|image|hidden/.test(e.type)).map((e) => (e.id || e.className || e.tagName) + ':' + getComputedStyle(e).fontSize).filter((s) => parseFloat(s.split(':').pop()) < 16));
623
+ ok('R11 on a touch phone every text field is at least 16 px, so focus does not zoom the page (the reply box included)', fs16.length === 0 && await R.page.evaluate(() => !!document.querySelector('#askIn')), fs16.join(', '));
624
+ await R.ctx.close();
625
+ }
604
626
 
605
627
  /* R12 fidelity: computed styles and geometry against the mockup */
606
628
  if (!fs.existsSync(MOCKUP)) ok('R12 the mockup is in the repository', false, MOCKUP);
@@ -1,4 +1,33 @@
1
1
  [
2
+ {
3
+ "v": "0.346.0",
4
+ "at": "2026-10-20T05:59:24.111Z",
5
+ "f": 2,
6
+ "prs": [
7
+ {
8
+ "n": 942,
9
+ "t": "Artifact, Google Doc and Confluence links in a premium chat panel open beside the conversation",
10
+ "s": "A Google Doc or Confluence link, in Claude's words or in a page the viewer shows, opens as a tab beside the conversation."
11
+ },
12
+ {
13
+ "n": 943,
14
+ "t": "Text fields no longer zoom the premium pages on a phone",
15
+ "s": "On a touch screen every premium text field (input, textarea, select) uses 16 px type, so focus does not zoom the page."
16
+ }
17
+ ]
18
+ },
19
+ {
20
+ "v": "0.345.0",
21
+ "at": "2026-10-20T05:50:20.786Z",
22
+ "f": 2,
23
+ "prs": [
24
+ {
25
+ "n": 941,
26
+ "t": "Agent results wait in the bell, with deep links to each one",
27
+ "s": "The bell is an inbox of what the agent made that waits on the PM."
28
+ }
29
+ ]
30
+ },
2
31
  {
3
32
  "v": "0.344.0",
4
33
  "at": "2026-10-20T05:29:13.194Z",
@@ -17,7 +17,7 @@ Every premium page has the same top bar. On the left is where you are, then a ro
17
17
 
18
18
  - **Chat** opens a conversation with Claude about the page you are on: the Briefing, My work, the board, or the initiative. On Insights, Chat opens the Insight Studio, because the Studio is that page's chat.
19
19
  - **Sources** has a green dot when every source was read recently, and an orange dot when a source is old, was never read, failed, or the page could not read it. Hover to see which. A press opens the Sources dialog (see "Sources" below).
20
- - **The bell** counts the same things the Briefing lists under what you need to do, and a press opens the Briefing.
20
+ - **The bell** is your inbox of agent results: see [The bell: what the agent has for you](#the-bell-what-the-agent-has-for-you).
21
21
  - **The ⋯ menu** holds **Search** (Ctrl K), **Agent sessions** with a count, **Console**, **Theme** (Light, Dark or Auto) and **Settings**. On the Board it also holds **Open initiatives** as Page or Popup. An orange dot on ⋯ means a newer PMOS is ready, and **Settings** then shows the version.
22
22
  - **On a phone** the bar is one row: the page name, Chat, the bell and ⋯. Sources moves into the ⋯ menu.
23
23
  - **Menus.** An option that is too long for one line wraps onto the next line, and its row grows to hold it.
@@ -55,12 +55,24 @@ The page reads today's morning brief (`briefs/<date>.json` in the state folder)
55
55
  - **The header** says "no morning brief for today" when there is none, or that the brief could not be read, or that it did not reach a source (mail, Jira, Confluence or Slack).
56
56
  - **`?ws=<id>`** does not show these rows.
57
57
 
58
+ ## The bell: what the agent has for you
59
+
60
+ The agent's results are in the bell, not in the list. Each open proposal from the Initiative Driver, and each goal that is done, stopped or needs you, is one item. The list keeps your own work. Under it, one line says how many agent results wait on you, how many are new, and how old the oldest is. **Open Needs you** opens the bell.
61
+
62
+ - **New from the agent** shows one item per result that came in after you last looked, the newest first. Each item has its main action: **Review** for a proposal, **Read** for a document draft, **Answer** for a goal that needs you, and **See result** for a goal that is done. **Session** opens the conversation with the agent about that piece of work. The badge on the bell counts the new items.
63
+ - **Still waiting** shows one line per piece of work: its name, how many proposals it has and how old the oldest is. A press opens Agent proposals on that piece of work.
64
+ - **Review** opens Agent proposals on that one proposal, where Keep, Send back and Drop are. **Talk to the agent** opens its conversation, and **Back to Needs you** opens the bell again. On another page, a press opens the Briefing with that proposal open.
65
+ - **Seen is not done.** When you close the bell, the new items it showed move to Still waiting. **Mark all seen** moves them all. An item leaves only when you decide it, wherever you decide it.
66
+ - **A toast** names a new result while a premium page is open: at most one every 15 minutes, with several new results bundled into one. Its button opens the result, or the bell.
67
+ - **What counts.** The bell lists the proposals Agent proposals shows (a board in Shadow or Off mode raises none) and the goal rows. Portfolio document drafts stay in the list, because they are your own documents.
68
+ - **Links.** `premium.html?open=prop:<id>&pws=<workspace>` opens one proposal. `?open=target:initiative:<id>&pws=<workspace>` opens one piece of work. `?open=row:<key>` opens an agent or goal row with its conversation.
69
+
70
+ The bell reads `GET /api/inbox`. The only thing it writes is your seen marks, in `inbox-seen.jsonl` in the state folder. They need the page's launch nonce.
71
+
58
72
  ## The agent's drafts
59
73
 
60
- The list also shows what the Initiative Driver is waiting on you for, the same two rows the console's Needs you shows: "Agent has 4 drafts on <initiative>" and "<initiative> is waiting on you: the drafts are 6 days old". They are read from each included product's Driver ledger. Nothing is recorded from these rows.
74
+ The Initiative Driver's rows ("Agent has 4 drafts on <initiative>" and "<initiative> is waiting on you: the drafts are 6 days old") are read from each included product's Driver ledger. They are in the bell, and a Session press opens one. Nothing is recorded from these rows.
61
75
 
62
- - **Order.** A product whose agent is stopped on you comes after the repository rows and before mail, Jira and Confluence. Open drafts come after those, the oldest first. The list shows seven rows; the rest are counted under "more".
63
- - **The hero** says how many agent drafts wait on you, counting every one, shown or not. The dock counts them too.
64
76
  - **The dialog** shows only what the Driver's row holds: the cause, the draft count, the age, and the confidence, recommendation, reversibility and effort the agent stated when it filed. A fact nobody stated is left out. **Review the drafts** opens Around you's Agent proposals, where Keep, Send back and Drop are.
65
77
  - **Pressing a row** opens Around you's Agent proposals on the Briefing, with only that initiative's or Work item's drafts. **Show all proposals** lists every one. A row never opens the console.
66
78
  - **Core-document drafts** open the initiative page or the Board page that holds the documents. Portfolio drafts open in the document sheet on the Briefing, with **Issue it** and **Draft it again**, the same sheet the Board page uses.
@@ -350,7 +362,7 @@ The premium Briefing is the default page: `/` and `/index.html` open it. The con
350
362
 
351
363
  ## The dialog on a phone and the document sheet's views
352
364
 
353
- On a phone or tablet (under 1000 px) every dialog opens on **Detail**. A card's label and value rows (for example **Blocked at** and **Initiative** in "The way through") stay as two columns, one row per label. A **Detail / Conversation** switch sits under the title, and **Open it** at the foot of Detail brings the conversation when an action waits there. The header holds only **Close**. A document sheet picks its view (**Read**, **Edit**, **Proposals**, **Edit log**, **Health**, **Relations**) from one button with a menu.
365
+ On a phone or tablet (under 1000 px) every dialog opens on **Detail**. On a touch screen every text field, the reply box included, uses 16 px type, so typing in one does not zoom the page. A card's label and value rows (for example **Blocked at** and **Initiative** in "The way through") stay as two columns, one row per label. A **Detail / Conversation** switch sits under the title, and **Open it** at the foot of Detail brings the conversation when an action waits there. The header holds only **Close**. A document sheet picks its view (**Read**, **Edit**, **Proposals**, **Edit log**, **Health**, **Relations**) from one button with a menu.
354
366
 
355
367
  A dialog's detail panel opens with the record's path, its heading and one lead line. A decision's evidence reads as a list. A measure's dialog draws the measure's chart above its facts and readings.
356
368
 
@@ -376,6 +388,7 @@ The conversation beside every premium dialog is a real Claude Code session. Anyt
376
388
  - **Stop** shows while Claude works. It presses Esc in the session.
377
389
  - **The conversation** is Claude Code's own record, word for word. Claude's answers are formatted as Claude Code formats them: headings, bold, lists, code, tables, quotes and links (links open in a new tab). Your messages keep their line breaks, and a paste shows without the tags Claude Code wraps around it. A run of tool calls shows as one small grey line, for example "Used Read ×2, slack_read_thread". A connector tool shows its short name.
378
390
  - **A file Claude names** (a path such as `briefs/drafts/plan.md`, or a link to one) is underlined. Press it to read the file beside the conversation, as a tab in the viewer; on a phone, the Detail side shows it. Markdown shows as a page and other text files as code. It is read-only. While the tab is open it shows the newest version, so a file Claude is still writing stays current. A file outside the workspaces PMOS serves says "Not in a workspace" and is not read.
391
+ - **A link to a Google Doc or a Confluence page** opens beside the conversation too, as the viewer shows a copy: the text PMOS has read, or **Read it now**. **A Claude artifact link** opens a tab with **Open in Claude**: claude.ai does not let another site show an artifact inside it. Other links open in a new browser tab.
379
392
  - **The session** is also listed in **Agent sessions** and in the console, where you can open its terminal. When it has ended, your next message starts a new one.
380
393
  - Answers from the older read-only agent stay above the session, marked "Earlier read-only answer".
381
394
 
@@ -393,6 +406,6 @@ Type `/` in the box to see the commands: `/goal`, `/compact` and `/clear`. Use t
393
406
  - **While it works**, a goal card under the conversation shows the round, each done point met or open, and the deadline. The points are Claude's own report, so the card says "unverified". Each time Claude would stop with a point still open, it is told to keep going.
394
407
  - **It stops by itself** when Claude reports every point met (Done), when it needs you (Needs you: answer it in the box and it goes on), at the deadline, after the round limit (12 unless the goal says fewer), or after 3 rounds that met no new point. The card says which.
395
408
  - **Stop the goal** presses Esc in the session and ends the goal.
396
- - **In the Briefing**, a goal that is done, stopped or needs you is a row at the top of the list. Pressing it opens the goal's own conversation. The row goes when you write in that conversation, or after a week.
409
+ - **In the bell**, a goal that is done, stopped or needs you is an item. Pressing it opens the goal's own conversation. The item goes when you write in that conversation, or after a week.
397
410
 
398
411
  Start, Cancel and Stop need the page's launch nonce too. The goal and each round are kept in `goal-runs.jsonl` in the state folder.
@@ -0,0 +1,135 @@
1
+ 'use strict';
2
+ /* agent-inbox.js — the bell's inbox of agent results that wait on the PM (initiative premium-agent-inbox).
3
+ *
4
+ * build({ proposals, goals, seen, now }) → { count, newCount, items, bundles, seenAt } PURE
5
+ * readProposals(available) → [{ p, ws, product, targetTitle }] the open proposals the Agent proposals dialog shows
6
+ * readSeen(runtimeDir) · appendSeen(runtimeDir, { ids } | { all: true }, now)
7
+ * split(model, goals) → the Briefing model with its agent and goal rows moved to model.agent (N6)
8
+ *
9
+ * An item is one open Driver proposal (a board in Approve mode only, as the dialog reads it) or one goal row of goal-chat. Every word
10
+ * comes from the record. NEW is filed after the PM's last "Mark all seen" and not opened since; seen is not done: an item goes only
11
+ * when its record changes. The only write is the seen line, <runtime>/inbox-seen.jsonl. Nothing here decides or sends anything. */
12
+ const fs = require('fs');
13
+ const path = require('path');
14
+
15
+ const SEEN = 'inbox-seen.jsonl';
16
+ const MAX_NEW = 30;
17
+ const clip = (s, n) => { s = String(s == null ? '' : s).replace(/\s+/g, ' ').trim(); return s.length > n ? s.slice(0, n - 1).trimEnd() + '…' : s; };
18
+ const plural = (n, one, many) => `${n} ${n === 1 ? one : many}`;
19
+ const WHAT = { problem: 'Problem statement', evidence: 'Evidence', sizing: 'Opportunity sizing', assumption: 'Riskiest assumption', stakeholders: 'Stakeholders', move: 'Move', note: 'Note', 'next-step': 'Next step', 'follow-up': 'Follow-up', doc: 'Document draft' };
20
+ const GOAL_KIND = { waiting: 'goal-waiting', done: 'goal-done', stopped: 'goal-stopped' };
21
+
22
+ /** The key of a target's drafts row on the Briefing (lib/briefing-premium-drafts.js keyOf of the driver-needs run id): its conversation is the proposal's session. */
23
+ function draftsRowKey(ws, target) {
24
+ const D = require('./driver.js'), Drafts = require('./briefing-premium-drafts.js');
25
+ return Drafts.keyOf(ws, 'driver-needs:drafts:' + D.targetKey(target));
26
+ }
27
+
28
+ function proposalTitle(p) {
29
+ const word = p.what === 'move' && p.data && p.data.to ? 'Move to ' + p.data.to : WHAT[p.what] || p.what || 'Proposal';
30
+ const text = p.data && typeof p.data.text === 'string' ? p.data.text : '';
31
+ return clip(text ? word + ': ' + text : word, 160);
32
+ }
33
+
34
+ /** Pure. proposals: [{ p, ws, product, targetTitle }]; goals: goal-chat goalRowsAt rows; seen: readSeen(). */
35
+ function build({ proposals = [], goals = [], seen = { all: 0, ids: new Set() }, now = Date.now() } = {}) {
36
+ const items = [];
37
+ for (const x of proposals) {
38
+ const p = x.p, at = Date.parse(p.at || '');
39
+ if (!p || !p.id || !p.target) continue;
40
+ const t = p.target, target = { kind: t.kind, id: t.id, title: clip(x.targetTitle || t.id, 120) };
41
+ items.push({
42
+ id: 'prop:' + x.ws + ':' + p.id, kind: p.what === 'doc' ? 'draft' : 'proposal', title: proposalTitle(p), at: Number.isFinite(at) ? at : null,
43
+ ws: x.ws, product: x.product || '', target,
44
+ open: 'prop:' + p.id, pws: x.ws, session: draftsRowKey(x.ws, t),
45
+ });
46
+ }
47
+ for (const g of goals) {
48
+ if (!g || !g.chatKey) continue;
49
+ items.push({ id: g.key, kind: GOAL_KIND[g.goalState] || 'goal-done', title: clip(g.title + ': ' + (g.subject || ''), 160), at: Number.isFinite(g.at) ? g.at : null, ws: '', product: 'Chat', target: null, open: 'row:' + g.key, pws: '', session: g.key });
50
+ }
51
+ for (const it of items) it.isNew = (it.at == null || it.at > seen.all) && !seen.ids.has(it.id);
52
+ const fresh = items.filter((i) => i.isNew).sort((a, b) => (b.at || now) - (a.at || now));
53
+ const rest = items.filter((i) => !i.isNew);
54
+ const by = new Map();
55
+ for (const i of rest) {
56
+ const k = i.target ? i.pws + '|' + i.target.kind + '|' + i.target.id : i.id;
57
+ if (!by.has(k)) by.set(k, { key: k, title: i.target ? i.target.title : i.title, product: i.product, n: 0, oldest: null, kind: i.target ? 'target' : i.kind, open: i.target ? 'target:' + i.target.kind + ':' + i.target.id : i.open, pws: i.pws });
58
+ const b = by.get(k); b.n += 1;
59
+ if (i.at != null && (b.oldest == null || i.at < b.oldest)) b.oldest = i.at;
60
+ }
61
+ const bundles = [...by.values()].sort((a, b) => (a.oldest || now) - (b.oldest || now)).map((b) => ({
62
+ key: b.key, title: b.title, product: b.product, count: b.n, oldest: b.oldest, open: b.open, pws: b.pws,
63
+ sub: b.kind === 'target' ? plural(b.n, 'proposal', 'proposals') : b.kind === 'goal-waiting' ? 'Goal waits on you' : 'Goal to check',
64
+ }));
65
+ const ages = items.map((i) => i.at).filter((v) => v != null);
66
+ return { count: items.length, newCount: fresh.length, items: fresh.slice(0, MAX_NEW), more: Math.max(0, fresh.length - MAX_NEW), bundles, oldest: ages.length ? Math.min(...ages) : null, seenAt: seen.all || null };
67
+ }
68
+
69
+ /** The open proposals of each included product whose board is in Approve mode: the set GET /api/driver/open gives the Agent proposals dialog. A ledger that cannot be read gives none. */
70
+ function readProposals(available) {
71
+ const D = require('./driver.js'), DN = require('./driver-needs.js');
72
+ const out = [];
73
+ for (const a of available || []) {
74
+ if (!a || !a.on || !a.root) continue;
75
+ try {
76
+ const dir = D.stateDirOf(a.root); if (!dir) continue;
77
+ const state = D.fold(D.readLines(D.ledgerFile(dir)));
78
+ if (!state.proposals.size) continue;
79
+ let titles = new Map(); try { titles = DN.titlesOf({ root: a.root }); } catch { /* the ids stand in */ }
80
+ for (const p of D.openProposals(state)) {
81
+ if (!p.target || (p.target.ws && p.target.ws !== a.ws)) continue;
82
+ if (D.modeOf(state, p.target.kind === 'work' ? 'work' : null) !== 'approve') continue;
83
+ out.push({ p, ws: a.ws, product: a.name, targetTitle: titles.get(p.target.kind + ':' + p.target.id) || '' });
84
+ }
85
+ } catch { /* this product gives no items */ }
86
+ }
87
+ return out;
88
+ }
89
+
90
+ function readSeen(runtimeDir) {
91
+ const seen = { all: 0, ids: new Set() };
92
+ let t; try { t = fs.readFileSync(path.join(runtimeDir, SEEN), 'utf8'); } catch { return seen; }
93
+ for (const l of t.split('\n')) {
94
+ if (!l.trim()) continue;
95
+ let e; try { e = JSON.parse(l); } catch { continue; }
96
+ const at = Date.parse(e && e.at);
97
+ if (e.all === true && Number.isFinite(at)) { seen.all = Math.max(seen.all, at); seen.ids.clear(); }
98
+ else if (Array.isArray(e.ids)) for (const id of e.ids) if (typeof id === 'string') seen.ids.add(id);
99
+ }
100
+ return seen;
101
+ }
102
+ const ID_RE = /^(prop:[^\s]{1,200}|goal:[^\s]{1,200})$/;
103
+ /** The check of a body: null when it is good, else the reason. Pure. */
104
+ function badSeen(b) {
105
+ if (!b || typeof b !== 'object') return 'a body is required';
106
+ if (b.all === true) return null;
107
+ if (!Array.isArray(b.ids) || !b.ids.length || b.ids.length > 100 || !b.ids.every((x) => typeof x === 'string' && ID_RE.test(x))) return 'ids must be 1 to 100 inbox item ids, or all must be true';
108
+ return null;
109
+ }
110
+ function appendSeen(runtimeDir, b, now = new Date()) {
111
+ fs.mkdirSync(runtimeDir, { recursive: true });
112
+ fs.appendFileSync(path.join(runtimeDir, SEEN), JSON.stringify(b.all === true ? { all: true, at: now.toISOString() } : { ids: b.ids, at: now.toISOString() }) + '\n');
113
+ }
114
+
115
+ /** N6: the goal rows join the agent's drafts rows (which buildMany's agentAside already keeps off the list) in model.agent, not in
116
+ * "What you need to do". A row of either kind still on the list moves too; the list and the dock count what stays. */
117
+ function split(model, goals = []) {
118
+ if (!model || !model.list) return model;
119
+ const isAgent = (r) => r && (r.kind === 'agent' || r.kind === 'goal');
120
+ const all = model.list.rows || [], out = all.filter(isAgent);
121
+ if (!out.length && !goals.length && model.agent) return model;
122
+ const keep = all.filter((r) => !isAgent(r)).map((r, k) => Object.assign({}, r, { n: k + 1, first: k === 0 }));
123
+ const rows = (model.agent && model.agent.rows || []).concat(out.filter((r) => r.kind === 'agent'));
124
+ const have = new Set(out.filter((r) => r.kind === 'goal').map((r) => r.key));
125
+ const goalRows = out.filter((r) => r.kind === 'goal').concat(goals.map(({ at, goalState, ...r }) => r).filter((r) => !have.has(r.key)));
126
+ const count = (model.list.count || 0) - out.length;
127
+ return {
128
+ ...model,
129
+ list: { ...model.list, rows: keep, count },
130
+ agent: { rows, goals: goalRows },
131
+ dock: model.dock && model.dock.needs != null ? { ...model.dock, needs: count, label: count === 1 ? 'needs you' : 'need you', next: keep[0] ? keep[0].title : null } : model.dock,
132
+ };
133
+ }
134
+
135
+ module.exports = { build, readProposals, readSeen, appendSeen, badSeen, split, draftsRowKey, SEEN, MAX_NEW };
@@ -60,7 +60,7 @@ function rowFor(model, key) {
60
60
  const d = w.dialog || {};
61
61
  return { title: clip(w.title, 160), subject: clip(w.sub, 240), say: clip(d.say, 600), facts: (d.facts || []).slice(0, 12).map(([a, b]) => clip(a, 40) + ': ' + clip(b, 240)), files: (d.files || []).filter((f) => SAFE_PATH.test(f) && !f.includes('..')).slice(0, 4) };
62
62
  }
63
- let row = (model.list && model.list.rows || []).find((r) => r.key === key), kind = row && row.kind, files = [];
63
+ let row = (model.list && model.list.rows || []).concat(model.agent && model.agent.rows || []).find((r) => r.key === key), kind = row && row.kind, files = []; // premium-agent-inbox: the agent's drafts rows live in model.agent
64
64
  let item = row;
65
65
  if (!row) {
66
66
  const m = /^ev:([a-z]+):(\d+)$/.exec(key);
@@ -71,7 +71,7 @@ function start(p, engine, runtimeDir) {
71
71
  }
72
72
 
73
73
  /** The merged answer for the workspaces that are on. `available` is choose()'s list (all of them, with `on`). */
74
- async function modelOfMany({ available, engine, runtimeDir, sources, agent }) {
74
+ async function modelOfMany({ available, engine, runtimeDir, sources, agent, agentAside }) {
75
75
  const now = Date.now();
76
76
  const on = (available || []).filter((a) => a.on);
77
77
  const parts = [];
@@ -98,7 +98,7 @@ async function modelOfMany({ available, engine, runtimeDir, sources, agent }) {
98
98
  const settled = parts.filter((p) => p.state === 'ready').length;
99
99
  if (on.length && !settled && parts.every((p) => p.state === 'reading')) return { state: 'reading', elapsed_ms: elapsed };
100
100
  if (on.length && !settled && parts.every((p) => p.state === 'error')) return { state: 'error', error: parts.map((p) => p.product.name + ': ' + p.error).join('; ').slice(0, 300) };
101
- const model = BP.buildMany({ now, asOf: asOf || now, meetings: BP.readMeetings(runtimeDir, now), defers: Object.fromEntries(W.readDefers(runtimeDir, now)), available: (available || []).map((a) => ({ ws: a.ws, name: a.name, home: a.home, on: a.on })), parts, sources, agent });
101
+ const model = BP.buildMany({ now, asOf: asOf || now, meetings: BP.readMeetings(runtimeDir, now), defers: Object.fromEntries(W.readDefers(runtimeDir, now)), available: (available || []).map((a) => ({ ws: a.ws, name: a.name, home: a.home, on: a.on })), parts, sources, agent, agentAside });
102
102
  last = model;
103
103
  return { state: 'ready', model, as_of: asOf || now, refreshing, pending: model.pending, ...(error ? { error } : {}) };
104
104
  }
@@ -415,7 +415,9 @@ function buildMany(g) {
415
415
  const sx = g.sources ? Src.build(Object.assign({}, g.sources, { products: (id) => owner.get(id) || null })) : null;
416
416
  // the agent's drafts (initiative: the agent drafts slice): a product whose agent is stopped on the PM comes before the sources, the open drafts after them
417
417
  const dx = g.agent ? Drafts.build({ parts: g.agent }).rows : [];
418
- const { rows, more } = cut(every.concat(dx.filter((r) => r.detail.blocked), sx ? sx.rows : [], dx.filter((r) => !r.detail.blocked)), putOff);
418
+ // premium-agent-inbox: with agentAside the drafts rows go to model.agent (the bell lists them), so they take no place in the cap of seven
419
+ const listed = g.agentAside ? [] : dx;
420
+ const { rows, more } = cut(every.concat(listed.filter((r) => r.detail.blocked), sx ? sx.rows : [], listed.filter((r) => !r.detail.blocked)), putOff);
419
421
  const tag = (list, p) => list.map((x) => Object.assign({}, x, { ws: p.product.ws, product: p.product.name }));
420
422
  const cf = {
421
423
  now, asOf, meetings, defers: g.defers || {},
@@ -439,7 +441,7 @@ function buildMany(g) {
439
441
  const srcRows = rows.filter((r) => r.kind === 'source'), srcSeen = [...new Set(srcRows.map((r) => r.detail.source))];
440
442
  if (srcRows.length) hero.push({ parts: [{ t: num(srcRows.length) + ' ' + plural(srcRows.length, 'item', 'items') + ' from ' + joinNames(srcSeen.map((k) => Src.SOURCE_WORD[k])), s: true }, { t: ' ' + plural(srcRows.length, 'needs', 'need') + ' you.', s: false }], from: srcRows.map((r) => r.from[0]) });
441
443
  const agRows = rows.filter((r) => r.kind === 'agent'), agAll = dx.length;
442
- if (agAll) hero.push({ parts: [{ t: num(agAll) + ' ' + plural(agAll, 'agent draft', 'agent drafts') + ' ' + (agAll === 1 ? 'waits' : 'wait'), s: true }, { t: ' on you.', s: false }], from: (agRows.length ? agRows : dx).map((r) => r.from[0]) });
444
+ if (agAll && !g.agentAside) hero.push({ parts: [{ t: num(agAll) + ' ' + plural(agAll, 'agent draft', 'agent drafts') + ' ' + (agAll === 1 ? 'waits' : 'wait'), s: true }, { t: ' on you.', s: false }], from: (agRows.length ? agRows : dx).map((r) => r.from[0]) });
443
445
  const sxNote = !sx ? '' : sx.state === 'ok' ? (sx.notRead.length ? ' · not read by the morning brief: ' + sx.notRead.join(', ') : '') : sx.state === 'bad' ? ' · the morning brief could not be read' : ' · no morning brief for today';
444
446
  return {
445
447
  date: dateLine(now),
@@ -450,6 +452,7 @@ function buildMany(g) {
450
452
  today: todayOf(cf),
451
453
  dock: { needs: pending ? null : rows.length + more, label: plural(rows.length + more, 'needs you', 'need you'), next: rows[0] ? rows[0].title : null },
452
454
  products: { available: available.map((a) => ({ ws: a.ws, name: a.name, home: !!a.home, on: !!a.on })), none },
455
+ ...(g.agentAside ? { agent: { rows: dx, goals: [] } } : {}),
453
456
  };
454
457
  }
455
458
 
@@ -142,7 +142,9 @@ function resume({ runtimeDir, key, now = new Date() }) {
142
142
  * A row goes when the PM writes in the conversation, starts a new /goal there, or after ROW_DAYS. */
143
143
  const ROW_DAYS = 7;
144
144
  const ROW_TITLE = { done: 'Check the goal Claude finished', waiting: 'Claude needs you on a goal', stopped: 'A goal stopped before it was done' };
145
- function briefingRows(runtimeDir, now = Date.now()) {
145
+ function briefingRows(runtimeDir, now = Date.now()) { return goalRowsAt(runtimeDir, now).map(({ at, goalState, ...r }) => r); }
146
+ /** briefingRows with each row's `at` (ms of the goal's last event) and `goalState` (done, stopped, waiting) kept: the bell's inbox orders and marks new by it (premium-agent-inbox). */
147
+ function goalRowsAt(runtimeDir, now = Date.now()) {
146
148
  let t; try { t = fs.readFileSync(path.join(runtimeDir, RUNS), 'utf8'); } catch { return []; }
147
149
  const keys = new Set();
148
150
  for (const l of t.split('\n')) { if (!l.trim()) continue; try { const e = JSON.parse(l); if (e && typeof e.key === 'string') keys.add(e.key); } catch { /* skip */ } }
@@ -155,7 +157,7 @@ function briefingRows(runtimeDir, now = Date.now()) {
155
157
  const all = g.draft.done || [], met = (g.met || []).length;
156
158
  const why = g.state === 'stopped' ? (REASON[g.reason] || 'It stopped.') : g.state === 'waiting' ? 'Claude asked you something in the conversation.' : 'Claude reports every done point met. It checked its own work.';
157
159
  out.push({
158
- kind: 'goal', key: 'goal:' + key, chatKey: key, title: ROW_TITLE[g.state], subject: clip(g.draft.goal, 90),
160
+ kind: 'goal', key: 'goal:' + key, chatKey: key, goalState: g.state, title: ROW_TITLE[g.state], subject: clip(g.draft.goal, 90),
159
161
  prepared: met + ' of ' + all.length + ' done points met, as Claude reports it. ' + why,
160
162
  skip: g.state === 'waiting' ? 'If you skip: the goal waits and nothing more is done on it.' : 'If you skip: nobody checks the work before it is relied on.',
161
163
  at,
@@ -169,7 +171,7 @@ function briefingRows(runtimeDir, now = Date.now()) {
169
171
  });
170
172
  }
171
173
  // the newest first, those that wait on the PM before the rest
172
- return out.sort((a, b) => ((a.title === ROW_TITLE.waiting ? 0 : 1) - (b.title === ROW_TITLE.waiting ? 0 : 1)) || (b.at - a.at)).map(({ at, ...r }) => r);
174
+ return out.sort((a, b) => ((a.title === ROW_TITLE.waiting ? 0 : 1) - (b.title === ROW_TITLE.waiting ? 0 : 1)) || (b.at - a.at));
173
175
  }
174
176
  /** The Briefing model with the goal rows first (U7). The rows already on the list follow; the count and the dock count them too. */
175
177
  function withGoalRows(model, rows) {
@@ -218,4 +220,4 @@ function decide({ runtimeDir, key, id, act, draft, session, sessions, now = new
218
220
  return { status: 200, body: { ok: true, id, state: act === 'start' ? 'started' : 'cancelled' } };
219
221
  }
220
222
 
221
- module.exports = { parseCommand, grillPrompt, startMessage, cancelMessage, cleanDraft, goalOf, begin, decide, onStop, resume, briefingRows, withGoalRows, blockOf, keyOfSession, hookSettings, MARK, RUNS, LIMIT, NO_PROGRESS, REASON };
223
+ module.exports = { parseCommand, grillPrompt, startMessage, cancelMessage, cleanDraft, goalOf, begin, decide, onStop, resume, briefingRows, goalRowsAt, withGoalRows, blockOf, keyOfSession, hookSettings, MARK, RUNS, LIMIT, NO_PROGRESS, REASON };
@@ -56,6 +56,7 @@ const MODULES = Object.freeze([
56
56
  'routes-initiative-premium', // briefing-premium-initiative: the premium initiative page's model from the Initiatives sheet's own routes (read-only)
57
57
  'routes-brief-page', // console3 Briefing as the brief: Today agenda, Needs you and Mentions (read-only; writes go through routes-pm-items)
58
58
  'routes-mentions', // console3 Briefing Mentions: the PM's read marks (page press only)
59
+ 'routes-inbox', // premium-agent-inbox: the bell's agent results and the PM's seen marks (page press only)
59
60
  'routes-phone-day', // phone companion: the agent's finished drafts, the evening recap and tomorrow at a glance (read-only)
60
61
  'routes-report-facts', // console3 D: GET /api/report-families/facts (read-only, real data only)
61
62
  'routes-records', // console3 E1a: ideas, hypotheses, decisions, KR metrics, bets (GET list; page-press add/edit/reading)