@aragon-agent/cli 0.5.8 → 0.5.9

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 (123) hide show
  1. package/CHANGELOG.md +279 -0
  2. package/README.md +1429 -1163
  3. package/dist/agent/coalesce.d.ts +13 -0
  4. package/dist/agent/coalesce.js +50 -11
  5. package/dist/agent/controller.d.ts +141 -2
  6. package/dist/agent/controller.js +396 -4
  7. package/dist/agent/headless.d.ts +8 -0
  8. package/dist/agent/headless.js +40 -0
  9. package/dist/agent/reducer.d.ts +245 -3
  10. package/dist/agent/reducer.js +490 -17
  11. package/dist/agent/retry-view.d.ts +68 -0
  12. package/dist/agent/retry-view.js +95 -0
  13. package/dist/agent/system-prompt.d.ts +11 -0
  14. package/dist/agent/system-prompt.js +2 -0
  15. package/dist/cli.js +86 -2
  16. package/dist/commands/builtins.d.ts +1 -1
  17. package/dist/commands/builtins.js +308 -2
  18. package/dist/config/cli-commands.d.ts +53 -2
  19. package/dist/config/cli-commands.js +136 -3
  20. package/dist/config/env.d.ts +6 -3
  21. package/dist/config/env.js +103 -3
  22. package/dist/config/load.d.ts +49 -0
  23. package/dist/config/load.js +83 -1
  24. package/dist/config/schema.d.ts +212 -2
  25. package/dist/config/schema.js +207 -1
  26. package/dist/config/store.js +20 -1
  27. package/dist/fast/critique.d.ts +43 -0
  28. package/dist/fast/critique.js +62 -0
  29. package/dist/fast/digest.d.ts +42 -0
  30. package/dist/fast/digest.js +85 -0
  31. package/dist/fast/frames.d.ts +99 -0
  32. package/dist/fast/frames.js +180 -0
  33. package/dist/fast/limits.d.ts +98 -0
  34. package/dist/fast/limits.js +98 -0
  35. package/dist/fast/prompt.d.ts +72 -0
  36. package/dist/fast/prompt.js +94 -0
  37. package/dist/fast/resolve.d.ts +43 -0
  38. package/dist/fast/resolve.js +105 -0
  39. package/dist/fast/review-call.d.ts +99 -0
  40. package/dist/fast/review-call.js +130 -0
  41. package/dist/fast/reviewer.d.ts +248 -0
  42. package/dist/fast/reviewer.js +664 -0
  43. package/dist/fast/types.d.ts +128 -0
  44. package/dist/fast/types.js +14 -0
  45. package/dist/fast/wiring.d.ts +170 -0
  46. package/dist/fast/wiring.js +316 -0
  47. package/dist/logging/install.d.ts +15 -1
  48. package/dist/logging/install.js +37 -4
  49. package/dist/logging/logger.d.ts +1 -1
  50. package/dist/session/persist.js +57 -1
  51. package/dist/team/normalize.d.ts +26 -1
  52. package/dist/team/normalize.js +23 -3
  53. package/dist/team/prompt.d.ts +11 -0
  54. package/dist/team/prompt.js +10 -0
  55. package/dist/team/report.d.ts +18 -0
  56. package/dist/team/report.js +27 -1
  57. package/dist/team/runtime.d.ts +13 -2
  58. package/dist/team/runtime.js +33 -6
  59. package/dist/team/subagent.d.ts +19 -1
  60. package/dist/team/subagent.js +72 -10
  61. package/dist/team/task-tool.d.ts +26 -0
  62. package/dist/team/task-tool.js +48 -4
  63. package/dist/team/types.d.ts +80 -1
  64. package/dist/tools/bash-tool.js +19 -3
  65. package/dist/tools/diff.d.ts +25 -5
  66. package/dist/tools/diff.js +72 -41
  67. package/dist/tools/file-change-store.d.ts +34 -0
  68. package/dist/tools/file-change-store.js +57 -0
  69. package/dist/tools/fs-tools.d.ts +26 -0
  70. package/dist/tools/fs-tools.js +62 -5
  71. package/dist/tools/index.d.ts +31 -0
  72. package/dist/tools/index.js +7 -1
  73. package/dist/tools/patch.d.ts +115 -0
  74. package/dist/tools/patch.js +453 -0
  75. package/dist/tools/terminal-output.d.ts +107 -0
  76. package/dist/tools/terminal-output.js +198 -0
  77. package/dist/tools/tool-output-store.d.ts +68 -0
  78. package/dist/tools/tool-output-store.js +102 -0
  79. package/dist/ui/ActivityLine.d.ts +48 -0
  80. package/dist/ui/ActivityLine.js +22 -0
  81. package/dist/ui/App.d.ts +1 -4
  82. package/dist/ui/App.js +273 -37
  83. package/dist/ui/BottomStatusRow.d.ts +43 -0
  84. package/dist/ui/BottomStatusRow.js +14 -0
  85. package/dist/ui/Composer.d.ts +1 -6
  86. package/dist/ui/Composer.js +2 -2
  87. package/dist/ui/PromptInput.d.ts +1 -15
  88. package/dist/ui/PromptInput.js +1 -38
  89. package/dist/ui/StatusBar.d.ts +37 -0
  90. package/dist/ui/StatusBar.js +5 -3
  91. package/dist/ui/TeamPanel.d.ts +5 -4
  92. package/dist/ui/TeamPanel.js +1 -1
  93. package/dist/ui/TodoPanel.d.ts +5 -4
  94. package/dist/ui/Transcript.d.ts +26 -3
  95. package/dist/ui/Transcript.js +76 -10
  96. package/dist/ui/activity-phrases.d.ts +33 -0
  97. package/dist/ui/activity-phrases.js +50 -0
  98. package/dist/ui/entries/AssistantEntry.d.ts +20 -0
  99. package/dist/ui/entries/AssistantEntry.js +3 -2
  100. package/dist/ui/entries/DiffView.d.ts +67 -0
  101. package/dist/ui/entries/DiffView.js +103 -0
  102. package/dist/ui/entries/FastCard.d.ts +53 -0
  103. package/dist/ui/entries/FastCard.js +87 -0
  104. package/dist/ui/entries/RetryCard.d.ts +56 -0
  105. package/dist/ui/entries/RetryCard.js +60 -0
  106. package/dist/ui/entries/TeamCard.js +6 -1
  107. package/dist/ui/entries/ToolCard.d.ts +38 -1
  108. package/dist/ui/entries/ToolCard.js +68 -5
  109. package/dist/ui/glyphs.d.ts +9 -0
  110. package/dist/ui/glyphs.js +2 -0
  111. package/dist/ui/layout/AppShell.d.ts +13 -22
  112. package/dist/ui/layout/AppShell.js +3 -38
  113. package/dist/ui/layout/virtual-window.d.ts +1 -1
  114. package/dist/ui/layout/virtual-window.js +109 -5
  115. package/dist/ui/overlays/HelpOverlay.js +16 -2
  116. package/dist/ui/overlays/SettingsScreen.d.ts +82 -1
  117. package/dist/ui/overlays/SettingsScreen.js +147 -1
  118. package/dist/ui/transcript-text.js +27 -0
  119. package/dist/ui/use-wheel-routing.d.ts +16 -32
  120. package/dist/ui/use-wheel-routing.js +21 -38
  121. package/package.json +2 -2
  122. package/dist/ui/layout/regions.d.ts +0 -55
  123. package/dist/ui/layout/regions.js +0 -52
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Retry presentation — pure, React-free, unit-tested (llm-api-retry-backoff
3
+ * §6.5 / §6.6).
4
+ *
5
+ * ASCII ONLY: `src/agent/**` is inside the glyph scanner's scope
6
+ * (`glyphs.test.ts`). Every non-ASCII character in the rendered line comes from
7
+ * the `Glyphs` set the caller passes in, never from a literal here.
8
+ *
9
+ * The COUNTDOWN is derived from `resumeAt`, an absolute instant, and never from
10
+ * `delayMs`. Core deliberately sends the instant rather than a tick stream, so
11
+ * the clock belongs to whoever renders — and a card that recomputed from
12
+ * `delayMs` would freeze at the announced number the moment a frame was skipped.
13
+ */
14
+ import type { Glyphs } from '../ui/glyphs.js';
15
+ /**
16
+ * Presentation bounds. NAMED `RETRY_UI`, NOT `RETRY_LIMITS_UI`: core's
17
+ * `RETRY_LIMITS` bounds what the mechanism can physically do, this is a column
18
+ * breakpoint, and a name that read as its sibling would invite the next reader to
19
+ * look here for the missing keys.
20
+ */
21
+ export declare const RETRY_UI: {
22
+ /** Below this many columns the status-bar chip degrades to `[r3]`. */
23
+ readonly statusCompactCols: 100;
24
+ };
25
+ /** The five phases of the one card a turn gets. */
26
+ export type RetryPhase = 'waiting' | 'retrying' | 'recovered' | 'exhausted' | 'interrupted';
27
+ /** The shape `formatRetryLine` reads — the `kind: 'retry'` entry, structurally. */
28
+ export interface RetryLineInput {
29
+ attempt: number;
30
+ maxRetries: number;
31
+ errorType: string;
32
+ phase: RetryPhase;
33
+ resumeAt?: number;
34
+ totalRetries?: number;
35
+ elapsedMs?: number;
36
+ }
37
+ /**
38
+ * Whole seconds until `resumeAt`, floored at 0.
39
+ *
40
+ * `Math.ceil` rather than `round`: a countdown that shows `0s` for half a second
41
+ * before firing reads as a stall, and showing `1s` for slightly too long does
42
+ * not.
43
+ */
44
+ export declare function secondsLeft(resumeAt: number | undefined, now: number): number;
45
+ /**
46
+ * A short headline for a provider failure.
47
+ *
48
+ * Deliberately shorter than `formatStreamError`'s: that one is a standalone
49
+ * notice and has to explain what to do, while this shares one line with a
50
+ * counter and a countdown. Derived from `errorType` ONLY — nothing here parses
51
+ * the provider's message, because a human-facing sentence must never become a
52
+ * machine-readable contract (the rule `SubagentRun.retryable` records).
53
+ */
54
+ export declare function retryHeadline(errorType: string): string;
55
+ /**
56
+ * The card's single line, WITHOUT the rail glyph — `EntryView` supplies that, the
57
+ * same way it does for every other entry kind.
58
+ *
59
+ * `now` is a parameter rather than a `Date.now()` call so the function stays pure
60
+ * and the render can be asserted without a clock.
61
+ */
62
+ export declare function formatRetryLine(entry: RetryLineInput, glyphs: Glyphs, now: number): string;
63
+ /** The status-bar chip text: full at width, `[r3]` when the row is tight. */
64
+ export declare function formatRetryChip(active: {
65
+ attempt: number;
66
+ max: number;
67
+ secondsLeft: number;
68
+ }, cols: number): string;
@@ -0,0 +1,95 @@
1
+ /**
2
+ * Retry presentation — pure, React-free, unit-tested (llm-api-retry-backoff
3
+ * §6.5 / §6.6).
4
+ *
5
+ * ASCII ONLY: `src/agent/**` is inside the glyph scanner's scope
6
+ * (`glyphs.test.ts`). Every non-ASCII character in the rendered line comes from
7
+ * the `Glyphs` set the caller passes in, never from a literal here.
8
+ *
9
+ * The COUNTDOWN is derived from `resumeAt`, an absolute instant, and never from
10
+ * `delayMs`. Core deliberately sends the instant rather than a tick stream, so
11
+ * the clock belongs to whoever renders — and a card that recomputed from
12
+ * `delayMs` would freeze at the announced number the moment a frame was skipped.
13
+ */
14
+ import { formatDuration } from './usage.js';
15
+ /**
16
+ * Presentation bounds. NAMED `RETRY_UI`, NOT `RETRY_LIMITS_UI`: core's
17
+ * `RETRY_LIMITS` bounds what the mechanism can physically do, this is a column
18
+ * breakpoint, and a name that read as its sibling would invite the next reader to
19
+ * look here for the missing keys.
20
+ */
21
+ export const RETRY_UI = {
22
+ /** Below this many columns the status-bar chip degrades to `[r3]`. */
23
+ statusCompactCols: 100,
24
+ };
25
+ /**
26
+ * Whole seconds until `resumeAt`, floored at 0.
27
+ *
28
+ * `Math.ceil` rather than `round`: a countdown that shows `0s` for half a second
29
+ * before firing reads as a stall, and showing `1s` for slightly too long does
30
+ * not.
31
+ */
32
+ export function secondsLeft(resumeAt, now) {
33
+ if (resumeAt === undefined)
34
+ return 0;
35
+ return Math.max(0, Math.ceil((resumeAt - now) / 1000));
36
+ }
37
+ /**
38
+ * A short headline for a provider failure.
39
+ *
40
+ * Deliberately shorter than `formatStreamError`'s: that one is a standalone
41
+ * notice and has to explain what to do, while this shares one line with a
42
+ * counter and a countdown. Derived from `errorType` ONLY — nothing here parses
43
+ * the provider's message, because a human-facing sentence must never become a
44
+ * machine-readable contract (the rule `SubagentRun.retryable` records).
45
+ */
46
+ export function retryHeadline(errorType) {
47
+ switch (errorType) {
48
+ case 'rate_limit':
49
+ return 'Rate limited by the provider';
50
+ case 'overloaded':
51
+ return 'Provider overloaded';
52
+ case 'server_error':
53
+ return 'Provider error';
54
+ case 'network_error':
55
+ return 'Network error reaching the provider';
56
+ case 'timeout':
57
+ return 'The request timed out';
58
+ default:
59
+ return 'Provider call failed';
60
+ }
61
+ }
62
+ function plural(n) {
63
+ return n === 1 ? 'retry' : 'retries';
64
+ }
65
+ /**
66
+ * The card's single line, WITHOUT the rail glyph — `EntryView` supplies that, the
67
+ * same way it does for every other entry kind.
68
+ *
69
+ * `now` is a parameter rather than a `Date.now()` call so the function stays pure
70
+ * and the render can be asserted without a clock.
71
+ */
72
+ export function formatRetryLine(entry, glyphs, now) {
73
+ const dot = ` ${glyphs.midDot} `;
74
+ const counter = `retry ${entry.attempt}/${entry.maxRetries}`;
75
+ const settled = entry.totalRetries ?? entry.attempt;
76
+ switch (entry.phase) {
77
+ case 'waiting':
78
+ return `${retryHeadline(entry.errorType)}${dot}${counter} in ${secondsLeft(entry.resumeAt, now)}s`;
79
+ case 'retrying':
80
+ return `${retryHeadline(entry.errorType)}${dot}${counter} ${glyphs.ellipsis}`;
81
+ case 'recovered':
82
+ return `recovered after ${settled} ${plural(settled)}${entry.elapsedMs === undefined ? '' : `${dot}${formatDuration(entry.elapsedMs)}`}`;
83
+ case 'exhausted':
84
+ return `${retryHeadline(entry.errorType)}${dot}gave up after ${settled} ${plural(settled)}${entry.elapsedMs === undefined ? '' : `${dot}${formatDuration(entry.elapsedMs)}`}`;
85
+ case 'interrupted':
86
+ return `interrupted after ${settled} ${plural(settled)}`;
87
+ }
88
+ }
89
+ /** The status-bar chip text: full at width, `[r3]` when the row is tight. */
90
+ export function formatRetryChip(active, cols) {
91
+ if (cols >= RETRY_UI.statusCompactCols) {
92
+ return `retry ${active.attempt}/${active.max} ${active.secondsLeft}s`;
93
+ }
94
+ return `[r${active.attempt}]`;
95
+ }
@@ -61,6 +61,17 @@ export interface SystemPromptParams {
61
61
  * (and `--no-todo`) produce the pre-todo prompt BYTE FOR BYTE.
62
62
  */
63
63
  todoBlock?: string;
64
+ /**
65
+ * The rendered `<fast_tier>` block, or `''` (fast-model-tier §3.8).
66
+ *
67
+ * Spliced conditionally exactly as `skillsBlock`, the plan block, `teamBlock`
68
+ * and `todoBlock` are, which is what keeps I-2 true: `fast.enabled: false`
69
+ * (and `--no-fast`) produce the pre-feature prompt BYTE FOR BYTE.
70
+ *
71
+ * A CHILD'S PROMPT NEVER CARRIES IT: children cannot delegate and are not
72
+ * reviewed, so `buildSubagentBlock`'s caller leaves this unset.
73
+ */
74
+ fastBlock?: string;
64
75
  }
