jorgex-stack 1.9.44 → 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 +1 -1
  2. package/dist/cli.js +19 -0
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -128,7 +128,7 @@ 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.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.
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
 
package/dist/cli.js CHANGED
@@ -6746,6 +6746,21 @@ async function completeProjection(operation, packageResult, deps) {
6746
6746
  }
6747
6747
  return projectionResult.kind === "blocked" ? projectionResult : packageResult;
6748
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
+ }
6749
6764
  async function runManagedPiOperation(operation, deps) {
6750
6765
  if (operation === "uninstall") {
6751
6766
  const preparation = await deps.prepareProjectionUninstall();
@@ -6758,6 +6773,9 @@ async function runManagedPiOperation(operation, deps) {
6758
6773
  const packageResult = await deps.runPackage(operation);
6759
6774
  if (packageResult.kind === "manual-existing") return manualExistingResult(packageResult);
6760
6775
  if (operation === "models") return packageResult;
6776
+ if (operation === "install" && packageResult.kind !== "blocked") {
6777
+ return completeInstallWithInitialization(packageResult, deps);
6778
+ }
6761
6779
  const nextProjectionOperation = projectionOperation(operation);
6762
6780
  if (packageResult.kind !== "blocked") {
6763
6781
  return completeProjection(nextProjectionOperation, packageResult, deps);
@@ -6837,6 +6855,7 @@ async function runManagedPiSystem(input) {
6837
6855
  };
6838
6856
  if (preparedStyle !== void 0 && input.operation !== "doctor") applyWritingStyle(preparedStyle);
6839
6857
  const result = await runManagedPiOperation(input.operation, {
6858
+ installInitRemedy: input.targetDir === void 0 ? void 0 : INSTALL_INIT_TARGET_REMEDY,
6840
6859
  async runPackage(operation) {
6841
6860
  return managedPackageResult(await runPiRuntimeSystem({ ...runtimeInput, operation }));
6842
6861
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jorgex-stack",
3
- "version": "1.9.44",
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",