cascade-ai 0.19.1 → 0.20.0
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/README.md +2 -1
- package/bin/cascade.js +0 -0
- package/dist/cli.cjs +29 -20
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +29 -20
- package/dist/cli.js.map +1 -1
- package/dist/desktop-core.cjs +29 -20
- package/dist/index.cjs +29 -20
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +29 -20
- package/dist/index.js.map +1 -1
- package/package.json +6 -2
package/dist/cli.js
CHANGED
|
@@ -59,7 +59,7 @@ var __export = (target, all) => {
|
|
|
59
59
|
var CASCADE_VERSION, CASCADE_CONFIG_FILE, CASCADE_DB_FILE, CASCADE_DASHBOARD_SECRET_FILE, GLOBAL_CONFIG_DIR, GLOBAL_DB_FILE, GLOBAL_KEYSTORE_FILE, GLOBAL_CREDENTIALS_FILE, GLOBAL_RUNTIME_DB_FILE, DEFAULT_DASHBOARD_PORT, DEFAULT_CONTEXT_LIMIT, DEFAULT_AUTO_SUMMARIZE_AT, MODELS, T1_MODEL_PRIORITY, T2_MODEL_PRIORITY, T3_MODEL_PRIORITY, VISION_MODEL_PRIORITY, COMPLEXITY_T2_COUNT, THEME_NAMES, DEFAULT_THEME, OLLAMA_BASE_URL, LM_STUDIO_BASE_URL, AZURE_BASE_URL_TEMPLATE, TOOL_NAMES, DEFAULT_APPROVAL_REQUIRED;
|
|
60
60
|
var init_constants = __esm({
|
|
61
61
|
"src/constants.ts"() {
|
|
62
|
-
CASCADE_VERSION = "0.
|
|
62
|
+
CASCADE_VERSION = "0.20.0";
|
|
63
63
|
CASCADE_CONFIG_FILE = ".cascade/config.json";
|
|
64
64
|
CASCADE_DB_FILE = ".cascade/memory.db";
|
|
65
65
|
CASCADE_DASHBOARD_SECRET_FILE = ".cascade/dashboard-secret";
|
|
@@ -2948,7 +2948,13 @@ var ToolsConfigSchema = z.object({
|
|
|
2948
2948
|
* - 'worker': node:worker_threads (resource/kill limits, but not capability-confined).
|
|
2949
2949
|
* - 'auto' (default): use the isolate when `isolated-vm` loads, else fall back to worker.
|
|
2950
2950
|
*/
|
|
2951
|
-
dynamicToolSandbox: z.enum(["isolate", "worker", "auto"]).default("auto")
|
|
2951
|
+
dynamicToolSandbox: z.enum(["isolate", "worker", "auto"]).default("auto"),
|
|
2952
|
+
/**
|
|
2953
|
+
* When set, ONLY these tool names are registered — the sole way to omit a
|
|
2954
|
+
* built-in tool (shell/file/git/…) from existing at all, rather than just
|
|
2955
|
+
* gating it behind approval. Omitted = full default set (unchanged).
|
|
2956
|
+
*/
|
|
2957
|
+
enabledTools: z.array(z.string()).optional()
|
|
2952
2958
|
});
|
|
2953
2959
|
var HookDefinitionSchema = z.object({
|
|
2954
2960
|
name: z.string().optional(),
|
|
@@ -10089,29 +10095,32 @@ var ToolRegistry = class extends EventEmitter {
|
|
|
10089
10095
|
return tool.execute(input, options);
|
|
10090
10096
|
}
|
|
10091
10097
|
registerDefaults() {
|
|
10092
|
-
const
|
|
10093
|
-
|
|
10094
|
-
|
|
10095
|
-
new
|
|
10096
|
-
new
|
|
10097
|
-
new
|
|
10098
|
-
new
|
|
10099
|
-
new
|
|
10100
|
-
new
|
|
10101
|
-
new
|
|
10102
|
-
new
|
|
10103
|
-
new
|
|
10104
|
-
new
|
|
10105
|
-
new
|
|
10106
|
-
new
|
|
10107
|
-
new
|
|
10108
|
-
new
|
|
10098
|
+
const allowlist = this.config.enabledTools;
|
|
10099
|
+
const enabled = (name) => !allowlist || allowlist.includes(name);
|
|
10100
|
+
const candidates2 = [
|
|
10101
|
+
enabled("shell") && new ShellTool(this.config.shellAllowlist, this.config.shellBlocklist),
|
|
10102
|
+
enabled("file_read") && new FileReadTool(),
|
|
10103
|
+
enabled("file_write") && new FileWriteTool(),
|
|
10104
|
+
enabled("file_edit") && new FileEditTool(),
|
|
10105
|
+
enabled("file_delete") && new FileDeleteTool(),
|
|
10106
|
+
enabled("file_list") && new FileListTool(),
|
|
10107
|
+
enabled("git") && new GitTool(),
|
|
10108
|
+
enabled("github") && new GitHubTool(),
|
|
10109
|
+
enabled("image_analyze") && new ImageAnalyzeTool(),
|
|
10110
|
+
enabled("pdf_create") && new PDFCreateTool(),
|
|
10111
|
+
enabled("run_code") && new CodeInterpreterTool(),
|
|
10112
|
+
enabled("peer_message") && new PeerCommunicationTool(),
|
|
10113
|
+
enabled("web_search") && new WebSearchTool(this.config.webSearch),
|
|
10114
|
+
enabled("glob") && new GlobTool(),
|
|
10115
|
+
enabled("grep") && new GrepTool(),
|
|
10116
|
+
enabled("web_fetch") && new WebFetchTool()
|
|
10109
10117
|
];
|
|
10118
|
+
const tools = candidates2.filter((t) => t !== false);
|
|
10110
10119
|
for (const tool of tools) {
|
|
10111
10120
|
tool.setWorkspaceRoot(this.workspaceRoot);
|
|
10112
10121
|
this.register(tool);
|
|
10113
10122
|
}
|
|
10114
|
-
if (this.config.browserEnabled) {
|
|
10123
|
+
if (this.config.browserEnabled && enabled("browser")) {
|
|
10115
10124
|
const browser = new BrowserTool();
|
|
10116
10125
|
browser.setWorkspaceRoot(this.workspaceRoot);
|
|
10117
10126
|
this.register(browser);
|