Files
openclaw/extensions/anthropic/cli-constants.ts
Jason (Json) b32f59c8c1 feat(ui): create catalog sessions from the sidebar (#105810)
* feat(ui): create sessions from catalog headers

* fix(ui): deduplicate catalog-owned sessions

* fix(ui): preserve catalog session routing state

* fix(ui): keep per-agent session creation in switcher

* fix(anthropic): normalize runtime config snapshot

* test(plugin-sdk): account for model runtime export

* test(plugin-sdk): classify current deprecated surface

* test(ui): follow agent chip menu trigger

* fix(ui): bind catalog drafts to validated agent

* fix(ui): resolve catalog targets from gateway

* refactor(ui): split sidebar session helpers

* chore(ci): complete LOC baseline migration

* fix(ui): extract sidebar session catalog rendering

* fix(anthropic): use provider-relative catalog model id

* chore(ci): ratchet sidebar LOC baselines

* test(ui): cover catalog draft retargeting

* chore(plugin-sdk): refresh API baseline

* style: format catalog session changes

* fix(ui): retry catalog drafts after reconnect

* fix(ui): back off catalog target retries

* fix(ui): keep unresolved catalog drafts locked

* fix(ui): gate catalog creation in core

* fix(ui): keep catalog renderer private

* style(ui): format catalog session target

* chore(plugin-sdk): refresh API baseline

* style(ui): format catalog group state

* Merge latest origin/main CI fixes

* fix(ui): preserve catalog session agent selection

* fix(ui): preserve catalog session agent

* chore(plugin-sdk): refresh API baseline

* fix(ui): type catalog route data

* chore(plugin-sdk): refresh API baseline

* refactor(sessions): centralize transcript path archival

* fix(ui): target expanded agent catalog sessions

* fix(ui): scope catalog actions to expanded agent

* docs(ui): clarify catalog loader fallback

* fix(ui): scope catalog pagination to agent

* test(ui): type sidebar lifecycle refresh

* fix(anthropic): preserve node catalog bindings
2026-07-13 09:25:22 -06:00

48 lines
1.9 KiB
TypeScript

/**
* Shared Claude CLI constants. These identify the synthetic backend, default
* model refs, aliases, and session-id fields used across runtime and setup.
*/
/** Synthetic provider/backend id for Claude Code CLI-backed Anthropic models. */
export const CLAUDE_CLI_BACKEND_ID = "claude-cli";
/** Default Claude CLI model ref for agent defaults and live tests. */
export const CLAUDE_CLI_DEFAULT_MODEL_REF = `${CLAUDE_CLI_BACKEND_ID}/claude-opus-4-8`;
/** Provider-relative model id for Anthropic runtime-policy resolution. */
export const CLAUDE_CLI_CANONICAL_DEFAULT_MODEL_ID = CLAUDE_CLI_DEFAULT_MODEL_REF.slice(
CLAUDE_CLI_BACKEND_ID.length + 1,
);
/** Canonical model ref routed to the Claude CLI backend by Anthropic setup. */
export const CLAUDE_CLI_CANONICAL_DEFAULT_MODEL_REF = `anthropic/${CLAUDE_CLI_CANONICAL_DEFAULT_MODEL_ID}`;
/** Default Claude CLI models allowed when setup seeds the model allowlist. */
export const CLAUDE_CLI_DEFAULT_ALLOWLIST_REFS = [
CLAUDE_CLI_DEFAULT_MODEL_REF,
`${CLAUDE_CLI_BACKEND_ID}/claude-sonnet-5`,
`${CLAUDE_CLI_BACKEND_ID}/claude-opus-4-7`,
`${CLAUDE_CLI_BACKEND_ID}/claude-sonnet-4-6`,
`${CLAUDE_CLI_BACKEND_ID}/claude-opus-4-6`,
] as const;
/** User-facing Claude CLI model aliases normalized before execution. */
export const CLAUDE_CLI_MODEL_ALIASES: Record<string, string> = {
opus: "opus",
"opus-4.8": "claude-opus-4-8",
"opus-4.7": "claude-opus-4-7",
"opus-4.6": "claude-opus-4-6",
"claude-opus-4-8": "claude-opus-4-8",
"claude-opus-4-7": "claude-opus-4-7",
"claude-opus-4-6": "claude-opus-4-6",
sonnet: "sonnet",
"sonnet-5": "claude-sonnet-5",
"claude-sonnet-5": "claude-sonnet-5",
"sonnet-4.6": "claude-sonnet-4-6",
"claude-sonnet-4-6": "claude-sonnet-4-6",
haiku: "haiku",
};
/** JSONL fields that may contain Claude CLI session ids. */
export const CLAUDE_CLI_SESSION_ID_FIELDS = [
"session_id",
"sessionId",
"conversation_id",
"conversationId",
] as const;