jorgex-stack 1.9.43 → 1.9.45

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.
Files changed (3) hide show
  1. package/README.md +4 -2
  2. package/dist/cli.js +41 -8
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -128,10 +128,12 @@ pnpm dlx jorgex-stack@1.9.7 sync --agents pi
128
128
  pnpm dlx jorgex-stack@1.9.7 uninstall --agents pi
129
129
  ```
130
130
 
131
- Stack downloads the frozen registry tarball, verifies its exact size plus SHA-256/SHA-512, backs up Pi's `settings.json`, and only then asks Pi to install that local file. The exact artifact and integrity values are authoritative in `src/lib/pi-runtime-pin.json`, while the lifecycle remains authoritative in `src/lib/pi-runtime.ts`. Pi's own package-manager invocation is the narrow runtime exception to the repository's pnpm-only rule; the Stack lifecycle never launches npm directly. After the package is healthy, Stack projects the shared resources into Pi: marked `jorgex:system-prompt` and `jorgex:engram-protocol` sections in `~/.pi/agent/AGENTS.md`, canonical skills under `~/.agents/skills`, and `~/.pi/agent/prompts/lean-audit.md`. Pi 0.8.21 registers Context7 through an isolated in-memory HTTP bridge during bootstrap; `available` means configuration permits registration and does not imply an HTTP handshake. A conflict preserves the existing MCP file and blocks managed activation. No MCP configuration or credentials are written. For the file runtimes, Context7, Playwright and DevTools use independent managed sections. The global Playwright package and Chromium cache are shared by the machine; `--playwright-runtimes` controls which runtime receives the guide. The adopted Pi package implements and tests `playwright-handoff-v1` through `PI_CODING_AGENT_DIR/jorgex-pi/playwright.v1.json`. Historical package entries do not describe the current pin. Filters are applied only after this projection exists, so the package does not duplicate shared resources. Package ownership is recorded separately in `~/.jorgex-stack/pi-receipt.json`; projection ownership is recorded in `~/.jorgex-stack/pi-projection-receipt.json`. Package receipts reject manual, duplicate, divergent, partial, corrupt, copied-to-another-scope, or unknown-history state. Projection cleanup requires an exact scope-bound ownership receipt; DevTools conflicts preserve the handoff for review.
131
+ Stack downloads the frozen registry tarball, verifies its exact size plus SHA-256/SHA-512, backs up Pi's `settings.json`, and only then asks Pi to install that local file. The exact artifact and integrity values are authoritative in `src/lib/pi-runtime-pin.json`, while the lifecycle remains authoritative in `src/lib/pi-runtime.ts`. Pi's own package-manager invocation is the narrow runtime exception to the repository's pnpm-only rule; the Stack lifecycle never launches npm directly. A managed install then runs `package install → projection install → package sync`: after the package is healthy, Stack projects the shared resources into Pi and invokes Pi's native sync to complete initialization. The projection includes marked `jorgex:system-prompt` and `jorgex:engram-protocol` sections in `~/.pi/agent/AGENTS.md`, canonical skills under `~/.agents/skills`, and `~/.pi/agent/prompts/lean-audit.md`. Pi 0.8.22 registers Context7 through an isolated in-memory HTTP bridge during bootstrap; `available` means configuration permits registration and does not imply an HTTP handshake. A conflict preserves the existing MCP file and blocks managed activation. No MCP configuration or credentials are written. For the file runtimes, Context7, Playwright and DevTools use independent managed sections. The global Playwright package and Chromium cache are shared by the machine; `--playwright-runtimes` controls which runtime receives the guide. The adopted Pi package implements and tests `playwright-handoff-v1` through `PI_CODING_AGENT_DIR/jorgex-pi/playwright.v1.json`. Historical package entries do not describe the current pin. Filters are applied only after this projection exists, so the package does not duplicate shared resources. Package ownership is recorded separately in `~/.jorgex-stack/pi-receipt.json`; projection ownership is recorded in `~/.jorgex-stack/pi-projection-receipt.json`. Package receipts reject manual, duplicate, divergent, partial, corrupt, copied-to-another-scope, or unknown-history state. Projection cleanup requires an exact scope-bound ownership receipt; DevTools conflicts preserve the handoff for review.
132
132
 
133
133
  The static `AGENTS.md` projected by Stack does not include Context7; Pi's native bootstrap adds that section after registering the isolated bridge. Pi never writes, owns or removes MCP files. In Claude Code, Codex and OpenCode, a compatible existing Context7 entry is preserved and removed only with explicit canonical Stack ownership.
134
134
 
135
+ Pi 0.8.22 also seeds `theme=JorgeX`, `quietStartup=true`, and `hideThinkingBlock=true` only for missing fields during first initialization. User changes and deletions are preserved without reseeding. `hideThinkingBlock` changes presentation only; `defaultThinkingLevel` and reasoning remain unchanged. Pi owns only the fields it creates and records in its lifecycle receipt; pre-existing user settings remain unowned. The JorgeX header preserves builtin and custom commands. `Ctrl+O` remains Pi's native tool presentation, with `NO_COLOR` and `JORGEX_PI_MOTION` behavior unchanged; Stack adds no renderer.
136
+
135
137
  Historically, the published Pi 0.8.0 direct-package snapshot added `work-audit`: the snapshot grew from **17 to 18 skill trees** (96 to 97 files), and the active runtime allowlist grew from **16 to 17 skills**. The historical Pi 0.8.5 snapshot reference records 18 skill trees and 98 files; it does not describe the adopted pin. Reference F2-A is included while the private F1 skills remain preserved. `playwright-cli` remains in the snapshot but inactive because browser automation is a separate opt-in integration.
136
138
 
137
139
  The historical published artifact has two separate provenance anchors. The local size/SHA-256/SHA-512 checks bind the downloaded bytes to Stack's accepted artifact; they are checks within that checkout, not independent trust roots. npm's external provenance/attestation is outside Stack runtime verification, and `provenance.commit` is informative unless that external attestation is independently verified.
@@ -192,7 +194,7 @@ Daily operation:
192
194
  - `doctor` reports the Playwright CLI state (`disabled`, `healthy`, `missing:package`, `missing:browser`, `unreadable`, `broken`, `outdated`) and, when the opt-in package and browser cache are present, verifies one local headless Chromium launch against `about:blank`; it does not open external sites or repair state. An `unreadable` browser cache includes its exact path and filesystem error code so permissions or another local cause can be investigated. If either preference file is corrupt, doctor prints the exact path and the remedy (`Corrige o borra ese archivo antes de reintentar`) before any other browser check; in that case `install`/`uninstall`/`update`/`update --check` will abort with exit 1 until the file is fixed, so the corruption cannot be reconciled destructively.
193
195
  - `update --check` only inspects Playwright CLI when its preference is `enabled` (a binary appearing in `PATH` is not consent). It compares the installed version against the approved pin `0.1.18` — it does not consult npm latest, and a Playwright CLI binary-only update does not require `sync` afterwards.
194
196
  - `uninstall` preserves the global `@playwright/cli` package and all browser data by default; `--remove-playwright` removes the package only (never the browser cache, profiles, cookies, storage state, traces, screenshots or videos). If `pnpm remove --global @playwright/cli` exits non-zero, `uninstall` reports the failure instead of a success outro. For DevTools MCP, ownership is released only after the corresponding unmerge is applied; if no unmerge action is written, the ownership marker is preserved for a later retry.
195
- - `install`/`sync` also inject (and `disable`/`uninstall` remove) managed capability sections in `AGENTS.md` (OpenCode, Codex) or `CLAUDE.md` (Claude Code). File runtimes keep `jorgex:playwright`, `jorgex:chrome-devtools` and `jorgex:context7` independent; Pi 0.8.21 projects the Context7 section after registering its isolated HTTP bridge and keeps the legacy `jorgex:browser` format for migration. User content outside managed markers is preserved. `--target-dir` never reads the real preferences, so by default no section is emitted in target-dir runs — but explicit flags like `--devtools` simulate the MCP entry (and its DevTools block) inside the temp target without touching the real global state, and `install --dry-run --playwright` projects the Playwright section into the plan preview without installing anything. If reconciliation detects a partial or ambiguous system-prompt state, the CLI exits non-zero and recommends repairing it with `sync` or a repeated install; no write is attempted before marker validation. See [docs/references/browser-automation.md](docs/references/browser-automation.md) §2.7 for the full lifecycle.
197
+ - `install`/`sync` also inject (and `disable`/`uninstall` remove) managed capability sections in `AGENTS.md` (OpenCode, Codex) or `CLAUDE.md` (Claude Code). File runtimes keep `jorgex:playwright`, `jorgex:chrome-devtools` and `jorgex:context7` independent; Pi 0.8.22 projects the Context7 section after registering its isolated HTTP bridge and keeps the legacy `jorgex:browser` format for migration. User content outside managed markers is preserved. `--target-dir` never reads the real preferences, so by default no section is emitted in target-dir runs — but explicit flags like `--devtools` simulate the MCP entry (and its DevTools block) inside the temp target without touching the real global state, and `install --dry-run --playwright` projects the Playwright section into the plan preview without installing anything. If reconciliation detects a partial or ambiguous system-prompt state, the CLI exits non-zero and recommends repairing it with `sync` or a repeated install; no write is attempted before marker validation. See [docs/references/browser-automation.md](docs/references/browser-automation.md) §2.7 for the full lifecycle.
196
198
 
197
199
  ### Update: Interactive Flow
198
200
 
package/dist/cli.js CHANGED
@@ -3482,12 +3482,19 @@ var PERMISSIONS_EXTERNAL_WRITES = /* @__PURE__ */ new Set([
3482
3482
  "jorgex-pi/permissions-lifecycle.v1.json",
3483
3483
  "jorgex-pi/permissions-backups"
3484
3484
  ]);
3485
+ var EXPERIENCE_EXTERNAL_WRITES = /* @__PURE__ */ new Set([
3486
+ ...PERMISSIONS_EXTERNAL_WRITES,
3487
+ "jorgex-pi/experience-lifecycle.v1.json"
3488
+ ]);
3485
3489
  function sameRecord(left, right) {
3486
3490
  return JSON.stringify(left) === JSON.stringify(right);
3487
3491
  }
3488
3492
  function managedExternalWritesAreSafe(writes, capabilities) {
3489
3493
  if (!Array.isArray(capabilities)) return false;
3490
- const allowed = capabilities.includes("permissions-policy-v1") ? PERMISSIONS_EXTERNAL_WRITES : ALLOWED_EXTERNAL_WRITES;
3494
+ const permissions = capabilities.includes("permissions-policy-v1");
3495
+ const experience = capabilities.includes("experience-defaults-v1");
3496
+ if (experience && !permissions) return false;
3497
+ const allowed = experience ? EXPERIENCE_EXTERNAL_WRITES : permissions ? PERMISSIONS_EXTERNAL_WRITES : ALLOWED_EXTERNAL_WRITES;
3491
3498
  if (writes.length !== allowed.size) return false;
3492
3499
  const seen = /* @__PURE__ */ new Set();
3493
3500
  for (const write of writes) {
@@ -6139,16 +6146,16 @@ import { createHash as createHash2 } from "crypto";
6139
6146
  var pi_runtime_pin_default = {
6140
6147
  package: {
6141
6148
  name: "jorgex-pi",
6142
- version: "0.8.21",
6143
- source: "npm:jorgex-pi@0.8.21"
6149
+ version: "0.8.22",
6150
+ source: "npm:jorgex-pi@0.8.22"
6144
6151
  },
6145
6152
  provenance: {
6146
- commit: "425356a083708aa873a14a094d06bd7abe302bc0"
6153
+ commit: "462de6f6f52dbc86b6808ed051dd441932974500"
6147
6154
  },
6148
6155
  tarball: {
6149
- bytes: 89139189,
6150
- sha256: "bf8846caf25eddebe31edc396ed9acc0b5636f7a2a4edd5df4f166beadec40e7",
6151
- sha512: "74184929ee136671dd3160f76f96a57a4d9299a2dcae2608ca476220a3ea8a7e9cf32fc6a9bbd09334d16c21b7e52dc46c1b5dd76107ad936e4b4c651f1fa684"
6156
+ bytes: 89140502,
6157
+ sha256: "98fbcffe5ee81e9fd8754dfbb40d786ee7c10251ef7050d68e70808f8de4d1df",
6158
+ sha512: "ef415061fab27328cc1e43238653705bca089d32719034a3e6543da19069d42996d5b799b1f94eac8b2fccd64d97b2440dbf1ddcd1f3d22d9fc45ac0a805a7cd"
6152
6159
  }
6153
6160
  };
6154
6161
 
@@ -6173,6 +6180,7 @@ var PI_RUNTIME_CANDIDATE = {
6173
6180
  "engram-runtime-tools-v1",
6174
6181
  "context7-http-v1",
6175
6182
  "permissions-policy-v1",
6183
+ "experience-defaults-v1",
6176
6184
  "chrome-devtools-handoff-v1",
6177
6185
  "playwright-handoff-v1",
6178
6186
  "runner-json-v1",
@@ -6192,7 +6200,7 @@ var PI_RUNTIME_CANDIDATE = {
6192
6200
  owner: "jorgex-pi",
6193
6201
  root: "PI_CODING_AGENT_DIR",
6194
6202
  relativePath: "settings.json",
6195
- semantics: "merge a missing or matching partial defaultProvider=openai-codex and defaultModel=gpt-5.6-sol pair; preserve foreign halves; cleanup removes only receipt-owned exact values"
6203
+ semantics: "merge a missing or matching partial defaultProvider=openai-codex and defaultModel=gpt-5.6-sol pair plus first-visit theme=JorgeX, quietStartup=true, and hideThinkingBlock=true defaults; preserve foreign halves and existing experience values; cleanup removes only receipt-owned exact values"
6196
6204
  },
6197
6205
  {
6198
6206
  owner: "jorgex-pi",
@@ -6223,6 +6231,12 @@ var PI_RUNTIME_CANDIDATE = {
6223
6231
  root: "PI_CODING_AGENT_DIR",
6224
6232
  relativePath: "jorgex-pi/permissions-backups",
6225
6233
  semantics: "retain cleanup backups of exact owned permission policy bytes"
6234
+ },
6235
+ {
6236
+ owner: "jorgex-pi",
6237
+ root: "PI_CODING_AGENT_DIR",
6238
+ relativePath: "jorgex-pi/experience-lifecycle.v1.json",
6239
+ semantics: "record first initialization and exact ownership of missing theme, quietStartup, and hideThinkingBlock fields; preserve replacements and do not reseed after initialization"
6226
6240
  }
6227
6241
  ]
6228
6242
  }
@@ -6732,6 +6746,21 @@ async function completeProjection(operation, packageResult, deps) {
6732
6746
  }
6733
6747
  return projectionResult.kind === "blocked" ? projectionResult : packageResult;
6734
6748
  }
6749
+ var INSTALL_INIT_REMEDY = "Corrige la causa y ejecuta sync --agents pi para completar la inicializaci\xF3n.";
6750
+ var INSTALL_INIT_TARGET_REMEDY = "Corrige la causa y ejecuta sync --agents pi con el mismo --target-dir para completar la inicializaci\xF3n.";
6751
+ function withInstallInitRemedy(result, fallbackRemedy) {
6752
+ return result.remedy === void 0 ? { kind: "blocked", reason: result.reason, remedy: fallbackRemedy } : result;
6753
+ }
6754
+ async function completeInstallWithInitialization(packageResult, deps) {
6755
+ const projected = await completeProjection("install", packageResult, deps);
6756
+ if (projected.kind === "blocked") return projected;
6757
+ const fallbackRemedy = deps.installInitRemedy ?? INSTALL_INIT_REMEDY;
6758
+ const initResult = await deps.runPackage("sync");
6759
+ if (initResult.kind === "synced") return packageResult;
6760
+ if (initResult.kind === "manual-existing") return manualExistingResult(initResult);
6761
+ if (initResult.kind === "blocked") return withInstallInitRemedy(initResult, fallbackRemedy);
6762
+ return { kind: "blocked", reason: "runner-unhealthy", remedy: fallbackRemedy };
6763
+ }
6735
6764
  async function runManagedPiOperation(operation, deps) {
6736
6765
  if (operation === "uninstall") {
6737
6766
  const preparation = await deps.prepareProjectionUninstall();
@@ -6744,6 +6773,9 @@ async function runManagedPiOperation(operation, deps) {
6744
6773
  const packageResult = await deps.runPackage(operation);
6745
6774
  if (packageResult.kind === "manual-existing") return manualExistingResult(packageResult);
6746
6775
  if (operation === "models") return packageResult;
6776
+ if (operation === "install" && packageResult.kind !== "blocked") {
6777
+ return completeInstallWithInitialization(packageResult, deps);
6778
+ }
6747
6779
  const nextProjectionOperation = projectionOperation(operation);
6748
6780
  if (packageResult.kind !== "blocked") {
6749
6781
  return completeProjection(nextProjectionOperation, packageResult, deps);
@@ -6823,6 +6855,7 @@ async function runManagedPiSystem(input) {
6823
6855
  };
6824
6856
  if (preparedStyle !== void 0 && input.operation !== "doctor") applyWritingStyle(preparedStyle);
6825
6857
  const result = await runManagedPiOperation(input.operation, {
6858
+ installInitRemedy: input.targetDir === void 0 ? void 0 : INSTALL_INIT_TARGET_REMEDY,
6826
6859
  async runPackage(operation) {
6827
6860
  return managedPackageResult(await runPiRuntimeSystem({ ...runtimeInput, operation }));
6828
6861
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jorgex-stack",
3
- "version": "1.9.43",
3
+ "version": "1.9.45",
4
4
  "description": "Harness multi-agente portable: instala la config JorgeX (agentes, skills, hooks, Engram, MCPs) en Claude Code, Codex CLI, OpenCode y Pi",
5
5
  "type": "module",
6
6
  "license": "MIT",