@wix/pathgrade 1.0.12 → 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
@@ -13,7 +13,7 @@
13
13
 
14
14
  ## Quick Start
15
15
 
16
- **Prerequisites**: Node.js 20.11+, Vitest 4+ or Jest 30+, and at least one configured agent runtime. Claude uses the bundled `@anthropic-ai/claude-agent-sdk` binary by default; Codex requires the `codex` CLI; Cursor requires the `cursor-agent` CLI. OpenCode requires the exact Wix-registry v1.18.14 macOS ARM64 or Linux ARM64 executable.
16
+ **Prerequisites**: Node.js 20.11+, Vitest 4+ or Jest 30+, and at least one configured agent runtime. Claude uses the bundled `@anthropic-ai/claude-agent-sdk` binary by default; Codex requires the `codex` CLI; Cursor requires the `cursor-agent` CLI. OpenCode requires the exact Wix-registry v1.18.14 macOS ARM64, Linux ARM64, or Linux x64 executable.
17
17
 
18
18
  ```bash
19
19
  yarn add -D @wix/pathgrade
@@ -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
@@ -50,6 +50,10 @@ export declare const OPENCODE_RUNTIME_LOCK: {
50
50
  readonly version: "1.18.14";
51
51
  readonly executableSha256: "79d42436517e485e9444cfc6e92582bf9224a9e36fa77fb3957b343486fec81d";
52
52
  };
53
+ readonly 'linux-x64': {
54
+ readonly version: "1.18.14";
55
+ readonly executableSha256: "cfdfa432a0fe192aea84b8257d01295971e533ee37520ede920b3d9cdd3cc07f";
56
+ };
53
57
  };
54
58
  export type OpenCodePlatformKey = keyof typeof OPENCODE_RUNTIME_LOCK;
55
59
  export declare function getOpenCodePlatformKey(platform: NodeJS.Platform, arch: string): OpenCodePlatformKey | undefined;
@@ -50,6 +50,10 @@ export const OPENCODE_RUNTIME_LOCK = {
50
50
  version: OPENCODE_VERSION,
51
51
  executableSha256: '79d42436517e485e9444cfc6e92582bf9224a9e36fa77fb3957b343486fec81d',
52
52
  },
53
+ 'linux-x64': {
54
+ version: OPENCODE_VERSION,
55
+ executableSha256: 'cfdfa432a0fe192aea84b8257d01295971e533ee37520ede920b3d9cdd3cc07f',
56
+ },
53
57
  };
54
58
  export function getOpenCodePlatformKey(platform, arch) {
55
59
  const key = `${platform}-${arch}`;
@@ -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.12",
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": "48e95ba80576ede589f0a5e47d60b9c94fd53c1ef435d8ca9af35392"
135
+ "falconPackageHash": "211e0bfa59510a8dc93d2458e37199173ed9fe85334473a0e38a0e86"
136
136
  }