@bastani/atomic 0.5.18-0 → 0.5.19-0

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 (53) hide show
  1. package/.agents/skills/workflow-creator/SKILL.md +110 -1
  2. package/.agents/skills/workflow-creator/references/workflow-inputs.md +10 -0
  3. package/.mcp.json +9 -0
  4. package/.opencode/opencode.json +5 -2
  5. package/README.md +394 -645
  6. package/assets/settings.schema.json +0 -20
  7. package/dist/sdk/components/attached-statusline.d.ts +13 -0
  8. package/dist/sdk/components/attached-statusline.d.ts.map +1 -0
  9. package/dist/sdk/components/header.d.ts.map +1 -1
  10. package/dist/sdk/components/session-graph-panel.d.ts.map +1 -1
  11. package/dist/sdk/components/statusline.d.ts +1 -3
  12. package/dist/sdk/components/statusline.d.ts.map +1 -1
  13. package/dist/sdk/providers/claude.d.ts +16 -5
  14. package/dist/sdk/providers/claude.d.ts.map +1 -1
  15. package/dist/sdk/runtime/executor.d.ts +63 -0
  16. package/dist/sdk/runtime/executor.d.ts.map +1 -1
  17. package/dist/sdk/runtime/tmux.d.ts +0 -9
  18. package/dist/sdk/runtime/tmux.d.ts.map +1 -1
  19. package/dist/services/config/atomic-config.d.ts +1 -7
  20. package/dist/services/config/atomic-config.d.ts.map +1 -1
  21. package/dist/services/config/definitions.d.ts +0 -45
  22. package/dist/services/config/definitions.d.ts.map +1 -1
  23. package/dist/services/config/index.d.ts +1 -1
  24. package/dist/theme/colors.d.ts +33 -0
  25. package/dist/theme/colors.d.ts.map +1 -0
  26. package/package.json +3 -2
  27. package/src/cli.ts +16 -1
  28. package/src/commands/cli/chat/index.ts +1 -1
  29. package/src/commands/cli/footer.tsx +118 -0
  30. package/src/commands/cli/init/index.ts +6 -89
  31. package/src/commands/cli/workflow-command.test.ts +146 -0
  32. package/src/commands/cli/workflow.ts +43 -7
  33. package/src/completions/bash.ts +3 -8
  34. package/src/completions/fish.ts +1 -3
  35. package/src/completions/powershell.ts +1 -17
  36. package/src/completions/zsh.ts +0 -2
  37. package/src/scripts/bundle-configs.ts +0 -12
  38. package/src/sdk/components/attached-statusline.tsx +33 -0
  39. package/src/sdk/components/header.tsx +16 -2
  40. package/src/sdk/components/session-graph-panel.tsx +10 -51
  41. package/src/sdk/components/statusline.tsx +0 -17
  42. package/src/sdk/providers/claude.ts +179 -177
  43. package/src/sdk/runtime/executor-entry.ts +3 -1
  44. package/src/sdk/runtime/executor.test.ts +292 -1
  45. package/src/sdk/runtime/executor.ts +222 -1
  46. package/src/sdk/runtime/tmux.conf +35 -4
  47. package/src/sdk/runtime/tmux.ts +0 -22
  48. package/src/services/config/atomic-config.ts +1 -14
  49. package/src/services/config/definitions.ts +1 -102
  50. package/src/services/config/index.ts +1 -1
  51. package/src/services/config/settings.ts +2 -65
  52. package/src/services/system/skills.ts +2 -19
  53. package/src/commands/cli/init/scm.ts +0 -175
@@ -22,26 +22,6 @@
22
22
  "format": "date-time",
23
23
  "description": "ISO 8601 timestamp of the last configuration update."
24
24
  },
