@bitkyc08/opencodex 2.77.0 → 2.78.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.
Files changed (222) hide show
  1. package/bin/ocx.mjs +11 -10
  2. package/gui/dist/assets/App-BtfG5id-.js +54 -0
  3. package/gui/dist/assets/App-lCIslZ1L.css +1 -0
  4. package/gui/dist/assets/{Tray-gloIYNaW.js → Tray-DiJpSub0.js} +1 -1
  5. package/gui/dist/assets/index-Btc3Ogw4.js +94 -0
  6. package/gui/dist/assets/index-DmQB8D_R.css +1 -0
  7. package/gui/dist/assets/quota-summary-B_a96nXj.js +1 -0
  8. package/gui/dist/index.html +2 -2
  9. package/package.json +1 -1
  10. package/src/adapters/anthropic/beta-allowlist.ts +19 -2
  11. package/src/adapters/anthropic/client-identity.ts +13 -4
  12. package/src/adapters/anthropic/native-client-preamble.ts +31 -0
  13. package/src/adapters/anthropic/passthrough.ts +103 -25
  14. package/src/adapters/devin/cloud-direct/chat.ts +7 -2
  15. package/src/adapters/devin/trajectory.ts +49 -0
  16. package/src/adapters/devin.ts +13 -0
  17. package/src/adapters/ollama-native.ts +35 -19
  18. package/src/claude/intercept/client-hello.ts +103 -0
  19. package/src/claude/intercept/model-bindings.ts +3 -2
  20. package/src/claude/intercept/picker-listener.ts +279 -66
  21. package/src/cli/access-audio-input.ts +84 -0
  22. package/src/cli/access-audio-live.ts +99 -0
  23. package/src/cli/access-audio.ts +123 -0
  24. package/src/cli/access-data-client.ts +127 -0
  25. package/src/cli/access-data-plane.ts +104 -0
  26. package/src/cli/access-data-response.ts +76 -0
  27. package/src/cli/access.ts +65 -2
  28. package/src/cli/account-api.ts +30 -6
  29. package/src/cli/account-auth.ts +111 -42
  30. package/src/cli/account-key-quota.ts +118 -0
  31. package/src/cli/account-main.ts +11 -4
  32. package/src/cli/account-next-actions.ts +63 -0
  33. package/src/cli/account-policy-dto.ts +68 -0
  34. package/src/cli/account-policy.ts +167 -0
  35. package/src/cli/account-target.ts +8 -0
  36. package/src/cli/account.ts +34 -8
  37. package/src/cli/agent-runtime-settings.ts +130 -0
  38. package/src/cli/agent-settings.ts +101 -0
  39. package/src/cli/agent.ts +19 -2
  40. package/src/cli/alias.ts +7 -2
  41. package/src/cli/aside-profiles.ts +2 -2
  42. package/src/cli/capabilities-access-remote.ts +147 -0
  43. package/src/cli/capabilities-accounts.ts +195 -0
  44. package/src/cli/capabilities-agents-routing.ts +414 -0
  45. package/src/cli/capabilities-base.ts +783 -0
  46. package/src/cli/capabilities-command.ts +1 -0
  47. package/src/cli/capabilities-integrations.ts +264 -0
  48. package/src/cli/capabilities-lab.ts +214 -0
  49. package/src/cli/capabilities-observe-system.ts +662 -0
  50. package/src/cli/capabilities-provider-models.ts +302 -0
  51. package/src/cli/capabilities.ts +30 -1199
  52. package/src/cli/capability-types.ts +54 -0
  53. package/src/cli/catalog-command-result.ts +57 -0
  54. package/src/cli/chatgpt-command.ts +25 -2
  55. package/src/cli/claude-agent-startup-sync.ts +17 -0
  56. package/src/cli/claude-desktop-profile.ts +100 -0
  57. package/src/cli/claude-desktop.ts +39 -6
  58. package/src/cli/codex-shim-autorestore.ts +2 -1
  59. package/src/cli/codex-shim-readiness.ts +23 -3
  60. package/src/cli/combo-input.ts +88 -0
  61. package/src/cli/combo-result.ts +52 -0
  62. package/src/cli/combo-stats.ts +123 -0
  63. package/src/cli/combo.ts +37 -14
  64. package/src/cli/companion-timeline.ts +142 -0
  65. package/src/cli/companion-usage.ts +146 -0
  66. package/src/cli/companion.ts +12 -3
  67. package/src/cli/config-command.ts +24 -8
  68. package/src/cli/dispatch.ts +52 -79
  69. package/src/cli/doctor.ts +22 -4
  70. package/src/cli/help-catalog.ts +31 -14
  71. package/src/cli/help-recovery.ts +2 -2
  72. package/src/cli/help.ts +25 -11
  73. package/src/cli/index.ts +38 -27
  74. package/src/cli/injection-follow.ts +35 -0
  75. package/src/cli/inspect.ts +5 -0
  76. package/src/cli/integration-aside-sync.ts +69 -0
  77. package/src/cli/integration-cursor.ts +106 -0
  78. package/src/cli/integration-input.ts +60 -0
  79. package/src/cli/integration-journal.ts +49 -0
  80. package/src/cli/integration-plan-dto.ts +156 -0
  81. package/src/cli/integration-preview.ts +215 -0
  82. package/src/cli/integrations.ts +24 -18
  83. package/src/cli/json-input.ts +134 -0
  84. package/src/cli/link.ts +32 -4
  85. package/src/cli/local-sync-result.ts +41 -0
  86. package/src/cli/log-follow.ts +84 -0
  87. package/src/cli/log-view-filter.ts +146 -0
  88. package/src/cli/logout-command.ts +44 -0
  89. package/src/cli/model-picker-ordering.ts +137 -0
  90. package/src/cli/models-custom-input.ts +107 -0
  91. package/src/cli/models-custom-runtime.ts +112 -0
  92. package/src/cli/models-order.ts +194 -0
  93. package/src/cli/models-runtime-subcommands.ts +2 -0
  94. package/src/cli/models-runtime.ts +7 -0
  95. package/src/cli/models.ts +66 -81
  96. package/src/cli/observe-stream.ts +142 -0
  97. package/src/cli/observe.ts +75 -34
  98. package/src/cli/provider-batch.ts +77 -0
  99. package/src/cli/provider-lifecycle-runtime.ts +170 -0
  100. package/src/cli/provider-result.ts +124 -0
  101. package/src/cli/provider-runtime.ts +15 -12
  102. package/src/cli/provider-settings.ts +143 -0
  103. package/src/cli/provider.ts +112 -34
  104. package/src/cli/registry.ts +62 -20
  105. package/src/cli/remote-workspace-hub.ts +83 -0
  106. package/src/cli/remote-workspace.ts +6 -1
  107. package/src/cli/restart-failure.ts +27 -0
  108. package/src/cli/root.ts +12 -0
  109. package/src/cli/route-policy-write.ts +137 -0
  110. package/src/cli/route-policy.ts +8 -0
  111. package/src/cli/runtime-api.ts +56 -79
  112. package/src/cli/secret-args.ts +149 -0
  113. package/src/cli/settings-result.ts +30 -0
  114. package/src/cli/storage.ts +77 -7
  115. package/src/cli/system-command.ts +60 -2
  116. package/src/cli/system-restart-client.ts +20 -3
  117. package/src/cli/system-settings-parity.ts +83 -0
  118. package/src/cli/update-restart-candidate.ts +21 -0
  119. package/src/cli/update-restart-child.ts +81 -0
  120. package/src/cli/update-restart-home.ts +38 -0
  121. package/src/cli/update-restart-transport.ts +193 -0
  122. package/src/cli/update-restart.ts +260 -0
  123. package/src/cli/usage-model-search.ts +58 -0
  124. package/src/cli/usage-report.ts +13 -5
  125. package/src/cli/v2-input.ts +66 -0
  126. package/src/cli/v2-local-output.ts +37 -0
  127. package/src/cli/v2-runtime.ts +90 -0
  128. package/src/cli/v2.ts +102 -144
  129. package/src/clients/config-export/dsh.ts +21 -0
  130. package/src/clients/config-export.ts +7 -1
  131. package/src/codex/catalog/build-entries.ts +1 -1
  132. package/src/codex/catalog/bundled.ts +9 -2
  133. package/src/codex/catalog/heal-observation.ts +66 -0
  134. package/src/codex/catalog/publication-observer.ts +19 -0
  135. package/src/codex/catalog/remote.ts +13 -15
  136. package/src/codex/catalog/restore.ts +19 -6
  137. package/src/codex/catalog/retained-sync.ts +58 -10
  138. package/src/codex/catalog/routed-removal.ts +116 -0
  139. package/src/codex/catalog/write-audit-contract.ts +21 -0
  140. package/src/codex/catalog/write-audit.ts +171 -0
  141. package/src/codex/catalog-self-heal.ts +284 -0
  142. package/src/codex/catalog-write-serialization.ts +71 -7
  143. package/src/codex/codex-home-owner.ts +124 -0
  144. package/src/codex/convergence.ts +55 -15
  145. package/src/codex/features.ts +8 -1
  146. package/src/codex/inject/restore.ts +46 -4
  147. package/src/codex/inject.ts +11 -1
  148. package/src/codex/internal/catalog-writer.ts +120 -13
  149. package/src/codex/journal.ts +49 -13
  150. package/src/codex/management-convergence.ts +3 -0
  151. package/src/codex/quota-types.ts +3 -0
  152. package/src/codex/quota.ts +13 -3
  153. package/src/codex/refresh.ts +20 -9
  154. package/src/codex/runtime.ts +7 -1
  155. package/src/codex/shim-diagnostics.ts +80 -0
  156. package/src/codex/shim-fingerprint.ts +7 -2
  157. package/src/codex/shim-migration.ts +153 -0
  158. package/src/codex/shim-overlay.ts +509 -0
  159. package/src/codex/shim-path-resolution.ts +14 -2
  160. package/src/codex/shim-probe.ts +4 -3
  161. package/src/codex/shim-state-file.ts +93 -7
  162. package/src/codex/shim.ts +15 -68
  163. package/src/codex/sync.ts +24 -4
  164. package/src/combos/failover.ts +19 -0
  165. package/src/combos/index.ts +1 -0
  166. package/src/combos/resolve.ts +12 -0
  167. package/src/config/atomic-write.ts +13 -8
  168. package/src/config/diagnostics.ts +19 -1
  169. package/src/config/load-degrade.ts +3 -0
  170. package/src/config/schema/chatgpt-desktop.ts +22 -0
  171. package/src/config/schema/config-schema.ts +32 -14
  172. package/src/config/schema/leaf-validators.ts +3 -2
  173. package/src/generated/compatibility-version.json +445 -129
  174. package/src/integrations/merge.ts +13 -5
  175. package/src/integrations/mutation-plan.ts +46 -3
  176. package/src/integrations/omp-yaml-source.ts +181 -1
  177. package/src/integrations/ownership-policy.ts +66 -0
  178. package/src/integrations/registry.ts +50 -1
  179. package/src/integrations/state.ts +46 -21
  180. package/src/integrations/target.ts +25 -2
  181. package/src/integrations/writer.ts +89 -31
  182. package/src/lib/package-tree-integrity.ts +42 -1
  183. package/src/lib/proxy-env.ts +3 -0
  184. package/src/lib/test-home-guard.ts +2 -1
  185. package/src/oauth/anthropic-account-refusal.ts +19 -8
  186. package/src/oauth/anthropic-routing.ts +17 -12
  187. package/src/oauth/anthropic.ts +27 -2
  188. package/src/oauth/index.ts +6 -8
  189. package/src/oauth/pool-settings-capability.ts +9 -2
  190. package/src/protocols/plan-snapshot.ts +1 -1
  191. package/src/protocols/settings.ts +28 -4
  192. package/src/server/caller-session-identity.ts +32 -0
  193. package/src/server/claude-messages.ts +11 -4
  194. package/src/server/index/serve-options.ts +12 -7
  195. package/src/server/index.ts +1 -1
  196. package/src/server/management/agent-settings-routes.ts +6 -5
  197. package/src/server/management/context.ts +8 -1
  198. package/src/server/management/cursor-integration-routes.ts +3 -3
  199. package/src/server/management/integration-routes.ts +5 -5
  200. package/src/server/management/model-routes.ts +3 -3
  201. package/src/server/management/native-integration-routes.ts +2 -2
  202. package/src/server/management/oauth-account-routes.ts +96 -30
  203. package/src/server/management/route-registry.ts +25 -24
  204. package/src/server/messages-native-eligibility.ts +3 -6
  205. package/src/server/messages-native-oauth.ts +82 -35
  206. package/src/server/messages-native.ts +78 -16
  207. package/src/server/responses/adapter-dispatch.ts +53 -28
  208. package/src/server/responses/core-auth.ts +10 -4
  209. package/src/server/responses/core-combo.ts +46 -6
  210. package/src/service/cli.ts +6 -1
  211. package/src/service/ownership-mutation-lease.d.mts +26 -0
  212. package/src/service/ownership-mutation-lease.mjs +76 -1
  213. package/src/types/config.ts +2 -0
  214. package/src/types/provider.ts +10 -10
  215. package/src/update/index.ts +2 -1
  216. package/src/update/update-failure-guidance.d.mts +6 -0
  217. package/src/update/update-failure-guidance.mjs +30 -5
  218. package/gui/dist/assets/App-COdEeqSj.css +0 -1
  219. package/gui/dist/assets/App-DEpCJEP_.js +0 -54
  220. package/gui/dist/assets/index-Cd7ittMv.css +0 -1
  221. package/gui/dist/assets/index-DwJKFJm5.js +0 -94
  222. package/gui/dist/assets/quota-summary-DGcEJU3h.js +0 -1
