create-pmos 0.361.0 → 0.362.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.361.0",
3
+ "version": "0.362.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,28 @@
32
32
  "audit"
33
33
  ],
34
34
  "pmosChanges": [
35
+ {
36
+ "v": "0.362.0",
37
+ "at": "2026-10-21T00:23:03.151Z",
38
+ "f": 2,
39
+ "prs": [
40
+ {
41
+ "n": 961,
42
+ "t": "Settings lists every connector of your Claude session",
43
+ "s": "Settings › Connectors lists every connector your Claude session has, and says that your sessions can use all of them while a switch only chooses what PMOS reads on its own."
44
+ },
45
+ {
46
+ "n": 963,
47
+ "t": "The premium Board release card lists the board's past releases",
48
+ "s": "The premium Board release card lists the board's past releases"
49
+ },
50
+ {
51
+ "n": 964,
52
+ "t": "Premium Sprint tab folds past sprints, shows the goal from the tickets, opens every ticket",
53
+ "s": "Premium Sprint tab folds past sprints, shows the goal from the tickets, opens every ticket"
54
+ }
55
+ ]
56
+ },
35
57
  {
36
58
  "v": "0.361.0",
37
59
  "at": "2026-10-21T00:14:19.012Z",
@@ -279,18 +301,6 @@
279
301
  "s": "A file path in Claude's words is underlined, and pressing it opens the file read-only as a viewer tab beside the conversation."
280
302
  }
281
303
  ]
282
- },
283
- {
284
- "v": "0.342.0",
285
- "at": "2026-10-20T04:02:58.586Z",
286
- "f": 2,
287
- "prs": [
288
- {
289
- "n": 937,
290
- "t": "Label rows in premium cards no longer overlap at phone width",
291
- "s": "The rows stay as two columns, one row per label, at every width."
292
- }
293
- ]
294
304
  }
295
305
  ]
296
306
  }
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@48e14dd7
1
+ kernel-source: pmos@245c2ee7
2
2
  assembled: 2026-10-21
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-21T00:14:15Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-21T00:22:59Z"}
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-21T00:14:15Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-21T00:22:59Z"}
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-21T00:14:15Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-21T00:22:59Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -115,7 +115,7 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
115
115
 
116
116
  /* B9 B8 */
117
117
  ok('B9 with no Jira read the sprint card says so and draws nothing', await p.evaluate(() => /No sprint is on record/.test(document.querySelector('#sprBody').textContent) && document.querySelector('#sprCap').textContent === 'none' && !document.querySelector('#sprBody .spr')));
118
- ok('B8 with no release the card says none is planned', await p.evaluate(() => /No release is planned/.test(document.querySelector('#relBody').textContent)));
118
+ ok('B8 with no release the card says none is on record', await p.evaluate(() => /No release is on record/.test(document.querySelector('#relBody').textContent)));
119
119
  {
120
120
  const R = await open({ model: mk({ sprints: { source: 'jira', readAt: '2026-10-16', sprints: [{ name: 'Sprint 42', state: 'active', start: '2026-10-12', end: '2026-10-23', counts: { todo: 11, doing: 9, done: 14 }, goal: 'Self-serve onboarding reaches beta' }] }, nextRelease: { id: 'r1', type: 'minor', at: '2026-10-23T00:00:00Z' } }) });
121
121
  const d = await R.page.evaluate(() => ({ sp: document.querySelector('#sprBody').textContent.replace(/\s+/g, ' '), cnt: [...document.querySelectorAll('#sprBody .cnt b')].map((b) => b.textContent).join(), rel: document.querySelector('#relBody').textContent.replace(/\s+/g, ' '), cap: document.querySelector('#relCap').textContent }));
@@ -50,7 +50,10 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
50
50
  if (!exe) { console.log('✗ no Chrome/Chromium on this machine — the briefing-premium suite cannot run'); return finish(1); }
51
51
  let chromium;
52
52
  try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed — the briefing-premium suite cannot run'); return finish(1); }
53
- srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT) }) });
53
+ // the Claude config the server reads the session's connectors from (premium-settings S5): two that back a source, BigQuery that backs none
54
+ const CFG = path.join(T.STATE_DIR, 'claude-config'); fs.mkdirSync(CFG, { recursive: true });
55
+ fs.writeFileSync(path.join(CFG, '.claude.json'), JSON.stringify({ claudeAiMcpEverConnected: ['claude.ai Google Calendar', 'claude.ai Slack', 'claude.ai Google Cloud BigQuery'] }));
56
+ srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT), CLAUDE_CONFIG_DIR: CFG }) });
54
57
  await T.waitForServer(BASE);
55
58
  browser = await chromium.launch({ executablePath: exe });
56
59
  { /* every context starts with the console's Needs you read off (see open below); a page route set by `console` wins over it */
@@ -137,6 +140,14 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
137
140
  const flipped = await until(() => p.evaluate((v) => document.querySelector('#oMain [data-src="mail"]').getAttribute('aria-checked') !== v, sw), 6000);
138
141
  ok('S3 a source switch saves through /api/proactive/settings and flips', flipped && A.reqs.includes('POST /api/proactive/settings'));
139
142
  await p.click('#oMain [data-src="mail"]'); await until(() => p.evaluate((v) => document.querySelector('#oMain [data-src="mail"]').getAttribute('aria-checked') === v, sw), 6000);
143
+ const bq = await p.evaluate(() => { const b = document.querySelector('#oMain [data-conn="claude.ai Google Cloud BigQuery"]'); const r = b && b.closest('.sr');
144
+ return { row: r ? r.textContent : null, on: b ? b.getAttribute('aria-checked') : null, dup: document.querySelectorAll('#oMain [data-conn]').length }; });
145
+ ok('S5 every connector of the session is listed: BigQuery has its own row, Off, and says nothing in PMOS reads it on its own yet; Calendar and Slack stay under their source', bq.on === 'false' && /Google Cloud BigQuery/.test(bq.row) && !/claude\.ai/.test(bq.row) && /Nothing in PMOS reads it on its own yet/.test(bq.row) && bq.dup === 1, JSON.stringify(bq));
146
+ await p.click('#oMain [data-conn="claude.ai Google Cloud BigQuery"]');
147
+ const bqOn = await until(() => p.evaluate(() => document.querySelector('#oMain [data-conn="claude.ai Google Cloud BigQuery"]').getAttribute('aria-checked') === 'true'), 6000);
148
+ const saved = await (await fetch(BASE + '/api/proactive/settings')).json();
149
+ ok('S6 its switch saves the choice through /api/proactive/settings', bqOn && saved.settings.connectors['claude.ai Google Cloud BigQuery'] === true, JSON.stringify(saved.settings.connectors));
150
+ await p.click('#oMain [data-conn="claude.ai Google Cloud BigQuery"]'); await until(() => p.evaluate(() => document.querySelector('#oMain [data-conn="claude.ai Google Cloud BigQuery"]').getAttribute('aria-checked') === 'false'), 6000);
140
151
  const bare = await fetch(BASE + '/api/workspaces/forget', { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ id: 'no-such' }) });
141
152
  ok('S4 Remove is a page press: no nonce, no removal (403)', bare.status === 403, String(bare.status));
142
153
  for (let i = A.reqs.length - 1; i >= 0; i--) if (/^POST \/api\/proactive\/settings$/.test(A.reqs[i])) A.reqs.splice(i, 1); // R10 below counts presses on a page where nothing was pressed
