@bastani/atomic 0.8.27-alpha.1 → 0.8.28-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 +24 -0
- package/dist/builtin/intercom/CHANGELOG.md +6 -0
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/mcp/CHANGELOG.md +6 -0
- package/dist/builtin/mcp/package.json +2 -2
- package/dist/builtin/subagents/CHANGELOG.md +6 -0
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/web-access/CHANGELOG.md +6 -0
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/builtin/workflows/CHANGELOG.md +20 -0
- package/dist/builtin/workflows/README.md +11 -9
- package/dist/builtin/workflows/package.json +1 -1
- package/dist/builtin/workflows/src/authoring.d.ts +5 -2
- package/dist/builtin/workflows/src/extension/background-ui-adapter.ts +3 -1
- package/dist/builtin/workflows/src/extension/hil-answer-notifications.ts +17 -25
- package/dist/builtin/workflows/src/extension/index.ts +133 -18
- package/dist/builtin/workflows/src/extension/render-result.ts +22 -2
- package/dist/builtin/workflows/src/extension/workflow-schema.ts +3 -3
- package/dist/builtin/workflows/src/runs/foreground/executor.ts +210 -16
- package/dist/builtin/workflows/src/sdk-surface.ts +1 -1
- package/dist/builtin/workflows/src/shared/authoring-contract.d.ts +42 -5
- package/dist/builtin/workflows/src/shared/store-types.ts +8 -2
- package/dist/builtin/workflows/src/shared/store.ts +51 -0
- package/dist/builtin/workflows/src/shared/types.ts +14 -4
- package/dist/builtin/workflows/src/tui/graph-view.ts +4 -1
- package/dist/builtin/workflows/src/tui/prompt-card.ts +6 -0
- package/dist/builtin/workflows/src/tui/stage-chat-view.ts +11 -1
- package/dist/core/agent-session.d.ts +4 -4
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +147 -31
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-guidance.d.ts +10 -1
- package/dist/core/auth-guidance.d.ts.map +1 -1
- package/dist/core/auth-guidance.js +26 -1
- package/dist/core/auth-guidance.js.map +1 -1
- package/dist/core/compaction/branch-summarization.d.ts +2 -2
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +7 -7
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts +4 -84
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +3 -479
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/compaction/context-compaction.d.ts.map +1 -1
- package/dist/core/compaction/context-compaction.js +39 -82
- package/dist/core/compaction/context-compaction.js.map +1 -1
- package/dist/core/compaction/index.d.ts +1 -1
- package/dist/core/compaction/index.d.ts.map +1 -1
- package/dist/core/compaction/index.js +1 -1
- package/dist/core/compaction/index.js.map +1 -1
- package/dist/core/extensions/types.d.ts +10 -8
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/messages.d.ts +1 -11
- package/dist/core/messages.d.ts.map +1 -1
- package/dist/core/messages.js +10 -25
- package/dist/core/messages.js.map +1 -1
- package/dist/core/session-manager.d.ts +5 -8
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +12 -76
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-manager.d.ts +0 -3
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +0 -4
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/modes/interactive/components/chat-message-renderer.d.ts +1 -5
- package/dist/modes/interactive/components/chat-message-renderer.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-message-renderer.js +5 -9
- package/dist/modes/interactive/components/chat-message-renderer.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 +0 -3
- package/dist/modes/interactive/components/chat-session-host.js.map +1 -1
- package/dist/modes/interactive/components/index.d.ts +0 -1
- package/dist/modes/interactive/components/index.d.ts.map +1 -1
- package/dist/modes/interactive/components/index.js +0 -1
- package/dist/modes/interactive/components/index.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +4 -27
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts +1 -1
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +2 -2
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +1 -1
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +0 -1
- 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 +210 -181
- package/docs/extensions.md +31 -20
- package/docs/json.md +3 -4
- package/docs/session-format.md +12 -21
- package/docs/sessions.md +3 -1
- package/docs/settings.md +2 -5
- package/docs/workflows.md +11 -9
- package/examples/extensions/README.md +1 -1
- package/examples/extensions/custom-compaction.ts +43 -106
- package/examples/extensions/handoff.ts +6 -44
- package/examples/extensions/trigger-compact.ts +5 -4
- package/package.json +5 -5
- package/dist/modes/interactive/components/compaction-summary-message.d.ts +0 -16
- package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +0 -1
- package/dist/modes/interactive/components/compaction-summary-message.js +0 -43
- package/dist/modes/interactive/components/compaction-summary-message.js.map +0 -1
|
@@ -14,7 +14,6 @@ import { pickWhimsicalWorkingMessage } from "./whimsical-messages.js";
|
|
|
14
14
|
import { SessionImportFileNotFoundError, } from "../../core/agent-session-runtime.js";
|
|
15
15
|
import { FooterDataProvider, } from "../../core/footer-data-provider.js";
|
|
16
16
|
import { KeybindingsManager, } from "../../core/keybindings.js";
|
|
17
|
-
import { createCompactionSummaryMessage } from "../../core/messages.js";
|
|
18
17
|
import { defaultModelPerProvider, findExactModelReferenceMatch, resolveModelScope, } from "../../core/model-resolver.js";
|
|
19
18
|
import { formatCodexFastModeModelLabel, hasSupportedCodexFastModeModel, shouldApplyCodexFastMode, } from "../../core/codex-fast-mode.js";
|
|
20
19
|
import { configureHttpDispatcher } from "../../core/http-dispatcher.js";
|
|
@@ -41,7 +40,6 @@ import { BorderedLoader } from "./components/bordered-loader.js";
|
|
|
41
40
|
import { BranchSummaryMessageComponent } from "./components/branch-summary-message.js";
|
|
42
41
|
import { chatEntriesFromAgentMessages, renderChatMessageEntry, } from "./components/chat-message-renderer.js";
|
|
43
42
|
import { addChatTranscriptEntry } from "./components/chat-transcript.js";
|
|
44
|
-
import { CompactionSummaryMessageComponent } from "./components/compaction-summary-message.js";
|
|
45
43
|
import { ContextCompactionSummaryMessageComponent } from "./components/context-compaction-summary-message.js";
|
|
46
44
|
import { CountdownTimer } from "./components/countdown-timer.js";
|
|
47
45
|
import { CustomEditor } from "./components/custom-editor.js";
|
|
@@ -89,13 +87,6 @@ class ExpandableText extends Text {
|
|
|
89
87
|
this.setText(this.expanded ? this.getExpandedText() : this.getCollapsedText());
|
|
90
88
|
}
|
|
91
89
|
}
|
|
92
|
-
function isContextCompactionResult(result) {
|
|
93
|
-
return (typeof result === "object" &&
|
|
94
|
-
result !== null &&
|
|
95
|
-
"stats" in result &&
|
|
96
|
-
"deletedTargets" in result &&
|
|
97
|
-
"protectedEntryIds" in result);
|
|
98
|
-
}
|
|
99
90
|
const DEAD_TERMINAL_ERROR_CODES = new Set(["EIO", "EPIPE", "ENOTCONN"]);
|
|
100
91
|
function isDeadTerminalError(error) {
|
|
101
92
|
if (!error || typeof error !== "object" || !("code" in error)) {
|
|
@@ -1397,7 +1388,7 @@ export class InteractiveMode {
|
|
|
1397
1388
|
compact: (options) => {
|
|
1398
1389
|
void (async () => {
|
|
1399
1390
|
try {
|
|
1400
|
-
const result = await this.session.compact(
|
|
1391
|
+
const result = await this.session.compact();
|
|
1401
1392
|
options?.onComplete?.(result);
|
|
1402
1393
|
}
|
|
1403
1394
|
catch (error) {
|
|
@@ -2595,12 +2586,7 @@ export class InteractiveMode {
|
|
|
2595
2586
|
else if (event.result) {
|
|
2596
2587
|
this.chatContainer.clear();
|
|
2597
2588
|
this.rebuildChatFromMessages();
|
|
2598
|
-
|
|
2599
|
-
this.addContextCompactionSummaryToChat(event.result);
|
|
2600
|
-
}
|
|
2601
|
-
else {
|
|
2602
|
-
this.addMessageToChat(createCompactionSummaryMessage(event.result.summary, event.result.tokensBefore, new Date().toISOString()));
|
|
2603
|
-
}
|
|
2589
|
+
this.addContextCompactionSummaryToChat(event.result);
|
|
2604
2590
|
this.footer.invalidate();
|
|
2605
2591
|
}
|
|
2606
2592
|
else if (event.errorMessage) {
|
|
@@ -2787,13 +2773,6 @@ export class InteractiveMode {
|
|
|
2787
2773
|
}
|
|
2788
2774
|
break;
|
|
2789
2775
|
}
|
|
2790
|
-
case "compactionSummary": {
|
|
2791
|
-
this.chatContainer.addChild(new Spacer(1));
|
|
2792
|
-
const component = new CompactionSummaryMessageComponent(message, this.getMarkdownThemeWithSettings());
|
|
2793
|
-
component.setExpanded(this.toolOutputExpanded);
|
|
2794
|
-
this.chatContainer.addChild(component);
|
|
2795
|
-
break;
|
|
2796
|
-
}
|
|
2797
2776
|
case "branchSummary": {
|
|
2798
2777
|
this.chatContainer.addChild(new Spacer(1));
|
|
2799
2778
|
const component = new BranchSummaryMessageComponent(message, this.getMarkdownThemeWithSettings());
|
|
@@ -2838,10 +2817,8 @@ export class InteractiveMode {
|
|
|
2838
2817
|
// Tool results are rendered inline with tool calls, handled separately
|
|
2839
2818
|
break;
|
|
2840
2819
|
}
|
|
2841
|
-
default:
|
|
2842
|
-
|
|
2843
|
-
void _exhaustive;
|
|
2844
|
-
}
|
|
2820
|
+
default:
|
|
2821
|
+
break;
|
|
2845
2822
|
}
|
|
2846
2823
|
}
|
|
2847
2824
|
/**
|