cascade-ai 0.70.0 → 0.72.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
@@ -136,7 +136,7 @@ declare class ResumeStore {
136
136
  */
137
137
  declare function summarizeCompleted(completed: readonly CompletedNode[], perNodeChars?: number): string;
138
138
 
139
- type ProviderType = 'anthropic' | 'openai' | 'gemini' | 'azure' | 'openai-compatible' | 'ollama' | 'github-models';
139
+ type ProviderType = 'anthropic' | 'openai' | 'gemini' | 'azure' | 'openai-compatible' | 'ollama';
140
140
  interface ModelInfo {
141
141
  id: string;
142
142
  name: string;
@@ -1425,6 +1425,17 @@ declare class MemoryStore {
1425
1425
  }>;
1426
1426
  upsertCachedModel(model: ModelInfo): void;
1427
1427
  getCachedModels(provider?: ProviderType): ModelInfo[];
1428
+ /**
1429
+ * Deletes cached rows for a provider type that no longer exists in
1430
+ * `ProviderType`, so it takes a raw string rather than the union.
1431
+ *
1432
+ * Needed because the cache outlives the code: the REPL's loadCache() only
1433
+ * re-discovers when the cache is EMPTY or older than 24h, so rows left
1434
+ * behind by a removed provider read as "cache populated" and suppress
1435
+ * discovery for the providers that replaced it — `/model` then shows a
1436
+ * configured provider with zero models until the rows age out.
1437
+ */
1438
+ purgeCachedModelsForRetiredProvider(providerType: string): number;
1428
1439
  clearModelCache(provider?: ProviderType): void;
1429
1440
  getCacheAge(): number;
1430
1441
  saveModelProfile(modelId: string, provider: ProviderType, specializations: string[]): void;
@@ -2031,15 +2042,6 @@ declare class CascadeRouter extends EventEmitter {
2031
2042
  private discoverOllamaModels;
2032
2043
  /** Returns true when at least one real model was discovered from the endpoint. */
2033
2044
  private discoverOpenAICompatibleModels;
2034
- /**
2035
- * Registers GitHub Models' real catalog ids via addDynamicModel so init()'s
2036
- * tier-fill loop can pick one. Registration alone does not create a bound
2037
- * BaseProvider instance (see ensureProvider) — the tier-fill loop's own
2038
- * ensureProvider call does that for whichever model it actually selects,
2039
- * which is why this runs BEFORE that loop rather than only in the
2040
- * background discoverProviderModels() refresh.
2041
- */
2042
- private discoverGitHubModelsCatalog;
2043
2045
  private ensureProvider;
2044
2046
  private getProvider;
2045
2047
  private createProvider;
@@ -2177,6 +2179,16 @@ declare class ToolRegistry extends EventEmitter {
2177
2179
  private plugins;
2178
2180
  constructor(config: ToolsConfig, workspaceRoot?: string);
2179
2181
  register(tool: BaseTool): void;
2182
+ /**
2183
+ * The directory every registered tool resolves relative paths against.
2184
+ *
2185
+ * Exposed so a caller that has to reason about a file a tool WROTE can look
2186
+ * in the same place the tool wrote it. `process.cwd()` is not that place
2187
+ * outside a plain CLI run: the hosted server's cwd is the app directory
2188
+ * while the run's workspace is the tenant's scratch dir, and Electron's cwd
2189
+ * is the app bundle rather than the user's chosen folder.
2190
+ */
2191
+ getWorkspaceRoot(): string;
2180
2192
  /**
2181
2193
  * Wait until a named tool is registered, resolving immediately if it already exists.
2182
2194
  * T3 workers can call this after encountering a missing-tool error to resume
@@ -3292,6 +3304,20 @@ declare class T3Worker extends BaseTier {
3292
3304
  */
3293
3305
  private coordinateFileIntents;
3294
3306
  private requiresArtifact;
3307
+ /**
3308
+ * Where a file a tool wrote actually lives.
3309
+ *
3310
+ * This used to be `process.cwd()`, which is only the workspace in a plain
3311
+ * CLI run. The hosted server runs with cwd at the app directory while the
3312
+ * run's workspace is the tenant's scratch dir, and Electron's cwd is the app
3313
+ * bundle rather than the folder the user picked. So the tool wrote
3314
+ * `<workspace>/report.docx`, verification stat'd `<cwd>/report.docx`, found
3315
+ * nothing, and the worker looped and then threw WorkerStallError — surfacing
3316
+ * as "no file was created" on a file that had in fact been created, followed
3317
+ * by a failed node. Asking the registry is exact: it is the same root every
3318
+ * registered tool was configured with (registry.registerDefaults).
3319
+ */
3320
+ private artifactRoot;
3295
3321
  private extractArtifactPaths;
3296
3322
  private verifyArtifacts;
3297
3323
  /**
@@ -3634,6 +3660,11 @@ interface CascadeMdContent {
3634
3660
  systemPrompt: string;
3635
3661
  }
3636
3662
 
3663
+ declare function hasUsableProvider(providers: Array<{
3664
+ type: string;
3665
+ apiKey?: string;
3666
+ authToken?: string;
3667
+ }> | undefined): boolean;
3637
3668
  declare class ConfigManager {
3638
3669
  private config;
3639
3670
  private keystore;
@@ -3642,6 +3673,25 @@ declare class ConfigManager {
3642
3673
  private cascadeMd;
3643
3674
  private workspacePath;
3644
3675
  private globalDir;
3676
+ /**
3677
+ * What THIS load migrated out, if anything. Strictly per-load state: reset
3678
+ * at the top of every `load()`, because two places read it as a statement
3679
+ * about the load in progress — `injectEnvKeys()` asks whether an empty
3680
+ * provider list was emptied by a retirement, and the end of `load()` warns
3681
+ * and builds the user-facing notice from it. Left set, a second `load()` on
3682
+ * the same instance (`startRepl()` does one after its setup wizard) would
3683
+ * re-announce a migration that already happened and suppress the Ollama
3684
+ * fallback for a list that is empty for some unrelated reason.
3685
+ */
3686
+ private retiredCleanup?;
3687
+ /**
3688
+ * Human-readable migration notice held for a UI to display. `console.warn`
3689
+ * is not sufficient: the REPL clears the TTY immediately after load(), and
3690
+ * the desktop emits from the main process where nothing is rendered.
3691
+ */
3692
+ private pendingRetiredNotice?;
3693
+ /** Returns the pending migration notice once, then forgets it. */
3694
+ takeRetiredNotice(): string | undefined;
3645
3695
  /** `globalDirOverride` exists for tests — never point it at the real home dir there. */
3646
3696
  constructor(workspacePath?: string, globalDirOverride?: string);
3647
3697
  load(): Promise<void>;
@@ -5026,9 +5076,6 @@ declare const DEFAULT_THEME: ThemeName;
5026
5076
  declare const OLLAMA_BASE_URL = "http://localhost:11434";
5027
5077
  declare const LM_STUDIO_BASE_URL = "http://localhost:1234";
5028
5078
  declare const AZURE_BASE_URL_TEMPLATE = "https://{resource}.openai.azure.com";
5029
- declare const GITHUB_MODELS_INFERENCE_URL = "https://models.github.ai/inference";
5030
- declare const GITHUB_MODELS_CATALOG_URL = "https://models.github.ai/catalog/models";
5031
- declare const GITHUB_MODELS_API_VERSION = "2026-03-10";
5032
5079
  declare const TOOL_NAMES: {
5033
5080
  readonly SHELL: "shell";
5034
5081
  readonly FILE_READ: "file_read";
@@ -5264,6 +5311,13 @@ declare class CloudClient {
5264
5311
  logout(): Promise<void>;
5265
5312
  }
5266
5313
 
5314
+ interface RetiredProviderCleanup {
5315
+ /** Retired `providers[]` types that were dropped, in first-seen order. */
5316
+ removed: string[];
5317
+ /** Tier keys (`t1`/`t2`/`t3`) whose pin named a retired provider and was cleared. */
5318
+ clearedPins: string[];
5319
+ }
5320
+
5267
5321
  /**
5268
5322
  * Bundle format version.
5269
5323
  *
@@ -5312,6 +5366,6 @@ interface SyncBundle {
5312
5366
  /** Pluck the portable subset of a config into a bundle (undefined fields omitted). */
5313
5367
  declare function gatherSyncBundle(config: CascadeConfig): SyncBundle;
5314
5368
  /** Merge a pulled bundle into a config, returning the updated config to persist. */
5315
- declare function applySyncBundle(bundle: SyncBundle, config: CascadeConfig): CascadeConfig;
5369
+ declare function applySyncBundle(bundle: SyncBundle, config: CascadeConfig, cleanup?: RetiredProviderCleanup): CascadeConfig;
5316
5370
 
5317
- 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 };
5371
+ 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, 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, hasUsableProvider, 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 };
package/dist/index.d.ts CHANGED
@@ -136,7 +136,7 @@ declare class ResumeStore {
136
136
  */
137
137
  declare function summarizeCompleted(completed: readonly CompletedNode[], perNodeChars?: number): string;
138
138
 
139
- type ProviderType = 'anthropic' | 'openai' | 'gemini' | 'azure' | 'openai-compatible' | 'ollama' | 'github-models';
139
+ type ProviderType = 'anthropic' | 'openai' | 'gemini' | 'azure' | 'openai-compatible' | 'ollama';
140
140
  interface ModelInfo {
141
141
  id: string;
142
142
  name: string;
@@ -1425,6 +1425,17 @@ declare class MemoryStore {
1425
1425
  }>;
1426
1426
  upsertCachedModel(model: ModelInfo): void;
1427
1427
  getCachedModels(provider?: ProviderType): ModelInfo[];
1428
+ /**
1429
+ * Deletes cached rows for a provider type that no longer exists in
1430
+ * `ProviderType`, so it takes a raw string rather than the union.
1431
+ *
1432
+ * Needed because the cache outlives the code: the REPL's loadCache() only
1433
+ * re-discovers when the cache is EMPTY or older than 24h, so rows left
1434
+ * behind by a removed provider read as "cache populated" and suppress
1435
+ * discovery for the providers that replaced it — `/model` then shows a
1436
+ * configured provider with zero models until the rows age out.
1437
+ */
1438
+ purgeCachedModelsForRetiredProvider(providerType: string): number;
1428
1439
  clearModelCache(provider?: ProviderType): void;
1429
1440
  getCacheAge(): number;
1430
1441
  saveModelProfile(modelId: string, provider: ProviderType, specializations: string[]): void;
@@ -2031,15 +2042,6 @@ declare class CascadeRouter extends EventEmitter {
2031
2042
  private discoverOllamaModels;
2032
2043
  /** Returns true when at least one real model was discovered from the endpoint. */
2033
2044
  private discoverOpenAICompatibleModels;
2034
- /**
2035
- * Registers GitHub Models' real catalog ids via addDynamicModel so init()'s
2036
- * tier-fill loop can pick one. Registration alone does not create a bound
2037
- * BaseProvider instance (see ensureProvider) — the tier-fill loop's own
2038
- * ensureProvider call does that for whichever model it actually selects,
2039
- * which is why this runs BEFORE that loop rather than only in the
2040
- * background discoverProviderModels() refresh.
2041
- */
2042
- private discoverGitHubModelsCatalog;
2043
2045
  private ensureProvider;
2044
2046
  private getProvider;
2045
2047
  private createProvider;
@@ -2177,6 +2179,16 @@ declare class ToolRegistry extends EventEmitter {
2177
2179
  private plugins;
2178
2180
  constructor(config: ToolsConfig, workspaceRoot?: string);
2179
2181
  register(tool: BaseTool): void;
2182
+ /**
2183
+ * The directory every registered tool resolves relative paths against.
2184
+ *
2185
+ * Exposed so a caller that has to reason about a file a tool WROTE can look
2186
+ * in the same place the tool wrote it. `process.cwd()` is not that place
2187
+ * outside a plain CLI run: the hosted server's cwd is the app directory
2188
+ * while the run's workspace is the tenant's scratch dir, and Electron's cwd
2189
+ * is the app bundle rather than the user's chosen folder.
2190
+ */
2191
+ getWorkspaceRoot(): string;
2180
2192
  /**
2181
2193
  * Wait until a named tool is registered, resolving immediately if it already exists.
2182
2194
  * T3 workers can call this after encountering a missing-tool error to resume
@@ -3292,6 +3304,20 @@ declare class T3Worker extends BaseTier {
3292
3304
  */
3293
3305
  private coordinateFileIntents;
3294
3306
  private requiresArtifact;
3307
+ /**
3308
+ * Where a file a tool wrote actually lives.
3309
+ *
3310
+ * This used to be `process.cwd()`, which is only the workspace in a plain
3311
+ * CLI run. The hosted server runs with cwd at the app directory while the
3312
+ * run's workspace is the tenant's scratch dir, and Electron's cwd is the app
3313
+ * bundle rather than the folder the user picked. So the tool wrote
3314
+ * `<workspace>/report.docx`, verification stat'd `<cwd>/report.docx`, found
3315
+ * nothing, and the worker looped and then threw WorkerStallError — surfacing
3316
+ * as "no file was created" on a file that had in fact been created, followed
3317
+ * by a failed node. Asking the registry is exact: it is the same root every
3318
+ * registered tool was configured with (registry.registerDefaults).
3319
+ */
3320
+ private artifactRoot;
3295
3321
  private extractArtifactPaths;
3296
3322
  private verifyArtifacts;
3297
3323
  /**
@@ -3634,6 +3660,11 @@ interface CascadeMdContent {
3634
3660
  systemPrompt: string;
3635
3661
  }
3636
3662
 
3663
+ declare function hasUsableProvider(providers: Array<{
3664
+ type: string;
3665
+ apiKey?: string;
3666
+ authToken?: string;
3667
+ }> | undefined): boolean;
3637
3668
  declare class ConfigManager {
3638
3669
  private config;
3639
3670
  private keystore;
@@ -3642,6 +3673,25 @@ declare class ConfigManager {
3642
3673
  private cascadeMd;
3643
3674
  private workspacePath;
3644
3675
  private globalDir;
3676
+ /**
3677
+ * What THIS load migrated out, if anything. Strictly per-load state: reset
3678
+ * at the top of every `load()`, because two places read it as a statement
3679
+ * about the load in progress — `injectEnvKeys()` asks whether an empty
3680
+ * provider list was emptied by a retirement, and the end of `load()` warns
3681
+ * and builds the user-facing notice from it. Left set, a second `load()` on
3682
+ * the same instance (`startRepl()` does one after its setup wizard) would
3683
+ * re-announce a migration that already happened and suppress the Ollama
3684
+ * fallback for a list that is empty for some unrelated reason.
3685
+ */
3686
+ private retiredCleanup?;
3687
+ /**
3688
+ * Human-readable migration notice held for a UI to display. `console.warn`
3689
+ * is not sufficient: the REPL clears the TTY immediately after load(), and
3690
+ * the desktop emits from the main process where nothing is rendered.
3691
+ */
3692
+ private pendingRetiredNotice?;
3693
+ /** Returns the pending migration notice once, then forgets it. */
3694
+ takeRetiredNotice(): string | undefined;
3645
3695
  /** `globalDirOverride` exists for tests — never point it at the real home dir there. */
3646
3696
  constructor(workspacePath?: string, globalDirOverride?: string);
3647
3697
  load(): Promise<void>;
@@ -5026,9 +5076,6 @@ declare const DEFAULT_THEME: ThemeName;
5026
5076
  declare const OLLAMA_BASE_URL = "http://localhost:11434";
5027
5077
  declare const LM_STUDIO_BASE_URL = "http://localhost:1234";
5028
5078
  declare const AZURE_BASE_URL_TEMPLATE = "https://{resource}.openai.azure.com";
5029
- declare const GITHUB_MODELS_INFERENCE_URL = "https://models.github.ai/inference";
5030
- declare const GITHUB_MODELS_CATALOG_URL = "https://models.github.ai/catalog/models";
5031
- declare const GITHUB_MODELS_API_VERSION = "2026-03-10";
5032
5079
  declare const TOOL_NAMES: {
5033
5080
  readonly SHELL: "shell";
5034
5081
  readonly FILE_READ: "file_read";
@@ -5264,6 +5311,13 @@ declare class CloudClient {
5264
5311
  logout(): Promise<void>;
5265
5312
  }
5266
5313
 
5314
+ interface RetiredProviderCleanup {
5315
+ /** Retired `providers[]` types that were dropped, in first-seen order. */
5316
+ removed: string[];
5317
+ /** Tier keys (`t1`/`t2`/`t3`) whose pin named a retired provider and was cleared. */
5318
+ clearedPins: string[];
5319
+ }
5320
+
5267
5321
  /**
5268
5322
  * Bundle format version.
5269
5323
  *
@@ -5312,6 +5366,6 @@ interface SyncBundle {
5312
5366
  /** Pluck the portable subset of a config into a bundle (undefined fields omitted). */
5313
5367
  declare function gatherSyncBundle(config: CascadeConfig): SyncBundle;
5314
5368
  /** Merge a pulled bundle into a config, returning the updated config to persist. */
5315
- declare function applySyncBundle(bundle: SyncBundle, config: CascadeConfig): CascadeConfig;
5369
+ declare function applySyncBundle(bundle: SyncBundle, config: CascadeConfig, cleanup?: RetiredProviderCleanup): CascadeConfig;
5316
5370
 
5317
- 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 };
5371
+ 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, 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, hasUsableProvider, 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 };