@bastani/atomic 0.9.73 → 0.9.74-alpha.1
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 +26 -0
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/builtin/workflows/CHANGELOG.md +16 -0
- package/dist/builtin/workflows/README.md +2 -2
- package/dist/builtin/workflows/builtin/adversarial-verification.js +2 -2
- package/dist/builtin/workflows/builtin/{chunk-2377r57g.js → chunk-8kdrnrpa.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-t8y25z1j.js → chunk-8ycbc76t.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-vbrmytm5.js → chunk-a4fdm2cw.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-9pjdp2td.js → chunk-d5cxskkp.js} +3 -3
- package/dist/builtin/workflows/builtin/{chunk-tpsw128z.js → chunk-d9pz64yp.js} +3 -3
- package/dist/builtin/workflows/builtin/{chunk-z0d03ktm.js → chunk-gp0s6m45.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-4kygv34g.js → chunk-m8eg152f.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-mswg7kc7.js → chunk-r39ypw6b.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-q7dry6km.js → chunk-va2h64a6.js} +3 -3
- package/dist/builtin/workflows/builtin/generate-and-filter.js +2 -2
- package/dist/builtin/workflows/builtin/goal.js +4 -4
- package/dist/builtin/workflows/builtin/index.js +9 -9
- package/dist/builtin/workflows/builtin/loop-until-done.js +2 -2
- package/dist/builtin/workflows/builtin/ralph.js +4 -4
- package/dist/builtin/workflows/builtin/tournament.js +2 -2
- package/dist/builtin/workflows/package.json +1 -1
- package/dist/builtin/workflows/src/authoring.d.ts +2 -0
- package/dist/builtin/workflows/src/extension/index.bundle.mjs +403 -76
- package/dist/builtin/workflows/src/extension/local-worker-entry.mjs +387 -60
- package/dist/builtin/workflows/src/index.js +393 -62
- package/dist/builtin/workflows/src/local-worker-entry.mjs +387 -60
- package/dist/builtin/workflows/src/shared/serializable-error-families.d.ts +1 -0
- package/dist/builtin/workflows/src/shared/structured-output-errors.d.ts +50 -0
- package/dist/config.d.ts +2 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +4 -0
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session-background-compaction.d.ts.map +1 -1
- package/dist/core/agent-session-background-compaction.js +2 -1
- package/dist/core/agent-session-background-compaction.js.map +1 -1
- package/dist/core/agent-session-compaction.d.ts.map +1 -1
- package/dist/core/agent-session-compaction.js +98 -4
- package/dist/core/agent-session-compaction.js.map +1 -1
- package/dist/core/agent-session-detached-tools.d.ts +20 -5
- package/dist/core/agent-session-detached-tools.d.ts.map +1 -1
- package/dist/core/agent-session-detached-tools.js +97 -21
- package/dist/core/agent-session-detached-tools.js.map +1 -1
- package/dist/core/agent-session-message-queue.d.ts.map +1 -1
- package/dist/core/agent-session-message-queue.js +2 -1
- package/dist/core/agent-session-message-queue.js.map +1 -1
- package/dist/core/agent-session-methods.d.ts +3 -1
- package/dist/core/agent-session-methods.d.ts.map +1 -1
- package/dist/core/agent-session-methods.js.map +1 -1
- package/dist/core/agent-session-persistent-custom-messages.d.ts.map +1 -1
- package/dist/core/agent-session-persistent-custom-messages.js +12 -4
- package/dist/core/agent-session-persistent-custom-messages.js.map +1 -1
- package/dist/core/agent-session-prompt.d.ts.map +1 -1
- package/dist/core/agent-session-prompt.js +33 -0
- package/dist/core/agent-session-prompt.js.map +1 -1
- package/dist/core/compaction/background-compaction.d.ts +11 -5
- package/dist/core/compaction/background-compaction.d.ts.map +1 -1
- package/dist/core/compaction/background-compaction.js +19 -10
- package/dist/core/compaction/background-compaction.js.map +1 -1
- package/dist/core/compaction/compaction-boundary.d.ts +10 -0
- package/dist/core/compaction/compaction-boundary.d.ts.map +1 -1
- package/dist/core/compaction/compaction-boundary.js +30 -2
- package/dist/core/compaction/compaction-boundary.js.map +1 -1
- package/dist/core/compaction/compaction-runner.d.ts +7 -0
- package/dist/core/compaction/compaction-runner.d.ts.map +1 -1
- package/dist/core/compaction/compaction-runner.js +13 -5
- package/dist/core/compaction/compaction-runner.js.map +1 -1
- package/dist/core/compaction/compaction-types.d.ts +1 -1
- package/dist/core/compaction/compaction-types.js +1 -1
- package/dist/core/compaction/compaction-types.js.map +1 -1
- package/dist/core/compaction/deleted-ranges.d.ts +17 -2
- package/dist/core/compaction/deleted-ranges.d.ts.map +1 -1
- package/dist/core/compaction/deleted-ranges.js +44 -5
- package/dist/core/compaction/deleted-ranges.js.map +1 -1
- package/dist/core/compaction/history-recall.d.ts +32 -0
- package/dist/core/compaction/history-recall.d.ts.map +1 -0
- package/dist/core/compaction/history-recall.js +275 -0
- package/dist/core/compaction/history-recall.js.map +1 -0
- package/dist/core/compaction/index.d.ts +2 -0
- package/dist/core/compaction/index.d.ts.map +1 -1
- package/dist/core/compaction/index.js +2 -0
- package/dist/core/compaction/index.js.map +1 -1
- package/dist/core/compaction/pi-summary-fallback.d.ts.map +1 -1
- package/dist/core/compaction/pi-summary-fallback.js +1 -0
- package/dist/core/compaction/pi-summary-fallback.js.map +1 -1
- package/dist/core/compaction/planner-outcome.d.ts +14 -0
- package/dist/core/compaction/planner-outcome.d.ts.map +1 -1
- package/dist/core/compaction/planner-outcome.js +8 -0
- package/dist/core/compaction/planner-outcome.js.map +1 -1
- package/dist/core/compaction/range-planner-diagnostics.d.ts +35 -10
- package/dist/core/compaction/range-planner-diagnostics.d.ts.map +1 -1
- package/dist/core/compaction/range-planner-diagnostics.js +67 -24
- package/dist/core/compaction/range-planner-diagnostics.js.map +1 -1
- package/dist/core/compaction/range-planner.d.ts +7 -4
- package/dist/core/compaction/range-planner.d.ts.map +1 -1
- package/dist/core/compaction/range-planner.js +43 -19
- package/dist/core/compaction/range-planner.js.map +1 -1
- package/dist/core/compaction/refusal-recovery.d.ts +27 -0
- package/dist/core/compaction/refusal-recovery.d.ts.map +1 -0
- package/dist/core/compaction/refusal-recovery.js +65 -0
- package/dist/core/compaction/refusal-recovery.js.map +1 -0
- package/dist/core/compaction/region-trimming.d.ts +23 -0
- package/dist/core/compaction/region-trimming.d.ts.map +1 -1
- package/dist/core/compaction/region-trimming.js +59 -15
- package/dist/core/compaction/region-trimming.js.map +1 -1
- package/dist/core/compaction/structured-compaction-input.d.ts +19 -1
- package/dist/core/compaction/structured-compaction-input.d.ts.map +1 -1
- package/dist/core/compaction/structured-compaction-input.js +30 -17
- package/dist/core/compaction/structured-compaction-input.js.map +1 -1
- package/dist/core/compaction/transcript-serialization.d.ts +9 -3
- package/dist/core/compaction/transcript-serialization.d.ts.map +1 -1
- package/dist/core/compaction/transcript-serialization.js +18 -10
- package/dist/core/compaction/transcript-serialization.js.map +1 -1
- package/dist/core/messages.d.ts +5 -1
- package/dist/core/messages.d.ts.map +1 -1
- package/dist/core/messages.js +21 -3
- package/dist/core/messages.js.map +1 -1
- package/dist/core/session-manager-core.js +1 -1
- package/dist/core/session-manager-core.js.map +1 -1
- package/dist/core/session-manager-history.d.ts +1 -1
- package/dist/core/session-manager-history.d.ts.map +1 -1
- package/dist/core/session-manager-history.js +2 -5
- package/dist/core/session-manager-history.js.map +1 -1
- package/dist/core/settings-defaults.d.ts +2 -0
- package/dist/core/settings-defaults.d.ts.map +1 -1
- package/dist/core/settings-defaults.js +2 -0
- package/dist/core/settings-defaults.js.map +1 -1
- package/dist/core/settings-manager-basic-accessors.d.ts +2 -0
- package/dist/core/settings-manager-basic-accessors.d.ts.map +1 -1
- package/dist/core/settings-manager-basic-accessors.js +3 -0
- package/dist/core/settings-manager-basic-accessors.js.map +1 -1
- package/dist/core/settings-schema.d.ts +2 -0
- package/dist/core/settings-schema.d.ts.map +1 -1
- package/dist/core/settings-schema.js +4 -0
- package/dist/core/settings-schema.js.map +1 -1
- package/dist/core/storage/session/conformance.d.ts.map +1 -1
- package/dist/core/storage/session/conformance.js +12 -0
- package/dist/core/storage/session/conformance.js.map +1 -1
- package/dist/core/storage/session/jsonl-session-store.d.ts.map +1 -1
- package/dist/core/storage/session/jsonl-session-store.js +3 -0
- package/dist/core/storage/session/jsonl-session-store.js.map +1 -1
- package/dist/core/storage/session/legacy-session-store.d.ts.map +1 -1
- package/dist/core/storage/session/legacy-session-store.js +3 -0
- package/dist/core/storage/session/legacy-session-store.js.map +1 -1
- package/dist/core/storage/session/memory-session-store.d.ts.map +1 -1
- package/dist/core/storage/session/memory-session-store.js +3 -0
- package/dist/core/storage/session/memory-session-store.js.map +1 -1
- package/dist/core/storage/session/sql-session-store.d.ts.map +1 -1
- package/dist/core/storage/session/sql-session-store.js +12 -3
- package/dist/core/storage/session/sql-session-store.js.map +1 -1
- package/dist/core/storage/session/types.d.ts +3 -0
- package/dist/core/storage/session/types.d.ts.map +1 -1
- package/dist/core/storage/session/types.js +3 -0
- package/dist/core/storage/session/types.js.map +1 -1
- package/dist/core/tools/history-protocol.d.ts +3 -0
- package/dist/core/tools/history-protocol.d.ts.map +1 -1
- package/dist/core/tools/history-protocol.js +7 -87
- package/dist/core/tools/history-protocol.js.map +1 -1
- package/dist/core/tools/history-transcript.d.ts +24 -0
- package/dist/core/tools/history-transcript.d.ts.map +1 -0
- package/dist/core/tools/history-transcript.js +110 -0
- package/dist/core/tools/history-transcript.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/main-session.d.ts.map +1 -1
- package/dist/main-session.js +21 -5
- package/dist/main-session.js.map +1 -1
- package/dist/modes/interactive/components/compaction-boundary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/compaction-boundary-message.js +7 -3
- package/dist/modes/interactive/components/compaction-boundary-message.js.map +1 -1
- package/dist/modes/interactive/interactive-render-chat.js +2 -2
- package/dist/modes/interactive/interactive-render-chat.js.map +1 -1
- package/dist/session-id-target.d.ts +1 -0
- package/dist/session-id-target.d.ts.map +1 -1
- package/dist/session-id-target.js +3 -0
- package/dist/session-id-target.js.map +1 -1
- package/docs/compaction/reference.md +3 -2
- package/docs/compaction.md +35 -7
- package/docs/development.md +1 -1
- package/docs/sdk/reference.md +6 -5
- package/docs/sessions.md +3 -3
- package/docs/settings.md +3 -0
- package/docs/storage.md +2 -0
- package/docs/workflows/api-reference.md +15 -3
- package/docs/workflows/authoring.md +2 -2
- package/docs/workflows/operations.md +1 -0
- package/docs/workflows/reliable-design.md +1 -1
- package/npm-shrinkwrap.json +32 -32
- package/package.json +3 -3
- package/schemas/settings.schema.json +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.9.74-alpha.1] - 2026-11-09
|
|
6
|
+
|
|
7
|
+
Compaction keeps more of your session verbatim and can recall what it removed.
|
|
8
|
+
|
|
9
|
+
- **Verbatim compaction that holds up.** A planner refusal partway through its answer is retried and then planned in smaller pieces instead of falling back to a lossy summary, deletions stop at the keep target instead of removing most of the session, and stray prose around the planner's ranges no longer discards its whole answer ([#4543](https://github.com/bastani-inc/atomic/issues/4543), [#4576](https://github.com/bastani-inc/atomic/pull/4576), [#4568](https://github.com/bastani-inc/atomic/issues/4568), [#4578](https://github.com/bastani-inc/atomic/pull/4578)).
|
|
10
|
+
- **Removed context stays reachable.** The compacted context tells the agent where removed lines live in `history://`, cut tool output names the exact range to read, and a short `Recalled context` section brings back relevant lines from earlier history; turn it off with `compaction.historyRecall: false` ([#4568](https://github.com/bastani-inc/atomic/issues/4568), [#4578](https://github.com/bastani-inc/atomic/pull/4578)).
|
|
11
|
+
- **Diagnostics for every session store.** Compaction failures in SQLite and other non-JSONL stores now leave a redacted diagnostic in `compaction-diagnostics/` ([#4543](https://github.com/bastani-inc/atomic/issues/4543), [#4576](https://github.com/bastani-inc/atomic/pull/4576)).
|
|
12
|
+
- **Resuming sessions on large stores.** `--session <id>` and `--fork <id>` no longer run out of memory when the session belongs to another directory ([#4566](https://github.com/bastani-inc/atomic/issues/4566), [#4567](https://github.com/bastani-inc/atomic/pull/4567)).
|
|
13
|
+
- **Workflow stages survive detached `bash` waits.** Notifications, steering, follow-ups and compactions no longer push a session past a call whose result it still waits on, so the stage no longer fails with `ToolDetachmentError` ([#4580](https://github.com/bastani-inc/atomic/issues/4580), [#4581](https://github.com/bastani-inc/atomic/pull/4581)).
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- `AgentSession.isWaitingOnDetachedResults()` tells whether the transcript still waits on the result of a detached tool call; while it does and a detachment policy is set, nothing starts a turn on the session ([#4580](https://github.com/bastani-inc/atomic/issues/4580))
|
|
18
|
+
- `SessionListQuery.idPrefix` lists only the sessions whose id starts with the given text (case-insensitive); custom session stores should honor it ([#4566](https://github.com/bastani-inc/atomic/issues/4566))
|
|
19
|
+
- The planner's `policyRefusal` outcome now reports `phase` (`"input"` or `"midstream"`, exported as `PolicyRefusalPhase`), and `CompactionPlanOptions` and `CompactionRunRequest` accept `sidecarDirectory` (`SidecarDirectory`), where diagnostics go for a persisted session that has no session file ([#4543](https://github.com/bastani-inc/atomic/issues/4543))
|
|
20
|
+
- After a verbatim compaction, the compacted context now tells the agent that removed `(filtered N lines)` stay in the session's history and names its `history://sessions/<sessionId>` URL, so the agent can `search` it for removed text and `read` it with `:N-M`; a workflow stage session reaches its own history the same way, even when it runs in another directory. The planner is told that removed lines stay retrievable and removes bulky re-readable output before unique requirements, decisions and conclusions. Tool results in the compacted transcript the planner sees are now cut to 2,000 characters (previously 16,000), and the truncation marker names the exact `history://sessions/<sessionId>:N-M` range to `read` for the full output (or, when that range is unknown, says the full output is in this session's history); the kept recent tail still carries full tool output. The note also points the agent at `search history://sessions` (the project's other sessions), `search history://workflows` (workflow runs) and `search history://` (both), tells it to use them before redoing an investigation or when a removed decision, error message, file path or result matters, and says that a multi-record search covers the newest records and pages on with `?offset=`. Compaction now also adds a short `Recalled context` section after the planner picks the lines to keep: matching lines from this session's earlier history (including earlier compactions), the project's other sessions and workflow runs, found with the same `history://` search from your latest request and the compaction `query`, each with a `history://…:N-M` source to `read`. It adds at most 10% of the kept context and never more than 1,500 tokens, never repeats a kept line, searches for at most 3 seconds, and is skipped on any failure, timeout, cancellation or lack of matches, so compaction never waits on it or fails because of it. Set `compaction.historyRecall` to `false` to turn it off ([#4568](https://github.com/bastani-inc/atomic/issues/4568))
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
|
|
24
|
+
- Fixed `--session <id>` and `--fork <id>` running out of memory on a large session store when the session belongs to another directory: a full id is now read directly and an 8-character prefix lists only matching sessions, instead of loading every session's search text ([#4566](https://github.com/bastani-inc/atomic/issues/4566))
|
|
25
|
+
- Fixed compaction replacing a large session with a lossy summary when the provider refused the planner partway through its output: a refusal that arrives after the model generated tokens is now retried once and then planned in halves, and in quarters of a refused half, at message boundaries, keeping the result verbatim; the summary runs only if that fails, and an immediate refusal still goes to the summary at once ([#4543](https://github.com/bastani-inc/atomic/issues/4543))
|
|
26
|
+
- Fixed compaction failures such as "no usable deleted ranges" leaving no diagnostic for sessions kept in SQLite or another non-JSONL store: the planner's answer is now written to `compaction-diagnostics/` in the agent directory, and every diagnostic sidecar, JSONL sessions included, redacts credential-shaped text and cuts the stored answer to 65,536 characters ([#4543](https://github.com/bastani-inc/atomic/issues/4543))
|
|
27
|
+
- Fixed verbatim compaction deleting far more than the keep ratio asks for: the planner's deletions are now applied in the priority order it lists them and stop once the keep target plus a small tolerance is reached, instead of all being applied (a 50% target could delete 87% of lines). Removed lines stay retrievable through the session's history ([#4568](https://github.com/bastani-inc/atomic/issues/4568))
|
|
28
|
+
- Fixed verbatim compaction discarding a whole planner answer because of one stray line: prose, headers, blank lines, Markdown fences and surrounding whitespace around the `id:start,end` records are now skipped instead of making the answer malformed, and the records keep the order the planner listed them. An answer is still malformed when it has no valid record or more than half of its non-blank lines are not records. The number of skipped lines is recorded on the planner outcome and in the length-recovery diagnostic ([#4568](https://github.com/bastani-inc/atomic/issues/4568))
|
|
29
|
+
- Fixed a workflow stage failing with `ToolDetachmentError` (`unknown-tool-call`, or `session-busy` on a sibling) when its conversation moved past a long-running `bash` wait that had detached: while a session with a detachment policy waits on a detached call's result, a finished subagent's notification, steering, follow-ups and the continuation after a compaction no longer start a turn (they join the turn that `resumeDetachedTurn()` continues), a compaction keeps the waiting call's turn in the conversation (also when a notification was added after it), a session disposed while it waits no longer fails on a held notification, which the reopened session delivers after the result, and a result for a call whose turn the conversation already moved past is dropped and recorded in the debug log (`stale-detached-call`) instead of failing the host ([#4580](https://github.com/bastani-inc/atomic/issues/4580))
|
|
30
|
+
|
|
5
31
|
## [0.9.73] - 2026-11-08
|
|
6
32
|
|
|
7
33
|
Intercom connects in every session of a multi-directory process.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/intercom",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.74-alpha.1",
|
|
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/subagents",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.74-alpha.1",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Atomic extension for delegating tasks to subagents with parallel execution. 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.
|
|
3
|
+
"version": "0.9.74-alpha.1",
|
|
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,22 @@ 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.74-alpha.1] - 2026-11-09
|
|
10
|
+
|
|
11
|
+
Schema-backed workflow stages finish reliably.
|
|
12
|
+
|
|
13
|
+
- **Structured output without prompt boilerplate.** Atomic now tells every schema-backed stage to finish with `structured_output` and infers the result from the final answer when the model skips the call, so stages no longer fail their first attempt and prompts need not mention the tool ([#4565](https://github.com/bastani-inc/atomic/issues/4565), [#4577](https://github.com/bastani-inc/atomic/pull/4577)).
|
|
14
|
+
- **Stages survive detached `bash` waits.** A stage whose conversation moves past a detached call, through a compaction, a resumed pause or a late result, now keeps its finished result instead of failing the run ([#4580](https://github.com/bastani-inc/atomic/issues/4580), [#4581](https://github.com/bastani-inc/atomic/pull/4581)).
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
- Added `WorkflowStructuredOutputInferenceError`, with `isWorkflowStructuredOutputInferenceError`, `findWorkflowStructuredOutputInferenceError` and `deserializeWorkflowStructuredOutputInferenceError`: the typed `cause` a schema-backed stage's failure carries when Atomic's own `structured_output` inference produced no result ([#4565](https://github.com/bastani-inc/atomic/issues/4565))
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
|
|
22
|
+
- Fixed schema-backed workflow stages that failed their first attempt with the 1/3 structured-output corrective error because the stage prompt never said to finish with `structured_output`, and the model ended its turn without calling it. Atomic now closes every schema-backed prompt with that instruction, and when a turn still ends without a successful call it runs the same inference itself from the stage's final answer, so prompts no longer need to mention the tool; corrective follow-ups and `fallbackModels` apply only when that inference fails too ([#4565](https://github.com/bastani-inc/atomic/issues/4565))
|
|
23
|
+
- Fixed a workflow stage, and the run with it, failing when its conversation moved past a detached `bash` wait: a stage no longer prompts a session that still waits on a detached call's result (a retry after a compaction re-sent the continuation prompt and let the model carry on past the call), a compaction during a prompt no longer counts as an empty completion, a result handed back while the session is still running now waits for the run to settle instead of failing the stage, a message the operator resumes a paused stage with joins the turn the result continues instead of being dropped, and a stale call's late result is dropped so the stage keeps its finished result, including its `structured_output` ([#4580](https://github.com/bastani-inc/atomic/issues/4580))
|
|
24
|
+
|
|
9
25
|
## [0.9.72] - 2026-11-08
|
|
10
26
|
|
|
11
27
|
Waiting stages free their resources, and pooled work runs across machines.
|
|
@@ -449,11 +449,11 @@ const decision = await ctx.stage("review-gate", { schema: Decision }).prompt(
|
|
|
449
449
|
// decision.approved is typed from the schema.
|
|
450
450
|
```
|
|
451
451
|
|
|
452
|
-
Atomic registers the canonical `structured_output` tool only for schema-enabled items and automatically adds it to explicit `tools` allowlists. The schema is used directly as the tool argument contract. A schema-backed `StageContext` supports one `prompt()` call because the final-answer tool is a single result contract; create another `ctx.stage(..., { schema })` for another structured prompt. If a turn completes without
|
|
452
|
+
Atomic registers the canonical `structured_output` tool only for schema-enabled items and automatically adds it to explicit `tools` allowlists. The schema is used directly as the tool argument contract. A schema-backed `StageContext` supports one `prompt()` call because the final-answer tool is a single result contract; create another `ctx.stage(..., { schema })` for another structured prompt. Atomic closes every schema-backed prompt with an instruction to finish by calling `structured_output` exactly once, so the prompt only has to state the task. If a turn still completes without a successful `structured_output` call, Atomic runs the same inference itself from the stage's final assistant text and recent exchange, and the item completes with that result. When that inference fails, or the tool call fails schema validation, Atomic sends up to three corrective follow-up prompts that include the exact contract/validation error before failing the item; the failed inference stays as the `cause` of that failure. `ctx.task`/`ctx.chain`/`ctx.parallel` results expose the captured value as `result.structured` and keep `result.text` as formatted JSON for handoffs.
|
|
453
453
|
|
|
454
454
|
Each `structured_output` decision has a wall-clock limit that covers its repair attempts, retries, and model fallbacks together. It defaults to the session's `httpIdleTimeoutMs` setting (10 minutes unless changed); set `schemaTimeoutMs` (a positive integer in milliseconds) beside `schema` to change it for one item. An overrun stops the in-flight generation and fails the call with `Structured output decision exceeded its <n>ms deadline; no decision was accepted.` plus how long each attempt took. That is an execution failure, not a structured-output contract failure, and the error text reaches the model unchanged.
|
|
455
455
|
|
|
456
|
-
When an item configures both `schema` and `output`, its successful `structured_output` turn has two separate channels: all ordinary assistant text blocks from that exact message, in order, form the human-readable artifact written to `output`, while the successful tool arguments remain the typed machine-readable workflow result. Atomic never serializes those arguments into the artifact. The runner snapshots the result together with the exact successful tool-call id, so corrective attempts, another call with the same tool name, and later admitted turns cannot replace either side of the pairing. When the successful message has no ordinary text — including after a model-fallback session recreation that leaves the live session without that message — Atomic falls back to the most recent earlier assistant text that made no `structured_output` call; only when no such text exists is the artifact written empty, with the standard empty-artifact warning in the receipt. Items with `schema` but no `output` keep their existing result-text behavior.
|
|
456
|
+
When an item configures both `schema` and `output`, its successful `structured_output` turn has two separate channels: all ordinary assistant text blocks from that exact message, in order, form the human-readable artifact written to `output`, while the successful tool arguments remain the typed machine-readable workflow result. Atomic never serializes those arguments into the artifact. The runner snapshots the result together with the exact successful tool-call id, so corrective attempts, another call with the same tool name, and later admitted turns cannot replace either side of the pairing. When the successful message has no ordinary text — including after a model-fallback session recreation that leaves the live session without that message, or when Atomic ran the inference because the model never called the tool — Atomic falls back to the most recent earlier assistant text that made no `structured_output` call; only when no such text exists is the artifact written empty, with the standard empty-artifact warning in the receipt. Items with `schema` but no `output` keep their existing result-text behavior.
|
|
457
457
|
|
|
458
458
|
`subagent` is available as a default workflow-stage tool on the same terms as main chat: a stage is a top-level session, so it can delegate once, and the children it launches cannot delegate further. Delegation is one level deep and nothing configures it. `tools` allowlists apply to bundled extension tools as well as built-ins; if a stage sets `tools`, list every non-mandatory tool it should see. Ordinary `intercom` remains registered and active in every workflow model stage even under `noTools: "all"`, restrictive allowlists, or exclusions. Restrictions on `subagent`, `web_search`, `fetch_content`, and every other tool are unchanged. Bundled `@bastani/subagents` agent definitions are available to the `subagent` tool in workflow stages, including workflows launched from a subagent child process.
|
|
459
459
|
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
// dist/builtin/workflows/builtin/verification-prompts.ts
|
|
6
6
|
var MAX_INLINE_CANDIDATE_BYTES = 32 * 1024;
|
|
7
7
|
var DEFAULT_WARM_CONCURRENCY = 4;
|
|
8
|
-
var DEFAULT_OUTPUT_FORMAT = "
|
|
8
|
+
var DEFAULT_OUTPUT_FORMAT = "Report criterion_id, score (1–20), evidence, and findings containing finding and severity.";
|
|
9
9
|
function inlineCandidates(head) {
|
|
10
10
|
return head.candidates.every((candidate) => Buffer.byteLength(candidate.body, "utf8") <= MAX_INLINE_CANDIDATE_BYTES);
|
|
11
11
|
}
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
DEFAULT_RISE_DELTA,
|
|
6
6
|
DEFAULT_FALL_DELTA,
|
|
7
7
|
classify_trend
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-gp0s6m45.js";
|
|
9
9
|
import {
|
|
10
10
|
scoring_prompt_reads,
|
|
11
11
|
build_scoring_prompt
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-8kdrnrpa.js";
|
|
13
13
|
|
|
14
14
|
// dist/builtin/workflows/src/shared/workflow-artifacts.ts
|
|
15
15
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
@@ -3775,7 +3775,7 @@ Objective:
|
|
|
3775
3775
|
${context.objective}`,
|
|
3776
3776
|
groundTruthNote: `The objective is the contract. Verify the finding against observed code, not reviewer narration.`,
|
|
3777
3777
|
candidates: [candidate],
|
|
3778
|
-
outputFormat: "
|
|
3778
|
+
outputFormat: "Report score (an integer from 1 to 20) and evidence (an array of observed, concise reasons)."
|
|
3779
3779
|
};
|
|
3780
3780
|
const prompt = build_scoring_prompt(head, {
|
|
3781
3781
|
id: "finding_reverification",
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
scoring_prompt_reads,
|
|
13
13
|
build_scoring_prompt,
|
|
14
14
|
warm_first_fan_out
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-8kdrnrpa.js";
|
|
16
16
|
import {
|
|
17
17
|
fold_usage
|
|
18
18
|
} from "./chunk-tgt0s5e5.js";
|
|
@@ -68,7 +68,7 @@ Preserve every confirmed veto or blocking finding in remaining_work verbatim. Ex
|
|
|
68
68
|
</decision_rules>
|
|
69
69
|
|
|
70
70
|
<output_format>
|
|
71
|
-
|
|
71
|
+
Report repair_guidance (a concise actionable repair plan) and remaining_work (the unresolved findings as strings). Never emit an approval or rejection decision. ${READABLE_REPORT}
|
|
72
72
|
${GROUNDED_REPORTING}
|
|
73
73
|
</output_format>
|
|
74
74
|
|
|
@@ -197,7 +197,7 @@ function stageName(cell, reaskWave) {
|
|
|
197
197
|
return reaskWave === 0 ? cell.name : `${cell.name}-reask-${reaskWave}`;
|
|
198
198
|
}
|
|
199
199
|
function verifierOutputFormat(criterionId) {
|
|
200
|
-
return `
|
|
200
|
+
return `Report criterion_id (set to ${criterionId}), score (1–20), evidence (string array), and findings containing finding and severity (veto, blocking, or note).`;
|
|
201
201
|
}
|
|
202
202
|
function scoreStep(cell, reaskWave, head, criteriaPath) {
|
|
203
203
|
const promptHead = {
|
|
@@ -122,7 +122,7 @@ function build_progress_prompt(input) {
|
|
|
122
122
|
...input.checkpoints.map((checkpoint) => `- ${checkpoint}`),
|
|
123
123
|
"</checkpoints>",
|
|
124
124
|
"<output_format>",
|
|
125
|
-
`
|
|
125
|
+
`Report scores: [{ checkpoint, score }], using integer scores from ${VERIFICATION_SCALE.min} through ${VERIFICATION_SCALE.max}.`,
|
|
126
126
|
"</output_format>"
|
|
127
127
|
].join(`
|
|
128
128
|
`);
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
scoring_prompt_reads,
|
|
7
7
|
build_scoring_prompt
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-8kdrnrpa.js";
|
|
9
9
|
import {
|
|
10
10
|
stableArtifactRoot
|
|
11
11
|
} from "./chunk-rc5ec5xx.js";
|
|
@@ -65,7 +65,7 @@ Stop after every candidate is shortlisted once or recorded as discarded.
|
|
|
65
65
|
</stop_rules>
|
|
66
66
|
|
|
67
67
|
<output_format>
|
|
68
|
-
|
|
68
|
+
Report shortlist (candidate artifact paths in ranked order) and discarded entries containing path and a concise, criteria-based reason.
|
|
69
69
|
</output_format>
|
|
70
70
|
|
|
71
71
|
<objective>
|
|
@@ -77,7 +77,7 @@ function renderJudgePrompt(task, filterPath, shortlistSize, candidates = []) {
|
|
|
77
77
|
task: `Rank at most ${shortlistSize} distinct candidate paths for: ${task}.`,
|
|
78
78
|
groundTruthNote: `Read the filter report at ${filterPath} and every candidate path it references before judging.`,
|
|
79
79
|
candidates,
|
|
80
|
-
outputFormat: "
|
|
80
|
+
outputFormat: "Report shortlist (candidate paths in ranked order) and rationale (a concise, criteria-based explanation)."
|
|
81
81
|
};
|
|
82
82
|
const prompt = build_scoring_prompt(head, {
|
|
83
83
|
id: "filtered_shortlist",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
goal_default
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import"./chunk-
|
|
5
|
-
import"./chunk-
|
|
6
|
-
import"./chunk-
|
|
3
|
+
} from "./chunk-m8eg152f.js";
|
|
4
|
+
import"./chunk-d5cxskkp.js";
|
|
5
|
+
import"./chunk-8kdrnrpa.js";
|
|
6
|
+
import"./chunk-gp0s6m45.js";
|
|
7
7
|
import"./chunk-n1910xc4.js";
|
|
8
8
|
import"./chunk-rqbmeg5x.js";
|
|
9
9
|
import"./chunk-8dpt3b1c.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import"./chunk-rqbmeg5x.js";
|
|
2
2
|
import"./chunk-8dpt3b1c.js";
|
|
3
3
|
import"./chunk-n1910xc4.js";
|
|
4
|
-
import"./chunk-
|
|
4
|
+
import"./chunk-8kdrnrpa.js";
|
|
5
5
|
import {
|
|
6
6
|
adversarial_verification_default
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-d9pz64yp.js";
|
|
8
8
|
import {
|
|
9
9
|
classify_and_act_default
|
|
10
10
|
} from "./chunk-rysytmz1.js";
|
|
@@ -13,24 +13,24 @@ import {
|
|
|
13
13
|
} from "./chunk-gvse3naa.js";
|
|
14
14
|
import {
|
|
15
15
|
generate_and_filter_default
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-va2h64a6.js";
|
|
17
17
|
import {
|
|
18
18
|
goal_default
|
|
19
|
-
} from "./chunk-
|
|
20
|
-
import"./chunk-
|
|
21
|
-
import"./chunk-
|
|
19
|
+
} from "./chunk-m8eg152f.js";
|
|
20
|
+
import"./chunk-d5cxskkp.js";
|
|
21
|
+
import"./chunk-gp0s6m45.js";
|
|
22
22
|
import {
|
|
23
23
|
open_claude_design_default
|
|
24
24
|
} from "./chunk-774myqzs.js";
|
|
25
25
|
import {
|
|
26
26
|
loop_until_done_default
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-8ycbc76t.js";
|
|
28
28
|
import {
|
|
29
29
|
ralph_default
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-a4fdm2cw.js";
|
|
31
31
|
import {
|
|
32
32
|
tournament_default
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-r39ypw6b.js";
|
|
34
34
|
export {
|
|
35
35
|
adversarial_verification_default as adversarialVerification,
|
|
36
36
|
classify_and_act_default as classifyAndAct,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ralph_default
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import"./chunk-
|
|
5
|
-
import"./chunk-
|
|
6
|
-
import"./chunk-
|
|
3
|
+
} from "./chunk-a4fdm2cw.js";
|
|
4
|
+
import"./chunk-d5cxskkp.js";
|
|
5
|
+
import"./chunk-8kdrnrpa.js";
|
|
6
|
+
import"./chunk-gp0s6m45.js";
|
|
7
7
|
import"./chunk-n1910xc4.js";
|
|
8
8
|
import"./chunk-rqbmeg5x.js";
|
|
9
9
|
import"./chunk-8dpt3b1c.js";
|
|
@@ -65,6 +65,8 @@ export type { SerializedErrorCause, SerializedStageWaitError, StageRehydrationEr
|
|
|
65
65
|
export { deserializeStageWaitError, findStageWaitError, isStageRehydrationError, isStageReleasedError, isStageReleaseError, isStageWaitConfigError, isStageWaitError, isStageWaitRecordError, isStageWakeError, StageRehydrationError, StageReleasedError, StageReleaseError, StageWaitConfigError, StageWaitError, StageWaitRecordError, StageWakeError, } from "./shared/stage-wait-errors.js";
|
|
66
66
|
export type { BuiltinStageWakeKind, StageWake, StageWakeDelivery, StageWakeHandler, StageWakeHandlerContext, StageWakeKinds, } from "./shared/stage-wake.js";
|
|
67
67
|
export { registerStageWakeKind } from "./shared/stage-wake.js";
|
|
68
|
+
export type { SerializedWorkflowStructuredOutputInferenceError, WorkflowStructuredOutputInferenceErrorCode, WorkflowStructuredOutputInferenceErrorFields, } from "./shared/structured-output-errors.js";
|
|
69
|
+
export { deserializeWorkflowStructuredOutputInferenceError, findWorkflowStructuredOutputInferenceError, isWorkflowStructuredOutputInferenceError, WorkflowStructuredOutputInferenceError, } from "./shared/structured-output-errors.js";
|
|
68
70
|
/**
|
|
69
71
|
* Send a message to a stage of a live run in this process. Throws `StageWakeError` (`unknown-wake-kind`) when no
|
|
70
72
|
* module registered the message's kind; otherwise returns what became of it.
|