@penclipai/adapter-codex-local 2026.608.0 → 2026.702.0-canary.0
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/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -7
- package/dist/index.js.map +1 -1
- package/dist/index.test.d.ts +2 -0
- package/dist/index.test.d.ts.map +1 -0
- package/dist/index.test.js +9 -0
- package/dist/index.test.js.map +1 -0
- package/dist/server/codex-args.test.js +43 -6
- package/dist/server/codex-args.test.js.map +1 -1
- package/dist/server/codex-home.d.ts +57 -0
- package/dist/server/codex-home.d.ts.map +1 -1
- package/dist/server/codex-home.js +145 -3
- package/dist/server/codex-home.js.map +1 -1
- package/dist/server/codex-home.test.js +371 -1
- package/dist/server/codex-home.test.js.map +1 -1
- package/dist/server/execute.auth.test.d.ts +2 -0
- package/dist/server/execute.auth.test.d.ts.map +1 -0
- package/dist/server/execute.auth.test.js +61 -0
- package/dist/server/execute.auth.test.js.map +1 -0
- package/dist/server/execute.d.ts.map +1 -1
- package/dist/server/execute.js +613 -405
- package/dist/server/execute.js.map +1 -1
- package/dist/server/index.d.ts +1 -0
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +1 -0
- package/dist/server/index.js.map +1 -1
- package/dist/server/output-inactivity-monitor.d.ts +58 -0
- package/dist/server/output-inactivity-monitor.d.ts.map +1 -0
- package/dist/server/output-inactivity-monitor.integration.test.d.ts +2 -0
- package/dist/server/output-inactivity-monitor.integration.test.d.ts.map +1 -0
- package/dist/server/output-inactivity-monitor.integration.test.js +94 -0
- package/dist/server/output-inactivity-monitor.integration.test.js.map +1 -0
- package/dist/server/output-inactivity-monitor.js +102 -0
- package/dist/server/output-inactivity-monitor.js.map +1 -0
- package/dist/server/output-inactivity-monitor.test.d.ts +2 -0
- package/dist/server/output-inactivity-monitor.test.d.ts.map +1 -0
- package/dist/server/output-inactivity-monitor.test.js +228 -0
- package/dist/server/output-inactivity-monitor.test.js.map +1 -0
- package/dist/server/parse.js +1 -1
- package/dist/server/parse.js.map +1 -1
- package/dist/server/parse.test.js +1 -0
- package/dist/server/parse.test.js.map +1 -1
- package/dist/server/runtime-config.d.ts +11 -0
- package/dist/server/runtime-config.d.ts.map +1 -0
- package/dist/server/runtime-config.js +380 -0
- package/dist/server/runtime-config.js.map +1 -0
- package/dist/server/runtime-config.test.d.ts +2 -0
- package/dist/server/runtime-config.test.d.ts.map +1 -0
- package/dist/server/runtime-config.test.js +367 -0
- package/dist/server/runtime-config.test.js.map +1 -0
- package/dist/server/test.d.ts.map +1 -1
- package/dist/server/test.js +34 -1
- package/dist/server/test.js.map +1 -1
- package/dist/server/test.remote.test.js +74 -11
- package/dist/server/test.remote.test.js.map +1 -1
- package/dist/ui/build-config.d.ts.map +1 -1
- package/dist/ui/build-config.js +3 -2
- package/dist/ui/build-config.js.map +1 -1
- package/dist/ui/build-config.test.js +4 -0
- package/dist/ui/build-config.test.js.map +1 -1
- package/package.json +3 -3
- package/skills/paperclip/SKILL.md +3 -1
- package/skills/paperclip/references/api-reference.md +31 -0
- package/skills/paperclip/references/artifacts.md +56 -2
- package/skills/paperclip/references/company-skills.md +2 -1
- package/skills/paperclip-board/SKILL.md +620 -0
- package/skills/paperclip-converting-plans-to-tasks/SKILL.md +10 -1
- package/skills/paperclip-dev/SKILL.md +0 -267
package/dist/index.d.ts
CHANGED
|
@@ -2,9 +2,9 @@ import type { AdapterModelProfileDefinition } from "@penclipai/adapter-utils";
|
|
|
2
2
|
export declare const type = "codex_local";
|
|
3
3
|
export declare const label = "Codex (local)";
|
|
4
4
|
export declare const SANDBOX_INSTALL_COMMAND = "npm install -g @openai/codex";
|
|
5
|
-
export declare const DEFAULT_CODEX_LOCAL_MODEL = "gpt-5.
|
|
5
|
+
export declare const DEFAULT_CODEX_LOCAL_MODEL = "gpt-5.5";
|
|
6
6
|
export declare const DEFAULT_CODEX_LOCAL_BYPASS_APPROVALS_AND_SANDBOX = true;
|
|
7
|
-
export declare const CODEX_LOCAL_FAST_MODE_SUPPORTED_MODELS: readonly ["gpt-5.4"];
|
|
7
|
+
export declare const CODEX_LOCAL_FAST_MODE_SUPPORTED_MODELS: readonly ["gpt-5.5", "gpt-5.4"];
|
|
8
8
|
export declare function isCodexLocalKnownModel(model: string | null | undefined): boolean;
|
|
9
9
|
export declare function isCodexLocalManualModel(model: string | null | undefined): boolean;
|
|
10
10
|
export declare function isCodexLocalFastModeSupported(model: string | null | undefined): boolean;
|
|
@@ -13,5 +13,5 @@ export declare const models: {
|
|
|
13
13
|
label: string;
|
|
14
14
|
}[];
|
|
15
15
|
export declare const modelProfiles: AdapterModelProfileDefinition[];
|
|
16
|
-
export declare const agentConfigurationDoc = "# codex_local agent configuration\n\nAdapter: codex_local\n\nCore fields:\n- cwd (string, optional): default absolute working directory fallback for the agent process (created if missing when possible)\n- instructionsFilePath (string, optional): absolute path to a markdown instructions file prepended to stdin prompt at runtime\n- model (string, optional): Codex model id\n- modelReasoningEffort (string, optional): reasoning effort override (minimal|low|medium|high|xhigh) passed via -c model_reasoning_effort=...\n- promptTemplate (string, optional): run prompt template\n- search (boolean, optional): run codex with --search\n- fastMode (boolean, optional): enable Codex Fast mode; supported on GPT-5.4 and passed through for manual model IDs\n- dangerouslyBypassApprovalsAndSandbox (boolean, optional): run with bypass flag\n- command (string, optional): defaults to \"codex\"\n- extraArgs (string[], optional): additional CLI args\n- env (object, optional): KEY=VALUE environment variables\n- workspaceStrategy (object, optional): execution workspace strategy; currently supports { type: \"git_worktree\", baseRef?, branchTemplate?, worktreeParentDir? }\n- workspaceRuntime (object, optional): reserved for workspace runtime metadata; workspace runtime services are manually controlled from the workspace UI and are not auto-started by heartbeats\n\nOperational fields:\n- timeoutSec (number, optional): run timeout in seconds\n- graceSec (number, optional): SIGTERM grace period in seconds\n\nNotes:\n- Prompts are piped via stdin (Codex receives \"-\" prompt argument).\n- If instructionsFilePath is configured, Paperclip prepends that file's contents to the stdin prompt on every run.\n- Codex exec automatically applies repo-scoped AGENTS.md instructions from the active workspace. Paperclip cannot suppress that discovery in exec mode, so repo AGENTS.md files may still apply even when you only configured an explicit instructionsFilePath.\n- Paperclip injects desired local skills into the effective CODEX_HOME/skills/ directory at execution time so Codex can discover \"$paperclip\" and related skills without polluting the project working directory.
|
|
16
|
+
export declare const agentConfigurationDoc = "# codex_local agent configuration\n\nAdapter: codex_local\n\nCore fields:\n- cwd (string, optional): default absolute working directory fallback for the agent process (created if missing when possible)\n- instructionsFilePath (string, optional): absolute path to a markdown instructions file prepended to stdin prompt at runtime\n- model (string, optional): Codex model id\n- modelReasoningEffort (string, optional): reasoning effort override (minimal|low|medium|high|xhigh) passed via -c model_reasoning_effort=...\n- promptTemplate (string, optional): run prompt template\n- search (boolean, optional): run codex with --search\n- fastMode (boolean, optional): enable Codex Fast mode; supported on GPT-5.5, GPT-5.4 and passed through for manual model IDs\n- dangerouslyBypassApprovalsAndSandbox (boolean, optional): run with bypass flag\n- command (string, optional): defaults to \"codex\"\n- extraArgs (string[], optional): additional CLI args\n- env (object, optional): KEY=VALUE environment variables\n- workspaceStrategy (object, optional): execution workspace strategy; currently supports { type: \"git_worktree\", baseRef?, branchTemplate?, worktreeParentDir? }\n- workspaceRuntime (object, optional): reserved for workspace runtime metadata; workspace runtime services are manually controlled from the workspace UI and are not auto-started by heartbeats\n\nOperational fields:\n- timeoutSec (number, optional): run timeout in seconds\n- graceSec (number, optional): SIGTERM grace period in seconds\n- outputInactivityTimeoutMs (number | null, optional): inactivity monitor around the codex child. Resets on every parsed JSONL event from stdout. Defaults to 7 * 60_000 ms when unset or non-positive. Set to `null` to disable the monitor entirely (only do this for known-slow tasks; the platform-level 1h silent-run safety net still applies). On fire, the adapter sends SIGTERM to the process group, waits 5s, then SIGKILL, and surfaces the run as failed with errorMessage \"monitor: no codex output for {N}m {S}s\".\n\nNotes:\n- Prompts are piped via stdin (Codex receives \"-\" prompt argument).\n- If instructionsFilePath is configured, Paperclip prepends that file's contents to the stdin prompt on every run.\n- Codex exec automatically applies repo-scoped AGENTS.md instructions from the active workspace. Paperclip cannot suppress that discovery in exec mode, so repo AGENTS.md files may still apply even when you only configured an explicit instructionsFilePath.\n- Paperclip injects desired local skills into the effective CODEX_HOME/skills/ directory at execution time so Codex can discover \"$paperclip\" and related skills without polluting the project working directory. For new and updated agents, Paperclip assigns an isolated managed home at ~/.paperclip/instances/<id>/companies/<companyId>/agents/<agentId>/codex-home/skills/; when CODEX_HOME is explicitly overridden in adapter config, that override is used instead.\n- New and updated codex_local agents persist an empty OPENAI_API_KEY override by default so a host-level OPENAI_API_KEY cannot leak into Codex runs through process inheritance. Explicit CODEX_HOME overrides must not point at the shared company codex-home, $CODEX_HOME, or ~/.codex.\n- Some model/tool combinations reject certain effort levels (for example minimal with web search enabled).\n- Fast mode is supported on GPT-5.5, GPT-5.4 and manual model IDs. When enabled for those models, Paperclip applies `service_tier=\"fast\"` and `features.fast_mode=true`.\n- When Paperclip realizes a workspace/runtime for a run, it injects PAPERCLIP_WORKSPACE_* and PAPERCLIP_RUNTIME_* env vars for agent-side tooling.\n";
|
|
17
17
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,0BAA0B,CAAC;AAE9E,eAAO,MAAM,IAAI,gBAAgB,CAAC;AAClC,eAAO,MAAM,KAAK,kBAAkB,CAAC;AAErC,eAAO,MAAM,uBAAuB,iCAAiC,CAAC;AAEtE,eAAO,MAAM,yBAAyB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,0BAA0B,CAAC;AAE9E,eAAO,MAAM,IAAI,gBAAgB,CAAC;AAClC,eAAO,MAAM,KAAK,kBAAkB,CAAC;AAErC,eAAO,MAAM,uBAAuB,iCAAiC,CAAC;AAEtE,eAAO,MAAM,yBAAyB,YAAY,CAAC;AACnD,eAAO,MAAM,gDAAgD,OAAO,CAAC;AACrE,eAAO,MAAM,sCAAsC,iCAAkC,CAAC;AAMtF,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAIhF;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAGjF;AAED,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAWvF;AAED,eAAO,MAAM,MAAM;;;GAWlB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,6BAA6B,EAYxD,CAAC;AAEF,eAAO,MAAM,qBAAqB,2kHAiCjC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export const type = "codex_local";
|
|
2
2
|
export const label = "Codex (local)";
|
|
3
3
|
export const SANDBOX_INSTALL_COMMAND = "npm install -g @openai/codex";
|
|
4
|
-
export const DEFAULT_CODEX_LOCAL_MODEL = "gpt-5.
|
|
4
|
+
export const DEFAULT_CODEX_LOCAL_MODEL = "gpt-5.5";
|
|
5
5
|
export const DEFAULT_CODEX_LOCAL_BYPASS_APPROVALS_AND_SANDBOX = true;
|
|
6
|
-
export const CODEX_LOCAL_FAST_MODE_SUPPORTED_MODELS = ["gpt-5.4"];
|
|
6
|
+
export const CODEX_LOCAL_FAST_MODE_SUPPORTED_MODELS = ["gpt-5.5", "gpt-5.4"];
|
|
7
7
|
function normalizeModelId(model) {
|
|
8
8
|
return typeof model === "string" ? model.trim() : "";
|
|
9
9
|
}
|
|
@@ -21,11 +21,17 @@ export function isCodexLocalFastModeSupported(model) {
|
|
|
21
21
|
if (isCodexLocalManualModel(model))
|
|
22
22
|
return true;
|
|
23
23
|
const normalizedModel = typeof model === "string" ? model.trim() : "";
|
|
24
|
+
// Empty means we're omitting --model so the Codex CLI picks its own default.
|
|
25
|
+
// On subscription auth that's gpt-5.5 (fast-mode capable); manual model IDs
|
|
26
|
+
// are also treated as supported. Match that policy: pass the fast-mode
|
|
27
|
+
// overrides through and let the CLI reject them if the chosen model can't use them.
|
|
28
|
+
if (!normalizedModel)
|
|
29
|
+
return true;
|
|
24
30
|
return CODEX_LOCAL_FAST_MODE_SUPPORTED_MODELS.includes(normalizedModel);
|
|
25
31
|
}
|
|
26
32
|
export const models = [
|
|
27
|
-
{ id: "gpt-5.4", label: "gpt-5.4" },
|
|
28
33
|
{ id: DEFAULT_CODEX_LOCAL_MODEL, label: DEFAULT_CODEX_LOCAL_MODEL },
|
|
34
|
+
{ id: "gpt-5.4", label: "gpt-5.4" },
|
|
29
35
|
{ id: "gpt-5.3-codex-spark", label: "gpt-5.3-codex-spark" },
|
|
30
36
|
{ id: "gpt-5", label: "gpt-5" },
|
|
31
37
|
{ id: "o3", label: "o3" },
|
|
@@ -59,7 +65,7 @@ Core fields:
|
|
|
59
65
|
- modelReasoningEffort (string, optional): reasoning effort override (minimal|low|medium|high|xhigh) passed via -c model_reasoning_effort=...
|
|
60
66
|
- promptTemplate (string, optional): run prompt template
|
|
61
67
|
- search (boolean, optional): run codex with --search
|
|
62
|
-
- fastMode (boolean, optional): enable Codex Fast mode; supported on GPT-5.4 and passed through for manual model IDs
|
|
68
|
+
- fastMode (boolean, optional): enable Codex Fast mode; supported on GPT-5.5, GPT-5.4 and passed through for manual model IDs
|
|
63
69
|
- dangerouslyBypassApprovalsAndSandbox (boolean, optional): run with bypass flag
|
|
64
70
|
- command (string, optional): defaults to "codex"
|
|
65
71
|
- extraArgs (string[], optional): additional CLI args
|
|
@@ -70,15 +76,16 @@ Core fields:
|
|
|
70
76
|
Operational fields:
|
|
71
77
|
- timeoutSec (number, optional): run timeout in seconds
|
|
72
78
|
- graceSec (number, optional): SIGTERM grace period in seconds
|
|
79
|
+
- outputInactivityTimeoutMs (number | null, optional): inactivity monitor around the codex child. Resets on every parsed JSONL event from stdout. Defaults to 7 * 60_000 ms when unset or non-positive. Set to \`null\` to disable the monitor entirely (only do this for known-slow tasks; the platform-level 1h silent-run safety net still applies). On fire, the adapter sends SIGTERM to the process group, waits 5s, then SIGKILL, and surfaces the run as failed with errorMessage "monitor: no codex output for {N}m {S}s".
|
|
73
80
|
|
|
74
81
|
Notes:
|
|
75
82
|
- Prompts are piped via stdin (Codex receives "-" prompt argument).
|
|
76
83
|
- If instructionsFilePath is configured, Paperclip prepends that file's contents to the stdin prompt on every run.
|
|
77
84
|
- Codex exec automatically applies repo-scoped AGENTS.md instructions from the active workspace. Paperclip cannot suppress that discovery in exec mode, so repo AGENTS.md files may still apply even when you only configured an explicit instructionsFilePath.
|
|
78
|
-
- Paperclip injects desired local skills into the effective CODEX_HOME/skills/ directory at execution time so Codex can discover "$paperclip" and related skills without polluting the project working directory.
|
|
79
|
-
-
|
|
85
|
+
- Paperclip injects desired local skills into the effective CODEX_HOME/skills/ directory at execution time so Codex can discover "$paperclip" and related skills without polluting the project working directory. For new and updated agents, Paperclip assigns an isolated managed home at ~/.paperclip/instances/<id>/companies/<companyId>/agents/<agentId>/codex-home/skills/; when CODEX_HOME is explicitly overridden in adapter config, that override is used instead.
|
|
86
|
+
- New and updated codex_local agents persist an empty OPENAI_API_KEY override by default so a host-level OPENAI_API_KEY cannot leak into Codex runs through process inheritance. Explicit CODEX_HOME overrides must not point at the shared company codex-home, $CODEX_HOME, or ~/.codex.
|
|
80
87
|
- Some model/tool combinations reject certain effort levels (for example minimal with web search enabled).
|
|
81
|
-
- Fast mode is supported on GPT-5.4 and manual model IDs. When enabled for those models, Paperclip applies \`service_tier="fast"\` and \`features.fast_mode=true\`.
|
|
88
|
+
- Fast mode is supported on GPT-5.5, GPT-5.4 and manual model IDs. When enabled for those models, Paperclip applies \`service_tier="fast"\` and \`features.fast_mode=true\`.
|
|
82
89
|
- When Paperclip realizes a workspace/runtime for a run, it injects PAPERCLIP_WORKSPACE_* and PAPERCLIP_RUNTIME_* env vars for agent-side tooling.
|
|
83
90
|
`;
|
|
84
91
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,IAAI,GAAG,aAAa,CAAC;AAClC,MAAM,CAAC,MAAM,KAAK,GAAG,eAAe,CAAC;AAErC,MAAM,CAAC,MAAM,uBAAuB,GAAG,8BAA8B,CAAC;AAEtE,MAAM,CAAC,MAAM,yBAAyB,GAAG,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,IAAI,GAAG,aAAa,CAAC;AAClC,MAAM,CAAC,MAAM,KAAK,GAAG,eAAe,CAAC;AAErC,MAAM,CAAC,MAAM,uBAAuB,GAAG,8BAA8B,CAAC;AAEtE,MAAM,CAAC,MAAM,yBAAyB,GAAG,SAAS,CAAC;AACnD,MAAM,CAAC,MAAM,gDAAgD,GAAG,IAAI,CAAC;AACrE,MAAM,CAAC,MAAM,sCAAsC,GAAG,CAAC,SAAS,EAAE,SAAS,CAAU,CAAC;AAEtF,SAAS,gBAAgB,CAAC,KAAgC;IACxD,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AACvD,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,KAAgC;IACrE,MAAM,eAAe,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAChD,IAAI,CAAC,eAAe;QAAE,OAAO,KAAK,CAAC;IACnC,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,KAA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,EAAE,mBAAmB,EAAE,KAAK,EAAE,YAAY,EAAE;CACjD,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAoC;IAC5D;QACE,GAAG,EAAE,OAAO;QACZ,KAAK,EAAE,OAAO;QACd,WAAW,EAAE,sFAAsF;QACnG,aAAa,EAAE;YACb,KAAK,EAAE,qBAAqB;YAC5B,6GAA6G;YAC7G,oBAAoB,EAAE,MAAM;SAC7B;QACD,MAAM,EAAE,iBAAiB;KAC1B;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiCpC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../src/index.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import { DEFAULT_CODEX_LOCAL_MODEL, models } from "./index.js";
|
|
3
|
+
describe("codex local adapter metadata", () => {
|
|
4
|
+
it("does not advertise the ChatGPT-unsupported gpt-5.3-codex model as a default option", () => {
|
|
5
|
+
expect(DEFAULT_CODEX_LOCAL_MODEL).toBe("gpt-5.5");
|
|
6
|
+
expect(models.map((model) => model.id)).not.toContain("gpt-5.3-codex");
|
|
7
|
+
});
|
|
8
|
+
});
|
|
9
|
+
//# sourceMappingURL=index.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.test.js","sourceRoot":"","sources":["../src/index.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,yBAAyB,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAE/D,QAAQ,CAAC,8BAA8B,EAAE,GAAG,EAAE;IAC5C,EAAE,CAAC,oFAAoF,EAAE,GAAG,EAAE;QAC5F,MAAM,CAAC,yBAAyB,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAClD,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;IACzE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -23,7 +23,7 @@ describe("buildCodexExecArgs", () => {
|
|
|
23
23
|
"-",
|
|
24
24
|
]);
|
|
25
25
|
});
|
|
26
|
-
it("enables Codex fast mode overrides for
|
|
26
|
+
it("enables Codex fast mode overrides for GPT-5.5", () => {
|
|
27
27
|
const result = buildCodexExecArgs({
|
|
28
28
|
model: "gpt-5.5",
|
|
29
29
|
fastMode: true,
|
|
@@ -43,32 +43,69 @@ describe("buildCodexExecArgs", () => {
|
|
|
43
43
|
"-",
|
|
44
44
|
]);
|
|
45
45
|
});
|
|
46
|
+
it("enables Codex fast mode overrides for manual models", () => {
|
|
47
|
+
const result = buildCodexExecArgs({
|
|
48
|
+
model: "future-codex-model",
|
|
49
|
+
fastMode: true,
|
|
50
|
+
});
|
|
51
|
+
expect(result.fastModeRequested).toBe(true);
|
|
52
|
+
expect(result.fastModeApplied).toBe(true);
|
|
53
|
+
expect(result.fastModeIgnoredReason).toBeNull();
|
|
54
|
+
expect(result.args).toEqual([
|
|
55
|
+
"exec",
|
|
56
|
+
"--json",
|
|
57
|
+
"--model",
|
|
58
|
+
"future-codex-model",
|
|
59
|
+
"-c",
|
|
60
|
+
'service_tier="fast"',
|
|
61
|
+
"-c",
|
|
62
|
+
"features.fast_mode=true",
|
|
63
|
+
"-",
|
|
64
|
+
]);
|
|
65
|
+
});
|
|
66
|
+
it("enables Codex fast mode overrides when model is omitted (CLI default)", () => {
|
|
67
|
+
const result = buildCodexExecArgs({
|
|
68
|
+
fastMode: true,
|
|
69
|
+
});
|
|
70
|
+
expect(result.fastModeRequested).toBe(true);
|
|
71
|
+
expect(result.fastModeApplied).toBe(true);
|
|
72
|
+
expect(result.fastModeIgnoredReason).toBeNull();
|
|
73
|
+
expect(result.args).toEqual([
|
|
74
|
+
"exec",
|
|
75
|
+
"--json",
|
|
76
|
+
"-c",
|
|
77
|
+
'service_tier="fast"',
|
|
78
|
+
"-c",
|
|
79
|
+
"features.fast_mode=true",
|
|
80
|
+
"-",
|
|
81
|
+
]);
|
|
82
|
+
});
|
|
46
83
|
it("ignores fast mode for unsupported models", () => {
|
|
47
84
|
const result = buildCodexExecArgs({
|
|
48
|
-
model: "gpt-5.3-codex",
|
|
85
|
+
model: "gpt-5.3-codex-spark",
|
|
49
86
|
fastMode: true,
|
|
50
87
|
});
|
|
51
88
|
expect(result.fastModeRequested).toBe(true);
|
|
52
89
|
expect(result.fastModeApplied).toBe(false);
|
|
53
|
-
expect(result.fastModeIgnoredReason).toContain("currently only supported on gpt-5.4 or manually configured model IDs");
|
|
90
|
+
expect(result.fastModeIgnoredReason).toContain("currently only supported on gpt-5.5, gpt-5.4 or manually configured model IDs");
|
|
54
91
|
expect(result.args).toEqual([
|
|
55
92
|
"exec",
|
|
56
93
|
"--json",
|
|
57
94
|
"--model",
|
|
58
|
-
"gpt-5.3-codex",
|
|
95
|
+
"gpt-5.3-codex-spark",
|
|
59
96
|
"-",
|
|
60
97
|
]);
|
|
61
98
|
});
|
|
62
99
|
it("adds --skip-git-repo-check when requested", () => {
|
|
63
100
|
const result = buildCodexExecArgs({
|
|
64
|
-
model: "gpt-5.
|
|
101
|
+
model: "gpt-5.5",
|
|
65
102
|
}, { skipGitRepoCheck: true });
|
|
66
103
|
expect(result.args).toEqual([
|
|
67
104
|
"exec",
|
|
68
105
|
"--json",
|
|
69
106
|
"--skip-git-repo-check",
|
|
70
107
|
"--model",
|
|
71
|
-
"gpt-5.
|
|
108
|
+
"gpt-5.5",
|
|
72
109
|
"-",
|
|
73
110
|
]);
|
|
74
111
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codex-args.test.js","sourceRoot":"","sources":["../../src/server/codex-args.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAClC,EAAE,CAAC,+CAA+C,EAAE,GAAG,EAAE;QACvD,MAAM,MAAM,GAAG,kBAAkB,CAAC;YAChC,KAAK,EAAE,SAAS;YAChB,MAAM,EAAE,IAAI;YACZ,QAAQ,EAAE,IAAI;SACf,CAAC,CAAC;QAEH,MAAM,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5C,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1C,MAAM,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC,QAAQ,EAAE,CAAC;QAChD,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC;YAC1B,UAAU;YACV,MAAM;YACN,QAAQ;YACR,SAAS;YACT,SAAS;YACT,IAAI;YACJ,qBAAqB;YACrB,IAAI;YACJ,yBAAyB;YACzB,GAAG;SACJ,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"codex-args.test.js","sourceRoot":"","sources":["../../src/server/codex-args.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAClC,EAAE,CAAC,+CAA+C,EAAE,GAAG,EAAE;QACvD,MAAM,MAAM,GAAG,kBAAkB,C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,CAAC,iBAAiB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5C,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC3C,MAAM,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC,SAAS,CAC5C,+EAA+E,CAChF,CAAC;QACF,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC;YAC1B,MAAM;YACN,QAAQ;YACR,SAAS;YACT,qBAAqB;YACrB,GAAG;SACJ,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,2CAA2C,EAAE,GAAG,EAAE;QACnD,MAAM,MAAM,GAAG,kBAAkB,CAC/B;YACE,KAAK,EAAE,SAAS;SACjB,EACD,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAC3B,CAAC;QAEF,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC;YAC1B,MAAM;YACN,QAAQ;YACR,uBAAuB;YACvB,SAAS;YACT,SAAS;YACT,GAAG;SACJ,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -2,6 +2,21 @@ import type { AdapterExecutionContext } from "@penclipai/adapter-utils";
|
|
|
2
2
|
export declare function pathExists(candidate: string): Promise<boolean>;
|
|
3
3
|
export declare function resolveSharedCodexHomeDir(env?: NodeJS.ProcessEnv): string;
|
|
4
4
|
export declare function resolveManagedCodexHomeDir(env: NodeJS.ProcessEnv, companyId?: string): string;
|
|
5
|
+
/**
|
|
6
|
+
* True when `homePath` lives under the Paperclip-managed company tree
|
|
7
|
+
* (`<instanceRoot>/companies/<companyId>/...`). This covers both the shared
|
|
8
|
+
* company `codex-home` and the per-agent `agents/<agentId>/codex-home` set by
|
|
9
|
+
* the server-side isolation guard. A path outside that tree is a genuine
|
|
10
|
+
* external/user-supplied override that Paperclip must not seed or overwrite.
|
|
11
|
+
*/
|
|
12
|
+
export declare function isManagedCodexHomePath(env: NodeJS.ProcessEnv, companyId: string | undefined, homePath: string): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* True when the Codex home has a usable `auth.json`. Uses `fs.access` (follows
|
|
15
|
+
* symlinks), so a dangling auth symlink whose source has been removed counts as
|
|
16
|
+
* no usable credentials.
|
|
17
|
+
*/
|
|
18
|
+
export declare function codexHomeHasUsableAuth(home: string): Promise<boolean>;
|
|
19
|
+
export declare function ensureSymlink(target: string, source: string): Promise<void>;
|
|
5
20
|
/**
|
|
6
21
|
* Writes an `auth.json` containing only `OPENAI_API_KEY` so the codex CLI can
|
|
7
22
|
* authenticate via API key. Overwrites any existing file or symlink at that
|
|
@@ -9,7 +24,49 @@ export declare function resolveManagedCodexHomeDir(env: NodeJS.ProcessEnv, compa
|
|
|
9
24
|
* environment variable and only reads credentials from `$CODEX_HOME/auth.json`.
|
|
10
25
|
*/
|
|
11
26
|
export declare function writeApiKeyAuthJson(home: string, apiKey: string): Promise<void>;
|
|
27
|
+
/**
|
|
28
|
+
* Seeds auth/config into an explicit Paperclip-managed `targetHome`. Symlinks
|
|
29
|
+
* `auth.json` from the shared source home (so ChatGPT-subscription credentials
|
|
30
|
+
* stay live and single-use refresh tokens are not copied), copies the static
|
|
31
|
+
* shared config files, and — when an API key is supplied — writes an API-key
|
|
32
|
+
* `auth.json` instead. Used both for the default company home and for the
|
|
33
|
+
* per-agent home set by the server isolation guard.
|
|
34
|
+
*/
|
|
35
|
+
export declare function seedManagedCodexHome(targetHome: string, env: NodeJS.ProcessEnv, onLog: AdapterExecutionContext["onLog"], options?: {
|
|
36
|
+
apiKey?: string | null;
|
|
37
|
+
}): Promise<void>;
|
|
12
38
|
export declare function prepareManagedCodexHome(env: NodeJS.ProcessEnv, onLog: AdapterExecutionContext["onLog"], companyId?: string, options?: {
|
|
13
39
|
apiKey?: string | null;
|
|
14
40
|
}): Promise<string>;
|
|
41
|
+
export type ReconcileManagedCodexHomeStatus = "no_managed_home" | "external_override" | "already_seeded" | "source_auth_missing" | "seeded";
|
|
42
|
+
export interface ReconcileManagedCodexHomeInput {
|
|
43
|
+
companyId: string | undefined;
|
|
44
|
+
configuredCodexHome: string | null | undefined;
|
|
45
|
+
apiKey?: string | null;
|
|
46
|
+
/**
|
|
47
|
+
* Set when the agent's persisted `OPENAI_API_KEY` is a secret binding that
|
|
48
|
+
* could not be resolved in this context (e.g. startup reconciliation, which
|
|
49
|
+
* never resolves secrets). When true and the home already has usable auth,
|
|
50
|
+
* reconciliation preserves that auth instead of downgrading it to the shared
|
|
51
|
+
* subscription symlink.
|
|
52
|
+
*/
|
|
53
|
+
apiKeySecretBound?: boolean;
|
|
54
|
+
env?: NodeJS.ProcessEnv;
|
|
55
|
+
onLog?: AdapterExecutionContext["onLog"];
|
|
56
|
+
}
|
|
57
|
+
export interface ReconcileManagedCodexHomeResult {
|
|
58
|
+
status: ReconcileManagedCodexHomeStatus;
|
|
59
|
+
home: string | null;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Idempotently reconciles a persisted `codex_local` agent home. Phase 1 seeds
|
|
63
|
+
* managed homes at execute time; this is the backfill for agents that already
|
|
64
|
+
* carry a persisted (but unseeded) per-agent `CODEX_HOME` and have not run
|
|
65
|
+
* since the seeding fix landed. Shares the managed-home detection
|
|
66
|
+
* (`isManagedCodexHomePath`) and seeding (`seedManagedCodexHome`) logic so a
|
|
67
|
+
* genuine external/user override is never touched. Safe to re-run: when a valid
|
|
68
|
+
* `auth.json` is already present (and no API-key rewrite is requested) it is a
|
|
69
|
+
* no-op and reports `already_seeded`.
|
|
70
|
+
*/
|
|
71
|
+
export declare function reconcileManagedCodexHome(input: ReconcileManagedCodexHomeInput): Promise<ReconcileManagedCodexHomeResult>;
|
|
15
72
|
//# sourceMappingURL=codex-home.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codex-home.d.ts","sourceRoot":"","sources":["../../src/server/codex-home.ts"],"names":[],"mapp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,CAC3C,GAAG,EAAE,MAAM,CAAC,UAAU,EACtB,KAAK,EAAE,uBAAuB,CAAC,OAAO,CAAC,EACvC,SAAS,CAAC,EAAE,MAAM,EAClB,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAO,GACvC,OAAO,CAAC,MAAM,CAAC,CAIjB;AAED,MAAM,MAAM,+BAA+B,GACvC,iBAAiB,GACjB,mBAAmB,GACnB,gBAAgB,GAChB,qBAAqB,GACrB,QAAQ,CAAC;AAEb,MAAM,WAAW,8BAA8B;IAC7C,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,mBAAmB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC/C,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,KAAK,CAAC,EAAE,uBAAuB,CAAC,OAAO,CAAC,CAAC;CAC1C;AAED,MAAM,WAAW,+BAA+B;IAC9C,MAAM,EAAE,+BAA+B,CAAC;IACxC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAID;;;;;;;;;GASG;AACH,wBAAsB,yBAAyB,CAC7C,KAAK,EAAE,8BAA8B,GACpC,OAAO,CAAC,+BAA+B,CAAC,CAuC1C"}
|
|
@@ -5,12 +5,34 @@ import { resolvePaperclipInstanceRootForAdapter } from "@penclipai/adapter-utils
|
|
|
5
5
|
const TRUTHY_ENV_RE = /^(1|true|yes|on)$/i;
|
|
6
6
|
const COPIED_SHARED_FILES = ["config.json", "config.toml", "instructions.md"];
|
|
7
7
|
const SYMLINKED_SHARED_FILES = ["auth.json"];
|
|
8
|
+
const AUTH_CREDENTIAL_KEYS = /(?:openai[_-]?key|api[_-]?key|access[_-]?token|refresh[_-]?token|token|secret|session|auth)/i;
|
|
8
9
|
function nonEmpty(value) {
|
|
9
10
|
return typeof value === "string" && value.trim().length > 0 ? value.trim() : null;
|
|
10
11
|
}
|
|
11
12
|
export async function pathExists(candidate) {
|
|
12
13
|
return fs.access(candidate).then(() => true).catch(() => false);
|
|
13
14
|
}
|
|
15
|
+
function hasUsableAuthPayload(authPayload) {
|
|
16
|
+
if (authPayload === null || typeof authPayload !== "object" || Array.isArray(authPayload)) {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
for (const [key, value] of Object.entries(authPayload)) {
|
|
20
|
+
if (!AUTH_CREDENTIAL_KEYS.test(key))
|
|
21
|
+
continue;
|
|
22
|
+
if (key.toLowerCase() === "token_type")
|
|
23
|
+
continue;
|
|
24
|
+
if (typeof value === "string" && value.trim().length > 0)
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
function readApiKeyFromAuthPayload(authPayload) {
|
|
30
|
+
if (authPayload === null || typeof authPayload !== "object" || Array.isArray(authPayload)) {
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
const raw = authPayload.OPENAI_API_KEY;
|
|
34
|
+
return typeof raw === "string" && raw.trim().length > 0 ? raw.trim() : null;
|
|
35
|
+
}
|
|
14
36
|
export function resolveSharedCodexHomeDir(env = process.env) {
|
|
15
37
|
const fromEnv = nonEmpty(env.CODEX_HOME);
|
|
16
38
|
return fromEnv ? path.resolve(fromEnv) : path.join(os.homedir(), ".codex");
|
|
@@ -28,6 +50,57 @@ export function resolveManagedCodexHomeDir(env, companyId) {
|
|
|
28
50
|
? path.resolve(instanceRoot, "companies", companyId, "codex-home")
|
|
29
51
|
: path.resolve(instanceRoot, "codex-home");
|
|
30
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* True when `homePath` lives under the Paperclip-managed company tree
|
|
55
|
+
* (`<instanceRoot>/companies/<companyId>/...`). This covers both the shared
|
|
56
|
+
* company `codex-home` and the per-agent `agents/<agentId>/codex-home` set by
|
|
57
|
+
* the server-side isolation guard. A path outside that tree is a genuine
|
|
58
|
+
* external/user-supplied override that Paperclip must not seed or overwrite.
|
|
59
|
+
*/
|
|
60
|
+
export function isManagedCodexHomePath(env, companyId, homePath) {
|
|
61
|
+
if (!companyId)
|
|
62
|
+
return false;
|
|
63
|
+
const instanceRoot = resolvePaperclipInstanceRootForAdapter({
|
|
64
|
+
homeDir: nonEmpty(env.PAPERCLIP_HOME) ?? undefined,
|
|
65
|
+
instanceId: nonEmpty(env.PAPERCLIP_INSTANCE_ID) ?? undefined,
|
|
66
|
+
env,
|
|
67
|
+
});
|
|
68
|
+
const companyRoot = path.resolve(instanceRoot, "companies", companyId);
|
|
69
|
+
const resolved = path.resolve(homePath);
|
|
70
|
+
return resolved === companyRoot || resolved.startsWith(companyRoot + path.sep);
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* True when the Codex home has a usable `auth.json`. Uses `fs.access` (follows
|
|
74
|
+
* symlinks), so a dangling auth symlink whose source has been removed counts as
|
|
75
|
+
* no usable credentials.
|
|
76
|
+
*/
|
|
77
|
+
export async function codexHomeHasUsableAuth(home) {
|
|
78
|
+
const authPath = path.join(home, "auth.json");
|
|
79
|
+
if (!(await pathExists(authPath)))
|
|
80
|
+
return false;
|
|
81
|
+
try {
|
|
82
|
+
const raw = await fs.readFile(authPath, "utf8");
|
|
83
|
+
const parsed = JSON.parse(raw);
|
|
84
|
+
return hasUsableAuthPayload(parsed);
|
|
85
|
+
}
|
|
86
|
+
catch {
|
|
87
|
+
return false;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
async function codexHomeHasMatchingApiKeyAuth(home, apiKey) {
|
|
91
|
+
const authPath = path.join(home, "auth.json");
|
|
92
|
+
const existing = await fs.lstat(authPath).catch(() => null);
|
|
93
|
+
if (!existing || existing.isSymbolicLink())
|
|
94
|
+
return false;
|
|
95
|
+
try {
|
|
96
|
+
const raw = await fs.readFile(authPath, "utf8");
|
|
97
|
+
const parsed = JSON.parse(raw);
|
|
98
|
+
return readApiKeyFromAuthPayload(parsed) === apiKey.trim();
|
|
99
|
+
}
|
|
100
|
+
catch {
|
|
101
|
+
return false;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
31
104
|
async function ensureParentDir(target) {
|
|
32
105
|
await fs.mkdir(path.dirname(target), { recursive: true });
|
|
33
106
|
}
|
|
@@ -63,7 +136,7 @@ async function targetLinksToSource(target, source) {
|
|
|
63
136
|
return false;
|
|
64
137
|
return path.resolve(path.dirname(target), linkedPath) === path.resolve(source);
|
|
65
138
|
}
|
|
66
|
-
async function ensureSymlink(target, source) {
|
|
139
|
+
export async function ensureSymlink(target, source) {
|
|
67
140
|
const existing = await fs.lstat(target).catch(() => null);
|
|
68
141
|
if (!existing) {
|
|
69
142
|
await ensureParentDir(target);
|
|
@@ -79,6 +152,20 @@ async function ensureSymlink(target, source) {
|
|
|
79
152
|
return;
|
|
80
153
|
}
|
|
81
154
|
if (!existing.isSymbolicLink()) {
|
|
155
|
+
// A previous Paperclip version copied this file into the managed home
|
|
156
|
+
// instead of symlinking it. Codex refresh tokens rotate and are
|
|
157
|
+
// single-use, so a stale copy fails with refresh_token_reused on the next
|
|
158
|
+
// run (#5028). Replace the regular file with a symlink so the CLI follows
|
|
159
|
+
// the live source. Safe to delete: target is always under the
|
|
160
|
+
// Paperclip-managed company home, never the user's real ~/.codex.
|
|
161
|
+
// Directories are left alone — `fs.unlink` would throw EISDIR on Unix
|
|
162
|
+
// (and behave inconsistently on Windows). A directory at this path is not
|
|
163
|
+
// a Paperclip-written stale copy and warrants operator inspection rather
|
|
164
|
+
// than silent removal.
|
|
165
|
+
if (existing.isDirectory())
|
|
166
|
+
return;
|
|
167
|
+
await fs.unlink(target);
|
|
168
|
+
await linkOrCopySharedAuthFile(source, target);
|
|
82
169
|
return;
|
|
83
170
|
}
|
|
84
171
|
const linkedPath = await fs.readlink(target).catch(() => null);
|
|
@@ -109,8 +196,15 @@ export async function writeApiKeyAuthJson(home, apiKey) {
|
|
|
109
196
|
await fs.rm(target, { force: true });
|
|
110
197
|
await fs.writeFile(target, JSON.stringify({ OPENAI_API_KEY: apiKey }), { mode: 0o600 });
|
|
111
198
|
}
|
|
112
|
-
|
|
113
|
-
|
|
199
|
+
/**
|
|
200
|
+
* Seeds auth/config into an explicit Paperclip-managed `targetHome`. Symlinks
|
|
201
|
+
* `auth.json` from the shared source home (so ChatGPT-subscription credentials
|
|
202
|
+
* stay live and single-use refresh tokens are not copied), copies the static
|
|
203
|
+
* shared config files, and — when an API key is supplied — writes an API-key
|
|
204
|
+
* `auth.json` instead. Used both for the default company home and for the
|
|
205
|
+
* per-agent home set by the server isolation guard.
|
|
206
|
+
*/
|
|
207
|
+
export async function seedManagedCodexHome(targetHome, env, onLog, options = {}) {
|
|
114
208
|
const apiKey = nonEmpty(options.apiKey ?? undefined);
|
|
115
209
|
const sourceHome = resolveSharedCodexHomeDir(env);
|
|
116
210
|
const seedFromShared = path.resolve(sourceHome) !== path.resolve(targetHome);
|
|
@@ -145,6 +239,54 @@ export async function prepareManagedCodexHome(env, onLog, companyId, options = {
|
|
|
145
239
|
await writeApiKeyAuthJson(targetHome, apiKey);
|
|
146
240
|
await onLog("stdout", `[paperclip] Wrote API-key auth.json into Codex home "${targetHome}" from configured OPENAI_API_KEY.\n`);
|
|
147
241
|
}
|
|
242
|
+
}
|
|
243
|
+
export async function prepareManagedCodexHome(env, onLog, companyId, options = {}) {
|
|
244
|
+
const targetHome = resolveManagedCodexHomeDir(env, companyId);
|
|
245
|
+
await seedManagedCodexHome(targetHome, env, onLog, options);
|
|
148
246
|
return targetHome;
|
|
149
247
|
}
|
|
248
|
+
const noopOnLog = async () => { };
|
|
249
|
+
/**
|
|
250
|
+
* Idempotently reconciles a persisted `codex_local` agent home. Phase 1 seeds
|
|
251
|
+
* managed homes at execute time; this is the backfill for agents that already
|
|
252
|
+
* carry a persisted (but unseeded) per-agent `CODEX_HOME` and have not run
|
|
253
|
+
* since the seeding fix landed. Shares the managed-home detection
|
|
254
|
+
* (`isManagedCodexHomePath`) and seeding (`seedManagedCodexHome`) logic so a
|
|
255
|
+
* genuine external/user override is never touched. Safe to re-run: when a valid
|
|
256
|
+
* `auth.json` is already present (and no API-key rewrite is requested) it is a
|
|
257
|
+
* no-op and reports `already_seeded`.
|
|
258
|
+
*/
|
|
259
|
+
export async function reconcileManagedCodexHome(input) {
|
|
260
|
+
const env = input.env ?? process.env;
|
|
261
|
+
const configured = nonEmpty(input.configuredCodexHome ?? undefined);
|
|
262
|
+
if (!configured)
|
|
263
|
+
return { status: "no_managed_home", home: null };
|
|
264
|
+
const resolved = path.resolve(configured);
|
|
265
|
+
if (!isManagedCodexHomePath(env, input.companyId, resolved)) {
|
|
266
|
+
return { status: "external_override", home: resolved };
|
|
267
|
+
}
|
|
268
|
+
const apiKey = nonEmpty(input.apiKey ?? undefined);
|
|
269
|
+
const hadUsableAuth = await codexHomeHasUsableAuth(resolved);
|
|
270
|
+
// A secret-bound OPENAI_API_KEY cannot be resolved here, so we cannot rewrite
|
|
271
|
+
// it into auth.json. If the home already has usable auth — typically an
|
|
272
|
+
// API-key auth.json written at execute time when the secret WAS resolved —
|
|
273
|
+
// preserve it. Re-seeding without the key would delete that file and restore
|
|
274
|
+
// the shared subscription symlink, silently changing the agent's credentials
|
|
275
|
+
// on every boot while the persisted config still says "use the secret key".
|
|
276
|
+
if (input.apiKeySecretBound && hadUsableAuth) {
|
|
277
|
+
return { status: "already_seeded", home: resolved };
|
|
278
|
+
}
|
|
279
|
+
if (apiKey && await codexHomeHasMatchingApiKeyAuth(resolved, apiKey)) {
|
|
280
|
+
return { status: "already_seeded", home: resolved };
|
|
281
|
+
}
|
|
282
|
+
await seedManagedCodexHome(resolved, env, input.onLog ?? noopOnLog, { apiKey });
|
|
283
|
+
if (!apiKey && !(await codexHomeHasUsableAuth(resolved))) {
|
|
284
|
+
return { status: "source_auth_missing", home: resolved };
|
|
285
|
+
}
|
|
286
|
+
// Without an API key, seeding only changes disk state when auth was missing.
|
|
287
|
+
// With an API key, the matching-file short-circuit above filters out the
|
|
288
|
+
// already-seeded case before this write path.
|
|
289
|
+
const status = !apiKey && hadUsableAuth ? "already_seeded" : "seeded";
|
|
290
|
+
return { status, home: resolved };
|
|
291
|
+
}
|
|
150
292
|
//# sourceMappingURL=codex-home.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codex-home.js","sourceRoot":"","sources":["../../src/server/codex-home.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,sCAAsC,EAAE,MAAM,uCAAuC,CAAC;AAE/F,MAAM,aAAa,GAAG,oBAAoB,CAAC;AAC3C,MAAM,mBAAmB,GAAG,CAAC,aAAa,EAAE,aAAa,EAAE,iBAAiB,CAAU,CAAC;AACvF,MAAM,sBAAsB,GAAG,CAAC,WAAW,CAAU,CAAC;AAEtD,SAAS,QAAQ,CAAC,KAAyB;IACzC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AACpF,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,SAAiB;IAChD,OAAO,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC;AAClE,CAAC;AAED,MAAM,UAAU,yBAAyB,CACvC,MAAyB,OAAO,CAAC,GAAG;IAEpC,MAAM,OAAO,GAAG,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IACzC,OAAO,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,C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