@ordewell/core 0.10.1 → 0.10.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.
- package/dist/{IFileSystem-BCJBHFwB.d.ts → IFileSystem-CyTIoiSn.d.ts} +1 -1
- package/dist/{IFileSystem-Bj6fy1cG.d.mts → IFileSystem-j0naIoAQ.d.mts} +1 -1
- package/dist/{IRunner-C7_SSpzG.d.ts → IRunner---PfQVdc.d.mts} +25 -20
- package/dist/{IRunner-hWAJC4hg.d.mts → IRunner-WwL-Bjqq.d.ts} +25 -20
- package/dist/{ModeResolver-u5ZhRC8x.d.ts → ModeResolver-CjQ7zqTN.d.mts} +1 -1
- package/dist/{ModeResolver-m1d8Cb-j.d.mts → ModeResolver-DrMU-5lw.d.ts} +1 -1
- package/dist/{Task-CxwnCJLi.d.mts → Task-AfA1m4qW.d.mts} +35 -7
- package/dist/{Task-CxwnCJLi.d.ts → Task-AfA1m4qW.d.ts} +35 -7
- package/dist/{chunk-DJAPDO6E.mjs → chunk-3LNZDBCX.mjs} +8 -7
- package/dist/chunk-3LNZDBCX.mjs.map +1 -0
- package/dist/{chunk-DNFT4SQG.mjs → chunk-4FEARWTS.mjs} +3 -3
- package/dist/{chunk-2IIRSBEQ.mjs → chunk-CIL3BQIF.mjs} +4 -2
- package/dist/chunk-CIL3BQIF.mjs.map +1 -0
- package/dist/{chunk-CH5IGWFS.mjs → chunk-UQGR3UCA.mjs} +35 -3
- package/dist/chunk-UQGR3UCA.mjs.map +1 -0
- package/dist/index.d.mts +49 -36
- package/dist/index.d.ts +49 -36
- package/dist/index.js +15816 -15877
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14846 -14941
- package/dist/index.mjs.map +1 -1
- package/dist/parsing.d.mts +2 -2
- package/dist/parsing.d.ts +2 -2
- package/dist/parsing.js +3 -2
- package/dist/parsing.js.map +1 -1
- package/dist/parsing.mjs +3 -3
- package/dist/{plan-utils-CKXdD1AD.d.mts → plan-utils-DL7yOuJs.d.mts} +39 -8
- package/dist/{plan-utils-B6yJdpgi.d.ts → plan-utils-gpeqV-Lp.d.ts} +39 -8
- package/dist/plan-utils.d.mts +4 -4
- package/dist/plan-utils.d.ts +4 -4
- package/dist/plan-utils.js +44 -0
- package/dist/plan-utils.js.map +1 -1
- package/dist/plan-utils.mjs +7 -3
- package/dist/testing.d.mts +3 -3
- package/dist/testing.d.ts +3 -3
- package/dist/testing.js.map +1 -1
- package/dist/testing.mjs +1 -1
- package/package.json +5 -1
- package/dist/chunk-2IIRSBEQ.mjs.map +0 -1
- package/dist/chunk-CH5IGWFS.mjs.map +0 -1
- package/dist/chunk-DJAPDO6E.mjs.map +0 -1
- /package/dist/{chunk-DNFT4SQG.mjs.map → chunk-4FEARWTS.mjs.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChildProcess } from 'child_process';
|
|
2
|
-
import {
|
|
2
|
+
import { aq as UsageRecord, ac as SubagentOutcome, c as DiscoveredModel, a1 as RunnerId, al as TaskSkillSnapshot } from './Task-AfA1m4qW.mjs';
|
|
3
3
|
import { z } from 'zod/v4';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -588,24 +588,24 @@ declare const taskOutputInput: z.ZodObject<{
|
|
|
588
588
|
error: "error";
|
|
589
589
|
command: "command";
|
|
590
590
|
thinking: "thinking";
|
|
591
|
-
task_skills: "task_skills";
|
|
592
|
-
turn_start: "turn_start";
|
|
593
|
-
command_output: "command_output";
|
|
594
|
-
compaction: "compaction";
|
|
595
|
-
runner_loaded: "runner_loaded";
|
|
596
591
|
turn_end: "turn_end";
|
|
597
|
-
|
|
592
|
+
message_delivered: "message_delivered";
|
|
598
593
|
thinking_delta: "thinking_delta";
|
|
599
594
|
tool_call: "tool_call";
|
|
600
595
|
tool_result: "tool_result";
|
|
596
|
+
usage: "usage";
|
|
601
597
|
subagent_started: "subagent_started";
|
|
602
598
|
subagent_finished: "subagent_finished";
|
|
603
|
-
|
|
599
|
+
runner_loaded: "runner_loaded";
|
|
600
|
+
compaction: "compaction";
|
|
601
|
+
command_output: "command_output";
|
|
602
|
+
turn_start: "turn_start";
|
|
604
603
|
message_queued: "message_queued";
|
|
605
604
|
message_removed: "message_removed";
|
|
606
605
|
message_undelivered: "message_undelivered";
|
|
607
606
|
message_handed_over: "message_handed_over";
|
|
608
|
-
|
|
607
|
+
task_skills: "task_skills";
|
|
608
|
+
text_delta: "text_delta";
|
|
609
609
|
approval_requested: "approval_requested";
|
|
610
610
|
approval_decided: "approval_decided";
|
|
611
611
|
approval_withdrawn: "approval_withdrawn";
|
|
@@ -1314,7 +1314,10 @@ interface RunnerFeatures {
|
|
|
1314
1314
|
permissionModeValues?: Record<string, string>;
|
|
1315
1315
|
modeSettings?: Record<string, Record<string, string>>;
|
|
1316
1316
|
}
|
|
1317
|
-
|
|
1317
|
+
/** A runner's own reader for its catalog's output, kept beside its manifest. */
|
|
1318
|
+
type ModelOutputParser = (output: string, manifest: RunnerManifest) => DiscoveredModel[];
|
|
1319
|
+
/** How discovery output becomes models: one `id label` per line, or the runner's own reader. Absent means per line. */
|
|
1320
|
+
type ModelDiscoveryParser = 'line-by-line' | ModelOutputParser;
|
|
1318
1321
|
interface DiscoveryCommand {
|
|
1319
1322
|
command: string;
|
|
1320
1323
|
args: string[];
|
|
@@ -1343,7 +1346,6 @@ interface RunnerModelDiscovery {
|
|
|
1343
1346
|
command?: string;
|
|
1344
1347
|
args?: string[];
|
|
1345
1348
|
parser?: ModelDiscoveryParser;
|
|
1346
|
-
jsonPath?: string;
|
|
1347
1349
|
/**
|
|
1348
1350
|
* Stdio JSON-RPC discovery (Codex `app-server`): spawn the command, send
|
|
1349
1351
|
* `initialize` then `model/list`, and read the catalog from the response.
|
|
@@ -1514,18 +1516,21 @@ declare function fetchAllProviderModels(opts: FetchAllProviderModelsOptions): Pr
|
|
|
1514
1516
|
declare function resolveProvider(modelId: string, providerModelLists: Record<string, string[]>): AiProvider | null;
|
|
1515
1517
|
declare function toOrchestratorOptions(providerModels: AllProviderModels, shortcuts: ModelShortcut[]): OrchestratorOption[];
|
|
1516
1518
|
|
|
1519
|
+
/** An LLM vendor reached over HTTP. A closed set: each one has its own registration in `ProviderRegistry`. */
|
|
1520
|
+
type AiProvider = 'google' | 'openrouter' | 'openai_compatible' | 'openai' | 'xai' | 'groq' | 'deepseek' | 'together' | 'mistral' | 'anthropic' | 'fireworks' | 'perplexity' | 'zhipu' | 'kimi' | 'cerebras' | 'deepinfra' | 'doubao' | 'qwen' | 'hunyuan' | 'baichuan' | 'minimax' | 'yi' | 'stepfun' | 'siliconflow' | 'cohere' | 'novita';
|
|
1517
1521
|
/**
|
|
1518
|
-
* Who plans
|
|
1519
|
-
*
|
|
1522
|
+
* Who plans: an API vendor, or the id of a runner serving as a *harness
|
|
1523
|
+
* planner* (ADR-0009) — a coding agent CLI already installed on the machine,
|
|
1520
1524
|
* driven as the planner over its own programmatic transport and authenticated
|
|
1521
|
-
* by the subscription the user already holds.
|
|
1522
|
-
*
|
|
1523
|
-
*
|
|
1524
|
-
*
|
|
1525
|
+
* by the subscription the user already holds. Runners sit in the provider axis
|
|
1526
|
+
* deliberately: "what plans for me?" is one question, and it belongs in one
|
|
1527
|
+
* setting. The runner half is open — any built-in runner with a connector can
|
|
1528
|
+
* plan — so it is checked against the registry, not by the type:
|
|
1529
|
+
* `isApiProvider` narrows to a vendor, `isCliProvider` tells a harness planner.
|
|
1525
1530
|
*/
|
|
1526
|
-
type
|
|
1531
|
+
type PlannerBackendId = AiProvider | RunnerId;
|
|
1527
1532
|
interface IConfig {
|
|
1528
|
-
aiProvider:
|
|
1533
|
+
aiProvider: PlannerBackendId;
|
|
1529
1534
|
apiKey: string;
|
|
1530
1535
|
planningModel: string;
|
|
1531
1536
|
enabledRunners: string[];
|
|
@@ -1833,4 +1838,4 @@ interface IRunner {
|
|
|
1833
1838
|
activeCount: number;
|
|
1834
1839
|
}
|
|
1835
1840
|
|
|
1836
|
-
export { type OwnerOnlyFile as $, AUTO_COMMANDS as A, type IRunnerSession as B, type CatalogModel as C, DEFAULT_PLANNER_ALLOWLIST as D, type EditPlanArgs as E, type FetchAllProviderModelsOptions as F, GIT_READONLY_SUBCOMMANDS as G, type InvokedCommand as H, type IApproval as I, type ListModelsArgs as J, type ListRunnersArgs as K, LineBuffer as L, type LoadSkillArgs as M, type McpClientConfig as N, type McpCredential as O, type McpTool as P, type McpToolContext as Q, type McpToolReply as R, type MessageTaskArgs as S, ModelCatalog as T, type ModelShortcut as U, ORCHESTRATOR_SHORTCUTS as V, ORDEWELL_MCP_PATH as W, ORDEWELL_MCP_SERVER_NAME as X, type OneTaskArgs as Y, type OrchestratorOption as Z, OrdewellMcpServer as _, type AgentAdapter as a,
|
|
1841
|
+
export { type OwnerOnlyFile as $, AUTO_COMMANDS as A, type IRunnerSession as B, type CatalogModel as C, DEFAULT_PLANNER_ALLOWLIST as D, type EditPlanArgs as E, type FetchAllProviderModelsOptions as F, GIT_READONLY_SUBCOMMANDS as G, type InvokedCommand as H, type IApproval as I, type ListModelsArgs as J, type ListRunnersArgs as K, LineBuffer as L, type LoadSkillArgs as M, type McpClientConfig as N, type McpCredential as O, type McpTool as P, type McpToolContext as Q, type McpToolReply as R, type MessageTaskArgs as S, ModelCatalog as T, type ModelShortcut as U, ORCHESTRATOR_SHORTCUTS as V, ORDEWELL_MCP_PATH as W, ORDEWELL_MCP_SERVER_NAME as X, type OneTaskArgs as Y, type OrchestratorOption as Z, OrdewellMcpServer as _, type AgentAdapter as a, researchShellWarning as a$, PLANNER_EXECUTION_TOOLS as a0, PLANNER_TOOLS as a1, type PlannerAllowlist as a2, type PlannerBackendId as a3, type PlannerStartOptions as a4, type PlannerTokenScope as a5, type PlannerToolHandler as a6, type ProjectMcpServer as a7, type ProviderCredentialSource as a8, type ProviderModelLists as a9, type TaskCompleteArgs as aA, type TaskDiffArgs as aB, type TaskMessageFrom as aC, type TaskModeAgentAdapter as aD, TaskModeUnsupportedError as aE, type TaskOutputArgs as aF, type TaskQueryArgs as aG, type TaskRunnerFlags as aH, type TaskStartOptions as aI, type TaskTokenScope as aJ, type TaskToolHandler as aK, approvalScopes as aL, classifyCommand as aM, clearResearchShellCache as aN, collectProviderCredentials as aO, commandAllowedBy as aP, effectiveApprovalMode as aQ, enabledRunners as aR, fetchAllProviderModels as aS, findRunnerCommand as aT, isGranted as aU, isRunnerApproval as aV, knownModelId as aW, mcpClientConfig as aX, ownerOnlyConfigFile as aY, parseAllowlist as aZ, parseApprovalModeSetting as a_, type ProviderModelsResult as aa, type QueuedTaskMessage as ab, REFUSED_COMMANDS as ac, type ResearchShell as ad, type ResearchShellDeps as ae, type RetryTaskArgs as af, type RunCommandArgs as ag, type RunPlanArgs as ah, type RunnerCommand as ai, type RunnerCommandKind as aj, type RunnerEntry as ak, type RunnerFeatures as al, type RunnerManifest as am, type RunnerMcpServer as an, type RunnerMode as ao, type RunnerModelDiscovery as ap, RunnerRegistry as aq, type ShellDialect as ar, type SpawnFn as as, type StandingDecision as at, type StructuredEvent as au, type StructuredTurnEnd as av, type SubmitPlanArgs as aw, TASK_COMPLETE_TOOL as ax, TASK_COMPLETION_CONTRACT as ay, TASK_TOOLS as az, type AgentAdapterFactory as b, researchToolsPath as b0, resolveModelShortcut as b1, resolveProvider as b2, resolveResearchShell as b3, scopeAllowed as b4, sharedMcpServer as b5, toApprovalDecision as b6, toOrchestratorOptions as b7, toolAllowed as b8, type AgentEvent as c, type AgentProcessDeps as d, type AgentStartOptions as e, type AiProvider as f, type AllProviderModels as g, type AnswerApprovalArgs as h, type ApprovalAnswer as i, type ApprovalDecision as j, type ApprovalKind as k, type ApprovalMode as l, type ApprovalModeSetting as m, ApprovalPolicy as n, type ApprovalPolicyOptions as o, type ApprovalRequest as p, type ApprovalSource as q, type CheckpointAnswer as r, type CheckpointArgs as s, type CommandClassification as t, type CommandTier as u, type CommandWords as v, DENY_ALL as w, type DiscoveryCommand as x, type IConfig as y, type IRunner as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChildProcess } from 'child_process';
|
|
2
|
-
import {
|
|
2
|
+
import { aq as UsageRecord, ac as SubagentOutcome, c as DiscoveredModel, a1 as RunnerId, al as TaskSkillSnapshot } from './Task-AfA1m4qW.js';
|
|
3
3
|
import { z } from 'zod/v4';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -588,24 +588,24 @@ declare const taskOutputInput: z.ZodObject<{
|
|
|
588
588
|
error: "error";
|
|
589
589
|
command: "command";
|
|
590
590
|
thinking: "thinking";
|
|
591
|
-
task_skills: "task_skills";
|
|
592
|
-
turn_start: "turn_start";
|
|
593
|
-
command_output: "command_output";
|
|
594
|
-
compaction: "compaction";
|
|
595
|
-
runner_loaded: "runner_loaded";
|
|
596
591
|
turn_end: "turn_end";
|
|
597
|
-
|
|
592
|
+
message_delivered: "message_delivered";
|
|
598
593
|
thinking_delta: "thinking_delta";
|
|
599
594
|
tool_call: "tool_call";
|
|
600
595
|
tool_result: "tool_result";
|
|
596
|
+
usage: "usage";
|
|
601
597
|
subagent_started: "subagent_started";
|
|
602
598
|
subagent_finished: "subagent_finished";
|
|
603
|
-
|
|
599
|
+
runner_loaded: "runner_loaded";
|
|
600
|
+
compaction: "compaction";
|
|
601
|
+
command_output: "command_output";
|
|
602
|
+
turn_start: "turn_start";
|
|
604
603
|
message_queued: "message_queued";
|
|
605
604
|
message_removed: "message_removed";
|
|
606
605
|
message_undelivered: "message_undelivered";
|
|
607
606
|
message_handed_over: "message_handed_over";
|
|
608
|
-
|
|
607
|
+
task_skills: "task_skills";
|
|
608
|
+
text_delta: "text_delta";
|
|
609
609
|
approval_requested: "approval_requested";
|
|
610
610
|
approval_decided: "approval_decided";
|
|
611
611
|
approval_withdrawn: "approval_withdrawn";
|
|
@@ -1314,7 +1314,10 @@ interface RunnerFeatures {
|
|
|
1314
1314
|
permissionModeValues?: Record<string, string>;
|
|
1315
1315
|
modeSettings?: Record<string, Record<string, string>>;
|
|
1316
1316
|
}
|
|
1317
|
-
|
|
1317
|
+
/** A runner's own reader for its catalog's output, kept beside its manifest. */
|
|
1318
|
+
type ModelOutputParser = (output: string, manifest: RunnerManifest) => DiscoveredModel[];
|
|
1319
|
+
/** How discovery output becomes models: one `id label` per line, or the runner's own reader. Absent means per line. */
|
|
1320
|
+
type ModelDiscoveryParser = 'line-by-line' | ModelOutputParser;
|
|
1318
1321
|
interface DiscoveryCommand {
|
|
1319
1322
|
command: string;
|
|
1320
1323
|
args: string[];
|
|
@@ -1343,7 +1346,6 @@ interface RunnerModelDiscovery {
|
|
|
1343
1346
|
command?: string;
|
|
1344
1347
|
args?: string[];
|
|
1345
1348
|
parser?: ModelDiscoveryParser;
|
|
1346
|
-
jsonPath?: string;
|
|
1347
1349
|
/**
|
|
1348
1350
|
* Stdio JSON-RPC discovery (Codex `app-server`): spawn the command, send
|
|
1349
1351
|
* `initialize` then `model/list`, and read the catalog from the response.
|
|
@@ -1514,18 +1516,21 @@ declare function fetchAllProviderModels(opts: FetchAllProviderModelsOptions): Pr
|
|
|
1514
1516
|
declare function resolveProvider(modelId: string, providerModelLists: Record<string, string[]>): AiProvider | null;
|
|
1515
1517
|
declare function toOrchestratorOptions(providerModels: AllProviderModels, shortcuts: ModelShortcut[]): OrchestratorOption[];
|
|
1516
1518
|
|
|
1519
|
+
/** An LLM vendor reached over HTTP. A closed set: each one has its own registration in `ProviderRegistry`. */
|
|
1520
|
+
type AiProvider = 'google' | 'openrouter' | 'openai_compatible' | 'openai' | 'xai' | 'groq' | 'deepseek' | 'together' | 'mistral' | 'anthropic' | 'fireworks' | 'perplexity' | 'zhipu' | 'kimi' | 'cerebras' | 'deepinfra' | 'doubao' | 'qwen' | 'hunyuan' | 'baichuan' | 'minimax' | 'yi' | 'stepfun' | 'siliconflow' | 'cohere' | 'novita';
|
|
1517
1521
|
/**
|
|
1518
|
-
* Who plans
|
|
1519
|
-
*
|
|
1522
|
+
* Who plans: an API vendor, or the id of a runner serving as a *harness
|
|
1523
|
+
* planner* (ADR-0009) — a coding agent CLI already installed on the machine,
|
|
1520
1524
|
* driven as the planner over its own programmatic transport and authenticated
|
|
1521
|
-
* by the subscription the user already holds.
|
|
1522
|
-
*
|
|
1523
|
-
*
|
|
1524
|
-
*
|
|
1525
|
+
* by the subscription the user already holds. Runners sit in the provider axis
|
|
1526
|
+
* deliberately: "what plans for me?" is one question, and it belongs in one
|
|
1527
|
+
* setting. The runner half is open — any built-in runner with a connector can
|
|
1528
|
+
* plan — so it is checked against the registry, not by the type:
|
|
1529
|
+
* `isApiProvider` narrows to a vendor, `isCliProvider` tells a harness planner.
|
|
1525
1530
|
*/
|
|
1526
|
-
type
|
|
1531
|
+
type PlannerBackendId = AiProvider | RunnerId;
|
|
1527
1532
|
interface IConfig {
|
|
1528
|
-
aiProvider:
|
|
1533
|
+
aiProvider: PlannerBackendId;
|
|
1529
1534
|
apiKey: string;
|
|
1530
1535
|
planningModel: string;
|
|
1531
1536
|
enabledRunners: string[];
|
|
@@ -1833,4 +1838,4 @@ interface IRunner {
|
|
|
1833
1838
|
activeCount: number;
|
|
1834
1839
|
}
|
|
1835
1840
|
|
|
1836
|
-
export { type OwnerOnlyFile as $, AUTO_COMMANDS as A, type IRunnerSession as B, type CatalogModel as C, DEFAULT_PLANNER_ALLOWLIST as D, type EditPlanArgs as E, type FetchAllProviderModelsOptions as F, GIT_READONLY_SUBCOMMANDS as G, type InvokedCommand as H, type IApproval as I, type ListModelsArgs as J, type ListRunnersArgs as K, LineBuffer as L, type LoadSkillArgs as M, type McpClientConfig as N, type McpCredential as O, type McpTool as P, type McpToolContext as Q, type McpToolReply as R, type MessageTaskArgs as S, ModelCatalog as T, type ModelShortcut as U, ORCHESTRATOR_SHORTCUTS as V, ORDEWELL_MCP_PATH as W, ORDEWELL_MCP_SERVER_NAME as X, type OneTaskArgs as Y, type OrchestratorOption as Z, OrdewellMcpServer as _, type AgentAdapter as a,
|
|
1841
|
+
export { type OwnerOnlyFile as $, AUTO_COMMANDS as A, type IRunnerSession as B, type CatalogModel as C, DEFAULT_PLANNER_ALLOWLIST as D, type EditPlanArgs as E, type FetchAllProviderModelsOptions as F, GIT_READONLY_SUBCOMMANDS as G, type InvokedCommand as H, type IApproval as I, type ListModelsArgs as J, type ListRunnersArgs as K, LineBuffer as L, type LoadSkillArgs as M, type McpClientConfig as N, type McpCredential as O, type McpTool as P, type McpToolContext as Q, type McpToolReply as R, type MessageTaskArgs as S, ModelCatalog as T, type ModelShortcut as U, ORCHESTRATOR_SHORTCUTS as V, ORDEWELL_MCP_PATH as W, ORDEWELL_MCP_SERVER_NAME as X, type OneTaskArgs as Y, type OrchestratorOption as Z, OrdewellMcpServer as _, type AgentAdapter as a, researchShellWarning as a$, PLANNER_EXECUTION_TOOLS as a0, PLANNER_TOOLS as a1, type PlannerAllowlist as a2, type PlannerBackendId as a3, type PlannerStartOptions as a4, type PlannerTokenScope as a5, type PlannerToolHandler as a6, type ProjectMcpServer as a7, type ProviderCredentialSource as a8, type ProviderModelLists as a9, type TaskCompleteArgs as aA, type TaskDiffArgs as aB, type TaskMessageFrom as aC, type TaskModeAgentAdapter as aD, TaskModeUnsupportedError as aE, type TaskOutputArgs as aF, type TaskQueryArgs as aG, type TaskRunnerFlags as aH, type TaskStartOptions as aI, type TaskTokenScope as aJ, type TaskToolHandler as aK, approvalScopes as aL, classifyCommand as aM, clearResearchShellCache as aN, collectProviderCredentials as aO, commandAllowedBy as aP, effectiveApprovalMode as aQ, enabledRunners as aR, fetchAllProviderModels as aS, findRunnerCommand as aT, isGranted as aU, isRunnerApproval as aV, knownModelId as aW, mcpClientConfig as aX, ownerOnlyConfigFile as aY, parseAllowlist as aZ, parseApprovalModeSetting as a_, type ProviderModelsResult as aa, type QueuedTaskMessage as ab, REFUSED_COMMANDS as ac, type ResearchShell as ad, type ResearchShellDeps as ae, type RetryTaskArgs as af, type RunCommandArgs as ag, type RunPlanArgs as ah, type RunnerCommand as ai, type RunnerCommandKind as aj, type RunnerEntry as ak, type RunnerFeatures as al, type RunnerManifest as am, type RunnerMcpServer as an, type RunnerMode as ao, type RunnerModelDiscovery as ap, RunnerRegistry as aq, type ShellDialect as ar, type SpawnFn as as, type StandingDecision as at, type StructuredEvent as au, type StructuredTurnEnd as av, type SubmitPlanArgs as aw, TASK_COMPLETE_TOOL as ax, TASK_COMPLETION_CONTRACT as ay, TASK_TOOLS as az, type AgentAdapterFactory as b, researchToolsPath as b0, resolveModelShortcut as b1, resolveProvider as b2, resolveResearchShell as b3, scopeAllowed as b4, sharedMcpServer as b5, toApprovalDecision as b6, toOrchestratorOptions as b7, toolAllowed as b8, type AgentEvent as c, type AgentProcessDeps as d, type AgentStartOptions as e, type AiProvider as f, type AllProviderModels as g, type AnswerApprovalArgs as h, type ApprovalAnswer as i, type ApprovalDecision as j, type ApprovalKind as k, type ApprovalMode as l, type ApprovalModeSetting as m, ApprovalPolicy as n, type ApprovalPolicyOptions as o, type ApprovalRequest as p, type ApprovalSource as q, type CheckpointAnswer as r, type CheckpointArgs as s, type CommandClassification as t, type CommandTier as u, type CommandWords as v, DENY_ALL as w, type DiscoveryCommand as x, type IConfig as y, type IRunner as z };
|
|
@@ -330,8 +330,26 @@ interface PreparedTask {
|
|
|
330
330
|
setupFailed?: SetupFailure[];
|
|
331
331
|
/** What the attempt this one replaces left unlanded, kept on a branch before its worktree went; absent when nothing was. */
|
|
332
332
|
preserved?: PreservedWork[];
|
|
333
|
-
|
|
333
|
+
/** Set for a `restore` prepare: whether the previous attempt's work was put back, or every repo fell back to its tip. */
|
|
334
|
+
restoration?: 'restored' | 'fallback';
|
|
334
335
|
}
|
|
336
|
+
/**
|
|
337
|
+
* How a task workspace starts: `fresh` from the integration tips, `restore`
|
|
338
|
+
* with the previous attempt's preserved work merged on top of them — for a
|
|
339
|
+
* continue (ADR-0018, K1) and for a carry-over to another runner.
|
|
340
|
+
*/
|
|
341
|
+
type PrepareIntent = 'fresh' | 'restore';
|
|
342
|
+
/**
|
|
343
|
+
* What a restoring attempt is told became of the previous attempt's work: in
|
|
344
|
+
* its working tree, or kept on `preserved` branches because restoring it
|
|
345
|
+
* conflicted with the integration tips.
|
|
346
|
+
*/
|
|
347
|
+
type PreviousWork = {
|
|
348
|
+
outcome: 'restored';
|
|
349
|
+
} | {
|
|
350
|
+
outcome: 'fallback';
|
|
351
|
+
preserved: readonly PreservedWork[];
|
|
352
|
+
};
|
|
335
353
|
/** A task as a removal names it. */
|
|
336
354
|
type IsolationTaskRef = Pick<IsolationTaskRecord, 'taskId' | 'order' | 'title'>;
|
|
337
355
|
/**
|
|
@@ -400,11 +418,11 @@ interface IWorktreeIsolation {
|
|
|
400
418
|
/**
|
|
401
419
|
* Create the task workspace — one worktree per isolated repo from its
|
|
402
420
|
* integration tip, the shared paths linked in — and return the cwd to spawn
|
|
403
|
-
* the Runner into. Fresh attempts start clean from the tips. A
|
|
404
|
-
*
|
|
405
|
-
*
|
|
421
|
+
* the Runner into. Fresh attempts start clean from the tips. A `restore`
|
|
422
|
+
* puts the previous attempt's preserved work on top of them, falling back
|
|
423
|
+
* to the tips in every repo when any restoration conflicts (ADR-0018).
|
|
406
424
|
*/
|
|
407
|
-
prepare(task: Task, run: IsolationRun, intent?:
|
|
425
|
+
prepare(task: Task, run: IsolationRun, intent?: PrepareIntent): Promise<PreparedTask>;
|
|
408
426
|
/**
|
|
409
427
|
* Hand a conflicted task's kept workspace to a conflict repair (ADR-0015)
|
|
410
428
|
* as it is — nothing is re-cut — and return the same cwd. Records each
|
|
@@ -983,6 +1001,12 @@ interface Task {
|
|
|
983
1001
|
* waits for a manual retry. Set only with `awaitingReason` `usage-limit`.
|
|
984
1002
|
*/
|
|
985
1003
|
resumeAt?: string;
|
|
1004
|
+
/**
|
|
1005
|
+
* The runner a task paused on its usage limit was moved off (ADR-0018, U1):
|
|
1006
|
+
* its next attempt is a carry-over, a fresh session that starts from that
|
|
1007
|
+
* attempt's files. Cleared once that attempt runs, and by a retry.
|
|
1008
|
+
*/
|
|
1009
|
+
carriedFrom?: RunnerId;
|
|
986
1010
|
/** Why the task was skipped, as whoever skipped it put it; set only while `status` is `skipped`, and not always then. */
|
|
987
1011
|
skipReason?: string;
|
|
988
1012
|
/**
|
|
@@ -1308,7 +1332,11 @@ type PlanState = {
|
|
|
1308
1332
|
declare function migratePlanState(raw: unknown): PlanState;
|
|
1309
1333
|
|
|
1310
1334
|
declare function createTask(overrides?: Partial<Task>): Task;
|
|
1311
|
-
/**
|
|
1335
|
+
/**
|
|
1336
|
+
* The runner set a plan has until one is chosen. The one runner named outside
|
|
1337
|
+
* its declaration on purpose: a default is a product choice that no manifest
|
|
1338
|
+
* or connector implies.
|
|
1339
|
+
*/
|
|
1312
1340
|
declare const DEFAULT_RUNNERS: readonly RunnerId[];
|
|
1313
1341
|
declare function createEmptyPlan(): LegacyPlanState;
|
|
1314
1342
|
declare function flattenTasks(tasks: readonly Task[]): Task[];
|
|
@@ -1338,4 +1366,4 @@ declare function flattenTasksWithParents(tasks: readonly Task[]): TaskWithParent
|
|
|
1338
1366
|
/** A task paused on its runner's usage limit, whether it resumes on its own or waits for the user (#84). */
|
|
1339
1367
|
declare function pausedOnLimit(task: Readonly<Task>): boolean;
|
|
1340
1368
|
|
|
1341
|
-
export { type
|
|
1369
|
+
export { type ResearchToolType as $, type AttemptUsage as A, BUILTIN_SKILL_NAMES as B, type ConversationMessage as C, DEFAULT_RUNNERS as D, type ExecutionActor as E, type IsolationView as F, type GuardTarget as G, type PlanIsolation as H, type IWorktreeIsolation as I, type PlanState as J, type PlanStatus as K, type LegacyPlanState as L, type ModelUsage as M, type PlanUsage as N, type PlannerUsage as O, type PendingPlanTurn as P, type PrepareIntent as Q, type PreparedTask as R, type PreservedWork as S, type PreviousWork as T, type RefusedRemoval as U, type RepairEvidence as V, type RepoGroupLayout as W, type ResearchLogEntry as X, type ResearchProgress as Y, type ResearchStep as Z, type ResearchStepOutcome as _, type AwaitingReason as a, type RunSettings as a0, type RunnerId as a1, type SetupFailure as a2, type ShadowedSkill as a3, type SkillAppliesTo as a4, type SkillCatalog as a5, type SkillInfo as a6, type SkillLoad as a7, type SkillLoadNotice as a8, type SkillMetadata as a9, createSkillsService as aA, createTask as aB, endAttemptUsage as aC, flattenTasks as aD, flattenTasksWithParents as aE, isAwaitingReason as aF, isMeasured as aG, isSupervisorLevel as aH, isUserMessage as aI, migratePlanState as aJ, partedPromptUsage as aK, pausedOnLimit as aL, planUsage as aM, plannerContextFill as aN, rejoinPlanTree as aO, startAttemptUsage as aP, usageLine as aQ, type SkillSource as aa, SkillsService as ab, type SubagentOutcome as ac, type SupervisorLevel as ad, type Task as ae, type TaskDiffRead as af, type TaskDiffResult as ag, type TaskIsolation as ah, type TaskIsolationState as ai, type TaskModelAssignment as aj, type TaskSkillNotice as ak, type TaskSkillSnapshot as al, type TaskSnapshot as am, type TaskStatus as an, type TreeSnapshot as ao, type UsageLine as ap, type UsageRecord as aq, type UsageTotals as ar, type Verdict as as, type VerificationCheck as at, addAttemptUsage as au, addModelUsage as av, addPlannerUsage as aw, addUsage as ax, addUsageTotals as ay, createEmptyPlan as az, DEFAULT_SUPERVISOR_RETRY_LIMIT as b, type DiscoveredModel as c, type ExecutionCommandName as d, type ExecutionRecord as e, type GuardTrip as f, type IntegrationDisposal as g, type InvalidSkill as h, type IsolationAvailability as i, type IsolationHandoff as j, type IsolationHandoffRepo as k, type IsolationInactiveReason as l, type IsolationLandedTask as m, type IsolationLanding as n, type IsolationMergeBlock as o, type IsolationMergeBlockReason as p, type IsolationMergeResult as q, type IsolationOutcome as r, type IsolationPruneResult as s, type IsolationRemoval as t, type IsolationRepo as u, type IsolationRun as v, type IsolationTaskRecord as w, type IsolationTaskRef as x, type IsolationTaskRepo as y, type IsolationTaskStatus as z };
|
|
@@ -330,8 +330,26 @@ interface PreparedTask {
|
|
|
330
330
|
setupFailed?: SetupFailure[];
|
|
331
331
|
/** What the attempt this one replaces left unlanded, kept on a branch before its worktree went; absent when nothing was. */
|
|
332
332
|
preserved?: PreservedWork[];
|
|
333
|
-
|
|
333
|
+
/** Set for a `restore` prepare: whether the previous attempt's work was put back, or every repo fell back to its tip. */
|
|
334
|
+
restoration?: 'restored' | 'fallback';
|
|
334
335
|
}
|
|
336
|
+
/**
|
|
337
|
+
* How a task workspace starts: `fresh` from the integration tips, `restore`
|
|
338
|
+
* with the previous attempt's preserved work merged on top of them — for a
|
|
339
|
+
* continue (ADR-0018, K1) and for a carry-over to another runner.
|
|
340
|
+
*/
|
|
341
|
+
type PrepareIntent = 'fresh' | 'restore';
|
|
342
|
+
/**
|
|
343
|
+
* What a restoring attempt is told became of the previous attempt's work: in
|
|
344
|
+
* its working tree, or kept on `preserved` branches because restoring it
|
|
345
|
+
* conflicted with the integration tips.
|
|
346
|
+
*/
|
|
347
|
+
type PreviousWork = {
|
|
348
|
+
outcome: 'restored';
|
|
349
|
+
} | {
|
|
350
|
+
outcome: 'fallback';
|
|
351
|
+
preserved: readonly PreservedWork[];
|
|
352
|
+
};
|
|
335
353
|
/** A task as a removal names it. */
|
|
336
354
|
type IsolationTaskRef = Pick<IsolationTaskRecord, 'taskId' | 'order' | 'title'>;
|
|
337
355
|
/**
|
|
@@ -400,11 +418,11 @@ interface IWorktreeIsolation {
|
|
|
400
418
|
/**
|
|
401
419
|
* Create the task workspace — one worktree per isolated repo from its
|
|
402
420
|
* integration tip, the shared paths linked in — and return the cwd to spawn
|
|
403
|
-
* the Runner into. Fresh attempts start clean from the tips. A
|
|
404
|
-
*
|
|
405
|
-
*
|
|
421
|
+
* the Runner into. Fresh attempts start clean from the tips. A `restore`
|
|
422
|
+
* puts the previous attempt's preserved work on top of them, falling back
|
|
423
|
+
* to the tips in every repo when any restoration conflicts (ADR-0018).
|
|
406
424
|
*/
|
|
407
|
-
prepare(task: Task, run: IsolationRun, intent?:
|
|
425
|
+
prepare(task: Task, run: IsolationRun, intent?: PrepareIntent): Promise<PreparedTask>;
|
|
408
426
|
/**
|
|
409
427
|
* Hand a conflicted task's kept workspace to a conflict repair (ADR-0015)
|
|
410
428
|
* as it is — nothing is re-cut — and return the same cwd. Records each
|
|
@@ -983,6 +1001,12 @@ interface Task {
|
|
|
983
1001
|
* waits for a manual retry. Set only with `awaitingReason` `usage-limit`.
|
|
984
1002
|
*/
|
|
985
1003
|
resumeAt?: string;
|
|
1004
|
+
/**
|
|
1005
|
+
* The runner a task paused on its usage limit was moved off (ADR-0018, U1):
|
|
1006
|
+
* its next attempt is a carry-over, a fresh session that starts from that
|
|
1007
|
+
* attempt's files. Cleared once that attempt runs, and by a retry.
|
|
1008
|
+
*/
|
|
1009
|
+
carriedFrom?: RunnerId;
|
|
986
1010
|
/** Why the task was skipped, as whoever skipped it put it; set only while `status` is `skipped`, and not always then. */
|
|
987
1011
|
skipReason?: string;
|
|
988
1012
|
/**
|
|
@@ -1308,7 +1332,11 @@ type PlanState = {
|
|
|
1308
1332
|
declare function migratePlanState(raw: unknown): PlanState;
|
|
1309
1333
|
|
|
1310
1334
|
declare function createTask(overrides?: Partial<Task>): Task;
|
|
1311
|
-
/**
|
|
1335
|
+
/**
|
|
1336
|
+
* The runner set a plan has until one is chosen. The one runner named outside
|
|
1337
|
+
* its declaration on purpose: a default is a product choice that no manifest
|
|
1338
|
+
* or connector implies.
|
|
1339
|
+
*/
|
|
1312
1340
|
declare const DEFAULT_RUNNERS: readonly RunnerId[];
|
|
1313
1341
|
declare function createEmptyPlan(): LegacyPlanState;
|
|
1314
1342
|
declare function flattenTasks(tasks: readonly Task[]): Task[];
|
|
@@ -1338,4 +1366,4 @@ declare function flattenTasksWithParents(tasks: readonly Task[]): TaskWithParent
|
|
|
1338
1366
|
/** A task paused on its runner's usage limit, whether it resumes on its own or waits for the user (#84). */
|
|
1339
1367
|
declare function pausedOnLimit(task: Readonly<Task>): boolean;
|
|
1340
1368
|
|
|
1341
|
-
export { type
|
|
1369
|
+
export { type ResearchToolType as $, type AttemptUsage as A, BUILTIN_SKILL_NAMES as B, type ConversationMessage as C, DEFAULT_RUNNERS as D, type ExecutionActor as E, type IsolationView as F, type GuardTarget as G, type PlanIsolation as H, type IWorktreeIsolation as I, type PlanState as J, type PlanStatus as K, type LegacyPlanState as L, type ModelUsage as M, type PlanUsage as N, type PlannerUsage as O, type PendingPlanTurn as P, type PrepareIntent as Q, type PreparedTask as R, type PreservedWork as S, type PreviousWork as T, type RefusedRemoval as U, type RepairEvidence as V, type RepoGroupLayout as W, type ResearchLogEntry as X, type ResearchProgress as Y, type ResearchStep as Z, type ResearchStepOutcome as _, type AwaitingReason as a, type RunSettings as a0, type RunnerId as a1, type SetupFailure as a2, type ShadowedSkill as a3, type SkillAppliesTo as a4, type SkillCatalog as a5, type SkillInfo as a6, type SkillLoad as a7, type SkillLoadNotice as a8, type SkillMetadata as a9, createSkillsService as aA, createTask as aB, endAttemptUsage as aC, flattenTasks as aD, flattenTasksWithParents as aE, isAwaitingReason as aF, isMeasured as aG, isSupervisorLevel as aH, isUserMessage as aI, migratePlanState as aJ, partedPromptUsage as aK, pausedOnLimit as aL, planUsage as aM, plannerContextFill as aN, rejoinPlanTree as aO, startAttemptUsage as aP, usageLine as aQ, type SkillSource as aa, SkillsService as ab, type SubagentOutcome as ac, type SupervisorLevel as ad, type Task as ae, type TaskDiffRead as af, type TaskDiffResult as ag, type TaskIsolation as ah, type TaskIsolationState as ai, type TaskModelAssignment as aj, type TaskSkillNotice as ak, type TaskSkillSnapshot as al, type TaskSnapshot as am, type TaskStatus as an, type TreeSnapshot as ao, type UsageLine as ap, type UsageRecord as aq, type UsageTotals as ar, type Verdict as as, type VerificationCheck as at, addAttemptUsage as au, addModelUsage as av, addPlannerUsage as aw, addUsage as ax, addUsageTotals as ay, createEmptyPlan as az, DEFAULT_SUPERVISOR_RETRY_LIMIT as b, type DiscoveredModel as c, type ExecutionCommandName as d, type ExecutionRecord as e, type GuardTrip as f, type IntegrationDisposal as g, type InvalidSkill as h, type IsolationAvailability as i, type IsolationHandoff as j, type IsolationHandoffRepo as k, type IsolationInactiveReason as l, type IsolationLandedTask as m, type IsolationLanding as n, type IsolationMergeBlock as o, type IsolationMergeBlockReason as p, type IsolationMergeResult as q, type IsolationOutcome as r, type IsolationPruneResult as s, type IsolationRemoval as t, type IsolationRepo as u, type IsolationRun as v, type IsolationTaskRecord as w, type IsolationTaskRef as x, type IsolationTaskRepo as y, type IsolationTaskStatus as z };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
DEFAULT_RUNNERS,
|
|
2
3
|
addTaskToPlan,
|
|
3
4
|
createTask,
|
|
4
5
|
flattenTasks,
|
|
@@ -11,7 +12,7 @@ import {
|
|
|
11
12
|
resolveTaskRef,
|
|
12
13
|
skillNames,
|
|
13
14
|
updateTaskInPlan
|
|
14
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-CIL3BQIF.mjs";
|
|
15
16
|
|
|
16
17
|
// src/services/JsonExtractor.ts
|
|
17
18
|
var PLAN_ENVELOPE_KEY = "tasks";
|
|
@@ -469,7 +470,7 @@ function plannedTask(spec, catalog, at = {}) {
|
|
|
469
470
|
if (freshIds && plannerId) renamed.set(plannerId, id);
|
|
470
471
|
const type = raw.type === "user" || raw.type === "ai" ? raw.type : base.type ?? "ai";
|
|
471
472
|
const ai = type === "ai";
|
|
472
|
-
const assignedRunner = text(raw.assignedRunner) ?? base.assignedRunner ?? catalog.runners[0] ??
|
|
473
|
+
const assignedRunner = text(raw.assignedRunner) ?? base.assignedRunner ?? catalog.runners[0] ?? DEFAULT_RUNNERS[0];
|
|
473
474
|
const description = text(raw.description) ?? base.description ?? title;
|
|
474
475
|
if (raw.ops === true && !ai) errors.push({ taskId: id, field: "ops", message: `${where} ${opsPlacementRefusal(type, !!parent)}` });
|
|
475
476
|
if (raw.taskMode !== void 0) ignored.push({ taskId: id, field: "taskMode", message: `${where}: ${MODE_NOT_THE_PLANNERS}` });
|
|
@@ -1316,10 +1317,6 @@ export {
|
|
|
1316
1317
|
extractJsonObject,
|
|
1317
1318
|
stripTrailingCommas,
|
|
1318
1319
|
escapeControlCharsInStrings,
|
|
1319
|
-
effectiveAllowlist,
|
|
1320
|
-
filterModelsForPrompt,
|
|
1321
|
-
clampThinkingEffort,
|
|
1322
|
-
coerceAssignments,
|
|
1323
1320
|
runnerModesFrom,
|
|
1324
1321
|
resolveDefaultMode,
|
|
1325
1322
|
autonomyLevelLabel,
|
|
@@ -1330,6 +1327,10 @@ export {
|
|
|
1330
1327
|
unavailableTaskModeMessage,
|
|
1331
1328
|
carryPlannedModes,
|
|
1332
1329
|
readOnlyRunners,
|
|
1330
|
+
effectiveAllowlist,
|
|
1331
|
+
filterModelsForPrompt,
|
|
1332
|
+
clampThinkingEffort,
|
|
1333
|
+
coerceAssignments,
|
|
1333
1334
|
isTaskRunning,
|
|
1334
1335
|
NOT_STARTED,
|
|
1335
1336
|
taskStatusKind,
|
|
@@ -1355,4 +1356,4 @@ export {
|
|
|
1355
1356
|
canSplitTask,
|
|
1356
1357
|
applyTaskOps
|
|
1357
1358
|
};
|
|
1358
|
-
//# sourceMappingURL=chunk-
|
|
1359
|
+
//# sourceMappingURL=chunk-3LNZDBCX.mjs.map
|