@ordewell/core 0.12.0 → 0.12.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/{ModeResolver-CHsaoV7M.d.ts → ModeResolver-B64aUZXJ.d.ts} +1 -1
- package/dist/{ModeResolver-b_7bPlBS.d.mts → ModeResolver-CA2fUU9h.d.mts} +1 -1
- package/dist/{Task-BTEH-ztX.d.mts → Task-CxGgN6I0.d.mts} +503 -16
- package/dist/{Task-BTEH-ztX.d.ts → Task-CxGgN6I0.d.ts} +503 -16
- package/dist/{chunk-BKTDYGIP.mjs → chunk-2IFKPYPO.mjs} +441 -17
- package/dist/chunk-2IFKPYPO.mjs.map +1 -0
- package/dist/{chunk-BFLVOYNR.mjs → chunk-FX33UKAD.mjs} +8 -6
- package/dist/chunk-FX33UKAD.mjs.map +1 -0
- package/dist/{chunk-F6WS3JLQ.mjs → chunk-PKJTN2PD.mjs} +20 -11
- package/dist/chunk-PKJTN2PD.mjs.map +1 -0
- package/dist/{chunk-HP2LNKST.mjs → chunk-RZ23BMVR.mjs} +345 -134
- package/dist/chunk-RZ23BMVR.mjs.map +1 -0
- package/dist/chunk-UDUATSCJ.mjs +48 -0
- package/dist/chunk-UDUATSCJ.mjs.map +1 -0
- package/dist/{IRunner-BwzyUVIL.d.mts → eventStore-CTCSKS9E.d.ts} +916 -129
- package/dist/{IRunner-DjJkYwko.d.ts → eventStore-CcB8yELZ.d.mts} +916 -129
- package/dist/index.d.mts +677 -97
- package/dist/index.d.ts +677 -97
- package/dist/index.js +8233 -2450
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6951 -1772
- 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 +277 -21
- package/dist/parsing.js.map +1 -1
- package/dist/parsing.mjs +3 -3
- package/dist/plan-utils.d.mts +30 -5
- package/dist/plan-utils.d.ts +30 -5
- package/dist/plan-utils.js +163 -16
- package/dist/plan-utils.js.map +1 -1
- package/dist/plan-utils.mjs +49 -3
- package/dist/plan-utils.mjs.map +1 -1
- package/dist/{runSettingsText-x-YML2ay.d.mts → runSettingsText-DFVpe6aU.d.mts} +1142 -934
- package/dist/{runSettingsText-CvZ40IPv.d.ts → runSettingsText-lKLDsyli.d.ts} +1142 -934
- package/dist/testing.d.mts +83 -4
- package/dist/testing.d.ts +83 -4
- package/dist/testing.js +142 -1
- package/dist/testing.js.map +1 -1
- package/dist/testing.mjs +126 -2
- package/dist/testing.mjs.map +1 -1
- package/docker/task.Dockerfile +22 -0
- package/package.json +2 -1
- package/skills/diagnose/SKILL.md +2 -2
- package/skills/explore/SKILL.md +1 -1
- package/dist/chunk-BFLVOYNR.mjs.map +0 -1
- package/dist/chunk-BKTDYGIP.mjs.map +0 -1
- package/dist/chunk-F6WS3JLQ.mjs.map +0 -1
- package/dist/chunk-HP2LNKST.mjs.map +0 -1
package/dist/parsing.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parsePlanJson
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FX33UKAD.mjs";
|
|
4
4
|
import {
|
|
5
5
|
PlanParseError,
|
|
6
6
|
extractJsonObject,
|
|
7
7
|
stripModelNoise
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-2IFKPYPO.mjs";
|
|
9
|
+
import "./chunk-PKJTN2PD.mjs";
|
|
10
10
|
|
|
11
11
|
// src/services/PartialPlanParser.ts
|
|
12
12
|
function parsePartialPlan(partial) {
|
package/dist/plan-utils.d.mts
CHANGED
|
@@ -1,9 +1,34 @@
|
|
|
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,
|
|
2
|
-
export { a as AttemptUsage,
|
|
3
|
-
|
|
4
|
-
import './ModeResolver-b_7bPlBS.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, 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';
|
|
5
4
|
import 'child_process';
|
|
6
5
|
import 'zod/v4';
|
|
6
|
+
import './ModeResolver-CA2fUU9h.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;
|
|
29
|
+
|
|
30
|
+
/** A name or a path on a line of Ordewell's: as it stands, or quoted where it would break that line. */
|
|
31
|
+
declare function onOneLine(text: string): string;
|
|
7
32
|
|
|
8
33
|
/**
|
|
9
34
|
* The one rule for an effort and a model: the effort a task keeps on a model,
|
|
@@ -19,4 +44,4 @@ declare function clampThinkingEffort(effort: string | undefined, variants: {
|
|
|
19
44
|
id: string;
|
|
20
45
|
}[]): string | undefined;
|
|
21
46
|
|
|
22
|
-
export { clampThinkingEffort };
|
|
47
|
+
export { COMPOSER_TIPS, type ComposerTip, clampThinkingEffort, composerTip, onOneLine };
|
package/dist/plan-utils.d.ts
CHANGED
|
@@ -1,9 +1,34 @@
|
|
|
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,
|
|
2
|
-
export { a as AttemptUsage,
|
|
3
|
-
|
|
4
|
-
import './ModeResolver-CHsaoV7M.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, 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';
|
|
5
4
|
import 'child_process';
|
|
6
5
|
import 'zod/v4';
|
|
6
|
+
import './ModeResolver-B64aUZXJ.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;
|
|
29
|
+
|
|
30
|
+
/** A name or a path on a line of Ordewell's: as it stands, or quoted where it would break that line. */
|
|
31
|
+
declare function onOneLine(text: string): string;
|
|
7
32
|
|
|
8
33
|
/**
|
|
9
34
|
* The one rule for an effort and a model: the effort a task keeps on a model,
|
|
@@ -19,4 +44,4 @@ declare function clampThinkingEffort(effort: string | undefined, variants: {
|
|
|
19
44
|
id: string;
|
|
20
45
|
}[]): string | undefined;
|
|
21
46
|
|
|
22
|
-
export { clampThinkingEffort };
|
|
47
|
+
export { COMPOSER_TIPS, type ComposerTip, clampThinkingEffort, composerTip, onOneLine };
|
package/dist/plan-utils.js
CHANGED
|
@@ -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,
|
|
@@ -45,6 +46,7 @@ __export(plan_utils_exports, {
|
|
|
45
46
|
REPORT_PREVIEW_LINES: () => REPORT_PREVIEW_LINES,
|
|
46
47
|
SEVERITY_LABEL: () => SEVERITY_LABEL,
|
|
47
48
|
STALLED_LABEL: () => STALLED_LABEL,
|
|
49
|
+
STOPPING_LABEL: () => STOPPING_LABEL,
|
|
48
50
|
SUPERVISOR_LEVEL_LABEL: () => SUPERVISOR_LEVEL_LABEL,
|
|
49
51
|
WAITS_FOR_APPROVAL_LABEL: () => WAITS_FOR_APPROVAL_LABEL,
|
|
50
52
|
accountLimitPercentText: () => accountLimitPercentText,
|
|
@@ -82,11 +84,13 @@ __export(plan_utils_exports, {
|
|
|
82
84
|
clampThinkingEffort: () => clampThinkingEffort,
|
|
83
85
|
closeTurn: () => closeTurn,
|
|
84
86
|
compactionText: () => compactionText,
|
|
87
|
+
composerTip: () => composerTip,
|
|
85
88
|
confirmedOverride: () => confirmedOverride,
|
|
86
89
|
contextMeterText: () => contextMeterText,
|
|
87
90
|
contextMeterTitle: () => contextMeterTitle,
|
|
88
91
|
costText: () => costText,
|
|
89
92
|
countedSessionCost: () => countedSessionCost,
|
|
93
|
+
delegatedRowView: () => delegatedRowView,
|
|
90
94
|
dependencyCandidates: () => dependencyCandidates,
|
|
91
95
|
dependentsNotice: () => dependentsNotice,
|
|
92
96
|
dependentsOf: () => dependentsOf,
|
|
@@ -113,6 +117,7 @@ __export(plan_utils_exports, {
|
|
|
113
117
|
hasAccountLimits: () => hasAccountLimits,
|
|
114
118
|
hasHiddenDetail: () => hasHiddenDetail,
|
|
115
119
|
hasLongReport: () => hasLongReport,
|
|
120
|
+
heldWords: () => heldWords,
|
|
116
121
|
holdLabel: () => holdLabel,
|
|
117
122
|
holdPrompt: () => holdPrompt,
|
|
118
123
|
isFileEditTool: () => isFileEditTool,
|
|
@@ -136,10 +141,12 @@ __export(plan_utils_exports, {
|
|
|
136
141
|
markdownHtml: () => markdownHtml,
|
|
137
142
|
markdownTokens: () => markdownTokens,
|
|
138
143
|
mergeOutcome: () => mergeOutcome,
|
|
144
|
+
mergePastChecksConfirmation: () => mergePastChecksConfirmation,
|
|
139
145
|
modelCostTitle: () => modelCostTitle,
|
|
140
146
|
namedRepos: () => namedRepos,
|
|
141
147
|
newTaskFields: () => newTaskFields,
|
|
142
148
|
noExecutorRefusal: () => noExecutorRefusal,
|
|
149
|
+
onOneLine: () => onOneLine,
|
|
143
150
|
opsEditable: () => opsEditable,
|
|
144
151
|
outOfRounds: () => outOfRounds,
|
|
145
152
|
outputLines: () => outputLines,
|
|
@@ -181,10 +188,12 @@ __export(plan_utils_exports, {
|
|
|
181
188
|
severityLabel: () => severityLabel,
|
|
182
189
|
skillTokens: () => skillTokens,
|
|
183
190
|
skippedLabel: () => skippedLabel,
|
|
191
|
+
spentTokens: () => spentTokens,
|
|
184
192
|
startAttemptUsage: () => startAttemptUsage,
|
|
185
193
|
stopTurn: () => stopTurn,
|
|
186
194
|
subagentCostTitle: () => subagentCostTitle,
|
|
187
195
|
subtreeIds: () => subtreeIds,
|
|
196
|
+
subtreeView: () => subtreeView,
|
|
188
197
|
summarizeToolCall: () => summarizeToolCall,
|
|
189
198
|
takeAt: () => takeAt,
|
|
190
199
|
taskActionCommand: () => taskActionCommand,
|
|
@@ -405,6 +414,7 @@ var STALLED_LABEL = "Stalled";
|
|
|
405
414
|
var AWAITING_LABELS = {
|
|
406
415
|
input: "Waiting for your input",
|
|
407
416
|
checkpoint: "Checkpoint",
|
|
417
|
+
"question-lost": "Question lost in a restart",
|
|
408
418
|
conflict: "Merge conflict",
|
|
409
419
|
"files-changed": "Changed tracked files",
|
|
410
420
|
"usage-limit": "Paused on a usage limit"
|
|
@@ -589,10 +599,25 @@ function loopRemovalRefusal(task) {
|
|
|
589
599
|
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;
|
|
590
600
|
}
|
|
591
601
|
function loopReshapeRefusal(tasks, target, action) {
|
|
602
|
+
if (target.type === "delegated") return `"${target.title}" is a delegated task and cannot be ${action}: remove it and add what should replace it`;
|
|
592
603
|
if (target.loop) return `"${target.title}" is a loop's check and cannot be ${action}: drop its loop first ("loop": null)`;
|
|
593
604
|
return checkOf(tasks, target.id) ? `"${target.title}" is in a loop's body and cannot be ${action}: take it out of the loop first` : null;
|
|
594
605
|
}
|
|
595
606
|
|
|
607
|
+
// src/models/lineBreaks.ts
|
|
608
|
+
var BREAKS = "\\n\\v\\f\\r\\u0085\\u2028\\u2029";
|
|
609
|
+
var LINE_BREAK = new RegExp(`\\r\\n|[${BREAKS}]`);
|
|
610
|
+
var ONE_LINE = new RegExp(`^[^${BREAKS}]*$`);
|
|
611
|
+
function splitLines(text2) {
|
|
612
|
+
return text2.split(LINE_BREAK);
|
|
613
|
+
}
|
|
614
|
+
function quotedLine(text2) {
|
|
615
|
+
return JSON.stringify(text2).replace(/[\u0085\u2028\u2029]/g, (char) => `\\u${char.charCodeAt(0).toString(16).padStart(4, "0")}`);
|
|
616
|
+
}
|
|
617
|
+
function onOneLine(text2) {
|
|
618
|
+
return ONE_LINE.test(text2) ? text2 : quotedLine(text2);
|
|
619
|
+
}
|
|
620
|
+
|
|
596
621
|
// src/services/PlannedTask.ts
|
|
597
622
|
function findCycle(tasks) {
|
|
598
623
|
return findDependencyCycle(tasks);
|
|
@@ -1043,7 +1068,8 @@ function truncateCheckpointSummary(summary) {
|
|
|
1043
1068
|
|
|
1044
1069
|
// src/services/conflictFiles.ts
|
|
1045
1070
|
function capConflictFiles(files, max = 5) {
|
|
1046
|
-
|
|
1071
|
+
const named = files.map(onOneLine);
|
|
1072
|
+
return named.length <= max ? named.join(", ") : `${named.slice(0, max).join(", ")}, +${named.length - max} more`;
|
|
1047
1073
|
}
|
|
1048
1074
|
|
|
1049
1075
|
// src/services/mergeResultNotice.ts
|
|
@@ -1191,31 +1217,86 @@ function handoffBaseLine(handoff, length) {
|
|
|
1191
1217
|
function repoResultLines(handoff) {
|
|
1192
1218
|
return handoff.repos.map(({ path, landed }) => `${path}: ${landed.length === 0 ? "nothing to merge" : `${landed.length} task${landed.length === 1 ? "" : "s"} landed`}`);
|
|
1193
1219
|
}
|
|
1220
|
+
function mergePastChecksConfirmation(checks) {
|
|
1221
|
+
return `This merges work no check has passed: ${checks.join(", ")} ${checks.length === 1 ? "has" : "have"} not.`;
|
|
1222
|
+
}
|
|
1194
1223
|
|
|
1195
1224
|
// src/services/runSettingsText.ts
|
|
1196
1225
|
var SUPERVISOR_LEVEL_LABEL = { off: "Off", watch: "Watch", act: "Act" };
|
|
1197
1226
|
var PLANNED_WITH_LABEL = "Planned-with line in commits Ordewell writes";
|
|
1198
|
-
var
|
|
1227
|
+
var DELEGATION_ENV = "ORDEWELL_DELEGATION";
|
|
1228
|
+
function delegationSwitchedOn({ env, moduleDir, exists }) {
|
|
1229
|
+
if (env !== "1" || moduleDir === null) return false;
|
|
1230
|
+
const parts = moduleDir.split(/[\\/]/);
|
|
1231
|
+
if (parts.includes("node_modules")) return false;
|
|
1232
|
+
const packages = parts.lastIndexOf("packages");
|
|
1233
|
+
if (packages < 1) return false;
|
|
1234
|
+
const root = parts.slice(0, packages).join("/");
|
|
1235
|
+
return exists(`${root}/.git`) && exists(`${root}/packages/core/package.json`);
|
|
1236
|
+
}
|
|
1237
|
+
function placeHere(variable) {
|
|
1238
|
+
const fs = typeof process === "undefined" ? void 0 : process.getBuiltinModule?.("fs");
|
|
1239
|
+
if (!fs) return { env: void 0, moduleDir: null, exists: () => false };
|
|
1240
|
+
const file = typeof __filename !== "undefined" ? __filename : new URL(
|
|
1241
|
+
// @ts-expect-error - import.meta is only valid under an ESM module setting; see builtinSkills.ts
|
|
1242
|
+
__filename
|
|
1243
|
+
).pathname;
|
|
1244
|
+
return { env: process.env[variable], moduleDir: file.replace(/[\\/][^\\/]*$/, ""), exists: (path) => fs.existsSync(path) };
|
|
1245
|
+
}
|
|
1246
|
+
var DELEGATION_OFFERED = delegationSwitchedOn(placeHere(DELEGATION_ENV));
|
|
1199
1247
|
function parseCount(arg, min) {
|
|
1200
1248
|
if (arg === void 0 || !/^\d+$/.test(arg)) return null;
|
|
1201
1249
|
const n = Number(arg);
|
|
1202
1250
|
return n >= min ? n : null;
|
|
1203
1251
|
}
|
|
1204
1252
|
|
|
1253
|
+
// src/services/composerTips.ts
|
|
1254
|
+
var COMPOSER_TIPS = [
|
|
1255
|
+
// The per-runner model allowlist (ADR-0003) is the easiest command to miss.
|
|
1256
|
+
{ command: "allowlist", weight: 3, text: "Tip: Use /allowlist to limit which models the planner assigns per runner." },
|
|
1257
|
+
{ command: "planner", weight: 1, text: "Tip: Use /planner to pick the planner's harness, model and effort." },
|
|
1258
|
+
{ command: "runners", weight: 1, text: "Tip: Use /runners to turn runners on or off." },
|
|
1259
|
+
{ command: "settings", weight: 1, text: "Tip: Use /settings for autonomy, supervisor, merging, autorun and more." },
|
|
1260
|
+
{ command: "help", weight: 1, text: "Tip: Use /help to list every command." }
|
|
1261
|
+
];
|
|
1262
|
+
function tipCycle(tips) {
|
|
1263
|
+
const total = tips.reduce((sum, tip) => sum + Math.max(0, tip.weight), 0);
|
|
1264
|
+
if (total === 0) return [];
|
|
1265
|
+
const slots = new Array(total).fill(void 0);
|
|
1266
|
+
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);
|
|
1267
|
+
for (const { tip } of order) {
|
|
1268
|
+
const free = slots.flatMap((slot, at) => slot === void 0 ? [at] : []);
|
|
1269
|
+
for (let k = 0; k < tip.weight; k++) {
|
|
1270
|
+
slots[free[Math.floor((k + 0.5) * free.length / tip.weight)]] = tip;
|
|
1271
|
+
}
|
|
1272
|
+
}
|
|
1273
|
+
const cycle = slots.filter((tip) => tip !== void 0);
|
|
1274
|
+
const start = cycle.indexOf(order[0].tip);
|
|
1275
|
+
return [...cycle.slice(start), ...cycle.slice(0, start)];
|
|
1276
|
+
}
|
|
1277
|
+
function composerTip(seq, answers) {
|
|
1278
|
+
const cycle = tipCycle(COMPOSER_TIPS.filter((tip) => answers.has(tip.command)));
|
|
1279
|
+
if (cycle.length === 0) return null;
|
|
1280
|
+
return cycle[(seq % cycle.length + cycle.length) % cycle.length].text;
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1205
1283
|
// src/models/Usage.ts
|
|
1206
1284
|
function partedPromptUsage(parts) {
|
|
1207
|
-
const
|
|
1285
|
+
const reported2 = [parts.uncached, parts.cacheRead, parts.cacheWrite].filter((n) => n !== void 0);
|
|
1208
1286
|
return {
|
|
1209
|
-
...
|
|
1287
|
+
...reported2.length > 0 ? { inputTokens: reported2.reduce((a, b) => a + b, 0) } : {},
|
|
1210
1288
|
...parts.cacheRead !== void 0 ? { cachedInputTokens: parts.cacheRead } : {}
|
|
1211
1289
|
};
|
|
1212
1290
|
}
|
|
1213
1291
|
var TOKEN_FIELDS = ["inputTokens", "outputTokens", "cachedInputTokens"];
|
|
1292
|
+
function spentTokens({ inputTokens, outputTokens }) {
|
|
1293
|
+
return (inputTokens ?? 0) + (outputTokens ?? 0);
|
|
1294
|
+
}
|
|
1214
1295
|
function addUsage(totals, record) {
|
|
1215
1296
|
const next = { ...totals };
|
|
1216
1297
|
for (const field of TOKEN_FIELDS) {
|
|
1217
|
-
const
|
|
1218
|
-
if (
|
|
1298
|
+
const reported2 = record[field];
|
|
1299
|
+
if (reported2 !== void 0) next[field] = (totals[field] ?? 0) + reported2;
|
|
1219
1300
|
}
|
|
1220
1301
|
if (record.reportedCost) {
|
|
1221
1302
|
const { amount, currency } = record.reportedCost;
|
|
@@ -1359,7 +1440,7 @@ function planUsage(tasks) {
|
|
|
1359
1440
|
function taskUsageSummary(task) {
|
|
1360
1441
|
const attempts = task.attemptUsage ?? [];
|
|
1361
1442
|
const latest = attempts.at(-1);
|
|
1362
|
-
const contextFill = latest ? plannerContextFill(latest) : void 0;
|
|
1443
|
+
const contextFill = latest && task.type !== "delegated" ? plannerContextFill(latest) : void 0;
|
|
1363
1444
|
return {
|
|
1364
1445
|
totals: attempts.reduce((sum, attempt) => addUsageTotals(sum, attempt.totals), {}),
|
|
1365
1446
|
attempts: attempts.length,
|
|
@@ -2471,19 +2552,23 @@ function worstSeverity(findings) {
|
|
|
2471
2552
|
}
|
|
2472
2553
|
return worst;
|
|
2473
2554
|
}
|
|
2555
|
+
var ROOT_NODE = "root";
|
|
2556
|
+
function nodeText(node) {
|
|
2557
|
+
return node.startsWith(`${ROOT_NODE}/`) ? node.slice(ROOT_NODE.length + 1) : node;
|
|
2558
|
+
}
|
|
2474
2559
|
function findingRefText(task, ref) {
|
|
2475
2560
|
return `${task}${ref.attempt !== void 0 ? `@${ref.attempt}` : ""}${ref.finding ? `/${ref.finding}` : ""}`;
|
|
2476
2561
|
}
|
|
2477
2562
|
function handoffReferenceText(ref, taskName = () => void 0) {
|
|
2478
2563
|
switch (ref.kind) {
|
|
2479
2564
|
case "file":
|
|
2480
|
-
return `${ref.line !== void 0 ? `${ref.path}:${ref.line}` : ref.path}${ref.resolved === true ? "" : " (unresolved)"}`;
|
|
2565
|
+
return `${onOneLine(ref.line !== void 0 ? `${ref.path}:${ref.line}` : ref.path)}${ref.resolved === true ? "" : " (unresolved)"}`;
|
|
2481
2566
|
case "commit":
|
|
2482
|
-
return `commit ${ref.sha}${ref.repo ? ` in ${ref.repo}` : ""}${ref.resolved === true ? "" : " (unresolved)"}`;
|
|
2567
|
+
return `commit ${ref.sha}${ref.repo ? ` in ${onOneLine(ref.repo)}` : ""}${ref.resolved === true ? "" : " (unresolved)"}`;
|
|
2483
2568
|
case "task":
|
|
2484
|
-
return findingRefText(taskName(ref.task) ?? ref.task, ref);
|
|
2569
|
+
return onOneLine(findingRefText(ref.label !== void 0 ? `${nodeText(ref.node ?? ROOT_NODE)}:${ref.label}` : taskName(ref.task) ?? ref.task, ref));
|
|
2485
2570
|
case "url":
|
|
2486
|
-
return ref.url;
|
|
2571
|
+
return onOneLine(ref.url);
|
|
2487
2572
|
case "patch":
|
|
2488
2573
|
return patchText(ref);
|
|
2489
2574
|
}
|
|
@@ -2503,7 +2588,7 @@ function byteSize(bytes) {
|
|
|
2503
2588
|
}
|
|
2504
2589
|
function patchFlagText(flag) {
|
|
2505
2590
|
const more = flag.count - flag.paths.length;
|
|
2506
|
-
return `${FLAG_WORDS[flag.kind]}: ${counted(flag.count, "file")}${flag.paths.length ? ` (${flag.paths.join(", ")}${more > 0 ? `, +${more} more` : ""})` : ""}`;
|
|
2591
|
+
return `${FLAG_WORDS[flag.kind]}: ${counted(flag.count, "file")}${flag.paths.length ? ` (${flag.paths.map(onOneLine).join(", ")}${more > 0 ? `, +${more} more` : ""})` : ""}`;
|
|
2507
2592
|
}
|
|
2508
2593
|
function patchChangesText(patch) {
|
|
2509
2594
|
const binary = patch.binary > 0 ? `, ${patch.binary} binary` : "";
|
|
@@ -2534,6 +2619,9 @@ function savedPatchViews(handoff) {
|
|
|
2534
2619
|
function savedPatchView(handoff) {
|
|
2535
2620
|
return savedPatchViews(handoff)[0] ?? null;
|
|
2536
2621
|
}
|
|
2622
|
+
function heldWords(text2) {
|
|
2623
|
+
return splitLines(text2).map((line) => line ? ` ${line}` : line);
|
|
2624
|
+
}
|
|
2537
2625
|
|
|
2538
2626
|
// src/conversation/labels.ts
|
|
2539
2627
|
var APPROVAL_KIND_TEXT = {
|
|
@@ -2905,11 +2993,11 @@ function opsEditable(task) {
|
|
|
2905
2993
|
|
|
2906
2994
|
// src/services/AssignmentScope.ts
|
|
2907
2995
|
function assignedRunnerOf(task) {
|
|
2908
|
-
return task.type === "ai" ? task.assignedRunner || void 0 : void 0;
|
|
2996
|
+
return task.type === "ai" || task.type === "delegated" ? task.assignedRunner || void 0 : void 0;
|
|
2909
2997
|
}
|
|
2910
2998
|
var OVER = /* @__PURE__ */ new Set(["completed", "skipped"]);
|
|
2911
2999
|
function assignmentIssue(task, scope) {
|
|
2912
|
-
if (task.type !== "ai" || OVER.has(task.status)) return null;
|
|
3000
|
+
if (task.type !== "ai" && task.type !== "delegated" || OVER.has(task.status)) return null;
|
|
2913
3001
|
if (!scope.enabledRunners.includes(task.assignedRunner)) return { kind: "runner-off", runner: task.assignedRunner };
|
|
2914
3002
|
const model = task.assignedModel;
|
|
2915
3003
|
const allowed = effectiveAllowlist(scope.allowlist[task.assignedRunner], task.assignedRunner, scope.models);
|
|
@@ -2931,6 +3019,54 @@ function assignmentConsequence({ status, awaitingReason, resumeAt }) {
|
|
|
2931
3019
|
return "runs as assigned unless moved";
|
|
2932
3020
|
}
|
|
2933
3021
|
|
|
3022
|
+
// src/taskRow/delegated.ts
|
|
3023
|
+
var STOPPING_LABEL = "Stopping: its child plan is still winding down.";
|
|
3024
|
+
function countsText({ completed, running, waiting, pending, failed, skipped }) {
|
|
3025
|
+
const total = completed + running + waiting + pending + failed + skipped;
|
|
3026
|
+
const said = [[running, "running"], [waiting, "waiting"], [failed, "failed"], [skipped, "skipped"]];
|
|
3027
|
+
return [`${completed} of ${total} done`, ...said.filter(([n]) => n > 0).map(([n, word]) => `${n} ${word}`)].join(", ");
|
|
3028
|
+
}
|
|
3029
|
+
function reported(handoff) {
|
|
3030
|
+
const counts = handoff?.subtree?.counts;
|
|
3031
|
+
return counts && { completed: counts.done, running: 0, waiting: 0, pending: counts.blocked, failed: counts.failed, skipped: counts.skipped };
|
|
3032
|
+
}
|
|
3033
|
+
function delegatedRowView(task) {
|
|
3034
|
+
if (task.type !== "delegated") return null;
|
|
3035
|
+
const { delegation } = task;
|
|
3036
|
+
const counts = delegation?.tasks ?? reported(task.handoff);
|
|
3037
|
+
return {
|
|
3038
|
+
goal: task.goal?.trim() || null,
|
|
3039
|
+
tokens: delegation?.tokens ? `${formatTokenCount(delegation.tokens.left)} of ${formatTokenCount(delegation.tokens.budget)} tokens left` : null,
|
|
3040
|
+
counts: counts ? countsText(counts) : null,
|
|
3041
|
+
stopping: delegation?.stopping ? STOPPING_LABEL : null
|
|
3042
|
+
};
|
|
3043
|
+
}
|
|
3044
|
+
var SEVERITIES = ["blocker", "major", "minor", "info"];
|
|
3045
|
+
function itemView({ ref, finding }) {
|
|
3046
|
+
return {
|
|
3047
|
+
reference: ref ? handoffReferenceText(ref) : null,
|
|
3048
|
+
heading: `${finding.id} \xB7 ${severityLabel(finding.severity)} \xB7 ${onOneLine(finding.title)}`,
|
|
3049
|
+
...finding.detail ? { detail: finding.detail } : {}
|
|
3050
|
+
};
|
|
3051
|
+
}
|
|
3052
|
+
function subtreeView(subtree) {
|
|
3053
|
+
const { counts, findings, outsideScope } = subtree;
|
|
3054
|
+
const ran = [["done", counts.done], ["failed", counts.failed], ["blocked", counts.blocked], ["skipped", counts.skipped]].filter(([, n]) => n > 0).map(([word, n]) => `${n} ${word}`).join(", ");
|
|
3055
|
+
const found = SEVERITIES.filter((severity) => findings[severity] > 0).map((severity) => `${findings[severity]} ${severity}`).join(", ");
|
|
3056
|
+
const summary = [
|
|
3057
|
+
ran || "nothing ran",
|
|
3058
|
+
...counts.commits > 0 ? [`${counts.commits} commit${counts.commits === 1 ? "" : "s"}`] : [],
|
|
3059
|
+
`${formatTokenCount(counts.tokens)} tokens`,
|
|
3060
|
+
found ? `${found} finding${SEVERITIES.reduce((n, s) => n + findings[s], 0) === 1 ? "" : "s"} below` : "no findings below"
|
|
3061
|
+
].join(" \xB7 ");
|
|
3062
|
+
return {
|
|
3063
|
+
summary,
|
|
3064
|
+
outsideScope: outsideScope && outsideScope.count > 0 ? `Changed outside its declared scope: ${outsideScope.paths.map(onOneLine).join(", ")}${outsideScope.count > outsideScope.paths.length ? ` (+${outsideScope.count - outsideScope.paths.length} more)` : ""}` : null,
|
|
3065
|
+
open: subtree.open.map(itemView),
|
|
3066
|
+
promoted: subtree.promoted.map(itemView)
|
|
3067
|
+
};
|
|
3068
|
+
}
|
|
3069
|
+
|
|
2934
3070
|
// src/taskRow/loop.ts
|
|
2935
3071
|
function loopCheckState(check, goesOn) {
|
|
2936
3072
|
switch (check.status) {
|
|
@@ -3051,9 +3187,10 @@ function taskRowView(task, context = {}) {
|
|
|
3051
3187
|
const blocked = blockedBy(task, reading);
|
|
3052
3188
|
const loop = loopOf(task, reading);
|
|
3053
3189
|
return {
|
|
3190
|
+
delegated: delegatedRowView(task),
|
|
3054
3191
|
usage: latestAttempt ? { totals: spend.totals, ...spend.contextFill ? { contextFill: spend.contextFill } : {}, attempt: latestAttempt.attempt } : task.type === "ai" && ["completed", "failed", "in_progress", "awaiting_user"].includes(task.status) ? { totals: {}, attempt: 0 } : null,
|
|
3055
3192
|
orderLabel: taskOrderLabel(task, parent),
|
|
3056
|
-
kind: task.type === "user" ? "user" : task.type === "script" ? "script" : task.ops ? "ops" : "ai",
|
|
3193
|
+
kind: task.type === "user" ? "user" : task.type === "script" ? "script" : task.type === "delegated" ? "delegated" : task.ops ? "ops" : "ai",
|
|
3057
3194
|
// Between rounds a check waits for its fix as a task waits for its dependencies, and is no failure (ADR-0045 L3).
|
|
3058
3195
|
status: blocked.length > 0 ? "blocked" : loop?.role === "check" && loop.state === "repeating" ? "todo" : taskStatusKind(task),
|
|
3059
3196
|
running: isTaskRunning(task),
|
|
@@ -3160,7 +3297,8 @@ function taskLogCommands(view) {
|
|
|
3160
3297
|
}
|
|
3161
3298
|
function logContinues(task) {
|
|
3162
3299
|
const finished = task.status === "completed" || task.status === "failed" || task.status === "skipped";
|
|
3163
|
-
|
|
3300
|
+
const childLeft = task.type === "delegated" && (task.status === "pending" || task.awaitingReason === "question-lost");
|
|
3301
|
+
return task.continuable === true && (finished || childLeft || task.status === "awaiting_user" && task.awaitingReason === "usage-limit");
|
|
3164
3302
|
}
|
|
3165
3303
|
function logResumes(task) {
|
|
3166
3304
|
return task.continuable === true && task.status === "awaiting_user" && task.awaitingReason === "usage-limit";
|
|
@@ -3273,6 +3411,7 @@ function accountLimitsTitle(snapshot, time) {
|
|
|
3273
3411
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3274
3412
|
0 && (module.exports = {
|
|
3275
3413
|
CHECKPOINT_TRUNCATE_LENGTH,
|
|
3414
|
+
COMPOSER_TIPS,
|
|
3276
3415
|
DEFAULT_RUNNERS,
|
|
3277
3416
|
DELEGATION_OFFERED,
|
|
3278
3417
|
EMPTY_CONVERSATION,
|
|
@@ -3287,6 +3426,7 @@ function accountLimitsTitle(snapshot, time) {
|
|
|
3287
3426
|
REPORT_PREVIEW_LINES,
|
|
3288
3427
|
SEVERITY_LABEL,
|
|
3289
3428
|
STALLED_LABEL,
|
|
3429
|
+
STOPPING_LABEL,
|
|
3290
3430
|
SUPERVISOR_LEVEL_LABEL,
|
|
3291
3431
|
WAITS_FOR_APPROVAL_LABEL,
|
|
3292
3432
|
accountLimitPercentText,
|
|
@@ -3324,11 +3464,13 @@ function accountLimitsTitle(snapshot, time) {
|
|
|
3324
3464
|
clampThinkingEffort,
|
|
3325
3465
|
closeTurn,
|
|
3326
3466
|
compactionText,
|
|
3467
|
+
composerTip,
|
|
3327
3468
|
confirmedOverride,
|
|
3328
3469
|
contextMeterText,
|
|
3329
3470
|
contextMeterTitle,
|
|
3330
3471
|
costText,
|
|
3331
3472
|
countedSessionCost,
|
|
3473
|
+
delegatedRowView,
|
|
3332
3474
|
dependencyCandidates,
|
|
3333
3475
|
dependentsNotice,
|
|
3334
3476
|
dependentsOf,
|
|
@@ -3355,6 +3497,7 @@ function accountLimitsTitle(snapshot, time) {
|
|
|
3355
3497
|
hasAccountLimits,
|
|
3356
3498
|
hasHiddenDetail,
|
|
3357
3499
|
hasLongReport,
|
|
3500
|
+
heldWords,
|
|
3358
3501
|
holdLabel,
|
|
3359
3502
|
holdPrompt,
|
|
3360
3503
|
isFileEditTool,
|
|
@@ -3378,10 +3521,12 @@ function accountLimitsTitle(snapshot, time) {
|
|
|
3378
3521
|
markdownHtml,
|
|
3379
3522
|
markdownTokens,
|
|
3380
3523
|
mergeOutcome,
|
|
3524
|
+
mergePastChecksConfirmation,
|
|
3381
3525
|
modelCostTitle,
|
|
3382
3526
|
namedRepos,
|
|
3383
3527
|
newTaskFields,
|
|
3384
3528
|
noExecutorRefusal,
|
|
3529
|
+
onOneLine,
|
|
3385
3530
|
opsEditable,
|
|
3386
3531
|
outOfRounds,
|
|
3387
3532
|
outputLines,
|
|
@@ -3423,10 +3568,12 @@ function accountLimitsTitle(snapshot, time) {
|
|
|
3423
3568
|
severityLabel,
|
|
3424
3569
|
skillTokens,
|
|
3425
3570
|
skippedLabel,
|
|
3571
|
+
spentTokens,
|
|
3426
3572
|
startAttemptUsage,
|
|
3427
3573
|
stopTurn,
|
|
3428
3574
|
subagentCostTitle,
|
|
3429
3575
|
subtreeIds,
|
|
3576
|
+
subtreeView,
|
|
3430
3577
|
summarizeToolCall,
|
|
3431
3578
|
takeAt,
|
|
3432
3579
|
taskActionCommand,
|