@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
|
@@ -6,7 +6,15 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import type { ExtensionAPI } from "@bastani/atomic";
|
|
9
|
-
import {
|
|
9
|
+
import {
|
|
10
|
+
Editor,
|
|
11
|
+
type EditorTheme,
|
|
12
|
+
Key,
|
|
13
|
+
matchesKey,
|
|
14
|
+
Text,
|
|
15
|
+
visibleWidth,
|
|
16
|
+
wrapTextWithAnsi,
|
|
17
|
+
} from "@earendil-works/pi-tui";
|
|
10
18
|
import { Type } from "typebox";
|
|
11
19
|
|
|
12
20
|
// Types
|
|
@@ -259,13 +267,28 @@ export default function questionnaire(pi: ExtensionAPI) {
|
|
|
259
267
|
if (cachedLines) return cachedLines;
|
|
260
268
|
|
|
261
269
|
const lines: string[] = [];
|
|
270
|
+
const renderWidth = Math.max(1, width);
|
|
262
271
|
const q = currentQuestion();
|
|
263
272
|
const opts = currentOptions();
|
|
264
273
|
|
|
265
|
-
|
|
266
|
-
|
|
274
|
+
function addWrapped(text: string) {
|
|
275
|
+
lines.push(...wrapTextWithAnsi(text, renderWidth));
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
function addWrappedWithPrefix(prefix: string, text: string) {
|
|
279
|
+
const prefixWidth = visibleWidth(prefix);
|
|
280
|
+
if (prefixWidth >= renderWidth) {
|
|
281
|
+
addWrapped(prefix + text);
|
|
282
|
+
return;
|
|
283
|
+
}
|
|
284
|
+
const wrapped = wrapTextWithAnsi(text, renderWidth - prefixWidth);
|
|
285
|
+
const continuationPrefix = " ".repeat(prefixWidth);
|
|
286
|
+
for (let i = 0; i < wrapped.length; i++) {
|
|
287
|
+
lines.push(`${i === 0 ? prefix : continuationPrefix}${wrapped[i]}`);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
267
290
|
|
|
268
|
-
|
|
291
|
+
lines.push(theme.fg("accent", "─".repeat(renderWidth)));
|
|
269
292
|
|
|
270
293
|
// Tab bar (multi-question only)
|
|
271
294
|
if (isMulti) {
|
|
@@ -287,7 +310,7 @@ export default function questionnaire(pi: ExtensionAPI) {
|
|
|
287
310
|
? theme.bg("selectedBg", theme.fg("text", submitText))
|
|
288
311
|
: theme.fg(canSubmit ? "success" : "dim", submitText);
|
|
289
312
|
tabs.push(`${submitStyled} →`);
|
|
290
|
-
|
|
313
|
+
addWrappedWithPrefix(" ", tabs.join(""));
|
|
291
314
|
lines.push("");
|
|
292
315
|
}
|
|
293
316
|
|
|
@@ -298,54 +321,52 @@ export default function questionnaire(pi: ExtensionAPI) {
|
|
|
298
321
|
const selected = i === optionIndex;
|
|
299
322
|
const isOther = opt.isOther === true;
|
|
300
323
|
const prefix = selected ? theme.fg("accent", "> ") : " ";
|
|
301
|
-
const
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
} else {
|
|
306
|
-
add(prefix + theme.fg(color, `${i + 1}. ${opt.label}`));
|
|
307
|
-
}
|
|
324
|
+
const label = `${i + 1}. ${opt.label}${isOther && inputMode ? " ✎" : ""}`;
|
|
325
|
+
const color = selected || (isOther && inputMode) ? "accent" : "text";
|
|
326
|
+
|
|
327
|
+
addWrappedWithPrefix(prefix, theme.fg(color, label));
|
|
308
328
|
if (opt.description) {
|
|
309
|
-
|
|
329
|
+
addWrappedWithPrefix(" ", theme.fg("muted", opt.description));
|
|
310
330
|
}
|
|
311
331
|
}
|
|
312
332
|
}
|
|
313
333
|
|
|
314
334
|
// Content
|
|
315
335
|
if (inputMode && q) {
|
|
316
|
-
|
|
336
|
+
addWrappedWithPrefix(" ", theme.fg("text", q.prompt));
|
|
317
337
|
lines.push("");
|
|
318
338
|
// Show options for reference
|
|
319
339
|
renderOptions();
|
|
320
340
|
lines.push("");
|
|
321
|
-
|
|
322
|
-
for (const line of editor.render(
|
|
323
|
-
|
|
341
|
+
addWrappedWithPrefix(" ", theme.fg("muted", "Your answer:"));
|
|
342
|
+
for (const line of editor.render(Math.max(1, renderWidth - 2))) {
|
|
343
|
+
lines.push(` ${line}`);
|
|
324
344
|
}
|
|
325
345
|
lines.push("");
|
|
326
|
-
|
|
346
|
+
addWrappedWithPrefix(" ", theme.fg("dim", "Enter to submit • Esc to cancel"));
|
|
327
347
|
} else if (currentTab === questions.length) {
|
|
328
|
-
|
|
348
|
+
addWrappedWithPrefix(" ", theme.fg("accent", theme.bold("Ready to submit")));
|
|
329
349
|
lines.push("");
|
|
330
350
|
for (const question of questions) {
|
|
331
351
|
const answer = answers.get(question.id);
|
|
332
352
|
if (answer) {
|
|
333
353
|
const prefix = answer.wasCustom ? "(wrote) " : "";
|
|
334
|
-
|
|
354
|
+
const summary = `${theme.fg("muted", `${question.label}: `)}${theme.fg("text", prefix + answer.label)}`;
|
|
355
|
+
addWrappedWithPrefix(" ", summary);
|
|
335
356
|
}
|
|
336
357
|
}
|
|
337
358
|
lines.push("");
|
|
338
359
|
if (allAnswered()) {
|
|
339
|
-
|
|
360
|
+
addWrappedWithPrefix(" ", theme.fg("success", "Press Enter to submit"));
|
|
340
361
|
} else {
|
|
341
362
|
const missing = questions
|
|
342
363
|
.filter((q) => !answers.has(q.id))
|
|
343
364
|
.map((q) => q.label)
|
|
344
365
|
.join(", ");
|
|
345
|
-
|
|
366
|
+
addWrappedWithPrefix(" ", theme.fg("warning", `Unanswered: ${missing}`));
|
|
346
367
|
}
|
|
347
368
|
} else if (q) {
|
|
348
|
-
|
|
369
|
+
addWrappedWithPrefix(" ", theme.fg("text", q.prompt));
|
|
349
370
|
lines.push("");
|
|
350
371
|
renderOptions();
|
|
351
372
|
}
|
|
@@ -353,11 +374,11 @@ export default function questionnaire(pi: ExtensionAPI) {
|
|
|
353
374
|
lines.push("");
|
|
354
375
|
if (!inputMode) {
|
|
355
376
|
const help = isMulti
|
|
356
|
-
? "
|
|
357
|
-
: "
|
|
358
|
-
|
|
377
|
+
? "Tab/←→ navigate • ↑↓ select • Enter confirm • Esc cancel"
|
|
378
|
+
: "↑↓ navigate • Enter select • Esc cancel";
|
|
379
|
+
addWrappedWithPrefix(" ", theme.fg("dim", help));
|
|
359
380
|
}
|
|
360
|
-
|
|
381
|
+
lines.push(theme.fg("accent", "─".repeat(renderWidth)));
|
|
361
382
|
|
|
362
383
|
cachedLines = lines;
|
|
363
384
|
return lines;
|
|
@@ -400,7 +421,7 @@ export default function questionnaire(pi: ExtensionAPI) {
|
|
|
400
421
|
let text = theme.fg("toolTitle", theme.bold("questionnaire "));
|
|
401
422
|
text += theme.fg("muted", `${count} question${count !== 1 ? "s" : ""}`);
|
|
402
423
|
if (labels) {
|
|
403
|
-
text += theme.fg("dim", ` (${
|
|
424
|
+
text += theme.fg("dim", ` (${labels})`);
|
|
404
425
|
}
|
|
405
426
|
return new Text(text, 0, 0);
|
|
406
427
|
},
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "atomic-extension-sandbox",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.4",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "atomic-extension-sandbox",
|
|
9
|
-
"version": "1.9.
|
|
9
|
+
"version": "1.9.4",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sandbox-runtime": "^0.0.26"
|
|
12
12
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "atomic-extension-with-deps",
|
|
3
|
-
"version": "0.79.
|
|
3
|
+
"version": "0.79.4",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "atomic-extension-with-deps",
|
|
9
|
-
"version": "0.79.
|
|
9
|
+
"version": "0.79.4",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"ms": "^2.1.3"
|
|
12
12
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/atomic",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.30-alpha.2",
|
|
4
4
|
"description": "Atomic coding agent CLI with read, bash, edit, write tools and session management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"atomicConfig": {
|
|
@@ -68,11 +68,11 @@
|
|
|
68
68
|
"prepublishOnly": "bun run clean && bun run build"
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@bastani/atomic-natives": "0.8.
|
|
71
|
+
"@bastani/atomic-natives": "0.8.30-alpha.2",
|
|
72
72
|
"@bufbuild/protobuf": "^2.0.0",
|
|
73
|
-
"@earendil-works/pi-agent-core": "^0.79.
|
|
74
|
-
"@earendil-works/pi-ai": "^0.79.
|
|
75
|
-
"@earendil-works/pi-tui": "^0.79.
|
|
73
|
+
"@earendil-works/pi-agent-core": "^0.79.4",
|
|
74
|
+
"@earendil-works/pi-ai": "^0.79.4",
|
|
75
|
+
"@earendil-works/pi-tui": "^0.79.4",
|
|
76
76
|
"@modelcontextprotocol/ext-apps": "^1.7.2",
|
|
77
77
|
"@modelcontextprotocol/sdk": "^1.25.1",
|
|
78
78
|
"@mozilla/readability": "^0.6.0",
|
|
@@ -90,6 +90,7 @@
|
|
|
90
90
|
"open": "^11.0.0",
|
|
91
91
|
"p-limit": "^7.3.0",
|
|
92
92
|
"proper-lockfile": "^4.1.2",
|
|
93
|
+
"semver": "^7.8.0",
|
|
93
94
|
"turndown": "^7.2.0",
|
|
94
95
|
"typebox": "^1.1.24",
|
|
95
96
|
"undici": "^8.3.0",
|
|
@@ -113,6 +114,7 @@
|
|
|
113
114
|
"@types/ms": "^2.1.0",
|
|
114
115
|
"@types/node": "^25.9.3",
|
|
115
116
|
"@types/proper-lockfile": "^4.1.4",
|
|
117
|
+
"@types/semver": "^7.7.1",
|
|
116
118
|
"@typescript/native-preview": "7.0.0-dev.20260511.1",
|
|
117
119
|
"shx": "^0.4.0",
|
|
118
120
|
"typescript": "^5.7.3",
|