@bastani/atomic 0.8.22-0 → 0.8.23-0

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 (36) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/dist/builtin/intercom/CHANGELOG.md +6 -0
  3. package/dist/builtin/intercom/package.json +1 -1
  4. package/dist/builtin/mcp/CHANGELOG.md +6 -0
  5. package/dist/builtin/mcp/package.json +1 -1
  6. package/dist/builtin/subagents/CHANGELOG.md +13 -0
  7. package/dist/builtin/subagents/package.json +1 -1
  8. package/dist/builtin/web-access/CHANGELOG.md +6 -0
  9. package/dist/builtin/web-access/package.json +1 -1
  10. package/dist/builtin/workflows/CHANGELOG.md +35 -0
  11. package/dist/builtin/workflows/README.md +31 -12
  12. package/dist/builtin/workflows/builtin/goal.ts +139 -100
  13. package/dist/builtin/workflows/builtin/ralph.ts +137 -182
  14. package/dist/builtin/workflows/package.json +1 -1
  15. package/dist/builtin/workflows/src/extension/index.ts +2 -4
  16. package/dist/builtin/workflows/src/tui/stage-chat-view.ts +110 -13
  17. package/dist/builtin/workflows/src/tui/workflow-attach-pane.ts +2 -2
  18. package/dist/core/system-prompt.d.ts.map +1 -1
  19. package/dist/core/system-prompt.js +8 -4
  20. package/dist/core/system-prompt.js.map +1 -1
  21. package/dist/core/tools/ask-user-question/ask-user-question.d.ts.map +1 -1
  22. package/dist/core/tools/ask-user-question/ask-user-question.js +31 -11
  23. package/dist/core/tools/ask-user-question/ask-user-question.js.map +1 -1
  24. package/dist/modes/interactive/components/chat-session-host.d.ts +8 -0
  25. package/dist/modes/interactive/components/chat-session-host.d.ts.map +1 -1
  26. package/dist/modes/interactive/components/chat-session-host.js +83 -2
  27. package/dist/modes/interactive/components/chat-session-host.js.map +1 -1
  28. package/dist/modes/interactive/components/chat-transcript.d.ts +12 -1
  29. package/dist/modes/interactive/components/chat-transcript.d.ts.map +1 -1
  30. package/dist/modes/interactive/components/chat-transcript.js +140 -13
  31. package/dist/modes/interactive/components/chat-transcript.js.map +1 -1
  32. package/dist/modes/interactive/components/index.d.ts +1 -1
  33. package/dist/modes/interactive/components/index.d.ts.map +1 -1
  34. package/dist/modes/interactive/components/index.js.map +1 -1
  35. package/docs/workflows.md +66 -17
  36. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,44 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.8.23-0] - 2026-06-02