@@ -1,4 +1,26 @@
1
1
  [
2
+ {
3
+ "v": "0.362.0",
4
+ "at": "2026-10-21T00:23:03.151Z",
5
+ "f": 2,
6
+ "prs": [
7
+ {
8
+ "n": 961,
9
+ "t": "Settings lists every connector of your Claude session",
10
+ "s": "Settings › Connectors lists every connector your Claude session has, and says that your sessions can use all of them while a switch only chooses what PMOS reads on its own."
11
+ },
12
+ {
13
+ "n": 963,
14
+ "t": "The premium Board release card lists the board's past releases",
15
+ "s": "The premium Board release card lists the board's past releases"
16
+ },
17
+ {
18
+ "n": 964,
19
+ "t": "Premium Sprint tab folds past sprints, shows the goal from the tickets, opens every ticket",
20
+ "s": "Premium Sprint tab folds past sprints, shows the goal from the tickets, opens every ticket"
21
+ }
22
+ ]
23
+ },
2
24
  {
3
25
  "v": "0.361.0",
4
26
  "at": "2026-10-21T00:14:19.012Z",
@@ -2,7 +2,7 @@
2
2
  type: Guide
3
3
  title: "The premium Briefing (/premium.html)"
4
4
  description: "The Briefing page at /premium.html: the hero sentence, What you need to do, Today, the dock, and what each one reads from the repository."
5
- timestamp: 2026-10-20
5
+ timestamp: 2026-10-21
6
6
  ---
7
7
 
8
8
  # The premium Briefing
@@ -22,7 +22,7 @@ Every premium page has the same top bar. On the left is where you are, then a ro
22
22
  - **On a phone** the bar is one row: the page name, Chat, the bell and ⋯. Sources moves into the ⋯ menu.
23
23
  - **Menus.** An option that is too long for one line wraps onto the next line, and its row grows to hold it.
24
24
 
25
- **Search** (Ctrl K, or `/`) opens the search over places, initiatives, documents and your running sessions; Enter opens the result. Search and the bell only read; neither changes a record. **Console** opens the console at `/console.html`, for the places premium does not have yet. In the console, the More menu has **Open premium**, which opens this page. **Settings** opens one dialog. **Updates** comes first: the PMOS version you have, the newest published version, **Check now** and, when a newer one is ready, **Update**. Update does what the console's Settings › Updates does: it updates the kit in each workspace that is behind, then PMOS itself, which stops for about a minute and reloads the page. PMOS that runs from a checkout says to use `git pull` instead. Each workspace is a row with its kit version. PMOS checks once a day while a page is open (the console's **Check for updates** setting turns this off). **What's new** lists each published kit, newest first and grouped by day: its version, when it published, and one entry per pull request it carries: the pull request's title in bold, with its number, and under it the first sentence of its "After:" paragraph. Both are copied from the pull request when the kit is published; a parenthesis that holds code or a decision number is left out, and a pull request with no "After:" paragraph shows its title only. Kits newer than yours are tinted, and yours is marked. Five show per day; **Show more** opens the rest. Then come two choices. **Workspaces** lists the repositories PMOS works in, with Add (a folder path) and Remove; Remove forgets the address and never deletes the folder, and a refusal shows the server's reason. **Connectors** has an On/Off switch for each source the Briefing reads. Each press saves that one record. Every other setting runs on a default and stays in the console; the dialog links to it. Remove needs the page's launch nonce, so an agent session cannot call it.
25
+ **Search** (Ctrl K, or `/`) opens the search over places, initiatives, documents and your running sessions; Enter opens the result. Search and the bell only read; neither changes a record. **Console** opens the console at `/console.html`, for the places premium does not have yet. In the console, the More menu has **Open premium**, which opens this page. **Settings** opens one dialog. **Updates** comes first: the PMOS version you have, the newest published version, **Check now** and, when a newer one is ready, **Update**. Update does what the console's Settings › Updates does: it updates the kit in each workspace that is behind, then PMOS itself, which stops for about a minute and reloads the page. PMOS that runs from a checkout says to use `git pull` instead. Each workspace is a row with its kit version. PMOS checks once a day while a page is open (the console's **Check for updates** setting turns this off). **What's new** lists each published kit, newest first and grouped by day: its version, when it published, and one entry per pull request it carries: the pull request's title in bold, with its number, and under it the first sentence of its "After:" paragraph. Both are copied from the pull request when the kit is published; a parenthesis that holds code or a decision number is left out, and a pull request with no "After:" paragraph shows its title only. Kits newer than yours are tinted, and yours is marked. Five show per day; **Show more** opens the rest. Then come two choices. **Workspaces** lists the repositories PMOS works in, with Add (a folder path) and Remove; Remove forgets the address and never deletes the folder, and a refusal shows the server's reason. **Connectors** has an On/Off switch for each source the Briefing reads, then a row for every other connector your Claude session has (for example BigQuery). PMOS reads the connector names from the default profile, or from Claude Code's own settings when no profile is set. Your Claude sessions can use every connector whatever its switch says; a switch chooses only what PMOS reads on its own. Such a row is Off until you switch it on, and it says that nothing in PMOS reads it on its own yet: the switch saves your choice for a reader to come. Each press saves that one record. Every other setting runs on a default and stays in the console; the dialog links to it. Remove needs the page's launch nonce, so an agent session cannot call it.
26
26
 
27
27
  **Sources** is a dialog that lists each tracked source (Repository, Initiatives, Calendar, Jira status, My work and Tracker items) with its own state and the time it was last read. Each source except the repository has **Refresh**, and **Refresh all** reads them all again. Slack and email are read as part of My work, so they have no row of their own. A source PMOS does not track has no row: the dialog shows only what PMOS can say it read.
28
28
 
@@ -305,8 +305,9 @@ Board is the third place on the rail, at `/premium-board.html`. It reads what th
305
305
  - **List** shows the late and at-risk initiatives first, then the board's now view, up to 100 loaded and 25 on screen at a time. A row shows the owner and lane, a status chip when it is not on track, how far through the workflow it is (and "derived" when the workflow engine placed it), a progress bar only when a record holds progress, and the planned finish only when an end date was set ("Not planned" otherwise). "Do this first" appears only when the first row is late.
306
306
  - **By stage** has one column for each stage of the board's workflow with the board's own count and its first five initiatives.
307
307
  - **List** and **Timeline** show ten tasks a page with Previous and Next; **By stage** shows six cards a column with Show more. **Timeline** draws a bar for each initiative that has both a start and an end date, with the days left or over, and counts the rest. With no dates on record it says so and draws nothing.
308
- - **Sprint** appears when an agent session has read Jira for the board. Otherwise it says there is none. Press it to open the sprint's facts, with the sprint as a board in a second tab: **To do**, **In progress** and **Done** columns from the last Jira read, with the goal, the dates, the days left and the points. When the board has more than one sprint, you can switch to another one. Press a card to open its ticket in another tab. A card that is on no initiative of this board is drawn, but it does not open. The board is read only: Jira owns each ticket's status and sprint, so you move tickets in Jira. Tickets with no sprint are not in this read. **Coming up** shows the next release, from the releases ledger.
308
+ - **Sprint** appears when an agent session has read Jira for the board. Otherwise it says there is none. Press it to open the sprint's facts, with the sprint as a board in a second tab: **To do**, **In progress** and **Done** columns from the last Jira read, with the dates, the days left and the points. The sprint goal is the one the Jira status check writes from the sprint's tickets, as on the console's Sprints tab, with its summary; Jira's own goal shows under it only as a reference (**In Jira: "…"**). Until the check has written one, the tab says **No goal yet**. The active and next sprints are buttons at the top. The closed sprints are behind **Past sprints**, which is shut until you press it. Press any card to open its ticket in another tab. A ticket that is on no initiative of this board shows what the sprint read holds (title, status, points and its Jira link). The board is read only: Jira owns each ticket's status and sprint, so you move tickets in Jira. Tickets with no sprint are not in this read. **Coming up** shows the next release, from the releases ledger.
309
309
  - **Open the backlog** is in the Sprint dialog and on its sprint tab. It opens the board's Jira backlog in a tab beside the dialog: the open sprints (active, then next) and then **Backlog**, the tickets in no sprint and not done. A row shows the key, title, status, points and initiative, and why a blocked ticket is blocked. **All**, **Blocked** and **Bugs** filter it (Bugs appears only when the Jira read holds the issue type). A row opens its ticket. The list holds only the tickets the board's initiatives pushed to Jira or hold under their epics, in key order: the Jira read has no rank, assignee or capacity. You move and rank tickets in Jira. With no Jira read, the tab says so.
