@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.
- package/bin/ocx.mjs +11 -10
- package/gui/dist/assets/App-BtfG5id-.js +54 -0
- package/gui/dist/assets/App-lCIslZ1L.css +1 -0
- package/gui/dist/assets/{Tray-gloIYNaW.js → Tray-DiJpSub0.js} +1 -1
- package/gui/dist/assets/index-Btc3Ogw4.js +94 -0
- package/gui/dist/assets/index-DmQB8D_R.css +1 -0
- package/gui/dist/assets/quota-summary-B_a96nXj.js +1 -0
- package/gui/dist/index.html +2 -2
- package/package.json +1 -1
- package/src/adapters/anthropic/beta-allowlist.ts +19 -2
- package/src/adapters/anthropic/client-identity.ts +13 -4
- package/src/adapters/anthropic/native-client-preamble.ts +31 -0
- package/src/adapters/anthropic/passthrough.ts +103 -25
- package/src/adapters/devin/cloud-direct/chat.ts +7 -2
- package/src/adapters/devin/trajectory.ts +49 -0
- package/src/adapters/devin.ts +13 -0
- package/src/adapters/ollama-native.ts +35 -19
- package/src/claude/intercept/client-hello.ts +103 -0
- package/src/claude/intercept/model-bindings.ts +3 -2
- package/src/claude/intercept/picker-listener.ts +279 -66
- package/src/cli/access-audio-input.ts +84 -0
- package/src/cli/access-audio-live.ts +99 -0
- package/src/cli/access-audio.ts +123 -0
- package/src/cli/access-data-client.ts +127 -0
- package/src/cli/access-data-plane.ts +104 -0
- package/src/cli/access-data-response.ts +76 -0
- package/src/cli/access.ts +65 -2
- package/src/cli/account-api.ts +30 -6
- package/src/cli/account-auth.ts +111 -42
- package/src/cli/account-key-quota.ts +118 -0
- package/src/cli/account-main.ts +11 -4
- package/src/cli/account-next-actions.ts +63 -0
- package/src/cli/account-policy-dto.ts +68 -0
- package/src/cli/account-policy.ts +167 -0
- package/src/cli/account-target.ts +8 -0
- package/src/cli/account.ts +34 -8
- package/src/cli/agent-runtime-settings.ts +130 -0
- package/src/cli/agent-settings.ts +101 -0
- package/src/cli/agent.ts +19 -2
- package/src/cli/alias.ts +7 -2
- package/src/cli/aside-profiles.ts +2 -2
- package/src/cli/capabilities-access-remote.ts +147 -0
- package/src/cli/capabilities-accounts.ts +195 -0
- package/src/cli/capabilities-agents-routing.ts +414 -0
- package/src/cli/capabilities-base.ts +783 -0
- package/src/cli/capabilities-command.ts +1 -0
- package/src/cli/capabilities-integrations.ts +264 -0
- package/src/cli/capabilities-lab.ts +214 -0
- package/src/cli/capabilities-observe-system.ts +662 -0
- package/src/cli/capabilities-provider-models.ts +302 -0
- package/src/cli/capabilities.ts +30 -1199
- package/src/cli/capability-types.ts +54 -0
- package/src/cli/catalog-command-result.ts +57 -0
- package/src/cli/chatgpt-command.ts +25 -2
- package/src/cli/claude-agent-startup-sync.ts +17 -0
- package/src/cli/claude-desktop-profile.ts +100 -0
- package/src/cli/claude-desktop.ts +39 -6
- package/src/cli/codex-shim-autorestore.ts +2 -1
- package/src/cli/codex-shim-readiness.ts +23 -3
- package/src/cli/combo-input.ts +88 -0
- package/src/cli/combo-result.ts +52 -0
- package/src/cli/combo-stats.ts +123 -0
- package/src/cli/combo.ts +37 -14
- package/src/cli/companion-timeline.ts +142 -0
- package/src/cli/companion-usage.ts +146 -0
- package/src/cli/companion.ts +12 -3
- package/src/cli/config-command.ts +24 -8
- package/src/cli/dispatch.ts +52 -79
- package/src/cli/doctor.ts +22 -4
- package/src/cli/help-catalog.ts +31 -14
- package/src/cli/help-recovery.ts +2 -2
- package/src/cli/help.ts +25 -11
- package/src/cli/index.ts +38 -27
- package/src/cli/injection-follow.ts +35 -0
- package/src/cli/inspect.ts +5 -0
- package/src/cli/integration-aside-sync.ts +69 -0
- package/src/cli/integration-cursor.ts +106 -0
- package/src/cli/integration-input.ts +60 -0
- package/src/cli/integration-journal.ts +49 -0
- package/src/cli/integration-plan-dto.ts +156 -0
- package/src/cli/integration-preview.ts +215 -0
- package/src/cli/integrations.ts +24 -18
- package/src/cli/json-input.ts +134 -0
- package/src/cli/link.ts +32 -4
- package/src/cli/local-sync-result.ts +41 -0
- package/src/cli/log-follow.ts +84 -0
- package/src/cli/log-view-filter.ts +146 -0
- package/src/cli/logout-command.ts +44 -0
- package/src/cli/model-picker-ordering.ts +137 -0
- package/src/cli/models-custom-input.ts +107 -0
- package/src/cli/models-custom-runtime.ts +112 -0
- package/src/cli/models-order.ts +194 -0
- package/src/cli/models-runtime-subcommands.ts +2 -0
- package/src/cli/models-runtime.ts +7 -0
- package/src/cli/models.ts +66 -81
- package/src/cli/observe-stream.ts +142 -0
- package/src/cli/observe.ts +75 -34
- package/src/cli/provider-batch.ts +77 -0
- package/src/cli/provider-lifecycle-runtime.ts +170 -0
- package/src/cli/provider-result.ts +124 -0
- package/src/cli/provider-runtime.ts +15 -12
- package/src/cli/provider-settings.ts +143 -0
- package/src/cli/provider.ts +112 -34
- package/src/cli/registry.ts +62 -20
- package/src/cli/remote-workspace-hub.ts +83 -0
- package/src/cli/remote-workspace.ts +6 -1
- package/src/cli/restart-failure.ts +27 -0
- package/src/cli/root.ts +12 -0
- package/src/cli/route-policy-write.ts +137 -0
- package/src/cli/route-policy.ts +8 -0
- package/src/cli/runtime-api.ts +56 -79
- package/src/cli/secret-args.ts +149 -0
- package/src/cli/settings-result.ts +30 -0
- package/src/cli/storage.ts +77 -7
- package/src/cli/system-command.ts +60 -2
- package/src/cli/system-restart-client.ts +20 -3
- package/src/cli/system-settings-parity.ts +83 -0
- package/src/cli/update-restart-candidate.ts +21 -0
- package/src/cli/update-restart-child.ts +81 -0
- package/src/cli/update-restart-home.ts +38 -0
- package/src/cli/update-restart-transport.ts +193 -0
- package/src/cli/update-restart.ts +260 -0
- package/src/cli/usage-model-search.ts +58 -0
- package/src/cli/usage-report.ts +13 -5
- package/src/cli/v2-input.ts +66 -0
- package/src/cli/v2-local-output.ts +37 -0
- package/src/cli/v2-runtime.ts +90 -0
- package/src/cli/v2.ts +102 -144
- package/src/clients/config-export/dsh.ts +21 -0
- package/src/clients/config-export.ts +7 -1
- package/src/codex/catalog/build-entries.ts +1 -1
- package/src/codex/catalog/bundled.ts +9 -2
- package/src/codex/catalog/heal-observation.ts +66 -0
- package/src/codex/catalog/publication-observer.ts +19 -0
- package/src/codex/catalog/remote.ts +13 -15
- package/src/codex/catalog/restore.ts +19 -6
- package/src/codex/catalog/retained-sync.ts +58 -10
- package/src/codex/catalog/routed-removal.ts +116 -0
- package/src/codex/catalog/write-audit-contract.ts +21 -0
- package/src/codex/catalog/write-audit.ts +171 -0
- package/src/codex/catalog-self-heal.ts +284 -0
- package/src/codex/catalog-write-serialization.ts +71 -7
- package/src/codex/codex-home-owner.ts +124 -0
- package/src/codex/convergence.ts +55 -15
- package/src/codex/features.ts +8 -1
- package/src/codex/inject/restore.ts +46 -4
- package/src/codex/inject.ts +11 -1
- package/src/codex/internal/catalog-writer.ts +120 -13
- package/src/codex/journal.ts +49 -13
- package/src/codex/management-convergence.ts +3 -0
- package/src/codex/quota-types.ts +3 -0
- package/src/codex/quota.ts +13 -3
- package/src/codex/refresh.ts +20 -9
- package/src/codex/runtime.ts +7 -1
- package/src/codex/shim-diagnostics.ts +80 -0
- package/src/codex/shim-fingerprint.ts +7 -2
- package/src/codex/shim-migration.ts +153 -0
- package/src/codex/shim-overlay.ts +509 -0
- package/src/codex/shim-path-resolution.ts +14 -2
- package/src/codex/shim-probe.ts +4 -3
- package/src/codex/shim-state-file.ts +93 -7
- package/src/codex/shim.ts +15 -68
- package/src/codex/sync.ts +24 -4
- package/src/combos/failover.ts +19 -0
- package/src/combos/index.ts +1 -0
- package/src/combos/resolve.ts +12 -0
- package/src/config/atomic-write.ts +13 -8
- package/src/config/diagnostics.ts +19 -1
- package/src/config/load-degrade.ts +3 -0
- package/src/config/schema/chatgpt-desktop.ts +22 -0
- package/src/config/schema/config-schema.ts +32 -14
- package/src/config/schema/leaf-validators.ts +3 -2
- package/src/generated/compatibility-version.json +445 -129
- package/src/integrations/merge.ts +13 -5
- package/src/integrations/mutation-plan.ts +46 -3
- package/src/integrations/omp-yaml-source.ts +181 -1
- package/src/integrations/ownership-policy.ts +66 -0
- package/src/integrations/registry.ts +50 -1
- package/src/integrations/state.ts +46 -21
- package/src/integrations/target.ts +25 -2
- package/src/integrations/writer.ts +89 -31
- package/src/lib/package-tree-integrity.ts +42 -1
- package/src/lib/proxy-env.ts +3 -0
- package/src/lib/test-home-guard.ts +2 -1
- package/src/oauth/anthropic-account-refusal.ts +19 -8
- package/src/oauth/anthropic-routing.ts +17 -12
- package/src/oauth/anthropic.ts +27 -2
- package/src/oauth/index.ts +6 -8
- package/src/oauth/pool-settings-capability.ts +9 -2
- package/src/protocols/plan-snapshot.ts +1 -1
- package/src/protocols/settings.ts +28 -4
- package/src/server/caller-session-identity.ts +32 -0
- package/src/server/claude-messages.ts +11 -4
- package/src/server/index/serve-options.ts +12 -7
- package/src/server/index.ts +1 -1
- package/src/server/management/agent-settings-routes.ts +6 -5
- package/src/server/management/context.ts +8 -1
- package/src/server/management/cursor-integration-routes.ts +3 -3
- package/src/server/management/integration-routes.ts +5 -5
- package/src/server/management/model-routes.ts +3 -3
- package/src/server/management/native-integration-routes.ts +2 -2
- package/src/server/management/oauth-account-routes.ts +96 -30
- package/src/server/management/route-registry.ts +25 -24
- package/src/server/messages-native-eligibility.ts +3 -6
- package/src/server/messages-native-oauth.ts +82 -35
- package/src/server/messages-native.ts +78 -16
- package/src/server/responses/adapter-dispatch.ts +53 -28
- package/src/server/responses/core-auth.ts +10 -4
- package/src/server/responses/core-combo.ts +46 -6
- package/src/service/cli.ts +6 -1
- package/src/service/ownership-mutation-lease.d.mts +26 -0
- package/src/service/ownership-mutation-lease.mjs +76 -1
- package/src/types/config.ts +2 -0
- package/src/types/provider.ts +10 -10
- package/src/update/index.ts +2 -1
- package/src/update/update-failure-guidance.d.mts +6 -0
- package/src/update/update-failure-guidance.mjs +30 -5
- package/gui/dist/assets/App-COdEeqSj.css +0 -1
- package/gui/dist/assets/App-DEpCJEP_.js +0 -54
- package/gui/dist/assets/index-Cd7ittMv.css +0 -1
- package/gui/dist/assets/index-DwJKFJm5.js +0 -94
- package/gui/dist/assets/quota-summary-DGcEJU3h.js +0 -1
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
import type { Capability } from "./capability-types";
|
|
2
|
+
|
|
3
|
+
/** Existing provider/model handlers; local configuration operations deliberately have no routes. */
|
|
4
|
+
export const PROVIDER_MODEL_CAPABILITIES: readonly Capability[] = [
|
|
5
|
+
{
|
|
6
|
+
command: ["provider","add"],
|
|
7
|
+
summary: "Add a provider locally or explicitly to the running proxy.",
|
|
8
|
+
usage: "ocx provider add <name> [--adapter <id>] [--base-url <url>] [--responses-path <path>] [--auth-mode <key|forward|oauth|local>] [--api-key <key>] [--api-key-transport <x-api-key|bearer>] [--default-model <id>] [--model <id> --text-only] [--google-tool-schema-policy <compatible|reject-lossy>] [--allow-private-network] [--set-default] [--force] [--sync | --live] [--json]",
|
|
9
|
+
routes: [{"method":"GET","path":"/api/providers"},{"method":"GET","path":"/api/provider-presets"},{"method":"POST","path":"/api/providers"}],
|
|
10
|
+
mutates: true,
|
|
11
|
+
json: "envelope",
|
|
12
|
+
flags: [{"name":"--adapter","value":"string","summary":"Required for a provider absent from the registry."},{"name":"--base-url","value":"string","summary":"Upstream URL; required for an unregistered provider."},{"name":"--api-key","value":"string","summary":"Legacy argv credential input; prefer the human-operated stdin account add-key workflow."},{"name":"--api-key-transport","value":"string","summary":"x-api-key or bearer."},{"name":"--default-model","value":"string","summary":"Default upstream model ID."},{"name":"--model","value":"string","summary":"Model for --text-only; requires that flag."},{"name":"--text-only","value":"boolean","summary":"Declare text-only input for --model or the default model."},{"name":"--google-tool-schema-policy","value":"string","summary":"Google adapter: compatible or reject-lossy."},{"name":"--allow-private-network","value":"boolean","summary":"Permit a private upstream network."},{"name":"--set-default","value":"boolean","summary":"Also select this provider as default."},{"name":"--force","value":"boolean","summary":"Replace an existing provider."},{"name":"--sync","value":"boolean","summary":"Local only: perform requested Codex sync, including in JSON mode; saved-but-unsynced failures remain nonzero."},{"name":"--json","value":"boolean","summary":"Emit the operation receipt as JSON."},{"name":"--live","value":"boolean","summary":"Use the selected running proxy; omission retains local configuration behavior."},{"name":"--responses-path","value":"string","summary":"Relative upstream Responses path; no scheme, query or fragment."},{"name":"--auth-mode","value":"string","summary":"Explicit key, forward, oauth or local auth mode."}],
|
|
13
|
+
details: ["Without --live, saves local configuration; --sync reports its actual disposition and needsSync, never fabricated client application. --live cannot be combined with --sync.","Live add reads the target roster and presets. An observed existing row requires --force; POST remains upsert, so the preflight is not atomic create-only protection.","Canonical OpenAI uses the target preset unchanged; transport/auth/model overrides are refused in live add. No local registry fallback when a needed target preset is missing.","Keep real credentials out of argv and agent transcripts; this does not authorize credential capture."],
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
command: ["provider", "show"], summary: "Inspect one locally configured provider.",
|
|
17
|
+
usage: "ocx provider show <name> [--json]", routes: [], mutates: false, json: "envelope",
|
|
18
|
+
flags: [{ name: "--json", value: "boolean", summary: "Emit the local provider view." }],
|
|
19
|
+
details: ["Reads local config; masks API-key and key-pool fields. This is not a live provider read or a general secret-export interface."],
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
command: ["provider","remove"],
|
|
23
|
+
summary: "Remove a local provider or explicitly delete it from the running proxy.",
|
|
24
|
+
usage: "ocx provider remove <name> [--json]; ocx provider remove <name> --live --yes [--json]",
|
|
25
|
+
routes: [{"method":"DELETE","path":"/api/providers"}],
|
|
26
|
+
mutates: true,
|
|
27
|
+
json: "envelope",
|
|
28
|
+
flags: [{"name":"--live","value":"boolean","summary":"Use the selected running proxy; omission retains local configuration behavior."},{"name":"--yes","value":"boolean","summary":"Required with --live for provider and dependent custom-model/account cleanup."},{"name":"--json","value":"boolean","summary":"Emit the operation receipt as JSON."}],
|
|
29
|
+
details: ["Local removal preserves its existing refusal for the current default and has no --yes option.","Live removal uses one server DELETE. The server can choose a replacement default and clean custom models, context caps and OAuth accounts; dependency/last-provider refusals stay authoritative.","No local fallback, multi-step deletion or automatic retry. A saved result with failed catalog convergence exits nonzero without claiming rollback."],
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
command: ["provider","set-default"],
|
|
33
|
+
summary: "Select the default provider locally or explicitly on the running proxy.",
|
|
34
|
+
usage: "ocx provider set-default <name> [--live] [--json]",
|
|
35
|
+
routes: [{"method":"PATCH","path":"/api/providers"}],
|
|
36
|
+
mutates: true,
|
|
37
|
+
json: "envelope",
|
|
38
|
+
flags: [{"name":"--live","value":"boolean","summary":"Use the selected running proxy; omission retains local configuration behavior."},{"name":"--json","value":"boolean","summary":"Emit the operation receipt as JSON."}],
|
|
39
|
+
details: ["Omission of --live retains local save/no-op semantics. Live sends only setDefault:true; disabled/unknown providers are refused by the server. This operation does not claim client synchronization."],
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
command: ["provider","edit"],
|
|
43
|
+
summary: "Patch an existing provider through the running proxy.",
|
|
44
|
+
usage: "ocx provider edit <name> [--adapter <id>] [--base-url <url>] [--default-model <id|->] [--auth-mode <key|forward|oauth|local|->] [--note <text|->] [--api-key-transport <x-api-key|bearer|->] [--headers <json|->] [--enabled <on|off>] [--live-models <on|off>] [--retain-models <id,id|->] [--model <id> --text-only] [--xai-chat <on|off>] [--allow-private-network <on|off>] [--model-context-tier <model=default|long_context>] [--upstream-http-version <http1.1|->] [--fast <on|off>] [--context-window <tokens|->] [--json]",
|
|
45
|
+
routes: [{"method":"PATCH","path":"/api/providers"}],
|
|
46
|
+
mutates: true,
|
|
47
|
+
json: "payload",
|
|
48
|
+
flags: [{"name":"--adapter","value":"string","summary":"Adapter ID."},{"name":"--base-url","value":"string","summary":"Upstream URL."},{"name":"--default-model","value":"string","summary":"Model ID; - clears."},{"name":"--auth-mode","value":"string","summary":"key, forward, oauth, local; - clears."},{"name":"--note","value":"string","summary":"Note; - clears."},{"name":"--api-key-transport","value":"string","summary":"x-api-key or bearer; - clears."},{"name":"--headers","value":"string","summary":"JSON object; - or JSON null clears."},{"name":"--enabled","value":"string","summary":"on or off."},{"name":"--live-models","value":"string","summary":"on or off."},{"name":"--retain-models","value":"string","summary":"Comma-separated IDs; - clears with null."},{"name":"--model","value":"string","summary":"Requires --text-only."},{"name":"--text-only","value":"boolean","summary":"Requires --model; declare text-only input."},{"name":"--xai-chat","value":"string","summary":"xai only: on uses Chat, off opts into Responses."},{"name":"--allow-private-network","value":"string","summary":"on or off."},{"name":"--model-context-tier","value":"string","summary":"Repeatable github-copilot model=default or model=long_context."},{"name":"--json","value":"boolean","summary":"Emit the management receipt."},{"name":"--upstream-http-version","value":"string","summary":"http1.1 pins HTTP/1.1; - clears the override."},{"name":"--fast","value":"string","summary":"on or off; false is an explicit edit."},{"name":"--context-window","value":"string","summary":"Positive safe integer provider context limit; - clears, zero is invalid."}],
|
|
49
|
+
details: ["At least one edit is required; only supplied fields are patched. update is an existing alias. Use provider show only for local state, not as proof of the live write.","Management errors use safe fixed provider diagnostics; catalog failures retain the saved receipt and a nonzero exit."],
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
command: ["provider", "test"], summary: "Probe a provider's live model discovery connectivity.",
|
|
53
|
+
usage: "ocx provider test <name> [--json]", routes: [{ method: "POST", path: "/api/providers/test" }], mutates: true, json: "payload",
|
|
54
|
+
flags: [{ name: "--json", value: "boolean", summary: "Emit the probe result." }],
|
|
55
|
+
details: ["May contact the upstream provider; requires operator intent to probe. Static catalogs can return applicable:false; failed connectivity exits nonzero."],
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
command: ["provider", "quota"], summary: "Read provider quota reports, optionally refreshing them.",
|
|
59
|
+
usage: "ocx provider quota [--refresh] [--json]", routes: [{ method: "GET", path: "/api/provider-quotas" }], mutates: false, json: "payload",
|
|
60
|
+
flags: [{ name: "--refresh", value: "boolean", summary: "Request refresh=1; may contact providers and update cached observations." }, { name: "--json", value: "boolean", summary: "Emit the quota report." }],
|
|
61
|
+
details: ["Reads quota observations without changing operator settings. Cache misses may probe upstream even without --refresh; --refresh bypasses the cache and updates observations. This GET is not the POST account-refresh operation."],
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
command: ["provider", "presets"], summary: "Read provider presets from the running proxy.",
|
|
65
|
+
usage: "ocx provider presets [--json]", routes: [{ method: "GET", path: "/api/provider-presets" }], mutates: false, json: "payload",
|
|
66
|
+
flags: [{ name: "--json", value: "boolean", summary: "Emit the preset payload." }],
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
command: ["provider", "account-mode"], summary: "Set OpenAI Codex account routing to pool or direct.",
|
|
70
|
+
usage: "ocx provider account-mode <pool|direct> [--json]", routes: [{ method: "PATCH", path: "/api/providers" }], mutates: true, json: "payload",
|
|
71
|
+
flags: [{ name: "--json", value: "boolean", summary: "Emit the management receipt." }],
|
|
72
|
+
details: ["Patches codexAccountMode on provider openai; this does not switch the physical Codex login."],
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
command: ["provider", "selected"], summary: "Read or replace one provider's selected model allowlist.",
|
|
76
|
+
usage: "ocx provider selected <name> [--set <id,id...>|--clear] [--json]",
|
|
77
|
+
routes: [{ method: "GET", path: "/api/selected-models" }, { method: "PUT", path: "/api/selected-models" }], mutates: true, json: "envelope",
|
|
78
|
+
flags: [{ name: "--set", value: "string", summary: "Replace with comma-separated upstream IDs." }, { name: "--clear", value: "boolean", summary: "Clear the allowlist to show all; exclusive with --set." }, { name: "--json", value: "boolean", summary: "Emit the selected view or receipt." }],
|
|
79
|
+
details: ["Without a mutation flag this reads only. --clear sends models:[], not a model named -.", "Read JSON is the CLI projection {provider, selected: string[], available: string[]}, not the API's provider-keyed maps; missing entries become empty arrays. --set/--clear JSON returns the server's write receipt unchanged."],
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
command: ["models", "list"], summary: "List static configured models locally.",
|
|
83
|
+
usage: "ocx models list [--provider <name>] [--json]", routes: [], mutates: false, json: "envelope",
|
|
84
|
+
flags: [{ name: "--provider", value: "string", summary: "Limit to a configured provider." }, { name: "--json", value: "boolean", summary: "Emit models and the static-catalog note." }],
|
|
85
|
+
details: ["A bare models invocation is equivalent. Reads local config, never the live catalog; use models live for runtime discovery."],
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
command: ["models","add"],
|
|
89
|
+
summary: "Add a custom model locally or explicitly on the running proxy.",
|
|
90
|
+
usage: "ocx models add <provider> <modelId> [--display-name <name>] [--context-window <tokens>] [--modalities <text,image,audio>] [--reasoning-efforts <levels|->] [--default-reasoning-effort <level|->] [--live] [--json]",
|
|
91
|
+
routes: [{"method":"POST","path":"/api/custom-models"}],
|
|
92
|
+
mutates: true,
|
|
93
|
+
json: "envelope",
|
|
94
|
+
flags: [{"name":"--display-name","value":"string","summary":"Custom display name without a slash."},{"name":"--context-window","value":"number","summary":"Positive integer token count."},{"name":"--modalities","value":"string","summary":"Comma-separated text, image, audio."},{"name":"--reasoning-efforts","value":"string","summary":"Comma-separated supported levels; - inherits; an empty string declares no reasoning."},{"name":"--default-reasoning-effort","value":"string","summary":"A declared level; - inherits."},{"name":"--live","value":"boolean","summary":"Use the selected running proxy; omission retains local custom-model behavior."},{"name":"--json","value":"boolean","summary":"Emit the validated command result as JSON."}],
|
|
95
|
+
details: ["Without --live, saves locally and opportunistically syncs only if a proxy is available. No proxy keeps the save successful with needsSync:true; attempted failure/refusal is nonzero. JSON is one safe save/sync receipt.","Live add sends the same metadata to the server and returns its stored custom identity plus catalog outcome. Empty reasoning ladder differs from omitted/inherited metadata. No local fallback."],
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
command: ["models","remove"],
|
|
99
|
+
summary: "Remove an exact custom model locally or on the selected proxy.",
|
|
100
|
+
usage: "ocx models remove <customId|provider/modelId> [--yes] [--live] [--json]",
|
|
101
|
+
routes: [{"method":"GET","path":"/api/custom-models"},{"method":"DELETE","path":"/api/custom-models/{id}"}],
|
|
102
|
+
mutates: true,
|
|
103
|
+
json: "envelope",
|
|
104
|
+
flags: [{"name":"--yes","value":"boolean","summary":"Required for live or JSON deletion; local text mode retains its interactive confirmation."},{"name":"--live","value":"boolean","summary":"Use the selected running proxy; omission retains local custom-model behavior."},{"name":"--json","value":"boolean","summary":"Emit the validated command result as JSON."}],
|
|
105
|
+
details: ["Live selection uses the complete target custom roster and an exact stored ID or unambiguous provider/raw selector. Display labels, ID prefixes and encoded/raw collisions never choose a deletion target.","One encoded stored-ID DELETE; no alternative-ID retry, local fallback or revision protection. Local JSON saves/syncs retain the same opportunistic policy as add."],
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
command: ["models", "list-custom"], summary: "List locally stored custom model definitions and their IDs.",
|
|
109
|
+
usage: "ocx models list-custom [--json]", routes: [], mutates: false, json: "payload",
|
|
110
|
+
flags: [{ name: "--json", value: "boolean", summary: "Emit the local customModels array with full IDs." }],
|
|
111
|
+
details: ["Reads local configuration, not the management API."],
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
command: ["models", "live"], summary: "Read the running proxy's model catalog.",
|
|
115
|
+
usage: "ocx models live [--provider <name>] [--free-only] [--json]", routes: [{ method: "GET", path: "/api/models" }], mutates: false, json: "payload",
|
|
116
|
+
flags: [{ name: "--provider", value: "string", summary: "Filter returned rows by provider." }, { name: "--free-only", value: "boolean", summary: "Include only rows explicitly classified free." }, { name: "--json", value: "boolean", summary: "Emit the filtered catalog array." }],
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
command: ["models", "edit"], summary: "Edit a custom model by its definition ID through the proxy.",
|
|
120
|
+
usage: "ocx models edit <custom-id> [--model-id <id>] [--display-name <name|->] [--context-window <tokens|0>] [--modalities <text,image,audio|->] [--reasoning-efforts <levels|->] [--default-reasoning-effort <level|->] [--json]",
|
|
121
|
+
routes: [{ method: "PUT", path: "/api/custom-models/{id}" }], mutates: true, json: "payload",
|
|
122
|
+
flags: [
|
|
123
|
+
{ name: "--model-id", value: "string", summary: "Upstream model ID." },
|
|
124
|
+
{ name: "--display-name", value: "string", summary: "Custom definition name; - clears." },
|
|
125
|
+
{ name: "--context-window", value: "number", summary: "Safe token count; 0 clears. Unlike models set, - is invalid here." },
|
|
126
|
+
{ name: "--modalities", value: "string", summary: "Comma-separated modalities; - sends an empty list." },
|
|
127
|
+
{ name: "--reasoning-efforts", value: "string", summary: "Comma-separated levels; - inherits (null), empty string stores an empty ladder." },
|
|
128
|
+
{ name: "--default-reasoning-effort", value: "string", summary: "Default effort; - clears with null." },
|
|
129
|
+
{ name: "--json", value: "boolean", summary: "Emit the management receipt." },
|
|
130
|
+
],
|
|
131
|
+
details: ["At least one edit is required. Operand is the custom definition ID from list-custom, not a provider/model selector. Discovered-model display-name overrides are a different resource."],
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
command: ["models", "enable"], summary: "Enable one routed or native catalog model.",
|
|
135
|
+
usage: "ocx models enable <provider/model|native-model> [--native] [--json]", routes: [{ method: "PUT", path: "/api/model-visibility" }], mutates: true, json: "payload",
|
|
136
|
+
flags: [{ name: "--native", value: "boolean", summary: "Treat the whole selector as a native OpenAI model ID." }, { name: "--json", value: "boolean", summary: "Emit the visibility receipt." }],
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
command: ["models", "disable"], summary: "Disable one routed or native catalog model.",
|
|
140
|
+
usage: "ocx models disable <provider/model|native-model> [--native] [--json]", routes: [{ method: "PUT", path: "/api/model-visibility" }], mutates: true, json: "payload",
|
|
141
|
+
flags: [{ name: "--native", value: "boolean", summary: "Treat the whole selector as a native OpenAI model ID." }, { name: "--json", value: "boolean", summary: "Emit the visibility receipt." }],
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
command: ["models", "provider"], summary: "Enable or disable all catalog rows for a provider.",
|
|
145
|
+
usage: "ocx models provider <name> <on|off> [--json]", routes: [{ method: "GET", path: "/api/models" }, { method: "PUT", path: "/api/model-visibility" }], mutates: true, json: "payload",
|
|
146
|
+
flags: [{ name: "--json", value: "boolean", summary: "Emit the visibility receipt." }],
|
|
147
|
+
details: ["Reads targets from the live catalog first; refuses a provider without available models."],
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
command: ["models", "selected"], summary: "Read or replace a provider's selected model allowlist.",
|
|
151
|
+
usage: "ocx models selected <provider> [--set <id,id...>|--clear] [--json]", routes: [{ method: "GET", path: "/api/selected-models" }, { method: "PUT", path: "/api/selected-models" }], mutates: true, json: "envelope",
|
|
152
|
+
flags: [{ name: "--set", value: "string", summary: "Replace the allowlist with comma-separated IDs." }, { name: "--clear", value: "boolean", summary: "Send an empty list to show all; exclusive with --set." }, { name: "--json", value: "boolean", summary: "Emit the selected view or receipt." }],
|
|
153
|
+
details: ["Without --set or --clear this only reads. A literal - is not the clear spelling.", "Read JSON is the CLI projection {provider, selected: string[], available: string[]}, not the API's provider-keyed maps; missing entries become empty arrays. --set/--clear JSON returns the server's write receipt unchanged."],
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
command: ["models", "preset", "show"], summary: "Inspect shipped model presets and applied versions.",
|
|
157
|
+
usage: "ocx models preset show [--provider <name>] [--json]", routes: [{ method: "GET", path: "/api/model-presets" }], mutates: false, json: "payload",
|
|
158
|
+
flags: [{ name: "--provider", value: "string", summary: "Project a single provider's preset." }, { name: "--json", value: "boolean", summary: "Emit the preset view." }],
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
command: ["models", "preset", "apply"], summary: "Apply a provider's curated model preset or show all models.",
|
|
162
|
+
usage: "ocx models preset apply <provider> [--all] [--json]", routes: [{ method: "PUT", path: "/api/model-presets" }], mutates: true, json: "payload",
|
|
163
|
+
flags: [{ name: "--all", value: "boolean", summary: "Use mode all instead of preset." }, { name: "--json", value: "boolean", summary: "Emit the application receipt." }],
|
|
164
|
+
details: ["An empty preset match preserves the previous selection and reports fallback; do not interpret it as successful narrowing."],
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
command: ["models", "new-policy"], summary: "Read or set the policy for newly discovered models.",
|
|
168
|
+
usage: "ocx models new-policy [on|off] [--provider <name>] [--json]", routes: [{ method: "GET", path: "/api/model-discovery" }, { method: "PUT", path: "/api/model-discovery" }], mutates: true, json: "payload",
|
|
169
|
+
flags: [{ name: "--provider", value: "string", summary: "Scope the read/write to a provider; omitted means global." }, { name: "--json", value: "boolean", summary: "Emit the policy view or receipt." }],
|
|
170
|
+
details: ["No state operand means read only. Only on/off writes exist; no inherit/clear operand is implemented."],
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
command: ["models", "new-arrivals"], summary: "Read recent model discoveries.",
|
|
174
|
+
usage: "ocx models new-arrivals [--json]", routes: [{ method: "GET", path: "/api/model-discovery" }], mutates: false, json: "payload",
|
|
175
|
+
flags: [{ name: "--json", value: "boolean", summary: "Emit recentArrivals grouped by provider." }],
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
command: ["models", "context", "status"], summary: "Read routed-provider context caps.",
|
|
179
|
+
usage: "ocx models context status [--json]", routes: [{ method: "GET", path: "/api/provider-context-caps" }], mutates: false, json: "payload",
|
|
180
|
+
flags: [{ name: "--json", value: "boolean", summary: "Emit context settings." }],
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
command: ["models", "context", "value"], summary: "Set the default routed-provider context cap value.",
|
|
184
|
+
usage: "ocx models context value <tokens> [--set-all] [--json]", routes: [{ method: "PUT", path: "/api/provider-context-caps" }], mutates: true, json: "payload",
|
|
185
|
+
flags: [{ name: "--set-all", value: "boolean", summary: "Also apply the value to every routed provider." }, { name: "--json", value: "boolean", summary: "Emit the context receipt." }],
|
|
186
|
+
details: ["Tokens must be a positive safe integer; separators _ and , are accepted. Without --set-all only the default for future toggles changes."],
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
command: ["models", "context", "provider"], summary: "Toggle one provider's context cap, optionally choosing its value.",
|
|
190
|
+
usage: "ocx models context provider <provider> <on|off> [--value <tokens>] [--json]", routes: [{ method: "PUT", path: "/api/provider-context-caps" }], mutates: true, json: "payload",
|
|
191
|
+
flags: [{ name: "--value", value: "number", summary: "Positive integer; only valid with on." }, { name: "--json", value: "boolean", summary: "Emit the context receipt." }],
|
|
192
|
+
details: ["off disables this provider's cap; --value is not a global value change."],
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
command: ["models", "context", "all"], summary: "Enable or disable caps for all routed providers.",
|
|
196
|
+
usage: "ocx models context all <on|off> [--json]", routes: [{ method: "PUT", path: "/api/provider-context-caps" }], mutates: true, json: "payload",
|
|
197
|
+
flags: [{ name: "--json", value: "boolean", summary: "Emit the context receipt." }],
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
command: ["models", "shadow", "status"], summary: "Read shadow-call settings.",
|
|
201
|
+
usage: "ocx models shadow status [--json]", routes: [{ method: "GET", path: "/api/shadow-call-settings" }], mutates: false, json: "payload",
|
|
202
|
+
flags: [{ name: "--json", value: "boolean", summary: "Emit shadow-call settings." }],
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
command: ["models", "shadow", "set"], summary: "Set the shadow-call model or enabled state.",
|
|
206
|
+
usage: "ocx models shadow set [model|-] [--enabled <on|off>] [--json]", routes: [{ method: "PUT", path: "/api/shadow-call-settings" }], mutates: true, json: "payload",
|
|
207
|
+
flags: [{ name: "--enabled", value: "string", summary: "on or off; takes a value." }, { name: "--json", value: "boolean", summary: "Emit the settings receipt." }],
|
|
208
|
+
details: ["At least a model or --enabled is required; - clears the model with an empty string. Enabling shadow calls can cause subsequent inference calls."],
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
command: ["alias", "list"], summary: "Read provider and model aliases.",
|
|
212
|
+
usage: "ocx alias list [--json]", routes: [{ method: "GET", path: "/api/aliases" }], mutates: false, json: "payload",
|
|
213
|
+
flags: [{ name: "--json", value: "boolean", summary: "Emit alias maps and provenance." }],
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
command: ["alias", "set"], summary: "Assign a provider or upstream model alias.",
|
|
217
|
+
usage: "ocx alias set <provider|provider/native-model-id> <alias> [--json]", routes: [{ method: "PUT", path: "/api/providers/{provider}/alias" }, { method: "PUT", path: "/api/providers/{provider}/model-aliases" }], mutates: true, json: "payload",
|
|
218
|
+
flags: [{ name: "--json", value: "boolean", summary: "Emit the alias receipt." }],
|
|
219
|
+
details: ["The first slash separates provider from the complete upstream model ID."],
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
command: ["alias", "rm"], summary: "Clear a provider or model alias.",
|
|
223
|
+
usage: "ocx alias rm <provider|provider/native-model-id> [--json]", routes: [{ method: "PUT", path: "/api/providers/{provider}/alias" }, { method: "PUT", path: "/api/providers/{provider}/model-aliases" }], mutates: true, json: "payload",
|
|
224
|
+
flags: [{ name: "--json", value: "boolean", summary: "Emit the alias removal receipt." }],
|
|
225
|
+
details: ["Provider clear sends alias:null; model clear sends remove:[modelId]."],
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
command: ["alias", "defaults"], summary: "Toggle built-in model aliases globally or for a provider.",
|
|
229
|
+
usage: "ocx alias defaults <on|off> [--provider <name>] [--json]", routes: [{ method: "PUT", path: "/api/default-aliases" }], mutates: true, json: "payload",
|
|
230
|
+
flags: [{ name: "--provider", value: "string", summary: "Limit the toggle to one provider." }, { name: "--json", value: "boolean", summary: "Emit the alias settings receipt." }],
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
command: ["provider","pacing"],
|
|
234
|
+
usage: "ocx provider pacing <name> [--json]; ocx provider pacing <name> [--enabled <on|off>] [--rpm <number>] [--min-interval-ms <integer>] [--max-concurrent <integer>] [--json]; ocx provider pacing <name> --file <FILE|-> [--json]",
|
|
235
|
+
summary: "Read request pacing rules/status or explicitly replace the configured block.",
|
|
236
|
+
routes: [{"method":"GET","path":"/api/config"},{"method":"GET","path":"/api/provider-request-pacing"},{"method":"PATCH","path":"/api/providers"}],
|
|
237
|
+
flags: [{"name":"--enabled","value":"string","summary":"on or off; numeric changes never implicitly enable."},{"name":"--rpm","value":"number","summary":"Fractional requests per minute, from 1/60 to 60000."},{"name":"--min-interval-ms","value":"number","summary":"Positive integer delay, at most 3600000."},{"name":"--max-concurrent","value":"number","summary":"Positive integer concurrency cap."},{"name":"--file","value":"string","summary":"Complete rules JSON, or - for bounded non-TTY stdin; exclusive with scalar flags."},{"name":"--json","value":"boolean","summary":"Emit the operation receipt as JSON."}],
|
|
238
|
+
mutates: true,
|
|
239
|
+
json: "envelope",
|
|
240
|
+
details: ["Read returns {provider,rules,status}; rules:null means no configured block, not an unavailable target.","Scalar edits preserve model rules observed from the pinned config; PATCH replaces the block and can overwrite an intervening edit. Use snapshot/apply for public-baseline CAS.","File mode validates a complete non-null rules block and writes without a prior rule read. Pacing limits reject zero."],
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
command: ["provider","snapshot"],
|
|
244
|
+
usage: "ocx provider snapshot [--json]",
|
|
245
|
+
summary: "Read the non-secret provider editor snapshot from the running proxy.",
|
|
246
|
+
routes: [{"method":"GET","path":"/api/config"}],
|
|
247
|
+
flags: [{"name":"--json","value":"boolean","summary":"Emit the operation receipt as JSON."}],
|
|
248
|
+
mutates: false,
|
|
249
|
+
json: "envelope",
|
|
250
|
+
details: ["Emits exactly {defaultProvider,providers}, validating the canonical editor DTO after removing only GUI display markers. Unexpected secret/unknown fields fail closed.","Save this JSON as the baseline for apply; it is not raw config export and carries no cross-invocation target identity. Use the intended host/context."],
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
command: ["provider","apply"],
|
|
254
|
+
usage: "ocx provider apply --baseline <FILE|-> --file <FILE|-> [--yes] [--json]",
|
|
255
|
+
summary: "Apply a provider editor document with the server public-baseline conflict check.",
|
|
256
|
+
routes: [{"method":"PUT","path":"/api/providers"}],
|
|
257
|
+
flags: [{"name":"--baseline","value":"string","summary":"Original non-secret provider snapshot.","required":true},{"name":"--file","value":"string","summary":"Edited next snapshot.","required":true},{"name":"--yes","value":"boolean","summary":"Required for removals or renames within the submitted provider roster."},{"name":"--json","value":"boolean","summary":"Emit the operation receipt as JSON."}],
|
|
258
|
+
mutates: true,
|
|
259
|
+
json: "payload",
|
|
260
|
+
details: ["Both documents must contain exactly defaultProvider and providers, with no credential/derived/unknown fields. At most one source may be stdin; each input and the complete serialized body are bounded to 4 MiB, with a 30-second read deadline.","Sends one {baseline,next} PUT. Stale baseline is exit 5; no automatic refresh, rebase, retry or local fallback.","Batch removal preserves the server batch contract and does not promise single-provider DELETE OAuth cleanup. Saved-but-unconverged catalog outcomes remain visible and nonzero."],
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
command: ["models","display-name"],
|
|
264
|
+
usage: "ocx models display-name <provider/raw-model> (--set <text> | --clear) [--json]",
|
|
265
|
+
summary: "Set or clear one raw upstream model display-name override.",
|
|
266
|
+
routes: [{"method":"PUT","path":"/api/providers/{provider}/model-display-names"}],
|
|
267
|
+
flags: [{"name":"--set","value":"string","summary":"Nonblank display label; exclusive with --clear."},{"name":"--clear","value":"boolean","summary":"Send null to clear the override."},{"name":"--json","value":"boolean","summary":"Emit the validated command result as JSON."}],
|
|
268
|
+
mutates: true,
|
|
269
|
+
json: "envelope",
|
|
270
|
+
details: ["Split only the first provider slash; the remaining model ID is raw upstream identity, not a guessed public alias or encoded suffix.","A recognized saved-but-failed catalog HTTP503 retains its safe receipt and exits1; no retry or rollback claim."],
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
command: ["models","order","status"],
|
|
274
|
+
usage: "ocx models order status [--json]",
|
|
275
|
+
summary: "Read saved picker order, routed candidates and featured state.",
|
|
276
|
+
routes: [{"method":"GET","path":"/api/subagent-models"}],
|
|
277
|
+
flags: [{"name":"--json","value":"boolean","summary":"Emit the validated command result as JSON."}],
|
|
278
|
+
mutates: false,
|
|
279
|
+
json: "envelope",
|
|
280
|
+
details: ["Preserves native IDs in saved order. pickerAvailable is routed-only; unknown featured state is not an empty successful roster."],
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
command: ["models","order","set"],
|
|
284
|
+
usage: "ocx models order set (--models <csv> | --mode <default|alphabetical|provider|most-used>) [--json]",
|
|
285
|
+
summary: "Replace the routed picker order with an explicit list or sort mode.",
|
|
286
|
+
routes: [{"method":"GET","path":"/api/subagent-models"},{"method":"GET","path":"/api/models"},{"method":"GET","path":"/api/usage"},{"method":"PUT","path":"/api/subagent-models"}],
|
|
287
|
+
flags: [{"name":"--models","value":"string","summary":"Complete unique routed candidate permutation, preserving the exact featured prefix; exclusive with --mode."},{"name":"--mode","value":"string","summary":"default clears; alphabetical, provider and most-used compute complete routed orders."},{"name":"--json","value":"boolean","summary":"Emit the validated command result as JSON."}],
|
|
288
|
+
mutates: true,
|
|
289
|
+
json: "envelope",
|
|
290
|
+
details: ["Manual/preset replacement refuses a native-inclusive saved order until explicit reset/default. It never edits the featured models/force fields.","Manual mode rechecks settings and identities before PUT and refuses observed drift; this is not server CAS. Raw/encoded ambiguities and missing identities refuse before writing.","Most-used reads all/all usage, uses requested model identities and refuses incomplete evidence. Presets retain unranked candidates. A saved receipt does not prove client convergence."],
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
command: ["models","order","reset"],
|
|
294
|
+
usage: "ocx models order reset [--json]",
|
|
295
|
+
summary: "Clear saved picker ordering and its mode.",
|
|
296
|
+
routes: [{"method":"PUT","path":"/api/subagent-models"}],
|
|
297
|
+
flags: [{"name":"--json","value":"boolean","summary":"Emit the validated command result as JSON."}],
|
|
298
|
+
mutates: true,
|
|
299
|
+
json: "envelope",
|
|
300
|
+
details: ["Sends only pickerOrder:null and pickerOrderMode:null. Explicitly clears native-inclusive order as well; does not change featured models or force selection."],
|
|
301
|
+
},
|
|
302
|
+
];
|