create-pmos 0.345.0 → 0.347.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.345.0",
3
+ "version": "0.347.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.347.0",
37
+ "at": "2026-10-20T06:13:15.916Z",
38
+ "f": 2,
39
+ "prs": [
40
+ {
41
+ "n": 945,
42
+ "t": "Background runs yield to working chat and /goal sessions; no new draft while one waits",
43
+ "s": "A chat or /goal session that is working counts toward the governor's parallel cap (3 while working, 8 while away), so background runs wait for it."
44
+ }
45
+ ]
46
+ },
47
+ {
48
+ "v": "0.346.0",
49
+ "at": "2026-10-20T05:59:24.111Z",
50
+ "f": 2,
51
+ "prs": [
52
+ {
53
+ "n": 942,
54
+ "t": "Artifact, Google Doc and Confluence links in a premium chat panel open beside the conversation",
55
+ "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."
56
+ },
57
+ {
58
+ "n": 943,
59
+ "t": "Text fields no longer zoom the premium pages on a phone",
60
+ "s": "On a touch screen every premium text field (input, textarea, select) uses 16 px type, so focus does not zoom the page."
61
+ }
62
+ ]
63
+ },
35
64
  {
36
65
  "v": "0.345.0",
37
66
  "at": "2026-10-20T05:50:20.786Z",
@@ -262,40 +291,6 @@
262
291
  "s": "Both open as a tab in the premium viewer, showing only what PMOS holds."
263
292
  }
264
293
  ]
265
- },
266
- {
267
- "v": "0.327.0",
268
- "at": "2026-10-19T23:09:42.241Z",
269
- "f": 2,
270
- "prs": [
271
- {
272
- "n": 921,
273
- "t": "Meeting prep on the Before stage of the note sheet",
274
- "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…"
275
- }
276
- ]
277
- },
278
- {
279
- "v": "0.326.0",
280
- "at": "2026-10-19T22:57:26.019Z",
281
- "f": 2,
282
- "prs": [
283
- {
284
- "n": 908,
285
- "t": "The Jira backlog of a board as a viewer tab",
286
- "s": "Open the backlog appears in the Board's Sprint dialog and on its sprint tab."
287
- },
288
- {
289
- "n": 916,
290
- "t": "Note recording in the premium viewer",
291
- "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."
292
- },
293
- {
294
- "n": 910,
295
- "t": "Hide whole-line HTML comments on the document page; log the S2 run",
296
- "s": "A whole-line HTML comment is kept in the page as a hidden block and is never drawn."
297
- }
298
- ]
299
294
  }
300
295
  ]
301
296
  }
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@8499d98d
1
+ kernel-source: pmos@01fb46aa
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:50:16Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-20T06:13:12Z"}
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:50:16Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-20T06:13:12Z"}
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:50:16Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-20T06:13:12Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -615,6 +615,14 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
615
615
  ok(`0 no page error at 390 px (${th})`, R.errors.length === 0, R.errors.join(' | '));
616
616
  await R.ctx.close();
617
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
+ }
618
626
 
619
627
  /* R12 fidelity: computed styles and geometry against the mockup */
