@ordewell/core 0.10.0 → 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.
Files changed (42) hide show
  1. package/dist/{IFileSystem-BCJBHFwB.d.ts → IFileSystem-CyTIoiSn.d.ts} +1 -1
  2. package/dist/{IFileSystem-Bj6fy1cG.d.mts → IFileSystem-j0naIoAQ.d.mts} +1 -1
  3. package/dist/{IRunner-C7_SSpzG.d.ts → IRunner---PfQVdc.d.mts} +25 -20
  4. package/dist/{IRunner-hWAJC4hg.d.mts → IRunner-WwL-Bjqq.d.ts} +25 -20
  5. package/dist/{ModeResolver-u5ZhRC8x.d.ts → ModeResolver-CjQ7zqTN.d.mts} +1 -1
  6. package/dist/{ModeResolver-m1d8Cb-j.d.mts → ModeResolver-DrMU-5lw.d.ts} +1 -1
  7. package/dist/{Task-CxwnCJLi.d.mts → Task-AfA1m4qW.d.mts} +35 -7
  8. package/dist/{Task-CxwnCJLi.d.ts → Task-AfA1m4qW.d.ts} +35 -7
  9. package/dist/{chunk-DJAPDO6E.mjs → chunk-3LNZDBCX.mjs} +8 -7
  10. package/dist/chunk-3LNZDBCX.mjs.map +1 -0
  11. package/dist/{chunk-DNFT4SQG.mjs → chunk-4FEARWTS.mjs} +3 -3
  12. package/dist/{chunk-2IIRSBEQ.mjs → chunk-CIL3BQIF.mjs} +4 -2
  13. package/dist/chunk-CIL3BQIF.mjs.map +1 -0
  14. package/dist/{chunk-CH5IGWFS.mjs → chunk-UQGR3UCA.mjs} +35 -3
  15. package/dist/chunk-UQGR3UCA.mjs.map +1 -0
  16. package/dist/index.d.mts +49 -36
  17. package/dist/index.d.ts +49 -36
  18. package/dist/index.js +15816 -15877
  19. package/dist/index.js.map +1 -1
  20. package/dist/index.mjs +14846 -14941
  21. package/dist/index.mjs.map +1 -1
  22. package/dist/parsing.d.mts +2 -2
  23. package/dist/parsing.d.ts +2 -2
  24. package/dist/parsing.js +3 -2
  25. package/dist/parsing.js.map +1 -1
  26. package/dist/parsing.mjs +3 -3
  27. package/dist/{plan-utils-CKXdD1AD.d.mts → plan-utils-DL7yOuJs.d.mts} +39 -8
  28. package/dist/{plan-utils-B6yJdpgi.d.ts → plan-utils-gpeqV-Lp.d.ts} +39 -8
  29. package/dist/plan-utils.d.mts +4 -4
  30. package/dist/plan-utils.d.ts +4 -4
  31. package/dist/plan-utils.js +44 -0
  32. package/dist/plan-utils.js.map +1 -1
  33. package/dist/plan-utils.mjs +7 -3
  34. package/dist/testing.d.mts +3 -3
  35. package/dist/testing.d.ts +3 -3
  36. package/dist/testing.js.map +1 -1
  37. package/dist/testing.mjs +1 -1
  38. package/package.json +5 -1
  39. package/dist/chunk-2IIRSBEQ.mjs.map +0 -1
  40. package/dist/chunk-CH5IGWFS.mjs.map +0 -1
  41. package/dist/chunk-DJAPDO6E.mjs.map +0 -1
  42. /package/dist/{chunk-DNFT4SQG.mjs.map → chunk-4FEARWTS.mjs.map} +0 -0
package/dist/parsing.mjs CHANGED
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  parsePlanJson
3
- } from "./chunk-DNFT4SQG.mjs";
3
+ } from "./chunk-4FEARWTS.mjs";
4
4
  import {
5
5
  PlanParseError,
6
6
  extractJsonObject,
7
7
  stripModelNoise
8
- } from "./chunk-DJAPDO6E.mjs";
9
- import "./chunk-2IIRSBEQ.mjs";
8
+ } from "./chunk-3LNZDBCX.mjs";
9
+ import "./chunk-CIL3BQIF.mjs";
10
10
 
11
11
  // src/services/PartialPlanParser.ts
