@bastani/atomic 0.8.29-alpha.4 → 0.8.30-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.
Files changed (144) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/builtin/cursor/CHANGELOG.md +6 -0
  3. package/dist/builtin/cursor/package.json +2 -2
  4. package/dist/builtin/intercom/CHANGELOG.md +7 -1
  5. package/dist/builtin/intercom/package.json +2 -2
  6. package/dist/builtin/mcp/CHANGELOG.md +7 -1
  7. package/dist/builtin/mcp/package.json +3 -3
  8. package/dist/builtin/subagents/CHANGELOG.md +11 -0
  9. package/dist/builtin/subagents/README.md +10 -30
  10. package/dist/builtin/subagents/package.json +4 -4
  11. package/dist/builtin/subagents/skills/subagent/SKILL.md +5 -11
  12. package/dist/builtin/subagents/src/agents/agent-management.ts +0 -5
  13. package/dist/builtin/subagents/src/agents/agent-serializer.ts +7 -3
  14. package/dist/builtin/subagents/src/agents/agents.ts +4 -29
  15. package/dist/builtin/subagents/src/agents/chain-serializer.ts +27 -25
  16. package/dist/builtin/subagents/src/extension/schemas.ts +0 -75
  17. package/dist/builtin/subagents/src/runs/background/async-execution.ts +0 -29
  18. package/dist/builtin/subagents/src/runs/background/run-status.ts +1 -2
  19. package/dist/builtin/subagents/src/runs/background/subagent-runner.ts +134 -239
  20. package/dist/builtin/subagents/src/runs/foreground/chain-execution.ts +1 -52
  21. package/dist/builtin/subagents/src/runs/foreground/execution.ts +103 -94
  22. package/dist/builtin/subagents/src/runs/foreground/subagent-executor.ts +0 -10
  23. package/dist/builtin/subagents/src/runs/shared/dynamic-fanout.ts +16 -8
  24. package/dist/builtin/subagents/src/runs/shared/model-fallback.ts +0 -1
  25. package/dist/builtin/subagents/src/runs/shared/parallel-utils.ts +0 -3
  26. package/dist/builtin/subagents/src/runs/shared/structured-output.ts +67 -2
  27. package/dist/builtin/subagents/src/runs/shared/subagent-control.ts +6 -20
  28. package/dist/builtin/subagents/src/runs/shared/subagent-prompt-runtime.ts +1 -1
  29. package/dist/builtin/subagents/src/runs/shared/workflow-graph.ts +2 -6
  30. package/dist/builtin/subagents/src/shared/settings.ts +1 -4
  31. package/dist/builtin/subagents/src/shared/types.ts +1 -156
  32. package/dist/builtin/subagents/src/tui/render.ts +0 -1
  33. package/dist/builtin/web-access/CHANGELOG.md +7 -1
  34. package/dist/builtin/web-access/package.json +2 -2
  35. package/dist/builtin/workflows/CHANGELOG.md +13 -0
  36. package/dist/builtin/workflows/README.md +2 -2
  37. package/dist/builtin/workflows/package.json +2 -2
  38. package/dist/builtin/workflows/src/extension/index.ts +8 -1
  39. package/dist/builtin/workflows/src/extension/wiring.ts +66 -10
  40. package/dist/builtin/workflows/src/runs/foreground/executor.ts +70 -19
  41. package/dist/builtin/workflows/src/runs/foreground/stage-runner.ts +98 -14
  42. package/dist/builtin/workflows/src/runs/shared/model-fallback.ts +0 -1
  43. package/dist/builtin/workflows/src/shared/persistence-restore.ts +4 -0
  44. package/dist/builtin/workflows/src/shared/persistence-session-entries.ts +4 -0
  45. package/dist/builtin/workflows/src/shared/store.ts +2 -0
  46. package/dist/config.d.ts.map +1 -1
  47. package/dist/config.js +18 -4
  48. package/dist/config.js.map +1 -1
  49. package/dist/core/agent-session.d.ts +2 -2
  50. package/dist/core/agent-session.d.ts.map +1 -1
  51. package/dist/core/agent-session.js +21 -9
  52. package/dist/core/agent-session.js.map +1 -1
  53. package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
  54. package/dist/core/compaction/branch-summarization.js +2 -2
  55. package/dist/core/compaction/branch-summarization.js.map +1 -1
  56. package/dist/core/compaction/compaction.d.ts +6 -0
  57. package/dist/core/compaction/compaction.d.ts.map +1 -1
  58. package/dist/core/compaction/compaction.js +2 -0
  59. package/dist/core/compaction/compaction.js.map +1 -1
  60. package/dist/core/compaction/context-compaction.d.ts +43 -16
  61. package/dist/core/compaction/context-compaction.d.ts.map +1 -1
  62. package/dist/core/compaction/context-compaction.js +518 -189
  63. package/dist/core/compaction/context-compaction.js.map +1 -1
  64. package/dist/core/extensions/loader.d.ts +4 -2
  65. package/dist/core/extensions/loader.d.ts.map +1 -1
  66. package/dist/core/extensions/loader.js +11 -7
  67. package/dist/core/extensions/loader.js.map +1 -1
  68. package/dist/core/extensions/types.d.ts +14 -3
  69. package/dist/core/extensions/types.d.ts.map +1 -1
  70. package/dist/core/extensions/types.js.map +1 -1
  71. package/dist/core/model-registry.d.ts.map +1 -1
  72. package/dist/core/model-registry.js +2 -1
  73. package/dist/core/model-registry.js.map +1 -1
  74. package/dist/core/package-manager.d.ts +1 -1
  75. package/dist/core/package-manager.d.ts.map +1 -1
  76. package/dist/core/package-manager.js +52 -18
  77. package/dist/core/package-manager.js.map +1 -1
  78. package/dist/core/resource-loader.d.ts +20 -0
  79. package/dist/core/resource-loader.d.ts.map +1 -1
  80. package/dist/core/resource-loader.js +89 -24
  81. package/dist/core/resource-loader.js.map +1 -1
  82. package/dist/core/session-manager.d.ts +14 -1
  83. package/dist/core/session-manager.d.ts.map +1 -1
  84. package/dist/core/session-manager.js +145 -3
  85. package/dist/core/session-manager.js.map +1 -1
  86. package/dist/core/settings-manager.d.ts +9 -0
  87. package/dist/core/settings-manager.d.ts.map +1 -1
  88. package/dist/core/settings-manager.js +16 -0
  89. package/dist/core/settings-manager.js.map +1 -1
  90. package/dist/core/thinking-blocks.d.ts +7 -0
  91. package/dist/core/thinking-blocks.d.ts.map +1 -0
  92. package/dist/core/thinking-blocks.js +16 -0
  93. package/dist/core/thinking-blocks.js.map +1 -0
  94. package/dist/core/tools/bash.d.ts.map +1 -1
  95. package/dist/core/tools/bash.js +4 -0
  96. package/dist/core/tools/bash.js.map +1 -1
  97. package/dist/index.d.ts +2 -2
  98. package/dist/index.d.ts.map +1 -1
  99. package/dist/index.js +1 -1
  100. package/dist/index.js.map +1 -1
  101. package/dist/main.d.ts.map +1 -1
  102. package/dist/main.js +30 -0
  103. package/dist/main.js.map +1 -1
  104. package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
  105. package/dist/modes/interactive/components/tree-selector.js +87 -12
  106. package/dist/modes/interactive/components/tree-selector.js.map +1 -1
  107. package/dist/modes/interactive/interactive-mode.d.ts +1 -0
  108. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  109. package/dist/modes/interactive/interactive-mode.js +37 -18
  110. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  111. package/dist/modes/interactive/theme/theme.d.ts +24 -1
  112. package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  113. package/dist/modes/interactive/theme/theme.js +58 -13
  114. package/dist/modes/interactive/theme/theme.js.map +1 -1
  115. package/dist/utils/child-process.d.ts +9 -4
  116. package/dist/utils/child-process.d.ts.map +1 -1
  117. package/dist/utils/child-process.js +42 -10
  118. package/dist/utils/child-process.js.map +1 -1
  119. package/dist/utils/version-check.d.ts.map +1 -1
  120. package/dist/utils/version-check.js +4 -27
  121. package/dist/utils/version-check.js.map +1 -1
  122. package/docs/compaction.md +469 -51
  123. package/docs/containerization.md +37 -37
  124. package/docs/extensions.md +23 -14
  125. package/docs/models.md +6 -4
  126. package/docs/packages.md +2 -0
  127. package/docs/providers.md +1 -1
  128. package/docs/subagents.md +11 -4
  129. package/docs/workflows.md +4 -2
  130. package/examples/extensions/README.md +2 -2
  131. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  132. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  133. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  134. package/examples/extensions/gondolin/package-lock.json +2 -2
  135. package/examples/extensions/gondolin/package.json +1 -1
  136. package/examples/extensions/question.ts +39 -18
  137. package/examples/extensions/questionnaire.ts +49 -28
  138. package/examples/extensions/sandbox/package-lock.json +2 -2
  139. package/examples/extensions/sandbox/package.json +1 -1
  140. package/examples/extensions/with-deps/package-lock.json +2 -2
  141. package/examples/extensions/with-deps/package.json +1 -1
  142. package/package.json +7 -5
  143. package/dist/builtin/subagents/src/runs/shared/acceptance.ts +0 -612
  144. package/dist/builtin/subagents/src/runs/shared/completion-guard.ts +0 -147