6
+
7
+ ### Changed
8
+
9
+ - Documented workflow artifact-path handoffs and `Read the file at <path>...` downstream prompts as the preferred alternative to injecting large `previous` payloads, review histories, or session tails.
10
+ - Updated the Ralph workflow docs to reflect the simplified plan/orchestrate/simplify/review loop without separate `infra-*` discovery stages.
11
+ - Updated the default workflow system-prompt guidance to prefer file/artifact handoffs with explicit downstream read instructions for large stage-to-stage context.
12
+
13
+ ### Fixed
14
+
15
+ - Fixed severe flickering in the `ask_user_question` dialog on short terminals by suspending the animated working loader while the blocking question UI is open; the inline dialog no longer pushes the ticking loader above the viewport, which had forced a full-screen clear+replay on every spinner frame.
16
+
17
+ ## [0.8.22] - 2026-06-01
18
+
19
+ ### Breaking Changes
20
+
21
+ - Migrated bundled workflow authoring to explicit TypeBox input/output schemas and explicit workflow outputs, so composed workflows now validate contracts with `Type`/`Static` and no longer support legacy descriptors, implicit `result`, `rawOutput`, `.import(...)`, or declaration-time `.humanInTheLoop(...)`.
22
+
23
+ ### Added
24
+
25
+ - Added Codex `/fast` mode toggles for chat and workflow-stage sessions with visible `fast` model markers on eligible OpenAI/OpenAI Codex models.
26
+ - Added reactive extension UI rendering via `ExtensionUIContext.requestRender()` so long-lived widgets can repaint without remount flicker.
27
+ - Added interrupt-delivered extension custom messages with optional abort messages, letting workflow and other first-party extensions surface urgent events immediately.
28
+
29
+ ### Changed
30
+
31
+ - Expanded bundled workflow authoring docs and agent guidance for direct `ctx.workflow(compiledWorkflow, options)` composition, reusable builtin workflow modules, explicit child outputs, and safer long-running workflow monitoring.
32
+ - Refined the `/fast` selector copy, layout, toggle states, and keyboard support for clearer chat/workflow scoping.
33
+ - Improved workflow graph/status rendering for nested child workflows, compact lifecycle/HIL cards, and reference-first transcript inspection.
34
+
35
+ ### Fixed
36
+
37
+ - Fixed workflow reloads so package-manifest workflow entries refresh in-process without a full Atomic restart.
38
+ - Fixed Codex fast-mode propagation, persistence, request payloads, workflow footer markers, subagent launch metadata, and fallback marker synchronization across chat, workflow, and subagent surfaces.
39
+ - Fixed headless `/workflow` automation and print-mode output so successful commands emit displayable summaries, terminal failures surface correctly, completed stage handles dispose on exit, and command-originated extension errors are the only non-zero extension-error exits.
40
+ - Hardened workflow human-in-the-loop prompts and answers so brokered prompts remain focusable/scrollable, avoid stale Enter submissions, stay out of model context where appropriate, and resolve duplicate or raced tool answers deterministically.
41
+ - Stabilized long-lived workflow and subagent widgets with coalesced repaint paths, durable async-run hydration, and spinner ticks that avoid remount or scrollback flicker.
42
+
5
43
  ## [0.8.22-0] - 2026-06-01
6
44
 
7
45
  ### Added
@@ -4,6 +4,12 @@ All notable changes to the `pi-intercom` extension will be documented in this fi
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.8.23-0] - 2026-06-02
8
+
9
+ ### Changed
10
+
11
+ - Bumped package version for the Atomic 0.8.23 prerelease.
12
+
7
13
  ## [0.8.18] - 2026-05-27
8
14
 
9
15
  ### Changed
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/intercom",
3
- "version": "0.8.22-0",
3
+ "version": "0.8.23-0",
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": [
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.8.23-0] - 2026-06-02
11
+
12
+ ### Changed
13
+
14
+ - Bumped package version for the Atomic 0.8.23 prerelease.
15
+
10
16
  ## [0.8.20] - 2026-05-29
11
17
 
12
18
  ### Changed
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/mcp",
3
- "version": "0.8.22-0",
3
+ "version": "0.8.23-0",
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,19 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.8.23-0] - 2026-06-02
6
+
7
+ ### Changed
8
+
9
+ - Bumped package version for the Atomic 0.8.23 prerelease.
10
+
11
+ ## [0.8.22] - 2026-06-01
12
+
13
+ ### Fixed
14
+ - Surfaced Codex fast-mode state in foreground result badges, async widgets, and async status output, while scoping child fast-mode launches to the parent chat or workflow surface.
15
+ - Stabilized async subagent widgets and foreground spinner animation so visible status updates no longer remount widgets or churn elapsed/activity text between semantic progress changes.
16
+ - Hydrated durable active async runs into the below-editor widget and hardened global npm skill discovery with quieter probing, conservative timeouts, and cached failures.
17
+
5
18
  ## [0.8.22-0] - 2026-06-01
6
19
 
