cascade-ai 0.77.0 → 0.79.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
@@ -873,6 +873,24 @@ interface ToolsConfig {
873
873
  shellBlocklist: string[];
874
874
  requireApprovalFor: string[];
875
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;
883
+ /**
884
+ * Where a hosted run gets a browser. Absent means the capability does not
885
+ * exist on that surface. See `src/config/schema.ts` and
886
+ * `src/browser/remote/provider.ts`.
887
+ */
888
+ remoteBrowser?: {
889
+ provider?: 'cdp' | 'steel';
890
+ url?: string;
891
+ apiKey?: string;
892
+ maxSessions?: number;
893
+ };
876
894
  mcpServers?: McpServerConfig$1[];
877
895
  /**
878
896
  * Names of MCP servers (matching McpServerConfig.name) that the user has
@@ -3178,6 +3196,143 @@ declare class CurrentPageTool extends BaseTool {
3178
3196
  execute(_input: Record<string, unknown>, _options: ToolExecuteOptions): Promise<string>;
3179
3197
  }
3180
3198
 
3199
+ /** One thing to do to the open page. */
3200
+ interface BrowserAction {
3201
+ kind: 'navigate' | 'click' | 'fill' | 'press' | 'wait_for' | 'extract_text';
3202
+ /** navigate */
3203
+ url?: string;
3204
+ /** click, fill, wait_for, extract_text (optional — defaults to the body) */
3205
+ selector?: string;
3206
+ /** fill */
3207
+ value?: string;
3208
+ /** press — a single key name, e.g. "Enter" or "Tab" */
3209
+ key?: string;
3210
+ /** wait_for */
3211
+ timeoutMs?: number;
3212
+ }
3213
+ interface BrowserActionOutcome {
3214
+ ok: boolean;
3215
+ /** Human- and model-readable account of what happened. */
3216
+ detail: string;
3217
+ /** Where the page ended up, when the host can tell. */
3218
+ url?: string;
3219
+ title?: string;
3220
+ }
3221
+ /**
3222
+ * Who is asking, and how to stop them.
3223
+ *
3224
+ * Both fields exist because the browser is a SINGLETON the host owns while runs
3225
+ * come and go. Without run identity the host cannot tell a Stop in one run from
3226
+ * a Stop in every future run, and cannot tell two concurrent runs apart when
3227
+ * they both reach for the same page.
3228
+ */
3229
+ interface BrowserActionContext {
3230
+ /**
3231
+ * The run this action belongs to. Revocation and the host's single-owner
3232
+ * lease both key on it, so a Stop scopes to the run the user was watching
3233
+ * rather than to the process.
3234
+ */
3235
+ sessionId: string;
3236
+ /**
3237
+ * The individual worker asking — `tierId`, a per-instance id.
3238
+ *
3239
+ * Distinct from `sessionId` and both are needed. Every T3 worker in a run
3240
+ * passes the same `taskId` as the session, so the session says which RUN to
3241
+ * stop but cannot tell two sibling workers apart. The host leases the browser
3242
+ * to one actor for a whole sequence, and a lease keyed by session would hand
3243
+ * the same lease to every sibling at once — which is the state that lets one
3244
+ * worker navigate away in the middle of another's fill-then-click.
3245
+ */
3246
+ actorId: string;
3247
+ /**
3248
+ * Cancels an action already in flight. `wait_for` can sit for 30s and
3249
+ * `navigate` waits on the network, so without this a cancelled run keeps
3250
+ * touching the user's authenticated page after it was stopped.
3251
+ */
3252
+ signal?: AbortSignal;
3253
+ }
3254
+ /**
3255
+ * Performs one action against the browser view the host owns.
3256
+ *
3257
+ * Returning `ok: false` with a reason is expected and normal — a selector that
3258
+ * matches nothing is a thing the model should be told about and can recover
3259
+ * from, not an exception.
3260
+ */
3261
+ type BrowserController = (action: BrowserAction, context: BrowserActionContext) => Promise<BrowserActionOutcome>;
3262
+ /**
3263
+ * Told that one worker is finished with the browser for good.
3264
+ *
3265
+ * Separate from the controller because it is not an action: it carries no
3266
+ * outcome and cannot fail. The host uses it to end that actor's sequence lease
3267
+ * — the only signal that reliably means "will not ask again", as opposed to a
3268
+ * worker that is merely waiting on its next model response.
3269
+ */
3270
+ type BrowserActorRelease = (actorId: string) => void;
3271
+ declare class BrowserControlTool extends BaseTool {
3272
+ readonly name = "browser_control";
3273
+ readonly description: string;
3274
+ readonly inputSchema: {
3275
+ type: string;
3276
+ properties: {
3277
+ action: {
3278
+ type: string;
3279
+ enum: string[];
3280
+ description: string;
3281
+ };
3282
+ url: {
3283
+ type: string;
3284
+ description: string;
3285
+ };
3286
+ selector: {
3287
+ type: string;
3288
+ description: string;
3289
+ };
3290
+ value: {
3291
+ type: string;
3292
+ description: string;
3293
+ };
3294
+ key: {
3295
+ type: string;
3296
+ description: string;
3297
+ };
3298
+ timeoutMs: {
3299
+ type: string;
3300
+ description: string;
3301
+ };
3302
+ };
3303
+ required: string[];
3304
+ };
3305
+ private controller;
3306
+ private release;
3307
+ /** One-way. See `revoke`. */
3308
+ private revoked;
3309
+ constructor(controller: BrowserController, release?: BrowserActorRelease);
3310
+ /**
3311
+ * A worker has finished. Ends its hold on the browser.
3312
+ *
3313
+ * Called from the tier's terminal path rather than by the model, because a
3314
+ * model cannot be relied on to announce that it is done — which is why the
3315
+ * host cannot use idle time as the boundary instead.
3316
+ */
3317
+ releaseActor(actorId: string): void;
3318
+ /**
3319
+ * Permanently disable this tool, whatever the registry still holds.
3320
+ *
3321
+ * Registration-time gates cannot express "this run turned out to be
3322
+ * unattended": a host that wires the controller and only then declares the
3323
+ * run unattended has already registered the tool, and a check that ran at
3324
+ * registration has no second chance. Enforcing at EXECUTION time makes the
3325
+ * guarantee independent of call order, which is the whole point of stating
3326
+ * the invariant rather than relying on the scheduler's current sequence.
3327
+ *
3328
+ * One-way on purpose. A safety gate that can be re-opened by a later call is
3329
+ * a gate that a refactor re-opens by accident.
3330
+ */
3331
+ revoke(): void;
3332
+ isDangerous(): boolean;
3333
+ execute(input: Record<string, unknown>, options: ToolExecuteOptions): Promise<string>;
3334
+ }
3335
+
3181
3336
  /** One entry in the per-run orchestration decision trail (see /why). */
3182
3337
  interface DecisionLogEntry {
3183
3338
  at: string;
@@ -3358,6 +3513,65 @@ declare class Cascade extends EventEmitter {
3358
3513
  * nothing. `disabledTools` still removes it.
3359
3514
  */
3360
3515
  setCurrentPageProvider(provider: CurrentPageProvider): void;
3516
+ /**
3517
+ * True when nobody is watching this run — a scheduled/cron task, which
3518
+ * auto-approves every tool because there is no one to ask.
3519
+ *
3520
+ * That auto-approval is fine for ordinary tools and disqualifying for this
3521
+ * one: `browser_control` drives the signed-in browser, and "every run asks
3522
+ * first" is the promise the Settings copy makes. The property used to hold
3523
+ * only because `runScheduledTask` happens not to call `setBrowserController`
3524
+ * — a guarantee resting on an ABSENT call, which is exactly what a later
3525
+ * refactor adds without noticing. Stated and enforced instead.
3526
+ */
3527
+ private unattended;
3528
+ /**
3529
+ * Declare that no human is watching this run, so capabilities that depend on
3530
+ * a person being able to see and stop them are refused outright.
3531
+ */
3532
+ setUnattended(on: boolean): void;
3533
+ /**
3534
+ * Wire the host's browser so a run can ACT on the open page, not just read it.
3535
+ *
3536
+ * Two gates before this registers anything, and both matter:
3537
+ *
3538
+ * - `tools.agentBrowserControl` must be on. Unlike read_current_page, which
3539
+ * reaches nothing the user has not already opened themselves, this drives
3540
+ * the session they are signed into. That is opt-in, not a default.
3541
+ * - `disabledTools` still removes it, the same as every other tool.
3542
+ * - The run must not be UNATTENDED. See `setUnattended`.
3543
+ *
3544
+ * Host-supplied like the page provider: the tool exists only where there is a
3545
+ * real browser to drive, so it never has to be refused in the CLI or a hosted
3546
+ * run — it is simply not there.
3547
+ */
3548
+ setBrowserController(controller: BrowserController, release?: BrowserActorRelease): void;
3549
+ /**
3550
+ * Wire a REMOTE browser — one the host connects to rather than one the user
3551
+ * is signed into.
3552
+ *
3553
+ * A separate entry point because the enablement is a different question, and
3554
+ * conflating them made the hosted capability dead on arrival: this went out
3555
+ * calling `setBrowserController`, which gates on `agentBrowserControl`, and
3556
+ * that flag means "drive the browser I am signed into on this machine". It
3557
+ * defaults to false and has no meaning on a server, so the hosted tool was
3558
+ * never registered at all — the feature looked shipped and did nothing.
3559
+ *
3560
+ * Configuring a provider IS the opt-in here. It takes a deliberate act with
3561
+ * an endpoint and usually a paid account, and the browser it reaches is a
3562
+ * throwaway signed into nothing — a smaller consent than handing over the
3563
+ * session the user is already authenticated in, and one the desktop flag
3564
+ * cannot stand in for.
3565
+ */
3566
+ setRemoteBrowserController(controller: BrowserController, release?: BrowserActorRelease): void;
3567
+ /**
3568
+ * The gates every surface shares, with only enablement differing.
3569
+ *
3570
+ * One place, because the two callers above are exactly the sibling-writer
3571
+ * shape that has already drifted twice in this feature: a rule added to one
3572
+ * and not the other is silent on the surface that missed it.
3573
+ */
3574
+ private registerBrowserControl;
3361
3575
  private registerMediaTools;
3362
3576
  /**
3363
3577
  * Register `generate_document` where there is a real workspace to write into.
@@ -3800,6 +4014,15 @@ declare class T3Worker extends BaseTier {
3800
4014
  constructor(router: CascadeRouter, toolRegistry: ToolRegistry, parentId: string);
3801
4015
  setStore(store: MemoryStore, sessionId: string): void;
3802
4016
  execute(assignment: T2ToT3Assignment, taskId: string, signal?: AbortSignal): Promise<T3Result>;
4017
+ /**
4018
+ * End this worker's hold on the shared browser.
4019
+ *
4020
+ * Duck-typed rather than imported: `browser_control` is registered only by a
4021
+ * host that HAS a browser (the desktop), so in the CLI and hosted runs there
4022
+ * is no such tool and this is a no-op. Importing the class to instanceof-check
4023
+ * it would couple the worker to a tool that usually is not there.
4024
+ */
4025
+ private releaseBrowserControl;
3803
4026
  sendToPeer(toId: string, content: unknown): void;
3804
4027
  requestFromPeer(peerId: string, subtaskId: string): Promise<string>;
3805
4028
  syncWithPeers(barrierName: string): Promise<void>;
@@ -4477,6 +4700,55 @@ declare const CascadeConfigSchema: z.ZodObject<{
4477
4700
  shellBlocklist: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
4478
4701
  requireApprovalFor: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
4479
4702
  browserEnabled: z.ZodDefault<z.ZodBoolean>;
4703
+ /**
4704
+ * Let a run ACT on the page open in the desktop's built-in browser — click,
4705
+ * type, submit — not just read it.
4706
+ *
4707
+ * Distinct from `browserEnabled`, which turns on the headless Playwright
4708
+ * tool. That one drives a throwaway browser with an empty cookie jar; this
4709
+ * one drives the session the user is signed into, which is a different order
4710
+ * of consequence and so gets its own switch rather than riding on that one.
4711
+ *
4712
+ * Off by default. Turning it on does not hand anything over silently: the
4713
+ * tool still goes through the approval chain, and the browser panel carries a
4714
+ * stop control for the run that is acting.
4715
+ */
4716
+ agentBrowserControl: z.ZodDefault<z.ZodBoolean>;
4717
+ /**
4718
+ * Where a HOSTED run gets a browser, since it has none of its own.
4719
+ *
4720
+ * The desktop drives the Chromium the user is signed into and can watch. A
4721
+ * server has neither, and running one inside the container is wrong twice
4722
+ * over — page JavaScript issues requests no URL check ever sees, from inside
4723
+ * the trust boundary, and a session costs 200-400 MB. So this points at a
4724
+ * browser somebody else runs.
4725
+ *
4726
+ * Absent by default: no provider, no capability. There is nothing to turn
4727
+ * off because nothing is registered until an endpoint is supplied.
4728
+ */
4729
+ remoteBrowser: z.ZodOptional<z.ZodObject<{
4730
+ /** `cdp` for an endpoint you run; `steel` for a Steel deployment. */
4731
+ provider: z.ZodOptional<z.ZodEnum<["cdp", "steel"]>>;
4732
+ /** The websocket endpoint for `cdp`, or the API base for `steel`. */
4733
+ url: z.ZodOptional<z.ZodString>;
4734
+ apiKey: z.ZodOptional<z.ZodString>;
4735
+ /**
4736
+ * Concurrent sessions. One by default and deliberately so: every session
4737
+ * is billed, and a wave of workers each opening their own is a cost the
4738
+ * user did not choose. Raising it is a decision, not a default.
4739
+ */
4740
+ maxSessions: z.ZodDefault<z.ZodNumber>;
4741
+ }, "strip", z.ZodTypeAny, {
4742
+ maxSessions: number;
4743
+ url?: string | undefined;
4744
+ provider?: "cdp" | "steel" | undefined;
4745
+ apiKey?: string | undefined;
4746
+ }, {
4747
+ url?: string | undefined;
4748
+ provider?: "cdp" | "steel" | undefined;
4749
+ apiKey?: string | undefined;
4750
+ maxSessions?: number | undefined;
4751
+ }>>;
4480
4752
  mcpServers: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
4481
4753
  name: z.ZodString;
4482
4754
  command: z.ZodOptional<z.ZodString>;
@@ -4579,6 +4851,7 @@ declare const CascadeConfigSchema: z.ZodObject<{
4579
4851
  shellBlocklist: string[];
4580
4852
  requireApprovalFor: string[];
4581
4853
  browserEnabled: boolean;
4854
+ agentBrowserControl: boolean;
4582
4855
  dynamicToolSandbox: "auto" | "isolate" | "worker";
4583
4856
  mcpServers?: {
4584
4857
  name: string;
@@ -4589,6 +4862,12 @@ declare const CascadeConfigSchema: z.ZodObject<{
4589
4862
  env?: Record<string, string> | undefined;
4590
4863
  oauthStore?: string | undefined;
4591
4864
  }[] | undefined;
4865
+ remoteBrowser?: {
4866
+ maxSessions: number;
4867
+ url?: string | undefined;
4868
+ provider?: "cdp" | "steel" | undefined;
4869
+ apiKey?: string | undefined;
4870
+ } | undefined;
4592
4871
  mcpTrusted?: string[] | undefined;
4593
4872
  webSearch?: {
4594
4873
  maxResults: number;
@@ -4613,6 +4892,13 @@ declare const CascadeConfigSchema: z.ZodObject<{
4613
4892
  shellBlocklist?: string[] | undefined;
4614
4893
  requireApprovalFor?: string[] | undefined;
4615
4894
  browserEnabled?: boolean | undefined;
4895
+ agentBrowserControl?: boolean | undefined;
4896
+ remoteBrowser?: {
4897
+ url?: string | undefined;
4898
+ provider?: "cdp" | "steel" | undefined;
4899
+ apiKey?: string | undefined;
4900
+ maxSessions?: number | undefined;
4901
+ } | undefined;
4616
4902
  mcpTrusted?: string[] | undefined;
4617
4903
  webSearch?: {
4618
4904
  searxngUrl?: string | undefined;
@@ -5196,6 +5482,7 @@ declare const CascadeConfigSchema: z.ZodObject<{
5196
5482
  shellBlocklist: string[];
5197
5483
  requireApprovalFor: string[];
5198
5484
  browserEnabled: boolean;
5485
+ agentBrowserControl: boolean;
5199
5486
  dynamicToolSandbox: "auto" | "isolate" | "worker";
5200
5487
  mcpServers?: {
5201
5488
  name: string;
@@ -5206,6 +5493,12 @@ declare const CascadeConfigSchema: z.ZodObject<{
5206
5493
  env?: Record<string, string> | undefined;
5207
5494
  oauthStore?: string | undefined;
5208
5495
  }[] | undefined;
5496
+ remoteBrowser?: {
5497
+ maxSessions: number;
5498
+ url?: string | undefined;
5499
+ provider?: "cdp" | "steel" | undefined;
5500
+ apiKey?: string | undefined;
5501
+ } | undefined;
5209
5502
  mcpTrusted?: string[] | undefined;
5210
5503
  webSearch?: {
5211
5504
  maxResults: number;
@@ -5384,6 +5677,13 @@ declare const CascadeConfigSchema: z.ZodObject<{
5384
5677
  shellBlocklist?: string[] | undefined;
5385
5678
  requireApprovalFor?: string[] | undefined;
5386
5679
  browserEnabled?: boolean | undefined;
5680
+ agentBrowserControl?: boolean | undefined;
5681
+ remoteBrowser?: {
5682
+ url?: string | undefined;
5683
+ provider?: "cdp" | "steel" | undefined;
5684
+ apiKey?: string | undefined;
5685
+ maxSessions?: number | undefined;
5686
+ } | undefined;
5387
5687
  mcpTrusted?: string[] | undefined;
5388
5688
  webSearch?: {
5389
5689
  searxngUrl?: string | undefined;
@@ -5701,6 +6001,12 @@ interface SettingsPayload {
5701
6001
  braveApiKey?: string;
5702
6002
  tavilyApiKey?: string;
5703
6003
  };
6004
+ remoteBrowser?: {
6005
+ provider?: string;
6006
+ url?: string;
6007
+ apiKey?: string;
6008
+ maxSessions?: number;
6009
+ };
5704
6010
  advanced?: Record<string, unknown>;
5705
6011
  }
5706
6012
  /**
@@ -5764,6 +6070,12 @@ interface SettingsSnapshot {
5764
6070
  hasBraveKey: boolean;
5765
6071
  hasTavilyKey: boolean;
5766
6072
  };
6073
+ remoteBrowser: {
6074
+ provider?: string;
6075
+ url?: string;
6076
+ hasApiKey: boolean;
6077
+ maxSessions?: number;
6078
+ };
5767
6079
  advanced: Record<string, unknown>;
5768
6080
  }
5769
6081
  declare function settingsSnapshot(config: CascadeConfig): SettingsSnapshot;
@@ -6012,6 +6324,14 @@ declare class DashboardServer {
6012
6324
  * always failing.
6013
6325
  */
6014
6326
  private currentPageProvider?;
6327
+ /**
6328
+ * Supplied by the desktop shell so a run can ACT on that page — click, type,
6329
+ * submit — not just read it. Same reasoning as the provider above: absent in
6330
+ * the CLI, so the tool is not registered rather than present and failing.
6331
+ * Cascade applies the `tools.agentBrowserControl` gate on top of this.
6332
+ */
6333
+ private browserController?;
6334
+ private browserActorRelease?;
6015
6335
  private activeControllers;
6016
6336
  /**
6017
6337
  * Run taskIds per chat session — file snapshots are keyed by the run's
@@ -6051,6 +6371,45 @@ declare class DashboardServer {
6051
6371
  constructor(config: CascadeConfig, store: MemoryStore, workspacePath?: string);
6052
6372
  /** Wire the host's browser view in (desktop only). */
6053
6373
  setCurrentPageProvider(provider: CurrentPageProvider): void;
6374
+ /** Let runs act on that view, not just read it (desktop only). */
6375
+ setBrowserController(controller: BrowserController, release?: BrowserActorRelease): void;
6376
+ /**
6377
+ * Told whenever settings are committed through THIS server.
6378
+ *
6379
+ * Settings reach the live config by two routes — the desktop's Electron IPC
6380
+ * handler and this server's `config:update` socket — and both run the same
6381
+ * `commitSettings`. The desktop mirrors `tools.agentBrowserControl` into its
6382
+ * browser module after its own route, but had no way to learn about the
6383
+ * other, so a socket write left the module's copy stale: an enable the module
6384
+ * still refused, or worse a disable the module still honoured for a run
6385
+ * already holding the tool. This is the same sibling-writer drift
6386
+ * `settings-payload.ts` exists to prevent, one layer up.
6387
+ */
6388
+ private settingsChangeHook?;
6389
+ onSettingsChanged(hook: (config: CascadeConfig) => void): void;
6390
+ /**
6391
+ * Told when a run ends, so a host holding run-scoped state can release it.
6392
+ *
6393
+ * The desktop uses this to retire a run's browser Stop control: that has to
6394
+ * outlive each individual action (the gap between two actions is when the
6395
+ * user most wants it) but must not outlive the run.
6396
+ */
6397
+ /**
6398
+ * Fired when a run ends, carrying BOTH identifiers explicitly.
6399
+ *
6400
+ * They are different things and conflating them was a live bug: a chat
6401
+ * `sessionId` can contain many runs (hence `sessionTaskIds`), while
6402
+ * `Cascade.run()` mints a fresh random `taskId` per run — and it is the
6403
+ * taskId that tools see as `ToolExecuteOptions.sessionId`. Passing only the
6404
+ * chat id meant browser cleanup keyed on the task id matched nothing, so a
6405
+ * finished run kept its Stop banner armed and held its browser lease until
6406
+ * the deadlock ceiling.
6407
+ */
6408
+ private runEndedHook?;
6409
+ onRunEnded(hook: (ids: {
6410
+ sessionId: string;
6411
+ taskId?: string;
6412
+ }) => void): void;
6054
6413
  start(): Promise<void>;
6055
6414
  stop(): Promise<void>;
6056
6415
  getSocket(): DashboardSocket;
@@ -6455,6 +6814,384 @@ declare function mcpServerPrefix(serverName: string): string;
6455
6814
  */
6456
6815
  declare function removeMcpServerDenials(disabledTools: string[] | undefined, serverName: string): string[] | undefined;
6457
6816
 
6817
+ /** A live browser session somebody else is hosting. */
6818
+ interface RemoteBrowserSession {
6819
+ /** The provider's id for this session, needed to end it. */
6820
+ id: string;
6821
+ /**
6822
+ * CDP endpoint to drive, for Playwright's `connectOverCDP`.
6823
+ *
6824
+ * Carries the provider's credentials in most cases (a token in the query
6825
+ * string), so it is as sensitive as the API key and must never be logged.
6826
+ */
6827
+ cdpUrl: string;
6828
+ /**
6829
+ * A page showing the live session, embeddable in an iframe.
6830
+ *
6831
+ * A CAPABILITY URL: providers issue it deliberately without a token so it can
6832
+ * be handed to a viewer, which means anyone holding it can watch and — where
6833
+ * the provider supports input passthrough — drive the browser. It must never
6834
+ * be persisted in run history, written to a log, or sent to any client other
6835
+ * than the one that owns the run.
6836
+ */
6837
+ liveViewUrl?: string;
6838
+ }
6839
+ /**
6840
+ * Somewhere to get a browser from.
6841
+ *
6842
+ * Deliberately tiny. Everything a session DOES goes over CDP and is identical
6843
+ * whoever hosts it; only obtaining and releasing one differs, so those are the
6844
+ * only two things a provider has to implement. That keeps a new adapter to a
6845
+ * few dozen lines and keeps provider-specific behaviour from leaking into the
6846
+ * driver.
6847
+ */
6848
+ interface RemoteBrowserProvider {
6849
+ /** A short name for messages the model and the user see. */
6850
+ readonly name: string;
6851
+ /**
6852
+ * Whether `createSession` yields a browser of its own.
6853
+ *
6854
+ * False for a bare CDP endpoint, and the consequence is not cosmetic: that
6855
+ * endpoint IS one browser, so two "sessions" against it are the same browser
6856
+ * and, taking `contexts()[0].pages()[0]`, the same PAGE. Two runs would then
6857
+ * type into each other's forms — across users on a shared deployment.
6858
+ *
6859
+ * A provider that cannot isolate is therefore capped at one concurrent run
6860
+ * whatever the configured limit says. Raising a limit must not silently buy
6861
+ * concurrency the provider cannot actually deliver.
6862
+ */
6863
+ readonly isolatesSessions: boolean;
6864
+ createSession(signal?: AbortSignal): Promise<RemoteBrowserSession>;
6865
+ endSession(id: string): Promise<void>;
6866
+ }
6867
+ /** How the host was told to obtain browsers. */
6868
+ interface RemoteBrowserConfig {
6869
+ /** `cdp` for an endpoint you run; `steel` for a Steel deployment. */
6870
+ provider?: 'cdp' | 'steel';
6871
+ /**
6872
+ * For `cdp`, the websocket endpoint to connect to.
6873
+ * For `steel`, the API base — defaults to Steel's hosted API.
6874
+ */
6875
+ url?: string;
6876
+ apiKey?: string;
6877
+ /**
6878
+ * Concurrent sessions allowed. One by default, and deliberately so: every
6879
+ * session is billed, and a wave of workers each opening their own is a cost
6880
+ * the user did not choose. Raising it is a decision, not a default.
6881
+ */
6882
+ maxSessions?: number;
6883
+ }
6884
+
6885
+ /** What a run's watcher is told about its browser. */
6886
+ interface BrowserViewInfo {
6887
+ /** A browser is attached to this run. Stop is meaningful while true. */
6888
+ active: boolean;
6889
+ /** Where to watch it, when the provider can stream one. */
6890
+ liveViewUrl?: string;
6891
+ }
6892
+ interface RemoteBrowserControllerOptions {
6893
+ provider: RemoteBrowserProvider;
6894
+ /**
6895
+ * Concurrent browser sessions. One by default: every session is billed, and
6896
+ * a wave of workers each opening their own is a cost nobody chose.
6897
+ */
6898
+ maxSessions?: number;
6899
+ /** Told when a run's live view becomes available, so the owner can watch. */
6900
+ onLiveView?: (runId: string, liveViewUrl: string | undefined) => void;
6901
+ }
6902
+ declare class RemoteBrowserController {
6903
+ private provider;
6904
+ private maxSessions;
6905
+ /**
6906
+ * Live-view listeners, one per run.
6907
+ *
6908
+ * A single callback was fine while each run had its own controller. Now the
6909
+ * controller is shared across a deployment, so one callback would send run
6910
+ * A's live-view URL to whichever run registered last — and that URL is a
6911
+ * bearer capability for a browser somebody else is driving.
6912
+ */
6913
+ private liveViewListeners;
6914
+ /** An embedder that wants every run's live view, told which run each is. */
6915
+ private onLiveViewAll;
6916
+ private runs;
6917
+ /**
6918
+ * Runs that have a pool slot but no browser yet.
6919
+ *
6920
+ * Counted alongside `runs` against the cap. Without it the limit was a
6921
+ * check-then-act across four awaits, and simultaneous first uses both won.
6922
+ */
6923
+ private opening;
6924
+ /**
6925
+ * A run's stop signal, created when its slot is reserved.
6926
+ *
6927
+ * Before this, Stop looked only in `runs` — so during the first `open()`,
6928
+ * while the run existed only in `opening` and four awaits were in flight, it
6929
+ * found nothing and returned. The open then completed, built a FRESH
6930
+ * unaborted controller, and the click the user had stopped went ahead. The
6931
+ * signal has to exist before the browser does.
6932
+ */
6933
+ private aborts;
6934
+ /**
6935
+ * Runs whose provider session is being released right now.
6936
+ *
6937
+ * `stopRun`, `endRun`, `releaseIfIdle`, and the stale-page branch of `open`
6938
+ * all delete a run from `runs` synchronously and only THEN await
6939
+ * `disposeRun` settling — the browser disconnect, and `provider.endSession`,
6940
+ * which for Steel is a real HTTP `/release` call. Between that delete and
6941
+ * the call actually finishing, the admission check in `open()` — which
6942
+ * counts only `runs` and `opening` — saw the slot as free, so a second run
6943
+ * could pass admission and call `createSession` before the first run's
6944
+ * session was truly released. At `maxSessions: 1` that is two live, BILLED
6945
+ * provider sessions at once, exactly what the pool exists to prevent.
6946
+ * Counting this set alongside the other two closes the window.
6947
+ *
6948
+ * Keyed by run id, not a counter: every one of those four call sites checks
6949
+ * the run is still IN `runs` before deleting it and starting teardown, and
6950
+ * that delete is synchronous, so at most one teardown can ever be in flight
6951
+ * for a given run id at a time — a second caller finds the entry already
6952
+ * gone and never starts a competing one. The entry is removed only once its
6953
+ * own teardown settles, so a later, genuine re-open of the same run id
6954
+ * never collides with one still in flight.
6955
+ */
6956
+ private closing;
6957
+ /** Runs the user has stopped, by run id — same meaning as on the desktop. */
6958
+ private revoked;
6959
+ /**
6960
+ * One lease PER RUN, because there is one browser per run.
6961
+ *
6962
+ * The desktop has a single lease because it has a single browser. Here each
6963
+ * run gets its own session, so a global lease would make run B queue behind
6964
+ * run A for a browser it was never going to use — and with no queue timeout,
6965
+ * queue for as long as A lasts. What limits runs against each other is the
6966
+ * session POOL, not the lease.
6967
+ */
6968
+ private leases;
6969
+ constructor(options: RemoteBrowserControllerOptions);
6970
+ private leaseFor;
6971
+ /** The controller to hand to `Cascade.setBrowserController`. */
6972
+ get controller(): (action: BrowserAction, context: BrowserActionContext) => Promise<BrowserActionOutcome>;
6973
+ /** Watch one run's browser. The URL never goes to any other run's listener. */
6974
+ onLiveViewFor(runKey: string, listener: (info: BrowserViewInfo) => void): void;
6975
+ offLiveViewFor(runKey: string): void;
6976
+ /**
6977
+ * Tell a run's listener what its browser situation is.
6978
+ *
6979
+ * `active` is separate from the URL and both are needed: a provider with no
6980
+ * live view is attached-but-unwatchable, and a finished run is not attached
6981
+ * at all. Both have no URL, so a listener given only the URL cannot tell them
6982
+ * apart — and would drop the Stop control for the first as if it were the
6983
+ * second.
6984
+ */
6985
+ private announceLiveView;
6986
+ /**
6987
+ * Hand back a session the run turned out not to want.
6988
+ *
6989
+ * A browser opened for an action that is then refused would otherwise stay
6990
+ * allocated and billed until the whole run ended, for a run that has just
6991
+ * been stopped.
6992
+ */
6993
+ private releaseIfIdle;
6994
+ /** Release every run's session. For when the deployment's config changes. */
6995
+ dispose(): Promise<void>;
6996
+ /** A worker finished; it will never ask for the browser again. */
6997
+ actorEnded(actorId: string): void;
6998
+ /** The user stopped this run. Refuses further actions and clears its queue. */
6999
+ stopRun(runId: string): void;
7000
+ /** A run ended: release its browser rather than pay for an idle session. */
7001
+ endRun(runId: string): Promise<void>;
7002
+ /** Forget a finished run entirely, so nothing accumulates per run. */
7003
+ private forgetRun;
7004
+ /**
7005
+ * Let go of one run's browser.
7006
+ *
7007
+ * Best-effort throughout: a run is already over by the time this runs, and a
7008
+ * provider that is briefly unreachable must not turn that into a failure the
7009
+ * user sees. The provider's own idle timeout collects anything left.
7010
+ */
7011
+ private disposeRun;
7012
+ /**
7013
+ * Run `disposeRun`, with the run id counted in `closing` until it settles.
7014
+ *
7015
+ * The caller adds the id to `closing` itself, synchronously, in the same
7016
+ * breath as deleting the run from `runs` — see the field comment. This just
7017
+ * guarantees the removal happens, success or failure, so a disposal that
7018
+ * throws cannot leave the slot counted against the pool forever.
7019
+ */
7020
+ private teardown;
7021
+ private act;
7022
+ /**
7023
+ * The run's browser, opened on first use.
7024
+ *
7025
+ * The ONE place the session cap is enforced. An earlier version also checked
7026
+ * it before taking the lease, on the reasoning that a run which cannot get a
7027
+ * session would otherwise queue forever — true when every run shared one
7028
+ * lease, and false once each run got its own, because a second run no longer
7029
+ * queues behind the first at all. Its own revert-check proved it dead: taking
7030
+ * it out changed no test. Two copies of a cap invite them to disagree.
7031
+ */
7032
+ private open;
7033
+ /** The part that may fail, with the pool slot already reserved. */
7034
+ private openReserved;
7035
+ private perform;
7036
+ }
7037
+
7038
+ declare class GenericCdpProvider implements RemoteBrowserProvider {
7039
+ readonly name = "CDP endpoint";
7040
+ readonly isolatesSessions = false;
7041
+ private endpoint;
7042
+ constructor(endpoint: string);
7043
+ /**
7044
+ * There is no session to create — the endpoint is the session.
7045
+ *
7046
+ * `id` is a constant rather than a generated one because there is nothing to
7047
+ * look up later: `endSession` has nothing to call. Inventing a unique id
7048
+ * would imply a lifecycle this provider does not have.
7049
+ */
7050
+ createSession(): Promise<RemoteBrowserSession>;
7051
+ /**
7052
+ * Deliberately nothing.
7053
+ *
7054
+ * The endpoint belongs to whoever runs it and outlives any single run, so
7055
+ * "ending" it is not ours to do — closing it would take the browser away from
7056
+ * every other user of a shared endpoint. The driver still closes its own
7057
+ * connection and its pages; this is only about the browser's lifetime.
7058
+ */
7059
+ endSession(): Promise<void>;
7060
+ }
7061
+ /**
7062
+ * Whether a URL is a plausible CDP endpoint.
7063
+ *
7064
+ * Checked so a misconfiguration is a clear message at startup rather than an
7065
+ * obscure Playwright failure on the first action, and so an `http://` URL
7066
+ * pasted from a provider's docs is named as the mistake it is.
7067
+ */
7068
+ declare function isCdpEndpoint(url: string): boolean;
7069
+
7070
+ declare class SteelProvider implements RemoteBrowserProvider {
7071
+ readonly name = "Steel";
7072
+ readonly isolatesSessions = true;
7073
+ private base;
7074
+ private apiKey;
7075
+ constructor(opts?: {
7076
+ url?: string;
7077
+ apiKey?: string;
7078
+ });
7079
+ createSession(signal?: AbortSignal): Promise<RemoteBrowserSession>;
7080
+ endSession(id: string): Promise<void>;
7081
+ private call;
7082
+ }
7083
+
7084
+ /**
7085
+ * Why an actor did not get the browser.
7086
+ *
7087
+ * A boolean was not enough: "the queue is full, try again" and "your run was
7088
+ * stopped" are different things to tell a model, and a waiter dropped because
7089
+ * the capability was switched off is neither. Reporting all three as "busy"
7090
+ * had a model politely retrying something that would never be granted.
7091
+ */
7092
+ type LeaseResult = 'granted' | 'busy' | 'cancelled' | 'off';
7093
+ interface BrowserLeaseOptions {
7094
+ /**
7095
+ * Whether a run has been stopped. The lease skips revoked runs when handing
7096
+ * on, so a stopped run is not dealt the browser only to refuse it a line
7097
+ * later while the actor behind it waits out the whole queue.
7098
+ */
7099
+ isRevoked?: (sessionId: string) => boolean;
7100
+ /** Called whenever ownership or queue depth changes, so a UI can follow. */
7101
+ onChange?: () => void;
7102
+ }
7103
+ declare class BrowserLease {
7104
+ private actor;
7105
+ private session;
7106
+ private ceilingTimer;
7107
+ private waiting;
7108
+ private lifecycleWired;
7109
+ /**
7110
+ * The action holding the browser, if any.
7111
+ *
7112
+ * Needed alongside the lease for a reason the lease cannot cover: the lease
7113
+ * is RE-ENTRANT for its holder — that is what makes a sequence a sequence —
7114
+ * so nothing in it stops ONE actor running two actions at once. A retry
7115
+ * racing the call it retried is exactly that shape.
7116
+ *
7117
+ * A symbol because it identifies the individual call: only the action that
7118
+ * took the slot may release it.
7119
+ */
7120
+ private action;
7121
+ private isRevoked;
7122
+ private onChange;
7123
+ constructor(options?: BrowserLeaseOptions);
7124
+ get holderActor(): string | null;
7125
+ get holderSession(): string | null;
7126
+ get queueDepth(): number;
7127
+ get actionInFlight(): boolean;
7128
+ /**
7129
+ * Declare that this host reports worker terminal states.
7130
+ *
7131
+ * When it does, timers stop being ownership boundaries entirely. When it does
7132
+ * not — an embedder that wired a controller but not the release — the
7133
+ * fallbacks stay, because something has to break a deadlock.
7134
+ */
7135
+ setLifecycleReleaseWired(on: boolean): void;
7136
+ /**
7137
+ * Take the browser for this actor, waiting in line if someone else holds it.
7138
+ *
7139
+ * Re-entrant for the actor that already holds it: that is the sequence case —
7140
+ * the same worker coming back for its next step must not queue behind itself.
7141
+ */
7142
+ acquire(actorId: string, sessionId: string, signal?: AbortSignal): Promise<LeaseResult>;
7143
+ /**
7144
+ * One worker has finished its whole sequence, so its hold ends.
7145
+ *
7146
+ * THIS is the semantic release. It comes from the worker's own terminal path,
7147
+ * so it means "this actor will never ask again" — which a timer can never
7148
+ * mean about a worker that is merely thinking.
7149
+ *
7150
+ * Idempotent, and safe for an actor that never touched the browser.
7151
+ */
7152
+ actorEnded(actorId: string): void;
7153
+ /**
7154
+ * Give the browser up when about to return without using it.
7155
+ *
7156
+ * Two guards, both load-bearing. Never while an action is in flight, because
7157
+ * the lease is RE-ENTRANT: the action still running may be this same actor's
7158
+ * previous step, and taking the lease off it hands the page to a queued
7159
+ * worker mid-sequence. And only while still the holder, because by the time a
7160
+ * refusal path runs a Stop may already have handed the lease on.
7161
+ */
7162
+ releaseIfHeldBy(actorId: string): void;
7163
+ /** Drop every queued waiter belonging to a run, and the lease if it holds it. */
7164
+ dropRun(sessionId: string): void;
7165
+ /** Turn everyone away — the capability itself has gone. */
7166
+ dropAll(): void;
7167
+ /** Hand the browser to the next actor in line, if any. */
7168
+ release(): void;
7169
+ /** Arm the deadlock ceiling. Not a release schedule — see the constant. */
7170
+ armCeiling(): void;
7171
+ clearCeiling(): void;
7172
+ /** Take the per-action slot, or null when one is already running. */
7173
+ beginAction(): symbol | null;
7174
+ /** Release the slot, but only for the action that took it. */
7175
+ endAction(token: symbol): boolean;
7176
+ /**
7177
+ * Wait, briefly, for an outgoing action to unwind.
7178
+ *
7179
+ * A release can hand the browser on while the previous holder's abort is
7180
+ * still propagating through an awaited navigation. That is a handoff, not a
7181
+ * conflict, so it is waited out rather than refused — but bounded, because a
7182
+ * wedged action must not pin the queue.
7183
+ */
7184
+ awaitActionSlot(): Promise<boolean>;
7185
+ /**
7186
+ * Queue one actor, resolving when it gets the browser or is turned away.
7187
+ *
7188
+ * `settle` is wrapped so it runs at most once and always takes the waiter out
7189
+ * of the line: the timeout, an abort and a handoff all race, and settling
7190
+ * twice would silently leave a dead entry holding a queue slot.
7191
+ */
7192
+ private enqueue;
7193
+ }
7194
+
6458
7195
  /** A unit of indexed text. `sourceId` groups chunks from one document/file. */
6459
7196
  interface Chunk {
6460
7197
  id: string;
@@ -7579,4 +8316,4 @@ declare function gatherSyncBundle(config: CascadeConfig): SyncBundle;
7579
8316
  /** Merge a pulled bundle into a config, returning the updated config to persist. */
7580
8317
  declare function applySyncBundle(bundle: SyncBundle, config: CascadeConfig, cleanup?: RetiredProviderCleanup): CascadeConfig;
7581
8318
 
7582
- 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, 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 };
8319
+ 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, BrowserLease, 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, GenericCdpProvider, 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 RemoteBrowserConfig, RemoteBrowserController, type RemoteBrowserProvider, type RemoteBrowserSession, 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, SteelProvider, 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, isCdpEndpoint, 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 };