Skip to content

F127 residual: provider-adaptive CLI effort (presets + passthrough) #315

Description

@zts212653

Summary

F127 already has a structured cli.effort editor residual. The current preset list is insufficient for evolving provider CLIs: Codex now needs values such as max and ultra, and future clients may expose new native values.

The editor must support both a maintained internal effort vocabulary and a direct text value. Known internal values are translated by the selected client's adapter; values outside that vocabulary are safely passed through to that client's effort mechanism so the runtime can adopt provider additions without waiting for a UI enum release.

Source Feature

  • Home repo source of truth: F127: 猫猫管理重构 — 账户配置与猫猫实例分离,支持动态创建猫 + 自定义别名 @ 路由
  • This issue tracks the missing cli.effort slice as an F127 residual, not a standalone new feature.

Desired Behavior

Editor

  • Present maintained internal CLI-effort presets appropriate for the selected client.
  • Also allow direct text entry of a native client effort value.
  • Codex must be able to use native values including max and ultra.
  • Preserve generic cliConfigArgs for unrelated advanced flags; effort is not assembled by raw shell-string concatenation.

Adaptation Contract

  • Persist the selected or typed canonical string in variant.cli.effort.
  • When the value is one of our internal effort presets, the selected client's adapter maps it to that CLI's native flag/value.
  • When it is not an internal preset, route it through the same selected-client adapter as an explicit native effort value without rejecting it solely because it is absent from our enum.
  • The adapter owns CLI argument construction and escaping. Direct input must not create shell-injection behavior.
  • A provider may still return a native validation error; surface that error clearly instead of silently rewriting the value.

Runtime

  • New invocations read the updated value immediately.
  • Existing sessions are not force-switched.
  • Runtime cat catalog remains the sole persistent source of truth.

Acceptance Criteria

  • Hub exposes maintained effort presets and a direct text-entry path.
  • Codex supports max and ultra through the structured effort field.
  • Each client adapter translates supported internal preset values to its native CLI representation.
  • A non-preset value is accepted, persisted, and passed through its selected-client adapter without enum-only rejection.
  • Direct input reaches command construction through structured arguments, never unsafe shell concatenation.
  • Provider-native validation failures are observable to the operator.
  • New invocations pick up the saved value; existing sessions are not force-restarted.
  • Tests cover preset conversion, passthrough, persistence, and provider rejection reporting.

Non-goals

  • Do not hot-mutate already-running sessions.
  • Do not replace generic cliConfigArgs for unrelated advanced flags.
  • Do not introduce a second truth source outside the runtime cat catalog.

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedMaintainer accepted: ready for implementation/mergeenhancementNew feature or requestfeature:F127猫猫管理重构 — 账户配置与猫猫实例分离triagedMaintainer reviewed, replied, and made an initial triage decision

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions