@bastani/atomic 0.8.26-alpha.7 → 0.8.26-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/README.md +5 -8
- package/dist/builtin/intercom/CHANGELOG.md +12 -0
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/mcp/CHANGELOG.md +12 -0
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/CHANGELOG.md +12 -0
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/web-access/CHANGELOG.md +12 -0
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/builtin/workflows/CHANGELOG.md +12 -0
- package/dist/builtin/workflows/package.json +1 -1
- package/dist/builtin/workflows/src/extension/wiring.ts +13 -1
- package/dist/builtin/workflows/src/runs/foreground/executor.ts +12 -6
- package/dist/builtin/workflows/src/runs/foreground/stage-runner.ts +2 -2
- package/dist/builtin/workflows/src/shared/authoring-contract.d.ts +2 -2
- package/dist/builtin/workflows/src/shared/types.ts +3 -3
- package/dist/builtin/workflows/src/tui/stage-chat-view.ts +1 -9
- package/dist/core/agent-session.d.ts +5 -5
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +64 -173
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/atomic-guide-command.d.ts.map +1 -1
- package/dist/core/atomic-guide-command.js +1 -1
- package/dist/core/atomic-guide-command.js.map +1 -1
- package/dist/core/extensions/types.d.ts +3 -2
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +1 -1
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +1 -2
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host.js +1 -1
- package/dist/modes/interactive/components/chat-session-host.js.map +1 -1
- package/dist/modes/interactive/components/context-compaction-summary-message.d.ts +17 -0
- package/dist/modes/interactive/components/context-compaction-summary-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/context-compaction-summary-message.js +83 -0
- package/dist/modes/interactive/components/context-compaction-summary-message.js.map +1 -0
- package/dist/modes/interactive/components/index.d.ts +1 -0
- package/dist/modes/interactive/components/index.d.ts.map +1 -1
- package/dist/modes/interactive/components/index.js +1 -0
- package/dist/modes/interactive/components/index.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +28 -38
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts +3 -3
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +1 -1
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +2 -2
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/docs/compaction.md +71 -38
- package/docs/extensions.md +9 -5
- package/docs/index.md +17 -3
- package/docs/json.md +2 -2
- package/docs/quickstart.md +18 -4
- package/docs/rpc.md +19 -40
- package/docs/sdk.md +18 -4
- package/docs/session-format.md +3 -3
- package/docs/sessions.md +2 -3
- package/docs/settings.md +2 -2
- package/docs/termux.md +1 -1
- package/docs/usage.md +2 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.8.26-alpha.9] - 2026-06-07
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Documented npm/pnpm installation options in Atomic docs and limited Mintlify validation to pull requests ([#1294](https://github.com/bastani-inc/atomic/pull/1294)).
|
|
10
|
+
- Fixed Mintlify MDX autolinks in package docs so documentation validation passes ([#1293](https://github.com/bastani-inc/atomic/pull/1293)).
|
|
11
|
+
|
|
12
|
+
## [0.8.26-alpha.8] - 2026-06-07
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- Changed manual `/compact` and auto-compaction to use deletion-only context compaction by default, preserving retained transcript content verbatim.
|
|
17
|
+
- Restyled completed context compaction results with the same expandable summary-card treatment as summary compaction.
|
|
18
|
+
|
|
19
|
+
### Removed
|
|
20
|
+
|
|
21
|
+
- Removed the `/context-compact` interactive and workflow-stage slash command; use `/compact` instead.
|
|
22
|
+
|
|
5
23
|
## [0.8.26-alpha.7] - 2026-06-07
|
|
6
24
|
|
|
7
25
|
### Added
|
package/README.md
CHANGED
|
@@ -179,8 +179,7 @@ Type `/` in the editor to trigger commands. [Extensions](#extensions) can regist
|
|
|
179
179
|
| `/tree` | Jump to any point in the session and continue from there |
|
|
180
180
|
| `/fork` | Create a new session from a previous user message |
|
|
181
181
|
| `/clone` | Duplicate the current active branch into a new session |
|
|
182
|
-
| `/compact
|
|
183
|
-
| `/context-compact` | Delete safe older transcript objects verbatim; no arguments |
|
|
182
|
+
| `/compact` | Delete safe older transcript objects verbatim |
|
|
184
183
|
| `/copy` | Copy last assistant message to clipboard |
|
|
185
184
|
| `/export [file]` | Export session to HTML file |
|
|
186
185
|
| `/share` | Upload as private GitHub gist with shareable HTML link |
|
|
@@ -259,15 +258,13 @@ Use `/session` in interactive mode to see the current session ID before reusing
|
|
|
259
258
|
|
|
260
259
|
### Compaction
|
|
261
260
|
|
|
262
|
-
Long sessions can exhaust context windows.
|
|
261
|
+
Long sessions can exhaust context windows. Compaction now uses deletion-only context compaction by default: the selected model proposes safe deletion targets, Atomic validates them locally, and retained transcript content stays verbatim.
|
|
263
262
|
|
|
264
|
-
**Manual
|
|
263
|
+
**Manual:** `/compact` has no prompt arguments.
|
|
265
264
|
|
|
266
|
-
**
|
|
265
|
+
**Automatic:** Enabled by default. Triggers on context overflow (recovers and retries) or when approaching the limit (proactive). Configure via `/settings` or `settings.json`. Automatic compaction uses the same verbatim deletion path.
|
|
267
266
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
Summary compaction is lossy. `/context-compact` preserves retained transcript content verbatim, but the full history still remains in the JSONL file; use `/tree` to revisit. Customize summary compaction behavior via [extensions](#extensions). See [docs/compaction.md](docs/compaction.md) for internals.
|
|
267
|
+
The full history still remains in the JSONL file; use `/tree` to revisit. See [docs/compaction.md](docs/compaction.md) for internals.
|
|
271
268
|
|
|
272
269
|
---
|
|
273
270
|
|
|
@@ -4,6 +4,18 @@ All notable changes to the `pi-intercom` extension will be documented in this fi
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.8.26-alpha.9] - 2026-06-07
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- Bumped package version for the Atomic 0.8.26-alpha.9 prerelease.
|
|
12
|
+
|
|
13
|
+
## [0.8.26-alpha.8] - 2026-06-07
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- Bumped package version for the Atomic 0.8.26-alpha.8 prerelease.
|
|
18
|
+
|
|
7
19
|
## [0.8.26-alpha.7] - 2026-06-07
|
|
8
20
|
|
|
9
21
|
### Changed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/intercom",
|
|
3
|
-
"version": "0.8.26-alpha.
|
|
3
|
+
"version": "0.8.26-alpha.9",
|
|
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,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.8.26-alpha.9] - 2026-06-07
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- Bumped package version for the Atomic 0.8.26-alpha.9 prerelease.
|
|
15
|
+
|
|
16
|
+
## [0.8.26-alpha.8] - 2026-06-07
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- Bumped package version for the Atomic 0.8.26-alpha.8 prerelease.
|
|
21
|
+
|
|
10
22
|
## [0.8.26-alpha.7] - 2026-06-07
|
|
11
23
|
|
|
12
24
|
### Changed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/mcp",
|
|
3
|
-
"version": "0.8.26-alpha.
|
|
3
|
+
"version": "0.8.26-alpha.9",
|
|
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,18 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.8.26-alpha.9] - 2026-06-07
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Bumped package version for the Atomic 0.8.26-alpha.9 prerelease.
|
|
10
|
+
|
|
11
|
+
## [0.8.26-alpha.8] - 2026-06-07
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- Bumped package version for the Atomic 0.8.26-alpha.8 prerelease.
|
|
16
|
+
|
|
5
17
|
## [0.8.26-alpha.7] - 2026-06-07
|
|
6
18
|
|
|
7
19
|
### Added
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/subagents",
|
|
3
|
-
"version": "0.8.26-alpha.
|
|
3
|
+
"version": "0.8.26-alpha.9",
|
|
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,18 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.8.26-alpha.9] - 2026-06-07
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- Bumped package version for the Atomic 0.8.26-alpha.9 prerelease.
|
|
12
|
+
|
|
13
|
+
## [0.8.26-alpha.8] - 2026-06-07
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- Bumped package version for the Atomic 0.8.26-alpha.8 prerelease.
|
|
18
|
+
|
|
7
19
|
## [0.8.26-alpha.7] - 2026-06-07
|
|
8
20
|
|
|
9
21
|
### Changed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/web-access",
|
|
3
|
-
"version": "0.8.26-alpha.
|
|
3
|
+
"version": "0.8.26-alpha.9",
|
|
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,18 @@ 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.26-alpha.9] - 2026-06-07
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- Bumped package version for the Atomic 0.8.26-alpha.9 prerelease.
|
|
14
|
+
|
|
15
|
+
## [0.8.26-alpha.8] - 2026-06-07
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- Updated workflow-stage chat so `/compact` is the no-argument compaction command and `/context-compact` is no longer handled locally.
|
|
20
|
+
|
|
9
21
|
## [0.8.26-alpha.7] - 2026-06-07
|
|
10
22
|
|
|
11
23
|
### Changed
|
|
@@ -226,7 +226,19 @@ async function createTestAgentSession(_options?: CreateAgentSessionOptions): Pro
|
|
|
226
226
|
return { cancelled: true };
|
|
227
227
|
},
|
|
228
228
|
async compact(): ReturnType<StageSessionRuntime["compact"]> {
|
|
229
|
-
return {
|
|
229
|
+
return {
|
|
230
|
+
promptVersion: 1,
|
|
231
|
+
deletedTargets: [],
|
|
232
|
+
protectedEntryIds: [],
|
|
233
|
+
stats: {
|
|
234
|
+
objectsBefore: 0,
|
|
235
|
+
objectsAfter: 0,
|
|
236
|
+
objectsDeleted: 0,
|
|
237
|
+
tokensBefore: 0,
|
|
238
|
+
tokensAfter: 0,
|
|
239
|
+
percentReduction: 0,
|
|
240
|
+
},
|
|
241
|
+
};
|
|
230
242
|
},
|
|
231
243
|
abortCompaction(): void {},
|
|
232
244
|
async abort(): Promise<void> {},
|
|
@@ -3462,9 +3462,15 @@ export async function run<TInputs extends WorkflowInputValues>(
|
|
|
3462
3462
|
|
|
3463
3463
|
const compactionMeta = (result: unknown): string | undefined => {
|
|
3464
3464
|
if (result === undefined || result === null || typeof result !== "object") return undefined;
|
|
3465
|
-
const compaction = result as {
|
|
3466
|
-
|
|
3467
|
-
|
|
3465
|
+
const compaction = result as {
|
|
3466
|
+
stats?: { tokensBefore?: unknown; tokensAfter?: unknown };
|
|
3467
|
+
tokensBefore?: unknown;
|
|
3468
|
+
tokensAfter?: unknown;
|
|
3469
|
+
tokensKept?: unknown;
|
|
3470
|
+
};
|
|
3471
|
+
const beforeRaw = compaction.stats?.tokensBefore ?? compaction.tokensBefore;
|
|
3472
|
+
const keptRaw = compaction.stats?.tokensAfter ?? compaction.tokensKept ?? compaction.tokensAfter;
|
|
3473
|
+
const before = typeof beforeRaw === "number" ? beforeRaw : undefined;
|
|
3468
3474
|
const kept = typeof keptRaw === "number" ? keptRaw : undefined;
|
|
3469
3475
|
if (before === undefined || kept === undefined) return undefined;
|
|
3470
3476
|
return `${(before / 1000).toFixed(1)}k → ${(kept / 1000).toFixed(1)}k`;
|
|
@@ -3509,9 +3515,9 @@ export async function run<TInputs extends WorkflowInputValues>(
|
|
|
3509
3515
|
recordStageNotice({ kind: "tree", to: targetId });
|
|
3510
3516
|
return innerCtx.navigateTree(targetId, treeOptions);
|
|
3511
3517
|
},
|
|
3512
|
-
compact: async (
|
|
3513
|
-
const result = await innerCtx.compact(
|
|
3514
|
-
recordStageNotice({ kind: "compaction", to: "
|
|
3518
|
+
compact: async () => {
|
|
3519
|
+
const result = await innerCtx.compact();
|
|
3520
|
+
recordStageNotice({ kind: "compaction", to: "compacted", meta: compactionMeta(result) });
|
|
3515
3521
|
return result;
|
|
3516
3522
|
},
|
|
3517
3523
|
abortCompaction: () => innerCtx.abortCompaction(),
|
|
@@ -992,8 +992,8 @@ export function createStageContext(opts: StageRunnerOpts): InternalStageContext
|
|
|
992
992
|
return (await ensureSession()).navigateTree(targetId, options);
|
|
993
993
|
},
|
|
994
994
|
|
|
995
|
-
async compact(
|
|
996
|
-
return (await ensureSession()).compact(
|
|
995
|
+
async compact() {
|
|
996
|
+
return (await ensureSession()).compact();
|
|
997
997
|
},
|
|
998
998
|
|
|
999
999
|
abortCompaction() {
|
|
@@ -188,7 +188,7 @@ export interface StageSessionRuntime {
|
|
|
188
188
|
readonly editorText?: string;
|
|
189
189
|
readonly cancelled: boolean;
|
|
190
190
|
}>;
|
|
191
|
-
compact(
|
|
191
|
+
compact(): Promise<object>;
|
|
192
192
|
abortCompaction(): void;
|
|
193
193
|
abort(): Promise<void>;
|
|
194
194
|
dispose(): void | Promise<void>;
|
|
@@ -248,7 +248,7 @@ export interface StageContext {
|
|
|
248
248
|
readonly editorText?: string;
|
|
249
249
|
readonly cancelled: boolean;
|
|
250
250
|
}>;
|
|
251
|
-
compact(
|
|
251
|
+
compact(): Promise<object>;
|
|
252
252
|
abortCompaction(): void;
|
|
253
253
|
abort(): Promise<void>;
|
|
254
254
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import type {
|
|
7
7
|
AgentSession,
|
|
8
8
|
AgentSessionEvent,
|
|
9
|
-
|
|
9
|
+
ContextCompactionResult,
|
|
10
10
|
CreateAgentSessionOptions,
|
|
11
11
|
ModelCycleResult,
|
|
12
12
|
PromptOptions,
|
|
@@ -19,7 +19,7 @@ import type * as AuthoringContract from "./authoring-contract.js";
|
|
|
19
19
|
|
|
20
20
|
export type { TSchema };
|
|
21
21
|
|
|
22
|
-
export type { AgentSessionEvent,
|
|
22
|
+
export type { AgentSessionEvent, ContextCompactionResult, ModelCycleResult, PromptOptions };
|
|
23
23
|
|
|
24
24
|
export type WorkflowModelValue = NonNullable<CreateAgentSessionOptions["model"]> | string;
|
|
25
25
|
export type WorkflowModelUsage = AuthoringContract.WorkflowModelUsage;
|
|
@@ -308,7 +308,7 @@ export interface StageContext {
|
|
|
308
308
|
): Promise<{ editorText?: string; cancelled: boolean }>;
|
|
309
309
|
|
|
310
310
|
/** Compaction. */
|
|
311
|
-
compact(
|
|
311
|
+
compact(): Promise<ContextCompactionResult>;
|
|
312
312
|
abortCompaction(): void;
|
|
313
313
|
|
|
314
314
|
/** Abort current operation. */
|
|
@@ -665,20 +665,12 @@ export class StageChatView implements Component, Focusable {
|
|
|
665
665
|
const [command, ...rest] = text.trim().split(/\s+/);
|
|
666
666
|
switch (command) {
|
|
667
667
|
case "/compact": {
|
|
668
|
-
const handle = this._liveHandle();
|
|
669
|
-
if (!handle) return false;
|
|
670
|
-
await handle.ensureAttached();
|
|
671
|
-
if (!handle.agentSession) return false;
|
|
672
|
-
await handle.agentSession.compact(rest.join(" ") || undefined);
|
|
673
|
-
return true;
|
|
674
|
-
}
|
|
675
|
-
case "/context-compact": {
|
|
676
668
|
if (rest.length > 0) return true;
|
|
677
669
|
const handle = this._liveHandle();
|
|
678
670
|
if (!handle) return false;
|
|
679
671
|
await handle.ensureAttached();
|
|
680
672
|
if (!handle.agentSession) return false;
|
|
681
|
-
await handle.agentSession.
|
|
673
|
+
await handle.agentSession.compact();
|
|
682
674
|
return true;
|
|
683
675
|
}
|
|
684
676
|
case "/quit":
|
|
@@ -61,7 +61,7 @@ export type AgentSessionEvent = AgentEvent | {
|
|
|
61
61
|
} | {
|
|
62
62
|
type: "compaction_end";
|
|
63
63
|
reason: "manual" | "threshold" | "overflow";
|
|
64
|
-
result: CompactionResult | undefined;
|
|
64
|
+
result: CompactionResult | ContextCompactionResult | undefined;
|
|
65
65
|
aborted: boolean;
|
|
66
66
|
willRetry: boolean;
|
|
67
67
|
errorMessage?: string;
|
|
@@ -483,12 +483,12 @@ export declare class AgentSession {
|
|
|
483
483
|
* Saves to settings.
|
|
484
484
|
*/
|
|
485
485
|
setFollowUpMode(mode: "all" | "one-at-a-time"): void;
|
|
486
|
+
private _applyContextVerbatimCompaction;
|
|
486
487
|
/**
|
|
487
|
-
* Manually compact the session context.
|
|
488
|
-
* Aborts current agent operation first.
|
|
489
|
-
* @param customInstructions Optional instructions for the compaction summary
|
|
488
|
+
* Manually compact the session context using deletion-only verbatim context compaction.
|
|
489
|
+
* Aborts current agent operation first. Custom summary instructions are not accepted.
|
|
490
490
|
*/
|
|
491
|
-
compact(customInstructions?: string): Promise<
|
|
491
|
+
compact(customInstructions?: string): Promise<ContextCompactionResult>;
|
|
492
492
|
/**
|
|
493
493
|
* Manually compact the session context by applying validated logical deletions.
|
|
494
494
|
* Retained transcript entries/content blocks stay verbatim; no user prompt text is accepted.
|