@mycadet/plugin-api 0.12.6-dev.202610091338.ee7f3e3 → 0.12.7-dev.202610111049.d2b52a8
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/app.d.ts +1 -4
- package/index.d.ts +88 -29
- package/package.json +1 -1
package/app.d.ts
CHANGED
|
@@ -71,10 +71,7 @@ export interface CadetBridge {
|
|
|
71
71
|
* assistant's session/auth is attached — use this instead of the bare
|
|
72
72
|
* global `fetch`, which fails from the sandboxed origin.
|
|
73
73
|
*/
|
|
74
|
-
fetch(
|
|
75
|
-
path: string,
|
|
76
|
-
options?: CadetFetchInit,
|
|
77
|
-
): Promise<CadetFetchResponse>;
|
|
74
|
+
fetch(path: string, options?: CadetFetchInit): Promise<CadetFetchResponse>;
|
|
78
75
|
}
|
|
79
76
|
|
|
80
77
|
declare global {
|
package/index.d.ts
CHANGED
|
@@ -2036,12 +2036,70 @@ declare const AssistantConfigSchema: z.ZodObject<{
|
|
|
2036
2036
|
}, z.core.$strip>>>>;
|
|
2037
2037
|
activeProfile: z.ZodOptional<z.ZodString>;
|
|
2038
2038
|
advisorProfile: z.ZodOptional<z.ZodString>;
|
|
2039
|
-
|
|
2040
|
-
provider: z.
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2039
|
+
default: z.ZodOptional<z.ZodObject<{
|
|
2040
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
2041
|
+
model: z.ZodOptional<z.ZodString>;
|
|
2042
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
2043
|
+
effort: z.ZodOptional<z.ZodEnum<{
|
|
2044
|
+
none: "none";
|
|
2045
|
+
low: "low";
|
|
2046
|
+
medium: "medium";
|
|
2047
|
+
high: "high";
|
|
2048
|
+
xhigh: "xhigh";
|
|
2049
|
+
max: "max";
|
|
2050
|
+
}>>;
|
|
2051
|
+
speed: z.ZodOptional<z.ZodEnum<{
|
|
2052
|
+
standard: "standard";
|
|
2053
|
+
fast: "fast";
|
|
2054
|
+
}>>;
|
|
2055
|
+
verbosity: z.ZodOptional<z.ZodEnum<{
|
|
2056
|
+
low: "low";
|
|
2057
|
+
medium: "medium";
|
|
2058
|
+
high: "high";
|
|
2059
|
+
}>>;
|
|
2060
|
+
temperature: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2061
|
+
topP: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2062
|
+
thinking: z.ZodOptional<z.ZodObject<{
|
|
2063
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
2064
|
+
streamThinking: z.ZodOptional<z.ZodBoolean>;
|
|
2065
|
+
level: z.ZodOptional<z.ZodEnum<{
|
|
2066
|
+
low: "low";
|
|
2067
|
+
medium: "medium";
|
|
2068
|
+
high: "high";
|
|
2069
|
+
minimal: "minimal";
|
|
2070
|
+
}>>;
|
|
2071
|
+
}, z.core.$strip>>;
|
|
2072
|
+
contextWindow: z.ZodOptional<z.ZodObject<{
|
|
2073
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
2074
|
+
maxInputTokens: z.ZodOptional<z.ZodNumber>;
|
|
2075
|
+
targetBudgetRatio: z.ZodOptional<z.ZodNumber>;
|
|
2076
|
+
compactThreshold: z.ZodOptional<z.ZodNumber>;
|
|
2077
|
+
summaryBudgetRatio: z.ZodOptional<z.ZodNumber>;
|
|
2078
|
+
overflowRecovery: z.ZodOptional<z.ZodObject<{
|
|
2079
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
2080
|
+
safetyMarginRatio: z.ZodOptional<z.ZodNumber>;
|
|
2081
|
+
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
2082
|
+
interactiveLatestTurnCompression: z.ZodOptional<z.ZodEnum<{
|
|
2083
|
+
truncate: "truncate";
|
|
2084
|
+
summarize: "summarize";
|
|
2085
|
+
drop: "drop";
|
|
2086
|
+
}>>;
|
|
2087
|
+
nonInteractiveLatestTurnCompression: z.ZodOptional<z.ZodEnum<{
|
|
2088
|
+
truncate: "truncate";
|
|
2089
|
+
summarize: "summarize";
|
|
2090
|
+
drop: "drop";
|
|
2091
|
+
}>>;
|
|
2092
|
+
}, z.core.$strip>>;
|
|
2093
|
+
}, z.core.$strip>>;
|
|
2094
|
+
openrouter: z.ZodOptional<z.ZodObject<{
|
|
2095
|
+
only: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2096
|
+
}, z.core.$strip>>;
|
|
2097
|
+
logitBias: z.ZodOptional<z.ZodEnum<{
|
|
2098
|
+
"suppress-cjk": "suppress-cjk";
|
|
2099
|
+
}>>;
|
|
2100
|
+
disableCache: z.ZodOptional<z.ZodBoolean>;
|
|
2101
|
+
provider_connection: z.ZodOptional<z.ZodString>;
|
|
2102
|
+
}, z.core.$strip>>;
|
|
2045
2103
|
profileSession: z.ZodDefault<z.ZodObject<{
|
|
2046
2104
|
defaultTtlSeconds: z.ZodDefault<z.ZodNumber>;
|
|
2047
2105
|
maxTtlSeconds: z.ZodDefault<z.ZodNumber>;
|
|
@@ -2205,6 +2263,7 @@ declare const AssistantConfigSchema: z.ZodObject<{
|
|
|
2205
2263
|
accountSid: z.ZodDefault<z.ZodString>;
|
|
2206
2264
|
phoneNumber: z.ZodDefault<z.ZodString>;
|
|
2207
2265
|
setupStarted: z.ZodDefault<z.ZodBoolean>;
|
|
2266
|
+
assistantPhoneNumbers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2208
2267
|
}, z.core.$strip>>;
|
|
2209
2268
|
calls: z.ZodDefault<z.ZodObject<{
|
|
2210
2269
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -2359,7 +2418,7 @@ declare const AssistantConfigSchema: z.ZodObject<{
|
|
|
2359
2418
|
shutdownDrainMs: number;
|
|
2360
2419
|
enabled?: boolean | undefined;
|
|
2361
2420
|
}>>;
|
|
2362
|
-
|
|
2421
|
+
cloud: z.ZodDefault<z.ZodObject<{
|
|
2363
2422
|
baseUrl: z.ZodDefault<z.ZodString>;
|
|
2364
2423
|
subdomain: z.ZodDefault<z.ZodString>;
|
|
2365
2424
|
}, z.core.$strip>>;
|
|
@@ -12141,7 +12200,7 @@ export declare function getMessages(conversationId: string): Promise<MessageRow[
|
|
|
12141
12200
|
/**
|
|
12142
12201
|
* List the workspace inference profiles a plugin can route to, in the order a
|
|
12143
12202
|
* user-facing model picker presents them (`llm.profileOrder` first, then the
|
|
12144
|
-
* rest alphabetically). Managed backup routes and the
|
|
12203
|
+
* rest alphabetically). Managed backup routes and the cloud Jev profile
|
|
12145
12204
|
* are omitted with the rest of the conversation view: a plugin routes
|
|
12146
12205
|
* conversation turns, and a decision model cannot answer them.
|
|
12147
12206
|
* Metadata-only entries without a provider, model, or mix are not routing
|
|
@@ -19112,7 +19171,7 @@ generated: undefined;
|
|
|
19112
19171
|
}, {}, {
|
|
19113
19172
|
length: number | undefined;
|
|
19114
19173
|
}>;
|
|
19115
|
-
|
|
19174
|
+
cloudServiceConfigKey: SQLiteColumn< {
|
|
19116
19175
|
name: "managed_service_config_key";
|
|
19117
19176
|
tableName: "oauth_providers";
|
|
19118
19177
|
dataType: "string";
|
|
@@ -20471,7 +20530,7 @@ generated: undefined;
|
|
|
20471
20530
|
dialect: "sqlite";
|
|
20472
20531
|
}>;
|
|
20473
20532
|
|
|
20474
|
-
declare type ProviderCredentialSource = "byok" | "no-auth" | "oauth-subscription" | "cadet-
|
|
20533
|
+
declare type ProviderCredentialSource = "byok" | "no-auth" | "oauth-subscription" | "cadet-cloud";
|
|
20475
20534
|
|
|
20476
20535
|
export declare type ProviderEvent = {
|
|
20477
20536
|
type: "text_delta";
|
|
@@ -20555,9 +20614,9 @@ export declare interface ProviderResponse {
|
|
|
20555
20614
|
declare interface ProviderRouteAttribution {
|
|
20556
20615
|
connectionName?: string;
|
|
20557
20616
|
profileName?: string;
|
|
20558
|
-
|
|
20617
|
+
isCloudRoute?: boolean;
|
|
20559
20618
|
/**
|
|
20560
|
-
* Credential surface used for this request. Finer than `
|
|
20619
|
+
* Credential surface used for this request. Finer than `isCloudRoute`:
|
|
20561
20620
|
* it separates personal provider keys, keyless endpoints, and subscription
|
|
20562
20621
|
* logins from each other so error copy can name what the user must fix.
|
|
20563
20622
|
*/
|
|
@@ -20842,13 +20901,13 @@ declare type ResolutionFallbackReason = "missing" | "disabled" | "incomplete" |
|
|
|
20842
20901
|
* user-facing chat-model selection
|
|
20843
20902
|
* 3. `llm.callSites[callSite].profile` (the call site's named profile)
|
|
20844
20903
|
* 4. `CALL_SITE_DEFAULTS[callSite].profile` intent resolved through
|
|
20845
|
-
* `llm.
|
|
20846
|
-
* 5. balanced intent through `llm.
|
|
20904
|
+
* `llm.default`
|
|
20905
|
+
* 5. balanced intent through `llm.default`: the code-owned anchor
|
|
20847
20906
|
* for profileless call sites, or when nothing above is usable
|
|
20848
20907
|
*
|
|
20849
20908
|
* A winner must carry its own `provider` AND `model`: the base layer's schema
|
|
20850
20909
|
* default identity never stands in for a selected profile. The anchor is
|
|
20851
|
-
* code-owned and resolved through `llm.
|
|
20910
|
+
* code-owned and resolved through `llm.default`, never through
|
|
20852
20911
|
* user-mutable state.
|
|
20853
20912
|
*
|
|
20854
20913
|
* `temperature`/`top_p` come only from the winner (or an explicit call-site
|
|
@@ -20860,7 +20919,7 @@ declare type ResolutionFallbackReason = "missing" | "disabled" | "incomplete" |
|
|
|
20860
20919
|
*
|
|
20861
20920
|
* Profile names are resolved against the effective profile catalog
|
|
20862
20921
|
* (code-defined defaults + workspace `llm.profiles`), with default profile
|
|
20863
|
-
* keys resolved through `llm.
|
|
20922
|
+
* keys resolved through `llm.default`'s column of the intent ×
|
|
20864
20923
|
* provider matrix (see `resolveDefaultProfileForProvider`).
|
|
20865
20924
|
* A "mix" profile is expanded to one of its arms by a seeded weighted pick (see
|
|
20866
20925
|
* `resolveProfileFragment` and `opts.selectionSeed`), uniformly wherever a name
|
|
@@ -21012,7 +21071,7 @@ export declare function resolveMediaSourceData(source: MediaSource_2): {
|
|
|
21012
21071
|
* across attempts, which is what an exact-match `redirect_uri` check needs.
|
|
21013
21072
|
*
|
|
21014
21073
|
* @throws when no public ingress is configured and the assistant is not
|
|
21015
|
-
* connected to the
|
|
21074
|
+
* connected to the cloud. There is no URL that would work in that
|
|
21016
21075
|
* case, and returning a plausible one produces an authorization request
|
|
21017
21076
|
* whose callback silently never arrives.
|
|
21018
21077
|
*/
|
|
@@ -21033,12 +21092,12 @@ export declare function resolveUserName(workspaceDir: string): string | null;
|
|
|
21033
21092
|
/**
|
|
21034
21093
|
* Resolve the public URL a third party should deliver to for `path`.
|
|
21035
21094
|
*
|
|
21036
|
-
* On the
|
|
21095
|
+
* On the cloud branches this registers a callback route with the cloud,
|
|
21037
21096
|
* which is idempotent and matches what `assistant webhooks register` does.
|
|
21038
21097
|
*
|
|
21039
21098
|
* @throws when the plugin cannot be determined, when `path` is not one the
|
|
21040
21099
|
* gateway would serve, or when no ingress is configured and the assistant is
|
|
21041
|
-
* not connected to the
|
|
21100
|
+
* not connected to the cloud. That last case has no URL that would work,
|
|
21042
21101
|
* and a plausible one would produce a vendor registration that silently
|
|
21043
21102
|
* receives nothing.
|
|
21044
21103
|
*/
|
|
@@ -22545,7 +22604,7 @@ export declare interface SendMessageConfig {
|
|
|
22545
22604
|
* True when the caller appended {@link NATIVE_WEB_SEARCH_TOOL_NAME} purely
|
|
22546
22605
|
* to activate the route's provider-native web search, rather than passing an
|
|
22547
22606
|
* app-executed search tool of the same name (which is what runs when a
|
|
22548
|
-
* search backend like Brave or the
|
|
22607
|
+
* search backend like Brave or the cloud search proxy is configured).
|
|
22549
22608
|
* Only the caller can tell those apart, and a route change after that
|
|
22550
22609
|
* decision has to: `RetryProvider` drops the tool on a backup that runs no
|
|
22551
22610
|
* native search, and must not touch it when the daemon executes it itself.
|
|
@@ -22584,9 +22643,9 @@ export declare interface SendMessageConfig {
|
|
|
22584
22643
|
*/
|
|
22585
22644
|
promptCacheKey?: string;
|
|
22586
22645
|
/**
|
|
22587
|
-
* Internal per-request HTTP headers for
|
|
22646
|
+
* Internal per-request HTTP headers for cloud-proxy usage attribution.
|
|
22588
22647
|
* Provider clients may pass these through SDK request options only when the
|
|
22589
|
-
* transport is Cadet
|
|
22648
|
+
* transport is Cadet Cloud, and must never include this object in provider
|
|
22590
22649
|
* JSON request bodies.
|
|
22591
22650
|
*/
|
|
22592
22651
|
usageAttributionHeaders?: Record<string, string>;
|
|
@@ -23490,8 +23549,8 @@ export declare type SttProviderId = "openai-whisper" | "deepgram"
|
|
|
23490
23549
|
*/
|
|
23491
23550
|
| "deepgram-flux" | "google-gemini" | "xai" | "cadet"
|
|
23492
23551
|
/**
|
|
23493
|
-
*
|
|
23494
|
-
* through the
|
|
23552
|
+
* Cloud Flux: the same conversational model as `deepgram-flux`, reached
|
|
23553
|
+
* through the cloud's speech relay instead of a Deepgram key. Dials the
|
|
23495
23554
|
* relay's STT v2 endpoint asking for native Flux frames, so it keeps the
|
|
23496
23555
|
* turn events the relay's default v1-shaped translation drops.
|
|
23497
23556
|
*/
|
|
@@ -24196,10 +24255,10 @@ export declare interface ToolContext {
|
|
|
24196
24255
|
*/
|
|
24197
24256
|
toolUseId?: string;
|
|
24198
24257
|
/**
|
|
24199
|
-
* True when the assistant is running as a
|
|
24258
|
+
* True when the assistant is running as a cloud-managed remote instance. Used to auto-approve sandboxed bash tools.
|
|
24200
24259
|
* @legacy
|
|
24201
24260
|
*/
|
|
24202
|
-
|
|
24261
|
+
isCloudHosted?: boolean;
|
|
24203
24262
|
/**
|
|
24204
24263
|
* The interface ID of the connected client driving the current turn (e.g.
|
|
24205
24264
|
* "macos", "chrome-extension"). Browser backend policy uses this to decide
|
|
@@ -25706,10 +25765,10 @@ dialect: "sqlite";
|
|
|
25706
25765
|
*
|
|
25707
25766
|
* A plugin that receives third-party webhooks has to tell the vendor where to
|
|
25708
25767
|
* deliver. Which URL is correct depends on how the assistant is reachable:
|
|
25709
|
-
* a
|
|
25768
|
+
* a cloud pod and a cloud-connected assistant are served through a
|
|
25710
25769
|
* managed callback route, while a self-hosted deployment is served through its
|
|
25711
25770
|
* configured public ingress. `ingress.publicBaseUrl` alone does not decide it,
|
|
25712
|
-
* because on a
|
|
25771
|
+
* because on a cloud-connected assistant that value holds the Tunnel
|
|
25713
25772
|
* address, which is not where plugin routes are served.
|
|
25714
25773
|
*
|
|
25715
25774
|
* `resolveCallbackUrl` owns that decision for every caller in the codebase
|
|
@@ -25729,7 +25788,7 @@ export declare interface WebhookUrlOptions {
|
|
|
25729
25788
|
* explicitly from a plugin route handler, where no context is established.
|
|
25730
25789
|
*/
|
|
25731
25790
|
plugin?: string;
|
|
25732
|
-
/** Human-readable label for the
|
|
25791
|
+
/** Human-readable label for the cloud's admin display. */
|
|
25733
25792
|
sourceIdentifier?: string;
|
|
25734
25793
|
}
|
|
25735
25794
|
|
package/package.json
CHANGED