create-pmos 0.460.0 → 0.462.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 +27 -27
- package/payload/KIT-VERSION +1 -1
- package/payload/planning/evals/eval-calibration.md +1 -1
- package/payload/planning/okrs/health-budgets.md +1 -1
- package/payload/state/discoveries.md +1 -1
- package/workspace/briefing-premium-sources-test.js +2 -0
- package/workspace/changelog.json +26 -0
- package/workspace/guide/home.md +2 -2
- package/workspace/guide/settings.md +2 -2
- package/workspace/lib/board-premium.js +4 -1
- package/workspace/lib/programs.js +4 -0
- package/workspace/lib/routes-board-premium.js +21 -1
- package/workspace/lib/routes-boards.js +1 -1
- package/workspace/lib/routes-briefing-premium.js +3 -2
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/public/pm/cozy-settings.js +1 -1
- package/workspace/public/pm/premium-shell.js +2 -2
- package/workspace/server.js +11 -2
- package/workspace/test-files.json +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.462.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,32 @@
|
|
|
32
32
|
"audit"
|
|
33
33
|
],
|
|
34
34
|
"pmosChanges": [
|
|
35
|
+
{
|
|
36
|
+
"v": "0.462.0",
|
|
37
|
+
"at": "2026-10-31T02:08:48.803Z",
|
|
38
|
+
"f": 3,
|
|
39
|
+
"prs": [
|
|
40
|
+
{
|
|
41
|
+
"n": 1113,
|
|
42
|
+
"t": "Program initiatives on the board list; a leave in the main tree wins over the worktree copy",
|
|
43
|
+
"s": "Program initiatives on the board list; a leave in the main tree wins over the worktree copy",
|
|
44
|
+
"k": "fix"
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"v": "0.461.0",
|
|
50
|
+
"at": "2026-10-31T01:34:13.377Z",
|
|
51
|
+
"f": 3,
|
|
52
|
+
"prs": [
|
|
53
|
+
{
|
|
54
|
+
"n": 1111,
|
|
55
|
+
"t": "Remove a repository with its worktrees; keep linked worktrees out of product lists",
|
|
56
|
+
"s": "Remove a repository with its worktrees; keep linked worktrees out of product lists",
|
|
57
|
+
"k": "fix"
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
},
|
|
35
61
|
{
|
|
36
62
|
"v": "0.460.0",
|
|
37
63
|
"at": "2026-10-31T01:09:44.980Z",
|
|
@@ -271,32 +297,6 @@
|
|
|
271
297
|
"k": "new"
|
|
272
298
|
}
|
|
273
299
|
]
|
|
274
|
-
},
|
|
275
|
-
{
|
|
276
|
-
"v": "0.442.0",
|
|
277
|
-
"at": "2026-10-28T11:41:20.468Z",
|
|
278
|
-
"f": 3,
|
|
279
|
-
"prs": [
|
|
280
|
-
{
|
|
281
|
-
"n": 1086,
|
|
282
|
-
"t": "Initiative Viewer on phone and desktop, Adler dressed for the season, clear task marks (feedback batch 18 items 1, 8, 12, 13)",
|
|
283
|
-
"s": "Initiative Viewer on phone and desktop, Adler dressed for the season, clear task marks (feedback batch 18 items 1, 8, 12, 13)",
|
|
284
|
-
"k": "new"
|
|
285
|
-
}
|
|
286
|
-
]
|
|
287
|
-
},
|
|
288
|
-
{
|
|
289
|
-
"v": "0.441.0",
|
|
290
|
-
"at": "2026-10-28T10:51:57.000Z",
|
|
291
|
-
"f": 3,
|
|
292
|
-
"prs": [
|
|
293
|
-
{
|
|
294
|
-
"n": 1085,
|
|
295
|
-
"t": "Old Viewers on the one pattern, refresh cadence, uncut greeting (feedback batch 18 items 2, 7, 9, 10)",
|
|
296
|
-
"s": "Old Viewers on the one pattern, refresh cadence, uncut greeting (feedback batch 18 items 2, 7, 9, 10)",
|
|
297
|
-
"k": "new"
|
|
298
|
-
}
|
|
299
|
-
]
|
|
300
300
|
}
|
|
301
301
|
]
|
|
302
302
|
}
|
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-31T02:08:45Z"}
|
|
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-31T02:08:45Z"}
|
|
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-31T02:08:45Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -155,6 +155,8 @@ const sh = (cwd, args) => spawnSync('git', args, { cwd, encoding: 'utf8' });
|
|
|
155
155
|
ok('H5 Settings › Connectors names the read Today shows, and the initiatives, My work and the brief that Needs you shows', /^Calendar (read|not read yet|failed)/.test(rd.cal) && /Initiatives/.test(rd.moves) && /My work/.test(rd.moves) && /Brief (built|not built yet|off)/.test(rd.moves), JSON.stringify(rd));
|
|
156
156
|
if (shot) await page.screenshot({ path: path.join(shot, 'cards-reads-light.png'), fullPage: true });
|
|
157
157
|
}
|
|
158
|
+
// the panel rises into place: measure the line once it has a width, not while it is still animating in (H4 read 0 px)
|
|
159
|
+
await page.waitForFunction(() => { const e = document.querySelector('#evSettings #srcHealth'); return !!e && e.getBoundingClientRect().width > 0; }, null, { timeout: 15000 });
|
|
158
160
|
const line = await page.$eval('#evSettings #srcHealth', (e) => ({ text: e.textContent.trim(), dot: (e.querySelector('.ev-dot') || {}).className || '', w: Math.round(e.getBoundingClientRect().width), sw: document.documentElement.scrollWidth }));
|
|
159
161
|
if (theme === 'light') {
|
|
160
162
|
ok('H2 Settings › Connectors opens with the background line on top, in the level\'s colour', line.text.startsWith(h.line.slice(0, 20)) && line.dot === 'ev-dot ' + (h.level === 'ok' ? 'ok' : 'risk'), JSON.stringify(line));
|
package/workspace/changelog.json
CHANGED
|
@@ -1,4 +1,30 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"v": "0.462.0",
|
|
4
|
+
"at": "2026-10-31T02:08:48.803Z",
|
|
5
|
+
"f": 3,
|
|
6
|
+
"prs": [
|
|
7
|
+
{
|
|
8
|
+
"n": 1113,
|
|
9
|
+
"t": "Program initiatives on the board list; a leave in the main tree wins over the worktree copy",
|
|
10
|
+
"s": "Program initiatives on the board list; a leave in the main tree wins over the worktree copy",
|
|
11
|
+
"k": "fix"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"v": "0.461.0",
|
|
17
|
+
"at": "2026-10-31T01:34:13.377Z",
|
|
18
|
+
"f": 3,
|
|
19
|
+
"prs": [
|
|
20
|
+
{
|
|
21
|
+
"n": 1111,
|
|
22
|
+
"t": "Remove a repository with its worktrees; keep linked worktrees out of product lists",
|
|
23
|
+
"s": "Remove a repository with its worktrees; keep linked worktrees out of product lists",
|
|
24
|
+
"k": "fix"
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
},
|
|
2
28
|
{
|
|
3
29
|
"v": "0.460.0",
|
|
4
30
|
"at": "2026-10-31T01:09:44.980Z",
|
package/workspace/guide/home.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Guide
|
|
3
3
|
title: "Home (/premium.html) and the designed features"
|
|
4
4
|
description: "Home in the Agreed design: the list grouped by product, the Viewer, the place menu, Your day and its New for you fold, Search, and the initiative, meeting, report, Board and Insights features designed after it."
|
|
5
|
-
timestamp: 2026-10-
|
|
5
|
+
timestamp: 2026-10-31
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Home
|
|
@@ -23,7 +23,7 @@ Home, the Board, Insights and the Viewer use one type scale: 11, 12, 14, 16, 20
|
|
|
23
23
|
- **New for you** shows only when something is new: tasks given to you, and work that finished while you were away. It shows the 3 newest items, then **N more**. Press an item to open it in the Viewer. Press **N more** to see all of them. Press ✓✓ in the fold's header to mark all of them seen. An item leaves when you open it or mark it seen. Mentions are not here: **Mentions** shows each one once.
|
|
24
24
|
- After 17:00, Your day is the end of the day. It shows what moved today, then a **Tomorrow** fold with tomorrow's meetings. When tomorrow has no meetings, there is no Tomorrow fold.
|
|
25
25
|
- A **program** comes first, above the products. Its header shows the program icon, its name, the next milestone (◆ and the date) and how many of its initiatives are ready for that milestone. Inside it, the program's own tasks come first, then its initiatives under a small heading for each product. Each initiative shows once. Press the program's name to open the program in the Viewer. The chat then talks about the program. Press the chevron to close or open the group.
|
|
26
|
-
- The **product picker** is the chip on the top line. It shows the tiles of the ticked products, overlapped, with **+N** after 3, or **All** when every product is ticked. It shows even with one product. Hold the pointer on it to read the names. Press it to open the list: **All products**, then each product with its tile, its name and one line (for example "3 initiatives · 1 of 2 goals"), then **Add a product**. Press a product to tick or untick it; the list stays open, and the last ticked product stays ticked. The pick applies when the list closes (Escape, a press outside, or the chip again). On a phone the list is a sheet at the bottom. The pick is one saved setting (`ws.briefing.include`) that Home, the Board and Insights share, so a product that you untick on one page goes from all three. With **All** ticked, a product that you add later is ticked too. The **Product** row in Settings opens the same list.
|
|
26
|
+
- The **product picker** is the chip on the top line. It shows the tiles of the ticked products, overlapped, with **+N** after 3, or **All** when every product is ticked. It shows even with one product. A git worktree of a repository is not a product: it does not appear in the list. Its repository stands for it. Hold the pointer on it to read the names. Press it to open the list: **All products**, then each product with its tile, its name and one line (for example "3 initiatives · 1 of 2 goals"), then **Add a product**. Press a product to tick or untick it; the list stays open, and the last ticked product stays ticked. The pick applies when the list closes (Escape, a press outside, or the chip again). On a phone the list is a sheet at the bottom. The pick is one saved setting (`ws.briefing.include`) that Home, the Board and Insights share, so a product that you untick on one page goes from all three. With **All** ticked, a product that you add later is ticked too. The **Product** row in Settings opens the same list.
|
|
27
27
|
- A program with no open initiative yet still shows, with "No initiatives yet" or "No open initiatives". A program shows only when it holds work of a ticked product. Home reads again when you come back to its tab, so a program made on the Board shows at once.
|
|
28
28
|
- Then the list is grouped by **product**. A product header shows a tile with the product's short name, the product name, one dot for each goal (green on track, amber off track) and a chevron. You set the short name in Settings. Press the product's name to open the product in the Viewer, with its goals and this week's update and metrics review. The chat then talks about the product. This is the same for every product in the list: Home stays on the workspace you opened it on. For another product, the weekly update and the metrics review open that product's own Home in a new tab. An initiative of another product opens from that product's own board, and its chat works in that product's workspace. This is also true for a new initiative that an agent made with `pmos initiative new` and that is not on the board's Now list yet: it opens with its title, stage and tasks.
|
|
29
29
|
- Each row is one line. A dot is a session: blue when it waits on you, a ring while it runs. A check box is a task: amber when it is late. The stage track on the right shows where the initiative is. A session that runs under an initiative shows indented under it. An initiative shows its 3 most urgent tasks, and **N more** shows the rest.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Guide
|
|
3
3
|
title: "Settings in console3: one home for each setting"
|
|
4
4
|
description: "How to open Settings in console3, what each section holds, what the scope tags and the environment notes mean, and where the settings are kept."
|
|
5
|
-
timestamp: 2026-10-
|
|
5
|
+
timestamp: 2026-10-31
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Settings in console3: one home for each setting
|
|
@@ -25,7 +25,7 @@ Settings is not a tab. While it is open, no tab is selected. Press a tab to go b
|
|
|
25
25
|
| Section | What it holds |
|
|
26
26
|
|---|---|
|
|
27
27
|
| About you | Your name, your role, what you do and your job description. The Welcome page asks for the same four on first run. |
|
|
28
|
-
| Workspaces | Your workspaces: rename, remove, add one by its folder. Which workspace opens on start, and what the Briefing covers. The list shows each repository once. A git worktree of a repository, such as an initiative branch folder, is not listed. |
|
|
28
|
+
| Workspaces | Your workspaces: rename, remove, add one by its folder. Which workspace opens on start, and what the Briefing covers. The list shows each repository once. A git worktree of a repository, such as an initiative branch folder, is not listed. Remove forgets the repository and its worktrees together. No folder is deleted. |
|
|
29
29
|
| Boards and workflows | The workflow templates for new boards and the default template. The rules that move a card. To change the workflow of one board, open that board in Initiatives. |
|
|
30
30
|
| Connectors | How your Claude session reaches Google Calendar, Jira, Wispr Flow and a sender. The import window, the refresh time, how private events show, and attendee names. The report finder is the last block. |
|
|
31
31
|
| Recording | The live transcript: what to listen to, the Whisper model, the language, the echo removal, the final pass after Stop, the words to recognize, and how long kept audio stays. A card at the top says what recording uses now. |
|
|
@@ -296,7 +296,10 @@ function build(f) {
|
|
|
296
296
|
const rows = (f.rows || []).slice(0, MAX_LIST).map((r) => rowOf(r, wf, todayIso));
|
|
297
297
|
// the on-hold rows follow the open ones; the cancelled and archived rows sit under the list's fold (initiative premium-board-actions)
|
|
298
298
|
for (const r of (f.held || [])) if (rows.length < MAX_LIST + 50 && !rows.some((x) => x.id === r.id)) rows.push(rowOf(r, wf, todayIso));
|
|
299
|
-
|
|
299
|
+
// an initiative a program holds stays on the list whatever its horizon: the list reads the `now` and `risk` views, and a member the
|
|
300
|
+
// program page cannot find here shows as "not read" and its program as "No open initiatives"
|
|
301
|
+
for (const r of (f.members || [])) if (rows.length < MAX_LIST + 100 && !rows.some((x) => x.id === r.id)) rows.push(rowOf(r, wf, todayIso));
|
|
302
|
+
const gone ={ cancelled: (f.cancelled || []).slice(0, MAX_LIST).map((r) => rowOf(r, wf, todayIso)), archived: (f.archived || []).slice(0, MAX_LIST).map((r) => rowOf(r, wf, todayIso)) };
|
|
300
303
|
// the list reads the board's own rank; "Do this first" only where a record says the first row is late
|
|
301
304
|
if (rows[0] && rows[0].late) rows[0].first = true;
|
|
302
305
|
const stages = (f.columns || []).map((c) => ({ stage: c.stage, cat: c.cat, count: Number(c.count) || 0, rows: (c.rows || []).slice(0, STAGE_ROWS).map((r) => rowOf(r, wf, todayIso)), more: Math.max(0, (Number(c.count) || 0) - STAGE_ROWS) }));
|
|
@@ -150,6 +150,10 @@ function merge(perWs) {
|
|
|
150
150
|
Object.assign(m.checks, p.checks);
|
|
151
151
|
// the route writes the order line to the charter's workspace; a line elsewhere counts only while the charter's has none
|
|
152
152
|
if (p.orderSet && (p.charter || !m.orderHome)) { m.order = p.order; if (p.charter) m.orderHome = true; }
|
|
153
|
+
// two ledgers can stand for one workspace (a linked worktree's copy is read as its main tree's, lib/routes-programs.js), the later one
|
|
154
|
+
// read last: what it says of an initiative (a member line or a leave line) replaces what the earlier one said, so a leave in the main
|
|
155
|
+
// tree is not undone by the worktree's older member line
|
|
156
|
+
for (const ini of p.touched) m.members = m.members.filter((x) => !(x.ws === ws && x.initiative === ini));
|
|
153
157
|
for (const ini of p.members) if (!m.members.some((x) => x.ws === ws && x.initiative === ini)) m.members.push({ ws, initiative: ini });
|
|
154
158
|
for (const t of p.tasks) m.tasks.push({ ...t, ws });
|
|
155
159
|
for (const ini of p.touched) m.touched.push({ ws, initiative: ini });
|
|
@@ -51,7 +51,15 @@ async function metrics(req, res, url, ctx) {
|
|
|
51
51
|
return true;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
+
/** The ids of the initiatives of workspace `ws` that a program holds: the rows the premium board keeps on its list whatever their horizon. */
|
|
55
|
+
const programMemberIds = (programs, ws) => {
|
|
56
|
+
const ids = new Set();
|
|
57
|
+
for (const p of programs || []) for (const m of (p && p.members) || []) if (m && m.ws === ws) ids.add(m.initiative);
|
|
58
|
+
return ids;
|
|
59
|
+
};
|
|
60
|
+
|
|
54
61
|
module.exports = {
|
|
62
|
+
programMemberIds,
|
|
55
63
|
prefixes: ['/api/board-premium', '/api/board-metrics-premium'],
|
|
56
64
|
handle: async (req, res, url, ctx) => {
|
|
57
65
|
if (url.pathname === '/api/board-metrics-premium') return metrics(req, res, url, ctx);
|
|
@@ -92,10 +100,22 @@ module.exports = {
|
|
|
92
100
|
// the documents the PM added (lib/custom-docs.js): one file read, no route
|
|
93
101
|
let custom = [];
|
|
94
102
|
try { const w = ctx.getWs ? ctx.getWs(pick.ws) : null; custom = w ? Custom.list(w.root, 'board:' + pick.id) : []; } catch { custom = []; missing.push('added documents'); }
|
|
103
|
+
// the initiatives of this workspace that a program holds (GET /api/programs): the list above is the `now` and `risk` views, so a member
|
|
104
|
+
// on a later horizon is not in it, and the program page would call it unread. Their rows come from the board's own `all` view.
|
|
105
|
+
const rowsNow = listOf(rk, nw);
|
|
106
|
+
let members = [];
|
|
107
|
+
try {
|
|
108
|
+
const ids = programMemberIds(require('./routes-programs.js').all(ctx), pick.ws);
|
|
109
|
+
const have = new Set(rowsNow.map((r) => r.id));
|
|
110
|
+
if ([...ids].some((id) => !have.has(id))) {
|
|
111
|
+
const every = ok(await via(boards, '/api/boards/backlog' + q + '&view=all&limit=300', req, ctx), 'program initiatives');
|
|
112
|
+
members = ((every && every.rows) || []).filter((r) => ids.has(r.id) && !have.has(r.id));
|
|
113
|
+
}
|
|
114
|
+
} catch { missing.push('program initiatives'); }
|
|
95
115
|
const model = BoardPremium.build({
|
|
96
116
|
now: Date.now(), pending: false, missing: missing.filter((m) => m !== 'core documents'), boards: all.map((x) => ({ ws: x.ws, id: x.id, name: x.name })),
|
|
97
117
|
board: head.body.board, counts: head.body.counts, nextRelease: head.body.nextRelease || null, pastReleases: head.body.pastReleases || [],
|
|
98
|
-
rows:
|
|
118
|
+
rows: rowsNow, members, columns: c ? c.columns : [], sprints: s || { source: 'none', sprints: [] }, docs: d, custom,
|
|
99
119
|
items: its && its.body && its.body.ok !== false && Array.isArray(its.body.items) ? its.body.items : [], held: hd ? hd.rows : [], cancelled: cn ? cn.rows : [], archived: ar ? ar.rows : [], asks: ak ? ak.asks || [] : null,
|
|
100
120
|
});
|
|
101
121
|
// every open initiative's anchor, not only the 100 rows listed (batch 17 item 1): Home's product card counts the goals as the ready-made
|
|
@@ -652,7 +652,7 @@ const fail = (ctx, res, status, error, extra = {}) => { ctx.json(res, { ok: fals
|
|
|
652
652
|
/** Every board of every workspace. With `names` (GET /api/boards?names=1), only who each board is (ws, id, name and the board's
|
|
653
653
|
* own settings, no rows): a page that only needs the board list does not derive the rows of every workspace. */
|
|
654
654
|
function portfolio(ctx, { names = false } = {}) {
|
|
655
|
-
const list = ctx.workspaceList ? ctx.workspaceList() : [];
|
|
655
|
+
const list = ctx.productList ? ctx.productList() : ctx.workspaceList ? ctx.workspaceList() : []; // the product list: no linked worktree (the switcher's list)
|
|
656
656
|
const releases = readReleases(ctx);
|
|
657
657
|
const out = [];
|
|
658
658
|
for (const w of list) {
|
|
@@ -31,10 +31,11 @@ const Src = require('./briefing-premium-sources.js');
|
|
|
31
31
|
const Drafts = require('./briefing-premium-drafts.js');
|
|
32
32
|
const settings = require('./settings-store.js');
|
|
33
33
|
|
|
34
|
-
/** The workspaces the Briefing may read right now (initiative briefing-premium-products): choose()'s list, from the server's
|
|
34
|
+
/** The workspaces the Briefing may read right now (initiative briefing-premium-products): choose()'s list, from the server's product list (no linked worktree) and the PM's setting. */
|
|
35
35
|
function products(ctx, only) {
|
|
36
36
|
const home = ctx.homeRoot || ctx.selfRoot || null;
|
|
37
|
-
const
|
|
37
|
+
const rows = typeof ctx.productList === 'function' ? ctx.productList() : typeof ctx.workspaceList === 'function' ? ctx.workspaceList() : [];
|
|
38
|
+
const list = rows.map((w) => ({ id: w.id, name: w.label || w.name, root: w.root, initials: w.initials, home: !!home && path.resolve(w.root) === path.resolve(home) }));
|
|
38
39
|
return Prod.choose({ workspaces: list, include: settings.get(ctx.runtimeDir, 'ws.briefing.include', null), only });
|
|
39
40
|
}
|
|
40
41
|
/** The included product a merged row (or a returned run) belongs to: { root, ws } | { error }. null when the key is the one-workspace page's. */
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmos-workspace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.462.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pmos-workspace",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.462.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@anthropic-ai/sdk": "^1.3.0",
|
package/workspace/package.json
CHANGED
|
@@ -338,7 +338,7 @@ async function press(e) {
|
|
|
338
338
|
const root = (T.el.querySelector('#evRoot').value || '').trim();
|
|
339
339
|
if (!root) T.msg = 'Paste the folder path of a repository.';
|
|
340
340
|
else { const r = await pmPost('/api/workspaces', { root, focus: false }); if (r && r.ok) { T.ws = [...T.ws.filter((y) => y.id !== r.workspace.id), r.workspace]; toast('Added.'); } else T.msg = (r && r.error) || 'Not added.'; }
|
|
341
|
-
} else if (t.dataset.evRm) { const r = await pmPost('/api/workspaces/forget', { id: t.dataset.evRm }); if (r && r.ok) { T.ws = T.ws.filter((y) => y.id
|
|
341
|
+
} else if (t.dataset.evRm) { const r = await pmPost('/api/workspaces/forget', { id: t.dataset.evRm, repository: true }); if (r && r.ok) { const gone = new Set(r.removed || [t.dataset.evRm]); T.ws = T.ws.filter((y) => !gone.has(y.id)); toast('Removed. The folder is untouched.'); } else T.msg = (r && (r.error || r.reason)) || 'Not removed.'; }
|
|
342
342
|
else if (t.dataset.evUpd) await upd(t.dataset.evUpd);
|
|
343
343
|
} finally { T.busy = false; }
|
|
344
344
|
draw();
|
|
@@ -1232,8 +1232,8 @@ export async function openSettings() {
|
|
|
1232
1232
|
M.err = '';
|
|
1233
1233
|
if (rm) {
|
|
1234
1234
|
const x = M.ws.find((y) => y.id === rm.dataset.rm); if (!x) return;
|
|
1235
|
-
M.busy = true; const r = await pmPost('/api/workspaces/forget', { id: x.id }); M.busy = false;
|
|
1236
|
-
if (r && r.ok) { M.ws = M.ws.filter((y) => y.id
|
|
1235
|
+
M.busy = true; const r = await pmPost('/api/workspaces/forget', { id: x.id, repository: true }); M.busy = false;
|
|
1236
|
+
if (r && r.ok) { const gone = new Set(r.removed || [x.id]); M.ws = M.ws.filter((y) => !gone.has(y.id)); toast('Removed ' + (x.label || x.name || x.id) + '. The folder is untouched.'); } else M.err = (r && (r.error || r.reason)) || 'Not removed.';
|
|
1237
1237
|
draw();
|
|
1238
1238
|
} else if (sw) {
|
|
1239
1239
|
const k = sw.dataset.src, on = !M.src[k];
|
package/workspace/server.js
CHANGED
|
@@ -904,6 +904,15 @@ function laneSets() {
|
|
|
904
904
|
} catch { /* the engine is not here; the client then says so rather than guessing */ }
|
|
905
905
|
return laneSetsMemo;
|
|
906
906
|
}
|
|
907
|
+
// A linked worktree of a repository (not its main tree). Settings leaves it out; the product lists leave it out too
|
|
908
|
+
// (productWorkspaces), because the repository's own row stands for it. Its row stays registered for its sessions and git work.
|
|
909
|
+
function isLinkedRow(w) {
|
|
910
|
+
const rid = repoIdentity(w.root);
|
|
911
|
+
return !!(rid.tree && rid.key && path.resolve(rid.tree) !== path.resolve(rid.key));
|
|
912
|
+
}
|
|
913
|
+
// The rows a PM picks as products (the switcher, Home, the Briefing, the Board's every-product list): every registered row
|
|
914
|
+
// but a linked worktree. Settings Remove forgets the repository and its worktree rows together (forgetRepository).
|
|
915
|
+
function productWorkspaces() { return [...workspaces.values()].filter((w) => !isLinkedRow(w)); }
|
|
907
916
|
function wsList() {
|
|
908
917
|
return [...workspaces.values()].map((w) => {
|
|
909
918
|
const rid = repoIdentity(w.root);
|
|
@@ -924,7 +933,7 @@ function wsList() {
|
|
|
924
933
|
tree: rid.tree || null,
|
|
925
934
|
// A linked worktree of a repository (not its main tree): the lists a PM picks a workspace or
|
|
926
935
|
// product from leave it out — the repo row stands for it. Housekeeping stays in /api/git/worktrees.
|
|
927
|
-
linked:
|
|
936
|
+
linked: isLinkedRow(w),
|
|
928
937
|
// Where the tree came from, and the ONE label the repository list can honestly put on a row.
|
|
929
938
|
// `remote` is the raw origin URL (null when there is none) so a caller can derive a richer
|
|
930
939
|
// answer without guessing; `kind` is the surface's own two-value vocabulary — a repository
|
|
@@ -10491,7 +10500,7 @@ async function handleRequest(req, res) {
|
|
|
10491
10500
|
// workspace-headless-jobs R6: is this session a headless run that is still working?
|
|
10492
10501
|
headlessBusy: (id) => { const x = sessions.get(String(id || '')); return !!(x && x.headless && x.child); },
|
|
10493
10502
|
// initiative my-work: every registered repository, the day runs, and the two presses that start sessions
|
|
10494
|
-
workspaceList: () => [...workspaces.values()], readDayRun, myWorkBrief, myWorkRead,
|
|
10503
|
+
workspaceList: () => [...workspaces.values()], productList: () => productWorkspaces(), readDayRun, myWorkBrief, myWorkRead,
|
|
10495
10504
|
// c3-work-agent: the PM's decision on the agent's draft and Stop, on the day run that holds the item's task
|
|
10496
10505
|
writeDayRun, startDayTasks, endSession: (id) => {
|
|
10497
10506
|
const x = sessions.get(String(id || '')); if (!x) return;
|
|
@@ -58,6 +58,7 @@
|
|
|
58
58
|
"briefing-premium-calendar-2.test.js",
|
|
59
59
|
"briefing-premium-calendar-3.test.js",
|
|
60
60
|
"briefing-premium-products.test.js",
|
|
61
|
+
"product-list-linked.test.js",
|
|
61
62
|
"briefing-premium-sources.test.js",
|
|
62
63
|
"briefing-premium-drafts.test.js",
|
|
63
64
|
"agent-inbox.test.js",
|
|
@@ -168,6 +169,7 @@
|
|
|
168
169
|
"briefing-premium-calendar-2.test.js": 1,
|
|
169
170
|
"briefing-premium-calendar-3.test.js": 1,
|
|
170
171
|
"briefing-premium-products.test.js": 1,
|
|
172
|
+
"product-list-linked.test.js": 1,
|
|
171
173
|
"briefing-premium-sources.test.js": 1,
|
|
172
174
|
"briefing-premium-drafts.test.js": 1,
|
|
173
175
|
"agent-inbox.test.js": 1,
|