create-pmos 0.103.0 → 0.104.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.103.0",
3
+ "version": "0.104.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": {
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@3d2d579
1
+ kernel-source: pmos@dd22f56
2
2
  assembled: 2026-10-08
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-08T00:46:10Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-08T00:58:10Z"}
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-08T00:46:10Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-08T00:58:10Z"}
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-08T00:46:10Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-08T00:58:10Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -39,7 +39,7 @@ Settings holds settings only, in eight sections. On a wide screen they are cards
39
39
  - **Updates**: the version of the workspace app and the version of the kit in the current repository. Press **Check for updates** at the top of the page to compare them with the latest published version of PMOS. This is the only time the workspace asks the internet for a version, and it asks only when you press. When a newer version is available, one button shows: **Update to** and the version. It updates every part that is older, in this order:
40
40
  - **The kit** in the current repository, when it is older. This does what `npx create-pmos@latest --update` does in a terminal. It changes only the kit's own files under `pmos/` (skills, scripts, templates and guides). Your records in `state/`, `planning/` and `okf/product/` do not change. The last lines of the output show under the button. The changed files are under `pmos/`, which Sync treats as records, so Sync (or automatic sync) sends them with your other records. To read them first, look at `git diff pmos/` before you sync.
41
41
  - **The workspace app**, when it is older. This does what `pmos upgrade` does in a terminal. The button asks you first. The workspace stops, installs the new version and starts again, and the page reloads when the new version starts. The reloaded page runs the new version's code: each start gives the page files a new address, so neither the browser nor the Online address's tunnel can keep the old ones. You do not need a terminal or a hard refresh. Sessions keep running in tmux. It works on the computer that runs the workspace and at its Online address, because the page comes back there after the restart. It also works on a phone or public address that signs in with a token set in `PMOS_TOKEN`, which the workspace keeps. When the workspace made its own token at start, the token changes on the restart, so the page refuses and says where to press it. When the workspace runs from a PMOS checkout, update it with `git pull` instead.
42
- - **Testing an update before it is published.** In a PMOS checkout, run `bash scripts/build-local-package.sh`. It builds the package that a publish would build, in `~/.pmos-local-package`, with a version newer than the published one, and prints the command that starts the workspace on it. That command sets `PMOS_UPDATE_SOURCE` to the package on the same computer: its folder, or the `.tgz` that `npm pack` makes. Then **Check for updates** reads that package's version and does not ask npm, and both updates install that package. The Updates card names the package it checks. A checkout may update the app this way. When the path is wrong, the card says why and does not fall back to npm. Unset the variable, or set it to `npm`, to use the registry again.
42
+ - **Testing an update before it is published.** In a PMOS checkout, run `bash scripts/build-local-package.sh`. It builds the package that a publish would build, in `~/.pmos-local-package`, with a version newer than the published one, and prints the command that starts the workspace on it. That command sets `PMOS_UPDATE_SOURCE` to the package on the same computer: its folder, or the `.tgz` that `npm pack` makes. Then **Check for updates** reads that package's version and does not ask npm, and both updates install that package. The Updates card names the package it checks, and the line under the buttons says "from the local package" after a check. There is no checkbox for this; the variable is the only switch. A checkout may update the app this way. When the path is wrong, the card says why and does not fall back to npm. Unset the variable, or set it to `npm`, to use the registry again.
43
43
 
44
44
  A new screen or a renamed menu comes with the workspace app, not with the kit.
45
45
 
@@ -166,20 +166,6 @@ async function latest({ exec = cp.execFile, source: src = source() } = {}) {
166
166
  return { ok: true, version: v };
167
167
  }
168
168
 
169
- /** Check the local repository's package version (for dev/testing without npm). Reads npm-pkg/package.json for kit. */
170
- function latestLocal({ repoRoot = null } = {}) {
171
- try {
172
- const pkgPath = path.join(String(repoRoot || ''), 'npm-pkg', 'package.json');
173
- const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
174
- if (!pkg.version || !validVersion(pkg.version)) {
175
- return { ok: false, error: 'Local package.json has no valid version' };
176
- }
177
- return { ok: true, version: pkg.version, source: 'local-git' };
178
- } catch (e) {
179
- return { ok: false, error: `Could not read local version: ${e.message}` };
180
- }
181
- }
182
-
183
169
  /**
184
170
  * npm lists a new version in the check a moment before its download is served everywhere. A download asked for in that
185
171
  * gap answers 404, and npm's CDN keeps the 404 for up to five minutes (Cache-Control max-age=300), so the same press
@@ -264,4 +250,4 @@ function upgradeApp(root, { version, logFile, spawn = cp.spawn, env = updateEnv(
264
250
  }
265
251
  }
266
252
 
267
- module.exports = { PKG_NAME, cmpVer, notServedYet, validVersion, source, npxArgs, readKit, fromCheckout, status, compare, latest, latestLocal, updateKit, updateEnv, upgradeApp, whereFrom };
253
+ module.exports = { PKG_NAME, cmpVer, notServedYet, validVersion, source, npxArgs, readKit, fromCheckout, status, compare, latest, updateKit, updateEnv, upgradeApp, whereFrom };
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.103.0",
3
+ "version": "0.104.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.103.0",
9
+ "version": "0.104.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.103.0",
3
+ "version": "0.104.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",
@@ -395,9 +395,9 @@ function readKitStatus(ws, force) {
395
395
 
396
396
  const say = (fields) => { Object.assign(upd, fields); setState({}); };
397
397
 
398
- async function checkUpdates(ws, local) {
398
+ async function checkUpdates(ws) {
399
399
  say({ phase: 'check', message: '', error: '', output: '' });
400
- const j = await pmPost('/api/kit/check', { ws, local });
400
+ const j = await pmPost('/api/kit/check', { ws });
401
401
  if (j && j.ok !== false) {
402
402
  kitByWs.set(ws, { st: j, at: Date.now() });
403
403
  say({ phase: null, latest: j.latest, compare: { appBehind: !!j.appBehind, kitBehind: !!j.kitBehind }, source: j.source });
@@ -480,13 +480,9 @@ function updatesSection(scope) {
480
480
  onClick: () => updateAll(ws, app, { appBehind: !!cmp.appBehind, kitBehind: !!cmp.kitBehind && kitPresent }),
481
481
  })));
482
482
  }
483
- kids.push(el('div', { class: 'fr-set__line' }, el('label', { class: 'fr-set__checkbox' },
484
- el('input', { type: 'checkbox', checked: !!upd.checkLocal, onChange: (e) => { upd.checkLocal = e.target.checked; setState({}); } }),
485
- el('span', null, 'Check local git version')
486
- )));
487
483
  const line = upd.phase === 'check' ? P.updatesChecking : upd.phase === 'kit' ? P.updateKitBusy
488
484
  : upd.message ? upd.message : upd.latest ? (cmp.appBehind || cmp.kitBehind ? P.updatesLatest(upd.latest) : P.updatesCurrent(upd.latest)) : P.updatesNever;
489
- const sourceNote = upd.source === 'local-git' ? ' (from local git)' : upd.source ? ` (from ${upd.source})` : '';
485
+ const sourceNote = upd.source === 'local' ? ' (from the local package)' : '';
490
486
  kids.push(el('p', { class: 'fr-set__note', role: 'status', 'aria-live': 'polite', 'data-fr': 'update-state' }, line + sourceNote));
491
487
  if (upd.error) kids.push(el('p', { class: 'fr-set__note fr-set__error', role: 'alert', 'data-fr': 'update-error' }, upd.error));
492
488
  if (upd.output) kids.push(el('pre', { class: 'fr-set__output', 'data-fr': 'update-output' }, upd.output));
@@ -500,7 +496,7 @@ function checkButton(scope) {
500
496
  const ws = wsOfRepo(repo) || wsOfRepo(activeProduct());
501
497
  return button({
502
498
  label: P.updatesCheck, variant: 'outline', size: 'sm', icon: 'refresh-cw', disabled: !!upd.phase || !ws,
503
- attrs: { 'data-fr': 'check-updates' }, onClick: () => checkUpdates(ws, upd.checkLocal),
499
+ attrs: { 'data-fr': 'check-updates' }, onClick: () => checkUpdates(ws),
504
500
  });
505
501
  }
506
502
 
@@ -7334,7 +7334,7 @@ async function handleRequest(req, res) {
7334
7334
  const r = await kitUpdate.latest({ source: kitUpdate.source() });
7335
7335
  const now = st();
7336
7336
  if (!r.ok) return json(res, { ok: false, error: r.error, ws: w.id, ...now }, 502);
7337
- return json(res, { ok: true, ws: w.id, ...now, latest: r.version, source: r.source || 'npm', ...kitUpdate.compare(now, r.version) });
7337
+ return json(res, { ok: true, ws: w.id, ...now, latest: r.version, source: r.source || 'registry', ...kitUpdate.compare(now, r.version) });
7338
7338
  }
7339
7339
  if (kitBusy) return json(res, { ok: false, error: kitBusy === 'app' ? 'The workspace is already updating' : 'A kit update is already running' }, 409);
7340
7340
  if (p === '/api/kit/update') {