@bastani/atomic 0.6.6-0 → 0.6.6

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.
@@ -18,6 +18,8 @@
18
18
  }
19
19
  },
20
20
  "instructions": [
21
- "/home/alilavaee/.atomic/AGENTS.md"
22
- ]
21
+ "/home/alilavaee/.atomic/AGENTS.md",
22
+ "/home/vscode/.atomic/AGENTS.md"
23
+ ],
24
+ "permission": "allow"
23
25
  }
package/README.md CHANGED
@@ -128,6 +128,7 @@ Minimal example (Claude + Rust):
128
128
  "ghcr.io/devcontainers/features/github-cli:1": {}
129
129
  },
130
130
  "remoteEnv": {
131
+ "GH_TOKEN": "${localEnv:GH_TOKEN}",
131
132
  "ANTHROPIC_API_KEY": "${localEnv:ANTHROPIC_API_KEY}"
132
133
  }
133
134
  }
@@ -302,15 +303,15 @@ Detached mode is what you want for scripted / CI automation and long-running tas
302
303
 
303
304
  Atomic ships **two** things that share one workflow runtime. You can use either on its own or both together:
304
305
 
305
- | | Atomic CLI | Atomic SDK |
306
- | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
307
- | **What it is** | Global `atomic` binary | `@bastani/atomic/workflows` TypeScript library |
308
- | **Install** | `bun install -g @bastani/atomic` (or `install.sh` / `install.ps1`) | `bun add @bastani/atomic` inside your project |
309
- | **Entrypoint** | `atomic <command>` | `bun run src/<agent>-worker.ts` |
310
- | **Code required?** | No — everything is pre-built. You can also ask the agent inside `atomic chat` to use the `workflow-creator` skill, decide when a complex task needs its own workflow, and build/run that workflow on the fly. | No to start — describe the workflow in natural language and use the `workflow-creator` skill to generate it. Then refine it in natural language or edit the TypeScript workflow and composition root directly, with full visibility into exactly what will run. |
306
+ | | Atomic CLI | Atomic SDK |
307
+ | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
308
+ | **What it is** | Global `atomic` binary | `@bastani/atomic/workflows` TypeScript library |
309
+ | **Install** | `bun install -g @bastani/atomic` (or `install.sh` / `install.ps1`) | `bun add @bastani/atomic` inside your project |
310
+ | **Entrypoint** | `atomic <command>` | `bun run src/<agent>-worker.ts` |
311
+ | **Code required?** | No — everything is pre-built. You can also ask the agent inside `atomic chat` to use the `workflow-creator` skill, decide when a complex task needs its own workflow, and build/run that workflow on the fly. | No to start — describe the workflow in natural language and use the `workflow-creator` skill to generate it. Then refine it in natural language or edit the TypeScript workflow and composition root directly, with full visibility into exactly what will run. |
311
312
  | **What you get** | `atomic chat` (agent REPL), three autonomous built-in workflows (`ralph`, `deep-research-codebase`, `open-claude-design`), session management, the live workflow panel, Atomic skills (`/init`, `/research-codebase`, `/create-spec`, …) | `defineWorkflow`, `createRegistry`, `runWorkflow`, metadata accessors (`getName`, `getInputSchema`, …), session primitives (`listSessions`, `getSessionStatus`, `attachSession` / `detachSession`, `nextWindow` / `previousWindow` / `gotoOrchestrator`), typed errors (`MissingDependencyError`, `SessionNotFoundError`, …), `ctx.stage`, `s.save` / `s.transcript`, headless stages |
