@bastani/atomic 0.9.4-alpha.8 → 0.9.4

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 (166) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/dist/builtin/cursor/CHANGELOG.md +6 -0
  3. package/dist/builtin/cursor/package.json +2 -2
  4. package/dist/builtin/intercom/CHANGELOG.md +6 -0
  5. package/dist/builtin/intercom/package.json +1 -1
  6. package/dist/builtin/mcp/CHANGELOG.md +6 -0
  7. package/dist/builtin/mcp/package.json +1 -1
  8. package/dist/builtin/subagents/CHANGELOG.md +34 -0
  9. package/dist/builtin/subagents/agents/code-simplifier.md +2 -2
  10. package/dist/builtin/subagents/agents/codebase-analyzer.md +2 -2
  11. package/dist/builtin/subagents/agents/codebase-locator.md +2 -2
  12. package/dist/builtin/subagents/agents/codebase-online-researcher.md +2 -2
  13. package/dist/builtin/subagents/agents/codebase-pattern-finder.md +2 -2
  14. package/dist/builtin/subagents/agents/codebase-research-analyzer.md +2 -2
  15. package/dist/builtin/subagents/agents/codebase-research-locator.md +2 -2
  16. package/dist/builtin/subagents/agents/debugger.md +1 -1
  17. package/dist/builtin/subagents/agents/worker.md +2 -2
  18. package/dist/builtin/subagents/package.json +1 -1
  19. package/dist/builtin/subagents/src/slash/slash-commands.ts +2 -2
  20. package/dist/builtin/subagents/src/tui/render-result-compact.ts +3 -2
  21. package/dist/builtin/subagents/src/tui/render-result.ts +3 -3
  22. package/dist/builtin/subagents/src/tui/render-widget-graph.ts +4 -3
  23. package/dist/builtin/subagents/src/tui/render-widget.ts +10 -4
  24. package/dist/builtin/web-access/CHANGELOG.md +6 -0
  25. package/dist/builtin/web-access/package.json +1 -1
  26. package/dist/builtin/workflows/CHANGELOG.md +30 -0
  27. package/dist/builtin/workflows/builtin/deep-research-codebase-utils.ts +24 -29
  28. package/dist/builtin/workflows/builtin/goal-runner.ts +13 -37
  29. package/dist/builtin/workflows/builtin/open-claude-design-runner.ts +6 -9
  30. package/dist/builtin/workflows/builtin/ralph-models.ts +58 -115
  31. package/dist/builtin/workflows/package.json +1 -1
  32. package/dist/builtin/workflows/src/tui/keybindings-adapter.ts +4 -0
  33. package/dist/builtin/workflows/src/tui/overlay-adapter.ts +4 -0
  34. package/dist/builtin/workflows/src/tui/stage-chat-view-input.ts +12 -1
  35. package/dist/builtin/workflows/src/tui/stage-chat-view-state.ts +2 -0
  36. package/dist/builtin/workflows/src/tui/stage-chat-view-types.ts +6 -0
  37. package/dist/builtin/workflows/src/tui/stage-chat-view.ts +4 -0
  38. package/dist/builtin/workflows/src/tui/workflow-attach-pane-types.ts +4 -0
  39. package/dist/builtin/workflows/src/tui/workflow-attach-pane.ts +8 -9
  40. package/dist/bun/cli.d.ts.map +1 -1
  41. package/dist/bun/cli.js +3 -2
  42. package/dist/bun/cli.js.map +1 -1
  43. package/dist/cli.d.ts.map +1 -1
  44. package/dist/cli.js +15 -5
  45. package/dist/cli.js.map +1 -1
  46. package/dist/config.d.ts +10 -3
  47. package/dist/config.d.ts.map +1 -1
  48. package/dist/config.js +18 -1
  49. package/dist/config.js.map +1 -1
  50. package/dist/core/agent-session-events.d.ts.map +1 -1
  51. package/dist/core/agent-session-events.js +16 -8
  52. package/dist/core/agent-session-events.js.map +1 -1
  53. package/dist/core/agent-session-export.d.ts.map +1 -1
  54. package/dist/core/agent-session-export.js +4 -2
  55. package/dist/core/agent-session-export.js.map +1 -1
  56. package/dist/core/agent-session-extension-bindings.d.ts +3 -1
  57. package/dist/core/agent-session-extension-bindings.d.ts.map +1 -1
  58. package/dist/core/agent-session-extension-bindings.js +7 -4
  59. package/dist/core/agent-session-extension-bindings.js.map +1 -1
  60. package/dist/core/agent-session-methods.d.ts +8 -2
  61. package/dist/core/agent-session-methods.d.ts.map +1 -1
  62. package/dist/core/agent-session-methods.js.map +1 -1
  63. package/dist/core/agent-session-retry.d.ts +2 -0
  64. package/dist/core/agent-session-retry.d.ts.map +1 -1
  65. package/dist/core/agent-session-retry.js +66 -7
  66. package/dist/core/agent-session-retry.js.map +1 -1
  67. package/dist/core/agent-session-tool-registry.d.ts.map +1 -1
  68. package/dist/core/agent-session-tool-registry.js +4 -0
  69. package/dist/core/agent-session-tool-registry.js.map +1 -1
  70. package/dist/core/agent-session.d.ts +4 -1
  71. package/dist/core/agent-session.d.ts.map +1 -1
  72. package/dist/core/agent-session.js +4 -0
  73. package/dist/core/agent-session.js.map +1 -1
  74. package/dist/core/async/format.d.ts +3 -0
  75. package/dist/core/async/format.d.ts.map +1 -0
  76. package/dist/core/async/format.js +50 -0
  77. package/dist/core/async/format.js.map +1 -0
  78. package/dist/core/async/job-manager.d.ts +39 -0
  79. package/dist/core/async/job-manager.d.ts.map +1 -0
  80. package/dist/core/async/job-manager.js +254 -0
  81. package/dist/core/async/job-manager.js.map +1 -0
  82. package/dist/core/async/session-manager.d.ts +18 -0
  83. package/dist/core/async/session-manager.d.ts.map +1 -0
  84. package/dist/core/async/session-manager.js +61 -0
  85. package/dist/core/async/session-manager.js.map +1 -0
  86. package/dist/core/async/types.d.ts +23 -0
  87. package/dist/core/async/types.d.ts.map +1 -0
  88. package/dist/core/async/types.js +2 -0
  89. package/dist/core/async/types.js.map +1 -0
  90. package/dist/core/copilot-model-static-fallbacks.d.ts +43 -0
  91. package/dist/core/copilot-model-static-fallbacks.d.ts.map +1 -0
  92. package/dist/core/copilot-model-static-fallbacks.js +50 -0
  93. package/dist/core/copilot-model-static-fallbacks.js.map +1 -0
  94. package/dist/core/extensions/loader-virtual-modules.d.ts +11 -0
  95. package/dist/core/extensions/loader-virtual-modules.d.ts.map +1 -1
  96. package/dist/core/extensions/loader-virtual-modules.js +79 -11
  97. package/dist/core/extensions/loader-virtual-modules.js.map +1 -1
  98. package/dist/core/model-registry-builtins.d.ts.map +1 -1
  99. package/dist/core/model-registry-builtins.js +9 -1
  100. package/dist/core/model-registry-builtins.js.map +1 -1
  101. package/dist/core/resource-loader-reload.d.ts.map +1 -1
  102. package/dist/core/resource-loader-reload.js +4 -2
  103. package/dist/core/resource-loader-reload.js.map +1 -1
  104. package/dist/core/resource-loader-types.d.ts +6 -0
  105. package/dist/core/resource-loader-types.d.ts.map +1 -1
  106. package/dist/core/resource-loader-types.js.map +1 -1
  107. package/dist/core/tools/bash-async-execution.d.ts +25 -0
  108. package/dist/core/tools/bash-async-execution.d.ts.map +1 -0
  109. package/dist/core/tools/bash-async-execution.js +71 -0
  110. package/dist/core/tools/bash-async-execution.js.map +1 -0
  111. package/dist/core/tools/bash-async-jobs.d.ts +10 -0
  112. package/dist/core/tools/bash-async-jobs.d.ts.map +1 -1
  113. package/dist/core/tools/bash-async-jobs.js +18 -2
  114. package/dist/core/tools/bash-async-jobs.js.map +1 -1
  115. package/dist/core/tools/bash-async-output.d.ts +3 -1
  116. package/dist/core/tools/bash-async-output.d.ts.map +1 -1
  117. package/dist/core/tools/bash-async-output.js +4 -1
  118. package/dist/core/tools/bash-async-output.js.map +1 -1
  119. package/dist/core/tools/bash-pty-native.d.ts.map +1 -1
  120. package/dist/core/tools/bash-pty-native.js +2 -2
  121. package/dist/core/tools/bash-pty-native.js.map +1 -1
  122. package/dist/core/tools/bash.d.ts +10 -4
  123. package/dist/core/tools/bash.d.ts.map +1 -1
  124. package/dist/core/tools/bash.js +20 -38
  125. package/dist/core/tools/bash.js.map +1 -1
  126. package/dist/core/tools/search-native.d.ts.map +1 -1
  127. package/dist/core/tools/search-native.js +2 -2
  128. package/dist/core/tools/search-native.js.map +1 -1
  129. package/dist/main.d.ts.map +1 -1
  130. package/dist/main.js +56 -32
  131. package/dist/main.js.map +1 -1
  132. package/dist/modes/interactive/interactive-deferred-startup.d.ts +2 -0
  133. package/dist/modes/interactive/interactive-deferred-startup.d.ts.map +1 -0
  134. package/dist/modes/interactive/interactive-deferred-startup.js +59 -0
  135. package/dist/modes/interactive/interactive-deferred-startup.js.map +1 -0
  136. package/dist/modes/interactive/interactive-mode-base.d.ts +2 -0
  137. package/dist/modes/interactive/interactive-mode-base.d.ts.map +1 -1
  138. package/dist/modes/interactive/interactive-mode-base.js +4 -0
  139. package/dist/modes/interactive/interactive-mode-base.js.map +1 -1
  140. package/dist/modes/interactive/interactive-mode-deps.d.ts +1 -1
  141. package/dist/modes/interactive/interactive-mode-deps.d.ts.map +1 -1
  142. package/dist/modes/interactive/interactive-mode-deps.js +1 -1
  143. package/dist/modes/interactive/interactive-mode-deps.js.map +1 -1
  144. package/dist/modes/interactive/interactive-mode-surface.d.ts +2 -0
  145. package/dist/modes/interactive/interactive-mode-surface.d.ts.map +1 -1
  146. package/dist/modes/interactive/interactive-mode-surface.js.map +1 -1
  147. package/dist/modes/interactive/interactive-mode-types.d.ts +2 -0
  148. package/dist/modes/interactive/interactive-mode-types.d.ts.map +1 -1
  149. package/dist/modes/interactive/interactive-mode-types.js.map +1 -1
  150. package/dist/modes/interactive/interactive-mode.d.ts +1 -0
  151. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  152. package/dist/modes/interactive/interactive-mode.js +1 -0
  153. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  154. package/dist/modes/interactive/interactive-session-runtime.d.ts.map +1 -1
  155. package/dist/modes/interactive/interactive-session-runtime.js +4 -2
  156. package/dist/modes/interactive/interactive-session-runtime.js.map +1 -1
  157. package/dist/modes/interactive/interactive-startup.d.ts.map +1 -1
  158. package/dist/modes/interactive/interactive-startup.js +11 -1
  159. package/dist/modes/interactive/interactive-startup.js.map +1 -1
  160. package/dist/utils/module-require.d.ts +11 -0
  161. package/dist/utils/module-require.d.ts.map +1 -0
  162. package/dist/utils/module-require.js +16 -0
  163. package/dist/utils/module-require.js.map +1 -0
  164. package/docs/tools.md +4 -2
  165. package/npm-shrinkwrap.json +23 -23
  166. package/package.json +5 -3
