@closedrouter/cli 1.1.9 → 1.1.11
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 +12 -6
- package/dist/bridge/launch-proxy.d.ts +2 -1
- package/dist/bridge/launch-proxy.d.ts.map +1 -1
- package/dist/commands/agy-desktop-catalog.d.ts +8 -0
- package/dist/commands/agy-desktop-catalog.d.ts.map +1 -0
- package/dist/commands/agy-desktop.d.ts +3 -2
- package/dist/commands/agy-desktop.d.ts.map +1 -1
- package/dist/commands/agy-model.d.ts +2 -0
- package/dist/commands/agy-model.d.ts.map +1 -1
- package/dist/commands/agy-proxy.d.ts +2 -1
- package/dist/commands/agy-proxy.d.ts.map +1 -1
- package/dist/commands/claude-desktop.d.ts +9 -0
- package/dist/commands/claude-desktop.d.ts.map +1 -0
- package/dist/commands/cursor-desktop-hook.d.ts +4 -0
- package/dist/commands/cursor-desktop-hook.d.ts.map +1 -0
- package/dist/commands/cursor-desktop.d.ts +1 -2
- package/dist/commands/cursor-desktop.d.ts.map +1 -1
- package/dist/commands/desktop-inspector.d.ts +10 -2
- package/dist/commands/desktop-inspector.d.ts.map +1 -1
- package/dist/commands/desktop-launch.d.ts +8 -1
- package/dist/commands/desktop-launch.d.ts.map +1 -1
- package/dist/commands/launch-catalog.d.ts +85 -0
- package/dist/commands/launch-catalog.d.ts.map +1 -0
- package/dist/commands/model-branding.d.ts +6 -0
- package/dist/commands/model-branding.d.ts.map +1 -0
- package/dist/commands/start.d.ts +4 -1
- package/dist/commands/start.d.ts.map +1 -1
- package/dist/index.js +669 -96
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -141,17 +141,23 @@ cr start claude --desktop --model claude-sonnet-4-6 --path /Applications/Claude.
|
|
|
141
141
|
| Desktop app | Support |
|
|
142
142
|
| --- | --- |
|
|
143
143
|
| Codex | Configures a Responses provider and API-key authentication in an isolated `CODEX_HOME`. |
|
|
144
|
-
| Claude | Configures
|
|
145
|
-
| Cursor |
|
|
144
|
+
| Claude | Configures its native `3p` gateway profile and the supported model catalog. Local transport aliases resolve to the actual selected pool model. No Claude subscription or login is required for gateway sessions. |
|
|
145
|
+
| Cursor | Enables the bundled local agent engine in the launched process and routes requests directly through the ClosedRouter relay. Existing logins are reused. Without a login, the UI accepts the configured provider key and skips the login screen. No Cursor subscription is used for inference. |
|
|
146
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
147
|
|
|
148
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
149
|
|
|
150
|
-
|
|
150
|
+
Desktop clients use a streaming loopback relay with a per-launch local credential. The platform key stays in the launcher process. Cursor's local engine uses the relay directly, so the gateway does not need to be publicly reachable from Cursor's servers. Generated files and profile directories start with private permissions. Keep `cr` running and close the launched app instance to end the session. Interrupting `cr` stops local routing; macOS may leave the app open. Start a new session with `cr start` to reconnect.
|
|
151
151
|
|
|
152
|
-
|
|
152
|
+
Cursor's startup hook enables local provider mode in memory and serves app-owned scripts for both desktop views. The installed app files and signature are preserved. Its picker lists all tool-capable pool models, and changing the selection changes the routed model. Native model and login controllers are checked before injection; unsupported app builds fail with an update instruction. A valid existing login retains its normal authentication policy checks. Set `CLOSEDROUTER_CURSOR_AUTH_DB` to a different SQLite source, or a nonexistent path to test the no-login case.
|
|
153
153
|
|
|
154
|
-
macOS
|
|
154
|
+
On macOS, Claude uses a compatible Electron runtime installed by Cockpit, or the executable supplied through `CLOSEDROUTER_CLAUDE_ELECTRON`, when one is available. The launcher shares its immutable framework files by hard link and creates private copies of the small executable stubs before signing them with the virtualization entitlement Cowork requires. This added about 860 KB in the tested runtime. The installed Claude app and original Electron runtime are not modified. LaunchServices starts the owned runtime with Claude's original archive and resources. The startup inspector binds to loopback and closes after injection. The runtime and ClosedRouter config directory must be on the same filesystem. Without a compatible runtime, Claude uses its native gateway configuration and text model labels; `--desktop-inspector` requires a compatible runtime.
|
|
155
|
+
|
|
156
|
+
Antigravity uses the CCPA envelope conversion documented in `~/Projects/antigravity-mods`. The launcher briefly opens a loopback Node inspector and installs its language-server hook. A browser debugger replaces the launched renderer's model catalog with native custom-model entries, then detaches. Each entry carries a distinct routing alias and a positive context and output budget. The picker lists the supported pool models, and selecting one changes inference routing. App bundles and global hook configuration are not modified. Unsupported launcher builds fail before opening; `--open-only` remains available.
|
|
157
|
+
|
|
158
|
+
Cursor, Antigravity, and the hooked Claude view display the colored ClosedRouter logo beside model names. Codex uses its custom model catalog and provider labels. Launch requests also carry the configured model ID in system context so native client identity prompts do not misidentify the underlying model. The relay resolves the requested model on each turn and preserves tools and streamed responses. Unsupported model IDs are rejected before forwarding. Catalogs are snapshots of the models available to the platform key at launch; provider quotas can change during a session.
|
|
159
|
+
|
|
160
|
+
macOS app bundles are discovered in `/Applications` and `~/Applications`. Common Windows and Linux installation paths are checked, with `--path` available for other installations. Live tests verified Cursor, Claude's Code and Cowork views, and Antigravity inference through ClosedRouter. Cursor and Antigravity switched between `gpt-5-nano` and `gpt-4.1-nano` in their native pickers. Cowork could answer through the gateway, but its workspace VM reported insufficient disk space on the test Mac; workspace actions were not verified. Gemma's full agent request previously received an upstream quota error. Desktop hooks fail closed when expected controllers change. See the [Codex provider configuration](https://developers.openai.com/codex/config-advanced) and [Electron fuse documentation](https://www.electronjs.org/docs/latest/tutorial/fuses) for configuration and inspector behavior.
|
|
155
161
|
|
|
156
162
|
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
163
|
|
|
@@ -205,7 +211,7 @@ The standard Cursor `agent` / `cursor-agent` package does not include this local
|
|
|
205
211
|
|
|
206
212
|
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.
|
|
207
213
|
|
|
208
|
-
|
|
214
|
+
Claude Code uses its native labeled `/model` settings, Codex uses a custom catalog, Gemini CLI uses dynamic model definitions, and OpenCode registers the supported models under its ClosedRouter provider. Antigravity CLI registers branded custom models and maps their distinct Gemini transport aliases through the local relay. Cursor Agent Local discovers the supported catalog from the relay. Aider registers models under `openai/closedrouter/`; use `/models closedrouter` to list them. Clients with fixed pickers may require a current version to display custom catalogs.
|
|
209
215
|
|
|
210
216
|
---
|
|
211
217
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { type LaunchCatalog } from "../commands/launch-catalog";
|
|
1
2
|
/** Streaming transport relay: inject attribution for clients with no custom-header setting. */
|
|
2
|
-
export declare function startLaunchProxy(gatewayUrl: string, apiKey: string, harness: string, localKey?: string): Promise<{
|
|
3
|
+
export declare function startLaunchProxy(gatewayUrl: string, apiKey: string, harness: string, localKey?: string, modelOverride?: string | LaunchCatalog): Promise<{
|
|
3
4
|
baseUrl: string;
|
|
4
5
|
launchId: `${string}-${string}-${string}-${string}-${string}`;
|
|
5
6
|
close: () => Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"launch-proxy.d.ts","sourceRoot":"","sources":["../../src/bridge/launch-proxy.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"launch-proxy.d.ts","sourceRoot":"","sources":["../../src/bridge/launch-proxy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAoD,KAAK,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAIlH,+FAA+F;AAC/F,wBAAsB,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,SAAS,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,aAAa;;;;GAoGpJ"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { LaunchCatalog } from "./launch-catalog";
|
|
2
|
+
/** Replace only the launched renderer's custom-model provider. The native
|
|
3
|
+
* picker sends ModelInfo overrides to the language server on every turn. */
|
|
4
|
+
export declare function patchAntigravityCatalog(source: string, catalog: LaunchCatalog): string;
|
|
5
|
+
/** Browser debugger interception avoids copying the app or changing its files.
|
|
6
|
+
* The startup Node inspector closes after installation; no debug port remains. */
|
|
7
|
+
export declare function antigravityCatalogHook(catalog: LaunchCatalog, marker: string): string;
|
|
8
|
+
//# sourceMappingURL=agy-desktop-catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agy-desktop-catalog.d.ts","sourceRoot":"","sources":["../../src/commands/agy-desktop-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD;4EAC4E;AAC5E,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,GAAG,MAAM,CA0BtF;AAED;kFACkF;AAClF,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAmCrF"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { DesktopLaunchPlan } from "./desktop-launch";
|
|
2
|
+
import { type LaunchCatalog } from "./launch-catalog";
|
|
2
3
|
export declare function assertAntigravityModsAvailable(): Promise<void>;
|
|
3
4
|
export declare function assertAntigravityDesktopHookSupport(executable: string): void;
|
|
4
5
|
/** The same CCPA envelope bridge used by antigravity-mods, with ClosedRouter
|
|
5
6
|
* handling model selection and credentials. Account/discovery traffic continues
|
|
6
7
|
* through the user's existing account-rotation proxy. */
|
|
7
|
-
export declare function startAgyDesktopProxy(gatewayUrl: string, localKey: string, model: string, modsUrl?: string): Promise<{
|
|
8
|
+
export declare function startAgyDesktopProxy(gatewayUrl: string, localKey: string, model: string, modsUrl?: string, catalog?: LaunchCatalog): Promise<{
|
|
8
9
|
baseUrl: string;
|
|
9
10
|
close: () => Promise<void>;
|
|
10
11
|
}>;
|
|
11
|
-
export declare function addAntigravityDesktopHook(plan: DesktopLaunchPlan, endpoint: string): void;
|
|
12
|
+
export declare function addAntigravityDesktopHook(plan: DesktopLaunchPlan, endpoint: string, catalog?: LaunchCatalog): void;
|
|
12
13
|
//# sourceMappingURL=agy-desktop.d.ts.map
|
|
@@ -1 +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;
|
|
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;AAC1D,OAAO,EAAsB,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAO1E,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,EAAE,OAAO,CAAC,EAAE,aAAa;;;GA6FhJ;AAED,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI,CAmClH"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { type LaunchCatalog } from "./launch-catalog";
|
|
2
|
+
export declare function registerAgyLaunchCatalog(homeDir: string, catalog: LaunchCatalog, legacyTransport: string): string;
|
|
1
3
|
/** agy's custom-model key is also its visible label. Keep the upstream ID separate. */
|
|
2
4
|
export declare function registerAgyLaunchModel(homeDir: string, model: string, transportModel: string): string;
|
|
3
5
|
//# sourceMappingURL=agy-model.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agy-model.d.ts","sourceRoot":"","sources":["../../src/commands/agy-model.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"agy-model.d.ts","sourceRoot":"","sources":["../../src/commands/agy-model.ts"],"names":[],"mappings":"AAGA,OAAO,EAAgC,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAMpF,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,GAAG,MAAM,CAuBjH;AAED,uFAAuF;AACvF,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,MAAM,CA4BrG"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type LaunchCatalog } from "./launch-catalog";
|
|
1
2
|
export interface AgyModelProxy {
|
|
2
3
|
baseUrl: string;
|
|
3
4
|
close(): Promise<void>;
|
|
@@ -5,5 +6,5 @@ export interface AgyModelProxy {
|
|
|
5
6
|
/** Antigravity only accepts its built-in Gemini slugs. Translate those slugs
|
|
6
7
|
* at the transport boundary so its normal Gemini requests reach the selected
|
|
7
8
|
* ClosedRouter pool model, including title and other background requests. */
|
|
8
|
-
export declare function startAgyModelProxy(gatewayUrl: string, apiKey: string, model: string): Promise<AgyModelProxy>;
|
|
9
|
+
export declare function startAgyModelProxy(gatewayUrl: string, apiKey: string, model: string, catalog?: LaunchCatalog): Promise<AgyModelProxy>;
|
|
9
10
|
//# sourceMappingURL=agy-proxy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agy-proxy.d.ts","sourceRoot":"","sources":["../../src/commands/agy-proxy.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"agy-proxy.d.ts","sourceRoot":"","sources":["../../src/commands/agy-proxy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAsB,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAE1E,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AAED;;6EAE6E;AAC7E,wBAAsB,kBAAkB,CACtC,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,aAAa,GACtB,OAAO,CAAC,aAAa,CAAC,CAiDxB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { DesktopLaunchPlan } from "./desktop-launch";
|
|
2
|
+
/** Share immutable framework bytes, but detach every file codesign can write.
|
|
3
|
+
* Signing a hard-linked executable would change the user's original runtime. */
|
|
4
|
+
export declare function cloneClaudeElectronRuntime(source: string, destination: string): string[];
|
|
5
|
+
export declare function prepareClaudeElectronRuntime(runtime: string, sourceApp: string): string;
|
|
6
|
+
export declare function findClaudeSharedElectron(sourceApp: string, home?: string): string | undefined;
|
|
7
|
+
export declare function useClaudeSharedElectron(plan: DesktopLaunchPlan, runtime: string, sourceApp: string, toolArgs?: string[], launchServices?: boolean): void;
|
|
8
|
+
export declare function addClaudeDesktopHook(plan: DesktopLaunchPlan, baseUrl: string, localKey: string, sourceApp?: string, models?: string[]): void;
|
|
9
|
+
//# sourceMappingURL=claude-desktop.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude-desktop.d.ts","sourceRoot":"","sources":["../../src/commands/claude-desktop.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAI1D;gFACgF;AAChF,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,CA6BxF;AAED,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAsCvF;AAED,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,SAAY,GAAG,MAAM,GAAG,SAAS,CAShG;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,GAAE,MAAM,EAAO,EAAE,cAAc,UAAQ,GAAG,IAAI,CAI1J;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CA4B5I"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { DesktopLaunchPlan } from "./desktop-launch";
|
|
2
|
+
import type { LaunchCatalog } from "./launch-catalog";
|
|
3
|
+
export declare function addCursorDesktopLocalHook(plan: DesktopLaunchPlan, app: string, catalog?: LaunchCatalog): void;
|
|
4
|
+
//# sourceMappingURL=cursor-desktop-hook.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cursor-desktop-hook.d.ts","sourceRoot":"","sources":["../../src/commands/cursor-desktop-hook.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAKtD,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,iBAAiB,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI,CA2E7G"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export declare const CURSOR_APPLICATION_STORAGE = "src.vs.platform.reactivestorage.browser.reactiveStorageServiceImpl.persistentStorage.applicationUser";
|
|
2
|
-
export declare function
|
|
3
|
-
export declare function configureCursorDesktop(profileDir: string, baseUrl: string, apiKey: string, model: string, sourceDb?: string): Promise<string>;
|
|
2
|
+
export declare function configureCursorDesktop(profileDir: string, baseUrl: string, apiKey: string, model: string, sourceDb?: string, models?: string[]): Promise<string>;
|
|
4
3
|
//# sourceMappingURL=cursor-desktop.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cursor-desktop.d.ts","sourceRoot":"","sources":["../../src/commands/cursor-desktop.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,0BAA0B,yGAAyG,CAAC;
|
|
1
|
+
{"version":3,"file":"cursor-desktop.d.ts","sourceRoot":"","sources":["../../src/commands/cursor-desktop.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,0BAA0B,yGAAyG,CAAC;AAyCjJ,wBAAsB,sBAAsB,CAC1C,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAClE,QAAQ,SAAqE,EAC7E,MAAM,GAAE,MAAM,EAAY,GACzB,OAAO,CAAC,MAAM,CAAC,CA2CjB"}
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
/** Inject before
|
|
1
|
+
/** Inject before Desktop app's first application module, then detach. Packaged
|
|
2
2
|
* Electron rejects --require in NODE_OPTIONS but supports this loopback inspector. */
|
|
3
|
-
export declare function installDesktopInspectorHook(hookPath: string, logPath: string, signal: AbortSignal
|
|
3
|
+
export declare function installDesktopInspectorHook(hookPath: string, logPath: string, signal: AbortSignal, options?: {
|
|
4
|
+
readyPath?: string;
|
|
5
|
+
startupBreakpoint?: {
|
|
6
|
+
urlRegex: string;
|
|
7
|
+
lineNumber: number;
|
|
8
|
+
columnNumber: number;
|
|
9
|
+
condition: string;
|
|
10
|
+
};
|
|
11
|
+
}): Promise<void>;
|
|
4
12
|
//# sourceMappingURL=desktop-inspector.d.ts.map
|
|
@@ -1 +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,
|
|
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,EAAE,OAAO,GAAE;IACjH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iBAAiB,CAAC,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;CAClG,GAAG,OAAO,CAAC,IAAI,CAAC,CAkErB"}
|
|
@@ -11,6 +11,13 @@ export interface DesktopLaunchPlan {
|
|
|
11
11
|
inspectorHook?: {
|
|
12
12
|
path: string;
|
|
13
13
|
logPath: string;
|
|
14
|
+
readyPath?: string;
|
|
15
|
+
startupBreakpoint?: {
|
|
16
|
+
urlRegex: string;
|
|
17
|
+
lineNumber: number;
|
|
18
|
+
columnNumber: number;
|
|
19
|
+
condition: string;
|
|
20
|
+
};
|
|
14
21
|
};
|
|
15
22
|
}
|
|
16
23
|
export declare function isDesktopTool(tool: string): tool is DesktopTool;
|
|
@@ -18,7 +25,7 @@ export declare function isDesktopTool(tool: string): tool is DesktopTool;
|
|
|
18
25
|
export declare function resolveDesktopExecutable(tool: DesktopTool, explicitPath?: string, platform?: NodeJS.Platform, home?: string): string;
|
|
19
26
|
export declare function validateDesktopArgs(args: string[]): void;
|
|
20
27
|
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;
|
|
28
|
+
export declare function buildDesktopLaunchPlan(tool: DesktopTool, executable: string, profileDir: string, baseUrl?: string, localKey?: string, model?: string, toolArgs?: string[], platform?: NodeJS.Platform, models?: string[]): DesktopLaunchPlan;
|
|
22
29
|
export declare function writeDesktopLaunchPlan(plan: DesktopLaunchPlan): void;
|
|
23
30
|
/** Check Claude's installed config support without changing its bundle. */
|
|
24
31
|
export declare function assertClaudeDesktopGatewaySupport(executable: string): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"desktop-launch.d.ts","sourceRoot":"","sources":["../../src/commands/desktop-launch.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"desktop-launch.d.ts","sourceRoot":"","sources":["../../src/commands/desktop-launch.ts"],"names":[],"mappings":"AASA,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,IAA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AE,iBAAiB,GAAG,OAAO,CAAC,MAAM,CAAC,CAiB/E"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
export declare const modelLabel: (id: string) => string;
|
|
2
|
+
/** Native clients sometimes require a vendor-shaped ID. These aliases are
|
|
3
|
+
* local to a launch and never identify a different upstream model. */
|
|
4
|
+
export declare function transportModelId(id: string, family: "claude" | "gemini"): string;
|
|
5
|
+
export interface LaunchCatalog {
|
|
6
|
+
defaultModel: string;
|
|
7
|
+
models: string[];
|
|
8
|
+
aliases: Record<string, string>;
|
|
9
|
+
/** Native auxiliary requests can still use these fixed IDs. */
|
|
10
|
+
fallbacks: string[];
|
|
11
|
+
}
|
|
12
|
+
export declare function createLaunchCatalog(models: string[], selected: string): LaunchCatalog;
|
|
13
|
+
export declare function resolveLaunchModel(catalog: LaunchCatalog, requested: string): string | undefined;
|
|
14
|
+
export declare function claudeModelPicker(models: string[]): {
|
|
15
|
+
replaceBuiltInOptions: boolean;
|
|
16
|
+
options: {
|
|
17
|
+
model: string;
|
|
18
|
+
label: string;
|
|
19
|
+
description: string;
|
|
20
|
+
behavesAs: string;
|
|
21
|
+
}[];
|
|
22
|
+
};
|
|
23
|
+
export declare function codexModelCatalog(models: string[]): {
|
|
24
|
+
models: {
|
|
25
|
+
slug: string;
|
|
26
|
+
display_name: string;
|
|
27
|
+
description: string;
|
|
28
|
+
priority: number;
|
|
29
|
+
visibility: string;
|
|
30
|
+
supported_in_api: boolean;
|
|
31
|
+
supported_reasoning_levels: never[];
|
|
32
|
+
experimental_supported_tools: never[];
|
|
33
|
+
base_instructions: string;
|
|
34
|
+
default_reasoning_level: null;
|
|
35
|
+
supports_reasoning_summaries: boolean;
|
|
36
|
+
default_reasoning_summary: string;
|
|
37
|
+
shell_type: string;
|
|
38
|
+
apply_patch_tool_type: string;
|
|
39
|
+
web_search_tool_type: string;
|
|
40
|
+
input_modalities: string[];
|
|
41
|
+
supports_parallel_tool_calls: boolean;
|
|
42
|
+
support_verbosity: boolean;
|
|
43
|
+
prefer_websockets: boolean;
|
|
44
|
+
supports_image_detail_original: boolean;
|
|
45
|
+
context_window: number;
|
|
46
|
+
auto_compact_token_limit: number;
|
|
47
|
+
truncation_policy: {
|
|
48
|
+
mode: string;
|
|
49
|
+
limit: number;
|
|
50
|
+
};
|
|
51
|
+
}[];
|
|
52
|
+
};
|
|
53
|
+
export declare function geminiModelCatalog(models: string[], selected: string): {
|
|
54
|
+
experimental: {
|
|
55
|
+
dynamicModelConfiguration: boolean;
|
|
56
|
+
};
|
|
57
|
+
modelConfigs: {
|
|
58
|
+
modelDefinitions: {
|
|
59
|
+
[k: string]: {
|
|
60
|
+
displayName: string;
|
|
61
|
+
dialogDescription: string;
|
|
62
|
+
tier: string;
|
|
63
|
+
family: string;
|
|
64
|
+
isVisible: boolean;
|
|
65
|
+
features: {
|
|
66
|
+
thinking: boolean;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
customAliases: {
|
|
71
|
+
[k: string]: {
|
|
72
|
+
modelConfig: {
|
|
73
|
+
model: string;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
modelIdResolutions: {
|
|
78
|
+
[k: string]: {
|
|
79
|
+
default: string;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
export declare function addModelIdentity(payload: Record<string, unknown>, model: string, protocol: "anthropic" | "responses" | "chat" | "gemini"): void;
|
|
85
|
+
//# sourceMappingURL=launch-catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"launch-catalog.d.ts","sourceRoot":"","sources":["../../src/commands/launch-catalog.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,OAAQ,MAAM,WAA0B,CAAC;AAEhE;sEACsE;AACtE,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,QAAQ,GAAG,MAAM,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.68 16.18\" fill=\"none\" stroke=\"#04080A\" stroke-width=\"2.6\" stroke-linecap=\"round\"/><circle cx=\"18.2\" cy=\"12\" r=\"1.9\" fill=\"#04080A\"/></svg>";
|
|
2
|
+
/** Add the provider mark to native controls without changing click handlers,
|
|
3
|
+
* model IDs, keyboard behavior, or the application's typography. */
|
|
4
|
+
export declare function installModelBranding(models: string[], artwork: string): void;
|
|
5
|
+
export declare function modelBrandingHook(models: string[]): string;
|
|
6
|
+
//# sourceMappingURL=model-branding.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-branding.d.ts","sourceRoot":"","sources":["../../src/commands/model-branding.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,mUAAqS,CAAC;AAEpU;oEACoE;AACpE,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAiC5E;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAS1D"}
|
package/dist/commands/start.d.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* model, write only app-owned config, then start the installed client process.
|
|
5
5
|
*/
|
|
6
6
|
import { type GatewayModel } from "../client";
|
|
7
|
+
import { type LaunchCatalog } from "./launch-catalog";
|
|
7
8
|
export type StartTool = "claude" | "codex" | "gemini" | "agy" | "aider" | "opencode" | "cursor";
|
|
8
9
|
type CliTool = StartTool;
|
|
9
10
|
export interface StartCommandOptions {
|
|
@@ -16,6 +17,7 @@ export interface StartCommandOptions {
|
|
|
16
17
|
executablePath?: string;
|
|
17
18
|
desktop?: boolean;
|
|
18
19
|
openOnly?: boolean;
|
|
20
|
+
desktopInspector?: boolean;
|
|
19
21
|
}
|
|
20
22
|
interface ConfigFile {
|
|
21
23
|
path: string;
|
|
@@ -27,6 +29,7 @@ export interface LaunchPlan {
|
|
|
27
29
|
args: string[];
|
|
28
30
|
env: NodeJS.ProcessEnv;
|
|
29
31
|
configFile?: ConfigFile;
|
|
32
|
+
extraFiles?: ConfigFile[];
|
|
30
33
|
}
|
|
31
34
|
export declare function isGatewayModelAvailable(availableModels: string[], model: string): boolean;
|
|
32
35
|
export declare function getStartToolOptions(desktopOnly?: boolean): {
|
|
@@ -41,7 +44,7 @@ export declare function resolveStartTarget(value: string, desktop?: boolean): {
|
|
|
41
44
|
export declare function buildLaunchPlan(tool: CliTool, serverUrl: string, apiKey: string, model: string, toolArgs?: string[], homeDir?: string, executablePath?: string, agyRouting?: {
|
|
42
45
|
baseUrl: string;
|
|
43
46
|
recognizedModel: string;
|
|
44
|
-
}): LaunchPlan;
|
|
47
|
+
}, catalog?: LaunchCatalog): LaunchPlan;
|
|
45
48
|
export declare function modelSupportsHarness(model: GatewayModel, tool: StartTool): boolean;
|
|
46
49
|
export declare function startCommand(options?: StartCommandOptions): Promise<void>;
|
|
47
50
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../../src/commands/start.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAUH,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../../src/commands/start.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAUH,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AAalE,OAAO,EAA6F,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjJ,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,CAAC;AAChG,KAAK,OAAO,GAAG,SAAS,CAAC;AAEzB,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,CAA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