7
20
  ### Fixed
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/subagents",
3
- "version": "0.8.22-0",
3
+ "version": "0.8.23-0",
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": [
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.8.23-0] - 2026-06-02
8
+
9
+ ### Changed
10
+
11
+ - Bumped package version for the Atomic 0.8.23 prerelease.
12
+
7
13
  ## [0.8.20] - 2026-05-29
8
14
 
9
15
  ### Changed
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/web-access",
3
- "version": "0.8.22-0",
3
+ "version": "0.8.23-0",
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,41 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.8.23-0] - 2026-06-02
10
+
11
+ ### Added
12
+
13
+ - Added a workflow node chat Ctrl+D hint that shares the bottom footer line with model/cwd metadata and appears in the bottom-right corner of stage-local ctx.ui widgets.
14
+
15
+ ### Changed
16
+
17
+ - Changed bundled Goal and Ralph workflows to save reviewer feedback as JSON artifacts and hand only latest review artifact paths to downstream agents instead of injecting full review histories or session tails.
18
+ - Removed Ralph's separate `infra-locate-*`, `infra-analyze-*`, and `infra-patterns-*` discovery stages; Ralph reviewers now inspect repository infrastructure directly as needed during review.
19
+ - Documented artifact-path handoffs, `outputMode: "file-only"`, `reads`, and explicit `Read the file at <path>...` downstream prompts as the preferred pattern for large workflow context.
20
+ - Updated the workflow tool description to tell agents to hand off large stage context through files/artifacts instead of injected previous text.
21
+
22
+ ### Fixed
23
+
24
+ - Fixed paused workflow stage chats so Ctrl+D returns to the orchestrator graph instead of closing back to the main chat.
25
+
26
+ ## [0.8.22] - 2026-06-01
27
+
28
+ ### Breaking Changes
29
+
30
+ - Migrated workflow contracts to TypeBox schemas and fully explicit outputs, removing legacy descriptor schemas, `.import(...)`, string-alias child workflow calls, parent-side output remapping, implicit `result`/`rawOutput`, and declaration-time `.humanInTheLoop(...)` metadata.
31
+
32
+ ### Added
33
+
34
+ - Added TypeBox re-exports, TypeScript module-style child workflow composition, schema-validated child outputs, reusable builtin workflow modules, and flattened nested child workflow stages.
35
+
36
+ ### Changed
37
+
38
+ - Raised the bundled deep-research workflow's default parallelism, renamed workflow runtime errors to `atomic-workflows:`, rendered workflow notices as compact TUI cards, flattened imported workflow graph boundaries, and expanded registered workflow-tool metadata.
39
+
40
+ ### Fixed
41
+
42
+ - Fixed defaulted input validation, slow workflow discovery through the jiti loader, headless workflow shutdown and print-mode automation, builtin workflow initialization cycles, package-manifest workflow reloads, nested workflow widgets/graph cards, portable deep-research line counting, Codex fast-mode workflow markers, human-in-the-loop focus/answer behavior, background widget rendering, and deterministic headless command output.
43
+
9
44
  ## [0.8.22-0] - 2026-06-01
10
45
 
11
46
  ### Breaking Changes
