crosscheck-mcp 0.2.28 → 0.2.30
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/dist/browser-ext.cjs +127 -22
- package/dist/browser-ext.cjs.map +1 -1
- package/dist/browser-ext.js +127 -22
- package/dist/browser-ext.js.map +1 -1
- package/dist/embed.cjs +379 -26
- package/dist/embed.cjs.map +1 -1
- package/dist/embed.d.cts +134 -2
- package/dist/embed.d.ts +134 -2
- package/dist/embed.js +372 -25
- package/dist/embed.js.map +1 -1
- package/dist/node-stdio.cjs +130 -25
- package/dist/node-stdio.cjs.map +1 -1
- package/dist/node-stdio.d.cts +1 -75
- package/dist/node-stdio.d.ts +1 -75
- package/dist/node-stdio.js +127 -22
- package/dist/node-stdio.js.map +1 -1
- package/dist/types-HA3W47O4.d.cts +87 -0
- package/dist/types-HA3W47O4.d.ts +87 -0
- package/package.json +3 -2
package/dist/embed.d.cts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { C as ChatMessage, I as ImagePart, S as SendArgs } from './types-HA3W47O4.cjs';
|
|
2
|
+
export { a as IMAGE_MEDIA_TYPES } from './types-HA3W47O4.cjs';
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
5
|
* A record of which engine processes are alive, and what they are RUNNING.
|
|
3
6
|
*
|
|
@@ -96,6 +99,30 @@ declare const DEFAULT_FALLBACKS: Readonly<Record<string, readonly string[]>>;
|
|
|
96
99
|
*/
|
|
97
100
|
declare const DEFAULT_EXCLUDED_PROVIDERS: readonly string[];
|
|
98
101
|
|
|
102
|
+
/**
|
|
103
|
+
* The super lineup, as ORDERED CHAINS: index 0 is the model we want, the rest
|
|
104
|
+
* are fallbacks tried only on a model-access failure (never on auth, rate
|
|
105
|
+
* limit, or a 500 — a different model doesn't fix a bad key).
|
|
106
|
+
*
|
|
107
|
+
* Chains rather than single ids for one specific reason: it lets us name a
|
|
108
|
+
* model that hasn't shipped yet. `gpt-6-astra` is not in OpenAI's model list
|
|
109
|
+
* as of 2026-09-04 — verified against the live endpoint, no `gpt-6*` exists —
|
|
110
|
+
* so it 404s today and the chain silently serves gpt-5.6 instead. The day
|
|
111
|
+
* Astra becomes available it starts being used with no release on our side.
|
|
112
|
+
*
|
|
113
|
+
* The cost of that convenience, stated plainly: until Astra ships, an OpenAI
|
|
114
|
+
* seat in super mode pays one extra failed round trip per process per 5
|
|
115
|
+
* minutes (dead-models.ts caches the 404 for that long). A model-not-found is
|
|
116
|
+
* an immediate error rather than a timeout, so it's a few hundred ms, not a
|
|
117
|
+
* hang. If that ever becomes annoying, drop "gpt-6-astra" from the chain —
|
|
118
|
+
* nothing else depends on it.
|
|
119
|
+
*
|
|
120
|
+
* anthropic stays FIRST: resolveProviders preserves key order into `selected`,
|
|
121
|
+
* and debate's moderator / coordinate's proposer default to `selected[0]`.
|
|
122
|
+
* Reordering this object silently moves those seats to another provider.
|
|
123
|
+
*/
|
|
124
|
+
declare const SUPER_MODELS: Readonly<Record<string, readonly string[]>>;
|
|
125
|
+
|
|
99
126
|
/**
|
|
100
127
|
* Embedded host entrypoint — the API Crosscheck Desktop runs panels through.
|
|
101
128
|
*
|
|
@@ -128,6 +155,7 @@ declare const DEFAULT_EXCLUDED_PROVIDERS: readonly string[];
|
|
|
128
155
|
* inherits `process.env`. Keeping keys out of it is what stops a user's own
|
|
129
156
|
* `env | grep KEY` from printing their Anthropic key inside our app.
|
|
130
157
|
*/
|
|
158
|
+
|
|
131
159
|
/**
|
|
132
160
|
* Vault provider id → engine env var.
|
|
133
161
|
*
|
|
@@ -208,7 +236,62 @@ type EngineEvent =
|
|
|
208
236
|
runId: string;
|
|
209
237
|
at: number;
|
|
210
238
|
message: string;
|
|
239
|
+
}
|
|
240
|
+
/** ACTIVITY — one provider request went out. Emitted for EVERY model call
|
|
241
|
+
* a run makes, whatever the tool: panelists, the planner, workers,
|
|
242
|
+
* reviewers, judges, synthesis, the co-reasoner. `purpose` is the
|
|
243
|
+
* engine's role tag; `asked` is the start of the last user message. */
|
|
244
|
+
| {
|
|
245
|
+
type: "call.start";
|
|
246
|
+
runId: string;
|
|
247
|
+
at: number;
|
|
248
|
+
callId: number;
|
|
249
|
+
provider: string;
|
|
250
|
+
model: string;
|
|
251
|
+
purpose: string;
|
|
252
|
+
asked: string;
|
|
253
|
+
}
|
|
254
|
+
/** ACTIVITY — that request resolved. `text` is what the model said (capped
|
|
255
|
+
* at ACTIVITY_TEXT_CAP; `truncated` says so). Finished text, not a token
|
|
256
|
+
* stream: no adapter streams, and pretending otherwise would be a lie. */
|
|
257
|
+
| {
|
|
258
|
+
type: "call.done";
|
|
259
|
+
runId: string;
|
|
260
|
+
at: number;
|
|
261
|
+
callId: number;
|
|
262
|
+
provider: string;
|
|
263
|
+
model: string;
|
|
264
|
+
purpose: string;
|
|
265
|
+
ok: boolean;
|
|
266
|
+
ms: number;
|
|
267
|
+
text: string;
|
|
268
|
+
truncated: boolean;
|
|
269
|
+
error: string | null;
|
|
270
|
+
usage: EventUsage | null;
|
|
271
|
+
/** Set when the host stopped waiting (embed only): "user" from
|
|
272
|
+
* skip(), "timeout" from the run's per-call time limit. The request
|
|
273
|
+
* was aborted; the provider may still bill for work already done. */
|
|
274
|
+
stopped?: "user" | "timeout";
|
|
275
|
+
}
|
|
276
|
+
/** ACTIVITY — a step message from a multi-stage tool (orchestrate's
|
|
277
|
+
* levels, recombine). */
|
|
278
|
+
| {
|
|
279
|
+
type: "progress";
|
|
280
|
+
runId: string;
|
|
281
|
+
at: number;
|
|
282
|
+
message: string;
|
|
211
283
|
};
|
|
284
|
+
/** How much of each model reply an activity event carries. Enough to read
|
|
285
|
+
* the back-and-forth; the full text is in the envelope. */
|
|
286
|
+
declare const ACTIVITY_TEXT_CAP = 8000;
|
|
287
|
+
/** Providers whose models can see images (vault ids). Everyone else is told
|
|
288
|
+
* an image exists that it can't see, rather than being sent one it would
|
|
289
|
+
* reject — or silently answering as if there were none. */
|
|
290
|
+
declare const VISION_PROVIDERS: readonly string[];
|
|
291
|
+
declare const MAX_RUN_IMAGES = 8;
|
|
292
|
+
/** Put the run's images on the newest user message — or, for a provider
|
|
293
|
+
* that can't see images, a plain note saying they exist. */
|
|
294
|
+
declare function withRunImages(args: SendArgs, provider: string, images: readonly ImagePart[] | undefined): SendArgs;
|
|
212
295
|
type EngineEventSink = (event: EngineEvent) => void;
|
|
213
296
|
interface EmbeddedEngineOptions {
|
|
214
297
|
/** Vault provider id → raw API key. Only providers present here are built.
|
|
@@ -217,6 +300,9 @@ interface EmbeddedEngineOptions {
|
|
|
217
300
|
/** Vault provider id → pinned model. Omit a provider to take the engine
|
|
218
301
|
* default. Mirrors what `/account/models` and `crosscheck models set` do. */
|
|
219
302
|
models?: Readonly<Record<string, string>>;
|
|
303
|
+
/** Vault provider id → pinned SUPER-tier model (what `confer super` uses).
|
|
304
|
+
* Omit a provider to take the engine's super lineup (SUPER_MODELS). */
|
|
305
|
+
superModels?: Readonly<Record<string, string>>;
|
|
220
306
|
/** Default moderator/synthesis provider. */
|
|
221
307
|
moderator?: string;
|
|
222
308
|
/** Explicit pricing.json path. Defaults to the copy bundled in `dist/`. */
|
|
@@ -224,6 +310,37 @@ interface EmbeddedEngineOptions {
|
|
|
224
310
|
/** Directory to archive run transcripts into. Omit to write none. */
|
|
225
311
|
transcriptsDir?: string;
|
|
226
312
|
}
|
|
313
|
+
interface RunOptions {
|
|
314
|
+
/** Stop waiting on any single model call after this long (ms). The run
|
|
315
|
+
* continues with the answers already in. Off when 0/undefined. */
|
|
316
|
+
callTimeoutMs?: number;
|
|
317
|
+
/** Images for this run (base64, png/jpeg/webp/gif; at most 8). Sent with
|
|
318
|
+
* the question to every provider that can see images; the others are
|
|
319
|
+
* told they exist. Embed-only — the MCP tools don't take images. */
|
|
320
|
+
images?: ImagePart[];
|
|
321
|
+
}
|
|
322
|
+
interface AskOptions {
|
|
323
|
+
/** Vault id ("grok", not "xai"). Must be a provider this engine built. */
|
|
324
|
+
provider: string;
|
|
325
|
+
/** Model override; defaults to the provider's effective model. */
|
|
326
|
+
model?: string;
|
|
327
|
+
messages: ChatMessage[];
|
|
328
|
+
schema?: Record<string, unknown>;
|
|
329
|
+
/** Role tag for usage + the activity feed, e.g. "unify" or "code". */
|
|
330
|
+
purpose: string;
|
|
331
|
+
maxTokens?: number;
|
|
332
|
+
runId?: string;
|
|
333
|
+
onEvent?: EngineEventSink;
|
|
334
|
+
}
|
|
335
|
+
interface AskResult {
|
|
336
|
+
ok: boolean;
|
|
337
|
+
/** The model's raw reply. */
|
|
338
|
+
text: string;
|
|
339
|
+
/** Schema-validated value when a schema was given and the reply passed. */
|
|
340
|
+
json: unknown | null;
|
|
341
|
+
error: string | null;
|
|
342
|
+
model: string;
|
|
343
|
+
}
|
|
227
344
|
interface EmbeddedEngine {
|
|
228
345
|
readonly version: string;
|
|
229
346
|
/** Providers actually built, by vault id — i.e. the ones with a usable key
|
|
@@ -233,12 +350,27 @@ interface EmbeddedEngine {
|
|
|
233
350
|
readonly models: Readonly<Record<string, string>>;
|
|
234
351
|
/** Every registered tool name. */
|
|
235
352
|
listTools(): string[];
|
|
353
|
+
/** A tool's required input fields, from its own schema — or null if there
|
|
354
|
+
* is no such tool. Lets a host test its argument mapping against the
|
|
355
|
+
* engine instead of guessing field names (the desktop guessed five of ten
|
|
356
|
+
* wrong, and every one of those tools failed on missing input). */
|
|
357
|
+
requiredArgs(name: string): string[] | null;
|
|
236
358
|
/** Invoke any tool and wait for the final envelope. No events. */
|
|
237
359
|
call(name: string, args: Record<string, unknown>): Promise<unknown>;
|
|
238
360
|
/** Invoke a tool, emitting lifecycle events as the panel progresses.
|
|
239
361
|
* `confer` and `debate` stream; every other tool emits `run.start` and
|
|
240
362
|
* `run.done` around a plain `call`, so a host can use one code path. */
|
|
241
|
-
run(name: string, args: Record<string, unknown>, onEvent: EngineEventSink): Promise<unknown>;
|
|
363
|
+
run(name: string, args: Record<string, unknown>, onEvent: EngineEventSink, opts?: RunOptions): Promise<unknown>;
|
|
364
|
+
/** Stop waiting on one provider for the rest of a run: its in-flight
|
|
365
|
+
* requests are aborted and later ones (e.g. debate rounds) aren't sent.
|
|
366
|
+
* The run carries on with everyone else. The run's moderator is never
|
|
367
|
+
* stopped mid-synthesis. Returns how many in-flight calls were stopped;
|
|
368
|
+
* 0 (and a no-op) once the run has finished. */
|
|
369
|
+
skip(runId: string, provider: string): number;
|
|
370
|
+
/** One call to one chosen provider/model — the host's own moderator or
|
|
371
|
+
* coding step. With `runId` + `onEvent` it reports into that run's
|
|
372
|
+
* activity feed. With `schema`, returns validated JSON when it can. */
|
|
373
|
+
ask(opts: AskOptions): Promise<AskResult>;
|
|
242
374
|
/** Flush queued telemetry. Call before the host process exits. */
|
|
243
375
|
close(): Promise<void>;
|
|
244
376
|
}
|
|
@@ -259,4 +391,4 @@ declare const __test_internals: {
|
|
|
259
391
|
vaultId: typeof vaultId;
|
|
260
392
|
};
|
|
261
393
|
|
|
262
|
-
export { DEFAULT_EXCLUDED_PROVIDERS, DEFAULT_FALLBACKS, DEFAULT_MODELS, type EmbeddedEngine, type EmbeddedEngineOptions, type EngineEvent, type EngineEventSink, type EventUsage, type ProcRecord, type ProcStatus, KEY_ENV as __KEY_ENV, MODEL_ENV as __MODEL_ENV, __test_internals, createEmbeddedEngine, isAlive, listProcesses, processRegistryPath };
|
|
394
|
+
export { ACTIVITY_TEXT_CAP, type AskOptions, type AskResult, DEFAULT_EXCLUDED_PROVIDERS, DEFAULT_FALLBACKS, DEFAULT_MODELS, type EmbeddedEngine, type EmbeddedEngineOptions, type EngineEvent, type EngineEventSink, type EventUsage, ImagePart, MAX_RUN_IMAGES, type ProcRecord, type ProcStatus, type RunOptions, SUPER_MODELS, VISION_PROVIDERS, KEY_ENV as __KEY_ENV, MODEL_ENV as __MODEL_ENV, __test_internals, createEmbeddedEngine, isAlive, listProcesses, processRegistryPath, withRunImages };
|
package/dist/embed.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { C as ChatMessage, I as ImagePart, S as SendArgs } from './types-HA3W47O4.js';
|
|
2
|
+
export { a as IMAGE_MEDIA_TYPES } from './types-HA3W47O4.js';
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
5
|
* A record of which engine processes are alive, and what they are RUNNING.
|
|
3
6
|
*
|
|
@@ -96,6 +99,30 @@ declare const DEFAULT_FALLBACKS: Readonly<Record<string, readonly string[]>>;
|
|
|
96
99
|
*/
|
|
97
100
|
declare const DEFAULT_EXCLUDED_PROVIDERS: readonly string[];
|
|
98
101
|
|
|
102
|
+
/**
|
|
103
|
+
* The super lineup, as ORDERED CHAINS: index 0 is the model we want, the rest
|
|
104
|
+
* are fallbacks tried only on a model-access failure (never on auth, rate
|
|
105
|
+
* limit, or a 500 — a different model doesn't fix a bad key).
|
|
106
|
+
*
|
|
107
|
+
* Chains rather than single ids for one specific reason: it lets us name a
|
|
108
|
+
* model that hasn't shipped yet. `gpt-6-astra` is not in OpenAI's model list
|
|
109
|
+
* as of 2026-09-04 — verified against the live endpoint, no `gpt-6*` exists —
|
|
110
|
+
* so it 404s today and the chain silently serves gpt-5.6 instead. The day
|
|
111
|
+
* Astra becomes available it starts being used with no release on our side.
|
|
112
|
+
*
|
|
113
|
+
* The cost of that convenience, stated plainly: until Astra ships, an OpenAI
|
|
114
|
+
* seat in super mode pays one extra failed round trip per process per 5
|
|
115
|
+
* minutes (dead-models.ts caches the 404 for that long). A model-not-found is
|
|
116
|
+
* an immediate error rather than a timeout, so it's a few hundred ms, not a
|
|
117
|
+
* hang. If that ever becomes annoying, drop "gpt-6-astra" from the chain —
|
|
118
|
+
* nothing else depends on it.
|
|
119
|
+
*
|
|
120
|
+
* anthropic stays FIRST: resolveProviders preserves key order into `selected`,
|
|
121
|
+
* and debate's moderator / coordinate's proposer default to `selected[0]`.
|
|
122
|
+
* Reordering this object silently moves those seats to another provider.
|
|
123
|
+
*/
|
|
124
|
+
declare const SUPER_MODELS: Readonly<Record<string, readonly string[]>>;
|
|
125
|
+
|
|
99
126
|
/**
|
|
100
127
|
* Embedded host entrypoint — the API Crosscheck Desktop runs panels through.
|
|
101
128
|
*
|
|
@@ -128,6 +155,7 @@ declare const DEFAULT_EXCLUDED_PROVIDERS: readonly string[];
|
|
|
128
155
|
* inherits `process.env`. Keeping keys out of it is what stops a user's own
|
|
129
156
|
* `env | grep KEY` from printing their Anthropic key inside our app.
|
|
130
157
|
*/
|
|
158
|
+
|
|
131
159
|
/**
|
|
132
160
|
* Vault provider id → engine env var.
|
|
133
161
|
*
|
|
@@ -208,7 +236,62 @@ type EngineEvent =
|
|
|
208
236
|
runId: string;
|
|
209
237
|
at: number;
|
|
210
238
|
message: string;
|
|
239
|
+
}
|
|
240
|
+
/** ACTIVITY — one provider request went out. Emitted for EVERY model call
|
|
241
|
+
* a run makes, whatever the tool: panelists, the planner, workers,
|
|
242
|
+
* reviewers, judges, synthesis, the co-reasoner. `purpose` is the
|
|
243
|
+
* engine's role tag; `asked` is the start of the last user message. */
|
|
244
|
+
| {
|
|
245
|
+
type: "call.start";
|
|
246
|
+
runId: string;
|
|
247
|
+
at: number;
|
|
248
|
+
callId: number;
|
|
249
|
+
provider: string;
|
|
250
|
+
model: string;
|
|
251
|
+
purpose: string;
|
|
252
|
+
asked: string;
|
|
253
|
+
}
|
|
254
|
+
/** ACTIVITY — that request resolved. `text` is what the model said (capped
|
|
255
|
+
* at ACTIVITY_TEXT_CAP; `truncated` says so). Finished text, not a token
|
|
256
|
+
* stream: no adapter streams, and pretending otherwise would be a lie. */
|
|
257
|
+
| {
|
|
258
|
+
type: "call.done";
|
|
259
|
+
runId: string;
|
|
260
|
+
at: number;
|
|
261
|
+
callId: number;
|
|
262
|
+
provider: string;
|
|
263
|
+
model: string;
|
|
264
|
+
purpose: string;
|
|
265
|
+
ok: boolean;
|
|
266
|
+
ms: number;
|
|
267
|
+
text: string;
|
|
268
|
+
truncated: boolean;
|
|
269
|
+
error: string | null;
|
|
270
|
+
usage: EventUsage | null;
|
|
271
|
+
/** Set when the host stopped waiting (embed only): "user" from
|
|
272
|
+
* skip(), "timeout" from the run's per-call time limit. The request
|
|
273
|
+
* was aborted; the provider may still bill for work already done. */
|
|
274
|
+
stopped?: "user" | "timeout";
|
|
275
|
+
}
|
|
276
|
+
/** ACTIVITY — a step message from a multi-stage tool (orchestrate's
|
|
277
|
+
* levels, recombine). */
|
|
278
|
+
| {
|
|
279
|
+
type: "progress";
|
|
280
|
+
runId: string;
|
|
281
|
+
at: number;
|
|
282
|
+
message: string;
|
|
211
283
|
};
|
|
284
|
+
/** How much of each model reply an activity event carries. Enough to read
|
|
285
|
+
* the back-and-forth; the full text is in the envelope. */
|
|
286
|
+
declare const ACTIVITY_TEXT_CAP = 8000;
|
|
287
|
+
/** Providers whose models can see images (vault ids). Everyone else is told
|
|
288
|
+
* an image exists that it can't see, rather than being sent one it would
|
|
289
|
+
* reject — or silently answering as if there were none. */
|
|
290
|
+
declare const VISION_PROVIDERS: readonly string[];
|
|
291
|
+
declare const MAX_RUN_IMAGES = 8;
|
|
292
|
+
/** Put the run's images on the newest user message — or, for a provider
|
|
293
|
+
* that can't see images, a plain note saying they exist. */
|
|
294
|
+
declare function withRunImages(args: SendArgs, provider: string, images: readonly ImagePart[] | undefined): SendArgs;
|
|
212
295
|
type EngineEventSink = (event: EngineEvent) => void;
|
|
213
296
|
interface EmbeddedEngineOptions {
|
|
214
297
|
/** Vault provider id → raw API key. Only providers present here are built.
|
|
@@ -217,6 +300,9 @@ interface EmbeddedEngineOptions {
|
|
|
217
300
|
/** Vault provider id → pinned model. Omit a provider to take the engine
|
|
218
301
|
* default. Mirrors what `/account/models` and `crosscheck models set` do. */
|
|
219
302
|
models?: Readonly<Record<string, string>>;
|
|
303
|
+
/** Vault provider id → pinned SUPER-tier model (what `confer super` uses).
|
|
304
|
+
* Omit a provider to take the engine's super lineup (SUPER_MODELS). */
|
|
305
|
+
superModels?: Readonly<Record<string, string>>;
|
|
220
306
|
/** Default moderator/synthesis provider. */
|
|
221
307
|
moderator?: string;
|
|
222
308
|
/** Explicit pricing.json path. Defaults to the copy bundled in `dist/`. */
|
|
@@ -224,6 +310,37 @@ interface EmbeddedEngineOptions {
|
|
|
224
310
|
/** Directory to archive run transcripts into. Omit to write none. */
|
|
225
311
|
transcriptsDir?: string;
|
|
226
312
|
}
|
|
313
|
+
interface RunOptions {
|
|
314
|
+
/** Stop waiting on any single model call after this long (ms). The run
|
|
315
|
+
* continues with the answers already in. Off when 0/undefined. */
|
|
316
|
+
callTimeoutMs?: number;
|
|
317
|
+
/** Images for this run (base64, png/jpeg/webp/gif; at most 8). Sent with
|
|
318
|
+
* the question to every provider that can see images; the others are
|
|
319
|
+
* told they exist. Embed-only — the MCP tools don't take images. */
|
|
320
|
+
images?: ImagePart[];
|
|
321
|
+
}
|
|
322
|
+
interface AskOptions {
|
|
323
|
+
/** Vault id ("grok", not "xai"). Must be a provider this engine built. */
|
|
324
|
+
provider: string;
|
|
325
|
+
/** Model override; defaults to the provider's effective model. */
|
|
326
|
+
model?: string;
|
|
327
|
+
messages: ChatMessage[];
|
|
328
|
+
schema?: Record<string, unknown>;
|
|
329
|
+
/** Role tag for usage + the activity feed, e.g. "unify" or "code". */
|
|
330
|
+
purpose: string;
|
|
331
|
+
maxTokens?: number;
|
|
332
|
+
runId?: string;
|
|
333
|
+
onEvent?: EngineEventSink;
|
|
334
|
+
}
|
|
335
|
+
interface AskResult {
|
|
336
|
+
ok: boolean;
|
|
337
|
+
/** The model's raw reply. */
|
|
338
|
+
text: string;
|
|
339
|
+
/** Schema-validated value when a schema was given and the reply passed. */
|
|
340
|
+
json: unknown | null;
|
|
341
|
+
error: string | null;
|
|
342
|
+
model: string;
|
|
343
|
+
}
|
|
227
344
|
interface EmbeddedEngine {
|
|
228
345
|
readonly version: string;
|
|
229
346
|
/** Providers actually built, by vault id — i.e. the ones with a usable key
|
|
@@ -233,12 +350,27 @@ interface EmbeddedEngine {
|
|
|
233
350
|
readonly models: Readonly<Record<string, string>>;
|
|
234
351
|
/** Every registered tool name. */
|
|
235
352
|
listTools(): string[];
|
|
353
|
+
/** A tool's required input fields, from its own schema — or null if there
|
|
354
|
+
* is no such tool. Lets a host test its argument mapping against the
|
|
355
|
+
* engine instead of guessing field names (the desktop guessed five of ten
|
|
356
|
+
* wrong, and every one of those tools failed on missing input). */
|
|
357
|
+
requiredArgs(name: string): string[] | null;
|
|
236
358
|
/** Invoke any tool and wait for the final envelope. No events. */
|
|
237
359
|
call(name: string, args: Record<string, unknown>): Promise<unknown>;
|
|
238
360
|
/** Invoke a tool, emitting lifecycle events as the panel progresses.
|
|
239
361
|
* `confer` and `debate` stream; every other tool emits `run.start` and
|
|
240
362
|
* `run.done` around a plain `call`, so a host can use one code path. */
|
|
241
|
-
run(name: string, args: Record<string, unknown>, onEvent: EngineEventSink): Promise<unknown>;
|
|
363
|
+
run(name: string, args: Record<string, unknown>, onEvent: EngineEventSink, opts?: RunOptions): Promise<unknown>;
|
|
364
|
+
/** Stop waiting on one provider for the rest of a run: its in-flight
|
|
365
|
+
* requests are aborted and later ones (e.g. debate rounds) aren't sent.
|
|
366
|
+
* The run carries on with everyone else. The run's moderator is never
|
|
367
|
+
* stopped mid-synthesis. Returns how many in-flight calls were stopped;
|
|
368
|
+
* 0 (and a no-op) once the run has finished. */
|
|
369
|
+
skip(runId: string, provider: string): number;
|
|
370
|
+
/** One call to one chosen provider/model — the host's own moderator or
|
|
371
|
+
* coding step. With `runId` + `onEvent` it reports into that run's
|
|
372
|
+
* activity feed. With `schema`, returns validated JSON when it can. */
|
|
373
|
+
ask(opts: AskOptions): Promise<AskResult>;
|
|
242
374
|
/** Flush queued telemetry. Call before the host process exits. */
|
|
243
375
|
close(): Promise<void>;
|
|
244
376
|
}
|
|
@@ -259,4 +391,4 @@ declare const __test_internals: {
|
|
|
259
391
|
vaultId: typeof vaultId;
|
|
260
392
|
};
|
|
261
393
|
|
|
262
|
-
export { DEFAULT_EXCLUDED_PROVIDERS, DEFAULT_FALLBACKS, DEFAULT_MODELS, type EmbeddedEngine, type EmbeddedEngineOptions, type EngineEvent, type EngineEventSink, type EventUsage, type ProcRecord, type ProcStatus, KEY_ENV as __KEY_ENV, MODEL_ENV as __MODEL_ENV, __test_internals, createEmbeddedEngine, isAlive, listProcesses, processRegistryPath };
|
|
394
|
+
export { ACTIVITY_TEXT_CAP, type AskOptions, type AskResult, DEFAULT_EXCLUDED_PROVIDERS, DEFAULT_FALLBACKS, DEFAULT_MODELS, type EmbeddedEngine, type EmbeddedEngineOptions, type EngineEvent, type EngineEventSink, type EventUsage, ImagePart, MAX_RUN_IMAGES, type ProcRecord, type ProcStatus, type RunOptions, SUPER_MODELS, VISION_PROVIDERS, KEY_ENV as __KEY_ENV, MODEL_ENV as __MODEL_ENV, __test_internals, createEmbeddedEngine, isAlive, listProcesses, processRegistryPath, withRunImages };
|