@bastani/atomic 0.8.29 → 0.8.30-alpha.2
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/cursor/CHANGELOG.md +4 -0
- package/dist/builtin/cursor/package.json +2 -2
- package/dist/builtin/intercom/CHANGELOG.md +4 -0
- package/dist/builtin/intercom/package.json +2 -2
- package/dist/builtin/mcp/CHANGELOG.md +4 -0
- package/dist/builtin/mcp/package.json +3 -3
- package/dist/builtin/subagents/CHANGELOG.md +9 -0
- package/dist/builtin/subagents/README.md +10 -30
- package/dist/builtin/subagents/package.json +4 -4
- package/dist/builtin/subagents/skills/subagent/SKILL.md +5 -11
- package/dist/builtin/subagents/src/agents/agent-management.ts +0 -5
- package/dist/builtin/subagents/src/agents/agent-serializer.ts +7 -3
- package/dist/builtin/subagents/src/agents/agents.ts +4 -29
- package/dist/builtin/subagents/src/agents/chain-serializer.ts +27 -25
- package/dist/builtin/subagents/src/extension/schemas.ts +0 -75
- package/dist/builtin/subagents/src/runs/background/async-execution.ts +0 -29
- package/dist/builtin/subagents/src/runs/background/run-status.ts +1 -2
- package/dist/builtin/subagents/src/runs/background/subagent-runner.ts +134 -239
- package/dist/builtin/subagents/src/runs/foreground/chain-execution.ts +1 -52
- package/dist/builtin/subagents/src/runs/foreground/execution.ts +103 -94
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor.ts +0 -10
- package/dist/builtin/subagents/src/runs/shared/dynamic-fanout.ts +16 -8
- package/dist/builtin/subagents/src/runs/shared/model-fallback.ts +0 -1
- package/dist/builtin/subagents/src/runs/shared/parallel-utils.ts +0 -3
- package/dist/builtin/subagents/src/runs/shared/structured-output.ts +67 -2
- package/dist/builtin/subagents/src/runs/shared/subagent-control.ts +6 -20
- package/dist/builtin/subagents/src/runs/shared/subagent-prompt-runtime.ts +1 -1
- package/dist/builtin/subagents/src/runs/shared/workflow-graph.ts +2 -6
- package/dist/builtin/subagents/src/shared/settings.ts +1 -4
- package/dist/builtin/subagents/src/shared/types.ts +1 -156
- package/dist/builtin/subagents/src/tui/render.ts +0 -1
- package/dist/builtin/web-access/CHANGELOG.md +4 -0
- package/dist/builtin/web-access/package.json +2 -2
- package/dist/builtin/workflows/CHANGELOG.md +11 -0
- package/dist/builtin/workflows/README.md +2 -2
- package/dist/builtin/workflows/package.json +2 -2
- package/dist/builtin/workflows/src/extension/index.ts +8 -1
- package/dist/builtin/workflows/src/extension/wiring.ts +66 -10
- package/dist/builtin/workflows/src/runs/foreground/executor.ts +70 -19
- package/dist/builtin/workflows/src/runs/foreground/stage-runner.ts +98 -14
- package/dist/builtin/workflows/src/runs/shared/model-fallback.ts +0 -1
- package/dist/builtin/workflows/src/shared/persistence-restore.ts +4 -0
- package/dist/builtin/workflows/src/shared/persistence-session-entries.ts +4 -0
- package/dist/builtin/workflows/src/shared/store.ts +2 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +18 -4
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session.d.ts +2 -2
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +21 -9
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +2 -2
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts +6 -0
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +2 -0
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/compaction/context-compaction.d.ts +43 -16
- package/dist/core/compaction/context-compaction.d.ts.map +1 -1
- package/dist/core/compaction/context-compaction.js +561 -189
- package/dist/core/compaction/context-compaction.js.map +1 -1
- package/dist/core/extensions/loader.d.ts +4 -2
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +11 -7
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/types.d.ts +14 -3
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +2 -1
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/package-manager.d.ts +1 -1
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +52 -18
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/resource-loader.d.ts +20 -0
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +89 -24
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/session-manager.d.ts +14 -1
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +145 -3
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-manager.d.ts +9 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +16 -0
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/thinking-blocks.d.ts +7 -0
- package/dist/core/thinking-blocks.d.ts.map +1 -0
- package/dist/core/thinking-blocks.js +16 -0
- package/dist/core/thinking-blocks.js.map +1 -0
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +4 -0
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +30 -0
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/tree-selector.js +87 -12
- package/dist/modes/interactive/components/tree-selector.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +37 -18
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/theme/theme.d.ts +24 -1
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +58 -13
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/utils/child-process.d.ts +9 -4
- package/dist/utils/child-process.d.ts.map +1 -1
- package/dist/utils/child-process.js +42 -10
- package/dist/utils/child-process.js.map +1 -1
- package/dist/utils/version-check.d.ts.map +1 -1
- package/dist/utils/version-check.js +4 -27
- package/dist/utils/version-check.js.map +1 -1
- package/docs/compaction.md +470 -51
- package/docs/containerization.md +37 -37
- package/docs/extensions.md +23 -14
- package/docs/models.md +6 -4
- package/docs/packages.md +2 -0
- package/docs/providers.md +1 -1
- package/docs/subagents.md +11 -4
- package/docs/workflows.md +4 -2
- package/examples/extensions/README.md +2 -2
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/question.ts +39 -18
- package/examples/extensions/questionnaire.ts +49 -28
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/package.json +7 -5
- package/dist/builtin/subagents/src/runs/shared/acceptance.ts +0 -612
- package/dist/builtin/subagents/src/runs/shared/completion-guard.ts +0 -147
|
@@ -68,7 +68,7 @@ import { TrustSelectorComponent } from "./components/trust-selector.js";
|
|
|
68
68
|
import { hasProjectConfigDir, ProjectTrustStore } from "../../core/trust-manager.js";
|
|
69
69
|
import { UserMessageComponent } from "./components/user-message.js";
|
|
70
70
|
import { UserMessageSelectorComponent } from "./components/user-message-selector.js";
|
|
71
|
-
import { getAvailableThemes, getAvailableThemesWithPaths, getEditorTheme, getMarkdownTheme, getThemeByName, initTheme, onThemeChange, setRegisteredThemes, setTheme, setThemeInstance, stopThemeWatcher, Theme, theme, } from "./theme/theme.js";
|
|
71
|
+
import { detectTerminalBackgroundTheme, getAvailableThemes, getAvailableThemesWithPaths, getEditorTheme, getMarkdownTheme, getThemeByName, initTheme, onThemeChange, setRegisteredThemes, setTheme, setThemeInstance, stopThemeWatcher, Theme, theme, } from "./theme/theme.js";
|
|
72
72
|
function isExpandable(obj) {
|
|
73
73
|
return (typeof obj === "object" &&
|
|
74
74
|
obj !== null &&
|
|
@@ -267,6 +267,22 @@ export class InteractiveMode {
|
|
|
267
267
|
setRegisteredThemes(this.session.resourceLoader.getThemes().themes);
|
|
268
268
|
initTheme(this.settingsManager.getTheme(), true);
|
|
269
269
|
}
|
|
270
|
+
async detectThemeIfUnset() {
|
|
271
|
+
if (this.settingsManager.getTheme()) {
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
const detection = await detectTerminalBackgroundTheme({ ui: this.ui, timeoutMs: 100 });
|
|
275
|
+
const result = setTheme(detection.theme, true);
|
|
276
|
+
if (!result.success) {
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
if (detection.confidence === "high") {
|
|
280
|
+
this.settingsManager.setTheme(detection.theme);
|
|
281
|
+
await this.settingsManager.flush();
|
|
282
|
+
}
|
|
283
|
+
this.updateEditorBorderColor();
|
|
284
|
+
this.ui.requestRender();
|
|
285
|
+
}
|
|
270
286
|
getAutocompleteSourceTag(sourceInfo) {
|
|
271
287
|
if (!sourceInfo) {
|
|
272
288
|
return undefined;
|
|
@@ -434,22 +450,8 @@ export class InteractiveMode {
|
|
|
434
450
|
this.registerSignalHandlers();
|
|
435
451
|
// Load changelog (only show new entries, skip for resumed sessions)
|
|
436
452
|
this.changelogMarkdown = this.getChangelogForDisplay();
|
|
437
|
-
// Add header container as first child
|
|
453
|
+
// Add header container as first child. Populate it after detectThemeIfUnset.
|
|
438
454
|
this.ui.addChild(this.headerContainer);
|
|
439
|
-
// Add the quiet startup identity (unless silenced). Resource details are
|
|
440
|
-
// disclosed separately in the chat canvas via the tools/resources toggle.
|
|
441
|
-
if (this.options.verbose || !this.settingsManager.getQuietStartup()) {
|
|
442
|
-
this.builtInHeader = new ExpandableText(() => this.getStartupIdentityText(), () => this.getStartupIdentityText(), this.getStartupExpansionState(), 1, 0);
|
|
443
|
-
// Setup UI layout
|
|
444
|
-
this.headerContainer.addChild(new Spacer(1));
|
|
445
|
-
this.headerContainer.addChild(this.builtInHeader);
|
|
446
|
-
this.headerContainer.addChild(new Spacer(1));
|
|
447
|
-
}
|
|
448
|
-
else {
|
|
449
|
-
// Minimal header when silenced
|
|
450
|
-
this.builtInHeader = new Text("", 0, 0);
|
|
451
|
-
this.headerContainer.addChild(this.builtInHeader);
|
|
452
|
-
}
|
|
453
455
|
this.ui.addChild(this.chatContainer);
|
|
454
456
|
this.ui.addChild(this.pendingMessagesContainer);
|
|
455
457
|
this.ui.addChild(this.statusContainer);
|
|
@@ -476,6 +478,21 @@ export class InteractiveMode {
|
|
|
476
478
|
this.ui.start();
|
|
477
479
|
recordTimeSinceReset("time-to-first-frame");
|
|
478
480
|
this.isInitialized = true;
|
|
481
|
+
await this.detectThemeIfUnset();
|
|
482
|
+
// Add the quiet startup identity (unless silenced). Resource details are
|
|
483
|
+
// disclosed separately in the chat canvas via the tools/resources toggle.
|
|
484
|
+
if (this.options.verbose || !this.settingsManager.getQuietStartup()) {
|
|
485
|
+
this.builtInHeader = new ExpandableText(() => this.getStartupIdentityText(), () => this.getStartupIdentityText(), this.getStartupExpansionState(), 1, 0);
|
|
486
|
+
this.headerContainer.addChild(new Spacer(1));
|
|
487
|
+
this.headerContainer.addChild(this.builtInHeader);
|
|
488
|
+
this.headerContainer.addChild(new Spacer(1));
|
|
489
|
+
}
|
|
490
|
+
else {
|
|
491
|
+
// Minimal header when silenced
|
|
492
|
+
this.builtInHeader = new Text("", 0, 0);
|
|
493
|
+
this.headerContainer.addChild(this.builtInHeader);
|
|
494
|
+
}
|
|
495
|
+
this.ui.requestRender();
|
|
479
496
|
void Promise.all([ensureTool("fd"), ensureTool("rg")])
|
|
480
497
|
.then(([fdPath]) => {
|
|
481
498
|
this.fdPath = fdPath;
|
|
@@ -3096,7 +3113,9 @@ export class InteractiveMode {
|
|
|
3096
3113
|
if (this.isShuttingDown)
|
|
3097
3114
|
return;
|
|
3098
3115
|
this.isShuttingDown = true;
|
|
3099
|
-
|
|
3116
|
+
// Keep signal handlers registered until terminal cleanup has completed.
|
|
3117
|
+
// `signal-exit` checks the listener list during the same SIGTERM/SIGHUP
|
|
3118
|
+
// dispatch and re-sends the signal if only its own listeners remain.
|
|
3100
3119
|
if (options?.fromSignal) {
|
|
3101
3120
|
await this.runtimeHost.dispose();
|
|
3102
3121
|
// Drain any in-flight Kitty key release events before stopping.
|
|
@@ -5163,7 +5182,6 @@ export class InteractiveMode {
|
|
|
5163
5182
|
}
|
|
5164
5183
|
}
|
|
5165
5184
|
stop() {
|
|
5166
|
-
this.unregisterSignalHandlers();
|
|
5167
5185
|
if (this.settingsManager.getShowTerminalProgress()) {
|
|
5168
5186
|
this.ui.terminal.setProgress(false);
|
|
5169
5187
|
}
|
|
@@ -5181,6 +5199,7 @@ export class InteractiveMode {
|
|
|
5181
5199
|
this.ui.stop();
|
|
5182
5200
|
this.isInitialized = false;
|
|
5183
5201
|
}
|
|
5202
|
+
this.unregisterSignalHandlers();
|
|
5184
5203
|
}
|
|
5185
5204
|
}
|
|
5186
5205
|
//# sourceMappingURL=interactive-mode.js.map
|