@parall/codex-agent 1.18.0 → 1.18.2

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/dist/config.d.ts CHANGED
@@ -16,14 +16,22 @@ export type CodexAgentConfig = {
16
16
  };
17
17
  export declare function resolveCodexAgentConfig(env?: NodeJS.ProcessEnv): CodexAgentConfig;
18
18
  /**
19
- * Normalise a sandbox value (CLI docs use kebab-case like `workspace-write`,
20
- * but the app-server JSON-RPC protocol uses camelCase like `workspaceWrite`).
21
- * Accept both forms and emit the canonical protocol form.
19
+ * Normalise a sandbox value to the kebab-case form the app-server JSON-RPC
20
+ * enum expects (`read-only` / `workspace-write` / `danger-full-access`).
21
+ * The CLI-facing PRLL_CODEX_SANDBOX env var may come in as either kebab-case
22
+ * or camelCase (from docs that cite the Rust field names); accept both.
23
+ *
24
+ * Empirically verified: the app-server rejects `workspaceWrite` with
25
+ * "unknown variant workspaceWrite, expected one of read-only,
26
+ * workspace-write, danger-full-access"
27
+ * which is the Rust enum's serde kebab-case form.
22
28
  */
23
29
  export declare function normalizeSandbox(value: string): string;
24
30
  /**
25
- * Normalise an approval policy string to the camelCase form the app-server
26
- * JSON-RPC protocol uses (`never` / `onRequest` / `unlessTrusted`).
31
+ * Normalise an approval policy string to the kebab-case form the app-server
32
+ * JSON-RPC enum expects (`never` / `on-request` / `on-failure` /
33
+ * `unless-trusted`). Mirrors the sandbox enum — serde rename_all kebab-case
34
+ * applies across app-server protocol enums.
27
35
  */
28
36
  export declare function normalizeApprovalPolicy(value: string): string;
29
37
  export declare function resolveWsUrl(apiUrl: string, explicitWsUrl?: string, swimlaneName?: string): string;
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC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M,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAcF,wBAAgB,uBAAuB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,gBAAgB,CA6B9F;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAUtD;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAW7D;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAMlG;AAED,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAEhE;AAED,wBAAgB,8BAA8B,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAG3F;AAED,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAGrF"}
package/dist/config.js CHANGED
@@ -38,34 +38,42 @@ export function resolveCodexAgentConfig(env = process.env) {
38
38
  };
39
39
  }
40
40
  /**
41
- * Normalise a sandbox value (CLI docs use kebab-case like `workspace-write`,
42
- * but the app-server JSON-RPC protocol uses camelCase like `workspaceWrite`).
43
- * Accept both forms and emit the canonical protocol form.
41
+ * Normalise a sandbox value to the kebab-case form the app-server JSON-RPC
42
+ * enum expects (`read-only` / `workspace-write` / `danger-full-access`).
43
+ * The CLI-facing PRLL_CODEX_SANDBOX env var may come in as either kebab-case
44
+ * or camelCase (from docs that cite the Rust field names); accept both.
45
+ *
46
+ * Empirically verified: the app-server rejects `workspaceWrite` with
47
+ * "unknown variant workspaceWrite, expected one of read-only,
48
+ * workspace-write, danger-full-access"
49
+ * which is the Rust enum's serde kebab-case form.
44
50
  */
45
51
  export function normalizeSandbox(value) {
46
52
  const map = {
47
- "workspace-write": "workspaceWrite",
48
- "workspacewrite": "workspaceWrite",
49
- "danger-full-access": "dangerFullAccess",
50
- "dangerfullaccess": "dangerFullAccess",
51
- "read-only": "readOnly",
52
- "readonly": "readOnly",
53
+ "workspace-write": "workspace-write",
54
+ "workspacewrite": "workspace-write",
55
+ "danger-full-access": "danger-full-access",
56
+ "dangerfullaccess": "danger-full-access",
57
+ "read-only": "read-only",
58
+ "readonly": "read-only",
53
59
  };
54
60
  return map[value.toLowerCase()] ?? value;
55
61
  }