310
+ - **Next release** shows the next release that carries an initiative of this board, the one planned after it, and the three latest past releases (**Released** when accepted, else **Past**). It reads the release records (`releases/releases.jsonl`, written from the console's Releases view); Jira fix versions alone do not make a release. With no release planned it says so and still lists the past ones. With none at all it says "No release is on record for this board, past or planned."
310
311
  - **Metrics** appears above the Initiatives card on the board of any workspace except the home one (PMOS itself), and counts from that workspace's own repository. It has four tiles. **Corrections per 100 runs** is the corrections logged on the week's runs in `planning/runs/agent-runs.jsonl`; a week with fewer than 10 runs is left blank. **Merged a week** counts the commits on the first-parent line of the trunk. **Blocked** and **Idle for a month** come from the workflow engine, which keeps no history. From the first day the card is read, PMOS keeps their counts once a day in the workspace's state folder (`board-metric-history.jsonl`), so their charts start on that day and their caption says **history starts today** (later, the date). Earlier weeks read **Not kept yet**. Move over a chart, or use the arrow keys, to read a week. A tile that cannot be counted says **Not read** and why; a repository with no run log says **No runs yet**. The line above the tiles starts with how many tiles need a look, and those tiles have a **Needs a look** chip and an orange outline. The line ends with **open Insights**, which opens the same board's Insights page. Press a tile for its definition and values, with the read-only agent beside it. A target is set on Insights, not here. A measure with a target shows it under the value, draws it as a dashed line, and carries **On target** or its gap (for example **2 short**); off target, it also has the orange outline. A measure without a target draws no line. Day and Month are off. It was tested only on made-up repositories, not on a real IDPF or microsite repository.
311
312
  - **The top bar** names the page and the board. With more than one board a menu switches between them, and **Chat** opens the board in the dialog with the read-only agent.
312
313
  - **Core documents** lists the board's documents with their state, cadence and writer, a summary (drafts to review, not started, up to date), a progress bar, a filter and a search. A document with a file opens in the dialog, read only, with its path and state; a draft there has **Issue it**, which marks it issued through the console's own route and sends nothing, and **Draft it again**, which starts a new draft that replaces this one (a board draft has no Edit tab). **Draft it** starts the existing read-only run that writes a draft and sends nothing; **Draft the N not started** does that for each document that can be drafted. **Open** stays on premium pages: the backlog goes to this page's initiatives, new asks to its New asks card, releases to the release dialog, a Horizon scan to the Briefing's Horizon scan, and **Set it up** for a report to Insights. **Add a document** opens a form (title, who writes it, where it lives) and saves a document the core set does not cover on the board's record, in `custom-docs.jsonl`. A document with no link reads "Not started". A document with a link to Confluence or Google Docs reads "Linked" and shows its address. PMOS does not read or sync the linked page, so a linked document is never counted as up to date. Issue and Drop are not on this page.
@@ -12,6 +12,7 @@
12
12
  * sprints GET /api/boards/sprints → { source: 'jira'|'none', readAt, sprints: [{ name, state, start, end, counts: { todo, doing, done } }] }
13
13
  * docs GET /api/core-docs?level=board → { scope, summary, docs: [{ key, title, for, cadence, by, kind, st, act, running }] }
14
14
  * nextRelease { id, type, at } | null
15
+ * pastReleases [{ id, type, at, name, ini, accepted }] the board's release history, the latest first (at most 3)
15
16
  * held, cancelled, archived GET /api/boards/backlog?view=all&status=on hold | status=cancelled | archived=1 → rows (initiative premium-board-actions)
16
17
  * asks GET /api/boards/asks → asks [{ id, line, source, by, at, draft: { title, lane, anchor_suggestion } }]; null when it was not read
17
18
  *
@@ -146,12 +147,16 @@ function build(f) {
146
147
  return { name: r.name || r.id, tag, at: shortDate(String(r.at).slice(0, 10)), days: rd, away: rd != null ? (rd === 0 ? 'today' : rd + ' ' + plural(rd, 'day', 'days') + ' away') : '', type: r.type || '',
147
148
  ini: (r.ini || []).map((id) => rows.find((x) => x.id === id)).filter(Boolean).map((x) => ({ id: x.id, key: x.key, title: x.title, status: x.statusLabel || '', tone: x.late ? 'bad' : x.bad ? 'warn' : '' })) };
148
149
  };
150
+ // the board's release history, as the console's Released list shows it: accepted ones say Released, the others Past
151
+ const past = (f.pastReleases || []).filter((r) => r && r.at).map((r) => Object.assign(relOf(r, r.accepted ? 'Released' : 'Past'), { away: '' }));
149
152
  const release = nr && nr.at
150
- ? { ...relOf(nr, 'Next'), cap: relOf(nr, 'Next').away, rel: [relOf(nr, 'Next')].concat(nr.later && nr.later.at ? [relOf(nr.later, 'Planned')] : []) }
151
- : { cap: 'none', why: 'No release is planned for this board. A release appears here when one carries an initiative of this board.', rel: [] };
153
+ ? { ...relOf(nr, 'Next'), cap: relOf(nr, 'Next').away, rel: [relOf(nr, 'Next')].concat(nr.later && nr.later.at ? [relOf(nr.later, 'Planned')] : [], past) }
154
+ : past.length
155
+ ? { cap: 'none planned', rel: past, why: 'No release is planned for this board. The latest releases are listed below.' }
156
+ : { cap: 'none', why: 'No release is on record for this board, past or planned. A release appears here when a release record carries one of this board\'s initiatives.', rel: [] };
152
157
  const relRow = release.rel.length ? (() => {
153
158
  const rs = release.rel.flatMap((r) => [[r.name + ' · ' + r.tag, [r.at, r.away].filter(Boolean).join(' · ') + (r.type ? ' · ' + r.type : '')]].concat(r.ini.map((i) => ['Rides on it', i.title + (i.status ? ' · ' + i.status : '')])));
154
- return { key: 'board:release', id: null, title: release.name, sub: 'Release', dialog: { eye: 'Release', logTitle: 'Read from the releases', log: ['Read the releases that carry an initiative of this board', 'Took the earliest date from today on', 'Changed nothing'], say: release.name + ' is next: ' + release.at + ', ' + release.away + '.', head: 'Where it stands', facts: rs, hold: 'This dialog changes nothing.', pane: { label: 'Release', file: '', note: 'The releases as the release records hold them.', rows: rs } } };
159
+ return { key: 'board:release', id: null, title: release.name || past[0].name, sub: 'Release', dialog: { eye: 'Release', logTitle: 'Read from the releases', log: ['Read the releases that carry an initiative of this board', 'Took the earliest date from today on, and the latest before today', 'Changed nothing'], say: release.name ? release.name + ' is next: ' + release.at + ', ' + release.away + '.' : 'No release is planned. The latest was ' + past[0].name + ', ' + past[0].at + '.', head: 'Where it stands', facts: rs, hold: 'This dialog changes nothing.', pane: { label: 'Release', file: '', note: 'The releases as the release records hold them.', rows: rs } } };
155
160
  })() : null;
156
161
 
157
162
  const dd = f.docs || null;
@@ -627,6 +627,8 @@ function flowOf(issues) {
627
627
  const rank = { todo: 0, doing: 1, done: 2 };
628
628
  return [...by.values()].sort((a, b) => (rank[a.category] - rank[b.category]) || (b.n - a.n));
629
629
  }
630
+ // a sprint ticket carries its Jira page where the reading holds one, so a premium ticket tab can link to it
631
+ const urlOf = (t) => (typeof t.url === 'string' && /^https:\/\//.test(t.url) ? { url: t.url } : {});
630
632
  function sprintsOf(snapshots, onBoard = () => true, whole = null, notes = null, opts = {}) {
631
633
  const byName = new Map();
632
634
  let readAt = null;
@@ -644,7 +646,7 @@ function sprintsOf(snapshots, onBoard = () => true, whole = null, notes = null,
644
646
  if (!sp.start && typeof t.sprint.start === 'string' && t.sprint.start) sp.start = t.sprint.start; // the sprint's dates, as Jira holds them
645
647
  if (!sp.end && typeof t.sprint.end === 'string' && t.sprint.end) sp.end = t.sprint.end;
646
648
  const category = ['todo', 'doing', 'done'].includes(t.category) ? t.category : 'todo';
647
- sp.issues.push({ key: t.key, summary: t.summary || '', status: t.status || '', category, initiative: s.initiative, flagged: !!t.flagged, reason: t.flagged && t.reason ? String(t.reason) : null, points: ptsOf(t) });
649
+ sp.issues.push({ key: t.key, summary: t.summary || '', status: t.status || '', category, initiative: s.initiative, flagged: !!t.flagged, reason: t.flagged && t.reason ? String(t.reason) : null, points: ptsOf(t), ...urlOf(t) });
648
650
  sp.counts[category]++;
649
651
  }
650
652
  }
@@ -662,7 +664,7 @@ function sprintsOf(snapshots, onBoard = () => true, whole = null, notes = null,
662
664
  ...all.map((t) => {
663
665
  const category = ['todo', 'doing', 'done'].includes(t.category) ? t.category : 'todo';
664
666
  const o = own.get(t.key);
665
- return { key: t.key, summary: t.summary || '', status: t.status || '', category, initiative: o ? o.initiative : null, flagged: !!t.flagged, reason: t.flagged && t.reason ? String(t.reason) : null, points: ptsOf(t) };
667
+ return { key: t.key, summary: t.summary || '', status: t.status || '', category, initiative: o ? o.initiative : null, flagged: !!t.flagged, reason: t.flagged && t.reason ? String(t.reason) : null, points: ptsOf(t), ...urlOf(t.url ? t : o || {}) };
666
668
  }),
667
669
  ...sp.issues.filter((i) => !keys.has(i.key)), // a board ticket the sprint read has not seen yet keeps its own reading
668
670
  ];
@@ -685,7 +687,7 @@ function sprintsOf(snapshots, onBoard = () => true, whole = null, notes = null,
685
687
  if (!(n.themes || []).some((t) => t && t.initiative && onBoard(t.initiative))) continue;
686
688
  const issues = wt.filter((t) => t && t.key && t.sprint && same(t.sprint, n)).map((t) => {
687
689
  const category = ['todo', 'doing', 'done'].includes(t.category) ? t.category : 'todo';
688
- return { key: t.key, summary: t.summary || '', status: t.status || '', category, initiative: iniOf.get(t.key) || null, flagged: !!t.flagged, reason: t.flagged && t.reason ? String(t.reason) : null, points: ptsOf(t) };
690
+ return { key: t.key, summary: t.summary || '', status: t.status || '', category, initiative: iniOf.get(t.key) || null, flagged: !!t.flagged, reason: t.flagged && t.reason ? String(t.reason) : null, points: ptsOf(t), ...urlOf(t) };
689
691
  });
690
692
  const counts = { todo: 0, doing: 0, done: 0 };
691
693
  for (const i of issues) counts[i.category]++;
@@ -40,6 +40,15 @@ const SCOPE_SERVICES = ['slack', 'jira', 'confluence'];
40
40
  const SCOPE_LEVELS = ['watch', 'search', 'ignore'];
41
41
  const MAX_SCOPE_NAMES = 50;
42
42
  const MAX_WEBSITES = 10;
43
+ // The other connectors of the PM's Claude session (BigQuery, Sheets, ...): name → on. Nothing reads one yet, so a connector
44
+ // with no entry is off, and the switch only records the PM's choice for a reader to come (premium Settings › Connectors).
45
+ const MAX_CONNECTORS = 100;
46
+ // A connector name → the brief source it already backs, or null. Atlassian backs both Jira and Confluence.
47
+ const CONNECTOR_SOURCE = [[/calendar/i, 'calendar'], [/wispr/i, 'wispr'], [/gmail|outlook|\bmail\b/i, 'mail'], [/slack/i, 'slack'], [/atlassian|jira/i, 'jira'],
48
+ [/confluence/i, 'confluence'], [/github/i, 'github'], [/drive/i, 'drive'], [/figma/i, 'figma']];
49
+ const connectorSource = (name) => { const hit = CONNECTOR_SOURCE.find(([re]) => re.test(String(name || ''))); return hit ? hit[1] : null; };
50
+ /** The name a person knows a connector by: Claude Code keeps a claude.ai connector as "claude.ai <Name>". */
51
+ const connectorLabel = (name) => String(name || '').replace(/^claude\.ai\s+/i, '').trim();
43
52
  // G22: the daytime check — every 30 or 60 minutes, or off (0), between start and end of the working day.
44
53
  const DAY_CHECK_EVERY = [0, 30, 60];
45
54
  const DAY_CHECK_DEFAULT = Object.freeze({ every: 60, start: '09:00', end: '18:00' });
@@ -49,7 +58,7 @@ const DAY_CHECK_DEFAULT = Object.freeze({ every: 60, start: '09:00', end: '18:00
49
58
  const ABOUT_MAX = Object.freeze({ role: 80, work: 200, duties: 1000 });
50
59
  const ABOUT_DEFAULT = Object.freeze({ role: '', work: '', duties: '' });
51
60
  const DEFAULTS = Object.freeze({ name: '', about: ABOUT_DEFAULT, briefSources: BRIEF_DEFAULT, briefScoring: false, backgroundPrepare: false, enabled: true, triggers: Object.freeze(Object.fromEntries(TRIGGERS.map((t) => [t, true]))), stalledDays: 5, quiet: null, pauseLearning: false,
52
- scopes: Object.freeze({ slack: Object.freeze({}), jira: Object.freeze({}), confluence: Object.freeze({}) }), placeRepos: Object.freeze({ slack: Object.freeze({}), jira: Object.freeze({}), confluence: Object.freeze({}) }), dayCheck: DAY_CHECK_DEFAULT, websites: Object.freeze([]) });
61
+ scopes: Object.freeze({ slack: Object.freeze({}), jira: Object.freeze({}), confluence: Object.freeze({}) }), placeRepos: Object.freeze({ slack: Object.freeze({}), jira: Object.freeze({}), confluence: Object.freeze({}) }), dayCheck: DAY_CHECK_DEFAULT, websites: Object.freeze([]), connectors: Object.freeze({}) });
53
62
 
54
63
  const idOf = (key) => crypto.createHash('sha1').update(String(key)).digest('hex').slice(0, 12);
55
64
  const clip = (s, n) => String(s == null ? '' : s).replace(/\s+/g, ' ').trim().slice(0, n);
@@ -183,7 +192,7 @@ const HHMM = /^([01]\d|2[0-3]):([0-5]\d)$/;
183
192
  function normalizeSettings(raw) {
184
193
  const r = raw && typeof raw === 'object' ? raw : {};
185
194
  const s = { name: DEFAULTS.name, about: { ...ABOUT_DEFAULT }, briefSources: { ...BRIEF_DEFAULT }, briefScoring: DEFAULTS.briefScoring, backgroundPrepare: DEFAULTS.backgroundPrepare, enabled: DEFAULTS.enabled, triggers: { ...DEFAULTS.triggers }, stalledDays: DEFAULTS.stalledDays, quiet: DEFAULTS.quiet, pauseLearning: DEFAULTS.pauseLearning,
186
- scopes: { slack: {}, jira: {}, confluence: {} }, placeRepos: { slack: {}, jira: {}, confluence: {} }, dayCheck: { ...DAY_CHECK_DEFAULT }, websites: [] };
195
+ scopes: { slack: {}, jira: {}, confluence: {} }, placeRepos: { slack: {}, jira: {}, confluence: {} }, dayCheck: { ...DAY_CHECK_DEFAULT }, websites: [], connectors: {} };
187
196
  if (r.enabled !== undefined) { if (typeof r.enabled !== 'boolean') return { ok: false, error: 'enabled must be true or false' }; s.enabled = r.enabled; }
188
197
  if (r.name !== undefined) { if (typeof r.name !== 'string' || r.name.length > 40) return { ok: false, error: 'name must be text of at most 40 characters' }; s.name = r.name.replace(/\s+/g, ' ').trim(); }
189
198
  if (r.about !== undefined) {
@@ -204,6 +213,15 @@ function normalizeSettings(raw) {
204
213
  s.briefSources[k] = v;
205
214
  }
206
215
  }
216
+ if (r.connectors !== undefined) {
217
+ if (!r.connectors || typeof r.connectors !== 'object' || Array.isArray(r.connectors)) return { ok: false, error: 'connectors must be an object of connector name → true or false' };
218
+ for (const [k, v] of Object.entries(r.connectors)) {
219
+ if (!k.trim() || k.length > 120) return { ok: false, error: 'a connector name is 1 to 120 characters' };
220
+ if (typeof v !== 'boolean') return { ok: false, error: `connector "${k}" must be true or false` };
221
+ s.connectors[k] = v;
222
+ }
223
+ if (Object.keys(s.connectors).length > MAX_CONNECTORS) return { ok: false, error: `connectors has ${Object.keys(s.connectors).length} names — at most ${MAX_CONNECTORS}` };
224
+ }
207
225
  if (r.pauseLearning !== undefined) { if (typeof r.pauseLearning !== 'boolean') return { ok: false, error: 'pauseLearning must be true or false' }; s.pauseLearning = r.pauseLearning; }
208
226
  if (r.triggers !== undefined) {
209
227
  if (!r.triggers || typeof r.triggers !== 'object' || Array.isArray(r.triggers)) return { ok: false, error: `triggers must be an object of ${TRIGGERS.join(', ')} → true or false` };
@@ -287,4 +305,4 @@ function inQuietHours(nowMs, quiet) {
287
305
  return a < b ? m >= a && m < b : m >= a || m < b;
288
306
  }
289
307
 
290
- module.exports = { BRIEF_SOURCES, SCOPE_SERVICES, SCOPE_LEVELS, MAX_SCOPE_NAMES, MAX_WEBSITES, DAY_CHECK_EVERY, TRIGGERS, VERDICTS, EVENTS, DEFAULTS, DEDUPE_MS, DISMISS_MS, BASE, detect, rank, newSignals, dismissedIds, validateFeedback, normalizeSettings, inQuietHours };
308
+ module.exports = { BRIEF_SOURCES, MAX_CONNECTORS, connectorSource, connectorLabel, SCOPE_SERVICES, SCOPE_LEVELS, MAX_SCOPE_NAMES, MAX_WEBSITES, DAY_CHECK_EVERY, TRIGGERS, VERDICTS, EVENTS, DEFAULTS, DEDUPE_MS, DISMISS_MS, BASE, detect, rank, newSignals, dismissedIds, validateFeedback, normalizeSettings, inQuietHours };
@@ -85,7 +85,7 @@ module.exports = {
85
85
  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'); }
86
86
  const model = BoardPremium.build({
87
87
  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 })),
88
- board: head.body.board, counts: head.body.counts, nextRelease: head.body.nextRelease || null,
88
+ board: head.body.board, counts: head.body.counts, nextRelease: head.body.nextRelease || null, pastReleases: head.body.pastReleases || [],
89
89
  rows: listOf(rk, nw), columns: c ? c.columns : [], sprints: s || { source: 'none', sprints: [] }, docs: d, custom,
90
90
  held: hd ? hd.rows : [], cancelled: cn ? cn.rows : [], archived: ar ? ar.rows : [], asks: ak ? ak.asks || [] : null,
91
91
  });
@@ -348,6 +348,19 @@ function nextReleaseOf(releases, ids) {
348
348
  // the next one, with the one after it (the mockup's Planned row)
349
349
  return hits[0] ? { ...hits[0], later: hits[1] || null } : null;
350
350
  }
351
+ /** The past releases that carry an initiative of the board, the latest first (at most `n`): the board's release history. */
352
+ function pastReleasesOf(releases, ids, n = 3) {
353
+ const day = today();
354
+ const hits = [];
355
+ for (const r of releases) {
356
+ const on = (r.initiative_ids || []).filter((x) => ids.has(x));
357
+ if (!on.length) continue;
358
+ const at = r.release_at || r.deploy_at;
359
+ if (!at || at.slice(0, 10) >= day) continue;
360
+ hits.push({ id: r.id, type: r.type, at, name: r.fix_version || r.id, ini: on, accepted: !!r.accepted_at });
361
+ }
362
+ return hits.sort((x, y) => String(y.at).localeCompare(String(x.at))).slice(0, n);
363
+ }
351
364
  const openAsks = (folded, boardId) => [...folded.asks.values()].filter((a) => a.board === boardId && a.state === 'open').length;
352
365
  const pageAsk = (a) => ({ ...a, by: actorLib.pageName(a.by) });
353
366
  const pageMove = (m) => ({ ...m, by: actorLib.pageName(m.by) });
@@ -461,8 +474,9 @@ const READS = {
461
474
  if (!r) return;
462
475
  const c = B.counts(r.rows, r.board.workflow);
463
476
  const recent = r.fr.folded.moves.filter((m) => m.board === r.board.id).slice(-10).reverse().map(pageMove);
477
+ const rels = readReleases(ctx), ids = new Set(r.rows.map((x) => x.id));
464
478
  ctx.json(res, { ok: true, board: { ...r.board, health: B.health(r.rows) }, counts: { total: c.total, open: c.open, byStage: c.byStage, byStatus: c.byStatus, byCat: c.byCat },
465
- asks: openAsks(r.fr.folded, r.board.id), nextRelease: nextReleaseOf(readReleases(ctx), new Set(r.rows.map((x) => x.id))), recent });
479
+ asks: openAsks(r.fr.folded, r.board.id), nextRelease: nextReleaseOf(rels, ids), pastReleases: pastReleasesOf(rels, ids), recent });
466
480
  },
