@bastani/atomic 0.8.17 → 0.8.18
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 +16 -0
- package/dist/builtin/intercom/CHANGELOG.md +5 -0
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/mcp/CHANGELOG.md +5 -0
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/CHANGELOG.md +5 -0
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/web-access/CHANGELOG.md +5 -0
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/builtin/workflows/CHANGELOG.md +25 -0
- package/dist/builtin/workflows/README.md +62 -3
- package/dist/builtin/workflows/builtin/deep-research-codebase.ts +555 -537
- package/dist/builtin/workflows/builtin/goal.ts +5 -0
- package/dist/builtin/workflows/builtin/open-claude-design.ts +3 -3
- package/dist/builtin/workflows/builtin/ralph.ts +737 -713
- package/dist/builtin/workflows/builtin/shared-prompts.ts +11 -0
- package/dist/builtin/workflows/package.json +1 -1
- package/dist/builtin/workflows/src/extension/discovery.ts +61 -22
- package/dist/builtin/workflows/src/extension/index.ts +2 -0
- package/dist/builtin/workflows/src/extension/runtime.ts +4 -0
- package/dist/builtin/workflows/src/extension/workflow-schema.ts +4 -0
- package/dist/builtin/workflows/src/runs/foreground/executor.ts +96 -6
- package/dist/builtin/workflows/src/runs/foreground/stage-runner.ts +2 -0
- package/dist/builtin/workflows/src/runs/shared/workflow-runner.ts +7 -0
- package/dist/builtin/workflows/src/runs/shared/worktree.ts +214 -1
- package/dist/builtin/workflows/src/sdk-surface.ts +2 -0
- package/dist/builtin/workflows/src/shared/types.ts +32 -3
- package/dist/builtin/workflows/src/workflows/define-workflow.ts +18 -1
- package/dist/core/agent-session-services.d.ts +2 -1
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +1 -0
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +3 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +16 -5
- 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 +40 -28
- package/dist/core/atomic-guide-command.js.map +1 -1
- package/dist/core/sdk.d.ts +9 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +2 -2
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/system-prompt.d.ts +2 -0
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +22 -13
- package/dist/core/system-prompt.js.map +1 -1
- package/docs/quickstart.md +13 -5
- package/docs/sdk.md +20 -5
- package/docs/workflows.md +44 -17
- package/examples/sdk/05-tools.ts +22 -1
- package/examples/sdk/README.md +7 -3
- package/package.json +1 -1
|
@@ -12,6 +12,7 @@ import { tmpdir } from "node:os";
|
|
|
12
12
|
import { join } from "node:path";
|
|
13
13
|
import { defineWorkflow } from "../src/index.js";
|
|
14
14
|
import type { WorkflowTaskResult } from "../src/shared/types.js";
|
|
15
|
+
import { WORKER_PREFLIGHT_CONTRACT } from "./shared-prompts.js";
|
|
15
16
|
|
|
16
17
|
const DEFAULT_MAX_TURNS = 10;
|
|
17
18
|
// Goal Runner runs three independent reviewer personas; two approvals form a majority.
|
|
@@ -1038,6 +1039,10 @@ export default defineWorkflow("goal")
|
|
|
1038
1039
|
prompt: [
|
|
1039
1040
|
goalContext,
|
|
1040
1041
|
"",
|
|
1042
|
+
"<project_initialization_preflight>",
|
|
1043
|
+
WORKER_PREFLIGHT_CONTRACT,
|
|
1044
|
+
"</project_initialization_preflight>",
|
|
1045
|
+
"",
|
|
1041
1046
|
"<worker_turn_contract>",
|
|
1042
1047
|
WORKER_RECEIPT_CONTRACT,
|
|
1043
1048
|
"</worker_turn_contract>",
|
|
@@ -114,7 +114,7 @@ function joinResults(results: readonly WorkflowTaskResult[]): string {
|
|
|
114
114
|
* stay next to the project and are discoverable by pi. Falls back to the OS
|
|
115
115
|
* tmpdir when the project tree is not writable (CI sandboxes, mocks, etc.).
|
|
116
116
|
*/
|
|
117
|
-
function prepareArtifactDir(): {
|
|
117
|
+
function prepareArtifactDir(cwd = process.cwd()): {
|
|
118
118
|
readonly runId: string;
|
|
119
119
|
readonly artifactDir: string;
|
|
120
120
|
readonly previewPath: string;
|
|
@@ -122,7 +122,7 @@ function prepareArtifactDir(): {
|
|
|
122
122
|
} {
|
|
123
123
|
const runId = `${new Date().toISOString().replace(/[:.]/g, "-")}-${Math.random().toString(36).slice(2, 8)}`;
|
|
124
124
|
const candidates = [
|
|
125
|
-
join(
|
|
125
|
+
join(cwd, "specs", "design", runId),
|
|
126
126
|
join(tmpdir(), "open-claude-design", runId),
|
|
127
127
|
];
|
|
128
128
|
for (const candidate of candidates) {
|
|
@@ -222,7 +222,7 @@ export default defineWorkflow("open-claude-design")
|
|
|
222
222
|
DEFAULT_MAX_REFINEMENTS,
|
|
223
223
|
);
|
|
224
224
|
|
|
225
|
-
const { runId, artifactDir, previewPath, specPath } = prepareArtifactDir();
|
|
225
|
+
const { runId, artifactDir, previewPath, specPath } = prepareArtifactDir(ctx.cwd);
|
|
226
226
|
const previewFileUrl = `file://${previewPath}`;
|
|
227
227
|
const specFileUrl = `file://${specPath}`;
|
|
228
228
|
|