dsh-llm-omp-transports 0.2.5 → 0.2.6
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 +116 -15
- package/lib/adapter.d.ts +28 -2
- package/lib/adapter.js +47 -1
- package/lib/adapter.js.map +1 -1
- package/lib/catalog/google-antigravity.d.ts +27 -0
- package/lib/catalog/google-antigravity.js +1062 -0
- package/lib/catalog/google-antigravity.js.map +1 -0
- package/lib/catalog/google-gemini-cli.d.ts +28 -0
- package/lib/catalog/google-gemini-cli.js +330 -0
- package/lib/catalog/google-gemini-cli.js.map +1 -0
- package/lib/devin/auth.d.ts +5 -0
- package/lib/devin/auth.js +11 -24
- package/lib/devin/auth.js.map +1 -1
- package/lib/devin/transport.d.ts +22 -6
- package/lib/devin/transport.js +10 -25
- package/lib/devin/transport.js.map +1 -1
- package/lib/google/auth.d.ts +130 -0
- package/lib/google/auth.js +590 -0
- package/lib/google/auth.js.map +1 -0
- package/lib/google/callback-listener.d.ts +67 -0
- package/lib/google/callback-listener.js +289 -0
- package/lib/google/callback-listener.js.map +1 -0
- package/lib/google/client-facts.generated.d.ts +13 -0
- package/lib/google/client-facts.generated.js +12 -0
- package/lib/google/client-facts.generated.js.map +1 -0
- package/lib/google/credentials.d.ts +49 -0
- package/lib/google/credentials.js +167 -0
- package/lib/google/credentials.js.map +1 -0
- package/lib/google/route.d.ts +54 -0
- package/lib/google/route.js +85 -0
- package/lib/google/route.js.map +1 -0
- package/lib/index.d.ts +201 -2
- package/lib/index.js +194 -4
- package/lib/index.js.map +1 -1
- package/lib/omp/google.mjs +20783 -0
- package/lib/omp.d.ts +111 -0
- package/lib/projection.d.ts +84 -4
- package/lib/projection.js +245 -10
- package/lib/projection.js.map +1 -1
- package/lib/transport/fetch.d.ts +9 -0
- package/lib/transport/fetch.js +41 -0
- package/lib/transport/fetch.js.map +1 -0
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -11,16 +11,17 @@ and the plugin page lists both bundle components
|
|
|
11
11
|
|---|---|
|
|
12
12
|
| npm package | `dsh-llm-omp-transports` |
|
|
13
13
|
| Plugin id | `llm-omp-transports` |
|
|
14
|
-
| Routes | `cursor`, `devin` (the seam is provider-generic) |
|
|
15
|
-
| Credential scope | `llm-omp-transports/<provider>`: `llm-omp-transports/cursor`, `llm-omp-transports/devin` |
|
|
14
|
+
| Routes | `cursor`, `devin`, `google-gemini-cli`, `google-antigravity` (the seam is provider-generic) |
|
|
15
|
+
| Credential scope | `llm-omp-transports/<provider>`: `llm-omp-transports/cursor`, `llm-omp-transports/devin`, `llm-omp-transports/google-gemini-cli`, `llm-omp-transports/google-antigravity` |
|
|
16
16
|
| Runtime | Node 24 (the bundle imports Node builtins only) |
|
|
17
17
|
| License | MIT |
|
|
18
18
|
|
|
19
19
|
The plugin registers its own route on the DSH `llm` seam, so it depends on no
|
|
20
20
|
upstream DSH change. `@oh-my-pi/pi-ai` and `@oh-my-pi/pi-catalog` are used at
|
|
21
21
|
**build time only**: the build inlines the pinned omp transports into one ESM
|
|
22
|
-
artifact per route (`lib/omp/cursor.mjs`, `lib/omp/devin.mjs`),
|
|
23
|
-
|
|
22
|
+
artifact per route (`lib/omp/cursor.mjs`, `lib/omp/devin.mjs`), plus one shared
|
|
23
|
+
artifact for the two Google routes (`lib/omp/google.mjs`), and the published
|
|
24
|
+
package imports nothing from `@oh-my-pi/*` or `bun:*` at runtime.
|
|
24
25
|
|
|
25
26
|
## Cursor support status
|
|
26
27
|
|
|
@@ -72,6 +73,57 @@ published package imports nothing from `@oh-my-pi/*` or `bun:*` at runtime.
|
|
|
72
73
|
- **Images** — not yet, same as Cursor: text-only input, image blocks refused
|
|
73
74
|
with `CONTENT_UNSUPPORTED`.
|
|
74
75
|
|
|
76
|
+
## Google support status
|
|
77
|
+
|
|
78
|
+
Two routes share one artifact: `google-gemini-cli` (Google's Gemini CLI client)
|
|
79
|
+
and `google-antigravity` (the Antigravity hub client). The bundled
|
|
80
|
+
`streamGoogleGeminiCli` dispatches on `model.provider`, so the route is a data
|
|
81
|
+
difference — separate OAuth client, catalogs, hosts, scopes and credential
|
|
82
|
+
records — not a second code path.
|
|
83
|
+
|
|
84
|
+
- **Text streaming** — yes, including reasoning parts and usage.
|
|
85
|
+
- **Reasoning streaming** — yes, with each row's own effort ladder: the
|
|
86
|
+
budget-mode rows send `thinkingConfig.thinkingBudget`, the Gemini-3+ rows send
|
|
87
|
+
`thinkingLevel`. A row with `requiresEffort` refuses a turn that selects no
|
|
88
|
+
effort (`UNSUPPORTED_REASONING_EFFORT`), exactly as omp does.
|
|
89
|
+
- **Tool-call handoff** — yes, native to DSH's tool loop, like Devin: the
|
|
90
|
+
transport emits the call and finishes the turn `toolUse`. Antigravity's
|
|
91
|
+
default tool mode (`VALIDATED`) is sent on every request that declares tools.
|
|
92
|
+
- **Sign-in** — yes, with a real loopback listener on `127.0.0.1`:
|
|
93
|
+
`:8085/oauth2callback` for Gemini CLI and `:51121/oauth-callback` for
|
|
94
|
+
Antigravity, as the pinned rules declare. The browser redirect completes the
|
|
95
|
+
flow automatically; if the port is taken the listener falls back to an
|
|
96
|
+
ephemeral port and the authorize page names the port it actually bound. The
|
|
97
|
+
full address the browser landed on (or `code#state`) can also be pasted; a
|
|
98
|
+
pasted code without the state is refused, because that is exactly the shape a
|
|
99
|
+
forged callback would have. Anything the listener does not recognise — a
|
|
100
|
+
foreign `state`, an `error=`, a missing code — is answered `400` and dropped
|
|
101
|
+
without ending the attempt, so a stray request cannot kill the sign-in. The
|
|
102
|
+
listener closes on the matching callback, on an aborted attempt and **on a
|
|
103
|
+
timeout** (five minutes, `GoogleFlowOptions.waitMs` for tests): an expired wait
|
|
104
|
+
fails with `AUTH_FAILED` and commits nothing.
|
|
105
|
+
- **Refresh** — yes. The resolver refreshes once, under the credential store's
|
|
106
|
+
per-key lock, when `expires - 60 s <= now`, keeps the `projectId` and an
|
|
107
|
+
un-rotated `refresh_token`, and reports a dead sign-in as `REAUTH_REQUIRED`.
|
|
108
|
+
- **Credential record** — `llm-omp-transports/<route>` with
|
|
109
|
+
`{access, refresh, expires, projectId, email?}`. The adapter hands the
|
|
110
|
+
transport the structured JSON envelope (`token`, `projectId`, `refreshToken`,
|
|
111
|
+
`expiresAt`, `email`) that omp parses.
|
|
112
|
+
- **Project discovery** — sign-in finishes with the Cloud Code Assist project:
|
|
113
|
+
`loadCodeAssist` → (tier onboarding `onboardUser` + LRO poll, or the required
|
|
114
|
+
`GOOGLE_CLOUD_PROJECT` / `GOOGLE_CLOUD_PROJECT_ID` variable for a
|
|
115
|
+
`legacy-tier`/paid account). Antigravity additionally checks free-tier
|
|
116
|
+
eligibility and bounds onboarding at 30 s.
|
|
117
|
+
- **Models** — generated from the pinned `@oh-my-pi/pi-catalog@18.12.3`: 7 rows
|
|
118
|
+
for `google-gemini-cli`, 22 for `google-antigravity`, served without a network
|
|
119
|
+
call.
|
|
120
|
+
- **Routes** — both declared configurable, so the Models page has
|
|
121
|
+
`providers.google-gemini-cli` and `providers.google-antigravity` allow-lists.
|
|
122
|
+
- **Images** — not yet, same posture as the other routes: text-only input, image
|
|
123
|
+
blocks refused with `CONTENT_UNSUPPORTED`. omp's Antigravity image path
|
|
124
|
+
decodes through `Bun.Image`, which does not exist under Node, so that path is
|
|
125
|
+
dead here by construction; the projection never reaches it.
|
|
126
|
+
|
|
75
127
|
## Hard constraints
|
|
76
128
|
|
|
77
129
|
- **Pinned, build-time-only omp.** `@oh-my-pi/pi-ai` and `@oh-my-pi/pi-catalog`
|
|
@@ -90,8 +142,9 @@ published package imports nothing from `@oh-my-pi/*` or `bun:*` at runtime.
|
|
|
90
142
|
committed manifest is unchanged after a build, so an omp bump that changes
|
|
91
143
|
the contract shows up as a reviewable manifest diff before it can reach a
|
|
92
144
|
request.
|
|
93
|
-
- **Generated
|
|
94
|
-
|
|
145
|
+
- **Generated catalogs.** The model tables (`cursor`, `devin`,
|
|
146
|
+
`google-gemini-cli`, `google-antigravity`) are generated from the pinned
|
|
147
|
+
catalog and are not hand-edited. An omp or catalog bump requires
|
|
95
148
|
`pnpm -C packages/llm-omp run generate:catalog`.
|
|
96
149
|
|
|
97
150
|
## Limits and risks
|
|
@@ -120,10 +173,18 @@ published package imports nothing from `@oh-my-pi/*` or `bun:*` at runtime.
|
|
|
120
173
|
stops at the handoff; the result is only replayed on the follow-up request.
|
|
121
174
|
Tool declarations travel as MCP definitions, and `toolHistory` is accepted
|
|
122
175
|
but cannot be replayed (the active tool set is the projection).
|
|
123
|
-
- **
|
|
124
|
-
`write
|
|
125
|
-
|
|
126
|
-
|
|
176
|
+
- **Colliding DSH tools are aliased, not dropped.** The transport keeps
|
|
177
|
+
Cursor's own `read`/`bash`/`write`/`delete`/`ls`/`grep`/`todo` names off the
|
|
178
|
+
MCP advertisement, so a DSH tool with one of those names is advertised as
|
|
179
|
+
`dsh_<name>`; the event stream restores the DSH name on the tool call, while
|
|
180
|
+
history replay keeps the advertised alias so the follow-up request stays
|
|
181
|
+
consistent. The seven `dsh_<native>` names are reserved: a DSH tool that
|
|
182
|
+
already carries one is refused with `TOOL_ALIAS_COLLISION`, which fails the
|
|
183
|
+
whole request and requires renaming the tool. Any other tool name travels
|
|
184
|
+
unchanged. Cursor-native exec frames (`read`, `shell`, `write`, `delete`,
|
|
185
|
+
`grep`, `ls`, `diagnostics`, streamed edits) are still answered by the
|
|
186
|
+
transport with `Tool not available` and are **not** executed by DSH (live
|
|
187
|
+
reachability unverified).
|
|
127
188
|
- **Advisory request knobs are ignored.** Cursor's agent protocol has no field
|
|
128
189
|
for an output cap, sampling temperature, stop sequences or an auxiliary-call
|
|
129
190
|
purpose; DSH's `maxTokens`, `temperature`, `stop` and `purpose` never reach
|
|
@@ -147,6 +208,37 @@ published package imports nothing from `@oh-my-pi/*` or `bun:*` at runtime.
|
|
|
147
208
|
code skips the state check (the page is the only place the state could
|
|
148
209
|
travel).
|
|
149
210
|
|
|
211
|
+
- **Unofficial Google clients.** The Google routes reuse the OAuth clients and
|
|
212
|
+
client identities the pinned omp rules capture — Gemini CLI
|
|
213
|
+
(`GeminiCLI/0.46.0/...` plus `Client-Metadata`) and Antigravity
|
|
214
|
+
(`antigravity/hub/<version> ...`). Same posture as the Cursor and Devin
|
|
215
|
+
routes: the MIT license covers the code, not the service, and a first live
|
|
216
|
+
turn rejected with `401`/`403` on a valid token stops the route until a
|
|
217
|
+
product decision (stop condition **S4**) — never a retry under another
|
|
218
|
+
identity.
|
|
219
|
+
- **Antigravity version lookup.** Before the first Antigravity request the
|
|
220
|
+
artifact reads the client version from the public update manifest (D11),
|
|
221
|
+
because the backend gates newer models on that version. A failed lookup is
|
|
222
|
+
silent and falls back to the pinned `2.19.1` for ten minutes; an explicit
|
|
223
|
+
`PI_AI_ANTIGRAVITY_VERSION` skips the lookup. That is the only outbound
|
|
224
|
+
request the routes make besides the vendor API itself.
|
|
225
|
+
- **Google sign-in waits at most five minutes.** The loopback listener is
|
|
226
|
+
bounded by a wait budget (five minutes by default): a browser that never
|
|
227
|
+
returns fails the attempt with `AUTH_FAILED`, closes the socket and commits
|
|
228
|
+
nothing. An aborted attempt is reported as a cancellation, not a failure.
|
|
229
|
+
When the configured port is taken, the fallback is an ephemeral port; a host
|
|
230
|
+
that can bind neither fails the sign-in rather than silently dropping the
|
|
231
|
+
browser half (pasting still works only while the listener is up).
|
|
232
|
+
- **Google attribution deviates on both routes.** The Cloud Code Assist wire
|
|
233
|
+
sets a vendor `user-agent` that the backend gates on, so DSH's attribution
|
|
234
|
+
`user-agent` is filled only where a request left the header absent — the same
|
|
235
|
+
fill-absent wrapper the Devin handshake uses.
|
|
236
|
+
- **Real Google endpoints unverified.** The wire suite drives the bundled
|
|
237
|
+
transport end to end over a stubbed `fetch` (URL, envelope, headers, SSE,
|
|
238
|
+
in-band errors, Antigravity failover and the version manifest), but it never
|
|
239
|
+
calls Google. A first live sign-in and turn is a manual smoke check, not a
|
|
240
|
+
claim of server acceptance.
|
|
241
|
+
|
|
150
242
|
## Develop and test
|
|
151
243
|
|
|
152
244
|
```sh
|
|
@@ -156,10 +248,10 @@ pnpm -C packages/llm-omp test
|
|
|
156
248
|
pnpm -C packages/llm-omp run generate:catalog
|
|
157
249
|
```
|
|
158
250
|
|
|
159
|
-
`build` bundles the pinned omp graphs from `scripts/omp-entry.ts
|
|
160
|
-
`scripts/omp-entry-devin.ts`
|
|
161
|
-
|
|
162
|
-
shim change. CI runs the same sequence and then fails if
|
|
251
|
+
`build` bundles the pinned omp graphs from `scripts/omp-entry.ts`,
|
|
252
|
+
`scripts/omp-entry-devin.ts` and `scripts/omp-entry-google.ts` into
|
|
253
|
+
`lib/omp/cursor.mjs`, `lib/omp/devin.mjs` and `lib/omp/google.mjs` and rewrites
|
|
254
|
+
`scripts/omp-manifest.json`; run it before `test` after a pin or shim change. CI runs the same sequence and then fails if
|
|
163
255
|
the committed manifest drifted.
|
|
164
256
|
|
|
165
257
|
The install proof lives at the repository root and needs `pnpm` and `dsh` on
|
|
@@ -172,7 +264,7 @@ node scripts/verify-install.mjs
|
|
|
172
264
|
It packs both packages, installs the root tarball into a fresh DSH profile,
|
|
173
265
|
and asserts that the composed profile carries both loader rows
|
|
174
266
|
(`dsh-keys-manager` and `llm-omp-transports`). It does not exercise the
|
|
175
|
-
plugin-manager UI or any
|
|
267
|
+
plugin-manager UI or any provider network behavior.
|
|
176
268
|
|
|
177
269
|
## Release
|
|
178
270
|
|
|
@@ -190,3 +282,12 @@ plugin surface.
|
|
|
190
282
|
## License
|
|
191
283
|
|
|
192
284
|
Released under the [MIT License](../../LICENSE).
|
|
285
|
+
|
|
286
|
+
## Deferred
|
|
287
|
+
|
|
288
|
+
`factory-droid` is **not** part of this component yet. Its omp graph pulls
|
|
289
|
+
`providers/register-builtins`, which statically imports every builtin provider,
|
|
290
|
+
measuring 327 modules / 16 991 893 B at the current pin — far past the plan's
|
|
291
|
+
stop rule — so the route waits for its own plan (tracked as issue `I-000253`,
|
|
292
|
+
with a build-substitution remedy as one candidate). Nothing in this package
|
|
293
|
+
reads or registers a `factory-droid` route.
|
package/lib/adapter.d.ts
CHANGED
|
@@ -20,11 +20,15 @@ import { LlmAdapter } from '@deepseek-ai/dsh-llm';
|
|
|
20
20
|
import type { GenerateOptions, LlmModelInfo, LlmProviderInfo, LlmResolvedModelInfo, StreamChunk } from '@deepseek-ai/dsh-llm';
|
|
21
21
|
import type { RouteProfile } from './projection.js';
|
|
22
22
|
import type { OmpAssistantMessageEvent, OmpContext } from './omp.js';
|
|
23
|
-
import type { CursorModelRow, DevinModelRow, OmpCursorModel, OmpCursorOptions, OmpDevinModel, OmpDevinOptions } from './omp.js';
|
|
23
|
+
import type { CursorModelRow, DevinModelRow, GoogleModelRow, OmpCursorModel, OmpCursorOptions, OmpDevinModel, OmpDevinOptions, OmpGoogleModel, OmpGoogleOptions } from './omp.js';
|
|
24
24
|
/** The Cursor provider route this adapter owns. */
|
|
25
25
|
export declare const CURSOR_ROUTE = "cursor";
|
|
26
26
|
/** The Devin provider route this adapter owns. */
|
|
27
27
|
export declare const DEVIN_ROUTE = "devin";
|
|
28
|
+
/** The Gemini CLI provider route this adapter owns. */
|
|
29
|
+
export declare const GOOGLE_GEMINI_CLI_ROUTE = "google-gemini-cli";
|
|
30
|
+
/** The Antigravity provider route this adapter owns. */
|
|
31
|
+
export declare const GOOGLE_ANTIGRAVITY_ROUTE = "google-antigravity";
|
|
28
32
|
/** Machine code for a model id the generated catalog does not contain. */
|
|
29
33
|
export declare const UNKNOWN_MODEL = "UNKNOWN_MODEL";
|
|
30
34
|
/** Machine code for a provider route this adapter does not serve. */
|
|
@@ -54,7 +58,7 @@ export interface ProjectedTransportRequest<Model, Options> {
|
|
|
54
58
|
/** What differs between the routes: identity, catalog, projection and credential record. */
|
|
55
59
|
export interface TransportRoute<Row extends TransportRow, Model, Options extends TransportOptions> {
|
|
56
60
|
/** Provider id; also the registered route set the projection's profile accepts. */
|
|
57
|
-
readonly id: 'cursor' | 'devin';
|
|
61
|
+
readonly id: 'cursor' | 'devin' | 'google-gemini-cli' | 'google-antigravity';
|
|
58
62
|
/** Models-page / provider-info display name. */
|
|
59
63
|
readonly displayName: string;
|
|
60
64
|
/** The `ctx.credentials` record this route reads. */
|
|
@@ -77,6 +81,18 @@ export interface TransportRoute<Row extends TransportRow, Model, Options extends
|
|
|
77
81
|
export declare const CURSOR_TRANSPORT_ROUTE: TransportRoute<CursorModelRow, OmpCursorModel, OmpCursorOptions>;
|
|
78
82
|
/** The Devin route's facts. */
|
|
79
83
|
export declare const DEVIN_TRANSPORT_ROUTE: TransportRoute<DevinModelRow, OmpDevinModel, OmpDevinOptions>;
|
|
84
|
+
/**
|
|
85
|
+
* The two Google routes' facts.
|
|
86
|
+
*
|
|
87
|
+
* One artifact serves both: `streamGoogleGeminiCli` dispatches on
|
|
88
|
+
* `model.provider`, so only the profile, the catalog and the credential record
|
|
89
|
+
* differ. The credential key is the route id under the package namespace
|
|
90
|
+
* (`llm-omp-transports/<route>`), as it is for cursor and devin; the Google
|
|
91
|
+
* resolver reads and writes those records.
|
|
92
|
+
*/
|
|
93
|
+
export declare const GOOGLE_GEMINI_CLI_TRANSPORT_ROUTE: TransportRoute<GoogleModelRow, OmpGoogleModel, OmpGoogleOptions>;
|
|
94
|
+
/** The Antigravity route's facts: the same provider over its own catalog and endpoint family. */
|
|
95
|
+
export declare const GOOGLE_ANTIGRAVITY_TRANSPORT_ROUTE: TransportRoute<GoogleModelRow, OmpGoogleModel, OmpGoogleOptions>;
|
|
80
96
|
/** What an adapter needs from its host plugin. */
|
|
81
97
|
export interface OmpAdapterOptions<Model, Options extends TransportOptions> {
|
|
82
98
|
/**
|
|
@@ -146,4 +162,14 @@ export type OmpDevinAdapterConfig = OmpAdapterOptions<OmpDevinModel, OmpDevinOpt
|
|
|
146
162
|
export declare class OmpDevinAdapter extends OmpTransportAdapter<DevinModelRow, OmpDevinModel, OmpDevinOptions> {
|
|
147
163
|
constructor(options: OmpDevinAdapterConfig);
|
|
148
164
|
}
|
|
165
|
+
/** The DSH llm adapter configuration for a Google route. */
|
|
166
|
+
export type OmpGoogleAdapterConfig = OmpAdapterOptions<OmpGoogleModel, OmpGoogleOptions>;
|
|
167
|
+
/** The Gemini CLI adapter: the bundled `streamGoogleGeminiCli` over the Gemini CLI catalog. */
|
|
168
|
+
export declare class OmpGoogleGeminiCliAdapter extends OmpTransportAdapter<GoogleModelRow, OmpGoogleModel, OmpGoogleOptions> {
|
|
169
|
+
constructor(options: OmpGoogleAdapterConfig);
|
|
170
|
+
}
|
|
171
|
+
/** The Antigravity adapter: the same artifact and transport over the Antigravity catalog. */
|
|
172
|
+
export declare class OmpGoogleAntigravityAdapter extends OmpTransportAdapter<GoogleModelRow, OmpGoogleModel, OmpGoogleOptions> {
|
|
173
|
+
constructor(options: OmpGoogleAdapterConfig);
|
|
174
|
+
}
|
|
149
175
|
export {};
|
package/lib/adapter.js
CHANGED
|
@@ -19,13 +19,19 @@
|
|
|
19
19
|
import { LlmAdapter, LlmError, ReasoningEffortId, assertUsableApiKey } from '@deepseek-ai/dsh-llm';
|
|
20
20
|
import { CURSOR_MODELS } from './catalog/cursor.js';
|
|
21
21
|
import { DEVIN_MODELS } from './catalog/devin.js';
|
|
22
|
+
import { GOOGLE_ANTIGRAVITY_MODELS } from './catalog/google-antigravity.js';
|
|
23
|
+
import { GOOGLE_GEMINI_CLI_MODELS } from './catalog/google-gemini-cli.js';
|
|
22
24
|
import { CURSOR_CREDENTIAL_KEY } from './cursor/credentials.js';
|
|
23
25
|
import { DEVIN_CREDENTIAL_KEY } from './devin/credentials.js';
|
|
24
|
-
import { CURSOR_PROFILE, DEVIN_PROFILE, abortedFinish, projectDevinRequest, projectEvents, projectRequest } from './projection.js';
|
|
26
|
+
import { CURSOR_PROFILE, DEVIN_PROFILE, GOOGLE_ANTIGRAVITY_PROFILE, GOOGLE_GEMINI_CLI_PROFILE, abortedFinish, projectDevinRequest, projectEvents, projectGoogleRequest, projectRequest, } from './projection.js';
|
|
25
27
|
/** The Cursor provider route this adapter owns. */
|
|
26
28
|
export const CURSOR_ROUTE = 'cursor';
|
|
27
29
|
/** The Devin provider route this adapter owns. */
|
|
28
30
|
export const DEVIN_ROUTE = 'devin';
|
|
31
|
+
/** The Gemini CLI provider route this adapter owns. */
|
|
32
|
+
export const GOOGLE_GEMINI_CLI_ROUTE = 'google-gemini-cli';
|
|
33
|
+
/** The Antigravity provider route this adapter owns. */
|
|
34
|
+
export const GOOGLE_ANTIGRAVITY_ROUTE = 'google-antigravity';
|
|
29
35
|
/** Machine code for a model id the generated catalog does not contain. */
|
|
30
36
|
export const UNKNOWN_MODEL = 'UNKNOWN_MODEL';
|
|
31
37
|
/** Machine code for a provider route this adapter does not serve. */
|
|
@@ -68,6 +74,34 @@ export const DEVIN_TRANSPORT_ROUTE = {
|
|
|
68
74
|
models: DEVIN_MODELS,
|
|
69
75
|
project: projectDevinRequest,
|
|
70
76
|
};
|
|
77
|
+
/**
|
|
78
|
+
* The two Google routes' facts.
|
|
79
|
+
*
|
|
80
|
+
* One artifact serves both: `streamGoogleGeminiCli` dispatches on
|
|
81
|
+
* `model.provider`, so only the profile, the catalog and the credential record
|
|
82
|
+
* differ. The credential key is the route id under the package namespace
|
|
83
|
+
* (`llm-omp-transports/<route>`), as it is for cursor and devin; the Google
|
|
84
|
+
* resolver reads and writes those records.
|
|
85
|
+
*/
|
|
86
|
+
export const GOOGLE_GEMINI_CLI_TRANSPORT_ROUTE = {
|
|
87
|
+
id: GOOGLE_GEMINI_CLI_ROUTE,
|
|
88
|
+
displayName: 'Google Gemini CLI',
|
|
89
|
+
credentialKey: `llm-omp-transports/${GOOGLE_GEMINI_CLI_ROUTE}`,
|
|
90
|
+
profile: GOOGLE_GEMINI_CLI_PROFILE,
|
|
91
|
+
models: GOOGLE_GEMINI_CLI_MODELS,
|
|
92
|
+
project: (row, options) => projectGoogleRequest(row, GOOGLE_GEMINI_CLI_PROFILE, options),
|
|
93
|
+
efforts: row => row.thinking?.efforts,
|
|
94
|
+
};
|
|
95
|
+
/** The Antigravity route's facts: the same provider over its own catalog and endpoint family. */
|
|
96
|
+
export const GOOGLE_ANTIGRAVITY_TRANSPORT_ROUTE = {
|
|
97
|
+
id: GOOGLE_ANTIGRAVITY_ROUTE,
|
|
98
|
+
displayName: 'Google Antigravity',
|
|
99
|
+
credentialKey: `llm-omp-transports/${GOOGLE_ANTIGRAVITY_ROUTE}`,
|
|
100
|
+
profile: GOOGLE_ANTIGRAVITY_PROFILE,
|
|
101
|
+
models: GOOGLE_ANTIGRAVITY_MODELS,
|
|
102
|
+
project: (row, options) => projectGoogleRequest(row, GOOGLE_ANTIGRAVITY_PROFILE, options),
|
|
103
|
+
efforts: row => row.thinking?.efforts,
|
|
104
|
+
};
|
|
71
105
|
/**
|
|
72
106
|
* The DSH llm adapter for one omp-backed route.
|
|
73
107
|
*
|
|
@@ -207,4 +241,16 @@ export class OmpDevinAdapter extends OmpTransportAdapter {
|
|
|
207
241
|
super({ route: DEVIN_TRANSPORT_ROUTE, ...options });
|
|
208
242
|
}
|
|
209
243
|
}
|
|
244
|
+
/** The Gemini CLI adapter: the bundled `streamGoogleGeminiCli` over the Gemini CLI catalog. */
|
|
245
|
+
export class OmpGoogleGeminiCliAdapter extends OmpTransportAdapter {
|
|
246
|
+
constructor(options) {
|
|
247
|
+
super({ route: GOOGLE_GEMINI_CLI_TRANSPORT_ROUTE, ...options });
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
/** The Antigravity adapter: the same artifact and transport over the Antigravity catalog. */
|
|
251
|
+
export class OmpGoogleAntigravityAdapter extends OmpTransportAdapter {
|
|
252
|
+
constructor(options) {
|
|
253
|
+
super({ route: GOOGLE_ANTIGRAVITY_TRANSPORT_ROUTE, ...options });
|
|
254
|
+
}
|
|
255
|
+
}
|
|
210
256
|
//# sourceMappingURL=adapter.js.map
|
package/lib/adapter.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAAA;;;;;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EAAE,EAAE,iBAAiB,CAAC,MAAM,CAAC;4BAC7B,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC,IAAI,MAAM;yBACrC,CAAC,CAAC;qBACJ;iBACF;gBACH,CAAC,CAAC,EAAE,CAAC;SACR,CAAA;IACH,CAAC;CACF;AAKD,wFAAwF;AACxF,MAAM,OAAO,gBAAiB,SAAQ,mBAAqE;IACzG,YAAY,OAA+B;QACzC,KAAK,CAAC,EAAE,KAAK,EAAE,sBAAsB,EAAE,GAAG,OAAO,EAAE,CAAC,CAAA;IACtD,CAAC;CACF;AAKD,qFAAqF;AACrF,MAAM,OAAO,eAAgB,SAAQ,mBAAkE;IACrG,YAAY,OAA8B;QACxC,KAAK,CAAC,EAAE,KAAK,EAAE,qBAAqB,EAAE,GAAG,OAAO,EAAE,CAAC,CAAA;IACrD,CAAC;CACF;AAKD,+FAA+F;AAC/F,MAAM,OAAO,yBAA0B,SAAQ,mBAAqE;IAClH,YAAY,OAA+B;QACzC,KAAK,CAAC,EAAE,KAAK,EAAE,iCAAiC,EAAE,GAAG,OAAO,EAAE,CAAC,CAAA;IACjE,CAAC;CACF;AAED,6FAA6F;AAC7F,MAAM,OAAO,2BAA4B,SAAQ,mBAAqE;IACpH,YAAY,OAA+B;QACzC,KAAK,CAAC,EAAE,KAAK,EAAE,kCAAkC,EAAE,GAAG,OAAO,EAAE,CAAC,CAAA;IAClE,CAAC;CACF"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated Antigravity model table — do not edit by hand.
|
|
3
|
+
*
|
|
4
|
+
* Source: `@oh-my-pi/pi-catalog@18.12.3` `src/models.json` key `google-antigravity`
|
|
5
|
+
* (22 rows, sha256:39fb09654ee3812043bc062e426d8e7aa13cd273435fa7b8a203a76246c8735c). Regenerate with `pnpm -C packages/llm-omp run generate:catalog`.
|
|
6
|
+
*
|
|
7
|
+
* The drift gate in `tests/build-google.test.ts` pins the same package version
|
|
8
|
+
* and source hash, so an omp bump fails there before this table can describe
|
|
9
|
+
* the wrong models.
|
|
10
|
+
*
|
|
11
|
+
* Rows reach the same bundled transport as the Gemini CLI table; the route is
|
|
12
|
+
* the row's `provider`, and `requestModelId` routes an effort to its wire id.
|
|
13
|
+
*
|
|
14
|
+
* @module dsh-llm-omp-transports/catalog/google-antigravity
|
|
15
|
+
*/
|
|
16
|
+
import type { GoogleModelRow } from '../omp.js';
|
|
17
|
+
/** Provenance of {@link GOOGLE_ANTIGRAVITY_MODELS}. */
|
|
18
|
+
export declare const GOOGLE_ANTIGRAVITY_CATALOG_SOURCE: {
|
|
19
|
+
readonly package: "@oh-my-pi/pi-catalog";
|
|
20
|
+
readonly version: "18.12.3";
|
|
21
|
+
readonly file: "src/models.json";
|
|
22
|
+
readonly key: "google-antigravity";
|
|
23
|
+
readonly sourceHash: "sha256:39fb09654ee3812043bc062e426d8e7aa13cd273435fa7b8a203a76246c8735c";
|
|
24
|
+
readonly rowCount: 22;
|
|
25
|
+
};
|
|
26
|
+
/** Every Antigravity model the pinned catalog serves, sorted by id. */
|
|
27
|
+
export declare const GOOGLE_ANTIGRAVITY_MODELS: readonly GoogleModelRow[];
|