pumuki 6.3.54 → 6.3.55

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/README.md CHANGED
@@ -83,12 +83,12 @@ Expected behavior:
83
83
 
84
84
  Version drift quick check:
85
85
 
86
- - `status --json` and `doctor --json` expose `version.effective`, `version.runtime`, `version.consumerInstalled`, `version.lifecycleInstalled`, `version.driftWarning`, and `version.alignmentCommand`.
87
- - If `driftWarning` is not `null`, align the consumer with:
86
+ - `status --json` and `doctor --json` expose `version.effective`, `version.runtime`, `version.consumerInstalled`, `version.lifecycleInstalled`, `version.driftWarning`, `version.alignmentCommand`, `version.pathExecutionHazard`, `version.pathExecutionWarning`, and `version.pathExecutionWorkaroundCommand`.
87
+ - If `driftWarning` is not `null`, prefer the exact command already exposed in `version.alignmentCommand`.
88
+ - If `pathExecutionHazard` is `true`, avoid `npx/npm exec` for the install step and use the safe local workaround reported by Pumuki, for example:
88
89
 
89
90
  ```bash
90
- npm install --save-exact pumuki@6.3.52
91
- npx --yes pumuki update --latest
91
+ node ./node_modules/pumuki/bin/pumuki.js install
92
92
  ```
93
93
 
94
94
  ## Why Pumuki
@@ -5,6 +5,25 @@ Detailed commit history remains available through Git history (`git log` / `git
5
5
 
6
6
  ## 2026-03 (enterprise hardening updates)
7
7
 
8
+ ### 2026-03-06 (v6.3.55)
9
+
10
+ - Safe remediation for consumers whose repository path breaks `PATH` execution:
11
+ - `status` / `doctor` now detect when the repo root contains the platform `PATH` delimiter,
12
+ - the JSON contract exposes:
13
+ - `version.pathExecutionHazard`
14
+ - `version.pathExecutionWarning`
15
+ - `version.pathExecutionWorkaroundCommand`
16
+ - `version.alignmentCommand` now falls back to a safe local-node invocation when `npx/npm exec` would be unsafe.
17
+ - Human-readable lifecycle output now explains the problem directly:
18
+ - `execution warning: ...`
19
+ - `execution workaround: node ./node_modules/pumuki/bin/pumuki.js ...`
20
+ - Operational impact:
21
+ - consumers like `SAAS:APP_SUPERMERCADOS` no longer depend on broken `PATH` rewriting for lifecycle remediation,
22
+ - the workaround is deterministic and machine-readable instead of tribal knowledge.
23
+ - Validation evidence:
24
+ - `npx --yes tsx@4.21.0 --test integrations/lifecycle/__tests__/packageInfo.test.ts integrations/lifecycle/__tests__/status.test.ts integrations/lifecycle/__tests__/doctor.test.ts integrations/lifecycle/__tests__/cli.test.ts` (`pass`)
25
+ - `npm run -s typecheck` (`PASS`)
26
+
8
27
  ### 2026-03-06 (v6.3.54)
9
28
 
10
29
  - Consumer package/runtime correctness:
@@ -158,6 +158,9 @@ Machine-readable fields exposed by both `pumuki status --json` and `pumuki docto
158
158
  - `version.driftFromLifecycleInstalled`
159
159
  - `version.driftWarning`
160
160
  - `version.alignmentCommand`
161
+ - `version.pathExecutionHazard`
162
+ - `version.pathExecutionWarning`
163
+ - `version.pathExecutionWorkaroundCommand`
161
164
 
162
165
  Compatibility note:
163
166
 
@@ -172,6 +175,9 @@ Interpretation contract:
172
175
  - `lifecycleInstalled`: version recorded in managed lifecycle metadata.
173
176
  - `driftWarning`: compact human-readable explanation when those values diverge.
174
177
  - `alignmentCommand`: exact remediation command to align dependency and lifecycle state with the current runtime version.
178
+ - `pathExecutionHazard`: boolean flag raised when the repo root contains the platform `PATH` delimiter and `npx/npm exec` can fail to resolve `pumuki`.
179
+ - `pathExecutionWarning`: compact warning explaining why `PATH` resolution is unsafe in that repo.
180
+ - `pathExecutionWorkaroundCommand`: safe local-node entrypoint to use when `pathExecutionHazard=true`.
175
181
 
176
182
  ## Evidence API
177
183
 
@@ -328,10 +328,14 @@ Plain `npm uninstall pumuki` removes only the dependency; it does not remove man
328
328
  "runtime": "6.3.52",
329
329
  "consumerInstalled": "6.3.47",
330
330
  "lifecycleInstalled": "6.3.46",
331
- "source": "consumerInstalled",
331
+ "source": "consumer-node-modules",
332
332
  "driftFromRuntime": true,
333
333
  "driftFromLifecycleInstalled": true,
334
- "driftWarning": "Version drift detectado: effective=6.3.47 runtime=6.3.52 lifecycle=6.3.46."
334
+ "driftWarning": "Version drift detectado: effective=6.3.47 runtime=6.3.52 lifecycle=6.3.46.",
335
+ "alignmentCommand": "npm install --save-exact pumuki@6.3.52 && npx --yes --package pumuki@6.3.52 pumuki install",
336
+ "pathExecutionHazard": false,
337
+ "pathExecutionWarning": null,
338
+ "pathExecutionWorkaroundCommand": null
335
339
  }
