@ordewell/core 0.6.4 → 0.7.0
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 +1 -1
- package/dist/{IFileSystem-DQEKyC6H.d.ts → IFileSystem-D4ADfTrX.d.ts} +1 -1
- package/dist/{IFileSystem-Qj2MWHn_.d.mts → IFileSystem-DgpX0BU7.d.mts} +1 -1
- package/dist/{ModeResolver-ByNpC0EP.d.ts → ModeResolver-BEcRAz1c.d.ts} +3 -3
- package/dist/{ModeResolver-rqaY_4Ex.d.mts → ModeResolver-Cv01ZDd9.d.mts} +3 -3
- package/dist/{Task-xqdxugt2.d.mts → Task-CoKhvBa1.d.mts} +275 -2
- package/dist/{Task-xqdxugt2.d.ts → Task-CoKhvBa1.d.ts} +275 -2
- package/dist/{chunk-M4KXBEFJ.mjs → chunk-J3YSTPCE.mjs} +41 -41
- package/dist/chunk-J3YSTPCE.mjs.map +1 -0
- package/dist/{chunk-I6U3PVHL.mjs → chunk-LSGY7AIZ.mjs} +74 -23
- package/dist/chunk-LSGY7AIZ.mjs.map +1 -0
- package/dist/{chunk-JRZPSNRO.mjs → chunk-YU4UKKKI.mjs} +1 -1
- package/dist/chunk-YU4UKKKI.mjs.map +1 -0
- package/dist/index.d.mts +250 -34
- package/dist/index.d.ts +250 -34
- package/dist/index.js +2002 -670
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1642 -366
- package/dist/index.mjs.map +1 -1
- package/dist/order-labels.d.mts +2 -1
- package/dist/order-labels.d.ts +2 -1
- package/dist/{parsing-DDZ1rUYa.d.mts → parsing-B4OCHH1_.d.mts} +24 -3
- package/dist/{parsing-COPG8-Ep.d.ts → parsing-DMdOq-BV.d.ts} +24 -3
- package/dist/parsing.d.mts +4 -3
- package/dist/parsing.d.ts +4 -3
- package/dist/parsing.js +36 -38
- package/dist/parsing.js.map +1 -1
- package/dist/parsing.mjs +2 -2
- package/dist/{plan-utils-Br8UAoiu.d.ts → plan-utils-BdYPRBno.d.ts} +28 -3
- package/dist/{plan-utils-DMgajMvd.d.mts → plan-utils-CD1Xu65s.d.mts} +28 -3
- package/dist/plan-utils.d.mts +4 -3
- package/dist/plan-utils.d.ts +4 -3
- package/dist/plan-utils.js +111 -58
- package/dist/plan-utils.js.map +1 -1
- package/dist/plan-utils.mjs +8 -2
- package/dist/testing.d.mts +11 -2
- package/dist/testing.d.ts +11 -2
- package/dist/testing.js +17 -0
- package/dist/testing.js.map +1 -1
- package/dist/testing.mjs +17 -0
- package/dist/testing.mjs.map +1 -1
- package/package.json +4 -2
- package/dist/chunk-I6U3PVHL.mjs.map +0 -1
- package/dist/chunk-JRZPSNRO.mjs.map +0 -1
- package/dist/chunk-M4KXBEFJ.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ npm install @ordewell/core
|
|
|
20
20
|
| `PlanStore` | All plan-shaped state: the task tree, status sets, runner set |
|
|
21
21
|
| `Planner` | The read-only model that researches a repo and emits the plan |
|
|
22
22
|
| `TaskOrchestrator` | Pure scheduler — dependency order and parallelism |
|
|
23
|
-
| `VerdictEngine` | Completion
|
|
23
|
+
| `VerdictEngine` | Completion verification — the marker or the runner's `task_complete` call; the model is never the tie-breaker |
|
|
24
24
|
| `ModelResolver` / `ModeResolver` | Per-task model routing and mode resolution |
|
|
25
25
|
| `RunnerRegistry` | Built-in runners plus the plugin manifest engine |
|
|
26
26
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aX as RunnerId } from './Task-CoKhvBa1.js';
|
|
2
2
|
|
|
3
3
|
interface RunnerModeInfo {
|
|
4
4
|
id: string;
|
|
@@ -39,8 +39,8 @@ declare function resolveDefaultMode(modes: RunnerModeInfo[] | undefined, autonom
|
|
|
39
39
|
*/
|
|
40
40
|
declare function filteredBuildModes(modes: RunnerModeInfo[], autonomousDefault: boolean): RunnerModeInfo[];
|
|
41
41
|
/** The user-facing name of the `autonomousMode` boolean's two states. */
|
|
42
|
-
declare function autonomyLevelLabel(autonomous: boolean): 'Full
|
|
43
|
-
/** `full`/`
|
|
42
|
+
declare function autonomyLevelLabel(autonomous: boolean): 'Full' | 'Guarded';
|
|
43
|
+
/** `full`/`guarded` name the levels; `on`/`off` and `auto` are older words for them. Null for anything else. */
|
|
44
44
|
declare function parseAutonomyLevel(arg: string | undefined): boolean | null;
|
|
45
45
|
declare function buildModeGuide(runnerModes: Record<RunnerId, RunnerModeInfo[]>, autonomousDefault?: boolean): string;
|
|
46
46
|
declare function resolveTaskMode(emittedMode: string | undefined, runnerId: RunnerId, runnerModes: Record<RunnerId, RunnerModeInfo[]> | undefined, autonomousDefault?: boolean): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aX as RunnerId } from './Task-CoKhvBa1.mjs';
|
|
2
2
|
|
|
3
3
|
interface RunnerModeInfo {
|
|
4
4
|
id: string;
|
|
@@ -39,8 +39,8 @@ declare function resolveDefaultMode(modes: RunnerModeInfo[] | undefined, autonom
|
|
|
39
39
|
*/
|
|
40
40
|
declare function filteredBuildModes(modes: RunnerModeInfo[], autonomousDefault: boolean): RunnerModeInfo[];
|
|
41
41
|
/** The user-facing name of the `autonomousMode` boolean's two states. */
|
|
42
|
-
declare function autonomyLevelLabel(autonomous: boolean): 'Full
|
|
43
|
-
/** `full`/`
|
|
42
|
+
declare function autonomyLevelLabel(autonomous: boolean): 'Full' | 'Guarded';
|
|
43
|
+
/** `full`/`guarded` name the levels; `on`/`off` and `auto` are older words for them. Null for anything else. */
|
|
44
44
|
declare function parseAutonomyLevel(arg: string | undefined): boolean | null;
|
|
45
45
|
declare function buildModeGuide(runnerModes: Record<RunnerId, RunnerModeInfo[]>, autonomousDefault?: boolean): string;
|
|
46
46
|
declare function resolveTaskMode(emittedMode: string | undefined, runnerId: RunnerId, runnerModes: Record<RunnerId, RunnerModeInfo[]> | undefined, autonomousDefault?: boolean): string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ChildProcess } from 'child_process';
|
|
2
2
|
import { EventEmitter } from 'events';
|
|
3
|
+
import { z } from 'zod/v4';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Why isolated execution is unavailable for a workspace. The orchestrator needs
|
|
@@ -914,6 +915,248 @@ interface IApproval {
|
|
|
914
915
|
/** Denies everything. The safe default when a surface wires no approval channel. */
|
|
915
916
|
declare const DENY_ALL: IApproval;
|
|
916
917
|
|
|
918
|
+
/**
|
|
919
|
+
* The tools of the Ordewell MCP server, per token role (ADR-0022), and the
|
|
920
|
+
* handler interfaces the session side implements to answer them.
|
|
921
|
+
*
|
|
922
|
+
* Every handler method is optional so each tool can be wired on its own; one
|
|
923
|
+
* left unset answers its call with a "not available" error rather than
|
|
924
|
+
* disappearing from `tools/list`, so the list a runner sees never depends on
|
|
925
|
+
* how far the wiring has got.
|
|
926
|
+
*/
|
|
927
|
+
declare const taskCompleteInput: z.ZodObject<{
|
|
928
|
+
status: z.ZodEnum<{
|
|
929
|
+
failed: "failed";
|
|
930
|
+
blocked: "blocked";
|
|
931
|
+
done: "done";
|
|
932
|
+
}>;
|
|
933
|
+
summary: z.ZodString;
|
|
934
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
935
|
+
}, z.core.$strip>;
|
|
936
|
+
declare const checkpointInput: z.ZodObject<{
|
|
937
|
+
question: z.ZodString;
|
|
938
|
+
}, z.core.$strip>;
|
|
939
|
+
declare const listRunnersInput: z.ZodObject<{}, z.core.$strip>;
|
|
940
|
+
declare const listModelsInput: z.ZodObject<{
|
|
941
|
+
runner: z.ZodString;
|
|
942
|
+
}, z.core.$strip>;
|
|
943
|
+
declare const submitPlanInput: z.ZodObject<{
|
|
944
|
+
tasks: z.ZodArray<z.ZodObject<{
|
|
945
|
+
id: z.ZodOptional<z.ZodString>;
|
|
946
|
+
order: z.ZodOptional<z.ZodNumber>;
|
|
947
|
+
title: z.ZodString;
|
|
948
|
+
description: z.ZodOptional<z.ZodString>;
|
|
949
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
950
|
+
user: "user";
|
|
951
|
+
ai: "ai";
|
|
952
|
+
}>>;
|
|
953
|
+
dependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
954
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
955
|
+
userSteps: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
956
|
+
order: z.ZodOptional<z.ZodNumber>;
|
|
957
|
+
instruction: z.ZodString;
|
|
958
|
+
}, z.core.$loose>>>;
|
|
959
|
+
assignedRunner: z.ZodOptional<z.ZodString>;
|
|
960
|
+
assignedModel: z.ZodOptional<z.ZodObject<{
|
|
961
|
+
modelId: z.ZodString;
|
|
962
|
+
modelLabel: z.ZodOptional<z.ZodString>;
|
|
963
|
+
thinkingEffort: z.ZodOptional<z.ZodString>;
|
|
964
|
+
}, z.core.$loose>>;
|
|
965
|
+
taskMode: z.ZodOptional<z.ZodString>;
|
|
966
|
+
autonomy: z.ZodOptional<z.ZodEnum<{
|
|
967
|
+
AFK: "AFK";
|
|
968
|
+
HITL: "HITL";
|
|
969
|
+
}>>;
|
|
970
|
+
sliceType: z.ZodOptional<z.ZodEnum<{
|
|
971
|
+
AFK: "AFK";
|
|
972
|
+
HITL: "HITL";
|
|
973
|
+
}>>;
|
|
974
|
+
ops: z.ZodOptional<z.ZodBoolean>;
|
|
975
|
+
userStoriesCovered: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
976
|
+
subtasks: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
977
|
+
}, z.core.$loose>>;
|
|
978
|
+
}, z.core.$strip>;
|
|
979
|
+
declare const editPlanInput: z.ZodObject<{
|
|
980
|
+
ops: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
981
|
+
op: z.ZodLiteral<"update">;
|
|
982
|
+
taskId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
983
|
+
changes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
984
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
985
|
+
op: z.ZodLiteral<"add">;
|
|
986
|
+
task: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
987
|
+
handle: z.ZodOptional<z.ZodString>;
|
|
988
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
989
|
+
op: z.ZodLiteral<"remove">;
|
|
990
|
+
taskId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
991
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
992
|
+
op: z.ZodLiteral<"reorder">;
|
|
993
|
+
taskIds: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
994
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
995
|
+
op: z.ZodLiteral<"merge">;
|
|
996
|
+
taskIds: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
997
|
+
merged: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
998
|
+
handle: z.ZodOptional<z.ZodString>;
|
|
999
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1000
|
+
op: z.ZodLiteral<"split">;
|
|
1001
|
+
taskId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
1002
|
+
parts: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1003
|
+
handle: z.ZodOptional<z.ZodString>;
|
|
1004
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1005
|
+
op: z.ZodLiteral<"rearm">;
|
|
1006
|
+
taskId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
1007
|
+
changes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1008
|
+
}, z.core.$strip>]>>;
|
|
1009
|
+
}, z.core.$strip>;
|
|
1010
|
+
declare const taskQueryInput: z.ZodObject<{
|
|
1011
|
+
tasks: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
1012
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
1013
|
+
description: "description";
|
|
1014
|
+
prompt: "prompt";
|
|
1015
|
+
userSteps: "userSteps";
|
|
1016
|
+
verdict: "verdict";
|
|
1017
|
+
outputSummary: "outputSummary";
|
|
1018
|
+
userStoriesCovered: "userStoriesCovered";
|
|
1019
|
+
}>>>;
|
|
1020
|
+
catalog: z.ZodOptional<z.ZodBoolean>;
|
|
1021
|
+
}, z.core.$strip>;
|
|
1022
|
+
declare const taskOutputInput: z.ZodObject<{
|
|
1023
|
+
task: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
1024
|
+
lines: z.ZodOptional<z.ZodNumber>;
|
|
1025
|
+
since: z.ZodOptional<z.ZodNumber>;
|
|
1026
|
+
}, z.core.$strip>;
|
|
1027
|
+
type TaskCompleteArgs = z.infer<typeof taskCompleteInput>;
|
|
1028
|
+
type CheckpointArgs = z.infer<typeof checkpointInput>;
|
|
1029
|
+
type ListRunnersArgs = z.infer<typeof listRunnersInput>;
|
|
1030
|
+
type ListModelsArgs = z.infer<typeof listModelsInput>;
|
|
1031
|
+
type SubmitPlanArgs = z.infer<typeof submitPlanInput>;
|
|
1032
|
+
type EditPlanArgs = z.infer<typeof editPlanInput>;
|
|
1033
|
+
type TaskQueryArgs = z.infer<typeof taskQueryInput>;
|
|
1034
|
+
type TaskOutputArgs = z.infer<typeof taskOutputInput>;
|
|
1035
|
+
/** What a handler answers with. `isError` marks a refusal the caller should act on. */
|
|
1036
|
+
interface McpToolReply {
|
|
1037
|
+
text: string;
|
|
1038
|
+
isError?: boolean;
|
|
1039
|
+
}
|
|
1040
|
+
/**
|
|
1041
|
+
* How a checkpoint call ended. `withdrawn` is the attempt going away under it
|
|
1042
|
+
* (verdict, cancel, retry, stop) or the call being refused, not a verdict on
|
|
1043
|
+
* the question.
|
|
1044
|
+
*/
|
|
1045
|
+
type CheckpointAnswer = {
|
|
1046
|
+
kind: 'continue';
|
|
1047
|
+
} | {
|
|
1048
|
+
kind: 'rejected';
|
|
1049
|
+
reason: string;
|
|
1050
|
+
} | {
|
|
1051
|
+
kind: 'withdrawn';
|
|
1052
|
+
why: string;
|
|
1053
|
+
};
|
|
1054
|
+
interface McpToolContext {
|
|
1055
|
+
/** Aborts when the token is revoked or the caller cancels — a waiting handler must stop. */
|
|
1056
|
+
signal: AbortSignal;
|
|
1057
|
+
}
|
|
1058
|
+
type Run<A> = (args: A, context: McpToolContext) => Promise<McpToolReply>;
|
|
1059
|
+
interface TaskToolHandler {
|
|
1060
|
+
taskComplete?: Run<TaskCompleteArgs>;
|
|
1061
|
+
checkpoint?: Run<CheckpointArgs>;
|
|
1062
|
+
}
|
|
1063
|
+
interface PlannerToolHandler {
|
|
1064
|
+
listRunners?: Run<ListRunnersArgs>;
|
|
1065
|
+
listModels?: Run<ListModelsArgs>;
|
|
1066
|
+
submitPlan?: Run<SubmitPlanArgs>;
|
|
1067
|
+
editPlan?: Run<EditPlanArgs>;
|
|
1068
|
+
taskQuery?: Run<TaskQueryArgs>;
|
|
1069
|
+
taskOutput?: Run<TaskOutputArgs>;
|
|
1070
|
+
}
|
|
1071
|
+
interface McpTool<H> {
|
|
1072
|
+
name: string;
|
|
1073
|
+
description: string;
|
|
1074
|
+
inputSchema: {
|
|
1075
|
+
type: 'object';
|
|
1076
|
+
[key: string]: unknown;
|
|
1077
|
+
};
|
|
1078
|
+
annotations?: {
|
|
1079
|
+
readOnlyHint: boolean;
|
|
1080
|
+
};
|
|
1081
|
+
/** Validate `args` and hand them to the handler's method for this tool. */
|
|
1082
|
+
call(handler: H, args: unknown, context: McpToolContext): Promise<McpToolReply>;
|
|
1083
|
+
}
|
|
1084
|
+
declare const TASK_TOOLS: readonly McpTool<TaskToolHandler>[];
|
|
1085
|
+
declare const PLANNER_TOOLS: readonly McpTool<PlannerToolHandler>[];
|
|
1086
|
+
|
|
1087
|
+
/**
|
|
1088
|
+
* The Ordewell MCP server (ADR-0022): one loopback listener per process,
|
|
1089
|
+
* shared by every session in it, where the caller's token alone decides which
|
|
1090
|
+
* tools it sees and which session and task its calls reach.
|
|
1091
|
+
*/
|
|
1092
|
+
declare const ORDEWELL_MCP_PATH = "/mcp";
|
|
1093
|
+
interface OrdewellMcpServerOptions {
|
|
1094
|
+
/** How often a call that is still waiting tells its caller so. */
|
|
1095
|
+
heartbeatMs?: number;
|
|
1096
|
+
}
|
|
1097
|
+
interface TaskTokenScope {
|
|
1098
|
+
sessionId: string;
|
|
1099
|
+
taskId: string;
|
|
1100
|
+
/** The attempt generation the token is good for; a later attempt gets a new token. */
|
|
1101
|
+
attempt: number;
|
|
1102
|
+
}
|
|
1103
|
+
interface PlannerTokenScope {
|
|
1104
|
+
sessionId: string;
|
|
1105
|
+
}
|
|
1106
|
+
/** Where a runner reaches the server and what it presents there. Never put either half in a prompt. */
|
|
1107
|
+
interface McpCredential {
|
|
1108
|
+
url: string;
|
|
1109
|
+
token: string;
|
|
1110
|
+
}
|
|
1111
|
+
declare class OrdewellMcpServer {
|
|
1112
|
+
private readonly grants;
|
|
1113
|
+
private http;
|
|
1114
|
+
private listening;
|
|
1115
|
+
private boundUrl;
|
|
1116
|
+
private boundHost;
|
|
1117
|
+
private readonly heartbeatMs;
|
|
1118
|
+
constructor(options?: OrdewellMcpServerOptions);
|
|
1119
|
+
/** The listener's URL, once the first token has started it. */
|
|
1120
|
+
get url(): string | undefined;
|
|
1121
|
+
issueTaskToken(scope: TaskTokenScope, handler?: TaskToolHandler): Promise<McpCredential>;
|
|
1122
|
+
issuePlannerToken(scope: PlannerTokenScope, handler?: PlannerToolHandler): Promise<McpCredential>;
|
|
1123
|
+
/** Refuse every later request carrying `token`, and abort the calls it has in flight. */
|
|
1124
|
+
revoke(token: string): void;
|
|
1125
|
+
dispose(): Promise<void>;
|
|
1126
|
+
private issue;
|
|
1127
|
+
private start;
|
|
1128
|
+
private handle;
|
|
1129
|
+
}
|
|
1130
|
+
/** The process's one server, which the daemon and the extension host hand to every session they build. */
|
|
1131
|
+
declare function sharedMcpServer(): OrdewellMcpServer;
|
|
1132
|
+
|
|
1133
|
+
/** The server's name in every runner's MCP configuration, and so in its tool names (`mcp__ordewell__*`). */
|
|
1134
|
+
declare const ORDEWELL_MCP_SERVER_NAME = "ordewell";
|
|
1135
|
+
interface McpClientConfig {
|
|
1136
|
+
name: typeof ORDEWELL_MCP_SERVER_NAME;
|
|
1137
|
+
url: string;
|
|
1138
|
+
headers: Record<string, string>;
|
|
1139
|
+
}
|
|
1140
|
+
/**
|
|
1141
|
+
* The one shape every runner adapter renders its own MCP configuration from.
|
|
1142
|
+
* The token travels only in `headers`: the adapter writes it to an owner-only
|
|
1143
|
+
* file or an environment variable, never a prompt or a process argument
|
|
1144
|
+
* (ADR-0022, A4/A5).
|
|
1145
|
+
*/
|
|
1146
|
+
declare function mcpClientConfig(credential: McpCredential): McpClientConfig;
|
|
1147
|
+
/** A runner's MCP configuration on disk, and the way to take it back off. */
|
|
1148
|
+
interface OwnerOnlyFile {
|
|
1149
|
+
path: string;
|
|
1150
|
+
/** Delete the file. Idempotent. */
|
|
1151
|
+
remove(): void;
|
|
1152
|
+
}
|
|
1153
|
+
/**
|
|
1154
|
+
* Write a configuration that carries a token where only the user can read it,
|
|
1155
|
+
* for a runner that takes its MCP servers from a file (ADR-0022, A5). The
|
|
1156
|
+
* directory is private too, so the name cannot be raced before the mode lands.
|
|
1157
|
+
*/
|
|
1158
|
+
declare function ownerOnlyConfigFile(fileName: string, contents: string): OwnerOnlyFile;
|
|
1159
|
+
|
|
917
1160
|
/**
|
|
918
1161
|
* The harness-planner transport contract (ADR-0009).
|
|
919
1162
|
*
|
|
@@ -1065,6 +1308,8 @@ interface PlannerStartOptions extends AgentStartCommon {
|
|
|
1065
1308
|
systemPrompt: string;
|
|
1066
1309
|
/** Variant / reasoning effort id from that model's `variants` list. */
|
|
1067
1310
|
effort?: string;
|
|
1311
|
+
/** The Ordewell MCP server to inject, pre-authorized (ADR-0022). Only for an adapter with {@link AgentAdapter.mcpAttached}. */
|
|
1312
|
+
mcp?: McpClientConfig;
|
|
1068
1313
|
}
|
|
1069
1314
|
/**
|
|
1070
1315
|
* What a runner manifest says the task's mode and effort mean (ADR-0001),
|
|
@@ -1085,6 +1330,12 @@ interface TaskStartOptions extends AgentStartCommon {
|
|
|
1085
1330
|
/** The task's runner mode id, as the plan names it. */
|
|
1086
1331
|
mode: string;
|
|
1087
1332
|
flags: TaskRunnerFlags;
|
|
1333
|
+
/**
|
|
1334
|
+
* The Ordewell MCP server and this attempt's token (ADR-0022). An adapter
|
|
1335
|
+
* that can inject it does, with its tools pre-approved; one that cannot
|
|
1336
|
+
* ignores it, and the task completes by its marker.
|
|
1337
|
+
*/
|
|
1338
|
+
mcp?: McpClientConfig;
|
|
1088
1339
|
}
|
|
1089
1340
|
/**
|
|
1090
1341
|
* The explicit start switch. Discriminated so that a read-only planner and a
|
|
@@ -1120,6 +1371,12 @@ interface AgentAdapter {
|
|
|
1120
1371
|
nativeSessionId(): string | null;
|
|
1121
1372
|
/** Kill the process and release its resources. Idempotent. */
|
|
1122
1373
|
dispose(): void;
|
|
1374
|
+
/**
|
|
1375
|
+
* Whether the Ordewell MCP server passed in {@link PlannerStartOptions.mcp}
|
|
1376
|
+
* is connected, as the runner itself reports it (ADR-0022, S4). Absent on an
|
|
1377
|
+
* adapter that cannot inject the server at all.
|
|
1378
|
+
*/
|
|
1379
|
+
mcpAttached?(): Promise<boolean>;
|
|
1123
1380
|
}
|
|
1124
1381
|
/** What an adapter adds to run a task rather than a planner (ADR-0018). */
|
|
1125
1382
|
interface TaskModeAgentAdapter extends AgentAdapter {
|
|
@@ -1787,6 +2044,17 @@ interface StructuredSessionCapability {
|
|
|
1787
2044
|
* when it is no longer open — answered, withdrawn, or never asked.
|
|
1788
2045
|
*/
|
|
1789
2046
|
answerPermission(id: string, decision: ApprovalDecision): boolean;
|
|
2047
|
+
/**
|
|
2048
|
+
* The runner's `task_complete` calls on this attempt's token (ADR-0022):
|
|
2049
|
+
* completion evidence beside the marker, for `VerdictEngine` to weigh.
|
|
2050
|
+
*/
|
|
2051
|
+
onTaskComplete(listener: (report: TaskCompleteArgs) => void): void;
|
|
2052
|
+
/**
|
|
2053
|
+
* Answers the runner's `checkpoint` calls (ADR-0022, V5): the call stays
|
|
2054
|
+
* open until the returned promise settles, and its result is the answer.
|
|
2055
|
+
* `signal` aborts when the caller goes away.
|
|
2056
|
+
*/
|
|
2057
|
+
onToolCheckpoint(handler: (question: string, signal: AbortSignal) => Promise<CheckpointAnswer>): void;
|
|
1790
2058
|
}
|
|
1791
2059
|
declare function isStructuredSession(session: ITerminalSession): session is ITerminalSession & StructuredSessionCapability;
|
|
1792
2060
|
|
|
@@ -1827,6 +2095,11 @@ interface ITerminalRunner {
|
|
|
1827
2095
|
* which is why a continue refuses one.
|
|
1828
2096
|
*/
|
|
1829
2097
|
resumeSessionId?: string;
|
|
2098
|
+
/**
|
|
2099
|
+
* Which run of the task this is, from 1. A structured runner binds the
|
|
2100
|
+
* attempt's MCP token to it (ADR-0022, A2).
|
|
2101
|
+
*/
|
|
2102
|
+
attempt?: number;
|
|
1830
2103
|
}): Promise<ITerminalSession>;
|
|
1831
2104
|
stop(sessionId: string): void;
|
|
1832
2105
|
stopAll(): void;
|
|
@@ -1840,7 +2113,7 @@ interface UserStep {
|
|
|
1840
2113
|
}
|
|
1841
2114
|
/** One deterministic signal gathered while verifying a completed task. */
|
|
1842
2115
|
interface VerificationCheck {
|
|
1843
|
-
name: 'exit_code' | 'completion_marker' | 'manual';
|
|
2116
|
+
name: 'exit_code' | 'completion_marker' | 'task_complete' | 'manual';
|
|
1844
2117
|
passed: boolean;
|
|
1845
2118
|
/** A check that did not apply. Skipped checks don't affect the verdict. */
|
|
1846
2119
|
skipped: boolean;
|
|
@@ -2199,4 +2472,4 @@ interface ValidationContext {
|
|
|
2199
2472
|
type ValidationCheck = (ctx: ValidationContext) => ValidationResult;
|
|
2200
2473
|
declare function warningsText(w: PlanModificationWarnings): string | null;
|
|
2201
2474
|
|
|
2202
|
-
export { type
|
|
2475
|
+
export { type IsolationOutcome as $, AbstractRunner as A, type BlockingPrompt as B, CMD_EXE_MAX_COMMAND_LINE as C, DENY_ALL as D, type EditPlanArgs as E, EmbeddedNewlineError as F, ExecutableNotFoundError as G, type FetchAllProviderModelsOptions as H, HeadlessRunner as I, type HeadlessRunnerDeps as J, HeadlessSession as K, type IApproval as L, type IConfig as M, type IPluginStore as N, type ITerminalRunner as O, type ITerminalSession as P, type IWorktreeIsolation as Q, type IntegrationDisposal as R, type IsolationAvailability as S, type IsolationHandoff as T, type IsolationHandoffRepo as U, type IsolationInactiveReason as V, type IsolationLandedTask as W, type IsolationLanding as X, type IsolationMergeBlock as Y, type IsolationMergeBlockReason as Z, type IsolationMergeResult as _, AbstractTerminalSession as a, type RunnerSpawnOptions as a$, type IsolationPruneResult as a0, type IsolationRepo as a1, type IsolationRun as a2, type IsolationTaskRecord as a3, type IsolationTaskRepo as a4, type IsolationTaskStatus as a5, type IsolationView as a6, type LaunchDeps as a7, type LaunchPlan as a8, type LegacyPlanState as a9, type PluginCloneFn as aA, type PluginEntry as aB, type PluginFeatures as aC, type PluginMode as aD, type PluginModelDiscovery as aE, type PluginRunnerDef as aF, type PreparedLaunch as aG, type PreparedTask as aH, type ProviderCredentialSource as aI, type ProviderModelLists as aJ, type ProviderModelsResult as aK, type PtySize as aL, type PtyWrapOptions as aM, type QueuedMessage as aN, type QueuedTaskMessage as aO, type RepairEvidence as aP, type RepoGroupLayout as aQ, type ResearchLogEntry as aR, type ResearchProgress as aS, type ResearchStep as aT, type ResearchStepOutcome as aU, type ResearchToolType as aV, type ResolveContext as aW, type RunnerId as aX, type RunnerInvocation as aY, type RunnerPluginManifest as aZ, RunnerRegistry as a_, LineBuffer as aa, type ListModelsArgs as ab, type ListRunnersArgs as ac, type McpClientConfig as ad, type McpCredential as ae, type McpTool as af, type McpToolContext as ag, type McpToolReply as ah, type Message as ai, ModelCatalog as aj, type ModelShortcut as ak, ORCHESTRATOR_SHORTCUTS as al, ORDEWELL_MCP_PATH as am, ORDEWELL_MCP_SERVER_NAME as an, type OrchestratorOption as ao, OrdewellMcpServer as ap, type OwnerOnlyFile as aq, PLANNER_TOOLS as ar, type PlanIsolation as as, type PlanModificationWarnings as at, type PlanState as au, type PlanStatus as av, type PlannerStartOptions as aw, type PlannerTokenScope as ax, type PlannerToolHandler as ay, type PlannerUsage as az, type ActiveTaskSession as b, isRunnerApproval as b$, type RunnerTransport as b0, type RunnerVersionProbe as b1, type StreamEvent as b2, type StreamStepEvent as b3, type StreamThinkingEvent as b4, type StructuredEvent as b5, type StructuredSessionCapability as b6, type StructuredTurnEnd as b7, type SubagentLogEntry as b8, type SubagentOutcome as b9, type UsageTotals as bA, type UserPromptEntry as bB, type UserStep as bC, type ValidationCheck as bD, type ValidationContext as bE, type ValidationResult as bF, type Verdict as bG, type VerificationCheck as bH, WINDOWS_MAX_COMMAND_LINE as bI, addPlannerUsage as bJ, addTaskToPlan as bK, addUsage as bL, approvalScopes as bM, buildShellInvocation as bN, collectProviderCredentials as bO, createEmptyPlan as bP, createTask as bQ, emptyWarnings as bR, enabledRunners as bS, fetchAllProviderModels as bT, flattenTasks as bU, flattenTasksWithParents as bV, isAwaitingReason as bW, isExecutableResolved as bX, isGranted as bY, isMeasured as bZ, isReservedRunnerName as b_, type SubmitPlanArgs as ba, TASK_TOOLS as bb, type Task as bc, type TaskCompleteArgs as bd, type TaskIsolation as be, type TaskIsolationState as bf, type TaskMode as bg, type TaskModeAgentAdapter as bh, TaskModeUnsupportedError as bi, type TaskModelAssignment as bj, type TaskOutputArgs as bk, type TaskOutputSummary as bl, type TaskQueryArgs as bm, type TaskRunnerFlags as bn, type TaskSnapshot as bo, type TaskStartOptions as bp, type TaskStatus as bq, type TaskTokenScope as br, type TaskToolHandler as bs, type TaskTransport as bt, type TaskType as bu, type TaskWithParent as bv, type ThinkingBlock as bw, type TreeSnapshot as bx, type UsageLine as by, type UsageRecord as bz, type AgentAdapter as c, isRunnerTransport as c0, isStructuredSession as c1, keepExecutionState as c2, knownModelId as c3, mcpClientConfig as c4, migrateLegacyPlan as c5, migratePlanState as c6, migrateTask as c7, ownerOnlyConfigFile as c8, partedPromptUsage as c9, planDirectLaunch as ca, planShellLaunch as cb, plannerContextFill as cc, posixShellQuote as cd, removeTaskFromPlan as ce, renumberTasks as cf, resolveModelShortcut as cg, resolveProvider as ch, sharedMcpServer as ci, stripAnsi as cj, toApprovalDecision as ck, toOrchestratorOptions as cl, updateTaskInPlan as cm, usageLine as cn, validateModifiedPlan as co, warningsText as cp, windowsCommandLine as cq, wrapWithPty as cr, type AgentAdapterFactory as d, type AgentEvent as e, type AgentProcessDeps as f, type AgentStartOptions as g, type AiProvider as h, type AllProviderModels as i, type ApprovalAnswer as j, type ApprovalDecision as k, type ApprovalKind as l, type ApprovalMode as m, ApprovalPolicy as n, type ApprovalPolicyOptions as o, type ApprovalRequest as p, type ApprovalSource as q, type AwaitingReason as r, type CatalogModel as s, type CheckpointAnswer as t, type CheckpointArgs as u, CommandLineTooLongError as v, type ConversationMessage as w, type DiscoveredMode as x, type DiscoveredModel as y, type DiscoveryCommand as z };
|