@atlasharness/atlascode 0.1.24 → 0.1.25
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.
- package/dist/cli.js +12 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -45912,7 +45912,7 @@ var init_bashCommandHelpers = __esm(() => {
|
|
|
45912
45912
|
// src/engine/tools/bash/bashReadOnly.ts
|
|
45913
45913
|
function isReadOnlyCommand(command) {
|
|
45914
45914
|
const trimmed = command.trim();
|
|
45915
|
-
if (trimmed.includes("&&") || trimmed.includes("||") || trimmed.includes(";") || trimmed.includes("|") || trimmed.includes("`") || trimmed.includes("$(")) {
|
|
45915
|
+
if (trimmed.includes("&&") || trimmed.includes("||") || trimmed.includes(";") || trimmed.includes("|") || trimmed.includes("`") || trimmed.includes("$(") || trimmed.includes(">")) {
|
|
45916
45916
|
return false;
|
|
45917
45917
|
}
|
|
45918
45918
|
return READ_ONLY_PREFIXES.some((p) => trimmed === p || trimmed.startsWith(p + " "));
|
|
@@ -178701,6 +178701,7 @@ __export(exports_engineCompat, {
|
|
|
178701
178701
|
backgroundAgentTask: () => backgroundAgentTask,
|
|
178702
178702
|
backgroundAll: () => backgroundAll,
|
|
178703
178703
|
backgroundExistingForegroundTask: () => backgroundExistingForegroundTask,
|
|
178704
|
+
bashToolHasPermission: () => bashToolHasPermission,
|
|
178704
178705
|
blockTask: () => blockTask,
|
|
178705
178706
|
buildChildMessage: () => buildChildMessage,
|
|
178706
178707
|
buildConversationChain: () => buildConversationChain,
|
|
@@ -322691,8 +322692,16 @@ var init_BashTool = __esm(() => {
|
|
|
322691
322692
|
async prompt() {
|
|
322692
322693
|
return getSimplePrompt2();
|
|
322693
322694
|
},
|
|
322694
|
-
async checkPermissions(input) {
|
|
322695
|
-
|
|
322695
|
+
async checkPermissions(input, context) {
|
|
322696
|
+
const ctx = context;
|
|
322697
|
+
const mode = ctx?.getAppState?.()?.toolPermissionContext?.mode ?? ctx?.getToolPermissionContext?.()?.mode;
|
|
322698
|
+
if (mode === "auto") {
|
|
322699
|
+
return {
|
|
322700
|
+
behavior: "passthrough",
|
|
322701
|
+
message: "Bash command in auto mode requires confirmation"
|
|
322702
|
+
};
|
|
322703
|
+
}
|
|
322704
|
+
return bashToolHasPermission(input, context);
|
|
322696
322705
|
},
|
|
322697
322706
|
renderToolUseMessage: renderToolUseMessage25,
|
|
322698
322707
|
mapToolResultToToolResultBlockParam: BashTool.mapToolResultToToolResultBlockParam,
|
package/package.json
CHANGED