12
12
  function parsePartialPlan(partial) {
@@ -1,6 +1,6 @@
1
- import { $ as RunnerId, c as DiscoveredModel, ac as Task, a9 as SkillsService, a4 as SkillInfo, U as RepoGroupLayout, aj as TaskSkillSnapshot, ai as TaskSkillNotice, aa as SubagentOutcome, ao as UsageRecord, ak as TaskSnapshot, a as AwaitingReason, I as IWorktreeIsolation, v as IsolationRun, j as IsolationHandoff, H as PlanIsolation, w as IsolationTaskRecord, af as TaskIsolation, F as IsolationView, r as IsolationOutcome, T as RepairEvidence, am as TreeSnapshot, ad as TaskDiffRead, ae as TaskDiffResult, q as IsolationMergeResult, aq as Verdict, _ as RunSettings, L as LegacyPlanState, C as ConversationMessage, a6 as SkillLoadNotice, P as PendingPlanTurn, A as AttemptUsage, M as ModelUsage, ap as UsageTotals, N as PlanUsage, e as ExecutionRecord, X as ResearchStep, J as PlanState, ab as SupervisorLevel, Y as ResearchStepOutcome, V as ResearchLogEntry, O as PlannerUsage, ag as TaskIsolationState, an as UsageLine } from './Task-CxwnCJLi.mjs';
2
- import { R as RunnerModeInfo } from './ModeResolver-m1d8Cb-j.mjs';
3
- import { B as IRunnerSession, aB as TaskMessageFrom, ah as RunnerCommand, am as RunnerMcpServer, au as StructuredTurnEnd, j as ApprovalDecision, at as StructuredEvent, y as IConfig, z as IRunner, ap as RunnerRegistry, aa as QueuedTaskMessage, k as ApprovalKind, q as ApprovalSource } from './IRunner-hWAJC4hg.mjs';
1
+ import { a1 as RunnerId, c as DiscoveredModel, ae as Task, ab as SkillsService, a6 as SkillInfo, W as RepoGroupLayout, al as TaskSkillSnapshot, ak as TaskSkillNotice, ac as SubagentOutcome, aq as UsageRecord, am as TaskSnapshot, a as AwaitingReason, I as IWorktreeIsolation, v as IsolationRun, j as IsolationHandoff, H as PlanIsolation, w as IsolationTaskRecord, ah as TaskIsolation, F as IsolationView, Q as PrepareIntent, T as PreviousWork, r as IsolationOutcome, V as RepairEvidence, ao as TreeSnapshot, af as TaskDiffRead, ag as TaskDiffResult, q as IsolationMergeResult, as as Verdict, a0 as RunSettings, L as LegacyPlanState, C as ConversationMessage, a8 as SkillLoadNotice, P as PendingPlanTurn, A as AttemptUsage, M as ModelUsage, ar as UsageTotals, N as PlanUsage, e as ExecutionRecord, Z as ResearchStep, J as PlanState, ad as SupervisorLevel, _ as ResearchStepOutcome, X as ResearchLogEntry, O as PlannerUsage, ai as TaskIsolationState, ap as UsageLine } from './Task-AfA1m4qW.mjs';
2
+ import { R as RunnerModeInfo } from './ModeResolver-CjQ7zqTN.mjs';
3
+ import { B as IRunnerSession, aC as TaskMessageFrom, ai as RunnerCommand, an as RunnerMcpServer, av as StructuredTurnEnd, j as ApprovalDecision, au as StructuredEvent, y as IConfig, z as IRunner, aq as RunnerRegistry, ab as QueuedTaskMessage, k as ApprovalKind, q as ApprovalSource } from './IRunner---PfQVdc.mjs';
4
4
 
5
5
  interface LiveTailOptions {
6
6
  maxLines: number;
@@ -518,6 +518,7 @@ declare class PlanStore {
518
518
  setTaskVerdict(id: string, verdict: Task['verdict']): void;
519
519
  setTaskOutputSummary(id: string, summary: Task['outputSummary']): void;
520
520
  setTaskRunnerSessionId(id: string, runnerSessionId: string | undefined): void;
521
+ clearCarriedFrom(id: string): void;
521
522
  startAttemptUsage(id: string, attempt: number, runner: string, startedAt: string): void;
522
523
  recordAttemptUsage(id: string, attempt: number, record: UsageRecord, now: string): void;
523
524
  endAttemptUsage(id: string, attempt: number, now: string): void;
@@ -535,10 +536,13 @@ declare class PlanStore {
535
536
  }
536
537
 
537
538
  type IsolationNoticeLevel = 'info' | 'warn' | 'error';
539
+ /** How an attempt that may run in a worktree gets one: fresh, the kept one for a repair, or restoring the previous attempt's work. */
540
+ type AttemptIntent = 'fresh' | 'repair' | PrepareIntent;
538
541
  interface AttemptWorkspace {
539
542
  cwd: string;
540
543
  worktree: boolean;
541
- continuationMessage?: string;
544
+ /** Set for a `restore` in a worktree; absent in the checkout, where the previous attempt's edits remain. */
545
+ previousWork?: PreviousWork;
542
546
  }
543
547
  /**
544
548
  * What the controller reports. It never schedules or emits on its own: the
@@ -680,7 +684,7 @@ declare class IsolationRunController {
680
684
  * the attempt is committed as running, so a spawn abandoned or failed after
681
685
  * this settles is not misreported as a change that stuck.
682
686
  */
683
- attemptCwd(task: Task, intent: 'fresh' | 'repair' | 'continuation'): Promise<AttemptWorkspace>;
687
+ attemptCwd(task: Task, intent: AttemptIntent): Promise<AttemptWorkspace>;
684
688
  /** The workspace root, for an attempt that runs outside any worktree. */
685
689
  workspaceCwd(task: Task): Promise<{
686
690
  cwd: string;
@@ -1472,7 +1476,11 @@ declare class TaskOrchestrator {
1472
1476
  * runner has to call first. False when no resume was scheduled for it.
1473
1477
  */
1474
1478
  cancelScheduledResume(taskId: string): boolean;
1475
- /** Run before writing assignments so cancellation sees the old runner's shared wait. */
1479
+ /**
1480
+ * Run before writing assignments so cancellation sees the old runner's
1481
+ * shared wait. A session cannot cross runners, so the next attempt is a
1482
+ * carry-over of the paused attempt's files (ADR-0018, U1).
1483
+ */
1476
1484
  releaseMovedResume(taskId: string, changes: Partial<Task>): Partial<Task>;
1477
1485
  /**
1478
1486
  * A task's attempt stopped on its runner's usage limit, without a
@@ -2143,7 +2151,7 @@ declare class RunSettingsError extends Error {
2143
2151
  }
2144
2152
  interface UserSettings {
2145
2153
  modelAllowlist?: Record<string, string[]>;
2146
- /** Last model (and its thinking effort) the user chose for each planner backend, keyed by AiProvider id. */
2154
+ /** Last model (and its thinking effort) the user chose for each planner backend, keyed by planner backend id. */
2147
2155
  plannerModels?: Record<string, {
2148
2156
  model: string;
2149
2157
  effort?: string;
@@ -2640,6 +2648,29 @@ declare function skillTokens(text: string): SkillToken[];
2640
2648
  /** The tokens in a sent message that loaded one of `loaded` — what a surface highlights in the user's bubble. */
2641
2649
  declare function loadedSkillTokens(text: string, loaded: readonly string[]): SkillToken[];
2642
2650
 
2651
+ /**
2652
+ * One markdown-it token, as far as a surface reads it. Declared here rather
2653
+ * than re-exporting markdown-it's class so a surface depends on core alone.
2654
+ */
2655
+ interface MarkdownToken {
2656
+ readonly type: string;
2657
+ readonly tag: string;
2658
+ readonly nesting: 1 | 0 | -1;
2659
+ readonly level: number;
2660
+ readonly content: string;
2661
+ readonly markup: string;
2662
+ readonly info: string;
2663
+ readonly block: boolean;
2664
+ readonly hidden: boolean;
2665
+ readonly map: readonly [number, number] | null;
2666
+ readonly attrs: readonly (readonly [string, string])[] | null;
2667
+ readonly children: readonly MarkdownToken[] | null;
2668
+ }
2669
+ /** The parsed blocks of a model's text, for a surface that paints them itself (the TUI). */
2670
+ declare function markdownTokens(text: string): readonly MarkdownToken[];
2671
+ /** A model's text as HTML, safe to set as a webview element's innerHTML. */
2672
+ declare function markdownHtml(text: string): string;
2673
+
2643
2674
  /**
2644
2675
  * What a row's status means to a reader, before any surface picks a word,
2645
2676
  * icon or colour for it. `quiet` is a running task whose runner has printed
@@ -2899,4 +2930,4 @@ declare function parseSwitch(arg: string): boolean | null;
2899
2930
  /** A whole number at least `min`, as typed; null for anything else. */
2900
2931
  declare function parseCount(arg: string | undefined, min: number): number | null;
2901
2932
 
2902
- export { type RunnerLoadedBlock as $, ACT_RISK as A, type BlockingSubject as B, CHECKPOINT_TRUNCATE_LENGTH as C, type DiffRow as D, EMPTY_CONVERSATION as E, type NotificationAction as F, type GatedConversation as G, type OutputPreview as H, type INotification as I, type PlanMarkerStatus as J, type PlanSnapshot as K, type LiveTail as L, type MessageBlock as M, NOT_STARTED as N, type OrchestratorObserver as O, type PlanBlock as P, PlanStore as Q, type PlannerModes as R, type PromptHold as S, RUN_SETTINGS_DEFAULTS as T, type RefTask as U, type RunInput as V, type RunMergeView as W, RunSettingsError as X, type RunTask as Y, type RunTaskStatus as Z, type RunView as _, AUTORUN_RISK as a, diffRows as a$, SUPERVISOR_LEVEL_LABEL as a0, type SerializedConversationMessage as a1, type SerializedPendingTurn as a2, type SerializedPlan as a3, type SerializedTask as a4, type SerializedTaskStatus as a5, type SessionBroadcaster as a6, type SessionMessage as a7, type SessionNotice as a8, SettingsService as a9, type TaskRowUsage as aA, type TaskRowView as aB, type TaskStatusKind as aC, type ThinkingDisplayBlock as aD, type ToolBlock as aE, type ToolHeadline as aF, type ToolStatus as aG, type TurnGate as aH, type UsageBlock as aI, type UserSettings as aJ, aheadOfDraft as aK, applyTaskOps as aL, approvalLabel as aM, automergeSummary as aN, autorunSummary as aO, awaitingLabel as aP, blockedByLabel as aQ, blockingFailures as aR, canMergeTasks as aS, canSetDependencies as aT, canSplitTask as aU, capConflictFiles as aV, classifyOutcome as aW, coalesceTaskLog as aX, dependencyCandidates as aY, dependentsNotice as aZ, dependentsOf as a_, type SkillLoadBlock as aa, type SkillLookup as ab, type SkillToken as ac, type SubagentBlock as ad, type SubagentChild as ae, type SubagentStatus as af, type SurfacePlan as ag, type SurfacePlanState as ah, type SurfaceTask as ai, type TakenPrompt as aj, type TaskAttemptSnapshot as ak, TaskControlError as al, type TaskLogEvent as am, type TaskLogView as an, type TaskOp as ao, TaskOrchestrator as ap, type TaskOrchestratorDeps as aq, type TaskOrchestratorOptions as ar, type TaskOutputSource as as, type TaskRef as at, type TaskRowAction as au, type TaskRowContext as av, type TaskRowIsolation as aw, type TaskRowKind as ax, type TaskRowPlacement as ay, type TaskRowSubject as az, type ApplyTaskOpsResult as b, diffStat as b0, diffSummary as b1, digestTaskLog as b2, drainNext as b3, executionSummary as b4, followTurn as b5, fromTranscript as b6, getSettingsPath as b7, hasHiddenDetail as b8, holdPrompt as b9, skippedLabel as bA, stopTurn as bB, summarizeToolCall as bC, supervisorSummary as bD, surfacePlan as bE, surfacePlanState as bF, takeAt as bG, taskLogForSurface as bH, taskOrderLabel as bI, taskRef as bJ, taskRefOf as bK, taskRowActions as bL, taskRowView as bM, taskStartedNotice as bN, taskStatusKind as bO, textHasTaskOps as bP, titledRefs as bQ, titledTaskRef as bR, titledTaskRefOf as bS, toTaskLogEvent as bT, toolHeadline as bU, trimToolOutput as bV, truncateCheckpointSummary as bW, unsendAll as bX, unsendLatest as bY, isTaskRunning as ba, loadedSkillTokens as bb, markAction as bc, markRequestFor as bd, namedRepos as be, newTaskFields as bf, opsEditable as bg, outputLines as bh, outputPreview as bi, parseCount as bj, parseSwitch as bk, parseTaskOpsJson as bl, pastGateConfirmation as bm, reduceConversation as bn, reduceRun as bo, reduceTaskLog as bp, replayTaskLog as bq, resolveTaskRef as br, resumeLabel as bs, resumeTime as bt, runSettingsOf as bu, runnerToolSubject as bv, serializePlan as bw, serializeTask as bx, serializeTaskStatus as by, skillTokens as bz, type ApprovalBlock as c, type ApprovalStatus as d, type AutoMergeTrigger as e, type CommandBlock as f, type CommandStatus as g, type CompactionBlock as h, type ConversationInput as i, type ConversationView as j, type DiffRowKind as k, type DiffStat as l, type DisplayBlock as m, EMPTY_HOLD as n, EMPTY_RUN as o, EMPTY_TASK_LOG as p, type EditCatalog as q, type ExecutionSummary as r, type GlobalRunSettings as s, type IsolatedExecution as t, IsolationRunController as u, type LiveTailOptions as v, type LocalEntry as w, type MessageRole as x, NO_TURN as y, type NewTaskFields as z };
2933
+ export { type RunView as $, ACT_RISK as A, type BlockingSubject as B, CHECKPOINT_TRUNCATE_LENGTH as C, type DiffRow as D, EMPTY_CONVERSATION as E, type NewTaskFields as F, type GatedConversation as G, type NotificationAction as H, type INotification as I, type OutputPreview as J, type PlanMarkerStatus as K, type LiveTail as L, type MarkdownToken as M, NOT_STARTED as N, type OrchestratorObserver as O, type PlanBlock as P, type PlanSnapshot as Q, PlanStore as R, type PlannerModes as S, type PromptHold as T, RUN_SETTINGS_DEFAULTS as U, type RefTask as V, type RunInput as W, type RunMergeView as X, RunSettingsError as Y, type RunTask as Z, type RunTaskStatus as _, AUTORUN_RISK as a, dependentsOf as a$, type RunnerLoadedBlock as a0, SUPERVISOR_LEVEL_LABEL as a1, type SerializedConversationMessage as a2, type SerializedPendingTurn as a3, type SerializedPlan as a4, type SerializedTask as a5, type SerializedTaskStatus as a6, type SessionBroadcaster as a7, type SessionMessage as a8, type SessionNotice as a9, type TaskRowSubject as aA, type TaskRowUsage as aB, type TaskRowView as aC, type TaskStatusKind as aD, type ThinkingDisplayBlock as aE, type ToolBlock as aF, type ToolHeadline as aG, type ToolStatus as aH, type TurnGate as aI, type UsageBlock as aJ, type UserSettings as aK, aheadOfDraft as aL, applyTaskOps as aM, approvalLabel as aN, automergeSummary as aO, autorunSummary as aP, awaitingLabel as aQ, blockedByLabel as aR, blockingFailures as aS, canMergeTasks as aT, canSetDependencies as aU, canSplitTask as aV, capConflictFiles as aW, classifyOutcome as aX, coalesceTaskLog as aY, dependencyCandidates as aZ, dependentsNotice as a_, SettingsService as aa, type SkillLoadBlock as ab, type SkillLookup as ac, type SkillToken as ad, type SubagentBlock as ae, type SubagentChild as af, type SubagentStatus as ag, type SurfacePlan as ah, type SurfacePlanState as ai, type SurfaceTask as aj, type TakenPrompt as ak, type TaskAttemptSnapshot as al, TaskControlError as am, type TaskLogEvent as an, type TaskLogView as ao, type TaskOp as ap, TaskOrchestrator as aq, type TaskOrchestratorDeps as ar, type TaskOrchestratorOptions as as, type TaskOutputSource as at, type TaskRef as au, type TaskRowAction as av, type TaskRowContext as aw, type TaskRowIsolation as ax, type TaskRowKind as ay, type TaskRowPlacement as az, type ApplyTaskOpsResult as b, unsendLatest as b$, diffRows as b0, diffStat as b1, diffSummary as b2, digestTaskLog as b3, drainNext as b4, executionSummary as b5, followTurn as b6, fromTranscript as b7, getSettingsPath as b8, hasHiddenDetail as b9, serializeTask as bA, serializeTaskStatus as bB, skillTokens as bC, skippedLabel as bD, stopTurn as bE, summarizeToolCall as bF, supervisorSummary as bG, surfacePlan as bH, surfacePlanState as bI, takeAt as bJ, taskLogForSurface as bK, taskOrderLabel as bL, taskRef as bM, taskRefOf as bN, taskRowActions as bO, taskRowView as bP, taskStartedNotice as bQ, taskStatusKind as bR, textHasTaskOps as bS, titledRefs as bT, titledTaskRef as bU, titledTaskRefOf as bV, toTaskLogEvent as bW, toolHeadline as bX, trimToolOutput as bY, truncateCheckpointSummary as bZ, unsendAll as b_, holdPrompt as ba, isTaskRunning as bb, loadedSkillTokens as bc, markAction as bd, markRequestFor as be, markdownHtml as bf, markdownTokens as bg, namedRepos as bh, newTaskFields as bi, opsEditable as bj, outputLines as bk, outputPreview as bl, parseCount as bm, parseSwitch as bn, parseTaskOpsJson as bo, pastGateConfirmation as bp, reduceConversation as bq, reduceRun as br, reduceTaskLog as bs, replayTaskLog as bt, resolveTaskRef as bu, resumeLabel as bv, resumeTime as bw, runSettingsOf as bx, runnerToolSubject as by, serializePlan as bz, type ApprovalBlock as c, type ApprovalStatus as d, type AutoMergeTrigger as e, type CommandBlock as f, type CommandStatus as g, type CompactionBlock as h, type ConversationInput as i, type ConversationView as j, type DiffRowKind as k, type DiffStat as l, type DisplayBlock as m, EMPTY_HOLD as n, EMPTY_RUN as o, EMPTY_TASK_LOG as p, type EditCatalog as q, type ExecutionSummary as r, type GlobalRunSettings as s, type IsolatedExecution as t, IsolationRunController as u, type LiveTailOptions as v, type LocalEntry as w, type MessageBlock as x, type MessageRole as y, NO_TURN as z };
@@ -1,6 +1,6 @@
1
- import { $ as RunnerId, c as DiscoveredModel, ac as Task, a9 as SkillsService, a4 as SkillInfo, U as RepoGroupLayout, aj as TaskSkillSnapshot, ai as TaskSkillNotice, aa as SubagentOutcome, ao as UsageRecord, ak as TaskSnapshot, a as AwaitingReason, I as IWorktreeIsolation, v as IsolationRun, j as IsolationHandoff, H as PlanIsolation, w as IsolationTaskRecord, af as TaskIsolation, F as IsolationView, r as IsolationOutcome, T as RepairEvidence, am as TreeSnapshot, ad as TaskDiffRead, ae as TaskDiffResult, q as IsolationMergeResult, aq as Verdict, _ as RunSettings, L as LegacyPlanState, C as ConversationMessage, a6 as SkillLoadNotice, P as PendingPlanTurn, A as AttemptUsage, M as ModelUsage, ap as UsageTotals, N as PlanUsage, e as ExecutionRecord, X as ResearchStep, J as PlanState, ab as SupervisorLevel, Y as ResearchStepOutcome, V as ResearchLogEntry, O as PlannerUsage, ag as TaskIsolationState, an as UsageLine } from './Task-CxwnCJLi.js';
2
- import { R as RunnerModeInfo } from './ModeResolver-u5ZhRC8x.js';
3
- import { B as IRunnerSession, aB as TaskMessageFrom, ah as RunnerCommand, am as RunnerMcpServer, au as StructuredTurnEnd, j as ApprovalDecision, at as StructuredEvent, y as IConfig, z as IRunner, ap as RunnerRegistry, aa as QueuedTaskMessage, k as ApprovalKind, q as ApprovalSource } from './IRunner-C7_SSpzG.js';
1
+ import { a1 as RunnerId, c as DiscoveredModel, ae as Task, ab as SkillsService, a6 as SkillInfo, W as RepoGroupLayout, al as TaskSkillSnapshot, ak as TaskSkillNotice, ac as SubagentOutcome, aq as UsageRecord, am as TaskSnapshot, a as AwaitingReason, I as IWorktreeIsolation, v as IsolationRun, j as IsolationHandoff, H as PlanIsolation, w as IsolationTaskRecord, ah as TaskIsolation, F as IsolationView, Q as PrepareIntent, T as PreviousWork, r as IsolationOutcome, V as RepairEvidence, ao as TreeSnapshot, af as TaskDiffRead, ag as TaskDiffResult, q as IsolationMergeResult, as as Verdict, a0 as RunSettings, L as LegacyPlanState, C as ConversationMessage, a8 as SkillLoadNotice, P as PendingPlanTurn, A as AttemptUsage, M as ModelUsage, ar as UsageTotals, N as PlanUsage, e as ExecutionRecord, Z as ResearchStep, J as PlanState, ad as SupervisorLevel, _ as ResearchStepOutcome, X as ResearchLogEntry, O as PlannerUsage, ai as TaskIsolationState, ap as UsageLine } from './Task-AfA1m4qW.js';
2
+ import { R as RunnerModeInfo } from './ModeResolver-DrMU-5lw.js';
3
+ import { B as IRunnerSession, aC as TaskMessageFrom, ai as RunnerCommand, an as RunnerMcpServer, av as StructuredTurnEnd, j as ApprovalDecision, au as StructuredEvent, y as IConfig, z as IRunner, aq as RunnerRegistry, ab as QueuedTaskMessage, k as ApprovalKind, q as ApprovalSource } from './IRunner-WwL-Bjqq.js';
4
4
 
5
5
  interface LiveTailOptions {
6
6
  maxLines: number;
@@ -518,6 +518,7 @@ declare class PlanStore {
518
518
  setTaskVerdict(id: string, verdict: Task['verdict']): void;
519
519
  setTaskOutputSummary(id: string, summary: Task['outputSummary']): void;
520
520
  setTaskRunnerSessionId(id: string, runnerSessionId: string | undefined): void;
521
+ clearCarriedFrom(id: string): void;
521
522
  startAttemptUsage(id: string, attempt: number, runner: string, startedAt: string): void;
522
523
  recordAttemptUsage(id: string, attempt: number, record: UsageRecord, now: string): void;
523
524
  endAttemptUsage(id: string, attempt: number, now: string): void;
@@ -535,10 +536,13 @@ declare class PlanStore {
535
536
  }
536
537
 
537
538
  type IsolationNoticeLevel = 'info' | 'warn' | 'error';
539
+ /** How an attempt that may run in a worktree gets one: fresh, the kept one for a repair, or restoring the previous attempt's work. */
540
+ type AttemptIntent = 'fresh' | 'repair' | PrepareIntent;
538
541
  interface AttemptWorkspace {
539
542
  cwd: string;
540
543
  worktree: boolean;
541
- continuationMessage?: string;
544
+ /** Set for a `restore` in a worktree; absent in the checkout, where the previous attempt's edits remain. */
545
+ previousWork?: PreviousWork;
542
546
  }
543
547
  /**
544
548
  * What the controller reports. It never schedules or emits on its own: the
@@ -680,7 +684,7 @@ declare class IsolationRunController {
680
684
  * the attempt is committed as running, so a spawn abandoned or failed after
681
685
  * this settles is not misreported as a change that stuck.
682
686
  */
683
- attemptCwd(task: Task, intent: 'fresh' | 'repair' | 'continuation'): Promise<AttemptWorkspace>;
687
+ attemptCwd(task: Task, intent: AttemptIntent): Promise<AttemptWorkspace>;
684
688
  /** The workspace root, for an attempt that runs outside any worktree. */
685
689
  workspaceCwd(task: Task): Promise<{
686
690
  cwd: string;
@@ -1472,7 +1476,11 @@ declare class TaskOrchestrator {
1472
1476
  * runner has to call first. False when no resume was scheduled for it.
1473
1477
  */
1474
1478
  cancelScheduledResume(taskId: string): boolean;
1475
- /** Run before writing assignments so cancellation sees the old runner's shared wait. */
1479
+ /**
1480
+ * Run before writing assignments so cancellation sees the old runner's
1481
+ * shared wait. A session cannot cross runners, so the next attempt is a
1482
+ * carry-over of the paused attempt's files (ADR-0018, U1).
1483
+ */
1476
1484
  releaseMovedResume(taskId: string, changes: Partial<Task>): Partial<Task>;
1477
1485
  /**
1478
1486
  * A task's attempt stopped on its runner's usage limit, without a
@@ -2143,7 +2151,7 @@ declare class RunSettingsError extends Error {
2143
2151
  }
2144
2152
  interface UserSettings {
2145
2153
  modelAllowlist?: Record<string, string[]>;
2146
- /** Last model (and its thinking effort) the user chose for each planner backend, keyed by AiProvider id. */
2154
+ /** Last model (and its thinking effort) the user chose for each planner backend, keyed by planner backend id. */
2147
2155
  plannerModels?: Record<string, {
2148
2156
  model: string;
2149
2157
  effort?: string;
@@ -2640,6 +2648,29 @@ declare function skillTokens(text: string): SkillToken[];
2640
2648
  /** The tokens in a sent message that loaded one of `loaded` — what a surface highlights in the user's bubble. */
2641
2649
  declare function loadedSkillTokens(text: string, loaded: readonly string[]): SkillToken[];
2642
2650
 
2651
+ /**
2652
+ * One markdown-it token, as far as a surface reads it. Declared here rather
2653
+ * than re-exporting markdown-it's class so a surface depends on core alone.
2654
+ */
2655
+ interface MarkdownToken {
2656
+ readonly type: string;
2657
+ readonly tag: string;
2658
+ readonly nesting: 1 | 0 | -1;
2659
+ readonly level: number;
2660
+ readonly content: string;
2661
+ readonly markup: string;
2662
+ readonly info: string;
2663
+ readonly block: boolean;
2664
+ readonly hidden: boolean;
2665
+ readonly map: readonly [number, number] | null;
2666
+ readonly attrs: readonly (readonly [string, string])[] | null;
2667
+ readonly children: readonly MarkdownToken[] | null;
2668
+ }
2669
+ /** The parsed blocks of a model's text, for a surface that paints them itself (the TUI). */
2670
+ declare function markdownTokens(text: string): readonly MarkdownToken[];
2671
+ /** A model's text as HTML, safe to set as a webview element's innerHTML. */
2672
+ declare function markdownHtml(text: string): string;
2673
+
2643
2674
  /**
2644
2675
  * What a row's status means to a reader, before any surface picks a word,
2645
2676
  * icon or colour for it. `quiet` is a running task whose runner has printed
@@ -2899,4 +2930,4 @@ declare function parseSwitch(arg: string): boolean | null;
2899
2930
  /** A whole number at least `min`, as typed; null for anything else. */
2900
2931
  declare function parseCount(arg: string | undefined, min: number): number | null;
2901
2932
 
2902
- export { type RunnerLoadedBlock as $, ACT_RISK as A, type BlockingSubject as B, CHECKPOINT_TRUNCATE_LENGTH as C, type DiffRow as D, EMPTY_CONVERSATION as E, type NotificationAction as F, type GatedConversation as G, type OutputPreview as H, type INotification as I, type PlanMarkerStatus as J, type PlanSnapshot as K, type LiveTail as L, type MessageBlock as M, NOT_STARTED as N, type OrchestratorObserver as O, type PlanBlock as P, PlanStore as Q, type PlannerModes as R, type PromptHold as S, RUN_SETTINGS_DEFAULTS as T, type RefTask as U, type RunInput as V, type RunMergeView as W, RunSettingsError as X, type RunTask as Y, type RunTaskStatus as Z, type RunView as _, AUTORUN_RISK as a, diffRows as a$, SUPERVISOR_LEVEL_LABEL as a0, type SerializedConversationMessage as a1, type SerializedPendingTurn as a2, type SerializedPlan as a3, type SerializedTask as a4, type SerializedTaskStatus as a5, type SessionBroadcaster as a6, type SessionMessage as a7, type SessionNotice as a8, SettingsService as a9, type TaskRowUsage as aA, type TaskRowView as aB, type TaskStatusKind as aC, type ThinkingDisplayBlock as aD, type ToolBlock as aE, type ToolHeadline as aF, type ToolStatus as aG, type TurnGate as aH, type UsageBlock as aI, type UserSettings as aJ, aheadOfDraft as aK, applyTaskOps as aL, approvalLabel as aM, automergeSummary as aN, autorunSummary as aO, awaitingLabel as aP, blockedByLabel as aQ, blockingFailures as aR, canMergeTasks as aS, canSetDependencies as aT, canSplitTask as aU, capConflictFiles as aV, classifyOutcome as aW, coalesceTaskLog as aX, dependencyCandidates as aY, dependentsNotice as aZ, dependentsOf as a_, type SkillLoadBlock as aa, type SkillLookup as ab, type SkillToken as ac, type SubagentBlock as ad, type SubagentChild as ae, type SubagentStatus as af, type SurfacePlan as ag, type SurfacePlanState as ah, type SurfaceTask as ai, type TakenPrompt as aj, type TaskAttemptSnapshot as ak, TaskControlError as al, type TaskLogEvent as am, type TaskLogView as an, type TaskOp as ao, TaskOrchestrator as ap, type TaskOrchestratorDeps as aq, type TaskOrchestratorOptions as ar, type TaskOutputSource as as, type TaskRef as at, type TaskRowAction as au, type TaskRowContext as av, type TaskRowIsolation as aw, type TaskRowKind as ax, type TaskRowPlacement as ay, type TaskRowSubject as az, type ApplyTaskOpsResult as b, diffStat as b0, diffSummary as b1, digestTaskLog as b2, drainNext as b3, executionSummary as b4, followTurn as b5, fromTranscript as b6, getSettingsPath as b7, hasHiddenDetail as b8, holdPrompt as b9, skippedLabel as bA, stopTurn as bB, summarizeToolCall as bC, supervisorSummary as bD, surfacePlan as bE, surfacePlanState as bF, takeAt as bG, taskLogForSurface as bH, taskOrderLabel as bI, taskRef as bJ, taskRefOf as bK, taskRowActions as bL, taskRowView as bM, taskStartedNotice as bN, taskStatusKind as bO, textHasTaskOps as bP, titledRefs as bQ, titledTaskRef as bR, titledTaskRefOf as bS, toTaskLogEvent as bT, toolHeadline as bU, trimToolOutput as bV, truncateCheckpointSummary as bW, unsendAll as bX, unsendLatest as bY, isTaskRunning as ba, loadedSkillTokens as bb, markAction as bc, markRequestFor as bd, namedRepos as be, newTaskFields as bf, opsEditable as bg, outputLines as bh, outputPreview as bi, parseCount as bj, parseSwitch as bk, parseTaskOpsJson as bl, pastGateConfirmation as bm, reduceConversation as bn, reduceRun as bo, reduceTaskLog as bp, replayTaskLog as bq, resolveTaskRef as br, resumeLabel as bs, resumeTime as bt, runSettingsOf as bu, runnerToolSubject as bv, serializePlan as bw, serializeTask as bx, serializeTaskStatus as by, skillTokens as bz, type ApprovalBlock as c, type ApprovalStatus as d, type AutoMergeTrigger as e, type CommandBlock as f, type CommandStatus as g, type CompactionBlock as h, type ConversationInput as i, type ConversationView as j, type DiffRowKind as k, type DiffStat as l, type DisplayBlock as m, EMPTY_HOLD as n, EMPTY_RUN as o, EMPTY_TASK_LOG as p, type EditCatalog as q, type ExecutionSummary as r, type GlobalRunSettings as s, type IsolatedExecution as t, IsolationRunController as u, type LiveTailOptions as v, type LocalEntry as w, type MessageRole as x, NO_TURN as y, type NewTaskFields as z };
2933
+ export { type RunView as $, ACT_RISK as A, type BlockingSubject as B, CHECKPOINT_TRUNCATE_LENGTH as C, type DiffRow as D, EMPTY_CONVERSATION as E, type NewTaskFields as F, type GatedConversation as G, type NotificationAction as H, type INotification as I, type OutputPreview as J, type PlanMarkerStatus as K, type LiveTail as L, type MarkdownToken as M, NOT_STARTED as N, type OrchestratorObserver as O, type PlanBlock as P, type PlanSnapshot as Q, PlanStore as R, type PlannerModes as S, type PromptHold as T, RUN_SETTINGS_DEFAULTS as U, type RefTask as V, type RunInput as W, type RunMergeView as X, RunSettingsError as Y, type RunTask as Z, type RunTaskStatus as _, AUTORUN_RISK as a, dependentsOf as a$, type RunnerLoadedBlock as a0, SUPERVISOR_LEVEL_LABEL as a1, type SerializedConversationMessage as a2, type SerializedPendingTurn as a3, type SerializedPlan as a4, type SerializedTask as a5, type SerializedTaskStatus as a6, type SessionBroadcaster as a7, type SessionMessage as a8, type SessionNotice as a9, type TaskRowSubject as aA, type TaskRowUsage as aB, type TaskRowView as aC, type TaskStatusKind as aD, type ThinkingDisplayBlock as aE, type ToolBlock as aF, type ToolHeadline as aG, type ToolStatus as aH, type TurnGate as aI, type UsageBlock as aJ, type UserSettings as aK, aheadOfDraft as aL, applyTaskOps as aM, approvalLabel as aN, automergeSummary as aO, autorunSummary as aP, awaitingLabel as aQ, blockedByLabel as aR, blockingFailures as aS, canMergeTasks as aT, canSetDependencies as aU, canSplitTask as aV, capConflictFiles as aW, classifyOutcome as aX, coalesceTaskLog as aY, dependencyCandidates as aZ, dependentsNotice as a_, SettingsService as aa, type SkillLoadBlock as ab, type SkillLookup as ac, type SkillToken as ad, type SubagentBlock as ae, type SubagentChild as af, type SubagentStatus as ag, type SurfacePlan as ah, type SurfacePlanState as ai, type SurfaceTask as aj, type TakenPrompt as ak, type TaskAttemptSnapshot as al, TaskControlError as am, type TaskLogEvent as an, type TaskLogView as ao, type TaskOp as ap, TaskOrchestrator as aq, type TaskOrchestratorDeps as ar, type TaskOrchestratorOptions as as, type TaskOutputSource as at, type TaskRef as au, type TaskRowAction as av, type TaskRowContext as aw, type TaskRowIsolation as ax, type TaskRowKind as ay, type TaskRowPlacement as az, type ApplyTaskOpsResult as b, unsendLatest as b$, diffRows as b0, diffStat as b1, diffSummary as b2, digestTaskLog as b3, drainNext as b4, executionSummary as b5, followTurn as b6, fromTranscript as b7, getSettingsPath as b8, hasHiddenDetail as b9, serializeTask as bA, serializeTaskStatus as bB, skillTokens as bC, skippedLabel as bD, stopTurn as bE, summarizeToolCall as bF, supervisorSummary as bG, surfacePlan as bH, surfacePlanState as bI, takeAt as bJ, taskLogForSurface as bK, taskOrderLabel as bL, taskRef as bM, taskRefOf as bN, taskRowActions as bO, taskRowView as bP, taskStartedNotice as bQ, taskStatusKind as bR, textHasTaskOps as bS, titledRefs as bT, titledTaskRef as bU, titledTaskRefOf as bV, toTaskLogEvent as bW, toolHeadline as bX, trimToolOutput as bY, truncateCheckpointSummary as bZ, unsendAll as b_, holdPrompt as ba, isTaskRunning as bb, loadedSkillTokens as bc, markAction as bd, markRequestFor as be, markdownHtml as bf, markdownTokens as bg, namedRepos as bh, newTaskFields as bi, opsEditable as bj, outputLines as bk, outputPreview as bl, parseCount as bm, parseSwitch as bn, parseTaskOpsJson as bo, pastGateConfirmation as bp, reduceConversation as bq, reduceRun as br, reduceTaskLog as bs, replayTaskLog as bt, resolveTaskRef as bu, resumeLabel as bv, resumeTime as bw, runSettingsOf as bx, runnerToolSubject as by, serializePlan as bz, type ApprovalBlock as c, type ApprovalStatus as d, type AutoMergeTrigger as e, type CommandBlock as f, type CommandStatus as g, type CompactionBlock as h, type ConversationInput as i, type ConversationView as j, type DiffRowKind as k, type DiffStat as l, type DisplayBlock as m, EMPTY_HOLD as n, EMPTY_RUN as o, EMPTY_TASK_LOG as p, type EditCatalog as q, type ExecutionSummary as r, type GlobalRunSettings as s, type IsolatedExecution as t, IsolationRunController as u, type LiveTailOptions as v, type LocalEntry as w, type MessageBlock as x, type MessageRole as y, NO_TURN as z };
@@ -1,6 +1,6 @@
1
- export { c as ApprovalBlock, d as ApprovalStatus, B as BlockingSubject, C as CHECKPOINT_TRUNCATE_LENGTH, f as CommandBlock, g as CommandStatus, h as CompactionBlock, i as ConversationInput, j as ConversationView, D as DiffRow, k as DiffRowKind, l as DiffStat, m as DisplayBlock, E as EMPTY_CONVERSATION, n as EMPTY_HOLD, o as EMPTY_RUN, p as EMPTY_TASK_LOG, G as GatedConversation, w as LocalEntry, M as MessageBlock, x as MessageRole, N as NOT_STARTED, y as NO_TURN, z as NewTaskFields, H as OutputPreview, P as PlanBlock, J as PlanMarkerStatus, S as PromptHold, U as RefTask, $ as RunnerLoadedBlock, a0 as SUPERVISOR_LEVEL_LABEL, aa as SkillLoadBlock, ac as SkillToken, ad as SubagentBlock, ae as SubagentChild, af as SubagentStatus, aj as TakenPrompt, an as TaskLogView, at as TaskRef, au as TaskRowAction, av as TaskRowContext, aw as TaskRowIsolation, ax as TaskRowKind, ay as TaskRowPlacement, az as TaskRowSubject, aA as TaskRowUsage, aB as TaskRowView, aC as TaskStatusKind, aD as ThinkingDisplayBlock, aE as ToolBlock, aF as ToolHeadline, aG as ToolStatus, aH as TurnGate, aI as UsageBlock, aK as aheadOfDraft, aM as approvalLabel, aP as awaitingLabel, aQ as blockedByLabel, aR as blockingFailures, aS as canMergeTasks, aT as canSetDependencies, aU as canSplitTask, aV as capConflictFiles, aY as dependencyCandidates, aZ as dependentsNotice, a_ as dependentsOf, a$ as diffRows, b0 as diffStat, b1 as diffSummary, b3 as drainNext, b5 as followTurn, b6 as fromTranscript, b8 as hasHiddenDetail, b9 as holdPrompt, ba as isTaskRunning, bb as loadedSkillTokens, bc as markAction, bd as markRequestFor, be as namedRepos, bf as newTaskFields, bg as opsEditable, bh as outputLines, bi as outputPreview, bj as parseCount, bm as pastGateConfirmation, bn as reduceConversation, bp as reduceTaskLog, bq as replayTaskLog, br as resolveTaskRef, bs as resumeLabel, bt as resumeTime, bv as runnerToolSubject, bz as skillTokens, bA as skippedLabel, bB as stopTurn, bC as summarizeToolCall, bG as takeAt, bI as taskOrderLabel, bJ as taskRef, bK as taskRefOf, bL as taskRowActions, bM as taskRowView, bN as taskStartedNotice, bO as taskStatusKind, bQ as titledRefs, bR as titledTaskRef, bS as titledTaskRefOf, bU as toolHeadline, bW as truncateCheckpointSummary, bX as unsendAll, bY as unsendLatest } from './plan-utils-CKXdD1AD.mjs';
2
- export { A as AttemptUsage, D as DEFAULT_RUNNERS, M as ModelUsage, N as PlanUsage, O as PlannerUsage, an as UsageLine, ao as UsageRecord, ap as UsageTotals, as as addAttemptUsage, at as addModelUsage, au as addPlannerUsage, av as addUsage, aw as addUsageTotals, aA as endAttemptUsage, aE as isMeasured, aI as partedPromptUsage, aJ as pausedOnLimit, aK as planUsage, aL as plannerContextFill, aN as startAttemptUsage, aO as usageLine } from './Task-CxwnCJLi.mjs';
3
- import './ModeResolver-m1d8Cb-j.mjs';
4
- import './IRunner-hWAJC4hg.mjs';
1
+ export { c as ApprovalBlock, d as ApprovalStatus, B as BlockingSubject, C as CHECKPOINT_TRUNCATE_LENGTH, f as CommandBlock, g as CommandStatus, h as CompactionBlock, i as ConversationInput, j as ConversationView, D as DiffRow, k as DiffRowKind, l as DiffStat, m as DisplayBlock, E as EMPTY_CONVERSATION, n as EMPTY_HOLD, o as EMPTY_RUN, p as EMPTY_TASK_LOG, G as GatedConversation, w as LocalEntry, M as MarkdownToken, x as MessageBlock, y as MessageRole, N as NOT_STARTED, z as NO_TURN, F as NewTaskFields, J as OutputPreview, P as PlanBlock, K as PlanMarkerStatus, T as PromptHold, V as RefTask, a0 as RunnerLoadedBlock, a1 as SUPERVISOR_LEVEL_LABEL, ab as SkillLoadBlock, ad as SkillToken, ae as SubagentBlock, af as SubagentChild, ag as SubagentStatus, ak as TakenPrompt, ao as TaskLogView, au as TaskRef, av as TaskRowAction, aw as TaskRowContext, ax as TaskRowIsolation, ay as TaskRowKind, az as TaskRowPlacement, aA as TaskRowSubject, aB as TaskRowUsage, aC as TaskRowView, aD as TaskStatusKind, aE as ThinkingDisplayBlock, aF as ToolBlock, aG as ToolHeadline, aH as ToolStatus, aI as TurnGate, aJ as UsageBlock, aL as aheadOfDraft, aN as approvalLabel, aQ as awaitingLabel, aR as blockedByLabel, aS as blockingFailures, aT as canMergeTasks, aU as canSetDependencies, aV as canSplitTask, aW as capConflictFiles, aZ as dependencyCandidates, a_ as dependentsNotice, a$ as dependentsOf, b0 as diffRows, b1 as diffStat, b2 as diffSummary, b4 as drainNext, b6 as followTurn, b7 as fromTranscript, b9 as hasHiddenDetail, ba as holdPrompt, bb as isTaskRunning, bc as loadedSkillTokens, bd as markAction, be as markRequestFor, bf as markdownHtml, bg as markdownTokens, bh as namedRepos, bi as newTaskFields, bj as opsEditable, bk as outputLines, bl as outputPreview, bm as parseCount, bp as pastGateConfirmation, bq as reduceConversation, bs as reduceTaskLog, bt as replayTaskLog, bu as resolveTaskRef, bv as resumeLabel, bw as resumeTime, by as runnerToolSubject, bC as skillTokens, bD as skippedLabel, bE as stopTurn, bF as summarizeToolCall, bJ as takeAt, bL as taskOrderLabel, bM as taskRef, bN as taskRefOf, bO as taskRowActions, bP as taskRowView, bQ as taskStartedNotice, bR as taskStatusKind, bT as titledRefs, bU as titledTaskRef, bV as titledTaskRefOf, bX as toolHeadline, bZ as truncateCheckpointSummary, b_ as unsendAll, b$ as unsendLatest } from './plan-utils-DL7yOuJs.mjs';
2
+ export { A as AttemptUsage, D as DEFAULT_RUNNERS, M as ModelUsage, N as PlanUsage, O as PlannerUsage, ap as UsageLine, aq as UsageRecord, ar as UsageTotals, au as addAttemptUsage, av as addModelUsage, aw as addPlannerUsage, ax as addUsage, ay as addUsageTotals, aC as endAttemptUsage, aG as isMeasured, aK as partedPromptUsage, aL as pausedOnLimit, aM as planUsage, aN as plannerContextFill, aP as startAttemptUsage, aQ as usageLine } from './Task-AfA1m4qW.mjs';
3
+ import './ModeResolver-CjQ7zqTN.mjs';
4
+ import './IRunner---PfQVdc.mjs';
5
5
  import 'child_process';
6
6
  import 'zod/v4';
@@ -1,6 +1,6 @@
1
- export { c as ApprovalBlock, d as ApprovalStatus, B as BlockingSubject, C as CHECKPOINT_TRUNCATE_LENGTH, f as CommandBlock, g as CommandStatus, h as CompactionBlock, i as ConversationInput, j as ConversationView, D as DiffRow, k as DiffRowKind, l as DiffStat, m as DisplayBlock, E as EMPTY_CONVERSATION, n as EMPTY_HOLD, o as EMPTY_RUN, p as EMPTY_TASK_LOG, G as GatedConversation, w as LocalEntry, M as MessageBlock, x as MessageRole, N as NOT_STARTED, y as NO_TURN, z as NewTaskFields, H as OutputPreview, P as PlanBlock, J as PlanMarkerStatus, S as PromptHold, U as RefTask, $ as RunnerLoadedBlock, a0 as SUPERVISOR_LEVEL_LABEL, aa as SkillLoadBlock, ac as SkillToken, ad as SubagentBlock, ae as SubagentChild, af as SubagentStatus, aj as TakenPrompt, an as TaskLogView, at as TaskRef, au as TaskRowAction, av as TaskRowContext, aw as TaskRowIsolation, ax as TaskRowKind, ay as TaskRowPlacement, az as TaskRowSubject, aA as TaskRowUsage, aB as TaskRowView, aC as TaskStatusKind, aD as ThinkingDisplayBlock, aE as ToolBlock, aF as ToolHeadline, aG as ToolStatus, aH as TurnGate, aI as UsageBlock, aK as aheadOfDraft, aM as approvalLabel, aP as awaitingLabel, aQ as blockedByLabel, aR as blockingFailures, aS as canMergeTasks, aT as canSetDependencies, aU as canSplitTask, aV as capConflictFiles, aY as dependencyCandidates, aZ as dependentsNotice, a_ as dependentsOf, a$ as diffRows, b0 as diffStat, b1 as diffSummary, b3 as drainNext, b5 as followTurn, b6 as fromTranscript, b8 as hasHiddenDetail, b9 as holdPrompt, ba as isTaskRunning, bb as loadedSkillTokens, bc as markAction, bd as markRequestFor, be as namedRepos, bf as newTaskFields, bg as opsEditable, bh as outputLines, bi as outputPreview, bj as parseCount, bm as pastGateConfirmation, bn as reduceConversation, bp as reduceTaskLog, bq as replayTaskLog, br as resolveTaskRef, bs as resumeLabel, bt as resumeTime, bv as runnerToolSubject, bz as skillTokens, bA as skippedLabel, bB as stopTurn, bC as summarizeToolCall, bG as takeAt, bI as taskOrderLabel, bJ as taskRef, bK as taskRefOf, bL as taskRowActions, bM as taskRowView, bN as taskStartedNotice, bO as taskStatusKind, bQ as titledRefs, bR as titledTaskRef, bS as titledTaskRefOf, bU as toolHeadline, bW as truncateCheckpointSummary, bX as unsendAll, bY as unsendLatest } from './plan-utils-B6yJdpgi.js';
2
- export { A as AttemptUsage, D as DEFAULT_RUNNERS, M as ModelUsage, N as PlanUsage, O as PlannerUsage, an as UsageLine, ao as UsageRecord, ap as UsageTotals, as as addAttemptUsage, at as addModelUsage, au as addPlannerUsage, av as addUsage, aw as addUsageTotals, aA as endAttemptUsage, aE as isMeasured, aI as partedPromptUsage, aJ as pausedOnLimit, aK as planUsage, aL as plannerContextFill, aN as startAttemptUsage, aO as usageLine } from './Task-CxwnCJLi.js';
3
- import './ModeResolver-u5ZhRC8x.js';
4
- import './IRunner-C7_SSpzG.js';
1
+ export { c as ApprovalBlock, d as ApprovalStatus, B as BlockingSubject, C as CHECKPOINT_TRUNCATE_LENGTH, f as CommandBlock, g as CommandStatus, h as CompactionBlock, i as ConversationInput, j as ConversationView, D as DiffRow, k as DiffRowKind, l as DiffStat, m as DisplayBlock, E as EMPTY_CONVERSATION, n as EMPTY_HOLD, o as EMPTY_RUN, p as EMPTY_TASK_LOG, G as GatedConversation, w as LocalEntry, M as MarkdownToken, x as MessageBlock, y as MessageRole, N as NOT_STARTED, z as NO_TURN, F as NewTaskFields, J as OutputPreview, P as PlanBlock, K as PlanMarkerStatus, T as PromptHold, V as RefTask, a0 as RunnerLoadedBlock, a1 as SUPERVISOR_LEVEL_LABEL, ab as SkillLoadBlock, ad as SkillToken, ae as SubagentBlock, af as SubagentChild, ag as SubagentStatus, ak as TakenPrompt, ao as TaskLogView, au as TaskRef, av as TaskRowAction, aw as TaskRowContext, ax as TaskRowIsolation, ay as TaskRowKind, az as TaskRowPlacement, aA as TaskRowSubject, aB as TaskRowUsage, aC as TaskRowView, aD as TaskStatusKind, aE as ThinkingDisplayBlock, aF as ToolBlock, aG as ToolHeadline, aH as ToolStatus, aI as TurnGate, aJ as UsageBlock, aL as aheadOfDraft, aN as approvalLabel, aQ as awaitingLabel, aR as blockedByLabel, aS as blockingFailures, aT as canMergeTasks, aU as canSetDependencies, aV as canSplitTask, aW as capConflictFiles, aZ as dependencyCandidates, a_ as dependentsNotice, a$ as dependentsOf, b0 as diffRows, b1 as diffStat, b2 as diffSummary, b4 as drainNext, b6 as followTurn, b7 as fromTranscript, b9 as hasHiddenDetail, ba as holdPrompt, bb as isTaskRunning, bc as loadedSkillTokens, bd as markAction, be as markRequestFor, bf as markdownHtml, bg as markdownTokens, bh as namedRepos, bi as newTaskFields, bj as opsEditable, bk as outputLines, bl as outputPreview, bm as parseCount, bp as pastGateConfirmation, bq as reduceConversation, bs as reduceTaskLog, bt as replayTaskLog, bu as resolveTaskRef, bv as resumeLabel, bw as resumeTime, by as runnerToolSubject, bC as skillTokens, bD as skippedLabel, bE as stopTurn, bF as summarizeToolCall, bJ as takeAt, bL as taskOrderLabel, bM as taskRef, bN as taskRefOf, bO as taskRowActions, bP as taskRowView, bQ as taskStartedNotice, bR as taskStatusKind, bT as titledRefs, bU as titledTaskRef, bV as titledTaskRefOf, bX as toolHeadline, bZ as truncateCheckpointSummary, b_ as unsendAll, b$ as unsendLatest } from './plan-utils-gpeqV-Lp.js';
2
+ export { A as AttemptUsage, D as DEFAULT_RUNNERS, M as ModelUsage, N as PlanUsage, O as PlannerUsage, ap as UsageLine, aq as UsageRecord, ar as UsageTotals, au as addAttemptUsage, av as addModelUsage, aw as addPlannerUsage, ax as addUsage, ay as addUsageTotals, aC as endAttemptUsage, aG as isMeasured, aK as partedPromptUsage, aL as pausedOnLimit, aM as planUsage, aN as plannerContextFill, aP as startAttemptUsage, aQ as usageLine } from './Task-AfA1m4qW.js';
3
+ import './ModeResolver-DrMU-5lw.js';
4
+ import './IRunner-WwL-Bjqq.js';
5
5
  import 'child_process';
6
6
  import 'zod/v4';
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
8
  var __export = (target, all) => {
7
9
  for (var name in all)
@@ -15,6 +17,14 @@ var __copyProps = (to, from, except, desc) => {
15
17
  }
16
18
  return to;
17
19
  };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
18
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
29
 
20
30
  // src/plan-utils.ts
@@ -60,6 +70,8 @@ __export(plan_utils_exports, {
60
70
  loadedSkillTokens: () => loadedSkillTokens,
61
71
  markAction: () => markAction,
62
72
  markRequestFor: () => markRequestFor,
73
+ markdownHtml: () => markdownHtml,
74
+ markdownTokens: () => markdownTokens,
63
75
  namedRepos: () => namedRepos,
64
76
  newTaskFields: () => newTaskFields,
65
77
  opsEditable: () => opsEditable,
@@ -1653,6 +1665,36 @@ function taskStartedNotice(title, runner) {
1653
1665
  return runner ? `Started "${title}" \xB7 ${runner}` : `Started "${title}"`;
1654
1666
  }
1655
1667
 
1668
+ // src/conversation/markdown.ts
1669
+ var import_markdown_it = __toESM(require("markdown-it"));
1670
+ var md = new import_markdown_it.default({ html: false, linkify: true, breaks: true });
1671
+ md.linkify.set({ fuzzyLink: false, fuzzyEmail: false });
1672
+ md.validateLink = (url) => /^https?:/i.test(url);
1673
+ md.core.ruler.after("linkify", "image_as_text", (state) => {
1674
+ for (const block of state.tokens) {
1675
+ if (!block.children) continue;
1676
+ block.children = block.children.map((token) => {
1677
+ if (token.type !== "image") return token;
1678
+ const text2 = new state.Token("text", "", 0);
1679
+ text2.content = token.content || (token.attrGet("src") ?? "");
1680
+ return text2;
1681
+ });
1682
+ }
1683
+ });
1684
+ md.renderer.rules.link_open = (tokens, idx, options, _env, self) => {
1685
+ tokens[idx].attrSet("target", "_blank");
1686
+ tokens[idx].attrSet("rel", "noopener");
1687
+ return self.renderToken(tokens, idx, options);
1688
+ };
1689
+ md.renderer.rules.table_open = (tokens, idx, options, _env, self) => `<div class="md-table">${self.renderToken(tokens, idx, options)}`;
1690
+ md.renderer.rules.table_close = () => "</table></div>\n";
1691
+ function markdownTokens(text2) {
1692
+ return md.parse(text2, {});
1693
+ }
1694
+ function markdownHtml(text2) {
1695
+ return md.render(text2);
1696
+ }
1697
+
1656
1698
  // src/taskRow/actions.ts
1657
1699
  var UNSTARTED_AI = (t) => t.type === "ai" && NOT_STARTED.has(t.status);
1658
1700
  var QUEUED = (t) => t.status === "pending" || t.status === "approved";
@@ -1801,6 +1843,8 @@ var EMPTY_RUN = { tasks: [], runMerge: null, handoff: null, mergeResult: null };
1801
1843
  loadedSkillTokens,
1802
1844
  markAction,
1803
1845
  markRequestFor,
1846
+ markdownHtml,
1847
+ markdownTokens,
1804
1848
  namedRepos,
1805
1849
  newTaskFields,
1806
1850
  opsEditable,