467
481
  '/api/boards/backlog': (ctx, res, url) => {
468
482
  const r = boardRead(ctx, res, url);
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.361.0",
3
+ "version": "0.362.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.361.0",
9
+ "version": "0.362.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.361.0",
3
+ "version": "0.362.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",
@@ -33,13 +33,16 @@ const SP = { name: 'Sprint 14', state: 'active', start: '2026-10-07', end: '2026
33
33
  const SPRINTS = {
34
34
  ok: true, ws: 'w1', board: 'w1', source: 'jira', readAt: new Date().toISOString(), velocity: [],
35
35
  sprints: [
36
- { ...SP, goal: { from: 'tickets', text: 'Ship guided setup to new workspaces' }, points: { committed: 10, done: 3, unestimated: 0 }, pace: { daysLeft: 2 }, counts: { todo: 2, doing: 1, done: 1 },
36
+ { ...SP, goal: { from: 'tickets', text: 'Ship guided setup to new workspaces', jira: 'Setup' }, summary: 'Three tickets on guided setup, one blocked.', points: { committed: 10, done: 3, unestimated: 0 }, pace: { daysLeft: 2 }, counts: { todo: 2, doing: 1, done: 1 },
37
37
  issues: [
38
38
  { key: 'PMOS-142', summary: 'Migration check for older workspaces', status: 'To Do', category: 'todo', initiative: 'self-serve-v2', flagged: true, reason: 'Flagged in Jira', points: 5 },
39
39
  { key: 'PMOS-141', summary: 'Setup drops custom fields', status: 'Code review', category: 'doing', initiative: 'self-serve-v2', flagged: false, reason: null, points: 2 },
40
40
  { key: 'PMOS-138', summary: 'Guided setup copy', status: 'Done', category: 'done', initiative: 'self-serve-v2', flagged: false, reason: null, points: 3 },
41
- { key: 'OPS-9', summary: 'Rotate keys', status: 'To Do', category: 'todo', initiative: null, flagged: false, reason: null, points: null }] },
42
- { name: 'Sprint 15', state: 'future', start: '2026-10-22', end: '2026-11-04', goal: null, jiraGoal: null, points: null, counts: { todo: 0, doing: 0, done: 0 }, issues: [] }],
41
+ { key: 'OPS-9', summary: 'Rotate keys', status: 'To Do', category: 'todo', initiative: null, flagged: false, reason: null, points: null, url: 'https://acme.atlassian.net/browse/OPS-9' }] },
42
+ { name: 'Sprint 15', state: 'future', start: '2026-10-22', end: '2026-11-04', goal: null, jiraGoal: null, points: null, counts: { todo: 0, doing: 0, done: 0 }, issues: [] },
43
+ { name: 'Sprint 12', state: 'closed', start: '2026-09-09', end: '2026-09-23', goal: null, jiraGoal: null, points: null, counts: { todo: 0, doing: 0, done: 1 },
44
+ issues: [{ key: 'PMOS-120', summary: 'Old work', status: 'Done', category: 'done', initiative: null, flagged: false, reason: null, points: null }] },
45
+ { name: 'Sprint 13', state: 'closed', start: '2026-09-23', end: '2026-10-07', goal: null, jiraGoal: null, points: null, counts: { todo: 0, doing: 0, done: 0 }, issues: [] }],
43
46
  };
