Skip to content

Commit db9997a

Browse files
committed
docs: preserve union spellings in rendered planning tables
1 parent 8e0ced3 commit db9997a

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

‎devlog/_plan/261003_cli_gui_parity/004_settings_coverage.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,15 @@ These are bounded implementation candidates for the parent; several matrix rows
101101

102102
| Priority / rows | Exact implementation contract | Required isolated proof (not run here) |
103103
|---|---|---|
104-
| First: set-M05 display names | `models display-name P/M --set TEXT` or `--clear` sends PUT `/api/providers/P/model-display-names` `{modelId:M,displayName:TEXT|null}`. Add regex route declaration. Keep custom model edit unchanged. Server can save and then return failed convergence; CLI must retain saved state/error receipt instead of saying no change happened. | Set, clear, missing model, encoded provider/model identifiers, saved-but-refresh-failed response; prove correct resource and that retry does not invent a custom definition. Source `src/server/management/model-routes.ts:447`; GUI receipt comment `gui/src/pages/Models.tsx:647`. |
104+
| First: set-M05 display names | `models display-name P/M --set TEXT` or `--clear` sends PUT `/api/providers/P/model-display-names` `{modelId:M,displayName:TEXT\|null}`. Add regex route declaration. Keep custom model edit unchanged. Server can save and then return failed convergence; CLI must retain saved state/error receipt instead of saying no change happened. | Set, clear, missing model, encoded provider/model identifiers, saved-but-refresh-failed response; prove correct resource and that retry does not invent a custom definition. Source `src/server/management/model-routes.ts:447`; GUI receipt comment `gui/src/pages/Models.tsx:647`. |
105105
| First: set-R02 routing profile writes | Create `{mode:"create",id,profile}`; update `{mode:"update",id,expectedRevision,profile}`; remove query id with explicit destructive intent. Profile file is bounded/validated domain input. Exact fields: alias,candidates[{provider,model}],require{minContextWindow,minQuotaHeadroom,tools,imageInput,structuredOutput,reasoningEffort,serviceTier,localOnly,remoteAllowed,encryptedCodexTasks},optimize{latency,health,cost,quota},limits{maxEstimatedCostUsd,onUnknownCost},unknownEvidence,compatibility{requiredSuites,minStatus,maxEvidenceAgeMs,unknownEvidence,degradedEvidence}. | Create collision; update missing/stale revision leaves existing profile unchanged; delete dependent/in-use refusal; optional branch removal semantics and unknown field validation. Sources `src/cli/route-policy.ts:85`, `src/server/management/routing-profile-routes.ts:233`, `gui/src/routing-profile-editor-data.ts:280`. |
106106
| First: set-P07 provider snapshot/apply | Snapshot projected `{defaultProvider,providers}` only; apply exact `{baseline,next}` through PUT providers. No port/system/secret dump; strip derived GUI fields same as DTO projection. Never auto-retry stale baseline with fresh state because that would authorize overwriting intervening edits. | Stale-baseline 409; invalid endpoint/row; removal with dependencies; baseline read includes only permitted projection; no write after preview refusal; confirmed saved/catalog receipt. Sources `gui/src/hooks/useJsonConfigEditor.ts:16`, `src/server/management/provider-routes.ts:1055`. |
107-
| First: set-A07/set-A06/set-P15/set-P19 account gaps | Credit policy: `{id,creditsAfterLimit:boolean}` OR `{all:boolean}`; reject ambiguous selector/all. Codex override `{id,threshold:number|null}` with inherit -> null; pool default remains `{threshold}`. Unified pool PATCH/PUT fields provider,enabled,strategy,stickyLimit,autoSwitchThreshold,quotaWindow; quotaWindow enum five-hour/weekly/max-utilization is Anthropic-only. Anthropic grants command is GET-only; consume session gate remains excluded. | One versus all, on/off, explicit main identity, unknown id, inheritance versus zero, invalid quota window, unsupported provider fields, no secret output, consume refusal without user GUI session. Sources `src/codex/auth-api/routes.ts:122`, `src/codex/auth-api/routes.ts:310`, `src/server/management/oauth-account-routes.ts:559`, `src/server/management/anthropic-reset-grant-routes.ts:131`. |
107+
| First: set-A07/set-A06/set-P15/set-P19 account gaps | Credit policy: `{id,creditsAfterLimit:boolean}` OR `{all:boolean}`; reject ambiguous selector/all. Codex override `{id,threshold:number\|null}` with inherit -> null; pool default remains `{threshold}`. Unified pool PATCH/PUT fields provider,enabled,strategy,stickyLimit,autoSwitchThreshold,quotaWindow; quotaWindow enum five-hour/weekly/max-utilization is Anthropic-only. Anthropic grants command is GET-only; consume session gate remains excluded. | One versus all, on/off, explicit main identity, unknown id, inheritance versus zero, invalid quota window, unsupported provider fields, no secret output, consume refusal without user GUI session. Sources `src/codex/auth-api/routes.ts:122`, `src/codex/auth-api/routes.ts:310`, `src/server/management/oauth-account-routes.ts:559`, `src/server/management/anthropic-reset-grant-routes.ts:131`. |
108108
| Next: set-M10 picker order | `models order` owns pickerOrder and pickerOrderMode only; never changes featured models or force. Manual ordered ids + null mode; default/reset -> empty/default order + null mode; alphabetical/provider/most-used computes order using current visible identities, preserves supported model namespaces, sends matching mode. Most-used refuses incomplete usage evidence rather than sorting a partial sample. | Capture exact body; roster/force unchanged; native/routed id collision; duplicate/invisible ids; null/default reset; most-used incomplete usage refusal. Sources `src/server/management/subagent-model-routes.ts:74`, `gui/src/pages/Models.tsx:1904`. |
109109
| Next: set-S03 injection field; set-S04/set-M13 existing v2 contract | Extend injection set only with syncCodexSubagentDefaults boolean and normalized reread. Existing `ocx v2 mode`, `keep-native-v1`, `threads`, `mode-hint TEXT` and `mode-hint --clear` already implement the other GUI effects locally. Add strict JSON parsing/receipt support in the existing family if required; advisory acknowledgment remains a parent product-contract decision. No duplicate agent-mode writer. | Injection effort normalization; local/live same-home/target and sync outcome; structured v2 output without swallowed trailing flags; hint blank rejection/null reset; advisory not auto-acknowledged. Sources `src/cli/agent.ts:125`, `src/cli/v2.ts:109`, `src/cli/v2.ts:144`, `src/cli/v2.ts:177`, `src/cli/v2.ts:191`, `src/cli/v2.ts:220`, `src/server/management/agent-settings-routes.ts:415`. |
110110
| Next: set-C02 combo fields | Typed targets input includes ordered provider/model, optional weight, reasoningEfforts, modelProfile. Add imageInput auto/disabled and reasoningEffortMode strict/adaptive. Do not confuse defaultEffortMode with reasoningEffortMode. Explicit nativeAlias false needed to disable while alias remains native-shaped. Existing renameFrom/JEV null selector/timeouts retained. | Metadata survives unrelated edit and target reorder; auto/strict explicitly revert disabled/adaptive; remove a target override intentionally; nativeAlias on/off; JEV provider/model mutual exclusion and null resets; rename retains dependencies. Sources `src/cli/combo.ts:32`, `src/cli/combo.ts:137`, `gui/src/combo-workspace-data.ts:507`. |
111111
| Next: set-P03/set-P04/set-P17/set-M08 provider fields | HTTP override null clears. Provider contextWindow null clears; modelContextWindows merges touched keys with per-key null deletes. requestPacing is whole-object replacement, not server merge: flags must either read/merge existing provider state or require a full typed pacing file; `--clear` sends requestPacing:null. fastEnabled boolean has separate meaning from global fastRows. | Exact PATCH body includes only intended fields; per-model pacing edit retains other rules; clear removes object; context null removes only selected key; Cursor protocol validation; provider fast toggle doesn't affect global fastRows. Sources `src/server/management/provider-routes.ts:479`, `src/server/management/provider-routes.ts:493`, `src/server/management/provider-routes.ts:513`, `src/server/management/provider-routes.ts:542`. |
112-
| Parent/sibling merge: set-A09/set-A11/set-A16/set-M11/set-C05 | Settings flags write showCodexCredits,codexAccountPickerEnabled,codexMainAccountHardLock,ultraFastTier,fastRows. Quota activation writes `{codexQuotaAutoRefresh:{id,window:"fiveHour"|"weekly",enabled}}`; do not confuse this enum with pool quotaWindow. Combo stats reads `usage?jev=1&comboId=I&range=7d|30d|all`, not ordinary usage model filter. | Independent field bodies; true/false defaults; unavailable activation window returns 409; JEV-specific response/partial data; no duplicate ownership with operations sibling. Sources `src/server/management/config-routes.ts:564`, `src/cli/system-command.ts:124`, `src/cli/observe.ts:164`. |
112+
| Parent/sibling merge: set-A09/set-A11/set-A16/set-M11/set-C05 | Settings flags write showCodexCredits,codexAccountPickerEnabled,codexMainAccountHardLock,ultraFastTier,fastRows. Quota activation writes `{codexQuotaAutoRefresh:{id,window:"fiveHour"\|"weekly",enabled}}`; do not confuse this enum with pool quotaWindow. Combo stats reads `usage?jev=1&comboId=I&range=7d\|30d\|all`, not ordinary usage model filter. | Independent field bodies; true/false defaults; unavailable activation window returns 409; JEV-specific response/partial data; no duplicate ownership with operations sibling. Sources `src/server/management/config-routes.ts:564`, `src/cli/system-command.ts:124`, `src/cli/observe.ts:164`. |
113113
| Requires behavior proof: set-P02/set-P05/set-M06/P10 local-live portions | Preserve working offline/local commands; do not claim live management equivalence from local save alone. Add with --json currently returns before --sync; remove default differs from GUI and local dependency checks differ. Custom add/remove invoke live sync helper but need same-target fixture before deciding on a transport rewrite. | Isolated local config + fake live transport: same target selected, save/sync order and outcome, default deletion semantics, dependent combo refusal, JSON mode still applies requested sync, logout live cache convergence. Sources `src/cli/provider.ts:64`, `src/cli/provider.ts:279`, `src/cli/provider.ts:345`, `src/cli/models.ts:185`, `src/cli/dispatch.ts:425`. |
114114

