@ordewell/core 0.11.1 → 0.11.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/AUTHORS.md CHANGED
@@ -27,6 +27,10 @@ record of who built what, rather than `git log`.
27
27
  - [@haltingstate](https://github.com/haltingstate) — made the terminal UI's
28
28
  stepper say what a saved step does next, instead of encoding it in a
29
29
  sentinel index (#123).
30
+ - [@Logic769](https://github.com/Logic769) — made `/resume` an alias of
31
+ `/sessions` in the planner chat (#139).
32
+ - Hanbin Tan ([@hskl18](https://github.com/hskl18)) — documented how
33
+ planners and runners get their models and credentials (#140).
30
34
 
31
35
  Thank you. Contributions are welcome — see [CONTRIBUTING.md](CONTRIBUTING.md).
32
36
 
@@ -261,13 +261,10 @@ declare const AUTO_COMMANDS: string[];
261
261
  * read-only against the repository. It reaches the network: it contacts
262
262
  * whatever host the named remote or URL resolves to, which routes around the
263
263
  * web fetcher's per-origin approval and its request-forgery guard. So it
264
- * prompts rather than running silently.
265
- *
266
- * Prompting only became the right answer once {@link scopeFor} widened. Under
267
- * the old scope it would have been remembered as `git ls-remote`, so one
268
- * approval of the workspace's own remote would have authorised a listing
269
- * against any host at all — which is the same hole with an approval dialog in
270
- * front of it. The scope now carries the destination.
264
+ * prompts rather than running silently, and only for a remote the repository
265
+ * configures: a destination the line spells out is refused
266
+ * ({@link namesConfiguredRemote}), and the grant is the whole line
267
+ * ({@link gitScope}), so no approval of one remote covers another.
271
268
  */
272
269
  declare const GIT_READONLY_SUBCOMMANDS: string[];
273
270
  /**
@@ -314,7 +311,8 @@ interface CommandClassification {
314
311
  /** Separate grants for commands that name several origins. */
315
312
  scopes?: string[];
316
313
  webUrls?: URL[];
317
- webOutboundTexts?: string[];
314
+ /** What a network-reaching command sends, for the outbound secret check (ADR-0027): a web command's URLs and values, a remote listing's remote and patterns. */
315
+ outboundTexts?: string[];
318
316
  /** What a grant covers, for `ask`. Derived from the non-auto segments only. */
319
317
  scope: string;
320
318
  /** Populated for `refuse`: why, in a sentence the model can act on. */
@@ -2345,18 +2343,34 @@ interface DiscoveryCommand {
2345
2343
  args: string[];
2346
2344
  parser?: ModelDiscoveryParser;
2347
2345
  }
2346
+ /**
2347
+ * The environment a runner is launched with: the daemon's own, under the
2348
+ * workspace's (ADR-0016). A runner's files can move with it, as Claude Code's
2349
+ * do under `CLAUDE_CONFIG_DIR`.
2350
+ */
2351
+ type RunnerEnv = Readonly<Record<string, string | undefined>>;
2348
2352
  type ApiAuthMethod = {
2349
2353
  type: 'env';
2350
2354
  varName: string;
2351
2355
  header: string;
2352
2356
  prefix?: string;
2353
- } | {
2357
+ }
2358
+ /** `path` is `~` expanded; a function of the runner's environment when that relocates the file. */
2359
+ | {
2354
2360
  type: 'file';
2355
- path: string;
2361
+ path: string | ((env: RunnerEnv) => string);
2356
2362
  jsonPath: string;
2357
2363
  header: string;
2358
2364
  prefix?: string;
2359
2365
  };
2366
+ /** What a runner's settings reader may look at, with `~` expanded in every path. */
2367
+ interface RunnerSettingsFiles {
2368
+ /** The file's content, or null when it is missing or unreadable. A leading `~` is the home `env` gives the runner. */
2369
+ read(file: string): string | null;
2370
+ /** The names of the entries in `dir`, or none when it is missing. A leading `~` is read as in {@link read}. */
2371
+ list(dir: string): string[];
2372
+ env: RunnerEnv;
2373
+ }
2360
2374
  interface ApiDiscoveryConfig {
2361
2375
  url: string;
2362
2376
  headers?: Record<string, string>;
@@ -2372,13 +2386,14 @@ interface RunnerModelDiscovery {
2372
2386
  * Stdio JSON-RPC discovery (Codex `app-server`): spawn the command, send
2373
2387
  * `initialize` then `model/list`, and read the catalog from the response.
2374
2388
  * Tried BEFORE apiDiscovery and command discovery. When the call fails,
2375
- * `cacheFile` (the runner's own on-disk catalog cache, `~` expanded) is
2376
- * read before falling through to the remaining discovery methods.
2389
+ * `cacheFile` (the runner's own on-disk catalog cache, `~` expanded, or
2390
+ * found from the runner's environment) is read before falling through to
2391
+ * the remaining discovery methods.
2377
2392
  */
2378
2393
  appServer?: {
2379
2394
  command: string;
2380
2395
  args: string[];
2381
- cacheFile?: string;
2396
+ cacheFile?: string | ((env: RunnerEnv) => string);
2382
2397
  };
2383
2398
  /**
2384
2399
  * Optional last-resort list for a CLI that cannot enumerate
@@ -2416,6 +2431,14 @@ interface RunnerModelDiscovery {
2416
2431
  * fails, discovery falls through to `discoveryCommands` + `canonicalAliases`.
2417
2432
  */
2418
2433
  apiDiscovery?: ApiDiscoveryConfig;
2434
+ /**
2435
+ * Models registered in the runner's own settings, such as gateway IDs no
2436
+ * catalog lists, read as the runner itself resolves its settings files.
2437
+ * Appended to whatever the other methods produced, success or fallback: an
2438
+ * ID they already offer keeps their entry. Missing or unreadable files add
2439
+ * nothing.
2440
+ */
2441
+ settingsModels?: (files: RunnerSettingsFiles) => DiscoveredModel[];
2419
2442
  preferredPatterns?: {
2420
2443
  id: string;
2421
2444
  label: string;
@@ -2785,6 +2808,19 @@ interface IRunner {
2785
2808
  skills?: readonly TaskSkillSnapshot[];
2786
2809
  /** Something the user should know about how the spawn went that did not stop it — a respawn, most often. */
2787
2810
  onNotice?: (message: string) => void;
2811
+ /**
2812
+ * The runner is being started and has not yet reported Ordewell's tools
2813
+ * connected (ADR-0025): on its first spawn, then on its one respawn.
2814
+ * Nothing has been sent to it, and the spawn resolves only once they
2815
+ * connect or the wait ends.
2816
+ */
2817
+ onAttaching?: (spawn: 1 | 2) => void;
2818
+ /**
2819
+ * Aborted once nobody wants the runner any more: a spawn still in flight
2820
+ * is taken back at once instead of finishing its start for nobody. Once
2821
+ * the spawn has resolved, the session's own stop is what ends it.
2822
+ */
2823
+ cancelled?: AbortSignal;
2788
2824
  /** The attempt's work lands as a commit (ADR-0047): its runner is told to write the message in `task_complete`. */
2789
2825
  commits?: true;
2790
2826
  /** A script task's body (ADR-0035): only the script runner reads it, and it runs nothing else. */
@@ -2832,4 +2868,4 @@ interface IRunner {
2832
2868
  activeCount: number;
2833
2869
  }
2834
2870
 
2835
- export { type McpToolContext as $, AUTO_COMMANDS as A, type BashOptions as B, type CatalogModel as C, DEFAULT_PLANNER_ALLOWLIST as D, type DiscoveryCommand as E, type EditPlanArgs as F, type FetchAllProviderModelsOptions as G, type FindSymbolOptions as H, GIT_READONLY_SUBCOMMANDS as I, GREP_DEFAULT_HEAD_LIMIT as J, type GlobOptions as K, type GrepOptions as L, type GrepOutputMode as M, type IApproval as N, type IConfig as O, type IFileSystem as P, type IRunner as Q, type IRunnerSession as R, type InvokedCommand as S, LineBuffer as T, type ListModelsArgs as U, type ListRunnersArgs as V, type LoadSkillArgs as W, type McpClientConfig as X, type McpCredential as Y, type McpRefusal as Z, type McpTool as _, type AgentAdapter as a, type SealedRunOptions as a$, type McpToolReply as a0, type MessageTaskArgs as a1, ModelCatalog as a2, type ModelShortcut as a3, ORCHESTRATOR_SHORTCUTS as a4, ORDEWELL_MCP_PATH as a5, ORDEWELL_MCP_SERVER_NAME as a6, type OneTaskArgs as a7, type OrchestratorOption as a8, OrdewellMcpServer as a9, type RunCommandArgs as aA, type RunPlanArgs as aB, type RunnerAuthSpec as aC, type RunnerAuthStatus as aD, type RunnerCommand as aE, type RunnerCommandKind as aF, type RunnerEntry as aG, type RunnerFeatures as aH, type RunnerManifest as aI, type RunnerMcpServer as aJ, type RunnerMode as aK, type RunnerModelDiscovery as aL, type RunnerModelRef as aM, RunnerRegistry as aN, SEALED_LIMITS as aO, SEARCH_EXCLUSIONS as aP, type SandboxBackend as aQ, type SandboxInvocation as aR, type SandboxLaunch as aS, type SandboxLimits as aT, type SandboxProfile as aU, type ScriptBody as aV, type ScriptExit as aW, type ScriptFullOutput as aX, type ScriptRun as aY, type ScriptStatus as aZ, type SealedAvailability as a_, type OwnSealedRuns as aa, type OwnerOnlyFile as ab, PLANNER_EXECUTION_TOOLS as ac, PLANNER_SANDBOX_DOCS as ad, PLANNER_TOOLS as ae, type PlannerAllowlist as af, type PlannerBackendId as ag, type PlannerSandboxAvailability as ah, type PlannerSandboxDeps as ai, PlannerShellSandbox as aj, type PlannerStartOptions as ak, type PlannerTokenScope as al, type PlannerToolHandler as am, type ProjectMcpServer as an, type ProviderCredentialSource as ao, type ProviderModelLists as ap, type ProviderModelsResult as aq, type QueuedTaskMessage as ar, READ_ONLY_TASK_TOOLS as as, REFUSED_COMMANDS as at, type ReadFileOpts as au, type ReadTaskArgs as av, type ResearchShell as aw, type ResearchShellDeps as ax, type RetryTaskArgs as ay, type RuleWord as az, type AgentAdapterFactory as b, type ShellDialect as b0, type ShellLaunch as b1, type SpawnFn as b2, type StandingDecision as b3, type StructuredEvent as b4, type StructuredTurnEnd as b5, type SubmitPlanArgs as b6, TASK_COMPLETE_TOOL as b7, TASK_COMPLETION_CONTRACT as b8, TASK_SEALED_LIMITS as b9, enabledRunners as bA, fetchAllProviderModels as bB, findRunnerCommand as bC, isGranted as bD, isRunnerApproval as bE, knownModelId as bF, mcpClientConfig as bG, ownerOnlyConfigFile as bH, parseAllowlist as bI, parseApprovalModeSetting as bJ, researchShellWarning as bK, researchToolsPath as bL, resolveModelShortcut as bM, resolvePlannerSandbox as bN, resolveProvider as bO, resolveResearchShell as bP, scopeAllowed as bQ, scriptBodyOf as bR, scriptBodyText as bS, scriptTaskText as bT, sharedMcpServer as bU, taskCompletionContract as bV, timeLimitText as bW, toApprovalDecision as bX, toOrchestratorOptions as bY, toolAllowed as bZ, 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 TaskRunnerFlags as bj, type TaskShell as bk, type TaskShellSite as bl, type TaskStartOptions as bm, type TaskTokenScope as bn, type TaskToolHandler as bo, type TaskWebReads as bp, type ToolOutcome as bq, type UsageLimitSignal as br, approvalScopes as bs, classifyCommand as bt, clearPlannerSandboxCache as bu, clearResearchShellCache as bv, collectProviderCredentials as bw, commandAllowedBy as bx, commandLine as by, effectiveApprovalMode as bz, 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 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 CheckpointAnswer as t, type CheckpointArgs as u, type CommandClassification as v, type CommandTier as w, type CommandWords as x, DEFAULT_SCRIPT_TIMEOUT_MS as y, DENY_ALL as z };
2871
+ export { type McpToolContext as $, AUTO_COMMANDS as A, type BashOptions as B, type CatalogModel as C, DEFAULT_PLANNER_ALLOWLIST as D, type DiscoveryCommand as E, type EditPlanArgs as F, type FetchAllProviderModelsOptions as G, type FindSymbolOptions as H, GIT_READONLY_SUBCOMMANDS as I, GREP_DEFAULT_HEAD_LIMIT as J, type GlobOptions as K, type GrepOptions as L, type GrepOutputMode as M, type IApproval as N, type IConfig as O, type IFileSystem as P, type IRunner as Q, type IRunnerSession as R, type InvokedCommand as S, LineBuffer as T, type ListModelsArgs as U, type ListRunnersArgs as V, type LoadSkillArgs as W, type McpClientConfig as X, type McpCredential as Y, type McpRefusal as Z, type McpTool as _, type AgentAdapter as a, type SealedAvailability as a$, type McpToolReply as a0, type MessageTaskArgs as a1, ModelCatalog as a2, type ModelShortcut as a3, ORCHESTRATOR_SHORTCUTS as a4, ORDEWELL_MCP_PATH as a5, ORDEWELL_MCP_SERVER_NAME as a6, type OneTaskArgs as a7, type OrchestratorOption as a8, OrdewellMcpServer as a9, type RunCommandArgs as aA, type RunPlanArgs as aB, type RunnerAuthSpec as aC, type RunnerAuthStatus as aD, type RunnerCommand as aE, type RunnerCommandKind as aF, type RunnerEntry as aG, type RunnerEnv as aH, type RunnerFeatures as aI, type RunnerManifest as aJ, type RunnerMcpServer as aK, type RunnerMode as aL, type RunnerModelDiscovery as aM, type RunnerModelRef as aN, RunnerRegistry as aO, SEALED_LIMITS as aP, SEARCH_EXCLUSIONS as aQ, type SandboxBackend as aR, type SandboxInvocation as aS, type SandboxLaunch as aT, type SandboxLimits as aU, type SandboxProfile as aV, type ScriptBody as aW, type ScriptExit as aX, type ScriptFullOutput as aY, type ScriptRun as aZ, type ScriptStatus as a_, type OwnSealedRuns as aa, type OwnerOnlyFile as ab, PLANNER_EXECUTION_TOOLS as ac, PLANNER_SANDBOX_DOCS as ad, PLANNER_TOOLS as ae, type PlannerAllowlist as af, type PlannerBackendId as ag, type PlannerSandboxAvailability as ah, type PlannerSandboxDeps as ai, PlannerShellSandbox as aj, type PlannerStartOptions as ak, type PlannerTokenScope as al, type PlannerToolHandler as am, type ProjectMcpServer as an, type ProviderCredentialSource as ao, type ProviderModelLists as ap, type ProviderModelsResult as aq, type QueuedTaskMessage as ar, READ_ONLY_TASK_TOOLS as as, REFUSED_COMMANDS as at, type ReadFileOpts as au, type ReadTaskArgs as av, type ResearchShell as aw, type ResearchShellDeps as ax, type RetryTaskArgs as ay, type RuleWord as az, type AgentAdapterFactory as b, type SealedRunOptions as b0, type ShellDialect as b1, type ShellLaunch as b2, type SpawnFn as b3, type StandingDecision as b4, type StructuredEvent as b5, type StructuredTurnEnd as b6, type SubmitPlanArgs as b7, TASK_COMPLETE_TOOL as b8, TASK_COMPLETION_CONTRACT as b9, effectiveApprovalMode as bA, enabledRunners as bB, fetchAllProviderModels as bC, findRunnerCommand as bD, isGranted as bE, isRunnerApproval as bF, knownModelId as bG, mcpClientConfig as bH, ownerOnlyConfigFile as bI, parseAllowlist as bJ, parseApprovalModeSetting as bK, researchShellWarning as bL, researchToolsPath as bM, resolveModelShortcut as bN, resolvePlannerSandbox as bO, resolveProvider as bP, resolveResearchShell as bQ, scopeAllowed as bR, scriptBodyOf as bS, scriptBodyText as bT, scriptTaskText as bU, sharedMcpServer as bV, taskCompletionContract as bW, timeLimitText as bX, toApprovalDecision as bY, toOrchestratorOptions as bZ, toolAllowed as b_, TASK_SEALED_LIMITS as ba, TASK_TOOLS as bb, type TaskCompleteArgs as bc, type TaskDiffArgs as bd, type TaskMessageFrom as be, type TaskModeAgentAdapter as bf, TaskModeUnsupportedError as bg, type TaskOutputArgs as bh, type TaskQueryArgs as bi, type TaskRunCommandArgs 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 UsageLimitSignal as bs, approvalScopes as bt, classifyCommand as bu, clearPlannerSandboxCache as bv, clearResearchShellCache as bw, collectProviderCredentials as bx, commandAllowedBy as by, commandLine as bz, 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 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 CheckpointAnswer as t, type CheckpointArgs as u, type CommandClassification as v, type CommandTier as w, type CommandWords as x, DEFAULT_SCRIPT_TIMEOUT_MS as y, DENY_ALL as z };
@@ -261,13 +261,10 @@ declare const AUTO_COMMANDS: string[];
261
261
  * read-only against the repository. It reaches the network: it contacts
262
262
  * whatever host the named remote or URL resolves to, which routes around the
263
263
  * web fetcher's per-origin approval and its request-forgery guard. So it
264
- * prompts rather than running silently.
265
- *
266
- * Prompting only became the right answer once {@link scopeFor} widened. Under
267
- * the old scope it would have been remembered as `git ls-remote`, so one
268
- * approval of the workspace's own remote would have authorised a listing
269
- * against any host at all — which is the same hole with an approval dialog in
270
- * front of it. The scope now carries the destination.
264
+ * prompts rather than running silently, and only for a remote the repository
265
+ * configures: a destination the line spells out is refused
266
+ * ({@link namesConfiguredRemote}), and the grant is the whole line
267
+ * ({@link gitScope}), so no approval of one remote covers another.
271
268
  */
272
269
  declare const GIT_READONLY_SUBCOMMANDS: string[];
273
270
  /**
@@ -314,7 +311,8 @@ interface CommandClassification {
314
311
  /** Separate grants for commands that name several origins. */
315
312
  scopes?: string[];
316
313
  webUrls?: URL[];
317
- webOutboundTexts?: string[];
314
+ /** What a network-reaching command sends, for the outbound secret check (ADR-0027): a web command's URLs and values, a remote listing's remote and patterns. */
315
+ outboundTexts?: string[];
318
316
  /** What a grant covers, for `ask`. Derived from the non-auto segments only. */
319
317
  scope: string;
320
318
  /** Populated for `refuse`: why, in a sentence the model can act on. */
@@ -2345,18 +2343,34 @@ interface DiscoveryCommand {
2345
2343
  args: string[];
2346
2344
  parser?: ModelDiscoveryParser;
2347
2345
  }
2346
+ /**
2347
+ * The environment a runner is launched with: the daemon's own, under the
2348
+ * workspace's (ADR-0016). A runner's files can move with it, as Claude Code's
2349
+ * do under `CLAUDE_CONFIG_DIR`.
2350
+ */
2351
+ type RunnerEnv = Readonly<Record<string, string | undefined>>;
2348
2352
  type ApiAuthMethod = {
2349
2353
  type: 'env';
2350
2354
  varName: string;
2351
2355
  header: string;
2352
2356
  prefix?: string;
2353
- } | {
2357
+ }
2358
+ /** `path` is `~` expanded; a function of the runner's environment when that relocates the file. */
2359
+ | {
2354
2360
  type: 'file';
2355
- path: string;
2361
+ path: string | ((env: RunnerEnv) => string);
2356
2362
  jsonPath: string;
2357
2363
  header: string;
2358
2364
  prefix?: string;
2359
2365
  };
2366
+ /** What a runner's settings reader may look at, with `~` expanded in every path. */
2367
+ interface RunnerSettingsFiles {
2368
+ /** The file's content, or null when it is missing or unreadable. A leading `~` is the home `env` gives the runner. */
2369
+ read(file: string): string | null;
2370
+ /** The names of the entries in `dir`, or none when it is missing. A leading `~` is read as in {@link read}. */
2371
+ list(dir: string): string[];
2372
+ env: RunnerEnv;
2373
+ }
2360
2374
  interface ApiDiscoveryConfig {
2361
2375
  url: string;
2362
2376
  headers?: Record<string, string>;
@@ -2372,13 +2386,14 @@ interface RunnerModelDiscovery {
2372
2386
  * Stdio JSON-RPC discovery (Codex `app-server`): spawn the command, send
2373
2387
  * `initialize` then `model/list`, and read the catalog from the response.
2374
2388
  * Tried BEFORE apiDiscovery and command discovery. When the call fails,
2375
- * `cacheFile` (the runner's own on-disk catalog cache, `~` expanded) is
2376
- * read before falling through to the remaining discovery methods.
2389
+ * `cacheFile` (the runner's own on-disk catalog cache, `~` expanded, or
2390
+ * found from the runner's environment) is read before falling through to
2391
+ * the remaining discovery methods.
2377
2392
  */
2378
2393
  appServer?: {
2379
2394
  command: string;
2380
2395
  args: string[];
2381
- cacheFile?: string;
2396
+ cacheFile?: string | ((env: RunnerEnv) => string);
2382
2397
  };
2383
2398
  /**
2384
2399
  * Optional last-resort list for a CLI that cannot enumerate
@@ -2416,6 +2431,14 @@ interface RunnerModelDiscovery {
2416
2431
  * fails, discovery falls through to `discoveryCommands` + `canonicalAliases`.
2417
2432
  */
2418
2433
  apiDiscovery?: ApiDiscoveryConfig;
2434
+ /**
2435
+ * Models registered in the runner's own settings, such as gateway IDs no
2436
+ * catalog lists, read as the runner itself resolves its settings files.
2437
+ * Appended to whatever the other methods produced, success or fallback: an
2438
+ * ID they already offer keeps their entry. Missing or unreadable files add
2439
+ * nothing.
2440
+ */
2441
+ settingsModels?: (files: RunnerSettingsFiles) => DiscoveredModel[];
2419
2442
  preferredPatterns?: {
2420
2443
  id: string;
2421
2444
  label: string;
@@ -2785,6 +2808,19 @@ interface IRunner {
2785
2808
  skills?: readonly TaskSkillSnapshot[];
2786
2809
  /** Something the user should know about how the spawn went that did not stop it — a respawn, most often. */
2787
2810
  onNotice?: (message: string) => void;
2811
+ /**
2812
+ * The runner is being started and has not yet reported Ordewell's tools
2813
+ * connected (ADR-0025): on its first spawn, then on its one respawn.
2814
+ * Nothing has been sent to it, and the spawn resolves only once they
2815
+ * connect or the wait ends.
2816
+ */
2817
+ onAttaching?: (spawn: 1 | 2) => void;
2818
+ /**
2819
+ * Aborted once nobody wants the runner any more: a spawn still in flight
2820
+ * is taken back at once instead of finishing its start for nobody. Once
2821
+ * the spawn has resolved, the session's own stop is what ends it.
2822
+ */
2823
+ cancelled?: AbortSignal;
2788
2824
  /** The attempt's work lands as a commit (ADR-0047): its runner is told to write the message in `task_complete`. */
2789
2825
  commits?: true;
2790
2826
  /** A script task's body (ADR-0035): only the script runner reads it, and it runs nothing else. */
@@ -2832,4 +2868,4 @@ interface IRunner {
2832
2868
  activeCount: number;
2833
2869
  }
2834
2870
 
2835
- export { type McpToolContext as $, AUTO_COMMANDS as A, type BashOptions as B, type CatalogModel as C, DEFAULT_PLANNER_ALLOWLIST as D, type DiscoveryCommand as E, type EditPlanArgs as F, type FetchAllProviderModelsOptions as G, type FindSymbolOptions as H, GIT_READONLY_SUBCOMMANDS as I, GREP_DEFAULT_HEAD_LIMIT as J, type GlobOptions as K, type GrepOptions as L, type GrepOutputMode as M, type IApproval as N, type IConfig as O, type IFileSystem as P, type IRunner as Q, type IRunnerSession as R, type InvokedCommand as S, LineBuffer as T, type ListModelsArgs as U, type ListRunnersArgs as V, type LoadSkillArgs as W, type McpClientConfig as X, type McpCredential as Y, type McpRefusal as Z, type McpTool as _, type AgentAdapter as a, type SealedRunOptions as a$, type McpToolReply as a0, type MessageTaskArgs as a1, ModelCatalog as a2, type ModelShortcut as a3, ORCHESTRATOR_SHORTCUTS as a4, ORDEWELL_MCP_PATH as a5, ORDEWELL_MCP_SERVER_NAME as a6, type OneTaskArgs as a7, type OrchestratorOption as a8, OrdewellMcpServer as a9, type RunCommandArgs as aA, type RunPlanArgs as aB, type RunnerAuthSpec as aC, type RunnerAuthStatus as aD, type RunnerCommand as aE, type RunnerCommandKind as aF, type RunnerEntry as aG, type RunnerFeatures as aH, type RunnerManifest as aI, type RunnerMcpServer as aJ, type RunnerMode as aK, type RunnerModelDiscovery as aL, type RunnerModelRef as aM, RunnerRegistry as aN, SEALED_LIMITS as aO, SEARCH_EXCLUSIONS as aP, type SandboxBackend as aQ, type SandboxInvocation as aR, type SandboxLaunch as aS, type SandboxLimits as aT, type SandboxProfile as aU, type ScriptBody as aV, type ScriptExit as aW, type ScriptFullOutput as aX, type ScriptRun as aY, type ScriptStatus as aZ, type SealedAvailability as a_, type OwnSealedRuns as aa, type OwnerOnlyFile as ab, PLANNER_EXECUTION_TOOLS as ac, PLANNER_SANDBOX_DOCS as ad, PLANNER_TOOLS as ae, type PlannerAllowlist as af, type PlannerBackendId as ag, type PlannerSandboxAvailability as ah, type PlannerSandboxDeps as ai, PlannerShellSandbox as aj, type PlannerStartOptions as ak, type PlannerTokenScope as al, type PlannerToolHandler as am, type ProjectMcpServer as an, type ProviderCredentialSource as ao, type ProviderModelLists as ap, type ProviderModelsResult as aq, type QueuedTaskMessage as ar, READ_ONLY_TASK_TOOLS as as, REFUSED_COMMANDS as at, type ReadFileOpts as au, type ReadTaskArgs as av, type ResearchShell as aw, type ResearchShellDeps as ax, type RetryTaskArgs as ay, type RuleWord as az, type AgentAdapterFactory as b, type ShellDialect as b0, type ShellLaunch as b1, type SpawnFn as b2, type StandingDecision as b3, type StructuredEvent as b4, type StructuredTurnEnd as b5, type SubmitPlanArgs as b6, TASK_COMPLETE_TOOL as b7, TASK_COMPLETION_CONTRACT as b8, TASK_SEALED_LIMITS as b9, enabledRunners as bA, fetchAllProviderModels as bB, findRunnerCommand as bC, isGranted as bD, isRunnerApproval as bE, knownModelId as bF, mcpClientConfig as bG, ownerOnlyConfigFile as bH, parseAllowlist as bI, parseApprovalModeSetting as bJ, researchShellWarning as bK, researchToolsPath as bL, resolveModelShortcut as bM, resolvePlannerSandbox as bN, resolveProvider as bO, resolveResearchShell as bP, scopeAllowed as bQ, scriptBodyOf as bR, scriptBodyText as bS, scriptTaskText as bT, sharedMcpServer as bU, taskCompletionContract as bV, timeLimitText as bW, toApprovalDecision as bX, toOrchestratorOptions as bY, toolAllowed as bZ, 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 TaskRunnerFlags as bj, type TaskShell as bk, type TaskShellSite as bl, type TaskStartOptions as bm, type TaskTokenScope as bn, type TaskToolHandler as bo, type TaskWebReads as bp, type ToolOutcome as bq, type UsageLimitSignal as br, approvalScopes as bs, classifyCommand as bt, clearPlannerSandboxCache as bu, clearResearchShellCache as bv, collectProviderCredentials as bw, commandAllowedBy as bx, commandLine as by, effectiveApprovalMode as bz, 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 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 CheckpointAnswer as t, type CheckpointArgs as u, type CommandClassification as v, type CommandTier as w, type CommandWords as x, DEFAULT_SCRIPT_TIMEOUT_MS as y, DENY_ALL as z };
2871
+ export { type McpToolContext as $, AUTO_COMMANDS as A, type BashOptions as B, type CatalogModel as C, DEFAULT_PLANNER_ALLOWLIST as D, type DiscoveryCommand as E, type EditPlanArgs as F, type FetchAllProviderModelsOptions as G, type FindSymbolOptions as H, GIT_READONLY_SUBCOMMANDS as I, GREP_DEFAULT_HEAD_LIMIT as J, type GlobOptions as K, type GrepOptions as L, type GrepOutputMode as M, type IApproval as N, type IConfig as O, type IFileSystem as P, type IRunner as Q, type IRunnerSession as R, type InvokedCommand as S, LineBuffer as T, type ListModelsArgs as U, type ListRunnersArgs as V, type LoadSkillArgs as W, type McpClientConfig as X, type McpCredential as Y, type McpRefusal as Z, type McpTool as _, type AgentAdapter as a, type SealedAvailability as a$, type McpToolReply as a0, type MessageTaskArgs as a1, ModelCatalog as a2, type ModelShortcut as a3, ORCHESTRATOR_SHORTCUTS as a4, ORDEWELL_MCP_PATH as a5, ORDEWELL_MCP_SERVER_NAME as a6, type OneTaskArgs as a7, type OrchestratorOption as a8, OrdewellMcpServer as a9, type RunCommandArgs as aA, type RunPlanArgs as aB, type RunnerAuthSpec as aC, type RunnerAuthStatus as aD, type RunnerCommand as aE, type RunnerCommandKind as aF, type RunnerEntry as aG, type RunnerEnv as aH, type RunnerFeatures as aI, type RunnerManifest as aJ, type RunnerMcpServer as aK, type RunnerMode as aL, type RunnerModelDiscovery as aM, type RunnerModelRef as aN, RunnerRegistry as aO, SEALED_LIMITS as aP, SEARCH_EXCLUSIONS as aQ, type SandboxBackend as aR, type SandboxInvocation as aS, type SandboxLaunch as aT, type SandboxLimits as aU, type SandboxProfile as aV, type ScriptBody as aW, type ScriptExit as aX, type ScriptFullOutput as aY, type ScriptRun as aZ, type ScriptStatus as a_, type OwnSealedRuns as aa, type OwnerOnlyFile as ab, PLANNER_EXECUTION_TOOLS as ac, PLANNER_SANDBOX_DOCS as ad, PLANNER_TOOLS as ae, type PlannerAllowlist as af, type PlannerBackendId as ag, type PlannerSandboxAvailability as ah, type PlannerSandboxDeps as ai, PlannerShellSandbox as aj, type PlannerStartOptions as ak, type PlannerTokenScope as al, type PlannerToolHandler as am, type ProjectMcpServer as an, type ProviderCredentialSource as ao, type ProviderModelLists as ap, type ProviderModelsResult as aq, type QueuedTaskMessage as ar, READ_ONLY_TASK_TOOLS as as, REFUSED_COMMANDS as at, type ReadFileOpts as au, type ReadTaskArgs as av, type ResearchShell as aw, type ResearchShellDeps as ax, type RetryTaskArgs as ay, type RuleWord as az, type AgentAdapterFactory as b, type SealedRunOptions as b0, type ShellDialect as b1, type ShellLaunch as b2, type SpawnFn as b3, type StandingDecision as b4, type StructuredEvent as b5, type StructuredTurnEnd as b6, type SubmitPlanArgs as b7, TASK_COMPLETE_TOOL as b8, TASK_COMPLETION_CONTRACT as b9, effectiveApprovalMode as bA, enabledRunners as bB, fetchAllProviderModels as bC, findRunnerCommand as bD, isGranted as bE, isRunnerApproval as bF, knownModelId as bG, mcpClientConfig as bH, ownerOnlyConfigFile as bI, parseAllowlist as bJ, parseApprovalModeSetting as bK, researchShellWarning as bL, researchToolsPath as bM, resolveModelShortcut as bN, resolvePlannerSandbox as bO, resolveProvider as bP, resolveResearchShell as bQ, scopeAllowed as bR, scriptBodyOf as bS, scriptBodyText as bT, scriptTaskText as bU, sharedMcpServer as bV, taskCompletionContract as bW, timeLimitText as bX, toApprovalDecision as bY, toOrchestratorOptions as bZ, toolAllowed as b_, TASK_SEALED_LIMITS as ba, TASK_TOOLS as bb, type TaskCompleteArgs as bc, type TaskDiffArgs as bd, type TaskMessageFrom as be, type TaskModeAgentAdapter as bf, TaskModeUnsupportedError as bg, type TaskOutputArgs as bh, type TaskQueryArgs as bi, type TaskRunCommandArgs 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 UsageLimitSignal as bs, approvalScopes as bt, classifyCommand as bu, clearPlannerSandboxCache as bv, clearResearchShellCache as bw, collectProviderCredentials as bx, commandAllowedBy as by, commandLine as bz, 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 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 CheckpointAnswer as t, type CheckpointArgs as u, type CommandClassification as v, type CommandTier as w, type CommandWords as x, DEFAULT_SCRIPT_TIMEOUT_MS as y, DENY_ALL as z };
@@ -1708,6 +1708,10 @@ var RECEIPT_LABELS = {
1708
1708
  function receiptLabel(task) {
1709
1709
  return isTaskRunning(task) && task.completionReceived ? RECEIPT_LABELS[task.completionReceived] : null;
1710
1710
  }
1711
+ function attachingLabel(task) {
1712
+ if (!isTaskRunning(task) || !task.attaching) return null;
1713
+ return task.attaching === 2 ? "Connecting Ordewell's tools, retry" : "Connecting Ordewell's tools";
1714
+ }
1711
1715
  function approvalLabel(count) {
1712
1716
  if (!count) return null;
1713
1717
  return count > 1 ? `Waiting for approval (${count})` : "Waiting for approval";
@@ -2841,7 +2845,7 @@ function serializeTask(t) {
2841
2845
  ...t.loop && t.loopRound !== void 0 ? { loopRound: t.loopRound } : {}
2842
2846
  };
2843
2847
  }
2844
- function serializeTaskStatus(t, idleSince = null, isolation = null, queued = [], awaitingApproval = 0, mergeGate = [], checkpoint = "", waitsForApproval = false, holdReason = null, completionReceived = null) {
2848
+ function serializeTaskStatus(t, idleSince = null, isolation = null, queued = [], awaitingApproval = 0, mergeGate = [], checkpoint = "", waitsForApproval = false, holdReason = null, completionReceived = null, attaching = null) {
2845
2849
  return {
2846
2850
  id: t.id,
2847
2851
  type: t.type,
@@ -2849,6 +2853,7 @@ function serializeTaskStatus(t, idleSince = null, isolation = null, queued = [],
2849
2853
  verdict: t.verdict ? { outcome: t.verdict.outcome, reason: t.verdict.reason, checks: t.verdict.checks || [], ...t.verdict.reported ? { reported: t.verdict.reported } : {} } : null,
2850
2854
  idleSince,
2851
2855
  ...completionReceived ? { completionReceived } : {},
2856
+ ...attaching ? { attaching } : {},
2852
2857
  ...t.attempted ? { attempted: true } : {},
2853
2858
  ...t.attemptUsage ? { attemptUsage: structuredClone(t.attemptUsage) } : {},
2854
2859
  ...isolation ? { isolation } : {},
@@ -2925,8 +2930,8 @@ function truncateCheckpointSummary(summary) {
2925
2930
 
2926
2931
  // src/services/runView.ts
2927
2932
  var EMPTY_RUN = { tasks: [], runMerge: null, handoff: null, mergeResult: null, activity: IDLE_ACTIVITY };
2928
- function split({ verdict, idleSince, completionReceived, isolation, checkpoint, queued, continuable, awaitingApproval, mergeGate, forcedPastGate, waitsForApproval, holdReason, handoff, attempted, ...plan }) {
2929
- return { plan, status: { verdict, idleSince, completionReceived, isolation, checkpoint, queued, continuable, awaitingApproval, mergeGate, forcedPastGate, waitsForApproval, holdReason, handoff, attempted } };
2933
+ function split({ verdict, idleSince, completionReceived, attaching, isolation, checkpoint, queued, continuable, awaitingApproval, mergeGate, forcedPastGate, waitsForApproval, holdReason, handoff, attempted, ...plan }) {
2934
+ return { plan, status: { verdict, idleSince, completionReceived, attaching, isolation, checkpoint, queued, continuable, awaitingApproval, mergeGate, forcedPastGate, waitsForApproval, holdReason, handoff, attempted } };
2930
2935
  }
2931
2936
  function refresh(previous, tasks) {
2932
2937
  const held = new Map([...walkPlan(previous)].map(({ task }) => [task.id, task]));
@@ -4173,6 +4178,7 @@ function taskRowView(task, context = {}) {
4173
4178
  resumes: resumeLabel(task, context.now),
4174
4179
  approvals: approvalLabel(task.awaitingApproval),
4175
4180
  receipt: receiptLabel(task),
4181
+ attaching: attachingLabel(task),
4176
4182
  waitsForApproval: task.waitsForApproval && NOT_STARTED.has(task.status) ? WAITS_FOR_APPROVAL_LABEL : null,
4177
4183
  holdReason: task.holdReason?.trim() || null,
4178
4184
  research: task.type === "ai" && task.research === true,
@@ -4384,6 +4390,7 @@ export {
4384
4390
  skippedLabel,
4385
4391
  WAITS_FOR_APPROVAL_LABEL,
4386
4392
  receiptLabel,
4393
+ attachingLabel,
4387
4394
  approvalLabel,
4388
4395
  resumeTime,
4389
4396
  resumeLabel,
@@ -4513,4 +4520,4 @@ export {
4513
4520
  logResumes,
4514
4521
  taskLogHeaderView
4515
4522
  };
4516
- //# sourceMappingURL=chunk-4QXOWEGC.mjs.map
4523
+ //# sourceMappingURL=chunk-7WNLN63J.mjs.map