@@ -0,0 +1,662 @@
1
+ import type { Capability } from "./capability-types";
2
+
3
+ /** Verified existing handlers only; local operations never claim management routes. */
4
+ export const OBSERVE_SYSTEM_CAPABILITIES: readonly Capability[] = [
5
+ {"command": ["logs", "filter"], "summary": "Select a bounded log snapshot with dashboard filters.", "usage": "ocx logs filter [--surface <all|codex|claude|grok>] [--model <id>] [--provider <name>] [--status <all|success|errors>] [--time-window <all|15m|1h|24h>] [--min-tok-per-sec <n>] [--max-tok-per-sec <n>] [--intercepted-only] [--protocol-mode <all|native|translated|legacy-bridge|blocked|none>] [--conversation <id>] [--scan-limit <1-2000>] [--limit <1-2000>] [--json|--jsonl]", "routes": [{"method": "GET", "path": "/api/logs"}], "flags": [{"name": "--surface", "value": "string", "summary": "all | codex | claude | grok."}, {"name": "--model", "value": "string", "summary": "Case-insensitive exact identity across requested, resolved, served and attempted models."}, {"name": "--provider", "value": "string", "summary": "Case-insensitive provider or failover attempt identity."}, {"name": "--status", "value": "string", "summary": "all | success (200-299) | errors (400-599)."}, {"name": "--time-window", "value": "string", "summary": "all | 15m | 1h | 24h, relative to observation time."}, {"name": "--min-tok-per-sec", "value": "number", "summary": "Inclusive minimum observed token speed."}, {"name": "--max-tok-per-sec", "value": "number", "summary": "Exclusive maximum observed token speed."}, {"name": "--intercepted-only", "value": "boolean", "summary": "Rows carrying an observed rewrite marker."}, {"name": "--protocol-mode", "value": "string", "summary": "all | native | translated | legacy-bridge | blocked | none."}, {"name": "--conversation", "value": "string", "summary": "Conversation ID or stored hash."}, {"name": "--conversationId", "value": "string", "summary": "Alias of --conversation."}, {"name": "--scan-limit", "value": "number", "summary": "1-2000 raw rows inspected; default 2000."}, {"name": "--limit", "value": "number", "summary": "1-2000 matching rows returned; default 200."}, {"name": "--json", "value": "boolean", "summary": "Versioned view with filters, cursor and observed-window counts."}, {"name": "--jsonl", "value": "boolean", "summary": "Matching rows only; exclusive with --json."}], "mutates": false, "json": "envelope", "details": ["One snapshot: filters run locally over the raw server window before the output limit. No follow/events; existing logs behavior remains available.", "JSON schemaVersion1 reports scanLimit, loaded, matched, returned and limit for this observed window only. Cursor is not a resumable filter token.", "Empty matches succeed; malformed, refused, oversized or unavailable responses fail. SIGINT130/SIGTERM143 preserve cancellation."]},
6
+ {"command": ["observe", "logs", "filter"], "summary": "Select a bounded log snapshot with dashboard filters.", "usage": "ocx observe logs filter [--surface <all|codex|claude|grok>] [--model <id>] [--provider <name>] [--status <all|success|errors>] [--time-window <all|15m|1h|24h>] [--min-tok-per-sec <n>] [--max-tok-per-sec <n>] [--intercepted-only] [--protocol-mode <all|native|translated|legacy-bridge|blocked|none>] [--conversation <id>] [--scan-limit <1-2000>] [--limit <1-2000>] [--json|--jsonl]", "routes": [{"method": "GET", "path": "/api/logs"}], "flags": [{"name": "--surface", "value": "string", "summary": "all | codex | claude | grok."}, {"name": "--model", "value": "string", "summary": "Case-insensitive exact identity across requested, resolved, served and attempted models."}, {"name": "--provider", "value": "string", "summary": "Case-insensitive provider or failover attempt identity."}, {"name": "--status", "value": "string", "summary": "all | success (200-299) | errors (400-599)."}, {"name": "--time-window", "value": "string", "summary": "all | 15m | 1h | 24h, relative to observation time."}, {"name": "--min-tok-per-sec", "value": "number", "summary": "Inclusive minimum observed token speed."}, {"name": "--max-tok-per-sec", "value": "number", "summary": "Exclusive maximum observed token speed."}, {"name": "--intercepted-only", "value": "boolean", "summary": "Rows carrying an observed rewrite marker."}, {"name": "--protocol-mode", "value": "string", "summary": "all | native | translated | legacy-bridge | blocked | none."}, {"name": "--conversation", "value": "string", "summary": "Conversation ID or stored hash."}, {"name": "--conversationId", "value": "string", "summary": "Alias of --conversation."}, {"name": "--scan-limit", "value": "number", "summary": "1-2000 raw rows inspected; default 2000."}, {"name": "--limit", "value": "number", "summary": "1-2000 matching rows returned; default 200."}, {"name": "--json", "value": "boolean", "summary": "Versioned view with filters, cursor and observed-window counts."}, {"name": "--jsonl", "value": "boolean", "summary": "Matching rows only; exclusive with --json."}], "mutates": false, "json": "envelope", "details": ["One snapshot: filters run locally over the raw server window before the output limit. No follow/events; existing logs behavior remains available.", "JSON schemaVersion1 reports scanLimit, loaded, matched, returned and limit for this observed window only. Cursor is not a resumable filter token.", "Empty matches succeed; malformed, refused, oversized or unavailable responses fail. SIGINT130/SIGTERM143 preserve cancellation."]},
7
+ {"command": ["companion", "usage"], "summary": "Read today and 30-day totals using saved companion filters.", "usage": "ocx companion usage [--json]", "routes": [{"method": "GET", "path": "/api/companion/settings"}, {"method": "GET", "path": "/api/usage"}], "flags": [{"name": "--json", "value": "boolean", "summary": "Versioned filtered ranges, settings provenance and partial status."}], "mutates": false, "json": "envelope", "details": ["Reads saved settings then two usage ranges on the same runtime; this is not an atomic snapshot. No connected-client management relay or local fallback.", "Preserves null/default/corrupt settings provenance, missing measurements and incomplete reports. Filters follow saved model and hidden-provider preferences.", "Any unavailable range yields partial:true and exit1 while preserving the other result. Both available yields exit0 even when incomplete. SIGINT130/SIGTERM143 emit no late report."]},
8
+
9
+ {
10
+ command: ["observe","logs"],
11
+ summary: "Read or follow request logs.",
12
+ usage: "ocx observe logs [--provider <name>] [--model <id>] [--status <code>] [--conversation <id>] [--account <label>] [--limit <n>] [--follow] [--json|--jsonl]; ocx observe logs --follow --events [--limit <1-2000>]",
13
+ routes: [{"method":"GET","path":"/api/logs"}],
14
+ flags: [{"name":"--provider","value":"string","summary":"Filter provider, including failover attempts."},{"name":"--model","value":"string","summary":"Filter model, including failover attempts."},{"name":"--status","value":"string","summary":"Filter status code."},{"name":"--conversation","value":"string","summary":"Filter conversation ID."},{"name":"--conversationId","value":"string","summary":"Alias of --conversation."},{"name":"--account","value":"string","summary":"Filter stable account log label."},{"name":"--limit","value":"number","summary":"Positive row limit; default 200."},{"name":"--follow","value":"boolean","summary":"Poll once per second; use --jsonl for streaming."},{"name":"-f","value":"boolean","summary":"Alias of --follow."},{"name":"--json","value":"boolean","summary":"Emit the result as JSON."},{"name":"--jsonl","value":"boolean","summary":"Emit one row per JSON line; exclusive with --json."},{"name":"--events","value":"boolean","summary":"Versioned snapshot/append JSONL; requires --follow, conflicts with --json. Redundant --jsonl is accepted."}],
15
+ mutates: false,
16
+ json: "payload",
17
+ details: ["Follow uses the server cursor and a bounded ordered window, preserving same-ID amendments and repeated row occurrences. It never enables logging.","--events emits version1 snapshots/appends with cursor and limit for observed-window reconstruction. Legacy row JSONL cannot express removals or resets exactly; neither mode promises lossless history between polls.","Follow limit is1–2000, default200. Polling is serial and cancellable; SIGINT exits130 and SIGTERM143. Malformed/oversized/unavailable responses stop without a fabricated empty snapshot or retry."],
18
+ },
19
+ {
20
+ command: ["logs", "explain"], summary: "Explain the recorded routing decision for one request.",
21
+ usage: "ocx logs explain <request-id> [--json]",
22
+ routes: [{"method": "GET", "path": "/api/request-history/{id}/route-decision"}],
23
+ flags: [{"name": "--json", "value": "boolean", "summary": "Emit the result as JSON."}],
24
+ mutates: false, json: "payload",
25
+ details: ["The request ID is URI-encoded; this reads an existing decision and sends no model request.", "Also accepted after observe logs."],
26
+ },
27
+ {
28
+ command: ["logs", "rebuild-index"], summary: "Rebuild the local request-history index.",
29
+ usage: "ocx logs rebuild-index [--json]",
30
+ routes: [],
31
+ flags: [{"name": "--json", "value": "boolean", "summary": "Emit the result as JSON."}],
32
+ mutates: true, json: "payload",
33
+ details: ["Local derived SQLite index rebuild from the canonical ledger; no management API request.", "Also accepted after observe logs."],
34
+ },
35
+ {
36
+ command: ["logs", "index-status"], summary: "Read and refresh local request-history index metadata.",
37
+ usage: "ocx logs index-status [--json]",
38
+ routes: [],
39
+ flags: [{"name": "--json", "value": "boolean", "summary": "Emit the result as JSON."}],
40
+ mutates: true, json: "payload",
41
+ details: ["Local index open may create, ingest or rebuild the derived SQLite index; this is not a write-free file inspection.", "Also accepted after observe logs."],
42
+ },
43
+ {
44
+ command: ["observe","usage"],
45
+ summary: "Read token and estimated-cost usage.",
46
+ usage: "ocx observe usage [--range <today|1d|7d|30d|all>] [--surface <all|codex|claude|grok>] [--since <epoch-ms|ISO-datetime>] [--until <epoch-ms|ISO-datetime>] [--provider <name>] [--model <id>] [--api-key-id <id>] [--search <text>] [--json]",
47
+ routes: [{"method":"GET","path":"/api/usage"}],
48
+ flags: [{"name":"--range","value":"string","summary":"today | 1d | 7d | 30d | all; default 30d."},{"name":"--surface","value":"string","summary":"all | codex | claude | grok; default all."},{"name":"--since","value":"string","summary":"Inclusive epoch milliseconds or ISO datetime with timezone; requires --until."},{"name":"--until","value":"string","summary":"Inclusive end; requires --since. Custom bounds override --range."},{"name":"--provider","value":"string","summary":"Filter provider."},{"name":"--model","value":"string","summary":"Filter model."},{"name":"--json","value":"boolean","summary":"Emit the result as JSON."},{"name":"--api-key-id","value":"string","summary":"Exact nonblank management key scope; connected clients refuse this before reading their enrolled key."},{"name":"--search","value":"string","summary":"Model-row substring view over model/provider/resolvedModel; top100 by tokens. Whole-report totals stay unchanged."}],
49
+ mutates: false,
50
+ json: "payload",
51
+ details: ["Also available as ocx usage. Connected clients read only their enrolled-key Hub report through /v1/usage; caller --api-key-id is refused before key read/transport and never grants management authority.","Nonclient --api-key-id uses /api/usage and requires matching filter acknowledgment. An unknown acknowledged key is empty/matched:false, not404. Custom-window acknowledgment remains required.","--search filters only returned model rows after scope acknowledgment. Blank search selects the top100 model rows; modelView reports match/return counts without recomputing totals."],
52
+ },
53
+ {
54
+ command: ["observe", "storage"], summary: "Read storage diagnostics.",
55
+ usage: "ocx observe storage [--limit <n>] [--json]",
56
+ routes: [{"method": "GET", "path": "/api/storage"}],
57
+ flags: [{"name": "--limit", "value": "number", "summary": "Positive limit forwarded to the endpoint; endpoint semantics apply."}, {"name": "--json", "value": "boolean", "summary": "Emit the result as JSON."}],
58
+ mutates: false, json: "payload",
59
+ details: ["Reads the running proxy management API."],
60
+ },
61
+ {
62
+ command: ["observe", "memory"], summary: "Read memory diagnostics.",
63
+ usage: "ocx observe memory [--limit <n>] [--json]",
64
+ routes: [{"method": "GET", "path": "/api/system/memory"}],
65
+ flags: [{"name": "--limit", "value": "number", "summary": "Positive limit forwarded to the endpoint; endpoint semantics apply."}, {"name": "--json", "value": "boolean", "summary": "Emit the result as JSON."}],
66
+ mutates: false, json: "payload",
67
+ details: ["Reads the running proxy management API."],
68
+ },
69
+ {
70
+ command: ["observe", "debug"], summary: "Read debug diagnostics.",
71
+ usage: "ocx observe debug [--limit <n>] [--json]",
72
+ routes: [{"method": "GET", "path": "/api/debug"}],
73
+ flags: [{"name": "--limit", "value": "number", "summary": "Positive limit forwarded to the endpoint; endpoint semantics apply."}, {"name": "--json", "value": "boolean", "summary": "Emit the result as JSON."}],
74
+ mutates: false, json: "payload",
75
+ details: ["Reads the running proxy management API."],
76
+ },
77
+ {
78
+ command: ["observe", "claude-inbound"], summary: "Read claude-inbound diagnostics.",
79
+ usage: "ocx observe claude-inbound [--limit <n>] [--json]",
80
+ routes: [{"method": "GET", "path": "/api/claude/inbound-debug"}],
81
+ flags: [{"name": "--limit", "value": "number", "summary": "Positive limit forwarded to the endpoint; endpoint semantics apply."}, {"name": "--json", "value": "boolean", "summary": "Emit the result as JSON."}],
82
+ mutates: false, json: "payload",
83
+ details: ["Snapshot read; no follow or cursor option."],
84
+ },
85
+ {
86
+ command: ["observe","injection"],
87
+ summary: "Read or follow the existing injection diagnostic buffer.",
88
+ usage: "ocx observe injection [--limit <n>] [--json]; ocx observe injection --follow [--limit <1-2000>] [--jsonl]",
89
+ routes: [{"method":"GET","path":"/api/debug/injection-logs"}],
90
+ flags: [{"name":"--limit","value":"number","summary":"Follow1–2000, default500; one-shot retains its existing positive endpoint limit."},{"name":"--follow","value":"boolean","summary":"Follow increasing observed sequence values without enabling capture."},{"name":"--jsonl","value":"boolean","summary":"Follow only: emit one diagnostic row per line."},{"name":"--json","value":"boolean","summary":"Emit the command result as JSON."}],
91
+ mutates: false,
92
+ json: "payload",
93
+ details: ["--json stays one-shot; --jsonl requires --follow. Empty polls stay silent and do not prove capture is disabled.","The API has no epoch or gap marker. Detected runtime changes stop with restart-follow guidance; undetected restarts and burst/ring loss cannot be excluded. No settings writes or automatic reconnect.","SIGINT130/SIGTERM143 cancel request/body/wait and release invocation resources."],
94
+ },
95
+ {
96
+ command: ["memory"], summary: "Read runtime memory and active-turn diagnostics.",
97
+ usage: "ocx memory [--limit <n>] [--json]",
98
+ routes: [{"method": "GET", "path": "/api/system/memory"}],
99
+ flags: [{"name": "--limit", "value": "number", "summary": "Positive limit forwarded to the endpoint."}, {"name": "--json", "value": "boolean", "summary": "Emit the result as JSON."}],
100
+ mutates: false, json: "payload",
101
+ details: ["Alias of observe memory."],
102
+ },
103
+ {
104
+ command: ["storage", "codex-logs", "status"], summary: "Inspect Codex Log Guard state.",
105
+ usage: "ocx storage codex-logs status [--json]",
106
+ routes: [{"method": "GET", "path": "/api/storage/codex-logs"}],
107
+ flags: [{"name": "--json", "value": "boolean", "summary": "Emit the result as JSON."}],
108
+ mutates: false, json: "payload",
109
+ details: ["Also accepted after observe storage codex-logs. Omitted action defaults to status."],
110
+ },
111
+ {
112
+ command: ["storage", "codex-logs", "protect"], summary: "Protect Codex logs in compat or quiet mode.",
113
+ usage: "ocx storage codex-logs protect [--mode <compat|quiet>] [--json]",
114
+ routes: [{"method": "POST", "path": "/api/storage/codex-logs/protect"}],
115
+ flags: [{"name": "--mode", "value": "string", "summary": "compat | quiet; default compat."}, {"name": "--json", "value": "boolean", "summary": "Emit the result as JSON."}],
116
+ mutates: true, json: "payload",
117
+ details: ["Also accepted after observe storage codex-logs. Mutates logs or their protection immediately; this handler has no --yes option."],
118
+ },
119
+ {
120
+ command: ["storage", "codex-logs", "unprotect"], summary: "Remove Codex log protection.",
121
+ usage: "ocx storage codex-logs unprotect [--json]",
122
+ routes: [{"method": "POST", "path": "/api/storage/codex-logs/unprotect"}],
123
+ flags: [{"name": "--json", "value": "boolean", "summary": "Emit the result as JSON."}],
124
+ mutates: true, json: "payload",
125
+ details: ["Also accepted after observe storage codex-logs. Mutates logs or their protection immediately; this handler has no --yes option."],
126
+ },
127
+ {
128
+ command: ["storage", "codex-logs", "repair"], summary: "Repair Codex log protection.",
129
+ usage: "ocx storage codex-logs repair [--json]",
130
+ routes: [{"method": "POST", "path": "/api/storage/codex-logs/repair"}],
131
+ flags: [{"name": "--json", "value": "boolean", "summary": "Emit the result as JSON."}],
132
+ mutates: true, json: "payload",
133
+ details: ["Also accepted after observe storage codex-logs. Mutates logs or their protection immediately; this handler has no --yes option."],
134
+ },
135
+ {
136
+ command: ["storage", "codex-logs", "compact"], summary: "Compact Codex logs.",
137
+ usage: "ocx storage codex-logs compact [--json]",
138
+ routes: [{"method": "POST", "path": "/api/storage/codex-logs/compact"}],
139
+ flags: [{"name": "--json", "value": "boolean", "summary": "Emit the result as JSON."}],
140
+ mutates: true, json: "payload",
141
+ details: ["Also accepted after observe storage codex-logs. Mutates logs or their protection immediately; this handler has no --yes option."],
142
+ },
143
+ {
144
+ command: ["storage", "trash", "list"], summary: "Read quarantine batches.",
145
+ usage: "ocx storage trash list [--json]",
146
+ routes: [{"method": "GET", "path": "/api/storage/trash"}],
147
+ flags: [{"name": "--json", "value": "boolean", "summary": "Emit the result as JSON."}],
148
+ mutates: false, json: "payload",
149
+ details: [],
150
+ },
151
+ {
152
+ command: ["storage", "policy", "show"], summary: "Read cleanup policy and job state.",
153
+ usage: "ocx storage policy show [--json]",
154
+ routes: [{"method": "GET", "path": "/api/storage/cleanup-policy"}],
155
+ flags: [{"name": "--json", "value": "boolean", "summary": "Emit the result as JSON."}],
156
+ mutates: false, json: "payload",
157
+ details: [],
158
+ },
159
+ {
160
+ command: ["storage", "trash", "restore"], summary: "Restore one quarantined session batch.",
161
+ usage: "ocx storage trash restore <entry-id> --yes [--json]",
162
+ routes: [{"method": "POST", "path": "/api/storage/trash/restore"}],
163
+ flags: [{"name": "--yes", "value": "boolean", "summary": "Required confirmation before restoring stored sessions.", "required": true}, {"name": "--json", "value": "boolean", "summary": "Emit the result as JSON."}],
164
+ mutates: true, json: "payload",
165
+ details: ["Moves files and reconciles database rows; partial outcomes remain in the response."],
166
+ },
167
+ {
168
+ command: ["storage","policy","set"],
169
+ summary: "Save submitted cleanup policy fields.",
170
+ usage: "ocx storage policy set [--enabled <true|false>] [--archived-bytes-over <bytes>] [--reduce-to-bytes <bytes> | --remove-oldest-percent <1-100> | --percent <1-100>] [--mode <quarantine|permanent>] [--schedule <startup|daily|weekly|manual>] [--json]",
171
+ routes: [{"method":"PUT","path":"/api/storage/cleanup-policy"}],
172
+ flags: [{"name":"--enabled","value":"string","summary":"true | false."},{"name":"--percent","value":"number","summary":"Oldest archived-session percentage; server validates the 1-100 policy range."},{"name":"--mode","value":"string","summary":"quarantine | permanent."},{"name":"--schedule","value":"string","summary":"startup | daily | weekly | manual."},{"name":"--json","value":"boolean","summary":"Emit the result as JSON."},{"name":"--archived-bytes-over","value":"number","summary":"Nonnegative safe integer byte trigger; zero is valid."},{"name":"--reduce-to-bytes","value":"number","summary":"Nonnegative safe integer cleanup target, exclusive with either percentage spelling."},{"name":"--remove-oldest-percent","value":"number","summary":"Canonical integer percentage spelling; mutually exclusive with --percent and byte target."}],
173
+ mutates: true,
174
+ json: "payload",
175
+ details: ["Only supplied fields are written. Omitted enabled/mode/schedule remain unchanged; setting a policy does not run cleanup or implicitly enable it.","Both percentage spellings use integer CLI grammar and server range validation. The alias cannot be combined with the canonical percentage flag."],
176
+ },
177
+ {
178
+ command: ["storage", "policy", "run"], summary: "Run the stored cleanup policy immediately.",
179
+ usage: "ocx storage policy run --yes [--json]",
180
+ routes: [{"method": "POST", "path": "/api/storage/cleanup-policy/run"}],
181
+ flags: [{"name": "--yes", "value": "boolean", "summary": "Required confirmation for immediate archived-session cleanup.", "required": true}, {"name": "--json", "value": "boolean", "summary": "Emit the result as JSON."}],
182
+ mutates: true, json: "payload",
183
+ details: ["Run acceptance is not completion; inspect storage policy show for job state."],
184
+ },
185
+ {
186
+ command: ["debug", "provider"], summary: "Read or change the provider debug override.",
187
+ usage: "ocx debug provider [status|on|off|reset]",
188
+ routes: [{"method": "GET", "path": "/api/debug"}, {"method": "PUT", "path": "/api/debug"}],
189
+ flags: [],
190
+ mutates: true, json: "none",
191
+ details: ["Mixed family: omitted action/status reads; on/off/reset change runtime overrides. No JSON mode.", "Reset follows the environment default. Logs have a separate child command."],
192
+ },
193
+ {
194
+ command: ["debug", "provider", "status"], summary: "Read provider debug state.",
195
+ usage: "ocx debug provider status",
196
+ routes: [{"method": "GET", "path": "/api/debug"}],
197
+ flags: [],
198
+ mutates: false, json: "none",
199
+ details: ["Requires a running proxy; legacy text output only."],
200
+ },
201
+ {
202
+ command: ["debug", "provider", "on"], summary: "Set provider debug override on.",
203
+ usage: "ocx debug provider on",
204
+ routes: [{"method": "PUT", "path": "/api/debug"}],
205
+ flags: [],
206
+ mutates: true, json: "none",
207
+ details: ["Requires a running proxy; legacy text output only."],
208
+ },
209
+ {
210
+ command: ["debug", "provider", "off"], summary: "Set provider debug override off.",
211
+ usage: "ocx debug provider off",
212
+ routes: [{"method": "PUT", "path": "/api/debug"}],
213
+ flags: [],
214
+ mutates: true, json: "none",
215
+ details: ["Requires a running proxy; legacy text output only."],
216
+ },
217
+ {
218
+ command: ["debug", "provider", "reset"], summary: "Set provider debug override reset.",
219
+ usage: "ocx debug provider reset",
220
+ routes: [{"method": "PUT", "path": "/api/debug"}],
221
+ flags: [],
222
+ mutates: true, json: "none",
223
+ details: ["Requires a running proxy; legacy text output only."],
224
+ },
225
+ {
226
+ command: ["debug", "provider", "logs"], summary: "Read or follow provider debug log lines.",
227
+ usage: "ocx debug provider logs [-f|--follow]",
228
+ routes: [{"method": "GET", "path": "/api/debug/logs"}],
229
+ flags: [{"name": "-f", "value": "boolean", "summary": "Follow new sequence numbers."}, {"name": "--follow", "value": "boolean", "summary": "Alias of -f."}],
230
+ mutates: false, json: "none",
231
+ details: ["Text lines only; initial limit 500, then sequence-based polling."],
232
+ },
233
+ {
234
+ command: ["debug", "usage"], summary: "Read or change the usage debug override.",
235
+ usage: "ocx debug usage [status|on|off|reset]",
236
+ routes: [{"method": "GET", "path": "/api/debug"}, {"method": "PUT", "path": "/api/debug"}],
237
+ flags: [],
238
+ mutates: true, json: "none",
239
+ details: ["Mixed family: omitted action/status reads; on/off/reset change runtime overrides. No JSON mode.", "Reset follows the environment default. Logs have a separate child command."],
240
+ },
241
+ {
242
+ command: ["debug", "usage", "status"], summary: "Read usage debug state.",
243
+ usage: "ocx debug usage status",
244
+ routes: [{"method": "GET", "path": "/api/debug"}],
245
+ flags: [],
246
+ mutates: false, json: "none",
247
+ details: ["Requires a running proxy; legacy text output only."],
248
+ },
249
+ {
250
+ command: ["debug", "usage", "on"], summary: "Set usage debug override on.",
251
+ usage: "ocx debug usage on",
252
+ routes: [{"method": "PUT", "path": "/api/debug"}],
253
+ flags: [],
254
+ mutates: true, json: "none",
255
+ details: ["Requires a running proxy; legacy text output only."],
256
+ },
257
+ {
258
+ command: ["debug", "usage", "off"], summary: "Set usage debug override off.",
259
+ usage: "ocx debug usage off",
260
+ routes: [{"method": "PUT", "path": "/api/debug"}],
261
+ flags: [],
262
+ mutates: true, json: "none",
263
+ details: ["Requires a running proxy; legacy text output only."],
264
+ },
265
+ {
266
+ command: ["debug", "usage", "reset"], summary: "Set usage debug override reset.",
267
+ usage: "ocx debug usage reset",
268
+ routes: [{"method": "PUT", "path": "/api/debug"}],
269
+ flags: [],
270
+ mutates: true, json: "none",
271
+ details: ["Requires a running proxy; legacy text output only."],
272
+ },
273
+ {
274
+ command: ["debug", "usage", "logs"], summary: "Read or follow usage debug log lines.",
275
+ usage: "ocx debug usage logs [-f|--follow]",
276
+ routes: [{"method": "GET", "path": "/api/debug/usage-logs"}],
277
+ flags: [{"name": "-f", "value": "boolean", "summary": "Follow new sequence numbers."}, {"name": "--follow", "value": "boolean", "summary": "Alias of -f."}],
278
+ mutates: false, json: "none",
279
+ details: ["Text lines only; initial limit 500, then sequence-based polling."],
280
+ },
281
+ {
282
+ command: ["debug", "injection"], summary: "Read or change the injection debug override.",
283
+ usage: "ocx debug injection [status|on|off|reset]",
284
+ routes: [{"method": "GET", "path": "/api/debug"}, {"method": "PUT", "path": "/api/debug"}],
285
+ flags: [],
286
+ mutates: true, json: "none",
287
+ details: ["Mixed family: omitted action/status reads; on/off/reset change runtime overrides. No JSON mode.", "Reset follows the environment default. Buffered reads use observe injection."],
288
+ },
289
+ {
290
+ command: ["debug", "injection", "status"], summary: "Read injection debug state.",
291
+ usage: "ocx debug injection status",
292
+ routes: [{"method": "GET", "path": "/api/debug"}],
293
+ flags: [],
294
+ mutates: false, json: "none",
295
+ details: ["Requires a running proxy; legacy text output only."],
296
+ },
297
+ {
298
+ command: ["debug", "injection", "on"], summary: "Set injection debug override on.",
299
+ usage: "ocx debug injection on",
300
+ routes: [{"method": "PUT", "path": "/api/debug"}],
301
+ flags: [],
302
+ mutates: true, json: "none",
303
+ details: ["Requires a running proxy; legacy text output only."],
304
+ },
305
+ {
306
+ command: ["debug", "injection", "off"], summary: "Set injection debug override off.",
307
+ usage: "ocx debug injection off",
308
+ routes: [{"method": "PUT", "path": "/api/debug"}],
309
+ flags: [],
310
+ mutates: true, json: "none",
311
+ details: ["Requires a running proxy; legacy text output only."],
312
+ },
313
+ {
314
+ command: ["debug", "injection", "reset"], summary: "Set injection debug override reset.",
315
+ usage: "ocx debug injection reset",
316
+ routes: [{"method": "PUT", "path": "/api/debug"}],
317
+ flags: [],
318
+ mutates: true, json: "none",
319
+ details: ["Requires a running proxy; legacy text output only."],
320
+ },
321
+ {
322
+ command: ["debug", "claude"], summary: "Read or change the claude debug override.",
323
+ usage: "ocx debug claude [status|on|off|reset]",
324
+ routes: [{"method": "GET", "path": "/api/debug"}, {"method": "PUT", "path": "/api/debug"}],
325
+ flags: [],
326
+ mutates: true, json: "none",
327
+ details: ["Mixed family: omitted action/status reads; on/off/reset change runtime overrides. No JSON mode.", "Reset follows the environment default. Buffered reads use observe claude-inbound."],
328
+ },
329
+ {
330
+ command: ["debug", "claude", "status"], summary: "Read claude debug state.",
331
+ usage: "ocx debug claude status",
332
+ routes: [{"method": "GET", "path": "/api/debug"}],
333
+ flags: [],
334
+ mutates: false, json: "none",
335
+ details: ["Requires a running proxy; legacy text output only."],
336
+ },
337
+ {
338
+ command: ["debug", "claude", "on"], summary: "Set claude debug override on.",
339
+ usage: "ocx debug claude on",
340
+ routes: [{"method": "PUT", "path": "/api/debug"}],
341
+ flags: [],
342
+ mutates: true, json: "none",
343
+ details: ["Requires a running proxy; legacy text output only."],
344
+ },
345
+ {
346
+ command: ["debug", "claude", "off"], summary: "Set claude debug override off.",
347
+ usage: "ocx debug claude off",
348
+ routes: [{"method": "PUT", "path": "/api/debug"}],
349
+ flags: [],
350
+ mutates: true, json: "none",
351
+ details: ["Requires a running proxy; legacy text output only."],
352
+ },
353
+ {
354
+ command: ["debug", "claude", "reset"], summary: "Set claude debug override reset.",
355
+ usage: "ocx debug claude reset",
356
+ routes: [{"method": "PUT", "path": "/api/debug"}],
357
+ flags: [],
358
+ mutates: true, json: "none",
359
+ details: ["Requires a running proxy; legacy text output only."],
360
+ },
361
+ {
362
+ command: ["system", "status"], summary: "Read settings, startup health and memory together.",
363
+ usage: "ocx system status [--json]",
364
+ routes: [{"method": "GET", "path": "/api/settings"}, {"method": "GET", "path": "/api/startup-health"}, {"method": "GET", "path": "/api/system/memory"}],
365
+ flags: [{"name": "--json", "value": "boolean", "summary": "Emit the result as JSON."}],
366
+ mutates: false, json: "envelope",
367
+ details: ["Default system action. The CLI bundles three payloads; this does not call /api/system/health."],
368
+ },
369
+ {
370
+ command: ["system","settings"],
371
+ summary: "Read or update supported runtime settings.",
372
+ usage: "ocx system settings [--auto-start <on|off>] [--stream-mode <auto|legacy-tee|eager-relay>] [--desktop-authless <on|off>] [--client-compaction <on|off>] [--show-codex-credits <on|off>] [--account-picker <on|off>] [--main-account-hard-lock <on|off>] [--ultra-fast-tier <on|off>] [--fast-rows <on|off>] [--json]",
373
+ routes: [{"method":"GET","path":"/api/settings"},{"method":"PUT","path":"/api/settings"}],
374
+ flags: [{"name":"--auto-start","value":"string","summary":"on | off for Codex autostart."},{"name":"--stream-mode","value":"string","summary":"auto | legacy-tee | eager-relay."},{"name":"--desktop-authless","value":"string","summary":"on | off for Codex Desktop authless."},{"name":"--client-compaction","value":"string","summary":"on | off for native replay portability; summaries may consume provider quota."},{"name":"--json","value":"boolean","summary":"Emit the result as JSON."},{"name":"--show-codex-credits","value":"string","summary":"on/off display preference only; never paid-credit permission."},{"name":"--account-picker","value":"string","summary":"on/off Codex account picker visibility."},{"name":"--main-account-hard-lock","value":"string","summary":"on/off routing ownership policy; does not rotate native login."},{"name":"--ultra-fast-tier","value":"string","summary":"on/off routing tier; confirmed by same-target read-back."},{"name":"--fast-rows","value":"string","summary":"on/off Fast model rows, separate from provider Fast."}],
375
+ mutates: true,
376
+ json: "envelope",
377
+ details: ["Mixed read/write: no setting flags reads; setting flags write only submitted fields. Stored, effective and config-apply states can differ.","New-option writes use narrow fields and actual observed values. ultraFastTier is read back because the PUT response omits it; missing/mismatching evidence stays saved-but-unverified and nonzero.","catalogRefreshPending is not a full catalog disposition. Native apply can remain deferred/refused separately. Old no-new-option settings output remains compatible."],
378
+ },
379
+ {
380
+ command: ["system", "startup", "health"], summary: "Read startup protection.",
381
+ usage: "ocx system startup health [--json]",
382
+ routes: [{"method": "GET", "path": "/api/startup-health"}],
383
+ flags: [{"name": "--json", "value": "boolean", "summary": "Emit the result as JSON."}],
384
+ mutates: false, json: "payload",
385
+ details: ["health is the default; status is its alias."],
386
+ },
387
+ {
388
+ command: ["system", "startup", "install-service"], summary: "Request startup install-service.",
389
+ usage: "ocx system startup install-service [--json]",
390
+ routes: [{"method": "POST", "path": "/api/startup-action"}],
391
+ flags: [{"name": "--json", "value": "boolean", "summary": "Emit the result as JSON."}],
392
+ mutates: true, json: "payload",
393
+ details: ["The server invokes the platform-local service repair or shim installation and reports its outcome."],
394
+ },
395
+ {
396
+ command: ["system", "startup", "install-shim"], summary: "Request startup install-shim.",
397
+ usage: "ocx system startup install-shim [--json]",
398
+ routes: [{"method": "POST", "path": "/api/startup-action"}],
399
+ flags: [{"name": "--json", "value": "boolean", "summary": "Emit the result as JSON."}],
400
+ mutates: true, json: "payload",
401
+ details: ["The server invokes the platform-local service repair or shim installation and reports its outcome."],
402
+ },
403
+ {
404
+ command: ["system", "diagnostics"], summary: "Read project-config diagnostics.",
405
+ usage: "ocx system diagnostics [--json]",
406
+ routes: [{"method": "GET", "path": "/api/diagnostics/project-config"}],
407
+ flags: [{"name": "--json", "value": "boolean", "summary": "Emit the result as JSON."}],
408
+ mutates: false, json: "payload",
409
+ details: ["Runs against the serving proxy; inspect the returned saved/applied or failure result."],
410
+ },
411
+ {
412
+ command: ["system", "sync"], summary: "Synchronize client catalogs and configuration.",
413
+ usage: "ocx system sync [--json]",
414
+ routes: [{"method": "POST", "path": "/api/sync"}],
415
+ flags: [{"name": "--json", "value": "boolean", "summary": "Emit the result as JSON."}],
416
+ mutates: true, json: "payload",
417
+ details: ["Runs against the serving proxy; inspect the returned saved/applied or failure result."],
418
+ },
419
+ {
420
+ command: ["system", "update", "check"], summary: "Check the package update channel.",
421
+ usage: "ocx system update check [--channel <latest|preview>] [--json]",
422
+ routes: [{"method": "GET", "path": "/api/update/check"}],
423
+ flags: [{"name": "--channel", "value": "string", "summary": "latest | preview; default latest."}, {"name": "--json", "value": "boolean", "summary": "Emit the result as JSON."}],
424
+ mutates: false, json: "payload",
425
+ details: ["Checks registry availability; does not install."],
426
+ },
427
+ {
428
+ command: ["system", "update", "run"], summary: "Start a package update job.",
429
+ usage: "ocx system update run [--channel <latest|preview>] [--restart <on|off>] --yes [--json]",
430
+ routes: [{"method": "POST", "path": "/api/update/run"}],
431
+ flags: [{"name": "--channel", "value": "string", "summary": "latest | preview; default latest."}, {"name": "--restart", "value": "string", "summary": "on | off; default on."}, {"name": "--yes", "value": "boolean", "summary": "Required confirmation for package update.", "required": true}, {"name": "--json", "value": "boolean", "summary": "Emit the result as JSON."}],
432
+ mutates: true, json: "payload",
433
+ details: ["Installs software and may restart the proxy. Acceptance is not completion; inspect system update status with the returned job ID."],
434
+ },
435
+ {
436
+ command: ["system", "update", "status"], summary: "Read one package update job.",
437
+ usage: "ocx system update status <job-id> [--json]",
438
+ routes: [{"method": "GET", "path": "/api/update/status"}],
439
+ flags: [{"name": "--json", "value": "boolean", "summary": "Emit the result as JSON."}],
440
+ mutates: false, json: "payload",
441
+ details: [],
442
+ },
443
+ {
444
+ command: ["config", "show"], summary: "Local configuration show.",
445
+ usage: "ocx config show [--json] [--source]",
446
+ routes: [],
447
+ flags: [{"name": "--source", "value": "boolean", "summary": "Include source diagnostics."}, {"name": "--json", "value": "boolean", "summary": "Emit the result as JSON."}],
448
+ mutates: false, json: "envelope",
449
+ details: ["Local config/file operation; no management API request or automatic live convergence.", "Displayed credential values are masked.", "Always emits JSON; --source wraps config with source/error/warnings. Default action when omitted."],
450
+ },
451
+ {
452
+ command: ["config", "get"], summary: "Local configuration get.",
453
+ usage: "ocx config get <dot.path> [--json]",
454
+ routes: [],
455
+ flags: [{"name": "--json", "value": "boolean", "summary": "Emit the result as JSON."}],
456
+ mutates: false, json: "payload",
457
+ details: ["Local config/file operation; no management API request or automatic live convergence.", "Displayed credential values are masked."],
458
+ },
459
+ {
460
+ command: ["config", "set"], summary: "Local configuration set.",
461
+ usage: "ocx config set <dot.path> <json-or-string> [--json]",
462
+ routes: [],
463
+ flags: [{"name": "--json", "value": "boolean", "summary": "Emit the result as JSON."}],
464
+ mutates: true, json: "envelope",
465
+ details: ["Local config/file operation; no management API request or automatic live convergence.", "Displayed credential values are masked."],
466
+ },
467
+ {
468
+ command: ["config", "unset"], summary: "Local configuration unset.",
469
+ usage: "ocx config unset <dot.path> [--json]",
470
+ routes: [],
471
+ flags: [{"name": "--json", "value": "boolean", "summary": "Emit the result as JSON."}],
472
+ mutates: true, json: "envelope",
473
+ details: ["Local config/file operation; no management API request or automatic live convergence."],
474
+ },
475
+ {
476
+ command: ["config", "validate"], summary: "Local configuration validate.",
477
+ usage: "ocx config validate [path|-] [--json]",
478
+ routes: [],
479
+ flags: [{"name": "--json", "value": "boolean", "summary": "Emit the result as JSON."}],
480
+ mutates: false, json: "envelope",
481
+ details: ["Local config/file operation; no management API request or automatic live convergence."],
482
+ },
483
+ {
484
+ command: ["config", "export"], summary: "Raw configuration export with an optional JSON file receipt.",
485
+ routes: [],
486
+ flags: [{"name": "--json", "value": "boolean", "summary": "Emit a JSON receipt for a file destination; stdout export stays raw."}],
487
+ mutates: true, json: "payload",
488
+ details: ["Local config/file operation; no management API request or automatic live convergence.", "Human-only secret-bearing export: raw credentials are included. Keep the file and stdout out of agent transcripts. --json emits {ok:true,path} for a file destination; export to - always emits the raw config."],
489
+ },
490
+ {
491
+ command: ["config", "import"], summary: "Local configuration import.",
492
+ usage: "ocx config import <path|-> --yes [--json]",
493
+ routes: [],
494
+ flags: [{"name": "--yes", "value": "boolean", "summary": "Required confirmation before replacing local config.", "required": true}, {"name": "--json", "value": "boolean", "summary": "Emit the result as JSON."}],
495
+ mutates: true, json: "envelope",
496
+ details: ["Local config/file operation; no management API request or automatic live convergence.", "Replaces local configuration after schema validation; requires --yes. Restart or explicitly sync if needed."],
497
+ },
498
+ {
499
+ command: ["companion", "show"], summary: "Read companion settings, defaults and presence.",
500
+ usage: "ocx companion show [--json]",
501
+ routes: [{"method": "GET", "path": "/api/companion/settings"}],
502
+ flags: [{"name": "--json", "value": "boolean", "summary": "Emit the result as JSON."}],
503
+ mutates: false, json: "payload",
504
+ details: ["Settings only; no usage timeline request."],
505
+ },
506
+ {
507
+ command: ["companion", "set"], summary: "Save selected companion settings.",
508
+ usage: "ocx companion set <key>=<value> [...] [--json]",
509
+ routes: [{"method": "PUT", "path": "/api/companion/settings"}],
510
+ flags: [{"name": "--json", "value": "boolean", "summary": "Emit the result as JSON."}],
511
+ mutates: true, json: "payload",
512
+ details: ["Values are parsed as JSON when valid, otherwise as strings."],
513
+ },
514
+ {
515
+ command: ["companion", "reset"], summary: "Restore companion defaults.",
516
+ usage: "ocx companion reset [--json]",
517
+ routes: [{"method": "PUT", "path": "/api/companion/settings"}],
518
+ flags: [{"name": "--json", "value": "boolean", "summary": "Emit the result as JSON."}],
519
+ mutates: true, json: "payload",
520
+ details: ["Settings only; no usage timeline request."],
521
+ },
522
+ {
523
+ command: ["service", "install"], summary: "Install the local background service.",
524
+ usage: "ocx service install [--native|--scheduler]",
525
+ routes: [],
526
+ flags: [{"name": "--native", "value": "boolean", "summary": "Windows WinSW backend; exclusive with --scheduler."}, {"name": "--scheduler", "value": "boolean", "summary": "Scheduled backend; exclusive with --native."}],
527
+ mutates: true, json: "none",
528
+ details: ["Local OS service manager: macOS launchd, Linux systemd, Windows Task Scheduler or WinSW. No management API or JSON mode.", "Backend options apply only to install; other verbs use the installed backend."],
529
+ },
530
+ {
531
+ command: ["service", "repair"], summary: "Repair local service registration and verify serving health.",
532
+ usage: "ocx service repair",
533
+ routes: [],
534
+ flags: [],
535
+ mutates: true, json: "none",
536
+ details: ["Local OS service manager: macOS launchd, Linux systemd, Windows Task Scheduler or WinSW. No management API or JSON mode.", "Backend options apply only to install; other verbs use the installed backend."],
537
+ },
538
+ {
539
+ command: ["service", "restart"], summary: "Restart the local background service.",
540
+ usage: "ocx service restart",
541
+ routes: [],
542
+ flags: [],
543
+ mutates: true, json: "none",
544
+ details: ["Local OS service manager: macOS launchd, Linux systemd, Windows Task Scheduler or WinSW. No management API or JSON mode.", "Backend options apply only to install; other verbs use the installed backend."],
545
+ },
546
+ {
547
+ command: ["service", "start"], summary: "Start the registered local service.",
548
+ usage: "ocx service start",
549
+ routes: [],
550
+ flags: [],
551
+ mutates: true, json: "none",
552
+ details: ["Local OS service manager: macOS launchd, Linux systemd, Windows Task Scheduler or WinSW. No management API or JSON mode.", "Backend options apply only to install; other verbs use the installed backend."],
553
+ },
554
+ {
555
+ command: ["service", "stop"], summary: "Stop the registered local service.",
556
+ usage: "ocx service stop",
557
+ routes: [],
558
+ flags: [],
559
+ mutates: true, json: "none",
560
+ details: ["Local OS service manager: macOS launchd, Linux systemd, Windows Task Scheduler or WinSW. No management API or JSON mode.", "Backend options apply only to install; other verbs use the installed backend."],
561
+ },
562
+ {
563
+ command: ["service", "status"], summary: "Inspect local service-manager status.",
564
+ usage: "ocx service status",
565
+ routes: [],
566
+ flags: [],
567
+ mutates: false, json: "none",
568
+ details: ["Local OS service manager: macOS launchd, Linux systemd, Windows Task Scheduler or WinSW. No management API or JSON mode.", "Backend options apply only to install; other verbs use the installed backend."],
569
+ },
570
+ {
571
+ command: ["service", "uninstall"], summary: "Uninstall the local service.",
572
+ usage: "ocx service uninstall",
573
+ routes: [],
574
+ flags: [],
575
+ mutates: true, json: "none",
576
+ details: ["Local OS service manager: macOS launchd, Linux systemd, Windows Task Scheduler or WinSW. No management API or JSON mode.", "remove is an alias for uninstall."],
577
+ },
578
+ {
579
+ command: ["codex-shim", "install"], summary: "Local Codex launcher shim install.",
580
+ usage: "ocx codex-shim install",
581
+ routes: [],
582
+ flags: [],
583
+ mutates: true, json: "none",
584
+ details: ["Local launcher/PATH wrapper operation on macOS, Linux and Windows; no management API or JSON mode.", "On macOS/Linux, installs the private PATH overlay and explicitly migrates legacy in-place shims; automatic repair does not migrate them.", "On macOS/Linux with sh/bash/zsh, source the printed codex-shell-env.sh path, then add that line after PATH setup in your shell startup file.", "Installation diagnoses wrapper health and reports readiness warnings; Windows keeps in-place wrappers."],
585
+ },
586
+ {
587
+ command: ["codex-shim", "status"], summary: "Local Codex launcher shim status.",
588
+ usage: "ocx codex-shim status",
589
+ routes: [],
590
+ flags: [],
591
+ mutates: false, json: "none",
592
+ details: ["Local launcher/PATH wrapper operation on macOS, Linux and Windows; no management API or JSON mode.", "Reports wrapper health, Unix overlay PATH activation, and explicit legacy migration guidance.", "For JSON, run ocx status --json and inspect codexShim; this command rejects --json and unexpected arguments."],
593
+ },
594
+ {
595
+ command: ["codex-shim", "uninstall"], summary: "Local Codex launcher shim uninstall.",
596
+ usage: "ocx codex-shim uninstall",
597
+ routes: [],
598
+ flags: [],
599
+ mutates: true, json: "none",
600
+ details: ["Local launcher/PATH wrapper operation on macOS, Linux and Windows; no management API or JSON mode.", "remove aliases uninstall."],
601
+ },
602
+ {
603
+ command: ["tray", "install"], summary: "Windows tray install.",
604
+ usage: "ocx tray install [--no-start] [--json]",
605
+ routes: [],
606
+ flags: [{"name": "--no-start", "value": "boolean", "summary": "Install without starting the tray."}, {"name": "--json", "value": "boolean", "summary": "Emit the result as JSON."}],
607
+ mutates: true, json: "envelope",
608
+ details: ["Local Windows-only tray lifecycle; no management API. Status on other platforms reports unsupported.", "Lifecycle writes require Windows."],
609
+ },
610
+ {
611
+ command: ["tray", "start"], summary: "Windows tray start.",
612
+ usage: "ocx tray start [--json]",
613
+ routes: [],
614
+ flags: [{"name": "--json", "value": "boolean", "summary": "Emit the result as JSON."}],
615
+ mutates: true, json: "envelope",
616
+ details: ["Local Windows-only tray lifecycle; no management API. Status on other platforms reports unsupported.", "Lifecycle writes require Windows."],
617
+ },
618
+ {
619
+ command: ["tray", "stop"], summary: "Windows tray stop.",
620
+ usage: "ocx tray stop [--json]",
621
+ routes: [],
622
+ flags: [{"name": "--json", "value": "boolean", "summary": "Emit the result as JSON."}],
623
+ mutates: true, json: "envelope",
624
+ details: ["Local Windows-only tray lifecycle; no management API. Status on other platforms reports unsupported.", "Lifecycle writes require Windows."],
625
+ },
626
+ {
627
+ command: ["tray", "status"], summary: "Windows tray status.",
628
+ usage: "ocx tray status [--json]",
629
+ routes: [],
630
+ flags: [{"name": "--json", "value": "boolean", "summary": "Emit the result as JSON."}],
631
+ mutates: false, json: "envelope",
632
+ details: ["Local Windows-only tray lifecycle; no management API. Status on other platforms reports unsupported.", "Lifecycle writes require Windows."],
633
+ },
634
+ {
635
+ command: ["tray", "uninstall"], summary: "Windows tray uninstall.",
636
+ usage: "ocx tray uninstall [--json]",
637
+ routes: [],
638
+ flags: [{"name": "--json", "value": "boolean", "summary": "Emit the result as JSON."}],
639
+ mutates: true, json: "envelope",
640
+ details: ["Local Windows-only tray lifecycle; no management API. Status on other platforms reports unsupported.", "remove aliases uninstall."],
641
+ },
642
+ {
643
+ command: ["system","health"],
644
+ usage: "ocx system health [--json]",
645
+ summary: "Read authenticated service health and spend-ledger diagnostics.",
646
+ routes: [{"method":"GET","path":"/api/system/health"}],
647
+ flags: [{"name":"--json","value":"boolean","summary":"Emit the command result as JSON."}],
648
+ mutates: false,
649
+ json: "payload",
650
+ details: ["Distinct from root health liveness and system status aggregation. An ok endpoint can have a degraded ledger; this is an observation, not an all-subsystems health certificate."],
651
+ },
652
+ {
653
+ command: ["companion","timeline"],
654
+ usage: "ocx companion timeline [--hours <6|24|72|168>] [--bucket-minutes <1-1440>] [--metric <total|input|output|cached>] [--aggregation <sum|average|max>] [--grouping <model|modelAccount>] [--model <provider/model> ...] [--hide-provider <name> ...] [--json]",
655
+ summary: "Read usage timeline buckets with explicit completeness and filter metadata.",
656
+ routes: [{"method":"GET","path":"/api/usage/timeline"}],
657
+ flags: [{"name":"--hours","value":"number","summary":"6,24,72 or168; default24."},{"name":"--bucket-minutes","value":"number","summary":"1–1440 and at most2000 buckets; default60."},{"name":"--metric","value":"string","summary":"total,input,output orcached; defaulttotal."},{"name":"--aggregation","value":"string","summary":"sum,average ormax; defaultsum."},{"name":"--grouping","value":"string","summary":"model ormodelAccount; defaultmodel."},{"name":"--model","value":"string","summary":"Repeat exact provider/model IDs; encoded as the existing models list, up to100."},{"name":"--hide-provider","value":"string","summary":"Repeat providers to exclude; this is not positive provider inclusion."},{"name":"--json","value":"boolean","summary":"Emit the command result as JSON."}],
658
+ mutates: false,
659
+ json: "payload",
660
+ details: ["start/end are epoch seconds. The end must match the request-time bucket or its immediate successor after an observed rollover; stale windows are refused. Empty series still includes metadata; missingMeasurements and truncated remain visible instead of implying measured complete zero traffic.","Uses existing query validation and checks applied model/provider-exclusion scope. It does not change companion settings or request inference."],
661
+ },
662
+ ];