cascade-ai 0.76.0 → 0.78.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/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import EventEmitter from 'node:events';
2
2
  import { OAuthClientProvider } from '@modelcontextprotocol/sdk/client/auth.js';
3
+ import { z } from 'zod';
3
4
  import { Server } from 'node:http';
4
5
  import { OAuthClientInformationMixed, OAuthTokens, OAuthClientMetadata, OAuthClientInformationFull } from '@modelcontextprotocol/sdk/shared/auth.js';
5
6
  export { OAuthClientInformationMixed, OAuthTokens } from '@modelcontextprotocol/sdk/shared/auth.js';
@@ -368,6 +369,20 @@ interface WebSearchConfig {
368
369
  braveApiKey?: string;
369
370
  tavilyApiKey?: string;
370
371
  maxResults?: number;
372
+ /**
373
+ * Route `searxngUrl` through the SSRF guard — set by hosts that take the URL
374
+ * from a request rather than from local config. Full reasoning on the
375
+ * matching field in `src/tools/web-search.ts`, which is the copy the tool
376
+ * actually reads.
377
+ *
378
+ * This shape is declared in THREE places that must move together: here, that
379
+ * interface, and `WebSearchConfigSchema` in `src/config/schema.ts`. The zod
380
+ * one is load-bearing rather than decorative — `createCascade` runs the whole
381
+ * config through `CascadeConfigSchema.parse()`, which strips keys the schema
382
+ * does not name, so a field added only to the interfaces type-checks and then
383
+ * silently vanishes at runtime.
384
+ */
385
+ guardSearxngUrl?: boolean;
371
386
  }
