UNPKG

@sellable/install

Version:

One-command installer for Sellable MCP in Claude Code, Codex, and Hermes

75 lines (74 loc) • 2.21 kB
export const ENDPOINT_MODEL_SELECTION_ALLOWLIST: Readonly<{ openrouter: readonly [ "anthropic/claude-opus-5.5", "deepseek/deepseek-v4-flash-0731", "openai/gpt-6-luna", "anthropic/claude-sonnet-5.5", ]; "openai-codex": readonly ["gpt-6.1-sol"]; }>; export const ENDPOINT_MODEL_REASONING_EFFORTS: readonly [ "none", "low", "medium", "high", "xhigh", ]; export const ENDPOINT_MODEL_MAX_FALLBACKS: 2; export type EndpointModelStep = Readonly<{ provider: string; model: string; reasoningEffort: (typeof ENDPOINT_MODEL_REASONING_EFFORTS)[number]; runsApiBaseUrl?: string; modelConnectionId?: string; }>; export type EndpointModelSelection = Readonly< EndpointModelStep & { fallbackPolicy?: "STOP" | "PRODUCT_DEFAULT"; fallbacks?: readonly EndpointModelStep[]; } >; export type EndpointChainFailure = | "NATIVE_FAILED" | "OUTPUT_CONTRACT_FAILED" | "NOT_ADMITTED" | "STEP_UNAVAILABLE"; export type EndpointChainDecision = | Readonly<{ advance: true; stepIndex: number; selection: EndpointModelStep; }> | Readonly<{ advance: false; reason: | "INVALID" | "NOT_ADVANCEABLE" | "CHAIN_EXHAUSTED" | "NO_TIME_LEFT"; }>; export function normalizeRunsApiBaseUrl(value: unknown): string | null; export function compileEndpointModelSelection( value: unknown ): EndpointModelSelection | null | "invalid"; export function endpointModelSelectionChain( selection: unknown ): EndpointModelStep[]; export function endpointModelSelectionSource( selection: { provider: string; runsApiBaseUrl?: string } | null | undefined ): "default" | "openrouter" | "codex" | "custom"; export const ENDPOINT_CHAIN_STEP_ADMISSION_MS: number; export const ENDPOINT_CHAIN_MIN_STEP_MS: number; export const ENDPOINT_CHAIN_ADVANCE_FAILURES: readonly EndpointChainFailure[]; export function nextEndpointChainStep( chain: readonly EndpointModelStep[], history: readonly string[], failure: string, remainingMs?: number ): EndpointChainDecision; export function endpointChainStepAdmissionDeadline(input: { startedAtMs: number; deadlineMs: number; stepIndex: number; stepCount: number; }): number;