@bastani/atomic 0.5.0-3 → 0.5.0-5

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 (42) hide show
  1. package/.atomic/workflows/hello/claude/index.ts +22 -25
  2. package/.atomic/workflows/hello/copilot/index.ts +41 -31
  3. package/.atomic/workflows/hello/opencode/index.ts +40 -40
  4. package/.atomic/workflows/hello-parallel/claude/index.ts +54 -54
  5. package/.atomic/workflows/hello-parallel/copilot/index.ts +89 -70
  6. package/.atomic/workflows/hello-parallel/opencode/index.ts +77 -77
  7. package/.atomic/workflows/ralph/claude/index.ts +128 -93
  8. package/.atomic/workflows/ralph/copilot/index.ts +212 -112
  9. package/.atomic/workflows/ralph/helpers/prompts.ts +45 -2
  10. package/.atomic/workflows/ralph/opencode/index.ts +174 -111
  11. package/README.md +138 -59
  12. package/package.json +1 -1
  13. package/src/cli.ts +0 -2
  14. package/src/commands/cli/chat/index.ts +28 -8
  15. package/src/commands/cli/init/index.ts +7 -10
  16. package/src/commands/cli/init/scm.ts +27 -10
  17. package/src/sdk/components/connectors.test.ts +45 -0
  18. package/src/sdk/components/layout.test.ts +321 -0
  19. package/src/sdk/components/layout.ts +51 -15
  20. package/src/sdk/components/orchestrator-panel-contexts.ts +13 -4
  21. package/src/sdk/components/orchestrator-panel-store.test.ts +156 -0
  22. package/src/sdk/components/orchestrator-panel-store.ts +24 -0
  23. package/src/sdk/components/orchestrator-panel.tsx +21 -0
  24. package/src/sdk/components/session-graph-panel.tsx +8 -15
  25. package/src/sdk/components/statusline.tsx +4 -6
  26. package/src/sdk/define-workflow.test.ts +71 -0
  27. package/src/sdk/define-workflow.ts +42 -39
  28. package/src/sdk/errors.ts +1 -1
  29. package/src/sdk/index.ts +4 -1
  30. package/src/sdk/providers/claude.ts +1 -1
  31. package/src/sdk/providers/copilot.ts +5 -3
  32. package/src/sdk/providers/opencode.ts +5 -3
  33. package/src/sdk/runtime/executor.ts +512 -301
  34. package/src/sdk/runtime/loader.ts +2 -2
  35. package/src/sdk/runtime/tmux.ts +31 -2
  36. package/src/sdk/types.ts +93 -20
  37. package/src/sdk/workflows.ts +7 -4
  38. package/src/services/config/definitions.ts +39 -2
  39. package/src/services/config/settings.ts +0 -6
  40. package/src/services/system/skills.ts +3 -7
  41. package/.atomic/workflows/package-lock.json +0 -31
  42. package/.atomic/workflows/package.json +0 -8
package/src/sdk/index.ts CHANGED
@@ -19,7 +19,10 @@ export type {
19
19
  SavedMessage,
20
20
  SaveTranscript,
21
21
  SessionContext,
22
- SessionOptions,
22
+ SessionRef,
23
+ SessionHandle,
24
+ SessionRunOptions,
25
+ WorkflowContext,
23
26
  WorkflowOptions,
24
27
  WorkflowDefinition,
25
28
  } from "./types.ts";
@@ -307,7 +307,7 @@ export function validateClaudeWorkflow(source: string): ClaudeValidationWarning[
307
307
  rule: "claude/create-session",
308
308
  message:
309
309
  "Could not verify that createClaudeSession is called before claudeQuery(). " +
310
- "Call createClaudeSession({ paneId: ctx.paneId }) to start the Claude CLI before sending queries.",
310
+ "Call createClaudeSession({ paneId: s.paneId }) to start the Claude CLI before sending queries.",
311
311
  });
312
312
  }
313
313
  }
@@ -2,7 +2,7 @@
2
2
  * Copilot workflow source validation.
3
3
  *
4
4
  * Checks that Copilot workflow source files follow required patterns:
5
- * - `cliUrl` is wired to `ctx.serverUrl` (or destructured `serverUrl`)
5
+ * - `cliUrl` is wired to the session context's `serverUrl`
6
6
  * - `setForegroundSessionId` is called after creating a session
7
7
  */
8
8
 
@@ -18,11 +18,13 @@ export function validateCopilotWorkflow(source: string): CopilotValidationWarnin
18
18
  const warnings: CopilotValidationWarning[] = [];
19
19
 
20
20
  if (/\bCopilotClient\b/.test(source)) {
21
- if (!/cliUrl\s*:\s*(?:ctx\.serverUrl|serverUrl)/.test(source)) {
21
+ // Accept any identifier before .serverUrl (e.g., s.serverUrl, ctx.serverUrl)
22
+ // or a destructured `serverUrl` variable
23
+ if (!/cliUrl\s*:\s*(?:\w+\.serverUrl|serverUrl)/.test(source)) {
22
24
  warnings.push({
23
25
  rule: "copilot/cli-url",
24
26
  message:
25
- "Could not verify that CopilotClient is created with { cliUrl: ctx.serverUrl }. " +
27
+ "Could not verify that CopilotClient is created with { cliUrl: s.serverUrl }. " +
26
28
  "This is required to connect to the workflow's agent pane.",
27
29
  });
28
30
  }
@@ -2,7 +2,7 @@
2
2
  * OpenCode workflow source validation.
3
3
  *
4
4
  * Checks that OpenCode workflow source files follow required patterns:
5
- * - `baseUrl` is wired to `ctx.serverUrl` (or destructured `serverUrl`)
5
+ * - `baseUrl` is wired to the session context's `serverUrl`
6
6
  * - `tui.selectSession` is called after creating a session
7
7
  */
8
8
 
@@ -18,11 +18,13 @@ export function validateOpenCodeWorkflow(source: string): OpenCodeValidationWarn
18
18
  const warnings: OpenCodeValidationWarning[] = [];
19
19
 
20
20
  if (/\bcreateOpencodeClient\b/.test(source)) {
21
- if (!/baseUrl\s*:\s*(?:ctx\.serverUrl|serverUrl)/.test(source)) {
21
+ // Accept any identifier before .serverUrl (e.g., s.serverUrl, ctx.serverUrl)
22
+ // or a destructured `serverUrl` variable
23
+ if (!/baseUrl\s*:\s*(?:\w+\.serverUrl|serverUrl)/.test(source)) {
22
24
  warnings.push({
23
25
  rule: "opencode/base-url",
24
26
  message:
25
- "Could not verify that createOpencodeClient is called with { baseUrl: ctx.serverUrl }. " +
27
+ "Could not verify that createOpencodeClient is called with { baseUrl: s.serverUrl }. " +
26
28
  "This is required to connect to the workflow's agent pane.",
27
29
  });
28
30
  }