44
47
  const TICKETS = {
45
48
  ok: true, initiative: 'self-serve-v2', title: 'Self-serve onboarding v2', prd: 'planning/prd/self-serve-v2-prd.md', checkedAt: new Date().toISOString(),
@@ -85,14 +88,27 @@ const TICKETS = {
85
88
  await p.click('#cSpr [data-open="board:sprint"]');
86
89
  const board = await until(async () => { const t = await paneText(p, 'sprint:w1'); return t && /Migration check/.test(t) ? t : null; });
87
90
  ok('B1 the Sprint card opens the dialog with the sprint as a second tab', !!board && (await tabIds(p)).join() === 'main,sprint:w1', JSON.stringify(await tabIds(p)));
88
- ok('B2 the board names the sprint, its dates, goal, days left and points from the read', /Sprint 14 · 7 Oct – 21 Oct/.test(board) && /Goal: Ship guided setup/.test(board) && /2 days left/.test(board) && /3 of 10 points done/.test(board), board);
91
+ ok('B2 the board names the sprint, its dates, goal, days left and points from the read', /Sprint 14 · 7 Oct – 21 Oct/.test(board) && /Sprint goal · from the tickets/i.test(board) && /Ship guided setup/.test(board) && /Three tickets on guided setup/.test(board) && /In Jira: “Setup”/.test(board) && /2 days left/.test(board) && /3 of 10 points done/.test(board), board);
89
92
  const cols = await p.evaluate(() => [...document.querySelectorAll('.jcol')].map((c) => c.querySelector('.jcolh').textContent + ':' + c.querySelectorAll('.jcrd').length).join());
90
93
  ok('B3 the cards sit in To do, In progress and Done by the reading\'s category', cols === 'To do2:2,In progress1:1,Done1:1', cols);
91
94
  ok('B4 a card shows its own Jira status where it differs from the column, a flag, and points', await p.evaluate(() => { const c = [...document.querySelectorAll('.jcrd')]; const r = c.find((x) => /PMOS-141/.test(x.textContent)), f = c.find((x) => /PMOS-142/.test(x.textContent)); return /Code review/.test(r.textContent) && /2/.test(r.querySelector('.jpts').textContent) && f.classList.contains('risk') && /Flagged in Jira/.test(f.textContent); }));
92
- ok('B5 a ticket on no initiative of the board is drawn but not a button, and the note counts it', await p.evaluate(() => { const o = [...document.querySelectorAll('.jcrd')].find((x) => /OPS-9/.test(x.textContent)); return o.tagName === 'DIV' && o.classList.contains('off'); }) && /1 ticket is in this sprint but on no initiative/.test(board));
95
+ ok('B5 every ticket is a button, the one on no initiative of the board too', await p.evaluate(() => [...document.querySelectorAll('.jcrd')].every((x) => x.tagName === 'BUTTON')));
96
+ ok('B8 the closed sprints fold behind Past sprints, shut by default, after the active and next ones', await p.evaluate(() => { const f = document.querySelector('#jpast'), b = document.querySelector('[data-jpast]');
97
+ return !!f && f.hidden && /Past sprints\s*2/.test(b.textContent) && b.getAttribute('aria-expanded') === 'false' && [...document.querySelectorAll('.jseg:not(.jpast) [data-sp]')].map((x) => x.dataset.sp).join() === 'Sprint 14,Sprint 15'; }));
98
+ await p.click('[data-jpast]');
99
+ ok('B9 Past sprints opens the closed ones; one press shows a closed sprint and keeps the fold open', await p.evaluate(() => !document.querySelector('#jpast').hidden));
100
+ await p.click('#jpast [data-sp="Sprint 12"]');
101
+ ok('B10 a closed sprint draws its board, and the fold stays open on it', !!(await until(async () => { const t = await paneText(p, 'sprint:w1'); return t && /Sprint 12 · 9 Sep – 23 Sep/.test(t) && /Old work/.test(t) && await p.evaluate(() => !document.querySelector('#jpast').hidden); })));
102
+ await p.click('[data-jpast]'); await p.click('.jseg [data-sp="Sprint 14"]');
103
+ await until(async () => { const t = await paneText(p, 'sprint:w1'); return t && /Sprint 14 ·/.test(t); });
104
+ ok('B11 shut again, the fold stays shut on the active sprint', await p.evaluate(() => document.querySelector('#jpast').hidden));
105
+ await p.click('.jcrd[data-k="OPS-9"]');
106
+ const o9 = await until(async () => { const t = await paneText(p, 'jira:OPS-9'); return t && /Rotate keys/.test(t) ? t : null; });
107
+ ok('B12 a ticket on no initiative opens its tab from the sprint read, with its Jira link', !!o9 && /on no initiative of this board/.test(o9) && await p.evaluate(() => [...document.querySelectorAll('#dOut .obody.vw:not([hidden]) a[href]')].some((a) => a.href === 'https://acme.atlassian.net/browse/OPS-9')), o9);
108
+ await p.click('#vTabs [data-vx="jira:OPS-9"]'); await p.click('#vTabs .vtab[data-vw="sprint:w1"]');
93
109
  ok('B6 the view says it is read-only and moves nothing', /Read-only: Jira owns each ticket's status and sprint/.test(board) && !(await p.$('#dOut .obody.vw [draggable="true"]')));
94
110
  await p.click('.jseg [data-sp="Sprint 15"]');
95
- ok('B7 the other sprint is one press away, and an empty one draws empty columns', !!(await until(async () => { const t = await paneText(p, 'sprint:w1'); return t && /Sprint 15 · 22 Oct – 4 Nov/.test(t) && /No sprint goal on record/.test(t) && (t.match(/None/g) || []).length === 3; })));
111
+ ok('B7 the other sprint is one press away, and an empty one draws empty columns', !!(await until(async () => { const t = await paneText(p, 'sprint:w1'); return t && /Sprint 15 · 22 Oct – 4 Nov/.test(t) && /No goal yet\. The Jira status check writes one from the tickets/.test(t) && (t.match(/None/g) || []).length === 3; })));
96
112
  await p.click('.jseg [data-sp="Sprint 14"]');
97
113
  await until(() => p.$('.jcrd[data-k="PMOS-142"]'));
98
114
 
@@ -111,9 +111,9 @@ function drawSide() {
111
111
  + `${S.goal ? `<span class="goal2">Goal: ${esc(S.goal)}</span>` : ''}${S.review ? `<span class="sum3">${esc(S.review)}</span>` : ''}</button>`
112
112
  : `<p class="mut">${esc(S.why)}</p>`;
113
113
  $('#hRel').textContent = 'Next release';
114
- $('#relCap').textContent = R.rel && R.rel.length ? '' : 'none';
114
+ $('#relCap').textContent = R.at ? '' : R.cap || 'none';
115
115
  $('#relBody').innerHTML = R.rel && R.rel.length
116
- ? `<div class="rels">${R.rel.map((r) => `<button type="button" class="rel" data-open="board:release" aria-haspopup="dialog"><span class="rh"><b>${esc(r.name)}</b><em class="rtag">${esc(r.tag)}</em><time>${esc(r.at)}${r.away ? ' · ' + esc(r.away) : ''}</time></span>${r.ini.map((i) => `<span class="ri"><i class="hd ${i.tone}"></i>${esc(i.title)}${i.status ? ' · ' + esc(i.status) : ''}</span>`).join('')}</button>`).join('')}</div>`
116
+ ? `${R.at ? '' : `<p class="empty3 plain">${esc(R.why)}</p>`}<div class="rels">${R.rel.map((r) => `<button type="button" class="rel" data-open="board:release" aria-haspopup="dialog"><span class="rh"><b>${esc(r.name)}</b><em class="rtag">${esc(r.tag)}</em><time>${esc(r.at)}${r.away ? ' · ' + esc(r.away) : ''}</time></span>${r.ini.map((i) => `<span class="ri"><i class="hd ${i.tone}"></i>${esc(i.title)}${i.status ? ' · ' + esc(i.status) : ''}</span>`).join('')}</button>`).join('')}</div>`
117
117
  : `<p class="empty3 plain">${esc(R.why)}</p>`;
118
118
  }
119
119
  $('#cSpr').addEventListener('click', (e) => { const b = e.target.closest('[data-open]'); if (b) openRow(rowOf(b.dataset.open)); });
@@ -199,7 +199,7 @@ function paneHtml(r) {
199
199
  function openRow(r) {
200
200
  if (!r) return;
201
201
  const d = r.dialog;
202
- openDlg({ eye: d.eye + ' · real data', title: r.title, sub: r.sub + (r.statusLabel ? ' · ' + r.statusLabel : ''), say: d.say, stream: turnA(logHtml(d)) + turnA(ptx(d.say)) + cardHtml(r), noteKey: r.key, pane: paneHtml(r), label: d.pane.label });
202
+ openDlg({ eye: d.eye + ' · real data', title: r.title, sub: r.sub + (r.statusLabel ? ' · ' + r.statusLabel : ''), say: d.say, stream: turnA(logHtml(d)) + turnA(ptx(d.say)) + cardHtml(r), noteKey: r.key, pane: paneHtml(r), label: d.pane.label, compact: r.key === 'board:sprint' }); // compact: the short phone head of the meeting dialog, so the sprint board gets the height
203
203
  const vb = $('#oMain [data-vwopen]'); if (vb) vb.onclick = () => openWorkItem({ kind: 'initiative', id: r.id, title: r.title, ws: M.board.ws, board: M.board.id }); // its record, checks, tasks and links as a viewer tab (premium-viewer S7)
204
204
  loadThread(r.key);
205
205
  if (r.key === 'board:sprint') openSprint({ ws: M.board.ws, board: M.board.id, name: r.title }); // the sprint as a board by status, beside its facts (premium-viewer S5)
@@ -720,6 +720,8 @@ addEventListener('keydown', (e) => {
720
720
  pvMount();
721
721
  /* ── Settings: the two things that cannot be defaulted (initiative premium-settings) ────────────────────────────────────────────────────
722
722
  * Workspaces: GET /api/workspaces · POST /api/workspaces, /api/workspaces/forget. Connectors: GET and POST /api/proactive/settings {briefSources}.
723
+ * The GET also lists every connector the Claude session has (server.js sessionConnectors); one that backs no brief source is a row
724
+ * of its own, off until pressed ({connectors}), and says that nothing in PMOS reads it on its own yet; sessions use it either way.
723
725
  * Each press saves what the console's section saves, and nothing else. Every other setting runs on a default and stays in the console. */
724
726
  const SRC = { calendar: 'Calendar', wispr: 'Wispr Flow', mail: 'Mail', slack: 'Slack', jira: 'Jira', confluence: 'Confluence', github: 'GitHub', drive: 'Google Drive', figma: 'Figma', website: 'Your websites' };
725
727
 
@@ -830,18 +832,19 @@ async function updWaitRestart(from, log, say) {
830
832
  }
831
833
 
832
834
  export async function openSettings() {
833
- const M = { ws: null, src: null, err: '', busy: false };
835
+ const M = { ws: null, src: null, conn: [], con: {}, err: '', busy: false };
834
836
  const U = { phase: null, say: '', checking: false, open: new Set(), shut: new Set(), full: new Set() };
835
837
  const draw = () => {
836
838
  const w = M.ws, s = M.src;
837
839
  const wsRows = w === null ? '<p class="note">Reading the repositories.</p>' : w.length ? w.map((x) => `<div class="sr"><span class="sn"><b>${esc(x.label || x.name || x.id)}</b><em>${esc(x.root || '')}${x.home ? ' · home' : ''}</em></span>${x.home ? '' : `<button type="button" class="cta alt" data-rm="${esc(x.id)}">Remove</button>`}</div>`).join('') : '<p class="note">No repository is registered yet.</p>';
838
840
  const srcRows = s === null ? '<p class="note">Reading the sources.</p>' : Object.keys(SRC).filter((k) => k in s).map((k) => `<div class="sr"><span class="sn"><b>${esc(SRC[k])}</b><em>${s[k] ? 'The Briefing reads it' : 'The Briefing does not read it'}</em></span><button type="button" class="fchip" role="switch" aria-checked="${s[k]}" aria-label="${esc(SRC[k])}: the Briefing reads it" data-src="${esc(k)}">${s[k] ? 'On' : 'Off'}</button></div>`).join('');
841
+ const connRows = s === null ? '' : M.conn.filter((c) => !c.source).map((c) => { const on = M.con[c.name] === true; return `<div class="sr"><span class="sn"><b>${esc(c.label)}</b><em>${on ? 'On for a reader to come. Your sessions can use it now' : 'Your sessions can use it. Nothing in PMOS reads it on its own yet'}</em></span><button type="button" class="fchip" role="switch" aria-checked="${on}" aria-label="${esc(c.label)}: on" data-conn="${esc(c.name)}">${on ? 'On' : 'Off'}</button></div>`; }).join('');
839
842
  $('#oMain').innerHTML = `<article class="paper doc"><div class="addf">
840
843
  <div data-upd-block><span class="label">Updates</span>${updBlock(U)}</div>
841
844
  <div data-whats-new><span class="label">What's new</span>${updWhatsNew(U)}</div>
842
845
  <div><span class="label">Workspaces</span><p class="note" style="margin:0 0 8px">A workspace is one repository PMOS works in. Removing one forgets the address only; the folder is not deleted.</p>${wsRows}
843
846
  <div class="two" style="margin-top:10px"><label><input id="stP" maxlength="500" placeholder="Folder path of a repository" aria-label="Folder path of a repository"></label><button type="button" class="cta" id="stAdd">Add repository</button></div></div>
844
- <div><span class="label">Connectors</span><p class="note" style="margin:0 0 8px">Which sources the Briefing reads. PMOS keeps no passwords or keys; your Claude session reaches each tool through its own connectors.</p>${srcRows}</div>
847
+ <div><span class="label">Connectors</span><p class="note" style="margin:0 0 8px">Every connector your Claude session has. Your sessions can use all of them; a switch chooses only what PMOS reads on its own, such as the sources of the Briefing. PMOS keeps no passwords or keys.</p>${srcRows}${connRows}</div>
845
848
  <p class="note" id="stM" role="status" style="margin:0;min-height:1.2em">${esc(M.err)}</p>
846
849
  <p class="note" style="margin:0">Everything else runs on a default. <a href="/console.html?tab=settings">More settings in the console</a>.</p></div></article>`;
847
850
  };
@@ -850,6 +853,7 @@ export async function openSettings() {
850
853
  const load = async () => {
851
854
  const [w, p] = await Promise.all([pmGet('/api/workspaces'), pmGet('/api/proactive/settings'), updRead()]);
852
855
  M.ws = w && Array.isArray(w.workspaces) ? w.workspaces : []; M.src = p && p.ok && p.settings ? { ...p.settings.briefSources } : {};
856
+ M.con = p && p.ok && p.settings ? { ...p.settings.connectors } : {}; M.conn = p && p.connectors && Array.isArray(p.connectors.list) ? p.connectors.list : [];
853
857
  if (!w || !Array.isArray(w.workspaces)) M.err = 'The repositories could not be read.'; else if (!p || !p.ok) M.err = 'The sources could not be read.';
854
858
  draw();
855
859
  };
@@ -881,7 +885,7 @@ export async function openSettings() {
881
885
  }
882
886
  return;
883
887
  }
884
- const rm = e.target.closest('[data-rm]'), sw = e.target.closest('[data-src]');
888
+ const rm = e.target.closest('[data-rm]'), sw = e.target.closest('[data-src]'), cn = e.target.closest('[data-conn]');
885
889
  M.err = '';
886
890
  if (rm) {
887
891
  const x = M.ws.find((y) => y.id === rm.dataset.rm); if (!x) return;
@@ -893,6 +897,11 @@ export async function openSettings() {
893
897
  M.busy = true; const r = await pmPost('/api/proactive/settings', { briefSources: { [k]: on } }); M.busy = false;
894
898
  if (r && r.ok) { M.src[k] = on; toast((on ? 'The Briefing now reads ' : 'The Briefing no longer reads ') + SRC[k] + '.'); } else M.err = (r && r.error) || 'Not saved.';
895
899
  draw();
900
+ } else if (cn) {
901
+ const k = cn.dataset.conn, on = M.con[k] !== true, c = M.conn.find((x) => x.name === k);
902
+ M.busy = true; const r = await pmPost('/api/proactive/settings', { connectors: { [k]: on } }); M.busy = false;
903
+ if (r && r.ok) { M.con[k] = on; toast((c ? c.label : k) + (on ? ' is on. Nothing in PMOS reads it on its own yet.' : ' is off.')); } else M.err = (r && r.error) || 'Not saved.';
904
+ draw();
896
905
  } else if (e.target.closest('#stAdd')) {
897
906
  const root = ($('#stP').value || '').trim(); if (!root) { M.err = 'Paste the folder path of a repository.'; draw(); return; }
898
907
  M.busy = true; const r = await pmPost('/api/workspaces', { root, focus: false }); M.busy = false;
@@ -66,9 +66,9 @@ export function ticketModel(view, ref, sprints = null) {
66
66
  sprint: sp && sp.name ? { name: sp.name, state: sp.state || '', dates: [day(sp.start), day(sp.end)].filter(Boolean).join(' – ') } : null,
67
67
  flagged, reason: flagged ? (j && j.reason) || (hit && hit.issue.reason) || 'Flagged in Jira' : '',
68
68
  stale: !!(j && j.stale), sections, subtasks: sub, links, epic, prd: view && view.prd ? String(view.prd) : '',
69
- initiative: view && view.title ? view.title : '', url: safeUrl(j && j.url),
69
+ initiative: view && view.title ? view.title : '', url: safeUrl(j && j.url) || safeUrl(hit && hit.issue.url),
70
70
  readAt: (view && view.checkedAt) || (sprints && sprints.readAt) || null,
71
- draftOnly: !t, readingOnly: !!t && !!t.key && !j,
71
+ draftOnly: !t, noDraft: !view, readingOnly: !!t && !!t.key && !j,
72
72
  };
73
73
  }
74
74
 
@@ -88,7 +88,10 @@ export function sprintModel(sprints, name, { today } = {}) {
88
88
  const all = Array.isArray(sprints.sprints) ? sprints.sprints : [];
89
89
  const sp = (name && all.find((s) => s.name === name)) || all[0];
90
90
  if (!sp) return { ok: false, why: 'Jira was read, but none of this board\'s tickets is in a sprint.' };
91
- const goal = sp.goal && typeof sp.goal === 'object' ? str(sp.goal.text) : str(sp.jiraGoal);
91
+ // The goal is always the one the Jira status check wrote from the sprint's tickets, as the console's Sprints tab draws it
92
+ // (c3-ib-sprints.js goalBlock): Jira's own sprint goal is often empty or too broad, so it is shown only as a reference.
93
+ const goal = sp.goal && typeof sp.goal === 'object' ? str(sp.goal.text) : '';
94
+ const jiraGoal = (sp.goal && typeof sp.goal === 'object' ? str(sp.goal.jira) : '') || str(sp.jiraGoal);
92
95
  const pts = sp.points && Number.isFinite(sp.points.committed) ? { done: sp.points.done, committed: sp.points.committed, unestimated: sp.points.unestimated || 0 } : null;
93
96
  const pace = sp.pace || null;
94
97
  let left = '';
@@ -98,11 +101,11 @@ export function sprintModel(sprints, name, { today } = {}) {
98
101
  if (Number.isFinite(a) && Number.isFinite(b)) { const d = Math.round((a - b) / 864e5); left = d < 0 ? 'ended ' + plural(-d, 'day', 'days') + ' ago' : d === 0 ? 'ends today' : plural(d, 'day', 'days') + ' left'; }
99
102
  }
100
103
  const cards = (sp.issues || []).map((i) => ({ key: i.key, title: i.summary || i.key, status: i.status || CAT[i.category] || '', cat: CAT[i.category] ? i.category : 'todo',
101
- points: typeof i.points === 'number' ? i.points : null, initiative: i.initiative || null, flagged: !!i.flagged, reason: i.flagged ? i.reason || 'Flagged in Jira' : '' }));
104
+ points: typeof i.points === 'number' ? i.points : null, initiative: i.initiative || null, url: safeUrl(i.url), flagged: !!i.flagged, reason: i.flagged ? i.reason || 'Flagged in Jira' : '' }));
102
105
  const cols = COLS.map(([cat, label]) => ({ cat, label, cards: cards.filter((c) => c.cat === cat) }));
103
106
  const other = cards.filter((c) => !c.initiative).length;
104
107
  return {
105
- ok: true, name: sp.name, state: sp.state || '', dates: [day(sp.start), day(sp.end)].filter(Boolean).join(' – '), goal, left, points: pts,
108
+ ok: true, name: sp.name, state: sp.state || '', dates: [day(sp.start), day(sp.end)].filter(Boolean).join(' – '), goal, jiraGoal, summary: str(sp.summary), left, points: pts,
106
109
  counts: { todo: cols[0].cards.length, doing: cols[1].cards.length, done: cols[2].cards.length }, total: cards.length, cols, other,
107
110
  readAt: sprints.readAt || null, sprints: sprintList(sprints),
108
111
  };
@@ -56,6 +56,15 @@
56
56
  .jsh h3{margin:0;font-size:var(--fs-4);font-weight:600;color:var(--ink)}
57
57
  .jsh p{margin:2px 0 0;font-size:var(--fs-2);color:var(--ink-3)}
58
58
  .jsh>div{min-width:0}
59
+ .jpastb{border-style:dashed!important}
60
+ .jpastb[aria-expanded="true"]{border-style:solid!important;background:var(--well)!important}
61
+ .jpast[hidden]{display:none}
62
+ .jgoal{display:grid;gap:4px;background:var(--card-solid);border:1px solid var(--hair);border-radius:8px;padding:12px 16px;box-shadow:var(--card-shadow);min-width:0;overflow-wrap:anywhere}
63
+ .jgoal .jlab{margin:0;font:600 var(--fs-1) var(--mono);letter-spacing:.07em;text-transform:uppercase;color:var(--ink-3)}
64
+ .jgoal b{font-size:var(--fs-3);font-weight:600;line-height:1.45;color:var(--ink)}
65
+ .jgoal p{margin:0;font-size:var(--fs-2);line-height:1.5;color:var(--ink-2)}
66
+ .jgoal .jgref{color:var(--ink-3)}
67
+ .jsh .jgoal{flex-basis:100%;background:none;border:0;border-top:1px solid var(--hair);border-radius:0;box-shadow:none;padding:10px 0 0}
59
68
  .jcap{display:flex;align-items:center;gap:8px;font-size:var(--fs-2);color:var(--ink-3)}
60
69
  .jcap i{display:block;width:90px;height:6px;border-radius:6px;background:var(--well);overflow:hidden;position:relative}
61
70
  .jcap i::after{content:"";position:absolute;inset:0;width:var(--bd-w,0);background:var(--ok);border-radius:6px}
@@ -43,7 +43,7 @@ function ticketHtml(m) {
43
43
  ? `<button type="button" data-jt="${esc(l.ref)}">${LINK}<span class="jk">${esc(l.key || l.ref)}</span><b>${esc(l.title)}</b></button>`
44
44
  : `<span class="jlx">${LINK}<span class="jk">${esc(l.ref)}</span></span>`}</div>`).join('')}${m.prd ? `<div class="jln"><em>from</em><span class="jlx">${DOC}<b>${esc(m.prd)}</b></span></div>` : ''}</div>` : '';
45
45
  const body = m.sections.length ? m.sections.map((s) => `<h3>${esc(s.name)}</h3><div class="jmd">${md(s.text)}</div>`).join('')
46
- : `<p class="jnote">${m.draftOnly ? 'This ticket is not in the initiative\'s ticket draft, so PMOS holds no text for it. Its title, status and points come from the sprint read.' : 'The ticket draft holds no text for this ticket.'}</p>`;
46
+ : `<p class="jnote">${m.noDraft ? 'This ticket is on no initiative of this board, so PMOS holds no text for it. Its title, status and points come from the sprint read.' : m.draftOnly ? 'This ticket is not in the initiative\'s ticket draft, so PMOS holds no text for it. Its title, status and points come from the sprint read.' : 'The ticket draft holds no text for this ticket.'}</p>`;
47
47
  return `<div class="jv">${bar('ticket', m)}<article class="jtk">
48
48
  <div class="jbc">${m.epic ? `<span class="jk">${esc(m.epic.key)}</span>${m.epic.title ? ` ${esc(m.epic.title)}` : ''} <span aria-hidden="true">/</span> ` : m.initiative ? `${esc(m.initiative)} <span aria-hidden="true">/</span> ` : ''}<span class="jk">${esc(m.key || m.id)}</span></div>
49
49
  <h1>${esc(m.title)}</h1>
@@ -74,34 +74,46 @@ export async function openTicket(o) {
74
74
  }
75
75
 
76
76
  /* ── the sprint ─────────────────────────────────────────────────────────────────────────────────────────── */
77
- function sprintHtml(m) {
77
+ function sprintHtml(m, past) {
78
78
  if (!m.ok) return empty(m.why);
79
- const pick = m.sprints.length > 1 ? `<div class="jseg" role="group" aria-label="Sprint">${m.sprints.map((s) => `<button type="button" data-sp="${esc(s.name)}" aria-pressed="${s.name === m.name}">${esc(s.name)}${s.state ? `<small>${esc(s.state)}</small>` : ''}</button>`).join('')}</div>` : '';
79
+ // The active and next sprints are one press away; the closed ones fold behind "Past sprints" (Wawan 2026-10-21, as the console keeps
80
+ // closed sprints out of its page) and open by themselves only when a closed sprint is the one shown.
81
+ const spBtn = (s) => `<button type="button" data-sp="${esc(s.name)}" aria-pressed="${s.name === m.name}">${esc(s.name)}${s.state ? `<small>${esc(s.state)}</small>` : ''}</button>`;
82
+ const now = m.sprints.filter((s) => s.state !== 'closed'), done = m.sprints.filter((s) => s.state === 'closed');
83
+ const open = past || done.some((s) => s.name === m.name);
84
+ const pick = m.sprints.length > 1 ? `<div class="jseg" role="group" aria-label="Sprint">${now.map(spBtn).join('')}${done.length ? `<button type="button" class="jpastb" data-jpast aria-expanded="${open}" aria-controls="jpast">Past sprints<small>${done.length}</small></button>` : ''}</div>`
85
+ + (done.length ? `<div class="jseg jpast" id="jpast" role="group" aria-label="Past sprints"${open ? '' : ' hidden'}>${done.map(spBtn).join('')}</div>` : '') : '';
80
86
  const pts = m.points ? `<span class="jcap"><i data-pct="${m.points.committed ? Math.round(m.points.done / m.points.committed * 100) : 0}"></i>${m.points.done} of ${m.points.committed} points done</span>`
81
87
  : `<span class="jcap">${m.counts.done} of ${m.total} done · no points on record</span>`;
88
+ const jira = m.jiraGoal ? `<p class="jgref">In Jira: “${esc(m.jiraGoal)}”</p>` : '';
89
+ const goal = m.goal ? `<div class="jgoal" data-goal="tickets"><p class="jlab">Sprint goal · from the tickets</p><b>${esc(m.goal)}</b>${m.summary ? `<p>${esc(m.summary)}</p>` : ''}${jira}</div>`
90
+ : `<div class="jgoal" data-goal="missing"><p class="jlab">Sprint goal</p><p>No goal yet. The Jira status check writes one from the tickets at its next check.</p>${jira}</div>`;
82
91
  const card = (c) => {
83
92
  const inner = `<b>${esc(c.title)}</b>${c.flagged ? `<span class="jrk">${FLAG}${esc(c.reason)}</span>` : ''}<span class="jft"><span class="jk">${esc(c.key)}</span>${c.status && c.status !== m.cols.find((x) => x.cat === c.cat).label ? `<span class="jsx">${esc(c.status)}</span>` : ''}<span class="gap"></span>${c.points != null ? `<span class="jpts">${esc(c.points)}</span>` : ''}</span>`;
84
- return c.initiative ? `<button type="button" class="jcrd${c.flagged ? ' risk' : ''}" data-k="${esc(c.key)}" data-ini="${esc(c.initiative)}" aria-label="${esc(c.key)}: ${esc(c.title)}. Open the ticket">${inner}</button>`
85
- : `<div class="jcrd off${c.flagged ? ' risk' : ''}" title="Not a ticket of this board">${inner}</div>`;
93
+ return `<button type="button" class="jcrd${c.flagged ? ' risk' : ''}" data-k="${esc(c.key)}" data-ini="${esc(c.initiative || '')}" aria-label="${esc(c.key)}: ${esc(c.title)}. Open the ticket">${inner}</button>`;
86
94
  };
87
95
  return `<div class="jv">${bar(m.name, m)}${pick}
88
- <div class="jsh"><div><h3>${esc(m.name)}${m.dates ? ` · ${esc(m.dates)}` : ''}</h3><p>${[m.goal ? 'Goal: ' + m.goal : 'No sprint goal on record', m.left || m.state].filter(Boolean).map(esc).join(' · ')}</p></div><span class="gap"></span>${pts}</div>
96
+ <div class="jsh"><div><h3>${esc(m.name)}${m.dates ? ` · ${esc(m.dates)}` : ''}</h3>${m.left || m.state ? `<p>${esc(m.left || m.state)}</p>` : ''}</div><span class="gap"></span>${pts}${goal}</div>
89
97
  <div class="jbrd">${m.cols.map((c) => `<section class="jcol" aria-label="${esc(c.label)}, ${c.cards.length}"><div class="jcolh"><span>${esc(c.label)}</span><span>${c.cards.length}</span></div>${c.cards.map(card).join('') || '<p class="jnone">None</p>'}</section>`).join('')}</div>
90
- <p class="jnote">Read-only: Jira owns each ticket's status and sprint, so move a ticket in Jira.${m.other ? ` ${m.other} ${m.other === 1 ? 'ticket is' : 'tickets are'} in this sprint but on no initiative of this board, so ${m.other === 1 ? 'it has' : 'they have'} no ticket here.` : ''} Tickets with no sprint are in the backlog. <button type="button" class="jbtn" data-jbl>Open the backlog</button></p></div>`;
98
+ <p class="jnote">Read-only: Jira owns each ticket's status and sprint, so move a ticket in Jira. Tickets with no sprint are in the backlog. <button type="button" class="jbtn" data-jbl>Open the backlog</button></p></div>`;
91
99
  }
92
100
 
93
101
  /** The board's sprints as a board by status in one tab; name picks a sprint (default: the active one). */
94
102
  export async function openSprint(o) {
95
103
  const { ws, board } = o || {};
96
104
  let name = (o && o.name) || '';
105
+ let past = false; // the Past sprints fold, open or shut, kept across a redraw of the tab
97
106
  vwStyle('jira');
98
107
  const draw = async (el) => {
99
108
  el.innerHTML = '<div class="jv"><p class="jnote">Reading the sprint</p></div>';
100
109
  const sprints = await getJson('/api/boards/sprints', { ws, board });
101
110
  const m = sprintModel(sprints, name, { today: new Date().toISOString() });
102
- el.innerHTML = sprintHtml(m); bars(el);
111
+ el.innerHTML = sprintHtml(m, past); bars(el);
103
112
  el.querySelectorAll('[data-sp]').forEach((b) => { b.onclick = () => { name = b.dataset.sp; draw(el); }; });
104
- el.querySelectorAll('.jcrd[data-k]').forEach((b) => { b.onclick = () => openTicket({ ws, board, initiative: b.dataset.ini, ref: b.dataset.k }); });
113
+ const pb = el.querySelector('[data-jpast]'), pl = el.querySelector('#jpast');
114
+ if (pb && pl) pb.onclick = () => { pl.hidden = !pl.hidden; past = !pl.hidden; pb.setAttribute('aria-expanded', String(past)); };
115
+ // every ticket opens its tab: one on no initiative of the board shows what the sprint read holds (title, status, points, its Jira link)
116
+ el.querySelectorAll('.jcrd[data-k]').forEach((b) => { b.onclick = () => openTicket({ ws, board, initiative: b.dataset.ini || null, ref: b.dataset.k }); });
105
117
  const bl = el.querySelector('[data-jbl]'); if (bl) bl.onclick = () => openBacklog({ ws, board }); // the tickets in no sprint (premium-viewer R9)
106
118
  const re = el.querySelector('[data-jre]'); if (re) re.onclick = async () => { await draw(el); toast('Read the cached Jira reading again. A Jira check reads Jira itself.'); };
107
119
  };
@@ -4914,6 +4914,17 @@ function proSettings() {
4914
4914
  try { const n = proactiveLib.normalizeSettings(JSON.parse(fs.readFileSync(PRO_SETTINGS(), 'utf8'))); if (n.ok) return n.settings; } catch { /* defaults */ }
4915
4915
  return proactiveLib.normalizeSettings({}).settings;
4916
4916
  }
4917
+ /* The connectors a new Claude session starts with: those of the default profile, else those of Claude Code's own config
4918
+ * (~/.claude.json, or the one in CLAUDE_CONFIG_DIR). Names only (profile-discovery.connectorsIn), each with the brief source
4919
+ * it already backs, so premium Settings can list every connector and say which ones nothing reads yet. */
4920
+ function sessionConnectors() {
4921
+ const disc = require('./lib/profile-discovery');
4922
+ const id = defaultProfileFor('claude');
4923
+ const prof = id ? profileById(id).profile : null;
4924
+ const dir = prof ? (prof.env && prof.env.CLAUDE_CONFIG_DIR) || null : process.env.CLAUDE_CONFIG_DIR || os.homedir();
4925
+ const names = [...new Set([...(prof && Array.isArray(prof.mcp) ? prof.mcp : []), ...(dir ? disc.connectorsIn(dir) : [])])];
4926
+ return { profile: prof ? prof.id : null, list: names.slice(0, proactiveLib.MAX_CONNECTORS).map((name) => ({ name, label: proactiveLib.connectorLabel(name) || name, source: proactiveLib.connectorSource(name) })) };
4927
+ }
4917
4928
  function proactiveCtx(now, settings) {
4918
4929
  const repos = [];
4919
4930
  const allSchedules = readSchedules();
@@ -9245,7 +9256,7 @@ async function handleRequest(req, res) {
9245
9256
  }
9246
9257
  }
9247
9258
  if (p === '/api/proactive/settings') {
9248
- if (req.method === 'GET') return json(res, { ok: true, settings: proSettings() });
9259
+ if (req.method === 'GET') return json(res, { ok: true, settings: proSettings(), connectors: sessionConnectors() });
9249
9260
  if (req.method === 'POST') {
9250
9261
  let body = {}; try { body = JSON.parse((await readBody(req)) || '{}'); } catch { return json(res, { ok: false, error: 'invalid JSON body' }, 400); }
9251
9262
  const g = pmGuard.requirePagePress(req, body); // a settings write is a page press, so an agent session gets 403
@@ -9257,7 +9268,7 @@ async function handleRequest(req, res) {
9257
9268
  const dayCheck = body.dayCheck && typeof body.dayCheck === 'object' && !Array.isArray(body.dayCheck) ? { ...cur.dayCheck, ...body.dayCheck } : (body.dayCheck === undefined ? cur.dayCheck : body.dayCheck);
9258
9269
  const bpr = body.placeRepos && typeof body.placeRepos === 'object' && !Array.isArray(body.placeRepos) ? body.placeRepos : null;
9259
9270
  const placeRepos = bpr ? { ...cur.placeRepos, ...Object.fromEntries(Object.entries(bpr).map(([k, v]) => [k, v && typeof v === 'object' && !Array.isArray(v) ? { ...((cur.placeRepos || {})[k] || {}), ...v } : v])) } : cur.placeRepos;
9260
- const n = proactiveLib.normalizeSettings({ ...cur, ...body, placeRepos, triggers: { ...cur.triggers, ...(body.triggers || {}) }, briefSources: { ...cur.briefSources, ...(body.briefSources || {}) }, about: { ...(cur.about || {}), ...(body.about && typeof body.about === 'object' && !Array.isArray(body.about) ? body.about : {}) }, scopes, dayCheck });
9271
+ const n = proactiveLib.normalizeSettings({ ...cur, ...body, placeRepos, triggers: { ...cur.triggers, ...(body.triggers || {}) }, briefSources: { ...cur.briefSources, ...(body.briefSources || {}) }, connectors: body.connectors && typeof body.connectors === 'object' && !Array.isArray(body.connectors) ? { ...(cur.connectors || {}), ...body.connectors } : (body.connectors === undefined ? cur.connectors : body.connectors), about: { ...(cur.about || {}), ...(body.about && typeof body.about === 'object' && !Array.isArray(body.about) ? body.about : {}) }, scopes, dayCheck });
9261
9272
  if (!n.ok) return json(res, { ok: false, error: n.error }, 400);
9262
9273
  try { fs.mkdirSync(STATE, { recursive: true }); fs.writeFileSync(PRO_SETTINGS(), JSON.stringify(n.settings) + '\n'); }
9263
9274
  catch (e) { warnWriteFail('proactive-settings.json', e); return json(res, { ok: false, error: 'could not save — nothing changed' }, 500); }