create-pmos 0.489.0 → 0.490.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.489.0",
3
+ "version": "0.490.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,19 @@
32
32
  "audit"
33
33
  ],
34
34
  "pmosChanges": [
35
+ {
36
+ "v": "0.490.0",
37
+ "at": "2026-11-02T08:52:24.978Z",
38
+ "f": 3,
39
+ "prs": [
40
+ {
41
+ "n": 1153,
42
+ "t": "Sign-in session takes keys; login check names the login",
43
+ "s": "Sign-in session takes keys; login check names the login",
44
+ "k": "fix"
45
+ }
46
+ ]
47
+ },
35
48
  {
36
49
  "v": "0.489.0",
37
50
  "at": "2026-11-02T07:07:12.466Z",
@@ -282,19 +295,6 @@
282
295
  "k": "new"
283
296
  }
284
297
  ]
285
- },
286
- {
287
- "v": "0.470.0",
288
- "at": "2026-10-31T12:11:04.375Z",
289
- "f": 3,
290
- "prs": [
291
- {
292
- "n": 1123,
293
- "t": "The Publish popover on the Board (board-publish slice 2, page side)",
294
- "s": "The Publish popover on the Board (board-publish slice 2, page side)",
295
- "k": "new"
296
- }
297
- ]
298
298
  }
299
299
  ]