115115
## Explicit scope limits and exclusions

‎devlog/_plan/261003_cli_gui_parity/006_target_contracts.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ Exact live grammar/mapping:
5757
| Existing root + proposed option | Exact live operation |
5858
|---|---|
5959
| `v2 status --live --json` | GET `/api/v2` |
60-
| `v2 mode v1|default|v2 --live [--acknowledge-surface-advisory] --json` | PUT `{multiAgentMode, multiAgentSurfaceAdvisoryAcknowledged?:true}`; omission preserves unacknowledged state; default remains string `default`, not null. |
61-
| `v2 keep-native-v1 on|off --live --json` | PUT `{keepNativeChatGptOnV1:boolean}` |
60+
| `v2 mode v1\|default\|v2 --live [--acknowledge-surface-advisory] --json` | PUT `{multiAgentMode, multiAgentSurfaceAdvisoryAcknowledged?:true}`; omission preserves unacknowledged state; default remains string `default`, not null. |
61+
| `v2 keep-native-v1 on\|off --live --json` | PUT `{keepNativeChatGptOnV1:boolean}` |
6262
| `v2 threads N --live --json` | PUT `{maxConcurrentThreadsPerSession:N}`, integer >=1 |
6363
| `v2 mode-hint TEXT --live --json` | PUT `{multiAgentModeHintText:TEXT}`; nonblank raw text retained. |
6464
| `v2 mode-hint --clear --live --json` | PUT `{multiAgentModeHintText:null}` |
65-
| `v2 on|off --live --json` | PUT `{enabled:boolean}`; retain server hybrid conflict refusal. |
65+
| `v2 on\|off --live --json` | PUT `{enabled:boolean}`; retain server hybrid conflict refusal. |
6666