620
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.347.0",
4
+ "at": "2026-10-20T06:13:15.916Z",
5
+ "f": 2,
6
+ "prs": [
7
+ {
8
+ "n": 945,
9
+ "t": "Background runs yield to working chat and /goal sessions; no new draft while one waits",
10
+ "s": "A chat or /goal session that is working counts toward the governor's parallel cap (3 while working, 8 while away), so background runs wait for it."
11
+ }
12
+ ]
13
+ },
14
+ {
15
+ "v": "0.346.0",
16
+ "at": "2026-10-20T05:59:24.111Z",
17
+ "f": 2,
18
+ "prs": [
19
+ {
20
+ "n": 942,
21
+ "t": "Artifact, Google Doc and Confluence links in a premium chat panel open beside the conversation",
22
+ "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."
23
+ },
24
+ {
25
+ "n": 943,
26
+ "t": "Text fields no longer zoom the premium pages on a phone",
27
+ "s": "On a touch screen every premium text field (input, textarea, select) uses 16 px type, so focus does not zoom the page."
28
+ }
29
+ ]
30
+ },
2
31
  {
3
32
  "v": "0.345.0",
4
33
  "at": "2026-10-20T05:50:20.786Z",
@@ -362,7 +362,7 @@ The premium Briefing is the default page: `/` and `/index.html` open it. The con
362
362
 
363
363
  ## The dialog on a phone and the document sheet's views
364
364
 
365
- 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.
366
366
 
367
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.
368
368
 
@@ -388,6 +388,7 @@ The conversation beside every premium dialog is a real Claude Code session. Anyt
388
388
  - **Stop** shows while Claude works. It presses Esc in the session.
389
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.
390
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.
391
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.
392
393
  - Answers from the older read-only agent stay above the session, marked "Earlier read-only answer".
393
394
 
@@ -372,14 +372,16 @@ function detect(facts, state, { now, stalledDays } = {}) {
372
372
  return out;
373
373
  }
374
374
 
375
- /** The lines the sweep appends now: one `blocker` per blocker per day, and for an agent blocker one `wake`. A target the PM
376
- * is blocking (an open proposal older than a day) starts no run, so its other blockers wake nothing; the pm-open blocker is
377
- * written once a day, which is what raises its Needs you row again. */
375
+ /** The lines the sweep appends now: one `blocker` per blocker per day, and for an agent blocker one `wake`. A target with any
376
+ * undecided proposal starts no run, so its blockers wake nothing until the PM decides: the agent drafts no more on a target than
377
+ * the PM has read. Only a proposal older than a day makes the PM the blocker (pm-open); that line is written once a day, which is
378
+ * what raises its Needs you row again. */
378
379
  function sweepLines(facts, state, { now, stalledDays } = {}) {
379
380
  const t = now == null ? facts.now : now;
380
381
  const day = facts.day || localDay(t);
381
382
  const blockers = detect(facts, state, { now: t, stalledDays });
382
383
  const pmBlocked = new Set(blockers.filter((b) => b.owner === 'pm').map((b) => targetKey(b.target)));
384
+ for (const b of blockers) if (openProposals(state, b.target).length) pmBlocked.add(targetKey(b.target));
383
385
  const lines = [];
384
386
  for (const b of blockers) {
385
387
  if (state.blockerDays.has(`${b.key}|${day}`)) continue;
@@ -2,21 +2,25 @@
2
2
  /* orchestrator-spawn.js — puts the scheduled background jobs under the orchestrator gate (initiative agent-orchestrator, PRD "Capacity
3
3
  * governor" and "Gates that stay yours").
4
4
  *
5
- * wrap({ gate, spawn, driverRunning }) → { spawn(spec), running() }
5
+ * wrap({ gate, spawn, driverRunning, pmWorking }) → { spawn(spec), running(), own() }
6
6
  *
7
7
  * `spawn(spec)` is used ONLY by the schedule ticks (the core documents, the weekly report finder). A run the PM starts by a press uses the
8
8
  * plain spawn and is never counted or held. Before it starts a run the wrapper asks gate.mayStart. A held start returns an exited session
9
9
  * row with a note and `held: true`, which the callers already read as "could not start"; they try again on their next tick, so nothing is
10
10
  * lost or refused. The report design and report structure ticks also use it (lib/routes-report-design.js sweep, routes-report-structure.js checks).
11
11
  * A run that started is counted toward the day's cap (gate.granted). The count of running runs adds the Driver's runs to the runs
12
- * started here that have not ended, so the cap covers all orchestrator work together. */
13
- function wrap({ gate, spawn, driverRunning = () => 0 }) {
12
+ * started here that have not ended, so the cap covers all orchestrator work together. It also adds `pmWorking`: the PM's chat-panel
13
+ * sessions (a /goal included) that are working now. Those are never held or counted toward the daily cap, but they use the same
14
+ * machine and the same usage, so background work yields to them. `own()` is the runs started here alone, for the Driver's own ask. */
15
+ function wrap({ gate, spawn, driverRunning = () => 0, pmWorking = () => 0 }) {
14
16
  const live = new Set();
15
17
  const prune = () => { for (const s of [...live]) if (!s || s.state === 'exited') live.delete(s); };
16
- const running = () => { prune(); return live.size + (Number(driverRunning()) || 0); };
18
+ const n = (f) => { try { return Number(f()) || 0; } catch { return 0; } };
19
+ const own = () => { prune(); return live.size; };
20
+ const running = () => own() + n(driverRunning) + n(pmWorking);
17
21
  function held(reason) { return { id: null, state: 'exited', headless: null, held: true, note: `held by the capacity governor: ${reason}` }; }
18
22
  return {
19
- running,
23
+ running, own,
20
24
  spawn(spec) {
21
25
  let g = { allowed: true };
22
26
  try { g = gate.mayStart({ running: running() }) || g; } catch { /* a broken gate must not stop the PM's schedules */ }
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.345.0",
3
+ "version": "0.347.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.345.0",
9
+ "version": "0.347.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.345.0",
3
+ "version": "0.347.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",
@@ -191,7 +191,10 @@ const BRIEFING = { ok: true, items: [{ title: 'Refund reason codes needs an anch
191
191
  await heading(A.page, /Welcome to PMOS/);
192
192
  await mp.close(); mp = await (await mkOf(w, th)).newPage(); await mp.goto('file://' + mockupFile); await CT.applyToPage(mp, CT_VENDOR); await mp.evaluate((t) => { document.documentElement.dataset.theme = t; }, th); await mp.waitForTimeout(500);
193
193
  const diffs = [];
194
- for (const [name, sel, props] of CMP) { const a = await css(A.page, sel, props), m = await css(mp, sel, props); if (a !== m) diffs.push(`${name}: ${a} vs ${m}`); }
194
+ // on a touch phone a text field is 16 px so focus does not zoom the page (premium.css); the mockup's 14 px and its line height do not apply there
195
+ const TOUCH = w === 390 ? { '.wl-f input': ['fontSize'], '.wl-f textarea': ['lineHeight'] } : {};
196
+ for (const [name, sel, all] of CMP) { const props = all.filter((k) => !(TOUCH[sel] || []).includes(k)); const a = await css(A.page, sel, props), m = await css(mp, sel, props); if (a !== m) diffs.push(`${name}: ${a} vs ${m}`); }
197
+ if (w === 390) diffs.push(...(await A.page.evaluate(() => ['.wl-f input', '.wl-f textarea'].map((s) => getComputedStyle(document.querySelector(s)).fontSize).filter((f) => f !== '16px').map((f) => 'a text field on a touch phone: ' + f))));
195
198
  ok(`R11 fidelity at ${w} px (${th}): About you keeps the mockup's type, radii, colours and sizes`, diffs.length === 0, diffs.join(' ; '));
196
199
  const scrolls = [];
197
200
  const floor = async (label) => scrolls.push(await A.page.evaluate((l) => ({ l, scroll: document.documentElement.scrollWidth <= innerWidth + 1, btn: [...document.querySelectorAll('#wlCard button, #wlSkip')].filter((b) => b.offsetParent).map((b) => Math.round(b.getBoundingClientRect().height)) }), label));
@@ -17,6 +17,17 @@ export function looksFile(t) {
17
17
  if (!/\.[A-Za-z0-9]{1,10}$/.test(s)) return false;
18
18
  return s.includes('/') || DOC_EXT.test(s);
19
19
  }
20
+ /* A Claude artifact, a Google Doc, Sheet or Slides file, or a Confluence page opens beside the conversation too (PM, 2026-10-20: "Claude artefact should
21
+ * also can be clicked and show on the detail panel … As well as Google docs link, confluence link"). The link keeps its address, so a new-tab open still works. */
22
+ /** 'artifact' | 'google' | 'confluence' | null for an (escaped) http(s) address. Pure. */
23
+ export function webKind(u) {
24
+ const s = String(u || '').replace(/&amp;/g, '&');
25
+ if (/^https:\/\/claude\.ai\/(code\/)?artifact\/[\w-]+/i.test(s)) return 'artifact';
26
+ if (/^https:\/\/(docs|drive)\.google\.com\//i.test(s)) return 'google';
27
+ if (/^https:\/\/[\w.-]+\.atlassian\.net\/wiki\//i.test(s) || /^https?:\/\/[^/\s]+\/(wiki|confluence)\/.*(pages|display|viewpage|spaces)/i.test(s)) return 'confluence';
28
+ return null;
29
+ }
30
+ const link = (u, txt) => { const k = webKind(u); return `<a href="${u}" target="_blank" rel="noopener noreferrer"${k ? ` data-web="${k}"` : ''}>${txt}</a>`; };
20
31
  const fileBtn = (p, label) => `<button type="button" class="fpath" data-file="${p}" title="Open ${p} beside the conversation">${label}</button>`;
21
32
 
22
33
  /** One line's inline marks, on text that is already escaped: `code`, [links](https://…), bare URLs, file paths, **bold**, *italic*, ~~struck~~. */
@@ -24,9 +35,10 @@ function inline(t) {
24
35
  const keep = [];
25
36
  const hold = (h) => '\u0000' + (keep.push(h) - 1) + '\u0000';
26
37
  let s = t.replace(/`([^`]+)`/g, (_, c) => hold(looksFile(c.trim()) ? fileBtn(c.trim(), `<code>${c}</code>`) : `<code>${c}</code>`));
27
- s = s.replace(/\[([^\]]+)\]\((https?:\/\/[^\s)]+)\)/g, (_, txt, u) => hold(`<a href="${u}" target="_blank" rel="noopener noreferrer">${txt}</a>`));
38
+ s = s.replace(/\[([^\]]+)\]\((https?:\/\/[^\s)]+)\)/g, (_, txt, u) => hold(link(u, txt)));
39
+ s = s.replace(/&lt;(https?:\/\/[^\s<>]+?)&gt;/g, (_, u) => hold(link(u, u)));
28
40
  s = s.replace(/\[([^\]]+)\]\(([^\s)]+)\)/g, (m, txt, u) => (looksFile(u) ? hold(fileBtn(u, txt)) : m));
29
- s = s.replace(/(^|[\s(])(https?:\/\/[^\s<]+[^\s<.,;:!?)])/g, (_, pre, u) => pre + hold(`<a href="${u}" target="_blank" rel="noopener noreferrer">${u}</a>`));
41
+ s = s.replace(/(^|[\s(])(https?:\/\/[^\s<]+[^\s<.,;:!?)])/g, (_, pre, u) => pre + hold(link(u, u)));
30
42
  s = s.replace(/(^|[\s(])((?:~|\.{1,2})?\/[^\s<()]*[^\s<().,;:!?])/g, (m, pre, u) => (looksFile(u) ? pre + hold(fileBtn(u, u)) : m));
31
43
  s = s.replace(/(\*\*|__)(?=\S)([\s\S]*?\S)\1/g, '<strong>$2</strong>')
32
44
  .replace(/(^|[^*\w])\*(?=\S)([^*]*?\S)\*(?!\*)/g, '$1<em>$2</em>')
@@ -2,11 +2,11 @@
2
2
  import { pmGet, pmPost } from './http.js';
3
3
  import { recChipView, STOP_LINE } from './premium-meeting.js';
4
4
  import { vwReset } from './premium-viewer.js';
5
- import { openChatFile } from './premium-vw-file.js';
5
+ import { openChatFile, openWebLink } from './premium-vw-file.js';
6
6
  import { chipActs, openLive, openFocus, mountRecord, HL_LINE } from './premium-vw-rec.js';
7
7
  import { lineItems, behindOf, refreshTargets, whenRead } from './freshness-words.js';
8
8
  import { splitGoal, shownUser, goalBlockHtml, goalProgressHtml, slashMatches } from './goal-chat.js';
9
- import { mdHtml, userHtml, toolLine } from './chat-md.js';
9
+ import { mdHtml, userHtml, toolLine, webKind } from './chat-md.js';
10
10
  export const $ = (s, r = document) => r.querySelector(s);
11
11
  export const $$ = (s, r = document) => [...r.querySelectorAll(s)];
12
12
  export const esc = (s) => String(s == null ? '' : s).replace(/[&<>"]/g, (c) => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;' }[c]));
@@ -314,6 +314,16 @@ $('#dBody').addEventListener('click', (e) => {
314
314
  openChatFile(f.dataset.file, { session: S.session || null, ws: new URLSearchParams(location.search).get('ws') });
315
315
  if (innerWidth < 1000) setTab('out');
316
316
  });
317
+ /* a Claude artifact, Google Doc or Confluence link in the conversation or in a page the viewer shows opens as a viewer tab too; other links open a new tab */
318
+ const onWebLink = (e) => {
319
+ const a = e.target.closest('a[href]'); if (!a || e.metaKey || e.ctrlKey || e.shiftKey || e.button) return;
320
+ if (!a.closest('#dBody .md, #dOut .cfb, #dOut .cpv-page')) return; // Claude's words and a page's own text; a view's Open in buttons keep opening the tool
321
+ const k = webKind(a.getAttribute('href')); if (!k) return;
322
+ e.preventDefault();
323
+ openWebLink(a.getAttribute('href'), k, a.textContent.trim(), { ws: new URLSearchParams(location.search).get('ws') });
324
+ if (innerWidth < 1000) setTab('out');
325
+ };
326
+ $('#dBody').addEventListener('click', onWebLink); $('#dOut').addEventListener('click', onWebLink);
317
327
  /* /goal (slice 2): a chip sends its answer; Start and Cancel are the PM's presses on the goal card; Change something hands the box back. */
318
328
  async function sendText(key, text) {
319
329
  const go = $('#askGo'); if (go) go.disabled = true; $('#askNote').textContent = 'Sending.';
@@ -25,6 +25,7 @@ export function inl(s) {
25
25
  .replace(/(^|[\s(])[_*]([^_*\s][^_*]*)[_*](?=[\s.,;:)!?]|$)/g, '$1<em>$2</em>')
26
26
  .replace(/~~([^~]+)~~/g, '<s>$1</s>')
27
27
  .replace(/\[([^\]]+)\]\(([^)\s]+)\)/g, (m, t, u) => `<a href="${/^(https?:|mailto:|#|\/)/i.test(u.replace(/&amp;/g, '&')) ? u : '#'}"${/^https?:/i.test(u) ? ' target="_blank" rel="noopener"' : ''}>${t}</a>`)
28
+ .replace(/&lt;(https?:\/\/[^\s<>]+?)&gt;/g, '<a href="$1" target="_blank" rel="noopener">$1</a>') // an <https://…> autolink, as GitHub draws it
28
29
  .replace(/(^|[\s(])(\d{4}-\d{2}-\d{2})(?=$|[\s.,;:)])/g, (m, a, d) => (dayOf(d) ? a + dtp(d) : m));
29
30
  return h.replace(/\u0000(\d+)\u0000/g, (m, i) => `<code>${codes[i]}</code>`);
30
31
  }
@@ -9,6 +9,7 @@
9
9
  .vwmut{color:var(--ink-3);font-size:var(--fs-2);margin:0}
10
10
  .vwline{margin:0 0 10px}
11
11
  .vwfnone{margin:8px 0;padding:22px 20px;border:1px dashed var(--hair);border-radius:8px;display:grid;gap:6px;color:var(--ink-2);font-size:var(--fs-3)}
12
+ .vwart .vwbtn{text-decoration:none;justify-self:start}
12
13
  .vwfnone b{font-weight:500;color:var(--ink)}
13
14
  .vwfnone code{font:400 var(--fs-1) var(--mono);color:var(--ink-3);overflow-wrap:anywhere}
14
15
  .vwempty{color:var(--ink-3);font-size:var(--fs-3);padding:24px 4px}
@@ -70,3 +70,22 @@ export function openChatFile(p, ctx = {}) {
70
70
  st.sig = ''; st.f = { loading: true, path: p }; tick();
71
71
  return pane;
72
72
  }
73
+
74
+ /* ── a web link in Claude's words (PM, 2026-10-20): a Google Doc or Confluence page opens in the viewer's copy view (premium-vw-copies.js: what PMOS holds,
75
+ * and Read it now). A Claude artifact cannot be drawn inside PMOS: claude.ai refuses to be shown in another site's frame (frame-ancestors 'self'), and the
76
+ * server never fetches it (D53). Its tab names the artifact and opens it in Claude. ── */
77
+ /** The artifact tab as HTML. Pure. */
78
+ export function artifactHtml(url, label) {
79
+ const name = label && label !== url ? label : 'Claude artifact';
80
+ return `<div class="vwdoc"><div class="vwfnone vwart" role="status"><b>${esc(name)}</b><p class="vwmut">A Claude artifact opens in Claude: claude.ai does not let another site show its pages inside them, so PMOS cannot draw it here.</p>`
81
+ + `<div class="vwrow"><a class="vwbtn pri" href="${esc(url)}" target="_blank" rel="noopener noreferrer">Open in Claude</a></div><code>${esc(url)}</code></div></div>`;
82
+ }
83
+ /** Open a web link beside the conversation. kind is chat-md.js webKind(): 'artifact' | 'google' | 'confluence'. */
84
+ export async function openWebLink(url, kind, label, ctx = {}) {
85
+ if (kind === 'google' || kind === 'confluence') {
86
+ const { openCopy } = await import('./premium-vw-copies.js');
87
+ return openCopy({ ws: ctx.ws || undefined, url, title: label && label !== url ? label : undefined, where: 'linked in the conversation' });
88
+ }
89
+ vwStyle('doc');
90
+ return vwOpen({ id: 'web:' + url, title: label && label !== url ? label : 'Claude artifact', icon: 'doc', render: (el) => { el.innerHTML = artifactHtml(url, label); } });
91
+ }
@@ -359,7 +359,8 @@ a.round{color:inherit;text-decoration:none}
359
359
  /* a phone: the dialog's panes scroll under its title with no edge of their own, so text slid up to the subtitle and read as overlapping it (PM, 2026-10-20).
360
360
  The top of each scrolling pane now fades, and the viewer's tab strip, which stays at the top, carries the dialog's own surface. */
361
361
  .dlg .dgrid .pane{padding-top:12px;-webkit-mask-image:linear-gradient(to bottom,transparent 0,var(--ink) 14px);mask-image:linear-gradient(to bottom,transparent 0,var(--ink) 14px)}
362
- .otop:has(.vtabs:not([hidden])){top:0;padding-top:12px;margin-top:-12px;background:var(--card-solid)}
362
+ .dlg .dgrid .pane:has(.vtabs:not([hidden])){padding-top:0;-webkit-mask-image:none;mask-image:none}
363
+ .otop:has(.vtabs:not([hidden])){top:0;padding-top:4px;background:var(--card-solid)}
363
364
  .obody{padding:0}
364
365
  .paper.doc{padding:2px 0 28px;border:0;box-shadow:none;background:transparent;border-radius:0}
365
366
  .doc .dpath{display:none}}
@@ -2261,3 +2262,7 @@ button.wl-row[aria-pressed="true"] .wl-tog{background:var(--solid);color:var(--o
2261
2262
  .ub{white-space:normal}
2262
2263
  .toolline{display:block;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font:400 var(--fs-1) var(--mono);color:var(--ink-3);opacity:.85}
2263
2264
  .toolline::before{content:"";display:inline-block;vertical-align:middle;margin:0 8px 2px 0;width:6px;height:6px;border-radius:50%;background:var(--ink-3);opacity:.6}
2265
+
2266
+ /* phone: iOS zooms the whole page in when a text field under 16px gets focus, and leaves it zoomed (send button off the right edge, sheets at
2267
+ * three quarters of the screen). Every text field is 16px on a touch screen, so focus never zooms. */
2268
+ @media (pointer:coarse){input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=button]):not([type=submit]):not([type=reset]):not([type=file]):not([type=color]):not([type=image]),textarea,select{font-size:var(--fs-4)!important}}
@@ -2592,7 +2592,7 @@ const dashboardScheduleTick = () => {
2592
2592
  const orchQuota = require('./lib/orchestrator-quota.js');
2593
2593
  const orchGate = require('./lib/orchestrator-gate.js').create({ dir: STATE, quota: () => orchQuota.gateQuota(STATE), ...(process.env.PMOS_TICK_MS ? { load: () => null } : { defaultBackupDir: path.join(require('os').homedir(), 'pmos-backups') }) });
2594
2594
  const driver = driverRunLib.create({
2595
- mayStart: ({ running }) => orchGate.mayStart({ running }),
2595
+ mayStart: ({ running }) => orchGate.mayStart({ running: running + orchSpawn.own() + chatWorking() }),
2596
2596
  started: () => orchGate.granted(),
2597
2597
  workspaces: () => [...workspaces.values()],
2598
2598
  isLead: (w) => isPlanNeedsTree(w),
@@ -2614,7 +2614,14 @@ const driverTick = () => { try { driver.tick({}); } catch (e) { warnWriteFail('d
2614
2614
  let orchLastTickAt = null, orchBackupRunning = false;
2615
2615
  // agent-orchestrator: the scheduled background jobs (core documents, the weekly finder) start through the gate, so the stop switch, the
2616
2616
  // away/working caps and the daily cap govern them with the Driver. A press by the PM uses the plain spawnSession and is never held.
2617
- const orchSpawn = require('./lib/orchestrator-spawn.js').wrap({ gate: orchGate, spawn: (spec) => spawnSession(spec), driverRunning: () => driver.active().length });
2617
+ // The PM's chat-panel sessions (origin chat:<key>, a /goal included) that are working now count toward the parallel cap, so background
2618
+ // runs yield to them; they are never held and never count toward the daily cap (a press by the PM).
2619
+ function chatWorking(now = Date.now()) {
2620
+ let k = 0;
2621
+ for (const s of sessions.values()) if (String(s.origin || '').startsWith('chat:') && s.state !== 'exited' && harness.deriveState(s.state, s.lastOutputAt, now).state === 'working') k++;
2622
+ return k;
2623
+ }
2624
+ const orchSpawn = require('./lib/orchestrator-spawn.js').wrap({ gate: orchGate, spawn: (spec) => spawnSession(spec), driverRunning: () => driver.active().length, pmWorking: () => chatWorking() });
2618
2625
  // agent-orchestrator: the keep rate of the agent's items, read from every registered repository's Driver and core-document ledgers (cached a minute)
2619
2626
  let orchKeepCache = null;
2620
2627
  const orchKeepRate = () => {