300
300
  }
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@025613c0
1
+ kernel-source: pmos@e63a60be
2
2
  assembled: 2026-11-02
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-11-02T07:07:08Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-02T08:52:21Z"}
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-11-02T07:07:08Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-02T08:52:21Z"}
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-11-02T07:07:08Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-02T08:52:21Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -1,4 +1,17 @@
1
1
  [
2
+ {
3
+ "v": "0.490.0",
4
+ "at": "2026-11-02T08:52:24.978Z",
5
+ "f": 3,
6
+ "prs": [
7
+ {
8
+ "n": 1153,
9
+ "t": "Sign-in session takes keys; login check names the login",
10
+ "s": "Sign-in session takes keys; login check names the login",
11
+ "k": "fix"
12
+ }
13
+ ]
14
+ },
2
15
  {
3
16
  "v": "0.489.0",
4
17
  "at": "2026-11-02T07:07:12.466Z",
@@ -34,7 +34,7 @@ Settings holds settings only, in eight sections. On a wide screen they are cards
34
34
 
35
35
  - **Repositories**: every registered repository. Press a repository to make it the current one. Press its ⋯ for **Rename** or **Remove from PMOS**. Each asks in a sheet, and a remove asks you to confirm. **Add repository** shows the scan of a folder before you add it.
36
36
  - **Profiles**: the Claude profiles a session can start with. These are the descriptors in `~/.claude/profiles`, and also the profiles you already run: a shell command that sets `CLAUDE_CONFIG_DIR` (for example `alias claude-work='CLAUDE_CONFIG_DIR=~/.claude-work claude'`), a launcher script named `claude-*`, or a config folder such as `~/.claude-work`. Each profile is a row with a **Detected** badge when PMOS found it rather than wrote it, and a **Default** badge when it is the default. Its ⋯ menu has **Use as default**. A profile found this way says where it was found, and a session under it sets only `CLAUDE_CONFIG_DIR`. The list reads again every few seconds while Settings is open, and **Look again** in the Claude profiles menu reads it at once. When nothing is found, the note names the start-up files and folders PMOS looked at. Press **New profile** to make one. This writes `~/.claude/profiles/<id>.json`. Account secrets are never shown in the browser.
37
- - **Claude login and profile** (Settings › Claude): the same profile-specific sign-in and verification controls as [Welcome](welcome.md). Set up a separate PMOS login or choose an existing setup. Complete Claude’s sign-in in that profile’s terminal. Then choose **Check and use this profile**. PMOS does not copy credentials. A missing selected profile refuses new sessions instead of silently changing accounts.
37
+ - **Claude login and profile** (Settings › Claude): the same profile-specific sign-in and verification controls as [Welcome](welcome.md). Set up a separate PMOS login or choose an existing setup. Complete Claude’s sign-in in that profile’s terminal. This terminal takes your keys, also when you open the sign-in session from the sessions list, so you can answer Claude’s first-run screens (the theme, the login method, folder trust). Then choose **Check and use this profile**. When the check fails, the message names the login it checked and its folder. Signing in to a different Claude login, for example in another terminal, does not sign this one in. PMOS does not copy credentials. A missing selected profile refuses new sessions instead of silently changing accounts.
38
38
  - **New sessions**: the default CLI, the default model, the default Claude profile and the default launch flags for a new session. The flags come from `claude --help`, for example `--chrome`. A flag that needs a value lists the values it accepts. **Flags for automatic sessions** is a second list for the sessions PMOS starts for you, such as a scheduled brief. Such a session cannot answer a permission question, so it waits. Until you save a choice it starts with `--permission-mode=acceptEdits`, which ends the file-edit questions. A tool from a connector can still ask; allow it in your Claude settings or choose a looser mode here. The default profile is one setting for the whole workspace. PMOS keeps it on the server, so every browser, port and device starts a Claude session with the same profile. Choose it here or with "make … the default" in the New session form. Both change the same setting.
39
39
  - **Validate consent**: the consent of the current repository. Use its switch to turn it on or off. **Open Validate** opens the Validate page as a tab.
40
40
  - **People**: whether the morning brief keeps attendee names from the calendar for the current repository. It is off until you turn it on. Turning it off also hides the names recorded before.
@@ -65,6 +65,15 @@ function create({ stateDir, home = os.homedir(), readProfiles, readPrefs, savePr
65
65
  auth: authNames.map(k => [k, env[k] || '']), config: ['settings.json', '.claude.json', '.credentials.json'].map(n => stamp(path.join(dir, n))) };
66
66
  return { env, command, fingerprint: crypto.createHash('sha256').update(JSON.stringify(input)).digest('hex') };
67
67
  }
68
+ // The sentence for a state. A signed-out or unverified login names the login it checked and its folder, because signing in to another
69
+ // Claude login (for example in a PowerShell window) does not sign this one in. Only a path is shown, never a file's content.
70
+ function say(state, p) {
71
+ const base = MESSAGES[state] || MESSAGES.unknown;
72
+ if (!p || (state !== 'signed_out' && state !== 'unknown')) return base;
73
+ const dir = path.resolve(envFor(p).CLAUDE_CONFIG_DIR || path.join(home, '.claude'));
74
+ const shown = dir.startsWith(home) ? '~' + dir.slice(home.length).replace(/\\/g, '/') : dir;
75
+ return `PMOS checked ${p.label || p.id} (${shown}). ${state === 'signed_out' ? 'It is not signed in. ' : ''}Signing in to a different Claude login, for example in another terminal, does not sign this one in. Sign in to this one, or choose the other login and test again.`;
76
+ }
68
77
  function status(id = selected()) {
69
78
  const p = candidate(id);
70
79
  if (!p) return { state: 'profile_missing', message: MESSAGES.profile_missing, profile: id, ready: false };
@@ -72,7 +81,7 @@ function create({ stateDir, home = os.homedir(), readProfiles, readPrefs, savePr
72
81
  const current = binding(p).fingerprint;
73
82
  const valid = r && r.boot === boot && r.fingerprint === current && now() - Date.parse(r.checked_at) < 15 * 60 * 1000;
74
83
  const state = valid ? r.state : 'unchecked';
75
- return { state, message: MESSAGES[state] || MESSAGES.unknown, profile: id, label: p.label || id, checked_at: r && r.checked_at || null, ready: state === 'ready' && selected() === id };
84
+ return { state, message: say(state, p), profile: id, label: p.label || id, checked_at: r && r.checked_at || null, ready: state === 'ready' && selected() === id };
76
85
  }
77
86
  function list() {
78
87
  const read = readProfiles();
@@ -119,7 +128,7 @@ function create({ stateDir, home = os.homedir(), readProfiles, readPrefs, savePr
119
128
  }
120
129
  const record = { state, checked_at: new Date(now()).toISOString(), fingerprint: before.fingerprint, boot };
121
130
  try { atomic(file, { ...records(), [savedId]: record }); } catch { state = 'save_failed'; }
122
- return { ok: state === 'ready', state, message: MESSAGES[state], profile: savedId, checked_at: record.checked_at, ready: state === 'ready' };
131
+ return { ok: state === 'ready', state, message: say(state, p), profile: savedId, checked_at: record.checked_at, ready: state === 'ready' };
123
132
  } finally { if (scratch) fs.rmSync(scratch, { recursive: true, force: true }); }
124
133
  }
125
134
  function check(id) {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.489.0",
3
+ "version": "0.490.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.489.0",
9
+ "version": "0.490.0",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@anthropic-ai/sdk": "^1.3.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.489.0",
3
+ "version": "0.490.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",
@@ -3,7 +3,7 @@
3
3
  * draws the bytes in a read-only terminal (xterm.js, served from /vendor) the size of the session's own, so a full-screen agent's cursor moves
4
4
  * and redraws land where they did on the PM's screen. Plain text with the escapes taken out ran words together and piled spinner frames up
5
5
  * line by line (PM, 2026-10-27: "Broken format on terminal view"). After the first read it asks only for what was printed since (since + gen).
6
- * It keeps the view at the end unless the PM scrolled up. It writes nothing; keys typed in the card go nowhere.
6
+ * It keeps the view at the end unless the PM scrolled up. It writes nothing; keys typed in the card go nowhere. The one exception is a session that setup started for the PM's sign-in (the server marks it `typeable`): the card then hands over to the typeable terminal of cozy-claude-setup.js.
7
7
  * When xterm.js cannot load, it falls back to the plain text (GET …&max=12000, ANSI taken out). */
8
8
  import { open, current } from './cozy-viewer.js';
9
9
  import { pmGet } from './http.js';
@@ -38,10 +38,10 @@ function look(el) {
38
38
  export function openTermView(sid, o = {}) {
39
39
  if (!/^sess-\d+$/.test(String(sid || ''))) return null;
40
40
  const id = 'term:' + sid;
41
- let stop = false, term = null, gen = null, end = null, plain = false;
41
+ let stop = false, term = null, gen = null, end = null, plain = false, typed = false, stopTyped = null;
42
42
  const body = open({ id, kind: 'Terminal · read only', title: o.title || sid, icon: 'M4 5h16v14H4zM7 9l3 3-3 3M12 15h5',
43
43
  html: '<pre class="hv-term" role="log" aria-live="off">Reading the terminal.</pre>',
44
- onClose: () => { stop = true; if (term) { try { term.dispose(); } catch { /* already gone */ } term = null; } } });
44
+ onClose: () => { stop = true; if (stopTyped) { try { stopTyped(); } catch { /* already gone */ } stopTyped = null; } if (term) { try { term.dispose(); } catch { /* already gone */ } term = null; } } });
45
45
  const live = () => { const c = current(); return !stop && c && c.id === id; };
46
46
 
47
47
  const plainTick = async () => {
@@ -59,6 +59,17 @@ export function openTermView(sid, o = {}) {
59
59
  const r = await pmGet('/api/sessions/transcript?id=' + encodeURIComponent(sid) + '&raw=1' + q);
60
60
  if (!live()) return;
61
61
  if (!r || !r.ok) { if (!term) { const pre = body.querySelector('.hv-term'); if (pre) pre.textContent = (r && r.error) || 'The terminal could not be read.'; } return; }
62
+ if (r.typeable && !typed) {
63
+ // A sign-in session that setup started: Claude's first-run screens (theme, login method, folder trust) need the PM's keys.
64
+ // Hand the card to the same typeable terminal the setup page uses, and stop polling.
65
+ typed = true;
66
+ if (term) { try { term.dispose(); } catch { /* already gone */ } term = null; }
67
+ body.innerHTML = '<p class="hv-note">Claude is waiting for you. Type here to choose, then sign in.</p><div class="cs-term" aria-label="Claude sign-in terminal"></div>';
68
+ const { signInTerminal } = await import('./cozy-claude-setup.js');
69
+ const stop = await signInTerminal(body.querySelector('.cs-term'), sid);
70
+ if (live()) stopTyped = stop; else stop();
71
+ return;
72
+ }
62
73
  if (!term || r.reset) {
63
74
  if (term) { try { term.dispose(); } catch { /* already gone */ } }
64
75
  body.innerHTML = '<div class="hv-xt" role="log" aria-live="off" aria-label="Terminal, read only"></div>';
@@ -85,7 +96,7 @@ export function openTermView(sid, o = {}) {
85
96
  if (!live()) return;
86
97
  try { if (plain) await plainTick(); else await xtTick(Terminal); }
87
98
  catch { if (!plain) { plain = true; term = null; } }
88
- if (live()) setTimeout(loop, 2000);
99
+ if (live() && !typed) setTimeout(loop, 2000);
89
100
  };
90
101
  loop();
91
102
  })();
@@ -7823,7 +7823,9 @@ async function handleRequest(req, res) {
7823
7823
  const gen = sess.bufGen || 0, end = bufEnd(sess), start = end - sess.buf.length;
7824
7824
  const since = +url.searchParams.get('since'), sameGen = String(url.searchParams.get('gen')) === String(gen);
7825
7825
  const delta = sameGen && Number.isFinite(since) && since >= start && since <= end;
7826
- return json(res, { ok: true, id: sess.id, name: sess.name, cols: sess.cols || 80, rows: sess.rows || 24, gen, end, reset: !delta, data: delta ? sess.buf.slice(since - start) : sess.buf });
7826
+ // typeable: setup started this session for the PM's own sign-in (claudeSetup.login), so the card takes keys. Set here, by origin, never by name.
7827
+ const typeable = sess.state !== 'exited' && (sess.origin === 'onboarding-login' || sess.origin === 'onboarding-permissions');
7828
+ return json(res, { ok: true, id: sess.id, name: sess.name, cols: sess.cols || 80, rows: sess.rows || 24, gen, end, reset: !delta, typeable, data: delta ? sess.buf.slice(since - start) : sess.buf });
7827
7829
  }
7828
7830
  const max = Math.min(60000, Math.max(500, +url.searchParams.get('max') || 20000));
7829
7831
  const text = transcriptsLib.stripAnsi(sess.buf).slice(-max);