@closedrouter/cli 1.1.8 → 1.1.9

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/README.md CHANGED
@@ -125,12 +125,50 @@ cr logout
125
125
  ```
126
126
 
127
127
  ### `cr start` / `cr launch`
128
+
129
+ Run `cr start` to choose a CLI or desktop app from the tool selector. Desktop entries are labeled Codex Desktop, Antigravity Desktop, Cursor Desktop, and Claude Desktop. Use `cr start --desktop` to show only desktop apps. Explicit tool names such as `cr start codex` still default to the CLI; add `--desktop` to launch the app. The names `codex-desktop`, `claude-desktop`, `cursor-desktop`, and `antigravity-desktop` also work.
130
+
131
+ ```bash
132
+ cr start codex --desktop --model gpt-4.1
133
+ cr start claude --desktop --model claude-sonnet-4-6
134
+ cr start cursor --desktop --model gpt-4o-mini
135
+ cr start antigravity --desktop --model gpt-5-nano
136
+ cr start codex --desktop --open-only
137
+ # Override app discovery with a macOS bundle or an executable on any platform
138
+ cr start claude --desktop --model claude-sonnet-4-6 --path /Applications/Claude.app
139
+ ```
140
+
141
+ | Desktop app | Support |
142
+ | --- | --- |
143
+ | Codex | Configures a Responses provider and API-key authentication in an isolated `CODEX_HOME`. |
144
+ | Claude | Configures the desktop inference gateway using its `3p` deployment profile and `configLibrary`. Requires a Claude build with gateway support. |
145
+ | Cursor | Automatically configures the OpenAI API key, base URL, enabled custom model, and model selectors in an isolated SQLite profile. Reuses an existing Cursor login. The picker excludes `claude-` and `gemini-` names because the standard editor assigns those to separate providers. BYOK requests use Cursor's servers, so the gateway must be publicly reachable. Cursor account and feature restrictions still apply. |
146
+ | Antigravity | On macOS, installs a process-local request hook and translates Cloud Code generation envelopes into Gemini gateway requests for the selected pool model. Account and model-discovery traffic uses the existing `antigravity-mods` proxy. Requires its daemon running on ports 59997 and 59998. |
147
+
148
+ Desktop launches follow the isolation and gateway configuration in `reference_repos/cockpit-tools`. Each launch creates a new Electron profile under `~/.closedrouter/desktop/<tool>/`, or your `CLOSEDROUTER_CONFIG_DIR`. Those profiles retain the app's session files. Cursor copies only its login state, and Antigravity retains its native language-server account and conversation store for compatibility with `antigravity-mods`. Use `--open-only` to open an app without creating a gateway configuration or requiring ClosedRouter login. An open-only Antigravity instance continues using your existing account-rotation hook when that daemon is running.
149
+
150
+ Codex, Claude, and Antigravity use a streaming loopback relay with a per-launch local credential. Their platform key stays in the launcher process. Cursor needs the platform key in its isolated profile so its server-side BYOK transport can authenticate to the public gateway; its installed editor migrates that key into secure storage on startup. Generated files and profile directories start with private permissions. Keep `cr` running and close the launched app instance to end the session. On macOS, `open -W -n -a` starts a separate instance and waits for it to exit. Interrupting `cr` stops local routing; macOS may leave the app open. Start a new session with `cr start` to reconnect.
151
+
152
+ Antigravity uses the CCPA envelope conversion documented in `~/Projects/antigravity-mods`. The launcher briefly opens a loopback Node inspector, installs its language-server spawn hook before the app starts, then closes the inspector. It overrides generation routing only in the launched process and prevents the global mods daemon from overwriting that session's endpoint. App bundles and global hook configuration are not modified. The app still displays its native model names; the actual pool model is the one selected by `cr start`. Unsupported launcher builds fail before opening; `--open-only` remains available.
153
+
154
+ macOS app bundles are discovered in `/Applications` and `~/Applications`. Common Windows and Linux installation paths are checked, with `--path` available for other installations. Antigravity's routed desktop hook currently supports the inspected macOS build; other platforms can open the app with `--open-only`. Cursor configuration supports Bun, Node 22+, or the system `sqlite3` executable. Tests cover generated profiles, authenticated routing, and streamed function-call envelopes. Installed-app smoke checks verified Cursor settings hydration and Antigravity's live language-server routing. Full model turns in each desktop UI still require verification. See the [Codex provider configuration](https://developers.openai.com/codex/config-advanced) and [Cursor documentation](https://cursor.com/docs) for their configuration interfaces.
155
+
156
+ The model picker uses ClosedRouter's lime selection accent, colored provider names, gold favorites, and a framed live-search field. Wide terminals show details for the highlighted model beside the list. Smaller terminals use a compact layout. Closing the picker restores your previous terminal screen. Color adapts to truecolor, 256-color, or standard ANSI terminals; set `NO_COLOR=1` for plain text.
157
+
128
158
  Configure and start an installed coding CLI using models exposed to your platform key. The command discovers available tool-capable models and keeps keys out of arguments and generated client profiles. Starting Claude Code as a client uses the Anthropic-compatible platform endpoint; `cr gateway` separately contributes a local Claude Code subscription to the shared pool.
129
159
 
130
160
  ```bash
