@ordewell/core 0.12.1 → 0.12.3

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 (44) hide show
  1. package/dist/{ModeResolver-CA2fUU9h.d.mts → ModeResolver-CkZnbIqs.d.mts} +1 -1
  2. package/dist/{ModeResolver-B64aUZXJ.d.ts → ModeResolver-DS-aCVOP.d.ts} +1 -1
  3. package/dist/{Task-CxGgN6I0.d.mts → Task-D3O49EUo.d.mts} +43 -6
  4. package/dist/{Task-CxGgN6I0.d.ts → Task-D3O49EUo.d.ts} +43 -6
  5. package/dist/{chunk-RZ23BMVR.mjs → chunk-3S5IVTZM.mjs} +80 -22
  6. package/dist/chunk-3S5IVTZM.mjs.map +1 -0
  7. package/dist/{chunk-FX33UKAD.mjs → chunk-IOYBL3E5.mjs} +3 -3
  8. package/dist/{chunk-UDUATSCJ.mjs → chunk-MJKCU4U7.mjs} +1 -1
  9. package/dist/{chunk-UDUATSCJ.mjs.map → chunk-MJKCU4U7.mjs.map} +1 -1
  10. package/dist/{chunk-PKJTN2PD.mjs → chunk-POD3KZQW.mjs} +7 -1
  11. package/dist/chunk-POD3KZQW.mjs.map +1 -0
  12. package/dist/{chunk-2IFKPYPO.mjs → chunk-YZDWWXCB.mjs} +58 -17
  13. package/dist/chunk-YZDWWXCB.mjs.map +1 -0
  14. package/dist/{eventStore-CTCSKS9E.d.ts → eventStore-BcoMsZtU.d.mts} +23 -7
  15. package/dist/{eventStore-CcB8yELZ.d.mts → eventStore-CSFKy48Y.d.ts} +23 -7
  16. package/dist/index.d.mts +248 -112
  17. package/dist/index.d.ts +248 -112
  18. package/dist/index.js +2576 -1104
  19. package/dist/index.js.map +1 -1
  20. package/dist/index.mjs +2240 -866
  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 +43 -15
  25. package/dist/parsing.js.map +1 -1
  26. package/dist/parsing.mjs +3 -3
  27. package/dist/plan-utils.d.mts +27 -5
  28. package/dist/plan-utils.d.ts +27 -5
  29. package/dist/plan-utils.js +99 -14
  30. package/dist/plan-utils.js.map +1 -1
  31. package/dist/plan-utils.mjs +47 -3
  32. package/dist/plan-utils.mjs.map +1 -1
  33. package/dist/{runSettingsText-DFVpe6aU.d.mts → runSettingsText-C6eto6Uv.d.ts} +550 -26
  34. package/dist/{runSettingsText-lKLDsyli.d.ts → runSettingsText-DnzSrB0c.d.mts} +550 -26
  35. package/dist/testing.d.mts +2 -2
  36. package/dist/testing.d.ts +2 -2
  37. package/dist/testing.js.map +1 -1
  38. package/dist/testing.mjs +2 -2
  39. package/docker/task.Dockerfile +7 -4
  40. package/package.json +1 -1
  41. package/dist/chunk-2IFKPYPO.mjs.map +0 -1
  42. package/dist/chunk-PKJTN2PD.mjs.map +0 -1
  43. package/dist/chunk-RZ23BMVR.mjs.map +0 -1
  44. /package/dist/{chunk-FX33UKAD.mjs.map → chunk-IOYBL3E5.mjs.map} +0 -0
package/dist/parsing.mjs CHANGED
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  parsePlanJson
3
- } from "./chunk-FX33UKAD.mjs";
3
+ } from "./chunk-IOYBL3E5.mjs";
4
4
  import {
5
5
  PlanParseError,
6
6
  extractJsonObject,
7
7
  stripModelNoise
8
- } from "./chunk-2IFKPYPO.mjs";
9
- import "./chunk-PKJTN2PD.mjs";
8
+ } from "./chunk-YZDWWXCB.mjs";
9
+ import "./chunk-POD3KZQW.mjs";
10
10
 
11
11
  // src/services/PartialPlanParser.ts
