@wix/pathgrade 1.0.13 → 1.0.14

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
@@ -47,6 +47,8 @@ By default, Pathgrade tries to reuse the agent CLI's native auth before falling
47
47
 
48
48
  If you set `ANTHROPIC_BASE_URL`, `OPENAI_BASE_URL`, or `CURSOR_API_BASE_URL`, set the matching API key too.
49
49
 
50
+ Do not add `copyFromHome: ['.codex']` just to reuse Codex authentication. When no OpenAI API key is available, Pathgrade automatically stages only `~/.codex/auth.json`. A deliberate full `.codex` copy remains supported, but it also imports host config, MCP definitions, plugins, caches, sessions, and other potentially large or sensitive state; Pathgrade prints a warning when requested.
51
+
50
52
  Override credentials per test with `env`:
51
53
 
52
54
  ```typescript
@@ -6,6 +6,9 @@ import { createSandboxRoot } from './sandbox-lifecycle.js';
6
6
  export const SAFE_HOST_VARS = [
7
7
  'PATH', 'SHELL', 'LANG', 'LC_ALL', 'LC_CTYPE', 'TERM', 'USER', 'LOGNAME',
8
8
  ];
9
+ function copiesEntireCodexHome(relPath) {
10
+ return path.posix.normalize(relPath.replace(/\\/g, '/')).replace(/\/+$/, '') === '.codex';
11
+ }
9
12
  export async function createSandbox(spec) {
10
13
  const rootDir = await createSandboxRoot();
11
14
  const workspacePath = path.join(rootDir, 'workspace');
@@ -51,6 +54,9 @@ export async function createSandbox(spec) {
51
54
  }
52
55
  // Copy specified paths from real host HOME into sandbox HOME
53
56
  if (spec.copyFromHome) {
57
+ if (spec.copyFromHome.some(copiesEntireCodexHome)) {
58
+ console.warn('pathgrade: copyFromHome requests a copy of the entire ~/.codex directory, including config, MCP definitions, plugins, caches, sessions, and other potentially large or sensitive state. Pathgrade stages ~/.codex/auth.json automatically when cached Codex auth is needed; keep the full copy only when reproducing the host Codex environment intentionally.');
59
+ }
54
60
  const realHome = os.homedir();
55
61
  for (const relPath of spec.copyFromHome) {
56
62
  const srcPath = path.join(realHome, relPath);
@@ -55,7 +55,8 @@ export function createManagedSession(deps) {
55
55
  // Run auth setup commands before first agent turn
56
56
  if (!setupDone) {
57
57
  for (const cmd of ws.setupCommands) {
58
- await ws.exec(cmd);
58
+ await ws.exec(cmd, { signal });
59
+ signal.throwIfAborted();
59
60
  }
60
61
  setupDone = true;
61
62
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/pathgrade",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
4
4
  "packageManager": "yarn@4.12.0",
5
5
  "description": "Evaluate whether AI agents discover and use your skills correctly",
6
6
  "exports": {
@@ -132,5 +132,5 @@
132
132
  "typescript": "^5.9.3",
133
133
  "zod": "4.3.6"
134
134
  },
135
- "falconPackageHash": "b327de99650979dcf1db770211744d11c34f2555b5f0b82869b80d30"
135
+ "falconPackageHash": "211e0bfa59510a8dc93d2458e37199173ed9fe85334473a0e38a0e86"
136
136
  }