336
340
  }
337
341
  ```
@@ -345,17 +349,20 @@ How to read it:
345
349
  - `source`: source chosen to compute `effective`.
346
350
  - `driftWarning`: compact explanation when those values diverge.
347
351
  - `alignmentCommand`: exact command to align consumer dependency and lifecycle state with the current runtime.
352
+ - `pathExecutionHazard`: tells you whether the repo root itself can break `PATH`-based execution.
353
+ - `pathExecutionWarning`: compact explanation of that hazard.
354
+ - `pathExecutionWorkaroundCommand`: safe local-node entrypoint to use when `PATH` execution is unsafe.
348
355
 
349
356
  Recommended remediation when drift appears:
350
357
 
351
358
  ```bash
352
- npm install --save-exact pumuki@6.3.52
353
- npx --yes pumuki update --latest
359
+ <use version.alignmentCommand>
354
360
  npx --yes pumuki status --json
355
361
  npx --yes pumuki doctor --json
356
362
  ```
357
363
 
358
364
  Use this sequence to align dependency, hooks, and lifecycle metadata in the same consumer.
365
+ If `pathExecutionHazard=true`, use the local workaround printed by Pumuki instead of `npx/npm exec`.
359
366
 
360
367
  Loop runtime behavior:
361
368
  - `pumuki loop run` creates a session in `.pumuki/loop-sessions/`.
@@ -1496,6 +1496,14 @@ const printDoctorReport = (
1496
1496
  writeInfo(`[pumuki] version remediation: ${report.version.alignmentCommand}`);
1497
1497
  }
1498
1498
  }
1499
+ if (report.version.pathExecutionWarning) {
1500
+ writeInfo(`[pumuki] execution warning: ${report.version.pathExecutionWarning}`);
1501
+ if (report.version.pathExecutionWorkaroundCommand) {
1502
+ writeInfo(
1503
+ `[pumuki] execution workaround: ${report.version.pathExecutionWorkaroundCommand} <command>`
1504
+ );
1505
+ }
1506
+ }
1499
1507
  writeInfo(
1500
1508
  `[pumuki] hooks path: ${report.hooksDirectory} (${report.hooksDirectoryResolution})`
1501
1509
  );
@@ -2126,6 +2134,14 @@ export const runLifecycleCli = async (
2126
2134
  writeInfo(`[pumuki] version remediation: ${status.version.alignmentCommand}`);
2127
2135
  }
2128
2136
  }
2137
+ if (status.version.pathExecutionWarning) {
2138
+ writeInfo(`[pumuki] execution warning: ${status.version.pathExecutionWarning}`);
2139
+ if (status.version.pathExecutionWorkaroundCommand) {
2140
+ writeInfo(
2141
+ `[pumuki] execution workaround: ${status.version.pathExecutionWorkaroundCommand} <command>`
2142
+ );
2143
+ }
2144
+ }
2129
2145
  writeInfo(`[pumuki] lifecycle installed: ${status.lifecycleState.installed ?? 'false'}`);
2130
2146
  writeInfo(
2131
2147
  `[pumuki] hooks path: ${status.hooksDirectory} (${status.hooksDirectoryResolution})`
@@ -1,5 +1,5 @@
1
1
  import { existsSync, readFileSync } from 'node:fs';
2
- import { join } from 'node:path';
2
+ import { delimiter, join } from 'node:path';
3
3
  import packageJson from '../../package.json';
4
4
 
5
5
  const readConsumerInstalledVersion = (repoRoot: string): string | null => {
@@ -34,10 +34,31 @@ export type LifecycleVersionReport = {
34
34
  driftFromLifecycleInstalled: boolean;
35
35
  driftWarning: string | null;
36
36
  alignmentCommand: string | null;
37
+ pathExecutionHazard: boolean;
38
+ pathExecutionWarning: string | null;
39
+ pathExecutionWorkaroundCommand: string | null;
37
40
  };
38
41
 
39
- export const buildLifecycleAlignmentCommand = (runtimeVersion: string): string =>
40
- `npm install --save-exact pumuki@${runtimeVersion} && npx --yes --package pumuki@${runtimeVersion} pumuki install`;
42
+ const buildLocalPumukiCommand = (): string =>
43
+ process.platform === 'win32'
44
+ ? 'node .\\node_modules\\pumuki\\bin\\pumuki.js'
45
+ : 'node ./node_modules/pumuki/bin/pumuki.js';
46
+
47
+ const hasPathExecutionHazard = (repoRoot?: string): boolean =>
48
+ typeof repoRoot === 'string' &&
49
+ repoRoot.trim().length > 0 &&
50
+ repoRoot.includes(delimiter);
51
+
52
+ export const buildLifecycleAlignmentCommand = (
53
+ runtimeVersion: string,
54
+ repoRoot?: string
55
+ ): string => {
56
+ const installStep = `npm install --save-exact pumuki@${runtimeVersion}`;
57
+ const runStep = hasPathExecutionHazard(repoRoot)
58
+ ? `${buildLocalPumukiCommand()} install`
59
+ : `npx --yes --package pumuki@${runtimeVersion} pumuki install`;
60
+ return `${installStep} && ${runStep}`;
61
+ };
41
62
 
42
63
  export const resolvePumukiVersionMetadata = (params?: { repoRoot?: string }): PumukiVersionMetadata => {
43
64
  const runtimeVersion = packageJson.version;
@@ -83,6 +104,8 @@ export const buildLifecycleVersionReport = (params?: {
83
104
  driftFromRuntime ? `runtime=${metadata.runtimeVersion}` : null,
84
105
  driftFromLifecycleInstalled ? `lifecycle=${lifecycleInstalled}` : null,
85
106
  ].filter((value): value is string => value !== null);
107
+ const pathExecutionHazard = hasPathExecutionHazard(params?.repoRoot);
108
+ const pathExecutionWorkaroundCommand = pathExecutionHazard ? buildLocalPumukiCommand() : null;
86
109
 
87
110
  return {
88
111
  effective: metadata.resolvedVersion,
@@ -97,6 +120,13 @@ export const buildLifecycleVersionReport = (params?: {
97
120
  ? `Version drift detectado: effective=${metadata.resolvedVersion} ${driftTargets.join(' ')}.`
98
121
  : null,
99
122
  alignmentCommand:
100
- driftTargets.length > 0 ? buildLifecycleAlignmentCommand(metadata.runtimeVersion) : null,
123
+ driftTargets.length > 0
124
+ ? buildLifecycleAlignmentCommand(metadata.runtimeVersion, params?.repoRoot)
125
+ : null,
126
+ pathExecutionHazard,
127
+ pathExecutionWarning: pathExecutionHazard
128
+ ? `La ruta del repositorio contiene "${delimiter}", que rompe PATH en este sistema y puede hacer fallar invocaciones con npx/npm exec.`
129
+ : null,
130
+ pathExecutionWorkaroundCommand,
101
131
  };
102
132
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pumuki",
3
- "version": "6.3.54",
3
+ "version": "6.3.55",
4
4
  "description": "Enterprise-grade AST Intelligence System with multi-platform support (iOS, Android, Backend, Frontend) and Feature-First + DDD + Clean Architecture enforcement. Includes dynamic violations API for intelligent querying.",
5
5
  "main": "index.js",
6
6
  "bin": {