131
161
  # Interactive model and tool selection
132
162
  cr start
133
163
 
164
+ # Save the selector grouping, or open interactive settings with cr settings
165
+ cr settings --model-grouping model-provider
166
+ cr settings --model-grouping account-provider
167
+ cr settings --model-grouping none
168
+
169
+ # Override grouping for one launch
170
+ cr start codex --group-by account-provider
171
+
134
172
  # Start a selected tool and model
135
173
  cr start claude --model claude-sonnet-4-6
136
174
  cr start codex --model gpt-4.1
@@ -138,13 +176,33 @@ cr start gemini --model gemini-2.5-flash
138
176
  cr start agy --model gpt-5-nano
139
177
  cr start aider --model gpt-4o-mini
140
178
  cr start opencode --model gpt-4o-mini
179
+ cr start cursor --model gpt-4o-mini
141
180
 
142
181
  # Forward arguments to the coding tool
143
182
  cr start claude --model claude-sonnet-4-6 -- --resume
144
183
  ```
145
184
 
185
+ The model selector lists every account provider in brackets, for example `claude-sonnet-4-6 [Antigravity, Claude Code]`. Type to filter models and provider names as you type. Use Up/Down to move, Enter to start, and `*` to favorite or unfavorite the highlighted model. Favorites appear first within each group, or at the top of the ungrouped list. Backspace edits the search, Ctrl+U clears it, and Esc clears a search or cancels an empty search.
186
+
187
+ Tab cycles between grouping by model owner, grouping by account provider, and one ungrouped model list. Tab also saves the grouping for future launches. Models with multiple account providers appear in each provider's group; selecting any entry launches the same pool model. Grouping and favorites are stored locally in `~/.closedrouter/config.json` and survive logout. Older servers that omit provider metadata show `provider info unavailable` until the server is updated.
188
+
146
189
  Claude Code uses the Anthropic-compatible endpoint and can route through any eligible provider account. Codex gets a separate `~/.codex/closedrouter-launch.config.toml` profile using the Responses API. Gemini gets an app-owned authentication settings file under `~/.closedrouter/`, and OpenCode receives inline launch configuration. Antigravity CLI requires `modelProvider: "gemini"` in `~/.gemini/antigravity-cli/settings.json`. Its launcher starts a local adapter that maps Antigravity's built-in Gemini model name to the tool-capable pool model you select. The adapter binds only to localhost and stops when Antigravity exits. The launchers do not change the tools' main configuration files.
147
190
 
191
+ Cursor CLI launch support uses the separate **Cursor Agent Local** preview package, tested with version `2026.09.28-64d2043`. Install it on macOS or Linux using Cursor's installer:
192
+
193
+ ```bash
194
+ curl -fsSL 'https://cursor.com/internal-local-install-nHZIc6RZgTXIfai0aO?darwin=true&channel=prod' | bash
195
+ cr start cursor --model gpt-4o-mini
196
+
197
+ # Use an installation outside PATH
198
+ cr start cursor --model gpt-4o-mini --path /path/to/cursor-agent-local
199
+
200
+ # Run a headless prompt through the pool
201
+ cr start cursor --model gpt-4o-mini -- --print "Explain this project"
202
+ ```
203
+
204
+ The standard Cursor `agent` / `cursor-agent` package does not include this local runtime. ClosedRouter checks for `agent-local` or `cursor-agent-local`, starts it in authless mode, and points its OpenAI-compatible requests at the launch relay. Model calls and function tools use the selected pool model. A Cursor account or Cursor API key is not required. Global Cursor settings and history for these launches live under `~/.closedrouter/cursor-launch`, or under your `CLOSEDROUTER_CONFIG_DIR` override. The launcher keeps the platform key in the child environment and rejects forwarded model, provider, and authentication overrides. The separate package and its installer are experimental and may change between Cursor releases.
205
+
148
206
  Cursor SDK keys can also be connected in the web account dialog or imported from `CURSOR_API_KEY`. ClosedRouter discovers models using Cursor's SDK and sends text-only, tools-disabled SDK runs through its normal gateway and telemetry path. This credential type is separate from Cursor OAuth tokens imported from the editor.
149
207
 
150
208
  Desktop application launch support is deferred from the MVP. Antigravity credentials and models remain available through the account pool and compatible gateway endpoints.
@@ -1,5 +1,5 @@
1
1
  /** Streaming transport relay: inject attribution for clients with no custom-header setting. */
2
- export declare function startLaunchProxy(gatewayUrl: string, apiKey: string, harness: string): Promise<{
2
+ export declare function startLaunchProxy(gatewayUrl: string, apiKey: string, harness: string, localKey?: string): Promise<{
3
3
  baseUrl: string;
4
4
  launchId: `${string}-${string}-${string}-${string}-${string}`;
5
5
  close: () => Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"launch-proxy.d.ts","sourceRoot":"","sources":["../../src/bridge/launch-proxy.ts"],"names":[],"mappings":"AAMA,+FAA+F;AAC/F,wBAAsB,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;;;;GAqDzF"}
1
+ {"version":3,"file":"launch-proxy.d.ts","sourceRoot":"","sources":["../../src/bridge/launch-proxy.ts"],"names":[],"mappings":"AAMA,+FAA+F;AAC/F,wBAAsB,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,SAAS;;;;GA0D5G"}
package/dist/client.d.ts CHANGED
@@ -27,6 +27,15 @@ export interface AccountPayload {
27
27
  max_concurrency?: number;
28
28
  credentials: Record<string, string>;
29
29
  }
30
+ export interface GatewayModel {
31
+ id?: string;
32
+ name?: string;
33
+ owned_by?: string;
34
+ provider_types?: string[];
35
+ supported_parameters?: string[];
36
+ status?: string;
37
+ available_tool_account_count?: number;
38
+ }
30
39
  export declare class ClosedRouterClient {
31
40
  private baseUrl;
32
41
  private sessionToken?;
@@ -54,7 +63,7 @@ export declare class ClosedRouterClient {
54
63
  listApiKeys(): Promise<Record<string, any>[]>;
55
64
  listGatewayModels(options?: {
56
65
  preferApiKey?: boolean;
57
- }): Promise<Record<string, any>[]>;
66
+ }): Promise<GatewayModel[]>;
58
67
  listClaudeBridgeModels(): Promise<string[]>;
59
68
  listBridgeNodes(): Promise<Record<string, any>[]>;
60
69
  formatAccountForIngestion(account: DiscoveredAccount, isShared?: boolean, includeProviderDefaults?: boolean): AccountPayload;
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE1D,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM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C,CAUzF;IAEK,sBAAsB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CA+BhD;IAEK,eAAe,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC,CAUtD;IAED,yBAAyB,CACvB,OAAO,EAAE,iBAAiB,EAC1B,QAAQ,CAAC,EAAE,OAAO,EAClB,uBAAuB,UAAO,GAC7B,cAAc,CA2BhB;CACF"}
@@ -0,0 +1,12 @@
1
+ import type { DesktopLaunchPlan } from "./desktop-launch";
2
+ export declare function assertAntigravityModsAvailable(): Promise<void>;
3
+ export declare function assertAntigravityDesktopHookSupport(executable: string): void;
4
+ /** The same CCPA envelope bridge used by antigravity-mods, with ClosedRouter
5
+ * handling model selection and credentials. Account/discovery traffic continues
6
+ * through the user's existing account-rotation proxy. */
7
+ export declare function startAgyDesktopProxy(gatewayUrl: string, localKey: string, model: string, modsUrl?: string): Promise<{
8
+ baseUrl: string;
9
+ close: () => Promise<void>;
10
+ }>;
11
+ export declare function addAntigravityDesktopHook(plan: DesktopLaunchPlan, endpoint: string): void;
12
+ //# sourceMappingURL=agy-desktop.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agy-desktop.d.ts","sourceRoot":"","sources":["../../src/commands/agy-desktop.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAK1D,wBAAsB,8BAA8B,IAAI,OAAO,CAAC,IAAI,CAAC,CAYpE;AAED,wBAAgB,mCAAmC,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAa5E;AAED;;yDAEyD;AACzD,wBAAsB,oBAAoB,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,SAAiB;;;GA0FvH;AAED,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAkCzF"}
@@ -0,0 +1,4 @@
1
+ export declare const CURSOR_APPLICATION_STORAGE = "src.vs.platform.reactivestorage.browser.reactiveStorageServiceImpl.persistentStorage.applicationUser";
2
+ export declare function cursorDesktopSupportsModel(model: string): boolean;
3
+ export declare function configureCursorDesktop(profileDir: string, baseUrl: string, apiKey: string, model: string, sourceDb?: string): Promise<string>;
4
+ //# sourceMappingURL=cursor-desktop.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cursor-desktop.d.ts","sourceRoot":"","sources":["../../src/commands/cursor-desktop.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,0BAA0B,yGAAyG,CAAC;AAEjJ,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAIjE;AAyCD,wBAAsB,sBAAsB,CAC1C,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAClE,QAAQ,SAA0B,GACjC,OAAO,CAAC,MAAM,CAAC,CAkCjB"}
@@ -0,0 +1,6 @@
1
+ import type { LaunchPlan } from "./start";
2
+ export declare const CURSOR_LOCAL_INSTALL_URL = "https://cursor.com/internal-local-install-nHZIc6RZgTXIfai0aO?darwin=true&channel=prod";
3
+ export declare function buildCursorLaunchPlan(serverUrl: string, apiKey: string, model: string, toolArgs?: string[], homeDir?: string, executablePath?: string): LaunchPlan;
4
+ /** Verify the separate local runtime without using a Cursor account or the gateway. */
5
+ export declare function resolveCursorLocalExecutable(executablePath?: string, homeDir?: string): string;
6
+ //# sourceMappingURL=cursor-launch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cursor-launch.d.ts","sourceRoot":"","sources":["../../src/commands/cursor-launch.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,eAAO,MAAM,wBAAwB,0FAA0F,CAAC;AAOhI,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,QAAQ,GAAE,MAAM,EAAO,EACvB,OAAO,SAAY,EACnB,cAAc,SAAgB,GAC7B,UAAU,CAiBZ;AAED,uFAAuF;AACvF,wBAAgB,4BAA4B,CAAC,cAAc,CAAC,EAAE,MAAM,EAAE,OAAO,SAAY,GAAG,MAAM,CAkBjG"}
@@ -0,0 +1,4 @@
1
+ /** Inject before Antigravity's first application module, then detach. Packaged
2
+ * Electron rejects --require in NODE_OPTIONS but supports this loopback inspector. */
3
+ export declare function installDesktopInspectorHook(hookPath: string, logPath: string, signal: AbortSignal): Promise<void>;
4
+ //# sourceMappingURL=desktop-inspector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"desktop-inspector.d.ts","sourceRoot":"","sources":["../../src/commands/desktop-inspector.ts"],"names":[],"mappings":"AAIA;sFACsF;AACtF,wBAAsB,2BAA2B,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CA6DvH"}
@@ -0,0 +1,26 @@
1
+ export type DesktopTool = "codex" | "claude" | "cursor" | "agy";
2
+ export interface DesktopLaunchPlan {
3
+ command: string;
4
+ args: string[];
5
+ env: NodeJS.ProcessEnv;
6
+ files: Array<{
7
+ path: string;
8
+ contents: string;
9
+ }>;
10
+ profileDir: string;
11
+ inspectorHook?: {
12
+ path: string;
13
+ logPath: string;
14
+ };
15
+ }
16
+ export declare function isDesktopTool(tool: string): tool is DesktopTool;
17
+ /** Resolve desktop apps separately from same-named CLI shims. */
18
+ export declare function resolveDesktopExecutable(tool: DesktopTool, explicitPath?: string, platform?: NodeJS.Platform, home?: string): string;
19
+ export declare function validateDesktopArgs(args: string[]): void;
20
+ export declare function createDesktopProfile(tool: DesktopTool): string;
21
+ export declare function buildDesktopLaunchPlan(tool: DesktopTool, executable: string, profileDir: string, baseUrl?: string, localKey?: string, model?: string, toolArgs?: string[], platform?: NodeJS.Platform): DesktopLaunchPlan;
22
+ export declare function writeDesktopLaunchPlan(plan: DesktopLaunchPlan): void;
23
+ /** Check Claude's installed config support without changing its bundle. */
24
+ export declare function assertClaudeDesktopGatewaySupport(executable: string): void;
25
+ export declare function runDesktopLaunch(plan: DesktopLaunchPlan): Promise<number>;
26
+ //# sourceMappingURL=desktop-launch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"desktop-launch.d.ts","sourceRoot":"","sources":["../../src/commands/desktop-launch.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,KAAK,CAAC;AAMhE,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC;IACvB,KAAK,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACjD,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CACnD;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,WAAW,CAE/D;AAED,iEAAiE;AACjE,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,WAAW,EAAE,YAAY,CAAC,EAAE,MAAM,EAAE,QAAQ,kBAAmB,EAAE,IAAI,SAAY,GACtF,MAAM,CAoBR;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CAIxD;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,CAI9D;AAED,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EACzD,OAAO,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EACnD,QAAQ,GAAE,MAAM,EAAO,EAAE,QAAQ,kBAAmB,GACnD,iBAAiB,CA+CnB;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,iBAAiB,GAAG,IAAI,CAQpE;AAED,2EAA2E;AAC3E,wBAAgB,iCAAiC,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAO1E;AAED,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,MAAM,CAAC,CAe/E"}
@@ -0,0 +1,6 @@
1
+ import { type ModelGrouping } from "../config";
2
+ export declare function parseModelGrouping(value: string): ModelGrouping;
3
+ export declare function settingsCommand(options?: {
4
+ modelGrouping?: string;
5
+ }): Promise<void>;
6
+ //# sourceMappingURL=settings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/commands/settings.ts"],"names":[],"mappings":"AACA,OAAO,EAA4D,KAAK,aAAa,EAAE,MAAM,WAAW,CAAC;AAGzG,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,CAK/D;AAED,wBAAsB,eAAe,CAAC,OAAO,GAAE;IAAE,aAAa,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAsB7F"}
@@ -3,7 +3,8 @@
3
3
  * The per-tool adapters follow the launcher pattern used by Ollama: discover a
4
4
  * model, write only app-owned config, then start the installed client process.
5
5
  */
6
- export type StartTool = "claude" | "codex" | "gemini" | "agy" | "aider" | "opencode";
6
+ import { type GatewayModel } from "../client";
7
+ export type StartTool = "claude" | "codex" | "gemini" | "agy" | "aider" | "opencode" | "cursor";
7
8
  type CliTool = StartTool;
8
9
  export interface StartCommandOptions {
9
10
  tool?: string;
@@ -11,7 +12,10 @@ export interface StartCommandOptions {
11
12
  server?: string;
12
13
  key?: string;
13
14
  model?: string;
15
+ groupBy?: string;
14
16
  executablePath?: string;
17
+ desktop?: boolean;
18
+ openOnly?: boolean;
15
19
  }
16
20
  interface ConfigFile {
17
21
  path: string;
@@ -25,11 +29,20 @@ export interface LaunchPlan {
25
29
  configFile?: ConfigFile;
26
30
  }
27
31
  export declare function isGatewayModelAvailable(availableModels: string[], model: string): boolean;
32
+ export declare function getStartToolOptions(desktopOnly?: boolean): {
33
+ value: string;
34
+ label: string;
35
+ hint: string;
36
+ }[];
37
+ export declare function resolveStartTarget(value: string, desktop?: boolean): {
38
+ tool: StartTool;
39
+ desktop: boolean;
40
+ };
28
41
  export declare function buildLaunchPlan(tool: CliTool, serverUrl: string, apiKey: string, model: string, toolArgs?: string[], homeDir?: string, executablePath?: string, agyRouting?: {
29
42
  baseUrl: string;
30
43
  recognizedModel: string;
31
44
  }): LaunchPlan;
32
- export declare function modelSupportsHarness(model: Record<string, any>, tool: StartTool): boolean;
45
+ export declare function modelSupportsHarness(model: GatewayModel, tool: StartTool): boolean;
33
46
  export declare function startCommand(options?: StartCommandOptions): Promise<void>;
34
47
  export {};
35
48
  //# sourceMappingURL=start.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../../src/commands/start.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAeH,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,OAAO,GAAG,UAAU,CAAC;AACrF,KAAK,OAAO,GAAG,SAAS,CAAC;AAEzB,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,c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CAqHZ;AAeD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,SAAS,GAAG,OAAO,CAKlF;AAuED,wBAAsB,YAAY,CAAC,OAAO,GAAE,mBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,CAmGnF"}
package/dist/config.d.ts CHANGED
@@ -7,12 +7,17 @@ export interface UserProfile {
7
7
  email: string;
8
8
  name?: string;
9
9
  }
10
+ export declare const MODEL_GROUPINGS: readonly ["model-provider", "account-provider", "none"];
11
+ export type ModelGrouping = typeof MODEL_GROUPINGS[number];
12
+ export declare function isModelGrouping(value: unknown): value is ModelGrouping;
10
13
  export interface CliConfig {
11
14
  serverUrl: string;
12
15
  sessionToken?: string;
13
16
  apiKey?: string;
14
17
  bridgeApiKey?: string;
15
18
  user?: UserProfile;
19
+ modelGrouping?: ModelGrouping;
20
+ favoriteModels?: string[];
16
21
  }
17
22
  export declare function getConfigDir(): string;
18
23
  export declare function getConfigPath(): string;
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,SAAS;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB;AAID,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAED,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED,wBAAgB,UAAU,IAAI,SAAS,CAkBtC;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,SAAS,CAmBjE;AA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