@bastani/atomic 0.9.5-alpha.4 → 0.9.5-alpha.6
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/CHANGELOG.md +24 -0
- package/dist/builtin/cursor/package.json +2 -2
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/CHANGELOG.md +7 -0
- package/dist/builtin/subagents/agents/debugger.md +2 -2
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/builtin/workflows/CHANGELOG.md +17 -0
- package/dist/builtin/workflows/builtin/deep-research-codebase-utils.ts +5 -5
- package/dist/builtin/workflows/builtin/goal-runner.ts +5 -5
- package/dist/builtin/workflows/builtin/goal-types.ts +1 -0
- package/dist/builtin/workflows/builtin/goal.d.ts +2 -0
- package/dist/builtin/workflows/builtin/goal.ts +9 -0
- package/dist/builtin/workflows/builtin/index.d.ts +2 -0
- package/dist/builtin/workflows/builtin/open-claude-design-runner.ts +5 -5
- package/dist/builtin/workflows/builtin/ralph-models.ts +25 -25
- package/dist/builtin/workflows/package.json +1 -1
- package/dist/builtin/workflows/src/runs/foreground/executor-stage-control.ts +8 -0
- package/dist/builtin/workflows/src/runs/foreground/stage-control-registry.ts +2 -0
- package/dist/builtin/workflows/src/runs/foreground/stage-tool-execution-buffer.ts +47 -0
- package/dist/builtin/workflows/src/tui/stage-chat-view-pending-tools.ts +9 -0
- package/dist/builtin/workflows/src/tui/stage-chat-view-render-settings.ts +27 -0
- package/dist/builtin/workflows/src/tui/stage-chat-view-state.ts +5 -6
- package/dist/core/agent-session-auto-compaction.d.ts.map +1 -1
- package/dist/core/agent-session-auto-compaction.js +3 -2
- package/dist/core/agent-session-auto-compaction.js.map +1 -1
- package/dist/core/agent-session-compaction.d.ts.map +1 -1
- package/dist/core/agent-session-compaction.js +25 -4
- package/dist/core/agent-session-compaction.js.map +1 -1
- package/dist/core/compaction/context-compaction-critical.d.ts +15 -0
- package/dist/core/compaction/context-compaction-critical.d.ts.map +1 -0
- package/dist/core/compaction/context-compaction-critical.js +57 -0
- package/dist/core/compaction/context-compaction-critical.js.map +1 -0
- package/dist/core/compaction/context-compaction-eviction.d.ts +4 -0
- package/dist/core/compaction/context-compaction-eviction.d.ts.map +1 -0
- package/dist/core/compaction/context-compaction-eviction.js +172 -0
- package/dist/core/compaction/context-compaction-eviction.js.map +1 -0
- package/dist/core/compaction/context-compaction-runner.d.ts +7 -1
- package/dist/core/compaction/context-compaction-runner.d.ts.map +1 -1
- package/dist/core/compaction/context-compaction-runner.js +97 -21
- package/dist/core/compaction/context-compaction-runner.js.map +1 -1
- package/dist/core/compaction/context-transcript-analysis.d.ts +3 -0
- package/dist/core/compaction/context-transcript-analysis.d.ts.map +1 -1
- package/dist/core/compaction/context-transcript-analysis.js +3 -3
- package/dist/core/compaction/context-transcript-analysis.js.map +1 -1
- package/dist/core/extensions/loader-core.d.ts.map +1 -1
- package/dist/core/extensions/loader-core.js +6 -0
- package/dist/core/extensions/loader-core.js.map +1 -1
- package/dist/core/model-resolver-scope.d.ts +9 -0
- package/dist/core/model-resolver-scope.d.ts.map +1 -1
- package/dist/core/model-resolver-scope.js +12 -4
- package/dist/core/model-resolver-scope.js.map +1 -1
- package/dist/core/model-resolver.d.ts +3 -2
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +1 -1
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/resource-loader-extensions.d.ts.map +1 -1
- package/dist/core/resource-loader-extensions.js +4 -0
- package/dist/core/resource-loader-extensions.js.map +1 -1
- package/dist/core/resource-loader-reload.d.ts.map +1 -1
- package/dist/core/resource-loader-reload.js +11 -0
- package/dist/core/resource-loader-reload.js.map +1 -1
- package/dist/core/settings-manager-core.d.ts.map +1 -1
- package/dist/core/settings-manager-core.js +3 -2
- package/dist/core/settings-manager-core.js.map +1 -1
- package/dist/core/settings-storage.d.ts.map +1 -1
- package/dist/core/settings-storage.js +2 -1
- package/dist/core/settings-storage.js.map +1 -1
- package/dist/core/trust-manager.d.ts +9 -0
- package/dist/core/trust-manager.d.ts.map +1 -1
- package/dist/core/trust-manager.js +44 -2
- package/dist/core/trust-manager.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/main-deferred-startup.d.ts +19 -0
- package/dist/main-deferred-startup.d.ts.map +1 -0
- package/dist/main-deferred-startup.js +21 -0
- package/dist/main-deferred-startup.js.map +1 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +24 -22
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/interactive-deferred-startup.d.ts +2 -1
- package/dist/modes/interactive/interactive-deferred-startup.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-deferred-startup.js +34 -1
- package/dist/modes/interactive/interactive-deferred-startup.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-deps.d.ts +2 -2
- package/dist/modes/interactive/interactive-mode-deps.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-deps.js +2 -2
- package/dist/modes/interactive/interactive-mode-deps.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-types.d.ts +5 -1
- package/dist/modes/interactive/interactive-mode-types.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-types.js.map +1 -1
- package/dist/modes/interactive/interactive-session-routing.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-session-routing.js +2 -2
- package/dist/modes/interactive/interactive-session-routing.js.map +1 -1
- package/dist/utils/child-process.d.ts +8 -1
- package/dist/utils/child-process.d.ts.map +1 -1
- package/dist/utils/child-process.js +39 -6
- package/dist/utils/child-process.js.map +1 -1
- package/dist/utils/event-loop.d.ts +7 -0
- package/dist/utils/event-loop.d.ts.map +1 -0
- package/dist/utils/event-loop.js +14 -0
- package/dist/utils/event-loop.js.map +1 -0
- package/dist/utils/json.d.ts +4 -0
- package/dist/utils/json.d.ts.map +1 -1
- package/dist/utils/json.js +8 -0
- package/dist/utils/json.js.map +1 -1
- package/docs/compaction.md +45 -27
- package/docs/settings.md +5 -1
- package/docs/workflows.md +6 -2
- package/npm-shrinkwrap.json +23 -23
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.9.5-alpha.6] - 2026-07-06
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Fixed deferred TUI extension loading so the editor keeps accepting and echoing keystrokes after first paint: startup now yields cooperatively between extension/resource-loading chunks, preserves text typed during completion, and safely queues Enter submissions made before the main prompt loop is ready.
|
|
10
|
+
- Fixed a warm-start TUI first-paint regression where persisted `enabledModels` or `--models` patterns forced all extensions to load synchronously before the first frame. Interactive startup now keeps the deferred-extension fast path and reapplies the model scope after extensions finish loading, preserving extension-registered provider matches and unmatched-pattern warnings without blocking paint.
|
|
11
|
+
- Fixed project trust prompts for bare projects that only create inert `.atomic/` or `.pi/` state: state-only directories such as `todos/` and `sessions/` no longer count as trust inputs or disable deferred extension startup, while trust-requiring config continues to prompt until the user makes an explicit persistent decision and implicit trust is persisted only by the `/reload` path.
|
|
12
|
+
- Fixed a security regression that could silently persist project trust at shutdown or deferred-startup completion after trust-requiring config appeared mid-session; Atomic now preserves the startup trust prompt unless the user explicitly saves a decision or the existing `/reload` implicit-trust flow applies.
|
|
13
|
+
- Fixed BOM-prefixed JSON state files being treated as parse failures: settings and project trust JSON readers now strip a leading UTF-8 BOM before parsing, so Windows-authored `settings.json` and `trust.json` files load the same as BOM-less files instead of silently ignoring user settings.
|
|
14
|
+
- Fixed the bundled workflows documentation to reflect that attached workflow stage chats render live `subagent` widgets for single, parallel, and chain calls, keep them live across attach/re-attach cycles, and let Ctrl+O expand live detail for every child. ([#1643](https://github.com/bastani-inc/atomic/issues/1643))
|
|
15
|
+
- Fixed a Windows `waitForChildProcess` exit-code race where the process-alive poll could report a fast-dying child as gone before Node emitted the real `exit` event, causing bash commands such as `exit 1` to be reported as successful with a fabricated exit code 0 ([#1647](https://github.com/bastani-inc/atomic/issues/1647)).
|
|
16
|
+
|
|
17
|
+
## [0.9.5-alpha.5] - 2026-07-06
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
|
|
21
|
+
- Added an internal tiered fallback ladder for automatic Verbatim Compaction when the strict `compression_ratio` target is not achievable: threshold and overflow auto-compaction now keep the standard strict planner pass as tier 1, tier 2 can accept a validated below-target result with at least one deletion when projected `tokensAfter` clears the relevant budget (`effectiveInputBudget - reserveTokens` for threshold, effective input budget for overflow), overflow commits from Atomic's internal ladder are gated on fitting the effective input budget even when the strict target is met, overflow-only tier 3 reruns the planner with critical LRU-style protected-entry eligibility for stale task-bearing user/custom/branch-summary context and an effective recent floor of `max(preserve_recent, 5)` across all compactable entries, and overflow-only tier 4 performs deterministic code-level LRU eviction without a model call or API credentials while enforcing the same effective last-5 recent floor until the effective input budget fits or no more safe deletion remains. The fallback tiers remain internal: extension hooks keep their existing shapes, extension-provided deletion requests still bypass the ladder including the overflow budget gate, and no public compaction mode API is exposed.
|
|
22
|
+
- Added hard iteration caps to compaction recovery loops: planner provider turns are capped at 50 per planner run (including tool-call turns), planner nudge follow-ups are capped at 50 per planner run, and deterministic overflow eviction is capped at 50 passes, so compaction cannot spin indefinitely and terminal failures report the achieved reduction, deletion count, projected `tokensAfter`, and budget.
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
|
|
26
|
+
- Fixed overflow auto-compaction silently no-oping when planner authentication was unavailable or when the current branch has no preparable compactable transcript: overflow recovery now either skips model tiers and runs deterministic no-auth LRU eviction directly through the existing validation pipeline, or surfaces a terminal error that nothing more was safely deletable.
|
|
27
|
+
- Fixed feasible partial compaction results being discarded solely because they missed the strict ratio target: automatic threshold and overflow compaction now commit validated below-target deletions when their projected `tokensAfter` clears the trigger/budget boundary, including partial deletion state salvaged after a provider context-overflow error.
|
|
28
|
+
|
|
5
29
|
## [0.9.5-alpha.4] - 2026-07-05
|
|
6
30
|
|
|
7
31
|
### Changed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/cursor",
|
|
3
|
-
"version": "0.9.5-alpha.
|
|
3
|
+
"version": "0.9.5-alpha.6",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Experimental first-party Atomic extension for Cursor OAuth, model discovery, and streaming provider registration.",
|
|
6
6
|
"contributors": [
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@bastani/atomic-natives": "0.9.5-alpha.
|
|
43
|
+
"@bastani/atomic-natives": "0.9.5-alpha.6",
|
|
44
44
|
"@bufbuild/protobuf": "^2.12.1",
|
|
45
45
|
"@earendil-works/pi-ai": "^0.80.3"
|
|
46
46
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/intercom",
|
|
3
|
-
"version": "0.9.5-alpha.
|
|
3
|
+
"version": "0.9.5-alpha.6",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Atomic extension providing a private coordination channel between parent and child agent sessions. Fork of: https://github.com/nicobailon/pi-intercom",
|
|
6
6
|
"contributors": [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/mcp",
|
|
3
|
-
"version": "0.9.5-alpha.
|
|
3
|
+
"version": "0.9.5-alpha.6",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Atomic extension that adapts MCP (Model Context Protocol) servers into the coding agent. Fork of: https://github.com/nicobailon/pi-mcp-adapter",
|
|
6
6
|
"contributors": [
|
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.9.5-alpha.5] - 2026-07-06
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Changed the Claude Fable 5 reasoning level from `xhigh` to `high` in the builtin `debugger` agent, covering the `anthropic/claude-fable-5` primary and its OpenRouter mirror in the fallback chain.
|
|
10
|
+
- Changed the Claude Opus 4.8 reasoning level from `xhigh` to `high` in the builtin `debugger` agent's fallback chain (`github-copilot/claude-opus-4.8 (1m)`, `anthropic/claude-opus-4-8`, and the OpenRouter mirror); Opus 4.8 entries at other levels in other agents are unchanged.
|
|
11
|
+
|
|
5
12
|
## [0.9.5-alpha.2] - 2026-07-04
|
|
6
13
|
|
|
7
14
|
### Changed
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
name: debugger
|
|
3
3
|
description: Debug errors, test failures, and unexpected behavior. Use PROACTIVELY when encountering issues, analyzing stack traces, or investigating system problems.
|
|
4
4
|
tools: read, search, find, ls, bash, web_search, fetch_content, get_search_content, intercom, contact_supervisor, todo
|
|
5
|
-
model: anthropic/claude-fable-5:
|
|
6
|
-
fallbackModels: openai-codex/gpt-5.5:xhigh, github-copilot/gpt-5.5:xhigh, openai/gpt-5.5:xhigh, github-copilot/claude-opus-4.8 (1m):
|
|
5
|
+
model: anthropic/claude-fable-5:high
|
|
6
|
+
fallbackModels: openai-codex/gpt-5.5:xhigh, github-copilot/gpt-5.5:xhigh, openai/gpt-5.5:xhigh, github-copilot/claude-opus-4.8 (1m):high, anthropic/claude-opus-4-8:high, zai/glm-5.2:xhigh, zai-coding-cn/glm-5.2:xhigh, openrouter/anthropic/claude-fable-5:high, openrouter/sakana/fugu-ultra:high, openrouter/openai/gpt-5.5:xhigh, openrouter/anthropic/claude-opus-4-8:high, openrouter/z-ai/glm-5.2:xhigh
|
|
7
7
|
skills: tdd, playwright-cli, tmux
|
|
8
8
|
---
|
|
9
9
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/subagents",
|
|
3
|
-
"version": "0.9.5-alpha.
|
|
3
|
+
"version": "0.9.5-alpha.6",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Atomic extension for delegating tasks to subagents with chains, parallel execution, and TUI clarification. Fork of: https://github.com/nicobailon/pi-subagents",
|
|
6
6
|
"contributors": [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/web-access",
|
|
3
|
-
"version": "0.9.5-alpha.
|
|
3
|
+
"version": "0.9.5-alpha.6",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Atomic extension for web search, URL fetching, GitHub repo cloning, PDF/video extraction. Fork of: https://github.com/nicobailon/pi-web-access",
|
|
6
6
|
"contributors": [
|
|
@@ -6,6 +6,23 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.9.5-alpha.6] - 2026-07-06
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- Fixed workflow stage chats so attach, exit, and re-attach cycles during an in-flight `subagent` call replay the latest live tool partial result immediately instead of collapsing single, parallel, or chain calls back to the bare `renderCall` title until the next update; stage chats also prefer renderers from the stage's own agent session before falling back to the host chat so nested workflow stages can render tools that the parent chat does not expose. ([#1643](https://github.com/bastani-inc/atomic/issues/1643))
|
|
14
|
+
|
|
15
|
+
## [0.9.5-alpha.5] - 2026-07-06
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
- Added `git_worktree_dir` to the builtin `goal` workflow with Ralph-parity input binding so Goal runs can create or reuse a repository worktree from `base_branch` while preserving the invoking repo-relative cwd for worker, reviewer, and optional final PR stages.
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
|
|
23
|
+
- Changed the Claude Fable 5 reasoning level from `xhigh` to `high` across all builtin workflow model chains (`ralph` prompt-engineer/orchestrator/reviewer-a/reviewer-b/reviewer-c, `goal` reviewer, `deep-research-codebase` planner, and `open-claude-design`), covering both the native `anthropic/claude-fable-5` entries and their OpenRouter mirrors.
|
|
24
|
+
- Changed the Claude Opus 4.8 reasoning level from `xhigh` to `high` across the same builtin workflow model chains, covering the `github-copilot/claude-opus-4.8 (1m)`, `anthropic/claude-opus-4-8`, and `openrouter/anthropic/claude-opus-4-8` entries; Opus 4.8 entries already at `medium`/`low` value points are unchanged.
|
|
25
|
+
|
|
9
26
|
## [0.9.5-alpha.4] - 2026-07-05
|
|
10
27
|
|
|
11
28
|
### Changed
|
|
@@ -35,19 +35,19 @@ export const FILE_ONLY_OUTPUT = "file-only" satisfies WorkflowOutputMode;
|
|
|
35
35
|
// for the frontier data). This planner uses the high-capacity synthesis roster
|
|
36
36
|
// because it performs cross-codebase planning before partition fan-out.
|
|
37
37
|
export const PLANNER_MODEL_CONFIG = {
|
|
38
|
-
model: "anthropic/claude-fable-5:
|
|
38
|
+
model: "anthropic/claude-fable-5:high",
|
|
39
39
|
fallbackModels: [
|
|
40
40
|
"openai-codex/gpt-5.5:xhigh",
|
|
41
41
|
"github-copilot/gpt-5.5:xhigh",
|
|
42
42
|
"openai/gpt-5.5:xhigh",
|
|
43
|
-
"github-copilot/claude-opus-4.8 (1m):
|
|
44
|
-
"anthropic/claude-opus-4-8:
|
|
43
|
+
"github-copilot/claude-opus-4.8 (1m):high",
|
|
44
|
+
"anthropic/claude-opus-4-8:high",
|
|
45
45
|
"zai/glm-5.2:xhigh",
|
|
46
46
|
"zai-coding-cn/glm-5.2:xhigh",
|
|
47
|
-
"openrouter/anthropic/claude-fable-5:
|
|
47
|
+
"openrouter/anthropic/claude-fable-5:high",
|
|
48
48
|
"openrouter/sakana/fugu-ultra:high",
|
|
49
49
|
"openrouter/openai/gpt-5.5:xhigh",
|
|
50
|
-
"openrouter/anthropic/claude-opus-4-8:
|
|
50
|
+
"openrouter/anthropic/claude-opus-4-8:high",
|
|
51
51
|
"openrouter/z-ai/glm-5.2:xhigh"
|
|
52
52
|
],
|
|
53
53
|
excludedTools: ["ask_user_question"],
|
|
@@ -114,19 +114,19 @@ export async function runGoalWorkflow(ctx: GoalRunnerContext, options: GoalWorkf
|
|
|
114
114
|
};
|
|
115
115
|
|
|
116
116
|
const reviewerModelConfig = {
|
|
117
|
-
model: "anthropic/claude-fable-5:
|
|
117
|
+
model: "anthropic/claude-fable-5:high",
|
|
118
118
|
fallbackModels: [
|
|
119
119
|
"openai-codex/gpt-5.5:xhigh",
|
|
120
120
|
"github-copilot/gpt-5.5:xhigh",
|
|
121
121
|
"openai/gpt-5.5:xhigh",
|
|
122
|
-
"github-copilot/claude-opus-4.8 (1m):
|
|
123
|
-
"anthropic/claude-opus-4-8:
|
|
122
|
+
"github-copilot/claude-opus-4.8 (1m):high",
|
|
123
|
+
"anthropic/claude-opus-4-8:high",
|
|
124
124
|
"zai/glm-5.2:xhigh",
|
|
125
125
|
"zai-coding-cn/glm-5.2:xhigh",
|
|
126
|
-
"openrouter/anthropic/claude-fable-5:
|
|
126
|
+
"openrouter/anthropic/claude-fable-5:high",
|
|
127
127
|
"openrouter/sakana/fugu-ultra:high",
|
|
128
128
|
"openrouter/openai/gpt-5.5:xhigh",
|
|
129
|
-
"openrouter/anthropic/claude-opus-4-8:
|
|
129
|
+
"openrouter/anthropic/claude-opus-4-8:high",
|
|
130
130
|
"openrouter/z-ai/glm-5.2:xhigh"
|
|
131
131
|
],
|
|
132
132
|
tools: goalRunnerTools,
|
|
@@ -14,6 +14,7 @@ export type GoalWorkflowInputs = WorkflowInputValues & {
|
|
|
14
14
|
readonly acceptance_criteria?: string;
|
|
15
15
|
readonly max_turns: number;
|
|
16
16
|
readonly base_branch: string;
|
|
17
|
+
readonly git_worktree_dir: string;
|
|
17
18
|
readonly create_pr: boolean;
|
|
18
19
|
};
|
|
19
20
|
|
|
@@ -22,6 +23,7 @@ export type GoalWorkflowRunInputs = WorkflowInputValues & {
|
|
|
22
23
|
readonly acceptance_criteria?: string;
|
|
23
24
|
readonly max_turns?: number;
|
|
24
25
|
readonly base_branch?: string;
|
|
26
|
+
readonly git_worktree_dir?: string;
|
|
25
27
|
readonly create_pr?: boolean;
|
|
26
28
|
};
|
|
27
29
|
|
|
@@ -25,6 +25,11 @@ export default workflow({
|
|
|
25
25
|
default: "origin/main",
|
|
26
26
|
description: "Optional branch reviewers compare the current code delta against (default origin/main).",
|
|
27
27
|
}),
|
|
28
|
+
git_worktree_dir: Type.String({
|
|
29
|
+
default: "",
|
|
30
|
+
description:
|
|
31
|
+
"Optional Git worktree path. Must start inside a Git repo; absolute paths are used as-is, relative paths resolve from the repo root, existing Git worktrees from the invoking repository are reused/shared as-is, and missing paths are created from base_branch.",
|
|
32
|
+
}),
|
|
28
33
|
create_pr: Type.Boolean({
|
|
29
34
|
default: false,
|
|
30
35
|
description:
|
|
@@ -55,6 +60,10 @@ export default workflow({
|
|
|
55
60
|
review_report_path: Type.Optional(Type.String({ description: "JSON artifact path for the latest reviewer decision round." })),
|
|
56
61
|
pr_report: Type.Optional(Type.String({ description: "Pull-request report emitted only when create_pr=true, Goal reaches complete, and the final pull-request stage runs." })),
|
|
57
62
|
},
|
|
63
|
+
worktreeFromInputs: {
|
|
64
|
+
gitWorktreeDir: "git_worktree_dir",
|
|
65
|
+
baseBranch: "base_branch",
|
|
66
|
+
},
|
|
58
67
|
run: async (ctx) => {
|
|
59
68
|
const workflowCtx = ctx;
|
|
60
69
|
const workflowStartCwd = workflowCtx.cwd ?? process.cwd();
|
|
@@ -40,6 +40,7 @@ export type GoalWorkflowInputs = WorkflowInputValues & {
|
|
|
40
40
|
readonly acceptance_criteria?: string;
|
|
41
41
|
readonly max_turns: number;
|
|
42
42
|
readonly base_branch: string;
|
|
43
|
+
readonly git_worktree_dir: string;
|
|
43
44
|
readonly create_pr: boolean;
|
|
44
45
|
};
|
|
45
46
|
export type GoalWorkflowRunInputs = WorkflowInputValues & {
|
|
@@ -47,6 +48,7 @@ export type GoalWorkflowRunInputs = WorkflowInputValues & {
|
|
|
47
48
|
readonly acceptance_criteria?: string;
|
|
48
49
|
readonly max_turns?: number;
|
|
49
50
|
readonly base_branch?: string;
|
|
51
|
+
readonly git_worktree_dir?: string;
|
|
50
52
|
readonly create_pr?: boolean;
|
|
51
53
|
};
|
|
52
54
|
export type GoalWorkflowOutputs = WorkflowOutputValues & {
|
|
@@ -78,14 +78,14 @@ export async function runOpenClaudeDesignWorkflow(ctx: OpenClaudeDesignContext):
|
|
|
78
78
|
// strictly dominated in Atomic's benchmark (see ralph-models.ts). Opus stays
|
|
79
79
|
// at :xhigh here — visual quality, not $/task, is the objective for design.
|
|
80
80
|
const designModelConfig = {
|
|
81
|
-
model: "anthropic/claude-fable-5:
|
|
81
|
+
model: "anthropic/claude-fable-5:high",
|
|
82
82
|
fallbackModels: [
|
|
83
|
-
"github-copilot/claude-opus-4.8 (1m):
|
|
84
|
-
"anthropic/claude-opus-4-8:
|
|
83
|
+
"github-copilot/claude-opus-4.8 (1m):high",
|
|
84
|
+
"anthropic/claude-opus-4-8:high",
|
|
85
85
|
"zai/glm-5.2:xhigh",
|
|
86
86
|
"zai-coding-cn/glm-5.2:xhigh",
|
|
87
|
-
"openrouter/anthropic/claude-fable-5:
|
|
88
|
-
"openrouter/anthropic/claude-opus-4-8:
|
|
87
|
+
"openrouter/anthropic/claude-fable-5:high",
|
|
88
|
+
"openrouter/anthropic/claude-opus-4-8:high",
|
|
89
89
|
"openrouter/sakana/fugu-ultra:high",
|
|
90
90
|
"openrouter/z-ai/glm-5.2:xhigh"
|
|
91
91
|
],
|
|
@@ -16,19 +16,19 @@ import { reviewDecisionSchema } from "./ralph-core.js";
|
|
|
16
16
|
// openrouter/z-ai mirror maps :xhigh exclusively, so it is always :xhigh.
|
|
17
17
|
|
|
18
18
|
export const promptEngineerModelConfig = {
|
|
19
|
-
model: "anthropic/claude-fable-5:
|
|
19
|
+
model: "anthropic/claude-fable-5:high",
|
|
20
20
|
fallbackModels: [
|
|
21
21
|
"openai-codex/gpt-5.5:xhigh",
|
|
22
22
|
"github-copilot/gpt-5.5:xhigh",
|
|
23
23
|
"openai/gpt-5.5:xhigh",
|
|
24
|
-
"github-copilot/claude-opus-4.8 (1m):
|
|
25
|
-
"anthropic/claude-opus-4-8:
|
|
24
|
+
"github-copilot/claude-opus-4.8 (1m):high",
|
|
25
|
+
"anthropic/claude-opus-4-8:high",
|
|
26
26
|
"zai/glm-5.2:xhigh",
|
|
27
27
|
"zai-coding-cn/glm-5.2:xhigh",
|
|
28
|
-
"openrouter/anthropic/claude-fable-5:
|
|
28
|
+
"openrouter/anthropic/claude-fable-5:high",
|
|
29
29
|
"openrouter/sakana/fugu-ultra:high",
|
|
30
30
|
"openrouter/openai/gpt-5.5:xhigh",
|
|
31
|
-
"openrouter/anthropic/claude-opus-4-8:
|
|
31
|
+
"openrouter/anthropic/claude-opus-4-8:high",
|
|
32
32
|
"openrouter/z-ai/glm-5.2:xhigh"
|
|
33
33
|
],
|
|
34
34
|
excludedTools: ["ask_user_question"],
|
|
@@ -53,38 +53,38 @@ export const researchModelConfig = {
|
|
|
53
53
|
};
|
|
54
54
|
|
|
55
55
|
export const orchestratorModelConfig = {
|
|
56
|
-
model: "anthropic/claude-fable-5:
|
|
56
|
+
model: "anthropic/claude-fable-5:high",
|
|
57
57
|
fallbackModels: [
|
|
58
58
|
"openai-codex/gpt-5.5:xhigh",
|
|
59
59
|
"github-copilot/gpt-5.5:xhigh",
|
|
60
60
|
"openai/gpt-5.5:xhigh",
|
|
61
|
-
"github-copilot/claude-opus-4.8 (1m):
|
|
62
|
-
"anthropic/claude-opus-4-8:
|
|
61
|
+
"github-copilot/claude-opus-4.8 (1m):high",
|
|
62
|
+
"anthropic/claude-opus-4-8:high",
|
|
63
63
|
"zai/glm-5.2:xhigh",
|
|
64
64
|
"zai-coding-cn/glm-5.2:xhigh",
|
|
65
|
-
"openrouter/anthropic/claude-fable-5:
|
|
65
|
+
"openrouter/anthropic/claude-fable-5:high",
|
|
66
66
|
"openrouter/sakana/fugu-ultra:high",
|
|
67
67
|
"openrouter/openai/gpt-5.5:xhigh",
|
|
68
|
-
"openrouter/anthropic/claude-opus-4-8:
|
|
68
|
+
"openrouter/anthropic/claude-opus-4-8:high",
|
|
69
69
|
"openrouter/z-ai/glm-5.2:xhigh"
|
|
70
70
|
],
|
|
71
71
|
excludedTools: ["ask_user_question"],
|
|
72
72
|
};
|
|
73
73
|
|
|
74
74
|
export const reviewerAModelConfig = {
|
|
75
|
-
model: "anthropic/claude-fable-5:
|
|
75
|
+
model: "anthropic/claude-fable-5:high",
|
|
76
76
|
fallbackModels: [
|
|
77
77
|
"openai-codex/gpt-5.5:xhigh",
|
|
78
78
|
"github-copilot/gpt-5.5:xhigh",
|
|
79
79
|
"openai/gpt-5.5:xhigh",
|
|
80
|
-
"github-copilot/claude-opus-4.8 (1m):
|
|
81
|
-
"anthropic/claude-opus-4-8:
|
|
80
|
+
"github-copilot/claude-opus-4.8 (1m):high",
|
|
81
|
+
"anthropic/claude-opus-4-8:high",
|
|
82
82
|
"zai/glm-5.2:xhigh",
|
|
83
83
|
"zai-coding-cn/glm-5.2:xhigh",
|
|
84
|
-
"openrouter/anthropic/claude-fable-5:
|
|
84
|
+
"openrouter/anthropic/claude-fable-5:high",
|
|
85
85
|
"openrouter/sakana/fugu-ultra:high",
|
|
86
86
|
"openrouter/openai/gpt-5.5:xhigh",
|
|
87
|
-
"openrouter/anthropic/claude-opus-4-8:
|
|
87
|
+
"openrouter/anthropic/claude-opus-4-8:high",
|
|
88
88
|
"openrouter/z-ai/glm-5.2:xhigh"
|
|
89
89
|
],
|
|
90
90
|
excludedTools: ["ask_user_question"],
|
|
@@ -96,15 +96,15 @@ export const reviewerBModelConfig = {
|
|
|
96
96
|
fallbackModels: [
|
|
97
97
|
"github-copilot/gpt-5.5:xhigh",
|
|
98
98
|
"openai/gpt-5.5:xhigh",
|
|
99
|
-
"anthropic/claude-fable-5:
|
|
100
|
-
"github-copilot/claude-opus-4.8 (1m):
|
|
101
|
-
"anthropic/claude-opus-4-8:
|
|
99
|
+
"anthropic/claude-fable-5:high",
|
|
100
|
+
"github-copilot/claude-opus-4.8 (1m):high",
|
|
101
|
+
"anthropic/claude-opus-4-8:high",
|
|
102
102
|
"zai/glm-5.2:xhigh",
|
|
103
103
|
"zai-coding-cn/glm-5.2:xhigh",
|
|
104
104
|
"openrouter/openai/gpt-5.5:xhigh",
|
|
105
|
-
"openrouter/anthropic/claude-fable-5:
|
|
105
|
+
"openrouter/anthropic/claude-fable-5:high",
|
|
106
106
|
"openrouter/sakana/fugu-ultra:high",
|
|
107
|
-
"openrouter/anthropic/claude-opus-4-8:
|
|
107
|
+
"openrouter/anthropic/claude-opus-4-8:high",
|
|
108
108
|
"openrouter/z-ai/glm-5.2:xhigh"
|
|
109
109
|
],
|
|
110
110
|
excludedTools: ["ask_user_question"],
|
|
@@ -118,14 +118,14 @@ export const reviewerCModelConfig = {
|
|
|
118
118
|
"openai-codex/gpt-5.5:xhigh",
|
|
119
119
|
"github-copilot/gpt-5.5:xhigh",
|
|
120
120
|
"openai/gpt-5.5:xhigh",
|
|
121
|
-
"anthropic/claude-fable-5:
|
|
122
|
-
"github-copilot/claude-opus-4.8 (1m):
|
|
123
|
-
"anthropic/claude-opus-4-8:
|
|
121
|
+
"anthropic/claude-fable-5:high",
|
|
122
|
+
"github-copilot/claude-opus-4.8 (1m):high",
|
|
123
|
+
"anthropic/claude-opus-4-8:high",
|
|
124
124
|
"openrouter/sakana/fugu-ultra:high",
|
|
125
125
|
"openrouter/z-ai/glm-5.2:xhigh",
|
|
126
126
|
"openrouter/openai/gpt-5.5:xhigh",
|
|
127
|
-
"openrouter/anthropic/claude-fable-5:
|
|
128
|
-
"openrouter/anthropic/claude-opus-4-8:
|
|
127
|
+
"openrouter/anthropic/claude-fable-5:high",
|
|
128
|
+
"openrouter/anthropic/claude-opus-4-8:high"
|
|
129
129
|
],
|
|
130
130
|
excludedTools: ["ask_user_question"],
|
|
131
131
|
schema: reviewDecisionSchema,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { StageControlHandle, AgentSessionEventListener } from "./stage-control-registry.js";
|
|
2
2
|
import type { LiveStageRuntime } from "./executor-stage-types.js";
|
|
3
3
|
import { isTerminalStage } from "./executor-scheduler.js";
|
|
4
|
+
import { StageToolExecutionBuffer } from "./stage-tool-execution-buffer.js";
|
|
4
5
|
|
|
5
6
|
export function createStageControlHandle(runtime: LiveStageRuntime): StageControlHandle {
|
|
6
7
|
const ensureMessagingSession = async (): Promise<void> => {
|
|
@@ -15,6 +16,8 @@ export function createStageControlHandle(runtime: LiveStageRuntime): StageContro
|
|
|
15
16
|
throw new Error(`atomic-workflows: cannot message stage "${runtime.name}" because no retained session metadata is available.`);
|
|
16
17
|
}
|
|
17
18
|
};
|
|
19
|
+
const toolExecutions = new StageToolExecutionBuffer();
|
|
20
|
+
const unsubscribeToolExecutions = runtime.innerCtx.subscribe((event) => toolExecutions.record(event));
|
|
18
21
|
|
|
19
22
|
return {
|
|
20
23
|
runId: runtime.runId,
|
|
@@ -41,6 +44,9 @@ export function createStageControlHandle(runtime: LiveStageRuntime): StageContro
|
|
|
41
44
|
get agentSession() {
|
|
42
45
|
return runtime.innerCtx.__agentSession();
|
|
43
46
|
},
|
|
47
|
+
pendingToolExecutionEvents() {
|
|
48
|
+
return toolExecutions.replayEvents();
|
|
49
|
+
},
|
|
44
50
|
async ensureAttached() {
|
|
45
51
|
runtime.throwIfStageMutationBlocked();
|
|
46
52
|
await ensureMessagingSession();
|
|
@@ -120,6 +126,8 @@ export function createStageControlHandle(runtime: LiveStageRuntime): StageContro
|
|
|
120
126
|
return runtime.innerCtx.subscribe(listener);
|
|
121
127
|
},
|
|
122
128
|
async dispose() {
|
|
129
|
+
unsubscribeToolExecutions();
|
|
130
|
+
toolExecutions.clear();
|
|
123
131
|
await runtime.releaseLiveHandle();
|
|
124
132
|
},
|
|
125
133
|
};
|
|
@@ -59,6 +59,8 @@ export interface StageControlHandle {
|
|
|
59
59
|
readonly messages: AgentSession["messages"];
|
|
60
60
|
/** Live coding-agent session when available, used by embedded chat/footer UI. */
|
|
61
61
|
readonly agentSession?: AgentSession;
|
|
62
|
+
/** Replayable in-flight tool starts/partial updates for stage-chat remounts. */
|
|
63
|
+
pendingToolExecutionEvents?(): readonly AgentSessionEvent[];
|
|
62
64
|
/** Ensure the SDK session exists. Cheap when already attached. */
|
|
63
65
|
ensureAttached(): Promise<void>;
|
|
64
66
|
/** Send a prompt. Use only when the stage is idle / not streaming. */
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { AgentSessionEvent } from "@bastani/atomic";
|
|
2
|
+
|
|
3
|
+
interface PendingToolExecution {
|
|
4
|
+
start: AgentSessionEvent;
|
|
5
|
+
update?: AgentSessionEvent;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
function eventType(event: AgentSessionEvent): string {
|
|
9
|
+
return String((event as { type?: unknown }).type ?? "");
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function toolCallId(event: AgentSessionEvent): string | undefined {
|
|
13
|
+
const value = (event as { toolCallId?: unknown }).toolCallId;
|
|
14
|
+
return typeof value === "string" && value.length > 0 ? value : undefined;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export class StageToolExecutionBuffer {
|
|
18
|
+
private readonly pending = new Map<string, PendingToolExecution>();
|
|
19
|
+
|
|
20
|
+
record(event: AgentSessionEvent): void {
|
|
21
|
+
const type = eventType(event);
|
|
22
|
+
if (type === "agent_start" || type === "agent_end") {
|
|
23
|
+
this.pending.clear();
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
const id = toolCallId(event);
|
|
27
|
+
if (id === undefined) return;
|
|
28
|
+
if (type === "tool_execution_start") {
|
|
29
|
+
this.pending.set(id, { start: event });
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
if (type === "tool_execution_update") {
|
|
33
|
+
const existing = this.pending.get(id);
|
|
34
|
+
if (existing) existing.update = event;
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
if (type === "tool_execution_end") this.pending.delete(id);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
replayEvents(): readonly AgentSessionEvent[] {
|
|
41
|
+
return [...this.pending.values()].flatMap((entry) => entry.update ? [entry.start, entry.update] : [entry.start]);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
clear(): void {
|
|
45
|
+
this.pending.clear();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { AgentSessionEvent } from "@bastani/atomic";
|
|
2
|
+
import type { StageChatViewContext } from "./stage-chat-view-types.js";
|
|
3
|
+
|
|
4
|
+
export function replayPendingToolExecutions(ctx: StageChatViewContext): void {
|
|
5
|
+
const events = ctx.handle?.isDisposed === true
|
|
6
|
+
? []
|
|
7
|
+
: ctx.handle?.pendingToolExecutionEvents?.() ?? [];
|
|
8
|
+
for (const event of events) ctx.chatHost.applyAgentEvent(event as AgentSessionEvent);
|
|
9
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ChatMessageRenderOptions } from "@bastani/atomic";
|
|
2
|
+
import type { StageChatViewContext, StageChatViewOpts } from "./stage-chat-view-types.js";
|
|
3
|
+
|
|
4
|
+
type StageChatRenderSettings = Partial<Omit<ChatMessageRenderOptions, "ui" | "cwd">>;
|
|
5
|
+
|
|
6
|
+
type MessageRendererHost = {
|
|
7
|
+
extensionRunner?: {
|
|
8
|
+
getMessageRenderer?: (customType: string) => ReturnType<NonNullable<StageChatRenderSettings["getCustomMessageRenderer"]>>;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export function stageChatRenderSettings(
|
|
13
|
+
ctx: StageChatViewContext,
|
|
14
|
+
opts: StageChatViewOpts,
|
|
15
|
+
): StageChatRenderSettings | undefined {
|
|
16
|
+
const inherited = opts.getChatRenderSettings?.();
|
|
17
|
+
const stageSession = ctx.handle?.isDisposed === true ? undefined : ctx.handle?.agentSession;
|
|
18
|
+
if (!stageSession) return inherited;
|
|
19
|
+
const rendererHost = stageSession as MessageRendererHost;
|
|
20
|
+
return {
|
|
21
|
+
...inherited,
|
|
22
|
+
getToolDefinition: (toolName) =>
|
|
23
|
+
stageSession.getToolDefinition(toolName) ?? inherited?.getToolDefinition?.(toolName),
|
|
24
|
+
getCustomMessageRenderer: (customType) =>
|
|
25
|
+
rendererHost.extensionRunner?.getMessageRenderer?.(customType) ?? inherited?.getCustomMessageRenderer?.(customType),
|
|
26
|
+
};
|
|
27
|
+
}
|
|
@@ -4,11 +4,7 @@ import type { PendingPrompt, RunSnapshot, StageSnapshot } from "../shared/store-
|
|
|
4
4
|
import { stageUiBroker } from "../shared/stage-ui-broker.js";
|
|
5
5
|
import { resolveStageChatViewportRows } from "./stage-chat-layout.js";
|
|
6
6
|
import { createPromptCardState } from "./prompt-card.js";
|
|
7
|
-
import {
|
|
8
|
-
hideMountedCustomUi,
|
|
9
|
-
releaseMountedCustomUi,
|
|
10
|
-
showCustomUi,
|
|
11
|
-
} from "./stage-chat-view-custom-ui.js";
|
|
7
|
+
import { hideMountedCustomUi, releaseMountedCustomUi, showCustomUi } from "./stage-chat-view-custom-ui.js";
|
|
12
8
|
import { editorRuleColor } from "./stage-chat-view-footer-status.js";
|
|
13
9
|
import {
|
|
14
10
|
blankLine,
|
|
@@ -30,6 +26,8 @@ import {
|
|
|
30
26
|
} from "./stage-chat-view-types.js";
|
|
31
27
|
import { noticeRow, noticeSummary } from "./stage-chat-view-transcript.js";
|
|
32
28
|
import { applyStageChatLiveHandleEvent } from "./stage-chat-view-live-events.js";
|
|
29
|
+
import { replayPendingToolExecutions } from "./stage-chat-view-pending-tools.js";
|
|
30
|
+
import { stageChatRenderSettings } from "./stage-chat-view-render-settings.js";
|
|
33
31
|
import { hexToAnsi, RESET } from "./color-utils.js";
|
|
34
32
|
import {
|
|
35
33
|
isTerminalOrNonStreamingStageChatStatus,
|
|
@@ -89,6 +87,7 @@ export function initializeStageChatView(
|
|
|
89
87
|
});
|
|
90
88
|
|
|
91
89
|
snapshotMessagesFromHandle(ctx);
|
|
90
|
+
replayPendingToolExecutions(ctx);
|
|
92
91
|
const initialRun = currentRun(ctx);
|
|
93
92
|
const initialStage = initialRun?.stages.find((s) => s.id === ctx.stageId);
|
|
94
93
|
ctx.lastObservedRunStatus = initialRun?.status;
|
|
@@ -187,7 +186,7 @@ function createChatHost(
|
|
|
187
186
|
keybindings: opts.piKeybindings,
|
|
188
187
|
editorFactory: opts.piEditorFactory,
|
|
189
188
|
editorTheme: editorThemeFromGraphTheme(ctx.theme),
|
|
190
|
-
getChatRenderSettings: opts
|
|
189
|
+
getChatRenderSettings: () => stageChatRenderSettings(ctx, opts),
|
|
191
190
|
footerData: opts.footerData,
|
|
192
191
|
renderExtraEntry: (entry) => noticeRow(entry, ctx.theme),
|
|
193
192
|
});
|