@vellumai/plugin-api 0.10.9 → 0.10.10-dev.202607162206.d08e98e

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 (3) hide show
  1. package/index.d.ts +88 -101
  2. package/index.js +3 -0
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -295,10 +295,6 @@ declare const AssistantConfigSchema: z.ZodObject<{
295
295
  }>>;
296
296
  }, z.core.$strip>>;
297
297
  "web-fetch": z.ZodDefault<z.ZodObject<{
298
- mode: z.ZodDefault<z.ZodEnum<{
299
- managed: "managed";
300
- "your-own": "your-own";
301
- }>>;
302
298
  provider: z.ZodDefault<z.ZodEnum<{
303
299
  [x: string]: string;
304
300
  }>>;
@@ -308,13 +304,13 @@ declare const AssistantConfigSchema: z.ZodObject<{
308
304
  managed: "managed";
309
305
  "your-own": "your-own";
310
306
  }>>;
311
- provider: z.ZodEnum<{
307
+ provider: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodEnum<{
312
308
  vellum: "vellum";
313
309
  deepgram: "deepgram";
314
310
  "google-gemini": "google-gemini";
315
311
  "openai-whisper": "openai-whisper";
316
312
  xai: "xai";
317
- }>;
313
+ }>>;
318
314
  providers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
319
315
  }, z.core.$strip>>;
320
316
  tts: z.ZodDefault<z.ZodObject<{
@@ -667,6 +663,7 @@ declare const AssistantConfigSchema: z.ZodObject<{
667
663
  minCooldownMs: z.ZodDefault<z.ZodNumber>;
668
664
  keepSupersededRuns: z.ZodDefault<z.ZodBoolean>;
669
665
  matchConversationProfile: z.ZodDefault<z.ZodBoolean>;
666
+ promptPath: z.ZodDefault<z.ZodNullable<z.ZodString>>;
670
667
  }, z.core.$strip>>;
671
668
  }, z.core.$strip>>;