@@ -31,48 +31,43 @@ export interface DeepResearchCodebaseResult {
31
31
 
32
32
  export const FILE_ONLY_OUTPUT = "file-only" satisfies WorkflowOutputMode;
33
33
 
34
+ // Chains curated from Atomic's agentic-coding benchmark (see ralph-models.ts
35
+ // for the frontier data and placement principle: only reviewers get
36
+ // best-in-class models; the planner is a perf-per-dollar stage).
34
37
  export const PLANNER_MODEL_CONFIG = {
35
- model: "anthropic/claude-fable-5:high",
38
+ model: "openai-codex/gpt-5.5:xhigh",
36
39
  fallbackModels: [
37
- "openai-codex/gpt-5.5:xhigh",
38
40
  "github-copilot/gpt-5.5:xhigh",
39
41
  "openai/gpt-5.5:xhigh",
40
- "github-copilot/claude-opus-4.8 (1m):xhigh",
41
- "anthropic/claude-opus-4-8:xhigh",
42
+ "anthropic/claude-fable-5:xhigh",
43
+ "github-copilot/claude-opus-4.8 (1m):high",
44
+ "anthropic/claude-opus-4-8:high",
42
45
  "zai/glm-5.2:xhigh",
43
46
  "zai-coding-cn/glm-5.2:xhigh",
44
- "github-copilot/claude-sonnet-5 (1m):high",
45
- "anthropic/claude-sonnet-5:high",
46
- "github-copilot/claude-sonnet-4.6 (1m):high",
47
- "anthropic/claude-sonnet-4-6:high",
48
- "github-copilot/gemini-3.5-flash (1m):high",
49
- "google/gemini-3.5-flash:high",
50
- "google-vertex/gemini-3.5-flash:high",
51
- "github-copilot/gemini-3.1-pro-preview (1m):high",
52
- "google/gemini-3.1-pro-preview:high",
53
- "google-vertex/gemini-3.1-pro-preview:high",
54
- "openrouter/anthropic/claude-fable-5:high",
55
47
  "openrouter/openai/gpt-5.5:xhigh",
56
- "openrouter/anthropic/claude-opus-4-8:xhigh",
57
- "openrouter/z-ai/glm-5.2:xhigh",
58
- "openrouter/anthropic/claude-sonnet-5:high",
59
- "openrouter/anthropic/claude-sonnet-4-6:high",
60
- "openrouter/google/gemini-3.5-flash:high",
61
- "openrouter/google/gemini-3.1-pro-preview:high"
48
+ "openrouter/anthropic/claude-fable-5:xhigh",
49
+ "openrouter/anthropic/claude-opus-4-8:high",
50
+ "openrouter/z-ai/glm-5.2:xhigh"
62
51
  ],
63
52
  excludedTools: ["ask_user_question"],
64
53
  } as const;
65
54
 
55
+ // gpt-5.5:low is the measured cheap-tier diamond ($1.20/task, 28 steps, 9.4k
56
+ // output tokens). Benchmark-measured models only: opus-4.8:low (41%/$2.29)
57
+ // and glm-5.2:high (36%/$2.84) back it up; unbenchmarked minis/haiku/flash
58
+ // are excluded.
66
59
  export const EXPLORER_MODEL_CONFIG = {
67
- model: "openai-codex/gpt-5.4-mini:low",
60
+ model: "openai-codex/gpt-5.5:low",
68
61
  fallbackModels: [
69
- "github-copilot/gpt-5.4-mini:low",
70
- "openai/gpt-5.4-mini:low",
71
- "github-copilot/claude-haiku-4.5:low",
72
- "anthropic/claude-haiku-4-5:low",
73
- "github-copilot/gemini-3.5-flash (1m):low",
74
- "google/gemini-3.5-flash:low",
75
- "google-vertex/gemini-3.5-flash:low",
62
+ "github-copilot/gpt-5.5:low",
63
+ "openai/gpt-5.5:low",
64
+ "github-copilot/claude-opus-4.8 (1m):low",
65
+ "anthropic/claude-opus-4-8:low",
66
+ "zai/glm-5.2:high",
67
+ "zai-coding-cn/glm-5.2:high",
68
+ "openrouter/openai/gpt-5.5:low",
69
+ "openrouter/anthropic/claude-opus-4-8:low",
70
+ "openrouter/z-ai/glm-5.2:xhigh",
76
71
  ],
77
72
  excludedTools: ["ask_user_question"],
78
73
  } as const;
@@ -92,64 +92,40 @@ export async function runGoalWorkflow(ctx: GoalRunnerContext, options: GoalWorkf
92
92
  const comparisonBaseBranch = normalizeBranchInput(inputs.base_branch, "origin/main");
93
93
  const { ledger, ledgerPath, artifactDir } = await createGoalLedger(objective);
94
94
 
95
+ // Chains curated from Atomic's agentic-coding benchmark (see
96
+ // ralph-models.ts for the frontier data and drop rationale).
95
97
  const workerModelConfig = {
96
98
  model: "openai-codex/gpt-5.5:medium",
97
99
  fallbackModels: [
98
100
  "github-copilot/gpt-5.5:medium",
99
101
  "openai/gpt-5.5:medium",
102
+ "anthropic/claude-fable-5:low",
100
103
  "github-copilot/claude-opus-4.8 (1m):medium",
101
104
  "anthropic/claude-opus-4-8:medium",
102
- "zai/glm-5.2:medium",
103
- "zai-coding-cn/glm-5.2:medium",
104
- "github-copilot/claude-sonnet-5 (1m):medium",
105
- "anthropic/claude-sonnet-5:medium",
106
- "github-copilot/claude-sonnet-4.6 (1m):medium",
107
- "anthropic/claude-sonnet-4-6:medium",
108
- "github-copilot/gemini-3.5-flash (1m):medium",
109
- "google/gemini-3.5-flash:medium",
110
- "google-vertex/gemini-3.5-flash:medium",
111
- "github-copilot/gemini-3.1-pro-preview (1m):medium",
112
- "google/gemini-3.1-pro-preview:medium",
113
- "google-vertex/gemini-3.1-pro-preview:medium",
105
+ "zai/glm-5.2:high",
106
+ "zai-coding-cn/glm-5.2:high",
114
107
  "openrouter/openai/gpt-5.5:medium",
108
+ "openrouter/anthropic/claude-fable-5:low",
115
109
  "openrouter/anthropic/claude-opus-4-8:medium",
116
- "openrouter/z-ai/glm-5.2:medium",
117
- "openrouter/anthropic/claude-sonnet-5:medium",
118
- "openrouter/anthropic/claude-sonnet-4-6:medium",
119
- "openrouter/google/gemini-3.5-flash:medium",
120
- "openrouter/google/gemini-3.1-pro-preview:medium"
110
+ "openrouter/z-ai/glm-5.2:xhigh"
121
111
  ],
122
112
  tools: goalRunnerTools,
123
113
  };
124
114
 
125
115
  const reviewerModelConfig = {
126
- model: "anthropic/claude-fable-5:high",
116
+ model: "anthropic/claude-fable-5:xhigh",
127
117
  fallbackModels: [
128
118
  "openai-codex/gpt-5.5:xhigh",
129
119
  "github-copilot/gpt-5.5:xhigh",
130
120
  "openai/gpt-5.5:xhigh",
131
- "github-copilot/claude-opus-4.8 (1m):xhigh",
132
- "anthropic/claude-opus-4-8:xhigh",
121
+ "github-copilot/claude-opus-4.8 (1m):high",
122
+ "anthropic/claude-opus-4-8:high",
133
123
  "zai/glm-5.2:xhigh",
134
124
  "zai-coding-cn/glm-5.2:xhigh",
135
- "github-copilot/claude-sonnet-5 (1m):high",
136
- "anthropic/claude-sonnet-5:high",
137
- "github-copilot/claude-sonnet-4.6 (1m):high",
138
- "anthropic/claude-sonnet-4-6:high",
139
- "github-copilot/gemini-3.5-flash (1m):high",
140
- "google/gemini-3.5-flash:high",
141
- "google-vertex/gemini-3.5-flash:high",
142
- "github-copilot/gemini-3.1-pro-preview (1m):high",
143
- "google/gemini-3.1-pro-preview:high",
144
- "google-vertex/gemini-3.1-pro-preview:high",
145
- "openrouter/anthropic/claude-fable-5:high",
125
+ "openrouter/anthropic/claude-fable-5:xhigh",
146
126
  "openrouter/openai/gpt-5.5:xhigh",
147
- "openrouter/anthropic/claude-opus-4-8:xhigh",
148
- "openrouter/z-ai/glm-5.2:xhigh",
149
- "openrouter/anthropic/claude-sonnet-5:high",
150
- "openrouter/anthropic/claude-sonnet-4-6:high",
151
- "openrouter/google/gemini-3.5-flash:high",
152
- "openrouter/google/gemini-3.1-pro-preview:high"
127
+ "openrouter/anthropic/claude-opus-4-8:high",
128
+ "openrouter/z-ai/glm-5.2:xhigh"
153
129
  ],
154
130
  tools: goalRunnerTools,
155
131
  schema: reviewDecisionSchema,
@@ -74,22 +74,19 @@ export async function runOpenClaudeDesignWorkflow(ctx: OpenClaudeDesignContext):
74
74
  });
75
75
  }