12
12
  function parsePartialPlan(partial) {
@@ -1,9 +1,31 @@
1
- export { b as AccountLimitBucket, c as AccountLimitSnapshot, d as AccountLimitStatus, e as AccountLimitWindow, l as ApprovalBlock, n as ApprovalStatus, s as AssignmentIssue, t as AssignmentScope, B as BlockingSubject, w as CHECKPOINT_TRUNCATE_LENGTH, F as CommandBlock, J as CommandStatus, L as CompactionBlock, M as CompactionStatus, U as ConversationInput, Y as ConversationView, _ as DELEGATION_OFFERED, a2 as DiffRow, a3 as DiffRowKind, a4 as DiffStat, a5 as DisplayBlock, a6 as EMPTY_CONVERSATION, a7 as EMPTY_HOLD, a8 as EMPTY_RUN, a9 as EMPTY_TASK_LOG, aa as EMPTY_TASK_LOG_FOLLOW, ap as GatedConversation, at as HandoffBlock, au as HandoffForkRepo, av as HandoffPeekSubject, ax as IDLE_ACTIVITY, aB as IsolationPreviewNotice, aL as LocalEntry, aM as LoopCheckFacts, aN as LoopCheckState, aQ as MarkdownToken, aU as MessageBlock, aV as MessageRole, aX as NOT_STARTED, aY as NO_TURN, aZ as NewTaskFields, b6 as OutputPreview, b7 as OverrideDirection, b8 as PLANNED_WITH_LABEL, bc as PlanBlock, bd as PlanBlocks, bf as PlanMarkerStatus, bB as PromptHold, bC as REPORT_PREVIEW_LINES, bF as RefTask, c0 as RunnerLoadedBlock, c2 as STALLED_LABEL, c4 as STOPPING_LABEL, c5 as SUPERVISOR_LEVEL_LABEL, cq as SkillLoadBlock, cr as SkillToken, cw as SubagentBlock, cx as SubagentChild, cy as SubagentStatus, cB as SubtreeItemView, cC as SubtreeView, cM as TakenPrompt, cN as TaskAction, cO as TaskActivity, cR as TaskLogBatch, cT as TaskLogFollow, cU as TaskLogFollowInput, cV as TaskLogHeaderKind, cW as TaskLogHeaderTask, cX as TaskLogHeaderUsage, cY as TaskLogHeaderView, c_ as TaskLogView, d5 as TaskPlacement, d9 as TaskRef, dc as TaskRowAction, dd as TaskRowContext, de as TaskRowDelegated, df as TaskRowHandoff, dg as TaskRowIsolation, dh as TaskRowKind, di as TaskRowLoop, dj as TaskRowPlacement, dk as TaskRowSubject, dl as TaskRowUsage, dm as TaskRowView, dn as TaskRunFacts, dp as TaskStatusKind, dq as ThinkingDisplayBlock, dr as ToolBlock, ds as ToolHeadline, dt as ToolStatus, dv as TreeTask, dx as TurnGate, dy as UsageBlock, dA as WAITS_FOR_APPROVAL_LABEL, dB as WakeUpItem, dJ as accountLimitPercentText, dK as accountLimitWindowLabel, dL as accountLimitsOf, dM as accountLimitsText, dN as accountLimitsTitle, dO as activityLabel, dP as aheadOfDraft, dR as approvalKindText, dS as approvalLabel, dT as approvalStatusText, dU as assignedRunnerOf, dV as assignmentIssue, dW as assignmentIssueText, dX as attachingLabel, d_ as awaitingLabel, d$ as blockNotice, e0 as blockNotices, e1 as blockedByLabel, e2 as blockingFailures, e3 as canMergeTasks, e4 as canSetDependencies, e5 as canSplitTask, e6 as capConflictFiles, e7 as cardEditNeedsUnstarted, e8 as cardEditable, eb as closeTurn, ed as compactionText, ee as confirmedOverride, eg as delegatedRowView, ei as dependencyCandidates, ej as dependentsNotice, ek as dependentsOf, en as describeIsolationPreview, eo as describeMergeResult, eq as diffRows, er as diffStat, es as diffSummary, eu as drainNext, ev as editableWhileRunning, ew as elapsedSince, ez as followTaskLog, eA as followTurn, eB as formatElapsed, eC as fromTranscript, eE as handoffBaseLine, eF as handoffBranchName, eG as handoffFindingsText, eH as handoffPeekParts, eI as hasAccountLimits, eJ as hasHiddenDetail, eK as hasLongReport, eL as holdLabel, eM as holdPrompt, eN as isFileEditTool, eO as isRepoGroup, eP as isTaskRunning, eR as loadedSkillTokens, eS as logContinues, eT as logResumes, eU as loopBodyLabel, eV as loopBodyRound, eW as loopCheckLabel, eX as loopCheckState, eY as loopLeaveNotice, eZ as loopRowParts, e_ as manualOverrideConfirmation, e$ as manualOverrideStopFirst, f1 as markAction, f2 as markdownHtml, f3 as markdownTokens, f4 as mergeOutcome, f5 as mergePastChecksConfirmation, f7 as namedRepos, f8 as newTaskFields, f9 as noExecutorRefusal, fc as opsEditable, fd as outputLines, fe as outputPreview, ff as overrideNeedsConfirmation, fg as parseCount, fl as pastGateConfirmation, fm as planBlocks, fn as planMarkerParts, fv as receiptLabel, fw as reconcileApprovals, fz as reduceConversation, fB as reduceTaskLog, fD as repairWaitLabel, fE as repairedLanded, fF as repairedNotice, fG as repeatingChecks, fH as replayTaskLog, fI as repoBaseLine, fJ as repoResultLines, fN as resolveTaskRef, fO as resolveUserTaskRef, fP as resumeLabel, fQ as resumeTime, fR as revertEffect, fS as revertListLine, fT as revertTaskRef, fU as runHoldsEditors, fW as runnerToolSubject, g1 as skillTokens, g2 as skippedLabel, g3 as stopTurn, g4 as subtreeIds, g5 as subtreeView, g6 as summarizeToolCall, ga as takeAt, gb as taskActionCommand, gc as taskActivity, gd as taskChatAvailable, ge as taskLogCommands, gg as taskLogHeaderView, gh as taskOrderLabel, gi as taskPlacement, gk as taskRef, gl as taskRefOf, gm as taskRowActions, gn as taskRowView, go as taskStartedNotice, gp as taskStatusKind, gs as titledRefs, gt as titledTaskRef, gu as titledTaskRefOf, gw as toolHeadline, gz as truncateCheckpointSummary, gA as unsendAll, gB as unsendLatest, gC as wakeUpItems, gD as walkPlan } from './runSettingsText-DFVpe6aU.mjs';
2
- export { a as AttemptUsage, g as ContextFill, i as CostProvenance, k as DEFAULT_RUNNERS, t as FindingSeverity, z as HandoffArtifact, K as HandoffDigest, L as HandoffEvidence, M as HandoffFinding, ar as ModelUsage, av as PatchView, aA as PlanUsage, aG as PlannerUsage, aV as ReportedWindow, b4 as RunnerSessionCost, b5 as SEVERITY_LABEL, ba as SessionBilling, bl as StoredHandoff, bv as TaskLoop, bD as TaskUsageSummary, bF as UsageLine, bG as UsageRecord, bH as UsageTotals, bM as addAttemptUsage, bN as addModelUsage, bO as addPlannerUsage, bP as addUsage, bQ as addUsageTotals, bS as betweenRounds, bW as checkOf, bZ as contextMeterText, b_ as contextMeterTitle, b$ as costText, c0 as countedSessionCost, c5 as endAttemptUsage, ca as formatCost, cb as formatTokenCount, cf as handoffReferenceText, cj as heldWords, cm as isMeasured, cp as loopRemovalRefusal, cq as loopRoundOf, ct as modelCostTitle, cy as outOfRounds, cD as partedPromptUsage, cJ as patchView, cK as pausedOnLimit, cM as planUsage, cN as plannerContextFill, cS as resumedSessionWindow, cW as savedPatchView, cX as savedPatchViews, c$ as scriptTaskText, d0 as severityLabel, d1 as spentTokens, d2 as startAttemptUsage, d4 as subagentCostTitle, d5 as taskUsageSummary, d6 as tasksTotalText, d9 as usageLine, da as usageText, de as worstSeverity } from './Task-CxGgN6I0.mjs';
3
- import './eventStore-CcB8yELZ.mjs';
1
+ export { b as AccountLimitBucket, c as AccountLimitSnapshot, d as AccountLimitStatus, e as AccountLimitWindow, l as ApprovalBlock, n as ApprovalStatus, s as AssignmentIssue, t as AssignmentScope, B as BlockingSubject, w as CHECKPOINT_TRUNCATE_LENGTH, P as CommandBlock, T as CommandStatus, V as CompactionBlock, W as CompactionStatus, a7 as ConversationInput, ab as ConversationView, ad as DELEGATION_OFFERED, ah as DiffRow, ai as DiffRowKind, aj as DiffStat, ak as DisplayBlock, am as EMPTY_CONVERSATION, an as EMPTY_HOLD, ao as EMPTY_RUN, ap as EMPTY_TASK_LOG, aq as EMPTY_TASK_LOG_FOLLOW, aF as GatedConversation, aJ as HandoffBlock, aK as HandoffForkRepo, aL as HandoffPeekSubject, aN as IDLE_ACTIVITY, aR as IsolationPreviewNotice, a$ as LocalEntry, b0 as LoopCheckFacts, b1 as LoopCheckState, b4 as MarkdownToken, b8 as MessageBlock, b9 as MessageRole, bb as NOT_STARTED, bc as NO_TURN, bd as NewTaskFields, bm as OutputPreview, bn as OverrideDirection, bo as PLANNED_WITH_LABEL, bs as PlanBlock, bt as PlanBlocks, bv as PlanMarkerStatus, bR as PromptHold, bS as REPORT_PREVIEW_LINES, bV as RefTask, cg as RunnerLoadedBlock, ci as STALLED_LABEL, ck as STOPPING_LABEL, cl as SUBPLANNER_ACCOUNTING, cm as SUBPLANNER_CHILD, cn as SUBPLANNER_SCOPE, co as SUPERVISOR_LEVEL_LABEL, cJ as SkillLoadBlock, cK as SkillToken, cP as SubagentBlock, cQ as SubagentChild, cR as SubagentStatus, cU as SubtreeItemView, cV as SubtreeView, d3 as TakenPrompt, d4 as TaskAction, d5 as TaskActivity, d8 as TaskLogBatch, da as TaskLogFollow, db as TaskLogFollowInput, dc as TaskLogHeaderKind, dd as TaskLogHeaderTask, de as TaskLogHeaderUsage, df as TaskLogHeaderView, dh as TaskLogView, dp as TaskPlacement, dt as TaskRef, dw as TaskRowAction, dx as TaskRowContext, dy as TaskRowDelegated, dz as TaskRowHandoff, dA as TaskRowIsolation, dB as TaskRowKind, dC as TaskRowLoop, dD as TaskRowPlacement, dE as TaskRowSubject, dF as TaskRowUsage, dG as TaskRowView, dH as TaskRunFacts, dI as TaskStatusKind, dJ as ThinkingDisplayBlock, dK as ToolBlock, dL as ToolHeadline, dM as ToolStatus, dO as TreeTask, dQ as TurnGate, dR as UsageBlock, dT as WAITS_FOR_APPROVAL_LABEL, dU as WakeUpItem, e0 as accountLimitPercentText, e1 as accountLimitWindowLabel, e2 as accountLimitsOf, e3 as accountLimitsText, e4 as accountLimitsTitle, e5 as activityLabel, e6 as aheadOfDraft, e8 as approvalKindText, e9 as approvalLabel, ea as approvalStatusText, eb as assignedRunnerOf, ec as assignmentIssue, ed as assignmentIssueText, ee as attachingLabel, eh as awaitingLabel, ei as blockNotice, ej as blockNotices, ek as blockedByLabel, el as blockingFailures, em as canMergeTasks, en as canSetDependencies, eo as canSplitTask, ep as capConflictFiles, eq as cardEditNeedsUnstarted, er as cardEditable, ev as closeTurn, ex as compactionText, ey as confirmedOverride, eA as containersOffered, eC as delegatedRowView, eE as dependencyCandidates, eF as dependentsNotice, eG as dependentsOf, eK as describeIsolationPreview, eL as describeMergeResult, eO as diffRows, eP as diffStat, eQ as diffSummary, eS as drainNext, eT as editableWhileRunning, eU as elapsedSince, eX as followTaskLog, eY as followTurn, eZ as formatElapsed, e_ as fromTranscript, f0 as handoffBaseLine, f1 as handoffBranchName, f2 as handoffFindingsText, f3 as handoffPeekParts, f4 as hasAccountLimits, f5 as hasHiddenDetail, f6 as hasLongReport, f7 as holdLabel, f8 as holdPrompt, f9 as isFileEditTool, fa as isRepoGroup, fb as isTaskRunning, fc as keptDelegationBudget, fe as loadedSkillTokens, ff as logContinues, fg as logResumes, fh as loopBodyLabel, fi as loopBodyRound, fj as loopCheckLabel, fk as loopCheckState, fl as loopLeaveNotice, fm as loopRowParts, fn as manualOverrideConfirmation, fo as manualOverrideStopFirst, fq as markAction, fr as markdownHtml, fs as markdownTokens, ft as mergeOutcome, fu as mergePastChecksConfirmation, fw as namedRepos, fx as newTaskFields, fy as noExecutorRefusal, fB as opsEditable, fC as outputLines, fD as outputPreview, fE as overrideNeedsConfirmation, fF as parseCount, fK as pastGateConfirmation, fL as planBlocks, fM as planMarkerParts, fU as receiptLabel, fV as reconcileApprovals, fY as reduceConversation, f_ as reduceTaskLog, f$ as rememberDelegationBudget, g1 as repairWaitLabel, g2 as repairedLanded, g3 as repairedNotice, g4 as repeatingChecks, g5 as replayTaskLog, g6 as repoBaseLine, g7 as repoResultLines, gb as resolveTaskRef, gc as resolveUserTaskRef, gd as resumeLabel, ge as resumeTime, gf as revertEffect, gg as revertListLine, gh as revertTaskRef, gi as runHoldsEditors, gk as runnerToolSubject, gr as skillTokens, gs as skippedLabel, gt as stopTurn, gu as subtreeIds, gv as subtreeView, gw as summarizeToolCall, gA as takeAt, gB as taskActionCommand, gC as taskActivity, gD as taskChatAvailable, gE as taskLogCommands, gG as taskLogHeaderView, gH as taskOrderLabel, gI as taskPlacement, gK as taskRef, gL as taskRefOf, gM as taskRowActions, gN as taskRowView, gO as taskStartedNotice, gP as taskStatusKind, gS as titledRefs, gT as titledTaskRef, gU as titledTaskRefOf, gW as toolHeadline, gZ as truncateCheckpointSummary, g_ as unsendAll, g$ as unsendLatest, h0 as wakeUpItems, h1 as walkPlan } from './runSettingsText-DnzSrB0c.mjs';
2
+ export { a as AttemptUsage, g as ContextFill, i as CostProvenance, k as DEFAULT_RUNNERS, t as FindingSeverity, z as HandoffArtifact, K as HandoffDigest, L as HandoffEvidence, M as HandoffFinding, ar as ModelUsage, av as PatchView, aA as PlanUsage, aH as PlannerUsage, aW as ReportedWindow, b5 as RunnerSessionCost, b6 as SEVERITY_LABEL, bb as SessionBilling, bm as StoredHandoff, bw as TaskLoop, bE as TaskUsageSummary, bG as UsageLine, bH as UsageRecord, bI as UsageTotals, bN as addAttemptUsage, bO as addModelUsage, bP as addPlannerUsage, bQ as addUsage, bR as addUsageTotals, bT as betweenRounds, bX as checkOf, b_ as contextMeterText, b$ as contextMeterTitle, c0 as costText, c1 as countedSessionCost, c6 as endAttemptUsage, cb as formatCost, cc as formatTokenCount, cg as handoffReferenceText, ck as heldWords, cn as isMeasured, cq as loopRemovalRefusal, cr as loopRoundOf, cu as modelCostTitle, cz as outOfRounds, cF as partedPromptUsage, cL as patchView, cM as pausedOnLimit, cO as planUsage, cP as plannerContextFill, cU as resumedSessionWindow, cY as savedPatchView, cZ as savedPatchViews, d1 as scriptTaskText, d2 as severityLabel, d3 as spentTokens, d4 as startAttemptUsage, d6 as subagentCostTitle, d7 as taskUsageSummary, d8 as tasksTotalText, db as usageLine, dc as usageText, dg as worstSeverity } from './Task-D3O49EUo.mjs';
3
+ import './eventStore-BcoMsZtU.mjs';
4
4
  import 'child_process';
5
5
  import 'zod/v4';
6
- import './ModeResolver-CA2fUU9h.mjs';
6
+ import './ModeResolver-CkZnbIqs.mjs';
7
+
8
+ /**
9
+ * The tips an empty planner chat composer shows (#137), one table for every
10
+ * surface so the TUI and the webview agree on the wording and how often each
11
+ * comes round. A surface offers only the tips for the commands it answers.
12
+ */
13
+ interface ComposerTip {
14
+ /** The built-in planner chat command the tip names, without its slash. */
15
+ command: string;
16
+ /** How many times per cycle the tip comes round. */
17
+ weight: number;
18
+ /** Short enough to fit after the prompt and caret on an 80-column terminal. */
19
+ text: string;
20
+ }
21
+ declare const COMPOSER_TIPS: readonly ComposerTip[];
22
+ /**
23
+ * The tip for the `seq`-th time the composer has been empty, among those for
24
+ * the commands the surface answers, or null when it answers none of them. The
25
+ * same `seq` always gives the same tip, so the surface decides when a new one
26
+ * shows by when it moves `seq` on, and its rendering stays a function of state.
27
+ */
28
+ declare function composerTip(seq: number, answers: ReadonlySet<string>): string | null;
7
29
 
8
30
  /** A name or a path on a line of Ordewell's: as it stands, or quoted where it would break that line. */
9
31
  declare function onOneLine(text: string): string;
@@ -22,4 +44,4 @@ declare function clampThinkingEffort(effort: string | undefined, variants: {
22
44
  id: string;
23
45
  }[]): string | undefined;
24
46
 
25
- export { clampThinkingEffort, onOneLine };
47
+ export { COMPOSER_TIPS, type ComposerTip, clampThinkingEffort, composerTip, onOneLine };
@@ -1,9 +1,31 @@
1
- export { b as AccountLimitBucket, c as AccountLimitSnapshot, d as AccountLimitStatus, e as AccountLimitWindow, l as ApprovalBlock, n as ApprovalStatus, s as AssignmentIssue, t as AssignmentScope, B as BlockingSubject, w as CHECKPOINT_TRUNCATE_LENGTH, F as CommandBlock, J as CommandStatus, L as CompactionBlock, M as CompactionStatus, U as ConversationInput, Y as ConversationView, _ as DELEGATION_OFFERED, a2 as DiffRow, a3 as DiffRowKind, a4 as DiffStat, a5 as DisplayBlock, a6 as EMPTY_CONVERSATION, a7 as EMPTY_HOLD, a8 as EMPTY_RUN, a9 as EMPTY_TASK_LOG, aa as EMPTY_TASK_LOG_FOLLOW, ap as GatedConversation, at as HandoffBlock, au as HandoffForkRepo, av as HandoffPeekSubject, ax as IDLE_ACTIVITY, aB as IsolationPreviewNotice, aL as LocalEntry, aM as LoopCheckFacts, aN as LoopCheckState, aQ as MarkdownToken, aU as MessageBlock, aV as MessageRole, aX as NOT_STARTED, aY as NO_TURN, aZ as NewTaskFields, b6 as OutputPreview, b7 as OverrideDirection, b8 as PLANNED_WITH_LABEL, bc as PlanBlock, bd as PlanBlocks, bf as PlanMarkerStatus, bB as PromptHold, bC as REPORT_PREVIEW_LINES, bF as RefTask, c0 as RunnerLoadedBlock, c2 as STALLED_LABEL, c4 as STOPPING_LABEL, c5 as SUPERVISOR_LEVEL_LABEL, cq as SkillLoadBlock, cr as SkillToken, cw as SubagentBlock, cx as SubagentChild, cy as SubagentStatus, cB as SubtreeItemView, cC as SubtreeView, cM as TakenPrompt, cN as TaskAction, cO as TaskActivity, cR as TaskLogBatch, cT as TaskLogFollow, cU as TaskLogFollowInput, cV as TaskLogHeaderKind, cW as TaskLogHeaderTask, cX as TaskLogHeaderUsage, cY as TaskLogHeaderView, c_ as TaskLogView, d5 as TaskPlacement, d9 as TaskRef, dc as TaskRowAction, dd as TaskRowContext, de as TaskRowDelegated, df as TaskRowHandoff, dg as TaskRowIsolation, dh as TaskRowKind, di as TaskRowLoop, dj as TaskRowPlacement, dk as TaskRowSubject, dl as TaskRowUsage, dm as TaskRowView, dn as TaskRunFacts, dp as TaskStatusKind, dq as ThinkingDisplayBlock, dr as ToolBlock, ds as ToolHeadline, dt as ToolStatus, dv as TreeTask, dx as TurnGate, dy as UsageBlock, dA as WAITS_FOR_APPROVAL_LABEL, dB as WakeUpItem, dJ as accountLimitPercentText, dK as accountLimitWindowLabel, dL as accountLimitsOf, dM as accountLimitsText, dN as accountLimitsTitle, dO as activityLabel, dP as aheadOfDraft, dR as approvalKindText, dS as approvalLabel, dT as approvalStatusText, dU as assignedRunnerOf, dV as assignmentIssue, dW as assignmentIssueText, dX as attachingLabel, d_ as awaitingLabel, d$ as blockNotice, e0 as blockNotices, e1 as blockedByLabel, e2 as blockingFailures, e3 as canMergeTasks, e4 as canSetDependencies, e5 as canSplitTask, e6 as capConflictFiles, e7 as cardEditNeedsUnstarted, e8 as cardEditable, eb as closeTurn, ed as compactionText, ee as confirmedOverride, eg as delegatedRowView, ei as dependencyCandidates, ej as dependentsNotice, ek as dependentsOf, en as describeIsolationPreview, eo as describeMergeResult, eq as diffRows, er as diffStat, es as diffSummary, eu as drainNext, ev as editableWhileRunning, ew as elapsedSince, ez as followTaskLog, eA as followTurn, eB as formatElapsed, eC as fromTranscript, eE as handoffBaseLine, eF as handoffBranchName, eG as handoffFindingsText, eH as handoffPeekParts, eI as hasAccountLimits, eJ as hasHiddenDetail, eK as hasLongReport, eL as holdLabel, eM as holdPrompt, eN as isFileEditTool, eO as isRepoGroup, eP as isTaskRunning, eR as loadedSkillTokens, eS as logContinues, eT as logResumes, eU as loopBodyLabel, eV as loopBodyRound, eW as loopCheckLabel, eX as loopCheckState, eY as loopLeaveNotice, eZ as loopRowParts, e_ as manualOverrideConfirmation, e$ as manualOverrideStopFirst, f1 as markAction, f2 as markdownHtml, f3 as markdownTokens, f4 as mergeOutcome, f5 as mergePastChecksConfirmation, f7 as namedRepos, f8 as newTaskFields, f9 as noExecutorRefusal, fc as opsEditable, fd as outputLines, fe as outputPreview, ff as overrideNeedsConfirmation, fg as parseCount, fl as pastGateConfirmation, fm as planBlocks, fn as planMarkerParts, fv as receiptLabel, fw as reconcileApprovals, fz as reduceConversation, fB as reduceTaskLog, fD as repairWaitLabel, fE as repairedLanded, fF as repairedNotice, fG as repeatingChecks, fH as replayTaskLog, fI as repoBaseLine, fJ as repoResultLines, fN as resolveTaskRef, fO as resolveUserTaskRef, fP as resumeLabel, fQ as resumeTime, fR as revertEffect, fS as revertListLine, fT as revertTaskRef, fU as runHoldsEditors, fW as runnerToolSubject, g1 as skillTokens, g2 as skippedLabel, g3 as stopTurn, g4 as subtreeIds, g5 as subtreeView, g6 as summarizeToolCall, ga as takeAt, gb as taskActionCommand, gc as taskActivity, gd as taskChatAvailable, ge as taskLogCommands, gg as taskLogHeaderView, gh as taskOrderLabel, gi as taskPlacement, gk as taskRef, gl as taskRefOf, gm as taskRowActions, gn as taskRowView, go as taskStartedNotice, gp as taskStatusKind, gs as titledRefs, gt as titledTaskRef, gu as titledTaskRefOf, gw as toolHeadline, gz as truncateCheckpointSummary, gA as unsendAll, gB as unsendLatest, gC as wakeUpItems, gD as walkPlan } from './runSettingsText-lKLDsyli.js';
2
- export { a as AttemptUsage, g as ContextFill, i as CostProvenance, k as DEFAULT_RUNNERS, t as FindingSeverity, z as HandoffArtifact, K as HandoffDigest, L as HandoffEvidence, M as HandoffFinding, ar as ModelUsage, av as PatchView, aA as PlanUsage, aG as PlannerUsage, aV as ReportedWindow, b4 as RunnerSessionCost, b5 as SEVERITY_LABEL, ba as SessionBilling, bl as StoredHandoff, bv as TaskLoop, bD as TaskUsageSummary, bF as UsageLine, bG as UsageRecord, bH as UsageTotals, bM as addAttemptUsage, bN as addModelUsage, bO as addPlannerUsage, bP as addUsage, bQ as addUsageTotals, bS as betweenRounds, bW as checkOf, bZ as contextMeterText, b_ as contextMeterTitle, b$ as costText, c0 as countedSessionCost, c5 as endAttemptUsage, ca as formatCost, cb as formatTokenCount, cf as handoffReferenceText, cj as heldWords, cm as isMeasured, cp as loopRemovalRefusal, cq as loopRoundOf, ct as modelCostTitle, cy as outOfRounds, cD as partedPromptUsage, cJ as patchView, cK as pausedOnLimit, cM as planUsage, cN as plannerContextFill, cS as resumedSessionWindow, cW as savedPatchView, cX as savedPatchViews, c$ as scriptTaskText, d0 as severityLabel, d1 as spentTokens, d2 as startAttemptUsage, d4 as subagentCostTitle, d5 as taskUsageSummary, d6 as tasksTotalText, d9 as usageLine, da as usageText, de as worstSeverity } from './Task-CxGgN6I0.js';
3
- import './eventStore-CTCSKS9E.js';
1
+ export { b as AccountLimitBucket, c as AccountLimitSnapshot, d as AccountLimitStatus, e as AccountLimitWindow, l as ApprovalBlock, n as ApprovalStatus, s as AssignmentIssue, t as AssignmentScope, B as BlockingSubject, w as CHECKPOINT_TRUNCATE_LENGTH, P as CommandBlock, T as CommandStatus, V as CompactionBlock, W as CompactionStatus, a7 as ConversationInput, ab as ConversationView, ad as DELEGATION_OFFERED, ah as DiffRow, ai as DiffRowKind, aj as DiffStat, ak as DisplayBlock, am as EMPTY_CONVERSATION, an as EMPTY_HOLD, ao as EMPTY_RUN, ap as EMPTY_TASK_LOG, aq as EMPTY_TASK_LOG_FOLLOW, aF as GatedConversation, aJ as HandoffBlock, aK as HandoffForkRepo, aL as HandoffPeekSubject, aN as IDLE_ACTIVITY, aR as IsolationPreviewNotice, a$ as LocalEntry, b0 as LoopCheckFacts, b1 as LoopCheckState, b4 as MarkdownToken, b8 as MessageBlock, b9 as MessageRole, bb as NOT_STARTED, bc as NO_TURN, bd as NewTaskFields, bm as OutputPreview, bn as OverrideDirection, bo as PLANNED_WITH_LABEL, bs as PlanBlock, bt as PlanBlocks, bv as PlanMarkerStatus, bR as PromptHold, bS as REPORT_PREVIEW_LINES, bV as RefTask, cg as RunnerLoadedBlock, ci as STALLED_LABEL, ck as STOPPING_LABEL, cl as SUBPLANNER_ACCOUNTING, cm as SUBPLANNER_CHILD, cn as SUBPLANNER_SCOPE, co as SUPERVISOR_LEVEL_LABEL, cJ as SkillLoadBlock, cK as SkillToken, cP as SubagentBlock, cQ as SubagentChild, cR as SubagentStatus, cU as SubtreeItemView, cV as SubtreeView, d3 as TakenPrompt, d4 as TaskAction, d5 as TaskActivity, d8 as TaskLogBatch, da as TaskLogFollow, db as TaskLogFollowInput, dc as TaskLogHeaderKind, dd as TaskLogHeaderTask, de as TaskLogHeaderUsage, df as TaskLogHeaderView, dh as TaskLogView, dp as TaskPlacement, dt as TaskRef, dw as TaskRowAction, dx as TaskRowContext, dy as TaskRowDelegated, dz as TaskRowHandoff, dA as TaskRowIsolation, dB as TaskRowKind, dC as TaskRowLoop, dD as TaskRowPlacement, dE as TaskRowSubject, dF as TaskRowUsage, dG as TaskRowView, dH as TaskRunFacts, dI as TaskStatusKind, dJ as ThinkingDisplayBlock, dK as ToolBlock, dL as ToolHeadline, dM as ToolStatus, dO as TreeTask, dQ as TurnGate, dR as UsageBlock, dT as WAITS_FOR_APPROVAL_LABEL, dU as WakeUpItem, e0 as accountLimitPercentText, e1 as accountLimitWindowLabel, e2 as accountLimitsOf, e3 as accountLimitsText, e4 as accountLimitsTitle, e5 as activityLabel, e6 as aheadOfDraft, e8 as approvalKindText, e9 as approvalLabel, ea as approvalStatusText, eb as assignedRunnerOf, ec as assignmentIssue, ed as assignmentIssueText, ee as attachingLabel, eh as awaitingLabel, ei as blockNotice, ej as blockNotices, ek as blockedByLabel, el as blockingFailures, em as canMergeTasks, en as canSetDependencies, eo as canSplitTask, ep as capConflictFiles, eq as cardEditNeedsUnstarted, er as cardEditable, ev as closeTurn, ex as compactionText, ey as confirmedOverride, eA as containersOffered, eC as delegatedRowView, eE as dependencyCandidates, eF as dependentsNotice, eG as dependentsOf, eK as describeIsolationPreview, eL as describeMergeResult, eO as diffRows, eP as diffStat, eQ as diffSummary, eS as drainNext, eT as editableWhileRunning, eU as elapsedSince, eX as followTaskLog, eY as followTurn, eZ as formatElapsed, e_ as fromTranscript, f0 as handoffBaseLine, f1 as handoffBranchName, f2 as handoffFindingsText, f3 as handoffPeekParts, f4 as hasAccountLimits, f5 as hasHiddenDetail, f6 as hasLongReport, f7 as holdLabel, f8 as holdPrompt, f9 as isFileEditTool, fa as isRepoGroup, fb as isTaskRunning, fc as keptDelegationBudget, fe as loadedSkillTokens, ff as logContinues, fg as logResumes, fh as loopBodyLabel, fi as loopBodyRound, fj as loopCheckLabel, fk as loopCheckState, fl as loopLeaveNotice, fm as loopRowParts, fn as manualOverrideConfirmation, fo as manualOverrideStopFirst, fq as markAction, fr as markdownHtml, fs as markdownTokens, ft as mergeOutcome, fu as mergePastChecksConfirmation, fw as namedRepos, fx as newTaskFields, fy as noExecutorRefusal, fB as opsEditable, fC as outputLines, fD as outputPreview, fE as overrideNeedsConfirmation, fF as parseCount, fK as pastGateConfirmation, fL as planBlocks, fM as planMarkerParts, fU as receiptLabel, fV as reconcileApprovals, fY as reduceConversation, f_ as reduceTaskLog, f$ as rememberDelegationBudget, g1 as repairWaitLabel, g2 as repairedLanded, g3 as repairedNotice, g4 as repeatingChecks, g5 as replayTaskLog, g6 as repoBaseLine, g7 as repoResultLines, gb as resolveTaskRef, gc as resolveUserTaskRef, gd as resumeLabel, ge as resumeTime, gf as revertEffect, gg as revertListLine, gh as revertTaskRef, gi as runHoldsEditors, gk as runnerToolSubject, gr as skillTokens, gs as skippedLabel, gt as stopTurn, gu as subtreeIds, gv as subtreeView, gw as summarizeToolCall, gA as takeAt, gB as taskActionCommand, gC as taskActivity, gD as taskChatAvailable, gE as taskLogCommands, gG as taskLogHeaderView, gH as taskOrderLabel, gI as taskPlacement, gK as taskRef, gL as taskRefOf, gM as taskRowActions, gN as taskRowView, gO as taskStartedNotice, gP as taskStatusKind, gS as titledRefs, gT as titledTaskRef, gU as titledTaskRefOf, gW as toolHeadline, gZ as truncateCheckpointSummary, g_ as unsendAll, g$ as unsendLatest, h0 as wakeUpItems, h1 as walkPlan } from './runSettingsText-C6eto6Uv.js';
2
+ export { a as AttemptUsage, g as ContextFill, i as CostProvenance, k as DEFAULT_RUNNERS, t as FindingSeverity, z as HandoffArtifact, K as HandoffDigest, L as HandoffEvidence, M as HandoffFinding, ar as ModelUsage, av as PatchView, aA as PlanUsage, aH as PlannerUsage, aW as ReportedWindow, b5 as RunnerSessionCost, b6 as SEVERITY_LABEL, bb as SessionBilling, bm as StoredHandoff, bw as TaskLoop, bE as TaskUsageSummary, bG as UsageLine, bH as UsageRecord, bI as UsageTotals, bN as addAttemptUsage, bO as addModelUsage, bP as addPlannerUsage, bQ as addUsage, bR as addUsageTotals, bT as betweenRounds, bX as checkOf, b_ as contextMeterText, b$ as contextMeterTitle, c0 as costText, c1 as countedSessionCost, c6 as endAttemptUsage, cb as formatCost, cc as formatTokenCount, cg as handoffReferenceText, ck as heldWords, cn as isMeasured, cq as loopRemovalRefusal, cr as loopRoundOf, cu as modelCostTitle, cz as outOfRounds, cF as partedPromptUsage, cL as patchView, cM as pausedOnLimit, cO as planUsage, cP as plannerContextFill, cU as resumedSessionWindow, cY as savedPatchView, cZ as savedPatchViews, d1 as scriptTaskText, d2 as severityLabel, d3 as spentTokens, d4 as startAttemptUsage, d6 as subagentCostTitle, d7 as taskUsageSummary, d8 as tasksTotalText, db as usageLine, dc as usageText, dg as worstSeverity } from './Task-D3O49EUo.js';
3
+ import './eventStore-CSFKy48Y.js';
4
4
  import 'child_process';
5
5
  import 'zod/v4';
6
- import './ModeResolver-B64aUZXJ.js';
6
+ import './ModeResolver-DS-aCVOP.js';
7
+
8
+ /**
9
+ * The tips an empty planner chat composer shows (#137), one table for every
10
+ * surface so the TUI and the webview agree on the wording and how often each
11
+ * comes round. A surface offers only the tips for the commands it answers.
12
+ */
13
+ interface ComposerTip {
14
+ /** The built-in planner chat command the tip names, without its slash. */
15
+ command: string;
16
+ /** How many times per cycle the tip comes round. */
17
+ weight: number;
18
+ /** Short enough to fit after the prompt and caret on an 80-column terminal. */
19
+ text: string;
20
+ }
21
+ declare const COMPOSER_TIPS: readonly ComposerTip[];
22
+ /**
23
+ * The tip for the `seq`-th time the composer has been empty, among those for
24
+ * the commands the surface answers, or null when it answers none of them. The
25
+ * same `seq` always gives the same tip, so the surface decides when a new one
26
+ * shows by when it moves `seq` on, and its rendering stays a function of state.
27
+ */
28
+ declare function composerTip(seq: number, answers: ReadonlySet<string>): string | null;
7
29
 
8
30
  /** A name or a path on a line of Ordewell's: as it stands, or quoted where it would break that line. */
9
31
  declare function onOneLine(text: string): string;
@@ -22,4 +44,4 @@ declare function clampThinkingEffort(effort: string | undefined, variants: {
22
44
  id: string;
23
45
  }[]): string | undefined;
24
46
 
25
- export { clampThinkingEffort, onOneLine };
47
+ export { COMPOSER_TIPS, type ComposerTip, clampThinkingEffort, composerTip, onOneLine };
@@ -31,6 +31,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
31
31
  var plan_utils_exports = {};
32
32
  __export(plan_utils_exports, {
33
33
  CHECKPOINT_TRUNCATE_LENGTH: () => CHECKPOINT_TRUNCATE_LENGTH,
34
+ COMPOSER_TIPS: () => COMPOSER_TIPS,
34
35
  DEFAULT_RUNNERS: () => DEFAULT_RUNNERS,
35
36
  DELEGATION_OFFERED: () => DELEGATION_OFFERED,
36
37
  EMPTY_CONVERSATION: () => EMPTY_CONVERSATION,
@@ -46,6 +47,9 @@ __export(plan_utils_exports, {
46
47
  SEVERITY_LABEL: () => SEVERITY_LABEL,
47
48
  STALLED_LABEL: () => STALLED_LABEL,
48
49
  STOPPING_LABEL: () => STOPPING_LABEL,
50
+ SUBPLANNER_ACCOUNTING: () => SUBPLANNER_ACCOUNTING,
51
+ SUBPLANNER_CHILD: () => SUBPLANNER_CHILD,
52
+ SUBPLANNER_SCOPE: () => SUBPLANNER_SCOPE,
49
53
  SUPERVISOR_LEVEL_LABEL: () => SUPERVISOR_LEVEL_LABEL,
50
54
  WAITS_FOR_APPROVAL_LABEL: () => WAITS_FOR_APPROVAL_LABEL,
51
55
  accountLimitPercentText: () => accountLimitPercentText,
@@ -83,7 +87,9 @@ __export(plan_utils_exports, {
83
87
  clampThinkingEffort: () => clampThinkingEffort,
84
88
  closeTurn: () => closeTurn,
85
89
  compactionText: () => compactionText,
90
+ composerTip: () => composerTip,
86
91
  confirmedOverride: () => confirmedOverride,
92
+ containersOffered: () => containersOffered,
87
93
  contextMeterText: () => contextMeterText,
88
94
  contextMeterTitle: () => contextMeterTitle,
89
95
  costText: () => costText,
@@ -122,6 +128,7 @@ __export(plan_utils_exports, {
122
128
  isMeasured: () => isMeasured,
123
129
  isRepoGroup: () => isRepoGroup,
124
130
  isTaskRunning: () => isTaskRunning,
131
+ keptDelegationBudget: () => keptDelegationBudget,
125
132
  loadedSkillTokens: () => loadedSkillTokens,
126
133
  logContinues: () => logContinues,
127
134
  logResumes: () => logResumes,
@@ -163,6 +170,7 @@ __export(plan_utils_exports, {
163
170
  reconcileApprovals: () => reconcileApprovals,
164
171
  reduceConversation: () => reduceConversation,
165
172
  reduceTaskLog: () => reduceTaskLog,
173
+ rememberDelegationBudget: () => rememberDelegationBudget,
166
174
  repairWaitLabel: () => repairWaitLabel,
167
175
  repairedLanded: () => repairedLanded,
168
176
  repairedNotice: () => repairedNotice,
@@ -350,6 +358,11 @@ function taskRefOf(tasks, id) {
350
358
  const found = findTaskRef(tasks, id);
351
359
  return found && `#${found.label}`;
352
360
  }
361
+ function taskRefsOf(tasks) {
362
+ const refs = /* @__PURE__ */ new Map();
363
+ for (const { task, label } of walkPlan(tasks)) if (!refs.has(task.id)) refs.set(task.id, `#${label}`);
364
+ return refs;
365
+ }
353
366
  function titledTaskRefOf(tasks, id) {
354
367
  const found = findTaskRef(tasks, id);
355
368
  return found && `#${found.label} ${found.task.title}`;
@@ -593,6 +606,13 @@ function outOfRounds(check) {
593
606
  function checkOf(tasks, taskId) {
594
607
  return tasks.find((t) => t.loop?.body.includes(taskId));
595
608
  }
609
+ function checksOfBodies(tasks) {
610
+ const checks = /* @__PURE__ */ new Map();
611
+ for (const task of tasks) {
612
+ for (const id of task.loop?.body ?? []) if (!checks.has(id)) checks.set(id, task);
613
+ }
614
+ return checks;
615
+ }
596
616
  function loopRemovalRefusal(task) {
597
617
  return task.loop ? `"${task.title}" is a loop's check: remove its body tasks first, or drop its loop ("loop": null), so they do not run on their own` : null;
598
618
  }
@@ -1222,6 +1242,7 @@ function mergePastChecksConfirmation(checks) {
1222
1242
  // src/services/runSettingsText.ts
1223
1243
  var SUPERVISOR_LEVEL_LABEL = { off: "Off", watch: "Watch", act: "Act" };
1224
1244
  var PLANNED_WITH_LABEL = "Planned-with line in commits Ordewell writes";
1245
+ var keptDelegationBudget = (run) => run.delegationBudget > 0 ? run.delegationBudget : null;
1225
1246
  var DELEGATION_ENV = "ORDEWELL_DELEGATION";
1226
1247
  function delegationSwitchedOn({ env, moduleDir, exists }) {
1227
1248
  if (env !== "1" || moduleDir === null) return false;
@@ -1242,12 +1263,53 @@ function placeHere(variable) {
1242
1263
  return { env: process.env[variable], moduleDir: file.replace(/[\\/][^\\/]*$/, ""), exists: (path) => fs.existsSync(path) };
1243
1264
  }
1244
1265
  var DELEGATION_OFFERED = delegationSwitchedOn(placeHere(DELEGATION_ENV));
1266
+ var CONTAINERS_ENV = "ORDEWELL_CONTAINERS";
1267
+ function containersOffered(place = placeHere(CONTAINERS_ENV)) {
1268
+ return delegationSwitchedOn(place);
1269
+ }
1270
+ function rememberDelegationBudget(changes) {
1271
+ if (changes.delegationBudget !== void 0 || !((changes.delegationTokens ?? 0) > 0)) return changes;
1272
+ return { ...changes, delegationBudget: changes.delegationTokens };
1273
+ }
1274
+ var SUBPLANNER_SCOPE = "Lets a plan hand a separable part of its goal to a subplanner working on its own branch. A subplanner stays inside the mandate it is given and cannot widen it; this setting grants nothing else.";
1275
+ var SUBPLANNER_ACCOUNTING = "The budget is one allowance of tokens for the whole tree, counted approximately from what runners report: usage arrives after a call, so a tree can pass it a little.";
1276
+ var SUBPLANNER_CHILD = "A subplanner plans in Act with autorun: it approves and runs its own plan, and no person reads it. You confirm once, when you turn Subplanners on.";
1245
1277
  function parseCount(arg, min) {
1246
1278
  if (arg === void 0 || !/^\d+$/.test(arg)) return null;
1247
1279
  const n = Number(arg);
1248
1280
  return n >= min ? n : null;
1249
1281
  }
1250
1282
 
1283
+ // src/services/composerTips.ts
1284
+ var COMPOSER_TIPS = [
1285
+ // The per-runner model allowlist (ADR-0003) is the easiest command to miss.
1286
+ { command: "allowlist", weight: 3, text: "Tip: Use /allowlist to limit which models the planner assigns per runner." },
1287
+ { command: "planner", weight: 1, text: "Tip: Use /planner to pick the planner's harness, model and effort." },
1288
+ { command: "runners", weight: 1, text: "Tip: Use /runners to turn runners on or off." },
1289
+ { command: "settings", weight: 1, text: "Tip: Use /settings for autonomy, supervisor, merging, autorun and more." },
1290
+ { command: "help", weight: 1, text: "Tip: Use /help to list every command." }
1291
+ ];
1292
+ function tipCycle(tips) {
1293
+ const total = tips.reduce((sum, tip) => sum + Math.max(0, tip.weight), 0);
1294
+ if (total === 0) return [];
1295
+ const slots = new Array(total).fill(void 0);
1296
+ const order = tips.map((tip, index) => ({ tip, index })).filter(({ tip }) => tip.weight > 0).sort((a, b) => b.tip.weight - a.tip.weight || a.index - b.index);
1297
+ for (const { tip } of order) {
1298
+ const free = slots.flatMap((slot, at) => slot === void 0 ? [at] : []);
1299
+ for (let k = 0; k < tip.weight; k++) {
1300
+ slots[free[Math.floor((k + 0.5) * free.length / tip.weight)]] = tip;
1301
+ }
1302
+ }
1303
+ const cycle = slots.filter((tip) => tip !== void 0);
1304
+ const start = cycle.indexOf(order[0].tip);
1305
+ return [...cycle.slice(start), ...cycle.slice(0, start)];
1306
+ }
1307
+ function composerTip(seq, answers) {
1308
+ const cycle = tipCycle(COMPOSER_TIPS.filter((tip) => answers.has(tip.command)));
1309
+ if (cycle.length === 0) return null;
1310
+ return cycle[(seq % cycle.length + cycle.length) % cycle.length].text;
1311
+ }
1312
+
1251
1313
  // src/models/Usage.ts
1252
1314
  function partedPromptUsage(parts) {
1253
1315
  const reported2 = [parts.uncached, parts.cacheRead, parts.cacheWrite].filter((n) => n !== void 0);
@@ -3090,7 +3152,7 @@ function taskChatAvailable(task) {
3090
3152
  if (task.type === "user") return false;
3091
3153
  return task.attempted === true || (task.attemptUsage?.length ?? 0) > 0;
3092
3154
  }
3093
- var refsOf = (ids, tasks) => ids.map((id) => tasks?.length ? taskRefOf(tasks, id) ?? id : id);
3155
+ var refsOf = (ids, reading) => ids.map((id) => reading?.refs.get(id) ?? id);
3094
3156
  var namedRepo = (repo) => repo && repo !== "." ? repo : null;
3095
3157
  var namedRepos = (repos) => (repos ?? []).filter((r) => r !== ".");
3096
3158
  var filesOf = (files) => files?.length ? capConflictFiles(files) : null;
@@ -3101,32 +3163,48 @@ var asBlocking = (tasks) => tasks.map((t) => ({
3101
3163
  subtasks: asBlocking(t.subtasks ?? []),
3102
3164
  ...t.loop ? { loop: t.loop, loopRound: t.loopRound, ...t.verdict ? { verdict: t.verdict } : {} } : {}
3103
3165
  }));
3166
+ function readPlan(tasks) {
3167
+ return {
3168
+ blocks: planBlocks(asBlocking(tasks)),
3169
+ refs: taskRefsOf(tasks),
3170
+ byId: new Map(tasks.map((t) => [t.id, t])),
3171
+ checks: checksOfBodies(tasks)
3172
+ };
3173
+ }
3174
+ var readings = /* @__PURE__ */ new WeakMap();
3175
+ function readingOf(task, tasks) {
3176
+ if (!tasks?.length) return null;
3177
+ const plan = readings.get(tasks) ?? readPlan(tasks);
3178
+ readings.set(tasks, plan);
3179
+ const own = task.loop && plan.byId.get(task.id);
3180
+ if (!own || own.status === task.status && own.loopRound === task.loopRound && own.verdict === task.verdict) return plan;
3181
+ return readPlan(tasks.map((t) => t.id === task.id ? { ...t, status: task.status, loopRound: task.loopRound, verdict: task.verdict } : t));
3182
+ }
3104
3183
  function blockedBy(task, reading) {
3105
3184
  if (!reading || !NOT_STARTED.has(task.status)) return [];
3106
3185
  return reading.blocks.blocked.get(task.id) ?? [];
3107
3186
  }
3108
3187
  function strandedDetail(check, dependencies, reading) {
3109
- const status = (id) => reading?.tasks.find((t) => t.id === id)?.status;
3188
+ const status = (id) => reading?.byId.get(id)?.status;
3110
3189
  const landed = reading && check.loop.body.every((id) => status(id) === "completed");
3111
3190
  const finished = dependencies.every((id) => [void 0, "completed", "skipped"].includes(status(id)));
3112
3191
  return landed && finished ? `Nothing runs it now: start it for round ${loopRoundOf(check) + 1} of ${check.loop.maxRounds}` : "Nothing runs it now: execute the plan and the loop goes on";
3113
3192
  }
3114
3193
  function loopOf(task, reading) {
3115
- const tasks = reading?.tasks;
3116
3194
  if (task.loop) {
3117
3195
  const check2 = { id: task.id, status: task.status, loop: task.loop, loopRound: task.loopRound, ...task.verdict ? { verdict: task.verdict } : {} };
3118
3196
  const state = loopCheckState(check2, !task.loopStranded && (reading ? reading.blocks.repeating.has(task.id) : true));
3119
- const body = refsOf(task.loop.body, tasks);
3197
+ const body = refsOf(task.loop.body, reading);
3120
3198
  const halted = reading ? task.loop.body.filter((id) => {
3121
- const status = reading.tasks.find((t) => t.id === id)?.status;
3199
+ const status = reading.byId.get(id)?.status;
3122
3200
  return status === "failed" || status === "skipped" || reading.blocks.blocked.has(id);
3123
3201
  }) : [];
3124
- const detail = state === "repeating" ? `Found problems: runs again once ${body.join(", ")} ${body.length === 1 ? "has" : "have"} landed` : state === "stopped" ? task.loopStranded ? strandedDetail(check2, task.dependencies, reading) : `${refsOf(halted, tasks).join(", ")} did not pass: retry ${halted.length === 1 ? "it" : "them"} and the loop goes on` : null;
3202
+ const detail = state === "repeating" ? `Found problems: runs again once ${body.join(", ")} ${body.length === 1 ? "has" : "have"} landed` : state === "stopped" ? task.loopStranded ? strandedDetail(check2, task.dependencies, reading) : `${refsOf(halted, reading).join(", ")} did not pass: retry ${halted.length === 1 ? "it" : "them"} and the loop goes on` : null;
3125
3203
  return { role: "check", state, label: loopCheckLabel(check2, state), detail, body };
3126
3204
  }
3127
- const owner = reading && checkOf(reading.tasks, task.id);
3205
+ const owner = reading?.checks.get(task.id);
3128
3206
  if (!owner?.loop) return null;
3129
- const [check] = refsOf([owner.id], tasks);
3207
+ const [check] = refsOf([owner.id], reading);
3130
3208
  const round = loopBodyRound({ status: owner.status ?? "", loopRound: owner.loopRound }, task.status);
3131
3209
  return { role: "body", label: loopBodyLabel(check, round, owner.loop.maxRounds), check, round };
3132
3210
  }
@@ -3150,8 +3228,7 @@ function taskRowView(task, context = {}) {
3150
3228
  const isolation = task.isolation && task.isolation.state !== "none" ? task.isolation : null;
3151
3229
  const spend = taskUsageSummary(task);
3152
3230
  const latestAttempt = task.attemptUsage?.at(-1);
3153
- const tasks = task.loop ? context.tasks?.map((t) => t.id === task.id ? { ...t, status: task.status, loopRound: task.loopRound, verdict: task.verdict } : t) : context.tasks;
3154
- const reading = tasks?.length ? { tasks, blocks: planBlocks(asBlocking(tasks)) } : null;
3231
+ const reading = readingOf(task, context.tasks);
3155
3232
  const blocked = blockedBy(task, reading);
3156
3233
  const loop = loopOf(task, reading);
3157
3234
  return {
@@ -3175,18 +3252,18 @@ function taskRowView(task, context = {}) {
3175
3252
  ...flagOf(task, context.runnerScope),
3176
3253
  autonomous: task.type === "ai" && context.modes?.find((m) => m.id === task.taskMode)?.autonomous === true,
3177
3254
  repos: namedRepos(isolation?.repos),
3178
- conflict: isolation?.state === "conflict" && !isolation.repairWaits ? { repo: namedRepo(isolation.conflictRepo), files: filesOf(isolation.conflictFiles), resolver: isolation.resolver ? refsOf([isolation.resolver], context.tasks)[0] : null } : null,
3255
+ conflict: isolation?.state === "conflict" && !isolation.repairWaits ? { repo: namedRepo(isolation.conflictRepo), files: filesOf(isolation.conflictFiles), resolver: isolation.resolver ? refsOf([isolation.resolver], reading)[0] : null } : null,
3179
3256
  repairWaiting: isolation?.state === "conflict" && isolation.repairWaits ? { label: repairWaitLabel(isolation.repairWaits), files: filesOf(isolation.conflictFiles) } : null,
3180
3257
  repairing: isolation?.state === "repairing" ? { files: filesOf(isolation.conflictFiles), attempt: isolation.repair ?? null } : null,
3181
3258
  repaired: isolation?.repairedFiles?.length ? { files: capConflictFiles(isolation.repairedFiles), landed: isolation.state === "integrated" } : null,
3182
- mergeGate: task.mergeGate?.length ? refsOf(task.mergeGate, context.tasks) : null,
3183
- blockedBy: blocked.length > 0 ? refsOf(blocked, context.tasks) : null,
3259
+ mergeGate: task.mergeGate?.length ? refsOf(task.mergeGate, reading) : null,
3260
+ blockedBy: blocked.length > 0 ? refsOf(blocked, reading) : null,
3184
3261
  skipReason: task.status === "skipped" ? task.skipReason ?? null : null,
3185
3262
  opsChangedFiles: task.status === "awaiting_user" && task.awaitingReason === "files-changed",
3186
3263
  forcedPastGate: task.forcedPastGate?.length ? task.forcedPastGate : null,
3187
3264
  loop,
3188
3265
  handoff: handoffOf(task),
3189
- dependencies: refsOf(task.dependencies, context.tasks),
3266
+ dependencies: refsOf(task.dependencies, reading),
3190
3267
  // A block read off the plan offers what a stored one does: Skip among them.
3191
3268
  actions: taskRowActions({ ...task, ...blocked.length > 0 ? { status: "blocked" } : {}, ...isolation?.repairWaits ? { repairWaits: isolation.repairWaits } : {} }, context.placement ?? (parent ? "subtask" : "task")),
3192
3269
  // Read off the mark itself: a task with merges left and no record has state `none`.
@@ -3379,6 +3456,7 @@ function accountLimitsTitle(snapshot, time) {
3379
3456
  // Annotate the CommonJS export names for ESM import in node:
3380
3457
  0 && (module.exports = {
3381
3458
  CHECKPOINT_TRUNCATE_LENGTH,
3459
+ COMPOSER_TIPS,
3382
3460
  DEFAULT_RUNNERS,
3383
3461
  DELEGATION_OFFERED,
3384
3462
  EMPTY_CONVERSATION,
@@ -3394,6 +3472,9 @@ function accountLimitsTitle(snapshot, time) {
3394
3472
  SEVERITY_LABEL,
3395
3473
  STALLED_LABEL,
3396
3474
  STOPPING_LABEL,
3475
+ SUBPLANNER_ACCOUNTING,
3476
+ SUBPLANNER_CHILD,
3477
+ SUBPLANNER_SCOPE,
3397
3478
  SUPERVISOR_LEVEL_LABEL,
3398
3479
  WAITS_FOR_APPROVAL_LABEL,
3399
3480
  accountLimitPercentText,
@@ -3431,7 +3512,9 @@ function accountLimitsTitle(snapshot, time) {
3431
3512
  clampThinkingEffort,
3432
3513
  closeTurn,
3433
3514
  compactionText,
3515
+ composerTip,
3434
3516
  confirmedOverride,
3517
+ containersOffered,
3435
3518
  contextMeterText,
3436
3519
  contextMeterTitle,
3437
3520
  costText,
@@ -3470,6 +3553,7 @@ function accountLimitsTitle(snapshot, time) {
3470
3553
  isMeasured,
3471
3554
  isRepoGroup,
3472
3555
  isTaskRunning,
3556
+ keptDelegationBudget,
3473
3557
  loadedSkillTokens,
3474
3558
  logContinues,
3475
3559
  logResumes,
@@ -3511,6 +3595,7 @@ function accountLimitsTitle(snapshot, time) {
3511
3595
  reconcileApprovals,
3512
3596
  reduceConversation,
3513
3597
  reduceTaskLog,
3598
+ rememberDelegationBudget,
3514
3599
  repairWaitLabel,
3515
3600
  repairedLanded,
3516
3601
  repairedNotice,