@@ -80,15 +80,27 @@ export default defineWorkflow("parallel-research")
80
80
  .run(async (ctx) => {
81
81
  const topic = ctx.inputs.topic;
82
82
 
83
- const reports = await ctx.parallel([
84
- { name: "auth-specialist", task: `Research authentication patterns for: ${topic}` },
85
- { name: "db-specialist", task: `Research database layer for: ${topic}` },
86
- { name: "api-specialist", task: `Research API surface for: ${topic}` },
83
+ const reportPaths = {
84
+ auth: ".atomic/workflows/runs/parallel-research/auth.md",
85
+ db: ".atomic/workflows/runs/parallel-research/db.md",
86
+ api: ".atomic/workflows/runs/parallel-research/api.md",
87
+ } as const;
88
+
89
+ await ctx.parallel([
90
+ { name: "auth-specialist", task: `Research authentication patterns for: ${topic}`, output: reportPaths.auth, outputMode: "file-only" },
91
+ { name: "db-specialist", task: `Research database layer for: ${topic}`, output: reportPaths.db, outputMode: "file-only" },
92
+ { name: "api-specialist", task: `Research API surface for: ${topic}`, output: reportPaths.api, outputMode: "file-only" },
87
93
  ], { concurrency: 2, failFast: false });
88
94
 
89
95
  const summary = await ctx.task("aggregator", {
90
- prompt: "Synthesize these specialist reports:\n\n{previous}",
91
- previous: reports,
96
+ prompt: [
97
+ "Synthesize the specialist reports.",
98
+ `Auth report: ${reportPaths.auth}`,
99
+ `Database report: ${reportPaths.db}`,
100
+ `API report: ${reportPaths.api}`,
101
+ "Read the files at the paths above incrementally and only expand sections needed for the synthesis.",
102
+ ].join("\n"),
103
+ reads: Object.values(reportPaths),
92
104
  });
93
105
  return { summary: summary.text };
94
106
  })
@@ -106,16 +118,21 @@ export default defineWorkflow("review-and-merge")
106
118
  .output("status", Type.Optional(Type.String({ description: "Set to \"cancelled\" when the human rejects the plan." })))
107
119
  .output("result", Type.Optional(Type.String({ description: "Implementation result when the plan is approved." })))
108
120
  .run(async (ctx) => {
121
+ const planPath = ".atomic/workflows/runs/review-and-merge/plan.md";
109
122
  const plan = await ctx.task("planner", {
110
123
  prompt: `Create a concise implementation plan for: ${String(ctx.inputs.task)}`,
124
+ output: planPath,
111
125
  });
112
126
 
113
127
  const approved = await ctx.ui.confirm(`Proceed with this plan?\n\n${plan.text}`);
114
128
  if (!approved) return { status: "cancelled" };
115
129
 
116
130
  const result = await ctx.task("implementer", {
117
- prompt: "Execute this plan exactly:\n\n{previous}",
118
- previous: plan,
131
+ prompt: [
132
+ `Plan artifact: ${planPath}`,
133
+ `Read the file at ${planPath} incrementally, then execute it exactly.`,
134
+ ].join("\n"),
135
+ reads: [planPath],
119
136
  });
120
137
  return { result: result.text };
121
138
  })
@@ -454,7 +471,7 @@ Prompt answer replay is live-memory only. `StageSnapshot.promptAnswerState` repo
454
471
  ```json
455
472
  {
456
473
  "name": "workflow",
457
- "description": "Run named workflows or direct one-off task/tasks/chain workflows; discover with list/get/inputs, inspect status/stages/stage details, send prompt answers or steering, pause/resume/interrupt/kill runs, and reload workflow resources. For transcripts, prefer status/stages/stage to get sessionFile/transcriptPath, quote the exact path without rewriting separators (Windows backslashes are valid), search it with rg/grep, and read small ranges; transcript defaults to at most 5 recent entries and explicit tail/limit overrides that preview.",
474
+ "description": "Run named workflows or direct one-off task/tasks/chain workflows; discover with list/get/inputs, inspect status/stages/stage details, send prompt answers or steering, pause/resume/interrupt/kill runs, and reload workflow resources. For large stage handoffs, write context to files/artifacts, pass paths via reads, and prompt downstream agents to 'Read the file at <path>...' instead of injecting large previous text. For transcripts, prefer status/stages/stage to get sessionFile/transcriptPath, quote the exact path without rewriting separators (Windows backslashes are valid), search it with rg/grep, and read small ranges; transcript defaults to at most 5 recent entries and explicit tail/limit overrides that preview.",
458
475
  "parameters": {
459
476
  "workflow": "string (optional) — workflow ID or normalized name",
460
477
  "inputs": "object (optional) — key/value map of workflow inputs",
@@ -525,7 +542,7 @@ await runWorkflow({
525
542
  concurrency: 2,
526
543
  reads: ["research/context.md"],
527
544
  output: "research/auth-audit.md",
528
- outputMode: "inline",
545
+ outputMode: "file-only",
529
546
  worktree: false,
530
547
  maxOutput: { lines: 2000 },
531
548
  artifacts: true,
@@ -534,6 +551,8 @@ await runWorkflow({
534
551
 
535
552
  The programmatic definition object mirrors the workflow tool: named workflow runs, single-task runs, parallel `tasks`, and mixed `chain` runs accept the same direct options (`reads`, `output`, `outputMode`, `worktree`, `gitWorktreeDir`, `baseBranch`, `maxOutput`, `artifacts`, `concurrency`, `failFast`, and stage/session options such as `cwd`, `agentDir`, `model`, `tools`, `context`, and `sessionDir`). `chainDir` is chain-only: it provides the shared artifact directory for chain reads, outputs, and worktree diffs.
536
553
 
554
+ For large handoffs, prefer artifact paths over prompt injection: write stage output to `output`, set `outputMode: "file-only"` when the parent only needs the path, pass paths with `reads`, and instruct downstream agents explicitly with wording like `Read the file at <path>...`. Reserve `previous`/`{previous}` for compact summaries; avoid passing full session histories, all prior stage outputs, or every review round directly into the next model prompt. In review loops, save JSON review artifacts and pass only the latest review-round artifact, with a ledger or index file linking older rounds when needed.
555
+
537
556
  Workflow stage sessions follow Atomic SDK directory defaults: `DefaultResourceLoader` is initialized with the project `cwd` and the Atomic default `~/.atomic/agent` directory, while legacy `.pi` paths remain readable where the SDK supports multiple config directories. A stage-supplied `agentDir` is treated as an explicit user override; a stage-supplied `resourceLoader` owns discovery, with `cwd`/`agentDir` left for session naming and tool path resolution.
538
557
 
539
558
  To inspect a workflow's input schema inside pi, use `/workflow inputs <name>` or `/workflow <name> --help`.
@@ -580,7 +599,7 @@ Child workflow outputs: `result`, `status`, `approved`, `goal_id`, `objective`,
580
599
 
581
600
  ### `ralph`
582
601
 
583
- Plan → orchestrate → simplify → discover → review → PR-handoff workflow: write an RFC-style technical design document under `specs/`, delegate implementation through sub-agents, simplify recent changes, discover review infrastructure, run parallel reviewers, iterate until approval or the loop limit, then prepare a pull-request report.
602
+ Plan → orchestrate → simplify → review → PR-handoff workflow: write an RFC-style technical design document under `specs/`, delegate implementation through sub-agents, simplify recent changes, run parallel reviewers, iterate until approval or the loop limit, then prepare a pull-request report. Reviewers inspect repository infrastructure directly as needed; Ralph no longer runs separate `infra-*` discovery stages.
584
603
 
585
604
  ```text
586
605
  /workflow ralph prompt="Plan and migrate the database layer to Drizzle ORM" max_loops=3 base_branch=develop
@@ -593,7 +612,7 @@ Plan → orchestrate → simplify → discover → review → PR-handoff workflo
593
612
  | `base_branch` | `string` | — | `origin/main` | Branch reviewers and PR-prep compare the current delta with; also used to create a missing worktree. |
594
613
  | `git_worktree_dir` | `string` | — | `""` | Optional reusable Git worktree root. Empty runs in the invoking checkout; non-empty values run Ralph stages in the created/reused worktree. |
595
614
 
596
- Child workflow outputs: `result`, `plan`, `plan_path`, `implementation_notes_path`, `pr_report`, `approved`, `iterations_completed`, and `review_report`.
615
+ Child workflow outputs: `result`, `plan`, `plan_path`, `implementation_notes_path`, `pr_report`, `approved`, `iterations_completed`, `review_report`, and `review_report_path`.
597
616
 
598
617
  ### `open-claude-design`
599
618