76
76
 
77
+ // Anthropic-heavy chain for design taste; sonnet-5/sonnet-4.6 dropped as
78
+ // strictly dominated in Atomic's benchmark (see ralph-models.ts). Opus stays
79
+ // at :xhigh here — visual quality, not $/task, is the objective for design.
77
80
  const designModelConfig = {
78
- model: "anthropic/claude-fable-5:high",
81
+ model: "anthropic/claude-fable-5:xhigh",
79
82
  fallbackModels: [
80
83
  "github-copilot/claude-opus-4.8 (1m):xhigh",
81
84
  "anthropic/claude-opus-4-8:xhigh",
82
85
  "zai/glm-5.2:xhigh",
83
86
  "zai-coding-cn/glm-5.2:xhigh",
84
- "github-copilot/claude-sonnet-5 (1m):high",
85
- "github-copilot/claude-sonnet-4.6 (1m):high",
86
- "anthropic/claude-sonnet-5:high",
87
- "anthropic/claude-sonnet-4-6:high",
88
- "openrouter/anthropic/claude-fable-5:high",
87
+ "openrouter/anthropic/claude-fable-5:xhigh",
89
88
  "openrouter/anthropic/claude-opus-4-8:xhigh",
90
- "openrouter/z-ai/glm-5.2:xhigh",
91
- "openrouter/anthropic/claude-sonnet-5:high",
92
- "openrouter/anthropic/claude-sonnet-4-6:high"
89
+ "openrouter/z-ai/glm-5.2:xhigh"
93
90
  ],
94
91
  };
95
92
  // Phase 1: combined discovery + init — one stage interviews the user via
@@ -1,33 +1,42 @@
1
1
  import { reviewDecisionSchema } from "./ralph-core.js";
2
2
 
3
+ // Model chains are curated from Atomic's agentic-coding benchmark
4
+ // (pass@1 / avg $ per task, 2026-07-02):
5
+ // - Placement principle: REVIEWERS get best-in-class verification quality
6
+ // (fable-5:xhigh 70%/$13.41 leads reviewer-A and the goal reviewer);
7
+ // EVERY OTHER stage gets the best measured performance-per-dollar
8
+ // (gpt-5.5:xhigh 67%/$7.23 for hard stages, gpt-5.5:medium 54%/$2.75 for
9
+ // workhorse stages, gpt-5.5:low $1.20 for retrieval).
10
+ // - Pareto frontier: gpt-5.5 low ($1.20/27%) → gpt-5.5 medium ($2.75/54%) →
11
+ // fable-5 low ($3.76/60%) → gpt-5.5 high ($5.10/64%) → fable-5 medium
12
+ // ($6.09/65%) → gpt-5.5 xhigh ($7.23/67%) → fable-5 high ($9.18/69%) →
13
+ // fable-5 xhigh ($13.41/70%).
14
+ // - Dropped as strictly dominated: claude-sonnet-5 (40-54% at $4-26, up to
15
+ // 268 steps), claude-sonnet-4.6 (30%/$5.52), gemini-3.1-pro (12%/$9.48),
16
+ // gemini-3.5-flash (37%/$7.34, 276k output tokens).
17
+ // - claude-opus-4.8 rides at :high — its value point (52%/$4.28); :xhigh
18
+ // doubles the cost for +2pts.
19
+ // - glm-5.2 is reviewer-C's diversity primary only (third model family
20
+ // decorrelates review errors); elsewhere it is a budget fallback. Note:
21
+ // GLM-5.2 has only two real reasoning tiers — its thinkingLevelMap collapses
22
+ // minimal/low/medium/high to "high" and xhigh to "max" — so chains only use
23
+ // :high (budget tier, 36%/$2.84) or :xhigh (best tier, 44%/$3.92); the
24
+ // openrouter/z-ai mirror maps :xhigh exclusively, so it is always :xhigh.
25
+
3
26
  export const promptEngineerModelConfig = {
4
- model: "anthropic/claude-fable-5:high",
27
+ model: "openai-codex/gpt-5.5:xhigh",
5
28
  fallbackModels: [
6
- "openai-codex/gpt-5.5:xhigh",
7
29
  "github-copilot/gpt-5.5:xhigh",
8
30
  "openai/gpt-5.5:xhigh",
9
- "github-copilot/claude-opus-4.8 (1m):xhigh",
10
- "anthropic/claude-opus-4-8:xhigh",
31
+ "anthropic/claude-fable-5:xhigh",
32
+ "github-copilot/claude-opus-4.8 (1m):high",
33
+ "anthropic/claude-opus-4-8:high",
11
34
  "zai/glm-5.2:xhigh",
12
35
  "zai-coding-cn/glm-5.2:xhigh",
13
- "github-copilot/claude-sonnet-5 (1m):high",
14
- "anthropic/claude-sonnet-5:high",
15
- "github-copilot/claude-sonnet-4.6 (1m):high",
16
- "anthropic/claude-sonnet-4-6:high",
17
- "github-copilot/gemini-3.5-flash (1m):high",
18
- "google/gemini-3.5-flash:high",
19
- "google-vertex/gemini-3.5-flash:high",
20
- "github-copilot/gemini-3.1-pro-preview (1m):high",
21
- "google/gemini-3.1-pro-preview:high",
22
- "google-vertex/gemini-3.1-pro-preview:high",
23
- "openrouter/anthropic/claude-fable-5:high",
24
36
  "openrouter/openai/gpt-5.5:xhigh",
25
- "openrouter/anthropic/claude-opus-4-8:xhigh",
26
- "openrouter/z-ai/glm-5.2:xhigh",
27
- "openrouter/anthropic/claude-sonnet-5:high",
28
- "openrouter/anthropic/claude-sonnet-4-6:high",
29
- "openrouter/google/gemini-3.5-flash:high",
30
- "openrouter/google/gemini-3.1-pro-preview:high"
37
+ "openrouter/anthropic/claude-fable-5:xhigh",
38
+ "openrouter/anthropic/claude-opus-4-8:high",
39
+ "openrouter/z-ai/glm-5.2:xhigh"
31
40
  ],
32
41
  excludedTools: ["ask_user_question"],
33
42
  };