372
387
  interface Message {
373
388
  id: string;
@@ -858,6 +873,13 @@ interface ToolsConfig {
858
873
  shellBlocklist: string[];
859
874
  requireApprovalFor: string[];
860
875
  browserEnabled: boolean;
876
+ /**
877
+ * Let a run act on the desktop's built-in browser, not just read it. Separate
878
+ * from `browserEnabled` (headless Playwright) because it drives the user's
879
+ * signed-in session. See `src/config/schema.ts` and
880
+ * `src/tools/browser-control.ts`.
881
+ */
882
+ agentBrowserControl?: boolean;
861
883
  mcpServers?: McpServerConfig$1[];
862
884
  /**
863
885
  * Names of MCP servers (matching McpServerConfig.name) that the user has
@@ -3163,6 +3185,143 @@ declare class CurrentPageTool extends BaseTool {
3163
3185
  execute(_input: Record<string, unknown>, _options: ToolExecuteOptions): Promise<string>;
3164
3186
  }
3165
3187
 
3188
+ /** One thing to do to the open page. */
3189
+ interface BrowserAction {
3190
+ kind: 'navigate' | 'click' | 'fill' | 'press' | 'wait_for' | 'extract_text';
3191
+ /** navigate */
3192
+ url?: string;
3193
+ /** click, fill, wait_for, extract_text (optional — defaults to the body) */
3194
+ selector?: string;
3195
+ /** fill */
3196
+ value?: string;
3197
+ /** press — a single key name, e.g. "Enter" or "Tab" */
3198
+ key?: string;
3199
+ /** wait_for */
3200
+ timeoutMs?: number;
3201
+ }
3202
+ interface BrowserActionOutcome {
3203
+ ok: boolean;
3204
+ /** Human- and model-readable account of what happened. */
3205
+ detail: string;
3206
+ /** Where the page ended up, when the host can tell. */
3207
+ url?: string;
3208
+ title?: string;
3209
+ }
3210
+ /**
3211
+ * Who is asking, and how to stop them.
3212
+ *
3213
+ * Both fields exist because the browser is a SINGLETON the host owns while runs
3214
+ * come and go. Without run identity the host cannot tell a Stop in one run from
3215
+ * a Stop in every future run, and cannot tell two concurrent runs apart when
3216
+ * they both reach for the same page.
3217
+ */
3218
+ interface BrowserActionContext {
3219
+ /**
3220
+ * The run this action belongs to. Revocation and the host's single-owner
3221
+ * lease both key on it, so a Stop scopes to the run the user was watching
3222
+ * rather than to the process.
3223
+ */
3224
+ sessionId: string;
3225
+ /**
3226
+ * The individual worker asking — `tierId`, a per-instance id.
3227
+ *
3228
+ * Distinct from `sessionId` and both are needed. Every T3 worker in a run
3229
+ * passes the same `taskId` as the session, so the session says which RUN to
3230
+ * stop but cannot tell two sibling workers apart. The host leases the browser
3231
+ * to one actor for a whole sequence, and a lease keyed by session would hand
3232
+ * the same lease to every sibling at once — which is the state that lets one
3233
+ * worker navigate away in the middle of another's fill-then-click.
3234
+ */
3235
+ actorId: string;
3236
+ /**
3237
+ * Cancels an action already in flight. `wait_for` can sit for 30s and
3238
+ * `navigate` waits on the network, so without this a cancelled run keeps
3239
+ * touching the user's authenticated page after it was stopped.
3240
+ */
3241
+ signal?: AbortSignal;
3242
+ }
3243
+ /**
3244
+ * Performs one action against the browser view the host owns.
3245
+ *
3246
+ * Returning `ok: false` with a reason is expected and normal — a selector that
3247
+ * matches nothing is a thing the model should be told about and can recover
3248
+ * from, not an exception.
3249
+ */
3250
+ type BrowserController = (action: BrowserAction, context: BrowserActionContext) => Promise<BrowserActionOutcome>;
3251
+ /**
3252
+ * Told that one worker is finished with the browser for good.
3253
+ *
3254
+ * Separate from the controller because it is not an action: it carries no
3255
+ * outcome and cannot fail. The host uses it to end that actor's sequence lease
3256
+ * — the only signal that reliably means "will not ask again", as opposed to a
3257
+ * worker that is merely waiting on its next model response.
3258
+ */
3259
+ type BrowserActorRelease = (actorId: string) => void;
3260
+ declare class BrowserControlTool extends BaseTool {
3261
+ readonly name = "browser_control";
3262
+ readonly description: string;
3263
+ readonly inputSchema: {
3264
+ type: string;
3265
+ properties: {
3266
+ action: {
3267
+ type: string;
3268
+ enum: string[];
3269
+ description: string;
3270
+ };
3271
+ url: {
3272
+ type: string;
3273
+ description: string;
3274
+ };
3275
+ selector: {
3276
+ type: string;
3277
+ description: string;
3278
+ };
3279
+ value: {
3280
+ type: string;
3281
+ description: string;
3282
+ };
3283
+ key: {
3284
+ type: string;
3285
+ description: string;
3286
+ };
3287
+ timeoutMs: {
3288
+ type: string;
3289
+ description: string;
3290
+ };
3291
+ };
3292
+ required: string[];
3293
+ };
3294
+ private controller;
3295
+ private release;
3296
+ /** One-way. See `revoke`. */
3297
+ private revoked;
3298
+ constructor(controller: BrowserController, release?: BrowserActorRelease);
3299
+ /**
3300
+ * A worker has finished. Ends its hold on the browser.
3301
+ *
3302
+ * Called from the tier's terminal path rather than by the model, because a
3303
+ * model cannot be relied on to announce that it is done — which is why the
3304
+ * host cannot use idle time as the boundary instead.
3305
+ */
3306
+ releaseActor(actorId: string): void;
3307
+ /**
3308
+ * Permanently disable this tool, whatever the registry still holds.
3309
+ *
3310
+ * Registration-time gates cannot express "this run turned out to be
3311
+ * unattended": a host that wires the controller and only then declares the
3312
+ * run unattended has already registered the tool, and a check that ran at
3313
+ * registration has no second chance. Enforcing at EXECUTION time makes the
3314
+ * guarantee independent of call order, which is the whole point of stating
3315
+ * the invariant rather than relying on the scheduler's current sequence.
3316
+ *
3317
+ * One-way on purpose. A safety gate that can be re-opened by a later call is
3318
+ * a gate that a refactor re-opens by accident.
3319
+ */
3320
+ revoke(): void;
3321
+ isDangerous(): boolean;
3322
+ execute(input: Record<string, unknown>, options: ToolExecuteOptions): Promise<string>;
3323
+ }
3324
+
3166
3325
  /** One entry in the per-run orchestration decision trail (see /why). */
3167
3326
  interface DecisionLogEntry {
3168
3327
  at: string;
@@ -3343,6 +3502,39 @@ declare class Cascade extends EventEmitter {
3343
3502
  * nothing. `disabledTools` still removes it.
3344
3503
  */
3345
3504
  setCurrentPageProvider(provider: CurrentPageProvider): void;
3505
+ /**
3506
+ * True when nobody is watching this run — a scheduled/cron task, which
3507
+ * auto-approves every tool because there is no one to ask.
3508
+ *
3509
+ * That auto-approval is fine for ordinary tools and disqualifying for this
3510
+ * one: `browser_control` drives the signed-in browser, and "every run asks
3511
+ * first" is the promise the Settings copy makes. The property used to hold
3512
+ * only because `runScheduledTask` happens not to call `setBrowserController`
3513
+ * — a guarantee resting on an ABSENT call, which is exactly what a later
3514
+ * refactor adds without noticing. Stated and enforced instead.
3515
+ */
3516
+ private unattended;
3517
+ /**
3518
+ * Declare that no human is watching this run, so capabilities that depend on
3519
+ * a person being able to see and stop them are refused outright.
3520
+ */
3521
+ setUnattended(on: boolean): void;
3522
+ /**
3523
+ * Wire the host's browser so a run can ACT on the open page, not just read it.
3524
+ *
3525
+ * Two gates before this registers anything, and both matter:
3526
+ *
3527
+ * - `tools.agentBrowserControl` must be on. Unlike read_current_page, which
3528
+ * reaches nothing the user has not already opened themselves, this drives
3529
+ * the session they are signed into. That is opt-in, not a default.
3530
+ * - `disabledTools` still removes it, the same as every other tool.
3531
+ * - The run must not be UNATTENDED. See `setUnattended`.
3532
+ *
3533
+ * Host-supplied like the page provider: the tool exists only where there is a
3534
+ * real browser to drive, so it never has to be refused in the CLI or a hosted
3535
+ * run — it is simply not there.
3536
+ */
3537
+ setBrowserController(controller: BrowserController, release?: BrowserActorRelease): void;
3346
3538
  private registerMediaTools;
3347
3539
  /**
3348
3540
  * Register `generate_document` where there is a real workspace to write into.
@@ -3785,6 +3977,15 @@ declare class T3Worker extends BaseTier {
3785
3977
  constructor(router: CascadeRouter, toolRegistry: ToolRegistry, parentId: string);
3786
3978
  setStore(store: MemoryStore, sessionId: string): void;
3787
3979
  execute(assignment: T2ToT3Assignment, taskId: string, signal?: AbortSignal): Promise<T3Result>;
3980
+ /**
3981
+ * End this worker's hold on the shared browser.
3982
+ *
3983
+ * Duck-typed rather than imported: `browser_control` is registered only by a
3984
+ * host that HAS a browser (the desktop), so in the CLI and hosted runs there
3985
+ * is no such tool and this is a no-op. Importing the class to instanceof-check
3986
+ * it would couple the worker to a tool that usually is not there.
3987
+ */
3988
+ private releaseBrowserControl;
3788
3989
  sendToPeer(toId: string, content: unknown): void;
3789
3990
  requestFromPeer(peerId: string, subtaskId: string): Promise<string>;
3790
3991
  syncWithPeers(barrierName: string): Promise<void>;
@@ -4392,6 +4593,1147 @@ declare class ConfigManager {
4392
4593
  private ensureDefaultIdentity;
4393
4594
  }
4394
4595
 
4596
+ declare const CascadeConfigSchema: z.ZodObject<{
4597
+ version: z.ZodDefault<z.ZodLiteral<"1.0">>;
4598
+ defaultIdentityId: z.ZodOptional<z.ZodString>;
4599
+ providers: z.ZodDefault<z.ZodArray<z.ZodObject<{
4600
+ type: z.ZodEnum<["anthropic", "openai", "gemini", "azure", "openai-compatible", "ollama"]>;
4601
+ label: z.ZodOptional<z.ZodString>;
4602
+ apiKey: z.ZodOptional<z.ZodString>;
4603
+ baseUrl: z.ZodOptional<z.ZodString>;
4604
+ deploymentName: z.ZodOptional<z.ZodString>;
4605
+ apiVersion: z.ZodOptional<z.ZodString>;
4606
+ model: z.ZodOptional<z.ZodString>;
4607
+ authToken: z.ZodOptional<z.ZodString>;
4608
+ credentialSource: z.ZodOptional<z.ZodString>;
4609
+ /**
4610
+ * "This endpoint is self-hosted, so inference genuinely costs $0."
4611
+ * Only meaningful for `ollama` and `openai-compatible`. Unset ⇒ inferred:
4612
+ * ollama is local, openai-compatible is local when its baseUrl is
4613
+ * loopback/LAN. Set it explicitly to override — e.g. `false` for an Ollama
4614
+ * instance you rent, `true` for a llama.cpp box on your own LAN reached by
4615
+ * hostname.
4616
+ */
4617
+ local: z.ZodOptional<z.ZodBoolean>;
4618
+ /** Region for providers whose price varies by region (Azure: global | us | eu | …). */
4619
+ region: z.ZodOptional<z.ZodString>;
4620
+ }, "strip", z.ZodTypeAny, {
4621
+ type: "anthropic" | "openai" | "gemini" | "azure" | "openai-compatible" | "ollama";
4622
+ region?: string | undefined;
4623
+ baseUrl?: string | undefined;
4624
+ local?: boolean | undefined;
4625
+ label?: string | undefined;
4626
+ apiKey?: string | undefined;
4627
+ deploymentName?: string | undefined;
4628
+ apiVersion?: string | undefined;
4629
+ model?: string | undefined;
4630
+ authToken?: string | undefined;
4631
+ credentialSource?: string | undefined;
4632
+ }, {
4633
+ type: "anthropic" | "openai" | "gemini" | "azure" | "openai-compatible" | "ollama";
4634
+ region?: string | undefined;
4635
+ baseUrl?: string | undefined;
4636
+ local?: boolean | undefined;
4637
+ label?: string | undefined;
4638
+ apiKey?: string | undefined;
4639
+ deploymentName?: string | undefined;
4640
+ apiVersion?: string | undefined;
4641
+ model?: string | undefined;
4642
+ authToken?: string | undefined;
4643
+ credentialSource?: string | undefined;
4644
+ }>, "many">>;
4645
+ models: z.ZodDefault<z.ZodObject<{
4646
+ t1: z.ZodOptional<z.ZodString>;
4647
+ t2: z.ZodOptional<z.ZodString>;
4648
+ t3: z.ZodOptional<z.ZodString>;
4649
+ vision: z.ZodOptional<z.ZodString>;
4650
+ }, "strip", z.ZodTypeAny, {
4651
+ t1?: string | undefined;
4652
+ t2?: string | undefined;
4653
+ t3?: string | undefined;
4654
+ vision?: string | undefined;
4655
+ }, {
4656
+ t1?: string | undefined;
4657
+ t2?: string | undefined;
4658
+ t3?: string | undefined;
4659
+ vision?: string | undefined;
4660
+ }>>;
4661
+ tools: z.ZodDefault<z.ZodObject<{
4662
+ shellAllowlist: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
4663
+ shellBlocklist: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
4664
+ requireApprovalFor: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
4665
+ browserEnabled: z.ZodDefault<z.ZodBoolean>;
4666
+ /**
4667
+ * Let a run ACT on the page open in the desktop's built-in browser — click,
4668
+ * type, submit — not just read it.
4669
+ *
4670
+ * Distinct from `browserEnabled`, which turns on the headless Playwright
4671
+ * tool. That one drives a throwaway browser with an empty cookie jar; this
4672
+ * one drives the session the user is signed into, which is a different order
4673
+ * of consequence and so gets its own switch rather than riding on that one.
4674
+ *
4675
+ * Off by default. Turning it on does not hand anything over silently: the
4676
+ * tool still goes through the approval chain, and the browser panel carries a
4677
+ * stop control for the run that is acting.
4678
+ */
4679
+ agentBrowserControl: z.ZodDefault<z.ZodBoolean>;
4680
+ mcpServers: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
4681
+ name: z.ZodString;
4682
+ command: z.ZodOptional<z.ZodString>;
4683
+ args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4684
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
4685
+ url: z.ZodOptional<z.ZodString>;
4686
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
4687
+ oauthStore: z.ZodOptional<z.ZodString>;
4688
+ }, "strip", z.ZodTypeAny, {
4689
+ name: string;
4690
+ url?: string | undefined;
4691
+ headers?: Record<string, string> | undefined;
4692
+ command?: string | undefined;
4693
+ args?: string[] | undefined;
4694
+ env?: Record<string, string> | undefined;
4695
+ oauthStore?: string | undefined;
4696
+ }, {
4697
+ name: string;
4698
+ url?: string | undefined;
4699
+ headers?: Record<string, string> | undefined;
4700
+ command?: string | undefined;
4701
+ args?: string[] | undefined;
4702
+ env?: Record<string, string> | undefined;
4703
+ oauthStore?: string | undefined;
4704
+ }>, {
4705
+ name: string;
4706
+ url?: string | undefined;
4707
+ headers?: Record<string, string> | undefined;
4708
+ command?: string | undefined;
4709
+ args?: string[] | undefined;
4710
+ env?: Record<string, string> | undefined;
4711
+ oauthStore?: string | undefined;
4712
+ }, {
4713
+ name: string;
4714
+ url?: string | undefined;
4715
+ headers?: Record<string, string> | undefined;
4716
+ command?: string | undefined;
4717
+ args?: string[] | undefined;
4718
+ env?: Record<string, string> | undefined;
4719
+ oauthStore?: string | undefined;
4720
+ }>, "many">>;
4721
+ mcpTrusted: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4722
+ /** Web search backends — at least one should be configured for best results */
4723
+ webSearch: z.ZodOptional<z.ZodObject<{
4724
+ /** Base URL of your SearXNG instance (e.g. http://localhost:8080) */
4725
+ searxngUrl: z.ZodOptional<z.ZodString>;
4726
+ /** Brave Search API key — get one at https://api.search.brave.com */
4727
+ braveApiKey: z.ZodOptional<z.ZodString>;
4728
+ /** Tavily API key — get one at https://tavily.com */
4729
+ tavilyApiKey: z.ZodOptional<z.ZodString>;
4730
+ /** Max results per search (default 5) */
4731
+ maxResults: z.ZodDefault<z.ZodNumber>;
4732
+ /**
4733
+ * Send `searxngUrl` through the SSRF guard. Off for a local run, where the
4734
+ * URL is the machine owner's own config and a self-hosted SearXNG is
4735
+ * routinely on a private address; on for a host that accepts it from a
4736
+ * request. See `src/tools/web-search.ts`.
4737
+ *
4738
+ * It has to be named HERE, not just on the TypeScript interfaces: the config
4739
+ * passes through `CascadeConfigSchema.parse()` on its way into a run, and
4740
+ * zod drops every key this object does not declare.
4741
+ */
4742
+ guardSearxngUrl: z.ZodOptional<z.ZodBoolean>;
4743
+ }, "strip", z.ZodTypeAny, {
4744
+ maxResults: number;
4745
+ searxngUrl?: string | undefined;
4746
+ braveApiKey?: string | undefined;
4747
+ tavilyApiKey?: string | undefined;
4748
+ guardSearxngUrl?: boolean | undefined;
4749
+ }, {
4750
+ searxngUrl?: string | undefined;
4751
+ braveApiKey?: string | undefined;
4752
+ tavilyApiKey?: string | undefined;
4753
+ maxResults?: number | undefined;
4754
+ guardSearxngUrl?: boolean | undefined;
4755
+ }>>;
4756
+ /**
4757
+ * Sandbox runtime for LLM-authored dynamic tools:
4758
+ * - 'isolate': hard V8 isolate (isolated-vm) — no Node globals, true capability
4759
+ * confinement. Requires the optional native `isolated-vm` dependency.
4760
+ * - 'worker': node:worker_threads (resource/kill limits, but not capability-confined).
4761
+ * - 'auto' (default): use the isolate when `isolated-vm` loads, else fall back to worker.
4762
+ */
4763
+ dynamicToolSandbox: z.ZodDefault<z.ZodEnum<["isolate", "worker", "auto"]>>;
4764
+ /**
4765
+ * When set, ONLY these tool names are registered — the sole way to omit a
4766
+ * built-in tool (shell/file/git/…) from existing at all, rather than just
4767
+ * gating it behind approval. Omitted = full default set (unchanged).
4768
+ */
4769
+ enabledTools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4770
+ /**
4771
+ * Tools to remove even when they would otherwise be registered. Unlike
4772
+ * `enabledTools` (an allowlist over the built-in set), this also reaches
4773
+ * tools registered outside it — MCP tools and media generation — which is
4774
+ * the only way to turn those off.
4775
+ */
4776
+ disabledTools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4777
+ }, "strip", z.ZodTypeAny, {
4778
+ shellAllowlist: string[];
4779
+ shellBlocklist: string[];
4780
+ requireApprovalFor: string[];
4781
+ browserEnabled: boolean;
4782
+ agentBrowserControl: boolean;
4783
+ dynamicToolSandbox: "auto" | "isolate" | "worker";
4784
+ mcpServers?: {
4785
+ name: string;
4786
+ url?: string | undefined;
4787
+ headers?: Record<string, string> | undefined;
4788
+ command?: string | undefined;
4789
+ args?: string[] | undefined;
4790
+ env?: Record<string, string> | undefined;
4791
+ oauthStore?: string | undefined;
4792
+ }[] | undefined;
4793
+ mcpTrusted?: string[] | undefined;
4794
+ webSearch?: {
4795
+ maxResults: number;
4796
+ searxngUrl?: string | undefined;
4797
+ braveApiKey?: string | undefined;
4798
+ tavilyApiKey?: string | undefined;
4799
+ guardSearxngUrl?: boolean | undefined;
4800
+ } | undefined;
4801
+ enabledTools?: string[] | undefined;
4802
+ disabledTools?: string[] | undefined;
4803
+ }, {
4804
+ mcpServers?: {
4805
+ name: string;
4806
+ url?: string | undefined;
4807
+ headers?: Record<string, string> | undefined;
4808
+ command?: string | undefined;
4809
+ args?: string[] | undefined;
4810
+ env?: Record<string, string> | undefined;
4811
+ oauthStore?: string | undefined;
4812
+ }[] | undefined;
4813
+ shellAllowlist?: string[] | undefined;
4814
+ shellBlocklist?: string[] | undefined;
4815
+ requireApprovalFor?: string[] | undefined;
4816
+ browserEnabled?: boolean | undefined;
4817
+ agentBrowserControl?: boolean | undefined;
4818
+ mcpTrusted?: string[] | undefined;
4819
+ webSearch?: {
4820
+ searxngUrl?: string | undefined;
4821
+ braveApiKey?: string | undefined;
4822
+ tavilyApiKey?: string | undefined;
4823
+ maxResults?: number | undefined;
4824
+ guardSearxngUrl?: boolean | undefined;
4825
+ } | undefined;
4826
+ dynamicToolSandbox?: "auto" | "isolate" | "worker" | undefined;
4827
+ enabledTools?: string[] | undefined;
4828
+ disabledTools?: string[] | undefined;
4829
+ }>>;
4830
+ hooks: z.ZodDefault<z.ZodObject<{
4831
+ preToolUse: z.ZodOptional<z.ZodArray<z.ZodObject<{
4832
+ name: z.ZodOptional<z.ZodString>;
4833
+ command: z.ZodString;
4834
+ tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4835
+ timeout: z.ZodOptional<z.ZodNumber>;
4836
+ }, "strip", z.ZodTypeAny, {
4837
+ command: string;
4838
+ timeout?: number | undefined;
4839
+ name?: string | undefined;
4840
+ tools?: string[] | undefined;
4841
+ }, {
4842
+ command: string;
4843
+ timeout?: number | undefined;
4844
+ name?: string | undefined;
4845
+ tools?: string[] | undefined;
4846
+ }>, "many">>;
4847
+ postToolUse: z.ZodOptional<z.ZodArray<z.ZodObject<{
4848
+ name: z.ZodOptional<z.ZodString>;
4849
+ command: z.ZodString;
4850
+ tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4851
+ timeout: z.ZodOptional<z.ZodNumber>;
4852
+ }, "strip", z.ZodTypeAny, {
4853
+ command: string;
4854
+ timeout?: number | undefined;
4855
+ name?: string | undefined;
4856
+ tools?: string[] | undefined;
4857
+ }, {
4858
+ command: string;
4859
+ timeout?: number | undefined;
4860
+ name?: string | undefined;
4861
+ tools?: string[] | undefined;
4862
+ }>, "many">>;
4863
+ preTask: z.ZodOptional<z.ZodArray<z.ZodObject<{
4864
+ name: z.ZodOptional<z.ZodString>;
4865
+ command: z.ZodString;
4866
+ tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4867
+ timeout: z.ZodOptional<z.ZodNumber>;
4868
+ }, "strip", z.ZodTypeAny, {
4869
+ command: string;
4870
+ timeout?: number | undefined;
4871
+ name?: string | undefined;
4872
+ tools?: string[] | undefined;
4873
+ }, {
4874
+ command: string;
4875
+ timeout?: number | undefined;
4876
+ name?: string | undefined;
4877
+ tools?: string[] | undefined;
4878
+ }>, "many">>;
4879
+ postTask: z.ZodOptional<z.ZodArray<z.ZodObject<{
4880
+ name: z.ZodOptional<z.ZodString>;
4881
+ command: z.ZodString;
4882
+ tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4883
+ timeout: z.ZodOptional<z.ZodNumber>;
4884
+ }, "strip", z.ZodTypeAny, {
4885
+ command: string;
4886
+ timeout?: number | undefined;
4887
+ name?: string | undefined;
4888
+ tools?: string[] | undefined;
4889
+ }, {
4890
+ command: string;
4891
+ timeout?: number | undefined;
4892
+ name?: string | undefined;
4893
+ tools?: string[] | undefined;
4894
+ }>, "many">>;
4895
+ }, "strip", z.ZodTypeAny, {
4896
+ preToolUse?: {
4897
+ command: string;
4898
+ timeout?: number | undefined;
4899
+ name?: string | undefined;
4900
+ tools?: string[] | undefined;
4901
+ }[] | undefined;
4902
+ postToolUse?: {
4903
+ command: string;
4904
+ timeout?: number | undefined;
4905
+ name?: string | undefined;
4906
+ tools?: string[] | undefined;
4907
+ }[] | undefined;
4908
+ preTask?: {
4909
+ command: string;
4910
+ timeout?: number | undefined;
4911
+ name?: string | undefined;
4912
+ tools?: string[] | undefined;
4913
+ }[] | undefined;
4914
+ postTask?: {
4915
+ command: string;
4916
+ timeout?: number | undefined;
4917
+ name?: string | undefined;
4918
+ tools?: string[] | undefined;
4919
+ }[] | undefined;
4920
+ }, {
4921
+ preToolUse?: {
4922
+ command: string;
4923
+ timeout?: number | undefined;
4924
+ name?: string | undefined;
4925
+ tools?: string[] | undefined;
4926
+ }[] | undefined;
4927
+ postToolUse?: {
4928
+ command: string;
4929
+ timeout?: number | undefined;
4930
+ name?: string | undefined;
4931
+ tools?: string[] | undefined;
4932
+ }[] | undefined;
4933
+ preTask?: {
4934
+ command: string;
4935
+ timeout?: number | undefined;
4936
+ name?: string | undefined;
4937
+ tools?: string[] | undefined;
4938
+ }[] | undefined;
4939
+ postTask?: {
4940
+ command: string;
4941
+ timeout?: number | undefined;
4942
+ name?: string | undefined;
4943
+ tools?: string[] | undefined;
4944
+ }[] | undefined;
4945
+ }>>;
4946
+ dashboard: z.ZodDefault<z.ZodObject<{
4947
+ port: z.ZodDefault<z.ZodNumber>;
4948
+ /**
4949
+ * Interface to bind the dashboard HTTP/WebSocket server to. Defaults to
4950
+ * loopback so the dashboard — which exposes /api/run (arbitrary task
4951
+ * execution) and config mutation — is never reachable from the network
4952
+ * unless the operator explicitly opts in (e.g. "0.0.0.0" for team mode).
4953
+ */
4954
+ host: z.ZodDefault<z.ZodString>;
4955
+ auth: z.ZodDefault<z.ZodBoolean>;
4956
+ teamMode: z.ZodDefault<z.ZodEnum<["single", "multi"]>>;
4957
+ secret: z.ZodOptional<z.ZodString>;
4958
+ }, "strip", z.ZodTypeAny, {
4959
+ auth: boolean;
4960
+ host: string;
4961
+ port: number;
4962
+ teamMode: "single" | "multi";
4963
+ secret?: string | undefined;
4964
+ }, {
4965
+ auth?: boolean | undefined;
4966
+ host?: string | undefined;
4967
+ port?: number | undefined;
4968
+ teamMode?: "single" | "multi" | undefined;
4969
+ secret?: string | undefined;
4970
+ }>>;
4971
+ telemetry: z.ZodDefault<z.ZodObject<{
4972
+ enabled: z.ZodDefault<z.ZodBoolean>;
4973
+ posthogApiKey: z.ZodOptional<z.ZodString>;
4974
+ distinctId: z.ZodOptional<z.ZodString>;
4975
+ }, "strip", z.ZodTypeAny, {
4976
+ enabled: boolean;
4977
+ posthogApiKey?: string | undefined;
4978
+ distinctId?: string | undefined;
4979
+ }, {
4980
+ enabled?: boolean | undefined;
4981
+ posthogApiKey?: string | undefined;
4982
+ distinctId?: string | undefined;
4983
+ }>>;
4984
+ memory: z.ZodDefault<z.ZodObject<{
4985
+ maxSessionMessages: z.ZodDefault<z.ZodNumber>;
4986
+ autoSummarizeAt: z.ZodDefault<z.ZodNumber>;
4987
+ retentionDays: z.ZodDefault<z.ZodNumber>;
4988
+ /** Opt-in session→knowledge distillation after each run. Default: false. */
4989
+ rememberSessions: z.ZodDefault<z.ZodBoolean>;
4990
+ }, "strip", z.ZodTypeAny, {
4991
+ maxSessionMessages: number;
4992
+ autoSummarizeAt: number;
4993
+ retentionDays: number;
4994
+ rememberSessions: boolean;
4995
+ }, {
4996
+ maxSessionMessages?: number | undefined;
4997
+ autoSummarizeAt?: number | undefined;
4998
+ retentionDays?: number | undefined;
4999
+ rememberSessions?: boolean | undefined;
5000
+ }>>;
5001
+ tierLimits: z.ZodDefault<z.ZodObject<{
5002
+ t1MaxTokens: z.ZodOptional<z.ZodNumber>;
5003
+ t2MaxTokens: z.ZodOptional<z.ZodNumber>;
5004
+ t3MaxTokens: z.ZodOptional<z.ZodNumber>;
5005
+ t1Temperature: z.ZodOptional<z.ZodNumber>;
5006
+ t2Temperature: z.ZodOptional<z.ZodNumber>;
5007
+ t3Temperature: z.ZodOptional<z.ZodNumber>;
5008
+ }, "strip", z.ZodTypeAny, {
5009
+ t1MaxTokens?: number | undefined;
5010
+ t2MaxTokens?: number | undefined;
5011
+ t3MaxTokens?: number | undefined;
5012
+ t1Temperature?: number | undefined;
5013
+ t2Temperature?: number | undefined;
5014
+ t3Temperature?: number | undefined;
5015
+ }, {
5016
+ t1MaxTokens?: number | undefined;
5017
+ t2MaxTokens?: number | undefined;
5018
+ t3MaxTokens?: number | undefined;
5019
+ t1Temperature?: number | undefined;
5020
+ t2Temperature?: number | undefined;
5021
+ t3Temperature?: number | undefined;
5022
+ }>>;
5023
+ extendedContext: z.ZodDefault<z.ZodObject<{
5024
+ enabled: z.ZodDefault<z.ZodBoolean>;
5025
+ maxMultiplier: z.ZodDefault<z.ZodNumber>;
5026
+ }, "strip", z.ZodTypeAny, {
5027
+ enabled: boolean;
5028
+ maxMultiplier: number;
5029
+ }, {
5030
+ enabled?: boolean | undefined;
5031
+ maxMultiplier?: number | undefined;
5032
+ }>>;
5033
+ budget: z.ZodDefault<z.ZodObject<{
5034
+ dailyBudgetUsd: z.ZodOptional<z.ZodNumber>;
5035
+ sessionBudgetUsd: z.ZodOptional<z.ZodNumber>;
5036
+ /**
5037
+ * Hard per-task token ceiling. A single `cascade run` is stopped once its
5038
+ * combined token usage crosses this, so a mis-routed trivial task can never
5039
+ * fan out into a runaway multi-agent burn. Resets every run. Raise it for
5040
+ * genuinely large jobs. Defaults to 200k.
5041
+ */
5042
+ maxTokensPerRun: z.ZodDefault<z.ZodNumber>;
5043
+ /** Optional hard per-task cost ceiling (USD). Unset = only the token cap applies. */
5044
+ maxCostPerRunUsd: z.ZodOptional<z.ZodNumber>;
5045
+ /**
5046
+ * Consecutive systemic failures against ONE model before the run stops
5047
+ * launching work that would fail the same way (dead key, wrong model id,
5048
+ * exhausted quota). Lower reacts sooner and wastes less; higher absorbs a
5049
+ * longer transient before giving up. Only failures that will certainly repeat
5050
+ * are counted — see core/run-breaker.ts.
5051
+ */
5052
+ failureThreshold: z.ZodDefault<z.ZodNumber>;
5053
+ warnAtPct: z.ZodDefault<z.ZodNumber>;
5054
+ }, "strip", z.ZodTypeAny, {
5055
+ maxTokensPerRun: number;
5056
+ failureThreshold: number;
5057
+ warnAtPct: number;
5058
+ dailyBudgetUsd?: number | undefined;
5059
+ sessionBudgetUsd?: number | undefined;
5060
+ maxCostPerRunUsd?: number | undefined;
5061
+ }, {
5062
+ dailyBudgetUsd?: number | undefined;
5063
+ sessionBudgetUsd?: number | undefined;
5064
+ maxTokensPerRun?: number | undefined;
5065
+ maxCostPerRunUsd?: number | undefined;
5066
+ failureThreshold?: number | undefined;
5067
+ warnAtPct?: number | undefined;
5068
+ }>>;
5069
+ theme: z.ZodDefault<z.ZodString>;
5070
+ workspace: z.ZodDefault<z.ZodObject<{
5071
+ cascadeMdPath: z.ZodDefault<z.ZodString>;
5072
+ configPath: z.ZodDefault<z.ZodString>;
5073
+ keystorePath: z.ZodDefault<z.ZodString>;
5074
+ auditLogPath: z.ZodDefault<z.ZodString>;
5075
+ debugWorldState: z.ZodDefault<z.ZodBoolean>;
5076
+ }, "strip", z.ZodTypeAny, {
5077
+ cascadeMdPath: string;
5078
+ configPath: string;
5079
+ keystorePath: string;
5080
+ auditLogPath: string;
5081
+ debugWorldState: boolean;
5082
+ }, {
5083
+ cascadeMdPath?: string | undefined;
5084
+ configPath?: string | undefined;
5085
+ keystorePath?: string | undefined;
5086
+ auditLogPath?: string | undefined;
5087
+ debugWorldState?: boolean | undefined;
5088
+ }>>;
5089
+ /**
5090
+ * Per-provider tokens-per-minute overrides for the router's TpmLimiter (see
5091
+ * DEFAULT_PROVIDER_TPM in core/router/tpm-limiter.ts). Documented as a raw
5092
+ * config field for a while before this — since CascadeConfigSchema strips
5093
+ * unknown keys, a config file setting it was silently discarded and the
5094
+ * override never reached TpmLimiter's constructor. Optional/permissive on
5095
+ * provider name (not a ProviderType enum) so a config still validates
5096
+ * against a slightly newer/older provider list than this schema knows.
5097
+ */
5098
+ rateLimits: z.ZodOptional<z.ZodObject<{
5099
+ providerTpm: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
5100
+ }, "strip", z.ZodTypeAny, {
5101
+ providerTpm?: Record<string, number> | undefined;
5102
+ }, {
5103
+ providerTpm?: Record<string, number> | undefined;
5104
+ }>>;
5105
+ /**
5106
+ * Cascade Auto: when true, the TaskAnalyzer selects the optimal model for each
5107
+ * tier based on task type and complexity, overriding the static priority lists.
5108
+ * Heuristic-first with AI inference fallback (adds ~0–500ms per task).
5109
+ * ON by default since v0.19.0 — "Auto" without it was just a static priority
5110
+ * list, not the benchmark-value routing the docs describe. Explicit per-tier
5111
+ * model pins are unaffected; disable via config/Settings → Advanced.
5112
+ */
5113
+ cascadeAuto: z.ZodDefault<z.ZodBoolean>;
5114
+ /**
5115
+ * Cascade Auto trade-off bias when picking a model for a task:
5116
+ * - 'balanced' (default): quality × cost-efficiency — cheap models win
5117
+ * trivial tasks, strong models win hard ones.
5118
+ * - 'quality': pick the highest-benchmark model; cost only breaks ties.
5119
+ * - 'cost': pick the cheapest model that clears a per-task quality floor.
5120
+ */
5121
+ autoBias: z.ZodDefault<z.ZodEnum<["balanced", "quality", "cost"]>>;
5122
+ /**
5123
+ * Public-benchmark data source for Cascade Auto. All fields have safe
5124
+ * defaults so zero config "just works" — live data is fetched in the
5125
+ * background and the bundled snapshot is used until it arrives (or offline).
5126
+ */
5127
+ benchmarks: z.ZodDefault<z.ZodObject<{
5128
+ /** Fetch current quality scores from a public source. Default: true. */
5129
+ live: z.ZodDefault<z.ZodBoolean>;
5130
+ /** How long a fetched snapshot stays fresh before re-fetching (hours). */
5131
+ refreshHours: z.ZodDefault<z.ZodNumber>;
5132
+ /**
5133
+ * Override the quality-benchmark source URL (must return the snapshot
5134
+ * JSON shape). When unset, the maintained GitHub-raw snapshot is used.
5135
+ */
5136
+ sourceUrl: z.ZodOptional<z.ZodString>;
5137
+ /** Fetch current per-token prices from OpenRouter (free, no key). */
5138
+ pricingLive: z.ZodDefault<z.ZodBoolean>;
5139
+ /** Cache location for the fetched snapshot (cloud → persistent volume). */
5140
+ cacheFile: z.ZodOptional<z.ZodString>;
5141
+ }, "strip", z.ZodTypeAny, {
5142
+ live: boolean;
5143
+ pricingLive: boolean;
5144
+ refreshHours: number;
5145
+ sourceUrl?: string | undefined;
5146
+ cacheFile?: string | undefined;
5147
+ }, {
5148
+ live?: boolean | undefined;
5149
+ sourceUrl?: string | undefined;
5150
+ pricingLive?: boolean | undefined;
5151
+ refreshHours?: number | undefined;
5152
+ cacheFile?: string | undefined;
5153
+ }>>;
5154
+ /**
5155
+ * Runtime Tool Creation: when true, T3 workers can generate and register new tools
5156
+ * at runtime via the ToolCreator when no existing tool can handle a required operation.
5157
+ * Generated tools are session-scoped and sandboxed (see tools.dynamicToolSandbox).
5158
+ * HTTP calls from generated tools require approval.
5159
+ */
5160
+ enableToolCreation: z.ZodDefault<z.ZodBoolean>;
5161
+ /**
5162
+ * Project knowledge (world state). `factsExtraction`: after each worker
5163
+ * completes, run a cheap extraction pass that distills its output into
5164
+ * queryable entity/relation/value facts (superseding older facts), which T1
5165
+ * queries during planning instead of replaying the whole linear log. Best-effort
5166
+ * and non-blocking; set false to keep only the raw linear log.
5167
+ */
5168
+ knowledge: z.ZodDefault<z.ZodObject<{
5169
+ factsExtraction: z.ZodDefault<z.ZodBoolean>;
5170
+ }, "strip", z.ZodTypeAny, {
5171
+ factsExtraction: boolean;
5172
+ }, {
5173
+ factsExtraction?: boolean | undefined;
5174
+ }>>;
5175
+ /**
5176
+ * Fast answer behaviour. `autoSimple`: pure small talk ("hi", "who are you")
5177
+ * skips the T1/T2/T3 machinery for a direct single-model reply — same cost
5178
+ * shape as the explicit fast-answer toggle, applied automatically.
5179
+ */
5180
+ fastAnswer: z.ZodDefault<z.ZodObject<{
5181
+ autoSimple: z.ZodDefault<z.ZodBoolean>;
5182
+ }, "strip", z.ZodTypeAny, {
5183
+ autoSimple: boolean;
5184
+ }, {
5185
+ autoSimple?: boolean | undefined;
5186
+ }>>;
5187
+ /**
5188
+ * Workspace code index (Phase 3). Opt-in. When enabled, Cascade registers a
5189
+ * `code_search` tool backed by a hybrid + reranked index of the workspace so
5190
+ * workers can find code by meaning. Build/refresh the index with
5191
+ * `cascade index`; set autoRefresh to update it at run start (incremental —
5192
+ * only changed files are re-embedded).
5193
+ */
5194
+ codeIndex: z.ZodDefault<z.ZodObject<{
5195
+ enabled: z.ZodDefault<z.ZodBoolean>;
5196
+ autoRefresh: z.ZodDefault<z.ZodBoolean>;
5197
+ /** SQLite file for the index. Defaults to <workspace>/.cascade/code-index.db. */
5198
+ dbPath: z.ZodOptional<z.ZodString>;
5199
+ }, "strip", z.ZodTypeAny, {
5200
+ enabled: boolean;
5201
+ autoRefresh: boolean;
5202
+ dbPath?: string | undefined;
5203
+ }, {
5204
+ enabled?: boolean | undefined;
5205
+ autoRefresh?: boolean | undefined;
5206
+ dbPath?: string | undefined;
5207
+ }>>;
5208
+ /**
5209
+ * Persist runtime-generated tools to .cascade/dynamic-tools.json and reload them
5210
+ * on startup for cross-run dedup. Reloaded (and peer-received) tools are always
5211
+ * treated as UNTRUSTED — their dangerous actions re-escalate. Set false to disable
5212
+ * persistence entirely.
5213
+ */
5214
+ persistDynamicTools: z.ZodDefault<z.ZodBoolean>;
5215
+ /**
5216
+ * External plugin paths or npm package names to load at startup.
5217
+ * Each entry must export a default ToolPlugin object.
5218
+ * Example: ["./plugins/my-tool.js", "cascade-plugin-slack"]
5219
+ */
5220
+ plugins: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
5221
+ /**
5222
+ * Maximum number of concurrent inference requests to any local model provider
5223
+ * (e.g. Ollama). Defaults to 1 to prevent GPU memory pressure when multiple
5224
+ * T3 workers run in parallel on a single-GPU machine.
5225
+ */
5226
+ localConcurrency: z.ZodDefault<z.ZodNumber>;
5227
+ /**
5228
+ * Timeout in milliseconds for a single local model inference call.
5229
+ * Local models can take minutes for large parameter counts. Default: 5 minutes.
5230
+ */
5231
+ localInferenceTimeoutMs: z.ZodDefault<z.ZodNumber>;
5232
+ /**
5233
+ * Timeout (ms) for a single cloud LLM call (streaming or not). Guards against
5234
+ * a stalled provider stream hanging the whole run with no output. On timeout
5235
+ * the call errors and the worker escalates. Default: 2 minutes.
5236
+ */
5237
+ cloudInferenceTimeoutMs: z.ZodDefault<z.ZodNumber>;
5238
+ /**
5239
+ * Timeout (ms) for a tool-approval decision. If no decision arrives in time the
5240
+ * request is DENIED (never auto-approved) so the run continues rather than
5241
+ * hanging on an unanswered prompt. Default: 10 minutes.
5242
+ */
5243
+ approvalTimeoutMs: z.ZodDefault<z.ZodNumber>;
5244
+ /**
5245
+ * Boardroom plan approval: pause after the plan is produced so the user can
5246
+ * review the org chart (sections, workers, estimated cost) before any worker
5247
+ * spawns. Scope:
5248
+ * 'never' — never pause (default; no behavior change).
5249
+ * 'complex' — pause Complex runs only ('always' is kept as an alias).
5250
+ * 'all' — pause Moderate and Complex runs.
5251
+ * Headless/SDK consumers without a listener auto-approve, so pausing is safe
5252
+ * outside the TUI.
5253
+ */
5254
+ planApproval: z.ZodDefault<z.ZodEnum<["never", "complex", "all", "always"]>>;
5255
+ /**
5256
+ * Plan-review behaviour for the boardroom gate:
5257
+ * autoReviewer — a reviewer model critiques the plan (gaps/risks/cost)
5258
+ * before you see it, and the critique is shown in the dialog.
5259
+ * editable — allow editing the plan (drop sections) in the dialog.
5260
+ * maxRevisionRounds — how many steering-note → re-plan → re-ask rounds the
5261
+ * boardroom allows before proceeding with the last plan.
5262
+ */
5263
+ planReview: z.ZodDefault<z.ZodObject<{
5264
+ autoReviewer: z.ZodDefault<z.ZodBoolean>;
5265
+ editable: z.ZodDefault<z.ZodBoolean>;
5266
+ maxRevisionRounds: z.ZodDefault<z.ZodNumber>;
5267
+ }, "strip", z.ZodTypeAny, {
5268
+ autoReviewer: boolean;
5269
+ editable: boolean;
5270
+ maxRevisionRounds: number;
5271
+ }, {
5272
+ autoReviewer?: boolean | undefined;
5273
+ editable?: boolean | undefined;
5274
+ maxRevisionRounds?: number | undefined;
5275
+ }>>;
5276
+ /**
5277
+ * Autonomy level. 'manual' (default): plan + tool approvals prompt as usual.
5278
+ * 'auto': hands-off — the plan gate auto-approves and the escalator
5279
+ * auto-approves NON-dangerous tools, while dangerous tools still escalate and
5280
+ * budget caps remain the hard stop. Toggle at runtime with /auto.
5281
+ */
5282
+ autonomy: z.ZodDefault<z.ZodEnum<["manual", "auto"]>>;
5283
+ /**
5284
+ * Max corrective re-plan passes T1's reviewer runs before returning the best
5285
+ * partial result. The run also stops early when a pass makes no net progress.
5286
+ */
5287
+ maxReplanPasses: z.ZodDefault<z.ZodNumber>;
5288
+ /**
5289
+ * Reflection / self-critique. When enabled, after a worker's pass/fail self-test
5290
+ * succeeds it runs a goal-alignment critique and revises once if the output is
5291
+ * weak against the broader goal (not just the subtask spec). Off by default — it
5292
+ * adds an LLM call per worker.
5293
+ */
5294
+ reflection: z.ZodDefault<z.ZodObject<{
5295
+ enabled: z.ZodDefault<z.ZodBoolean>;
5296
+ maxRounds: z.ZodDefault<z.ZodNumber>;
5297
+ }, "strip", z.ZodTypeAny, {
5298
+ enabled: boolean;
5299
+ maxRounds: number;
5300
+ }, {
5301
+ enabled?: boolean | undefined;
5302
+ maxRounds?: number | undefined;
5303
+ }>>;
5304
+ /**
5305
+ * T3 worker execution within a dependency wave:
5306
+ * 'auto' (default) — sequential when the T3 tier is a LOCAL model (a single
5307
+ * GPU serializes anyway, so parallel just thrashes the queue), parallel for
5308
+ * cloud models.
5309
+ * 'parallel' / 'sequential' — force it.
5310
+ */
5311
+ t3Execution: z.ZodDefault<z.ZodEnum<["auto", "parallel", "sequential"]>>;
5312
+ /**
5313
+ * Per-path privacy tiers. A subtask touching a `local-only` path is forced
5314
+ * onto LOCAL models (never cloud) and its raw output is withheld from the
5315
+ * tiers above. Patterns use .gitignore syntax, like .cascadeignore.
5316
+ */
5317
+ privacy: z.ZodOptional<z.ZodObject<{
5318
+ paths: z.ZodDefault<z.ZodArray<z.ZodObject<{
5319
+ pattern: z.ZodString;
5320
+ policy: z.ZodEnum<["local-only"]>;
5321
+ }, "strip", z.ZodTypeAny, {
5322
+ pattern: string;
5323
+ policy: "local-only";
5324
+ }, {
5325
+ pattern: string;
5326
+ policy: "local-only";
5327
+ }>, "many">>;
5328
+ }, "strip", z.ZodTypeAny, {
5329
+ paths: {
5330
+ pattern: string;
5331
+ policy: "local-only";
5332
+ }[];
5333
+ }, {
5334
+ paths?: {
5335
+ pattern: string;
5336
+ policy: "local-only";
5337
+ }[] | undefined;
5338
+ }>>;
5339
+ /** Routing controls — forceTier pins the root tier, bypassing the classifier. */
5340
+ routing: z.ZodOptional<z.ZodObject<{
5341
+ forceTier: z.ZodDefault<z.ZodEnum<["auto", "T1", "T2", "T3"]>>;
5342
+ perfStatsPath: z.ZodOptional<z.ZodString>;
5343
+ learnFromOutcomes: z.ZodDefault<z.ZodBoolean>;
5344
+ }, "strip", z.ZodTypeAny, {
5345
+ forceTier: "T1" | "T2" | "T3" | "auto";
5346
+ learnFromOutcomes: boolean;
5347
+ perfStatsPath?: string | undefined;
5348
+ }, {
5349
+ forceTier?: "T1" | "T2" | "T3" | "auto" | undefined;
5350
+ perfStatsPath?: string | undefined;
5351
+ learnFromOutcomes?: boolean | undefined;
5352
+ }>>;
5353
+ /**
5354
+ * T3→T2 reinforcement: when enabled, a worker that discovers its subtask should
5355
+ * fan out can call the `request_workers` tool to have its T2 manager spawn
5356
+ * sibling workers for the new pieces (no 4th tier; bounded). Off by default.
5357
+ */
5358
+ reinforcements: z.ZodDefault<z.ZodObject<{
5359
+ enabled: z.ZodDefault<z.ZodBoolean>;
5360
+ maxPerSection: z.ZodDefault<z.ZodNumber>;
5361
+ }, "strip", z.ZodTypeAny, {
5362
+ enabled: boolean;
5363
+ maxPerSection: number;
5364
+ }, {
5365
+ enabled?: boolean | undefined;
5366
+ maxPerSection?: number | undefined;
5367
+ }>>;
5368
+ /**
5369
+ * Render the TUI in the terminal's alternate screen buffer (like vim).
5370
+ * Flicker-proof and restores the shell on exit, but native scrollback is
5371
+ * unavailable — history scrolls in-app with PgUp/PgDn. Also enabled per
5372
+ * session with the --alt-screen flag. Default: off.
5373
+ */
5374
+ altScreen: z.ZodDefault<z.ZodBoolean>;
5375
+ }, "strip", z.ZodTypeAny, {
5376
+ workspace: {
5377
+ cascadeMdPath: string;
5378
+ configPath: string;
5379
+ keystorePath: string;
5380
+ auditLogPath: string;
5381
+ debugWorldState: boolean;
5382
+ };
5383
+ providers: {
5384
+ type: "anthropic" | "openai" | "gemini" | "azure" | "openai-compatible" | "ollama";
5385
+ region?: string | undefined;
5386
+ baseUrl?: string | undefined;
5387
+ local?: boolean | undefined;
5388
+ label?: string | undefined;
5389
+ apiKey?: string | undefined;
5390
+ deploymentName?: string | undefined;
5391
+ apiVersion?: string | undefined;
5392
+ model?: string | undefined;
5393
+ authToken?: string | undefined;
5394
+ credentialSource?: string | undefined;
5395
+ }[];
5396
+ tools: {
5397
+ shellAllowlist: string[];
5398
+ shellBlocklist: string[];
5399
+ requireApprovalFor: string[];
5400
+ browserEnabled: boolean;
5401
+ agentBrowserControl: boolean;
5402
+ dynamicToolSandbox: "auto" | "isolate" | "worker";
5403
+ mcpServers?: {
5404
+ name: string;
5405
+ url?: string | undefined;
5406
+ headers?: Record<string, string> | undefined;
5407
+ command?: string | undefined;
5408
+ args?: string[] | undefined;
5409
+ env?: Record<string, string> | undefined;
5410
+ oauthStore?: string | undefined;
5411
+ }[] | undefined;
5412
+ mcpTrusted?: string[] | undefined;
5413
+ webSearch?: {
5414
+ maxResults: number;
5415
+ searxngUrl?: string | undefined;
5416
+ braveApiKey?: string | undefined;
5417
+ tavilyApiKey?: string | undefined;
5418
+ guardSearxngUrl?: boolean | undefined;
5419
+ } | undefined;
5420
+ enabledTools?: string[] | undefined;
5421
+ disabledTools?: string[] | undefined;
5422
+ };
5423
+ models: {
5424
+ t1?: string | undefined;
5425
+ t2?: string | undefined;
5426
+ t3?: string | undefined;
5427
+ vision?: string | undefined;
5428
+ };
5429
+ version: "1.0";
5430
+ hooks: {
5431
+ preToolUse?: {
5432
+ command: string;
5433
+ timeout?: number | undefined;
5434
+ name?: string | undefined;
5435
+ tools?: string[] | undefined;
5436
+ }[] | undefined;
5437
+ postToolUse?: {
5438
+ command: string;
5439
+ timeout?: number | undefined;
5440
+ name?: string | undefined;
5441
+ tools?: string[] | undefined;
5442
+ }[] | undefined;
5443
+ preTask?: {
5444
+ command: string;
5445
+ timeout?: number | undefined;
5446
+ name?: string | undefined;
5447
+ tools?: string[] | undefined;
5448
+ }[] | undefined;
5449
+ postTask?: {
5450
+ command: string;
5451
+ timeout?: number | undefined;
5452
+ name?: string | undefined;
5453
+ tools?: string[] | undefined;
5454
+ }[] | undefined;
5455
+ };
5456
+ dashboard: {
5457
+ auth: boolean;
5458
+ host: string;
5459
+ port: number;
5460
+ teamMode: "single" | "multi";
5461
+ secret?: string | undefined;
5462
+ };
5463
+ telemetry: {
5464
+ enabled: boolean;
5465
+ posthogApiKey?: string | undefined;
5466
+ distinctId?: string | undefined;
5467
+ };
5468
+ memory: {
5469
+ maxSessionMessages: number;
5470
+ autoSummarizeAt: number;
5471
+ retentionDays: number;
5472
+ rememberSessions: boolean;
5473
+ };
5474
+ tierLimits: {
5475
+ t1MaxTokens?: number | undefined;
5476
+ t2MaxTokens?: number | undefined;
5477
+ t3MaxTokens?: number | undefined;
5478
+ t1Temperature?: number | undefined;
5479
+ t2Temperature?: number | undefined;
5480
+ t3Temperature?: number | undefined;
5481
+ };
5482
+ extendedContext: {
5483
+ enabled: boolean;
5484
+ maxMultiplier: number;
5485
+ };
5486
+ budget: {
5487
+ maxTokensPerRun: number;
5488
+ failureThreshold: number;
5489
+ warnAtPct: number;
5490
+ dailyBudgetUsd?: number | undefined;
5491
+ sessionBudgetUsd?: number | undefined;
5492
+ maxCostPerRunUsd?: number | undefined;
5493
+ };
5494
+ theme: string;
5495
+ cascadeAuto: boolean;
5496
+ autoBias: "balanced" | "quality" | "cost";
5497
+ benchmarks: {
5498
+ live: boolean;
5499
+ pricingLive: boolean;
5500
+ refreshHours: number;
5501
+ sourceUrl?: string | undefined;
5502
+ cacheFile?: string | undefined;
5503
+ };
5504
+ enableToolCreation: boolean;
5505
+ knowledge: {
5506
+ factsExtraction: boolean;
5507
+ };
5508
+ fastAnswer: {
5509
+ autoSimple: boolean;
5510
+ };
5511
+ codeIndex: {
5512
+ enabled: boolean;
5513
+ autoRefresh: boolean;
5514
+ dbPath?: string | undefined;
5515
+ };
5516
+ persistDynamicTools: boolean;
5517
+ plugins: string[];
5518
+ localConcurrency: number;
5519
+ localInferenceTimeoutMs: number;
5520
+ cloudInferenceTimeoutMs: number;
5521
+ approvalTimeoutMs: number;
5522
+ planApproval: "never" | "complex" | "all" | "always";
5523
+ planReview: {
5524
+ autoReviewer: boolean;
5525
+ editable: boolean;
5526
+ maxRevisionRounds: number;
5527
+ };
5528
+ autonomy: "manual" | "auto";
5529
+ maxReplanPasses: number;
5530
+ reflection: {
5531
+ enabled: boolean;
5532
+ maxRounds: number;
5533
+ };
5534
+ t3Execution: "parallel" | "sequential" | "auto";
5535
+ reinforcements: {
5536
+ enabled: boolean;
5537
+ maxPerSection: number;
5538
+ };
5539
+ altScreen: boolean;
5540
+ defaultIdentityId?: string | undefined;
5541
+ rateLimits?: {
5542
+ providerTpm?: Record<string, number> | undefined;
5543
+ } | undefined;
5544
+ privacy?: {
5545
+ paths: {
5546
+ pattern: string;
5547
+ policy: "local-only";
5548
+ }[];
5549
+ } | undefined;
5550
+ routing?: {
5551
+ forceTier: "T1" | "T2" | "T3" | "auto";
5552
+ learnFromOutcomes: boolean;
5553
+ perfStatsPath?: string | undefined;
5554
+ } | undefined;
5555
+ }, {
5556
+ workspace?: {
5557
+ cascadeMdPath?: string | undefined;
5558
+ configPath?: string | undefined;
5559
+ keystorePath?: string | undefined;
5560
+ auditLogPath?: string | undefined;
5561
+ debugWorldState?: boolean | undefined;
5562
+ } | undefined;
5563
+ providers?: {
5564
+ type: "anthropic" | "openai" | "gemini" | "azure" | "openai-compatible" | "ollama";
5565
+ region?: string | undefined;
5566
+ baseUrl?: string | undefined;
5567
+ local?: boolean | undefined;
5568
+ label?: string | undefined;
5569
+ apiKey?: string | undefined;
5570
+ deploymentName?: string | undefined;
5571
+ apiVersion?: string | undefined;
5572
+ model?: string | undefined;
5573
+ authToken?: string | undefined;
5574
+ credentialSource?: string | undefined;
5575
+ }[] | undefined;
5576
+ tools?: {
5577
+ mcpServers?: {
5578
+ name: string;
5579
+ url?: string | undefined;
5580
+ headers?: Record<string, string> | undefined;
5581
+ command?: string | undefined;
5582
+ args?: string[] | undefined;
5583
+ env?: Record<string, string> | undefined;
5584
+ oauthStore?: string | undefined;
5585
+ }[] | undefined;
5586
+ shellAllowlist?: string[] | undefined;
5587
+ shellBlocklist?: string[] | undefined;
5588
+ requireApprovalFor?: string[] | undefined;
5589
+ browserEnabled?: boolean | undefined;
5590
+ agentBrowserControl?: boolean | undefined;
5591
+ mcpTrusted?: string[] | undefined;
5592
+ webSearch?: {
5593
+ searxngUrl?: string | undefined;
5594
+ braveApiKey?: string | undefined;
5595
+ tavilyApiKey?: string | undefined;
5596
+ maxResults?: number | undefined;
5597
+ guardSearxngUrl?: boolean | undefined;
5598
+ } | undefined;
5599
+ dynamicToolSandbox?: "auto" | "isolate" | "worker" | undefined;
5600
+ enabledTools?: string[] | undefined;
5601
+ disabledTools?: string[] | undefined;
5602
+ } | undefined;
5603
+ models?: {
5604
+ t1?: string | undefined;
5605
+ t2?: string | undefined;
5606
+ t3?: string | undefined;
5607
+ vision?: string | undefined;
5608
+ } | undefined;
5609
+ version?: "1.0" | undefined;
5610
+ defaultIdentityId?: string | undefined;
5611
+ hooks?: {
5612
+ preToolUse?: {
5613
+ command: string;
5614
+ timeout?: number | undefined;
5615
+ name?: string | undefined;
5616
+ tools?: string[] | undefined;
5617
+ }[] | undefined;
5618
+ postToolUse?: {
5619
+ command: string;
5620
+ timeout?: number | undefined;
5621
+ name?: string | undefined;
5622
+ tools?: string[] | undefined;
5623
+ }[] | undefined;
5624
+ preTask?: {
5625
+ command: string;
5626
+ timeout?: number | undefined;
5627
+ name?: string | undefined;
5628
+ tools?: string[] | undefined;
5629
+ }[] | undefined;
5630
+ postTask?: {
5631
+ command: string;
5632
+ timeout?: number | undefined;
5633
+ name?: string | undefined;
5634
+ tools?: string[] | undefined;
5635
+ }[] | undefined;
5636
+ } | undefined;
5637
+ dashboard?: {
5638
+ auth?: boolean | undefined;
5639
+ host?: string | undefined;
5640
+ port?: number | undefined;
5641
+ teamMode?: "single" | "multi" | undefined;
5642
+ secret?: string | undefined;
5643
+ } | undefined;
5644
+ telemetry?: {
5645
+ enabled?: boolean | undefined;
5646
+ posthogApiKey?: string | undefined;
5647
+ distinctId?: string | undefined;
5648
+ } | undefined;
5649
+ memory?: {
5650
+ maxSessionMessages?: number | undefined;
5651
+ autoSummarizeAt?: number | undefined;
5652
+ retentionDays?: number | undefined;
5653
+ rememberSessions?: boolean | undefined;
5654
+ } | undefined;
5655
+ tierLimits?: {
5656
+ t1MaxTokens?: number | undefined;
5657
+ t2MaxTokens?: number | undefined;
5658
+ t3MaxTokens?: number | undefined;
5659
+ t1Temperature?: number | undefined;
5660
+ t2Temperature?: number | undefined;
5661
+ t3Temperature?: number | undefined;
5662
+ } | undefined;
5663
+ extendedContext?: {
5664
+ enabled?: boolean | undefined;
5665
+ maxMultiplier?: number | undefined;
5666
+ } | undefined;
5667
+ budget?: {
5668
+ dailyBudgetUsd?: number | undefined;
5669
+ sessionBudgetUsd?: number | undefined;
5670
+ maxTokensPerRun?: number | undefined;
5671
+ maxCostPerRunUsd?: number | undefined;
5672
+ failureThreshold?: number | undefined;
5673
+ warnAtPct?: number | undefined;
5674
+ } | undefined;
5675
+ theme?: string | undefined;
5676
+ rateLimits?: {
5677
+ providerTpm?: Record<string, number> | undefined;
5678
+ } | undefined;
5679
+ cascadeAuto?: boolean | undefined;
5680
+ autoBias?: "balanced" | "quality" | "cost" | undefined;
5681
+ benchmarks?: {
5682
+ live?: boolean | undefined;
5683
+ sourceUrl?: string | undefined;
5684
+ pricingLive?: boolean | undefined;
5685
+ refreshHours?: number | undefined;
5686
+ cacheFile?: string | undefined;
5687
+ } | undefined;
5688
+ enableToolCreation?: boolean | undefined;
5689
+ knowledge?: {
5690
+ factsExtraction?: boolean | undefined;
5691
+ } | undefined;
5692
+ fastAnswer?: {
5693
+ autoSimple?: boolean | undefined;
5694
+ } | undefined;
5695
+ codeIndex?: {
5696
+ enabled?: boolean | undefined;
5697
+ autoRefresh?: boolean | undefined;
5698
+ dbPath?: string | undefined;
5699
+ } | undefined;
5700
+ persistDynamicTools?: boolean | undefined;
5701
+ plugins?: string[] | undefined;
5702
+ localConcurrency?: number | undefined;
5703
+ localInferenceTimeoutMs?: number | undefined;
5704
+ cloudInferenceTimeoutMs?: number | undefined;
5705
+ approvalTimeoutMs?: number | undefined;
5706
+ planApproval?: "never" | "complex" | "all" | "always" | undefined;
5707
+ planReview?: {
5708
+ autoReviewer?: boolean | undefined;
5709
+ editable?: boolean | undefined;
5710
+ maxRevisionRounds?: number | undefined;
5711
+ } | undefined;
5712
+ autonomy?: "manual" | "auto" | undefined;
5713
+ maxReplanPasses?: number | undefined;
5714
+ reflection?: {
5715
+ enabled?: boolean | undefined;
5716
+ maxRounds?: number | undefined;
5717
+ } | undefined;
5718
+ t3Execution?: "parallel" | "sequential" | "auto" | undefined;
5719
+ privacy?: {
5720
+ paths?: {
5721
+ pattern: string;
5722
+ policy: "local-only";
5723
+ }[] | undefined;
5724
+ } | undefined;
5725
+ routing?: {
5726
+ forceTier?: "T1" | "T2" | "T3" | "auto" | undefined;
5727
+ perfStatsPath?: string | undefined;
5728
+ learnFromOutcomes?: boolean | undefined;
5729
+ } | undefined;
5730
+ reinforcements?: {
5731
+ enabled?: boolean | undefined;
5732
+ maxPerSection?: number | undefined;
5733
+ } | undefined;
5734
+ altScreen?: boolean | undefined;
5735
+ }>;
5736
+
4395
5737
  /** A provider row, as every settings surface manipulates it. */
4396
5738
  interface WritableProvider {
4397
5739
  type: string;
@@ -4874,6 +6216,14 @@ declare class DashboardServer {
4874
6216
  * always failing.
4875
6217
  */
4876
6218
  private currentPageProvider?;
6219
+ /**
6220
+ * Supplied by the desktop shell so a run can ACT on that page — click, type,
6221
+ * submit — not just read it. Same reasoning as the provider above: absent in
6222
+ * the CLI, so the tool is not registered rather than present and failing.
6223
+ * Cascade applies the `tools.agentBrowserControl` gate on top of this.
6224
+ */
6225
+ private browserController?;
6226
+ private browserActorRelease?;
4877
6227
  private activeControllers;
4878
6228
  /**
4879
6229
  * Run taskIds per chat session — file snapshots are keyed by the run's
@@ -4913,6 +6263,45 @@ declare class DashboardServer {
4913
6263
  constructor(config: CascadeConfig, store: MemoryStore, workspacePath?: string);
4914
6264
  /** Wire the host's browser view in (desktop only). */
4915
6265
  setCurrentPageProvider(provider: CurrentPageProvider): void;
6266
+ /** Let runs act on that view, not just read it (desktop only). */
6267
+ setBrowserController(controller: BrowserController, release?: BrowserActorRelease): void;
6268
+ /**
6269
+ * Told whenever settings are committed through THIS server.
6270
+ *
6271
+ * Settings reach the live config by two routes — the desktop's Electron IPC
6272
+ * handler and this server's `config:update` socket — and both run the same
6273
+ * `commitSettings`. The desktop mirrors `tools.agentBrowserControl` into its
6274
+ * browser module after its own route, but had no way to learn about the
6275
+ * other, so a socket write left the module's copy stale: an enable the module
6276
+ * still refused, or worse a disable the module still honoured for a run
6277
+ * already holding the tool. This is the same sibling-writer drift
6278
+ * `settings-payload.ts` exists to prevent, one layer up.
6279
+ */
6280
+ private settingsChangeHook?;
6281
+ onSettingsChanged(hook: (config: CascadeConfig) => void): void;
6282
+ /**
6283
+ * Told when a run ends, so a host holding run-scoped state can release it.
6284
+ *
6285
+ * The desktop uses this to retire a run's browser Stop control: that has to
6286
+ * outlive each individual action (the gap between two actions is when the
6287
+ * user most wants it) but must not outlive the run.
6288
+ */
6289
+ /**
6290
+ * Fired when a run ends, carrying BOTH identifiers explicitly.
6291
+ *
6292
+ * They are different things and conflating them was a live bug: a chat
6293
+ * `sessionId` can contain many runs (hence `sessionTaskIds`), while
6294
+ * `Cascade.run()` mints a fresh random `taskId` per run — and it is the
6295
+ * taskId that tools see as `ToolExecuteOptions.sessionId`. Passing only the
6296
+ * chat id meant browser cleanup keyed on the task id matched nothing, so a
6297
+ * finished run kept its Stop banner armed and held its browser lease until
6298
+ * the deadlock ceiling.
6299
+ */
6300
+ private runEndedHook?;
6301
+ onRunEnded(hook: (ids: {
6302
+ sessionId: string;
6303
+ taskId?: string;
6304
+ }) => void): void;
4916
6305
  start(): Promise<void>;
4917
6306
  stop(): Promise<void>;
4918
6307
  getSocket(): DashboardSocket;
@@ -6206,23 +7595,8 @@ declare class CascadeToolError extends Error {
6206
7595
  constructor(userMessage: string, cause?: unknown, retryable?: boolean);
6207
7596
  }
6208
7597
 
6209
- /** Selectable base models, in the order a picker should show them. */
6210
7598
  declare const AZURE_BASE_MODELS: readonly string[];
6211
7599
  declare function inferAzureBaseModel(deploymentName: string): string | null;
6212
- /**
6213
- * The ModelInfo for one configured Azure deployment. On Azure the deployment IS
6214
- * the model (you address it by deployment name, and which base model backs it is
6215
- * opaque to the API) — so each `providers[]` entry with a deploymentName becomes
6216
- * one selectable model.
6217
- *
6218
- * Which base model it serves drives correct benchmark scoring + pricing, so we
6219
- * resolve it: an explicit `cfg.model` (user override) wins, else we infer it from
6220
- * the deployment name. When resolved to a known catalog model, this deployment
6221
- * INHERITS that model's real economics (context window, pricing, vision, output
6222
- * cap) while keeping the deployment name as its callable `id` and carrying the
6223
- * base identity in `baseModelId`. Unresolved deployments fall back to neutral
6224
- * GPT-4o-class defaults (an estimate, not $0), exactly as before.
6225
- */
6226
7600
  declare function azureModelForDeployment(cfg: ProviderConfig): ModelInfo | null;
6227
7601
 
6228
7602
  interface CloudUser {
@@ -6456,4 +7830,4 @@ declare function gatherSyncBundle(config: CascadeConfig): SyncBundle;
6456
7830
  /** Merge a pulled bundle into a config, returning the updated config to persist. */
6457
7831
  declare function applySyncBundle(bundle: SyncBundle, config: CascadeConfig, cleanup?: RetiredProviderCleanup): CascadeConfig;
6458
7832
 
6459
- export { AZURE_BASE_MODELS, AZURE_BASE_URL_TEMPLATE, type AcceptanceOptions, type AcceptanceProbe, type AcceptanceResult, type AcceptanceVerdict, type ApprovalRequest, type ApprovalResponse, type AuditEntry, AuditLogger, type AzureDeploymentInput, type BenchmarksConfig, type Block, type BudgetConfig, CASCADE_AUDIT_FILE, CASCADE_CONFIG_DIR, CASCADE_CONFIG_FILE, CASCADE_DASHBOARD_SECRET_FILE, CASCADE_DB_FILE, CASCADE_IGNORE_FILE, CASCADE_KEYSTORE_FILE, CASCADE_MD_FILE, CASCADE_VERSION, CHARS_PER_TOKEN, COMPLEXITY_T2_COUNT, Cascade, CascadeCancelledError, type CascadeConfig, type CascadeEvent, type CascadeEventType, CascadeIgnore, type CascadeMessage, CascadeRouter, type CascadeRunOptions, type CascadeRunResult, type CascadeThemeName, CascadeToolError, type ChartSeries, type ChartSpec, type Chunk, type ChunkOptions, CloudClient, type CloudConversation, type CloudMessage, type CloudSession, type CloudSessionStore, type CloudTurnInput, type CloudUser, type CodeChunkOptions, type CodeChunker, CodeSearchTool, type CompileTaskGraphOptions, type CompiledTaskGraph, type CompleteFn, type CompletedNode, ConfigManager, type ConversationMessage, type CredentialDisposition, type CredentialEndpoint, type CredentialWriteOutcome, type CurrentPageProvider, type CurrentPageSnapshot, CurrentPageTool, DEFAULT_API_PORT, DEFAULT_APPROVAL_REQUIRED, DEFAULT_AUTO_SUMMARIZE_AT, DEFAULT_CLOUD_URL, DEFAULT_CONTEXT_LIMIT, DEFAULT_DASHBOARD_PORT, DEFAULT_MAX_SESSION_MESSAGES, DEFAULT_RETENTION_DAYS, DEFAULT_THEME, DOCUMENT_MIME, type DashboardConfig, DashboardServer, DependencyScheduler, type DeviceStart, type DiscoveredMcpTool, type DistilledFact, type ChartKind as DocumentChartKind, type DocumentFormat, type Embedder, type EncryptedBlob, type EscalationDecision, type EscalationPayload, type ExtendedContextConfig, type FileManifest, FileMcpOAuthStore, GLOBAL_CONFIG_DIR, GLOBAL_CREDENTIALS_FILE, GLOBAL_DB_FILE, GLOBAL_KEYSTORE_FILE, GLOBAL_RUNTIME_DB_FILE, GenerateDocumentTool, type GenerateOptions, type GenerateResult, type GraphFactSource, GraphRetriever, type GraphSearchOptions, GraphSearchTool, type HookDefinition, type HooksConfig, HooksRunner, type Identity, type ImageAttachment, type ImageByteLoader, type ImageInfo, type ImageRef, type InlineRun, Keystore, LLMReranker, LM_STUDIO_BASE_URL, type LegacyThemeName, type LoadedImage, MAX_PAGE_TEXT_CHARS, MCP_TOOL_PREFIX, MODELS, type ManifestDiff, McpClient, type McpDiscoveryResult, McpOAuthProvider, type McpOAuthState, type McpOAuthStore, type McpServerConfig$1 as McpServerConfig, type McpServerRename, type MemoryConfig, MemoryStore, type Message, type MessageContent, type MessagePayload, type MessageStatus, type MessageType, type ModelInfo, type ModelOverrides, type NativeProvider, OLLAMA_BASE_URL, OpenAICompatibleEmbedder, type OpenAIEmbedderOptions, PROVIDER_DISPLAY_NAMES, type PeerMessage, type PeerMessageEvent, type PeerSyncPayload, type PeerSyncType, type PermissionDecision, type PermissionDecisionPayload, type PermissionRequest, type PermissionTrailEntry, type PlanReviewConfig, type ProviderConfig, type ProviderType, RESUME_SCHEMA_VERSION, type RankedFact, type RefreshResult, type RenderOptions, type Reranker, type ResumeCheckpoint, type ResumeReason, ResumeStore, type ResumeStoreOptions, type RetrievalContext, type RetrievalMode, type RetrievalPlan, Retriever, type RetrieverSearchOptions, type RuntimeNode, type RuntimeNodeLog, type RuntimeRefreshPayload, type RuntimeScope, type RuntimeSession, type RuntimeSnapshotPayload, type ScheduledTask, type SchedulerExecutionMode, type SchedulerHooks, type SchedulerOptions, type SchedulerResult, type ScoredChunk, type SearchOptions, type Session, type SessionCheckpoint, type SessionMetadata, type SessionSubscriptionPayload, type SettingsCommitResult, type SettingsCredentialResult, type SettingsPayload, type SettingsSnapshot, type Slide, SqliteVectorStore, type StatusUpdate, type StoredMessage, type StreamChunk, type SyncBundle, T1Administrator, type T1ToT2Assignment, T1_MODEL_PRIORITY, T2Manager, type T2Result, type T2ToT3Assignment, T2_MODEL_PRIORITY, type T3Result, type T3ResultPayload, type T3SubtaskSpec, T3Worker, T3_MODEL_PRIORITY, THEME_NAMES, TOOL_NAMES, type TaskComplexity, type TaskGraph, type TaskGraphInputNode, type TaskGraphIssue, type TaskGraphIssueCode, type TaskGraphNode, type TaskGraphNodeKind, TaskGraphValidationError, type TaskGraphValidationMode, TaskScheduler, type TaskType, Telemetry, type TelemetryConfig, type Theme, type ThemeColors, type ThemeName, type TierConfig, type TierLimits, type TierRole, type TierStatus, type TokenUsage, type ToolCall, type ToolDefinition, type ToolExecuteOptions, ToolRegistry, type ToolResult, type ToolsConfig, VISION_MODEL_PRIORITY, type VectorStore, type WebSearchConfig, type WebhookConfig, type WorkspaceConfig, type WorkspaceFileReader, WorkspaceIndex, type WorkspaceIndexOptions, applyEndpointEdit, applyProviderApiKey, applyProviderCredential, applySettingsCredentials, applySettingsPayload, applySyncBundle, azureModelForDeployment, beginMcpOAuth, buildDocumentTools, buildManifest, buildSessionTranscript, bytesToBase64, cagCharBudget, chartKind, chartToTableRows, chatCompleterFromProviders, chunkCode, chunkText, commitSettings, compileSectionGraph, compileSubtaskGraph, compileTaskGraph, completeMcpOAuth, connectMcpWithLoopbackOAuth, createCascade, credentialDispositionForEdit, credentialEndpointIdentity, decryptJSON as decryptSyncBlob, diffManifest, disambiguateMcpServerNames, discoverMcpAuthServer, discoverMcpTools, distillSessionFacts, embedderFromProviders, encryptJSON as encryptSyncBlob, endpointFromSettingsPayload, evaluateAcceptance, explainRefusal, extractCharts, failures, fileExt, fileOAuthProvider, gatherSyncBundle, hasDefaultEndpoint, hasProviderCredential, hasUsableProvider, hashContent, heuristicCodeChunker, inferAzureBaseModel, inlineRuns, isDocumentFormat, isMcpToolName, matchImageLine, mcpServerPrefix, mcpToolName, nodeHttpFetch, normalizeEndpoint, parseBlocks, parseChartSpec, parseDelimited, parseRankOrder, parseSlide, planRetrieval, preferIpv4Host, priorAzureRow, reciprocalRankFusion, refreshMcpToken, removeMcpServerDenials, renderDocument, renderDocx, renderPptx, renderXlsx, runCascade, sameAzureEndpoint, sameCredentialEndpoint, sameEndpoint, sessionWorthRemembering, settingsSnapshot, sniffImage, splitSlides, streamCascade, stripInline, summarizeCompleted, undecided, uniqueMcpServerName };
7833
+ export { AZURE_BASE_MODELS, AZURE_BASE_URL_TEMPLATE, type AcceptanceOptions, type AcceptanceProbe, type AcceptanceResult, type AcceptanceVerdict, type ApprovalRequest, type ApprovalResponse, type AuditEntry, AuditLogger, type AzureDeploymentInput, type BenchmarksConfig, type Block, type BrowserAction, type BrowserActionOutcome, BrowserControlTool, type BrowserController, type BudgetConfig, CASCADE_AUDIT_FILE, CASCADE_CONFIG_DIR, CASCADE_CONFIG_FILE, CASCADE_DASHBOARD_SECRET_FILE, CASCADE_DB_FILE, CASCADE_IGNORE_FILE, CASCADE_KEYSTORE_FILE, CASCADE_MD_FILE, CASCADE_VERSION, CHARS_PER_TOKEN, COMPLEXITY_T2_COUNT, Cascade, CascadeCancelledError, type CascadeConfig, CascadeConfigSchema, type CascadeEvent, type CascadeEventType, CascadeIgnore, type CascadeMessage, CascadeRouter, type CascadeRunOptions, type CascadeRunResult, type CascadeThemeName, CascadeToolError, type ChartSeries, type ChartSpec, type Chunk, type ChunkOptions, CloudClient, type CloudConversation, type CloudMessage, type CloudSession, type CloudSessionStore, type CloudTurnInput, type CloudUser, type CodeChunkOptions, type CodeChunker, CodeSearchTool, type CompileTaskGraphOptions, type CompiledTaskGraph, type CompleteFn, type CompletedNode, ConfigManager, type ConversationMessage, type CredentialDisposition, type CredentialEndpoint, type CredentialWriteOutcome, type CurrentPageProvider, type CurrentPageSnapshot, CurrentPageTool, DEFAULT_API_PORT, DEFAULT_APPROVAL_REQUIRED, DEFAULT_AUTO_SUMMARIZE_AT, DEFAULT_CLOUD_URL, DEFAULT_CONTEXT_LIMIT, DEFAULT_DASHBOARD_PORT, DEFAULT_MAX_SESSION_MESSAGES, DEFAULT_RETENTION_DAYS, DEFAULT_THEME, DOCUMENT_MIME, type DashboardConfig, DashboardServer, DependencyScheduler, type DeviceStart, type DiscoveredMcpTool, type DistilledFact, type ChartKind as DocumentChartKind, type DocumentFormat, type Embedder, type EncryptedBlob, type EscalationDecision, type EscalationPayload, type ExtendedContextConfig, type FileManifest, FileMcpOAuthStore, GLOBAL_CONFIG_DIR, GLOBAL_CREDENTIALS_FILE, GLOBAL_DB_FILE, GLOBAL_KEYSTORE_FILE, GLOBAL_RUNTIME_DB_FILE, GenerateDocumentTool, type GenerateOptions, type GenerateResult, type GraphFactSource, GraphRetriever, type GraphSearchOptions, GraphSearchTool, type HookDefinition, type HooksConfig, HooksRunner, type Identity, type ImageAttachment, type ImageByteLoader, type ImageInfo, type ImageRef, type InlineRun, Keystore, LLMReranker, LM_STUDIO_BASE_URL, type LegacyThemeName, type LoadedImage, MAX_PAGE_TEXT_CHARS, MCP_TOOL_PREFIX, MODELS, type ManifestDiff, McpClient, type McpDiscoveryResult, McpOAuthProvider, type McpOAuthState, type McpOAuthStore, type McpServerConfig$1 as McpServerConfig, type McpServerRename, type MemoryConfig, MemoryStore, type Message, type MessageContent, type MessagePayload, type MessageStatus, type MessageType, type ModelInfo, type ModelOverrides, type NativeProvider, OLLAMA_BASE_URL, OpenAICompatibleEmbedder, type OpenAIEmbedderOptions, PROVIDER_DISPLAY_NAMES, type PeerMessage, type PeerMessageEvent, type PeerSyncPayload, type PeerSyncType, type PermissionDecision, type PermissionDecisionPayload, type PermissionRequest, type PermissionTrailEntry, type PlanReviewConfig, type ProviderConfig, type ProviderType, RESUME_SCHEMA_VERSION, type RankedFact, type RefreshResult, type RenderOptions, type Reranker, type ResumeCheckpoint, type ResumeReason, ResumeStore, type ResumeStoreOptions, type RetrievalContext, type RetrievalMode, type RetrievalPlan, Retriever, type RetrieverSearchOptions, type RuntimeNode, type RuntimeNodeLog, type RuntimeRefreshPayload, type RuntimeScope, type RuntimeSession, type RuntimeSnapshotPayload, type ScheduledTask, type SchedulerExecutionMode, type SchedulerHooks, type SchedulerOptions, type SchedulerResult, type ScoredChunk, type SearchOptions, type Session, type SessionCheckpoint, type SessionMetadata, type SessionSubscriptionPayload, type SettingsCommitResult, type SettingsCredentialResult, type SettingsPayload, type SettingsSnapshot, type Slide, SqliteVectorStore, type StatusUpdate, type StoredMessage, type StreamChunk, type SyncBundle, T1Administrator, type T1ToT2Assignment, T1_MODEL_PRIORITY, T2Manager, type T2Result, type T2ToT3Assignment, T2_MODEL_PRIORITY, type T3Result, type T3ResultPayload, type T3SubtaskSpec, T3Worker, T3_MODEL_PRIORITY, THEME_NAMES, TOOL_NAMES, type TaskComplexity, type TaskGraph, type TaskGraphInputNode, type TaskGraphIssue, type TaskGraphIssueCode, type TaskGraphNode, type TaskGraphNodeKind, TaskGraphValidationError, type TaskGraphValidationMode, TaskScheduler, type TaskType, Telemetry, type TelemetryConfig, type Theme, type ThemeColors, type ThemeName, type TierConfig, type TierLimits, type TierRole, type TierStatus, type TokenUsage, type ToolCall, type ToolDefinition, type ToolExecuteOptions, ToolRegistry, type ToolResult, type ToolsConfig, VISION_MODEL_PRIORITY, type VectorStore, type WebSearchConfig, type WebhookConfig, type WorkspaceConfig, type WorkspaceFileReader, WorkspaceIndex, type WorkspaceIndexOptions, applyEndpointEdit, applyProviderApiKey, applyProviderCredential, applySettingsCredentials, applySettingsPayload, applySyncBundle, azureModelForDeployment, beginMcpOAuth, buildDocumentTools, buildManifest, buildSessionTranscript, bytesToBase64, cagCharBudget, chartKind, chartToTableRows, chatCompleterFromProviders, chunkCode, chunkText, commitSettings, compileSectionGraph, compileSubtaskGraph, compileTaskGraph, completeMcpOAuth, connectMcpWithLoopbackOAuth, createCascade, credentialDispositionForEdit, credentialEndpointIdentity, decryptJSON as decryptSyncBlob, diffManifest, disambiguateMcpServerNames, discoverMcpAuthServer, discoverMcpTools, distillSessionFacts, embedderFromProviders, encryptJSON as encryptSyncBlob, endpointFromSettingsPayload, evaluateAcceptance, explainRefusal, extractCharts, failures, fileExt, fileOAuthProvider, gatherSyncBundle, hasDefaultEndpoint, hasProviderCredential, hasUsableProvider, hashContent, heuristicCodeChunker, inferAzureBaseModel, inlineRuns, isDocumentFormat, isMcpToolName, matchImageLine, mcpServerPrefix, mcpToolName, nodeHttpFetch, normalizeEndpoint, parseBlocks, parseChartSpec, parseDelimited, parseRankOrder, parseSlide, planRetrieval, preferIpv4Host, priorAzureRow, reciprocalRankFusion, refreshMcpToken, removeMcpServerDenials, renderDocument, renderDocx, renderPptx, renderXlsx, runCascade, sameAzureEndpoint, sameCredentialEndpoint, sameEndpoint, sessionWorthRemembering, settingsSnapshot, sniffImage, splitSlides, streamCascade, stripInline, summarizeCompleted, undecided, uniqueMcpServerName };