@mycadet/plugin-api 0.12.7 → 0.12.8

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.
Files changed (2) hide show
  1. package/index.d.ts +47 -69
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -1344,15 +1344,15 @@ declare const AssistantConfigSchema: z.ZodObject<{
1344
1344
  }>>;
1345
1345
  providers: z.ZodDefault<z.ZodObject<{
1346
1346
  elevenlabs: z.ZodDefault<z.ZodObject<{
1347
- voiceId: z.ZodDefault<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
1347
+ voiceId: z.ZodPipe<z.ZodDefault<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>, z.ZodString>;
1348
1348
  voiceModelId: z.ZodDefault<z.ZodString>;
1349
1349
  speed: z.ZodDefault<z.ZodNumber>;
1350
1350
  stability: z.ZodDefault<z.ZodNumber>;
1351
1351
  similarityBoost: z.ZodDefault<z.ZodNumber>;
1352
1352
  conversationTimeoutSeconds: z.ZodDefault<z.ZodNumber>;
1353
- languageVoices: z.ZodOptional<z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodString>, z.ZodTransform<{
1353
+ languageVoices: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodString>, z.ZodTransform<{
1354
1354
  [k: string]: string;
1355
- }, Record<string, string>>>>;
1355
+ }, Record<string, string>>>, z.ZodRecord<z.ZodString, z.ZodString>>>;
1356
1356
  }, z.core.$strip>>;
1357
1357
  "fish-audio": z.ZodDefault<z.ZodObject<{
1358
1358
  referenceId: z.ZodDefault<z.ZodString>;
@@ -1369,19 +1369,19 @@ declare const AssistantConfigSchema: z.ZodObject<{
1369
1369
  speed: z.ZodDefault<z.ZodNumber>;
1370
1370
  }, z.core.$strip>>;
1371
1371
  deepgram: z.ZodDefault<z.ZodObject<{
1372
- model: z.ZodDefault<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
1372
+ model: z.ZodPipe<z.ZodDefault<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>, z.ZodString>;
1373
1373
  format: z.ZodDefault<z.ZodEnum<{
1374
1374
  opus: "opus";
1375
1375
  mp3: "mp3";
1376
1376
  wav: "wav";
1377
1377
  }>>;
1378
- languageVoices: z.ZodOptional<z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodString>, z.ZodTransform<{
1378
+ languageVoices: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodString>, z.ZodTransform<{
1379
1379
  [k: string]: string;
1380
- }, Record<string, string>>>>;
1380
+ }, Record<string, string>>>, z.ZodRecord<z.ZodString, z.ZodString>>>;
1381
1381
  }, z.core.$strip>>;
1382
1382
  xai: z.ZodDefault<z.ZodObject<{
1383
- voiceId: z.ZodDefault<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
1384
- language: z.ZodDefault<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
1383
+ voiceId: z.ZodPipe<z.ZodDefault<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>, z.ZodString>;
1384
+ language: z.ZodPipe<z.ZodDefault<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>, z.ZodString>;
1385
1385
  format: z.ZodDefault<z.ZodEnum<{
1386
1386
  mp3: "mp3";
1387
1387
  wav: "wav";
@@ -1391,9 +1391,9 @@ declare const AssistantConfigSchema: z.ZodObject<{
1391
1391
  }, z.core.$strip>>;
1392
1392
  cadet: z.ZodDefault<z.ZodObject<{
1393
1393
  model: z.ZodOptional<z.ZodString>;
1394
- languageVoices: z.ZodOptional<z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodString>, z.ZodTransform<{
1394
+ languageVoices: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodString>, z.ZodTransform<{
1395
1395
  [k: string]: string;
1396
- }, Record<string, string>>>>;
1396
+ }, Record<string, string>>>, z.ZodRecord<z.ZodString, z.ZodString>>>;
1397
1397
  }, z.core.$strip>>;
1398
1398
  }, z.core.$strip>>;
1399
1399
  }, z.core.$strip>>;
@@ -1586,7 +1586,7 @@ declare const AssistantConfigSchema: z.ZodObject<{
1586
1586
  targetTokens: z.ZodDefault<z.ZodNumber>;
1587
1587
  overlapTokens: z.ZodDefault<z.ZodNumber>;
1588
1588
  }, z.core.$strip>>;
1589
- jobs: z.ZodDefault<z.ZodPipe<z.ZodObject<{
1589
+ jobs: z.ZodDefault<z.ZodPipe<z.ZodPipe<z.ZodObject<{
1590
1590
  workerConcurrency: z.ZodOptional<z.ZodNumber>;
1591
1591
  stalledJobTimeoutMs: z.ZodDefault<z.ZodNumber>;
1592
1592
  slowLlmConcurrency: z.ZodOptional<z.ZodNumber>;
@@ -1604,7 +1604,13 @@ declare const AssistantConfigSchema: z.ZodObject<{
1604
1604
  slowLlmConcurrency?: number | undefined;
1605
1605
  fastConcurrency?: number | undefined;
1606
1606
  embedConcurrency?: number | undefined;
1607
- }>>>;
1607
+ }>>, z.ZodObject<{
1608
+ workerConcurrency: z.ZodNumber;
1609
+ stalledJobTimeoutMs: z.ZodNumber;
1610
+ slowLlmConcurrency: z.ZodNumber;
1611
+ fastConcurrency: z.ZodNumber;
1612
+ embedConcurrency: z.ZodNumber;
1613
+ }, z.core.$strip>>>;
1608
1614
  retention: z.ZodDefault<z.ZodObject<{
1609
1615
  keepRawForever: z.ZodDefault<z.ZodBoolean>;
1610
1616
  }, z.core.$strip>>;
@@ -1921,6 +1927,8 @@ declare const AssistantConfigSchema: z.ZodObject<{
1921
1927
  weight: z.ZodNumber;
1922
1928
  }, z.core.$strip>>>;
1923
1929
  fallbackProfile: z.ZodOptional<z.ZodString>;
1930
+ supportsVision: z.ZodOptional<z.ZodBoolean>;
1931
+ invariant: z.ZodOptional<z.ZodBoolean>;
1924
1932
  }, z.core.$strip>>>;
1925
1933
  profileOrder: z.ZodDefault<z.ZodArray<z.ZodString>>;
1926
1934
  callSites: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodRecord<z.ZodEnum<{
@@ -2147,7 +2155,7 @@ declare const AssistantConfigSchema: z.ZodObject<{
2147
2155
  hostBrowser: z.ZodDefault<z.ZodObject<{
2148
2156
  cdpInspect: z.ZodDefault<z.ZodObject<{
2149
2157
  enabled: z.ZodDefault<z.ZodBoolean>;
2150
- host: z.ZodDefault<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
2158
+ host: z.ZodPipe<z.ZodDefault<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>, z.ZodString>;
2151
2159
  port: z.ZodDefault<z.ZodNumber>;
2152
2160
  probeTimeoutMs: z.ZodDefault<z.ZodNumber>;
2153
2161
  desktopAuto: z.ZodDefault<z.ZodObject<{
@@ -2263,6 +2271,7 @@ declare const AssistantConfigSchema: z.ZodObject<{
2263
2271
  accountSid: z.ZodDefault<z.ZodString>;
2264
2272
  phoneNumber: z.ZodDefault<z.ZodString>;
2265
2273
  setupStarted: z.ZodDefault<z.ZodBoolean>;
2274
+ assistantPhoneNumbers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2266
2275
  }, z.core.$strip>>;
2267
2276
  calls: z.ZodDefault<z.ZodObject<{
2268
2277
  enabled: z.ZodDefault<z.ZodBoolean>;
@@ -2371,7 +2380,7 @@ declare const AssistantConfigSchema: z.ZodObject<{
2371
2380
  a2a: z.ZodDefault<z.ZodObject<{
2372
2381
  enabled: z.ZodDefault<z.ZodBoolean>;
2373
2382
  }, z.core.$strip>>;
2374
- ingress: z.ZodPipe<z.ZodDefault<z.ZodObject<{
2383
+ ingress: z.ZodDefault<z.ZodObject<{
2375
2384
  enabled: z.ZodOptional<z.ZodBoolean>;
2376
2385
  publicBaseUrl: z.ZodDefault<z.ZodString>;
2377
2386
  webhook: z.ZodDefault<z.ZodObject<{
@@ -2385,39 +2394,8 @@ declare const AssistantConfigSchema: z.ZodObject<{
2385
2394
  maxRequestsPerMinute: z.ZodDefault<z.ZodNumber>;
2386
2395
  maxRequestsPerHour: z.ZodDefault<z.ZodNumber>;
2387
2396
  }, z.core.$strip>>;
2388
- shutdownDrainMs: z.ZodDefault<z.ZodNumber>;
2389
- }, z.core.$strip>>, z.ZodTransform<{
2390
- enabled: boolean | undefined;
2391
- publicBaseUrl: string;
2392
- webhook: {
2393
- secret: string;
2394
- timeoutMs: number;
2395
- maxRetries: number;
2396
- initialBackoffMs: number;
2397
- maxPayloadBytes: number;
2398
- };
2399
- rateLimit: {
2400
- maxRequestsPerMinute: number;
2401
- maxRequestsPerHour: number;
2402
- };
2403
- shutdownDrainMs: number;
2404
- }, {
2405
- publicBaseUrl: string;
2406
- webhook: {
2407
- secret: string;
2408
- timeoutMs: number;
2409
- maxRetries: number;
2410
- initialBackoffMs: number;
2411
- maxPayloadBytes: number;
2412
- };
2413
- rateLimit: {
2414
- maxRequestsPerMinute: number;
2415
- maxRequestsPerHour: number;
2416
- };
2417
- shutdownDrainMs: number;
2418
- enabled?: boolean | undefined;
2419
- }>>;
2420
- platform: z.ZodDefault<z.ZodObject<{
2397
+ }, z.core.$strip>>;
2398
+ cloud: z.ZodDefault<z.ZodObject<{
2421
2399
  baseUrl: z.ZodDefault<z.ZodString>;
2422
2400
  subdomain: z.ZodDefault<z.ZodString>;
2423
2401
  }, z.core.$strip>>;
@@ -2431,8 +2409,8 @@ declare const AssistantConfigSchema: z.ZodObject<{
2431
2409
  newMessageEnabled: z.ZodDefault<z.ZodBoolean>;
2432
2410
  }, z.core.$strip>>;
2433
2411
  ui: z.ZodDefault<z.ZodObject<{
2434
- userTimezone: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
2435
- detectedTimezone: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
2412
+ userTimezone: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>>;
2413
+ detectedTimezone: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>>;
2436
2414
  emptyStateGreetingCacheTtlMs: z.ZodDefault<z.ZodNumber>;
2437
2415
  }, z.core.$strip>>;
2438
2416
  tools: z.ZodDefault<z.ZodObject<{
@@ -3461,7 +3439,7 @@ declare const AssistantEventEnvelopeSchema: z.ZodObject<{
3461
3439
  title: z.ZodOptional<z.ZodString>;
3462
3440
  conversationId: z.ZodOptional<z.ZodString>;
3463
3441
  }, z.core.$strip>, z.ZodObject<{
3464
- type: z.ZodLiteral<"platform_disconnected">;
3442
+ type: z.ZodLiteral<"cloud_disconnected">;
3465
3443
  }, z.core.$strip>, z.ZodObject<{
3466
3444
  type: z.ZodLiteral<"question_request">;
3467
3445
  requestId: z.ZodString;
@@ -5110,7 +5088,7 @@ declare const AssistantEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
5110
5088
  title: z.ZodOptional<z.ZodString>;
5111
5089
  conversationId: z.ZodOptional<z.ZodString>;
5112
5090
  }, z.core.$strip>, z.ZodObject<{
5113
- type: z.ZodLiteral<"platform_disconnected">;
5091
+ type: z.ZodLiteral<"cloud_disconnected">;
5114
5092
  }, z.core.$strip>, z.ZodObject<{
5115
5093
  type: z.ZodLiteral<"question_request">;
5116
5094
  requestId: z.ZodString;
@@ -12199,7 +12177,7 @@ export declare function getMessages(conversationId: string): Promise<MessageRow[
12199
12177
  /**
12200
12178
  * List the workspace inference profiles a plugin can route to, in the order a
12201
12179
  * user-facing model picker presents them (`llm.profileOrder` first, then the
12202
- * rest alphabetically). Managed backup routes and the managed Jev profile
12180
+ * rest alphabetically). Managed backup routes and the cloud Jev profile
12203
12181
  * are omitted with the rest of the conversation view: a plugin routes
12204
12182
  * conversation turns, and a decision model cannot answer them.
12205
12183
  * Metadata-only entries without a provider, model, or mix are not routing
@@ -19170,7 +19148,7 @@ generated: undefined;
19170
19148
  }, {}, {
19171
19149
  length: number | undefined;
19172
19150
  }>;
19173
- managedServiceConfigKey: SQLiteColumn< {
19151
+ cloudServiceConfigKey: SQLiteColumn< {
19174
19152
  name: "managed_service_config_key";
19175
19153
  tableName: "oauth_providers";
19176
19154
  dataType: "string";
@@ -20529,7 +20507,7 @@ generated: undefined;
20529
20507
  dialect: "sqlite";
20530
20508
  }>;
20531
20509
 
20532
- declare type ProviderCredentialSource = "byok" | "no-auth" | "oauth-subscription" | "cadet-managed";
20510
+ declare type ProviderCredentialSource = "byok" | "no-auth" | "oauth-subscription" | "cadet-cloud";
20533
20511
 
20534
20512
  export declare type ProviderEvent = {
20535
20513
  type: "text_delta";
@@ -20613,9 +20591,9 @@ export declare interface ProviderResponse {
20613
20591
  declare interface ProviderRouteAttribution {
20614
20592
  connectionName?: string;
20615
20593
  profileName?: string;
20616
- isManagedRoute?: boolean;
20594
+ isCloudRoute?: boolean;
20617
20595
  /**
20618
- * Credential surface used for this request. Finer than `isManagedRoute`:
20596
+ * Credential surface used for this request. Finer than `isCloudRoute`:
20619
20597
  * it separates personal provider keys, keyless endpoints, and subscription
20620
20598
  * logins from each other so error copy can name what the user must fix.
20621
20599
  */
@@ -21070,7 +21048,7 @@ export declare function resolveMediaSourceData(source: MediaSource_2): {
21070
21048
  * across attempts, which is what an exact-match `redirect_uri` check needs.
21071
21049
  *
21072
21050
  * @throws when no public ingress is configured and the assistant is not
21073
- * connected to the platform. There is no URL that would work in that
21051
+ * connected to the cloud. There is no URL that would work in that
21074
21052
  * case, and returning a plausible one produces an authorization request
21075
21053
  * whose callback silently never arrives.
21076
21054
  */
@@ -21091,12 +21069,12 @@ export declare function resolveUserName(workspaceDir: string): string | null;
21091
21069
  /**
21092
21070
  * Resolve the public URL a third party should deliver to for `path`.
21093
21071
  *
21094
- * On the managed branches this registers a callback route with the platform,
21072
+ * On the cloud branches this registers a callback route with the cloud,
21095
21073
  * which is idempotent and matches what `assistant webhooks register` does.
21096
21074
  *
21097
21075
  * @throws when the plugin cannot be determined, when `path` is not one the
21098
21076
  * gateway would serve, or when no ingress is configured and the assistant is
21099
- * not connected to the platform. That last case has no URL that would work,
21077
+ * not connected to the cloud. That last case has no URL that would work,
21100
21078
  * and a plausible one would produce a vendor registration that silently
21101
21079
  * receives nothing.
21102
21080
  */
@@ -22603,7 +22581,7 @@ export declare interface SendMessageConfig {
22603
22581
  * True when the caller appended {@link NATIVE_WEB_SEARCH_TOOL_NAME} purely
22604
22582
  * to activate the route's provider-native web search, rather than passing an
22605
22583
  * app-executed search tool of the same name (which is what runs when a
22606
- * search backend like Brave or the platform search proxy is configured).
22584
+ * search backend like Brave or the cloud search proxy is configured).
22607
22585
  * Only the caller can tell those apart, and a route change after that
22608
22586
  * decision has to: `RetryProvider` drops the tool on a backup that runs no
22609
22587
  * native search, and must not touch it when the daemon executes it itself.
@@ -22642,9 +22620,9 @@ export declare interface SendMessageConfig {
22642
22620
  */
22643
22621
  promptCacheKey?: string;
22644
22622
  /**
22645
- * Internal per-request HTTP headers for managed-proxy usage attribution.
22623
+ * Internal per-request HTTP headers for cloud-proxy usage attribution.
22646
22624
  * Provider clients may pass these through SDK request options only when the
22647
- * transport is Cadet-managed, and must never include this object in provider
22625
+ * transport is Cadet Cloud, and must never include this object in provider
22648
22626
  * JSON request bodies.
22649
22627
  */
22650
22628
  usageAttributionHeaders?: Record<string, string>;
@@ -23548,8 +23526,8 @@ export declare type SttProviderId = "openai-whisper" | "deepgram"
23548
23526
  */
23549
23527
  | "deepgram-flux" | "google-gemini" | "xai" | "cadet"
23550
23528
  /**
23551
- * Managed Flux: the same conversational model as `deepgram-flux`, reached
23552
- * through the platform's speech relay instead of a Deepgram key. Dials the
23529
+ * Cloud Flux: the same conversational model as `deepgram-flux`, reached
23530
+ * through the cloud's speech relay instead of a Deepgram key. Dials the
23553
23531
  * relay's STT v2 endpoint asking for native Flux frames, so it keeps the
23554
23532
  * turn events the relay's default v1-shaped translation drops.
23555
23533
  */
@@ -24254,10 +24232,10 @@ export declare interface ToolContext {
24254
24232
  */
24255
24233
  toolUseId?: string;
24256
24234
  /**
24257
- * True when the assistant is running as a platform-managed remote instance. Used to auto-approve sandboxed bash tools.
24235
+ * True when the assistant is running as a cloud-managed remote instance. Used to auto-approve sandboxed bash tools.
24258
24236
  * @legacy
24259
24237
  */
24260
- isPlatformHosted?: boolean;
24238
+ isCloudHosted?: boolean;
24261
24239
  /**
24262
24240
  * The interface ID of the connected client driving the current turn (e.g.
24263
24241
  * "macos", "chrome-extension"). Browser backend policy uses this to decide
@@ -25764,10 +25742,10 @@ dialect: "sqlite";
25764
25742
  *
25765
25743
  * A plugin that receives third-party webhooks has to tell the vendor where to
25766
25744
  * deliver. Which URL is correct depends on how the assistant is reachable:
25767
- * a platform pod and a platform-connected assistant are served through a
25745
+ * a cloud pod and a cloud-connected assistant are served through a
25768
25746
  * managed callback route, while a self-hosted deployment is served through its
25769
25747
  * configured public ingress. `ingress.publicBaseUrl` alone does not decide it,
25770
- * because on a platform-connected assistant that value holds the Tunnel
25748
+ * because on a cloud-connected assistant that value holds the Tunnel
25771
25749
  * address, which is not where plugin routes are served.
25772
25750
  *
25773
25751
  * `resolveCallbackUrl` owns that decision for every caller in the codebase
@@ -25787,7 +25765,7 @@ export declare interface WebhookUrlOptions {
25787
25765
  * explicitly from a plugin route handler, where no context is established.
25788
25766
  */
25789
25767
  plugin?: string;
25790
- /** Human-readable label for the platform's admin display. */
25768
+ /** Human-readable label for the cloud's admin display. */
25791
25769
  sourceIdentifier?: string;
25792
25770
  }
25793
25771
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mycadet/plugin-api",
3
- "version": "0.12.7",
3
+ "version": "0.12.8",
4
4
  "description": "Public TypeScript authoring contract for Cadet assistant plugins.",
5
5
  "license": "MIT",
6
6
  "type": "module",