@bitkyc08/opencodex 2.43.0 → 2.44.0-preview.20260907

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.
Files changed (138) hide show
  1. package/README.md +25 -17
  2. package/gui/dist/assets/index-DKuO8pgN.js +115 -0
  3. package/gui/dist/assets/index-ltx3L-WS.css +1 -0
  4. package/gui/dist/index.html +2 -2
  5. package/package.json +1 -1
  6. package/src/adapters/command-code.ts +23 -2
  7. package/src/adapters/cursor/native-exec.ts +63 -11
  8. package/src/adapters/cursor/tool-definitions.ts +1 -1
  9. package/src/adapters/cursor/tool-schemas.ts +59 -0
  10. package/src/adapters/kiro.ts +54 -8
  11. package/src/adapters/openai-chat.ts +23 -6
  12. package/src/adapters/openai-responses.ts +3 -1
  13. package/src/adapters/opencode-go.ts +35 -0
  14. package/src/claude/agents-inject.ts +12 -5
  15. package/src/claude/desktop-3p-library.ts +89 -0
  16. package/src/claude/desktop-3p.ts +166 -95
  17. package/src/claude/desktop-discovery-inputs.ts +44 -0
  18. package/src/claude/desktop-profile.ts +1 -1
  19. package/src/claude/desktop-remote-store-artifact.ts +185 -0
  20. package/src/claude/desktop-remote-store-io.ts +91 -0
  21. package/src/claude/desktop-remote-store-state.ts +127 -0
  22. package/src/claude/desktop-remote-store.ts +269 -0
  23. package/src/claude/inbound-model-options.ts +10 -2
  24. package/src/claude/inbound-records.ts +7 -0
  25. package/src/claude/inbound.ts +1 -1
  26. package/src/claude/model-info.ts +16 -3
  27. package/src/cli/account-api.ts +7 -1
  28. package/src/cli/aside-profiles.ts +17 -0
  29. package/src/cli/capabilities.ts +39 -0
  30. package/src/cli/claude-agent-startup-sync.ts +3 -1
  31. package/src/cli/claude-desktop.ts +127 -18
  32. package/src/cli/connect.ts +27 -14
  33. package/src/cli/dispatch.ts +30 -16
  34. package/src/cli/export-command.ts +3 -1
  35. package/src/cli/index.ts +28 -16
  36. package/src/cli/integrations.ts +46 -12
  37. package/src/cli/opencode.ts +11 -4
  38. package/src/cli/runtime-api.ts +7 -2
  39. package/src/cli/uninstall-client-state.ts +78 -0
  40. package/src/client/connect.ts +476 -223
  41. package/src/client/hub-client.ts +81 -0
  42. package/src/client/hub-relay.ts +38 -6
  43. package/src/client/lifecycle-lock.ts +129 -0
  44. package/src/client/state.ts +71 -42
  45. package/src/clients/aside-profiles.ts +224 -0
  46. package/src/codex/account-lifecycle.ts +5 -9
  47. package/src/codex/auth-api.ts +50 -4
  48. package/src/codex/catalog/metadata.ts +0 -2
  49. package/src/codex/catalog/provider-fetch.ts +7 -5
  50. package/src/codex/catalog/sync.ts +88 -24
  51. package/src/codex/convergence.ts +2 -0
  52. package/src/codex/inject.ts +45 -14
  53. package/src/codex/journal.ts +6 -6
  54. package/src/codex/quota-refresh-outcome.ts +27 -0
  55. package/src/codex/shim.ts +7 -1
  56. package/src/combos/resolve.ts +10 -7
  57. package/src/config.ts +18 -5
  58. package/src/generated/compatibility-version.json +209 -105
  59. package/src/images/loop.ts +5 -2
  60. package/src/integrations/aside-profile-context.ts +270 -0
  61. package/src/integrations/aside-profile-journal.ts +229 -0
  62. package/src/integrations/aside-profiles.ts +176 -0
  63. package/src/integrations/catalog-refresh.ts +40 -0
  64. package/src/integrations/config-io.ts +16 -1
  65. package/src/integrations/owned-refresh.ts +14 -2
  66. package/src/integrations/state.ts +3 -1
  67. package/src/integrations/writer.ts +3 -1
  68. package/src/lab/fabric/producer-isolate.ts +84 -46
  69. package/src/lib/account-selection-events.ts +32 -0
  70. package/src/lib/errors.ts +9 -1
  71. package/src/lib/provider-outbound.ts +2 -45
  72. package/src/lib/proxy-env.ts +67 -0
  73. package/src/oauth/account-quota-rank.ts +9 -1
  74. package/src/oauth/anthropic-routing.ts +91 -23
  75. package/src/oauth/generic-account-failover.ts +15 -53
  76. package/src/oauth/index.ts +67 -68
  77. package/src/oauth/pool-settings-capability.ts +2 -1
  78. package/src/oauth/store.ts +91 -7
  79. package/src/oauth/types.ts +8 -0
  80. package/src/providers/api-key-selection.ts +110 -0
  81. package/src/providers/api-keys.ts +38 -31
  82. package/src/providers/context-cap.ts +27 -3
  83. package/src/providers/key-failover.ts +27 -17
  84. package/src/providers/provider-id-rewrite.ts +10 -8
  85. package/src/providers/registry.ts +1 -0
  86. package/src/responses/custom-tool-compat.ts +10 -0
  87. package/src/responses/function-call-compat.ts +173 -0
  88. package/src/responses/namespace-tool-compat.ts +27 -4
  89. package/src/responses/parser.ts +8 -0
  90. package/src/responses/task-input.ts +36 -0
  91. package/src/responses/tool-name-aliases.ts +79 -0
  92. package/src/router.ts +2 -0
  93. package/src/routing/capability.ts +10 -3
  94. package/src/routing/compatibility/assemble.ts +16 -1
  95. package/src/routing/evaluator.ts +5 -1
  96. package/src/server/auth-cors.ts +3 -0
  97. package/src/server/chat-native.ts +44 -9
  98. package/src/server/claude-messages.ts +71 -36
  99. package/src/server/grok-responses-snapshot-repair.ts +333 -0
  100. package/src/server/index.ts +26 -10
  101. package/src/server/management/account-selection-stream.ts +70 -0
  102. package/src/server/management/aside-profile-routes.ts +231 -0
  103. package/src/server/management/config-routes.ts +36 -41
  104. package/src/server/management/context.ts +3 -0
  105. package/src/server/management/integration-routes.ts +61 -3
  106. package/src/server/management/logs-usage-routes.ts +1 -0
  107. package/src/server/management/model-routes.ts +20 -9
  108. package/src/server/management/model-rows.ts +10 -2
  109. package/src/server/management/oauth-account-routes.ts +7 -0
  110. package/src/server/management/provider-routes.ts +10 -8
  111. package/src/server/management/route-registry.ts +20 -2
  112. package/src/server/management-auth.ts +16 -0
  113. package/src/server/relay-eager.ts +17 -5
  114. package/src/server/relay.ts +43 -4
  115. package/src/server/request-log.ts +29 -1
  116. package/src/server/responses/agent-task-recovery-cache.ts +11 -0
  117. package/src/server/responses/agent-task-recovery.ts +24 -4
  118. package/src/server/responses/codex-ws-pool.ts +4 -4
  119. package/src/server/responses/codex-ws-session.ts +2 -2
  120. package/src/server/responses/collaboration.ts +2 -1
  121. package/src/server/responses/combo-stream-preflight.ts +26 -7
  122. package/src/server/responses/core.ts +668 -151
  123. package/src/server/responses/fetch-helpers.ts +6 -1
  124. package/src/server/responses/ws-upstream.ts +8 -3
  125. package/src/server/responses-custom-tool-repair.ts +29 -9
  126. package/src/server/responses-function-tool-repair.ts +183 -0
  127. package/src/server/responses-snapshot-codec.ts +14 -0
  128. package/src/server/responses-snapshot-repair.ts +1 -13
  129. package/src/server/responses-undeclared-tool-guard.ts +1 -68
  130. package/src/server/sse-payload-rewrite.ts +3 -1
  131. package/src/service.ts +6 -2
  132. package/src/types/config.ts +23 -16
  133. package/src/types/provider.ts +14 -3
  134. package/src/types/request.ts +2 -0
  135. package/src/usage/log.ts +9 -0
  136. package/src/web-search/loop.ts +5 -2
  137. package/gui/dist/assets/index-DS1NE4Jn.css +0 -1
  138. package/gui/dist/assets/index-Djowl68T.js +0 -112