@@ -41,76 +41,6 @@ const JsonSchemaObject = Type.Unsafe({
41
41
  description: "Plain JSON Schema object for structured output.",
42
42
  });
43
43
 
44
- const AcceptanceEvidenceKind = Type.String({
45
- enum: [
46
- "changed-files",
47
- "tests-added",
48
- "commands-run",
49
- "validation-output",
50
- "residual-risks",
51
- "no-staged-files",
52
- "diff-summary",
53
- "review-findings",
54
- "manual-notes",
55
- ],
56
- });
57
-
58
- const AcceptanceGateSchema = Type.Object({
59
- id: Type.String(),
60
- must: Type.String(),
61
- evidence: Type.Optional(Type.Array(AcceptanceEvidenceKind)),
62
- severity: Type.Optional(Type.String({ enum: ["required", "recommended"] })),
63
- }, { additionalProperties: false });
64
-
65
- const AcceptanceVerifyCommandSchema = Type.Object({
66
- id: Type.String(),
67
- command: Type.String(),
68
- timeoutMs: Type.Optional(Type.Integer({ minimum: 1 })),
69
- cwd: Type.Optional(Type.String()),
70
- env: Type.Optional(Type.Unsafe({ type: "object", additionalProperties: { type: "string" } })),
71
- allowFailure: Type.Optional(Type.Boolean()),
72
- }, { additionalProperties: false });
73
-
74
- const AcceptanceReviewGateSchema = Type.Object({
75
- agent: Type.Optional(Type.String()),
76
- focus: Type.Optional(Type.String()),
77
- required: Type.Optional(Type.Boolean()),
78
- }, { additionalProperties: false });
79
-
80
- const AcceptanceOverride = Type.Unsafe({
81
- anyOf: [
82
- { type: "string", enum: ["auto", "none", "attested", "checked", "verified", "reviewed"] },
83
- { const: false },
84
- {
85
- type: "object",
86
- properties: {
87
- level: { type: "string", enum: ["auto", "none", "attested", "checked", "verified", "reviewed"] },
88
- criteria: {
89
- type: "array",
90
- items: {
91
- anyOf: [
92
- { type: "string" },
93
- AcceptanceGateSchema,
94
- ],
95
- },
96
- },
97
- evidence: { type: "array", items: AcceptanceEvidenceKind },
98
- verify: { type: "array", items: AcceptanceVerifyCommandSchema },
99
- review: {
100
- anyOf: [
101
- { const: false },
102
- AcceptanceReviewGateSchema,
103
- ],
104
- },
105
- stopRules: { type: "array", items: { type: "string" } },
106
- reason: { type: "string" },
107
- },
108
- additionalProperties: false,
109
- },
110
- ],
111
- description: "Optional acceptance policy. Omitted means auto-inferred; verified requires configured runtime commands.",
112
- });
113
-
114
44
  const TaskItem = Type.Object({
115
45
  agent: Type.String(),
116
46
  task: Type.String(),
@@ -122,7 +52,6 @@ const TaskItem = Type.Object({
122
52
  progress: Type.Optional(Type.Boolean({ description: "Enable progress.md tracking for this task" })),
123
53
  model: Type.Optional(Type.String({ description: "Override model for this task (e.g. 'google/gemini-3-pro')" })),
124
54
  skill: Type.Optional(SkillOverride),
125
- acceptance: Type.Optional(AcceptanceOverride),
126
55
  });
127
56
 
128
57
  // Parallel task item (within a parallel step)
@@ -141,7 +70,6 @@ const ParallelTaskSchema = Type.Object({
141
70
  progress: Type.Optional(Type.Boolean({ description: "Enable progress.md tracking in {chain_dir}" })),
142
71
  skill: Type.Optional(SkillOverride),
143
72
  model: Type.Optional(Type.String({ description: "Override model for this task" })),
144
- acceptance: Type.Optional(AcceptanceOverride),
145
73
  });
146
74
 
147
75
  const DynamicExpandSchema = Type.Object({
@@ -168,7 +96,6 @@ const DynamicParallelTemplateSchema = Type.Object({
168
96
  progress: Type.Optional(Type.Boolean({ description: "Enable progress.md tracking in {chain_dir}" })),
169
97
  skill: Type.Optional(SkillOverride),
170
98
  model: Type.Optional(Type.String({ description: "Override model for this task" })),
171
- acceptance: Type.Optional(AcceptanceOverride),
172
99
  }, { additionalProperties: false });
173
100
 
174
101
  const DynamicCollectSchema = Type.Object({
@@ -193,7 +120,6 @@ const ChainItem = Type.Object({
193
120
  progress: Type.Optional(Type.Boolean({ description: "Enable progress.md tracking in {chain_dir}" })),
194
121
  skill: Type.Optional(SkillOverride),
195
122
  model: Type.Optional(Type.String({ description: "Override model for this step" })),
196
- acceptance: Type.Optional(AcceptanceOverride),
197
123
  parallel: Type.Optional(Type.Unsafe({
198
124
  anyOf: [
199
125
  Type.Array(ParallelTaskSchema, { minItems: 1, description: "Tasks to run in parallel" }),
@@ -300,5 +226,4 @@ export const SubagentParams = Type.Object({
300
226
  outputMode: Type.Optional(OutputModeOverride),
301
227
  skill: Type.Optional(SkillOverride),
302
228
  model: Type.Optional(Type.String({ description: "Override model for single agent (e.g. 'anthropic/claude-sonnet-4')" })),
303
- acceptance: Type.Optional(AcceptanceOverride),
304
229
  });
@@ -27,9 +27,7 @@ import { resolveExpectedWorktreeAgentCwd } from "../shared/worktree.ts";
27
27
  import { buildWorkflowGraphSnapshot } from "../shared/workflow-graph.ts";
28
28
  import { ChainOutputValidationError, validateChainOutputBindings } from "../shared/chain-outputs.ts";
29
29
  import { createStructuredOutputRuntime } from "../shared/structured-output.ts";
30
- import { resolveEffectiveAcceptance } from "../shared/acceptance.ts";
31
30
  import {
32
- type AcceptanceInput,
33
31
  type ArtifactConfig,
34
32
  type Details,
35
33
  type MaxOutputConfig,
@@ -126,7 +124,6 @@ interface AsyncChainParams {
126
124
  controlIntercomTarget?: string;
127
125
  childIntercomTarget?: (agent: string, index: number) => string | undefined;
128
126
  nestedRoute?: NestedRouteInfo;
129
- acceptance?: AcceptanceInput;
130
127
  }
131
128
 
132
129
  interface AsyncSingleParams {
@@ -154,7 +151,6 @@ interface AsyncSingleParams {
154
151
  controlIntercomTarget?: string;
155
152
  childIntercomTarget?: (agent: string, index: number) => string | undefined;
156
153
  nestedRoute?: NestedRouteInfo;
157
- acceptance?: AcceptanceInput;
158
154
  }
159
155
 
160
156
  interface AsyncExecutionResult {
@@ -379,7 +375,6 @@ export function executeAsyncChain(
379
375
  tools: a.tools,
380
376
  extensions: a.extensions,
381
377
  mcpDirectTools: a.mcpDirectTools,
382
- completionGuard: a.completionGuard,
383
378
  systemPrompt,
384
379
  systemPromptMode: a.systemPromptMode,
385
380
  inheritProjectContext: a.inheritProjectContext,
@@ -390,14 +385,6 @@ export function executeAsyncChain(
390
385
  sessionFile,
391
386
  maxSubagentDepth: resolveChildMaxSubagentDepth(maxSubagentDepth, a.maxSubagentDepth),
392
387
  workflowStageSubagentGuard,
393
- effectiveAcceptance: resolveEffectiveAcceptance({
394
- explicit: s.acceptance,
395
- agentName: s.agent,
396
- task: s.task,
397
- mode: resultMode,
398
- async: true,
399
- dynamic: false,
400
- }),
401
388
  ...(s.outputSchema ? { structuredOutputSchema: s.outputSchema } : {}),
402
389
  ...(s.outputSchema ? { structuredOutput: createStructuredOutputRuntime(s.outputSchema, path.join(asyncDir, "structured-output")) } : {}),
403
390
  };
@@ -456,14 +443,6 @@ export function executeAsyncChain(
456
443
  failFast: s.failFast,
457
444
  phase: s.phase,
458
445
  label: s.label,
459
- effectiveAcceptance: resolveEffectiveAcceptance({
460
- explicit: s.acceptance,
461
- agentName: s.parallel.agent,
462
- task: s.parallel.task,
463
- mode: resultMode,
464
- async: true,
465
- dynamicGroup: true,
466
- }),
467
446
  };
468
447
  }
469
448
  return buildSeqStep(s as SequentialStep, nextSessionFile());
@@ -715,7 +694,6 @@ export function executeAsyncSingle(
715
694
  tools: agentConfig.tools,
716
695
  extensions: agentConfig.extensions,
717
696
  mcpDirectTools: agentConfig.mcpDirectTools,
718
- completionGuard: agentConfig.completionGuard,
719
697
  systemPrompt,
720
698
  systemPromptMode: agentConfig.systemPromptMode,
721
699
  inheritProjectContext: agentConfig.inheritProjectContext,
@@ -726,13 +704,6 @@ export function executeAsyncSingle(
726
704
  sessionFile,
727
705
  maxSubagentDepth: resolveChildMaxSubagentDepth(maxSubagentDepth, agentConfig.maxSubagentDepth),
728
706
  workflowStageSubagentGuard,
729
- effectiveAcceptance: resolveEffectiveAcceptance({
730
- explicit: params.acceptance,
731
- agentName: agent,
732
- task,
733
- mode: "single",
734
- async: true,
735
- }),
736
707
  },
737
708
  ],
738
709
  resultPath: inheritedNestedRoute ? nestedResultsPath(inheritedNestedRoute.rootRunId, id) : path.join(RESULTS_DIR, `${id}.json`),
@@ -216,10 +216,9 @@ export function inspectSubagentStatus(params: RunStatusParams, deps: RunStatusDe
216
216
  const modelThinking = formatModelThinking(step.model, step.thinking, step.fastMode);
217
217
  const modelText = modelThinking ? ` (${modelThinking})` : "";
218
218
  const errorText = step.error ? `, error: ${step.error}` : "";
219
- const acceptanceText = step.acceptance?.status ? `, acceptance: ${step.acceptance.status}` : "";
220
219
  const display = step.label ? `${step.label} (${step.agent})` : step.agent;
221
220
  const phase = step.phase ? `[${step.phase}] ` : "";
222
- lines.push(`${stepLineLabel(status, index)}: ${phase}${display} ${step.status}${modelText}${stepActivityText ? `, ${stepActivityText}` : ""}${acceptanceText}${errorText}`);
221
+ lines.push(`${stepLineLabel(status, index)}: ${phase}${display} ${step.status}${modelText}${stepActivityText ? `, ${stepActivityText}` : ""}${errorText}`);
223
222
  lines.push(...formatNestedRunStatusLines(step.children, { indent: " ", commandHints: true, maxLines: 20 }));
224
223
  const stepOutputPath = path.join(asyncDir, `output-${index}.log`);
225
224
  if (stepOutputPath !== outputPath && fs.existsSync(stepOutputPath)) lines.push(` Output: ${stepOutputPath}`);