create-pmos 0.69.0 → 0.69.1

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.69.0",
3
+ "version": "0.69.1",
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@b38c47a
1
+ kernel-source: pmos@bbb66c2
2
2
  assembled: 2026-10-07
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-07T02:59:01Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-07T03:27: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-07T02:59:01Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-07T03:27: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-07T02:59:01Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-07T03:27:10Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -36,7 +36,7 @@ Settings holds settings only, in eight sections:
36
36
  - **Theme**: Dark or Light.
37
37
  - **Updates**: the version of the workspace app and the version of the kit in the current repository. Press **Check for updates** 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:
38
38
  - **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.
39
- - **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. You do not need a terminal. 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.
39
+ - **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.
40
40
 
41
41
  A new screen or a renamed menu comes with the workspace app, not with the kit.
42
42
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.69.0",
3
+ "version": "0.69.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.69.0",
3
+ "version": "0.69.1",
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",
@@ -61,12 +61,13 @@ export const SEL = Object.freeze({
61
61
 
62
62
  /* ── stylesheet and layer ─────────────────────────────────────────────────────────────────────────────────────────── */
63
63
 
64
- /** Link /pm/components.css once. index.html is not edited: the sheet arrives with the first Breakdown. */
64
+ /** Link components.css once, from this module's own folder, so it comes from the same build as the code. index.html is
65
+ * not edited: the sheet arrives with the first Breakdown. */
65
66
  export function ensureComponentsCss() {
66
67
  if (typeof document === 'undefined' || document.querySelector('link[data-pmc]')) return;
67
68
  const l = document.createElement('link');
68
69
  l.rel = 'stylesheet';
69
- l.href = '/pm/components.css';
70
+ l.href = new URL('./components.css', import.meta.url).href;
70
71
  l.setAttribute('data-pmc', '');
71
72
  document.head.appendChild(l);
72
73
  }
@@ -140,11 +140,11 @@ export async function copyMarkdown(md) {
140
140
  return done;
141
141
  }
142
142
 
143
- /** Link /pm/print.css once, for print only. */
143
+ /** Link print.css once, for print only, from this module's own folder (the same build as the code). */
144
144
  export function ensurePrintCss() {
145
145
  if (typeof document === 'undefined' || document.querySelector('link[data-rp-print]')) return;
146
146
  const l = document.createElement('link');
147
- l.rel = 'stylesheet'; l.href = '/pm/print.css'; l.media = 'print';
147
+ l.rel = 'stylesheet'; l.href = new URL('./print.css', import.meta.url).href; l.media = 'print';
148
148
  l.setAttribute('data-rp-print', '');
149
149
  document.head.appendChild(l);
150
150
  }
@@ -187,6 +187,17 @@ const PUB = path.join(__dirname, 'public');
187
187
  const PM_DIR = path.join(PUB, 'pm'); // the four-panel front end — served as a directory, guarded below
188
188
  const XROOT = path.join(__dirname, 'node_modules', '@xterm');
189
189
  const APP_VERSION = (() => { try { return require('./package.json').version || null; } catch { return null; } })();
190
+ // THE BUILD PREFIX. index.html loads the page code from /b/<BUILD>/pm/ and /b/<BUILD>/lib/, and the route below strips the
191
+ // prefix. Each launch has a new BUILD, so after an update or a restart every page file has a new address. `no-cache`
192
+ // alone was not enough: a page opened through the Online address (a Cloudflare tunnel) kept running the previous
193
+ // version's modules after Update, because a cache between the browser and this server answered the old address.
194
+ const BUILD = String(APP_VERSION || 'dev').replace(/[^0-9A-Za-z.-]/g, '') + '-' + Date.now().toString(36);
195
+ const BUILD_RE = /^\/b\/[0-9A-Za-z.-]{1,64}(\/(?:pm|lib)\/.*)$/;
196
+ /** index.html with its /pm/ and /lib/ references moved under this launch's build prefix, and an import map that sends an
197
+ * absolute import('/pm/…') to the same address, so it gets the module instance the page already holds, not a second one. */
198
+ const withBuild = (html) => html
199
+ .replace(/(["'])\/(pm|lib)\//g, (m, q, dir) => q + '/b/' + BUILD + '/' + dir + '/')
200
+ .replace('<meta charset="utf-8" />', '<meta charset="utf-8" />\n<script type="importmap">' + JSON.stringify({ imports: { '/pm/': '/b/' + BUILD + '/pm/' } }) + '</script>');
190
201
  // ── WHERE THE PM'S RUNTIME STATE LIVES (see lib/state-root.js for the whole argument). ─────────
191
202
  // It is NOT `workspace/state/` any more. That directory is inside the application directory the
192
203
  // test suite runs from, which put the PM's live sessions, workspace registry and authored skills
@@ -5293,17 +5304,20 @@ function json(res, obj, code = 200) {
5293
5304
 
5294
5305
  async function handleRequest(req, res) {
5295
5306
  const url = new URL(req.url, 'http://localhost');
5296
- const p = url.pathname;
5307
+ // A page file under this or an earlier launch's build prefix is the same file without it (see BUILD above).
5308
+ const built = BUILD_RE.exec(url.pathname);
5309
+ const p = built ? built[1] : url.pathname;
5297
5310
 
5298
5311
  if (p === '/' || p === '/index.html') {
5299
5312
  // pm-os-absorb Run 2 (R25, X11): the per-launch nonce goes into the base meta line, nowhere else. no-store, so a
5300
- // restarted server never answers a press from a page that holds the previous launch's value.
5313
+ // restarted server never answers a press from a page that holds the previous launch's value. The page code is
5314
+ // referenced under this launch's build prefix.
5301
5315
  const n = pmGuard.launchNonce();
5302
- if (!n) return serveFile(res, path.join(PUB, 'index.html'), null, true);
5303
5316
  return fs.readFile(path.join(PUB, 'index.html'), 'utf8', (err, html) => {
5304
5317
  if (err) { res.writeHead(404); res.end('not found'); return; }
5305
- const out = html.replace('<meta name="' + pmGuard.NONCE_META + '" content="" />', '<meta name="' + pmGuard.NONCE_META + '" content="' + n + '" />');
5306
- res.writeHead(200, { 'Content-Type': TYPES['.html'], 'Cache-Control': 'no-store' });
5318
+ let out = withBuild(html);
5319
+ if (n) out = out.replace('<meta name="' + pmGuard.NONCE_META + '" content="" />', '<meta name="' + pmGuard.NONCE_META + '" content="' + n + '" />');
5320
+ res.writeHead(200, { 'Content-Type': TYPES['.html'], 'Cache-Control': 'no-cache, no-store' });
5307
5321
  res.end(out);
5308
5322
  });
5309
5323
  }