cascade-ai 0.50.0 → 0.51.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/cli.cjs +788 -130
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +788 -130
- package/dist/cli.js.map +1 -1
- package/dist/desktop-core.cjs +995 -344
- package/dist/index.cjs +774 -121
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +61 -0
- package/dist/index.d.ts +61 -0
- package/dist/index.js +774 -121
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -196,6 +196,12 @@ interface ToolExecuteOptions {
|
|
|
196
196
|
tierId: string;
|
|
197
197
|
sessionId: string;
|
|
198
198
|
requireApproval: boolean;
|
|
199
|
+
/**
|
|
200
|
+
* Cancels a long-running tool call. Media generation can take a minute or
|
|
201
|
+
* more, so a cancelled run must be able to stop one mid-flight rather than
|
|
202
|
+
* paying it out and discarding the result.
|
|
203
|
+
*/
|
|
204
|
+
signal?: AbortSignal;
|
|
199
205
|
saveSnapshot?: (filePath: string, content: string) => Promise<void>;
|
|
200
206
|
sendPeerSync?: (to: string, syncType: PeerSyncType, content: string | Record<string, unknown>) => void;
|
|
201
207
|
getPeerMessages?: () => Array<{
|
|
@@ -647,6 +653,11 @@ interface BudgetConfig {
|
|
|
647
653
|
maxTokensPerRun?: number;
|
|
648
654
|
/** Optional hard per-task cost ceiling (USD). */
|
|
649
655
|
maxCostPerRunUsd?: number;
|
|
656
|
+
/**
|
|
657
|
+
* Consecutive systemic failures against one model before the run stops
|
|
658
|
+
* launching work certain to fail the same way. Default 3.
|
|
659
|
+
*/
|
|
660
|
+
failureThreshold?: number;
|
|
650
661
|
warnAtPct: number;
|
|
651
662
|
}
|
|
652
663
|
interface WorkspaceConfig {
|
|
@@ -977,6 +988,20 @@ declare class ModelPerformanceTracker {
|
|
|
977
988
|
costEfficiencyScore(model: ModelInfo, complexity: 1 | 2 | 3 | 4 | 5): number;
|
|
978
989
|
}
|
|
979
990
|
|
|
991
|
+
interface FeedbackCounts {
|
|
992
|
+
good: number;
|
|
993
|
+
bad: number;
|
|
994
|
+
}
|
|
995
|
+
/**
|
|
996
|
+
* Lookup of per-model feedback, keyed by model id.
|
|
997
|
+
*
|
|
998
|
+
* Deliberately just counts: no conversation text, no prompts, no timestamps.
|
|
999
|
+
* A routing prior needs to know that a model earned N good and M bad verdicts
|
|
1000
|
+
* and nothing else, and storing more would put chat content in a second place
|
|
1001
|
+
* with different retention rules for no gain.
|
|
1002
|
+
*/
|
|
1003
|
+
type FeedbackSource = (modelId: string) => FeedbackCounts | undefined;
|
|
1004
|
+
|
|
980
1005
|
type TaskType = 'code' | 'analysis' | 'creative' | 'data' | 'mixed';
|
|
981
1006
|
/** Cascade Auto cost/quality trade-off bias. See CascadeConfig.autoBias. */
|
|
982
1007
|
type AutoBias = 'balanced' | 'quality' | 'cost';
|
|
@@ -992,10 +1017,18 @@ interface TaskProfile {
|
|
|
992
1017
|
}
|
|
993
1018
|
declare class TaskAnalyzer {
|
|
994
1019
|
private tracker?;
|
|
1020
|
+
/** Per-model thumbs counts, when the host collects them. */
|
|
1021
|
+
private feedback?;
|
|
995
1022
|
private bias;
|
|
996
1023
|
private lastProfile;
|
|
997
1024
|
private lastSelectedModels;
|
|
998
1025
|
constructor(tracker?: ModelPerformanceTracker, bias?: AutoBias);
|
|
1026
|
+
/**
|
|
1027
|
+
* Supply per-model rating counts. Optional by design: a host that collects no
|
|
1028
|
+
* feedback (the CLI, a fresh install) scores exactly as it did before, since
|
|
1029
|
+
* feedbackAdjustment returns 0 for an empty record.
|
|
1030
|
+
*/
|
|
1031
|
+
setFeedbackSource(source: FeedbackSource): void;
|
|
999
1032
|
setTracker(tracker: ModelPerformanceTracker): void;
|
|
1000
1033
|
/** Change the cost/quality bias at runtime (e.g. when config reloads). */
|
|
1001
1034
|
setBias(bias: AutoBias): void;
|
|
@@ -1463,6 +1496,7 @@ declare class CascadeRouter extends EventEmitter {
|
|
|
1463
1496
|
private tpmLimiter;
|
|
1464
1497
|
private localQueue;
|
|
1465
1498
|
private taskAnalyzer?;
|
|
1499
|
+
private pendingFeedbackSource?;
|
|
1466
1500
|
private worldStateDB?;
|
|
1467
1501
|
private privacyPaths?;
|
|
1468
1502
|
private guidanceQueue?;
|
|
@@ -1578,6 +1612,12 @@ declare class CascadeRouter extends EventEmitter {
|
|
|
1578
1612
|
*/
|
|
1579
1613
|
getReferenceContextWindow(): number | undefined;
|
|
1580
1614
|
/** Wire the Cascade Auto task analyzer used for per-subtask model routing. */
|
|
1615
|
+
/**
|
|
1616
|
+
* Feed per-model thumbs counts into Auto routing. Forwarded to the analyzer
|
|
1617
|
+
* because that is where the public benchmark score is combined; the prior
|
|
1618
|
+
* adjusts that number rather than sitting anywhere else in the pipeline.
|
|
1619
|
+
*/
|
|
1620
|
+
setFeedbackSource(source: FeedbackSource): void;
|
|
1581
1621
|
setTaskAnalyzer(analyzer: TaskAnalyzer): void;
|
|
1582
1622
|
setWorldStateDB(db: WorldStateDB | undefined): void;
|
|
1583
1623
|
getWorldStateDB(): WorldStateDB | undefined;
|
|
@@ -2151,6 +2191,7 @@ interface DecisionLogEntry {
|
|
|
2151
2191
|
declare class Cascade extends EventEmitter {
|
|
2152
2192
|
private router;
|
|
2153
2193
|
private toolRegistry;
|
|
2194
|
+
private multimodal;
|
|
2154
2195
|
private mcpClient;
|
|
2155
2196
|
private codeIndex?;
|
|
2156
2197
|
private config;
|
|
@@ -2236,6 +2277,26 @@ declare class Cascade extends EventEmitter {
|
|
|
2236
2277
|
* Idempotent init guard, so it works before the first run.
|
|
2237
2278
|
*/
|
|
2238
2279
|
previewPlan(prompt: string): Promise<TaskPlan>;
|
|
2280
|
+
/**
|
|
2281
|
+
* Register image / speech / transcription tools for the modalities this
|
|
2282
|
+
* config can actually serve.
|
|
2283
|
+
*
|
|
2284
|
+
* The sink writes bytes into the workspace, because that is what a desktop or
|
|
2285
|
+
* CLI run wants and it keeps a generated asset indistinguishable from any
|
|
2286
|
+
* other file the run produced. A host with different storage (the cloud
|
|
2287
|
+
* server stores a file row) constructs the tools itself via buildMediaTools
|
|
2288
|
+
* with its own sink.
|
|
2289
|
+
*/
|
|
2290
|
+
private registerMediaTools;
|
|
2291
|
+
/**
|
|
2292
|
+
* Supply per-model thumbs-up/down counts so Auto routing can weigh how models
|
|
2293
|
+
* have actually performed for this user, on top of public benchmarks.
|
|
2294
|
+
*
|
|
2295
|
+
* Optional everywhere: with no source, or an empty record, scoring is
|
|
2296
|
+
* byte-identical to before. The adjustment is capped and sample-size shrunk —
|
|
2297
|
+
* see core/router/feedback-prior.ts.
|
|
2298
|
+
*/
|
|
2299
|
+
setFeedbackSource(source: FeedbackSource): void;
|
|
2239
2300
|
/** True when a task stopped at the budget cap and can be resumed via /continue. */
|
|
2240
2301
|
hasResumableRun(): boolean;
|
|
2241
2302
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -196,6 +196,12 @@ interface ToolExecuteOptions {
|
|
|
196
196
|
tierId: string;
|
|
197
197
|
sessionId: string;
|
|
198
198
|
requireApproval: boolean;
|
|
199
|
+
/**
|
|
200
|
+
* Cancels a long-running tool call. Media generation can take a minute or
|
|
201
|
+
* more, so a cancelled run must be able to stop one mid-flight rather than
|
|
202
|
+
* paying it out and discarding the result.
|
|
203
|
+
*/
|
|
204
|
+
signal?: AbortSignal;
|
|
199
205
|
saveSnapshot?: (filePath: string, content: string) => Promise<void>;
|
|
200
206
|
sendPeerSync?: (to: string, syncType: PeerSyncType, content: string | Record<string, unknown>) => void;
|
|
201
207
|
getPeerMessages?: () => Array<{
|
|
@@ -647,6 +653,11 @@ interface BudgetConfig {
|
|
|
647
653
|
maxTokensPerRun?: number;
|
|
648
654
|
/** Optional hard per-task cost ceiling (USD). */
|
|
649
655
|
maxCostPerRunUsd?: number;
|
|
656
|
+
/**
|
|
657
|
+
* Consecutive systemic failures against one model before the run stops
|
|
658
|
+
* launching work certain to fail the same way. Default 3.
|
|
659
|
+
*/
|
|
660
|
+
failureThreshold?: number;
|
|
650
661
|
warnAtPct: number;
|
|
651
662
|
}
|
|
652
663
|
interface WorkspaceConfig {
|
|
@@ -977,6 +988,20 @@ declare class ModelPerformanceTracker {
|
|
|
977
988
|
costEfficiencyScore(model: ModelInfo, complexity: 1 | 2 | 3 | 4 | 5): number;
|
|
978
989
|
}
|
|
979
990
|
|
|
991
|
+
interface FeedbackCounts {
|
|
992
|
+
good: number;
|
|
993
|
+
bad: number;
|
|
994
|
+
}
|
|
995
|
+
/**
|
|
996
|
+
* Lookup of per-model feedback, keyed by model id.
|
|
997
|
+
*
|
|
998
|
+
* Deliberately just counts: no conversation text, no prompts, no timestamps.
|
|
999
|
+
* A routing prior needs to know that a model earned N good and M bad verdicts
|
|
1000
|
+
* and nothing else, and storing more would put chat content in a second place
|
|
1001
|
+
* with different retention rules for no gain.
|
|
1002
|
+
*/
|
|
1003
|
+
type FeedbackSource = (modelId: string) => FeedbackCounts | undefined;
|
|
1004
|
+
|
|
980
1005
|
type TaskType = 'code' | 'analysis' | 'creative' | 'data' | 'mixed';
|
|
981
1006
|
/** Cascade Auto cost/quality trade-off bias. See CascadeConfig.autoBias. */
|
|
982
1007
|
type AutoBias = 'balanced' | 'quality' | 'cost';
|
|
@@ -992,10 +1017,18 @@ interface TaskProfile {
|
|
|
992
1017
|
}
|
|
993
1018
|
declare class TaskAnalyzer {
|
|
994
1019
|
private tracker?;
|
|
1020
|
+
/** Per-model thumbs counts, when the host collects them. */
|
|
1021
|
+
private feedback?;
|
|
995
1022
|
private bias;
|
|
996
1023
|
private lastProfile;
|
|
997
1024
|
private lastSelectedModels;
|
|
998
1025
|
constructor(tracker?: ModelPerformanceTracker, bias?: AutoBias);
|
|
1026
|
+
/**
|
|
1027
|
+
* Supply per-model rating counts. Optional by design: a host that collects no
|
|
1028
|
+
* feedback (the CLI, a fresh install) scores exactly as it did before, since
|
|
1029
|
+
* feedbackAdjustment returns 0 for an empty record.
|
|
1030
|
+
*/
|
|
1031
|
+
setFeedbackSource(source: FeedbackSource): void;
|
|
999
1032
|
setTracker(tracker: ModelPerformanceTracker): void;
|
|
1000
1033
|
/** Change the cost/quality bias at runtime (e.g. when config reloads). */
|
|
1001
1034
|
setBias(bias: AutoBias): void;
|
|
@@ -1463,6 +1496,7 @@ declare class CascadeRouter extends EventEmitter {
|
|
|
1463
1496
|
private tpmLimiter;
|
|
1464
1497
|
private localQueue;
|
|
1465
1498
|
private taskAnalyzer?;
|
|
1499
|
+
private pendingFeedbackSource?;
|
|
1466
1500
|
private worldStateDB?;
|
|
1467
1501
|
private privacyPaths?;
|
|
1468
1502
|
private guidanceQueue?;
|
|
@@ -1578,6 +1612,12 @@ declare class CascadeRouter extends EventEmitter {
|
|
|
1578
1612
|
*/
|
|
1579
1613
|
getReferenceContextWindow(): number | undefined;
|
|
1580
1614
|
/** Wire the Cascade Auto task analyzer used for per-subtask model routing. */
|
|
1615
|
+
/**
|
|
1616
|
+
* Feed per-model thumbs counts into Auto routing. Forwarded to the analyzer
|
|
1617
|
+
* because that is where the public benchmark score is combined; the prior
|
|
1618
|
+
* adjusts that number rather than sitting anywhere else in the pipeline.
|
|
1619
|
+
*/
|
|
1620
|
+
setFeedbackSource(source: FeedbackSource): void;
|
|
1581
1621
|
setTaskAnalyzer(analyzer: TaskAnalyzer): void;
|
|
1582
1622
|
setWorldStateDB(db: WorldStateDB | undefined): void;
|
|
1583
1623
|
getWorldStateDB(): WorldStateDB | undefined;
|
|
@@ -2151,6 +2191,7 @@ interface DecisionLogEntry {
|
|
|
2151
2191
|
declare class Cascade extends EventEmitter {
|
|
2152
2192
|
private router;
|
|
2153
2193
|
private toolRegistry;
|
|
2194
|
+
private multimodal;
|
|
2154
2195
|
private mcpClient;
|
|
2155
2196
|
private codeIndex?;
|
|
2156
2197
|
private config;
|
|
@@ -2236,6 +2277,26 @@ declare class Cascade extends EventEmitter {
|
|
|
2236
2277
|
* Idempotent init guard, so it works before the first run.
|
|
2237
2278
|
*/
|
|
2238
2279
|
previewPlan(prompt: string): Promise<TaskPlan>;
|
|
2280
|
+
/**
|
|
2281
|
+
* Register image / speech / transcription tools for the modalities this
|
|
2282
|
+
* config can actually serve.
|
|
2283
|
+
*
|
|
2284
|
+
* The sink writes bytes into the workspace, because that is what a desktop or
|
|
2285
|
+
* CLI run wants and it keeps a generated asset indistinguishable from any
|
|
2286
|
+
* other file the run produced. A host with different storage (the cloud
|
|
2287
|
+
* server stores a file row) constructs the tools itself via buildMediaTools
|
|
2288
|
+
* with its own sink.
|
|
2289
|
+
*/
|
|
2290
|
+
private registerMediaTools;
|
|
2291
|
+
/**
|
|
2292
|
+
* Supply per-model thumbs-up/down counts so Auto routing can weigh how models
|
|
2293
|
+
* have actually performed for this user, on top of public benchmarks.
|
|
2294
|
+
*
|
|
2295
|
+
* Optional everywhere: with no source, or an empty record, scoring is
|
|
2296
|
+
* byte-identical to before. The adjustment is capped and sample-size shrunk —
|
|
2297
|
+
* see core/router/feedback-prior.ts.
|
|
2298
|
+
*/
|
|
2299
|
+
setFeedbackSource(source: FeedbackSource): void;
|
|
2239
2300
|
/** True when a task stopped at the budget cap and can be resumed via /continue. */
|
|
2240
2301
|
hasResumableRun(): boolean;
|
|
2241
2302
|
/**
|