@bastani/atomic 0.5.4 → 0.5.5-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 (173) hide show
  1. package/README.md +44 -1
  2. package/dist/lib/path-root-guard.d.ts +4 -0
  3. package/dist/lib/path-root-guard.d.ts.map +1 -0
  4. package/dist/sdk/components/color-utils.d.ts +1 -0
  5. package/dist/sdk/components/color-utils.d.ts.map +1 -0
  6. package/dist/sdk/components/connectors.d.ts +3 -2
  7. package/dist/sdk/components/connectors.d.ts.map +1 -0
  8. package/dist/sdk/components/connectors.test.d.ts +1 -0
  9. package/dist/sdk/components/connectors.test.d.ts.map +1 -0
  10. package/dist/sdk/components/edge.d.ts +2 -1
  11. package/dist/sdk/components/edge.d.ts.map +1 -0
  12. package/dist/sdk/components/error-boundary.d.ts +1 -0
  13. package/dist/sdk/components/error-boundary.d.ts.map +1 -0
  14. package/dist/sdk/components/graph-theme.d.ts +2 -1
  15. package/dist/sdk/components/graph-theme.d.ts.map +1 -0
  16. package/dist/sdk/components/header.d.ts +1 -0
  17. package/dist/sdk/components/header.d.ts.map +1 -0
  18. package/dist/sdk/components/hooks.d.ts +15 -0
  19. package/dist/sdk/components/hooks.d.ts.map +1 -0
  20. package/dist/sdk/components/layout.d.ts +2 -1
  21. package/dist/sdk/components/layout.d.ts.map +1 -0
  22. package/dist/sdk/components/layout.test.d.ts +1 -0
  23. package/dist/sdk/components/layout.test.d.ts.map +1 -0
  24. package/dist/sdk/components/node-card.d.ts +5 -3
  25. package/dist/sdk/components/node-card.d.ts.map +1 -0
  26. package/dist/sdk/components/orchestrator-panel-contexts.d.ts +3 -2
  27. package/dist/sdk/components/orchestrator-panel-contexts.d.ts.map +1 -0
  28. package/dist/sdk/components/orchestrator-panel-store.d.ts +2 -1
  29. package/dist/sdk/components/orchestrator-panel-store.d.ts.map +1 -0
  30. package/dist/sdk/components/orchestrator-panel-store.test.d.ts +1 -0
  31. package/dist/sdk/components/orchestrator-panel-store.test.d.ts.map +1 -0
  32. package/dist/sdk/components/orchestrator-panel-types.d.ts +1 -0
  33. package/dist/sdk/components/orchestrator-panel-types.d.ts.map +1 -0
  34. package/dist/sdk/components/orchestrator-panel.d.ts +2 -1
  35. package/dist/sdk/components/orchestrator-panel.d.ts.map +1 -0
  36. package/dist/sdk/components/session-graph-panel.d.ts +1 -0
  37. package/dist/sdk/components/session-graph-panel.d.ts.map +1 -0
  38. package/dist/sdk/components/status-helpers.d.ts +2 -1
  39. package/dist/sdk/components/status-helpers.d.ts.map +1 -0
  40. package/dist/sdk/components/statusline.d.ts +2 -1
  41. package/dist/sdk/components/statusline.d.ts.map +1 -0
  42. package/dist/sdk/components/workflow-picker-panel.d.ts +11 -8
  43. package/dist/sdk/components/workflow-picker-panel.d.ts.map +1 -0
  44. package/dist/sdk/define-workflow.d.ts +2 -1
  45. package/dist/sdk/define-workflow.d.ts.map +1 -0
  46. package/dist/sdk/define-workflow.test.d.ts +1 -0
  47. package/dist/sdk/define-workflow.test.d.ts.map +1 -0
  48. package/dist/sdk/errors.d.ts +3 -0
  49. package/dist/sdk/errors.d.ts.map +1 -0
  50. package/dist/sdk/errors.test.d.ts +2 -0
  51. package/dist/sdk/errors.test.d.ts.map +1 -0
  52. package/dist/sdk/index.d.ts +7 -6
  53. package/dist/sdk/index.d.ts.map +1 -0
  54. package/dist/sdk/providers/claude.d.ts +17 -6
  55. package/dist/sdk/providers/claude.d.ts.map +1 -0
  56. package/dist/sdk/providers/copilot.d.ts +2 -5
  57. package/dist/sdk/providers/copilot.d.ts.map +1 -0
  58. package/dist/sdk/providers/opencode.d.ts +2 -5
  59. package/dist/sdk/providers/opencode.d.ts.map +1 -0
  60. package/dist/sdk/runtime/discovery.d.ts +2 -1
  61. package/dist/sdk/runtime/discovery.d.ts.map +1 -0
  62. package/dist/sdk/runtime/executor-entry.d.ts +1 -0
  63. package/dist/sdk/runtime/executor-entry.d.ts.map +1 -0
  64. package/dist/sdk/runtime/executor.d.ts +3 -6
  65. package/dist/sdk/runtime/executor.d.ts.map +1 -0
  66. package/dist/sdk/runtime/executor.test.d.ts +1 -0
  67. package/dist/sdk/runtime/executor.test.d.ts.map +1 -0
  68. package/dist/sdk/runtime/graph-inference.d.ts +1 -0
  69. package/dist/sdk/runtime/graph-inference.d.ts.map +1 -0
  70. package/dist/sdk/runtime/loader.d.ts +5 -7
  71. package/dist/sdk/runtime/loader.d.ts.map +1 -0
  72. package/dist/sdk/runtime/panel.d.ts +3 -2
  73. package/dist/sdk/runtime/panel.d.ts.map +1 -0
  74. package/dist/sdk/runtime/theme.d.ts +1 -0
  75. package/dist/sdk/runtime/theme.d.ts.map +1 -0
  76. package/dist/sdk/runtime/tmux.d.ts +26 -8
  77. package/dist/sdk/runtime/tmux.d.ts.map +1 -0
  78. package/dist/sdk/types.d.ts +23 -1
  79. package/dist/sdk/types.d.ts.map +1 -0
  80. package/dist/sdk/workflows/builtin/deep-research-codebase/claude/index.d.ts +1 -0
  81. package/dist/sdk/workflows/builtin/deep-research-codebase/claude/index.d.ts.map +1 -0
  82. package/dist/sdk/workflows/builtin/deep-research-codebase/copilot/index.d.ts +1 -0
  83. package/dist/sdk/workflows/builtin/deep-research-codebase/copilot/index.d.ts.map +1 -0
  84. package/dist/sdk/workflows/builtin/deep-research-codebase/helpers/heuristic.d.ts +1 -0
  85. package/dist/sdk/workflows/builtin/deep-research-codebase/helpers/heuristic.d.ts.map +1 -0
  86. package/dist/sdk/workflows/builtin/deep-research-codebase/helpers/prompts.d.ts +2 -1
  87. package/dist/sdk/workflows/builtin/deep-research-codebase/helpers/prompts.d.ts.map +1 -0
  88. package/dist/sdk/workflows/builtin/deep-research-codebase/helpers/scout.d.ts +1 -0
  89. package/dist/sdk/workflows/builtin/deep-research-codebase/helpers/scout.d.ts.map +1 -0
  90. package/dist/sdk/workflows/builtin/deep-research-codebase/opencode/index.d.ts +1 -0
  91. package/dist/sdk/workflows/builtin/deep-research-codebase/opencode/index.d.ts.map +1 -0
  92. package/dist/sdk/workflows/builtin/ralph/claude/index.d.ts +1 -0
  93. package/dist/sdk/workflows/builtin/ralph/claude/index.d.ts.map +1 -0
  94. package/dist/sdk/workflows/builtin/ralph/copilot/index.d.ts +1 -0
  95. package/dist/sdk/workflows/builtin/ralph/copilot/index.d.ts.map +1 -0
  96. package/dist/sdk/workflows/builtin/ralph/helpers/git.d.ts +1 -0
  97. package/dist/sdk/workflows/builtin/ralph/helpers/git.d.ts.map +1 -0
  98. package/dist/sdk/workflows/builtin/ralph/helpers/prompts.d.ts +1 -0
  99. package/dist/sdk/workflows/builtin/ralph/helpers/prompts.d.ts.map +1 -0
  100. package/dist/sdk/workflows/builtin/ralph/helpers/review.d.ts +2 -1
  101. package/dist/sdk/workflows/builtin/ralph/helpers/review.d.ts.map +1 -0
  102. package/dist/sdk/workflows/builtin/ralph/opencode/index.d.ts +1 -0
  103. package/dist/sdk/workflows/builtin/ralph/opencode/index.d.ts.map +1 -0
  104. package/dist/sdk/workflows/index.d.ts +14 -14
  105. package/dist/sdk/workflows/index.d.ts.map +1 -0
  106. package/dist/services/config/definitions.d.ts +85 -0
  107. package/dist/services/config/definitions.d.ts.map +1 -0
  108. package/dist/services/system/copy.d.ts +77 -0
  109. package/dist/services/system/copy.d.ts.map +1 -0
  110. package/dist/services/system/detect.d.ts +75 -0
  111. package/dist/services/system/detect.d.ts.map +1 -0
  112. package/package.json +13 -34
  113. package/src/cli.ts +11 -10
  114. package/src/commands/cli/chat/index.ts +11 -11
  115. package/src/commands/cli/chat.ts +1 -1
  116. package/src/commands/cli/config.ts +10 -9
  117. package/src/commands/cli/init/index.ts +11 -11
  118. package/src/commands/cli/init/onboarding.ts +4 -4
  119. package/src/commands/cli/init/scm.ts +5 -5
  120. package/src/commands/cli/init.ts +1 -1
  121. package/src/commands/cli/workflow-command.test.ts +19 -11
  122. package/src/commands/cli/workflow.test.ts +2 -2
  123. package/src/commands/cli/workflow.ts +6 -6
  124. package/src/lib/merge.ts +17 -31
  125. package/src/lib/path-root-guard.ts +2 -2
  126. package/src/lib/spawn.ts +13 -7
  127. package/src/scripts/bump-version.ts +1 -1
  128. package/src/scripts/constants.ts +2 -2
  129. package/src/sdk/components/header.tsx +21 -23
  130. package/src/sdk/components/hooks.ts +21 -0
  131. package/src/sdk/components/node-card.tsx +3 -2
  132. package/src/sdk/components/session-graph-panel.tsx +14 -18
  133. package/src/sdk/components/workflow-picker-panel.tsx +201 -216
  134. package/src/sdk/errors.test.ts +56 -0
  135. package/src/sdk/errors.ts +5 -0
  136. package/src/sdk/providers/claude.ts +279 -70
  137. package/src/sdk/providers/copilot.ts +17 -27
  138. package/src/sdk/providers/opencode.ts +17 -27
  139. package/src/sdk/runtime/discovery.ts +18 -18
  140. package/src/sdk/runtime/executor.test.ts +15 -48
  141. package/src/sdk/runtime/executor.ts +152 -121
  142. package/src/sdk/runtime/loader.ts +16 -21
  143. package/src/sdk/runtime/tmux.ts +95 -32
  144. package/src/sdk/types.ts +45 -0
  145. package/src/sdk/workflows/builtin/deep-research-codebase/claude/index.ts +27 -0
  146. package/src/sdk/workflows/builtin/deep-research-codebase/helpers/prompts.ts +25 -16
  147. package/src/sdk/workflows/builtin/deep-research-codebase/helpers/scout.ts +25 -24
  148. package/src/sdk/workflows/builtin/ralph/claude/index.ts +5 -0
  149. package/src/sdk/workflows/index.ts +3 -3
  150. package/src/services/config/atomic-config.ts +7 -8
  151. package/src/services/config/atomic-global-config.ts +9 -9
  152. package/src/services/config/config-path.ts +1 -1
  153. package/src/services/config/definitions.ts +3 -4
  154. package/src/services/config/index.ts +1 -1
  155. package/src/services/config/settings.ts +30 -36
  156. package/src/services/system/agents.ts +3 -3
  157. package/src/services/system/auto-sync.ts +9 -9
  158. package/src/services/system/copy.ts +9 -9
  159. package/src/services/system/file-lock.ts +2 -2
  160. package/src/services/system/install-ui.ts +2 -2
  161. package/src/services/system/skills.ts +1 -1
  162. package/src/theme/colors.ts +1 -1
  163. package/src/theme/logo.ts +1 -1
  164. package/tsconfig.json +3 -4
  165. package/dist/chunk-1gb5qxz9.js +0 -1
  166. package/dist/chunk-fdk7tact.js +0 -417
  167. package/dist/chunk-xkxndz5g.js +0 -1041
  168. package/dist/sdk/index.js +0 -52
  169. package/dist/sdk/workflows/builtin/ralph/claude/index.js +0 -96
  170. package/dist/sdk/workflows/builtin/ralph/copilot/index.js +0 -119
  171. package/dist/sdk/workflows/builtin/ralph/opencode/index.js +0 -148
  172. package/dist/sdk/workflows/index.js +0 -100
  173. package/src/commands/cli/chat/client.ts +0 -18
