@botbotgo/agent-harness 0.0.35 → 0.0.36
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const AGENT_HARNESS_VERSION = "0.0.
|
|
1
|
+
export declare const AGENT_HARNESS_VERSION = "0.0.35";
|
package/dist/package-version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const AGENT_HARNESS_VERSION = "0.0.
|
|
1
|
+
export const AGENT_HARNESS_VERSION = "0.0.35";
|
|
@@ -2,6 +2,7 @@ import { interrupt } from "@langchain/langgraph";
|
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
const DEDUPED_REMOTE_TOOL_NAMES = new Set(["builtin.fetch_url", "builtin.web_search"]);
|
|
4
4
|
const PATH_LIKE_INPUT_KEYS = new Set(["path", "root", "dir", "directory", "cwd"]);
|
|
5
|
+
const ROOT_SCOPING_INPUT_KEYS = new Set(["root", "dir", "directory", "cwd"]);
|
|
5
6
|
function toInputPreview(input) {
|
|
6
7
|
if (typeof input === "object" && input && !Array.isArray(input)) {
|
|
7
8
|
return input;
|
|
@@ -129,6 +130,10 @@ function guardWorkspaceBoundToolInput(input, compiledTool, binding) {
|
|
|
129
130
|
const absolute = path.resolve(workspaceRoot, candidate);
|
|
130
131
|
const relative = path.relative(workspaceRoot, absolute);
|
|
131
132
|
if (relative.startsWith("..") || path.isAbsolute(relative)) {
|
|
133
|
+
if (ROOT_SCOPING_INPUT_KEYS.has(key)) {
|
|
134
|
+
record[key] = workspaceRoot;
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
132
137
|
throw new Error(`Tool ${compiledTool.name} input ${key} resolves outside the workspace root`);
|
|
133
138
|
}
|
|
134
139
|
}
|