dsh-llm-omp-transports 0.2.4 → 0.2.5
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 +52 -8
- package/bundle/cordis.patch.yml +1 -1
- package/lib/adapter.d.ts +107 -37
- package/lib/adapter.js +123 -87
- package/lib/adapter.js.map +1 -1
- package/lib/catalog/devin.d.ts +27 -0
- package/lib/catalog/devin.js +57 -0
- package/lib/catalog/devin.js.map +1 -0
- package/lib/cursor/auth.js +3 -18
- package/lib/cursor/auth.js.map +1 -1
- package/lib/devin/auth.d.ts +92 -0
- package/lib/devin/auth.js +157 -0
- package/lib/devin/auth.js.map +1 -0
- package/lib/devin/credentials.d.ts +31 -0
- package/lib/devin/credentials.js +61 -0
- package/lib/devin/credentials.js.map +1 -0
- package/lib/devin/transport.d.ts +9 -0
- package/lib/devin/transport.js +41 -0
- package/lib/devin/transport.js.map +1 -0
- package/lib/index.d.ts +123 -14
- package/lib/index.js +114 -20
- package/lib/index.js.map +1 -1
- package/lib/jwt.d.ts +36 -0
- package/lib/jwt.js +46 -0
- package/lib/jwt.js.map +1 -0
- package/lib/omp/devin.mjs +19952 -0
- package/lib/omp.d.ts +54 -7
- package/lib/projection.d.ts +96 -5
- package/lib/projection.js +165 -92
- package/lib/projection.js.map +1 -1
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -11,16 +11,16 @@ 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
|
-
|
|
|
15
|
-
| Credential scope | `llm-omp-transports/<provider
|
|
14
|
+
| Routes | `cursor`, `devin` (the seam is provider-generic) |
|
|
15
|
+
| Credential scope | `llm-omp-transports/<provider>`: `llm-omp-transports/cursor`, `llm-omp-transports/devin` |
|
|
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
|
-
**build time only**: the build inlines the pinned omp
|
|
22
|
-
|
|
23
|
-
from `@oh-my-pi/*` or `bun:*` at runtime.
|
|
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`), and the
|
|
23
|
+
published package imports nothing from `@oh-my-pi/*` or `bun:*` at runtime.
|
|
24
24
|
|
|
25
25
|
## Cursor support status
|
|
26
26
|
|
|
@@ -47,6 +47,31 @@ from `@oh-my-pi/*` or `bun:*` at runtime.
|
|
|
47
47
|
- **Images** — not yet. The route advertises text-only input and refuses image
|
|
48
48
|
blocks with `CONTENT_UNSUPPORTED`; see [known limits](docs/known-limits.md).
|
|
49
49
|
|
|
50
|
+
## Devin support status
|
|
51
|
+
|
|
52
|
+
- **Text streaming** — yes. Assistant text and reasoning are projected onto
|
|
53
|
+
DSH's `StreamChunk` stream, with the per-turn usage the chat frames report.
|
|
54
|
+
- **Reasoning streaming** — yes as content; no reasoning-effort selector. Both
|
|
55
|
+
pinned rows advertise no efforts, and a request that selects one is refused
|
|
56
|
+
with `UNSUPPORTED_REASONING_EFFORT`.
|
|
57
|
+
- **Tool-call handoff** — yes, native to DSH's tool loop. The transport emits
|
|
58
|
+
the call, finishes the turn `toolUse`, and DSH executes it; the result is
|
|
59
|
+
replayed from history on the next request. Unlike Cursor, no call is
|
|
60
|
+
transport-resolved, so nothing is filtered from the handoff.
|
|
61
|
+
- **Sign-in** — yes, by pasting the callback. The pinned omp login is a
|
|
62
|
+
declarative `oauth-code` rule whose loopback listener is Bun-only; this
|
|
63
|
+
package registers the `llm-omp-transports/devin` flow, opens the authorize
|
|
64
|
+
page, and asks for the address the browser landed on (or just the code).
|
|
65
|
+
There is **no refresh** (`refresh "none"`): an expired grant demands a new
|
|
66
|
+
sign-in.
|
|
67
|
+
- **Models** — from the pinned catalog: the Devin slice of
|
|
68
|
+
`@oh-my-pi/pi-catalog@18.12.3` (2 rows: `swe-1-6`, `swe-1-6-fast`) is
|
|
69
|
+
generated into `src/catalog/devin.ts` and served without a network call.
|
|
70
|
+
- **Route** — `devin`, declared configurable so the Models page has a
|
|
71
|
+
`providers.devin` profile with an allow-list.
|
|
72
|
+
- **Images** — not yet, same as Cursor: text-only input, image blocks refused
|
|
73
|
+
with `CONTENT_UNSUPPORTED`.
|
|
74
|
+
|
|
50
75
|
## Hard constraints
|
|
51
76
|
|
|
52
77
|
- **Pinned, build-time-only omp.** `@oh-my-pi/pi-ai` and `@oh-my-pi/pi-catalog`
|
|
@@ -103,6 +128,24 @@ from `@oh-my-pi/*` or `bun:*` at runtime.
|
|
|
103
128
|
for an output cap, sampling temperature, stop sequences or an auxiliary-call
|
|
104
129
|
purpose; DSH's `maxTokens`, `temperature`, `stop` and `purpose` never reach
|
|
105
130
|
the wire, and Cursor applies the catalog output limit server-side.
|
|
131
|
+
- **Unofficial Devin client.** The transport presents the released Devin CLI
|
|
132
|
+
identity (`ideName: "devin-cli"`, `ideType: "chisel"`, `ideVersion:
|
|
133
|
+
"3000.11.3"`) and a `connect-go` client header the omp sources copy from the
|
|
134
|
+
CLI. Same posture as Cursor's S4: a first live turn rejected with `401`/`403`
|
|
135
|
+
stops the route until a product decision, never a retry under another
|
|
136
|
+
identity.
|
|
137
|
+
- **Attribution deviates on one call.** The Devin chat request must keep the
|
|
138
|
+
transport's own `connect-go` client header — the backend gates on it. The
|
|
139
|
+
header-less `GetUserJwt` handshake has no identity of its own, so the adapter
|
|
140
|
+
fills DSH's attribution `user-agent` only where a header is absent. Cursor's
|
|
141
|
+
requests keep full attribution.
|
|
142
|
+
- **Devin has no refresh.** The pinned rule declares `refresh "none"`, so the
|
|
143
|
+
record is a static bearer with a derived `expires` (JWT `exp` minus five
|
|
144
|
+
minutes, else one year). An expired or corrupt record is `REAUTH_REQUIRED`,
|
|
145
|
+
not renewed. Because the omp loopback listener is Bun-only and the browser
|
|
146
|
+
half is untestable offline, the flow is paste-only for now; a bare pasted
|
|
147
|
+
code skips the state check (the page is the only place the state could
|
|
148
|
+
travel).
|
|
106
149
|
|
|
107
150
|
## Develop and test
|
|
108
151
|
|
|
@@ -113,9 +156,10 @@ pnpm -C packages/llm-omp test
|
|
|
113
156
|
pnpm -C packages/llm-omp run generate:catalog
|
|
114
157
|
```
|
|
115
158
|
|
|
116
|
-
`build` bundles the pinned omp
|
|
117
|
-
`lib/omp/cursor.mjs` and
|
|
118
|
-
`test` after a pin or
|
|
159
|
+
`build` bundles the pinned omp graphs from `scripts/omp-entry.ts` and
|
|
160
|
+
`scripts/omp-entry-devin.ts` into `lib/omp/cursor.mjs` and `lib/omp/devin.mjs`
|
|
161
|
+
and rewrites `scripts/omp-manifest.json`; run it before `test` after a pin or
|
|
162
|
+
shim change. CI runs the same sequence and then fails if
|
|
119
163
|
the committed manifest drifted.
|
|
120
164
|
|
|
121
165
|
The install proof lives at the repository root and needs `pnpm` and `dsh` on
|
package/bundle/cordis.patch.yml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Mounts the llm-omp-transports transport plugin when this package is installed on its
|
|
2
|
-
# own. It owns the `cursor`
|
|
2
|
+
# own. It owns the `cursor` and `devin` LLM routes and the
|
|
3
3
|
# `llm-omp-transports/<provider>` credential scope.
|
|
4
4
|
- insert:
|
|
5
5
|
- id: llm-omp-transports
|
package/lib/adapter.d.ts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Adapter for the omp-owned
|
|
2
|
+
* Adapter for the omp-owned routes this plugin serves.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Two routes share one shape: the provider speaks its own agent protocol
|
|
5
|
+
* (Cursor's `agent.v1.AgentService/Run`, Devin's Connect-framed
|
|
6
|
+
* `GetChatMessage`) through an omp build artifact in `lib/omp/*.mjs`. The
|
|
6
7
|
* transport is injected rather than imported so this module stays free of the
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* bundled artifacts and tests can replay recorded event scripts. A
|
|
9
|
+
* {@link TransportRoute} carries what differs per route: the catalog, the
|
|
10
|
+
* projection and the credential key; the base class carries the shared
|
|
11
|
+
* credential/turn ordering.
|
|
11
12
|
*
|
|
12
|
-
* The
|
|
13
|
+
* The catalogs are the generated `src/catalog/*.ts`, so `listModels` and
|
|
13
14
|
* `resolveModel` answer without a network call and carry the transport flags the
|
|
14
15
|
* projection needs (effort routing, max mode, glyph tokenization).
|
|
15
16
|
*
|
|
@@ -17,30 +18,79 @@
|
|
|
17
18
|
*/
|
|
18
19
|
import { LlmAdapter } from '@deepseek-ai/dsh-llm';
|
|
19
20
|
import type { GenerateOptions, LlmModelInfo, LlmProviderInfo, LlmResolvedModelInfo, StreamChunk } from '@deepseek-ai/dsh-llm';
|
|
20
|
-
import type {
|
|
21
|
-
|
|
21
|
+
import type { RouteProfile } from './projection.js';
|
|
22
|
+
import type { OmpAssistantMessageEvent, OmpContext } from './omp.js';
|
|
23
|
+
import type { CursorModelRow, DevinModelRow, OmpCursorModel, OmpCursorOptions, OmpDevinModel, OmpDevinOptions } from './omp.js';
|
|
24
|
+
/** The Cursor provider route this adapter owns. */
|
|
22
25
|
export declare const CURSOR_ROUTE = "cursor";
|
|
26
|
+
/** The Devin provider route this adapter owns. */
|
|
27
|
+
export declare const DEVIN_ROUTE = "devin";
|
|
23
28
|
/** Machine code for a model id the generated catalog does not contain. */
|
|
24
29
|
export declare const UNKNOWN_MODEL = "UNKNOWN_MODEL";
|
|
25
30
|
/** Machine code for a provider route this adapter does not serve. */
|
|
26
31
|
export declare const UNKNOWN_PROVIDER = "UNKNOWN_PROVIDER";
|
|
27
|
-
/**
|
|
28
|
-
|
|
32
|
+
/** The catalog fields every route's row must carry. */
|
|
33
|
+
interface TransportRow {
|
|
34
|
+
readonly id: string;
|
|
35
|
+
readonly name: string;
|
|
36
|
+
readonly contextWindow: number;
|
|
37
|
+
}
|
|
38
|
+
/** The transport options both routes accept at their shared surface. */
|
|
39
|
+
interface TransportOptions {
|
|
40
|
+
readonly apiKey?: string;
|
|
41
|
+
readonly signal?: AbortSignal;
|
|
42
|
+
}
|
|
43
|
+
/** One omp transport function, narrowed to the plugin's event contract. */
|
|
44
|
+
export type OmpTransportOf<Model, Options> = (model: Model, context: OmpContext, options: Options) => AsyncIterable<OmpAssistantMessageEvent>;
|
|
45
|
+
/** The three positional transport arguments a projection produces. */
|
|
46
|
+
export interface ProjectedTransportRequest<Model, Options> {
|
|
47
|
+
readonly model: Model;
|
|
48
|
+
readonly context: OmpContext;
|
|
49
|
+
/** Transport options without the credential; the adapter injects `apiKey`. */
|
|
50
|
+
readonly options: Omit<Options, 'apiKey'> & {
|
|
51
|
+
readonly apiKey?: string;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/** What differs between the routes: identity, catalog, projection and credential record. */
|
|
55
|
+
export interface TransportRoute<Row extends TransportRow, Model, Options extends TransportOptions> {
|
|
56
|
+
/** Provider id; also the registered route set the projection's profile accepts. */
|
|
57
|
+
readonly id: 'cursor' | 'devin';
|
|
58
|
+
/** Models-page / provider-info display name. */
|
|
59
|
+
readonly displayName: string;
|
|
60
|
+
/** The `ctx.credentials` record this route reads. */
|
|
61
|
+
readonly credentialKey: string;
|
|
62
|
+
/** Projection facts: identity, fallback error code and transport-resolved marker. */
|
|
63
|
+
readonly profile: RouteProfile;
|
|
64
|
+
/** The generated catalog. */
|
|
65
|
+
readonly models: readonly Row[];
|
|
66
|
+
/** Project one DSH request onto this route's transport arguments. */
|
|
67
|
+
readonly project: (row: Row, options: GenerateOptions) => ProjectedTransportRequest<Model, Options>;
|
|
68
|
+
/**
|
|
69
|
+
* The row's advertised reasoning efforts.
|
|
70
|
+
*
|
|
71
|
+
* Cursor's rows carry `thinking.efforts`; Devin's rows advertise none (a
|
|
72
|
+
* selected effort is refused by its projection), so the route may omit this.
|
|
73
|
+
*/
|
|
74
|
+
readonly efforts?: (row: Row) => readonly string[] | undefined;
|
|
75
|
+
}
|
|
76
|
+
/** The Cursor route's facts. */
|
|
77
|
+
export declare const CURSOR_TRANSPORT_ROUTE: TransportRoute<CursorModelRow, OmpCursorModel, OmpCursorOptions>;
|
|
78
|
+
/** The Devin route's facts. */
|
|
79
|
+
export declare const DEVIN_TRANSPORT_ROUTE: TransportRoute<DevinModelRow, OmpDevinModel, OmpDevinOptions>;
|
|
80
|
+
/** What an adapter needs from its host plugin. */
|
|
81
|
+
export interface OmpAdapterOptions<Model, Options extends TransportOptions> {
|
|
29
82
|
/**
|
|
30
|
-
* Resolve the
|
|
83
|
+
* Resolve the route's bearer token for one request.
|
|
31
84
|
*
|
|
32
85
|
* @remarks
|
|
33
|
-
* Asynchronous because it reads and refreshes the
|
|
86
|
+
* Asynchronous because it reads (and, for Cursor, refreshes) the route's
|
|
34
87
|
* credential through the credentials seam. The request signal is forwarded
|
|
35
88
|
* so an aborted turn can abandon a refresh instead of writing it late. Tests
|
|
36
89
|
* inject a fake.
|
|
37
90
|
*/
|
|
38
91
|
access: (signal?: AbortSignal) => Promise<string>;
|
|
39
|
-
/**
|
|
40
|
-
|
|
41
|
-
* `lib/omp/cursor.mjs`. The seam tests drive it with recorded event scripts.
|
|
42
|
-
*/
|
|
43
|
-
transport: OmpCursorTransport;
|
|
92
|
+
/** The omp transport, normally the artifact's stream export. Tests script it. */
|
|
93
|
+
transport: OmpTransportOf<Model, Options>;
|
|
44
94
|
/**
|
|
45
95
|
* Read the configured allow-list of catalog ids.
|
|
46
96
|
*
|
|
@@ -48,32 +98,52 @@ export interface OmpCursorAdapterConfig {
|
|
|
48
98
|
* A getter because the profile is a volatile setting: a save updates the
|
|
49
99
|
* running config reference without re-running the plugin, so a captured
|
|
50
100
|
* array would go stale. An absent or empty list advertises the full catalog,
|
|
51
|
-
* so the schema default (`providers
|
|
101
|
+
* so the schema default (`providers.<route>.models: []`) is today's behavior;
|
|
52
102
|
* a non-empty list narrows the advertised models and the accepted ids.
|
|
53
103
|
*/
|
|
54
104
|
models?: () => readonly string[] | undefined;
|
|
55
105
|
}
|
|
56
|
-
/** The
|
|
57
|
-
|
|
106
|
+
/** The adapter configuration for one concrete route. */
|
|
107
|
+
interface OmpRouteAdapterConfig<Row extends TransportRow, Model, Options extends TransportOptions> extends OmpAdapterOptions<Model, Options> {
|
|
108
|
+
readonly route: TransportRoute<Row, Model, Options>;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* The DSH llm adapter for one omp-backed route.
|
|
112
|
+
*
|
|
113
|
+
* @remarks
|
|
114
|
+
* The per-turn order is fixed: refuse an already-aborted turn, resolve the row,
|
|
115
|
+
* project the request (refusals must not pay a credential read), read the
|
|
116
|
+
* credential, validate it, then stream. Cursor's grant can be refreshed under
|
|
117
|
+
* that read; Devin's resolver only reads.
|
|
118
|
+
*/
|
|
119
|
+
declare abstract class OmpTransportAdapter<Row extends TransportRow, Model, Options extends TransportOptions> extends LlmAdapter {
|
|
58
120
|
private readonly config;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
* Describe the route.
|
|
62
|
-
*
|
|
63
|
-
* @remarks
|
|
64
|
-
* Cursor's agent protocol takes no client-side output cap, sampling
|
|
65
|
-
* temperature, stop sequence or auxiliary-call purpose: the wire carries no
|
|
66
|
-
* field for any of them, so the projection ignores those `GenerateOptions`
|
|
67
|
-
* values instead of forwarding them. Cursor applies the catalog `maxTokens`
|
|
68
|
-
* limit server-side.
|
|
69
|
-
*/
|
|
70
|
-
providerInfo(provider: string): LlmProviderInfo;
|
|
71
|
-
listModels(provider: string): Promise<readonly LlmModelInfo[]>;
|
|
72
|
-
resolveModel(provider: string, model: string): Promise<LlmResolvedModelInfo>;
|
|
73
|
-
stream(options: GenerateOptions): AsyncIterable<StreamChunk>;
|
|
121
|
+
private readonly rows;
|
|
122
|
+
protected constructor(config: OmpRouteAdapterConfig<Row, Model, Options>);
|
|
74
123
|
/** The configured ids, or undefined when the route advertises the full catalog. */
|
|
75
124
|
private allowed;
|
|
76
125
|
/** Resolve one catalog row, refusing ids the configured allow-list excludes. */
|
|
77
126
|
private rowFor;
|
|
127
|
+
providerInfo(provider: string): LlmProviderInfo;
|
|
128
|
+
listModels(provider: string): Promise<readonly LlmModelInfo[]>;
|
|
129
|
+
resolveModel(provider: string, model: string): Promise<LlmResolvedModelInfo>;
|
|
130
|
+
stream(options: GenerateOptions): AsyncIterable<StreamChunk>;
|
|
131
|
+
/** Refuse routes this adapter does not own instead of describing another provider's models. */
|
|
132
|
+
private assertRoute;
|
|
78
133
|
private call;
|
|
134
|
+
/** Build the seam's exact-model metadata from one catalog row. */
|
|
135
|
+
private modelInfo;
|
|
136
|
+
}
|
|
137
|
+
/** The DSH llm adapter configuration for the Cursor route. */
|
|
138
|
+
export type OmpCursorAdapterConfig = OmpAdapterOptions<OmpCursorModel, OmpCursorOptions>;
|
|
139
|
+
/** The Cursor adapter: the bundled `streamCursor` over the generated Cursor catalog. */
|
|
140
|
+
export declare class OmpCursorAdapter extends OmpTransportAdapter<CursorModelRow, OmpCursorModel, OmpCursorOptions> {
|
|
141
|
+
constructor(options: OmpCursorAdapterConfig);
|
|
142
|
+
}
|
|
143
|
+
/** The DSH llm adapter configuration for the Devin route. */
|
|
144
|
+
export type OmpDevinAdapterConfig = OmpAdapterOptions<OmpDevinModel, OmpDevinOptions>;
|
|
145
|
+
/** The Devin adapter: the bundled `streamDevin` over the generated Devin catalog. */
|
|
146
|
+
export declare class OmpDevinAdapter extends OmpTransportAdapter<DevinModelRow, OmpDevinModel, OmpDevinOptions> {
|
|
147
|
+
constructor(options: OmpDevinAdapterConfig);
|
|
79
148
|
}
|
|
149
|
+
export {};
|
package/lib/adapter.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Adapter for the omp-owned
|
|
2
|
+
* Adapter for the omp-owned routes this plugin serves.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Two routes share one shape: the provider speaks its own agent protocol
|
|
5
|
+
* (Cursor's `agent.v1.AgentService/Run`, Devin's Connect-framed
|
|
6
|
+
* `GetChatMessage`) through an omp build artifact in `lib/omp/*.mjs`. The
|
|
6
7
|
* transport is injected rather than imported so this module stays free of the
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* bundled artifacts and tests can replay recorded event scripts. A
|
|
9
|
+
* {@link TransportRoute} carries what differs per route: the catalog, the
|
|
10
|
+
* projection and the credential key; the base class carries the shared
|
|
11
|
+
* credential/turn ordering.
|
|
11
12
|
*
|
|
12
|
-
* The
|
|
13
|
+
* The catalogs are the generated `src/catalog/*.ts`, so `listModels` and
|
|
13
14
|
* `resolveModel` answer without a network call and carry the transport flags the
|
|
14
15
|
* projection needs (effort routing, max mode, glyph tokenization).
|
|
15
16
|
*
|
|
@@ -17,10 +18,14 @@
|
|
|
17
18
|
*/
|
|
18
19
|
import { LlmAdapter, LlmError, ReasoningEffortId, assertUsableApiKey } from '@deepseek-ai/dsh-llm';
|
|
19
20
|
import { CURSOR_MODELS } from './catalog/cursor.js';
|
|
21
|
+
import { DEVIN_MODELS } from './catalog/devin.js';
|
|
20
22
|
import { CURSOR_CREDENTIAL_KEY } from './cursor/credentials.js';
|
|
21
|
-
import {
|
|
22
|
-
|
|
23
|
+
import { DEVIN_CREDENTIAL_KEY } from './devin/credentials.js';
|
|
24
|
+
import { CURSOR_PROFILE, DEVIN_PROFILE, abortedFinish, projectDevinRequest, projectEvents, projectRequest } from './projection.js';
|
|
25
|
+
/** The Cursor provider route this adapter owns. */
|
|
23
26
|
export const CURSOR_ROUTE = 'cursor';
|
|
27
|
+
/** The Devin provider route this adapter owns. */
|
|
28
|
+
export const DEVIN_ROUTE = 'devin';
|
|
24
29
|
/** Machine code for a model id the generated catalog does not contain. */
|
|
25
30
|
export const UNKNOWN_MODEL = 'UNKNOWN_MODEL';
|
|
26
31
|
/** Machine code for a provider route this adapter does not serve. */
|
|
@@ -28,11 +33,11 @@ export const UNKNOWN_PROVIDER = 'UNKNOWN_PROVIDER';
|
|
|
28
33
|
/**
|
|
29
34
|
* Input modalities every advertised row carries.
|
|
30
35
|
*
|
|
31
|
-
* shortcut:
|
|
36
|
+
* shortcut: both projections carry text only and refuse every non-text block
|
|
32
37
|
* with `CONTENT_UNSUPPORTED`, so advertising the catalog row's `input` verbatim
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
38
|
+
* would promise a turn this route fails after DSH's own image→text fallback is
|
|
39
|
+
* skipped. Task 2/3 add image forwarding; that is when `row.input` becomes
|
|
40
|
+
* advertisable again.
|
|
36
41
|
*/
|
|
37
42
|
const INPUT_MODALITIES = ['text'];
|
|
38
43
|
/** Display names for the catalog's reasoning efforts. */
|
|
@@ -44,32 +49,66 @@ const EFFORT_NAMES = {
|
|
|
44
49
|
xhigh: 'Extra high',
|
|
45
50
|
max: 'Max',
|
|
46
51
|
};
|
|
47
|
-
/** The
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
52
|
+
/** The Cursor route's facts. */
|
|
53
|
+
export const CURSOR_TRANSPORT_ROUTE = {
|
|
54
|
+
id: CURSOR_ROUTE,
|
|
55
|
+
displayName: 'Cursor',
|
|
56
|
+
credentialKey: CURSOR_CREDENTIAL_KEY,
|
|
57
|
+
profile: CURSOR_PROFILE,
|
|
58
|
+
models: CURSOR_MODELS,
|
|
59
|
+
project: projectRequest,
|
|
60
|
+
efforts: row => row.thinking?.efforts,
|
|
61
|
+
};
|
|
62
|
+
/** The Devin route's facts. */
|
|
63
|
+
export const DEVIN_TRANSPORT_ROUTE = {
|
|
64
|
+
id: DEVIN_ROUTE,
|
|
65
|
+
displayName: 'Devin',
|
|
66
|
+
credentialKey: DEVIN_CREDENTIAL_KEY,
|
|
67
|
+
profile: DEVIN_PROFILE,
|
|
68
|
+
models: DEVIN_MODELS,
|
|
69
|
+
project: projectDevinRequest,
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* The DSH llm adapter for one omp-backed route.
|
|
73
|
+
*
|
|
74
|
+
* @remarks
|
|
75
|
+
* The per-turn order is fixed: refuse an already-aborted turn, resolve the row,
|
|
76
|
+
* project the request (refusals must not pay a credential read), read the
|
|
77
|
+
* credential, validate it, then stream. Cursor's grant can be refreshed under
|
|
78
|
+
* that read; Devin's resolver only reads.
|
|
79
|
+
*/
|
|
80
|
+
class OmpTransportAdapter extends LlmAdapter {
|
|
51
81
|
config;
|
|
82
|
+
rows;
|
|
52
83
|
constructor(config) {
|
|
53
84
|
super();
|
|
54
85
|
this.config = config;
|
|
86
|
+
this.rows = new Map(config.route.models.map(row => [row.id, row]));
|
|
87
|
+
}
|
|
88
|
+
/** The configured ids, or undefined when the route advertises the full catalog. */
|
|
89
|
+
allowed() {
|
|
90
|
+
const models = this.config.models?.();
|
|
91
|
+
return models === undefined || models.length === 0 ? undefined : new Set(models);
|
|
92
|
+
}
|
|
93
|
+
/** Resolve one catalog row, refusing ids the configured allow-list excludes. */
|
|
94
|
+
rowFor(model) {
|
|
95
|
+
const row = this.rows.get(model);
|
|
96
|
+
const allowed = this.allowed();
|
|
97
|
+
if (row === undefined || (allowed !== undefined && !allowed.has(row.id))) {
|
|
98
|
+
throw new LlmError(`llm-omp-transports: the ${this.config.route.id} route has no model "${model}"`, UNKNOWN_MODEL);
|
|
99
|
+
}
|
|
100
|
+
return row;
|
|
55
101
|
}
|
|
56
|
-
/**
|
|
57
|
-
* Describe the route.
|
|
58
|
-
*
|
|
59
|
-
* @remarks
|
|
60
|
-
* Cursor's agent protocol takes no client-side output cap, sampling
|
|
61
|
-
* temperature, stop sequence or auxiliary-call purpose: the wire carries no
|
|
62
|
-
* field for any of them, so the projection ignores those `GenerateOptions`
|
|
63
|
-
* values instead of forwarding them. Cursor applies the catalog `maxTokens`
|
|
64
|
-
* limit server-side.
|
|
65
|
-
*/
|
|
66
102
|
providerInfo(provider) {
|
|
67
|
-
|
|
103
|
+
this.assertRoute(provider);
|
|
104
|
+
return { id: provider, name: this.config.route.displayName };
|
|
68
105
|
}
|
|
69
106
|
async listModels(provider) {
|
|
70
|
-
assertRoute(provider);
|
|
107
|
+
this.assertRoute(provider);
|
|
71
108
|
const allowed = this.allowed();
|
|
72
|
-
return
|
|
109
|
+
return this.config.route.models
|
|
110
|
+
.filter(row => allowed === undefined || allowed.has(row.id))
|
|
111
|
+
.map(row => ({
|
|
73
112
|
provider,
|
|
74
113
|
id: row.id,
|
|
75
114
|
name: row.name,
|
|
@@ -77,41 +116,32 @@ export class OmpCursorAdapter extends LlmAdapter {
|
|
|
77
116
|
}));
|
|
78
117
|
}
|
|
79
118
|
async resolveModel(provider, model) {
|
|
80
|
-
assertRoute(provider);
|
|
81
|
-
return modelInfo(provider, this.rowFor(model));
|
|
119
|
+
this.assertRoute(provider);
|
|
120
|
+
return this.modelInfo(provider, this.rowFor(model));
|
|
82
121
|
}
|
|
83
122
|
stream(options) {
|
|
84
123
|
return this.call(options);
|
|
85
124
|
}
|
|
86
|
-
/**
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
/** Resolve one catalog row, refusing ids the configured allow-list excludes. */
|
|
92
|
-
rowFor(model) {
|
|
93
|
-
const row = MODELS_BY_ID.get(model);
|
|
94
|
-
const allowed = this.allowed();
|
|
95
|
-
if (row === undefined || (allowed !== undefined && !allowed.has(row.id))) {
|
|
96
|
-
throw new LlmError(`llm-omp-transports: the cursor route has no model "${model}"`, UNKNOWN_MODEL);
|
|
125
|
+
/** Refuse routes this adapter does not own instead of describing another provider's models. */
|
|
126
|
+
assertRoute(provider) {
|
|
127
|
+
if (provider !== this.config.route.id) {
|
|
128
|
+
throw new LlmError(`llm-omp-transports: the ${this.config.route.id} adapter does not serve provider "${provider}"`, UNKNOWN_PROVIDER);
|
|
97
129
|
}
|
|
98
|
-
return row;
|
|
99
130
|
}
|
|
100
131
|
async *call(options) {
|
|
101
132
|
// Read the live signal each time: it can abort while the credential is read.
|
|
102
133
|
const aborted = () => options.signal?.aborted === true;
|
|
103
|
-
// An already-cancelled turn must not pay a credential read (nor, once
|
|
104
|
-
//
|
|
134
|
+
// An already-cancelled turn must not pay a credential read (nor, once Cursor
|
|
135
|
+
// refreshes, a CAS write) or open a stream.
|
|
105
136
|
if (aborted()) {
|
|
106
137
|
yield abortedFinish();
|
|
107
138
|
return;
|
|
108
139
|
}
|
|
109
140
|
const row = this.rowFor(options.model);
|
|
110
141
|
// Validate and project before touching the credential: a refused request
|
|
111
|
-
// must not pay a credential read
|
|
112
|
-
//
|
|
113
|
-
|
|
114
|
-
const request = projectRequest(row, options);
|
|
142
|
+
// must not pay a credential read. Only a request that can be served
|
|
143
|
+
// resolves `access` and carries its token into the transport options.
|
|
144
|
+
const request = this.config.route.project(row, options);
|
|
115
145
|
let credential;
|
|
116
146
|
try {
|
|
117
147
|
credential = await this.config.access(options.signal);
|
|
@@ -125,50 +155,56 @@ export class OmpCursorAdapter extends LlmAdapter {
|
|
|
125
155
|
yield abortedFinish();
|
|
126
156
|
return;
|
|
127
157
|
}
|
|
128
|
-
const accessKey = assertUsableApiKey(credential, 'llm-omp-transports',
|
|
158
|
+
const accessKey = assertUsableApiKey(credential, 'llm-omp-transports', this.config.route.credentialKey);
|
|
129
159
|
if (aborted()) {
|
|
130
160
|
yield abortedFinish();
|
|
131
161
|
return;
|
|
132
162
|
}
|
|
133
163
|
const transportOptions = { ...request.options, apiKey: accessKey };
|
|
134
|
-
yield* projectEvents(this.config.transport(request.model, request.context, transportOptions), options.signal);
|
|
164
|
+
yield* projectEvents(this.config.transport(request.model, request.context, transportOptions), options.signal, this.config.route.profile);
|
|
165
|
+
}
|
|
166
|
+
/** Build the seam's exact-model metadata from one catalog row. */
|
|
167
|
+
modelInfo(provider, row) {
|
|
168
|
+
const efforts = this.config.route.efforts?.(row) ?? [];
|
|
169
|
+
return {
|
|
170
|
+
provider,
|
|
171
|
+
id: row.id,
|
|
172
|
+
name: row.name,
|
|
173
|
+
inputModalities: [...INPUT_MODALITIES],
|
|
174
|
+
context: { contextWindow: row.contextWindow },
|
|
175
|
+
// No `defaultMaxTokens`. The seam materializes that number into
|
|
176
|
+
// `maxTokens` on every request that omits one; Cursor's wire has no
|
|
177
|
+
// per-request output-cap field, and Devin's projection forwards an
|
|
178
|
+
// explicit `maxTokens` but the transport already defaults to the row's
|
|
179
|
+
// `maxTokens`. Advertising a default would only promise a cap nothing
|
|
180
|
+
// enforces. Both catalogs apply their cap from the model object.
|
|
181
|
+
// Every effort list is advertised exactly as the catalog declares it. On
|
|
182
|
+
// a row with no `effortRouting` entry each advertised effort resolves to
|
|
183
|
+
// the same wire id — the row's own — so those selections are wire-level
|
|
184
|
+
// no-ops, exactly as in omp.
|
|
185
|
+
...(efforts.length > 0
|
|
186
|
+
? {
|
|
187
|
+
reasoning: {
|
|
188
|
+
efforts: efforts.map(effort => ({
|
|
189
|
+
id: ReasoningEffortId(effort),
|
|
190
|
+
name: EFFORT_NAMES[effort] ?? effort,
|
|
191
|
+
})),
|
|
192
|
+
},
|
|
193
|
+
}
|
|
194
|
+
: {}),
|
|
195
|
+
};
|
|
135
196
|
}
|
|
136
197
|
}
|
|
137
|
-
/**
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
198
|
+
/** The Cursor adapter: the bundled `streamCursor` over the generated Cursor catalog. */
|
|
199
|
+
export class OmpCursorAdapter extends OmpTransportAdapter {
|
|
200
|
+
constructor(options) {
|
|
201
|
+
super({ route: CURSOR_TRANSPORT_ROUTE, ...options });
|
|
141
202
|
}
|
|
142
203
|
}
|
|
143
|
-
/**
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
id: row.id,
|
|
149
|
-
name: row.name,
|
|
150
|
-
inputModalities: [...INPUT_MODALITIES],
|
|
151
|
-
context: { contextWindow: row.contextWindow },
|
|
152
|
-
// No `defaultMaxTokens`. The seam materializes that number into `maxTokens`
|
|
153
|
-
// on every request that omits one, and Cursor's wire has no per-request
|
|
154
|
-
// output-cap field: the projection ignores `maxTokens` rather than
|
|
155
|
-
// forwarding it, so advertising a default would only promise a cap nothing
|
|
156
|
-
// enforces. Cursor applies the catalog cap server-side, from the `maxTokens`
|
|
157
|
-
// the model object already carries.
|
|
158
|
-
// Every effort list is advertised exactly as the catalog declares it. On a
|
|
159
|
-
// row with no `effortRouting` entry each advertised effort resolves to the
|
|
160
|
-
// same wire id — the row's own — so those selections are wire-level no-ops,
|
|
161
|
-
// exactly as in omp.
|
|
162
|
-
...(efforts.length > 0
|
|
163
|
-
? {
|
|
164
|
-
reasoning: {
|
|
165
|
-
efforts: efforts.map(effort => ({
|
|
166
|
-
id: ReasoningEffortId(effort),
|
|
167
|
-
name: EFFORT_NAMES[effort] ?? effort,
|
|
168
|
-
})),
|
|
169
|
-
},
|
|
170
|
-
}
|
|
171
|
-
: {}),
|
|
172
|
-
};
|
|
204
|
+
/** The Devin adapter: the bundled `streamDevin` over the generated Devin catalog. */
|
|
205
|
+
export class OmpDevinAdapter extends OmpTransportAdapter {
|
|
206
|
+
constructor(options) {
|
|
207
|
+
super({ route: DEVIN_TRANSPORT_ROUTE, ...options });
|
|
208
|
+
}
|
|
173
209
|
}
|
|
174
210
|
//# 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
|
|
1
|
+
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAUlG,OAAO,EAAE,aAAa,EAAE,MAAM,qBAA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;QACxC,KAAK,CAAC,EAAE,KAAK,EAAE,qBAAqB,EAAE,GAAG,OAAO,EAAE,CAAC,CAAA;IACrD,CAAC;CACF"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated Devin model table — do not edit by hand.
|
|
3
|
+
*
|
|
4
|
+
* Source: `@oh-my-pi/pi-catalog@18.12.3` `src/models.json` key `devin`
|
|
5
|
+
* (2 rows, sha256:39fb09654ee3812043bc062e426d8e7aa13cd273435fa7b8a203a76246c8735c). Regenerate with `pnpm -C packages/llm-omp run generate:catalog`.
|
|
6
|
+
*
|
|
7
|
+
* The drift gate in `tests/build-devin.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
|
+
* Each row carries the resolved `compat` trio and the `reasoning` flag the
|
|
12
|
+
* transport dereferences, and no field the wire never reads.
|
|
13
|
+
*
|
|
14
|
+
* @module dsh-llm-omp-transports/catalog/devin
|
|
15
|
+
*/
|
|
16
|
+
import type { DevinModelRow } from '../omp.js';
|
|
17
|
+
/** Provenance of {@link DEVIN_MODELS}. */
|
|
18
|
+
export declare const DEVIN_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: "devin";
|
|
23
|
+
readonly sourceHash: "sha256:39fb09654ee3812043bc062e426d8e7aa13cd273435fa7b8a203a76246c8735c";
|
|
24
|
+
readonly rowCount: 2;
|
|
25
|
+
};
|
|
26
|
+
/** Every Devin model the pinned catalog serves, sorted by id. */
|
|
27
|
+
export declare const DEVIN_MODELS: readonly DevinModelRow[];
|