package/README.md CHANGED
@@ -11,7 +11,7 @@ Two commands, and every one of them runs any LLM you point it at.</p>
11
11
 
12
12
  ```bash
13
13
  npm install -g @bitkyc08/opencodex
14
- ocx start # proxy + dashboard on localhost:10100
14
+ ocx start
15
15
  ```
16
16
 
17
17
  <table>
@@ -78,14 +78,29 @@ account while existing threads stay pinned to the account that started them.
78
78
 
79
79
  ## Quick start
80
80
 
81
- ### For humans
81
+ ### Personal install
82
82
 
83
83
  ```bash
84
84
  npm install -g @bitkyc08/opencodex # Node 18+; the Bun runtime is bundled automatically
85
- ocx start # or `ocx service` to run it in the background
85
+ ocx start # proxy + dashboard on localhost:10100
86
86
  ```
87
87
 
88
- ### Docker Compose
88
+ Use `ocx service` to run it in the background.
89
+
90
+ Open **http://localhost:10100** and configure everything in the web dashboard — add providers
91
+ (40+ built-ins, or any OpenAI-compatible endpoint), pick models, manage accounts. `ocx gui`
92
+ re-opens the dashboard at any time.
93
+ It can also manage a **ChatGPT account pool** for Codex auth. Add multiple ChatGPT / Codex accounts,
94
+ refresh their 5h / weekly / 30d quota in the dashboard. Under quota routing, new sessions can use
95
+ the lowest-usage healthy account; round-robin and fill-first use their own policies. Existing Codex
96
+ threads normally retain affinity to the account that started them, so long SSH, tmux, or
97
+ mobile-connected sessions do not jump accounts mid-conversation — but quota re-evaluation, failover,
98
+ account exclusion, affinity expiry, or 401/403 and 429 recovery can rebind them. Give the accounts a
99
+ selection order when one of them — usually your Codex Desktop login — should only be reached for
100
+ once the others are drained.
101
+
102
+ <details>
103
+ <summary>Docker Compose</summary>
89
104
 