65
76
  /** Describe the active shell so the model does not emit incompatible syntax. */
66
77
  export declare function describeShell(): {
@@ -40,6 +40,7 @@ export function buildSystemPrompt(params) {
40
40
  const teamBlock = params.teamBlock ?? '';
41
41
  const subagentBlock = params.subagentBlock ?? '';
42
42
  const todoBlock = params.todoBlock ?? '';
43
+ const fastBlock = params.fastBlock ?? '';
43
44
  return [
44
45
  'You are AragonAgent, an autonomous coding assistant operating inside a terminal (TUI).',
45
46
  'You help the user accomplish software-engineering tasks by reasoning step by step and using the provided tools.',
@@ -56,6 +57,7 @@ export function buildSystemPrompt(params) {
56
57
  ...(teamBlock ? ['', teamBlock] : []),
57
58
  ...(subagentBlock ? ['', subagentBlock] : []),
58
59
  ...(todoBlock ? ['', todoBlock] : []),
60
+ ...(fastBlock ? ['', fastBlock] : []),
59
61
  '',
60
62
  'Operating guidance:',
61
63
  '- Prefer reading files and inspecting the workspace before making changes.',
package/dist/cli.js CHANGED
@@ -23,7 +23,7 @@ import { formatMigrationNotice, migrateLegacyState } from './config/migrate-lega
23
23
  import { formatHomeMigrationNotice, migrateToHome } from './config/migrate-home.js';
24
24
  import { migrateStateOutOfConfig } from './config/migrate-state-out-of-config.js';
25
25
  import { runHistoryCommand } from './config/history-commands.js';
26
- import { LOG_CONFIG_SET_KEYS, TEAM_CONFIG_SET_KEYS, applyLogConfigSet, applyTeamConfigSet, runConfigEdit, runConfigGet, runConfigHome, runConfigList, warnIfRedactionDisabled, } from './config/cli-commands.js';
26
+ import { FAST_CONFIG_SET_KEYS, LOG_CONFIG_SET_KEYS, RETRY_CONFIG_SET_KEYS, TEAM_CONFIG_SET_KEYS, applyFastConfigSet, applyLogConfigSet, applyRetryConfigSet, applyTeamConfigSet, runConfigEdit, runConfigGet, runConfigHome, runConfigList, warnIfRedactionDisabled, } from './config/cli-commands.js';
27
27
  import { attachAgentEvents, attachTeamEvents, installLogging, setScreenRestore, setSignalTerminator, } from './logging/install.js';
28
28
  import { getLogger } from './logging/logger.js';
29
29
  import { runLogsCommand } from './logging/cli-commands.js';
@@ -73,6 +73,14 @@ function toFlags(opts) {
73
73
  exitTranscript: opts.exitTranscript,
74
74
  compact: opts.compact,
75
75
  hints: opts.hints,
76
+ // Without this line the flag never reaches `CliFlags` and `--show-thinking`
77
+ // is inert -- the failure the `mouse` note below records (P1-2).
78
+ showThinking: opts.showThinking,
79
+ // And again for the live tail, one feature later. The pair is declared in
80
+ // both directions below because `liveToolOutput` is PERSISTED and defaults
81
+ // to `true`: a lone `--no-live-tool-output` would make commander default
82
+ // `opts.liveToolOutput` to `true`, which is indistinguishable from silence.
83
+ liveToolOutput: opts.liveToolOutput,
76
84
  // Without this line the flag never reaches `CliFlags` and `--no-mouse` is
77
85
  // inert — a failure with no compile error and no runtime error (P1-2).
78
86
  mouse: opts.mouse,
@@ -97,6 +105,20 @@ function toFlags(opts) {
97
105
  // C-9). A value flag is no less inert than a boolean one when this line is
98
106
  // missing.
99
107
  todoFollow: opts.todoFollow,
108
+ // Site three of three for `--retry` / `--retry-max` — five features, same
109
+ // trap (`mouse` P1-2, `team` P1-4, `todo` C-9, render L4, now retry). A flag
110
+ // needs the `.option()` declaration below, a field on `CliFlags`, AND a line
111
+ // here; miss this one and the flag is inert with no compile or runtime error.
112
+ retry: opts.retry,
113
+ retryMax: opts.retryMax,
114
+ // Site three of three for the four `--fast*` flags — SIX features, one trap
115
+ // (`mouse` P1-2, `team` P1-4, `todo` C-9, render L4, retry, now fast). It
116
+ // bites hardest here: the tier is OFF by default, so a missing line would
117
+ // make `--fast` a flag that reports nothing and does nothing.
118
+ fast: opts.fast,
119
+ fastModel: opts.fastModel,
120
+ fastProvider: opts.fastProvider,
121
+ fastReview: opts.fastReview,
100
122
  // `--verbose` is just a shorthand for `--log-level debug`; an explicit
101
123
  // `--log-level` still wins, so the two can be combined without surprise.
102
124
  logLevel: opts.logLevel ?? (opts.verbose ? 'debug' : undefined),
@@ -414,6 +436,12 @@ const CONFIG_SET_KEYS = new Set([
414
436
  // flags and never persist -- inconsistent with every other config field.
415
437
  'density',
416
438
  'hints',
439
+ // agent-activity-presentation §4.1. Listed here AND cased in the switch below,
440
+ // for the reason `transcriptRetain` records above.
441
+ 'showThinking',
442
+ // agent-activity-presentation-live §4.1. Listed here AND cased in the switch
443
+ // below, for the reason `transcriptRetain` and `showThinking` both record.
444
+ 'liveToolOutput',
417
445
  // MEMBERSHIP HERE ONLY DECIDES THAT THE KEY IS NOT REJECTED. The `switch`
418
446
  // below is what builds the patch, and a key present here but absent there
419
447
  // falls through every case, writes nothing, and still prints
@@ -439,6 +467,10 @@ const CONFIG_SET_KEYS = new Set([
439
467
  // ceiling, and a key listed here but forgotten there writes nothing while
440
468
  // still printing `Set team.enabled = false`.
441
469
  ...TEAM_CONFIG_SET_KEYS,
470
+ // `retry.*` keys are handled by `applyRetryConfigSet`, same reasoning again.
471
+ ...RETRY_CONFIG_SET_KEYS,
472
+ // `fast.*` keys are handled by `applyFastConfigSet`, same reasoning again.
473
+ ...FAST_CONFIG_SET_KEYS,
442
474
  ]);
443
475
  /**
444
476
  * `aragon config set maxTokens <n|auto|default>`.
@@ -493,6 +525,27 @@ function runConfigSet(key, value) {
493
525
  process.stdout.write(`Set ${key} = ${String(merged.team[field])}\n`);
494
526
  return;
495
527
  }
528
+ const retryPatch = applyRetryConfigSet(key, value);
529
+ if (retryPatch) {
530
+ // Echoed from the STORED value for the same reason `team.*` is, and it matters
531
+ // more here: `config set retry.maxRetries 0` used to be the value that
532
+ // silently became 10, so reporting the input would have hidden the bug rather
533
+ // than the fix (R-16).
534
+ const merged = updatePersistedConfig(retryPatch);
535
+ const field = key.slice('retry.'.length);
536
+ process.stdout.write(`Set ${key} = ${String(merged.retry[field])}\n`);
537
+ return;
538
+ }
539
+ const fastPatch = applyFastConfigSet(key, value);
540
+ if (fastPatch) {
541
+ // Echoed from the STORED value, so `config set fast.reviewEveryTurns 400`
542
+ // prints the clamped 50 rather than reporting a number that was never
543
+ // written (AC-13) — the rule `team.*` and `retry.*` each state above.
544
+ const merged = updatePersistedConfig(fastPatch);
545
+ const field = key.slice('fast.'.length);
546
+ process.stdout.write(`Set ${key} = ${String(merged.fast[field])}\n`);
547
+ return;
548
+ }
496
549
  const patch = {};
497
550
  switch (key) {
498
551
  case 'provider':
@@ -540,6 +593,12 @@ function runConfigSet(key, value) {
540
593
  case 'density':
541
594
  patch.density = clampDensity(value, 'comfortable');
542
595
  break;
596
+ case 'showThinking':
597
+ patch.showThinking = value === 'true' || value === '1';
598
+ break;
599
+ case 'liveToolOutput':
600
+ patch.liveToolOutput = value === 'true' || value === '1';
601
+ break;
543
602
  case 'hints':
544
603
  patch.hints = value === 'true' || value === '1';
545
604
  break;
@@ -633,7 +692,16 @@ function buildProgram() {
633
692
  .option('--hints', 'Always show the composer hint row')
634
693
  .option('--no-hints', 'Hide the composer hint row')
635
694
  // Positive form first, same tri-state reason as `--fullscreen` above.
636
- .option('--mouse', 'Wheel scrolls the region under the pointer (full-screen mode)')
695
+ .option('--show-thinking', 'Show the reasoning blocks the model returns')
696
+ .option('--no-show-thinking', 'Hide reasoning blocks (the default)')
697
+ // Positive form first, same tri-state reason as `--fullscreen` above. The
698
+ // pair matters more here than for its neighbour because this key defaults to
699
+ // ON: a lone negative form would let commander synthesize `true` and
700
+ // overwrite a stored `false` on every run that passed no flag at all.
701
+ .option('--live-tool-output', 'Show a running command output tail (the default)')
702
+ .option('--no-live-tool-output', 'Keep a running tool card to one line')
703
+ // Positive form first, same tri-state reason as `--fullscreen` above.
704
+ .option('--mouse', 'Wheel scrolls the transcript (full-screen mode)')
637
705
  .option('--no-mouse', 'Leave the mouse to the terminal (the wheel does nothing)')
638
706
  // Declaring `--fullscreen` BEFORE `--no-fullscreen` keeps the default
639
707
  // `undefined` instead of `true`, which is what makes the tri-state work:
@@ -667,6 +735,22 @@ function buildProgram() {
667
735
  // passed, so `!== undefined` in `resolveTodoConfig` already distinguishes it
668
736
  // from silence. An unrecognized mode is clamped to `notify`, not rejected.
669
737
  .option('--todo-follow <mode>', 'What to do when a run ends with unfinished steps: notify (default) | auto | off')
738
+ // BOTH FORMS, positive first, for the reason recorded five times above:
739
+ // `retry.enabled` is PERSISTED, so a lone `--no-retry` would make commander
740
+ // default `opts.retry` to `true` and silently overwrite a stored `false`.
741
+ .option('--retry', 'Retry failed provider calls with backoff (the default)')
742
+ .option('--no-retry', 'Do not retry a failed provider call (fail on the first error)')
743
+ .option('--retry-max <n>', 'Retries after the first attempt for this run (0-20; 0 = off)')
744
+ // BOTH FORMS, positive first, for the reason recorded six times above — and
745
+ // with the polarity reversed from every other pair here: `fast.enabled`
746
+ // defaults to FALSE, so a lone `--fast` would be indistinguishable from
747
+ // silence and the off-by-default guarantee (R-d) would rest on a commander
748
+ // detail rather than on the config layer.
749
+ .option('--fast', 'Enable the fast model tier for this session')
750
+ .option('--no-fast', 'Disable the fast model tier (the default)')
751
+ .option('--fast-model <id>', 'The fast model id (implies nothing about --fast)')
752
+ .option('--fast-provider <id>', 'Provider for the fast model (default: the main provider)')
753
+ .option('--fast-review <n|off>', 'Turns between automatic fast reviews, or "off"')
670
754
  .option('--no-skills', 'Disable the skill system entirely (no catalog, no skill tools)')
671
755
  .option('--skill <name>', 'Force-load a skill at Level 2 for this run (repeatable)', (value, previous = []) => [...previous, value])
672
756
  .option('--skills-yes', 'Approve skill installs for this run (CI / headless)')
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Built-in slash commands (spec §5.2):
3
3
  * /help /model /settings /thinking /max-tokens /tools /clear /reset /cwd /save
4
- * /resume /copy /exit (/quit).
4
+ * /resume /copy /exit (/quit), plus the /team, /fast and /todo subsystems.
5
5
  */
6
6
  import { CommandRegistry } from './registry.js';
7
7
  export declare function registerBuiltinCommands(registry: CommandRegistry): void;