@mycadet/plugin-api 0.12.7 → 0.12.9

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 +67 -71
  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>>;
@@ -2147,7 +2153,7 @@ declare const AssistantConfigSchema: z.ZodObject<{
2147
2153
  hostBrowser: z.ZodDefault<z.ZodObject<{
2148
2154
  cdpInspect: z.ZodDefault<z.ZodObject<{
2149
2155
  enabled: z.ZodDefault<z.ZodBoolean>;
2150
- host: z.ZodDefault<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
2156
+ host: z.ZodPipe<z.ZodDefault<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>, z.ZodString>;
2151
2157
  port: z.ZodDefault<z.ZodNumber>;
2152
2158
  probeTimeoutMs: z.ZodDefault<z.ZodNumber>;
2153
2159
  desktopAuto: z.ZodDefault<z.ZodObject<{
@@ -2263,6 +2269,7 @@ declare const AssistantConfigSchema: z.ZodObject<{
2263
2269
  accountSid: z.ZodDefault<z.ZodString>;
2264
2270
  phoneNumber: z.ZodDefault<z.ZodString>;
2265
2271
  setupStarted: z.ZodDefault<z.ZodBoolean>;
2272
+ assistantPhoneNumbers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2266
2273
  }, z.core.$strip>>;
2267
2274
  calls: z.ZodDefault<z.ZodObject<{
2268
2275
  enabled: z.ZodDefault<z.ZodBoolean>;
@@ -2371,7 +2378,7 @@ declare const AssistantConfigSchema: z.ZodObject<{
2371
2378
  a2a: z.ZodDefault<z.ZodObject<{
2372
2379
  enabled: z.ZodDefault<z.ZodBoolean>;
2373
2380
  }, z.core.$strip>>;
2374
- ingress: z.ZodPipe<z.ZodDefault<z.ZodObject<{
2381
+ ingress: z.ZodDefault<z.ZodObject<{
2375
2382
  enabled: z.ZodOptional<z.ZodBoolean>;
2376
2383
  publicBaseUrl: z.ZodDefault<z.ZodString>;
2377
2384
  webhook: z.ZodDefault<z.ZodObject<{
@@ -2385,39 +2392,28 @@ declare const AssistantConfigSchema: z.ZodObject<{
2385
2392
  maxRequestsPerMinute: z.ZodDefault<z.ZodNumber>;
2386
2393
  maxRequestsPerHour: z.ZodDefault<z.ZodNumber>;
2387
2394
  }, 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<{
2395
+ assistantId: z.ZodOptional<z.ZodString>;
2396
+ lastTunnel: z.ZodOptional<z.ZodObject<{
2397
+ provider: z.ZodEnum<{
2398
+ cadet: "cadet";
2399
+ ngrok: "ngrok";
2400
+ cloudflare: "cloudflare";
2401
+ tailscale: "tailscale";
2402
+ }>;
2403
+ publicBaseUrl: z.ZodString;
2404
+ }, z.core.$strip>>;
2405
+ pairingTunnel: z.ZodOptional<z.ZodObject<{
2406
+ provider: z.ZodEnum<{
2407
+ cadet: "cadet";
2408
+ ngrok: "ngrok";
2409
+ cloudflare: "cloudflare";
2410
+ tailscale: "tailscale";
2411
+ }>;
2412
+ publicBaseUrl: z.ZodString;
2413
+ }, z.core.$strip>>;
2414
+ publicBaseUrlManagedBy: z.ZodOptional<z.ZodString>;
2415
+ }, z.core.$strip>>;
2416
+ cloud: z.ZodDefault<z.ZodObject<{
2421
2417
  baseUrl: z.ZodDefault<z.ZodString>;
2422
2418
  subdomain: z.ZodDefault<z.ZodString>;
2423
2419
  }, z.core.$strip>>;
@@ -2431,8 +2427,8 @@ declare const AssistantConfigSchema: z.ZodObject<{
2431
2427
  newMessageEnabled: z.ZodDefault<z.ZodBoolean>;
2432
2428
  }, z.core.$strip>>;
2433
2429
  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>>>;
2430
+ userTimezone: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>>;
2431
+ detectedTimezone: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>>;
2436
2432
  emptyStateGreetingCacheTtlMs: z.ZodDefault<z.ZodNumber>;
2437
2433
  }, z.core.$strip>>;
2438
2434
  tools: z.ZodDefault<z.ZodObject<{
@@ -3461,7 +3457,7 @@ declare const AssistantEventEnvelopeSchema: z.ZodObject<{
3461
3457
  title: z.ZodOptional<z.ZodString>;
3462
3458
  conversationId: z.ZodOptional<z.ZodString>;
3463
3459
  }, z.core.$strip>, z.ZodObject<{
3464
- type: z.ZodLiteral<"platform_disconnected">;
3460
+ type: z.ZodLiteral<"cloud_disconnected">;
3465
3461
  }, z.core.$strip>, z.ZodObject<{
3466
3462
  type: z.ZodLiteral<"question_request">;
3467
3463
  requestId: z.ZodString;
@@ -3565,7 +3561,7 @@ declare const AssistantEventEnvelopeSchema: z.ZodObject<{
3565
3561
  targetVersion: z.ZodString;
3566
3562
  expectedDowntimeSeconds: z.ZodNumber;
3567
3563
  }, z.core.$strip>, z.ZodObject<{
3568
- type: z.ZodLiteral<"show_platform_login">;
3564
+ type: z.ZodLiteral<"show_cloud_login">;
3569
3565
  }, z.core.$strip>, z.ZodObject<{
3570
3566
  type: z.ZodLiteral<"skills_state_changed">;
3571
3567
  name: z.ZodString;
@@ -5110,7 +5106,7 @@ declare const AssistantEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
5110
5106
  title: z.ZodOptional<z.ZodString>;
5111
5107
  conversationId: z.ZodOptional<z.ZodString>;
5112
5108
  }, z.core.$strip>, z.ZodObject<{
5113
- type: z.ZodLiteral<"platform_disconnected">;
5109
+ type: z.ZodLiteral<"cloud_disconnected">;
5114
5110
  }, z.core.$strip>, z.ZodObject<{
5115
5111
  type: z.ZodLiteral<"question_request">;
5116
5112
  requestId: z.ZodString;
@@ -5214,7 +5210,7 @@ declare const AssistantEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
5214
5210
  targetVersion: z.ZodString;
5215
5211
  expectedDowntimeSeconds: z.ZodNumber;
5216
5212
  }, z.core.$strip>, z.ZodObject<{
5217
- type: z.ZodLiteral<"show_platform_login">;
5213
+ type: z.ZodLiteral<"show_cloud_login">;
5218
5214
  }, z.core.$strip>, z.ZodObject<{
5219
5215
  type: z.ZodLiteral<"skills_state_changed">;
5220
5216
  name: z.ZodString;
@@ -12199,7 +12195,7 @@ export declare function getMessages(conversationId: string): Promise<MessageRow[
12199
12195
  /**
12200
12196
  * List the workspace inference profiles a plugin can route to, in the order a
12201
12197
  * user-facing model picker presents them (`llm.profileOrder` first, then the
12202
- * rest alphabetically). Managed backup routes and the managed Jev profile
12198
+ * rest alphabetically). Managed backup routes and the cloud Jev profile
12203
12199
  * are omitted with the rest of the conversation view: a plugin routes
12204
12200
  * conversation turns, and a decision model cannot answer them.
12205
12201
  * Metadata-only entries without a provider, model, or mix are not routing
@@ -19170,7 +19166,7 @@ generated: undefined;
19170
19166
  }, {}, {
19171
19167
  length: number | undefined;
19172
19168
  }>;
19173
- managedServiceConfigKey: SQLiteColumn< {
19169
+ cloudServiceConfigKey: SQLiteColumn< {
19174
19170
  name: "managed_service_config_key";
19175
19171
  tableName: "oauth_providers";
19176
19172
  dataType: "string";
@@ -20529,7 +20525,7 @@ generated: undefined;
20529
20525
  dialect: "sqlite";
20530
20526
  }>;
20531
20527
 
20532
- declare type ProviderCredentialSource = "byok" | "no-auth" | "oauth-subscription" | "cadet-managed";
20528
+ declare type ProviderCredentialSource = "byok" | "no-auth" | "oauth-subscription" | "cadet-cloud";
20533
20529
 
20534
20530
  export declare type ProviderEvent = {
20535
20531
  type: "text_delta";
@@ -20613,9 +20609,9 @@ export declare interface ProviderResponse {
20613
20609
  declare interface ProviderRouteAttribution {
20614
20610
  connectionName?: string;
20615
20611
  profileName?: string;
20616
- isManagedRoute?: boolean;
20612
+ isCloudRoute?: boolean;
20617
20613
  /**
20618
- * Credential surface used for this request. Finer than `isManagedRoute`:
20614
+ * Credential surface used for this request. Finer than `isCloudRoute`:
20619
20615
  * it separates personal provider keys, keyless endpoints, and subscription
20620
20616
  * logins from each other so error copy can name what the user must fix.
20621
20617
  */
@@ -21070,7 +21066,7 @@ export declare function resolveMediaSourceData(source: MediaSource_2): {
21070
21066
  * across attempts, which is what an exact-match `redirect_uri` check needs.
21071
21067
  *
21072
21068
  * @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
21069
+ * connected to the cloud. There is no URL that would work in that
21074
21070
  * case, and returning a plausible one produces an authorization request
21075
21071
  * whose callback silently never arrives.
21076
21072
  */
@@ -21091,12 +21087,12 @@ export declare function resolveUserName(workspaceDir: string): string | null;
21091
21087
  /**
21092
21088
  * Resolve the public URL a third party should deliver to for `path`.
21093
21089
  *
21094
- * On the managed branches this registers a callback route with the platform,
21090
+ * On the cloud branches this registers a callback route with the cloud,
21095
21091
  * which is idempotent and matches what `assistant webhooks register` does.
21096
21092
  *
21097
21093
  * @throws when the plugin cannot be determined, when `path` is not one the
21098
21094
  * 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,
21095
+ * not connected to the cloud. That last case has no URL that would work,
21100
21096
  * and a plausible one would produce a vendor registration that silently
21101
21097
  * receives nothing.
21102
21098
  */
@@ -22603,7 +22599,7 @@ export declare interface SendMessageConfig {
22603
22599
  * True when the caller appended {@link NATIVE_WEB_SEARCH_TOOL_NAME} purely
22604
22600
  * to activate the route's provider-native web search, rather than passing an
22605
22601
  * 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).
22602
+ * search backend like Brave or the cloud search proxy is configured).
22607
22603
  * Only the caller can tell those apart, and a route change after that
22608
22604
  * decision has to: `RetryProvider` drops the tool on a backup that runs no
22609
22605
  * native search, and must not touch it when the daemon executes it itself.
@@ -22642,9 +22638,9 @@ export declare interface SendMessageConfig {
22642
22638
  */
22643
22639
  promptCacheKey?: string;
22644
22640
  /**
22645
- * Internal per-request HTTP headers for managed-proxy usage attribution.
22641
+ * Internal per-request HTTP headers for cloud-proxy usage attribution.
22646
22642
  * 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
22643
+ * transport is Cadet Cloud, and must never include this object in provider
22648
22644
  * JSON request bodies.
22649
22645
  */
22650
22646
  usageAttributionHeaders?: Record<string, string>;
@@ -23548,8 +23544,8 @@ export declare type SttProviderId = "openai-whisper" | "deepgram"
23548
23544
  */
23549
23545
  | "deepgram-flux" | "google-gemini" | "xai" | "cadet"
23550
23546
  /**
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
23547
+ * Cloud Flux: the same conversational model as `deepgram-flux`, reached
23548
+ * through the cloud's speech relay instead of a Deepgram key. Dials the
23553
23549
  * relay's STT v2 endpoint asking for native Flux frames, so it keeps the
23554
23550
  * turn events the relay's default v1-shaped translation drops.
23555
23551
  */
@@ -24254,10 +24250,10 @@ export declare interface ToolContext {
24254
24250
  */
24255
24251
  toolUseId?: string;
24256
24252
  /**
24257
- * True when the assistant is running as a platform-managed remote instance. Used to auto-approve sandboxed bash tools.
24253
+ * True when the assistant is running as a cloud-managed remote instance. Used to auto-approve sandboxed bash tools.
24258
24254
  * @legacy
24259
24255
  */
24260
- isPlatformHosted?: boolean;
24256
+ isCloudHosted?: boolean;
24261
24257
  /**
24262
24258
  * The interface ID of the connected client driving the current turn (e.g.
24263
24259
  * "macos", "chrome-extension"). Browser backend policy uses this to decide
@@ -25764,10 +25760,10 @@ dialect: "sqlite";
25764
25760
  *
25765
25761
  * A plugin that receives third-party webhooks has to tell the vendor where to
25766
25762
  * 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
25763
+ * a cloud pod and a cloud-connected assistant are served through a
25768
25764
  * managed callback route, while a self-hosted deployment is served through its
25769
25765
  * configured public ingress. `ingress.publicBaseUrl` alone does not decide it,
25770
- * because on a platform-connected assistant that value holds the Tunnel
25766
+ * because on a cloud-connected assistant that value holds the Tunnel
25771
25767
  * address, which is not where plugin routes are served.
25772
25768
  *
25773
25769
  * `resolveCallbackUrl` owns that decision for every caller in the codebase
@@ -25787,7 +25783,7 @@ export declare interface WebhookUrlOptions {
25787
25783
  * explicitly from a plugin route handler, where no context is established.
25788
25784
  */
25789
25785
  plugin?: string;
25790
- /** Human-readable label for the platform's admin display. */
25786
+ /** Human-readable label for the cloud's admin display. */
25791
25787
  sourceIdentifier?: string;
25792
25788
  }
25793
25789
 
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.9",
4
4
  "description": "Public TypeScript authoring contract for Cadet assistant plugins.",
5
5
  "license": "MIT",
6
6
  "type": "module",