create-pmos 0.382.0 → 0.384.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 +30 -35
- package/payload/KIT-VERSION +1 -1
- package/payload/planning/evals/eval-calibration.md +1 -1
- package/payload/planning/okrs/health-budgets.md +1 -1
- package/payload/state/discoveries.md +1 -1
- package/workspace/REMOTE.md +39 -0
- package/workspace/briefing-premium-initiative-test.js +9 -0
- package/workspace/briefing-premium-test.js +1 -1
- package/workspace/changelog.json +29 -0
- package/workspace/guide/briefing-premium.md +6 -1
- package/workspace/lib/lead-cli.js +63 -0
- package/workspace/lib/my-work-premium.js +29 -3
- package/workspace/lib/pmos-verbs.js +3 -0
- package/workspace/lib/popup-leads.js +68 -0
- package/workspace/lib/routes-briefing-premium.js +4 -1
- package/workspace/lib/routes-pm-items.js +5 -2
- package/workspace/lib/share-store.js +150 -0
- package/workspace/lib/work-assigned.js +12 -1
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-viewer-share-test.js +208 -0
- package/workspace/public/pm/premium-shell.js +19 -0
- package/workspace/public/pm/premium-vw-doc.css +30 -0
- package/workspace/public/pm/premium-vw-file.js +22 -10
- package/workspace/public/pm/premium-vw-share.js +112 -0
- package/workspace/public/pm/premium-work.js +18 -3
- package/workspace/public/pm/premium.css +11 -0
- package/workspace/public/pm/premium.js +3 -1
- package/workspace/server.js +65 -0
- package/workspace/share-server.js +135 -0
- package/workspace/test-lists/popup-context.json +5 -0
- package/workspace/test-lists/premium-viewer-share.json +5 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.384.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.384.0",
|
|
37
|
+
"at": "2026-10-21T13:39:28.616Z",
|
|
38
|
+
"f": 2,
|
|
39
|
+
"prs": [
|
|
40
|
+
{
|
|
41
|
+
"n": 993,
|
|
42
|
+
"t": "A Work item from the brief opens on its source",
|
|
43
|
+
"s": "A Work item from the brief opens on its source"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"n": 995,
|
|
47
|
+
"t": "Claude's stored lead shows first in a popup, with Refresh",
|
|
48
|
+
"s": "Claude's stored lead shows first in a popup, with Refresh"
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"v": "0.383.0",
|
|
54
|
+
"at": "2026-10-21T13:13:17.082Z",
|
|
55
|
+
"f": 2,
|
|
56
|
+
"prs": [
|
|
57
|
+
{
|
|
58
|
+
"n": 994,
|
|
59
|
+
"t": "Share a viewer file as a password link that needs no Cloudflare login",
|
|
60
|
+
"s": "Share a viewer file as a password link that needs no Cloudflare login"
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
},
|
|
35
64
|
{
|
|
36
65
|
"v": "0.382.0",
|
|
37
66
|
"at": "2026-10-21T12:58:18.296Z",
|
|
@@ -282,40 +311,6 @@
|
|
|
282
311
|
"s": "The brief is derived content, following the rule Wawan set on 2026-10-21."
|
|
283
312
|
}
|
|
284
313
|
]
|
|
285
|
-
},
|
|
286
|
-
{
|
|
287
|
-
"v": "0.364.0",
|
|
288
|
-
"at": "2026-10-21T00:58:08.077Z",
|
|
289
|
-
"f": 2,
|
|
290
|
-
"prs": [
|
|
291
|
-
{
|
|
292
|
-
"n": 967,
|
|
293
|
-
"t": "Chat is its own page, with the sessions on it",
|
|
294
|
-
"s": "Chat is its own page, with the sessions on it"
|
|
295
|
-
},
|
|
296
|
-
{
|
|
297
|
-
"n": 970,
|
|
298
|
-
"t": "Each tool the Briefing uses gets a stored read (briefing-source-flow, slice 1)",
|
|
299
|
-
"s": "Each tool the Briefing uses gets a stored read (briefing-source-flow, slice 1)"
|
|
300
|
-
}
|
|
301
|
-
]
|
|
302
|
-
},
|
|
303
|
-
{
|
|
304
|
-
"v": "0.363.0",
|
|
305
|
-
"at": "2026-10-21T00:46:24.704Z",
|
|
306
|
-
"f": 2,
|
|
307
|
-
"prs": [
|
|
308
|
-
{
|
|
309
|
-
"n": 965,
|
|
310
|
-
"t": "Chat is the big middle place in the premium rail",
|
|
311
|
-
"s": "Chat is the big middle place in the premium rail"
|
|
312
|
-
},
|
|
313
|
-
{
|
|
314
|
-
"n": 966,
|
|
315
|
-
"t": "The meeting detail is one scroll with a short head on a phone",
|
|
316
|
-
"s": "The meeting detail is one scroll with a short head on a phone"
|
|
317
|
-
}
|
|
318
|
-
]
|
|
319
314
|
}
|
|
320
315
|
]
|
|
321
316
|
}
|
package/payload/KIT-VERSION
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Reference
|
|
3
3
|
title: "Eval calibration log"
|
|
4
4
|
description: "Append-only record of every PM override of an evaluator verdict."
|
|
5
|
-
generated: {by: process:create-pmos, at: "2026-10-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-21T13:39:25Z"}
|
|
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-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-21T13:39:25Z"}
|
|
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-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-21T13:39:25Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
package/workspace/REMOTE.md
CHANGED
|
@@ -212,6 +212,45 @@ Run these from a machine that is **not** signed in to Access:
|
|
|
212
212
|
| `PMOS_PUBLIC_HOST=<hostname>` | Opt in. Add this one bare hostname to the Host allowlist, and require the token and the Access header for requests to it. The server still binds loopback only (plus the tailnet when `PMOS_REMOTE=tailnet` is also set). A scheme, port, path, IP address or `localhost` is refused, and the server does not start. |
|
|
213
213
|
| `PMOS_TOKEN=<t>` | The workspace token. Recommended in this mode. Never printed. |
|
|
214
214
|
|
|
215
|
+
## Share links (a second hostname, without Access)
|
|
216
|
+
|
|
217
|
+
A share link lets someone with no PMOS and no Cloudflare login read a copy of one file. You make it from the share icon of a file in the viewer (D97). The link names a second hostname, by default `share.` followed by your Online hostname's domain: with Online at `pmos.pm-os.app`, links read `https://share.pm-os.app/s/<id>`. To name another hostname, set `PMOS_SHARE_HOST`.
|
|
218
|
+
|
|
219
|
+
A separate server answers that hostname. It is not the workspace server. It listens on `127.0.0.1` only, on the workspace port plus one (7434 by default; `PMOS_SHARE_PORT` changes it). It can read only the shared copies and has no terminals, no API and no settings. The workspace starts it when you make your first link and stops it with itself. Your workspace hostname keeps its Access sign-in.
|
|
220
|
+
|
|
221
|
+
Do these steps one time, on the computer that runs the workspace:
|
|
222
|
+
|
|
223
|
+
1. **Route the hostname to the tunnel:**
|
|
224
|
+
|
|
225
|
+
```sh
|
|
226
|
+
cloudflared tunnel route dns pmos share.pm-os.app
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
2. **Add one ingress rule** to `~/.cloudflared/config.yml`, above the last rule:
|
|
230
|
+
|
|
231
|
+
```yaml
|
|
232
|
+
ingress:
|
|
233
|
+
- hostname: pmos.pm-os.app
|
|
234
|
+
service: http://127.0.0.1:7433
|
|
235
|
+
- hostname: share.pm-os.app
|
|
236
|
+
service: http://127.0.0.1:7434
|
|
237
|
+
- service: http_status:404
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
3. **Do not add an Access application for `share.pm-os.app`.** If a wildcard application (`*.pm-os.app`) covers it, add a second application for `share.pm-os.app` with one policy: **Bypass**, **Everyone**. The share server has its own password check.
|
|
241
|
+
|
|
242
|
+
4. Turn Online off and on again in **Settings › Online**, so the tunnel reads the new rule.
|
|
243
|
+
|
|
244
|
+
Check it: open `https://share.pm-os.app/robots.txt` in a private window. It shows `Disallow: /` with no sign-in. Any other path shows "Not found". A link opens only while this computer is on and Online runs.
|
|
245
|
+
|
|
246
|
+
What a link does:
|
|
247
|
+
|
|
248
|
+
- **A copy, not the file.** The link serves the file as it was when you pressed Create link. Later edits are not shared.
|
|
249
|
+
- **Password.** On by default, with a generated password you can change or turn off. It is stored as a hash. Five wrong tries lock the link for 15 minutes.
|
|
250
|
+
- **End date.** 1, 7 or 30 days, 7 by default. There is no "never". When a link ends, or you press **Turn off**, its copy is deleted at once.
|
|
251
|
+
- **Secrets.** PMOS scans the file first. A key or token in the file stops the link, and the message names what it found.
|
|
252
|
+
- **No indexing, no caching, no log.** Every answer tells search engines not to index it and Cloudflare not to cache it. No IP address or header is kept, only a view count and the last view time.
|
|
253
|
+
|
|
215
254
|
## Troubleshooting
|
|
216
255
|
|
|
217
256
|
- **`403` "the public host is only reachable through Cloudflare Access"** — the request reached the workspace without passing Access. Create the Access application for the hostname (Setup step 3).
|
|
@@ -127,6 +127,15 @@ const HEALTH = { ok: true, path: 'planning/prd/self-serve-v2-prd.md', health: {
|
|
|
127
127
|
await p.locator('#cIniTk .tkq').first().click(); await until(() => p.evaluate(() => document.querySelector('#dlg').classList.contains('on'))); await sleep(500);
|
|
128
128
|
const td = await p.evaluate(() => ({ title: document.querySelector('#dTitle').textContent, grid: [...document.querySelectorAll('#oMain .kv2 span')].map((s) => s.textContent).join('|'), ask: document.querySelector('#askF').hidden, seg: !!document.querySelector('#oMain .tkst') }));
|
|
129
129
|
ok('I6 a Jira task opens its record as a grid, read-only: no status control, and its own conversation (premium-popup-context P1)', td.title === 'Sandbox key step' && /Reference\|ONB-12\|Source\|Jira \(read-only\)/.test(td.grid) && td.ask === false && td.seg === false, JSON.stringify(td));
|
|
130
|
+
// popup context slice 3 (L2, L3): the stored lead comes first, with its time and reads, and Refresh asks the popup's own session
|
|
131
|
+
A.setThread({ ok: true, working: false, turns: [], lead: { text: 'ONB-12 waits on the sandbox key. Ask Sam for a date.', cites: ['Jira read 07:02'], at: new Date().toISOString() } });
|
|
132
|
+
await p.keyboard.press('Escape'); await until(() => p.evaluate(() => !document.querySelector('#dlg').classList.contains('on')));
|
|
133
|
+
await p.locator('#cIniTk .tkq').first().click(); await until(() => p.evaluate(() => !!document.querySelector('#dlg.on #leadT .plead')), 6000);
|
|
134
|
+
const ld = await p.evaluate(() => { const s = document.querySelector('#dBody .stream'); return { first: s.firstElementChild && s.firstElementChild.id, text: document.querySelector('#leadT').textContent }; });
|
|
135
|
+
ok('I6 a task popup shows Claude\'s stored lead first, with when it was written and what it read (popup context L2)', ld.first === 'leadT' && /waits on the sandbox key/.test(ld.text) && /Lead · written \d\d:\d\d · from Jira read 07:02/.test(ld.text), JSON.stringify(ld));
|
|
136
|
+
{ const nA = A.posts.length; await p.click('#leadT [data-lead="refresh"]');
|
|
137
|
+
ok('I6 Refresh asks the popup\'s own session to write the lead again and save it with pmos lead put (popup context L3)', await until(() => A.posts.slice(nA).some((x) => x.path === '/api/briefing-premium/ask' && /^pop:task:/.test(x.body.key) && x.body.text.includes('pmos lead put --key ' + x.body.key))), JSON.stringify(A.posts.slice(nA))); }
|
|
138
|
+
A.setThread({ ok: true, working: false, turns: [] });
|
|
130
139
|
await p.keyboard.press('Escape'); await until(() => p.evaluate(() => !document.querySelector('#dlg').classList.contains('on')));
|
|
131
140
|
/* a PMOS task: its status can be changed */
|
|
132
141
|
A.set({ status: 200, body: { ok: true, item: {} } });
|
|
@@ -306,7 +306,7 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
|
|
|
306
306
|
ok('R11 the page behind the dialog is inert and the dialog is modal', d.inert && d.role === 'true');
|
|
307
307
|
ok('R4 the dialog offers Pin to the top for a list row (premium-calmer-first-screen)', await p.evaluate(() => { const b = document.querySelector('#card .dpin'); return !!b && /Pin to the top/.test(b.textContent) && b.getAttribute('aria-pressed') === 'false'; }));
|
|
308
308
|
ok('R4 the dialog names the row, with an activity log of what was read', d.title === MODEL.list.rows[0].title && /Readfromtherepository3steps/.test(d.log.replace(/\s+/g, '')), d.log);
|
|
309
|
-
ok('R4 the detail pane opens with the record\'s path and
|
|
309
|
+
ok('R4 the detail pane opens with the record\'s path and does not repeat the title the dialog head shows (popup context slice 2)', await p.evaluate(() => { const o = document.querySelector('#oMain'), t = document.querySelector('#dTitle').textContent.trim(); return !!o.querySelector('.dpath') && ![...o.querySelectorAll('.d1, h1, h2, h3')].some((h) => h.textContent.trim() === t); }));
|
|
310
310
|
ok('R4 the card holds the evidence and the next step, and the right pane the record', /The way through/.test(d.card) && /Blocked at/.test(d.card) && /Initiative record/.test(d.label) && /planning\/initiatives|console-3-boards/.test(d.pane), d.card.slice(0, 120));
|
|
311
311
|
await until(() => p.evaluate(() => getComputedStyle(document.querySelector('#dlg')).transform === 'none' || /matrix\(1, 0, 0, 1, 0, 0\)/.test(getComputedStyle(document.querySelector('#dlg')).transform)), 3000);
|
|
312
312
|
const pane0 = await p.evaluate(() => { const b = document.querySelector('#dPane'); const r = b.getBoundingClientRect(); return { on: b.getAttribute('aria-pressed'), t: b.title, w: r.width, h: r.height, convo: getComputedStyle(document.querySelector('#dBody')).display }; });
|
package/workspace/changelog.json
CHANGED
|
@@ -1,4 +1,33 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"v": "0.384.0",
|
|
4
|
+
"at": "2026-10-21T13:39:28.616Z",
|
|
5
|
+
"f": 2,
|
|
6
|
+
"prs": [
|
|
7
|
+
{
|
|
8
|
+
"n": 993,
|
|
9
|
+
"t": "A Work item from the brief opens on its source",
|
|
10
|
+
"s": "A Work item from the brief opens on its source"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"n": 995,
|
|
14
|
+
"t": "Claude's stored lead shows first in a popup, with Refresh",
|
|
15
|
+
"s": "Claude's stored lead shows first in a popup, with Refresh"
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"v": "0.383.0",
|
|
21
|
+
"at": "2026-10-21T13:13:17.082Z",
|
|
22
|
+
"f": 2,
|
|
23
|
+
"prs": [
|
|
24
|
+
{
|
|
25
|
+
"n": 994,
|
|
26
|
+
"t": "Share a viewer file as a password link that needs no Cloudflare login",
|
|
27
|
+
"s": "Share a viewer file as a password link that needs no Cloudflare login"
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
},
|
|
2
31
|
{
|
|
3
32
|
"v": "0.382.0",
|
|
4
33
|
"at": "2026-10-21T12:58:18.296Z",
|
|
@@ -205,7 +205,7 @@ When you scroll past the hero, the hero folds into a bar at the top. The bar sho
|
|
|
205
205
|
|
|
206
206
|
## What a dialog holds
|
|
207
207
|
|
|
208
|
-
A row or a Today item opens a dialog with the same parts every time. At the top is a short log of what PMOS read, for example the kill-condition file and `pm-decisions.md`. Under it is one plain sentence. Then one card holds the evidence and, for a decision, the options. The record sits on the right: a draft `pm-decisions.md` entry for a decision, the initiative record for blocked work, the commit for a merge.
|
|
208
|
+
A row or a Today item opens a dialog with the same parts every time. At the top is a short log of what PMOS read, for example the kill-condition file and `pm-decisions.md`. Under it is one plain sentence. Then one card holds the evidence and, for a decision, the options. The record sits on the right, without the title again, because the top of the dialog already shows it: a draft `pm-decisions.md` entry for a decision, the initiative record for blocked work, the commit for a merge.
|
|
209
209
|
|
|
210
210
|
The right side can hold more than one item. When the dialog opens a related item there, such as a document, a meeting or a ticket, the item opens as a tab beside the dialog's own detail. The first tab is always the dialog's own detail. You can have up to four more tabs; a fifth closes the oldest. Click a tab or use the arrow keys to move between them. Use the **×** on a tab, or press Delete, to close it. The tabs close when the dialog closes. With no extra item, there are no tabs.
|
|
211
211
|
|
|
@@ -277,6 +277,10 @@ My work is the second place on the rail, at `/premium-work.html`. It reads the l
|
|
|
277
277
|
|
|
278
278
|
**The item dialog.** The conversation gets the whole body. Two controls sit beside the Detail / Conversation switch, on both tabs: **Edit ▾** and **Done**. On a wide screen the row also shows where the item is. **Edit ▾** opens a sheet with one labelled field for each choice. Each field shows its value from the record and opens when you press it: **When** (Today, Later today, Tomorrow, Next week, Not before a date, Someday), **Waiting on**, **Who does it** (the steps) and **Priority · Due** (the edit panel). **Keep it** and **Drop it** are at the bottom of the sheet. The sheet closes when you press Edit again, press outside it, or press Escape. **Waiting on** is not shown when the item cannot wait and waits on nobody. An agent that only can draft is a field in the sheet. An agent that is working, has a draft, or stopped stays in the conversation, because it needs you. Every action stays reachable.
|
|
279
279
|
|
|
280
|
+
**Where an item came from.** An item from the morning brief opens on its source. Claude's first line says why it is here now and what was asked, for example "Claudia Loo asks: Can the form text hold images?". The right side shows who asked and where, their messages or words, the sources the brief read, and **Open in Slack** (or Jira, mail, and so on) when the brief kept a link. The title is not drawn there again. The item's own fields (place, due date, who asked) are behind **Details**. All of this is what the brief stored when it was written: opening the item reads nothing new. An item you added yourself still shows its fields.
|
|
281
|
+
|
|
282
|
+
**Claude's lead in a popup.** A popup such as a task, a document, a report or a measure opens on Claude's short lead, written ahead of time: why the thing matters now, what is asked or blocking, and what to do. Under it is when the lead was written and what Claude read for it. Opening a popup starts nothing: the lead is read from what is stored. **Refresh** asks the popup's own Claude Code session to write the lead again from the stored reads, and the new lead replaces the old one. A popup with no lead yet says so and offers **Write the lead**. An agent session saves a lead with `pmos lead put --key <popup key> --text "<lead>" --cite "<what it read, when>"`, and `pmos lead show [<key>]` prints what is stored. `pmos lead` calls no tool.
|
|
283
|
+
|
|
280
284
|
**The agent's draft.** The draft shows as formatted text in the detail panel on the right, labelled as the agent's and not checked, with **Open** and **Copy**. Its heading names the item ("Draft for IDPF-2989", or "Draft for you"), the round and the time of the latest round, and an approved step shows as "Step when you approve". A long draft is cut short, with **Show all**. It appears there as soon as the agent finishes, even while the dialog is open. The left column keeps the conversation (with **View round**) and the decision cards, in the console's words: **Post it to Jira** (marked outward, with exactly the text that goes), **Edit the draft**, **Keep it as a draft** and **Mark it done**. Post asks you to confirm the exact text first, and nothing is posted before that.
|
|
281
285
|
|
|
282
286
|
**An agent's offer.** When an agent has offered to draft an item, the dialog shows three choices: let the agent draft it (suggested), do it today, or not before next Monday. You pick one and press its button. A row with steps says how many it has and how many an agent can do. PMOS does not record that a step is done, so it shows no "done" count.
|
|
@@ -424,6 +428,7 @@ Every popup has this chat, including the ones that have no row of their own: a t
|
|
|
424
428
|
- **While a session runs**, the panel reads it again every 2 seconds and changes only when there is something new. The messages already on screen stay still, so nothing blinks beside the viewer.
|
|
425
429
|
- **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 (on the Chat page, the viewer opens over the conversation). Markdown shows as a page, an HTML file shows as the page it draws (press **Source** for its code), and other text files show as code. An HTML page runs its own scripts, so its toggles and charts work, but it cannot reach PMOS or the internet: a web font falls back to the system font. 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.
|
|
426
430
|
- **Download a file** with the download icon at the right of its name in the viewer. An HTML file saves as **HTML** (as it is) or **PDF**. A markdown file saves as **Markdown**, **Word .docx** or **PDF**. Other text files save at once as they are, with no menu. PDF opens your browser's print window: choose **Save as PDF** there. An HTML page prints with no access to PMOS or the internet, as in the viewer. Word holds the note's headings, paragraphs, lists and tables.
|
|
431
|
+
- **Share a file** with the share icon beside download. On a phone, **Send a copy** comes first: it opens the phone's share sheet with the file, and no link is made. **Public link** makes a link to a copy of the file as it is now, for someone with no PMOS or Cloudflare login. The password is on, with a generated one you can change or turn off. The link ends after 7 days; press **1 day** or **30 days** to change it. Press **Create link**, then **Copy link and password**, and send the password in a different message. The same popover lists your **open links** with their end date and views; **Turn off** (pressed twice) deletes the copy at once. A file with a key or token in it is not shared. Links need Online and one more tunnel rule: see REMOTE.md, "Share links".
|
|
427
432
|
- **What an answer worked with** shows as buttons under it: the files Claude wrote, changed or read, the Jira tickets and Slack channels it used, and the links it named. The first one is the main one: a file Claude wrote comes first, then what it named in its words, then what it only read. When an answer finishes while the chat is open, its main one opens in the viewer by itself, once; answers that were there when you opened the chat open nothing. On a phone a bar over the message box offers it instead (**View**), so the conversation stays in view. A Jira ticket shows what PMOS last read from Jira for a board or initiative it syncs, with **Open in Jira**; a ticket PMOS has not read says so. A Slack channel or message opens with **Open in Slack**, as PMOS keeps no copy of Slack messages.
|
|
428
433
|
- **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.
|
|
429
434
|
- **The session** is also listed in **Sessions** and in the console, where you can open its terminal.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
/* lead-cli.js — `pmos lead …`: Claude's short lead for a popup (popup context slice 3).
|
|
3
|
+
* pmos lead put --key <pop:kind:id> --text "<lead>" [--cite "<what you read, when>"] … save the lead the popup shows first
|
|
4
|
+
* pmos lead show [<key>] [--json] what is stored, for one popup or all
|
|
5
|
+
* The leads are kept in the per-user runtime folder (lib/popup-leads.js). This command calls no tool: write the lead from stored
|
|
6
|
+
* reads (`pmos source show`, the repository files) and name them in --cite.
|
|
7
|
+
*/
|
|
8
|
+
const stateRoot = require('./state-root');
|
|
9
|
+
const PL = require('./popup-leads.js');
|
|
10
|
+
|
|
11
|
+
const COMMANDS = { lead: ['put', 'show'] };
|
|
12
|
+
const USAGE = [
|
|
13
|
+
'usage: pmos lead put|show — Claude\'s short lead for a popup, written ahead and shown first',
|
|
14
|
+
' pmos lead put --key <pop:kind:id> --text "<lead>" [--cite "<what you read, when>"] …',
|
|
15
|
+
' the lead: why it matters now, what is asked or blocking, and what to do, in at most 400 characters; at most 4 cites',
|
|
16
|
+
' pmos lead show [<key>] the stored lead of one popup, or every stored lead',
|
|
17
|
+
' every command: [--json]',
|
|
18
|
+
'This command never calls a tool. Write the lead from stored reads and name them.',
|
|
19
|
+
];
|
|
20
|
+
|
|
21
|
+
function parseArgs(argv) {
|
|
22
|
+
const out = { _: [], cite: [] };
|
|
23
|
+
for (let i = 0; i < argv.length; i++) {
|
|
24
|
+
const t = argv[i];
|
|
25
|
+
if (!t.startsWith('--')) { out._.push(t); continue; }
|
|
26
|
+
const eq = t.indexOf('=');
|
|
27
|
+
const key = eq > 0 ? t.slice(2, eq) : t.slice(2);
|
|
28
|
+
const val = eq > 0 ? t.slice(eq + 1) : key === 'json' || key === 'help' ? true : argv[i + 1] !== undefined ? argv[++i] : '';
|
|
29
|
+
if (key === 'cite') out.cite.push(String(val)); else out[key] = val;
|
|
30
|
+
}
|
|
31
|
+
return out;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function run(argv, { say = console.log, env = process.env, stateDir, now = () => new Date() } = {}) {
|
|
35
|
+
const a = parseArgs(argv.slice(1));
|
|
36
|
+
const sub = a._[0];
|
|
37
|
+
const out = (o, line) => { if (a.json) say(JSON.stringify(o)); else say(line); };
|
|
38
|
+
if (!sub || a.help || sub === 'help') { USAGE.forEach((l) => say(l)); return sub || a.help ? 0 : 2; }
|
|
39
|
+
if (!COMMANDS.lead.includes(sub)) { say(`✗ pmos lead ${sub} is not a command`); USAGE.forEach((l) => say(l)); return 2; }
|
|
40
|
+
const dir = stateDir || stateRoot.defaultRoot({ env });
|
|
41
|
+
if (sub === 'put') {
|
|
42
|
+
const v = PL.validate({ key: a.key, text: a.text, cites: a.cite });
|
|
43
|
+
if (!v.ok) { out({ ok: false, error: v.error }, `✗ refused: ${v.error}. Nothing was saved.`); return a.key && a.text ? 1 : 2; }
|
|
44
|
+
const rec = PL.put(dir, v.lead, now());
|
|
45
|
+
out({ ok: true, lead: rec }, `saved the lead of ${rec.key} at ${rec.at}`);
|
|
46
|
+
return 0;
|
|
47
|
+
}
|
|
48
|
+
const key = a._[1];
|
|
49
|
+
if (key) {
|
|
50
|
+
const r = PL.get(dir, key);
|
|
51
|
+
if (a.json) { say(JSON.stringify({ ok: true, lead: r })); return 0; }
|
|
52
|
+
say(r ? `${key} · ${r.at}\n ${r.text}${r.cites.length ? '\n from: ' + r.cites.join('; ') : ''}` : `${key} has no lead yet`);
|
|
53
|
+
return 0;
|
|
54
|
+
}
|
|
55
|
+
const m = PL.all(dir);
|
|
56
|
+
if (a.json) { say(JSON.stringify({ ok: true, leads: m })); return 0; }
|
|
57
|
+
const ks = Object.keys(m);
|
|
58
|
+
if (!ks.length) { say('no lead is stored yet'); return 0; }
|
|
59
|
+
for (const k of ks) say(`${k} · ${m[k].at} · ${m[k].text}`);
|
|
60
|
+
return 0;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
module.exports = { run, COMMANDS, USAGE };
|
|
@@ -109,6 +109,25 @@ function fridayOf({ today, work, tray, ready, review }) {
|
|
|
109
109
|
note: 'One step for each place a thing waits for you. A step opens its first item. PMOS keeps no review schedule or timing, so none is shown.' };
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
+
const SRC_NAME = { calendar: 'Calendar', wispr: 'Wispr', mail: 'Mail', slack: 'Slack', jira: 'Jira', confluence: 'Confluence', github: 'GitHub', drive: 'Drive', figma: 'Figma', website: 'the website', derived: 'PMOS' };
|
|
113
|
+
/* Where a brief item came from, as the popup shows it first: who, where, their words, the conversation and the link (popup context slice 2). */
|
|
114
|
+
function sourceOf(b) {
|
|
115
|
+
if (!b) return null;
|
|
116
|
+
const name = SRC_NAME[b.source] || (b.source ? String(b.source) : '');
|
|
117
|
+
const thread = (b.thread || []).map((m) => ({ who: m.who ? clip(m.who, 80) : null, at: m.at ? clip(m.at, 20) : null, text: clip(m.text, 280) })).filter((m) => m.text);
|
|
118
|
+
const refs = (b.refs || []).map((r) => ({ label: clip(r.label, 120), link: r.link || null, lines: (r.lines || []).map((l) => clip(l, 200)) }));
|
|
119
|
+
const o = { name, who: b.who ? clip(b.who, 120) : '', where: b.where ? clip(b.where, 120) : '', ask: b.ask ? clip(b.ask, 240) : '', quote: b.quote ? clip(b.quote, 280) : '',
|
|
120
|
+
about: b.about ? clip(b.about, 480) : '', evidence: b.evidence ? clip(b.evidence, 240) : '', link: /^https?:\/\//.test(b.link || '') ? b.link : '', thread, refs };
|
|
121
|
+
return o.who || o.where || o.ask || o.quote || o.about || o.evidence || o.link || thread.length || refs.length ? o : null;
|
|
122
|
+
}
|
|
123
|
+
/* Claude's first line for a brief item: why it is here now, and what is asked. */
|
|
124
|
+
function leadOf(b) {
|
|
125
|
+
if (!b) return '';
|
|
126
|
+
const why = b.why_now ? clip(b.why_now, 240).replace(/\s*$/, '') : '';
|
|
127
|
+
const ask = b.ask ? (b.who ? clip(b.who, 80) + ' asks: ' : 'The ask: ') + clip(b.ask, 240) : '';
|
|
128
|
+
return [why && !/[.!?]$/.test(why) ? why + '.' : why, ask && !/[.!?]$/.test(ask) ? ask + '.' : ask].filter(Boolean).join(' ');
|
|
129
|
+
}
|
|
130
|
+
|
|
112
131
|
function rowOf(it, list, v, inReview, focusIds) {
|
|
113
132
|
const today = v.today, { chip, overdue } = dueChip(it, today);
|
|
114
133
|
const sub = [srcLabel(it) + (it.key && it.source !== 'local' ? ' ' + it.key : ''), it.priority, it.waiting_on ? 'waiting on ' + it.waiting_on : null, (it.steps || []).length ? (it.steps || []).length + ' ' + plural((it.steps || []).length, 'step', 'steps') + ((it.steps || []).some((x) => x.who === 'agent-does' || x.who === 'agent-drafts') ? ' · agent can do ' + (it.steps || []).filter((x) => x.who !== 'you').length : '') : null].filter(Boolean).join(' · ');
|
|
@@ -125,7 +144,13 @@ function rowOf(it, list, v, inReview, focusIds) {
|
|
|
125
144
|
if (list !== 'waiting') actions.push('waiting');
|
|
126
145
|
actions.push('remove');
|
|
127
146
|
if (inReview) actions.push('keep');
|
|
128
|
-
const
|
|
147
|
+
const src = sourceOf(it.brief), lead = leadOf(it.brief);
|
|
148
|
+
if (src) {
|
|
149
|
+
if (src.who) facts.splice(1, 0, ['Asked by', src.who]);
|
|
150
|
+
if (src.where) facts.splice(src.who ? 2 : 1, 0, ['Where', src.where]);
|
|
151
|
+
}
|
|
152
|
+
const state = overdue ? 'This was due ' + shortDate(it.due) + ' and is still open.' : list === 'tray' ? 'You added this. It has no date or place yet. Place it, or drop it.' : list === 'inbox' ? 'This is new and has no date or place yet.' : list === 'waiting' ? 'You are waiting on ' + (it.waiting_on || 'someone') + (days != null ? ' for ' + days + ' ' + plural(days, 'day', 'days') : '') + '.' : 'This is on your list.';
|
|
153
|
+
const say = lead ? (overdue || list === 'waiting' ? state + ' ' : '') + lead : state;
|
|
129
154
|
const { sug, cta } = suggestOf(it, list, today, overdue);
|
|
130
155
|
return {
|
|
131
156
|
key: 'work:' + it.id, id: it.id, list, title: clip(it.title, 140), sub: sub + (added && (list === 'inbox' || list === 'tray') ? ' · added ' + added : ''), chip, overdue, src: srcLabel(it), sug, cta,
|
|
@@ -133,7 +158,7 @@ function rowOf(it, list, v, inReview, focusIds) {
|
|
|
133
158
|
focus: list === 'today' && focusIds.has(it.id),
|
|
134
159
|
dialog: {
|
|
135
160
|
eye: 'Your item', logTitle: 'Read from your list',
|
|
136
|
-
log: ['Read the item (' + srcLabel(it) + ')', 'Placed it from its date, its flag and who it waits on: ' + list, inReview ? 'Found it untouched for ' + v.review_days + ' days' : 'Checked it against the seven-day review'],
|
|
161
|
+
log: ['Read the item (' + srcLabel(it) + ')', 'Placed it from its date, its flag and who it waits on: ' + list, ...(it.brief ? ['Read the brief item it came from' + (it.brief.source ? ' (' + (SRC_NAME[it.brief.source] || it.brief.source) + ')' : '')] : []), inReview ? 'Found it untouched for ' + v.review_days + ' days' : 'Checked it against the seven-day review'],
|
|
137
162
|
say, head: 'Where it stands', facts,
|
|
138
163
|
write: { kind: 'work', id: it.id, actions },
|
|
139
164
|
hold: HOLD.agent,
|
|
@@ -142,7 +167,8 @@ function rowOf(it, list, v, inReview, focusIds) {
|
|
|
142
167
|
steps: (it.steps || []).map((x) => ({ id: x.id, text: clip(x.text, 200), who: x.who })),
|
|
143
168
|
defer: it.defer || null,
|
|
144
169
|
someday: list === 'someday',
|
|
145
|
-
|
|
170
|
+
source: src,
|
|
171
|
+
pane: { label: src ? 'Source' : 'Item record', file: 'pm-items · ' + it.id, h: clip(it.title, 120), intro: sub, rows: facts, paras: draft ? [clip(draft, 1500)] : [], parasTitle: draft ? 'Agent draft, not checked' : '' },
|
|
146
172
|
},
|
|
147
173
|
};
|
|
148
174
|
}
|
|
@@ -56,6 +56,9 @@ const VERBS = Object.freeze({
|
|
|
56
56
|
// Not a pm-os-absorb verb (run: null): briefing-source-flow added it through the same table.
|
|
57
57
|
source: Object.freeze({ module: 'source-cli.js', run: null, guide: 'data-freshness.md',
|
|
58
58
|
help: 'pmos source save|status|show — the stored read of each tool the Briefing uses: Mail, Slack, Confluence and the rest (pmos source help)' }),
|
|
59
|
+
// Not a pm-os-absorb verb (run: null): the popup context work (premium-chat-session slice 7) added it through the same table.
|
|
60
|
+
lead: Object.freeze({ module: 'lead-cli.js', run: null, guide: 'briefing-premium.md',
|
|
61
|
+
help: 'pmos lead put|show — Claude\'s short lead for a popup, written ahead from stored reads (pmos lead help)' }),
|
|
59
62
|
// Not a pm-os-absorb verb (run: null): c3-meet-extension added it through the same table.
|
|
60
63
|
extension: Object.freeze({ module: 'extension-cli.js', run: null, guide: 'console-calendar.md',
|
|
61
64
|
help: 'pmos extension — the folder of the Chrome extension for Google Meet, and the three steps to load it' }),
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
/* popup-leads.js — Claude's short lead for a popup, written ahead and stored (popup context slice 3, PRD premium-chat-session L1–L4).
|
|
3
|
+
*
|
|
4
|
+
* validate({ key, text, cites }) → { ok, lead } | { ok: false, error }
|
|
5
|
+
* put(runtimeDir, lead, now) → the stored record · get(runtimeDir, key) → record | null · all(runtimeDir) → { key: record }
|
|
6
|
+
*
|
|
7
|
+
* A lead says why the thing in the popup matters now, what is asked or blocking, and what to do, in at most 400 characters, with
|
|
8
|
+
* the reads it came from (at most 4 cites). It is keyed by the popup's conversation key (`pop:<kind>:<id>`, premium-shell popKey).
|
|
9
|
+
* The records live in the per-user runtime folder, one file, newest 500 keys kept. Writing a lead calls no tool: an agent session
|
|
10
|
+
* writes it with `pmos lead put` from stored reads, and the popup only reads the file.
|
|
11
|
+
*/
|
|
12
|
+
const fs = require('fs');
|
|
13
|
+
const path = require('path');
|
|
14
|
+
|
|
15
|
+
const KEY_RE = /^pop:[a-z][a-z-]{0,30}(?::[A-Za-z0-9._-]{1,100}){0,4}$/;
|
|
16
|
+
const MAX_TEXT = 400;
|
|
17
|
+
const MAX_CITES = 4;
|
|
18
|
+
const MAX_CITE = 120;
|
|
19
|
+
const KEEP = 500;
|
|
20
|
+
|
|
21
|
+
const fileOf = (runtimeDir) => path.join(runtimeDir, 'popup-leads.json');
|
|
22
|
+
const clean = (s) => String(s).replace(/\s+/g, ' ').trim();
|
|
23
|
+
|
|
24
|
+
function validate(raw) {
|
|
25
|
+
const r = raw && typeof raw === 'object' ? raw : {};
|
|
26
|
+
const key = typeof r.key === 'string' ? r.key : '';
|
|
27
|
+
if (!KEY_RE.test(key) || key.length > 140) return { ok: false, error: 'key must be a popup key, pop:<kind>:<id>' };
|
|
28
|
+
if (typeof r.text !== 'string' || !clean(r.text)) return { ok: false, error: 'text is required: why it matters now, what is asked, what to do' };
|
|
29
|
+
const text = clean(r.text);
|
|
30
|
+
if (text.length > MAX_TEXT) return { ok: false, error: `text is over ${MAX_TEXT} characters` };
|
|
31
|
+
const cites = r.cites === undefined || r.cites === null ? [] : r.cites;
|
|
32
|
+
if (!Array.isArray(cites) || cites.length > MAX_CITES) return { ok: false, error: `cites must be a list of at most ${MAX_CITES} reads` };
|
|
33
|
+
const out = [];
|
|
34
|
+
for (const c of cites) {
|
|
35
|
+
if (typeof c !== 'string' || !clean(c)) return { ok: false, error: 'each cite names what was read, and when' };
|
|
36
|
+
if (clean(c).length > MAX_CITE) return { ok: false, error: `a cite is over ${MAX_CITE} characters` };
|
|
37
|
+
out.push(clean(c));
|
|
38
|
+
}
|
|
39
|
+
return { ok: true, lead: { key, text, cites: out } };
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function all(runtimeDir) {
|
|
43
|
+
if (!runtimeDir) return {};
|
|
44
|
+
try { const m = JSON.parse(fs.readFileSync(fileOf(runtimeDir), 'utf8')); return m && typeof m === 'object' && !Array.isArray(m) ? m : {}; } catch { return {}; }
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function get(runtimeDir, key) {
|
|
48
|
+
if (typeof key !== 'string' || !KEY_RE.test(key)) return null;
|
|
49
|
+
const r = all(runtimeDir)[key];
|
|
50
|
+
return r && typeof r.text === 'string' && r.at ? r : null;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function put(runtimeDir, lead, now = new Date()) {
|
|
54
|
+
const m = all(runtimeDir);
|
|
55
|
+
const rec = { text: lead.text, cites: lead.cites || [], at: now.toISOString() };
|
|
56
|
+
delete m[lead.key];
|
|
57
|
+
m[lead.key] = rec;
|
|
58
|
+
const keys = Object.keys(m).sort((a, b) => String(m[a].at).localeCompare(String(m[b].at)));
|
|
59
|
+
for (const k of keys.slice(0, Math.max(0, keys.length - KEEP))) delete m[k];
|
|
60
|
+
const f = fileOf(runtimeDir);
|
|
61
|
+
fs.mkdirSync(path.dirname(f), { recursive: true });
|
|
62
|
+
const tmp = `${f}.${process.pid}.tmp`;
|
|
63
|
+
fs.writeFileSync(tmp, JSON.stringify(m) + '\n');
|
|
64
|
+
fs.renameSync(tmp, f);
|
|
65
|
+
return { key: lead.key, ...rec };
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
module.exports = { KEY_RE, MAX_TEXT, validate, put, get, all, fileOf };
|
|
@@ -14,6 +14,7 @@ const guard = require('./pm-guard.js');
|
|
|
14
14
|
const Wr = require('./briefing-premium-writes.js');
|
|
15
15
|
const Ag = require('./briefing-premium-agent.js');
|
|
16
16
|
const Goal = require('./goal-chat.js');
|
|
17
|
+
const Leads = require('./popup-leads.js');
|
|
17
18
|
const Files = require('./chat-files.js');
|
|
18
19
|
const Inbox = require('./agent-inbox.js');
|
|
19
20
|
const actor = require('./actor.js');
|
|
@@ -207,7 +208,9 @@ module.exports = {
|
|
|
207
208
|
const live = !!(sid && ctx.chatSessions && ctx.chatSessions.alive(sid));
|
|
208
209
|
// item-chat-history: with no live session, the conversation the key had is read from its saved Claude Code file, so ending a session never empties the panel
|
|
209
210
|
const history = !live && ctx.runtimeDir ? Ag.chatHistory({ runtimeDir: ctx.runtimeDir, key, sessions: ctx.chatSessions }) : null;
|
|
210
|
-
|
|
211
|
+
// popup context slice 3: a popup's stored lead comes with its thread, so the popup shows it first and starts nothing
|
|
212
|
+
const lead = key.startsWith('pop:') && ctx.runtimeDir ? Leads.get(ctx.runtimeDir, key) : undefined;
|
|
213
|
+
ctx.json(res, { ok: true, ...Ag.threadOf(ctx.runtimeDir, key), session: live ? sid : null, history, goal: ctx.runtimeDir ? Goal.goalOf(ctx.runtimeDir, key) : null, ...(lead !== undefined ? { lead } : {}) });
|
|
211
214
|
return true;
|
|
212
215
|
}
|
|
213
216
|
if (url.pathname !== '/api/briefing-premium') return false;
|
|
@@ -354,9 +354,12 @@ module.exports = {
|
|
|
354
354
|
const readBriefOf = (d) => { try { return JSON.parse(fs.readFileSync(path.join(ctx.runtimeDir, 'briefs', d + '.json'), 'utf8')); } catch { return null; } };
|
|
355
355
|
for (const it of v.items) {
|
|
356
356
|
const m = /^brief:([0-9a-f]{12})$/.exec(String(it.id || ''));
|
|
357
|
-
if (!m || it.
|
|
357
|
+
if (!m || it.done || !ctx.runtimeDir) continue;
|
|
358
358
|
const x = assigned.findBriefItem(readBriefOf, m[1], c.now.getTime());
|
|
359
|
-
if (x)
|
|
359
|
+
if (!x) continue;
|
|
360
|
+
// the brief item's own context goes with it, so the popup shows who asked, where, their words and the link (popup context slice 2)
|
|
361
|
+
it.brief = assigned.briefContext(x);
|
|
362
|
+
if (!it.agent) { it.agent = assigned.briefAgent(x, assigned.runWith(runs, 't-' + x.id)); if (!it.place) it.place = x.source || null; }
|
|
360
363
|
}
|
|
361
364
|
ctx.json(res, v);
|
|
362
365
|
return true;
|