@atlasharness/atlascode 0.1.14 → 0.1.15

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 +25 -14
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -863,20 +863,24 @@ async function executeToolUse(tu, assistantMsg, deps) {
863
863
  const callInput = verdict.updatedInput ?? effectiveInput;
864
864
  let block;
865
865
  let isError = false;
866
+ let toolUseResult;
866
867
  try {
867
868
  const res = await tool.call(callInput, toolCallContext, undefined, assistantMsg);
868
869
  block = tool.mapToolResultToToolResultBlockParam(res.data, tu.id);
870
+ toolUseResult = res.data;
869
871
  } catch (error) {
872
+ const errorText = `tool error [${classifyToolError(error)}]: ${String(error?.message ?? error)}`;
870
873
  block = {
871
874
  type: "tool_result",
872
875
  tool_use_id: tu.id,
873
- content: `<tool_use_error>tool error [${classifyToolError(error)}]: ${String(error?.message ?? error)}</tool_use_error>`,
876
+ content: `<tool_use_error>${errorText}</tool_use_error>`,
874
877
  is_error: true
875
878
  };
876
879
  isError = true;
880
+ toolUseResult = errorText;
877
881
  }
878
882
  const postOutcome = await deps.hooks?.postToolUse?.(tool, callInput, block, tu.id);
879
- return { block, isError };
883
+ return { block, isError, toolUseResult };
880
884
  }
881
885
  var init_toolExecution = () => {};
882
886
 