312
- | **When to reach for** | You want autonomous execution of a standard pattern out of the box, interactive chat with your agent's full toolset, or a CLI agent that can create a purpose-built workflow before doing complex work. | You want to control the outer loop yourself — review flows, deployment gates, custom research pipelines — with full visibility into the TypeScript your team will run identically. |
313
- | **Read next** | [Quick Start](#quick-start) (steps 1–3) | [Quick Start step 4](#4-build-your-own-workflow--sdk) and [Building your own atomic-powered app](#building-your-own-atomic-powered-app) |
313
+ | **When to reach for** | You want autonomous execution of a standard pattern out of the box, interactive chat with your agent's full toolset, or a CLI agent that can create a purpose-built workflow before doing complex work. | You want to control the outer loop yourself — review flows, deployment gates, custom research pipelines — with full visibility into the TypeScript your team will run identically. |
314
+ | **Read next** | [Quick Start](#quick-start) (steps 1–3) | [Quick Start step 4](#4-build-your-own-workflow--sdk) and [Building your own atomic-powered app](#building-your-own-atomic-powered-app) |
314
315
 
315
316
  Both surfaces call the same runtime underneath (tmux/psmux session graph, provider SDKs, detach/reattach) — they're two entry points, not two products. Neither depends on the other: you can `bun add @bastani/atomic` in a project without ever installing the global binary, and you can use `atomic chat` and the built-in workflows without writing any TypeScript.
316
317
 
@@ -368,14 +369,14 @@ These are workflows you'd author with `defineWorkflow` and run from your own `sr
368
369
  - [`atomic completions` — Shell Completions](#atomic-completions--shell-completions)
369
370
  - [Atomic-Provided Skills (invokable from any agent chat)](#atomic-provided-skills-invokable-from-any-agent-chat)
370
371
  - [Building your own atomic-powered app](#building-your-own-atomic-powered-app)
371
- - [One factory, three input shapes](#one-factory-three-input-shapes)
372
- - [One method: `run()`](#one-method-run)
372
+ - [Primitives, not a wrapper](#primitives-not-a-wrapper)
373
+ - [Programmatic invocation](#programmatic-invocation)
373
374
  - [Embedding under a parent CLI — `runWorkflow` inside any Commander tree](#embedding-under-a-parent-cli--runworkflow-inside-any-commander-tree)
374
- - [`entry` — for bundled apps and tests](#entry--for-bundled-apps-and-tests)
375
+ - [`WorkflowPicker` component](#workflowpicker-component)
375
376
  - [Registry rules](#registry-rules)
376
377
  - [Input precedence](#input-precedence)
377
378
  - [Builtin workflows via the `atomic` CLI](#builtin-workflows-via-the-atomic-cli)
378
- - [Migration from 0.x (directory-scanning) to current](#migration-from-0x-directory-scanning-to-current)
379
+ - [Migration from 0.x (directory-scanning) and the `createWorkflowCli` wrapper](#migration-from-0x-directory-scanning-and-the-createworkflowcli-wrapper)
379
380
  - [Configuration](#configuration)
380
381
  - [`.atomic/settings.json`](#atomicsettingsjson)
381
382
  - [Agent-Specific Files](#agent-specific-files)
@@ -437,19 +438,19 @@ The [`examples/`](./examples) directory contains small, complete user apps you c
437
438
 
438
439
  **Design principle — when does `-a/--agent` belong on your CLI?** Each agent-scoped worker file imports a single workflow pinned to one agent (`import workflow from "./claude/index.ts"`), so there's nothing to disambiguate — no `-a` flag. Only reach for `-a/--agent` when one CLI dispatches across workflows that exist in multiple agent variants — e.g. a `cli.ts` that registers `hello` for claude *and* copilot. The atomic CLI itself uses `-a` for exactly that reason: its builtin registry has cross-agent variants of `ralph`, `deep-research-codebase`, and `open-claude-design`.
439
440
 
440
- | Example | What it demonstrates |
441
- | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
442
- | `hello-world` | Minimal single-session workflow with structured inputs (greeting, style, optional notes) |
443
- | `sequential-describe-summarize` | Two stages passing data via `s.save()` → `s.transcript(handle)` — the canonical handoff pattern |
444
- | `parallel-hello-world` | `Promise.all()` fan-out and transcript merge |
445
- | `headless-test` | Visible seed → 3 parallel headless stages → visible merge → headless verdict |
446
- | `hil-favorite-color` | Human-in-the-loop prompt mid-workflow |
447
- | `hil-favorite-color-headless` | HIL pause inside a headless stage |
448
- | `structured-output-demo` | Per-SDK structured output (JSON-schema validation, Zod) |
449
- | `reviewer-tool-test` | Custom reviewer tool wiring (Copilot — copilot-worker.ts only) |
450
- | `review-fix-loop` | Draft → loop(review → fix) with bounded iterations and early exit on a `CLEAN` verdict — a reliable review gate showing how a stage's return value (`handle.result`) drives TypeScript control flow |
451
- | `multi-workflow` | Two Claude workflows under one `cli.ts` — uses `listWorkflows(registry)` to register one Commander subcommand per workflow with each workflow's declared inputs as `--<flag>` options. |
452
- | `commander-embed` | Mount an atomic workflow under a parent Commander CLI by calling `runWorkflow({ workflow, inputs })` inside a Commander action, alongside a plain Commander sibling command. No re-entry boilerplate — the SDK ships its own orchestrator entry script. |
441
+ | Example | What it demonstrates |
442
+ | ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
443
+ | `hello-world` | Minimal single-session workflow with structured inputs (greeting, style, optional notes) |
444
+ | `sequential-describe-summarize` | Two stages passing data via `s.save()` → `s.transcript(handle)` — the canonical handoff pattern |
445
+ | `parallel-hello-world` | `Promise.all()` fan-out and transcript merge |
446
+ | `headless-test` | Visible seed → 3 parallel headless stages → visible merge → headless verdict |
447
+ | `hil-favorite-color` | Human-in-the-loop prompt mid-workflow |
448
+ | `hil-favorite-color-headless` | HIL pause inside a headless stage |
449
+ | `structured-output-demo` | Per-SDK structured output (JSON-schema validation, Zod) |
450
+ | `reviewer-tool-test` | Custom reviewer tool wiring (Copilot — copilot-worker.ts only) |
451
+ | `review-fix-loop` | Draft → loop(review → fix) with bounded iterations and early exit on a `CLEAN` verdict — a reliable review gate showing how a stage's return value (`handle.result`) drives TypeScript control flow |
452
+ | `multi-workflow` | Two Claude workflows under one `cli.ts` — uses `listWorkflows(registry)` to register one Commander subcommand per workflow with each workflow's declared inputs as `--<flag>` options. |
453
+ | `commander-embed` | Mount an atomic workflow under a parent Commander CLI by calling `runWorkflow({ workflow, inputs })` inside a Commander action, alongside a plain Commander sibling command. No re-entry boilerplate — the SDK ships its own orchestrator entry script. |
453
454
  | `pane-navigation` | Driver CLI for the SDK pane-navigation primitives (`nextWindow`, `previousWindow`, `gotoOrchestrator`, `attachSession`, `detachSession`). Spawns a 3-stage workflow detached and exposes `start / list / status / next / prev / home / attach / stop` subcommands. Catches `SessionNotFoundError` for friendly errors. |
454
455
 
455
456
  Run any of them with:
@@ -1247,19 +1248,19 @@ Native slash commands (`/help`, `/clear`, `/compact`, `/model`, `/theme`, `/agen
1247
1248
 
1248
1249
  The SDK ships pure functions you compose into whatever CLI shape you want:
1249
1250
 
1250
- | Primitive | Purpose |
1251
- | ----------------------- | ------------------------------------------------------------------------------------------------------ |
1252
- | `defineWorkflow` | Author a workflow with `.for(agent).run(...).compile()`. Pass `source: import.meta.path`. |
1253
- | `createRegistry` | Build an immutable registry of workflows for iteration / lookup. |
1254
- | `listWorkflows(reg)` | Snapshot every workflow in a registry. |
1255
- | `getWorkflow(reg, …)` | Resolve `(agent, name)` → workflow. |
1256
- | `getName / getAgent / getInputSchema / getDescription / getSource / getMinSDKVersion` | Read workflow metadata. |
1257
- | `validateInputs(wf, raw)` | Run the same validation pipeline atomic uses (required, defaults, enum, integer). |
1258
- | `runWorkflow({ workflow, inputs, detach? })` | Spawn the orchestrator tmux session and (optionally) attach. Resolves with `{ id, tmuxSessionName }`. |
1259
- | `listSessions / getSession / stopSession / attachSession / detachSession` | Manage running tmux sessions on the shared atomic socket. |
1260
- | `getSessionStatus / getSessionTranscript` | Read the orchestrator-written status snapshot or per-session messages from disk. |
1261
- | `nextWindow / previousWindow / gotoOrchestrator` | **Pane navigation** — pure tmux verbs that update the session's current-window pointer. Never auto-attach; an attached client sees the change live, otherwise a subsequent `attachSession` lands on the new window. |
1262
- | `MissingDependencyError / SessionNotFoundError / WorkflowNotCompiledError / InvalidWorkflowError / IncompatibleSDKError` | **Typed errors** thrown by the primitives above. Catch with `instanceof` to render friendly CLI messages without parsing message text. |
1251
+ | Primitive | Purpose |
1252
+ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1253
+ | `defineWorkflow` | Author a workflow with `.for(agent).run(...).compile()`. Pass `source: import.meta.path`. |
1254
+ | `createRegistry` | Build an immutable registry of workflows for iteration / lookup. |
1255
+ | `listWorkflows(reg)` | Snapshot every workflow in a registry. |
1256
+ | `getWorkflow(reg, …)` | Resolve `(agent, name)` → workflow. |
1257
+ | `getName / getAgent / getInputSchema / getDescription / getSource / getMinSDKVersion` | Read workflow metadata. |
1258
+ | `validateInputs(wf, raw)` | Run the same validation pipeline atomic uses (required, defaults, enum, integer). |
1259
+ | `runWorkflow({ workflow, inputs, detach? })` | Spawn the orchestrator tmux session and (optionally) attach. Resolves with `{ id, tmuxSessionName }`. |
1260
+ | `listSessions / getSession / stopSession / attachSession / detachSession` | Manage running tmux sessions on the shared atomic socket. |
1261
+ | `getSessionStatus / getSessionTranscript` | Read the orchestrator-written status snapshot or per-session messages from disk. |
1262
+ | `nextWindow / previousWindow / gotoOrchestrator` | **Pane navigation** — pure tmux verbs that update the session's current-window pointer. Never auto-attach; an attached client sees the change live, otherwise a subsequent `attachSession` lands on the new window. |
1263
+ | `MissingDependencyError / SessionNotFoundError / WorkflowNotCompiledError / InvalidWorkflowError / IncompatibleSDKError` | **Typed errors** thrown by the primitives above. Catch with `instanceof` to render friendly CLI messages without parsing message text. |
1263
1264
 
1264
1265
  **Single workflow (most common):**
1265
1266
 
@@ -0,0 +1,8 @@
1
+ export declare const ATOMIC_TEMP_ENV_KEYS: readonly ["TMPDIR", "TMP", "TEMP"];
2
+ export declare function atomicTempDir(homeDir?: string): string;
3
+ export declare function ensureAtomicTempDir(dir?: string): string;
4
+ export declare function atomicTempEnv(dir?: string): Record<string, string>;
5
+ export declare function atomicTempPath(prefix: string, extension: string, id?: string, dir?: string): string;
6
+ export declare function atomicContentTempPath(prefix: string, extension: string, content: string, dir?: string): string;
7
+ export declare function withAtomicTempEnv<T>(fn: () => Promise<T>, dir?: string): Promise<T>;
8
+ //# sourceMappingURL=atomic-temp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atomic-temp.d.ts","sourceRoot":"","sources":["../../src/lib/atomic-temp.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,oBAAoB,oCAAqC,CAAC;AAEvE,wBAAgB,aAAa,CAAC,OAAO,GAAE,MAAkB,GAAG,MAAM,CAEjE;AAED,wBAAgB,mBAAmB,CAAC,GAAG,GAAE,MAAwB,GAAG,MAAM,CAMzE;AAED,wBAAgB,aAAa,CAAC,GAAG,GAAE,MAA8B,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAEzF;AAED,wBAAgB,cAAc,CAC5B,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,EAAE,GAAE,MAAqB,EACzB,GAAG,GAAE,MAA8B,GAClC,MAAM,CAER;AAED,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,GAAG,GAAE,MAA8B,GAClC,MAAM,CAGR;AAED,wBAAsB,iBAAiB,CAAC,CAAC,EACvC,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACpB,GAAG,GAAE,MAA8B,GAClC,OAAO,CAAC,CAAC,CAAC,CAgBZ"}
@@ -0,0 +1,9 @@
1
+ export declare const TERMINAL_ENV_KEYS: readonly ["LANG", "LC_ALL", "LC_CTYPE", "TERM", "COLORTERM"];
2
+ export type TerminalEnvKey = (typeof TERMINAL_ENV_KEYS)[number];
3
+ export declare function normalizedTerminalEnv(baseEnv?: NodeJS.ProcessEnv): Record<string, string>;
4
+ export declare function mergeTerminalEnv(envVars?: Record<string, string>, baseEnv?: NodeJS.ProcessEnv): Record<string, string>;
5
+ export declare function pickTerminalEnv(env: Record<string, string>): Partial<Record<TerminalEnvKey, string>>;
6
+ export declare function buildSpawnEnv(explicitEnv: Record<string, string>, baseEnv?: NodeJS.ProcessEnv): Record<string, string>;
7
+ export declare function buildLauncherEnv(explicitEnv: Record<string, string>, baseEnv?: NodeJS.ProcessEnv): Record<string, string>;
8
+ export declare function buildTmuxEnv(explicitEnv: Record<string, string>, baseEnv?: NodeJS.ProcessEnv): Record<string, string>;
9
+ //# sourceMappingURL=terminal-env.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"terminal-env.d.ts","sourceRoot":"","sources":["../../src/lib/terminal-env.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,iBAAiB,8DAMpB,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhE,wBAAgB,qBAAqB,CACnC,OAAO,GAAE,MAAM,CAAC,UAAwB,GACvC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA0BxB;AAED,wBAAgB,gBAAgB,CAC9B,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,EACpC,OAAO,GAAE,MAAM,CAAC,UAAwB,GACvC,M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E,OAAO,CAAC,UAAU,CAAC,GAC5B,OAAO,CAAC,cAAc,EAAE,CAAC;IAiDtB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;CAClC;AAQD;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,+DAejC,CAAC"}
@@ -4,24 +4,35 @@
4
4
  * Checks that Copilot workflow source files use the runtime-managed
5
5
  * `s.client` and `s.session` instead of manual SDK client creation.
6
6
  */
7
- import type { SessionConfig as CopilotSessionConfig } from "@github/copilot-sdk";
7
+ import type { CopilotClientOptions, SessionConfig as CopilotSessionConfig } from "@github/copilot-sdk";
8
8
  /**
9
- * Env inherited by the Copilot CLI subprocess the SDK spawns.
9
+ * Return `true` when `candidate` is a Node.js / npm-loader JavaScript shim
10
+ * that should not be passed to the Copilot SDK as the CLI executable.
10
11
  *
11
- * `NODE_NO_WARNINGS=1` silences the
12
- * `ExperimentalWarning: SQLite is an experimental feature` banner that
13
- * Node prints via the CLI's bundled `require("node:sqlite")`. The SDK
14
- * pipes the subprocess's stderr through `process.stderr` with a
15
- * `[CLI subprocess]` prefix, so without this override the warning
16
- * leaks into every `atomic chat -a copilot` and `atomic workflow -a
17
- * copilot` invocation.
12
+ * Filesystem errors for a given candidate are treated as "not a shim" so
13
+ * that the SDK can surface the real error (e.g. permission denied, ENOENT).
14
+ */
15
+ export declare function isCopilotShim(candidate: string): boolean;
16
+ /**
17
+ * Build the subprocess environment for the Copilot CLI process.
18
+ * Normalises locale to UTF-8 and suppresses Node.js deprecation warnings.
19
+ */
20
+ export declare function copilotSubprocessEnv(baseEnv?: NodeJS.ProcessEnv): Record<string, string | undefined>;
21
+ /**
22
+ * Enumerate every existing `cmd` candidate across PATH order.
23
+ */
24
+ export declare function enumeratePathCandidates(cmd: string, pathEnv: string): string[];
25
+ export type CommandPathResolver = (cmd: string) => string | null;
26
+ export declare function resolveCopilotCliPath(resolveCommandPath?: CommandPathResolver): string | undefined;
27
+ /**
28
+ * Build options suitable for `new CopilotClient(...)`.
18
29
  *
19
- * The SDK uses `options.env ?? process.env` as-is (no merge) when
20
- * spawning, so we must fold the existing env in ourselves. Returns a
21
- * fresh object per call so callers can layer additional env without
22
- * mutating shared state.
30
+ * Includes:
31
+ * - `env` from {@link copilotSubprocessEnv} (UTF-8 locale + `NODE_NO_WARNINGS=1`).
32
+ * - `cliPath` from {@link resolveCopilotCliPath} when resolvable; omitted
33
+ * otherwise so the SDK falls back to its bundled CLI.
23
34
  */
24
- export declare function copilotSubprocessEnv(): Record<string, string | undefined>;
35
+ export declare function copilotSdkLaunchOptions(resolveCommandPath?: CommandPathResolver): CopilotClientOptions;
25
36
  /**
26
37
  * Fold the atomic-managed additional instructions into a caller's
27
38
  * `systemMessage` value on `client.createSession`. Behavior:
@@ -1 +1 @@
1
- {"version":3,"file":"copilot.d.ts","sourceRoot":"","sources":["../../../src/sdk/providers/copilot.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,IAAI,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAGjF;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAEzE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,oBAAoB,CAAC,eAAe,CAAC,EAC/C,KAAK,EAAE,MAAM,GACZ,oBAAoB,CAAC,eAAe,CAAC,CASvC;AAED;;GAEG;AACH,eAAO,MAAM,uBAAuB,+DAelC,CAAC"}
1
+ {"version":3,"file":"copilot.d.ts","sourceRoot":"","sources":["../../../src/sdk/providers/copilot.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EACV,oBAAoB,EACpB,aAAa,IAAI,oBAAoB,EACtC,MAAM,qBAAqB,CAAC;AAwC7B;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAYxD;AAED;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;;;;GAMG;AACH,wBAAgB,YAAY,IAAI,WAAW,EAAE,CAW5C;AAWD;;GAEG;AACH,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAYvD;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,UAAU,CAI9D;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAEtD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,GAAG,IAAI,CASjD;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAMxD;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAMvD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAiB/D;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAEjD;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAEpD;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAExD;AAMD;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAMvD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/atomic",
3
- "version": "0.6.6-0",
3
+ "version": "0.6.6",
4
4
  "description": "Configuration management CLI and SDK for coding agents",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -58,7 +58,7 @@
58
58
  ],
59
59
  "scripts": {
60
60
  "dev": "bun run src/cli.ts",
61
- "build": "rm -rf dist && bunx tsc --project tsconfig.build.json",
61
+ "build": "bun run src/scripts/clean-dist.ts && bunx tsc --project tsconfig.build.json",
62
62
  "prepack": "bun run build",
63
63
  "test": "bun test --parallel ./src ./tests",
64
64
  "test:coverage": "bun test --coverage ./src ./tests",
@@ -68,27 +68,27 @@
68
68
  "prepare": "prek install || true"
69
69
  },
70
70
  "devDependencies": {
71
- "@j178/prek": "^0.3.10",
71
+ "@j178/prek": "^0.3.11",
72
72
  "@types/bun": "^1.3.13",
73
73
  "@types/react": "^19.2.14",
74
- "oxlint": "^1.61.0",
74
+ "oxlint": "^1.62.0",
75
75
  "typescript": "^6.0.3",
76
76
  "typescript-language-server": "^5.1.3"
77
77
  },
78
78
  "dependencies": {
79
- "@anthropic-ai/claude-agent-sdk": "^0.2.119",
80
- "@clack/prompts": "^1.2.0",
79
+ "@anthropic-ai/claude-agent-sdk": "^0.2.126",
80
+ "@clack/prompts": "^1.3.0",
81
81
  "@commander-js/extra-typings": "^14.0.0",
82
82
  "@github/copilot-sdk": "^0.3.0",
83
- "@opencode-ai/sdk": "^1.14.24",
84
- "@opentui/core": "0.1.102",
85
- "@opentui/react": "0.1.102",
83
+ "@opencode-ai/sdk": "^1.14.31",
84
+ "@opentui/core": "0.2.1",
85
+ "@opentui/react": "^0.2.1",
86
86
  "commander": "^14.0.3",
87
87
  "ignore": "^7.0.5",
88
88
  "ignore-by-default": "^2.1.0",
89
89
  "linguist-languages": "^9.3.2",
90
90
  "yaml": "^2.8.3",
91
- "zod": "^4.3.6"
91
+ "zod": "^4.4.1"
92
92
  },
93
93
  "peerDependencies": {
94
94
  "react": "^19.2.5"
@@ -1,5 +1,21 @@
1
1
  import { describe, expect, test } from "bun:test";
2
- import { buildLauncherScript } from "./index.ts";
2
+ import {
3
+ buildLauncherEnv,
4
+ buildLauncherScript,
5
+ buildSpawnEnv,
6
+ resolveChatCommand,
7
+ } from "./index.ts";
8
+ import { atomicTempEnv } from "../../../lib/atomic-temp.ts";
9
+
10
+ const TERMINAL_ENV_KEYS = ["LANG", "LC_ALL", "LC_CTYPE", "TERM", "COLORTERM"] as const;
11
+
12
+ const sampleTerminalEnv: Record<string, string> = {
13
+ LANG: "en_US.UTF-8",
14
+ LC_ALL: "en_US.UTF-8",
15
+ LC_CTYPE: "en_US.UTF-8",
16
+ TERM: "xterm-256color",
17
+ COLORTERM: "truecolor",
18
+ };
3
19
 
4
20
  function withMockPlatform<T>(platform: NodeJS.Platform, fn: () => T): T {
5
21
  const originalPlatform = process.platform;
@@ -17,6 +33,21 @@ function withMockPlatform<T>(platform: NodeJS.Platform, fn: () => T): T {
17
33
  }
18
34
  }
19
35
 
36
+ function withEnvVar<T>(key: string, value: string, fn: () => T): T {
37
+ const originalValue = process.env[key];
38
+ process.env[key] = value;
39
+
40
+ try {
41
+ return fn();
42
+ } finally {
43
+ if (originalValue === undefined) {
44
+ delete process.env[key];
45
+ } else {
46
+ process.env[key] = originalValue;
47
+ }
48
+ }
49
+ }
50
+
20
51
  describe("buildLauncherScript", () => {
21
52
  test("builds a PowerShell launcher with cwd, env, args, and exit code", () => {
22
53
  const { script, ext } = withMockPlatform("win32", () =>
@@ -30,7 +61,7 @@ describe("buildLauncherScript", () => {
30
61
 
31
62
  expect(ext).toBe("ps1");
32
63
  expect(script).toContain('Set-Location "C:\\repo"');
33
- expect(script).toContain('$env:ATOMIC_AGENT = "copilot"');
64
+ expect(script).toContain('${env:ATOMIC_AGENT} = "copilot"');
34
65
  expect(script).toContain('& "copilot" @("--debug")');
35
66
  expect(script).toContain('if ($LASTEXITCODE -is [int]) { $atomicExitCode = $LASTEXITCODE }');
36
67
  expect(script).toContain("exit $atomicExitCode");
@@ -57,4 +88,165 @@ describe("buildLauncherScript", () => {
57
88
  expect(script).not.toContain("atomic_original_tty_state");
58
89
  expect(script).not.toContain("trap atomic_cleanup");
59
90
  });
91
+
92
+ describe("terminal env key exports", () => {
93
+ test("bash launcher exports LANG, LC_ALL, LC_CTYPE, TERM, COLORTERM", () => {
94
+ const { script, ext } = withMockPlatform("linux", () =>
95
+ buildLauncherScript("claude", [], "/repo", sampleTerminalEnv)
96
+ );
97
+
98
+ expect(ext).toBe("sh");
99
+ for (const key of TERMINAL_ENV_KEYS) {
100
+ expect(script).toContain(`export ${key}="${sampleTerminalEnv[key]}"`);
101
+ }
102
+ });
103
+
104
+ test("PowerShell launcher sets LANG, LC_ALL, LC_CTYPE, TERM, COLORTERM", () => {
105
+ const { script, ext } = withMockPlatform("win32", () =>
106
+ buildLauncherScript("claude", [], "C:\\repo", sampleTerminalEnv)
107
+ );
108
+
109
+ expect(ext).toBe("ps1");
110
+ for (const key of TERMINAL_ENV_KEYS) {
111
+ expect(script).toContain(`\${env:${key}} = "${sampleTerminalEnv[key]}"`);
112
+ }
113
+ });
114
+
115
+ test("bash launcher emits export lines for all five terminal env keys when merged with other env", () => {
116
+ const envVars = { ...sampleTerminalEnv, ATOMIC_AGENT: "claude" };
117
+ const { script } = withMockPlatform("linux", () =>
118
+ buildLauncherScript("claude", [], "/repo", envVars)
119
+ );
120
+
121
+ for (const key of TERMINAL_ENV_KEYS) {
122
+ expect(script).toContain(`export ${key}=`);
123
+ }
124
+ expect(script).toContain('export ATOMIC_AGENT="claude"');
125
+ });
126
+
127
+ test("PowerShell launcher emits braced env assignments for all five terminal env keys when merged with other env", () => {
128
+ const envVars = { ...sampleTerminalEnv, ATOMIC_AGENT: "copilot" };
129
+ const { script } = withMockPlatform("win32", () =>
130
+ buildLauncherScript("copilot", [], "C:\\repo", envVars)
131
+ );
132
+
133
+ for (const key of TERMINAL_ENV_KEYS) {
134
+ expect(script).toContain(`\${env:${key}} =`);
135
+ }
136
+ expect(script).toContain('${env:ATOMIC_AGENT} = "copilot"');
137
+ });
138
+
139
+ test("PowerShell launcher handles env keys with punctuation", () => {
140
+ const { script } = withMockPlatform("win32", () =>
141
+ buildLauncherScript("copilot", [], "C:\\repo", {
142
+ "ProgramFiles(x86)": "C:\\Program Files (x86)",
143
+ })
144
+ );
145
+
146
+ expect(script).toContain('${env:ProgramFiles(x86)} = "C:\\Program Files (x86)"');
147
+ });
148
+
149
+ test("bash launcher rejects invalid env keys", () => {
150
+ expect(() =>
151
+ withMockPlatform("linux", () =>
152
+ buildLauncherScript("claude", [], "/repo", {
153
+ "ProgramFiles(x86)": "C:\\Program Files (x86)",
154
+ })
155
+ )
156
+ ).toThrow('Invalid Bash env key "ProgramFiles(x86)"');
157
+ });
158
+ });
159
+ });
160
+
161
+ describe("chat env builders", () => {
162
+ const devcontainerEnv = {
163
+ GH_TOKEN: "gh-secret",
164
+ COPILOT_GITHUB_TOKEN: "copilot-secret",
165
+ ANTHROPIC_API_KEY: "anthropic-secret",
166
+ PATH: "/usr/local/bin",
167
+ HOME: "/home/dev",
168
+ LANG: "C",
169
+ TERM: "dumb",
170
+ "ProgramFiles(x86)": "C:\\Program Files (x86)",
171
+ };
172
+
173
+ test("buildLauncherEnv serializes only terminal defaults and explicit env", () => {
174
+ const env = buildLauncherEnv({ ATOMIC_AGENT: "copilot" }, devcontainerEnv);
175
+
176
+ expect(env).toEqual({
177
+ LANG: "en_US.UTF-8",
178
+ LC_ALL: "en_US.UTF-8",
179
+ LC_CTYPE: "en_US.UTF-8",
180
+ TERM: "xterm-256color",
181
+ COLORTERM: "truecolor",
182
+ ATOMIC_AGENT: "copilot",
183
+ });
184
+ });
185
+
186
+ test("Claude temp env is preserved when serialized into a launcher", () => {
187
+ const claudeTempEnv = atomicTempEnv("/home/dev/.atomic/tmp");
188
+ const env = buildLauncherEnv({ ...claudeTempEnv, ATOMIC_AGENT: "claude" }, devcontainerEnv);
189
+
190
+ expect(env.TMPDIR).toBe("/home/dev/.atomic/tmp");
191
+ expect(env.TMP).toBe("/home/dev/.atomic/tmp");
192
+ expect(env.TEMP).toBe("/home/dev/.atomic/tmp");
193
+ });
194
+
195
+ test("buildLauncherEnv does not include inherited secrets or platform keys", () => {
196
+ const env = buildLauncherEnv({ ATOMIC_AGENT: "copilot" }, devcontainerEnv);
197
+
198
+ expect(env.GH_TOKEN).toBeUndefined();
199
+ expect(env.COPILOT_GITHUB_TOKEN).toBeUndefined();
200
+ expect(env.ANTHROPIC_API_KEY).toBeUndefined();
201
+ expect(env.PATH).toBeUndefined();
202
+ expect(env.HOME).toBeUndefined();
203
+ expect(env["ProgramFiles(x86)"]).toBeUndefined();
204
+ });
205
+
206
+ test("buildSpawnEnv preserves inherited process env while normalizing terminal keys", () => {
207
+ const env = buildSpawnEnv({ ATOMIC_AGENT: "copilot" }, devcontainerEnv);
208
+
209
+ expect(env.GH_TOKEN).toBe("gh-secret");
210
+ expect(env.COPILOT_GITHUB_TOKEN).toBe("copilot-secret");
211
+ expect(env.ANTHROPIC_API_KEY).toBe("anthropic-secret");
212
+ expect(env.PATH).toBe("/usr/local/bin");
213
+ expect(env.HOME).toBe("/home/dev");
214
+ expect(env["ProgramFiles(x86)"]).toBe("C:\\Program Files (x86)");
215
+ expect(env.LANG).toBe("en_US.UTF-8");
216
+ expect(env.TERM).toBe("xterm-256color");
217
+ expect(env.ATOMIC_AGENT).toBe("copilot");
218
+ });
219
+
220
+ test("launcher script generated from buildLauncherEnv contains no inherited secret values", () => {
221
+ const env = buildLauncherEnv({ ATOMIC_AGENT: "copilot" }, devcontainerEnv);
222
+ const { script } = withMockPlatform("linux", () =>
223
+ buildLauncherScript("copilot", [], "/repo", env)
224
+ );
225
+
226
+ expect(script).not.toContain("gh-secret");
227
+ expect(script).not.toContain("copilot-secret");
228
+ expect(script).not.toContain("anthropic-secret");
229
+ expect(script).toContain('export LANG="en_US.UTF-8"');
230
+ expect(script).toContain('export ATOMIC_AGENT="copilot"');
231
+ });
232
+ });
233
+
234
+ describe("resolveChatCommand", () => {
235
+ test("uses COPILOT_CLI_PATH for Copilot even when command is outside PATH", () => {
236
+ withEnvVar("COPILOT_CLI_PATH", "/custom/bin/copilot-custom", () => {
237
+ expect(resolveChatCommand("copilot")).toBe("/custom/bin/copilot-custom");
238
+ });
239
+ });
240
+
241
+ test("launcher script accepts resolved Copilot path", () => {
242
+ const resolvedCopilotPath = "/custom/bin/copilot-custom";
243
+ const { script } = withMockPlatform("linux", () =>
244
+ buildLauncherScript(resolvedCopilotPath, ["--debug"], "/repo", {
245
+ ATOMIC_AGENT: "copilot",
246
+ })
247
+ );
248
+
249
+ expect(script).toContain('"/custom/bin/copilot-custom" "--debug"');
250
+ expect(script).not.toContain('"copilot" "--debug"');
251
+ });
60
252
  });