@atlasharness/atlascode 0.1.97 → 0.1.99

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 (2) hide show
  1. package/dist/cli.js +142 -109
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -183,8 +183,9 @@ function buildUserAgent() {
183
183
  function buildWebFetchUserAgent() {
184
184
  return `Atlas-User (${PRODUCT_NAME}/${getVersion()}; ${REPOSITORY_URL})`;
185
185
  }
186
- var PRODUCT_NAME = "AtlasCode", REPOSITORY_URL = "https://github.com/vincentlau2046/AtlasCode", PRODUCT_FAMILY = "Atlas", PRODUCT_BRAND = "AtlasCode", VERSION;
186
+ var PRODUCT_NAME = "AtlasCode", REPOSITORY_URL = "https://github.com/vincentlau2046/AtlasCode", REPOSITORY_SLUG, PRODUCT_FAMILY = "Atlas", PRODUCT_BRAND = "AtlasCode", VERSION;
187
187
  var init_identity = __esm(() => {
188
+ REPOSITORY_SLUG = REPOSITORY_URL.replace(/^https:\/\/[^/]+\//, "");
188
189
  VERSION = (() => {
189
190
  try {
190
191
  let d = dirname(realpathSync(process.argv[1] ?? ""));
@@ -612,14 +613,28 @@ var init_constants = __esm(() => {
612
613
  });
613
614
 
614
615
  // src/shared/configDir.ts
616
+ function setConfigDirNameProvider(provider) {
617
+ _provider = provider;
618
+ }
615
619
  function getConfigDirName() {
620
+ const fullDir = process.env.ATLAS_CONFIG_DIR;
621
+ if (fullDir) {
622
+ return fullDir;
623
+ }
624
+ return getConfigDirNameForProject();
625
+ }
626
+ function getConfigDirNameForProject() {
616
627
  const override = process.env.ATLAS_CONFIG_DIR_NAME;
617
628
  if (override) {
618
629
  return override;
619
630
  }
631
+ const productDefault = _provider ? _provider() : undefined;
632
+ if (productDefault) {
633
+ return productDefault;
634
+ }
620
635
  return NEW_CONFIG_DIR;
621
636
  }
622
- var NEW_CONFIG_DIR = ".atlas";
637
+ var NEW_CONFIG_DIR = ".atlas", _provider = null;
623
638
 
624
639
  // src/shared/fs-operations.ts
625
640
  import * as fs from "fs";
@@ -796,10 +811,10 @@ var init_platform = __esm(() => {
796
811
  // src/shared/tempDir.ts
797
812
  function getAtlasTempDirName() {
798
813
  if (getPlatform() === "windows") {
799
- return getConfigDirName();
814
+ return getConfigDirNameForProject();
800
815
  }
801
816
  const uid = process.getuid?.() ?? 0;
802
- return `${getConfigDirName()}-${uid}`;
817
+ return `${getConfigDirNameForProject()}-${uid}`;
803
818
  }
804
819
  var init_tempDir = __esm(() => {
805
820
  init_platform();
@@ -1108,6 +1123,18 @@ var init_teammateContext = __esm(() => {
1108
1123
  teammateContextStorage = new AsyncLocalStorage;
1109
1124
  });
1110
1125
 
1126
+ // src/shared/ProductDefinition.ts
1127
+ function getActiveProductDefinition() {
1128
+ return ACTIVE_PRODUCT;
1129
+ }
1130
+ var ATLASCODE_PRODUCT, ACTIVE_PRODUCT;
1131
+ var init_ProductDefinition = __esm(() => {
1132
+ ATLASCODE_PRODUCT = Object.freeze({
1133
+ id: "atlascode"
1134
+ });
1135
+ ACTIVE_PRODUCT = ATLASCODE_PRODUCT;
1136
+ });
1137
+
1111
1138
  // src/shared/index.ts
1112
1139
  var init_shared = __esm(() => {
1113
1140
  init_feature();
@@ -1129,6 +1156,7 @@ var init_shared = __esm(() => {
1129
1156
  init_swarmSchemaFilter();
1130
1157
  init_agentRoleTemplates();
1131
1158
  init_teammateContext();
1159
+ init_ProductDefinition();
1132
1160
  });
1133
1161
 
1134
1162
  // node_modules/openai/internal/tslib.mjs
@@ -28870,14 +28898,14 @@ var init_queryWithRoleFallback = __esm(() => {
28870
28898
 
28871
28899
  // src/modelprovider/index.ts
28872
28900
  function getModelProvider() {
28873
- _provider ??= new OpenAIProvider(3, LLM_TIMEOUT_DEFAULT_MS, () => resolveLlmTimeoutMs(process.env.ATLAS_LLM_TIMEOUT, llmTimeoutSettingsSource?.()));
28901
+ _provider2 ??= new OpenAIProvider(3, LLM_TIMEOUT_DEFAULT_MS, () => resolveLlmTimeoutMs(process.env.ATLAS_LLM_TIMEOUT, llmTimeoutSettingsSource?.()));
28874
28902
  if (!_llmTimeoutUnitHintWarned) {
28875
28903
  _llmTimeoutUnitHintWarned = true;
28876
28904
  const hint = llmTimeoutUnitHint(resolveLlmTimeoutMs(process.env.ATLAS_LLM_TIMEOUT, llmTimeoutSettingsSource?.()));
28877
28905
  if (hint)
28878
28906
  logForDebugging(hint, { level: "warn" });
28879
28907
  }
28880
- return _provider;
28908
+ return _provider2;
28881
28909
  }
28882
28910
  function setLlmTimeoutSettingsSource(next) {
28883
28911
  llmTimeoutSettingsSource = next;
@@ -28915,7 +28943,7 @@ function lazyProxy(resolve) {
28915
28943
  }
28916
28944
  });
28917
28945
  }
28918
- var _provider, _llmTimeoutUnitHintWarned = false, llmTimeoutSettingsSource = null, modelProvider;
28946
+ var _provider2, _llmTimeoutUnitHintWarned = false, llmTimeoutSettingsSource = null, modelProvider;
28919
28947
  var init_modelprovider2 = __esm(() => {
28920
28948
  init_modelprovider();
28921
28949
  init_constants2();
@@ -29748,12 +29776,12 @@ var _env2 = null;
29748
29776
 
29749
29777
  // src/hooks/config-provider.ts
29750
29778
  function setHookConfigProvider(provider) {
29751
- _provider2 = provider;
29779
+ _provider3 = provider;
29752
29780
  }
29753
29781
  function getHookConfigProvider() {
29754
- return _provider2;
29782
+ return _provider3;
29755
29783
  }
29756
- var _provider2 = null;
29784
+ var _provider3 = null;
29757
29785
  // src/hooks/shell-port.ts
29758
29786
  function setHookShellPort(port) {
29759
29787
  _port = port;
@@ -30534,12 +30562,12 @@ var _env3 = null;
30534
30562
 
30535
30563
  // src/permissions/settingsPaths.ts
30536
30564
  function setSettingsPathsProvider(provider) {
30537
- _provider3 = provider;
30565
+ _provider4 = provider;
30538
30566
  }
30539
30567
  function getSettingsPaths() {
30540
- return _provider3 ? _provider3() : [];
30568
+ return _provider4 ? _provider4() : [];
30541
30569
  }
30542
- var _provider3 = null;
30570
+ var _provider4 = null;
30543
30571
 
30544
30572
  // src/permissions/filesystem.ts
30545
30573
  import { tmpdir } from "os";
@@ -30556,7 +30584,7 @@ function relativePath(from, to) {
30556
30584
  function isAtlasSettingsPath(filePath) {
30557
30585
  const expandedPath = expandPathLocal(filePath);
30558
30586
  const normalizedPath = normalizeCaseForComparison(expandedPath);
30559
- const configDir = getConfigDirName();
30587
+ const configDir = getConfigDirNameForProject();
30560
30588
  if (normalizedPath.endsWith(`${sep}${configDir}${sep}settings.json`) || normalizedPath.endsWith(`${sep}${configDir}${sep}settings.local.json`)) {
30561
30589
  return true;
30562
30590
  }
@@ -30566,7 +30594,7 @@ function isClaudeConfigFilePath(filePath) {
30566
30594
  if (isAtlasSettingsPath(filePath)) {
30567
30595
  return true;
30568
30596
  }
30569
- const configDir = getConfigDirName();
30597
+ const configDir = getConfigDirNameForProject();
30570
30598
  const originalCwd = getPermissionsBootstrapEnv().getOriginalCwd();
30571
30599
  const commandsDir = join8(originalCwd, configDir, "commands");
30572
30600
  const agentsDir = join8(originalCwd, configDir, "agents");
@@ -30602,7 +30630,7 @@ function isDangerousFilePathToAutoEdit(path) {
30602
30630
  if (normalizedSegment !== normalizeCaseForComparison(dir)) {
30603
30631
  continue;
30604
30632
  }
30605
- if (dir === getConfigDirName()) {
30633
+ if (dir === getConfigDirNameForProject()) {
30606
30634
  const nextSegment = pathSegments[i + 1];
30607
30635
  if (nextSegment && normalizeCaseForComparison(nextSegment) === "worktrees") {
30608
30636
  break;
@@ -30951,7 +30979,7 @@ var init_filesystem = __esm(() => {
30951
30979
  ".git",
30952
30980
  ".vscode",
30953
30981
  ".idea",
30954
- getConfigDirName()
30982
+ getConfigDirNameForProject()
30955
30983
  ];
30956
30984
  worktreeCwdProbeCache = new Map;
30957
30985
  _resolvedWorkingDirCache = new Map;
@@ -32902,9 +32930,9 @@ function getSettingsPaths2() {
32902
32930
  function getRelativeSettingsFilePathForSource(source) {
32903
32931
  switch (source) {
32904
32932
  case "projectSettings":
32905
- return join9(getConfigDirName(), "settings.json");
32933
+ return join9(getConfigDirNameForProject(), "settings.json");
32906
32934
  case "localSettings":
32907
- return join9(getConfigDirName(), "settings.local.json");
32935
+ return join9(getConfigDirNameForProject(), "settings.local.json");
32908
32936
  }
32909
32937
  }
32910
32938
  function getSettingsForSource(source) {
@@ -35422,7 +35450,7 @@ ${SEND_MESSAGE_TOOL_NAME}({ to: "xyz-456", message: "Two tests still failing at
35422
35450
 
35423
35451
  1. Implementation: "Fix the null pointer in src/auth/validate.ts:42. The user field can be undefined when the session expires. Add a null check and return early with an appropriate error. Commit and report the hash."
35424
35452
 
35425
- 2. Precise git operation: "Create a new branch from main called 'fix/session-expiry'. Cherry-pick only commit abc123 onto it. Push and create a draft PR targeting main. Add vincentlau2046/AtlasCode as reviewer. Report the PR URL."
35453
+ 2. Precise git operation: "Create a new branch from main called 'fix/session-expiry'. Cherry-pick only commit abc123 onto it. Push and create a draft PR targeting main. Add ${REPOSITORY_SLUG} as reviewer. Report the PR URL."
35426
35454
 
35427
35455
  3. Correction (continued worker, short): "The tests failed on the null check you added — validate.test.ts:58 expects 'Invalid session' but you changed it to 'Session expired'. Fix the assertion. Commit and report the hash."
35428
35456
 
@@ -38484,6 +38512,12 @@ function getAllBaseTools(deps = {}) {
38484
38512
  if (deps.ascendTools && isAscendToolsEnabled(env) && !restricted) {
38485
38513
  pool.push(...deps.ascendTools);
38486
38514
  }
38515
+ if (deps.productToolSubset) {
38516
+ const subset = new Set(deps.productToolSubset);
38517
+ const filtered = pool.filter((t) => subset.has(t.name));
38518
+ pool.length = 0;
38519
+ pool.push(...filtered);
38520
+ }
38487
38521
  if (deps.mcpTools)
38488
38522
  pool.push(...deps.mcpTools);
38489
38523
  const assembled = uniqByName(pool);
@@ -66889,8 +66923,8 @@ var init_readTool = __esm(() => {
66889
66923
  var ATLAS_FOLDER_PERMISSION_PATTERN, GLOBAL_ATLAS_FOLDER_PERMISSION_PATTERN, FILE_UNEXPECTEDLY_MODIFIED_ERROR = "File has been unexpectedly modified. Read it again before attempting to write it.";
66890
66924
  var init_fileEditConstants = __esm(() => {
66891
66925
  init_shared();
66892
- ATLAS_FOLDER_PERMISSION_PATTERN = `/${getConfigDirName()}/**`;
66893
- GLOBAL_ATLAS_FOLDER_PERMISSION_PATTERN = `~/${getConfigDirName()}/**`;
66926
+ ATLAS_FOLDER_PERMISSION_PATTERN = `/${getConfigDirNameForProject()}/**`;
66927
+ GLOBAL_ATLAS_FOLDER_PERMISSION_PATTERN = `~/${getConfigDirNameForProject()}/**`;
66894
66928
  });
66895
66929
 
66896
66930
  // src/engine/tools/files/fileEditUtils.ts
@@ -77295,7 +77329,7 @@ function hasCronTasksSync(dir) {
77295
77329
  }
77296
77330
  async function writeCronTasks(tasks, dir) {
77297
77331
  const root = dir ?? getSchedulerEnv().getProjectRoot();
77298
- await mkdir9(join31(root, getConfigDirName()), { recursive: true });
77332
+ await mkdir9(join31(root, getConfigDirNameForProject()), { recursive: true });
77299
77333
  const body = {
77300
77334
  tasks: tasks.map(({ durable: _durable, ...rest }) => rest)
77301
77335
  };
@@ -77389,7 +77423,7 @@ var init_cronTasks = __esm(() => {
77389
77423
  init_shared();
77390
77424
  init_cron();
77391
77425
  init_cronEnv();
77392
- CRON_FILE_REL = join31(getConfigDirName(), "scheduled_tasks.json");
77426
+ CRON_FILE_REL = join31(getConfigDirNameForProject(), "scheduled_tasks.json");
77393
77427
  DEFAULT_CRON_JITTER_CONFIG = {
77394
77428
  recurringFrac: 0.1,
77395
77429
  recurringCapMs: 15 * 60 * 1000,
@@ -77531,7 +77565,7 @@ var init_cronTasksLock = __esm(() => {
77531
77565
  init_shared();
77532
77566
  init_zod();
77533
77567
  init_cronEnv();
77534
- LOCK_FILE_REL = join32(getConfigDirName(), "scheduled_tasks.lock");
77568
+ LOCK_FILE_REL = join32(getConfigDirNameForProject(), "scheduled_tasks.lock");
77535
77569
  schedulerLockSchema = lazySchema(() => object({
77536
77570
  sessionId: string2(),
77537
77571
  pid: number2(),
@@ -80418,7 +80452,7 @@ function getWorktreeSettings() {
80418
80452
  return getInitialSettings().worktree ?? {};
80419
80453
  }
80420
80454
  function worktreesDir(repoRoot) {
80421
- return join34(repoRoot, getConfigDirName(), "worktrees");
80455
+ return join34(repoRoot, getConfigDirNameForProject(), "worktrees");
80422
80456
  }
80423
80457
  function flattenSlug(slug) {
80424
80458
  return slug.replaceAll("/", "+");
@@ -81027,7 +81061,7 @@ function getProjectDirsUpToHome(subdir, cwd) {
81027
81061
  if (normalizePathForComparison(current) === normalizePathForComparison(home)) {
81028
81062
  break;
81029
81063
  }
81030
- const configSubdir = join35(current, getConfigDirName(), subdir);
81064
+ const configSubdir = join35(current, getConfigDirNameForProject(), subdir);
81031
81065
  try {
81032
81066
  statSync5(configSubdir);
81033
81067
  dirs.push(configSubdir);
@@ -81143,15 +81177,15 @@ var init_markdownLoader = __esm(() => {
81143
81177
  init_files5();
81144
81178
  loadMarkdownFilesForSubdir = memoize2(async function(subdir, cwd) {
81145
81179
  const userDir = join35(getAtlasConfigHomeDir(), subdir);
81146
- const managedDir = join35(getManagedSettingsDir(), getConfigDirName(), subdir);
81180
+ const managedDir = join35(getManagedSettingsDir(), getConfigDirNameForProject(), subdir);
81147
81181
  const projectDirs = getProjectDirsUpToHome(subdir, cwd);
81148
81182
  const gitRoot = findGitRoot(cwd);
81149
81183
  const canonicalRoot = findCanonicalGitRoot(cwd);
81150
81184
  if (gitRoot && canonicalRoot && canonicalRoot !== gitRoot) {
81151
- const worktreeSubdir = normalizePathForComparison(join35(gitRoot, getConfigDirName(), subdir));
81185
+ const worktreeSubdir = normalizePathForComparison(join35(gitRoot, getConfigDirNameForProject(), subdir));
81152
81186
  const worktreeHasSubdir = projectDirs.some((dir) => normalizePathForComparison(dir) === worktreeSubdir);
81153
81187
  if (!worktreeHasSubdir) {
81154
- const mainConfigSubdir = join35(canonicalRoot, getConfigDirName(), subdir);
81188
+ const mainConfigSubdir = join35(canonicalRoot, getConfigDirNameForProject(), subdir);
81155
81189
  if (!projectDirs.includes(mainConfigSubdir)) {
81156
81190
  projectDirs.push(mainConfigSubdir);
81157
81191
  }
@@ -88102,7 +88136,8 @@ async function createAgentLoopDeps(config = {}) {
88102
88136
  ProposeGoalTool
88103
88137
  ],
88104
88138
  mcpTools: [...config.toolRegistryDeps?.mcpTools ?? [], ...mcpTools],
88105
- ascendTools: getDomainMount()?.tools
88139
+ ascendTools: getDomainMount()?.tools,
88140
+ productToolSubset: getActiveProductDefinition().toolSubset
88106
88141
  };
88107
88142
  teammatePoolSync?.(toolRegistryDeps);
88108
88143
  const { toolPermissionContext, warnings } = await initializeToolPermissionContext({
@@ -88186,6 +88221,7 @@ var teammatePoolSync, mcpConnectionsProvider;
88186
88221
  var init_loopDeps = __esm(() => {
88187
88222
  init_modelprovider2();
88188
88223
  init_bootstrap();
88224
+ init_shared();
88189
88225
  init_toolRegistry();
88190
88226
  init_permissionSetup();
88191
88227
  init_mcp();
@@ -91642,7 +91678,7 @@ function initDebugSink() {
91642
91678
  enabled = argvHas("--debug") || argvHas("-d") || process.argv.some((a) => a.startsWith("--debug=")) || toStderr || sinkFile !== null || isEnvTruthy(process.env.DEBUG) || isEnvTruthy(process.env.DEBUG_SDK);
91643
91679
  if (false) {}
91644
91680
  if (sinkFile === null && !toStderr) {
91645
- const configDir = process.env.ATLAS_CONFIG_DIR ?? join39(homedir14(), ".atlas");
91681
+ const configDir = process.env.ATLAS_CONFIG_DIR ?? join39(homedir14(), getConfigDirName());
91646
91682
  sinkFile = join39(configDir, "debug", `${getSessionId()}.txt`);
91647
91683
  }
91648
91684
  }
@@ -102810,12 +102846,6 @@ var init_debugFilter = __esm(() => {
102810
102846
  // src/tui/utils/configDir.ts
102811
102847
  import { existsSync as existsSync9 } from "fs";
102812
102848
  import { join as join47 } from "path";
102813
- function getConfigDirName2() {
102814
- const override = process.env.ATLAS_CONFIG_DIR_NAME;
102815
- if (override)
102816
- return override;
102817
- return NEW_CONFIG_DIR2;
102818
- }
102819
102849
  function getPluginManifestDirs() {
102820
102850
  return [PLUGIN_MANIFEST_DIR, "." + PLUGIN_MANIFEST_DIR, LEGACY_PLUGIN_MANIFEST_DIR];
102821
102851
  }
@@ -102832,7 +102862,7 @@ function findManifestInDir(dir, fileName) {
102832
102862
  }
102833
102863
  return join47(dir, PLUGIN_MANIFEST_DIR, fileName);
102834
102864
  }
102835
- var NEW_CONFIG_DIR2 = ".atlas", PLUGIN_MANIFEST_DIR = "atlas-plugin", LEGACY_PLUGIN_MANIFEST_DIR = ".claude-plugin", MEMORY_FILE_NAME = "ATLAS.md", LOCAL_MEMORY_FILE_NAME = "ATLAS.local.md";
102865
+ var PLUGIN_MANIFEST_DIR = "atlas-plugin", LEGACY_PLUGIN_MANIFEST_DIR = ".claude-plugin", MEMORY_FILE_NAME = "ATLAS.md", LOCAL_MEMORY_FILE_NAME = "ATLAS.local.md";
102836
102866
  var init_configDir = () => {};
102837
102867
 
102838
102868
  // src/tui/utils/envUtils.ts
@@ -102893,7 +102923,7 @@ var init_envUtils2 = __esm(() => {
102893
102923
  init_memoize();
102894
102924
  init_configDir();
102895
102925
  getAtlasConfigHomeDir3 = memoize_default(() => {
102896
- return (process.env.ATLAS_CONFIG_DIR ?? join48(homedir16(), getConfigDirName2())).normalize("NFC");
102926
+ return (process.env.ATLAS_CONFIG_DIR ?? join48(homedir16(), getConfigDirName())).normalize("NFC");
102897
102927
  }, () => process.env.ATLAS_CONFIG_DIR);
102898
102928
  });
102899
102929
 
@@ -129171,7 +129201,7 @@ function saveConfigWithLock(file, createDefault, mergeFn) {
129171
129201
  }
129172
129202
  const currentConfig = getConfig2(file, createDefault);
129173
129203
  if (file === getGlobalClaudeFile() && wouldLoseAuthState(currentConfig)) {
129174
- logForDebugging3("saveConfigWithLock: re-read config is missing auth that cache has; refusing to write to avoid wiping ~/getConfigDirName().json. See GH #3117.", { level: "error" });
129204
+ logForDebugging3("saveConfigWithLock: re-read config is missing auth that cache has; refusing to write to avoid wiping ~/getConfigDirNameForProject().json. See GH #3117.", { level: "error" });
129175
129205
  return false;
129176
129206
  }
129177
129207
  const mergedConfig = mergeFn(currentConfig);
@@ -129505,7 +129535,7 @@ function getMemoryPath(memoryType) {
129505
129535
  return "";
129506
129536
  }
129507
129537
  function getManagedClaudeRulesDir() {
129508
- return join60(getManagedFilePath(), getConfigDirName2(), "rules");
129538
+ return join60(getManagedFilePath(), getConfigDirNameForProject(), "rules");
129509
129539
  }
129510
129540
  function getUserClaudeRulesDir() {
129511
129541
  return join60(getAtlasConfigHomeDir3(), "rules");
@@ -131512,9 +131542,9 @@ function getSettingsFilePathForSource2(source) {
131512
131542
  function getRelativeSettingsFilePathForSource2(source) {
131513
131543
  switch (source) {
131514
131544
  case "projectSettings":
131515
- return join64(getConfigDirName2(), "settings.json");
131545
+ return join64(getConfigDirNameForProject(), "settings.json");
131516
131546
  case "localSettings":
131517
- return join64(getConfigDirName2(), "settings.local.json");
131547
+ return join64(getConfigDirNameForProject(), "settings.local.json");
131518
131548
  }
131519
131549
  }
131520
131550
  function getSettingsForSource2(source) {
@@ -138276,13 +138306,13 @@ function getLocalAgentMemoryDir(dirName) {
138276
138306
  if (process.env.ATLAS_REMOTE_MEMORY_DIR) {
138277
138307
  return join68(process.env.ATLAS_REMOTE_MEMORY_DIR, "projects", sanitizePath3(findCanonicalGitRoot2(getProjectRoot()) ?? getProjectRoot()), "agent-memory-local", dirName) + sep13;
138278
138308
  }
138279
- return join68(getCwd(), getConfigDirName2(), "agent-memory-local", dirName) + sep13;
138309
+ return join68(getCwd(), getConfigDirNameForProject(), "agent-memory-local", dirName) + sep13;
138280
138310
  }
138281
138311
  function getAgentMemoryDir(agentType, scope) {
138282
138312
  const dirName = sanitizeAgentTypeForPath(agentType);
138283
138313
  switch (scope) {
138284
138314
  case "project":
138285
- return join68(getCwd(), getConfigDirName2(), "agent-memory", dirName) + sep13;
138315
+ return join68(getCwd(), getConfigDirNameForProject(), "agent-memory", dirName) + sep13;
138286
138316
  case "local":
138287
138317
  return getLocalAgentMemoryDir(dirName);
138288
138318
  case "user":
@@ -138295,14 +138325,14 @@ function isAgentMemoryPath(absolutePath) {
138295
138325
  if (normalizedPath.startsWith(join68(memoryBase, "agent-memory") + sep13)) {
138296
138326
  return true;
138297
138327
  }
138298
- if (normalizedPath.startsWith(join68(getCwd(), getConfigDirName2(), "agent-memory") + sep13)) {
138328
+ if (normalizedPath.startsWith(join68(getCwd(), getConfigDirNameForProject(), "agent-memory") + sep13)) {
138299
138329
  return true;
138300
138330
  }
138301
138331
  if (process.env.ATLAS_REMOTE_MEMORY_DIR) {
138302
138332
  if (normalizedPath.includes(sep13 + "agent-memory-local" + sep13) && normalizedPath.startsWith(join68(process.env.ATLAS_REMOTE_MEMORY_DIR, "projects") + sep13)) {
138303
138333
  return true;
138304
138334
  }
138305
- } else if (normalizedPath.startsWith(join68(getCwd(), getConfigDirName2(), "agent-memory-local") + sep13)) {
138335
+ } else if (normalizedPath.startsWith(join68(getCwd(), getConfigDirNameForProject(), "agent-memory-local") + sep13)) {
138306
138336
  return true;
138307
138337
  }
138308
138338
  return false;
@@ -138312,7 +138342,7 @@ function getMemoryScopeDisplay(memory) {
138312
138342
  case "user":
138313
138343
  return `User (${join68(getMemoryBaseDir2(), "agent-memory")}/)`;
138314
138344
  case "project":
138315
- return "Project (getConfigDirName()/agent-memory/)";
138345
+ return "Project (getConfigDirNameForProject()/agent-memory/)";
138316
138346
  case "local":
138317
138347
  return `Local (${getLocalAgentMemoryDir("...")})`;
138318
138348
  default:
@@ -138355,8 +138385,8 @@ var init_agentMemory = __esm(() => {
138355
138385
  var FILE_EDIT_TOOL_NAME2 = "Edit", ATLAS_FOLDER_PERMISSION_PATTERN2, GLOBAL_ATLAS_FOLDER_PERMISSION_PATTERN2, FILE_UNEXPECTEDLY_MODIFIED_ERROR2 = "File has been unexpectedly modified. Read it again before attempting to write it.";
138356
138386
  var init_constants8 = __esm(() => {
138357
138387
  init_configDir();
138358
- ATLAS_FOLDER_PERMISSION_PATTERN2 = `/${getConfigDirName2()}/**`;
138359
- GLOBAL_ATLAS_FOLDER_PERMISSION_PATTERN2 = `~/${getConfigDirName2()}/**`;
138388
+ ATLAS_FOLDER_PERMISSION_PATTERN2 = `/${getConfigDirNameForProject()}/**`;
138389
+ GLOBAL_ATLAS_FOLDER_PERMISSION_PATTERN2 = `~/${getConfigDirNameForProject()}/**`;
138360
138390
  });
138361
138391
 
138362
138392
  // src/tui/utils/pdfUtils.ts
@@ -184750,7 +184780,7 @@ function generateTmuxSessionName2(repoPath, branch) {
184750
184780
  return combined.replace(/[/.]/g, "_");
184751
184781
  }
184752
184782
  function worktreesDir2(repoRoot) {
184753
- return join75(repoRoot, getConfigDirName2(), "worktrees");
184783
+ return join75(repoRoot, getConfigDirNameForProject(), "worktrees");
184754
184784
  }
184755
184785
  function flattenSlug2(slug) {
184756
184786
  return slug.replaceAll("/", "+");
@@ -197379,7 +197409,7 @@ function getAddDirEnabledPlugins() {
197379
197409
  const result = {};
197380
197410
  for (const dir of getAdditionalDirectoriesForClaudeMd()) {
197381
197411
  for (const file of SETTINGS_FILES) {
197382
- const { settings } = parseSettingsFile2(join78(dir, getConfigDirName2(), file));
197412
+ const { settings } = parseSettingsFile2(join78(dir, getConfigDirNameForProject(), file));
197383
197413
  if (!settings?.enabledPlugins) {
197384
197414
  continue;
197385
197415
  }
@@ -197392,7 +197422,7 @@ function getAddDirExtraMarketplaces() {
197392
197422
  const result = {};
197393
197423
  for (const dir of getAdditionalDirectoriesForClaudeMd()) {
197394
197424
  for (const file of SETTINGS_FILES) {
197395
- const { settings } = parseSettingsFile2(join78(dir, getConfigDirName2(), file));
197425
+ const { settings } = parseSettingsFile2(join78(dir, getConfigDirNameForProject(), file));
197396
197426
  if (!settings?.extraKnownMarketplaces) {
197397
197427
  continue;
197398
197428
  }
@@ -200777,7 +200807,7 @@ var init_agentColorManager = __esm(() => {
200777
200807
  import { mkdir as mkdir20, readdir as readdir19, readFile as readFile28, unlink as unlink13, writeFile as writeFile17 } from "fs/promises";
200778
200808
  import { join as join84 } from "path";
200779
200809
  function getSnapshotDirForAgent(agentType) {
200780
- return join84(getCwd(), getConfigDirName2(), SNAPSHOT_BASE, agentType);
200810
+ return join84(getCwd(), getConfigDirNameForProject(), SNAPSHOT_BASE, agentType);
200781
200811
  }
200782
200812
  function getSnapshotJsonPath(agentType) {
200783
200813
  return join84(getSnapshotDirForAgent(agentType), SNAPSHOT_JSON);
@@ -233727,7 +233757,7 @@ async function getIdeLockfilesPaths() {
233727
233757
  if (windowsHome) {
233728
233758
  const converter = new WindowsToWSLConverter(process.env.WSL_DISTRO_NAME);
233729
233759
  const wslPath = converter.toLocalPath(windowsHome);
233730
- paths.push(resolve36(wslPath, getConfigDirName2(), "ide"));
233760
+ paths.push(resolve36(wslPath, getConfigDirName(), "ide"));
233731
233761
  }
233732
233762
  try {
233733
233763
  const usersDir = "/mnt/c/Users";
@@ -233739,7 +233769,7 @@ async function getIdeLockfilesPaths() {
233739
233769
  if (user.name === "Public" || user.name === "Default" || user.name === "Default User" || user.name === "All Users") {
233740
233770
  continue;
233741
233771
  }
233742
- paths.push(join102(usersDir, user.name, getConfigDirName2(), "ide"));
233772
+ paths.push(join102(usersDir, user.name, getConfigDirName(), "ide"));
233743
233773
  }
233744
233774
  } catch (error) {
233745
233775
  if (isFsInaccessible2(error)) {
@@ -249333,11 +249363,11 @@ import {
249333
249363
  function getSkillsPath2(source, dir) {
249334
249364
  switch (source) {
249335
249365
  case "policySettings":
249336
- return join113(getManagedFilePath(), getConfigDirName2(), dir);
249366
+ return join113(getManagedFilePath(), getConfigDirNameForProject(), dir);
249337
249367
  case "userSettings":
249338
249368
  return join113(getAtlasConfigHomeDir3(), dir);
249339
249369
  case "projectSettings":
249340
- return `getConfigDirName()/${dir}`;
249370
+ return `getConfigDirNameForProject()/${dir}`;
249341
249371
  case "plugin":
249342
249372
  return "plugin";
249343
249373
  default:
@@ -249669,7 +249699,7 @@ async function discoverSkillDirsForPaths2(filePaths, cwd) {
249669
249699
  for (const filePath of filePaths) {
249670
249700
  let currentDir = dirname53(filePath);
249671
249701
  while (currentDir.startsWith(resolvedCwd + pathSep2)) {
249672
- const skillDir = join113(currentDir, getConfigDirName2(), "skills");
249702
+ const skillDir = join113(currentDir, getConfigDirNameForProject(), "skills");
249673
249703
  if (!dynamicSkillDirs2.has(skillDir)) {
249674
249704
  dynamicSkillDirs2.add(skillDir);
249675
249705
  try {
@@ -249780,7 +249810,7 @@ var init_loadSkillsDir2 = __esm(() => {
249780
249810
  import_ignore2 = __toESM(require_ignore(), 1);
249781
249811
  getSkillDirCommands2 = memoize_default(async (cwd) => {
249782
249812
  const userSkillsDir = join113(getAtlasConfigHomeDir3(), "skills");
249783
- const managedSkillsDir = join113(getManagedFilePath(), getConfigDirName2(), "skills");
249813
+ const managedSkillsDir = join113(getManagedFilePath(), getConfigDirNameForProject(), "skills");
249784
249814
  const projectSkillsDirs = getProjectDirsUpToHome2("skills", cwd);
249785
249815
  logForDebugging3(`Loading skills from: managed=${managedSkillsDir}, user=${userSkillsDir}, project=[${projectSkillsDirs.join(", ")}]`);
249786
249816
  const additionalDirs = getAdditionalDirectoriesForClaudeMd();
@@ -249791,7 +249821,7 @@ var init_loadSkillsDir2 = __esm(() => {
249791
249821
  logForDebugging3(`[bare] Skipping skill dir discovery (${additionalDirs.length === 0 ? "no --add-dir" : "project skills disabled (kill switch) or skillsLocked"})`);
249792
249822
  return [];
249793
249823
  }
249794
- const additionalSkillsNested = await Promise.all(additionalDirs.map((dir) => loadSkillsFromSkillsDir2(join113(dir, getConfigDirName2(), "skills"), "projectSettings")));
249824
+ const additionalSkillsNested = await Promise.all(additionalDirs.map((dir) => loadSkillsFromSkillsDir2(join113(dir, getConfigDirNameForProject(), "skills"), "projectSettings")));
249795
249825
  return additionalSkillsNested.flat().map((s) => s.skill);
249796
249826
  }
249797
249827
  const [
@@ -249804,7 +249834,7 @@ var init_loadSkillsDir2 = __esm(() => {
249804
249834
  isEnvTruthy2(process.env.ATLAS_DISABLE_POLICY_SKILLS) ? Promise.resolve([]) : loadSkillsFromSkillsDir2(managedSkillsDir, "policySettings"),
249805
249835
  isSettingSourceEnabled2("userSettings") && !skillsLocked ? loadSkillsFromSkillsDir2(userSkillsDir, "userSettings") : Promise.resolve([]),
249806
249836
  projectSkillsEnabled ? Promise.all(projectSkillsDirs.map((dir) => loadSkillsFromSkillsDir2(dir, "projectSettings"))) : Promise.resolve([]),
249807
- projectSkillsEnabled ? Promise.all(additionalDirs.map((dir) => loadSkillsFromSkillsDir2(join113(dir, getConfigDirName2(), "skills"), "projectSettings"))) : Promise.resolve([]),
249837
+ projectSkillsEnabled ? Promise.all(additionalDirs.map((dir) => loadSkillsFromSkillsDir2(join113(dir, getConfigDirNameForProject(), "skills"), "projectSettings"))) : Promise.resolve([]),
249808
249838
  skillsLocked ? Promise.resolve([]) : loadSkillsFromCommandsDir2(cwd)
249809
249839
  ]);
249810
249840
  const allSkillsWithPaths = [
@@ -334124,7 +334154,7 @@ function hasCronTasksSync2(dir) {
334124
334154
  }
334125
334155
  async function writeCronTasks2(tasks, dir) {
334126
334156
  const root = dir ?? getProjectRoot();
334127
- await mkdir37(join126(root, getConfigDirName2()), { recursive: true });
334157
+ await mkdir37(join126(root, getConfigDirNameForProject()), { recursive: true });
334128
334158
  const body = {
334129
334159
  tasks: tasks.map(({ durable: _durable, ...rest }) => rest)
334130
334160
  };
@@ -334236,7 +334266,7 @@ var init_cronTasks2 = __esm(() => {
334236
334266
  init_json2();
334237
334267
  init_log5();
334238
334268
  init_slowOperations();
334239
- CRON_FILE_REL2 = join126(getConfigDirName2(), "scheduled_tasks.json");
334269
+ CRON_FILE_REL2 = join126(getConfigDirNameForProject(), "scheduled_tasks.json");
334240
334270
  DEFAULT_CRON_JITTER_CONFIG2 = {
334241
334271
  recurringFrac: 0.1,
334242
334272
  recurringCapMs: 15 * 60 * 1000,
@@ -345703,7 +345733,7 @@ function getProjectDirsUpToHome2(subdir, cwd) {
345703
345733
  if (normalizePathForComparison2(current) === normalizePathForComparison2(home)) {
345704
345734
  break;
345705
345735
  }
345706
- const claudeSubdir = join130(current, getConfigDirName2(), subdir);
345736
+ const claudeSubdir = join130(current, getConfigDirNameForProject(), subdir);
345707
345737
  try {
345708
345738
  statSync10(claudeSubdir);
345709
345739
  dirs.push(claudeSubdir);
@@ -345838,15 +345868,15 @@ var init_markdownConfigLoader = __esm(() => {
345838
345868
  loadMarkdownFilesForSubdir2 = memoize_default(async function(subdir, cwd) {
345839
345869
  const searchStartTime = Date.now();
345840
345870
  const userDir = join130(getAtlasConfigHomeDir3(), subdir);
345841
- const managedDir = join130(getManagedFilePath(), getConfigDirName2(), subdir);
345871
+ const managedDir = join130(getManagedFilePath(), getConfigDirNameForProject(), subdir);
345842
345872
  const projectDirs = getProjectDirsUpToHome2(subdir, cwd);
345843
345873
  const gitRoot = findGitRoot2(cwd);
345844
345874
  const canonicalRoot = findCanonicalGitRoot2(cwd);
345845
345875
  if (gitRoot && canonicalRoot && canonicalRoot !== gitRoot) {
345846
- const worktreeSubdir = normalizePathForComparison2(join130(gitRoot, getConfigDirName2(), subdir));
345876
+ const worktreeSubdir = normalizePathForComparison2(join130(gitRoot, getConfigDirNameForProject(), subdir));
345847
345877
  const worktreeHasSubdir = projectDirs.some((dir) => normalizePathForComparison2(dir) === worktreeSubdir);
345848
345878
  if (!worktreeHasSubdir) {
345849
- const mainClaudeSubdir = join130(canonicalRoot, getConfigDirName2(), subdir);
345879
+ const mainClaudeSubdir = join130(canonicalRoot, getConfigDirNameForProject(), subdir);
345850
345880
  if (!projectDirs.includes(mainClaudeSubdir)) {
345851
345881
  projectDirs.push(mainClaudeSubdir);
345852
345882
  }
@@ -360085,8 +360115,8 @@ async function getInstallationPath() {
360085
360115
  }
360086
360116
  } catch {}
360087
360117
  try {
360088
- await getFsImplementation2().stat(join138(homedir34(), ".local/bingetConfigDirName()"));
360089
- return join138(homedir34(), ".local/bingetConfigDirName()");
360118
+ await getFsImplementation2().stat(join138(homedir34(), ".local/bin/atlas"));
360119
+ return join138(homedir34(), ".local/bin/atlas");
360090
360120
  } catch {}
360091
360121
  return "native";
360092
360122
  }
@@ -360109,7 +360139,7 @@ function getInvokedBinary() {
360109
360139
  async function detectMultipleInstallations() {
360110
360140
  const fs = getFsImplementation2();
360111
360141
  const installations = [];
360112
- const localPath = join138(homedir34(), getConfigDirName2(), "local");
360142
+ const localPath = join138(homedir34(), getConfigDirName(), "local");
360113
360143
  if (await localInstallationExists()) {
360114
360144
  installations.push({ type: "npm-local", path: localPath });
360115
360145
  }
@@ -360710,9 +360740,9 @@ function getBaseDirectories() {
360710
360740
  const platform = getPlatform4();
360711
360741
  const executableName = getBinaryName(platform);
360712
360742
  return {
360713
- versions: join141(getXDGDataHome(), getConfigDirName2(), "versions"),
360714
- staging: join141(getXDGCacheHome(), getConfigDirName2(), "staging"),
360715
- locks: join141(getXDGStateHome(), getConfigDirName2(), "locks"),
360743
+ versions: join141(getXDGDataHome(), getConfigDirName(), "versions"),
360744
+ staging: join141(getXDGCacheHome(), getConfigDirName(), "staging"),
360745
+ locks: join141(getXDGStateHome(), getConfigDirName(), "locks"),
360716
360746
  executable: join141(getUserBinDir(), executableName)
360717
360747
  };
360718
360748
  }
@@ -361112,7 +361142,7 @@ async function checkInstall(force = false) {
361112
361142
  } catch (e) {
361113
361143
  if (isENOENT2(e)) {
361114
361144
  messages.push({
361115
- message: `installMethod is native, butgetConfigDirName() command not found at ${dirs.executable}`,
361145
+ message: `installMethod is native, but atlas command not found at ${dirs.executable}`,
361116
361146
  userActionRequired: true,
361117
361147
  type: "error"
361118
361148
  });
@@ -361610,7 +361640,7 @@ async function cleanupNpmInstallations() {
361610
361640
  errors.push(macroPackageResult.error);
361611
361641
  }
361612
361642
  }
361613
- const localInstallDir = join141(homedir35(), getConfigDirName2(), "local");
361643
+ const localInstallDir = join141(homedir35(), getConfigDirName(), "local");
361614
361644
  try {
361615
361645
  await rm10(localInstallDir, { recursive: true });
361616
361646
  removed++;
@@ -370457,7 +370487,7 @@ function Doctor(t0) {
370457
370487
  getDoctorDiagnostic().then(setDiagnostic);
370458
370488
  (async () => {
370459
370489
  const userAgentsDir = join142(getAtlasConfigHomeDir3(), "agents");
370460
- const projectAgentsDir = join142(getOriginalCwd(), "getConfigDirName()", "agents");
370490
+ const projectAgentsDir = join142(getOriginalCwd(), getConfigDirNameForProject(), "agents");
370461
370491
  const {
370462
370492
  activeAgents,
370463
370493
  allAgents,
@@ -370480,7 +370510,7 @@ function Doctor(t0) {
370480
370510
  }, async () => toolPermissionContext);
370481
370511
  setContextWarnings(warnings);
370482
370512
  if (isPidBasedLockingEnabled()) {
370483
- const locksDir = join142(getXDGStateHome(), getConfigDirName2(), "locks");
370513
+ const locksDir = join142(getXDGStateHome(), getConfigDirName(), "locks");
370484
370514
  const staleLocksCleaned = cleanupStaleLocks(locksDir);
370485
370515
  const locks = getAllLockInfo(locksDir);
370486
370516
  setVersionLockInfo({
@@ -394912,7 +394942,7 @@ function SkillsMenu(t0) {
394912
394942
  t2 = $[5];
394913
394943
  }
394914
394944
  const handleCancel = t2;
394915
- const configDirName = getConfigDirName2();
394945
+ const configDirName = getConfigDirNameForProject();
394916
394946
  if (skills.length === 0) {
394917
394947
  let t3;
394918
394948
  if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
@@ -405168,7 +405198,7 @@ var AGENT_PATHS;
405168
405198
  var init_types16 = __esm(() => {
405169
405199
  init_configDir();
405170
405200
  AGENT_PATHS = {
405171
- FOLDER_NAME: getConfigDirName2(),
405201
+ FOLDER_NAME: getConfigDirNameForProject(),
405172
405202
  AGENTS_DIR: "agents"
405173
405203
  };
405174
405204
  });
@@ -409104,7 +409134,7 @@ function LocationStep() {
409104
409134
  updateWizardData,
409105
409135
  cancel
409106
409136
  } = useWizard();
409107
- const configDirName = getConfigDirName2();
409137
+ const configDirName = getConfigDirNameForProject();
409108
409138
  let t0;
409109
409139
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
409110
409140
  t0 = {
@@ -409227,7 +409257,7 @@ function MemoryStep() {
409227
409257
  }
409228
409258
  useKeybinding("confirm:no", goBack, t0);
409229
409259
  const isUserScope = wizardData.location === "userSettings";
409230
- const configDirName = getConfigDirName2();
409260
+ const configDirName = getConfigDirNameForProject();
409231
409261
  let t1;
409232
409262
  if ($[1] !== isUserScope) {
409233
409263
  t1 = isUserScope ? [{
@@ -421526,7 +421556,7 @@ async function getWatchablePaths() {
421526
421556
  } catch {}
421527
421557
  }
421528
421558
  for (const dir of getAdditionalDirectoriesForClaudeMd()) {
421529
- const additionalSkillsPath = platformPath2.join(dir, getConfigDirName2(), "skills");
421559
+ const additionalSkillsPath = platformPath2.join(dir, getConfigDirNameForProject(), "skills");
421530
421560
  try {
421531
421561
  await fs.stat(additionalSkillsPath);
421532
421562
  paths.push(additionalSkillsPath);
@@ -434326,7 +434356,7 @@ function normalizeCaseForComparison2(path) {
434326
434356
  function getClaudeSkillScope(filePath) {
434327
434357
  const absolutePath = expandPath2(filePath);
434328
434358
  const absolutePathLower = normalizeCaseForComparison2(absolutePath);
434329
- const configDir = getConfigDirName2();
434359
+ const configDir = getConfigDirNameForProject();
434330
434360
  const bases = [
434331
434361
  {
434332
434362
  dir: expandPath2(join167(getOriginalCwd(), configDir, "skills")),
@@ -434379,7 +434409,7 @@ function getSettingsPaths3() {
434379
434409
  function isAtlasSettingsPath2(filePath) {
434380
434410
  const expandedPath = expandPath2(filePath);
434381
434411
  const normalizedPath = normalizeCaseForComparison2(expandedPath);
434382
- if (normalizedPath.endsWith(`${sep38}getConfigDirName()${sep38}settings.json`) || normalizedPath.endsWith(`${sep38}getConfigDirName()${sep38}settings.local.json`)) {
434412
+ if (normalizedPath.endsWith(`${sep38}getConfigDirNameForProject()${sep38}settings.json`) || normalizedPath.endsWith(`${sep38}getConfigDirNameForProject()${sep38}settings.local.json`)) {
434383
434413
  return true;
434384
434414
  }
434385
434415
  return getSettingsPaths3().some((settingsPath) => normalizeCaseForComparison2(settingsPath) === normalizedPath);
@@ -434388,9 +434418,9 @@ function isClaudeConfigFilePath2(filePath) {
434388
434418
  if (isAtlasSettingsPath2(filePath)) {
434389
434419
  return true;
434390
434420
  }
434391
- const commandsDir = join167(getOriginalCwd(), getConfigDirName2(), "commands");
434392
- const agentsDir = join167(getOriginalCwd(), getConfigDirName2(), "agents");
434393
- const skillsDir = join167(getOriginalCwd(), getConfigDirName2(), "skills");
434421
+ const commandsDir = join167(getOriginalCwd(), getConfigDirNameForProject(), "commands");
434422
+ const agentsDir = join167(getOriginalCwd(), getConfigDirNameForProject(), "agents");
434423
+ const skillsDir = join167(getOriginalCwd(), getConfigDirNameForProject(), "skills");
434394
434424
  return pathInWorkingPath2(filePath, commandsDir) || pathInWorkingPath2(filePath, agentsDir) || pathInWorkingPath2(filePath, skillsDir);
434395
434425
  }
434396
434426
  function isSessionPlanFile(absolutePath) {
@@ -434418,10 +434448,10 @@ function isScratchpadEnabled() {
434418
434448
  }
434419
434449
  function getAtlasTempDirName2() {
434420
434450
  if (getPlatform3() === "windows") {
434421
- return getConfigDirName2();
434451
+ return getConfigDirNameForProject();
434422
434452
  }
434423
434453
  const uid = process.getuid?.() ?? 0;
434424
- return `${getConfigDirName2()}-${uid}`;
434454
+ return `${getConfigDirNameForProject()}-${uid}`;
434425
434455
  }
434426
434456
  function getProjectTempDir2() {
434427
434457
  return join167(getAtlasTempDir2(), sanitizePath3(getOriginalCwd())) + sep38;
@@ -434460,7 +434490,7 @@ function isDangerousFilePathToAutoEdit2(path) {
434460
434490
  if (normalizedSegment !== normalizeCaseForComparison2(dir)) {
434461
434491
  continue;
434462
434492
  }
434463
- if (dir === getConfigDirName2()) {
434493
+ if (dir === getConfigDirNameForProject()) {
434464
434494
  const nextSegment = pathSegments[i + 1];
434465
434495
  if (nextSegment && normalizeCaseForComparison2(nextSegment) === "worktrees") {
434466
434496
  break;
@@ -435057,7 +435087,7 @@ function checkEditableInternalPath2(absolutePath, input) {
435057
435087
  }
435058
435088
  };
435059
435089
  }
435060
- if (normalizeCaseForComparison2(normalizedPath) === normalizeCaseForComparison2(join167(getOriginalCwd(), getConfigDirName2(), "launch.json"))) {
435090
+ if (normalizeCaseForComparison2(normalizedPath) === normalizeCaseForComparison2(join167(getOriginalCwd(), getConfigDirNameForProject(), "launch.json"))) {
435061
435091
  return {
435062
435092
  behavior: "allow",
435063
435093
  updatedInput: input,
@@ -435232,7 +435262,7 @@ var init_filesystem2 = __esm(() => {
435232
435262
  ".git",
435233
435263
  ".vscode",
435234
435264
  ".idea",
435235
- getConfigDirName2()
435265
+ getConfigDirNameForProject()
435236
435266
  ];
435237
435267
  DIR_SEP2 = posix9.sep;
435238
435268
  getAtlasTempDir2 = memoize_default(function getAtlasTempDir() {
@@ -440682,7 +440712,7 @@ function defaultSandboxDeps() {
440682
440712
  getPlatform: getPlatform3,
440683
440713
  getAdditionalDirectories: getAdditionalDirectoriesForClaudeMd,
440684
440714
  onSettingsChange: (cb) => settingsChangeDetector.subscribe(cb),
440685
- getConfigDirName: getConfigDirName2,
440715
+ getConfigDirName: getConfigDirNameForProject,
440686
440716
  getAtlasTempDir: () => getAtlasTempDir2(),
440687
440717
  getManagedSettingsDropInDir: () => getManagedSettingsDropInDir2(),
440688
440718
  updateSettingsForSource: updateSettingsForSource2,
@@ -441374,14 +441404,14 @@ async function getMemoryFilesForNestedDirectory(dir, targetPath, processedPaths)
441374
441404
  if (isSettingSourceEnabled2("projectSettings")) {
441375
441405
  const projectPath = findMemoryFile(dir);
441376
441406
  result.push(...await processMemoryFile(projectPath, "Project", processedPaths, false));
441377
- const dotClaudePath = findMemoryFile(join172(dir, getConfigDirName2()));
441407
+ const dotClaudePath = findMemoryFile(join172(dir, getConfigDirNameForProject()));
441378
441408
  result.push(...await processMemoryFile(dotClaudePath, "Project", processedPaths, false));
441379
441409
  }
441380
441410
  if (isSettingSourceEnabled2("localSettings")) {
441381
441411
  const localPath = join172(dir, "CLAUDE.local.md");
441382
441412
  result.push(...await processMemoryFile(localPath, "Local", processedPaths, false));
441383
441413
  }
441384
- const rulesDir = join172(dir, getConfigDirName2(), "rules");
441414
+ const rulesDir = join172(dir, getConfigDirNameForProject(), "rules");
441385
441415
  const unconditionalProcessedPaths = new Set(processedPaths);
441386
441416
  result.push(...await processMdRules({
441387
441417
  rulesDir,
@@ -441397,7 +441427,7 @@ async function getMemoryFilesForNestedDirectory(dir, targetPath, processedPaths)
441397
441427
  return result;
441398
441428
  }
441399
441429
  async function getConditionalRulesForCwdLevelDirectory(dir, targetPath, processedPaths) {
441400
- const rulesDir = join172(dir, getConfigDirName2(), "rules");
441430
+ const rulesDir = join172(dir, getConfigDirNameForProject(), "rules");
441401
441431
  return processConditionedMdRules(targetPath, rulesDir, "Project", processedPaths, false);
441402
441432
  }
441403
441433
  async function processConditionedMdRules(targetPath, rulesDir, type, processedPaths, includeExternal) {
@@ -441653,9 +441683,9 @@ var init_memoryFiles = __esm(() => {
441653
441683
  if (isSettingSourceEnabled2("projectSettings") && !skipProject) {
441654
441684
  const projectPath = findMemoryFile(dir);
441655
441685
  result.push(...await processMemoryFile(projectPath, "Project", processedPaths, includeExternal));
441656
- const dotClaudePath = findMemoryFile(join172(dir, getConfigDirName2()));
441686
+ const dotClaudePath = findMemoryFile(join172(dir, getConfigDirNameForProject()));
441657
441687
  result.push(...await processMemoryFile(dotClaudePath, "Project", processedPaths, includeExternal));
441658
- const rulesDir = join172(dir, getConfigDirName2(), "rules");
441688
+ const rulesDir = join172(dir, getConfigDirNameForProject(), "rules");
441659
441689
  result.push(...await processMdRules({
441660
441690
  rulesDir,
441661
441691
  type: "Project",
@@ -441674,9 +441704,9 @@ var init_memoryFiles = __esm(() => {
441674
441704
  for (const dir of additionalDirs) {
441675
441705
  const projectPath = findMemoryFile(dir);
441676
441706
  result.push(...await processMemoryFile(projectPath, "Project", processedPaths, includeExternal));
441677
- const dotClaudePath = findMemoryFile(join172(dir, getConfigDirName2()));
441707
+ const dotClaudePath = findMemoryFile(join172(dir, getConfigDirNameForProject()));
441678
441708
  result.push(...await processMemoryFile(dotClaudePath, "Project", processedPaths, includeExternal));
441679
- const rulesDir = join172(dir, getConfigDirName2(), "rules");
441709
+ const rulesDir = join172(dir, getConfigDirNameForProject(), "rules");
441680
441710
  result.push(...await processMdRules({
441681
441711
  rulesDir,
441682
441712
  type: "Project",
@@ -450311,14 +450341,14 @@ import { homedir as homedir40 } from "os";
450311
450341
  import { basename as basename54, join as join173, sep as sep40 } from "path";
450312
450342
  function isInClaudeFolder(filePath) {
450313
450343
  const absolutePath = expandPath2(filePath);
450314
- const claudeFolderPath = expandPath2(`${getOriginalCwd()}/${getConfigDirName2()}`);
450344
+ const claudeFolderPath = expandPath2(`${getOriginalCwd()}/${getConfigDirNameForProject()}`);
450315
450345
  const normalizedAbsolutePath = normalizeCaseForComparison2(absolutePath);
450316
450346
  const normalizedClaudeFolderPath = normalizeCaseForComparison2(claudeFolderPath);
450317
450347
  return normalizedAbsolutePath.startsWith(normalizedClaudeFolderPath + sep40.toLowerCase()) || normalizedAbsolutePath.startsWith(normalizedClaudeFolderPath + "/");
450318
450348
  }
450319
450349
  function isInGlobalClaudeFolder(filePath) {
450320
450350
  const absolutePath = expandPath2(filePath);
450321
- const globalClaudeFolderPath = join173(homedir40(), getConfigDirName2());
450351
+ const globalClaudeFolderPath = join173(homedir40(), getConfigDirName());
450322
450352
  const normalizedAbsolutePath = normalizeCaseForComparison2(absolutePath);
450323
450353
  const normalizedGlobalClaudeFolderPath = normalizeCaseForComparison2(globalClaudeFolderPath);
450324
450354
  return normalizedAbsolutePath.startsWith(normalizedGlobalClaudeFolderPath + sep40.toLowerCase()) || normalizedAbsolutePath.startsWith(normalizedGlobalClaudeFolderPath + "/");
@@ -466993,7 +467023,7 @@ import { readFileSync as readFileSync24, existsSync as existsSync14, writeFileSy
466993
467023
  import { join as join175 } from "path";
466994
467024
  import { homedir as homedir43 } from "os";
466995
467025
  function getStatusLineJsonPath() {
466996
- return join175(homedir43(), getConfigDirName2(), "statusline.json");
467026
+ return join175(homedir43(), getConfigDirName(), "statusline.json");
466997
467027
  }
466998
467028
  function getDefaultConfig() {
466999
467029
  return {
@@ -471659,7 +471689,7 @@ async function applySkillImprovement(skillName, updates) {
471659
471689
  return;
471660
471690
  const { join } = await import("path");
471661
471691
  const fs = await import("fs/promises");
471662
- const filePath = join(getCwd(), getConfigDirName2(), "skills", skillName, "SKILL.md");
471692
+ const filePath = join(getCwd(), getConfigDirNameForProject(), "skills", skillName, "SKILL.md");
471663
471693
  let currentContent;
471664
471694
  try {
471665
471695
  currentContent = await fs.readFile(filePath, "utf-8");
@@ -484031,7 +484061,7 @@ var init_cronTasksLock2 = __esm(() => {
484031
484061
  init_genericProcessUtils();
484032
484062
  init_json2();
484033
484063
  init_slowOperations();
484034
- LOCK_FILE_REL2 = join182(getConfigDirName2(), "scheduled_tasks.lock");
484064
+ LOCK_FILE_REL2 = join182(getConfigDirNameForProject(), "scheduled_tasks.lock");
484035
484065
  schedulerLockSchema2 = lazySchema2(() => object({
484036
484066
  sessionId: string2(),
484037
484067
  pid: number2(),
@@ -498452,7 +498482,7 @@ import { dirname as dirname91, join as join193 } from "path";
498452
498482
  function detectShell() {
498453
498483
  const shell = process.env.SHELL || "";
498454
498484
  const home = homedir51();
498455
- const claudeDir = join193(home, getConfigDirName2());
498485
+ const claudeDir = join193(home, getConfigDirName());
498456
498486
  if (shell.endsWith("/zsh") || shell.endsWith("/zsh.exe")) {
498457
498487
  const cacheFile = join193(claudeDir, "completion.zsh");
498458
498488
  return {
@@ -501007,6 +501037,7 @@ init_cli();
501007
501037
  // src/atlascode/compose.ts
501008
501038
  init_sandbox();
501009
501039
  init_modelprovider2();
501040
+ init_shared();
501010
501041
  init_memory();
501011
501042
  init_executor();
501012
501043
  init_permissions3();
@@ -501120,6 +501151,7 @@ function createEndpointConfigSource() {
501120
501151
  }
501121
501152
 
501122
501153
  // src/atlascode/sandboxDeps.ts
501154
+ init_shared();
501123
501155
  var SETTING_SOURCES2 = [
501124
501156
  "userSettings",
501125
501157
  "projectSettings",
@@ -501157,7 +501189,7 @@ function createInMemorySandboxDeps() {
501157
501189
  getPlatform: () => resolvePlatform(),
501158
501190
  getAdditionalDirectories: () => [],
501159
501191
  onSettingsChange: () => () => {},
501160
- getConfigDirName: () => ".atlas",
501192
+ getConfigDirName: () => getConfigDirNameForProject(),
501161
501193
  getAtlasTempDir: () => tempDir,
501162
501194
  getManagedSettingsDropInDir: () => "/etc/atlas/managed_settings.json",
501163
501195
  updateSettingsForSource: (source, values) => {
@@ -501243,6 +501275,7 @@ function createCoreDependencies() {
501243
501275
  getCwd: getCwdState
501244
501276
  });
501245
501277
  setSettingsPathsProvider(getSettingsPaths2);
501278
+ setConfigDirNameProvider(() => getActiveProductDefinition().configDirName);
501246
501279
  setDiskOutputEnv(createDiskOutputEnv());
501247
501280
  setHooksBootstrapEnv({
501248
501281
  getSessionId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlasharness/atlascode",
3
- "version": "0.1.97",
3
+ "version": "0.1.99",
4
4
  "description": "AtlasCode — Coding Agent for the domestic computing ecosystem (Ascend NPU + domestic LLM backends)",
5
5
  "homepage": "https://www.atlaswork.cn/",
6
6
  "bin": {