@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.
- 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
package/dist/parsing.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parsePlanJson
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4FEARWTS.mjs";
|
|
4
4
|
import {
|
|
5
5
|
PlanParseError,
|
|
6
6
|
extractJsonObject,
|
|
7
7
|
stripModelNoise
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
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 {
|
|
2
|
-
import { R as RunnerModeInfo } from './ModeResolver-
|
|
3
|
-
import { B as IRunnerSession,
|
|
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
|
-
|
|
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:
|
|
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
|
-
/**
|
|
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
|
|
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
|
|
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 {
|
|
2
|
-
import { R as RunnerModeInfo } from './ModeResolver-
|
|
3
|
-
import { B as IRunnerSession,
|
|
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
|
-
|
|
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:
|
|
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
|
-
/**
|
|
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
|
|
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
|
|
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 };
|
package/dist/plan-utils.d.mts
CHANGED
|
@@ -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
|
|
2
|
-
export { A as AttemptUsage, D as DEFAULT_RUNNERS, M as ModelUsage, N as PlanUsage, O as PlannerUsage,
|
|
3
|
-
import './ModeResolver-
|
|
4
|
-
import './IRunner
|
|
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';
|
package/dist/plan-utils.d.ts
CHANGED
|
@@ -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
|
|
2
|
-
export { A as AttemptUsage, D as DEFAULT_RUNNERS, M as ModelUsage, N as PlanUsage, O as PlannerUsage,
|
|
3
|
-
import './ModeResolver-
|
|
4
|
-
import './IRunner-
|
|
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';
|
package/dist/plan-utils.js
CHANGED
|
@@ -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,
|