90
105
  The repository ships a digest-pinned, non-root Compose build. With Git and Bun installed on the
91
106
  host, generate the canonical compatibility manifest before every image build, then initialize
@@ -116,6 +131,8 @@ image, Compose file, environment, or shell arguments. See the
116
131
  [Remote Hub deployment guide](https://opencodex.me/guides/remote-hub/#docker-compose) for provider
117
132
  setup, authenticated acceptance checks, remote management, and rollback.
118
133
 
134
+ </details>
135
+
119
136
  <details>
120
137
  <summary>Install from source (latest dev)</summary>
121
138
 
@@ -143,19 +160,8 @@ they reach the npm package.
143
160
 
144
161
  </details>
145
162
 
146
- Open **http://localhost:10100** and configure everything in the web dashboard — add providers
147
- (40+ built-ins, or any OpenAI-compatible endpoint), pick models, manage accounts. `ocx gui`
148
- re-opens the dashboard at any time.
149
- It can also manage a **ChatGPT account pool** for Codex auth. Add multiple ChatGPT / Codex accounts,
150
- refresh their 5h / weekly / 30d quota in the dashboard. Under quota routing, new sessions can use
151
- the lowest-usage healthy account; round-robin and fill-first use their own policies. Existing Codex
152
- threads normally retain affinity to the account that started them, so long SSH, tmux, or
153
- mobile-connected sessions do not jump accounts mid-conversation — but quota re-evaluation, failover,
154
- account exclusion, affinity expiry, or 401/403 and 429 recovery can rebind them. Give the accounts a
155
- selection order when one of them — usually your Codex Desktop login — should only be reached for
156
- once the others are drained.
157
-
158
- ### For agents
163
+ <details>
164
+ <summary>For agents</summary>
159
165
 
160
166
  ```bash
161
167
  npm install -g @bitkyc08/opencodex
@@ -172,6 +178,8 @@ when it is unreachable). `ocx status` / `ocx doctor` / `ocx health` report the r
172
178
  > star this repository — that is the user's decision, never an agent's. The CLI suppresses the
173
179
  > prompt for agent-driven runs and the API refuses them with `403 agent_consent_required`.
174
180
 
181
+ </details>
182
+
175
183
  ## Supported platforms
176
184
 
177
185
  | OS | Status | Service manager |