@@ -903,7 +907,13 @@ async function runToolBatch(toolUses, assistantMsg, deps) {
903
907
  for (const batch of partitionToolCalls(toolUses, deps.tools)) {
904
908
  for (const tu of batch.blocks) {
905
909
  const r = await executeToolUse(tu, assistantMsg, deps);
906
- outcomes.push({ toolUseId: tu.id, name: tu.name, block: r.block, isError: r.isError });
910
+ outcomes.push({
911
+ toolUseId: tu.id,
912
+ name: tu.name,
913
+ block: r.block,
914
+ isError: r.isError,
915
+ toolUseResult: r.toolUseResult
916
+ });
907
917
  }
908
918
  }
909
919
  return outcomes;
@@ -75853,7 +75863,7 @@ var init_loadSkillsDir = __esm(() => {
75853
75863
  logForDebugging(`Loading skills from: managed=${managedSkillsDir}, user=${userSkillsDir}, project=[${projectSkillsDirs.join(", ")}]`);
75854
75864
  const additionalDirs = [];
75855
75865
  const skillsLocked = false;
75856
- const projectSettingsEnabled = isSettingSourceEnabled("projectSettings") && !skillsLocked;
75866
+ const projectSkillsEnabled = !skillsLocked && !isEnvTruthy(process.env.ATLAS_DISABLE_PROJECT_SKILLS);
75857
75867
  const [
75858
75868
  managedSkills,
75859
75869
  userSkills,
@@ -75863,8 +75873,8 @@ var init_loadSkillsDir = __esm(() => {
75863
75873
  ] = await Promise.all([
75864
75874
  isEnvTruthy(process.env.ATLAS_DISABLE_POLICY_SKILLS) ? Promise.resolve([]) : loadSkillsFromSkillsDir(managedSkillsDir, "policySettings"),
75865
75875
  isSettingSourceEnabled("userSettings") && !skillsLocked ? loadSkillsFromSkillsDir(userSkillsDir, "userSettings") : Promise.resolve([]),
75866
- projectSettingsEnabled ? Promise.all(projectSkillsDirs.map((dir) => loadSkillsFromSkillsDir(dir, "projectSettings"))) : Promise.resolve([]),
75867
- projectSettingsEnabled ? Promise.all(additionalDirs.map((dir) => loadSkillsFromSkillsDir(join31(dir, ".atlas", "skills"), "projectSettings"))) : Promise.resolve([]),
75876
+ projectSkillsEnabled ? Promise.all(projectSkillsDirs.map((dir) => loadSkillsFromSkillsDir(dir, "projectSettings"))) : Promise.resolve([]),
75877
+ projectSkillsEnabled ? Promise.all(additionalDirs.map((dir) => loadSkillsFromSkillsDir(join31(dir, ".atlas", "skills"), "projectSettings"))) : Promise.resolve([]),
75868
75878
  skillsLocked ? Promise.resolve([]) : loadSkillsFromCommandsDir(cwd)
75869
75879
  ]);
75870
75880
  const allSkillsWithPaths = [
@@ -80590,7 +80600,8 @@ async function queryOneRound(deps, tools, messages) {
80590
80600
  role: "user",
80591
80601
  uuid: randomUUID18(),
80592
80602
  timestamp: now,
80593
- message: { role: "user", content: [o.block] }
80603
+ message: { role: "user", content: [o.block] },
80604
+ toolUseResult: o.toolUseResult
80594
80605
  }));
80595
80606
  if (deps.transcript) {
80596
80607
  deps.transcript.record([...messages, assistantMsg, ...resultMessages]);
@@ -322785,8 +322796,8 @@ async function discoverSkillDirsForPaths2(filePaths, cwd) {
322785
322796
  return newDirs.sort((a, b) => b.split(pathSep2).length - a.split(pathSep2).length);
322786
322797
  }
322787
322798
  async function addSkillDirectories2(dirs) {
322788
- if (!isSettingSourceEnabled2("projectSettings") || isRestrictedToPluginOnly("skills")) {
322789
- logForDebugging3("[skills] Dynamic skill discovery skipped: projectSettings disabled or plugin-only policy");
322799
+ if (isEnvTruthy2(process.env.ATLAS_DISABLE_PROJECT_SKILLS) || isRestrictedToPluginOnly("skills")) {
322800
+ logForDebugging3("[skills] Dynamic skill discovery skipped: ATLAS_DISABLE_PROJECT_SKILLS kill switch or plugin-only policy");
322790
322801
  return;
322791
322802
  }
322792
322803
  if (dirs.length === 0) {
@@ -322879,10 +322890,10 @@ var init_loadSkillsDir2 = __esm(() => {
322879
322890
  logForDebugging3(`Loading skills from: managed=${managedSkillsDir}, user=${userSkillsDir}, project=[${projectSkillsDirs.join(", ")}]`);
322880
322891
  const additionalDirs = getAdditionalDirectoriesForClaudeMd();
322881
322892
  const skillsLocked = isRestrictedToPluginOnly("skills");
322882
- const projectSettingsEnabled = isSettingSourceEnabled2("projectSettings") && !skillsLocked;
322893
+ const projectSkillsEnabled = !skillsLocked && !isEnvTruthy2(process.env.ATLAS_DISABLE_PROJECT_SKILLS);
322883
322894
  if (isBareMode()) {
322884
- if (additionalDirs.length === 0 || !projectSettingsEnabled) {
322885
- logForDebugging3(`[bare] Skipping skill dir discovery (${additionalDirs.length === 0 ? "no --add-dir" : "projectSettings disabled or skillsLocked"})`);
322895
+ if (additionalDirs.length === 0 || !projectSkillsEnabled) {
322896
+ logForDebugging3(`[bare] Skipping skill dir discovery (${additionalDirs.length === 0 ? "no --add-dir" : "project skills disabled (kill switch) or skillsLocked"})`);
322886
322897
  return [];
322887
322898
  }
322888
322899
  const additionalSkillsNested = await Promise.all(additionalDirs.map((dir) => loadSkillsFromSkillsDir2(join107(dir, getConfigDirName2(), "skills"), "projectSettings")));
@@ -322897,8 +322908,8 @@ var init_loadSkillsDir2 = __esm(() => {
322897
322908
  ] = await Promise.all([
322898
322909
  isEnvTruthy2(process.env.ATLAS_DISABLE_POLICY_SKILLS) ? Promise.resolve([]) : loadSkillsFromSkillsDir2(managedSkillsDir, "policySettings"),
322899
322910
  isSettingSourceEnabled2("userSettings") && !skillsLocked ? loadSkillsFromSkillsDir2(userSkillsDir, "userSettings") : Promise.resolve([]),
322900
- projectSettingsEnabled ? Promise.all(projectSkillsDirs.map((dir) => loadSkillsFromSkillsDir2(dir, "projectSettings"))) : Promise.resolve([]),
322901
- projectSettingsEnabled ? Promise.all(additionalDirs.map((dir) => loadSkillsFromSkillsDir2(join107(dir, getConfigDirName2(), "skills"), "projectSettings"))) : Promise.resolve([]),
322911
+ projectSkillsEnabled ? Promise.all(projectSkillsDirs.map((dir) => loadSkillsFromSkillsDir2(dir, "projectSettings"))) : Promise.resolve([]),
322912
+ projectSkillsEnabled ? Promise.all(additionalDirs.map((dir) => loadSkillsFromSkillsDir2(join107(dir, getConfigDirName2(), "skills"), "projectSettings"))) : Promise.resolve([]),
322902
322913
  skillsLocked ? Promise.resolve([]) : loadSkillsFromCommandsDir2(cwd)
322903
322914
  ]);
322904
322915
  const allSkillsWithPaths = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlasharness/atlascode",
3
- "version": "0.1.14",
3
+ "version": "0.1.15",
4
4
  "description": "AtlasCode \u2014 Coding Agent for the domestic computing ecosystem (Ascend NPU + domestic LLM backends)",
5
5
  "bin": {
6
6
  "atlas": "dist/cli.js",