25
- "trustedPaths": {
26
- "type": "array",
27
- "description": "Globally trusted workspaces that have completed provider onboarding through 'atomic init'.",
28
- "items": {
29
- "type": "object",
30
- "required": ["workspacePath", "provider"],
31
- "properties": {
32
- "workspacePath": {
33
- "type": "string",
34
- "description": "Absolute path to the initialized workspace."
35
- },
36
- "provider": {
37
- "type": "string",
38
- "enum": ["claude", "opencode", "copilot"],
39
- "description": "Provider initialized for the trusted workspace."
40
- }
41
- },
42
- "additionalProperties": false
43
- }
44
- },
45
25
  "providers": {
46
26
  "type": "object",
47
27
  "description": "Per-provider overrides for chatFlags and envVars. chatFlags replaces built-in defaults entirely when set; envVars are merged on top of defaults (user values win on conflict). Local .atomic/settings.json takes precedence over global ~/.atomic/settings.json.",
@@ -0,0 +1,13 @@
1
+ /** @jsxImportSource @opentui/react */
2
+ /**
3
+ * Footer rendered inside each agent tmux window. Lives in a 1-row bottom
4
+ * pane created by the executor after the agent window is spawned. Mirrors
5
+ * the orchestrator Statusline style — colored badge on the left, dimmed
6
+ * keyboard hints on the right.
7
+ */
8
+ import type { GraphTheme } from "./graph-theme.ts";
9
+ export declare function AttachedStatusline({ name, theme }: {
10
+ name: string;
11
+ theme: GraphTheme;
12
+ }): import("react").ReactNode;
13
+ //# sourceMappingURL=attached-statusline.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attached-statusline.d.ts","sourceRoot":"","sources":["../../../src/sdk/components/attached-statusline.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,wBAAgB,kBAAkB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,UAAU,CAAA;CAAE,6BAsBtF"}
@@ -1 +1 @@
1
- {"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../src/sdk/components/header.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AAetC,wBAAgB,MAAM,8BA2CrB"}
1
+ {"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../src/sdk/components/header.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AAoBtC,wBAAgB,MAAM,8BAoDrB"}
@@ -1 +1 @@
1
- {"version":3,"file":"session-graph-panel.d.ts","sourceRoot":"","sources":["../../../src/sdk/components/session-graph-panel.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC;;;GAGG;AAoDH,wBAAgB,iBAAiB,8BAgchC"}
1
+ {"version":3,"file":"session-graph-panel.d.ts","sourceRoot":"","sources":["../../../src/sdk/components/session-graph-panel.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC;;;GAGG;AAyCH,wBAAgB,iBAAiB,8BAkahC"}
@@ -1,7 +1,5 @@
1
1
  /** @jsxImportSource @opentui/react */
2
- import type { LayoutNode } from "./layout.ts";
3
- export declare function Statusline({ focusedNode, attachMsg, }: {
4
- focusedNode: LayoutNode | undefined;
2
+ export declare function Statusline({ attachMsg, }: {
5
3
  attachMsg: string;
6
4
  }): import("react").ReactNode;
7
5
  //# sourceMappingURL=statusline.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"statusline.d.ts","sourceRoot":"","sources":["../../../src/sdk/components/statusline.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AAItC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,wBAAgB,UAAU,CAAC,EACzB,WAAW,EACX,SAAS,GACV,EAAE;IACD,WAAW,EAAE,UAAU,GAAG,SAAS,CAAC;IACpC,SAAS,EAAE,MAAM,CAAC;CACnB,6BAiEA"}
1
+ {"version":3,"file":"statusline.d.ts","sourceRoot":"","sources":["../../../src/sdk/components/statusline.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AAItC,wBAAgB,UAAU,CAAC,EACzB,SAAS,GACV,EAAE;IACD,SAAS,EAAE,MAAM,CAAC;CACnB,6BAoDA"}
@@ -25,17 +25,27 @@ export declare function clearClaudeSession(paneId: string): void;
25
25
  export interface ClaudeSessionOptions {
26
26
  /** tmux pane ID where Claude should be started */
27
27
  paneId: string;
28
+ /**
29
+ * Workflow session directory. The first prompt is written here as
30
+ * `prompt.txt` and Claude is told to read from that path.
31
+ */
32
+ sessionDir: string;
28
33
  /** CLI flags to pass to the `claude` command (default: ["--allow-dangerously-skip-permissions", "--dangerously-skip-permissions"]) */
29
34
  chatFlags?: string[];
30
35
  /** Timeout in ms waiting for Claude TUI to be ready (default: 30s) */
31
36
  readyTimeoutMs?: number;
32
37
  }
33
38
  /**
34
- * Start Claude Code in a tmux pane with configurable CLI flags.
39
+ * Initialize per-pane Claude state. Does NOT spawn the `claude` CLI — the
40
+ * pane is left as a bare shell. The CLI is spawned lazily on the first
41
+ * `claudeQuery()` call, with the prompt baked into the spawn command:
42
+ *
43
+ * claude [chatFlags] --session-id <UUID> 'Read the prompt in <tmpfile>'
44
+ *
45
+ * Pre-generating the session UUID here lets the first query pass it to the
46
+ * CLI, so we know the JSONL filename up front and can skip discovery polling.
35
47
  *
36
48
  * Must be called before any `claudeQuery()` calls targeting the same pane.
37
- * The pane should be a bare shell — `createClaudeSession` sends the `claude`
38
- * command with the given flags and waits for the TUI to become ready.
39
49
  *
40
50
  * @example
41
51
  * ```typescript
@@ -159,10 +169,11 @@ export interface ClaudeQueryDefaults {
159
169
  export declare class ClaudeClientWrapper {
160
170
  readonly paneId: string;
161
171
  private readonly opts;
162
- constructor(paneId: string, opts?: {
172
+ private readonly sessionDir;
173
+ constructor(paneId: string, opts: {
163
174
  chatFlags?: string[];
164
175
  readyTimeoutMs?: number;
165
- });
176
+ } | undefined, sessionDir: string);
166
177
  /** Start the Claude CLI in the tmux pane. Called by the runtime during init. */
167
178
  start(): Promise<void>;
168
179
  /** Noop — cleanup is handled by the runtime via `clearClaudeSession`. */
@@ -1 +1 @@
1
- {"version":3,"file":"claude.d.ts","sourceRoot":"","sources":["../../../src/sdk/providers/claude.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAIL,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,OAAO,IAAI,UAAU,EAC3B,MAAM,gCAAgC,CAAC;AA8BxC;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAEvD;AAYD,MAAM,WAAW,oBAAoB;IACnC,kDAAkD;IAClD,MAAM,EAAE,MAAM,CAAC;IACf,sIAAsI;IACtI,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,sEAAsE;IACtE,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,mBAAmB,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CAyCtF;AAkGD;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,cA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I,CAAC;CAClC;AAQD;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,+DAejC,CAAC"}
@@ -31,7 +31,44 @@ export interface WorkflowRunOptions {
31
31
  workflowFile: string;
32
32
  /** Project root (defaults to cwd) */
33
33
  projectRoot?: string;
34
+ /**
35
+ * When true, create the tmux session and return immediately instead
36
+ * of attaching. The orchestrator keeps running in the background on
37
+ * the atomic tmux socket; users can attach later with
38
+ * `atomic workflow session connect <name>`.
39
+ */
40
+ detach?: boolean;
34
41
  }
42
+ /**
43
+ * Resolve a non-JS Copilot CLI binary on PATH.
44
+ *
45
+ * Under Bun, `@github/copilot-sdk` spawns its bundled JS entry via `node`
46
+ * (see `getNodeExecPath` in the SDK). If `node` isn't installed — common in
47
+ * minimal containers — the spawn fails silently with ENOENT and the SDK's
48
+ * write to the child's stdin surfaces as "Cannot call write after a stream
49
+ * was destroyed" from vscode-jsonrpc. Pointing the SDK at a standalone
50
+ * `copilot` binary (the npm-installed ELF executable) sidesteps the
51
+ * node-vs-bun problem because the SDK execs it directly when the path does
52
+ * not end in `.js`.
53
+ *
54
+ * Returns undefined if no suitable binary is found.
55
+ */
56
+ export declare function discoverCopilotBinary(): string | undefined;
57
+ /**
58
+ * True when we need to override the SDK's default CLI path — i.e. running
59
+ * under Bun, the user hasn't set COPILOT_CLI_PATH, and `node` is not
60
+ * available to execute the SDK's bundled JS entry.
61
+ *
62
+ * Pure predicate on the current env; safe to call repeatedly.
63
+ */
64
+ export declare function shouldOverrideCopilotCliPath(): boolean;
65
+ /**
66
+ * Set safe env defaults for the orchestrator process before any SDK is
67
+ * loaded. Idempotent — subsequent calls no-op once `COPILOT_CLI_PATH`
68
+ * is set. Call as early as possible so headless Copilot subprocesses
69
+ * inherit the resolved env.
70
+ */
71
+ export declare function applyContainerEnvDefaults(): void;
35
72
  /**
36
73
  * Escape a string for safe interpolation inside a bash double-quoted string.
37
74
  *
@@ -123,6 +160,16 @@ export interface OpenCodeHILEvent {
123
160
  * Events for other sessions are silently ignored. The function returns when
124
161
  * the stream is exhausted (i.e. the server closes the connection).
125
162
  *
163
+ * NOTE: OpenCode does not emit any bus event for MCP-server-initiated
164
+ * elicitation requests — its MCP client never registers an
165
+ * `ElicitRequestSchema` handler, so such requests are auto-rejected by the
166
+ * MCP SDK at the protocol layer before reaching any OpenCode-level code.
167
+ * As a result, the workflow UI **cannot** mark an OpenCode session as
168
+ * "awaiting input" for MCP elicitation; this is an upstream limitation that
169
+ * Atomic cannot work around. If a future OpenCode release surfaces MCP
170
+ * elicitation as a bus event, extend the switch below (or add a sibling
171
+ * watcher) to map it onto `onHIL`.
172
+ *
126
173
  * Exported for unit testing.
127
174
  */
128
175
  export declare function watchOpencodeStreamForHIL(stream: AsyncIterable<OpenCodeHILEvent>, sessionId: string, onHIL: (waiting: boolean) => void): Promise<void>;
@@ -156,5 +203,21 @@ export interface CopilotHILSessionSurface {
156
203
  * Exported for unit testing.
157
204
  */
158
205
  export declare function watchCopilotSessionForHIL(session: CopilotHILSessionSurface, onHIL: (waiting: boolean) => void): () => void;
206
+ /**
207
+ * Subscribe to a Copilot session's elicitation events to track HIL state for
208
+ * `session.ui.elicitation()`, `session.ui.select()`, `session.ui.input()`, and
209
+ * MCP-server-initiated elicitation requests:
210
+ *
211
+ * - `elicitation.requested` → `onHIL(true)` (set transitions empty→non-empty)
212
+ * - `elicitation.completed` → `onHIL(false)` (set transitions non-empty→empty)
213
+ *
214
+ * Overlapping elicitation requests are tracked by `requestId` so
215
+ * `onHIL(false)` only fires after the last in-flight request completes.
216
+ *
217
+ * Returns an unsubscribe function that removes both listeners.
218
+ *
219
+ * Exported for unit testing.
220
+ */
221
+ export declare function watchCopilotSessionForElicitation(session: CopilotHILSessionSurface, onHIL: (waiting: boolean) => void): () => void;
159
222
  export declare function runOrchestrator(): Promise<void>;
160
223
  //# sourceMappingURL=executor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../../src/sdk/runtime/executor.ts"],"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CAAiC,CAC/C,OAAO,EAAE,wBAAwB,EACjC,KAAK,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,GAChC,MAAM,IAAI,CAwBZ;AA6nBD,wBAAsB,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC,CA8JrD"}
@@ -16,15 +16,6 @@ export type TmuxResult = {
16
16
  ok: false;
17
17
  stderr: string;
18
18
  };
19
- export declare const TMUX_DEFAULT_STATUS_LEFT = " ";
20
- export declare const TMUX_DEFAULT_STATUS_LEFT_LENGTH = "10";
21
- export declare const TMUX_DEFAULT_STATUS_RIGHT = " #{session_name} | %H:%M ";
22
- export declare const TMUX_DEFAULT_STATUS_RIGHT_LENGTH = "60";
23
- export declare const TMUX_ATTACHED_STATUS_RIGHT = "#[fg=#cdd6f4]ctrl+g #[fg=#6c7086]graph #[fg=#585b70]\u00B7 #[fg=#cdd6f4]ctrl+\\ #[fg=#6c7086]next ";
24
- export declare const TMUX_ATTACHED_STATUS_RIGHT_LENGTH = "40";
25
- export declare const TMUX_ATTACHED_WINDOW_FMT = "#{?#{==:#{window_index},0},, #W }";
26
- export declare const TMUX_ATTACHED_WINDOW_STYLE = "fg=#6c7086";
27
- export declare const TMUX_ATTACHED_WINDOW_CURRENT_STYLE = "fg=#cdd6f4,bold";
28
19
  /**
29
20
  * Resolve the terminal multiplexer binary for the current platform.
30
21
  *
@@ -1 +1 @@
1
- {"version":3,"file":"tmux.d.ts","sourceRoot":"","sources":["../../../src/sdk/runtime/tmux.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAMtC,4FAA4F;AAC5F,eAAO,MAAM,WAAW,WAAW,CAAC;AAKpC,0DAA0D;AAC1D,MAAM,MAAM,UAAU,GAClB;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAC5B;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,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AAG,OAAO,CAW3D;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAGlD;AAMD;;;GAGG;AACH,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,GAAE,MAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CAelG;AAMD;;;;GAIG;AACH,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,MAAM,EACd,gBAAgB,EAAE,MAAM,EACxB,MAAM,EAAE,MAAM,EACd,eAAe,GAAE,MAAU,GAC1B,OAAO,CAAC,OAAO,CAAC,CAqBlB;AAMD;;;;;;GAMG;AACH,wBAAsB,aAAa,CACjC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,OAAO,GAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,cAAc,CAAC,EAAE,MAAM,CAAA;CAAO,GAC5D,OAAO,CAAC,MAAM,CAAC,CAajB"}
@@ -6,15 +6,13 @@
6
6
  * 1) local `.atomic/settings.json` (project override)
7
7
  * 2) global `~/.atomic/settings.json` (default fallback)
8
8
  */
9
- import { type SourceControlType, type AgentKey, type ProviderOverrides } from "./index.ts";
9
+ import { type AgentKey, type ProviderOverrides } from "./index.ts";
10
10
  /**
11
11
  * Atomic project configuration schema.
12
12
  */
13
13
  export interface AtomicConfig {
14
14
  /** Version of config schema */
15
15
  version?: number;
16
- /** Selected source control type */
17
- scm?: SourceControlType;
18
16
  /** Timestamp of last init */
19
17
  lastUpdated?: string;
20
18
  /** Per-provider overrides for chatFlags and envVars */
@@ -28,10 +26,6 @@ export declare function readAtomicConfig(projectDir: string): Promise<AtomicConf
28
26
  * Save project config to `.atomic/settings.json`.
29
27
  */
30
28
  export declare function saveAtomicConfig(projectDir: string, updates: Partial<AtomicConfig>): Promise<void>;
31
- /**
32
- * Get selected SCM using local override + global fallback.
33
- */
34
- export declare function getSelectedScm(projectDir: string): Promise<SourceControlType | null>;
35
29
  /**
36
30
  * Resolve provider overrides from global + local settings (local wins).
37
31
  *
@@ -1 +1 @@
1
- {"version":3,"file":"atomic-config.d.ts","sourceRoot":"","sources":["../../../src/services/config/atomic-config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,QAAQ,EAAE,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAO3F;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,+BAA+B;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mCAAmC;IACnC,GAAG,CAAC,EAAE,iBAAiB,CAAC;IACxB,6BAA6B;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uDAAuD;IACvD,SAAS,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,iBAAiB,CAAC,CAAC,CAAC;CAC1D;AA2HD;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAMvF;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,OAAO,CAAC,YAAY,CAAC,GAC7B,OAAO,CAAC,IAAI,CAAC,CAsBf;AAED;;GAEG;AACH,wBAAsB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAG1F;AAED;;;;;;;GAOG;AACH,wBAAsB,oBAAoB,CACxC,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,iBAAiB,CAAC,CAG5B"}
1
+ {"version":3,"file":"atomic-config.d.ts","sourceRoot":"","sources":["../../../src/services/config/atomic-config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAOnE;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,+BAA+B;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6BAA6B;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uDAAuD;IACvD,SAAS,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,iBAAiB,CAAC,CAAC,CAAC;CAC1D;AAwHD;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAMvF;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,OAAO,CAAC,YAAY,CAAC,GAC7B,OAAO,CAAC,IAAI,CAAC,CAsBf;AAED;;;;;;;GAOG;AACH,wBAAsB,oBAAoB,CACxC,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,iBAAiB,CAAC,CAG5B"}
@@ -41,50 +41,5 @@ export interface ProviderOverrides {
41
41
  export declare function isValidAgent(key: string): key is AgentKey;
42
42
  export declare function getAgentConfig(key: AgentKey): AgentConfig;
43
43
  export declare function getAgentKeys(): AgentKey[];
44
- /**
45
- * Source Control Management (SCM) configuration definitions
46
- */
47
- /** SCM keys for iteration */
48
- declare const SCM_KEYS: readonly ["github", "sapling"];
49
- /** Supported source control types — derived from SCM_KEYS tuple. */
50
- export type SourceControlType = (typeof SCM_KEYS)[number];
51
- export interface ScmConfig {
52
- /** Display name for prompts */
53
- displayName: string;
54
- /** Primary CLI tool (git or sl) */
55
- cliTool: string;
56
- /** Code review system (github, phabricator) */
57
- reviewSystem: string;
58
- /** Directory marker used to detect this SCM in a repo (e.g. `.git`, `.sl`) */
59
- detectDir: string;
60
- }
61
- export declare const SCM_CONFIG: Record<SourceControlType, ScmConfig>;
62
- /**
63
- * SCM-variant skill names, grouped by source control type.
64
- *
65
- * These are the skills that `installGlobalSkills` removes from the global
66
- * scope after the initial install, and that `installLocalScmSkills`
67
- * re-installs per-project based on the user's selected SCM. Passed to
68
- * `npx skills add --skill <name>` as explicit names (the skills CLI does
69
- * not support glob patterns like `gh-*`).
70
- */
71
- export declare const SCM_SKILLS_BY_TYPE: Record<SourceControlType, readonly string[]>;
72
- /** Flat list of every SCM-variant skill across all source control types. */
73
- export declare const ALL_SCM_SKILLS: readonly string[];
74
- /**
75
- * Get all SCM keys for iteration
76
- */
77
- export declare function getScmKeys(): SourceControlType[];
78
- /**
79
- * Check if a string is a valid SCM type
80
- */
81
- export declare function isValidScm(key: string): key is SourceControlType;
82
- /**
83
- * Detect the SCM type by looking for marker directories in `projectRoot`.
84
- *
85
- * Checks each {@link ScmConfig.detectDir} (e.g. `.git`, `.sl`) and returns
86
- * the first match. Returns `null` when no known marker is found.
87
- */
88
- export declare function detectScmType(projectRoot: string): Promise<SourceControlType | null>;
89
44
  export {};
90
45
  //# sourceMappingURL=definitions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.d.ts","sourceRoot":"","sources":["../../../src/services/config/definitions.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,MAAM,WAAW,WAAW;IAC1B,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,kEAAkE;IAClE,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,qFAAqF;IACrF,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,0CAA0C;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,wCAAwC;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,yDAAyD;IACzD,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,qEAAqE;IACrE,gBAAgB,EAAE,KAAK,CAAC;QACtB,MAAM,EAAE,MAAM,CAAC;QACf,WAAW,EAAE,MAAM,CAAC;QACpB,KAAK,EAAE,OAAO,CAAC;KAChB,CAAC,CAA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MAAM,GAAG,GAAG,IAAI,QAAQ,CAEzD;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,QAAQ,GAAG,WAAW,CAEzD;AAED,wBAAgB,YAAY,IAAI,QAAQ,EAAE,CAEzC"}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Configuration Module Exports
3
3
  *
4
- * Centralized access to the CLI's agent and SCM configuration.
4
+ * Centralized access to the CLI's agent configuration.
5
5
  */
6
6
  export * from "./definitions.ts";
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,33 @@
1
+ export declare const COLORS: {
2
+ readonly bold: "\u001B[1m";
3
+ readonly dim: "\u001B[2m";
4
+ readonly reset: "\u001B[0m";
5
+ readonly red: "\u001B[31m";
6
+ readonly green: "\u001B[32m";
7
+ readonly yellow: "\u001B[33m";
8
+ readonly blue: "\u001B[34m";
9
+ } | {
10
+ readonly bold: "";
11
+ readonly dim: "";
12
+ readonly reset: "";
13
+ readonly red: "";
14
+ readonly green: "";
15
+ readonly yellow: "";
16
+ readonly blue: "";
17
+ };
18
+ export type PaletteKey = "text" | "dim" | "accent" | "success" | "error" | "warning" | "mauve" | "info";
19
+ export declare const PALETTE: Record<PaletteKey, readonly [number, number, number]>;
20
+ export interface PaintOptions {
21
+ bold?: boolean;
22
+ }
23
+ export type Paint = (key: PaletteKey, text: string, opts?: PaintOptions) => string;
24
+ /**
25
+ * Build a colour-aware painter for the current terminal.
26
+ *
27
+ * Truecolor terminals get the full Catppuccin palette; legacy terminals
28
+ * degrade to basic ANSI; NO_COLOR emits plain text. The optional `bold`
29
+ * flag adds weight contrast — essential for typographic hierarchy in a
30
+ * monospace medium where size and family are fixed.
31
+ */
32
+ export declare function createPainter(): Paint;
33
+ //# sourceMappingURL=colors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/theme/colors.ts"],"names":[],"mappings":"AA0BA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;CAA2C,CAAC;AAU/D,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAExG,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,UAAU,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CASzE,CAAC;AAEF,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,MAAM,KAAK,GAAG,CAAC,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,YAAY,KAAK,MAAM,CAAC;AAEnF;;;;;;;GAOG;AACH,wBAAgB,aAAa,IAAI,KAAK,CA2BrC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/atomic",
3
- "version": "0.5.18-0",
3
+ "version": "0.5.19-0",
4
4
  "description": "Configuration management CLI and SDK for coding agents",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -49,7 +49,8 @@
49
49
  ".opencode/agents",
50
50
  ".opencode/opencode.json",
51
51
  ".github/agents",
52
- ".github/lsp.json"
52
+ ".github/lsp.json",
53
+ ".mcp.json"
53
54
  ],
54
55
  "scripts": {
55
56
  "dev": "bun run src/cli.ts",
package/src/cli.ts CHANGED
@@ -204,6 +204,7 @@ Examples:
204
204
  .description("Run a multi-session agent workflow")
205
205
  .option("-n, --name <name>", "Workflow name (matches directory under .atomic/workflows/<name>/)")
206
206
  .option("-a, --agent <name>", `Agent to use (${agentChoices})`)
207
+ .option("-d, --detach", "Start the workflow in the background without attaching (auto-enabled when launched from inside an atomic chat/workflow session to avoid hijacking it). Attach later with 'atomic workflow session connect <id>'.")
207
208
  .allowUnknownOption()
208
209
  .allowExcessArguments(true)
209
210
  .enablePositionalOptions()
@@ -218,6 +219,7 @@ Examples:
218
219
  $ atomic workflow -n ralph -a claude "fix bug" Run a free-form workflow
219
220
  $ atomic workflow -n gen-spec -a claude --research_doc=notes.md --focus=standard
220
221
  Run a structured-input workflow
222
+ $ atomic workflow -n ralph -a claude -d "fix bug" Run detached in the background
221
223
  $ atomic workflow session list List running sessions
222
224
  $ atomic workflow session connect <id> Attach to a session
223
225
  $ atomic workflow session kill [id] Kill a workflow session (or all)`,
@@ -227,6 +229,7 @@ Examples:
227
229
  const exitCode = await workflowCommand({
228
230
  name: localOpts.name,
229
231
  agent: localOpts.agent,
232
+ detach: localOpts.detach,
230
233
  passthroughArgs: cmd.args,
231
234
  });
232
235
  process.exit(exitCode);
@@ -269,6 +272,17 @@ Examples:
269
272
  process.exit(exitCode);
270
273
  });
271
274
 
275
+ // ── Internal: footer renderer (spawned inside agent tmux windows) ──────
276
+ program
277
+ .command("_footer", { hidden: true })
278
+ .description("Internal: render the attached-mode footer for an agent window")
279
+ .requiredOption("--name <name>", "Agent window name")
280
+ .action(async (opts: { name: string }) => {
281
+ const { footerCommand } = await import("./commands/cli/footer.tsx");
282
+ const exitCode = await footerCommand(opts.name);
283
+ process.exit(exitCode);
284
+ });
285
+
272
286
  // ── Completions command ────────────────────────────────────────────────
273
287
  program
274
288
  .command("completions")
@@ -318,7 +332,8 @@ async function main(): Promise<void> {
318
332
  argv.includes("-v") ||
319
333
  argv.includes("--help") ||
320
334
  argv.includes("-h") ||
321
- argv[0] === "completions";
335
+ argv[0] === "completions" ||
336
+ argv[0] === "_footer";
322
337
 
323
338
  if (!isInfoCommand) {
324
339
  const { autoSyncIfStale } = await import("./services/system/auto-sync.ts");
@@ -183,7 +183,7 @@ export async function chatCommand(options: ChatCommandOptions = {}): Promise<num
183
183
 
184
184
  await ensureAtomicGlobalAgentConfigs(configRoot);
185
185
 
186
- // ── Preflight: project setup (onboarding files, skills, trusted workspace) ──
186
+ // ── Preflight: project setup (onboarding files, skills) ──
187
187
  await ensureProjectSetup(agentType, projectRoot);
188
188
 
189
189
  // ── Build argv ──
@@ -0,0 +1,118 @@
1
+ /** @jsxImportSource @opentui/react */
2
+ /**
3
+ * Internal command that renders the attached-mode footer inside an agent's
4
+ * tmux window. The executor splits each agent window after creation and
5
+ * runs `atomic _footer --name <window-name>` in the bottom pane.
6
+ *
7
+ * Setting `exitOnCtrlC: false` suppresses OpenTUI's built-in signal
8
+ * handling, so we install our own teardown path. In the tmux case the
9
+ * closed pty raises SIGPIPE on the next render, which hits our handler.
10
+ * The parent-liveness watchdog is a portable fallback for the orphan case
11
+ * where no signal arrives (process gets reparented to init/unknown).
12
+ */
13
+
14
+ import { useEffect } from "react";
15
+ import { createCliRenderer } from "@opentui/core";
16
+ import { createRoot, useRenderer } from "@opentui/react";
17
+ import { resolveTheme } from "../../sdk/runtime/theme.ts";
18
+ import {
19
+ deriveGraphTheme,
20
+ type GraphTheme,
21
+ } from "../../sdk/components/graph-theme.ts";
22
+ import { AttachedStatusline } from "../../sdk/components/attached-statusline.tsx";
23
+
24
+ const PARENT_WATCHDOG_MS = 2000;
25
+
26
+ /**
27
+ * Snapshot the parent PID at module load. `process.ppid` is cached in both
28
+ * Node and Bun, so we can't re-read it to detect reparenting — instead we
29
+ * probe whether the original parent PID is still alive.
30
+ */
31
+ const ORIGINAL_PPID = process.ppid;
32
+
33
+ /**
34
+ * Returns false only when the original parent is definitively gone.
35
+ * - signal 0 is a no-op existence check supported on Linux, macOS, and Windows.
36
+ * - ESRCH means the PID no longer exists → parent is gone.
37
+ * - EPERM means the PID exists but we can't signal it → still alive.
38
+ * - If the original PPID was already ≤1 (init-launched or unknown), we can't
39
+ * distinguish a legitimate boot parent from orphan state, so skip the check.
40
+ */
41
+ function originalParentAlive(): boolean {
42
+ if (ORIGINAL_PPID <= 1) return true;
43
+ try {
44
+ process.kill(ORIGINAL_PPID, 0);
45
+ return true;
46
+ } catch (err) {
47
+ return (err as NodeJS.ErrnoException).code !== "ESRCH";
48
+ }
49
+ }
50
+
51
+ /**
52
+ * Signals whose delivery should tear down the renderer. Node silently
53
+ * supports listening for non-native signals on Windows (they just never
54
+ * fire), so branching is purely for documentation.
55
+ */
56
+ const EXIT_SIGNALS: NodeJS.Signals[] =
57
+ process.platform === "win32"
58
+ ? ["SIGTERM", "SIGINT", "SIGBREAK", "SIGHUP"]
59
+ : ["SIGHUP", "SIGTERM", "SIGINT", "SIGPIPE"];
60
+
61
+ function FooterShell({ name, theme }: { name: string; theme: GraphTheme }) {
62
+ const renderer = useRenderer();
63
+
64
+ useEffect(() => {
65
+ let tornDown = false;
66
+ const teardown = () => {
67
+ if (tornDown) return;
68
+ tornDown = true;
69
+ try {
70
+ renderer.destroy();
71
+ } catch {
72
+ // renderer may already be mid-destroy; the pty is likely gone
73
+ }
74
+ // Pane pty is already closed by the time we reach here, so there is
75
+ // no terminal state left to preserve. Exit explicitly in case
76
+ // destroy() doesn't (e.g. when stdout writes fail silently).
77
+ process.exit(0);
78
+ };
79
+ for (const sig of EXIT_SIGNALS) {
80
+ process.on(sig, teardown);
81
+ }
82
+
83
+ const watchdog = setInterval(() => {
84
+ if (!originalParentAlive()) teardown();
85
+ }, PARENT_WATCHDOG_MS);
86
+ watchdog.unref?.();
87
+
88
+ return () => {
89
+ for (const sig of EXIT_SIGNALS) {
90
+ process.off(sig, teardown);
91
+ }
92
+ clearInterval(watchdog);
93
+ };
94
+ }, [renderer]);
95
+
96
+ return (
97
+ <box
98
+ width="100%"
99
+ height="100%"
100
+ flexDirection="column"
101
+ justifyContent="flex-end"
102
+ backgroundColor={theme.background}
103
+ >
104
+ <AttachedStatusline name={name} theme={theme} />
105
+ </box>
106
+ );
107
+ }
108
+
109
+ export async function footerCommand(name: string): Promise<number> {
110
+ const renderer = await createCliRenderer({
111
+ exitOnCtrlC: false,
112
+ });
113
+ const theme = deriveGraphTheme(resolveTheme(renderer.themeMode));
114
+ createRoot(renderer).render(<FooterShell name={name} theme={theme} />);
115
+
116
+ await new Promise<void>(() => {});
117
+ return 0;
118
+ }