@@ -7,12 +7,11 @@
7
7
  * 2) global `~/.atomic/settings.json` (default fallback)
8
8
  */
9
9
 
10
- import { readFile, writeFile } from "fs/promises";
11
- import { join, dirname } from "path";
12
- import { homedir } from "os";
13
- import { type SourceControlType } from "@/services/config/index.ts";
14
- import { SETTINGS_SCHEMA_URL } from "@/services/config/settings-schema.ts";
15
- import { ensureDir } from "@/services/system/copy.ts";
10
+ import { join, dirname } from "node:path";
11
+ import { homedir } from "node:os";
12
+ import { type SourceControlType } from "./index.ts";
13
+ import { SETTINGS_SCHEMA_URL } from "./settings-schema.ts";
14
+ import { ensureDir } from "../system/copy.ts";
16
15
 
17
16
  const SETTINGS_DIR = ".atomic";
18
17
  const SETTINGS_FILENAME = "settings.json";
@@ -42,7 +41,7 @@ function getLocalSettingsPath(projectDir: string): string {
42
41
 
43
42
  async function readJsonFile(path: string): Promise<JsonRecord | null> {
44
43
  try {
45
- return JSON.parse(await readFile(path, "utf-8")) as JsonRecord;
44
+ return await Bun.file(path).json() as JsonRecord;
46
45
  } catch {
47
46
  return null;
48
47
  }
@@ -112,7 +111,7 @@ export async function saveAtomicConfig(
112
111
  };
113
112
 
114
113
  await ensureDir(dirname(localPath));
115
- await writeFile(localPath, JSON.stringify(nextSettings, null, 2) + "\n", "utf-8");
114
+ await Bun.write(localPath, JSON.stringify(nextSettings, null, 2) + "\n");
116
115
  }
117
116
 
118
117
  /**
@@ -1,10 +1,10 @@
1
- import { copyFile, lstat, readdir, rm, rmdir } from "fs/promises";
2
- import { join, resolve } from "path";
3
- import { homedir } from "os";
1
+ import { copyFile, lstat, readdir, rm, rmdir } from "node:fs/promises";
2
+ import { join, resolve } from "node:path";
3
+ import { homedir } from "node:os";
4
4
 
5
- import { AGENT_CONFIG, type AgentKey } from "@/services/config/index.ts";
6
- import { mergeJsonFile } from "@/lib/merge.ts";
7
- import { copyDir, ensureDir, pathExists } from "@/services/system/copy.ts";
5
+ import { AGENT_CONFIG, getAgentKeys, type AgentKey } from "./index.ts";
6
+ import { mergeJsonFile } from "../../lib/merge.ts";
7
+ import { copyDir, ensureDir, pathExists } from "../system/copy.ts";
8
8
 
9
9
 
10
10
  const ATOMIC_HOME_DIR = join(homedir(), ".atomic");
@@ -196,7 +196,7 @@ export async function removeAtomicManagedGlobalAgentConfigs(
196
196
  configRoot: string,
197
197
  baseDir: string = ATOMIC_HOME_DIR,
198
198
  ): Promise<void> {
199
- const agentKeys = Object.keys(AGENT_CONFIG) as AgentKey[];
199
+ const agentKeys = getAgentKeys();
200
200
 
201
201
  for (const agentKey of agentKeys) {
202
202
  const sourceFolder = join(configRoot, getTemplateAgentFolder(agentKey));
@@ -256,7 +256,7 @@ export async function syncAtomicGlobalAgentConfigs(
256
256
  ): Promise<void> {
257
257
  await ensureDir(baseDir);
258
258
 
259
- const agentKeys = Object.keys(AGENT_CONFIG) as AgentKey[];
259
+ const agentKeys = getAgentKeys();
260
260
  for (const agentKey of agentKeys) {
261
261
  const sourceFolder = join(configRoot, getTemplateAgentFolder(agentKey));
262
262
  if (!(await pathExists(sourceFolder))) continue;
@@ -300,7 +300,7 @@ export async function hasAtomicGlobalAgentConfigs(
300
300
  configRoot: string,
301
301
  baseDir: string = ATOMIC_HOME_DIR,
302
302
  ): Promise<boolean> {
303
- const agentKeys = Object.keys(AGENT_CONFIG) as AgentKey[];
303
+ const agentKeys = getAgentKeys();
304
304
 
305
305
  for (const agentKey of agentKeys) {
306
306
  const sourceFolder = join(configRoot, getTemplateAgentFolder(agentKey));
@@ -6,7 +6,7 @@
6
6
  * 2. npm/bun installed: Installed via `bun add -g @bastani/atomic`
7
7
  */
8
8
 
9
- import { join } from "path";
9
+ import { join } from "node:path";
10
10
 
11
11
  /**
12
12
  * Get the root directory where config folders (.claude, .opencode, .github) are stored.
@@ -119,13 +119,12 @@ export function getAgentKeys(): AgentKey[] {
119
119
  * Source Control Management (SCM) configuration definitions
120
120
  */
121
121
 
122
- /** Supported source control types */
123
- export type SourceControlType = "github" | "sapling";
124
- // Future: | 'azure-devops'
125
-
126
122
  /** SCM keys for iteration */
127
123
  const SCM_KEYS = ["github", "sapling"] as const;
128
124
 
125
+ /** Supported source control types — derived from SCM_KEYS tuple. */
126
+ export type SourceControlType = (typeof SCM_KEYS)[number];
127
+
129
128
  export interface ScmConfig {
130
129
  /** Internal identifier */
131
130
  name: string;
@@ -4,4 +4,4 @@
4
4
  * Centralized access to the CLI's agent and SCM configuration.
5
5
  */
6
6
 
7
- export * from "@/services/config/definitions.ts";
7
+ export * from "./definitions.ts";
@@ -9,12 +9,12 @@
9
9
  * The --model CLI flag takes precedence over both (handled at call site).
10
10
  */
11
11
 
12
- import { readFileSync, writeFileSync, existsSync } from "node:fs";
13
12
  import { join, dirname, resolve } from "node:path";
14
13
  import { homedir } from "node:os";
15
- import { SETTINGS_SCHEMA_URL } from "@/services/config/settings-schema.ts";
16
- import { ensureDirSync } from "@/services/system/copy.ts";
17
- import type { AgentKey } from "@/services/config/definitions.ts";
14
+ import { SETTINGS_SCHEMA_URL } from "./settings-schema.ts";
15
+ import { ensureDir } from "../system/copy.ts";
16
+ import { errorMessage } from "../../sdk/errors.ts";
17
+ import type { AgentKey, SourceControlType } from "./definitions.ts";
18
18
 
19
19
  export interface TrustedPathEntry {
20
20
  workspacePath: string;
@@ -23,10 +23,16 @@ export interface TrustedPathEntry {
23
23
 
24
24
  interface AtomicSettings {
25
25
  $schema?: string;
26
- scm?: "github" | "sapling";
26
+ scm?: SourceControlType;
27
27
  version?: number;
28
28
  lastUpdated?: string;
29
29
  trustedPaths?: TrustedPathEntry[];
30
+ telemetryEnabled?: boolean;
31
+ }
32
+
33
+ /** Runtime guard for parsed JSON to ensure it's a plain object. */
34
+ function isPlainObject(value: unknown): value is Record<string, unknown> {
35
+ return typeof value === "object" && value !== null && !Array.isArray(value);
30
36
  }
31
37
 
32
38
  /** Global settings path: ~/.atomic/settings.json */
@@ -35,31 +41,21 @@ function globalSettingsPath(): string {
35
41
  return join(home, ".atomic", "settings.json");
36
42
  }
37
43
 
38
- function loadSettingsFileSync(path: string): AtomicSettings {
39
- try {
40
- if (existsSync(path)) {
41
- return JSON.parse(readFileSync(path, "utf-8")) as AtomicSettings;
42
- }
43
- } catch {
44
- // Silently fail
45
- }
46
- return {};
47
- }
48
-
49
44
  async function loadSettingsFile(path: string): Promise<AtomicSettings> {
50
45
  try {
51
- return await Bun.file(path).json() as AtomicSettings;
46
+ const parsed: unknown = await Bun.file(path).json();
47
+ if (isPlainObject(parsed)) return parsed as AtomicSettings;
52
48
  } catch {
53
- // Silently fail (file doesn't exist or invalid JSON)
49
+ // File missing or invalid JSON fall through to default
54
50
  }
55
51
  return {};
56
52
  }
57
53
 
58
- function writeGlobalSettingsSync(settings: AtomicSettings): void {
54
+ async function writeGlobalSettings(settings: AtomicSettings): Promise<void> {
55
+ settings.$schema = SETTINGS_SCHEMA_URL;
59
56
  const path = globalSettingsPath();
60
- const dir = dirname(path);
61
- if (!existsSync(dir)) ensureDirSync(dir);
62
- writeFileSync(path, JSON.stringify(settings, null, 2), "utf-8");
57
+ await ensureDir(dirname(path));
58
+ await Bun.write(path, JSON.stringify(settings, null, 2));
63
59
  }
64
60
 
65
61
  function normalizeTrustedPathEntry(entry: TrustedPathEntry): TrustedPathEntry {
@@ -102,33 +98,31 @@ export async function isTrustedWorkspacePath(
102
98
  );
103
99
  }
104
100
 
105
- export function upsertTrustedWorkspacePath(
101
+ export async function upsertTrustedWorkspacePath(
106
102
  workspacePath: string,
107
103
  provider: AgentKey,
108
- ): void {
104
+ ): Promise<void> {
109
105
  try {
110
- const settings = loadSettingsFileSync(globalSettingsPath());
111
- settings.$schema = SETTINGS_SCHEMA_URL;
106
+ const settings = await loadSettingsFile(globalSettingsPath());
112
107
  settings.trustedPaths = normalizeTrustedPaths([
113
108
  ...(settings.trustedPaths ?? []),
114
109
  { workspacePath, provider },
115
110
  ]);
116
- writeGlobalSettingsSync(settings);
117
- } catch {
118
- // Silently fail
111
+ await writeGlobalSettings(settings);
112
+ } catch (e) {
113
+ console.warn(`[settings] failed to upsert trusted path: ${errorMessage(e)}`);
119
114
  }
120
115
  }
121
116
 
122
117
  /**
123
118
  * Set telemetry enabled/disabled in global settings.
124
119
  */
125
- export function setTelemetryEnabled(enabled: boolean): void {
120
+ export async function setTelemetryEnabled(enabled: boolean): Promise<void> {
126
121
  try {
127
- const settings = loadSettingsFileSync(globalSettingsPath());
128
- settings.$schema = SETTINGS_SCHEMA_URL;
129
- (settings as Record<string, unknown>).telemetryEnabled = enabled;
130
- writeGlobalSettingsSync(settings);
131
- } catch {
132
- // Silently fail
122
+ const settings = await loadSettingsFile(globalSettingsPath());
123
+ settings.telemetryEnabled = enabled;
124
+ await writeGlobalSettings(settings);
125
+ } catch (e) {
126
+ console.warn(`[settings] failed to set telemetry: ${errorMessage(e)}`);
133
127
  }
134
128
  }
@@ -17,14 +17,14 @@
17
17
  * source is left untouched).
18
18
  */
19
19
 
20
- import { join, dirname } from "path";
21
- import { homedir } from "os";
20
+ import { join, dirname } from "node:path";
21
+ import { homedir } from "node:os";
22
22
  import {
23
23
  copyDir,
24
24
  copyFile,
25
25
  ensureDir,
26
26
  pathExists,
27
- } from "@/services/system/copy.ts";
27
+ } from "./copy.ts";
28
28
 
29
29
  /**
30
30
  * Locate the package root by walking up from this module. Both in installed
@@ -31,20 +31,20 @@
31
31
  * launch.
32
32
  */
33
33
 
34
- import { join } from "path";
35
- import { homedir } from "os";
36
- import { VERSION } from "@/version.ts";
37
- import { COLORS } from "@/theme/colors.ts";
34
+ import { join } from "node:path";
35
+ import { homedir } from "node:os";
36
+ import { VERSION } from "../../version.ts";
37
+ import { COLORS } from "../../theme/colors.ts";
38
38
  import {
39
39
  ensureNpmInstalled,
40
40
  ensureTmuxInstalled,
41
41
  upgradePlaywrightCli,
42
42
  upgradeLiteparse,
43
- } from "@/lib/spawn.ts";
44
- import { installGlobalAgents } from "@/services/system/agents.ts";
45
- import { installGlobalSkills } from "@/services/system/skills.ts";
46
- import { runSteps, printSummary } from "@/services/system/install-ui.ts";
47
- import { displayBlockBanner } from "@/theme/logo.ts";
43
+ } from "../../lib/spawn.ts";
44
+ import { installGlobalAgents } from "./agents.ts";
45
+ import { installGlobalSkills } from "./skills.ts";
46
+ import { runSteps, printSummary } from "./install-ui.ts";
47
+ import { displayBlockBanner } from "../../theme/logo.ts";
48
48
 
49
49
  /** Path to the version marker. Honors ATOMIC_SETTINGS_HOME for tests. */
50
50
  function syncMarkerPath(): string {
@@ -2,9 +2,15 @@
2
2
  * Utilities for copying directories and files with exclusions
3
3
  */
4
4
 
5
- import { readdir, mkdir, stat, readFile } from "fs/promises";
6
- import { mkdirSync } from "fs";
7
- import { join, extname, relative, resolve } from "path";
5
+ import { readdir, mkdir, stat, readFile } from "node:fs/promises";
6
+ import { mkdirSync } from "node:fs";
7
+ import { join, extname, relative, resolve } from "node:path";
8
+ import { getOppositeScriptExtension } from "./detect.ts";
9
+ import {
10
+ assertPathWithinRoot,
11
+ assertRealPathWithinRoot,
12
+ isPathWithinRoot,
13
+ } from "../../lib/path-root-guard.ts";
8
14
 
9
15
  /**
10
16
  * Safely create a directory (and parents) without throwing on EEXIST.
@@ -46,12 +52,6 @@ export function ensureDirSync(path: string): void {
46
52
  throw error;
47
53
  }
48
54
  }
49
- import { getOppositeScriptExtension } from "@/services/system/detect.ts";
50
- import {
51
- assertPathWithinRoot,
52
- assertRealPathWithinRoot,
53
- isPathWithinRoot,
54
- } from "@/lib/path-root-guard.ts";
55
55
 
56
56
  /**
57
57
  * Normalize a path for cross-platform comparison.
@@ -8,8 +8,8 @@
8
8
  */
9
9
 
10
10
  import { existsSync, writeFileSync, readFileSync, unlinkSync, readdirSync } from "node:fs";
11
- import { join, dirname } from "path";
12
- import { ensureDirSync } from "@/services/system/copy.ts";
11
+ import { join, dirname } from "node:path";
12
+ import { ensureDirSync } from "./copy.ts";
13
13
 
14
14
  // ============================================================================
15
15
  // TYPES
@@ -23,11 +23,11 @@
23
23
  * library, just what auto-sync needs to stop being visually noisy.
24
24
  */
25
25
 
26
- import { COLORS } from "@/theme/colors.ts";
26
+ import { COLORS } from "../../theme/colors.ts";
27
27
  import {
28
28
  supportsTrueColor,
29
29
  supports256Color,
30
- } from "@/services/system/detect.ts";
30
+ } from "./detect.ts";
31
31
 
32
32
  const BAR_WIDTH = 30;
33
33
  const BAR_FILLED = "■";
@@ -6,7 +6,7 @@
6
6
  * locally per-project based on the user's selected SCM + active agent.
7
7
  */
8
8
 
9
- import { ALL_SCM_SKILLS } from "@/services/config/index.ts";
9
+ import { ALL_SCM_SKILLS } from "../config/index.ts";
10
10
 
11
11
  const SKILLS_REPO = "https://github.com/flora131/atomic.git";
12
12
  const SKILLS_AGENTS = ["claude-code", "opencode", "github-copilot"] as const;
@@ -1,4 +1,4 @@
1
- import { supportsColor, supportsTrueColor } from "@/services/system/detect.ts";
1
+ import { supportsColor, supportsTrueColor } from "../services/system/detect.ts";
2
2
 
3
3
  /**
4
4
  * ANSI color and formatting codes for CLI output
package/src/theme/logo.ts CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  supportsTrueColor,
9
9
  supports256Color,
10
10
  supportsColor,
11
- } from "@/services/system/detect.ts";
11
+ } from "../services/system/detect.ts";
12
12
 
13
13
  export const ATOMIC_BLOCK_LOGO = [
14
14
  "█▀▀█ ▀▀█▀▀ █▀▀█ █▀▄▀█ ▀█▀ █▀▀",
package/tsconfig.json CHANGED
@@ -3,13 +3,12 @@
3
3
  // Environment setup & latest features
4
4
  "lib": ["ESNext", "DOM"],
5
5
  "target": "ESNext",
6
- "module": "ESNext",
6
+ "module": "Preserve",
7
+ "moduleDetection": "force",
7
8
  "jsx": "react-jsx",
9
+ "allowJs": true,
8
10
 
9
11
  // Bundler mode
10
- "paths": {
11
- "@/*": ["./src/*"]
12
- },
13
12
  "jsxImportSource": "@opentui/react",
14
13
  "moduleResolution": "bundler",
15
14
  "allowImportingTsExtensions": true,
@@ -1 +0,0 @@
1
- // @bun