agentbox-app 0.1.12 → 0.1.16
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 +24 -9
- package/bin/agentbox.mjs +23 -1
- package/briefs/message-rules.md +36 -8
- package/briefs/worker.md +46 -23
- package/main/account-discovery.mjs +122 -30
- package/main/account-tooling.mjs +29 -1
- package/main/account-usage.mjs +46 -0
- package/main/acp.mjs +296 -0
- package/main/agent-homes.mjs +158 -0
- package/main/agent-sessions.mjs +311 -260
- package/main/agent-updates.mjs +9 -22
- package/main/agents.mjs +179 -466
- package/main/analytics.mjs +42 -2
- package/main/answer-modes.mjs +103 -37
- package/main/approval-prompt-core.mjs +197 -0
- package/main/approval-prompt-server.mjs +4 -138
- package/main/approvals.mjs +101 -297
- package/main/artifact-path.mjs +47 -18
- package/main/claude-bin.mjs +45 -311
- package/main/claude-input.mjs +57 -7
- package/main/claude-launch-env.mjs +54 -0
- package/main/claude-models.mjs +39 -7
- package/main/claude-plan.mjs +64 -16
- package/main/claude-session-open.mjs +28 -0
- package/main/claude-usage-process.mjs +40 -0
- package/main/claude-usage.mjs +94 -59
- package/main/cloud/account.mjs +179 -0
- package/main/cloud/aws.mjs +127 -0
- package/main/cloud/browser-return.mjs +58 -0
- package/main/cloud/clients.mjs +15 -0
- package/main/cloud/codex-cloud.mjs +53 -0
- package/main/cloud/config.mjs +107 -0
- package/main/cloud/docs.mjs +219 -0
- package/main/cloud/exec.mjs +27 -0
- package/main/cloud/host.mjs +165 -0
- package/main/cloud/kit.mjs +80 -0
- package/main/cloud/logins.mjs +543 -0
- package/main/cloud/managed.mjs +115 -0
- package/main/cloud/marker.mjs +104 -0
- package/main/cloud/org.mjs +53 -0
- package/main/cloud/reuse.mjs +208 -0
- package/main/cloud/run-cli.mjs +177 -0
- package/main/cloud/run.mjs +1934 -0
- package/main/cloud/usage.mjs +76 -0
- package/main/cloud-permission.mjs +51 -0
- package/main/codex-account.mjs +78 -0
- package/main/codex-app-server.mjs +276 -409
- package/main/codex-approvals.mjs +148 -433
- package/main/codex-bin.mjs +51 -249
- package/main/codex-models.mjs +20 -2
- package/main/codex-session.mjs +246 -506
- package/main/codex-threads-worker.mjs +12 -0
- package/main/codex-threads.mjs +112 -11
- package/main/codex-usage-file.mjs +5 -3
- package/main/codex-usage.mjs +56 -7
- package/main/codex-watch.mjs +83 -5
- package/main/codex.mjs +95 -363
- package/main/config.mjs +37 -5
- package/main/corner-tag.mjs +810 -0
- package/main/crash-report.mjs +26 -3
- package/main/dev-window.mjs +1 -1
- package/main/engine-bin.mjs +545 -0
- package/main/engine-setup.mjs +25 -24
- package/main/feedback.mjs +14 -31
- package/main/folder-pictures.mjs +2 -2
- package/main/freeze-recorder-thread.mjs +86 -0
- package/main/freeze-recorder.mjs +146 -0
- package/main/fresh-user.mjs +20 -9
- package/main/git-change-offthread.mjs +17 -3
- package/main/git-change-thread.mjs +5 -2
- package/main/harnesses/claude-stream.mjs +208 -0
- package/main/harnesses/claude.mjs +105 -0
- package/main/harnesses/codex.mjs +72 -0
- package/main/harnesses/common.mjs +78 -0
- package/main/harnesses/instructions-file.mjs +116 -0
- package/main/harnesses/opencode.mjs +234 -0
- package/main/harnesses.mjs +65 -0
- package/main/importable-threads.mjs +96 -0
- package/main/ipc.mjs +520 -135
- package/main/leftovers.mjs +117 -25
- package/main/liquid-glass.mjs +26 -0
- package/main/live-replies.mjs +10 -4
- package/main/local-app-frames.mjs +82 -0
- package/main/main-went-red.mjs +330 -0
- package/main/main.mjs +248 -37
- package/main/memory-gate-history.mjs +85 -20
- package/main/memory-gate-server.mjs +129 -11
- package/main/memory-gate.mjs +62 -8
- package/main/memory-log.mjs +124 -0
- package/main/menu.mjs +4 -2
- package/main/message-priority.mjs +2 -2
- package/main/mic.mjs +38 -0
- package/main/native/liquid-glass/build/liquid-glass.node +0 -0
- package/main/new-chats-watch.mjs +110 -0
- package/main/new-user-window.mjs +25 -0
- package/main/notify.mjs +64 -5
- package/main/opencode-server.mjs +271 -0
- package/main/opencode.mjs +287 -0
- package/main/phone-alerts.mjs +117 -0
- package/main/phone-inbox.mjs +625 -0
- package/main/phone-link.mjs +571 -0
- package/main/phone-uploads.mjs +476 -0
- package/main/picture-shape.mjs +114 -0
- package/main/quit-sequence.mjs +143 -0
- package/main/refresh-agent-models.mjs +15 -2
- package/main/relay-address.mjs +28 -0
- package/main/relay-client.mjs +314 -0
- package/main/repeats.mjs +10 -4
- package/main/row-label.mjs +18 -47
- package/main/run-change.mjs +13 -0
- package/main/run-ledger.mjs +135 -0
- package/main/runs-on.mjs +32 -35
- package/main/save-attachments.mjs +41 -0
- package/main/serve.mjs +155 -9
- package/main/settings.mjs +364 -50
- package/main/shell-path.mjs +234 -0
- package/main/ship-conflict-brief.mjs +119 -0
- package/main/ship-queue.mjs +134 -20
- package/main/sign-in-files.mjs +3 -7
- package/main/source-updater.mjs +45 -11
- package/main/stage-attachment.mjs +68 -0
- package/main/stall-watch.mjs +50 -0
- package/main/start-hold.mjs +73 -0
- package/main/store/home.mjs +87 -232
- package/main/store/paths.mjs +11 -0
- package/main/store/teammates-files.mjs +99 -0
- package/main/store/work-items.mjs +231 -13
- package/main/store.mjs +227 -53
- package/main/supervisor.mjs +3865 -699
- package/main/task-commands.mjs +13 -17
- package/main/task-folders-offthread.mjs +6 -1
- package/main/task-folders.mjs +897 -105
- package/main/task-terminals.mjs +147 -41
- package/main/team/index.mjs +114 -10
- package/main/team/memory-cloud.mjs +183 -1
- package/main/team/room-hours.mjs +48 -0
- package/main/team/room-setup.mjs +31 -0
- package/main/team/rooms-memory.mjs +454 -0
- package/main/team/rooms-shape.mjs +42 -0
- package/main/team/rooms-supabase.mjs +324 -0
- package/main/team/rooms.mjs +575 -0
- package/main/team/session.mjs +96 -26
- package/main/team/supabase-backend.mjs +180 -0
- package/main/team/sync.mjs +109 -1
- package/main/teammates.mjs +580 -0
- package/main/terminal-host.mjs +143 -0
- package/main/terminal-hosts.mjs +261 -0
- package/main/transcript-search.mjs +80 -0
- package/main/updater.mjs +71 -9
- package/main/webview-guard.mjs +45 -0
- package/main/worktree-include.mjs +365 -0
- package/mcp/core/documents.mjs +3 -1
- package/mcp/core/repeats.mjs +88 -0
- package/mcp/core/teammates.mjs +222 -0
- package/mcp/core/work.mjs +76 -4
- package/mcp/stdio.mjs +24 -11
- package/mcp/tools.mjs +116 -8
- package/package.json +30 -5
- package/renderer/dist/assets/abnfDiagram-YUKMZFIV-CoWB6YUK.js +1 -0
- package/renderer/dist/assets/arc-Ch0NrCul.js +1 -0
- package/renderer/dist/assets/architectureDiagram-47P4ROYG-CXz9M5tQ.js +36 -0
- package/renderer/dist/assets/blockDiagram-E7TT5TSB-DchGUuHH.js +140 -0
- package/renderer/dist/assets/c4Diagram-CRA5TL53-Cip-zNyr.js +38 -0
- package/renderer/dist/assets/channel-BQuQSL--.js +1 -0
- package/renderer/dist/assets/chunk-2Q5K7J3B-BoXid_2r.js +1 -0
- package/renderer/dist/assets/chunk-5VM5RSS4-Cpez1rRz.js +15 -0
- package/renderer/dist/assets/chunk-7TKQ45FW-DKA84YkE.js +1 -0
- package/renderer/dist/assets/chunk-AW2ZBBNX-Dg-SumPG.js +88 -0
- package/renderer/dist/assets/chunk-FVRAUYC3-06TCvPm1.js +2 -0
- package/renderer/dist/assets/chunk-HTAEGDNF-CMEBy1Td.js +1 -0
- package/renderer/dist/assets/chunk-JWPE2WC7-BJ2ObmV-.js +1 -0
- package/renderer/dist/assets/chunk-KQW6MTUR-CGWOYXUE.js +1 -0
- package/renderer/dist/assets/chunk-XXDRQBXY-CiZp07XC.js +1 -0
- package/renderer/dist/assets/classDiagram-v2-K4WV4PDN-DJNIX719.js +217 -0
- package/renderer/dist/assets/cornerTag-CPgvu-q3.js +1 -0
- package/renderer/dist/assets/cornerTag-oMfEjzCO.css +1 -0
- package/renderer/dist/assets/cose-bilkent-JH36ORCC-CbkyZOUH.js +1 -0
- package/renderer/dist/assets/cynefin-EF2NZ3EQ-78iOroZO.js +141 -0
- package/renderer/dist/assets/cynefinDiagram-3GCD6N5R-GcCopMs7.js +62 -0
- package/renderer/dist/assets/cytoscape.esm-C5JX3QLV.js +331 -0
- package/renderer/dist/assets/dagre-W4DXFKR2-DHLlXLkz.js +4 -0
- package/renderer/dist/assets/defaultLocale-DX6XiGOO.js +1 -0
- package/renderer/dist/assets/diagram-2UJZ2QOL-DuZSUHcH.js +200 -0
- package/renderer/dist/assets/diagram-OVF4WLC6-Ckxu3cqH.js +24 -0
- package/renderer/dist/assets/diagram-PFPMY2P6-CsTw9Ycn.js +30 -0
- package/renderer/dist/assets/diagram-UMYRVEAY-CTXd8qVg.js +24 -0
- package/renderer/dist/assets/diagram-YEKJPTXX-CJs1T_9m.js +41 -0
- package/renderer/dist/assets/diagram-ZIFT7M5P-CvjI23mf.js +3 -0
- package/renderer/dist/assets/ebnfDiagram-VR2GEFS7-d_IeAzOJ.js +1 -0
- package/renderer/dist/assets/elk-IJKZMXRS-zo9KFP3N.js +27 -0
- package/renderer/dist/assets/erDiagram-O2IAPWRE-DqfYf5Dt.js +99 -0
- package/renderer/dist/assets/flowDiagram-OXPTDLAJ-DAWsMLmo.js +213 -0
- package/renderer/dist/assets/ganttDiagram-R7TSEDQI-4ml_bhwR.js +292 -0
- package/renderer/dist/assets/gitGraphDiagram-XJZIOB7I-B_WcqSId.js +106 -0
- package/renderer/dist/assets/graph-DGbsTEsI.js +1 -0
- package/renderer/dist/assets/infoDiagram-5W2HQ5XZ-CI-jYqzc.js +2 -0
- package/renderer/dist/assets/init-Gi6I4Gst.js +1 -0
- package/renderer/dist/assets/ishikawaDiagram-K3B6WC7H-B56VWRlV.js +70 -0
- package/renderer/dist/assets/journeyDiagram-COXZFDF6-D1-p09Lr.js +139 -0
- package/renderer/dist/assets/kanban-definition-P3RFRI5V-Cv3w7JoN.js +89 -0
- package/renderer/dist/assets/katex-C5jXJg4s.js +257 -0
- package/renderer/dist/assets/linear-C35V2Spi.js +1 -0
- package/renderer/dist/assets/main-BcoBiGwv.css +32 -0
- package/renderer/dist/assets/main-CLnIOulD.js +1191 -0
- package/renderer/dist/assets/mermaid.core-BzGT5Vo9.js +314 -0
- package/renderer/dist/assets/mindmap-definition-LZFPQGKD-BZUfuymC.js +96 -0
- package/renderer/dist/assets/ordinal-Cboi1Yqb.js +1 -0
- package/renderer/dist/assets/pegDiagram-BGZESJAR-DFh9XNGe.js +1 -0
- package/renderer/dist/assets/pieDiagram-CAPJLFHJ-C65tPVsy.js +39 -0
- package/renderer/dist/assets/product-name-CSNW6d7s.js +40 -0
- package/renderer/dist/assets/quadrantDiagram-GDMTTRAM-Cushj_nk.js +7 -0
- package/renderer/dist/assets/railroadDiagram-SM67HX2B-DZGebGx5.js +1 -0
- package/renderer/dist/assets/requirementDiagram-X7JNWC4A-DpAB0MNo.js +84 -0
- package/renderer/dist/assets/sankeyDiagram-UM26HJRW-D-29rHra.js +40 -0
- package/renderer/dist/assets/sequenceDiagram-ZO4K6R2Y-FfOQAZol.js +169 -0
- package/renderer/dist/assets/sizeCapture-INFHLROL-C_n6fDBY.js +1 -0
- package/renderer/dist/assets/stateDiagram-v2-TBUQTH76-BZjenzJG.js +291 -0
- package/renderer/dist/assets/swimlanes-N4OXWK64-DxaMU9vX.js +1 -0
- package/renderer/dist/assets/swimlanesDiagram-K3J5GTZL-Cb2kM6rr.js +8 -0
- package/renderer/dist/assets/timeline-definition-YOQAKGHF-DTg5HJKz.js +120 -0
- package/renderer/dist/assets/usecaseDiagram-VIAY4XPW-Bc3MZDsl.js +370 -0
- package/renderer/dist/assets/vennDiagram-BLWOH2XV-GIVGk9Id.js +34 -0
- package/renderer/dist/assets/wardleyDiagram-YMQ3BMBF-NmJnbQOg.js +78 -0
- package/renderer/dist/assets/xychartDiagram-TAQBALBS-p-kfGfnW.js +7 -0
- package/renderer/dist/corner-tag.html +13 -0
- package/renderer/dist/emulator/audio-rules.mjs +74 -0
- package/renderer/dist/emulator/data/compression/README.md +11 -0
- package/renderer/dist/emulator/data/compression/extract7z.js +1 -0
- package/renderer/dist/emulator/data/compression/extractzip.js +1 -0
- package/renderer/dist/emulator/data/compression/libunrar.js +519 -0
- package/renderer/dist/emulator/data/compression/libunrar.wasm +0 -0
- package/renderer/dist/emulator/data/cores/README.md +22 -0
- package/renderer/dist/emulator/data/cores/mgba-legacy-wasm.data +0 -0
- package/renderer/dist/emulator/data/cores/mgba-thread-legacy-wasm.data +0 -0
- package/renderer/dist/emulator/data/cores/mgba-thread-wasm.data +0 -0
- package/renderer/dist/emulator/data/cores/mgba-wasm.data +0 -0
- package/renderer/dist/emulator/data/cores/package.json +65 -0
- package/renderer/dist/emulator/data/cores/reports/mgba.json +1 -0
- package/renderer/dist/emulator/data/emulator.css +1614 -0
- package/renderer/dist/emulator/data/loader.js +170 -0
- package/renderer/dist/emulator/data/localization/README.md +63 -0
- package/renderer/dist/emulator/data/localization/af-FR.json +339 -0
- package/renderer/dist/emulator/data/localization/ar-AR.json +301 -0
- package/renderer/dist/emulator/data/localization/ben-BEN.json +301 -0
- package/renderer/dist/emulator/data/localization/de-GER.json +301 -0
- package/renderer/dist/emulator/data/localization/el-GR.json +301 -0
- package/renderer/dist/emulator/data/localization/en-US.json +339 -0
- package/renderer/dist/emulator/data/localization/es-ES.json +310 -0
- package/renderer/dist/emulator/data/localization/fa-AF.json +310 -0
- package/renderer/dist/emulator/data/localization/hi-HI.json +301 -0
- package/renderer/dist/emulator/data/localization/it-IT.json +302 -0
- package/renderer/dist/emulator/data/localization/ja-JA.json +301 -0
- package/renderer/dist/emulator/data/localization/jv-JV.json +301 -0
- package/renderer/dist/emulator/data/localization/ko-KO.json +336 -0
- package/renderer/dist/emulator/data/localization/pt-BR.json +361 -0
- package/renderer/dist/emulator/data/localization/retroarch.json +617 -0
- package/renderer/dist/emulator/data/localization/ro-RO.json +310 -0
- package/renderer/dist/emulator/data/localization/ru-RU.json +301 -0
- package/renderer/dist/emulator/data/localization/tr-TR.json +310 -0
- package/renderer/dist/emulator/data/localization/vi-VN.json +302 -0
- package/renderer/dist/emulator/data/localization/zh-CN.json +351 -0
- package/renderer/dist/emulator/data/src/GameManager.js +464 -0
- package/renderer/dist/emulator/data/src/compression.js +142 -0
- package/renderer/dist/emulator/data/src/emulator.js +6158 -0
- package/renderer/dist/emulator/data/src/gamepad.js +167 -0
- package/renderer/dist/emulator/data/src/nipplejs.js +1 -0
- package/renderer/dist/emulator/data/src/shaders.js +236 -0
- package/renderer/dist/emulator/data/src/socket.io.min.js +7 -0
- package/renderer/dist/emulator/data/src/storage.js +125 -0
- package/renderer/dist/emulator/data/version.json +5 -0
- package/renderer/dist/emulator/host.js +297 -0
- package/renderer/dist/emulator/index.html +28 -0
- package/renderer/dist/emulator/provenance.json +6 -0
- package/renderer/dist/index.html +16 -3
- package/scripts/after-install.mjs +30 -8
- package/scripts/approval-server.sh +24 -5
- package/scripts/before-publish.mjs +12 -10
- package/scripts/cloud-shim.pl +57 -0
- package/shared/account-names.d.mts +6 -0
- package/shared/account-names.mjs +15 -0
- package/shared/agent-hours.mjs +136 -0
- package/shared/agent-import.mjs +62 -34
- package/shared/agents.d.mts +1 -0
- package/shared/agents.mjs +126 -522
- package/shared/analytics-events.mjs +12 -0
- package/shared/approval-card.mjs +36 -0
- package/shared/bridge-map.mjs +45 -1
- package/shared/claude-code-shape.mjs +6 -0
- package/shared/claude-commands.generated.mjs +6 -4
- package/shared/claude-models.generated.mjs +6 -4
- package/shared/claude-usage.d.mts +1 -0
- package/shared/claude-usage.mjs +42 -1
- package/shared/cloud-hand-back.d.mts +7 -0
- package/shared/cloud-hand-back.mjs +20 -0
- package/shared/cloud-kit.d.mts +219 -0
- package/shared/cloud-kit.mjs +341 -0
- package/shared/cloud-login-name.mjs +4 -0
- package/shared/cloud-start.mjs +17 -0
- package/shared/cloud-versions.mjs +23 -0
- package/shared/codex-import.mjs +2 -2
- package/shared/codex-modes.d.mts +22 -9
- package/shared/codex-modes.mjs +67 -11
- package/shared/codex-usage.mjs +108 -2
- package/shared/corner-tag.d.mts +36 -0
- package/shared/corner-tag.mjs +396 -0
- package/shared/dead-run-trace.mjs +19 -2
- package/shared/engines.mjs +76 -300
- package/shared/feedback.d.mts +7 -0
- package/shared/feedback.mjs +25 -0
- package/shared/first-run-practice.mjs +17 -24
- package/shared/harness-definitions.mjs +111 -0
- package/shared/instruction-defaults.json +2 -2
- package/shared/key-caps.d.mts +14 -0
- package/shared/key-caps.mjs +68 -0
- package/shared/message-edits.d.mts +7 -0
- package/shared/message-edits.mjs +35 -0
- package/shared/move-thread.d.mts +24 -0
- package/shared/move-thread.mjs +112 -0
- package/shared/named-threads.mjs +72 -0
- package/shared/not-shipped.d.mts +22 -0
- package/shared/not-shipped.mjs +89 -0
- package/shared/notify-rules.d.mts +31 -0
- package/shared/notify-rules.mjs +55 -8
- package/shared/phone-files.mjs +28 -0
- package/shared/phone-settings.mjs +118 -0
- package/shared/phone-snapshot.d.mts +16 -0
- package/shared/phone-snapshot.mjs +348 -0
- package/shared/picture-formats.d.mts +1 -0
- package/shared/picture-formats.mjs +13 -0
- package/shared/provider-commands.mjs +10 -2
- package/shared/rank.d.mts +4 -1
- package/shared/rank.mjs +82 -19
- package/shared/relay-address.mjs +6 -0
- package/shared/relay-crypto.mjs +165 -0
- package/shared/repeats.d.mts +8 -0
- package/shared/repeats.mjs +33 -2
- package/shared/room-cards.mjs +167 -0
- package/shared/room-links.d.mts +4 -0
- package/shared/room-links.mjs +21 -0
- package/shared/runs-on.d.mts +3 -13
- package/shared/runs-on.mjs +31 -52
- package/shared/shipped-note.d.mts +4 -0
- package/shared/shipped-note.mjs +6 -0
- package/shared/shortcuts.mjs +24 -10
- package/shared/spawn-trouble.d.mts +4 -0
- package/shared/spawn-trouble.mjs +484 -30
- package/shared/team-rules.mjs +9 -2
- package/shared/teammates.d.mts +19 -0
- package/shared/teammates.mjs +756 -0
- package/shared/terminal-focus.d.mts +1 -0
- package/shared/terminal-focus.mjs +13 -0
- package/shared/terminal-input.d.mts +1 -0
- package/shared/terminal-input.mjs +30 -0
- package/shared/terminal-keys.d.mts +1 -0
- package/shared/terminal-keys.mjs +16 -0
- package/shared/terminal-size.d.mts +4 -0
- package/shared/terminal-size.mjs +29 -0
- package/shared/thread-cards.mjs +4 -1
- package/shared/usage.d.mts +12 -0
- package/shared/usage.mjs +56 -3
- package/shared/websites.d.mts +15 -0
- package/shared/websites.mjs +61 -0
- package/shared/where-it-runs-from.d.mts +43 -0
- package/shared/where-it-runs-from.mjs +155 -0
- package/shared/work-items.mjs +150 -29
- package/shared/work-lines.mjs +93 -245
- package/shared/xterm-invalid-range.d.mts +2 -0
- package/shared/xterm-invalid-range.mjs +58 -0
- package/renderer/dist/assets/index-ChKsQkRw.js +0 -1169
- package/renderer/dist/assets/index-ClBXnq3B.css +0 -32
package/main/codex-bin.mjs
CHANGED
|
@@ -1,279 +1,81 @@
|
|
|
1
1
|
// Where Codex actually is, and whether we are entitled to say it is not here.
|
|
2
2
|
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
3
|
+
// THIS FILE IS NOW THE NAMES AND NOTHING ELSE. The search, the registry entry
|
|
4
|
+
// that declares Codex, and every measurement behind its paths live in
|
|
5
|
+
// main/engine-bin.mjs, which does the same job for every coding agent the app
|
|
6
|
+
// can run. Until 2026-10-08 this was 279 lines beside main/claude-bin.mjs's 338,
|
|
7
|
+
// and the two were copies of one idea: three of the seven commits they ever had
|
|
8
|
+
// are literally "one more install location".
|
|
5
9
|
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
//
|
|
10
|
+
// WHAT IS KEPT HERE is the vocabulary the rest of the app already imports --
|
|
11
|
+
// main/config.mjs, main/settings.mjs and main/codex-launch-env.mjs, which builds
|
|
12
|
+
// the PATH a Codex opened from the desktop needs out of `candidatePaths` and
|
|
13
|
+
// `versionedPaths`.
|
|
14
|
+
//
|
|
15
|
+
// `found` decides which binary would be spawned and `certain` decides whether a
|
|
16
|
+
// screen may SAY there is nothing here, and they are never the same value.
|
|
9
17
|
//
|
|
10
18
|
// ONE DIFFERENCE FROM CLAUDE CODE, AND IT CHANGES THE SCREEN. Claude Code is
|
|
11
|
-
// required: the app will not open an inbox without it. Codex is optional, and
|
|
12
|
-
//
|
|
13
|
-
//
|
|
14
|
-
//
|
|
15
|
-
//
|
|
19
|
+
// required: the app will not open an inbox without it. Codex is optional, and an
|
|
20
|
+
// absence is the ordinary case rather than a fault. So nothing here ever produces
|
|
21
|
+
// a warning. All a missing Codex does is leave the second engine out of the map
|
|
22
|
+
// that shared/engines.mjs reads, which is silence rather than a sentence about
|
|
23
|
+
// software nobody asked for.
|
|
16
24
|
//
|
|
17
25
|
// NOTHING HERE SPAWNS ANYTHING, AND main/config.mjs IS WHAT CALLS IT.
|
|
26
|
+
// `resolveCodexBin` is what answers "is there a Codex on this machine", and its
|
|
27
|
+
// answer is the fact `engineFor` refuses on. Before it was wired in, a `codexBin`
|
|
28
|
+
// in zero.config.json arrived on `config` through the unknown-key spread and went
|
|
29
|
+
// to `spawn` with no finder and no existence check behind it.
|
|
18
30
|
//
|
|
19
|
-
//
|
|
20
|
-
//
|
|
21
|
-
//
|
|
22
|
-
// arrived on `config` through the unknown-key spread in main/config.mjs and
|
|
23
|
-
// went to `spawn` with no finder and no existence check behind it, which is the
|
|
24
|
-
// one path in the second engine that becomes a process and was the only one
|
|
25
|
-
// with no guard on it. `resolveCodexBin` is now what answers "is there a Codex
|
|
26
|
-
// on this Mac", and its answer is the fact `engineFor` refuses on.
|
|
27
|
-
//
|
|
28
|
-
// There is still no Settings row, which is a real gap and not a claim of one:
|
|
29
|
-
// she can set `codexBin` in zero.config.json and nothing on screen says whether
|
|
30
|
-
// it was found.
|
|
31
|
-
//
|
|
32
|
-
// ------------------------------------------------------------------------
|
|
33
|
-
// MEASURED ON THIS MAC 2026-09-04, BECAUSE THE 2026-08-25 ORIGINAL WAS WRITTEN
|
|
34
|
-
// AGAINST codex-cli 0.144.0 AND SIX OF ITS ASSUMPTIONS HAVE MOVED SINCE.
|
|
35
|
-
//
|
|
36
|
-
// Installed here: codex-cli 0.148.0 at /opt/homebrew/bin/codex. That is a
|
|
37
|
-
// Homebrew CASK, not a formula as the original said, and the bin entry is a
|
|
38
|
-
// SYMLINK into /opt/homebrew/Caskroom/codex/0.148.0/bin/codex. `brew info
|
|
39
|
-
// --cask codex` the same minute reports 0.148.0 installed against 0.152.1
|
|
40
|
-
// available, so the moment mid-upgrade where that link points at nothing is a
|
|
41
|
-
// live state on this machine and not a hypothetical. It is the same shape the
|
|
42
|
-
// dangling-symlink rule was written for in the sibling file.
|
|
43
|
-
//
|
|
44
|
-
// THE INSTALL METHOD THE DOCS NOW LEAD WITH DID NOT EXIST IN THE ORIGINAL.
|
|
45
|
-
// `https://chatgpt.com/codex/install.sh`, read 2026-09-04:
|
|
46
|
-
//
|
|
47
|
-
// BIN_DIR="${CODEX_INSTALL_DIR:-$HOME/.local/bin}"
|
|
48
|
-
// CODEX_HOME_DIR="${CODEX_HOME:-$HOME/.codex}"
|
|
49
|
-
// STANDALONE_ROOT="$CODEX_HOME_DIR/packages/standalone"
|
|
50
|
-
//
|
|
51
|
-
// It links ~/.local/bin/codex at a versioned file under that root and swaps the
|
|
52
|
-
// file on every update. Three things follow, and all three are changes from the
|
|
53
|
-
// original: that path goes FIRST (the tool's own answer settles a machine set
|
|
54
|
-
// up the documented way in one stat call, exactly as ~/.local/bin/claude does
|
|
55
|
-
// next door), the standalone store's own bin is worth listing for the case
|
|
56
|
-
// where CODEX_INSTALL_DIR put the link somewhere no list covers, and CODEX_HOME
|
|
57
|
-
// can move every trace below out from under us.
|
|
58
|
-
//
|
|
59
|
-
// AND THE STORE KEEPS THE BINARY IN TWO PLACES, WHICH THE FIRST VERSION OF THIS
|
|
60
|
-
// FILE MISSED. Same script, read the same day:
|
|
61
|
-
//
|
|
62
|
-
// line 951: ln -sf "bin/codex" "$stage_release/codex"
|
|
63
|
-
// line 1021: version_from_binary "$release_dir/bin/codex" \
|
|
64
|
-
// || version_from_binary "$release_dir/codex"
|
|
65
|
-
//
|
|
66
|
-
// Every staged release carries the binary at `<release>/bin/codex` AND at
|
|
67
|
-
// `<release>/codex`, and the installer accepts either when it goes looking for
|
|
68
|
-
// a version. `current` is a symlink at the live release, so BOTH
|
|
69
|
-
// `current/bin/codex` and `current/codex` resolve on a machine set up the
|
|
70
|
-
// documented way. Each is one stat call, so listing both costs nothing, and
|
|
71
|
-
// listing only one is how the app tells somebody their Codex is missing while
|
|
72
|
-
// they are looking at it.
|
|
73
|
-
//
|
|
74
|
-
// WHAT ~/.codex REALLY HOLDS NOW: 38 entries. auth.json, config.toml, sessions/
|
|
75
|
-
// and history.jsonl are all still there, so the original's evidence list is not
|
|
76
|
-
// wrong. It is INCOMPLETE, and it is aging in a specific way. The directory
|
|
77
|
-
// also holds state_5.sqlite, thread_history_1.sqlite, logs_2.sqlite,
|
|
78
|
-
// memories_1.sqlite, queue_1.sqlite, goals_1.sqlite, models_cache.json,
|
|
79
|
-
// installation_id and shell_snapshots/, and the split matters: sessions/ holds
|
|
80
|
-
// 1691 rollout files with the newest written 2026-09-03, while history.jsonl
|
|
81
|
-
// has not been touched since 2026-06-03. The live record moved into sqlite
|
|
82
|
-
// files whose names carry a schema number that increments, which is a name no
|
|
83
|
-
// list can hold. That is why the directory itself stays on the list, last and
|
|
84
|
-
// broad, and why nothing below tries to enumerate what is inside it.
|
|
85
|
-
//
|
|
86
|
-
// AND THE LINK MOVED. The original's install URL, developers.openai.com/codex/
|
|
87
|
-
// cli, answers 308 to learn.chatgpt.com/docs/codex/cli.
|
|
88
|
-
//
|
|
89
|
-
// The npm package is unchanged and still real (@openai/codex, 0.153.0 on
|
|
90
|
-
// 2026-09-04), so the package-manager paths and the per-Node directories below
|
|
91
|
-
// are carried over exactly as they were.
|
|
31
|
+
// AND THERE IS A SETTINGS ROW NOW (w-ce8c1a9275): somebody whose Codex the
|
|
32
|
+
// search misses can point the app at the binary themselves, which is written
|
|
33
|
+
// back as `codexBin` and wins over everything below.
|
|
92
34
|
|
|
93
|
-
import fs from 'node:fs';
|
|
94
35
|
import os from 'node:os';
|
|
95
|
-
import
|
|
96
|
-
|
|
36
|
+
import {
|
|
37
|
+
ENGINES, findEngine, resolveEngine, forgetEngine, installEvidence as evidenceFor,
|
|
38
|
+
versionedBinPaths,
|
|
39
|
+
} from './engine-bin.mjs';
|
|
97
40
|
|
|
98
|
-
|
|
99
|
-
// first for the same reason its sibling's is: it is the answer the tool itself
|
|
100
|
-
// produces. Everything after it is a package manager's default bin directory,
|
|
101
|
-
// because Codex ships as a Homebrew cask and as an npm package rather than with
|
|
102
|
-
// an installer that owns a folder.
|
|
103
|
-
export function candidatePaths(home = os.homedir()) {
|
|
104
|
-
return [
|
|
105
|
-
path.join(home, '.local/bin/codex'), // the shell installer's link
|
|
106
|
-
path.join(home, '.codex/packages/standalone/current/bin/codex'),
|
|
107
|
-
path.join(home, '.codex/packages/standalone/current/codex'),
|
|
108
|
-
'/opt/homebrew/bin/codex', // the Homebrew cask, Apple Silicon
|
|
109
|
-
'/usr/local/bin/codex', // Homebrew on Intel, and npm -g
|
|
110
|
-
path.join(home, '.bun/bin/codex'),
|
|
111
|
-
path.join(home, '.volta/bin/codex'),
|
|
112
|
-
path.join(home, '.asdf/shims/codex'),
|
|
113
|
-
path.join(home, '.npm-global/bin/codex'), // the two npm prefixes people
|
|
114
|
-
path.join(home, '.npm-packages/bin/codex'), // actually write in a guide
|
|
115
|
-
path.join(home, '.yarn/bin/codex'),
|
|
116
|
-
path.join(home, 'Library/pnpm/codex'), // pnpm's own bin on macOS
|
|
117
|
-
path.join(home, '.local/share/pnpm/codex'), // pnpm's own bin on Linux
|
|
118
|
-
path.join(home, '.deno/bin/codex'),
|
|
119
|
-
path.join(home, 'bin/codex'), // a hand-rolled ~/bin on PATH
|
|
120
|
-
'/opt/local/bin/codex', // MacPorts
|
|
121
|
-
'/usr/bin/codex',
|
|
122
|
-
];
|
|
123
|
-
}
|
|
41
|
+
const CODEX = ENGINES.codex;
|
|
124
42
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
const under = (dir, tail) => readdir(path.join(home, dir)).map((v) => path.join(home, dir, v, tail));
|
|
131
|
-
return [
|
|
132
|
-
...under('.nvm/versions/node', 'bin/codex'),
|
|
133
|
-
...under('.local/share/fnm/node-versions', 'installation/bin/codex'),
|
|
134
|
-
...under('Library/Application Support/fnm/node-versions', 'installation/bin/codex'),
|
|
135
|
-
...under('n/versions/node', 'bin/codex'),
|
|
136
|
-
...under('.asdf/installs/nodejs', 'bin/codex'),
|
|
137
|
-
];
|
|
43
|
+
export const INSTALL_URL = CODEX.installUrl;
|
|
44
|
+
|
|
45
|
+
/** Every normal home for this binary, in order; the first that exists wins. */
|
|
46
|
+
export function candidatePaths(home = os.homedir()) {
|
|
47
|
+
return CODEX.candidates(home, () => []);
|
|
138
48
|
}
|
|
139
49
|
|
|
140
|
-
|
|
141
|
-
|
|
50
|
+
/** One bin directory per installed Node, read rather than guessed. */
|
|
51
|
+
export function versionedPaths(home = os.homedir(), readdir = undefined) {
|
|
52
|
+
return versionedBinPaths('codex', home, readdir);
|
|
142
53
|
}
|
|
143
54
|
|
|
144
|
-
|
|
145
|
-
// used Codex in the ChatGPT app has this and nothing else (w-9f6975906c,
|
|
146
|
-
// measured 2026-10-05: codex-cli 0.158.0-alpha.2, sharing the CLI's sign-in).
|
|
147
|
-
// Searched LAST, after the shell, because it moves with the app's releases.
|
|
148
|
-
//
|
|
149
|
-
// AND THE ONE THE CODEX DESKTOP APP CARRIES (w-d5d632e503). Its reported place,
|
|
150
|
-
// not measured on a Mac here: none of the Macs this was written on had the app.
|
|
151
|
-
// A path that is not there costs one missed `exists`.
|
|
55
|
+
/** The copies the ChatGPT and Codex desktop apps carry inside themselves. */
|
|
152
56
|
export function appCopyPaths(home = os.homedir()) {
|
|
153
|
-
|
|
154
|
-
return inside.flatMap((p) => [path.join('/Applications', p), path.join(home, 'Applications', p)]);
|
|
57
|
+
return CODEX.appCopies(home);
|
|
155
58
|
}
|
|
156
59
|
|
|
157
|
-
|
|
158
|
-
// They exist only to stop the app claiming an absence it has not established.
|
|
159
|
-
//
|
|
160
|
-
// Both homes are looked in when CODEX_HOME is set, and that is on purpose: a
|
|
161
|
-
// CODEX_HOME inherited from somewhere else is not proof the ordinary directory
|
|
162
|
-
// is gone, and the whole job of this list is to make an absence hard to claim
|
|
163
|
-
// rather than easy.
|
|
60
|
+
/** What Codex leaves behind. None of it is ever spawned. */
|
|
164
61
|
export function evidencePaths(home = os.homedir(), env = process.env) {
|
|
165
|
-
|
|
166
|
-
const out = [];
|
|
167
|
-
for (const dir of new Set(homes)) {
|
|
168
|
-
out.push(
|
|
169
|
-
path.join(dir, 'auth.json'), // it has been logged in
|
|
170
|
-
path.join(dir, 'config.toml'),
|
|
171
|
-
path.join(dir, 'sessions'), // one folder tree of past runs
|
|
172
|
-
path.join(dir, 'history.jsonl'),
|
|
173
|
-
path.join(dir, 'packages/standalone/releases'), // the installer's version store
|
|
174
|
-
dir, // and the directory itself, last
|
|
175
|
-
);
|
|
176
|
-
}
|
|
177
|
-
return out;
|
|
62
|
+
return CODEX.evidence(home, env);
|
|
178
63
|
}
|
|
179
64
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
// two mean opposite things. Both of Codex's normal installs are a symlink into
|
|
183
|
-
// a versioned directory that gets swapped on every update, so this is the
|
|
184
|
-
// ordinary shape of a Codex that is being upgraded rather than an odd one.
|
|
185
|
-
function defaultDangles(p) {
|
|
186
|
-
try { return !!fs.lstatSync(p) && !fs.existsSync(p); } catch { return false; }
|
|
65
|
+
export function installEvidence({ home = os.homedir(), env = process.env, exists, dangles } = {}) {
|
|
66
|
+
return evidenceFor('codex', { home, env, exists, dangles });
|
|
187
67
|
}
|
|
188
68
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
for (const p of evidencePaths(home, env)) if (exists(p)) return p;
|
|
193
|
-
for (const p of candidatePaths(home)) if (dangles(p)) return p;
|
|
194
|
-
return null;
|
|
69
|
+
/** The whole search. See main/engine-bin.mjs for what each answer means. */
|
|
70
|
+
export function findCodexBin(where = {}) {
|
|
71
|
+
return findEngine('codex', where);
|
|
195
72
|
}
|
|
196
73
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
* The whole search, a pure function of its inputs so a test can put Codex
|
|
201
|
-
* anywhere without touching the machine it runs on.
|
|
202
|
-
*
|
|
203
|
-
* Returns the same shape its sibling does: { path, found, certain, from,
|
|
204
|
-
* searched, evidence }, so a caller can hold the two side by side without
|
|
205
|
-
* learning two vocabularies.
|
|
206
|
-
*/
|
|
207
|
-
export function findCodexBin({
|
|
208
|
-
configured = null,
|
|
209
|
-
home = os.homedir(),
|
|
210
|
-
env = process.env,
|
|
211
|
-
exists = fs.existsSync,
|
|
212
|
-
shellLookup = () => askShell({ bin: 'codex' }),
|
|
213
|
-
readdir = defaultReaddir,
|
|
214
|
-
dangles = defaultDangles,
|
|
215
|
-
} = {}) {
|
|
216
|
-
if (configured) {
|
|
217
|
-
return {
|
|
218
|
-
path: configured, found: exists(configured), certain: true, from: 'settings',
|
|
219
|
-
searched: [], evidence: null,
|
|
220
|
-
};
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
const searched = [...candidatePaths(home), ...versionedPaths(home, readdir)];
|
|
224
|
-
for (const candidate of searched) {
|
|
225
|
-
if (exists(candidate)) return { path: candidate, found: true, certain: true, from: 'disk', searched, evidence: null };
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
const fromShell = shellSaid(shellLookup());
|
|
229
|
-
if (fromShell.path) return { path: fromShell.path, found: true, certain: true, from: 'shell', searched, evidence: null };
|
|
230
|
-
|
|
231
|
-
for (const candidate of appCopyPaths(home)) {
|
|
232
|
-
if (exists(candidate)) return { path: candidate, found: true, certain: true, from: 'app', searched, evidence: null };
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
// NOT FOUND, AND WHETHER THAT IS KNOWN. Every cheap path missed and every
|
|
236
|
-
// shell we could reach missed, so the last question is whether this Mac shows
|
|
237
|
-
// any sign of Codex anyway.
|
|
238
|
-
const evidence = installEvidence({ home, env, exists, dangles });
|
|
239
|
-
return {
|
|
240
|
-
path: null,
|
|
241
|
-
found: false,
|
|
242
|
-
certain: fromShell.answered && !evidence,
|
|
243
|
-
from: null,
|
|
244
|
-
searched,
|
|
245
|
-
evidence,
|
|
246
|
-
};
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
// askShell used to answer with a path or null. Anything handing back the old
|
|
250
|
-
// shape is read as an answer, because that is what it always meant.
|
|
251
|
-
function shellSaid(result) {
|
|
252
|
-
if (typeof result === 'string') return { path: result, answered: true };
|
|
253
|
-
if (!result || typeof result !== 'object') return { path: null, answered: true };
|
|
254
|
-
return { path: result.path ?? null, answered: result.answered !== false };
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
/* ------------------------------- the cache -------------------------------- */
|
|
258
|
-
// Only the SHELL step is remembered, for the same thirty seconds and the same
|
|
259
|
-
// reason: the path checks are stat calls, and caching those is how a settings
|
|
260
|
-
// screen ends up still saying "not found" after somebody has installed it.
|
|
261
|
-
|
|
262
|
-
const SHELL_TTL = 30_000;
|
|
263
|
-
let shellAnswer = null;
|
|
264
|
-
let shellAskedAt = 0;
|
|
265
|
-
|
|
266
|
-
export function resolveCodexBin(configured = null, { now = Date.now(), shellLookup = () => askShell({ bin: 'codex' }), ...where } = {}) {
|
|
267
|
-
const remembered = () => {
|
|
268
|
-
if (shellAskedAt && now - shellAskedAt < SHELL_TTL) return shellAnswer;
|
|
269
|
-
shellAnswer = shellLookup();
|
|
270
|
-
shellAskedAt = now;
|
|
271
|
-
return shellAnswer;
|
|
272
|
-
};
|
|
273
|
-
return findCodexBin({ ...where, configured, shellLookup: remembered });
|
|
74
|
+
/** The same search with the shell step held for thirty seconds. */
|
|
75
|
+
export function resolveCodexBin(configured = null, where = {}) {
|
|
76
|
+
return resolveEngine('codex', configured, where);
|
|
274
77
|
}
|
|
275
78
|
|
|
276
79
|
export function forgetCodexBin() {
|
|
277
|
-
|
|
278
|
-
shellAskedAt = 0;
|
|
80
|
+
forgetEngine('codex');
|
|
279
81
|
}
|
package/main/codex-models.mjs
CHANGED
|
@@ -59,6 +59,7 @@
|
|
|
59
59
|
import fs from 'node:fs';
|
|
60
60
|
import os from 'node:os';
|
|
61
61
|
import path from 'node:path';
|
|
62
|
+
import { shellDataDirsNow } from './shell-path.mjs';
|
|
62
63
|
const liveCatalogs=new Map();
|
|
63
64
|
export function rememberCodexModels(home,models){
|
|
64
65
|
const rows=models.filter(m=>typeof m.model==='string'&&m.model).map((m,i)=>({slug:m.model,display_name:m.displayName,visibility:m.hidden?'hide':'list',priority:i,default_reasoning_level:m.defaultReasoningEffort,supported_reasoning_levels:(m.supportedReasoningEfforts||[]).map(l=>({effort:l.reasoningEffort,description:l.description}))}));
|
|
@@ -80,8 +81,13 @@ const catalogRows=(home,read)=>liveCatalogs.get(home)??modelRows(read(path.join(
|
|
|
80
81
|
* offering models out of the wrong one would offer models a different login
|
|
81
82
|
* cannot run.
|
|
82
83
|
*/
|
|
83
|
-
export function codexHome({ configured = null, env = process.env, home = os.homedir() } = {}) {
|
|
84
|
-
|
|
84
|
+
export function codexHome({ configured = null, env = process.env, home = os.homedir(), shell = shellDataDirsNow().CODEX_HOME } = {}) {
|
|
85
|
+
// AND THE ONE THE SHELL PROFILE EXPORTS (w-6d8c543a43). The supervisor asks
|
|
86
|
+
// with the worker's scrubbed environment, which never has CODEX_HOME, so a
|
|
87
|
+
// home set in .zshrc, the one their terminal's Codex signs in to, was never
|
|
88
|
+
// reached and every Codex task ran signed out on ~/.codex.
|
|
89
|
+
const fromShell = typeof shell === 'string' && path.isAbsolute(shell) ? shell : null;
|
|
90
|
+
return configured || env?.CODEX_HOME || fromShell || path.join(home, '.codex');
|
|
85
91
|
}
|
|
86
92
|
|
|
87
93
|
/**
|
|
@@ -112,6 +118,18 @@ export function codexModels({ home = codexHome(), read = readJson } = {}) {
|
|
|
112
118
|
}));
|
|
113
119
|
}
|
|
114
120
|
|
|
121
|
+
/**
|
|
122
|
+
* The models any of these logins may be offered, once each. A task goes to a
|
|
123
|
+
* login whose plan has its model (`_pickProfile`), so a model one login has is
|
|
124
|
+
* one this Mac can run. The longest list leads because it is Codex's order for
|
|
125
|
+
* the widest plan; a model only a smaller list has follows it.
|
|
126
|
+
*/
|
|
127
|
+
export function codexModelsAcross(homes, { read = readJson } = {}) {
|
|
128
|
+
const lists = homes.map((home) => codexModels({ home, read })).sort((a, b) => b.length - a.length);
|
|
129
|
+
const seen = new Set();
|
|
130
|
+
return lists.flat().filter((m) => !seen.has(m.id) && seen.add(m.id));
|
|
131
|
+
}
|
|
132
|
+
|
|
115
133
|
/**
|
|
116
134
|
* Every slug in the cache, hidden ones included: what Codex would accept if it
|
|
117
135
|
* were handed the word, which is a different question from what she may pick.
|