@@ -37,27 +46,15 @@ export const researchModelConfig = {
37
46
  fallbackModels: [
38
47
  "github-copilot/gpt-5.5:medium",
39
48
  "openai/gpt-5.5:medium",
49
+ "anthropic/claude-fable-5:low",
40
50
  "github-copilot/claude-opus-4.8 (1m):medium",
41
51
  "anthropic/claude-opus-4-8:medium",
42
- "zai/glm-5.2:medium",
43
- "zai-coding-cn/glm-5.2:medium",
44
- "github-copilot/claude-sonnet-5 (1m):medium",
45
- "anthropic/claude-sonnet-5:medium",
46
- "github-copilot/claude-sonnet-4.6 (1m):medium",
47
- "anthropic/claude-sonnet-4-6:medium",
48
- "github-copilot/gemini-3.5-flash (1m):medium",
49
- "google/gemini-3.5-flash:medium",
50
- "google-vertex/gemini-3.5-flash:medium",
51
- "github-copilot/gemini-3.1-pro-preview (1m):medium",
52
- "google/gemini-3.1-pro-preview:medium",
53
- "google-vertex/gemini-3.1-pro-preview:medium",
52
+ "zai/glm-5.2:high",
53
+ "zai-coding-cn/glm-5.2:high",
54
54
  "openrouter/openai/gpt-5.5:medium",
55
+ "openrouter/anthropic/claude-fable-5:low",
55
56
  "openrouter/anthropic/claude-opus-4-8:medium",
56
- "openrouter/z-ai/glm-5.2:medium",
57
- "openrouter/anthropic/claude-sonnet-5:medium",
58
- "openrouter/anthropic/claude-sonnet-4-6:medium",
59
- "openrouter/google/gemini-3.5-flash:medium",
60
- "openrouter/google/gemini-3.1-pro-preview:medium"
57
+ "openrouter/z-ai/glm-5.2:xhigh"
61
58
  ],
62
59
  excludedTools: ["ask_user_question"],
63
60
  };
@@ -67,59 +64,33 @@ export const orchestratorModelConfig = {
67
64
  fallbackModels: [
68
65
  "github-copilot/gpt-5.5:medium",
69
66
  "openai/gpt-5.5:medium",
67
+ "anthropic/claude-fable-5:low",
70
68
  "github-copilot/claude-opus-4.8 (1m):medium",
71
69
  "anthropic/claude-opus-4-8:medium",
72
- "zai/glm-5.2:medium",
73
- "zai-coding-cn/glm-5.2:medium",
74
- "github-copilot/claude-sonnet-5 (1m):medium",
75
- "anthropic/claude-sonnet-5:medium",
76
- "github-copilot/claude-sonnet-4.6 (1m):medium",
77
- "anthropic/claude-sonnet-4-6:medium",
78
- "github-copilot/gemini-3.5-flash (1m):medium",
79
- "google/gemini-3.5-flash:medium",
80
- "google-vertex/gemini-3.5-flash:medium",
81
- "github-copilot/gemini-3.1-pro-preview (1m):medium",
82
- "google/gemini-3.1-pro-preview:medium",
83
- "google-vertex/gemini-3.1-pro-preview:medium",
70
+ "zai/glm-5.2:high",
71
+ "zai-coding-cn/glm-5.2:high",
84
72
  "openrouter/openai/gpt-5.5:medium",
73
+ "openrouter/anthropic/claude-fable-5:low",
85
74
  "openrouter/anthropic/claude-opus-4-8:medium",
86
- "openrouter/z-ai/glm-5.2:medium",
87
- "openrouter/anthropic/claude-sonnet-5:medium",
88
- "openrouter/anthropic/claude-sonnet-4-6:medium",
89
- "openrouter/google/gemini-3.5-flash:medium",
90
- "openrouter/google/gemini-3.1-pro-preview:medium"
75
+ "openrouter/z-ai/glm-5.2:xhigh"
91
76
  ],
92
77
  excludedTools: ["ask_user_question"],
93
78
  };
94
79
 
