@atlasharness/atlascode 0.1.96 → 0.1.98

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 +90 -73
  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] ?? ""));
@@ -1108,6 +1109,18 @@ var init_teammateContext = __esm(() => {
1108
1109
  teammateContextStorage = new AsyncLocalStorage;
1109
1110
  });
1110
1111
 
1112
+ // src/shared/ProductDefinition.ts
1113
+ function getActiveProductDefinition() {
1114
+ return ACTIVE_PRODUCT;
1115
+ }
1116
+ var ATLASCODE_PRODUCT, ACTIVE_PRODUCT;
1117
+ var init_ProductDefinition = __esm(() => {
1118
+ ATLASCODE_PRODUCT = Object.freeze({
1119
+ id: "atlascode"
1120
+ });
1121
+ ACTIVE_PRODUCT = ATLASCODE_PRODUCT;
1122
+ });
1123
+
1111
1124
  // src/shared/index.ts
1112
1125
  var init_shared = __esm(() => {
1113
1126
  init_feature();
@@ -1129,6 +1142,7 @@ var init_shared = __esm(() => {
1129
1142
  init_swarmSchemaFilter();
1130
1143
  init_agentRoleTemplates();
1131
1144
  init_teammateContext();
1145
+ init_ProductDefinition();
1132
1146
  });
1133
1147
 
1134
1148
  // node_modules/openai/internal/tslib.mjs
@@ -35422,7 +35436,7 @@ ${SEND_MESSAGE_TOOL_NAME}({ to: "xyz-456", message: "Two tests still failing at
35422
35436
 
35423
35437
  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
35438
 
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."
35439
+ 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
35440
 
35427
35441
  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
35442
 
@@ -38484,6 +38498,12 @@ function getAllBaseTools(deps = {}) {
38484
38498
  if (deps.ascendTools && isAscendToolsEnabled(env) && !restricted) {
38485
38499
  pool.push(...deps.ascendTools);
38486
38500
  }
38501
+ if (deps.productToolSubset) {
38502
+ const subset = new Set(deps.productToolSubset);
38503
+ const filtered = pool.filter((t) => subset.has(t.name));
38504
+ pool.length = 0;
38505
+ pool.push(...filtered);
38506
+ }
38487
38507
  if (deps.mcpTools)
38488
38508
  pool.push(...deps.mcpTools);
38489
38509
  const assembled = uniqByName(pool);
@@ -88102,7 +88122,8 @@ async function createAgentLoopDeps(config = {}) {
88102
88122
  ProposeGoalTool
88103
88123
  ],
88104
88124
  mcpTools: [...config.toolRegistryDeps?.mcpTools ?? [], ...mcpTools],
88105
- ascendTools: getDomainMount()?.tools
88125
+ ascendTools: getDomainMount()?.tools,
88126
+ productToolSubset: getActiveProductDefinition().toolSubset
88106
88127
  };
88107
88128
  teammatePoolSync?.(toolRegistryDeps);
88108
88129
  const { toolPermissionContext, warnings } = await initializeToolPermissionContext({
@@ -88186,6 +88207,7 @@ var teammatePoolSync, mcpConnectionsProvider;
88186
88207
  var init_loopDeps = __esm(() => {
88187
88208
  init_modelprovider2();
88188
88209
  init_bootstrap();
88210
+ init_shared();
88189
88211
  init_toolRegistry();
88190
88212
  init_permissionSetup();
88191
88213
  init_mcp();
@@ -91642,7 +91664,7 @@ function initDebugSink() {
91642
91664
  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
91665
  if (false) {}
91644
91666
  if (sinkFile === null && !toStderr) {
91645
- const configDir = process.env.ATLAS_CONFIG_DIR ?? join39(homedir14(), ".atlas");
91667
+ const configDir = process.env.ATLAS_CONFIG_DIR ?? join39(homedir14(), getConfigDirName());
91646
91668
  sinkFile = join39(configDir, "debug", `${getSessionId()}.txt`);
91647
91669
  }
91648
91670
  }
@@ -102810,12 +102832,6 @@ var init_debugFilter = __esm(() => {
102810
102832
  // src/tui/utils/configDir.ts
102811
102833
  import { existsSync as existsSync9 } from "fs";
102812
102834
  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
102835
  function getPluginManifestDirs() {
102820
102836
  return [PLUGIN_MANIFEST_DIR, "." + PLUGIN_MANIFEST_DIR, LEGACY_PLUGIN_MANIFEST_DIR];
102821
102837
  }
@@ -102832,7 +102848,7 @@ function findManifestInDir(dir, fileName) {
102832
102848
  }
102833
102849
  return join47(dir, PLUGIN_MANIFEST_DIR, fileName);
102834
102850
  }
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";
102851
+ 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
102852
  var init_configDir = () => {};
102837
102853
 
102838
102854
  // src/tui/utils/envUtils.ts
@@ -102893,7 +102909,7 @@ var init_envUtils2 = __esm(() => {
102893
102909
  init_memoize();
102894
102910
  init_configDir();
102895
102911
  getAtlasConfigHomeDir3 = memoize_default(() => {
102896
- return (process.env.ATLAS_CONFIG_DIR ?? join48(homedir16(), getConfigDirName2())).normalize("NFC");
102912
+ return (process.env.ATLAS_CONFIG_DIR ?? join48(homedir16(), getConfigDirName())).normalize("NFC");
102897
102913
  }, () => process.env.ATLAS_CONFIG_DIR);
102898
102914
  });
102899
102915
 
@@ -129505,7 +129521,7 @@ function getMemoryPath(memoryType) {
129505
129521
  return "";
129506
129522
  }
129507
129523
  function getManagedClaudeRulesDir() {
129508
- return join60(getManagedFilePath(), getConfigDirName2(), "rules");
129524
+ return join60(getManagedFilePath(), getConfigDirName(), "rules");
129509
129525
  }
129510
129526
  function getUserClaudeRulesDir() {
129511
129527
  return join60(getAtlasConfigHomeDir3(), "rules");
@@ -131512,9 +131528,9 @@ function getSettingsFilePathForSource2(source) {
131512
131528
  function getRelativeSettingsFilePathForSource2(source) {
131513
131529
  switch (source) {
131514
131530
  case "projectSettings":
131515
- return join64(getConfigDirName2(), "settings.json");
131531
+ return join64(getConfigDirName(), "settings.json");
131516
131532
  case "localSettings":
131517
- return join64(getConfigDirName2(), "settings.local.json");
131533
+ return join64(getConfigDirName(), "settings.local.json");
131518
131534
  }
131519
131535
  }
131520
131536
  function getSettingsForSource2(source) {
@@ -138276,13 +138292,13 @@ function getLocalAgentMemoryDir(dirName) {
138276
138292
  if (process.env.ATLAS_REMOTE_MEMORY_DIR) {
138277
138293
  return join68(process.env.ATLAS_REMOTE_MEMORY_DIR, "projects", sanitizePath3(findCanonicalGitRoot2(getProjectRoot()) ?? getProjectRoot()), "agent-memory-local", dirName) + sep13;
138278
138294
  }
138279
- return join68(getCwd(), getConfigDirName2(), "agent-memory-local", dirName) + sep13;
138295
+ return join68(getCwd(), getConfigDirName(), "agent-memory-local", dirName) + sep13;
138280
138296
  }
138281
138297
  function getAgentMemoryDir(agentType, scope) {
138282
138298
  const dirName = sanitizeAgentTypeForPath(agentType);
138283
138299
  switch (scope) {
138284
138300
  case "project":
138285
- return join68(getCwd(), getConfigDirName2(), "agent-memory", dirName) + sep13;
138301
+ return join68(getCwd(), getConfigDirName(), "agent-memory", dirName) + sep13;
138286
138302
  case "local":
138287
138303
  return getLocalAgentMemoryDir(dirName);
138288
138304
  case "user":
@@ -138295,14 +138311,14 @@ function isAgentMemoryPath(absolutePath) {
138295
138311
  if (normalizedPath.startsWith(join68(memoryBase, "agent-memory") + sep13)) {
138296
138312
  return true;
138297
138313
  }
138298
- if (normalizedPath.startsWith(join68(getCwd(), getConfigDirName2(), "agent-memory") + sep13)) {
138314
+ if (normalizedPath.startsWith(join68(getCwd(), getConfigDirName(), "agent-memory") + sep13)) {
138299
138315
  return true;
138300
138316
  }
138301
138317
  if (process.env.ATLAS_REMOTE_MEMORY_DIR) {
138302
138318
  if (normalizedPath.includes(sep13 + "agent-memory-local" + sep13) && normalizedPath.startsWith(join68(process.env.ATLAS_REMOTE_MEMORY_DIR, "projects") + sep13)) {
138303
138319
  return true;
138304
138320
  }
138305
- } else if (normalizedPath.startsWith(join68(getCwd(), getConfigDirName2(), "agent-memory-local") + sep13)) {
138321
+ } else if (normalizedPath.startsWith(join68(getCwd(), getConfigDirName(), "agent-memory-local") + sep13)) {
138306
138322
  return true;
138307
138323
  }
138308
138324
  return false;
@@ -138355,8 +138371,8 @@ var init_agentMemory = __esm(() => {
138355
138371
  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
138372
  var init_constants8 = __esm(() => {
138357
138373
  init_configDir();
138358
- ATLAS_FOLDER_PERMISSION_PATTERN2 = `/${getConfigDirName2()}/**`;
138359
- GLOBAL_ATLAS_FOLDER_PERMISSION_PATTERN2 = `~/${getConfigDirName2()}/**`;
138374
+ ATLAS_FOLDER_PERMISSION_PATTERN2 = `/${getConfigDirName()}/**`;
138375
+ GLOBAL_ATLAS_FOLDER_PERMISSION_PATTERN2 = `~/${getConfigDirName()}/**`;
138360
138376
  });
138361
138377
 
138362
138378
  // src/tui/utils/pdfUtils.ts
@@ -184750,7 +184766,7 @@ function generateTmuxSessionName2(repoPath, branch) {
184750
184766
  return combined.replace(/[/.]/g, "_");
184751
184767
  }
184752
184768
  function worktreesDir2(repoRoot) {
184753
- return join75(repoRoot, getConfigDirName2(), "worktrees");
184769
+ return join75(repoRoot, getConfigDirName(), "worktrees");
184754
184770
  }
184755
184771
  function flattenSlug2(slug) {
184756
184772
  return slug.replaceAll("/", "+");
@@ -197379,7 +197395,7 @@ function getAddDirEnabledPlugins() {
197379
197395
  const result = {};
197380
197396
  for (const dir of getAdditionalDirectoriesForClaudeMd()) {
197381
197397
  for (const file of SETTINGS_FILES) {
197382
- const { settings } = parseSettingsFile2(join78(dir, getConfigDirName2(), file));
197398
+ const { settings } = parseSettingsFile2(join78(dir, getConfigDirName(), file));
197383
197399
  if (!settings?.enabledPlugins) {
197384
197400
  continue;
197385
197401
  }
@@ -197392,7 +197408,7 @@ function getAddDirExtraMarketplaces() {
197392
197408
  const result = {};
197393
197409
  for (const dir of getAdditionalDirectoriesForClaudeMd()) {
197394
197410
  for (const file of SETTINGS_FILES) {
197395
- const { settings } = parseSettingsFile2(join78(dir, getConfigDirName2(), file));
197411
+ const { settings } = parseSettingsFile2(join78(dir, getConfigDirName(), file));
197396
197412
  if (!settings?.extraKnownMarketplaces) {
197397
197413
  continue;
197398
197414
  }
@@ -200777,7 +200793,7 @@ var init_agentColorManager = __esm(() => {
200777
200793
  import { mkdir as mkdir20, readdir as readdir19, readFile as readFile28, unlink as unlink13, writeFile as writeFile17 } from "fs/promises";
200778
200794
  import { join as join84 } from "path";
200779
200795
  function getSnapshotDirForAgent(agentType) {
200780
- return join84(getCwd(), getConfigDirName2(), SNAPSHOT_BASE, agentType);
200796
+ return join84(getCwd(), getConfigDirName(), SNAPSHOT_BASE, agentType);
200781
200797
  }
200782
200798
  function getSnapshotJsonPath(agentType) {
200783
200799
  return join84(getSnapshotDirForAgent(agentType), SNAPSHOT_JSON);
@@ -233727,7 +233743,7 @@ async function getIdeLockfilesPaths() {
233727
233743
  if (windowsHome) {
233728
233744
  const converter = new WindowsToWSLConverter(process.env.WSL_DISTRO_NAME);
233729
233745
  const wslPath = converter.toLocalPath(windowsHome);
233730
- paths.push(resolve36(wslPath, getConfigDirName2(), "ide"));
233746
+ paths.push(resolve36(wslPath, getConfigDirName(), "ide"));
233731
233747
  }
233732
233748
  try {
233733
233749
  const usersDir = "/mnt/c/Users";
@@ -233739,7 +233755,7 @@ async function getIdeLockfilesPaths() {
233739
233755
  if (user.name === "Public" || user.name === "Default" || user.name === "Default User" || user.name === "All Users") {
233740
233756
  continue;
233741
233757
  }
233742
- paths.push(join102(usersDir, user.name, getConfigDirName2(), "ide"));
233758
+ paths.push(join102(usersDir, user.name, getConfigDirName(), "ide"));
233743
233759
  }
233744
233760
  } catch (error) {
233745
233761
  if (isFsInaccessible2(error)) {
@@ -249333,7 +249349,7 @@ import {
249333
249349
  function getSkillsPath2(source, dir) {
249334
249350
  switch (source) {
249335
249351
  case "policySettings":
249336
- return join113(getManagedFilePath(), getConfigDirName2(), dir);
249352
+ return join113(getManagedFilePath(), getConfigDirName(), dir);
249337
249353
  case "userSettings":
249338
249354
  return join113(getAtlasConfigHomeDir3(), dir);
249339
249355
  case "projectSettings":
@@ -249669,7 +249685,7 @@ async function discoverSkillDirsForPaths2(filePaths, cwd) {
249669
249685
  for (const filePath of filePaths) {
249670
249686
  let currentDir = dirname53(filePath);
249671
249687
  while (currentDir.startsWith(resolvedCwd + pathSep2)) {
249672
- const skillDir = join113(currentDir, getConfigDirName2(), "skills");
249688
+ const skillDir = join113(currentDir, getConfigDirName(), "skills");
249673
249689
  if (!dynamicSkillDirs2.has(skillDir)) {
249674
249690
  dynamicSkillDirs2.add(skillDir);
249675
249691
  try {
@@ -249780,7 +249796,7 @@ var init_loadSkillsDir2 = __esm(() => {
249780
249796
  import_ignore2 = __toESM(require_ignore(), 1);
249781
249797
  getSkillDirCommands2 = memoize_default(async (cwd) => {
249782
249798
  const userSkillsDir = join113(getAtlasConfigHomeDir3(), "skills");
249783
- const managedSkillsDir = join113(getManagedFilePath(), getConfigDirName2(), "skills");
249799
+ const managedSkillsDir = join113(getManagedFilePath(), getConfigDirName(), "skills");
249784
249800
  const projectSkillsDirs = getProjectDirsUpToHome2("skills", cwd);
249785
249801
  logForDebugging3(`Loading skills from: managed=${managedSkillsDir}, user=${userSkillsDir}, project=[${projectSkillsDirs.join(", ")}]`);
249786
249802
  const additionalDirs = getAdditionalDirectoriesForClaudeMd();
@@ -249791,7 +249807,7 @@ var init_loadSkillsDir2 = __esm(() => {
249791
249807
  logForDebugging3(`[bare] Skipping skill dir discovery (${additionalDirs.length === 0 ? "no --add-dir" : "project skills disabled (kill switch) or skillsLocked"})`);
249792
249808
  return [];
249793
249809
  }
249794
- const additionalSkillsNested = await Promise.all(additionalDirs.map((dir) => loadSkillsFromSkillsDir2(join113(dir, getConfigDirName2(), "skills"), "projectSettings")));
249810
+ const additionalSkillsNested = await Promise.all(additionalDirs.map((dir) => loadSkillsFromSkillsDir2(join113(dir, getConfigDirName(), "skills"), "projectSettings")));
249795
249811
  return additionalSkillsNested.flat().map((s) => s.skill);
249796
249812
  }
249797
249813
  const [
@@ -249804,7 +249820,7 @@ var init_loadSkillsDir2 = __esm(() => {
249804
249820
  isEnvTruthy2(process.env.ATLAS_DISABLE_POLICY_SKILLS) ? Promise.resolve([]) : loadSkillsFromSkillsDir2(managedSkillsDir, "policySettings"),
249805
249821
  isSettingSourceEnabled2("userSettings") && !skillsLocked ? loadSkillsFromSkillsDir2(userSkillsDir, "userSettings") : Promise.resolve([]),
249806
249822
  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([]),
249823
+ projectSkillsEnabled ? Promise.all(additionalDirs.map((dir) => loadSkillsFromSkillsDir2(join113(dir, getConfigDirName(), "skills"), "projectSettings"))) : Promise.resolve([]),
249808
249824
  skillsLocked ? Promise.resolve([]) : loadSkillsFromCommandsDir2(cwd)
249809
249825
  ]);
249810
249826
  const allSkillsWithPaths = [
@@ -334124,7 +334140,7 @@ function hasCronTasksSync2(dir) {
334124
334140
  }
334125
334141
  async function writeCronTasks2(tasks, dir) {
334126
334142
  const root = dir ?? getProjectRoot();
334127
- await mkdir37(join126(root, getConfigDirName2()), { recursive: true });
334143
+ await mkdir37(join126(root, getConfigDirName()), { recursive: true });
334128
334144
  const body = {
334129
334145
  tasks: tasks.map(({ durable: _durable, ...rest }) => rest)
334130
334146
  };
@@ -334236,7 +334252,7 @@ var init_cronTasks2 = __esm(() => {
334236
334252
  init_json2();
334237
334253
  init_log5();
334238
334254
  init_slowOperations();
334239
- CRON_FILE_REL2 = join126(getConfigDirName2(), "scheduled_tasks.json");
334255
+ CRON_FILE_REL2 = join126(getConfigDirName(), "scheduled_tasks.json");
334240
334256
  DEFAULT_CRON_JITTER_CONFIG2 = {
334241
334257
  recurringFrac: 0.1,
334242
334258
  recurringCapMs: 15 * 60 * 1000,
@@ -345703,7 +345719,7 @@ function getProjectDirsUpToHome2(subdir, cwd) {
345703
345719
  if (normalizePathForComparison2(current) === normalizePathForComparison2(home)) {
345704
345720
  break;
345705
345721
  }
345706
- const claudeSubdir = join130(current, getConfigDirName2(), subdir);
345722
+ const claudeSubdir = join130(current, getConfigDirName(), subdir);
345707
345723
  try {
345708
345724
  statSync10(claudeSubdir);
345709
345725
  dirs.push(claudeSubdir);
@@ -345838,15 +345854,15 @@ var init_markdownConfigLoader = __esm(() => {
345838
345854
  loadMarkdownFilesForSubdir2 = memoize_default(async function(subdir, cwd) {
345839
345855
  const searchStartTime = Date.now();
345840
345856
  const userDir = join130(getAtlasConfigHomeDir3(), subdir);
345841
- const managedDir = join130(getManagedFilePath(), getConfigDirName2(), subdir);
345857
+ const managedDir = join130(getManagedFilePath(), getConfigDirName(), subdir);
345842
345858
  const projectDirs = getProjectDirsUpToHome2(subdir, cwd);
345843
345859
  const gitRoot = findGitRoot2(cwd);
345844
345860
  const canonicalRoot = findCanonicalGitRoot2(cwd);
345845
345861
  if (gitRoot && canonicalRoot && canonicalRoot !== gitRoot) {
345846
- const worktreeSubdir = normalizePathForComparison2(join130(gitRoot, getConfigDirName2(), subdir));
345862
+ const worktreeSubdir = normalizePathForComparison2(join130(gitRoot, getConfigDirName(), subdir));
345847
345863
  const worktreeHasSubdir = projectDirs.some((dir) => normalizePathForComparison2(dir) === worktreeSubdir);
345848
345864
  if (!worktreeHasSubdir) {
345849
- const mainClaudeSubdir = join130(canonicalRoot, getConfigDirName2(), subdir);
345865
+ const mainClaudeSubdir = join130(canonicalRoot, getConfigDirName(), subdir);
345850
345866
  if (!projectDirs.includes(mainClaudeSubdir)) {
345851
345867
  projectDirs.push(mainClaudeSubdir);
345852
345868
  }
@@ -360109,7 +360125,7 @@ function getInvokedBinary() {
360109
360125
  async function detectMultipleInstallations() {
360110
360126
  const fs = getFsImplementation2();
360111
360127
  const installations = [];
360112
- const localPath = join138(homedir34(), getConfigDirName2(), "local");
360128
+ const localPath = join138(homedir34(), getConfigDirName(), "local");
360113
360129
  if (await localInstallationExists()) {
360114
360130
  installations.push({ type: "npm-local", path: localPath });
360115
360131
  }
@@ -360710,9 +360726,9 @@ function getBaseDirectories() {
360710
360726
  const platform = getPlatform4();
360711
360727
  const executableName = getBinaryName(platform);
360712
360728
  return {
360713
- versions: join141(getXDGDataHome(), getConfigDirName2(), "versions"),
360714
- staging: join141(getXDGCacheHome(), getConfigDirName2(), "staging"),
360715
- locks: join141(getXDGStateHome(), getConfigDirName2(), "locks"),
360729
+ versions: join141(getXDGDataHome(), getConfigDirName(), "versions"),
360730
+ staging: join141(getXDGCacheHome(), getConfigDirName(), "staging"),
360731
+ locks: join141(getXDGStateHome(), getConfigDirName(), "locks"),
360716
360732
  executable: join141(getUserBinDir(), executableName)
360717
360733
  };
360718
360734
  }
@@ -361610,7 +361626,7 @@ async function cleanupNpmInstallations() {
361610
361626
  errors.push(macroPackageResult.error);
361611
361627
  }
361612
361628
  }
361613
- const localInstallDir = join141(homedir35(), getConfigDirName2(), "local");
361629
+ const localInstallDir = join141(homedir35(), getConfigDirName(), "local");
361614
361630
  try {
361615
361631
  await rm10(localInstallDir, { recursive: true });
361616
361632
  removed++;
@@ -370480,7 +370496,7 @@ function Doctor(t0) {
370480
370496
  }, async () => toolPermissionContext);
370481
370497
  setContextWarnings(warnings);
370482
370498
  if (isPidBasedLockingEnabled()) {
370483
- const locksDir = join142(getXDGStateHome(), getConfigDirName2(), "locks");
370499
+ const locksDir = join142(getXDGStateHome(), getConfigDirName(), "locks");
370484
370500
  const staleLocksCleaned = cleanupStaleLocks(locksDir);
370485
370501
  const locks = getAllLockInfo(locksDir);
370486
370502
  setVersionLockInfo({
@@ -394912,7 +394928,7 @@ function SkillsMenu(t0) {
394912
394928
  t2 = $[5];
394913
394929
  }
394914
394930
  const handleCancel = t2;
394915
- const configDirName = getConfigDirName2();
394931
+ const configDirName = getConfigDirName();
394916
394932
  if (skills.length === 0) {
394917
394933
  let t3;
394918
394934
  if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
@@ -405168,7 +405184,7 @@ var AGENT_PATHS;
405168
405184
  var init_types16 = __esm(() => {
405169
405185
  init_configDir();
405170
405186
  AGENT_PATHS = {
405171
- FOLDER_NAME: getConfigDirName2(),
405187
+ FOLDER_NAME: getConfigDirName(),
405172
405188
  AGENTS_DIR: "agents"
405173
405189
  };
405174
405190
  });
@@ -409104,7 +409120,7 @@ function LocationStep() {
409104
409120
  updateWizardData,
409105
409121
  cancel
409106
409122
  } = useWizard();
409107
- const configDirName = getConfigDirName2();
409123
+ const configDirName = getConfigDirName();
409108
409124
  let t0;
409109
409125
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
409110
409126
  t0 = {
@@ -409227,7 +409243,7 @@ function MemoryStep() {
409227
409243
  }
409228
409244
  useKeybinding("confirm:no", goBack, t0);
409229
409245
  const isUserScope = wizardData.location === "userSettings";
409230
- const configDirName = getConfigDirName2();
409246
+ const configDirName = getConfigDirName();
409231
409247
  let t1;
409232
409248
  if ($[1] !== isUserScope) {
409233
409249
  t1 = isUserScope ? [{
@@ -421526,7 +421542,7 @@ async function getWatchablePaths() {
421526
421542
  } catch {}
421527
421543
  }
421528
421544
  for (const dir of getAdditionalDirectoriesForClaudeMd()) {
421529
- const additionalSkillsPath = platformPath2.join(dir, getConfigDirName2(), "skills");
421545
+ const additionalSkillsPath = platformPath2.join(dir, getConfigDirName(), "skills");
421530
421546
  try {
421531
421547
  await fs.stat(additionalSkillsPath);
421532
421548
  paths.push(additionalSkillsPath);
@@ -434326,7 +434342,7 @@ function normalizeCaseForComparison2(path) {
434326
434342
  function getClaudeSkillScope(filePath) {
434327
434343
  const absolutePath = expandPath2(filePath);
434328
434344
  const absolutePathLower = normalizeCaseForComparison2(absolutePath);
434329
- const configDir = getConfigDirName2();
434345
+ const configDir = getConfigDirName();
434330
434346
  const bases = [
434331
434347
  {
434332
434348
  dir: expandPath2(join167(getOriginalCwd(), configDir, "skills")),
@@ -434388,9 +434404,9 @@ function isClaudeConfigFilePath2(filePath) {
434388
434404
  if (isAtlasSettingsPath2(filePath)) {
434389
434405
  return true;
434390
434406
  }
434391
- const commandsDir = join167(getOriginalCwd(), getConfigDirName2(), "commands");
434392
- const agentsDir = join167(getOriginalCwd(), getConfigDirName2(), "agents");
434393
- const skillsDir = join167(getOriginalCwd(), getConfigDirName2(), "skills");
434407
+ const commandsDir = join167(getOriginalCwd(), getConfigDirName(), "commands");
434408
+ const agentsDir = join167(getOriginalCwd(), getConfigDirName(), "agents");
434409
+ const skillsDir = join167(getOriginalCwd(), getConfigDirName(), "skills");
434394
434410
  return pathInWorkingPath2(filePath, commandsDir) || pathInWorkingPath2(filePath, agentsDir) || pathInWorkingPath2(filePath, skillsDir);
434395
434411
  }
434396
434412
  function isSessionPlanFile(absolutePath) {
@@ -434418,10 +434434,10 @@ function isScratchpadEnabled() {
434418
434434
  }
434419
434435
  function getAtlasTempDirName2() {
434420
434436
  if (getPlatform3() === "windows") {
434421
- return getConfigDirName2();
434437
+ return getConfigDirName();
434422
434438
  }
434423
434439
  const uid = process.getuid?.() ?? 0;
434424
- return `${getConfigDirName2()}-${uid}`;
434440
+ return `${getConfigDirName()}-${uid}`;
434425
434441
  }
434426
434442
  function getProjectTempDir2() {
434427
434443
  return join167(getAtlasTempDir2(), sanitizePath3(getOriginalCwd())) + sep38;
@@ -434460,7 +434476,7 @@ function isDangerousFilePathToAutoEdit2(path) {
434460
434476
  if (normalizedSegment !== normalizeCaseForComparison2(dir)) {
434461
434477
  continue;
434462
434478
  }
434463
- if (dir === getConfigDirName2()) {
434479
+ if (dir === getConfigDirName()) {
434464
434480
  const nextSegment = pathSegments[i + 1];
434465
434481
  if (nextSegment && normalizeCaseForComparison2(nextSegment) === "worktrees") {
434466
434482
  break;
@@ -435057,7 +435073,7 @@ function checkEditableInternalPath2(absolutePath, input) {
435057
435073
  }
435058
435074
  };
435059
435075
  }
435060
- if (normalizeCaseForComparison2(normalizedPath) === normalizeCaseForComparison2(join167(getOriginalCwd(), getConfigDirName2(), "launch.json"))) {
435076
+ if (normalizeCaseForComparison2(normalizedPath) === normalizeCaseForComparison2(join167(getOriginalCwd(), getConfigDirName(), "launch.json"))) {
435061
435077
  return {
435062
435078
  behavior: "allow",
435063
435079
  updatedInput: input,
@@ -435232,7 +435248,7 @@ var init_filesystem2 = __esm(() => {
435232
435248
  ".git",
435233
435249
  ".vscode",
435234
435250
  ".idea",
435235
- getConfigDirName2()
435251
+ getConfigDirName()
435236
435252
  ];
435237
435253
  DIR_SEP2 = posix9.sep;
435238
435254
  getAtlasTempDir2 = memoize_default(function getAtlasTempDir() {
@@ -440682,7 +440698,7 @@ function defaultSandboxDeps() {
440682
440698
  getPlatform: getPlatform3,
440683
440699
  getAdditionalDirectories: getAdditionalDirectoriesForClaudeMd,
440684
440700
  onSettingsChange: (cb) => settingsChangeDetector.subscribe(cb),
440685
- getConfigDirName: getConfigDirName2,
440701
+ getConfigDirName,
440686
440702
  getAtlasTempDir: () => getAtlasTempDir2(),
440687
440703
  getManagedSettingsDropInDir: () => getManagedSettingsDropInDir2(),
440688
440704
  updateSettingsForSource: updateSettingsForSource2,
@@ -441374,14 +441390,14 @@ async function getMemoryFilesForNestedDirectory(dir, targetPath, processedPaths)
441374
441390
  if (isSettingSourceEnabled2("projectSettings")) {
441375
441391
  const projectPath = findMemoryFile(dir);
441376
441392
  result.push(...await processMemoryFile(projectPath, "Project", processedPaths, false));
441377
- const dotClaudePath = findMemoryFile(join172(dir, getConfigDirName2()));
441393
+ const dotClaudePath = findMemoryFile(join172(dir, getConfigDirName()));
441378
441394
  result.push(...await processMemoryFile(dotClaudePath, "Project", processedPaths, false));
441379
441395
  }
441380
441396
  if (isSettingSourceEnabled2("localSettings")) {
441381
441397
  const localPath = join172(dir, "CLAUDE.local.md");
441382
441398
  result.push(...await processMemoryFile(localPath, "Local", processedPaths, false));
441383
441399
  }
441384
- const rulesDir = join172(dir, getConfigDirName2(), "rules");
441400
+ const rulesDir = join172(dir, getConfigDirName(), "rules");
441385
441401
  const unconditionalProcessedPaths = new Set(processedPaths);
441386
441402
  result.push(...await processMdRules({
441387
441403
  rulesDir,
@@ -441397,7 +441413,7 @@ async function getMemoryFilesForNestedDirectory(dir, targetPath, processedPaths)
441397
441413
  return result;
441398
441414
  }
441399
441415
  async function getConditionalRulesForCwdLevelDirectory(dir, targetPath, processedPaths) {
441400
- const rulesDir = join172(dir, getConfigDirName2(), "rules");
441416
+ const rulesDir = join172(dir, getConfigDirName(), "rules");
441401
441417
  return processConditionedMdRules(targetPath, rulesDir, "Project", processedPaths, false);
441402
441418
  }
441403
441419
  async function processConditionedMdRules(targetPath, rulesDir, type, processedPaths, includeExternal) {
@@ -441653,9 +441669,9 @@ var init_memoryFiles = __esm(() => {
441653
441669
  if (isSettingSourceEnabled2("projectSettings") && !skipProject) {
441654
441670
  const projectPath = findMemoryFile(dir);
441655
441671
  result.push(...await processMemoryFile(projectPath, "Project", processedPaths, includeExternal));
441656
- const dotClaudePath = findMemoryFile(join172(dir, getConfigDirName2()));
441672
+ const dotClaudePath = findMemoryFile(join172(dir, getConfigDirName()));
441657
441673
  result.push(...await processMemoryFile(dotClaudePath, "Project", processedPaths, includeExternal));
441658
- const rulesDir = join172(dir, getConfigDirName2(), "rules");
441674
+ const rulesDir = join172(dir, getConfigDirName(), "rules");
441659
441675
  result.push(...await processMdRules({
441660
441676
  rulesDir,
441661
441677
  type: "Project",
@@ -441674,9 +441690,9 @@ var init_memoryFiles = __esm(() => {
441674
441690
  for (const dir of additionalDirs) {
441675
441691
  const projectPath = findMemoryFile(dir);
441676
441692
  result.push(...await processMemoryFile(projectPath, "Project", processedPaths, includeExternal));
441677
- const dotClaudePath = findMemoryFile(join172(dir, getConfigDirName2()));
441693
+ const dotClaudePath = findMemoryFile(join172(dir, getConfigDirName()));
441678
441694
  result.push(...await processMemoryFile(dotClaudePath, "Project", processedPaths, includeExternal));
441679
- const rulesDir = join172(dir, getConfigDirName2(), "rules");
441695
+ const rulesDir = join172(dir, getConfigDirName(), "rules");
441680
441696
  result.push(...await processMdRules({
441681
441697
  rulesDir,
441682
441698
  type: "Project",
@@ -450311,14 +450327,14 @@ import { homedir as homedir40 } from "os";
450311
450327
  import { basename as basename54, join as join173, sep as sep40 } from "path";
450312
450328
  function isInClaudeFolder(filePath) {
450313
450329
  const absolutePath = expandPath2(filePath);
450314
- const claudeFolderPath = expandPath2(`${getOriginalCwd()}/${getConfigDirName2()}`);
450330
+ const claudeFolderPath = expandPath2(`${getOriginalCwd()}/${getConfigDirName()}`);
450315
450331
  const normalizedAbsolutePath = normalizeCaseForComparison2(absolutePath);
450316
450332
  const normalizedClaudeFolderPath = normalizeCaseForComparison2(claudeFolderPath);
450317
450333
  return normalizedAbsolutePath.startsWith(normalizedClaudeFolderPath + sep40.toLowerCase()) || normalizedAbsolutePath.startsWith(normalizedClaudeFolderPath + "/");
450318
450334
  }
450319
450335
  function isInGlobalClaudeFolder(filePath) {
450320
450336
  const absolutePath = expandPath2(filePath);
450321
- const globalClaudeFolderPath = join173(homedir40(), getConfigDirName2());
450337
+ const globalClaudeFolderPath = join173(homedir40(), getConfigDirName());
450322
450338
  const normalizedAbsolutePath = normalizeCaseForComparison2(absolutePath);
450323
450339
  const normalizedGlobalClaudeFolderPath = normalizeCaseForComparison2(globalClaudeFolderPath);
450324
450340
  return normalizedAbsolutePath.startsWith(normalizedGlobalClaudeFolderPath + sep40.toLowerCase()) || normalizedAbsolutePath.startsWith(normalizedGlobalClaudeFolderPath + "/");
@@ -466993,7 +467009,7 @@ import { readFileSync as readFileSync24, existsSync as existsSync14, writeFileSy
466993
467009
  import { join as join175 } from "path";
466994
467010
  import { homedir as homedir43 } from "os";
466995
467011
  function getStatusLineJsonPath() {
466996
- return join175(homedir43(), getConfigDirName2(), "statusline.json");
467012
+ return join175(homedir43(), getConfigDirName(), "statusline.json");
466997
467013
  }
466998
467014
  function getDefaultConfig() {
466999
467015
  return {
@@ -471659,7 +471675,7 @@ async function applySkillImprovement(skillName, updates) {
471659
471675
  return;
471660
471676
  const { join } = await import("path");
471661
471677
  const fs = await import("fs/promises");
471662
- const filePath = join(getCwd(), getConfigDirName2(), "skills", skillName, "SKILL.md");
471678
+ const filePath = join(getCwd(), getConfigDirName(), "skills", skillName, "SKILL.md");
471663
471679
  let currentContent;
471664
471680
  try {
471665
471681
  currentContent = await fs.readFile(filePath, "utf-8");
@@ -484031,7 +484047,7 @@ var init_cronTasksLock2 = __esm(() => {
484031
484047
  init_genericProcessUtils();
484032
484048
  init_json2();
484033
484049
  init_slowOperations();
484034
- LOCK_FILE_REL2 = join182(getConfigDirName2(), "scheduled_tasks.lock");
484050
+ LOCK_FILE_REL2 = join182(getConfigDirName(), "scheduled_tasks.lock");
484035
484051
  schedulerLockSchema2 = lazySchema2(() => object({
484036
484052
  sessionId: string2(),
484037
484053
  pid: number2(),
@@ -498452,7 +498468,7 @@ import { dirname as dirname91, join as join193 } from "path";
498452
498468
  function detectShell() {
498453
498469
  const shell = process.env.SHELL || "";
498454
498470
  const home = homedir51();
498455
- const claudeDir = join193(home, getConfigDirName2());
498471
+ const claudeDir = join193(home, getConfigDirName());
498456
498472
  if (shell.endsWith("/zsh") || shell.endsWith("/zsh.exe")) {
498457
498473
  const cacheFile = join193(claudeDir, "completion.zsh");
498458
498474
  return {
@@ -501120,6 +501136,7 @@ function createEndpointConfigSource() {
501120
501136
  }
501121
501137
 
501122
501138
  // src/atlascode/sandboxDeps.ts
501139
+ init_shared();
501123
501140
  var SETTING_SOURCES2 = [
501124
501141
  "userSettings",
501125
501142
  "projectSettings",
@@ -501157,7 +501174,7 @@ function createInMemorySandboxDeps() {
501157
501174
  getPlatform: () => resolvePlatform(),
501158
501175
  getAdditionalDirectories: () => [],
501159
501176
  onSettingsChange: () => () => {},
501160
- getConfigDirName: () => ".atlas",
501177
+ getConfigDirName: () => getConfigDirName(),
501161
501178
  getAtlasTempDir: () => tempDir,
501162
501179
  getManagedSettingsDropInDir: () => "/etc/atlas/managed_settings.json",
501163
501180
  updateSettingsForSource: (source, values) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlasharness/atlascode",
3
- "version": "0.1.96",
3
+ "version": "0.1.98",
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": {