@abdulr7man/pensieve 1.2.2 → 1.2.3

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/VERSION CHANGED
@@ -1 +1 @@
1
- v1.2.2
1
+ v1.2.3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abdulr7man/pensieve",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "description": "AI agents run penetration tests. PENSIEVE keeps them in scope and makes them prove what they claim.",
5
5
  "license": "AGPL-3.0-only",
6
6
  "repository": {
@@ -112,6 +112,12 @@ function buildSharedHome(HOME, { version, log }) {
112
112
  const binDir = path.join(home, 'bin');
113
113
  fs.mkdirSync(binDir, { recursive: true });
114
114
  const sdkBin = path.join(binDir, 'pensieve-sdk');
115
+ // COLLISION FIX (v1.2.3): a pre-existing ~/.pensieve from the .sh installer
116
+ // symlinks bin/pensieve-sdk INTO a repo checkout — writeFileSync would
117
+ // FOLLOW that link and overwrite the repo's SDK bin with this shim (found
118
+ // live on the owner's machine). Remove the path FIRST: the shim REPLACES
119
+ // whatever is there (symlink or file), never writes through it.
120
+ fs.rmSync(sdkBin, { force: true, recursive: true });
115
121
  fs.writeFileSync(sdkBin,
116
122
  '#!/usr/bin/env node\n'
117
123
  + "// PENSIEVE launcher — delegates to the self-contained copy at ~/.pensieve/sdk\n"
@@ -119,7 +125,10 @@ function buildSharedHome(HOME, { version, log }) {
119
125
  fs.chmodSync(sdkBin, 0o755);
120
126
  const smoke = spawnSync(process.execPath, [sdkBin, 'help'], { encoding: 'utf8' });
121
127
  if (smoke.status !== 0) {
122
- throw new Error('pensieve-sdk smoke test failed after copy — the copied SDK is not runnable');
128
+ throw new Error(
129
+ 'pensieve-sdk smoke test failed after copy — the copied SDK is not runnable'
130
+ + (smoke.stderr ? `: ${String(smoke.stderr).split('\n')[0]}` : ` (exit ${smoke.status})`)
131
+ );
123
132
  }
124
133
  if (log) log(`pensieve-sdk -> ${sdkBin} (self-contained copy, smoke OK)`);
125
134