6767
Use the same strict parser for local/live flags. `--json` must be consumed and unknown/trailing args rejected before local writers run; it must not be silently ignored. Local JSON must report `transport:local`, actual helper changed/no-op state and sync outcome without manufacturing server advisory or catalog receipts. Live JSON should preserve server returned state/warnings/catalogRefresh. If catalog refresh fails after persistence, do not claim rollback.
6868

‎devlog/_plan/261003_cli_gui_parity/040_models_routing.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Depends on wp3. Class C3; deletion and public routing identities receive focused
77
| Files | Before → after / command |
88
| --- | --- |
99
| NEW src/cli/models-custom-runtime.ts; MODIFY models.ts | `models add P M [existing metadata flags] --live --json` POSTs /api/custom-models. `models remove UUID-or-P/M --live --yes --json` resolves on the same pinned target then DELETEs UUID; no local lookup/fallback. Local add/remove gain truthful JSON save/sync receipts while retaining local behavior. |
10-
| NEW src/cli/models-order.ts; MODIFY models-runtime.ts, models-runtime-subcommands.ts | Add `models display-name P/M --set TEXT\|--clear --json` → PUT providers/P/model-display-names {modelId,displayName:string|null}; pricing stays separate. Add `models order status`, `set --models CSV`, `set --mode default\|alphabetical\|provider\|most-used`, `reset`. Write pickerOrder/pickerOrderMode, never featured models. NEW src/cli/model-picker-ordering.ts implements the pure projection grounded in gui/src/model-picker-order.ts:43-92; do not import GUI runtime source into shipped CLI. Known independent sorting fixtures and a test-only GUI/CLI conformance comparison guard the deliberate duplicate projection. Default/reset sends pickerOrder:null and pickerOrderMode:null. Other modes derive a complete order from pickerAvailable plus exact observed identities; most-used fetches all/all usage and refuses usageIncomplete:true. Manual writes preserve featured-prefix constraints and reject ambiguous identities. Preserve native/routed public identities. |
10+
| NEW src/cli/models-order.ts; MODIFY models-runtime.ts, models-runtime-subcommands.ts | Add `models display-name P/M --set TEXT\|--clear --json` → PUT providers/P/model-display-names {modelId,displayName:string\|null}; pricing stays separate. Add `models order status`, `set --models CSV`, `set --mode default\|alphabetical\|provider\|most-used`, `reset`. Write pickerOrder/pickerOrderMode, never featured models. NEW src/cli/model-picker-ordering.ts implements the pure projection grounded in gui/src/model-picker-order.ts:43-92; do not import GUI runtime source into shipped CLI. Known independent sorting fixtures and a test-only GUI/CLI conformance comparison guard the deliberate duplicate projection. Default/reset sends pickerOrder:null and pickerOrderMode:null. Other modes derive a complete order from pickerAvailable plus exact observed identities; most-used fetches all/all usage and refuses usageIncomplete:true. Manual writes preserve featured-prefix constraints and reject ambiguous identities. Preserve native/routed public identities. |
1111
| MODIFY src/server/management/route-registry.ts | Declare implemented model-display-names PUT with correct regex mechanism/module. Do not change the endpoint. |
1212
| NEW src/cli/route-policy-write.ts; MODIFY route-policy.ts | `route policy create I --file PROFILE --json` PUTs {id,mode:create,profile}. update requires explicit --expected-revision copied from show; never silently reads a fresh revision or retries conflict. remove requires --yes and DELETE query id. Domain profile file covers alias/candidates/require/optimize/limits/unknownEvidence/compatibility, using existing validation. |
1313
| MODIFY src/cli/combo.ts (extract combo-input.ts if needed) | Extend set with --image-input auto\|disabled, --reasoning-effort-mode strict\|adaptive, --targets-file FILE and explicit native-alias off while retaining bare legacy flag. Targets preserve reasoningEfforts/modelProfile/lastResort and ordering. Omitted fields remain omitted; defaultEffortMode and reasoningEffortMode stay distinct. |

0 commit comments

Comments
 (0)