56
62
  /**
57
- * Normalise an approval policy string to the camelCase form the app-server
58
- * JSON-RPC protocol uses (`never` / `onRequest` / `unlessTrusted`).
63
+ * Normalise an approval policy string to the kebab-case form the app-server
64
+ * JSON-RPC enum expects (`never` / `on-request` / `on-failure` /
65
+ * `unless-trusted`). Mirrors the sandbox enum — serde rename_all kebab-case
66
+ * applies across app-server protocol enums.
59
67
  */
60
68
  export function normalizeApprovalPolicy(value) {
61
69
  const map = {
62
70
  "never": "never",
63
- "on-request": "onRequest",
64
- "onrequest": "onRequest",
65
- "unless-trusted": "unlessTrusted",
66
- "unlesstrusted": "unlessTrusted",
67
- "on-failure": "onFailure",
68
- "onfailure": "onFailure",
71
+ "on-request": "on-request",
72
+ "onrequest": "on-request",
73
+ "unless-trusted": "unless-trusted",
74
+ "unlesstrusted": "unless-trusted",
75
+ "on-failure": "on-failure",
76
+ "onfailure": "on-failure",
69
77
  };
70
78
  return map[value.toLowerCase()] ?? value;
71
79
  }
@@ -1 +1 @@
1
- {"version":3,"file":"dispatch.d.ts","sourceRoot":"","sources":["../src/dispat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AC,iBAAiB,GAAG,IAAI,CAAC;IAuBhG,WAAW,CAAC,EAAE,IAAI,EAAE,EAAE,eAAe;IAIrC,OAAO,CAAC,cAAc;IAKhB,IAAI;YAaI,aAAa;YAcb,OAAO;IA2DrB,OAAO,CAAC,qBAAqB;YAiCf,UAAU;IAwCxB,OAAO,CAAC,iBAAiB;CA2B1B"}
package/dist/dispatch.js CHANGED
@@ -353,9 +353,10 @@ export class CodexAppServerAdapter {
353
353
  // model, reasoningEffort). Passing them on resume lets the user change
354
354
  // PRLL_CODEX_* env vars and have the bridge pick them up on the next
355
355
  // restart instead of being stuck on the values baked into the persisted
356
- // thread. Sandbox / approval values are normalised to the camelCase enum
357
- // the protocol expects (`workspaceWrite`, `onRequest`, etc.), so users
358
- // can supply either CLI-style or protocol-style env values.
356
+ // thread. Sandbox / approval values are normalised to the kebab-case
357
+ // enum form the protocol expects (`workspace-write`, `on-request`, etc.
358
+ // serde rename_all kebab-case on the Rust enum); users can supply
359
+ // either kebab or camel and we always emit kebab.
359
360
  const commonParams = {
360
361
  approvalPolicy: normalizeApprovalPolicy(this.opts.approvalPolicy),
361
362
  sandbox: normalizeSandbox(this.opts.sandbox),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parall/codex-agent",
3
- "version": "1.18.0",
3
+ "version": "1.18.2",
4
4
  "description": "Codex CLI bridge runtime for self-hosted Parall agents",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -25,7 +25,7 @@
25
25
  "src"
26
26
  ],
27
27
  "dependencies": {
28
- "@parall/agent-core": "1.18.0",
28
+ "@parall/agent-core": "1.18.1",
29
29
  "@parall/cli": "1.18.0",
30
30
  "@parall/sdk": "1.18.0"
31
31
  },
package/src/config.ts CHANGED
@@ -62,35 +62,43 @@ export function resolveCodexAgentConfig(env: NodeJS.ProcessEnv = process.env): C
62
62
  }
63
63
 
64
64
  /**
65
- * Normalise a sandbox value (CLI docs use kebab-case like `workspace-write`,
66
- * but the app-server JSON-RPC protocol uses camelCase like `workspaceWrite`).
67
- * Accept both forms and emit the canonical protocol form.
65
+ * Normalise a sandbox value to the kebab-case form the app-server JSON-RPC
66
+ * enum expects (`read-only` / `workspace-write` / `danger-full-access`).
67
+ * The CLI-facing PRLL_CODEX_SANDBOX env var may come in as either kebab-case
68
+ * or camelCase (from docs that cite the Rust field names); accept both.
69
+ *
70
+ * Empirically verified: the app-server rejects `workspaceWrite` with
71
+ * "unknown variant workspaceWrite, expected one of read-only,
72
+ * workspace-write, danger-full-access"
73
+ * which is the Rust enum's serde kebab-case form.
68
74
  */
69
75
  export function normalizeSandbox(value: string): string {
70
76
  const map: Record<string, string> = {
71
- "workspace-write": "workspaceWrite",
72
- "workspacewrite": "workspaceWrite",
73
- "danger-full-access": "dangerFullAccess",
74
- "dangerfullaccess": "dangerFullAccess",
75
- "read-only": "readOnly",
76
- "readonly": "readOnly",
77
+ "workspace-write": "workspace-write",
78
+ "workspacewrite": "workspace-write",
79
+ "danger-full-access": "danger-full-access",
80
+ "dangerfullaccess": "danger-full-access",
81
+ "read-only": "read-only",
82
+ "readonly": "read-only",
77
83
  };
78
84
  return map[value.toLowerCase()] ?? value;
79
85
  }
80
86
 
81
87
  /**
82
- * Normalise an approval policy string to the camelCase form the app-server
83
- * JSON-RPC protocol uses (`never` / `onRequest` / `unlessTrusted`).
88
+ * Normalise an approval policy string to the kebab-case form the app-server
89
+ * JSON-RPC enum expects (`never` / `on-request` / `on-failure` /
90
+ * `unless-trusted`). Mirrors the sandbox enum — serde rename_all kebab-case
91
+ * applies across app-server protocol enums.
84
92
  */
85
93
  export function normalizeApprovalPolicy(value: string): string {
86
94
  const map: Record<string, string> = {
87
95
  "never": "never",
88
- "on-request": "onRequest",
89
- "onrequest": "onRequest",
90
- "unless-trusted": "unlessTrusted",
91
- "unlesstrusted": "unlessTrusted",
92
- "on-failure": "onFailure",
93
- "onfailure": "onFailure",
96
+ "on-request": "on-request",
97
+ "onrequest": "on-request",
98
+ "unless-trusted": "unless-trusted",
99
+ "unlesstrusted": "unless-trusted",
100
+ "on-failure": "on-failure",
101
+ "onfailure": "on-failure",
94
102
  };
95
103
  return map[value.toLowerCase()] ?? value;
96
104
  }
package/src/dispatch.ts CHANGED
@@ -396,9 +396,10 @@ export class CodexAppServerAdapter implements DispatchAdapter {
396
396
  // model, reasoningEffort). Passing them on resume lets the user change
397
397
  // PRLL_CODEX_* env vars and have the bridge pick them up on the next
398
398
  // restart instead of being stuck on the values baked into the persisted
399
- // thread. Sandbox / approval values are normalised to the camelCase enum
400
- // the protocol expects (`workspaceWrite`, `onRequest`, etc.), so users
401
- // can supply either CLI-style or protocol-style env values.
399
+ // thread. Sandbox / approval values are normalised to the kebab-case
400
+ // enum form the protocol expects (`workspace-write`, `on-request`, etc.
401
+ // serde rename_all kebab-case on the Rust enum); users can supply
402
+ // either kebab or camel and we always emit kebab.
402
403
  const commonParams: Record<string, unknown> = {
403
404
  approvalPolicy: normalizeApprovalPolicy(this.opts.approvalPolicy),
404
405
  sandbox: normalizeSandbox(this.opts.sandbox),