@ordewell/core 0.12.4 → 0.12.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/dist/{ModeResolver-DS-aCVOP.d.ts → ModeResolver-CW8TEJjB.d.ts} +1 -1
- package/dist/{ModeResolver-CkZnbIqs.d.mts → ModeResolver-Clrk1OfJ.d.mts} +1 -1
- package/dist/{Task-D3O49EUo.d.mts → Task-jF9O6eWO.d.mts} +8 -2
- package/dist/{Task-D3O49EUo.d.ts → Task-jF9O6eWO.d.ts} +8 -2
- package/dist/{chunk-3S5IVTZM.mjs → chunk-GH5ZORAM.mjs} +1545 -9
- package/dist/chunk-GH5ZORAM.mjs.map +1 -0
- package/dist/{eventStore-CSFKy48Y.d.ts → eventStore-1iW5KeCk.d.mts} +209 -9
- package/dist/{eventStore-BcoMsZtU.d.mts → eventStore-COZ9fxn7.d.ts} +209 -9
- package/dist/index.d.mts +151 -49
- package/dist/index.d.ts +151 -49
- package/dist/index.js +6499 -2537
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4856 -2405
- package/dist/index.mjs.map +1 -1
- package/dist/parsing.d.mts +2 -2
- package/dist/parsing.d.ts +2 -2
- package/dist/plan-utils.d.mts +4 -4
- package/dist/plan-utils.d.ts +4 -4
- package/dist/plan-utils.js +54 -0
- package/dist/plan-utils.js.map +1 -1
- package/dist/plan-utils.mjs +13 -1
- package/dist/plan-utils.mjs.map +1 -1
- package/dist/{runSettingsText-BFaZSPRG.d.ts → runSettingsText--fMBMiPs.d.mts} +133 -12
- package/dist/{runSettingsText-DWsmcnBq.d.mts → runSettingsText-DCu4ItQN.d.ts} +133 -12
- package/dist/testing.d.mts +5 -3
- package/dist/testing.d.ts +5 -3
- package/dist/testing.js +6 -0
- package/dist/testing.js.map +1 -1
- package/dist/testing.mjs +5 -0
- package/dist/testing.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-3S5IVTZM.mjs.map +0 -1
|
@@ -1,7 +1,46 @@
|
|
|
1
1
|
import { ChildProcess } from 'child_process';
|
|
2
|
-
import { aB as PlannerAllowlist, b4 as RunnerId, az as PlanStatus, aj as LegacyPlanState, ay as PlanState, bl as SkillsService, bg as SkillInfo, aT as RepoGroupLayout, T as IWorktreeIsolation, ab as IsolationRun, X as IsolationHandoff, ax as PlanIsolation, ac as IsolationTaskRecord, bu as TaskIsolation, ag as IsolationView, a6 as IsolationRemoval, bq as Task, aI as PrepareIntent, aM as PreviousWork, J as HandoffCommit, a3 as IsolationOutcome, aQ as RepairEvidence, bF as TreeSnapshot, br as TaskDiffRead, bs as TaskDiffResult, a2 as IsolationMergeResult, ai as LandedWork, b1 as RevertWatch, a9 as IsolationRevertResult, bH as UsageRecord, bn as SubagentOutcome, b5 as RunnerSessionCost, p as DiscoveredModel, bK as VerificationCheck, bA as TaskSkillSnapshot, b8 as ScriptBody, I as HandoffCheck } from './Task-
|
|
2
|
+
import { aB as PlannerAllowlist, b4 as RunnerId, az as PlanStatus, aj as LegacyPlanState, ay as PlanState, bl as SkillsService, bg as SkillInfo, aT as RepoGroupLayout, T as IWorktreeIsolation, ab as IsolationRun, X as IsolationHandoff, ax as PlanIsolation, ac as IsolationTaskRecord, bu as TaskIsolation, ag as IsolationView, a6 as IsolationRemoval, bq as Task, aI as PrepareIntent, aM as PreviousWork, J as HandoffCommit, a3 as IsolationOutcome, aQ as RepairEvidence, bF as TreeSnapshot, br as TaskDiffRead, bs as TaskDiffResult, a2 as IsolationMergeResult, ai as LandedWork, b1 as RevertWatch, a9 as IsolationRevertResult, bH as UsageRecord, bn as SubagentOutcome, b5 as RunnerSessionCost, p as DiscoveredModel, bK as VerificationCheck, bA as TaskSkillSnapshot, b8 as ScriptBody, I as HandoffCheck } from './Task-jF9O6eWO.js';
|
|
3
3
|
import { z } from 'zod/v4';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Workspace containment, in one place. Both the filesystem policy layer
|
|
7
|
+
* (which may ask the user to approve an escape) and the research-subagent
|
|
8
|
+
* wrapper (which may not, because nothing can prompt on its behalf) need the
|
|
9
|
+
* same answer to "is this path inside the workspace", so neither re-derives it.
|
|
10
|
+
*
|
|
11
|
+
* Symlinks are resolved lexically, not on disk: a symlink inside the workspace
|
|
12
|
+
* pointing outward still reads as inside. Closing that would mean a `realpath`
|
|
13
|
+
* syscall on every path check, and the threat model here is an LLM wandering,
|
|
14
|
+
* not an adversary planting links in a repo the user already trusts enough to
|
|
15
|
+
* point Ordewell at.
|
|
16
|
+
*/
|
|
17
|
+
interface ResolvedPath {
|
|
18
|
+
abs: string;
|
|
19
|
+
inside: boolean;
|
|
20
|
+
/** A device that reads nothing and writes nowhere but the command's own streams: `/dev/null`. */
|
|
21
|
+
device?: true;
|
|
22
|
+
/**
|
|
23
|
+
* A path the shell reads by rules this check cannot follow (`HostPath`), so
|
|
24
|
+
* it is judged to be nowhere: a command naming it is refused, not asked about,
|
|
25
|
+
* since no folder an approval could name is the one it reaches.
|
|
26
|
+
*/
|
|
27
|
+
unfollowable?: true;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Where a path a command names lands on the host, run from the host folder
|
|
31
|
+
* `from`, for a shell that reads paths its own way (`ResearchShell.hostPath`):
|
|
32
|
+
* Git Bash's `/c/x` is `C:\x`. Undefined when the shell's reading of it cannot
|
|
33
|
+
* be followed for certain.
|
|
34
|
+
*/
|
|
35
|
+
type HostPath = (spelled: string, from: string) => string | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* `from` is where a relative `target` starts; containment is still judged against `root`.
|
|
38
|
+
* `hostPath` reads `target` as the shell running it will, which also knows its devices.
|
|
39
|
+
*/
|
|
40
|
+
declare function resolveWithin(root: string, target: string, from?: string, hostPath?: HostPath): ResolvedPath;
|
|
41
|
+
/** The directory a grant covers for `target` — its parent for files, itself for directories. */
|
|
42
|
+
declare function grantScopeFor(abs: string, kind: 'file' | 'directory'): string;
|
|
43
|
+
|
|
5
44
|
/**
|
|
6
45
|
* Which interpreter runs the planner's `bash` tool, and in which language.
|
|
7
46
|
*
|
|
@@ -45,6 +84,13 @@ interface ResearchShell {
|
|
|
45
84
|
* `execFile` starts without a shell, so they resolve too.
|
|
46
85
|
*/
|
|
47
86
|
utilsDir: string | null;
|
|
87
|
+
/**
|
|
88
|
+
* Where a path this shell is handed lands on the host, for a shell that
|
|
89
|
+
* reads paths its own way; undefined where a path means what the host says.
|
|
90
|
+
* Path confinement judges the folder the command reaches through it, not the
|
|
91
|
+
* one the same spelling names on the host's current drive (ADR-0010).
|
|
92
|
+
*/
|
|
93
|
+
hostPath?: HostPath;
|
|
48
94
|
}
|
|
49
95
|
/**
|
|
50
96
|
* How one command starts: the research shell itself, or the sandbox launcher
|
|
@@ -69,6 +115,8 @@ interface ResearchShellDeps {
|
|
|
69
115
|
platform?: NodeJS.Platform;
|
|
70
116
|
exists?: (candidate: string) => boolean;
|
|
71
117
|
env?: NodeJS.ProcessEnv;
|
|
118
|
+
/** What Git Bash's `mount` prints, then its `mount -p`, for the install at `root`; undefined when it cannot run. */
|
|
119
|
+
readMounts?: (root: string) => [string, string] | undefined;
|
|
72
120
|
}
|
|
73
121
|
/**
|
|
74
122
|
* The shell the planner's `bash` tool should use on this host. Resolved once per
|
|
@@ -425,6 +473,8 @@ interface CatalogModel {
|
|
|
425
473
|
contextLength: number;
|
|
426
474
|
/** The longest reply the catalog says the model is served with, when it says. */
|
|
427
475
|
maxOutputTokens?: number;
|
|
476
|
+
/** Whether the model takes tool definitions, when the catalog lists what it takes. */
|
|
477
|
+
tools?: boolean;
|
|
428
478
|
}
|
|
429
479
|
declare class ModelCatalog {
|
|
430
480
|
static fetchModels(apiKey: string, baseUrl?: string, fetchImpl?: typeof fetch): Promise<CatalogModel[]>;
|
|
@@ -434,6 +484,13 @@ declare class ModelCatalog {
|
|
|
434
484
|
* best-effort — a missing file or unreadable dir is a no-op.
|
|
435
485
|
*/
|
|
436
486
|
static clearCache(baseUrl?: string): void;
|
|
487
|
+
/**
|
|
488
|
+
* The catalog last fetched for a base URL and still on disk, however old;
|
|
489
|
+
* null when none is. Reads only, so it never waits on the network. A key's
|
|
490
|
+
* catalog lists what that account is served, which a cached list of any age
|
|
491
|
+
* says as well as a fresh one: a changed key clears it (`clearCache`).
|
|
492
|
+
*/
|
|
493
|
+
static held(baseUrl?: string): CatalogModel[] | null;
|
|
437
494
|
private static readCache;
|
|
438
495
|
private static writeCache;
|
|
439
496
|
}
|
|
@@ -1294,6 +1351,23 @@ interface McpCredential {
|
|
|
1294
1351
|
extraTools?: readonly string[];
|
|
1295
1352
|
/** The token serves a read-only task's tools ({@link TaskTokenScope.readOnly}), so the runner is told of and pre-allows `run_command`, `fetch` and `web_search`. */
|
|
1296
1353
|
readOnly?: true;
|
|
1354
|
+
/**
|
|
1355
|
+
* Whether the holder has reached the server yet. Absent on a credential the
|
|
1356
|
+
* server did not issue (a test double), whose holder has no such evidence.
|
|
1357
|
+
*/
|
|
1358
|
+
contact?: McpContact;
|
|
1359
|
+
}
|
|
1360
|
+
/**
|
|
1361
|
+
* The server's own record that a credential's holder got through its checks
|
|
1362
|
+
* (ADR-0022): the only evidence of an attach for a runner whose protocol sends
|
|
1363
|
+
* no MCP-status notification (ACP). It is read here rather than reported by
|
|
1364
|
+
* the runner, and it holds no matter which side finished its handshake first.
|
|
1365
|
+
*/
|
|
1366
|
+
interface McpContact {
|
|
1367
|
+
/** An authorized request has arrived, of any MCP method. Stays true after a revoke. */
|
|
1368
|
+
contacted(): boolean;
|
|
1369
|
+
/** True on the first authorized request; false once the token is revoked (or the server disposed) with none seen. */
|
|
1370
|
+
whenContacted(): Promise<boolean>;
|
|
1297
1371
|
}
|
|
1298
1372
|
/**
|
|
1299
1373
|
* Why the server refused a request before any tool ran, kept apart in the
|
|
@@ -1350,11 +1424,18 @@ interface McpClientConfig {
|
|
|
1350
1424
|
extraTools?: readonly string[];
|
|
1351
1425
|
/** A read-only task's token (ADR-0046): `run_command`, `fetch` and `web_search` are among its tools, for the runner to pre-allow and name. */
|
|
1352
1426
|
readOnly?: true;
|
|
1427
|
+
/**
|
|
1428
|
+
* The server's record of this token's first use, for a runner whose
|
|
1429
|
+
* protocol reports no MCP status of its own (ACP): its only evidence of an
|
|
1430
|
+
* attach (ADR-0022, S4).
|
|
1431
|
+
*/
|
|
1432
|
+
contact?: McpContact;
|
|
1353
1433
|
}
|
|
1354
1434
|
/**
|
|
1355
1435
|
* The one shape every runner adapter renders its own MCP configuration from.
|
|
1356
1436
|
* The token travels only in `headers`: the adapter writes it to an owner-only
|
|
1357
|
-
* file or an environment variable,
|
|
1437
|
+
* file or an environment variable, or hands it over the runner's own stdin
|
|
1438
|
+
* protocol (ACP's `session/new`), never a prompt or a process argument
|
|
1358
1439
|
* (ADR-0022, A4/A5).
|
|
1359
1440
|
*/
|
|
1360
1441
|
declare function mcpClientConfig(credential: McpCredential): McpClientConfig;
|
|
@@ -2459,6 +2540,65 @@ interface ExecutionBackend {
|
|
|
2459
2540
|
reclaim?(): Promise<void>;
|
|
2460
2541
|
}
|
|
2461
2542
|
|
|
2543
|
+
/** A stream of text hidden as it arrives: see {@link heldStream}. */
|
|
2544
|
+
interface HeldStream {
|
|
2545
|
+
/** What is safe to show of `text`, read on from what was written before it. */
|
|
2546
|
+
write(text: string): string;
|
|
2547
|
+
/** The rest, `text` with it, once the stream has no more. */
|
|
2548
|
+
end(text?: string): string;
|
|
2549
|
+
}
|
|
2550
|
+
|
|
2551
|
+
/**
|
|
2552
|
+
* The secrets Ordewell itself handed one attempt's runner: the attempt's MCP
|
|
2553
|
+
* token, the credentials in the runner's spawn env, the headers it was given
|
|
2554
|
+
* (ADR-0061, H1). The session owns one for its whole life, respawns and all,
|
|
2555
|
+
* and every sink of the runner's text reads it: the session hides what it
|
|
2556
|
+
* holds in everything the runner says before any of it is cut or kept, and the
|
|
2557
|
+
* output source, the handoff and a stderr tail redact with it.
|
|
2558
|
+
*
|
|
2559
|
+
* Only what Ordewell holds can be hidden exactly. A secret it never held is
|
|
2560
|
+
* left to the name and shape rules of {@link redactAgentText}.
|
|
2561
|
+
*/
|
|
2562
|
+
declare class HeldSecrets {
|
|
2563
|
+
private readonly values;
|
|
2564
|
+
/** The stream the last delta was in, and its end not yet safe to show. */
|
|
2565
|
+
private pending;
|
|
2566
|
+
hold(...values: ReadonlyArray<string | undefined>): void;
|
|
2567
|
+
/** The credentials among a spawn env's variables, as {@link sensitiveEnvValues} names them. */
|
|
2568
|
+
holdEnv(env: Record<string, string | undefined>): void;
|
|
2569
|
+
/** Runner text with what is held hidden and every agent-text rule applied. */
|
|
2570
|
+
redact(text: string): string;
|
|
2571
|
+
/** Only what is held hidden: for runner text kept as the runner wrote it, before anything cuts it. */
|
|
2572
|
+
hide(text: string): string;
|
|
2573
|
+
/** `value` with {@link hide} applied to every string in it, at any depth, its keys included. */
|
|
2574
|
+
hideIn<T>(value: T): T;
|
|
2575
|
+
/**
|
|
2576
|
+
* `err` with what is held hidden in its message and stack, rewritten where
|
|
2577
|
+
* it is so its class still tells why it was thrown. A start that failed ends
|
|
2578
|
+
* with the last words of a runner or of its container, which can quote any
|
|
2579
|
+
* of what the runner was handed.
|
|
2580
|
+
*/
|
|
2581
|
+
hideError(err: unknown): unknown;
|
|
2582
|
+
/**
|
|
2583
|
+
* The events to show for `event`, in order, what is held hidden in each. A
|
|
2584
|
+
* held value streamed in deltas of a few characters has no part in any one
|
|
2585
|
+
* of them, so a delta's text is read on from the ones before it, and its end
|
|
2586
|
+
* is held back until what follows shows it holds no part of a value
|
|
2587
|
+
* (ADR-0061, H1). Any other event, or a delta of another stream, passes on
|
|
2588
|
+
* what was held back before itself, so nothing is reordered.
|
|
2589
|
+
*/
|
|
2590
|
+
shownEvents(event: StructuredEvent): StructuredEvent[];
|
|
2591
|
+
/**
|
|
2592
|
+
* One pipe's text in chunks, as {@link shownEvents} reads deltas: `write`
|
|
2593
|
+
* returns what is safe to show of a chunk read on from the ones before it,
|
|
2594
|
+
* and `end` the rest, once the pipe has no more (ADR-0061, H1). A pipe's
|
|
2595
|
+
* chunks split wherever its buffer fills, through a held value as readily
|
|
2596
|
+
* as anywhere else.
|
|
2597
|
+
*/
|
|
2598
|
+
stream(): HeldStream;
|
|
2599
|
+
private flush;
|
|
2600
|
+
}
|
|
2601
|
+
|
|
2462
2602
|
/**
|
|
2463
2603
|
* The harness-planner transport contract (ADR-0009).
|
|
2464
2604
|
*
|
|
@@ -2860,9 +3000,12 @@ interface AgentAdapter {
|
|
|
2860
3000
|
* adapter that cannot inject the server at all, which cannot run tasks.
|
|
2861
3001
|
* `false` is the old boolean answer for "not attached"; a real adapter says
|
|
2862
3002
|
* `pending` while its process is still starting, or `failed` when the
|
|
2863
|
-
* runner reports the server cannot connect.
|
|
3003
|
+
* runner reports the server cannot connect. A runner that uses its token
|
|
3004
|
+
* only once a turn starts it is checked by its first turn, a task's prompt
|
|
3005
|
+
* or a planner's message, sent through `sendFirstTurn` (ADR-0060, R5);
|
|
3006
|
+
* without one it cannot attach.
|
|
2864
3007
|
*/
|
|
2865
|
-
mcpAttached?(): Promise<boolean | AttachState>;
|
|
3008
|
+
mcpAttached?(sendFirstTurn?: () => Promise<unknown>): Promise<boolean | AttachState>;
|
|
2866
3009
|
/**
|
|
2867
3010
|
* Registers a listener for the process ending, for any reason; a planner
|
|
2868
3011
|
* reads it to tell a runner that exited while it started. Fires at most
|
|
@@ -2892,7 +3035,7 @@ interface AgentAdapter {
|
|
|
2892
3035
|
}
|
|
2893
3036
|
/** What an adapter adds to run a task rather than a planner (ADR-0018). */
|
|
2894
3037
|
interface TaskModeAgentAdapter extends AgentAdapter {
|
|
2895
|
-
mcpAttached(): Promise<boolean | AttachState>;
|
|
3038
|
+
mcpAttached(sendFirstTurn?: () => Promise<unknown>): Promise<boolean | AttachState>;
|
|
2896
3039
|
/**
|
|
2897
3040
|
* Ask the running turn to stop, keeping the process and its session. Resolves
|
|
2898
3041
|
* true once the agent acknowledged it; the turn then ends with
|
|
@@ -2975,6 +3118,12 @@ interface AgentProcessDeps {
|
|
|
2975
3118
|
nativeShellSandbox?: () => PlannerShellSandbox;
|
|
2976
3119
|
/** Where a lease put this runner, when not on this host (ADR-0059 L5). */
|
|
2977
3120
|
placement?: RunnerPlacement;
|
|
3121
|
+
/**
|
|
3122
|
+
* The attempt's held secrets, which the process adds its spawn env and
|
|
3123
|
+
* withheld headers to, so the session's sinks hide them too (ADR-0061, H1).
|
|
3124
|
+
* Absent outside an attempt: the process then holds its own.
|
|
3125
|
+
*/
|
|
3126
|
+
held?: HeldSecrets;
|
|
2978
3127
|
}
|
|
2979
3128
|
/** Builds the adapter for one runner id, or null when that runner cannot plan. */
|
|
2980
3129
|
type AgentAdapterFactory = (runner: string, deps: AgentProcessDeps) => AgentAdapter | null;
|
|
@@ -3003,6 +3152,11 @@ interface RunnerManifest {
|
|
|
3003
3152
|
modes?: RunnerMode[];
|
|
3004
3153
|
/** How to ask whether the user is signed in. Absent when the runner offers no status command. */
|
|
3005
3154
|
auth?: RunnerAuthSpec;
|
|
3155
|
+
/**
|
|
3156
|
+
* How the agent signs in where Ordewell can run no login for it, as a
|
|
3157
|
+
* clause the signed-out hint ends with ("run qwen and sign in there").
|
|
3158
|
+
*/
|
|
3159
|
+
signIn?: string;
|
|
3006
3160
|
}
|
|
3007
3161
|
/** What a runner's status command answered, with both streams kept apart. */
|
|
3008
3162
|
interface RunnerAuthStatus {
|
|
@@ -3029,8 +3183,13 @@ interface RunnerAuthStatus {
|
|
|
3029
3183
|
* table to drift.
|
|
3030
3184
|
*/
|
|
3031
3185
|
interface RunnerAuthSpec {
|
|
3032
|
-
/**
|
|
3033
|
-
|
|
3186
|
+
/**
|
|
3187
|
+
* The CLI args that answer whether the user is signed in, e.g. `auth status`.
|
|
3188
|
+
* Absent when the runner has a login but no status command to ask (Copilot):
|
|
3189
|
+
* nothing is probed, the verdict stays `unknown`, and a failed turn's own
|
|
3190
|
+
* words (`signedOut`) are what learn it.
|
|
3191
|
+
*/
|
|
3192
|
+
statusArgs?: string[];
|
|
3034
3193
|
/** The CLI args that run the login, e.g. `auth login`. */
|
|
3035
3194
|
loginArgs: string[];
|
|
3036
3195
|
/**
|
|
@@ -3069,6 +3228,19 @@ interface DiscoveryCommand {
|
|
|
3069
3228
|
* do under `CLAUDE_CONFIG_DIR`.
|
|
3070
3229
|
*/
|
|
3071
3230
|
type RunnerEnv = Readonly<Record<string, string | undefined>>;
|
|
3231
|
+
/**
|
|
3232
|
+
* Reads an agent's provider credential from its own store for one start: the
|
|
3233
|
+
* variables to add to that start's environment, null when the agent needs none
|
|
3234
|
+
* from Ordewell, and a throw, naming the routes that would sign it in, when it
|
|
3235
|
+
* has none (ADR-0060, R9). What it answers holds a secret. `kind` and
|
|
3236
|
+
* `model` are the start's, the model as the plan names it; both are absent
|
|
3237
|
+
* when model discovery asks.
|
|
3238
|
+
*/
|
|
3239
|
+
type RunnerCredentials = (context: {
|
|
3240
|
+
env: RunnerEnv;
|
|
3241
|
+
kind?: 'planner' | 'task';
|
|
3242
|
+
model?: string;
|
|
3243
|
+
}) => Promise<Readonly<Record<string, string>> | null>;
|
|
3072
3244
|
type ApiAuthMethod = {
|
|
3073
3245
|
type: 'env';
|
|
3074
3246
|
varName: string;
|
|
@@ -3098,7 +3270,12 @@ interface ApiDiscoveryConfig {
|
|
|
3098
3270
|
parser: ModelDiscoveryParser;
|
|
3099
3271
|
}
|
|
3100
3272
|
interface RunnerModelDiscovery {
|
|
3101
|
-
|
|
3273
|
+
/**
|
|
3274
|
+
* `acp` asks the running agent over the Agent Client Protocol first; the
|
|
3275
|
+
* manifest's `discoveryCommands` and aliases are what it falls back to, so a
|
|
3276
|
+
* runner using it still declares them.
|
|
3277
|
+
*/
|
|
3278
|
+
method: 'command' | 'hardcoded' | 'acp';
|
|
3102
3279
|
command?: string;
|
|
3103
3280
|
args?: string[];
|
|
3104
3281
|
parser?: ModelDiscoveryParser;
|
|
@@ -3115,6 +3292,23 @@ interface RunnerModelDiscovery {
|
|
|
3115
3292
|
args: string[];
|
|
3116
3293
|
cacheFile?: string | ((env: RunnerEnv) => string);
|
|
3117
3294
|
};
|
|
3295
|
+
/**
|
|
3296
|
+
* ACP discovery (`method: 'acp'`): start `runner.command` with `args`, run
|
|
3297
|
+
* `initialize` and `session/new` in a scratch directory with no MCP servers,
|
|
3298
|
+
* and read the models and efforts the new session offers. No prompt is sent,
|
|
3299
|
+
* so nothing is billed. Any failure, signed-out included, falls through to
|
|
3300
|
+
* the remaining methods: discovery never gates a pick (ADR-0040).
|
|
3301
|
+
*
|
|
3302
|
+
* `env` and `credentials` are the ones the runner's ACP profile starts it
|
|
3303
|
+
* with, so an agent that reads its key only from its environment is asked
|
|
3304
|
+
* as it runs (ADR-0060, R9). A hook that refuses is no answer, and nothing
|
|
3305
|
+
* is spawned.
|
|
3306
|
+
*/
|
|
3307
|
+
acp?: {
|
|
3308
|
+
args: string[];
|
|
3309
|
+
env?: Readonly<Record<string, string>>;
|
|
3310
|
+
credentials?: RunnerCredentials;
|
|
3311
|
+
};
|
|
3118
3312
|
/**
|
|
3119
3313
|
* Optional last-resort list for a CLI that cannot enumerate
|
|
3120
3314
|
* models. Used only when command discovery fails entirely or the CLI is
|
|
@@ -3383,6 +3577,12 @@ interface QueuedTaskMessage {
|
|
|
3383
3577
|
interface IRunnerSession {
|
|
3384
3578
|
id: string;
|
|
3385
3579
|
taskId: string;
|
|
3580
|
+
/**
|
|
3581
|
+
* What Ordewell handed this attempt's runner and must never show (ADR-0061,
|
|
3582
|
+
* H1), for each sink of its text to redact with. A session that hands its
|
|
3583
|
+
* runner nothing secret has none.
|
|
3584
|
+
*/
|
|
3585
|
+
readonly secrets?: HeldSecrets;
|
|
3386
3586
|
onOutput(callback: (text: string) => void): void;
|
|
3387
3587
|
onExit(callback: (code: number) => void): void;
|
|
3388
3588
|
/** End the process at once. {@link stop} is how an attempt that is over lets it go. */
|
|
@@ -3715,4 +3915,4 @@ interface EventStore {
|
|
|
3715
3915
|
close(): Promise<void>;
|
|
3716
3916
|
}
|
|
3717
3917
|
|
|
3718
|
-
export { type
|
|
3918
|
+
export { type IRunnerSession as $, AUTO_COMMANDS as A, type BashOptions as B, type CatalogModel as C, type CommandClassification as D, type CommandTier as E, ConsoleLogger as F, DENY_ALL as G, type DiscoveryCommand as H, type EditPlanArgs as I, type EventStore as J, type ExecutionBackend as K, type FetchAllProviderModelsOptions as L, type FindSymbolOptions as M, GIT_READONLY_SUBCOMMANDS as N, GREP_DEFAULT_HEAD_LIMIT as O, type GlobOptions as P, type GrepOptions as Q, type GrepOutputMode as R, type Guarantee as S, type GuaranteeReport as T, HeldSecrets as U, type IApproval as V, type IConfig as W, type IFileSystem as X, type ILogger as Y, type INotification as Z, type IRunner as _, type AgentAdapter as a, type RunnerEntry as a$, type InvokedCommand as a0, type IsolatedExecution as a1, IsolationRunController as a2, type LeaseRecord as a3, type LeaseRepo as a4, type LeaseRequest as a5, type LeaseSpec as a6, LineBuffer as a7, type ListModelsArgs as a8, type ListRunnersArgs as a9, type PlannerModes as aA, type PlannerSandboxAvailability as aB, type PlannerSandboxDeps as aC, PlannerShellSandbox as aD, type PlannerStartOptions as aE, type PlannerTokenScope as aF, type PlannerToolHandler as aG, type PostArgs as aH, type ProjectMcpServer as aI, type ProviderCredentialSource as aJ, type ProviderModelLists as aK, type ProviderModelsResult as aL, type QueuedTaskMessage as aM, READ_ONLY_TASK_TOOLS as aN, REFUSED_COMMANDS as aO, type ReadFileOpts as aP, type ReadTaskArgs as aQ, type ResearchShell as aR, type ResearchShellDeps as aS, type ReservedLease as aT, type RetryTaskArgs as aU, type RunCommandArgs as aV, type RunPlanArgs as aW, type RunnerAuthSpec as aX, type RunnerAuthStatus as aY, type RunnerCommand as aZ, type RunnerCommandKind as a_, type LoadSkillArgs as aa, type McpClientConfig as ab, type McpContact as ac, type McpCredential as ad, type McpRefusal as ae, type McpTool as af, type McpToolContext as ag, type McpToolReply as ah, type MessageTaskArgs as ai, ModelCatalog as aj, type ModelShortcut as ak, type NodePath as al, type NotificationAction as am, ORCHESTRATOR_SHORTCUTS as an, ORDEWELL_MCP_PATH as ao, ORDEWELL_MCP_SERVER_NAME as ap, type OneTaskArgs as aq, type OpenLease as ar, type OrchestratorOption as as, OrdewellMcpServer as at, type OwnSealedRuns as au, type OwnerOnlyFile as av, PLANNER_EXECUTION_TOOLS as aw, PLANNER_SANDBOX_DOCS as ax, PLANNER_TOOLS as ay, type PlannerBackendId as az, type AgentAdapterFactory as b, deleteSession as b$, type RunnerEnv as b0, type RunnerFeatures as b1, type RunnerLaunch as b2, type RunnerManifest as b3, type RunnerMcpServer as b4, type RunnerMode as b5, type RunnerModelDiscovery as b6, type RunnerModelRef as b7, type RunnerPlacement as b8, RunnerRegistry as b9, TASK_TOOLS as bA, type TaskCompleteArgs as bB, type TaskDiffArgs as bC, type TaskMessageFrom as bD, type TaskModeAgentAdapter as bE, TaskModeUnsupportedError as bF, type TaskOutputArgs as bG, type TaskQueryArgs as bH, type TaskRunCommandArgs as bI, type TaskRunnerConfig as bJ, type TaskRunnerFlags as bK, type TaskShell as bL, type TaskShellSite as bM, type TaskStartOptions as bN, type TaskTokenScope as bO, type TaskToolHandler as bP, type TaskWebReads as bQ, type ToolOutcome as bR, type TreeEvent as bS, type TreeFact as bT, type UsageLimitSignal as bU, approvalScopes as bV, classifyCommand as bW, clearPlannerSandboxCache as bX, clearResearchShellCache as bY, collectProviderCredentials as bZ, defaultLogger as b_, SEALED_LIMITS as ba, SEARCH_EXCLUSIONS as bb, type SandboxBackend as bc, type SandboxInvocation as bd, type SandboxLaunch as be, type SandboxLimits as bf, type SandboxProfile as bg, type ScriptExit as bh, type ScriptFullOutput as bi, type ScriptRun as bj, type ScriptStatus as bk, type SealedAvailability as bl, type SealedRunOptions as bm, type SessionData as bn, type SessionMeta as bo, type ShellDialect as bp, type ShellLaunch as bq, type SkillLookup as br, type SpawnFn as bs, type StandingDecision as bt, type StructuredEvent as bu, type StructuredTurnEnd as bv, type SubmitPlanArgs as bw, TASK_COMPLETE_TOOL as bx, TASK_COMPLETION_CONTRACT as by, TASK_SEALED_LIMITS as bz, type AgentEvent as c, effectiveApprovalMode as c0, enabledRunners as c1, fetchAllProviderModels as c2, findRunnerCommand as c3, getLatestSession as c4, grantScopeFor as c5, idSegment as c6, isGranted as c7, isRunnerApproval as c8, knownModelId as c9, listChildSessions as ca, listSessions as cb, loadChildSession as cc, loadSession as cd, loadSessionPlanState as ce, mcpClientConfig as cf, ownerOnlyConfigFile as cg, parseApprovalModeSetting as ch, plannerToolSet as ci, researchShellWarning as cj, researchToolsPath as ck, resolveModelShortcut as cl, resolvePlannerSandbox as cm, resolveProvider as cn, resolveResearchShell as co, resolveWithin as cp, saveChildSession as cq, saveSession as cr, sessionDataDir as cs, sharedMcpServer as ct, taskCompletionContract as cu, taskToolSet as cv, toApprovalDecision as cw, toOrchestratorOptions as cx, toolListing as cy, type AgentProcessDeps as d, type AgentStartOptions as e, type AiProvider as f, type AllProviderModels as g, type AnswerApprovalArgs as h, type ApplyPatchArgs as i, type ApprovalAnswer as j, type ApprovalDecision as k, type ApprovalKind as l, type ApprovalMode as m, type ApprovalModeSetting as n, ApprovalPolicy as o, type ApprovalPolicyOptions as p, type ApprovalRequest as q, type ApprovalSource as r, type AttachState as s, type BoardAuthor as t, type BoardDraft as u, type BoardEntry as v, type BoardPost as w, type CheckpointAnswer as x, type CheckpointArgs as y, type ChildSessionPlace as z };
|