@ordewell/core 0.10.4 → 0.10.5
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-_effm8-b.d.ts → IFileSystem-ClBdp59f.d.ts} +1 -1
- package/dist/{IFileSystem-vyqMdL-x.d.mts → IFileSystem-Db34maxC.d.mts} +1 -1
- package/dist/{IRunner-D_UkkMbJ.d.ts → IRunner-Crkt3tHD.d.ts} +64 -3
- package/dist/{IRunner-NtTHQgLR.d.mts → IRunner-lMQIa5Wc.d.mts} +64 -3
- package/dist/{ModeResolver-wnTFsDnF.d.mts → ModeResolver-B4hhABNf.d.mts} +1 -1
- package/dist/{ModeResolver-Dy3Ef6p-.d.ts → ModeResolver-CUR5jCSU.d.ts} +1 -1
- package/dist/{Task-DZs9eKgg.d.mts → Task-D4QHjdGv.d.mts} +92 -10
- package/dist/{Task-DZs9eKgg.d.ts → Task-D4QHjdGv.d.ts} +92 -10
- package/dist/{chunk-A57ITQE7.mjs → chunk-4QLFM73A.mjs} +34 -5
- package/dist/chunk-4QLFM73A.mjs.map +1 -0
- package/dist/{chunk-FH6M5QZG.mjs → chunk-6LEA6WAM.mjs} +88 -7
- package/dist/chunk-6LEA6WAM.mjs.map +1 -0
- package/dist/{chunk-645FALZX.mjs → chunk-F3KIX7WR.mjs} +3 -3
- package/dist/{chunk-OYUSADFM.mjs → chunk-NJGID6BG.mjs} +3 -1
- package/dist/chunk-NJGID6BG.mjs.map +1 -0
- package/dist/{chunk-SM6BV6XS.mjs → chunk-RT4NQ2BZ.mjs} +3 -1
- package/dist/chunk-RT4NQ2BZ.mjs.map +1 -0
- package/dist/index.d.mts +296 -64
- package/dist/index.d.ts +296 -64
- package/dist/index.js +1576 -376
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1455 -362
- 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.map +1 -1
- package/dist/parsing.mjs +3 -3
- package/dist/{plan-utils-POIz5d8z.d.ts → plan-utils-BVJCzNvm.d.ts} +204 -19
- package/dist/{plan-utils-CtKceSsQ.d.mts → plan-utils-wI8MuDBC.d.mts} +204 -19
- package/dist/plan-utils.d.mts +4 -4
- package/dist/plan-utils.d.ts +4 -4
- package/dist/plan-utils.js +94 -5
- package/dist/plan-utils.js.map +1 -1
- package/dist/plan-utils.mjs +13 -3
- package/dist/testing.d.mts +6 -3
- package/dist/testing.d.ts +6 -3
- package/dist/testing.js +7 -0
- package/dist/testing.js.map +1 -1
- package/dist/testing.mjs +7 -2
- package/dist/testing.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-A57ITQE7.mjs.map +0 -1
- package/dist/chunk-FH6M5QZG.mjs.map +0 -1
- package/dist/chunk-OYUSADFM.mjs.map +0 -1
- package/dist/chunk-SM6BV6XS.mjs.map +0 -1
- /package/dist/{chunk-645FALZX.mjs.map → chunk-F3KIX7WR.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-F3KIX7WR.mjs";
|
|
4
4
|
import {
|
|
5
5
|
PlanParseError,
|
|
6
6
|
extractJsonObject,
|
|
7
7
|
stripModelNoise
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-4QLFM73A.mjs";
|
|
9
|
+
import "./chunk-RT4NQ2BZ.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, y as IConfig,
|
|
1
|
+
import { ah as Task, a3 as RunnerId, ap as TaskSnapshot, b as AwaitingReason, au as UsageRecord, a4 as RunnerSessionCost, d as DiscoveredModel, ae as SkillsService, a9 as SkillInfo, Y as RepoGroupLayout, I as IWorktreeIsolation, w as IsolationRun, k as IsolationHandoff, J as PlanIsolation, x as IsolationTaskRecord, ak as TaskIsolation, H as IsolationView, S as PrepareIntent, V as PreviousWork, s as IsolationOutcome, X as RepairEvidence, as as TreeSnapshot, ai as TaskDiffRead, aj as TaskDiffResult, r as IsolationMergeResult, aw as Verdict, ao as TaskSkillSnapshot, an as TaskSkillNotice, af as SubagentOutcome, L as LegacyPlanState, C as ConversationMessage, ab as SkillLoadNotice, P as PendingPlanTurn, a as AttemptUsage, M as ModelUsage, av as UsageTotals, O as PlanUsage, f as ExecutionRecord, $ as ResearchStep, a2 as RunSettings, K as PlanState, ag as SupervisorLevel, a0 as ResearchStepOutcome, Z as ResearchLogEntry, R as PlannerUsage, al as TaskIsolationState, ar as TaskUsageSummary } from './Task-D4QHjdGv.js';
|
|
2
|
+
import { R as RunnerModeInfo } from './ModeResolver-CUR5jCSU.js';
|
|
3
|
+
import { B as IRunnerSession, y as IConfig, aD as TaskMessageFrom, aq as RunnerModelRef, ai as RunnerCommand, an as RunnerMcpServer, aw as StructuredTurnEnd, j as ApprovalDecision, av as StructuredEvent, ab as QueuedTaskMessage, k as ApprovalKind, q as ApprovalSource, z as IRunner, ar as RunnerRegistry } from './IRunner-Crkt3tHD.js';
|
|
4
4
|
|
|
5
5
|
type NotificationAction = {
|
|
6
6
|
label: string;
|
|
@@ -146,11 +146,13 @@ declare class PlanStore {
|
|
|
146
146
|
unblockDependents(id: string): void;
|
|
147
147
|
setTaskVerdict(id: string, verdict: Task['verdict']): void;
|
|
148
148
|
setTaskOutputSummary(id: string, summary: Task['outputSummary']): void;
|
|
149
|
-
|
|
149
|
+
/** The owner is saved with the session it belongs to, and dropped with it. */
|
|
150
|
+
setTaskRunnerSessionId(id: string, runnerSessionId: string | undefined, owner?: RunnerId): void;
|
|
151
|
+
setCarriedFrom(id: string, runner: RunnerId): void;
|
|
150
152
|
clearCarriedFrom(id: string): void;
|
|
151
153
|
startAttemptUsage(id: string, attempt: number, runner: string, startedAt: string): void;
|
|
152
154
|
recordAttemptUsage(id: string, attempt: number, record: UsageRecord, now: string): void;
|
|
153
|
-
endAttemptUsage(id: string, attempt: number, now: string): void;
|
|
155
|
+
endAttemptUsage(id: string, attempt: number, now: string, runnerSessionCost?: RunnerSessionCost, sessionId?: string): void;
|
|
154
156
|
setTaskAttemptSkills(id: string, skills: Task['attemptSkills']): void;
|
|
155
157
|
/**
|
|
156
158
|
* Widen the plan's runner set. Retargeting a task onto a runner the plan has
|
|
@@ -177,6 +179,13 @@ interface EditCatalog {
|
|
|
177
179
|
perRunnerAllowlist?: Partial<Record<RunnerId, string[]>>;
|
|
178
180
|
/** Full (true) or Guarded: the mode a task the planner writes lands on unless it is read-only (ADR-0031). Full when absent. */
|
|
179
181
|
autonomousDefault?: boolean;
|
|
182
|
+
/**
|
|
183
|
+
* Whether a task's runner is up now. Its model is then the runner's (#106):
|
|
184
|
+
* the process was started on one and only the runner's own command moves it,
|
|
185
|
+
* so an edit from outside would leave the plan naming what is not running.
|
|
186
|
+
* Absent means none is.
|
|
187
|
+
*/
|
|
188
|
+
liveRunner?: (taskId: string) => boolean;
|
|
180
189
|
}
|
|
181
190
|
|
|
182
191
|
/**
|
|
@@ -799,6 +808,23 @@ type TaskLogEvent =
|
|
|
799
808
|
preTokens?: number;
|
|
800
809
|
postTokens?: number;
|
|
801
810
|
}
|
|
811
|
+
/**
|
|
812
|
+
* The runner's main thread moved to another model, and what the plan says
|
|
813
|
+
* once the write-back settled (#106): written from its outcome, not from the
|
|
814
|
+
* runner's event, so the line never claims an edit that did not land.
|
|
815
|
+
* `kept` says why the plan did not follow, when it did not. A log saved
|
|
816
|
+
* before the plan's side was recorded has no `plan`: it says nothing of it.
|
|
817
|
+
*/
|
|
818
|
+
| {
|
|
819
|
+
type: 'model_switched';
|
|
820
|
+
from: RunnerModelRef;
|
|
821
|
+
to: RunnerModelRef;
|
|
822
|
+
plan?: {
|
|
823
|
+
model?: RunnerModelRef;
|
|
824
|
+
effort?: string;
|
|
825
|
+
};
|
|
826
|
+
kept?: string;
|
|
827
|
+
}
|
|
802
828
|
/** What the runner loaded from the user's and the project's setup, as its process started. */
|
|
803
829
|
| {
|
|
804
830
|
type: 'runner_loaded';
|
|
@@ -940,7 +966,8 @@ declare function trimToolOutput(output: string): {
|
|
|
940
966
|
};
|
|
941
967
|
/**
|
|
942
968
|
* The log entry for one structured event, or null for what the log does not
|
|
943
|
-
* keep: background-agent launches, which the subagent's own events already
|
|
969
|
+
* keep: background-agent launches, which the subagent's own events already
|
|
970
|
+
* show, and a model change, which is logged with what the plan made of it.
|
|
944
971
|
*/
|
|
945
972
|
declare function toTaskLogEvent(event: StructuredEvent): TaskLogEvent | null;
|
|
946
973
|
/** A log as a surface is sent it, live or read back: everything but the skills' bodies. */
|
|
@@ -1078,6 +1105,8 @@ type SurfacePlanState = (Omit<Extract<PlanState, {
|
|
|
1078
1105
|
});
|
|
1079
1106
|
type SerializedPlan = {
|
|
1080
1107
|
runSettings?: LegacyPlanState['runSettings'];
|
|
1108
|
+
/** What waits on the planner's usage limit, and when it goes, so a surface can say so and offer to cancel it. */
|
|
1109
|
+
plannerResend?: LegacyPlanState['plannerResend'];
|
|
1081
1110
|
tasks: SerializedTask[];
|
|
1082
1111
|
runners: RunnerId[];
|
|
1083
1112
|
generatedAt: string;
|
|
@@ -1511,6 +1540,22 @@ interface OrchestratorObserver {
|
|
|
1511
1540
|
resumeAt: string | null;
|
|
1512
1541
|
cancelled?: true;
|
|
1513
1542
|
}): void;
|
|
1543
|
+
/**
|
|
1544
|
+
* A task's runner now answers on another model (#106). `asked` when a model
|
|
1545
|
+
* command sent through its chat chose it: the user's own choice, which the
|
|
1546
|
+
* plan is to follow. `attemptEnded` when the attempt that runs `sessionId`
|
|
1547
|
+
* is no longer the task's, so the switch says nothing of what runs next.
|
|
1548
|
+
* `effort` only where the runner reported one.
|
|
1549
|
+
*/
|
|
1550
|
+
onModelSwitched?(data: {
|
|
1551
|
+
taskId: string;
|
|
1552
|
+
sessionId: string;
|
|
1553
|
+
from: RunnerModelRef;
|
|
1554
|
+
model: RunnerModelRef;
|
|
1555
|
+
effort?: string;
|
|
1556
|
+
asked: boolean;
|
|
1557
|
+
attemptEnded: boolean;
|
|
1558
|
+
}): void;
|
|
1514
1559
|
/** A live task's runner went silent (ADR-0018's idle timer); paused while it waits on input, a checkpoint or an approval. */
|
|
1515
1560
|
onTaskIdle?(data: {
|
|
1516
1561
|
taskId: string;
|
|
@@ -1596,6 +1641,12 @@ interface TaskOrchestratorDeps {
|
|
|
1596
1641
|
skillsAt: (roots: readonly string[]) => SkillLookup;
|
|
1597
1642
|
/** What the task's last saved attempt did, or null when it left no log (ADR-0020). */
|
|
1598
1643
|
previousAttemptFromLog: (taskId: string) => string | null;
|
|
1644
|
+
/**
|
|
1645
|
+
* The newest attempt the task has a saved log for, 0 for none. An attempt's
|
|
1646
|
+
* log is saved under its number, so a new one is numbered past a log kept
|
|
1647
|
+
* from before the task had ledgers.
|
|
1648
|
+
*/
|
|
1649
|
+
lastLoggedAttempt: (taskId: string) => number;
|
|
1599
1650
|
/**
|
|
1600
1651
|
* The open run's settings, read as each automatic merge is decided rather
|
|
1601
1652
|
* than copied when the run opens, so a change to the run under way applies
|
|
@@ -1625,6 +1676,7 @@ interface TaskOrchestratorOptions {
|
|
|
1625
1676
|
workspaceEnv?: (cwd: string) => Promise<WorkspaceEnv>;
|
|
1626
1677
|
skillsAt?: (roots: readonly string[]) => SkillLookup;
|
|
1627
1678
|
previousAttemptFromLog?: (taskId: string) => string | null;
|
|
1679
|
+
lastLoggedAttempt?: (taskId: string) => number;
|
|
1628
1680
|
runSettings?: () => SchedulerRunSettings | undefined;
|
|
1629
1681
|
/** Every task is approved unless a Session supplies its record: an orchestrator on its own has no user to ask. */
|
|
1630
1682
|
isApproved?: (taskId: string) => boolean;
|
|
@@ -1683,6 +1735,12 @@ declare class TaskOrchestrator {
|
|
|
1683
1735
|
* task whose spawn always throws.
|
|
1684
1736
|
*/
|
|
1685
1737
|
private onHold;
|
|
1738
|
+
/**
|
|
1739
|
+
* Force starts queued behind dependencies the scheduler will not start them
|
|
1740
|
+
* after: outside a run it drives, or past a failed dependency, which it
|
|
1741
|
+
* never forces. Each starts once those still under way have finished.
|
|
1742
|
+
*/
|
|
1743
|
+
private queuedStarts;
|
|
1686
1744
|
/**
|
|
1687
1745
|
* Tasks Mark complete is landing after it ended their attempt: in progress
|
|
1688
1746
|
* with no attempt for as long as that takes, and not orphans for it.
|
|
@@ -1704,6 +1762,7 @@ declare class TaskOrchestrator {
|
|
|
1704
1762
|
private observers;
|
|
1705
1763
|
private skillsAt;
|
|
1706
1764
|
private previousAttemptFromLog;
|
|
1765
|
+
private lastLoggedAttempt;
|
|
1707
1766
|
private runSettings;
|
|
1708
1767
|
private isApproved;
|
|
1709
1768
|
constructor(deps: TaskOrchestratorDeps);
|
|
@@ -1820,8 +1879,9 @@ declare class TaskOrchestrator {
|
|
|
1820
1879
|
admitStart(): StartAdmission;
|
|
1821
1880
|
/**
|
|
1822
1881
|
* Something can still start that nobody has to ask for again: a start
|
|
1823
|
-
* admitted and not yet claimed,
|
|
1824
|
-
*
|
|
1882
|
+
* admitted and not yet claimed, a force start queued behind its
|
|
1883
|
+
* dependencies, or a task that resumes on its own at its usage limit's
|
|
1884
|
+
* reset. A Stop is owed to it, whether or not anything runs.
|
|
1825
1885
|
*/
|
|
1826
1886
|
get startsPending(): boolean;
|
|
1827
1887
|
/** Run `work`, which awaits before it claims, under an admission it holds throughout; it is handed the generation it was admitted under. */
|
|
@@ -2022,6 +2082,13 @@ declare class TaskOrchestrator {
|
|
|
2022
2082
|
* runner has to call first. False when no resume was scheduled for it.
|
|
2023
2083
|
*/
|
|
2024
2084
|
cancelScheduledResume(taskId: string): boolean;
|
|
2085
|
+
/**
|
|
2086
|
+
* The runner whose attempt left the task's work, when the task has been
|
|
2087
|
+
* moved off it since: a session cannot cross runners, so whatever starts
|
|
2088
|
+
* the task next is a carry-over of that work, the rule a paused task's move
|
|
2089
|
+
* follows (ADR-0018, U1).
|
|
2090
|
+
*/
|
|
2091
|
+
private movedFrom;
|
|
2025
2092
|
/**
|
|
2026
2093
|
* Run before writing assignments so cancellation sees the old runner's
|
|
2027
2094
|
* shared wait. A session cannot cross runners, so the next attempt is a
|
|
@@ -2080,16 +2147,38 @@ declare class TaskOrchestrator {
|
|
|
2080
2147
|
*/
|
|
2081
2148
|
private mayResumeAtReset;
|
|
2082
2149
|
/**
|
|
2083
|
-
* Manually start a single AI task right now
|
|
2084
|
-
*
|
|
2085
|
-
* it still needs the user's approval,
|
|
2086
|
-
*
|
|
2150
|
+
* Manually start a single AI task right now (the "force start" affordance on
|
|
2151
|
+
* a task card), past a failed dependency (ADR-0034) or a merge gate
|
|
2152
|
+
* (ADR-0020), but never past the claim: it still needs the user's approval,
|
|
2153
|
+
* a free slot, and no Stop since it was asked for, and throws
|
|
2154
|
+
* {@link TaskControlError} saying which it lacks. A dependency still under
|
|
2155
|
+
* way or yet to run is not forced past: the task is released to the
|
|
2156
|
+
* scheduler instead, which starts it once they finish, and the line saying
|
|
2157
|
+
* so is the answer.
|
|
2087
2158
|
* Reuses the scheduler's own claim so a force-started task gets the same
|
|
2088
2159
|
* augmented prompt, session tracking, and exit handling — callers must not
|
|
2089
2160
|
* re-spawn the runner themselves. No-op if the task is unknown, not an AI
|
|
2090
2161
|
* task, or already running.
|
|
2091
2162
|
*/
|
|
2092
|
-
forceStartTask(taskId: string, origin?: RunOrigin): Promise<
|
|
2163
|
+
forceStartTask(taskId: string, origin?: RunOrigin): Promise<string | undefined>;
|
|
2164
|
+
/**
|
|
2165
|
+
* A force start of a task whose dependencies are still under way or yet to
|
|
2166
|
+
* run: started now, it would build on work that is not there, so it waits
|
|
2167
|
+
* for them in the run, off any hold, and says so. Dependencies are never
|
|
2168
|
+
* bypassed silently. A blocked task is forced past its failure as asked.
|
|
2169
|
+
*/
|
|
2170
|
+
private queuedBehindDependencies;
|
|
2171
|
+
/**
|
|
2172
|
+
* A task's unmet dependencies, less the failed or blocked ones a force start
|
|
2173
|
+
* goes past. A blocked one is gone past for its failure only: the work under
|
|
2174
|
+
* way or yet to run that it waits on is still waited for, through it.
|
|
2175
|
+
*/
|
|
2176
|
+
private underWayBefore;
|
|
2177
|
+
/**
|
|
2178
|
+
* Starts the queued force starts whose dependencies have now finished. One
|
|
2179
|
+
* the scheduler now drives the run for, and nothing blocks, is left to it.
|
|
2180
|
+
*/
|
|
2181
|
+
private startQueued;
|
|
2093
2182
|
private refuseOpsDuringMerge;
|
|
2094
2183
|
/**
|
|
2095
2184
|
* A force start passes a merge gate (ADR-0020), and the surface confirmed it
|
|
@@ -2193,6 +2282,51 @@ declare class TaskOrchestrator {
|
|
|
2193
2282
|
private endAllAttempts;
|
|
2194
2283
|
}
|
|
2195
2284
|
|
|
2285
|
+
/**
|
|
2286
|
+
* What the user allows the plan to be built from right now: the enabled
|
|
2287
|
+
* runners and each runner's model allowlist. Structural, so a surface that
|
|
2288
|
+
* only holds the two lists can ask without a session.
|
|
2289
|
+
*/
|
|
2290
|
+
interface AssignmentScope {
|
|
2291
|
+
enabledRunners: readonly string[];
|
|
2292
|
+
allowlist: Readonly<Record<string, readonly string[] | undefined>>;
|
|
2293
|
+
/**
|
|
2294
|
+
* The models discovery has found per runner, where the holder has them. An
|
|
2295
|
+
* allowlist is read against them exactly as the planner's catalog reads it
|
|
2296
|
+
* (ids only another runner lists limit nothing), so a flag never says a
|
|
2297
|
+
* model is off a list the planner sees as no limit.
|
|
2298
|
+
*/
|
|
2299
|
+
models?: Readonly<Partial<Record<RunnerId, readonly DiscoveredModel[]>>>;
|
|
2300
|
+
}
|
|
2301
|
+
/** The part of a task an assignment is read from. */
|
|
2302
|
+
interface AssignedTask {
|
|
2303
|
+
type: string;
|
|
2304
|
+
status: string;
|
|
2305
|
+
assignedRunner: string;
|
|
2306
|
+
assignedModel?: {
|
|
2307
|
+
modelId: string;
|
|
2308
|
+
modelLabel?: string;
|
|
2309
|
+
};
|
|
2310
|
+
}
|
|
2311
|
+
type AssignmentIssue = {
|
|
2312
|
+
kind: 'runner-off';
|
|
2313
|
+
runner: string;
|
|
2314
|
+
} | {
|
|
2315
|
+
kind: 'model-off-list';
|
|
2316
|
+
runner: string;
|
|
2317
|
+
modelId: string;
|
|
2318
|
+
modelLabel: string;
|
|
2319
|
+
};
|
|
2320
|
+
/**
|
|
2321
|
+
* Whether a task sits outside the scope it is read against. This only names
|
|
2322
|
+
* the mismatch: such a task still runs (ADR-0003, P1) — the allowlist and the
|
|
2323
|
+
* enabled runners shape what is planned, not what is started — and the user or
|
|
2324
|
+
* the planner may move it. A runner that is off settles the matter before its
|
|
2325
|
+
* model is looked at.
|
|
2326
|
+
*/
|
|
2327
|
+
declare function assignmentIssue(task: AssignedTask, scope: AssignmentScope): AssignmentIssue | null;
|
|
2328
|
+
declare function assignmentIssueText(issue: AssignmentIssue): string;
|
|
2329
|
+
|
|
2196
2330
|
/**
|
|
2197
2331
|
* Task references: the one grammar for naming a task in a plan, both ways.
|
|
2198
2332
|
* A label is rendered from a task's order under its parent ("2", "2.1"), and
|
|
@@ -2304,10 +2438,29 @@ declare function runSettingsOf(settings: UserSettings): GlobalRunSettings;
|
|
|
2304
2438
|
declare class SettingsService {
|
|
2305
2439
|
private filePath;
|
|
2306
2440
|
private cache;
|
|
2307
|
-
private
|
|
2441
|
+
private cachedStamp;
|
|
2308
2442
|
constructor(filePath?: string);
|
|
2309
2443
|
getAll(): UserSettings;
|
|
2310
|
-
|
|
2444
|
+
/**
|
|
2445
|
+
* Every write replaces the file, so its inode changes with it; the mtime
|
|
2446
|
+
* alone cannot tell two writes apart on a filesystem whose timestamps are
|
|
2447
|
+
* coarse, and a write that shares the last one's tick stayed unseen.
|
|
2448
|
+
*/
|
|
2449
|
+
private fileStamp;
|
|
2450
|
+
/**
|
|
2451
|
+
* What a change is applied to: the file as it is now, never a copy held since
|
|
2452
|
+
* an earlier read. Another process may have saved in between, and writing
|
|
2453
|
+
* the whole file back would silently undo it.
|
|
2454
|
+
*/
|
|
2455
|
+
private current;
|
|
2456
|
+
/**
|
|
2457
|
+
* Calls `listener` when another process (or this one) saves the file. The
|
|
2458
|
+
* directory is watched, not the file: a write that swaps the file in leaves
|
|
2459
|
+
* a watch on the old one pointing at nothing.
|
|
2460
|
+
*/
|
|
2461
|
+
watch(listener: () => void): {
|
|
2462
|
+
dispose(): void;
|
|
2463
|
+
};
|
|
2311
2464
|
getModelAllowlist(runner: string): string[] | undefined;
|
|
2312
2465
|
setModelAllowlist(runner: string, ids: string[] | undefined): void;
|
|
2313
2466
|
getPlannerModel(provider: string): {
|
|
@@ -2320,6 +2473,16 @@ declare class SettingsService {
|
|
|
2320
2473
|
} | undefined): void;
|
|
2321
2474
|
getEnabledRunners(): string[] | undefined;
|
|
2322
2475
|
setEnabledRunners(ids: string[]): void;
|
|
2476
|
+
/**
|
|
2477
|
+
* Change the list from what the file holds at this moment: the change is
|
|
2478
|
+
* handed the saved list (undefined when the user never chose) and its result
|
|
2479
|
+
* is saved in the same call. A list worked out from an earlier read would
|
|
2480
|
+
* save over what another surface set since. It may be handed the list again,
|
|
2481
|
+
* when another process saved before this one could (see {@link save}).
|
|
2482
|
+
*/
|
|
2483
|
+
updateEnabledRunners(change: (saved: string[] | undefined) => string[]): string[];
|
|
2484
|
+
/** Save `ids` as the user's choice unless one is saved already, judged on the file as it is now. */
|
|
2485
|
+
setEnabledRunnersIfUnset(ids: string[]): boolean;
|
|
2323
2486
|
/**
|
|
2324
2487
|
* Full or Guarded (ADR-0001), as saved here (ADR-0030). A value set in the
|
|
2325
2488
|
* environment wins, so a script or CI run can fix its own without touching
|
|
@@ -2333,6 +2496,17 @@ declare class SettingsService {
|
|
|
2333
2496
|
/** Checks every value before writing any, so a refused change saves nothing. */
|
|
2334
2497
|
updateRunSettings(changes: Partial<GlobalRunSettings>): GlobalRunSettings;
|
|
2335
2498
|
private load;
|
|
2499
|
+
/**
|
|
2500
|
+
* Makes `change` to the file as it is now, and saves it. Another process can
|
|
2501
|
+
* save between that read and this write; the file is looked at again just
|
|
2502
|
+
* before ours replaces it, and when it moved the change is made afresh from
|
|
2503
|
+
* what that process saved, so neither save undoes the other. A file that
|
|
2504
|
+
* keeps moving is written over after {@link SAVE_TRIES} tries rather than
|
|
2505
|
+
* never. The look and the swap are one step under the file's lock
|
|
2506
|
+
* ({@link withFileLock}). A change that changes nothing writes nothing.
|
|
2507
|
+
*/
|
|
2508
|
+
private save;
|
|
2509
|
+
/** False, saving nothing, when the file is no longer the one stamped `expected`. */
|
|
2336
2510
|
private persist;
|
|
2337
2511
|
}
|
|
2338
2512
|
|
|
@@ -2837,7 +3011,7 @@ declare function skippedLabel(reason: string | null): string;
|
|
|
2837
3011
|
* for them (ADR-0035). Not a runner approval: nothing has started, so no
|
|
2838
3012
|
* runner is asking anything.
|
|
2839
3013
|
*/
|
|
2840
|
-
declare const WAITS_FOR_APPROVAL_LABEL = "
|
|
3014
|
+
declare const WAITS_FOR_APPROVAL_LABEL = "Waits for your approval";
|
|
2841
3015
|
/** Runner requests a task waits on (ADR-0018, A1); null when none do. */
|
|
2842
3016
|
declare function approvalLabel(count: number | undefined): string | null;
|
|
2843
3017
|
/**
|
|
@@ -2914,6 +3088,11 @@ interface TaskRowSubject {
|
|
|
2914
3088
|
mergeGate?: readonly string[];
|
|
2915
3089
|
forcedPastGate?: readonly string[];
|
|
2916
3090
|
attemptUsage?: readonly AttemptUsage[];
|
|
3091
|
+
assignedRunner?: string;
|
|
3092
|
+
assignedModel?: {
|
|
3093
|
+
modelId: string;
|
|
3094
|
+
modelLabel?: string;
|
|
3095
|
+
};
|
|
2917
3096
|
}
|
|
2918
3097
|
interface TaskRowIsolation {
|
|
2919
3098
|
state: TaskIsolationState;
|
|
@@ -2955,12 +3134,14 @@ interface TaskRowContext {
|
|
|
2955
3134
|
}[];
|
|
2956
3135
|
/** What a resume time is read against; the clock when absent. */
|
|
2957
3136
|
now?: Date;
|
|
3137
|
+
/** The enabled runners and allowlist an assignment is read against; without it no assignment is flagged. */
|
|
3138
|
+
runnerScope?: AssignmentScope;
|
|
2958
3139
|
}
|
|
2959
3140
|
/** Whether the row stands for an AI task, a manual one, or an ops task (ADR-0020). */
|
|
2960
3141
|
type TaskRowKind = 'ai' | 'user' | 'ops';
|
|
2961
|
-
|
|
3142
|
+
/** The task's whole spend (see `taskUsageSummary`); `attempt` is the latest one, 0 before any reported. */
|
|
3143
|
+
interface TaskRowUsage extends Pick<TaskUsageSummary, 'totals' | 'contextFill'> {
|
|
2962
3144
|
attempt: number;
|
|
2963
|
-
wallTimeMs?: number;
|
|
2964
3145
|
}
|
|
2965
3146
|
interface TaskRowView {
|
|
2966
3147
|
usage: TaskRowUsage | null;
|
|
@@ -2978,6 +3159,10 @@ interface TaskRowView {
|
|
|
2978
3159
|
approvals: string | null;
|
|
2979
3160
|
/** That it waits for the user's approval to start, in sentence case; null once it started, or when it needs none. */
|
|
2980
3161
|
waitsForApproval: string | null;
|
|
3162
|
+
/** Why the task's runner or model is one the user has since moved away from, in sentence case; null when it is not. The task still runs. */
|
|
3163
|
+
assignmentFlag: string | null;
|
|
3164
|
+
/** What the flag means for this task as it stands (a failed one runs again only if retried); set exactly when `assignmentFlag` is. */
|
|
3165
|
+
assignmentConsequence: string | null;
|
|
2981
3166
|
/** The task's mode is tagged autonomous: it runs without permission prompts. */
|
|
2982
3167
|
autonomous: boolean;
|
|
2983
3168
|
/** The repos its isolated work changed, by path; empty for a group of one. */
|
|
@@ -3075,4 +3260,4 @@ declare function parseSwitch(arg: string): boolean | null;
|
|
|
3075
3260
|
/** A whole number at least `min`, as typed; null for anything else. */
|
|
3076
3261
|
declare function parseCount(arg: string | undefined, min: number): number | null;
|
|
3077
3262
|
|
|
3078
|
-
export { type
|
|
3263
|
+
export { type RunMergeView as $, ACT_RISK as A, type BlockingSubject as B, CHECKPOINT_TRUNCATE_LENGTH as C, type DiffRow as D, EMPTY_CONVERSATION as E, type MessageBlock as F, type GatedConversation as G, type HeldEdit as H, type INotification as I, type MessageRole as J, NO_TURN as K, type LiveTail as L, type MarkdownToken as M, NOT_STARTED as N, type NewTaskFields as O, type NotificationAction as P, type OrchestratorObserver as Q, type OutputPreview as R, type PlanBlock as S, type PlanMarkerStatus as T, type PlanSnapshot as U, PlanStore as V, type PlannerModes as W, type PromptHold as X, RUN_SETTINGS_DEFAULTS as Y, type RefTask as Z, type RunInput as _, AUTORUN_RISK as a, blockingFailures as a$, RunSettingsError as a0, type RunTask as a1, type RunTaskStatus as a2, type RunView as a3, type RunnerLoadedBlock as a4, STOPPED_BEFORE_START as a5, SUPERVISOR_LEVEL_LABEL as a6, type SerializedConversationMessage as a7, type SerializedPendingTurn as a8, type SerializedPlan as a9, type TaskRef as aA, type TaskRowAction as aB, type TaskRowContext as aC, type TaskRowIsolation as aD, type TaskRowKind as aE, type TaskRowPlacement as aF, type TaskRowSubject as aG, type TaskRowUsage as aH, type TaskRowView as aI, type TaskStatusKind as aJ, type ThinkingDisplayBlock as aK, type ToolBlock as aL, type ToolHeadline as aM, type ToolStatus as aN, type TurnGate as aO, type UsageBlock as aP, type UserSettings as aQ, WAITS_FOR_APPROVAL_LABEL as aR, aheadOfDraft as aS, applyTaskOps as aT, approvalLabel as aU, assignmentIssue as aV, assignmentIssueText as aW, automergeSummary as aX, autorunSummary as aY, awaitingLabel as aZ, blockedByLabel as a_, type SerializedTask as aa, type SerializedTaskStatus as ab, type SessionBroadcaster as ac, type SessionMessage as ad, type SessionNotice as ae, SettingsService as af, type SkillLoadBlock as ag, type SkillLookup as ah, type SkillToken as ai, type StartAdmission as aj, type SubagentBlock as ak, type SubagentChild as al, type SubagentStatus as am, type SurfacePlan as an, type SurfacePlanState as ao, type SurfaceTask as ap, type TakenPrompt as aq, type TaskAttemptSnapshot as ar, TaskControlError as as, type TaskLogEvent as at, type TaskLogView as au, type TaskOp as av, TaskOrchestrator as aw, type TaskOrchestratorDeps as ax, type TaskOrchestratorOptions as ay, type TaskOutputSource as az, type ApplyTaskOpsResult as b, taskStatusKind as b$, canMergeTasks as b0, canSetDependencies as b1, canSplitTask as b2, capConflictFiles as b3, classifyOutcome as b4, coalesceTaskLog as b5, dependencyCandidates as b6, dependentsNotice as b7, dependentsOf as b8, diffRows as b9, reduceConversation as bA, reduceRun as bB, reduceTaskLog as bC, replayTaskLog as bD, resolveTaskRef as bE, resumeLabel as bF, resumeTime as bG, runSettingsOf as bH, runnerToolSubject as bI, serializePlan as bJ, serializeTask as bK, serializeTaskStatus as bL, skillTokens as bM, skippedLabel as bN, stopTurn as bO, summarizeToolCall as bP, supervisorSummary as bQ, surfacePlan as bR, surfacePlanState as bS, takeAt as bT, taskLogForSurface as bU, taskOrderLabel as bV, taskRef as bW, taskRefOf as bX, taskRowActions as bY, taskRowView as bZ, taskStartedNotice as b_, diffStat as ba, diffSummary as bb, digestTaskLog as bc, drainNext as bd, executionSummary as be, followTurn as bf, fromTranscript as bg, getSettingsPath as bh, hasHiddenDetail as bi, holdPrompt as bj, isTaskRunning as bk, loadedSkillTokens as bl, markAction as bm, markRequestFor as bn, markdownHtml as bo, markdownTokens as bp, namedRepos as bq, newTaskFields as br, opsEditable as bs, outputLines as bt, outputPreview as bu, parseCount as bv, parseSwitch as bw, parseTaskOpsJson as bx, pastGateConfirmation as by, reconcileApprovals as bz, type ApprovalBlock as c, textHasTaskOps as c0, titledRefs as c1, titledTaskRef as c2, titledTaskRefOf as c3, toTaskLogEvent as c4, toolHeadline as c5, trimToolOutput as c6, truncateCheckpointSummary as c7, unsendAll as c8, unsendLatest as c9, type ApprovalStatus as d, type AssignmentIssue as e, type AssignmentScope as f, type AutoMergeTrigger as g, type CommandBlock as h, type CommandStatus as i, type CompactionBlock as j, type ConversationInput as k, type ConversationView as l, type DiffRowKind as m, type DiffStat as n, type DisplayBlock as o, EMPTY_HOLD as p, EMPTY_RUN as q, EMPTY_TASK_LOG as r, type EditCatalog as s, type ExecutionSummary as t, type GlobalRunSettings as u, type HeldEditMark as v, type IsolatedExecution as w, IsolationRunController as x, type LiveTailOptions as y, type LocalEntry as z };
|