@adaptiqai/deepseek-harness 0.0.0-stage → 0.2.2

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.
@@ -0,0 +1,360 @@
1
+ /* Generated by scripts/gen-typert.mjs from scripts/remote-spec.mjs — do not edit. */
2
+ function jsonSafe(value, depth) {
3
+ if (depth > 64) return false
4
+ if (value === null) return true
5
+ switch (typeof value) {
6
+ case 'string': case 'boolean': return true
7
+ case 'number': return Number.isFinite(value)
8
+ case 'object':
9
+ if (Array.isArray(value)) return value.every(item => jsonSafe(item, depth + 1))
10
+ if (Object.getPrototypeOf(value) !== Object.prototype && Object.getPrototypeOf(value) !== null) return false
11
+ return Object.values(value).every(item => item === undefined || jsonSafe(item, depth + 1))
12
+ default: return false
13
+ }
14
+ }
15
+ function schema(kind, optional) {
16
+ return {
17
+ parse(value) {
18
+ if (value === undefined && (optional || kind === 'void')) return undefined
19
+ if (kind === 'void') throw new TypeError('expected no value')
20
+ if (kind === 'string' && typeof value !== 'string') throw new TypeError('expected a string')
21
+ if (kind === 'boolean' && typeof value !== 'boolean') throw new TypeError('expected a boolean')
22
+ if (kind === 'number' && (typeof value !== 'number' || !Number.isFinite(value))) throw new TypeError('expected a number')
23
+ if (kind === 'object' && (typeof value !== 'object' || value === null || Array.isArray(value))) throw new TypeError('expected an object')
24
+ if (!jsonSafe(value, 0)) throw new TypeError('expected a JSON value')
25
+ return value
26
+ },
27
+ }
28
+ }
29
+ function codec(typeSymbol, kind, optional) {
30
+ let cached
31
+ return { mode: 'strict', typeSymbol, create: () => (cached ??= schema(kind, optional)) }
32
+ }
33
+
34
+ export const TYPERT_REMOTE = {
35
+ package: "@adaptiqai/deepseek-harness",
36
+ descriptors: [
37
+ {
38
+ id: "@adaptiqai/deepseek-harness#adaptiq/getState",
39
+ service: "adaptiqController",
40
+ namespace: "adaptiq",
41
+ method: "getState",
42
+ invocation: { kind: 'direct' },
43
+ parameters: [
44
+ ],
45
+ result: codec("@adaptiqai/deepseek-harness#adaptiq/getState:result", "object", false),
46
+ sourceLocation: { file: 'src/host/controller.ts', line: 1, column: 1 },
47
+ },
48
+ {
49
+ id: "@adaptiqai/deepseek-harness#adaptiq/watch",
50
+ service: "adaptiqController",
51
+ namespace: "adaptiq",
52
+ method: "watch",
53
+ mode: 'stream',
54
+ invocation: { kind: 'direct' },
55
+ parameters: [
56
+ ],
57
+ cancellation: { parameter: 'signal' },
58
+ result: codec("@adaptiqai/deepseek-harness#adaptiq/watch:result", "object", false),
59
+ sourceLocation: { file: 'src/host/controller.ts', line: 2, column: 1 },
60
+ },
61
+ {
62
+ id: "@adaptiqai/deepseek-harness#adaptiq/startSignIn",
63
+ service: "adaptiqController",
64
+ namespace: "adaptiq",
65
+ method: "startSignIn",
66
+ invocation: { kind: 'direct' },
67
+ parameters: [
68
+ ],
69
+ result: codec("@adaptiqai/deepseek-harness#adaptiq/startSignIn:result", "object", false),
70
+ sourceLocation: { file: 'src/host/controller.ts', line: 3, column: 1 },
71
+ },
72
+ {
73
+ id: "@adaptiqai/deepseek-harness#adaptiq/cancelSignIn",
74
+ service: "adaptiqController",
75
+ namespace: "adaptiq",
76
+ method: "cancelSignIn",
77
+ invocation: { kind: 'direct' },
78
+ parameters: [
79
+ ],
80
+ result: codec("@adaptiqai/deepseek-harness#adaptiq/cancelSignIn:result", "void", false),
81
+ sourceLocation: { file: 'src/host/controller.ts', line: 4, column: 1 },
82
+ },
83
+ {
84
+ id: "@adaptiqai/deepseek-harness#adaptiq/signOut",
85
+ service: "adaptiqController",
86
+ namespace: "adaptiq",
87
+ method: "signOut",
88
+ invocation: { kind: 'direct' },
89
+ parameters: [
90
+ ],
91
+ result: codec("@adaptiqai/deepseek-harness#adaptiq/signOut:result", "void", false),
92
+ sourceLocation: { file: 'src/host/controller.ts', line: 5, column: 1 },
93
+ },
94
+ {
95
+ id: "@adaptiqai/deepseek-harness#adaptiq/refresh",
96
+ service: "adaptiqController",
97
+ namespace: "adaptiq",
98
+ method: "refresh",
99
+ invocation: { kind: 'direct' },
100
+ parameters: [
101
+ ],
102
+ result: codec("@adaptiqai/deepseek-harness#adaptiq/refresh:result", "object", false),
103
+ sourceLocation: { file: 'src/host/controller.ts', line: 6, column: 1 },
104
+ },
105
+ {
106
+ id: "@adaptiqai/deepseek-harness#adaptiq/setPreferences",
107
+ service: "adaptiqController",
108
+ namespace: "adaptiq",
109
+ method: "setPreferences",
110
+ invocation: { kind: 'direct' },
111
+ parameters: [
112
+ { name: "patch", wire: "patch", source: 'json', codec: codec("@adaptiqai/deepseek-harness#adaptiq/setPreferences:patch", "object", false) },
113
+ ],
114
+ result: codec("@adaptiqai/deepseek-harness#adaptiq/setPreferences:result", "object", false),
115
+ sourceLocation: { file: 'src/host/controller.ts', line: 7, column: 1 },
116
+ },
117
+ {
118
+ id: "@adaptiqai/deepseek-harness#adaptiq/dismissNotice",
119
+ service: "adaptiqController",
120
+ namespace: "adaptiq",
121
+ method: "dismissNotice",
122
+ invocation: { kind: 'direct' },
123
+ parameters: [
124
+ { name: "id", wire: "id", source: 'json', codec: codec("@adaptiqai/deepseek-harness#adaptiq/dismissNotice:id", "string", false) },
125
+ ],
126
+ result: codec("@adaptiqai/deepseek-harness#adaptiq/dismissNotice:result", "void", false),
127
+ sourceLocation: { file: 'src/host/controller.ts', line: 8, column: 1 },
128
+ },
129
+ {
130
+ id: "@adaptiqai/deepseek-harness#adaptiq/getSession",
131
+ service: "adaptiqController",
132
+ namespace: "adaptiq",
133
+ method: "getSession",
134
+ invocation: { kind: 'direct' },
135
+ parameters: [
136
+ { name: "sessionId", wire: "sessionId", source: 'json', codec: codec("@adaptiqai/deepseek-harness#adaptiq/getSession:sessionId", "string", false) },
137
+ ],
138
+ result: codec("@adaptiqai/deepseek-harness#adaptiq/getSession:result", "object", false),
139
+ sourceLocation: { file: 'src/host/controller.ts', line: 9, column: 1 },
140
+ },
141
+ {
142
+ id: "@adaptiqai/deepseek-harness#adaptiq/watchSession",
143
+ service: "adaptiqController",
144
+ namespace: "adaptiq",
145
+ method: "watchSession",
146
+ mode: 'stream',
147
+ invocation: { kind: 'direct' },
148
+ parameters: [
149
+ { name: "sessionId", wire: "sessionId", source: 'json', codec: codec("@adaptiqai/deepseek-harness#adaptiq/watchSession:sessionId", "string", false) },
150
+ ],
151
+ cancellation: { parameter: 'signal' },
152
+ result: codec("@adaptiqai/deepseek-harness#adaptiq/watchSession:result", "object", false),
153
+ sourceLocation: { file: 'src/host/controller.ts', line: 10, column: 1 },
154
+ },
155
+ {
156
+ id: "@adaptiqai/deepseek-harness#adaptiq/setRemember",
157
+ service: "adaptiqController",
158
+ namespace: "adaptiq",
159
+ method: "setRemember",
160
+ invocation: { kind: 'direct' },
161
+ parameters: [
162
+ { name: "sessionId", wire: "sessionId", source: 'json', codec: codec("@adaptiqai/deepseek-harness#adaptiq/setRemember:sessionId", "string", false) },
163
+ { name: "remember", wire: "remember", source: 'json', codec: codec("@adaptiqai/deepseek-harness#adaptiq/setRemember:remember", "boolean", false) },
164
+ ],
165
+ result: codec("@adaptiqai/deepseek-harness#adaptiq/setRemember:result", "object", false),
166
+ sourceLocation: { file: 'src/host/controller.ts', line: 11, column: 1 },
167
+ },
168
+ {
169
+ id: "@adaptiqai/deepseek-harness#adaptiq/setSessionModel",
170
+ service: "adaptiqController",
171
+ namespace: "adaptiq",
172
+ method: "setSessionModel",
173
+ invocation: { kind: 'direct' },
174
+ parameters: [
175
+ { name: "sessionId", wire: "sessionId", source: 'json', codec: codec("@adaptiqai/deepseek-harness#adaptiq/setSessionModel:sessionId", "string", false) },
176
+ { name: "model", wire: "model", source: 'json', acceptsUndefined: true, codec: codec("@adaptiqai/deepseek-harness#adaptiq/setSessionModel:model", "string", true) },
177
+ { name: "lastUsed", wire: "lastUsed", source: 'json', acceptsUndefined: true, codec: codec("@adaptiqai/deepseek-harness#adaptiq/setSessionModel:lastUsed", "string", true) },
178
+ ],
179
+ result: codec("@adaptiqai/deepseek-harness#adaptiq/setSessionModel:result", "object", false),
180
+ sourceLocation: { file: 'src/host/controller.ts', line: 12, column: 1 },
181
+ },
182
+ {
183
+ id: "@adaptiqai/deepseek-harness#adaptiq/listKnowledge",
184
+ service: "adaptiqController",
185
+ namespace: "adaptiq",
186
+ method: "listKnowledge",
187
+ invocation: { kind: 'direct' },
188
+ parameters: [
189
+ { name: "query", wire: "query", source: 'json', acceptsUndefined: true, codec: codec("@adaptiqai/deepseek-harness#adaptiq/listKnowledge:query", "string", true) },
190
+ { name: "cursor", wire: "cursor", source: 'json', acceptsUndefined: true, codec: codec("@adaptiqai/deepseek-harness#adaptiq/listKnowledge:cursor", "string", true) },
191
+ { name: "sessionId", wire: "sessionId", source: 'json', acceptsUndefined: true, codec: codec("@adaptiqai/deepseek-harness#adaptiq/listKnowledge:sessionId", "string", true) },
192
+ { name: "model", wire: "model", source: 'json', acceptsUndefined: true, codec: codec("@adaptiqai/deepseek-harness#adaptiq/listKnowledge:model", "string", true) },
193
+ ],
194
+ result: codec("@adaptiqai/deepseek-harness#adaptiq/listKnowledge:result", "object", false),
195
+ sourceLocation: { file: 'src/host/controller.ts', line: 13, column: 1 },
196
+ },
197
+ {
198
+ id: "@adaptiqai/deepseek-harness#adaptiq/attachKnowledge",
199
+ service: "adaptiqController",
200
+ namespace: "adaptiq",
201
+ method: "attachKnowledge",
202
+ invocation: { kind: 'direct' },
203
+ parameters: [
204
+ { name: "sessionId", wire: "sessionId", source: 'json', codec: codec("@adaptiqai/deepseek-harness#adaptiq/attachKnowledge:sessionId", "string", false) },
205
+ { name: "id", wire: "id", source: 'json', codec: codec("@adaptiqai/deepseek-harness#adaptiq/attachKnowledge:id", "string", false) },
206
+ ],
207
+ result: codec("@adaptiqai/deepseek-harness#adaptiq/attachKnowledge:result", "object", false),
208
+ sourceLocation: { file: 'src/host/controller.ts', line: 14, column: 1 },
209
+ },
210
+ {
211
+ id: "@adaptiqai/deepseek-harness#adaptiq/detachKnowledge",
212
+ service: "adaptiqController",
213
+ namespace: "adaptiq",
214
+ method: "detachKnowledge",
215
+ invocation: { kind: 'direct' },
216
+ parameters: [
217
+ { name: "sessionId", wire: "sessionId", source: 'json', codec: codec("@adaptiqai/deepseek-harness#adaptiq/detachKnowledge:sessionId", "string", false) },
218
+ { name: "id", wire: "id", source: 'json', codec: codec("@adaptiqai/deepseek-harness#adaptiq/detachKnowledge:id", "string", false) },
219
+ ],
220
+ result: codec("@adaptiqai/deepseek-harness#adaptiq/detachKnowledge:result", "object", false),
221
+ sourceLocation: { file: 'src/host/controller.ts', line: 15, column: 1 },
222
+ },
223
+ {
224
+ id: "@adaptiqai/deepseek-harness#adaptiq/makeKnowledgeAvailable",
225
+ service: "adaptiqController",
226
+ namespace: "adaptiq",
227
+ method: "makeKnowledgeAvailable",
228
+ invocation: { kind: 'direct' },
229
+ parameters: [
230
+ { name: "id", wire: "id", source: 'json', codec: codec("@adaptiqai/deepseek-harness#adaptiq/makeKnowledgeAvailable:id", "string", false) },
231
+ { name: "from", wire: "from", source: 'json', codec: codec("@adaptiqai/deepseek-harness#adaptiq/makeKnowledgeAvailable:from", "string", false) },
232
+ { name: "sessionId", wire: "sessionId", source: 'json', acceptsUndefined: true, codec: codec("@adaptiqai/deepseek-harness#adaptiq/makeKnowledgeAvailable:sessionId", "string", true) },
233
+ ],
234
+ result: codec("@adaptiqai/deepseek-harness#adaptiq/makeKnowledgeAvailable:result", "object", false),
235
+ sourceLocation: { file: 'src/host/controller.ts', line: 16, column: 1 },
236
+ },
237
+ {
238
+ id: "@adaptiqai/deepseek-harness#adaptiq/createKnowledge",
239
+ service: "adaptiqController",
240
+ namespace: "adaptiq",
241
+ method: "createKnowledge",
242
+ invocation: { kind: 'direct' },
243
+ parameters: [
244
+ { name: "input", wire: "input", source: 'json', codec: codec("@adaptiqai/deepseek-harness#adaptiq/createKnowledge:input", "object", false) },
245
+ ],
246
+ result: codec("@adaptiqai/deepseek-harness#adaptiq/createKnowledge:result", "object", false),
247
+ sourceLocation: { file: 'src/host/controller.ts', line: 17, column: 1 },
248
+ },
249
+ {
250
+ id: "@adaptiqai/deepseek-harness#adaptiq/startPurchase",
251
+ service: "adaptiqController",
252
+ namespace: "adaptiq",
253
+ method: "startPurchase",
254
+ invocation: { kind: 'direct' },
255
+ parameters: [
256
+ { name: "offerId", wire: "offerId", source: 'json', codec: codec("@adaptiqai/deepseek-harness#adaptiq/startPurchase:offerId", "string", false) },
257
+ { name: "lanes", wire: "lanes", source: 'json', codec: codec("@adaptiqai/deepseek-harness#adaptiq/startPurchase:lanes", "number", false) },
258
+ ],
259
+ result: codec("@adaptiqai/deepseek-harness#adaptiq/startPurchase:result", "object", false),
260
+ sourceLocation: { file: 'src/host/controller.ts', line: 18, column: 1 },
261
+ },
262
+ {
263
+ id: "@adaptiqai/deepseek-harness#adaptiq/checkPurchase",
264
+ service: "adaptiqController",
265
+ namespace: "adaptiq",
266
+ method: "checkPurchase",
267
+ invocation: { kind: 'direct' },
268
+ parameters: [
269
+ ],
270
+ result: codec("@adaptiqai/deepseek-harness#adaptiq/checkPurchase:result", "void", false),
271
+ sourceLocation: { file: 'src/host/controller.ts', line: 19, column: 1 },
272
+ },
273
+ {
274
+ id: "@adaptiqai/deepseek-harness#adaptiq/cancelPurchase",
275
+ service: "adaptiqController",
276
+ namespace: "adaptiq",
277
+ method: "cancelPurchase",
278
+ invocation: { kind: 'direct' },
279
+ parameters: [
280
+ ],
281
+ result: codec("@adaptiqai/deepseek-harness#adaptiq/cancelPurchase:result", "void", false),
282
+ sourceLocation: { file: 'src/host/controller.ts', line: 20, column: 1 },
283
+ },
284
+ {
285
+ id: "@adaptiqai/deepseek-harness#adaptiq/dismissPurchase",
286
+ service: "adaptiqController",
287
+ namespace: "adaptiq",
288
+ method: "dismissPurchase",
289
+ invocation: { kind: 'direct' },
290
+ parameters: [
291
+ ],
292
+ result: codec("@adaptiqai/deepseek-harness#adaptiq/dismissPurchase:result", "void", false),
293
+ sourceLocation: { file: 'src/host/controller.ts', line: 21, column: 1 },
294
+ },
295
+ {
296
+ id: "@adaptiqai/deepseek-harness#adaptiq/listConversations",
297
+ service: "adaptiqController",
298
+ namespace: "adaptiq",
299
+ method: "listConversations",
300
+ invocation: { kind: 'direct' },
301
+ parameters: [
302
+ { name: "sessionId", wire: "sessionId", source: 'json', codec: codec("@adaptiqai/deepseek-harness#adaptiq/listConversations:sessionId", "string", false) },
303
+ { name: "query", wire: "query", source: 'json', acceptsUndefined: true, codec: codec("@adaptiqai/deepseek-harness#adaptiq/listConversations:query", "string", true) },
304
+ { name: "cursor", wire: "cursor", source: 'json', acceptsUndefined: true, codec: codec("@adaptiqai/deepseek-harness#adaptiq/listConversations:cursor", "string", true) },
305
+ ],
306
+ result: codec("@adaptiqai/deepseek-harness#adaptiq/listConversations:result", "object", false),
307
+ sourceLocation: { file: 'src/host/controller.ts', line: 22, column: 1 },
308
+ },
309
+ {
310
+ id: "@adaptiqai/deepseek-harness#adaptiq/attachConversation",
311
+ service: "adaptiqController",
312
+ namespace: "adaptiq",
313
+ method: "attachConversation",
314
+ invocation: { kind: 'direct' },
315
+ parameters: [
316
+ { name: "sessionId", wire: "sessionId", source: 'json', codec: codec("@adaptiqai/deepseek-harness#adaptiq/attachConversation:sessionId", "string", false) },
317
+ { name: "conversationId", wire: "conversationId", source: 'json', codec: codec("@adaptiqai/deepseek-harness#adaptiq/attachConversation:conversationId", "string", false) },
318
+ ],
319
+ result: codec("@adaptiqai/deepseek-harness#adaptiq/attachConversation:result", "object", false),
320
+ sourceLocation: { file: 'src/host/controller.ts', line: 23, column: 1 },
321
+ },
322
+ {
323
+ id: "@adaptiqai/deepseek-harness#adaptiq/detachConversation",
324
+ service: "adaptiqController",
325
+ namespace: "adaptiq",
326
+ method: "detachConversation",
327
+ invocation: { kind: 'direct' },
328
+ parameters: [
329
+ { name: "sessionId", wire: "sessionId", source: 'json', codec: codec("@adaptiqai/deepseek-harness#adaptiq/detachConversation:sessionId", "string", false) },
330
+ { name: "conversationId", wire: "conversationId", source: 'json', codec: codec("@adaptiqai/deepseek-harness#adaptiq/detachConversation:conversationId", "string", false) },
331
+ ],
332
+ result: codec("@adaptiqai/deepseek-harness#adaptiq/detachConversation:result", "object", false),
333
+ sourceLocation: { file: 'src/host/controller.ts', line: 24, column: 1 },
334
+ },
335
+ {
336
+ id: "@adaptiqai/deepseek-harness#adaptiq/openExternal",
337
+ service: "adaptiqController",
338
+ namespace: "adaptiq",
339
+ method: "openExternal",
340
+ invocation: { kind: 'direct' },
341
+ parameters: [
342
+ { name: "url", wire: "url", source: 'json', codec: codec("@adaptiqai/deepseek-harness#adaptiq/openExternal:url", "string", false) },
343
+ ],
344
+ result: codec("@adaptiqai/deepseek-harness#adaptiq/openExternal:result", "boolean", false),
345
+ sourceLocation: { file: 'src/host/controller.ts', line: 25, column: 1 },
346
+ },
347
+ {
348
+ id: "@adaptiqai/deepseek-harness#adaptiq/diagnostics",
349
+ service: "adaptiqController",
350
+ namespace: "adaptiq",
351
+ method: "diagnostics",
352
+ invocation: { kind: 'direct' },
353
+ parameters: [
354
+ ],
355
+ result: codec("@adaptiqai/deepseek-harness#adaptiq/diagnostics:result", "object", false),
356
+ sourceLocation: { file: 'src/host/controller.ts', line: 26, column: 1 },
357
+ },
358
+ ],
359
+ }
360
+ export default TYPERT_REMOTE
@@ -0,0 +1,33 @@
1
+ import type { AccountSnapshot, PurchaseView } from '@adaptiqai/core/types';
2
+ import type { Kit } from './actions.ts';
3
+ import { type T } from './ui.tsx';
4
+ /** Choose a model and lanes, then start the purchase. */
5
+ export declare function OfferPicker({ t, kit, account, initial }: {
6
+ t: T;
7
+ kit: Kit;
8
+ account: AccountSnapshot;
9
+ initial?: string | null;
10
+ }): import("react").JSX.Element;
11
+ /** A purchase on its way: one sentence, one action. */
12
+ export declare function PurchaseStatus({ t, kit, purchase, onDone }: {
13
+ t: T;
14
+ kit: Kit;
15
+ purchase: PurchaseView;
16
+ onDone?: () => void;
17
+ }): import("react").JSX.Element;
18
+ /** The purchase in progress if there is one, else the picker. */
19
+ export declare function AccessPanel({ t, kit, account, initial, onDone }: {
20
+ t: T;
21
+ kit: Kit;
22
+ account: AccountSnapshot;
23
+ initial?: string | null;
24
+ onDone?: () => void;
25
+ }): import("react").JSX.Element;
26
+ /** "Get a model" as a dialog. */
27
+ export declare function AccessDialog({ t, kit, account, initial, onClose }: {
28
+ t: T;
29
+ kit: Kit;
30
+ account: AccountSnapshot;
31
+ initial: string | null;
32
+ onClose: () => void;
33
+ }): import("react").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import type { AccountSnapshot } from '@adaptiqai/core/types';
2
+ import type { Kit } from './actions.ts';
3
+ import { type T } from './ui.tsx';
4
+ /** The code split in two halves of boxed characters. */
5
+ export declare function DeviceCode({ code }: {
6
+ code: string;
7
+ }): import("react").JSX.Element;
8
+ /**
9
+ * Hero content for each sign-in state. Lives on a navy hero surface.
10
+ * @param props - account snapshot, kit, translate.
11
+ * @returns the hero body.
12
+ */
13
+ export declare function ConnectHero({ account, kit, t, compact }: {
14
+ account: AccountSnapshot | null;
15
+ kit: Kit;
16
+ t: T;
17
+ compact?: boolean;
18
+ }): import("react").JSX.Element;
@@ -0,0 +1,34 @@
1
+ import type { AccountSnapshot } from '@adaptiqai/core/types';
2
+ import type { Kit } from './actions.ts';
3
+ import { type T } from './ui.tsx';
4
+ type Hook<S> = <R>(select: (snapshot: S) => R) => R;
5
+ /** The AdaptiqAI card at the foot of the Models page: connect, or see what the workspace has. */
6
+ export declare function ProviderCard({ t, kit, useAqAccount }: {
7
+ t: T;
8
+ kit: Kit;
9
+ useAqAccount: Hook<AccountSnapshot | null>;
10
+ }): import("react").JSX.Element | null;
11
+ /**
12
+ * Claims the shell's generic quota toast when the failure was ours (no lanes):
13
+ * AdaptiqAI shows its own "Get access" dialog instead, so the generic toast is taken down.
14
+ */
15
+ export declare function QuotaClaim({ dismiss }: {
16
+ dismiss: () => void;
17
+ }): null;
18
+ /**
19
+ * Whether a quota notice right now is AdaptiqAI's.
20
+ * @param account - current snapshot.
21
+ * @returns true when our no-lanes notice is fresh.
22
+ */
23
+ export declare function ownsQuota(account: AccountSnapshot | null): boolean;
24
+ /** Beside the plugin's title on its Plugins detail page. */
25
+ export declare function UpdateBadge({ t, useAqAccount, subject }: {
26
+ t: T;
27
+ useAqAccount: Hook<AccountSnapshot | null>;
28
+ subject: unknown;
29
+ }): import("react").JSX.Element | null;
30
+ /** The Knowledge entry in the sidebar's panel list. */
31
+ export declare function PanelIcon({ size }: {
32
+ size: number;
33
+ }): import("react").JSX.Element;
34
+ export {};
@@ -0,0 +1,35 @@
1
+ import type { AccountSnapshot, SessionView } from '@adaptiqai/core/types';
2
+ import type { Kit, UiState } from './actions.ts';
3
+ import { type T } from './ui.tsx';
4
+ type Hook<S> = <R>(select: (snapshot: S) => R) => R;
5
+ /** Upload limit for files dropped into the harness (larger sets go through the console). */
6
+ export declare const UPLOAD_LIMIT: number;
7
+ /** @returns whether the other-models list starts open. */
8
+ export declare function otherModelsStartOpen(): boolean;
9
+ /** @param open - remember the other-models list as open or closed until the page reloads. */
10
+ export declare function rememberOtherModelsOpen(open: boolean): void;
11
+ /** The Knowledge main panel. */
12
+ export declare function KnowledgePage({ t, kit, useAqAccount, useAqActiveSession, useAqUi }: {
13
+ t: T;
14
+ kit: Kit;
15
+ useAqAccount: Hook<AccountSnapshot | null>;
16
+ useAqActiveSession: Hook<string | null>;
17
+ useAqUi: Hook<UiState>;
18
+ }): import("react").JSX.Element;
19
+ /** Pick knowledge for one conversation (opened from the memory pill). */
20
+ export declare function KnowledgePicker({ t, kit, sessionId, view, onClose }: {
21
+ t: T;
22
+ kit: Kit;
23
+ sessionId: string;
24
+ view: SessionView | null;
25
+ onClose: () => void;
26
+ }): import("react").JSX.Element;
27
+ /** Create a collection from files (and optional text). */
28
+ export declare function CreateKnowledge({ t, kit, initialFiles, sessionId, onClose }: {
29
+ t: T;
30
+ kit: Kit;
31
+ initialFiles: readonly File[];
32
+ sessionId: string | null;
33
+ onClose: () => void;
34
+ }): import("react").JSX.Element;
35
+ export {};
@@ -0,0 +1,21 @@
1
+ import type { AccountSnapshot, SessionView } from '@adaptiqai/core/types';
2
+ import type { Kit } from './actions.ts';
3
+ import { type UseProjection } from './model.ts';
4
+ import { type T } from './ui.tsx';
5
+ type Hook<S> = <R>(select: (snapshot: S) => R) => R;
6
+ export interface PillProps {
7
+ t: T;
8
+ kit: Kit;
9
+ sessionId: string;
10
+ useAqAccount: Hook<AccountSnapshot | null>;
11
+ useAqSession: Hook<SessionView | null>;
12
+ useProjection?: UseProjection;
13
+ }
14
+ /** The pill in the composer toolbar. */
15
+ export declare function MemoryPill({ t, kit, sessionId, useAqAccount, useAqSession, useProjection }: PillProps): import("react").JSX.Element | null;
16
+ /**
17
+ * One calm line above the composer when the chosen model is not the one this
18
+ * conversation's memory lives on: switch back, or start fresh on the new model.
19
+ */
20
+ export declare function ModelNotice({ t, kit, sessionId, useAqAccount, useAqSession, useProjection }: PillProps): import("react").JSX.Element | null;
21
+ export {};
@@ -0,0 +1,29 @@
1
+ import type { AccountSnapshot } from '@adaptiqai/core/types';
2
+ import type { Kit, UiState } from './actions.ts';
3
+ import { type T } from './ui.tsx';
4
+ type Hook<S> = <R>(select: (snapshot: S) => R) => R;
5
+ /** The connect dialog: one navy surface, from welcome to "connected". */
6
+ export declare function ConnectDialog({ t, kit, account, welcome, onClose, onDone }: {
7
+ t: T;
8
+ kit: Kit;
9
+ account: AccountSnapshot;
10
+ welcome: boolean;
11
+ onClose: () => void;
12
+ onDone?: () => void;
13
+ }): import("react").JSX.Element;
14
+ /** First-run step in the harness's onboarding sequence: offer to connect once. */
15
+ export declare function WelcomeStep({ t, kit, useAqAccount, complete }: {
16
+ t: T;
17
+ kit: Kit;
18
+ useAqAccount: Hook<AccountSnapshot | null>;
19
+ complete: () => void;
20
+ }): import("react").JSX.Element | null;
21
+ export interface OverlayProps {
22
+ t: T;
23
+ kit: Kit;
24
+ useAqAccount: Hook<AccountSnapshot | null>;
25
+ useAqUi: Hook<UiState>;
26
+ }
27
+ /** The overlay host. */
28
+ export declare function Overlay({ t, kit, useAqAccount, useAqUi }: OverlayProps): import("react").JSX.Element | null;
29
+ export {};
@@ -0,0 +1,22 @@
1
+ import type { AccountSnapshot, ModelView } from '@adaptiqai/core/types';
2
+ import type { Kit } from './actions.ts';
3
+ import { type T } from './ui.tsx';
4
+ type Hook<S> = <R>(select: (snapshot: S) => R) => R;
5
+ export interface SettingsProps {
6
+ t: T;
7
+ kit: Kit;
8
+ useAqAccount: Hook<AccountSnapshot | null>;
9
+ }
10
+ /**
11
+ * A model's facts, the same fields in the same order for every model:
12
+ * memory, thinking levels, region. A field is left out only when unknown.
13
+ */
14
+ export declare function modelFacts(model: ModelView, t: T): string;
15
+ /** One model row: name, facts, lanes, status. */
16
+ export declare function ModelRow({ model, t }: {
17
+ model: ModelView;
18
+ t: T;
19
+ }): import("react").JSX.Element;
20
+ /** The page. */
21
+ export declare function SettingsPage({ t, kit, useAqAccount }: SettingsProps): import("react").JSX.Element;
22
+ export {};
@@ -0,0 +1,87 @@
1
+ /** Everything a component can do, in one object injected into every surface. */
2
+ import type { ConversationPage, CreateKnowledgeInput, CreateKnowledgeResult, KnowledgePage, MakeAvailableResult, NoticeAction, NoticeView, Preferences, PurchaseView, SessionView } from '@adaptiqai/core/types';
3
+ import { type ClientRemote, type ClientState, type Observable, type Store } from './store.ts';
4
+ /** Overlay state shared by every surface (which dialog is open). */
5
+ export interface UiState {
6
+ readonly connect: boolean;
7
+ readonly picker: string | null;
8
+ readonly create: {
9
+ readonly files: readonly File[];
10
+ readonly sessionId: string | null;
11
+ } | null;
12
+ /** The "get a model" dialog, with an offer to preselect. */
13
+ readonly access: {
14
+ readonly offerId: string | null;
15
+ } | null;
16
+ readonly local: readonly NoticeView[];
17
+ }
18
+ /** A composer model choice, as the harness's model selection carries it. */
19
+ export interface ModelChoice {
20
+ readonly provider: string;
21
+ readonly model: string;
22
+ readonly reasoningEffort?: string;
23
+ }
24
+ /** Harness navigation the plugin borrows: switch a conversation's model, open a new one. */
25
+ export interface Navigation {
26
+ selectPanel(id: string): void;
27
+ selectModel(sessionId: string, choice: ModelChoice): Promise<void>;
28
+ /** Open a new conversation in the same workspace on the given model. */
29
+ startFresh(fromSessionId: string, choice: ModelChoice): Promise<void>;
30
+ /** Open a new conversation on a model, in the workspace of `near` when given. */
31
+ startOn(choice: ModelChoice, near: string | null): Promise<void>;
32
+ /** The model the composer shows for a conversation (its choice, or the harness default on a new one). */
33
+ composerModel(sessionId: string): Observable<ModelChoice | null> | undefined;
34
+ }
35
+ export interface Kit {
36
+ readonly state: ClientState;
37
+ readonly ui: Store<UiState>;
38
+ readonly nav: Navigation;
39
+ /** Start the browser sign-in and open the approval page. */
40
+ signIn(): Promise<void>;
41
+ cancelSignIn(): Promise<void>;
42
+ signOut(): Promise<void>;
43
+ refresh(): Promise<void>;
44
+ setPreferences(patch: Partial<Preferences>): Promise<void>;
45
+ dismissNotice(id: string): Promise<void>;
46
+ runNoticeAction(notice: NoticeView, action: NoticeAction): Promise<void>;
47
+ open(url: string): void;
48
+ copyDiagnostics(): Promise<void>;
49
+ setRemember(sessionId: string, remember: boolean): Promise<SessionView>;
50
+ setSessionModel(sessionId: string, model: string | null, lastUsed?: string | null): Promise<SessionView>;
51
+ listKnowledge(query?: string, cursor?: string, sessionId?: string, model?: string): Promise<KnowledgePage>;
52
+ makeAvailable(id: string, from: string, sessionId: string | null): Promise<MakeAvailableResult>;
53
+ attach(sessionId: string, id: string): Promise<SessionView>;
54
+ detach(sessionId: string, id: string): Promise<SessionView>;
55
+ createKnowledge(input: CreateKnowledgeInput): Promise<CreateKnowledgeResult>;
56
+ openKnowledgePanel(): void;
57
+ showAccess(offerId?: string | null): void;
58
+ hideAccess(): void;
59
+ startPurchase(offerId: string, lanes: number): Promise<PurchaseView>;
60
+ checkPurchase(): Promise<void>;
61
+ cancelPurchase(): Promise<void>;
62
+ dismissPurchase(): Promise<void>;
63
+ /** Open a new conversation on an AdaptiqAI model. */
64
+ startOn(model: string): Promise<void>;
65
+ listConversations(sessionId: string, query?: string, cursor?: string): Promise<ConversationPage>;
66
+ attachConversation(sessionId: string, conversationId: string): Promise<SessionView>;
67
+ detachConversation(sessionId: string, conversationId: string): Promise<SessionView>;
68
+ /** Put the conversation back on the model its memory lives on. */
69
+ switchBack(sessionId: string, model: string, reasoningEffort?: string): Promise<void>;
70
+ startFresh(fromSessionId: string, choice: ModelChoice): Promise<void>;
71
+ showConnect(open: boolean): void;
72
+ showPicker(sessionId: string | null): void;
73
+ showCreate(files: readonly File[] | null, sessionId?: string | null): void;
74
+ toast(notice: Omit<NoticeView, 'id' | 'at' | 'actions'> & {
75
+ actions?: NoticeView['actions'];
76
+ }): void;
77
+ }
78
+ /** Knowledge panel key in the main area and the sidebar. */
79
+ export declare const PANEL_ID = "adaptiq-knowledge";
80
+ /**
81
+ * Build the kit over the mounted Remote.
82
+ * @param remote - `ctx.remote`.
83
+ * @param state - client stores.
84
+ * @param nav - harness navigation.
85
+ * @returns the kit.
86
+ */
87
+ export declare function createKit(remote: ClientRemote, state: ClientState, nav: Navigation): Kit;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * AdaptiqAI for DeepSeek Harness — browser half.
3
+ *
4
+ * Mounts the plugin's own `adaptiq` Remote namespace and registers every
5
+ * surface: Settings → AdaptiqAI, the Models-page card, the composer memory
6
+ * pill, the Knowledge panel, proactive notices and the update badge.
7
+ */
8
+ import type { Context } from '@deepseek-ai/cordis';
9
+ export declare const inject: string[];
10
+ /**
11
+ * Mount the Remote namespace, then the UI that uses it.
12
+ * @param ctx - the browser plugin context.
13
+ * @returns disposer for both.
14
+ */
15
+ export declare function apply(ctx: Context): Promise<() => Promise<void>>;