cascade-ai 0.67.0 → 0.68.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.cts CHANGED
@@ -5,6 +5,98 @@ import { OAuthClientInformationMixed, OAuthTokens, OAuthClientMetadata, OAuthCli
5
5
  export { OAuthClientInformationMixed, OAuthTokens } from '@modelcontextprotocol/sdk/shared/auth.js';
6
6
  import Database from 'better-sqlite3';
7
7
 
8
+ /**
9
+ * Durable resume checkpoints.
10
+ *
11
+ * Before this, a stopped run was recoverable only through an in-memory field on
12
+ * the Cascade instance, set on exactly one path (the budget cap). So the two
13
+ * interruptions people actually hit — a crash, and Ctrl-C — lost every finished
14
+ * section, and even a budget stop was lost the moment the process exited. The
15
+ * work was on disk; the knowledge of what had been done was not.
16
+ *
17
+ * A checkpoint records the finished nodes of a run so a resume can restore them
18
+ * instead of paying to produce them a second time. Design constraints, in the
19
+ * order that shaped the code:
20
+ *
21
+ * - **A crash is one of the triggers.** Writes are atomic (temp file + rename),
22
+ * because the process dying mid-write is a case this store must survive, not
23
+ * an edge case. A half-written checkpoint that parses as valid JSON would be
24
+ * worse than none at all.
25
+ * - **A corrupt or foreign checkpoint must never break the caller.** Listing
26
+ * skips anything unreadable, unparseable, or written by a schema version this
27
+ * build doesn't know. Resume is a convenience; it may degrade, never throw.
28
+ * - **Checkpoints hold the user's prompt and partial output.** They are pruned
29
+ * by both count and age so that content does not accumulate in the workspace
30
+ * indefinitely.
31
+ */
32
+ /** Bump when the on-disk shape changes incompatibly. Older files are ignored. */
33
+ declare const RESUME_SCHEMA_VERSION = 1;
34
+ type ResumeReason = 'budget' | 'cancelled' | 'error' | 'breaker';
35
+ /** A node whose work is done and must not be re-run on resume. */
36
+ interface CompletedNode {
37
+ /** Stable id from the compiled task graph. */
38
+ id: string;
39
+ title: string;
40
+ status: 'COMPLETED' | 'PARTIAL';
41
+ output: string;
42
+ }
43
+ interface ResumeCheckpoint {
44
+ version: number;
45
+ taskId: string;
46
+ prompt: string;
47
+ /** ISO-8601. */
48
+ createdAt: string;
49
+ reason: ResumeReason;
50
+ /** Why the run stopped, in the words the user would see. */
51
+ detail?: string;
52
+ partialOutput: string;
53
+ completed: CompletedNode[];
54
+ }
55
+ interface ResumeStoreOptions {
56
+ /** Directory checkpoints live in (created on demand). */
57
+ dir: string;
58
+ /** Keep at most this many, newest first. Default 5. */
59
+ maxCheckpoints?: number;
60
+ /** Discard checkpoints older than this. Default 7 days. */
61
+ maxAgeMs?: number;
62
+ /** Injectable clock, for tests. */
63
+ now?: () => number;
64
+ }
65
+ declare class ResumeStore {
66
+ private readonly dir;
67
+ private readonly maxCheckpoints;
68
+ private readonly maxAgeMs;
69
+ private readonly now;
70
+ constructor(options: ResumeStoreOptions);
71
+ /**
72
+ * Persist a checkpoint and prune. Never throws: failing to save a resume file
73
+ * must not turn a recoverable stop into a crash, which would be a strictly
74
+ * worse outcome than the one this store exists to improve.
75
+ */
76
+ save(checkpoint: Omit<ResumeCheckpoint, 'version' | 'createdAt'> & {
77
+ createdAt?: string;
78
+ }): Promise<void>;
79
+ /** Valid, unexpired checkpoints, newest first. */
80
+ list(): Promise<ResumeCheckpoint[]>;
81
+ /** The most recent resumable run, or null. */
82
+ latest(): Promise<ResumeCheckpoint | null>;
83
+ /**
84
+ * Load a checkpoint and delete it in the same step. Resuming twice from one
85
+ * checkpoint would re-run restored work, so consumption is part of reading.
86
+ */
87
+ consume(taskId?: string): Promise<ResumeCheckpoint | null>;
88
+ /** Remove every checkpoint for a task id. */
89
+ delete(taskId: string): Promise<void>;
90
+ /** Drop expired checkpoints, then any beyond the newest `maxCheckpoints`. */
91
+ prune(): Promise<void>;
92
+ }
93
+ /**
94
+ * Render restored work for a correction planner: enough for the model to know
95
+ * what exists and not redo it, without pasting entire artifacts back into the
96
+ * prompt (which is what the token budget was being spent on in the first place).
97
+ */
98
+ declare function summarizeCompleted(completed: readonly CompletedNode[], perNodeChars?: number): string;
99
+
8
100
  type ProviderType = 'anthropic' | 'openai' | 'gemini' | 'azure' | 'openai-compatible' | 'ollama' | 'github-models';
9
101
  interface ModelInfo {
10
102
  id: string;
@@ -2344,7 +2436,20 @@ declare class T1Administrator extends BaseTier {
2344
2436
  private validatePlan;
2345
2437
  private dispatchT2Managers;
2346
2438
  /**
2347
- * Runs T2 managers respecting dependsOn declarations using Kahn's algorithm.
2439
+ * Runs T2 managers respecting dependsOn declarations.
2440
+ *
2441
+ * Graph construction, validation and cycle repair now live in
2442
+ * compileSectionGraph (orchestration/adapters.ts), and wave execution in
2443
+ * DependencyScheduler — the same pair T2 uses for its subtasks, so a plan is
2444
+ * ordered by one implementation rather than two that drifted.
2445
+ *
2446
+ * The hand-rolled Kahn pass this replaces treated every node it could not
2447
+ * reach as part of a cycle. That set also contains everything DOWNSTREAM of a
2448
+ * cycle, whose in-degree can never fall to zero while its dependency is stuck,
2449
+ * so breaking a cycle here also cut the dependencies of innocent later
2450
+ * sections and started them immediately — before the sections they consume.
2451
+ * compileTaskGraph uses strongly connected components, so only real cycle
2452
+ * members are touched.
2348
2453
  */
2349
2454
  private runT2sWithDependencies;
2350
2455
  private compileFinalOutput;
@@ -2419,8 +2524,16 @@ declare class Cascade extends EventEmitter {
2419
2524
  /** Orchestration decisions for the CURRENT run — cleared on each run(). */
2420
2525
  private decisionLog;
2421
2526
  private initialized;
2422
- /** Last task that stopped at the budget cap — powers /continue (resumeRun). */
2527
+ /**
2528
+ * Last interrupted task — powers /continue (resumeRun). Kept in memory as a
2529
+ * fast path for the same-process case; the durable copy lives in `resumeStore`
2530
+ * so a crash or an exit no longer throws away everything already finished.
2531
+ */
2423
2532
  private lastInterruptedRun?;
2533
+ /** Durable resume checkpoints. See core/orchestration/resume-store.ts. */
2534
+ private resumeStore?;
2535
+ /** Section results of the CURRENT run, so an interruption can checkpoint them. */
2536
+ private currentRunCompleted;
2424
2537
  private initPromise?;
2425
2538
  private store?;
2426
2539
  private audit?;
@@ -2583,8 +2696,24 @@ declare class Cascade extends EventEmitter {
2583
2696
  * see core/router/feedback-prior.ts.
2584
2697
  */
2585
2698
  setFeedbackSource(source: FeedbackSource): void;
2586
- /** True when a task stopped at the budget cap and can be resumed via /continue. */
2699
+ /**
2700
+ * Write a durable checkpoint for an interrupted run.
2701
+ *
2702
+ * Best-effort throughout: a run is already ending badly on every path that
2703
+ * calls this, and failing to record a resume file must not make that ending
2704
+ * worse. Nothing here is allowed to throw.
2705
+ */
2706
+ private checkpointRun;
2707
+ /** True when a task can be resumed via /continue (this process or a previous one). */
2587
2708
  hasResumableRun(): boolean;
2709
+ /**
2710
+ * True when a checkpoint from ANY process is resumable. Async because the
2711
+ * durable check touches disk; `hasResumableRun` remains the sync in-memory
2712
+ * answer for callers already on a hot path.
2713
+ */
2714
+ hasDurableResume(): Promise<boolean>;
2715
+ /** Interrupted runs available to resume, newest first. */
2716
+ listResumableRuns(): Promise<ResumeCheckpoint[]>;
2588
2717
  /**
2589
2718
  * Raise the per-run token budget for a resume and return the continuation
2590
2719
  * prompt (or null when nothing is resumable). Consumes the interrupted-run
@@ -2594,6 +2723,26 @@ declare class Cascade extends EventEmitter {
2594
2723
  prepareResume(opts?: {
2595
2724
  maxTokens?: number;
2596
2725
  }): string | null;
2726
+ /**
2727
+ * Durable counterpart to prepareResume: recovers a run interrupted in ANY
2728
+ * process, including one that crashed before it could return. Consumes the
2729
+ * checkpoint, so the same finished work is never restored into two runs.
2730
+ */
2731
+ prepareDurableResume(opts?: {
2732
+ maxTokens?: number;
2733
+ taskId?: string;
2734
+ }): Promise<string | null>;
2735
+ /** A resume gets a bigger budget — the previous attempt exhausted the old one. */
2736
+ private raiseBudgetForResume;
2737
+ /**
2738
+ * The resume prompt. Completed sections are named explicitly rather than
2739
+ * gestured at: "do not recreate the files" is an instruction a planner can
2740
+ * only guess at, whereas a list of what is already done, and what it produced,
2741
+ * is something it can act on. That difference is the entire reason node
2742
+ * results are kept — a re-plan that cannot see the finished work will plan the
2743
+ * finished work again, and the user pays for it a second time.
2744
+ */
2745
+ private buildResumePrompt;
2597
2746
  /**
2598
2747
  * Resume the last budget-capped task with a raised budget (SDK/headless).
2599
2748
  * Returns null when there is nothing to resume.
@@ -2899,14 +3048,6 @@ declare class T2Manager extends BaseTier {
2899
3048
  * then reduce in-degrees of their dependents and repeat.
2900
3049
  */
2901
3050
  private runWithDependencies;
2902
- /**
2903
- * Detects cyclic dependencies using Kahn's algorithm and breaks them
2904
- * by removing back-edges. Returns a sanitized copy of assignments.
2905
- *
2906
- * A cycle like t1→t2→t3→t1 is broken at the last edge (t3→t1),
2907
- * meaning t3 will start without waiting for t1, preventing deadlock.
2908
- */
2909
- private breakCycles;
2910
3051
  private retryT3;
2911
3052
  private publishSectionOutput;
2912
3053
  private aggregateResults;
@@ -2997,6 +3138,11 @@ declare class T3Worker extends BaseTier {
2997
3138
  * needed. Best-effort: any parse/error just keeps the current output.
2998
3139
  */
2999
3140
  private reflectAndImprove;
3141
+ /**
3142
+ * Run the acceptance criteria that can be settled by looking at the workspace.
3143
+ * Reads go through the same workspace-relative resolution verifyArtifacts uses.
3144
+ */
3145
+ private checkAcceptance;
3000
3146
  private selfTest;
3001
3147
  /**
3002
3148
  * world-state v2: distill a completed subtask's output into durable
@@ -3018,6 +3164,143 @@ declare class T3Worker extends BaseTier {
3018
3164
  private isFileOperation;
3019
3165
  }
3020
3166
 
3167
+ type TaskGraphNodeKind = 'section' | 'subtask';
3168
+ type TaskGraphValidationMode = 'strict' | 'repair';
3169
+ interface TaskGraphInputNode<TPayload> {
3170
+ id: string;
3171
+ title: string;
3172
+ kind: TaskGraphNodeKind;
3173
+ dependsOn?: readonly string[];
3174
+ payload: TPayload;
3175
+ }
3176
+ interface TaskGraphNode<TPayload> {
3177
+ id: string;
3178
+ title: string;
3179
+ kind: TaskGraphNodeKind;
3180
+ dependsOn: readonly string[];
3181
+ payload: TPayload;
3182
+ /** Stable source order used to keep execution deterministic. */
3183
+ ordinal: number;
3184
+ }
3185
+ interface TaskGraph<TPayload> {
3186
+ nodes: readonly TaskGraphNode<TPayload>[];
3187
+ }
3188
+ type TaskGraphIssueCode = 'INVALID_NODE' | 'DUPLICATE_NODE_ID' | 'SELF_DEPENDENCY' | 'UNKNOWN_DEPENDENCY' | 'CYCLE_EDGE_REMOVED';
3189
+ interface TaskGraphIssue {
3190
+ code: TaskGraphIssueCode;
3191
+ message: string;
3192
+ nodeId?: string;
3193
+ dependencyId?: string;
3194
+ }
3195
+ interface CompiledTaskGraph<TPayload> {
3196
+ graph: TaskGraph<TPayload>;
3197
+ issues: readonly TaskGraphIssue[];
3198
+ }
3199
+ interface CompileTaskGraphOptions {
3200
+ /**
3201
+ * strict: reject malformed LLM plans.
3202
+ * repair: preserve today's graceful-degradation behaviour by dropping only
3203
+ * invalid dependency edges and duplicate/invalid nodes.
3204
+ */
3205
+ mode?: TaskGraphValidationMode;
3206
+ }
3207
+ declare class TaskGraphValidationError extends Error {
3208
+ readonly issues: readonly TaskGraphIssue[];
3209
+ constructor(issues: readonly TaskGraphIssue[]);
3210
+ }
3211
+ /**
3212
+ * Compile untrusted planner output into a deterministic, schedulable graph.
3213
+ * The compiler is the trust boundary between LLM-authored JSON and execution.
3214
+ */
3215
+ declare function compileTaskGraph<TPayload>(inputNodes: readonly TaskGraphInputNode<TPayload>[], options?: CompileTaskGraphOptions): CompiledTaskGraph<TPayload>;
3216
+
3217
+ type SchedulerExecutionMode = 'parallel' | 'sequential';
3218
+ interface SchedulerHooks<TPayload, TResult> {
3219
+ execute(node: TaskGraphNode<TPayload>): Promise<TResult>;
3220
+ onWaveStart?(nodes: readonly TaskGraphNode<TPayload>[], wave: number): void | Promise<void>;
3221
+ onNodeComplete?(node: TaskGraphNode<TPayload>, result: TResult): void | Promise<void>;
3222
+ }
3223
+ interface SchedulerOptions {
3224
+ mode?: SchedulerExecutionMode;
3225
+ }
3226
+ interface SchedulerResult<TResult> {
3227
+ results: ReadonlyMap<string, TResult>;
3228
+ waves: readonly (readonly string[])[];
3229
+ }
3230
+ /**
3231
+ * Shared deterministic dependency scheduler for T1 sections and T2 subtasks.
3232
+ * Graph validation/repair belongs in compileTaskGraph; this class only executes
3233
+ * a valid DAG in stable source order.
3234
+ */
3235
+ declare class DependencyScheduler<TPayload, TResult> {
3236
+ private readonly graph;
3237
+ private readonly hooks;
3238
+ private readonly options;
3239
+ constructor(graph: TaskGraph<TPayload>, hooks: SchedulerHooks<TPayload, TResult>, options?: SchedulerOptions);
3240
+ run(): Promise<SchedulerResult<TResult>>;
3241
+ }
3242
+
3243
+ declare function compileSectionGraph(sections: readonly T1ToT2Assignment[]): CompiledTaskGraph<T1ToT2Assignment>;
3244
+ /**
3245
+ * The subtask fields the graph actually needs. Generic over the whole record so
3246
+ * both the planner's `T3SubtaskSpec` and T2's richer `T2ToT3Assignment` compile
3247
+ * without a cast — they carry the same identity and dependency fields, and the
3248
+ * payload comes back out at its original type.
3249
+ */
3250
+ interface SubtaskGraphInput {
3251
+ subtaskId: string;
3252
+ subtaskTitle: string;
3253
+ dependsOn?: string[];
3254
+ }
3255
+ declare function compileSubtaskGraph<TSubtask extends SubtaskGraphInput>(subtasks: readonly TSubtask[]): CompiledTaskGraph<TSubtask>;
3256
+
3257
+ /**
3258
+ * The deterministic rung of the verification ladder.
3259
+ *
3260
+ * T1 asks the planner for acceptance criteria that are "1-3 checks a reviewer
3261
+ * could verify mechanically (file exists / contains X / command exits 0)", and
3262
+ * the planner obliges — but nothing ever checked them mechanically. Every
3263
+ * criterion went to selfTest(), an LLM call, which is both slower and a worse
3264
+ * judge of "does this file exist" than `stat` is. A grader that hallucinates a
3265
+ * pass on a file that was never written is exactly the failure the criteria
3266
+ * were introduced to prevent.
3267
+ *
3268
+ * So: decide here what can be decided by looking, and hand the rest to the
3269
+ * model unchanged. The governing rule is that **deferring is always safe and
3270
+ * deciding wrongly is not**, so every pattern below is deliberately narrow.
3271
+ * A criterion this module cannot confidently parse comes back `undecidable`
3272
+ * and the LLM grader sees it exactly as it does today.
3273
+ *
3274
+ * Shell criteria ("command exits 0") are deliberately NOT executed. Acceptance
3275
+ * text is LLM-authored and reaches this code as free prose; running it would
3276
+ * turn a plan into an arbitrary command execution channel. Those stay
3277
+ * undecidable.
3278
+ */
3279
+ type AcceptanceVerdict = 'passed' | 'failed' | 'undecidable';
3280
+ interface AcceptanceResult {
3281
+ criterion: string;
3282
+ verdict: AcceptanceVerdict;
3283
+ /** Human-readable reason, present for passed/failed. */
3284
+ detail?: string;
3285
+ }
3286
+ interface AcceptanceProbe {
3287
+ /** null when the path does not exist or is not a regular file. */
3288
+ stat(path: string): Promise<{
3289
+ size: number;
3290
+ } | null>;
3291
+ /** utf-8 contents, or null when unreadable (missing, binary, too large). */
3292
+ read(path: string): Promise<string | null>;
3293
+ }
3294
+ /**
3295
+ * Evaluate acceptance criteria, deciding only the mechanically checkable ones.
3296
+ * Order and length of the result always match `criteria`.
3297
+ */
3298
+ declare function evaluateAcceptance(criteria: readonly string[], ownedFiles: readonly string[], probe: AcceptanceProbe): Promise<AcceptanceResult[]>;
3299
+ /** The criteria that still need a model's judgement. */
3300
+ declare function undecided(results: readonly AcceptanceResult[]): string[];
3301
+ /** Failure messages, phrased so correctOutput can act on them directly. */
3302
+ declare function failures(results: readonly AcceptanceResult[]): string[];
3303
+
3021
3304
  /**
3022
3305
  * High-level SDK entry point — loads config from the workspace and runs a task.
3023
3306
  *
@@ -4812,4 +5095,4 @@ declare function gatherSyncBundle(config: CascadeConfig): SyncBundle;
4812
5095
  /** Merge a pulled bundle into a config, returning the updated config to persist. */
4813
5096
  declare function applySyncBundle(bundle: SyncBundle, config: CascadeConfig): CascadeConfig;
4814
5097
 
4815
- export { AZURE_BASE_MODELS, AZURE_BASE_URL_TEMPLATE, type ApprovalRequest, type ApprovalResponse, type AuditEntry, AuditLogger, 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 CompleteFn, ConfigManager, type ConversationMessage, 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, 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, GITHUB_MODELS_API_VERSION, GITHUB_MODELS_CATALOG_URL, GITHUB_MODELS_INFERENCE_URL, 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, type RankedFact, type RefreshResult, type RenderOptions, type Reranker, type RetrievalContext, type RetrievalMode, type RetrievalPlan, Retriever, type RetrieverSearchOptions, type RuntimeNode, type RuntimeNodeLog, type RuntimeRefreshPayload, type RuntimeScope, type RuntimeSession, type RuntimeSnapshotPayload, type ScheduledTask, type ScoredChunk, type SearchOptions, type Session, type SessionCheckpoint, type SessionMetadata, type SessionSubscriptionPayload, 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, TaskScheduler, 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, applySyncBundle, azureModelForDeployment, beginMcpOAuth, buildDocumentTools, buildManifest, buildSessionTranscript, bytesToBase64, cagCharBudget, chartKind, chartToTableRows, chatCompleterFromProviders, chunkCode, chunkText, completeMcpOAuth, connectMcpWithLoopbackOAuth, createCascade, decryptJSON as decryptSyncBlob, diffManifest, disambiguateMcpServerNames, discoverMcpAuthServer, discoverMcpTools, distillSessionFacts, embedderFromProviders, encryptJSON as encryptSyncBlob, extractCharts, fileExt, fileOAuthProvider, gatherSyncBundle, hashContent, heuristicCodeChunker, inferAzureBaseModel, inlineRuns, isDocumentFormat, isMcpToolName, matchImageLine, mcpServerPrefix, mcpToolName, nodeHttpFetch, parseBlocks, parseChartSpec, parseDelimited, parseRankOrder, parseSlide, planRetrieval, preferIpv4Host, reciprocalRankFusion, refreshMcpToken, removeMcpServerDenials, renderDocument, renderDocx, renderPptx, renderXlsx, runCascade, sessionWorthRemembering, sniffImage, splitSlides, streamCascade, stripInline, uniqueMcpServerName };
5098
+ export { AZURE_BASE_MODELS, AZURE_BASE_URL_TEMPLATE, type AcceptanceProbe, type AcceptanceResult, type AcceptanceVerdict, type ApprovalRequest, type ApprovalResponse, type AuditEntry, AuditLogger, 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 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, GITHUB_MODELS_API_VERSION, GITHUB_MODELS_CATALOG_URL, GITHUB_MODELS_INFERENCE_URL, 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 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, 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, applySyncBundle, azureModelForDeployment, beginMcpOAuth, buildDocumentTools, buildManifest, buildSessionTranscript, bytesToBase64, cagCharBudget, chartKind, chartToTableRows, chatCompleterFromProviders, chunkCode, chunkText, compileSectionGraph, compileSubtaskGraph, compileTaskGraph, completeMcpOAuth, connectMcpWithLoopbackOAuth, createCascade, decryptJSON as decryptSyncBlob, diffManifest, disambiguateMcpServerNames, discoverMcpAuthServer, discoverMcpTools, distillSessionFacts, embedderFromProviders, encryptJSON as encryptSyncBlob, evaluateAcceptance, extractCharts, failures, fileExt, fileOAuthProvider, gatherSyncBundle, hashContent, heuristicCodeChunker, inferAzureBaseModel, inlineRuns, isDocumentFormat, isMcpToolName, matchImageLine, mcpServerPrefix, mcpToolName, nodeHttpFetch, parseBlocks, parseChartSpec, parseDelimited, parseRankOrder, parseSlide, planRetrieval, preferIpv4Host, reciprocalRankFusion, refreshMcpToken, removeMcpServerDenials, renderDocument, renderDocx, renderPptx, renderXlsx, runCascade, sessionWorthRemembering, sniffImage, splitSlides, streamCascade, stripInline, summarizeCompleted, undecided, uniqueMcpServerName };