create-pmos 0.260.0 → 0.262.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.260.0",
3
+ "version": "0.262.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": {
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@ca19bc7
1
+ kernel-source: pmos@9a1003d
2
2
  assembled: 2026-10-18
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-18T05:21:30Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-18T07:58:49Z"}
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-18T05:21:30Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-18T07:58:49Z"}
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-18T05:21:30Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-18T07:58:49Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -63,6 +63,7 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
63
63
  /* B1 */
64
64
  const rail = await p.evaluate(() => ({ names: [...document.querySelectorAll('.rail .pl')].map((b) => b.textContent.trim()), cur: document.querySelector('.rail [aria-current="page"]').textContent.trim(), pi: getComputedStyle(document.querySelector('.rail')).getPropertyValue('--pi').trim(), title: document.title, name: document.querySelector('#crBoard').textContent, sw: document.querySelector('#crSw').hidden }));
65
65
  ok('B1 the rail names four places, Board is current, the board is named and has no switcher for one board', rail.names.join() === 'Briefing,My work,Board,Insights' && rail.cur === 'Board' && rail.pi === '2' && rail.name === 'pmos' && rail.sw, JSON.stringify(rail));
66
+ { const tc = await p.evaluate(() => { const a = document.querySelector('#toConsole'); if (!a) return null; const r = a.getBoundingClientRect(); return { href: a.getAttribute('href'), label: a.getAttribute('aria-label'), w: Math.round(r.width), h: Math.round(r.height), tab: a.tabIndex }; }); ok('B1 the header links to the console (premium-console-link)', tc && tc.href === '/c3.html' && tc.label === 'Open the console' && tc.w >= 44 && tc.h >= 44 && tc.tab === 0, JSON.stringify(tc)); }
66
67
  ok('B1 the page is served at /premium-board and /premium-board.html', (await fetch(BASE + '/premium-board')).status === 200 && (await fetch(BASE + '/premium-board.html')).status === 200);
67
68
  for (const [go, re] of [['brief', /\/premium\.html$/], ['work', /\/premium-work\.html$/]]) {
68
69
  const r2 = await open(); await r2.page.locator(`.rail [data-go="${go}"]`).click();
@@ -69,6 +69,7 @@ const HEALTH = { ok: true, path: 'planning/prd/self-serve-v2-prd.md', health: {
69
69
  /* I1 place */
70
70
  const rail = await p.evaluate(() => ({ names: [...document.querySelectorAll('.rail .pl')].map((b) => b.textContent.trim()), cur: document.querySelector('.rail [aria-current="page"]').textContent.trim() }));
71
71
  ok('I1 the rail names the four places and marks Board', rail.names.join() === 'Briefing,My work,Board,Insights' && rail.cur === 'Board');
72
+ { const tc = await p.evaluate(() => { const a = document.querySelector('#toConsole'); if (!a) return null; const r = a.getBoundingClientRect(); return { href: a.getAttribute('href'), label: a.getAttribute('aria-label'), w: Math.round(r.width), h: Math.round(r.height), tab: a.tabIndex }; }); ok('I1 the header links to the console (premium-console-link)', tc && tc.href === '/c3.html' && tc.label === 'Open the console' && tc.w >= 44 && tc.h >= 44 && tc.tab === 0, JSON.stringify(tc)); }
72
73
  ok('I1 the crumb names the board and the initiative, with a switcher for each and the sparkle', await p.evaluate(() => document.querySelector('#crBoard').textContent === 'Onboarding' && document.querySelector('#crIni').textContent === 'Self-serve onboarding v2' && !!document.querySelector('#crSw') && !!document.querySelector('#crSw2') && document.querySelector('#crAsk').getAttribute('aria-label') === 'Ask about this initiative'));
73
74
  await p.route('**/premium-board.html*', (r) => r.fulfill({ contentType: 'text/html', body: '<title>b</title>' }));
74
75
  await p.route('**/premium-initiative.html?id=partner*', (r) => r.fulfill({ contentType: 'text/html', body: '<title>i</title>' }));
@@ -63,6 +63,7 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
63
63
  /* I1 */
64
64
  const rail = await p.evaluate(() => ({ names: [...document.querySelectorAll('.rail .pl')].map((b) => b.textContent.trim()), cur: document.querySelector('.rail [aria-current="page"]').textContent.trim(), pi: getComputedStyle(document.querySelector('.rail')).getPropertyValue('--pi').trim(), title: document.title, name: document.querySelector('#crBoard').textContent, sw: document.querySelector('#crSw').hidden }));
65
65
  ok('I1 the rail names four places, Insights is current, the board is named and has no switcher for one board', rail.names.join() === 'Briefing,My work,Board,Insights' && rail.cur === 'Insights' && rail.pi === '3' && rail.name === 'pmos' && rail.sw, JSON.stringify(rail));
66
+ { const tc = await p.evaluate(() => { const a = document.querySelector('#toConsole'); if (!a) return null; const r = a.getBoundingClientRect(); return { href: a.getAttribute('href'), label: a.getAttribute('aria-label'), w: Math.round(r.width), h: Math.round(r.height), tab: a.tabIndex }; }); ok('I1 the header links to the console (premium-console-link)', tc && tc.href === '/c3.html' && tc.label === 'Open the console' && tc.w >= 44 && tc.h >= 44 && tc.tab === 0, JSON.stringify(tc)); }
66
67
  ok('I1 the page is served at /premium-insights and /premium-insights.html', (await fetch(BASE + '/premium-insights')).status === 200 && (await fetch(BASE + '/premium-insights.html')).status === 200);
67
68
  for (const [go, re] of [['brief', /\/premium\.html$/], ['work', /\/premium-work\.html$/], ['init', /\/premium-board\.html$/]]) {
68
69
  const r2 = await open(); await r2.page.locator(`.rail [data-go="${go}"]`).click();
@@ -76,6 +76,24 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
76
76
  ok('R1 each place has a target: Briefing and My work are premium pages, Board and Insights open the console tab', rail.go.join() === 'brief,work,init,rep');
77
77
  const def = await fetch(BASE + '/').then((r) => r.text());
78
78
  ok('R1 the console stays the default page', /id="c3-root"/.test(def) && !/class="rail/.test(def));
79
+ { const tc = await p.evaluate(() => { const a = document.querySelector('#toConsole'); if (!a) return null; const r = a.getBoundingClientRect(); return { href: a.getAttribute('href'), label: a.getAttribute('aria-label'), w: Math.round(r.width), h: Math.round(r.height), tab: a.tabIndex }; }); ok('R1 the header links to the console (premium-console-link)', tc && tc.href === '/c3.html' && tc.label === 'Open the console' && tc.w >= 44 && tc.h >= 44 && tc.tab === 0, JSON.stringify(tc)); }
80
+
81
+ /* premium-settings: the dialog holds Workspaces and Connectors only; each press goes to its existing route */
82
+ { const bt = await p.evaluate(() => { const b = document.querySelector('#settingsBtn'); if (!b) return null; const r = b.getBoundingClientRect(); return { label: b.getAttribute('aria-label'), w: Math.round(r.width), h: Math.round(r.height) }; });
83
+ ok('S1 the header has a Settings button of at least 44 px', bt && bt.label === 'Settings' && bt.w >= 44 && bt.h >= 44, JSON.stringify(bt));
84
+ await p.click('#settingsBtn');
85
+ const drawn = await until(() => p.evaluate(() => document.querySelectorAll('#oMain .sr').length > 0), 8000);
86
+ const labs = await p.evaluate(() => [...document.querySelectorAll('#oMain .label')].map((x) => x.textContent));
87
+ ok('S2 the dialog has exactly two sections, Workspaces and Connectors', drawn && labs.join() === 'Workspaces,Connectors', labs.join());
88
+ const sw = await p.evaluate(() => { const b = document.querySelector('#oMain [data-src="mail"]'); return b ? b.getAttribute('aria-checked') : null; });
89
+ await p.click('#oMain [data-src="mail"]');
90
+ const flipped = await until(() => p.evaluate((v) => document.querySelector('#oMain [data-src="mail"]').getAttribute('aria-checked') !== v, sw), 6000);
91
+ ok('S3 a source switch saves through /api/proactive/settings and flips', flipped && A.reqs.includes('POST /api/proactive/settings'));
92
+ await p.click('#oMain [data-src="mail"]'); await until(() => p.evaluate((v) => document.querySelector('#oMain [data-src="mail"]').getAttribute('aria-checked') === v, sw), 6000);
93
+ const bare = await fetch(BASE + '/api/workspaces/forget', { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ id: 'no-such' }) });
94
+ ok('S4 Remove is a page press: no nonce, no removal (403)', bare.status === 403, String(bare.status));
95
+ for (let i = A.reqs.length - 1; i >= 0; i--) if (/^POST \/api\/proactive\/settings$/.test(A.reqs[i])) A.reqs.splice(i, 1); // R10 below counts presses on a page where nothing was pressed
96
+ await p.keyboard.press('Escape'); }
79
97
 
80
98
  /* R2 */
81
99
  const hero = await p.evaluate(() => ({ text: document.querySelector('#brief').textContent, k: [...document.querySelectorAll('#brief .k')].map((x) => x.textContent) }));
@@ -65,6 +65,7 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
65
65
  /* M1 */
66
66
  const rail = await p.evaluate(() => ({ names: [...document.querySelectorAll('.rail .pl')].map((b) => b.textContent.trim()), cur: document.querySelector('.rail [aria-current="page"]').textContent.trim(), go: [...document.querySelectorAll('.rail [data-go]')].map((b) => b.dataset.go), pi: getComputedStyle(document.querySelector('.rail')).getPropertyValue('--pi').trim(), title: document.title }));
67
67
  ok('M1 the rail names four places, My work is current and the indicator sits on it', rail.names.join() === 'Briefing,My work,Board,Insights' && rail.cur === 'My work' && rail.go.join() === 'brief,work,init,rep' && rail.pi === '1', JSON.stringify(rail));
68
+ { const tc = await p.evaluate(() => { const a = document.querySelector('#toConsole'); if (!a) return null; const r = a.getBoundingClientRect(); return { href: a.getAttribute('href'), label: a.getAttribute('aria-label'), w: Math.round(r.width), h: Math.round(r.height), tab: a.tabIndex }; }); ok('M1 the header links to the console (premium-console-link)', tc && tc.href === '/c3.html' && tc.label === 'Open the console' && tc.w >= 44 && tc.h >= 44 && tc.tab === 0, JSON.stringify(tc)); }
68
69
  const res = await fetch(BASE + '/premium-work').then((r) => r.status);
69
70
  ok('M1 the page is served at /premium-work and /premium-work.html', res === 200 && (await fetch(BASE + '/premium-work.html')).status === 200);
70
71
  {
@@ -60,6 +60,7 @@ async function waitFor(page, fn, arg, ms = 8000) {
60
60
  ok('A6 a tab press leaves Settings', await waitFor(page, () => document.querySelector('[data-c3-pane="settings"]').hidden && !document.querySelector('[data-c3-pane="work"]').hidden));
61
61
  await page.click('[data-c3pg="more"]');
62
62
  ok('A7 the More menu has Settings', await waitFor(page, () => !!document.querySelector('.c3pg-menu [data-a="settings"]')));
63
+ ok('A7b the More menu opens the premium pages', await page.evaluate(() => { const a = document.querySelector('.c3pg-menu [data-a="premium"]'); return !!a && a.getAttribute('href') === '/premium.html' && a.textContent.trim() === 'Open premium'; }));
63
64
  await page.click('.c3pg-menu [data-a="settings"]');
64
65
  ok('A8 the More menu item opens Settings', await waitFor(page, () => !document.querySelector('[data-c3-pane="settings"]').hidden));
65
66
 
@@ -9,7 +9,11 @@ timestamp: 2026-10-18
9
9
 
10
10
  The premium Briefing is a page of its own at `/premium.html`. The console at `/` stays the default page. This page reads the repositories of the products you pick (see "Products"). It writes only when you press a button that says it records (see "What the buttons record"), plus one derived copy of its last answer, described below.
11
11
 
12
- A rail on the left names four places: Briefing, My work, Board and Insights. Briefing is on this page. The other three open the matching tab of the console.
12
+ A rail on the left names four places: Briefing, My work, Board and Insights. Each is a premium page.
13
+
14
+ Every premium page has an **Open the console** button beside the theme button. It opens the console at `/c3.html`, for the places premium does not have yet (agent sessions, Calendar, Settings). In the console, the More menu has **Open premium**, which opens this page.
15
+
16
+ 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.
13
17
 
14
18
  ## Products
15
19
 
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.260.0",
3
+ "version": "0.262.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.260.0",
9
+ "version": "0.262.0",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@xterm/addon-fit": "^0.11.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.260.0",
3
+ "version": "0.262.0",
4
4
  "private": true,
5
5
  "description": "PMOS Terminal Workspace — local companion hosting real PTYs beside the library and gates (D62)",
6
6
  "license": "MIT",
@@ -124,6 +124,7 @@ function toggleMore() {
124
124
  item(S.theme === 'dark' ? 'sun' : 'moon', S.theme === 'dark' ? 'Light theme' : 'Dark theme', () => setTheme(S.theme === 'dark' ? 'light' : 'dark')),
125
125
  ((b) => { b.firstChild.replaceWith(gearIcon('sm')); return b; })(item('info', 'Settings', () => showTab('settings', true), false, { 'data-a': 'settings' })),
126
126
  item('term', S.dockOpen ? 'Fold the dock' : 'Open the dock', () => { S.dockOpen = !S.dockOpen; keepDock(); syncDock(); }, false, { 'data-a': 'dockt' }, 'Ctrl J'),
127
+ el('a', { class: 'c3pg-mi', role: 'menuitem', href: '/premium.html', 'data-a': 'premium' }, c3ic('spark', 'sm'), el('span', null, 'Open premium')),
127
128
  el('a', { class: 'c3pg-mi', role: 'menuitem', href: '/classic.html' }, c3ic('term', 'sm'), el('span', null, 'Open the classic app')));
128
129
  S.root.append(S.menu); // on the page root with position:fixed, so no ancestor's overflow, transform or stacking order can hide it
129
130
  S.placeMenu = () => { const r = S.moreBtn.getBoundingClientRect(); const w = S.menu.offsetWidth || 220; S.menu.style.top = Math.round(r.bottom + 6) + 'px'; S.menu.style.left = Math.round(Math.max(8, Math.min(r.right - w, innerWidth - w - 8))) + 'px'; S.menu.style.maxHeight = Math.max(160, innerHeight - r.bottom - 14) + 'px'; };
@@ -1,5 +1,5 @@
1
1
  /* pm/premium-shell.js — what the premium Briefing and My work pages share: the theme, the toast, the standard dialog and the read-only agent's conversation (initiatives briefing-premium and my-work-premium). */
2
- import { pmPost } from './http.js';
2
+ import { pmGet, pmPost } from './http.js';
3
3
  export const $ = (s, r = document) => r.querySelector(s);
4
4
  export const $$ = (s, r = document) => [...r.querySelectorAll(s)];
5
5
  export const esc = (s) => String(s == null ? '' : s).replace(/[&<>"]/g, (c) => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;' }[c]));
@@ -20,6 +20,7 @@ export function flip() {
20
20
  }
21
21
  { const t = new URLSearchParams(location.search).get('theme') || store.get(THEME_KEY); theme(t); }
22
22
  $('#theme').onclick = flip; $('#theme2').onclick = flip;
23
+ { const b = $('#settingsBtn'); if (b) b.onclick = () => openSettings(); } // hoisted: the function below is declared, not assigned
23
24
 
24
25
  /* ── toast ──────────────────────────────────────────────────────────────────────────────────────────────── */
25
26
  let tt = null;
@@ -211,3 +212,52 @@ export function openAddDoc(o) {
211
212
  toast('Document added. It is saved on the record.'); closeDlg(); if (o.onAdded) await o.onAdded();
212
213
  };
213
214
  }
215
+
216
+ /* ── Settings: the two things that cannot be defaulted (initiative premium-settings) ────────────────────────────────────────────────────
217
+ * Workspaces: GET /api/workspaces · POST /api/workspaces, /api/workspaces/forget. Connectors: GET and POST /api/proactive/settings {briefSources}.
218
+ * Each press saves what the console's section saves, and nothing else. Every other setting runs on a default and stays in the console. */
219
+ const SRC = { calendar: 'Calendar', wispr: 'Wispr Flow', mail: 'Mail', slack: 'Slack', jira: 'Jira', confluence: 'Confluence', github: 'GitHub', drive: 'Google Drive', figma: 'Figma', website: 'Your websites' };
220
+ export async function openSettings() {
221
+ const M = { ws: null, src: null, err: '', busy: false };
222
+ const draw = () => {
223
+ const w = M.ws, s = M.src;
224
+ const wsRows = w === null ? '<p class="note">Reading the repositories.</p>' : w.length ? w.map((x) => `<div class="sr"><span class="sn"><b>${esc(x.label || x.name || x.id)}</b><em>${esc(x.root || '')}${x.home ? ' · home' : ''}</em></span>${x.home ? '' : `<button type="button" class="cta alt" data-rm="${esc(x.id)}">Remove</button>`}</div>`).join('') : '<p class="note">No repository is registered yet.</p>';
225
+ const srcRows = s === null ? '<p class="note">Reading the sources.</p>' : Object.keys(SRC).filter((k) => k in s).map((k) => `<div class="sr"><span class="sn"><b>${esc(SRC[k])}</b><em>${s[k] ? 'The Briefing reads it' : 'The Briefing does not read it'}</em></span><button type="button" class="fchip" role="switch" aria-checked="${s[k]}" aria-label="${esc(SRC[k])}: the Briefing reads it" data-src="${esc(k)}">${s[k] ? 'On' : 'Off'}</button></div>`).join('');
226
+ $('#oMain').innerHTML = `<article class="paper doc"><div class="addf">
227
+ <div><span class="label">Workspaces</span><p class="note" style="margin:0 0 8px">A workspace is one repository PMOS works in. Removing one forgets the address only; the folder is not deleted.</p>${wsRows}
228
+ <div class="two" style="margin-top:10px"><label><input id="stP" maxlength="500" placeholder="Folder path of a repository" aria-label="Folder path of a repository"></label><button type="button" class="cta" id="stAdd">Add repository</button></div></div>
229
+ <div><span class="label">Connectors</span><p class="note" style="margin:0 0 8px">Which sources the Briefing reads. PMOS keeps no passwords or keys; your Claude session reaches each tool through its own connectors.</p>${srcRows}</div>
230
+ <p class="note" id="stM" role="status" style="margin:0;min-height:1.2em">${esc(M.err)}</p>
231
+ <p class="note" style="margin:0">Everything else runs on a default. <a href="/c3.html?tab=settings">More settings in the console</a>.</p></div></article>`;
232
+ };
233
+ openDlg({ eye: 'Settings · real data', title: 'Settings', say: 'Two choices only: which repositories PMOS works in, and which sources the Briefing reads.', stream: turnA(ptx('Two choices only: which repositories PMOS works in, and which sources the Briefing reads. Each press saves that one record and changes nothing else.')), noteKey: null, pane: '<article class="paper doc"></article>', label: 'Settings' });
234
+ $('#askF').hidden = true; setMode('detail'); draw();
235
+ const load = async () => {
236
+ const [w, p] = await Promise.all([pmGet('/api/workspaces'), pmGet('/api/proactive/settings')]);
237
+ M.ws = w && Array.isArray(w.workspaces) ? w.workspaces : []; M.src = p && p.ok && p.settings ? { ...p.settings.briefSources } : {};
238
+ if (!w || !Array.isArray(w.workspaces)) M.err = 'The repositories could not be read.'; else if (!p || !p.ok) M.err = 'The sources could not be read.';
239
+ draw();
240
+ };
241
+ $('#oMain').onclick = async (e) => {
242
+ if (M.busy) return;
243
+ const rm = e.target.closest('[data-rm]'), sw = e.target.closest('[data-src]');
244
+ M.err = '';
245
+ if (rm) {
246
+ const x = M.ws.find((y) => y.id === rm.dataset.rm); if (!x) return;
247
+ M.busy = true; const r = await pmPost('/api/workspaces/forget', { id: x.id }); M.busy = false;
248
+ if (r && r.ok) { M.ws = M.ws.filter((y) => y.id !== x.id); toast('Removed ' + (x.label || x.name || x.id) + '. The folder is untouched.'); } else M.err = (r && (r.error || r.reason)) || 'Not removed.';
249
+ draw();
250
+ } else if (sw) {
251
+ const k = sw.dataset.src, on = !M.src[k];
252
+ M.busy = true; const r = await pmPost('/api/proactive/settings', { briefSources: { [k]: on } }); M.busy = false;
253
+ if (r && r.ok) { M.src[k] = on; toast((on ? 'The Briefing now reads ' : 'The Briefing no longer reads ') + SRC[k] + '.'); } else M.err = (r && r.error) || 'Not saved.';
254
+ draw();
255
+ } else if (e.target.closest('#stAdd')) {
256
+ const root = ($('#stP').value || '').trim(); if (!root) { M.err = 'Paste the folder path of a repository.'; draw(); return; }
257
+ M.busy = true; const r = await pmPost('/api/workspaces', { root, focus: false }); M.busy = false;
258
+ if (r && r.ok) { M.ws = [...M.ws.filter((y) => y.id !== r.workspace.id), r.workspace]; toast('Added ' + (r.workspace.name || root) + '.'); } else M.err = (r && r.error) || 'Not added.';
259
+ draw();
260
+ }
261
+ };
262
+ await load();
263
+ }
@@ -154,6 +154,7 @@ input[type=range]:active::-webkit-slider-thumb{transform:scale(1.15)}
154
154
  .cta.alt{background:var(--well);color:var(--ink)}
155
155
  .cta.alt{background:var(--card)}
156
156
  a.cta{text-decoration:none}
157
+ a.round{color:inherit;text-decoration:none}
157
158
  .cta:hover{transform:translateY(-2px)}
158
159
  .cta:active{transform:scale(.97)}
159
160
  .cta svg{width:18px;height:18px}
@@ -1279,3 +1280,10 @@ button.dsn:hover{box-shadow:inset 0 0 0 1.5px rgb(79,109,245)}
1279
1280
  /* initiative page: the pill and the theme button sit under the crumb as the mockup draws them; long file names in the check evidence wrap */
1280
1281
  .top:has(#iH1) .tools-top{flex-basis:100%;justify-content:flex-start}
1281
1282
  #cIniChk .ckr small{overflow-wrap:anywhere}
1283
+
1284
+ /* Settings dialog rows (initiative premium-settings) */
1285
+ .sr{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;padding:8px 0;border-bottom:1px solid var(--hair)}
1286
+ .sr .sn{display:grid;gap:2px;min-width:0}.sr .sn b{font-size:15px}.sr .sn em{font-style:normal;font-size:12.5px;color:var(--ink-3);overflow-wrap:anywhere}
1287
+ .sr button{min-height:44px;min-width:64px;flex:none}
1288
+ .sr .fchip[aria-checked="true"]{background:var(--solid);color:var(--on-solid)}
1289
+ @media (max-width:600px){.pkmenu{left:0;right:auto}} /* three round header buttons leave the picker too far left for a right-aligned menu (initiative premium-settings) */
@@ -35,6 +35,8 @@
35
35
  <h1 class="vh">Board</h1><div id="crumbHost"></div>
36
36
  <div class="tools tools-top"><span class="snap" id="snap">Reading the board</span>
37
37
  <span class="seg modeseg" id="modeSeg" role="group" aria-label="How an initiative opens"><i class="pill"></i><button data-m="page" aria-pressed="true">Page</button><button data-m="popup" aria-pressed="false">Popup</button></span>
38
+ <a class="glass round" id="toConsole" href="/c3.html" aria-label="Open the console" title="Open the console"><svg class="i" viewBox="0 0 24 24"><rect x="3" y="4" width="18" height="16" rx="3"/><path d="m7 9 3 3-3 3M13 15h4"/></svg></a>
39
+ <button class="glass round" id="settingsBtn" aria-label="Settings" title="Settings"><svg class="i" viewBox="0 0 24 24"><circle cx="12" cy="12" r="3"/><path d="M12 3v2M12 19v2M3 12h2M19 12h2M5.6 5.6 7 7M17 17l1.4 1.4M5.6 18.4 7 17M17 7l1.4-1.4"/></svg></button>
38
40
  <button class="glass round" id="theme" aria-label="Switch light or dark"><svg class="i" viewBox="0 0 24 24"><path d="M20 14.5A8 8 0 0 1 9.5 4 8 8 0 1 0 20 14.5z"/></svg></button></div>
39
41
  </header>
40
42
  <section class="hero hero-slim"><p class="brief rise" style="--d:2" id="brief" aria-live="polite"></p></section>
@@ -34,6 +34,8 @@
34
34
  <header class="top rise" style="--d:0">
35
35
  <h1 class="vh" id="iH1">Initiative</h1><div id="crumbHost"></div>
36
36
  <div class="tools tools-top"><span class="snap" id="snap">Reading the initiative</span>
37
+ <a class="glass round" id="toConsole" href="/c3.html" aria-label="Open the console" title="Open the console"><svg class="i" viewBox="0 0 24 24"><rect x="3" y="4" width="18" height="16" rx="3"/><path d="m7 9 3 3-3 3M13 15h4"/></svg></a>
38
+ <button class="glass round" id="settingsBtn" aria-label="Settings" title="Settings"><svg class="i" viewBox="0 0 24 24"><circle cx="12" cy="12" r="3"/><path d="M12 3v2M12 19v2M3 12h2M19 12h2M5.6 5.6 7 7M17 17l1.4 1.4M5.6 18.4 7 17M17 7l1.4-1.4"/></svg></button>
37
39
  <button class="glass round" id="theme" aria-label="Switch light or dark"><svg class="i" viewBox="0 0 24 24"><path d="M20 14.5A8 8 0 0 1 9.5 4 8 8 0 1 0 20 14.5z"/></svg></button></div>
38
40
  </header>
39
41
  <section class="hero hero-slim"><p class="brief rise" style="--d:2" id="brief" aria-live="polite"></p></section>
@@ -35,6 +35,8 @@
35
35
  <header class="top rise" style="--d:0">
36
36
  <h1 class="vh">Insights</h1><div id="crumbHost"></div>
37
37
  <div class="tools tools-top"><span class="snap" id="snap">Reading the records</span>
38
+ <a class="glass round" id="toConsole" href="/c3.html" aria-label="Open the console" title="Open the console"><svg class="i" viewBox="0 0 24 24"><rect x="3" y="4" width="18" height="16" rx="3"/><path d="m7 9 3 3-3 3M13 15h4"/></svg></a>
39
+ <button class="glass round" id="settingsBtn" aria-label="Settings" title="Settings"><svg class="i" viewBox="0 0 24 24"><circle cx="12" cy="12" r="3"/><path d="M12 3v2M12 19v2M3 12h2M19 12h2M5.6 5.6 7 7M17 17l1.4 1.4M5.6 18.4 7 17M17 7l1.4-1.4"/></svg></button>
38
40
  <button class="glass round" id="theme" aria-label="Switch light or dark"><svg class="i" viewBox="0 0 24 24"><path d="M20 14.5A8 8 0 0 1 9.5 4 8 8 0 1 0 20 14.5z"/></svg></button></div>
39
41
  </header>
40
42
  <section class="hero hero-slim"><p class="brief rise" style="--d:2" id="brief" aria-live="polite"></p></section>
@@ -34,6 +34,8 @@
34
34
  <header class="top rise" style="--d:0">
35
35
  <h1 class="vh">My work</h1><span class="glass name" aria-hidden="true">My work</span>
36
36
  <div class="tools tools-top"><span class="snap" id="snap">Reading your list</span>
37
+ <a class="glass round" id="toConsole" href="/c3.html" aria-label="Open the console" title="Open the console"><svg class="i" viewBox="0 0 24 24"><rect x="3" y="4" width="18" height="16" rx="3"/><path d="m7 9 3 3-3 3M13 15h4"/></svg></a>
38
+ <button class="glass round" id="settingsBtn" aria-label="Settings" title="Settings"><svg class="i" viewBox="0 0 24 24"><circle cx="12" cy="12" r="3"/><path d="M12 3v2M12 19v2M3 12h2M19 12h2M5.6 5.6 7 7M17 17l1.4 1.4M5.6 18.4 7 17M17 7l1.4-1.4"/></svg></button>
37
39
  <button class="glass round" id="theme" aria-label="Switch light or dark"><svg class="i" viewBox="0 0 24 24"><path d="M20 14.5A8 8 0 0 1 9.5 4 8 8 0 1 0 20 14.5z"/></svg></button></div>
38
40
  </header>
39
41
  <section class="hero">
@@ -36,6 +36,8 @@
36
36
  <h1 class="vh">Briefing</h1><span class="glass name" aria-hidden="true">Briefing</span>
37
37
  <div class="tools tools-top"><span class="snap" id="snap">Reading the repository</span>
38
38
  <span class="pkw" id="pkw" hidden><button class="fchip" id="pick" aria-haspopup="menu" aria-expanded="false" aria-controls="pickMenu">Products<em id="pickN"></em></button><div class="crmenu pkmenu" id="pickMenu" role="menu" hidden></div></span>
39
+ <a class="glass round" id="toConsole" href="/c3.html" aria-label="Open the console" title="Open the console"><svg class="i" viewBox="0 0 24 24"><rect x="3" y="4" width="18" height="16" rx="3"/><path d="m7 9 3 3-3 3M13 15h4"/></svg></a>
40
+ <button class="glass round" id="settingsBtn" aria-label="Settings" title="Settings"><svg class="i" viewBox="0 0 24 24"><circle cx="12" cy="12" r="3"/><path d="M12 3v2M12 19v2M3 12h2M19 12h2M5.6 5.6 7 7M17 17l1.4 1.4M5.6 18.4 7 17M17 7l1.4-1.4"/></svg></button>
39
41
  <button class="glass round" id="theme" aria-label="Switch light or dark"><svg class="i" viewBox="0 0 24 24"><path d="M20 14.5A8 8 0 0 1 9.5 4 8 8 0 1 0 20 14.5z"/></svg></button></div>
40
42
  </header>
41
43
  <section class="hero">
@@ -6255,6 +6255,8 @@ async function handleRequest(req, res) {
6255
6255
  // one row, as before. A refusal names its cause — unknown / home / sessions (R3.3).
6256
6256
  let body = {};
6257
6257
  try { body = JSON.parse((await readBody(req)) || '{}'); } catch {}
6258
+ const g = pmGuard.requirePagePress(req, body); // premium-settings: Remove is a page press, so an agent session gets 403
6259
+ if (!g.ok) return json(res, { ok: false, error: g.error }, g.status);
6258
6260
  if (body.repository) {
6259
6261
  const out = forgetRepository(body.id);
6260
6262
  return json(res, out, out.ok ? 200 : 409);