672
669
  monitoring: z.ZodDefault<z.ZodObject<{
@@ -709,82 +706,6 @@ declare const AssistantConfigSchema: z.ZodObject<{
709
706
  retentionDays: z.ZodDefault<z.ZodNumber>;
710
707
  }, z.core.$strip>>;
711
708
  llm: z.ZodDefault<z.ZodObject<{
712
- default: z.ZodDefault<z.ZodObject<{
713
- provider: z.ZodDefault<z.ZodEnum<{
714
- anthropic: "anthropic";
715
- openai: "openai";
716
- gemini: "gemini";
717
- fireworks: "fireworks";
718
- openrouter: "openrouter";
719
- ollama: "ollama";
720
- "vercel-ai-gateway": "vercel-ai-gateway";
721
- "openai-compatible": "openai-compatible";
722
- minimax: "minimax";
723
- atlascloud: "atlascloud";
724
- together: "together";
725
- }>>;
726
- provider_connection: z.ZodOptional<z.ZodString>;
727
- model: z.ZodDefault<z.ZodString>;
728
- maxTokens: z.ZodDefault<z.ZodNumber>;
729
- effort: z.ZodDefault<z.ZodEnum<{
730
- low: "low";
731
- medium: "medium";
732
- high: "high";
733
- none: "none";
734
- xhigh: "xhigh";
735
- max: "max";
736
- }>>;
737
- speed: z.ZodDefault<z.ZodEnum<{
738
- standard: "standard";
739
- fast: "fast";
740
- }>>;
741
- verbosity: z.ZodDefault<z.ZodEnum<{
742
- low: "low";
743
- medium: "medium";
744
- high: "high";
745
- }>>;
746
- temperature: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
747
- topP: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
748
- thinking: z.ZodDefault<z.ZodObject<{
749
- enabled: z.ZodDefault<z.ZodBoolean>;
750
- streamThinking: z.ZodDefault<z.ZodBoolean>;
751
- level: z.ZodOptional<z.ZodEnum<{
752
- low: "low";
753
- medium: "medium";
754
- high: "high";
755
- minimal: "minimal";
756
- }>>;
757
- }, z.core.$strip>>;
758
- contextWindow: z.ZodDefault<z.ZodObject<{
759
- enabled: z.ZodDefault<z.ZodBoolean>;
760
- maxInputTokens: z.ZodDefault<z.ZodNumber>;
761
- targetBudgetRatio: z.ZodDefault<z.ZodNumber>;
762
- compactThreshold: z.ZodDefault<z.ZodNumber>;
763
- summaryBudgetRatio: z.ZodDefault<z.ZodNumber>;
764
- overflowRecovery: z.ZodDefault<z.ZodObject<{
765
- enabled: z.ZodDefault<z.ZodBoolean>;
766
- safetyMarginRatio: z.ZodDefault<z.ZodNumber>;
767
- maxAttempts: z.ZodDefault<z.ZodNumber>;
768
- interactiveLatestTurnCompression: z.ZodDefault<z.ZodEnum<{
769
- truncate: "truncate";
770
- summarize: "summarize";
771
- drop: "drop";
772
- }>>;
773
- nonInteractiveLatestTurnCompression: z.ZodDefault<z.ZodEnum<{
774
- truncate: "truncate";
775
- summarize: "summarize";
776
- drop: "drop";
777
- }>>;
778
- }, z.core.$strip>>;
779
- }, z.core.$strip>>;
780
- openrouter: z.ZodDefault<z.ZodObject<{
781
- only: z.ZodDefault<z.ZodArray<z.ZodString>>;
782
- }, z.core.$strip>>;
783
- logitBias: z.ZodOptional<z.ZodEnum<{
784
- "suppress-cjk": "suppress-cjk";
785
- }>>;
786
- disableCache: z.ZodOptional<z.ZodBoolean>;
787
- }, z.core.$strip>>;
788
709
  profiles: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
789
710
  provider: z.ZodOptional<z.ZodEnum<{
790
711
  anthropic: "anthropic";
@@ -798,6 +719,7 @@ declare const AssistantConfigSchema: z.ZodObject<{
798
719
  minimax: "minimax";
799
720
  atlascloud: "atlascloud";
800
721
  together: "together";
722
+ baseten: "baseten";
801
723
  }>>;
802
724
  model: z.ZodOptional<z.ZodString>;
803
725
  maxTokens: z.ZodOptional<z.ZodNumber>;
@@ -930,6 +852,7 @@ declare const AssistantConfigSchema: z.ZodObject<{
930
852
  minimax: "minimax";
931
853
  atlascloud: "atlascloud";
932
854
  together: "together";
855
+ baseten: "baseten";
933
856
  }>>;
934
857
  model: z.ZodOptional<z.ZodString>;
935
858
  maxTokens: z.ZodOptional<z.ZodNumber>;
@@ -1254,6 +1177,7 @@ declare const AssistantConfigSchema: z.ZodObject<{
1254
1177
  bargeInMinSpeechMs: z.ZodDefault<z.ZodNumber>;
1255
1178
  }, z.core.$strip>>;
1256
1179
  maxSessionDurationSeconds: z.ZodDefault<z.ZodNumber>;
1180
+ archiveAudio: z.ZodDefault<z.ZodBoolean>;
1257
1181
  }, z.core.$strip>>;
1258
1182
  whatsapp: z.ZodDefault<z.ZodObject<{
1259
1183
  phoneNumber: z.ZodDefault<z.ZodString>;
@@ -2441,7 +2365,7 @@ declare interface ConversationSearchResultItem {
2441
2365
  matchingMessages: ConversationSearchMatchingMessage[];
2442
2366
  }
2443
2367
 
2444
- declare type _ConversationsServerMessages = AuthResult | PongMessage | AssistantStatusMessage | GenerationCancelledEvent | GenerationHandoffEvent | ModelInfo | HistoryResponse | UndoComplete | UsageUpdateEvent | UsageProgressEvent | UsageResponse | ContextCompacted | CompactionCircuitOpenEvent | CompactionCircuitClosedEvent | ConversationErrorEvent | ConversationNoticeEvent | ConversationInfo | ConversationTitleUpdatedEvent | ConversationListResponse | ConversationsClearResponse | ConversationSearchResponse | MessageContentResponse | ConversationListInvalidatedEvent | ScheduleConversationCreated | OpenConversation;
2368
+ declare type _ConversationsServerMessages = AuthResult | PongMessage | AssistantStatusMessage | GenerationCancelledEvent | GenerationHandoffEvent | ModelInfo | HistoryResponse | UndoComplete | UsageUpdateEvent | UsageProgressEvent | UsageResponse | ContextCompacted | CompactionCircuitOpenEvent | CompactionCircuitClosedEvent | ConversationErrorEvent | ConversationNoticeEvent | ConversationInfo | ConversationTitleUpdatedEvent | ConversationListResponse | ConversationsClearResponse | ConversationSearchResponse | MessageContentResponse | ConversationListInvalidatedEvent | ScheduleConversationCreated | OpenConversationEvent;
2445
2369
 
2446
2370
  declare type ConversationTitleUpdatedEvent = z.infer<typeof ConversationTitleUpdatedEventSchema>;
2447
2371
 
@@ -2462,6 +2386,34 @@ declare interface CopyBlockSurfaceData {
2462
2386
  language?: string;
2463
2387
  }
2464
2388
 
2389
+ /**
2390
+ * Plugin-facing credential resolution.
2391
+ *
2392
+ * {@link resolveCredential} returns a stored credential's plaintext value — the
2393
+ * same value `assistant credentials reveal` prints — resolving a reference that
2394
+ * is either a credential UUID or a `"service/field"` string, exactly as the
2395
+ * reveal path does (see {@link ../tools/credentials/resolve.resolveCredentialRef}
2396
+ * and the `credentials/reveal` route).
2397
+ *
2398
+ * ## Plugin scoping
2399
+ *
2400
+ * When a plugin is in context — its hook or tool is executing, tracked by
2401
+ * {@link ../plugins/plugin-execution-context.getCurrentPluginName} — resolution
2402
+ * is restricted: the plugin may only resolve credentials whose `field` equals
2403
+ * the plugin's own manifest name. A plugin named `acme` can therefore read
2404
+ * `openai/acme` or `stripe/acme` but not `openai/api_key`. Outside any plugin
2405
+ * context (host-internal callers, CLI, tests) the resolver is unscoped and
2406
+ * behaves like a direct reveal.
2407
+ */
2408
+ /**
2409
+ * Raised when a credential cannot be resolved: the reference does not match a
2410
+ * stored credential, the store is unreachable, or the calling plugin is not
2411
+ * permitted to resolve the requested credential.
2412
+ */
2413
+ export declare class CredentialResolutionError extends Error {
2414
+ constructor(message: string);
2415
+ }
2416
+
2465
2417
  declare interface CustomSlimSkill extends SlimSkillBase {
2466
2418
  origin: "custom";
2467
2419
  }
@@ -3634,6 +3586,17 @@ declare const INTERFACE_IDS: readonly ["macos", "ios", "cli", "telegram", "phone
3634
3586
 
3635
3587
  declare type InterfaceId = (typeof INTERFACE_IDS)[number];
3636
3588
 
3589
+ /**
3590
+ * Appended (inside the `<system_notice>` wrapper) to the internal continuation /
3591
+ * completion nudge strings that re-query the model. Those notices are injected
3592
+ * as user-role turns; weaker models without a separate reasoning channel
3593
+ * otherwise narrate or answer the notice as visible text, leaking agent-loop
3594
+ * scaffolding into the user-facing reply. This clause forbids that narration
3595
+ * without licensing an empty reply — each nudge's own instruction still drives
3596
+ * the expected output (summary / final reply / continuation).
3597
+ */
3598
+ export declare const INTERNAL_NUDGE_OUTPUT_SUPPRESSION = " This notice is internal: do not repeat, quote, describe, or acknowledge it, and do not narrate whether you will continue or whether the turn is done. Reply with only the content the user should see.";
3599
+
3637
3600
  /** Whether the conversation currently has a turn in flight. */
3638
3601
  export declare function isConversationProcessing(id: string): Promise<boolean>;
3639
3602
 
@@ -3901,8 +3864,8 @@ declare const messageMetadataSchema: z.ZodObject<{
3901
3864
  status: z.ZodEnum<{
3902
3865
  completed: "completed";
3903
3866
  failed: "failed";
3904
- running: "running";
3905
3867
  aborted: "aborted";
3868
+ running: "running";
3906
3869
  }>;
3907
3870
  error: z.ZodOptional<z.ZodString>;
3908
3871
  conversationId: z.ZodOptional<z.ZodString>;
@@ -3933,6 +3896,8 @@ declare const messageMetadataSchema: z.ZodObject<{
3933
3896
  provenanceRequesterIdentifier: z.ZodOptional<z.ZodString>;
3934
3897
  automated: z.ZodOptional<z.ZodBoolean>;
3935
3898
  hidden: z.ZodOptional<z.ZodBoolean>;
3899
+ userMessageSource: z.ZodOptional<z.ZodString>;
3900
+ messageKind: z.ZodOptional<z.ZodString>;
3936
3901
  backgroundToolCompletion: z.ZodOptional<z.ZodObject<{
3937
3902
  id: z.ZodString;
3938
3903
  toolName: z.ZodString;
@@ -4171,22 +4136,15 @@ declare interface OpenBundleResponse {
4171
4136
  bundleSizeBytes: number;
4172
4137
  }
4173
4138
 
4174
- /**
4175
- * Server push — instructs the client to open and focus a conversation. If
4176
- * the conversation isn't already present in the client's sidebar list (e.g.
4177
- * it was just created via `POST /v1/conversations`), the client should stub
4178
- * a sidebar entry using the provided `title` before navigating.
4179
- */
4180
- declare interface OpenConversation {
4181
- type: "open_conversation";
4182
- conversationId: string;
4183
- /** Optional conversation title; supplied when the client may not yet have the conversation in its list. */
4184
- title?: string;
4185
- /** Optional message ID to scroll to after focus. */
4186
- anchorMessageId?: string;
4187
- /** When `false`, the client should register the conversation in its sidebar (so it's visible and navigable) but must NOT switch focus to it. Omitting the field defaults to `true` for backward compatibility with existing single-target 'jump to conversation' callers. */
4188
- focus?: boolean;
4189
- }
4139
+ declare type OpenConversationEvent = z.infer<typeof OpenConversationEventSchema>;
4140
+
4141
+ declare const OpenConversationEventSchema: z.ZodObject<{
4142
+ type: z.ZodLiteral<"open_conversation">;
4143
+ conversationId: z.ZodString;
4144
+ title: z.ZodOptional<z.ZodString>;
4145
+ anchorMessageId: z.ZodOptional<z.ZodString>;
4146
+ focus: z.ZodOptional<z.ZodBoolean>;
4147
+ }, z.core.$strip>;
4190
4148
 
4191
4149
  declare type OpenPanelEvent = z.infer<typeof OpenPanelEventSchema>;
4192
4150
 
@@ -4831,6 +4789,16 @@ declare const RelationshipStateUpdatedEventSchema: z.ZodObject<{
4831
4789
  updatedAt: z.ZodString;
4832
4790
  }, z.core.$strip>;
4833
4791
 
4792
+ /**
4793
+ * Resolve a credential reference to its plaintext value.
4794
+ *
4795
+ * @param ref A credential UUID or a `"service/field"` string.
4796
+ * @returns The plaintext credential value.
4797
+ * @throws {CredentialResolutionError} when the reference does not resolve, the
4798
+ * store is unreachable, or a plugin in context is not scoped to the credential.
4799
+ */
4800
+ export declare function resolveCredential(ref: string): Promise<string>;
4801
+
4834
4802
  /**
4835
4803
  * Plugin-facing read API over the skill surface: the locally installed
4836
4804
  * catalog with resolved enablement states, and the remote skill catalog —
@@ -4954,6 +4922,15 @@ export declare interface RunConversationTurnOptions {
4954
4922
  * controller fires, terminating the in-flight agent loop.
4955
4923
  */
4956
4924
  signal?: AbortSignal;
4925
+ /**
4926
+ * Conversation type for newly created conversations. When omitted,
4927
+ * defaults to `"standard"` (visible in the sidebar). Set to
4928
+ * `"background"` for plugin-driven conversations that should not
4929
+ * appear in the sidebar's Recents grouping.
4930
+ *
4931
+ * Ignored when `conversationId` references an existing conversation.
4932
+ */
4933
+ conversationType?: "standard" | "background";
4957
4934
  }
4958
4935
 
4959
4936
  export declare interface RunConversationTurnResult {
@@ -5104,7 +5081,8 @@ export declare interface SendMessageConfig {
5104
5081
  * LLM call-site identifier. `RetryProvider` resolves
5105
5082
  * provider/model/maxTokens/effort/speed/verbosity/temperature/thinking/
5106
5083
  * contextWindow via `resolveCallSiteConfig(callSite, config.llm)`, falling
5107
- * back to `llm.default` when no callSite-specific entry is present.
5084
+ * back to the shipped call-site defaults when no callSite-specific entry
5085
+ * is present.
5108
5086
  */
5109
5087
  callSite?: LLMCallSite;
5110
5088
  /**
@@ -6660,6 +6638,15 @@ declare interface UserPromptSubmitInputContext {
6660
6638
  * user speech (e.g. title generation) should skip these turns.
6661
6639
  */
6662
6640
  readonly isHiddenPrompt?: boolean;
6641
+ /**
6642
+ * How the triggering message was initiated when it was sent on the
6643
+ * user's behalf by the UI rather than typed by hand (`body.source` on
6644
+ * `POST /v1/messages`, persisted as `metadata.userMessageSource`).
6645
+ * Current value: `"nav_redirect"` — a navigation shortcut redirected the
6646
+ * user into chat with a pre-filled message. Unset for hand-typed
6647
+ * messages.
6648
+ */
6649
+ readonly messageSource?: string;
6663
6650
  /**
6664
6651
  * The user's original message list, immutable for the hook. Plugins
6665
6652
  * may snapshot or compare against this but MUST NOT mutate it.
package/index.js CHANGED
@@ -1,7 +1,9 @@
1
1
  // Generated by scripts/build-plugin-api.ts — do not edit by hand.
2
2
  const api = globalThis[Symbol.for("vellum.plugin-api")] ?? {};
3
3
  export const CLI_COMMAND_HELP = api.CLI_COMMAND_HELP;
4
+ export const CredentialResolutionError = api.CredentialResolutionError;
4
5
  export const HOOKS = api.HOOKS;
6
+ export const INTERNAL_NUDGE_OUTPUT_SUPPRESSION = api.INTERNAL_NUDGE_OUTPUT_SUPPRESSION;
5
7
  export const RiskLevel = api.RiskLevel;
6
8
  export const TtsSynthesisError = api.TtsSynthesisError;
7
9
  export const addMessage = api.addMessage;
@@ -24,6 +26,7 @@ export const listCatalogSkills = api.listCatalogSkills;
24
26
  export const listConversations = api.listConversations;
25
27
  export const listInstalledSkills = api.listInstalledSkills;
26
28
  export const parseMessageMetadata = api.parseMessageMetadata;
29
+ export const resolveCredential = api.resolveCredential;
27
30
  export const resolveMediaSourceData = api.resolveMediaSourceData;
28
31
  export const resolveUserName = api.resolveUserName;
29
32
  export const runConversationTurn = api.runConversationTurn;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vellumai/plugin-api",
3
- "version": "0.10.9",
3
+ "version": "0.10.10-dev.202607162206.d08e98e",
4
4
  "description": "Public TypeScript authoring contract for Vellum assistant plugins.",
5
5
  "license": "MIT",
6
6
  "type": "module",