95
80
  export const reviewerAModelConfig = {
96
- model: "anthropic/claude-fable-5:high",
81
+ model: "anthropic/claude-fable-5:xhigh",
97
82
  fallbackModels: [
98
- "github-copilot/claude-opus-4.8 (1m):xhigh",
99
- "anthropic/claude-opus-4-8:xhigh",
100
83
  "openai-codex/gpt-5.5:xhigh",
101
84
  "github-copilot/gpt-5.5:xhigh",
102
85
  "openai/gpt-5.5:xhigh",
86
+ "github-copilot/claude-opus-4.8 (1m):high",
87
+ "anthropic/claude-opus-4-8:high",
103
88
  "zai/glm-5.2:xhigh",
104
89
  "zai-coding-cn/glm-5.2:xhigh",
105
- "github-copilot/claude-sonnet-5 (1m):high",
106
- "anthropic/claude-sonnet-5:high",
107
- "github-copilot/claude-sonnet-4.6 (1m):high",
108
- "anthropic/claude-sonnet-4-6:high",
109
- "github-copilot/gemini-3.5-flash (1m):high",
110
- "google/gemini-3.5-flash:high",
111
- "google-vertex/gemini-3.5-flash:high",
112
- "github-copilot/gemini-3.1-pro-preview (1m):high",
113
- "google/gemini-3.1-pro-preview:high",
114
- "google-vertex/gemini-3.1-pro-preview:high",
115
- "openrouter/anthropic/claude-fable-5:high",
116
- "openrouter/anthropic/claude-opus-4-8:xhigh",
90
+ "openrouter/anthropic/claude-fable-5:xhigh",
117
91
  "openrouter/openai/gpt-5.5:xhigh",
118
- "openrouter/z-ai/glm-5.2:xhigh",
119
- "openrouter/anthropic/claude-sonnet-5:high",
120
- "openrouter/anthropic/claude-sonnet-4-6:high",
121
- "openrouter/google/gemini-3.5-flash:high",
122
- "openrouter/google/gemini-3.1-pro-preview:high"
92
+ "openrouter/anthropic/claude-opus-4-8:high",
93
+ "openrouter/z-ai/glm-5.2:xhigh"
123
94
  ],
124
95
  excludedTools: ["ask_user_question"],
125
96
  schema: reviewDecisionSchema,
@@ -130,29 +101,15 @@ export const reviewerBModelConfig = {
130
101
  fallbackModels: [
131
102
  "github-copilot/gpt-5.5:xhigh",
132
103
  "openai/gpt-5.5:xhigh",
133
- "anthropic/claude-fable-5:high",
134
- "github-copilot/claude-opus-4.8 (1m):xhigh",
135
- "anthropic/claude-opus-4-8:xhigh",
104
+ "anthropic/claude-fable-5:xhigh",
105
+ "github-copilot/claude-opus-4.8 (1m):high",
106
+ "anthropic/claude-opus-4-8:high",
136
107
  "zai/glm-5.2:xhigh",
137
108
  "zai-coding-cn/glm-5.2:xhigh",
138
- "github-copilot/claude-sonnet-5 (1m):high",
139
- "anthropic/claude-sonnet-5:high",
140
- "github-copilot/claude-sonnet-4.6 (1m):high",
141
- "anthropic/claude-sonnet-4-6:high",
142
- "github-copilot/gemini-3.5-flash (1m):high",
143
- "google/gemini-3.5-flash:high",
144
- "google-vertex/gemini-3.5-flash:high",
145
- "github-copilot/gemini-3.1-pro-preview (1m):high",
146
- "google/gemini-3.1-pro-preview:high",
147
- "google-vertex/gemini-3.1-pro-preview:high",
148
109
  "openrouter/openai/gpt-5.5:xhigh",
149
- "openrouter/anthropic/claude-fable-5:high",
150
- "openrouter/anthropic/claude-opus-4-8:xhigh",
151
- "openrouter/z-ai/glm-5.2:xhigh",
152
- "openrouter/anthropic/claude-sonnet-5:high",
153
- "openrouter/anthropic/claude-sonnet-4-6:high",
154
- "openrouter/google/gemini-3.5-flash:high",
155
- "openrouter/google/gemini-3.1-pro-preview:high"
110
+ "openrouter/anthropic/claude-fable-5:xhigh",
111
+ "openrouter/anthropic/claude-opus-4-8:high",
112
+ "openrouter/z-ai/glm-5.2:xhigh"
156
113
  ],
157
114
  excludedTools: ["ask_user_question"],
158
115
  schema: reviewDecisionSchema,
@@ -162,30 +119,16 @@ export const reviewerCModelConfig = {
162
119
  model: "zai/glm-5.2:xhigh",
163
120
  fallbackModels: [
164
121
  "zai-coding-cn/glm-5.2:xhigh",
165
- "github-copilot/gemini-3.5-flash (1m):high",
166
- "google/gemini-3.5-flash:high",
167
- "google-vertex/gemini-3.5-flash:high",
168
- "github-copilot/gemini-3.1-pro-preview (1m):high",
169
- "google/gemini-3.1-pro-preview:high",
170
- "google-vertex/gemini-3.1-pro-preview:high",
122
+ "openrouter/z-ai/glm-5.2:xhigh",
171
123
  "openai-codex/gpt-5.5:xhigh",
172
124
  "github-copilot/gpt-5.5:xhigh",
173
125
  "openai/gpt-5.5:xhigh",
174
- "anthropic/claude-fable-5:high",
175
- "github-copilot/claude-opus-4.8 (1m):xhigh",
176
- "anthropic/claude-opus-4-8:xhigh",
177
- "github-copilot/claude-sonnet-5 (1m):high",
178
- "anthropic/claude-sonnet-5:high",
179
- "github-copilot/claude-sonnet-4.6 (1m):high",
180
- "anthropic/claude-sonnet-4-6:high",
181
- "openrouter/anthropic/claude-fable-5:high",
182
- "openrouter/anthropic/claude-opus-4-8:xhigh",
183
- "openrouter/anthropic/claude-sonnet-5:high",
184
- "openrouter/anthropic/claude-sonnet-4-6:high",
126
+ "anthropic/claude-fable-5:xhigh",
127
+ "github-copilot/claude-opus-4.8 (1m):high",
128
+ "anthropic/claude-opus-4-8:high",
185
129
  "openrouter/openai/gpt-5.5:xhigh",
186
- "openrouter/z-ai/glm-5.2:xhigh",
187
- "openrouter/google/gemini-3.5-flash:high",
188
- "openrouter/google/gemini-3.1-pro-preview:high"
130
+ "openrouter/anthropic/claude-fable-5:xhigh",
131
+ "openrouter/anthropic/claude-opus-4-8:high"
189
132
  ],
190
133
  excludedTools: ["ask_user_question"],
191
134
  schema: reviewDecisionSchema,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/workflows",
3
- "version": "0.9.4-alpha.8",
3
+ "version": "0.9.4",
4
4
  "private": true,
5
5
  "description": "Atomic extension for multi-stage workflow authoring and execution.",
6
6
  "contributors": [
@@ -38,6 +38,10 @@ export interface KeybindingsLike {
38
38
  matches(data: string, action: string): boolean;
39
39
  }
40
40
 
41
+ export const APP_ACTION = {
42
+ toolsExpand: "app.tools.expand",
43
+ } as const;
44
+
41
45
  export const TUI_ACTION = {
42
46
  editorCursorUp: "tui.editor.cursorUp",
43
47
  editorCursorDown: "tui.editor.cursorDown",
@@ -48,6 +48,8 @@ export interface OverlayUISurface {
48
48
  focusHostInlineCustomUi?: () => boolean;
49
49
  getEditorComponent?: () => PiEditorFactory | undefined;
50
50
  getChatRenderSettings?: () => OverlayChatRenderSettings | undefined;
51
+ getToolsExpanded?: () => boolean;
52
+ setToolsExpanded?: (expanded: boolean) => void;
51
53
  getFooterDataProvider?: () => ReadonlyFooterDataProvider;
52
54
  setStatus?: (key: string, value: string | undefined) => void;
53
55
  }
@@ -334,6 +336,8 @@ export function buildGraphOverlayAdapter(
334
336
  piKeybindings: keybindings,
335
337
  piEditorFactory: ui?.getEditorComponent?.(),
336
338
  getChatRenderSettings: ui?.getChatRenderSettings,
339
+ getToolsExpanded: ui?.getToolsExpanded,
340
+ setToolsExpanded: ui?.setToolsExpanded,
337
341
  footerData: ui?.getFooterDataProvider?.(),
338
342
  // Pi-tui owns terminal dimensions; thread its row count down
339
343
  // so the overlay frame fills the actual viewport rather than
@@ -3,7 +3,7 @@ import {
3
3
  handlePromptCardInput,
4
4
  isPromptEscapeInput,
5
5
  } from "./prompt-card.js";
6
- import { isKeybindingsLike } from "./keybindings-adapter.js";
6
+ import { APP_ACTION, isKeybindingsLike, matchesAction } from "./keybindings-adapter.js";
7
7
  import {
8
8
  setComponentFocused,
9
9
  setEditorFocused,
@@ -35,6 +35,7 @@ export function handleStageChatInput(
35
35
  ctx.requestRender?.();
36
36
  return true;
37
37
  }
38
+ if (handleToolsExpandInput(ctx, data)) return true;
38
39
  if (ctx.mountedCustomUi) {
39
40
  return handleMountedCustomUiInput(ctx, data);
40
41
  }
@@ -87,6 +88,16 @@ export function handleStageChatInput(
87
88
  return ctx.chatHost.handleInput(data);
88
89
  }
89
90
 
91
+ function handleToolsExpandInput(ctx: StageChatViewContext, data: string): boolean {
92
+ const keybindings = isKeybindingsLike(ctx.piKeybindings) ? ctx.piKeybindings : undefined;
93
+ if (!matchesAction(keybindings, data, APP_ACTION.toolsExpand)) return false;
94
+ const expanded = ctx.getToolsExpanded?.() === true;
95
+ ctx.setToolsExpanded?.(!expanded);
96
+ ctx.chatHost.invalidate();
97
+ ctx.requestRender?.();
98
+ return true;
99
+ }
100
+
90
101
  function handleMountedCustomUiInput(
91
102
  ctx: StageChatViewContext,
92
103
  data: string,
@@ -57,6 +57,8 @@ export function initializeStageChatView(
57
57
  ctx.piTheme = opts.piTheme;
58
58
  ctx.piKeybindings = opts.piKeybindings;
59
59
  ctx.piEditorFactory = opts.piEditorFactory;
60
+ ctx.getToolsExpanded = opts.getToolsExpanded;
61
+ ctx.setToolsExpanded = opts.setToolsExpanded;
60
62
  ctx.stageUiBroker = opts.stageUiBroker ?? stageUiBroker;
61
63
  ctx.canSubmitPrompt = opts.canSubmitPrompt;
62
64
  ctx.mountedCustomUi = null;
@@ -63,6 +63,10 @@ export interface StageChatViewOpts {
63
63
  getChatRenderSettings?: () =>
64
64
  | Partial<Omit<ChatMessageRenderOptions, "ui" | "cwd">>
65
65
  | undefined;
66
+ /** Parent host expansion state for tool-output/live-detail widgets. */
67
+ getToolsExpanded?: () => boolean;
68
+ /** Toggle parent host expansion state for tool-output/live-detail widgets. */
69
+ setToolsExpanded?: (expanded: boolean) => void;
66
70
  /** Parent footer data provider inherited from the host UI for core footer/usage rendering. */
67
71
  footerData?: ReadonlyFooterDataProvider;
68
72
  /**
@@ -133,6 +137,8 @@ export interface StageChatViewContext {
133
137
  piTheme: unknown;
134
138
  piKeybindings: unknown;
135
139
  piEditorFactory: StageChatViewOpts["piEditorFactory"] | undefined;
140
+ getToolsExpanded: (() => boolean) | undefined;
141
+ setToolsExpanded: ((expanded: boolean) => void) | undefined;
136
142
  chatHost: ChatSessionHost<NoticeEntry>;
137
143
  stageUiBroker: StageUiBroker;
138
144
  canSubmitPrompt: ((runId: string, stageId: string, promptId: string) => boolean) | undefined;
@@ -83,6 +83,8 @@ export class StageChatView implements Component, Focusable {
83
83
  private piTheme!: StageChatViewContext["piTheme"];
84
84
  private piKeybindings!: StageChatViewContext["piKeybindings"];
85
85
  private piEditorFactory!: StageChatViewContext["piEditorFactory"];
86
+ private getToolsExpanded!: StageChatViewContext["getToolsExpanded"];
87
+ private setToolsExpanded!: StageChatViewContext["setToolsExpanded"];
86
88
  private chatHost!: StageChatViewContext["chatHost"];
87
89
  private stageUiBroker!: StageChatViewContext["stageUiBroker"];
88
90
  private canSubmitPrompt!: StageChatViewContext["canSubmitPrompt"];
@@ -213,6 +215,8 @@ export class StageChatView implements Component, Focusable {
213
215
  void this.piTheme;
214
216
  void this.piKeybindings;
215
217
  void this.piEditorFactory;
218
+ void this.getToolsExpanded;
219
+ void this.setToolsExpanded;
216
220
  void this.stageUiBroker;
217
221
  void this.canSubmitPrompt;
218
222
  void this.mountingRequestId;
@@ -41,6 +41,10 @@ export interface WorkflowAttachPaneOpts {
41
41
  piEditorFactory?: (tui: TUI, theme: EditorTheme, keybindings: unknown) => EditorComponent;
42
42
  /** Parent chat rendering settings and extension renderers, inherited from the host UI. */
43
43
  getChatRenderSettings?: () => Partial<Omit<ChatMessageRenderOptions, "ui" | "cwd">> | undefined;
44
+ /** Parent host tool-output/live-detail expansion state, inherited from the host UI. */
45
+ getToolsExpanded?: () => boolean;
46
+ /** Parent host tool-output/live-detail expansion setter, inherited from the host UI. */
47
+ setToolsExpanded?: (expanded: boolean) => void;
44
48
  /** Parent footer data provider, inherited so attached chats can render the core coding-agent footer. */
45
49
  footerData?: ReadonlyFooterDataProvider;
46
50
  /**
@@ -24,16 +24,9 @@ import type { ChatMessageRenderOptions, ReadonlyFooterDataProvider } from "@bast
24
24
  import type { Store } from "../shared/store.js";
25
25
  import type { GraphTheme } from "./graph-theme.js";
26
26
  import { GraphView } from "./graph-view.js";
27
- import {
28
- StageChatView,
29
- type StageChatDetachMetadata,
30
- type StageChatDetachReason,
31
- } from "./stage-chat-view.js";
27
+ import { StageChatView, type StageChatDetachMetadata, type StageChatDetachReason } from "./stage-chat-view.js";
32
28
  import { Key, matchesKey } from "./text-helpers.js";
33
- import type {
34
- StageControlHandle,
35
- StageControlRegistry,
36
- } from "../runs/foreground/stage-control-registry.js";
29
+ import type { StageControlHandle, StageControlRegistry } from "../runs/foreground/stage-control-registry.js";
37
30
  import type { StageUiBroker } from "../shared/stage-ui-broker.js";
38
31
  import type { StageSnapshot, StoreSnapshot } from "../shared/store-types.js";
39
32
  import { expandWorkflowGraph } from "../shared/expanded-workflow-graph.js";
@@ -68,6 +61,8 @@ export class WorkflowAttachPane implements Component {
68
61
  private piKeybindings?: unknown;
69
62
  private piEditorFactory?: (tui: TUI, theme: EditorTheme, keybindings: unknown) => EditorComponent;
70
63
  private getChatRenderSettings?: () => Partial<Omit<ChatMessageRenderOptions, "ui" | "cwd">> | undefined;
64
+ private getToolsExpanded?: () => boolean;
65
+ private setToolsExpanded?: (expanded: boolean) => void;
71
66
  private footerData?: ReadonlyFooterDataProvider;
72
67
  private now: () => number;
73
68
  private mode: WorkflowAttachPaneMode = "graph";
@@ -104,6 +99,8 @@ export class WorkflowAttachPane implements Component {
104
99
  this.piKeybindings = opts.piKeybindings;
105
100
  this.piEditorFactory = opts.piEditorFactory;
106
101
  this.getChatRenderSettings = opts.getChatRenderSettings;
102
+ this.getToolsExpanded = opts.getToolsExpanded;
103
+ this.setToolsExpanded = opts.setToolsExpanded;
107
104
  this.footerData = opts.footerData;
108
105
  this.now = opts.now ?? Date.now;
109
106
  this.unsubscribeStore = this.store.subscribe((snapshot) => this._handleStoreUpdate(snapshot));
@@ -197,6 +194,8 @@ export class WorkflowAttachPane implements Component {
197
194
  piKeybindings: this.piKeybindings,
198
195
  piEditorFactory: this.piEditorFactory,
199
196
  getChatRenderSettings: this.getChatRenderSettings,
197
+ getToolsExpanded: this.getToolsExpanded,
198
+ setToolsExpanded: this.setToolsExpanded,
200
199
  footerData: this.footerData,
201
200
  getViewportRows: this.getViewportRows,
202
201
  stageUiBroker: this.stageUiBroker,
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/bun/cli.ts"],"names":[],"mappings":"","sourcesContent":["#!/usr/bin/env node\nimport { APP_NAME } from \"../config.ts\";\n\nprocess.title = APP_NAME;\nprocess.emitWarning = (() => {}) as typeof process.emitWarning;\n\nimport { restoreSandboxEnv } from \"./restore-sandbox-env.ts\";\n\nrestoreSandboxEnv();\n\nawait import(\"./register-bedrock.ts\");\nawait import(\"../cli.ts\");\n"]}
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/bun/cli.ts"],"names":[],"mappings":"","sourcesContent":["#!/usr/bin/env node\nimport { APP_NAME } from \"../config.ts\";\n\nprocess.title = APP_NAME;\nprocess.emitWarning = (() => {}) as typeof process.emitWarning;\n\nimport { restoreSandboxEnv } from \"./restore-sandbox-env.ts\";\n\nrestoreSandboxEnv();\n\n// No top-level await: the compiled binary is built with --bytecode (CJS),\n// which forbids TLA anywhere in the bundled graph.\nvoid import(\"./register-bedrock.ts\").then(() => import(\"../cli.ts\"));\n"]}
package/dist/bun/cli.js CHANGED
@@ -4,6 +4,7 @@ process.title = APP_NAME;
4
4
  process.emitWarning = (() => { });
5
5
  import { restoreSandboxEnv } from "./restore-sandbox-env.js";
6
6
  restoreSandboxEnv();
7
- await import("./register-bedrock.js");
8
- await import("../cli.js");
7
+ // No top-level await: the compiled binary is built with --bytecode (CJS),
8
+ // which forbids TLA anywhere in the bundled graph.
9
+ void import("./register-bedrock.js").then(() => import("../cli.js"));
9
10
  //# sourceMappingURL=cli.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/bun/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,CAAC,KAAK,GAAG,QAAQ,CAAC;AACzB,OAAO,CAAC,WAAW,GAAG,CAAC,GAAG,EAAE,GAAE,CAAC,CAA+B,CAAC;AAE/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,iBAAiB,EAAE,CAAC;AAEpB,MAAM,MAAM,CAAC,uBAAuB,CAAC,CAAC;AACtC,MAAM,MAAM,CAAC,WAAW,CAAC,CAAC","sourcesContent":["#!/usr/bin/env node\nimport { APP_NAME } from \"../config.ts\";\n\nprocess.title = APP_NAME;\nprocess.emitWarning = (() => {}) as typeof process.emitWarning;\n\nimport { restoreSandboxEnv } from \"./restore-sandbox-env.ts\";\n\nrestoreSandboxEnv();\n\nawait import(\"./register-bedrock.ts\");\nawait import(\"../cli.ts\");\n"]}
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/bun/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,CAAC,KAAK,GAAG,QAAQ,CAAC;AACzB,OAAO,CAAC,WAAW,GAAG,CAAC,GAAG,EAAE,GAAE,CAAC,CAA+B,CAAC;AAE/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,iBAAiB,EAAE,CAAC;AAEpB,0EAA0E;AAC1E,mDAAmD;AACnD,KAAK,MAAM,CAAC,uBAAuB,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC","sourcesContent":["#!/usr/bin/env node\nimport { APP_NAME } from \"../config.ts\";\n\nprocess.title = APP_NAME;\nprocess.emitWarning = (() => {}) as typeof process.emitWarning;\n\nimport { restoreSandboxEnv } from \"./restore-sandbox-env.ts\";\n\nrestoreSandboxEnv();\n\n// No top-level await: the compiled binary is built with --bytecode (CJS),\n// which forbids TLA anywhere in the bundled graph.\nvoid import(\"./register-bedrock.ts\").then(() => import(\"../cli.ts\"));\n"]}
package/dist/cli.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"","sourcesContent":["#!/usr/bin/env node\n/**\n * CLI entry point for the refactored coding agent.\n * Uses main.ts with AgentSession and new mode modules.\n *\n * Test with: npx tsx src/cli-new.ts [args...]\n */\nimport { configureHttpDispatcher } from \"./core/http-dispatcher.ts\";\nimport { APP_NAME } from \"./config.ts\";\nimport { main } from \"./main.ts\";\n\nprocess.title = APP_NAME;\nprocess.env[`${APP_NAME.toUpperCase()}_CODING_AGENT`] = \"true\";\nprocess.emitWarning = (() => {}) as typeof process.emitWarning;\n\nconfigureHttpDispatcher();\n\nmain(process.argv.slice(2));\n"]}
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"","sourcesContent":["#!/usr/bin/env node\n/**\n * CLI entry point for the refactored coding agent.\n * Uses main.ts with AgentSession and new mode modules.\n *\n * Test with: npx tsx src/cli-new.ts [args...]\n *\n * Deliberately imports only config.ts statically: the full CLI module graph is\n * loaded dynamically so metadata fast paths (e.g. --version) skip it entirely.\n */\nimport { APP_NAME, VERSION } from \"./config.ts\";\n\nprocess.title = APP_NAME;\nprocess.env[`${APP_NAME.toUpperCase()}_CODING_AGENT`] = \"true\";\nprocess.emitWarning = (() => {}) as typeof process.emitWarning;\n\nconst args = process.argv.slice(2);\n\nif (args[0] === \"--version\" || args[0] === \"-v\") {\n\tconsole.log(VERSION);\n\tprocess.exit(0);\n}\n\n// No top-level await: the compiled binary is built with --bytecode (CJS),\n// which forbids TLA anywhere in the bundled graph.\nvoid Promise.all([import(\"./core/http-dispatcher.ts\"), import(\"./main.ts\")]).then(\n\t([{ configureHttpDispatcher }, { main }]) => {\n\t\tconfigureHttpDispatcher();\n\t\tmain(args);\n\t},\n);\n"]}