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.
@@ -222595,7 +222595,7 @@ Anthropic.Models = Models2;
222595
222595
  Anthropic.Beta = Beta;
222596
222596
 
222597
222597
  // src/constants.ts
222598
- var CASCADE_VERSION = "0.19.1";
222598
+ var CASCADE_VERSION = "0.20.0";
222599
222599
  var CASCADE_CONFIG_DIR = ".cascade";
222600
222600
  var CASCADE_MD_FILE = "CASCADE.md";
222601
222601
  var CASCADE_IGNORE_FILE = ".cascadeignore";
@@ -283244,29 +283244,32 @@ var ToolRegistry = class extends EventEmitter__default.default {
283244
283244
  return tool.execute(input, options);
283245
283245
  }
283246
283246
  registerDefaults() {
283247
- const tools = [
283248
- new ShellTool(this.config.shellAllowlist, this.config.shellBlocklist),
283249
- new FileReadTool(),
283250
- new FileWriteTool(),
283251
- new FileEditTool(),
283252
- new FileDeleteTool(),
283253
- new FileListTool(),
283254
- new GitTool(),
283255
- new GitHubTool(),
283256
- new ImageAnalyzeTool(),
283257
- new PDFCreateTool(),
283258
- new CodeInterpreterTool(),
283259
- new PeerCommunicationTool(),
283260
- new WebSearchTool(this.config.webSearch),
283261
- new GlobTool(),
283262
- new GrepTool(),
283263
- new WebFetchTool()
283247
+ const allowlist = this.config.enabledTools;
283248
+ const enabled = (name) => !allowlist || allowlist.includes(name);
283249
+ const candidates = [
283250
+ enabled("shell") && new ShellTool(this.config.shellAllowlist, this.config.shellBlocklist),
283251
+ enabled("file_read") && new FileReadTool(),
283252
+ enabled("file_write") && new FileWriteTool(),
283253
+ enabled("file_edit") && new FileEditTool(),
283254
+ enabled("file_delete") && new FileDeleteTool(),
283255
+ enabled("file_list") && new FileListTool(),
283256
+ enabled("git") && new GitTool(),
283257
+ enabled("github") && new GitHubTool(),
283258
+ enabled("image_analyze") && new ImageAnalyzeTool(),
283259
+ enabled("pdf_create") && new PDFCreateTool(),
283260
+ enabled("run_code") && new CodeInterpreterTool(),
283261
+ enabled("peer_message") && new PeerCommunicationTool(),
283262
+ enabled("web_search") && new WebSearchTool(this.config.webSearch),
283263
+ enabled("glob") && new GlobTool(),
283264
+ enabled("grep") && new GrepTool(),
283265
+ enabled("web_fetch") && new WebFetchTool()
283264
283266
  ];
283267
+ const tools = candidates.filter((t4) => t4 !== false);
283265
283268
  for (const tool of tools) {
283266
283269
  tool.setWorkspaceRoot(this.workspaceRoot);
283267
283270
  this.register(tool);
283268
283271
  }
283269
- if (this.config.browserEnabled) {
283272
+ if (this.config.browserEnabled && enabled("browser")) {
283270
283273
  const browser = new BrowserTool();
283271
283274
  browser.setWorkspaceRoot(this.workspaceRoot);
283272
283275
  this.register(browser);
@@ -294901,7 +294904,13 @@ var ToolsConfigSchema = external_exports.object({
294901
294904
  * - 'worker': node:worker_threads (resource/kill limits, but not capability-confined).
294902
294905
  * - 'auto' (default): use the isolate when `isolated-vm` loads, else fall back to worker.
294903
294906
  */
294904
- dynamicToolSandbox: external_exports.enum(["isolate", "worker", "auto"]).default("auto")
294907
+ dynamicToolSandbox: external_exports.enum(["isolate", "worker", "auto"]).default("auto"),
294908
+ /**
294909
+ * When set, ONLY these tool names are registered — the sole way to omit a
294910
+ * built-in tool (shell/file/git/…) from existing at all, rather than just
294911
+ * gating it behind approval. Omitted = full default set (unchanged).
294912
+ */
294913
+ enabledTools: external_exports.array(external_exports.string()).optional()
294905
294914
  });
294906
294915
  var HookDefinitionSchema = external_exports.object({
294907
294916
  name: external_exports.string().optional(),
package/dist/index.cjs CHANGED
@@ -236,7 +236,7 @@ var init_audit_logger = __esm({
236
236
  });
237
237
 
238
238
  // src/constants.ts
239
- var CASCADE_VERSION = "0.19.1";
239
+ var CASCADE_VERSION = "0.20.0";
240
240
  var CASCADE_CONFIG_DIR = ".cascade";
241
241
  var CASCADE_MD_FILE = "CASCADE.md";
242
242
  var CASCADE_IGNORE_FILE = ".cascadeignore";
@@ -8091,29 +8091,32 @@ var ToolRegistry = class extends EventEmitter__default.default {
8091
8091
  return tool.execute(input, options);
8092
8092
  }
8093
8093
  registerDefaults() {
8094
- const tools = [
8095
- new ShellTool(this.config.shellAllowlist, this.config.shellBlocklist),
8096
- new FileReadTool(),
8097
- new FileWriteTool(),
8098
- new FileEditTool(),
8099
- new FileDeleteTool(),
8100
- new FileListTool(),
8101
- new GitTool(),
8102
- new GitHubTool(),
8103
- new ImageAnalyzeTool(),
8104
- new PDFCreateTool(),
8105
- new CodeInterpreterTool(),
8106
- new PeerCommunicationTool(),
8107
- new WebSearchTool(this.config.webSearch),
8108
- new GlobTool(),
8109
- new GrepTool(),
8110
- new WebFetchTool()
8094
+ const allowlist = this.config.enabledTools;
8095
+ const enabled = (name) => !allowlist || allowlist.includes(name);
8096
+ const candidates = [
8097
+ enabled("shell") && new ShellTool(this.config.shellAllowlist, this.config.shellBlocklist),
8098
+ enabled("file_read") && new FileReadTool(),
8099
+ enabled("file_write") && new FileWriteTool(),
8100
+ enabled("file_edit") && new FileEditTool(),
8101
+ enabled("file_delete") && new FileDeleteTool(),
8102
+ enabled("file_list") && new FileListTool(),
8103
+ enabled("git") && new GitTool(),
8104
+ enabled("github") && new GitHubTool(),
8105
+ enabled("image_analyze") && new ImageAnalyzeTool(),
8106
+ enabled("pdf_create") && new PDFCreateTool(),
8107
+ enabled("run_code") && new CodeInterpreterTool(),
8108
+ enabled("peer_message") && new PeerCommunicationTool(),
8109
+ enabled("web_search") && new WebSearchTool(this.config.webSearch),
8110
+ enabled("glob") && new GlobTool(),
8111
+ enabled("grep") && new GrepTool(),
8112
+ enabled("web_fetch") && new WebFetchTool()
8111
8113
  ];
8114
+ const tools = candidates.filter((t) => t !== false);
8112
8115
  for (const tool of tools) {
8113
8116
  tool.setWorkspaceRoot(this.workspaceRoot);
8114
8117
  this.register(tool);
8115
8118
  }
8116
- if (this.config.browserEnabled) {
8119
+ if (this.config.browserEnabled && enabled("browser")) {
8117
8120
  const browser = new BrowserTool();
8118
8121
  browser.setWorkspaceRoot(this.workspaceRoot);
8119
8122
  this.register(browser);
@@ -8463,7 +8466,13 @@ var ToolsConfigSchema = zod.z.object({
8463
8466
  * - 'worker': node:worker_threads (resource/kill limits, but not capability-confined).
8464
8467
  * - 'auto' (default): use the isolate when `isolated-vm` loads, else fall back to worker.
8465
8468
  */
8466
- dynamicToolSandbox: zod.z.enum(["isolate", "worker", "auto"]).default("auto")
8469
+ dynamicToolSandbox: zod.z.enum(["isolate", "worker", "auto"]).default("auto"),
8470
+ /**
8471
+ * When set, ONLY these tool names are registered — the sole way to omit a
8472
+ * built-in tool (shell/file/git/…) from existing at all, rather than just
8473
+ * gating it behind approval. Omitted = full default set (unchanged).
8474
+ */
8475
+ enabledTools: zod.z.array(zod.z.string()).optional()
8467
8476
  });
8468
8477
  var HookDefinitionSchema = zod.z.object({
8469
8478
  name: zod.z.string().optional(),