@vellumai/plugin-api 0.10.7-dev.202607101106.c87f4e3 → 0.10.7-dev.202607101343.e727d4c

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 +85 -0
  2. package/index.js +3 -0
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -1909,6 +1909,25 @@ declare interface ClawhubSlimSkill extends SlimSkillBase {
1909
1909
  version: string;
1910
1910
  }
1911
1911
 
1912
+ export declare const CLI_COMMAND_HELP: readonly CliCommandHelp[];
1913
+
1914
+ /**
1915
+ * Fully declarative description of a top-level `assistant` CLI command and its
1916
+ * subcommands. Plain data by design — no action handlers — so plugins (e.g. the
1917
+ * memory capability indexer) can import a command's help and iterate over it
1918
+ * without dragging in the CLI's daemon/IPC action graph. Command modules apply
1919
+ * the same data via {@link applyCommandHelp}, then attach their handlers.
1920
+ */
1921
+ declare interface CliCommandHelp {
1922
+ name: string;
1923
+ description: string;
1924
+ /** Options declared directly on the top-level command. */
1925
+ options?: CliOptionHelp[];
1926
+ /** Extra help appended after the option list (`addHelpText("after", …)`). */
1927
+ helpText?: string;
1928
+ subcommands?: CliSubcommandHelp[];
1929
+ }
1930
+
1912
1931
  declare interface ClientEntry extends BaseSubscriberEntry {
1913
1932
  type: "client";
1914
1933
  clientId: string;
@@ -1936,6 +1955,24 @@ declare interface ClientSettingsUpdate {
1936
1955
  value: string;
1937
1956
  }
1938
1957
 
1958
+ declare interface CliOptionHelp {
1959
+ /** Commander flag spec, e.g. `"--path <file>"` or `"-l, --limit <n>"`. */
1960
+ flags: string;
1961
+ description: string;
1962
+ /** When true, applied via `requiredOption` (missing → error) rather than `option`. */
1963
+ required?: boolean;
1964
+ /** Default value passed to `option(flags, description, defaultValue)`. */
1965
+ defaultValue?: string;
1966
+ }
1967
+
1968
+ declare interface CliSubcommandHelp {
1969
+ name: string;
1970
+ description: string;
1971
+ options?: CliOptionHelp[];
1972
+ /** Extra help appended after the option list (`addHelpText("after", …)`). */
1973
+ helpText?: string;
1974
+ }
1975
+
1939
1976
  declare type CompactionCircuitClosedEvent = z.infer<typeof CompactionCircuitClosedEventSchema>;
1940
1977
 
1941
1978
  declare const CompactionCircuitClosedEventSchema: z.ZodObject<{
@@ -5481,6 +5518,29 @@ declare type _SyncInvalidationServerMessages = SyncChangedEvent;
5481
5518
  /** Re-sync one persisted message into the conversation's disk view. */
5482
5519
  export declare function syncMessageToDisk(conversationId: string, messageId: string, createdAtMs: number): Promise<void>;
5483
5520
 
5521
+ /**
5522
+ * Synthesize text to audio using the globally configured TTS provider.
5523
+ *
5524
+ * 1. Resolves the active provider and its config via `tts-config-resolver`.
5525
+ * 2. Looks up the provider adapter in the registry.
5526
+ * 3. Delegates to the adapter's `synthesize` method.
5527
+ *
5528
+ * Throws {@link TtsSynthesisError} when the provider is not registered
5529
+ * or synthesis fails.
5530
+ */
5531
+ export declare function synthesizeText(options: SynthesizeTextOptions): Promise<TtsSynthesisResult>;
5532
+
5533
+ export declare interface SynthesizeTextOptions {
5534
+ /** Text to speak. Sanitized internally — callers can pass raw model output. */
5535
+ text: string;
5536
+ /** Product surface requesting synthesis. */
5537
+ useCase: TtsUseCase;
5538
+ /** Optional voice override (provider-specific identifier). */
5539
+ voiceId?: string;
5540
+ /** Optional abort signal. */
5541
+ signal?: AbortSignal;
5542
+ }
5543
+
5484
5544
  declare interface TableCellValue {
5485
5545
  text: string;
5486
5546
  icon?: string;
@@ -6168,6 +6228,31 @@ declare const trustClassSchema: z.ZodEnum<{
6168
6228
  unverified_contact: "unverified_contact";
6169
6229
  }>;
6170
6230
 
6231
+ export declare class TtsSynthesisError extends Error {
6232
+ readonly code: TtsSynthesisErrorCode;
6233
+ constructor(code: TtsSynthesisErrorCode, message: string);
6234
+ }
6235
+
6236
+ declare type TtsSynthesisErrorCode = "TTS_PROVIDER_NOT_CONFIGURED" | "TTS_SYNTHESIS_FAILED";
6237
+
6238
+ /** Output of a completed TTS synthesis call. */
6239
+ export declare interface TtsSynthesisResult {
6240
+ /** Complete audio buffer. */
6241
+ audio: Buffer;
6242
+ /** MIME type of the returned audio (e.g. `"audio/mpeg"`, `"audio/wav"`). */
6243
+ contentType: string;
6244
+ }
6245
+
6246
+ /**
6247
+ * Describes the product surface that is requesting synthesis so providers
6248
+ * can tailor format, latency, and quality trade-offs.
6249
+ */
6250
+ declare type TtsUseCase =
6251
+ /** Real-time phone call — prioritize low latency and streaming. */
6252
+ "phone-call"
6253
+ /** In-app message playback — buffer-oriented, higher quality acceptable. */
6254
+ | "message-playback";
6255
+
6171
6256
  declare interface UiSurfaceComplete {
6172
6257
  type: "ui_surface_complete";
6173
6258
  conversationId: string;
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
+ export const CLI_COMMAND_HELP = api.CLI_COMMAND_HELP;
3
4
  export const HOOKS = api.HOOKS;
4
5
  export const RiskLevel = api.RiskLevel;
6
+ export const TtsSynthesisError = api.TtsSynthesisError;
5
7
  export const addMessage = api.addMessage;
6
8
  export const assistantEventHub = api.assistantEventHub;
7
9
  export const buildMessageExcerpt = api.buildMessageExcerpt;
@@ -28,4 +30,5 @@ export const searchMessageIdsLexical = api.searchMessageIdsLexical;
28
30
  export const selectedBackendSupportsMultimodal = api.selectedBackendSupportsMultimodal;
29
31
  export const stringifyMessageContent = api.stringifyMessageContent;
30
32
  export const syncMessageToDisk = api.syncMessageToDisk;
33
+ export const synthesizeText = api.synthesizeText;
31
34
  export const updateMessageMetadata = api.updateMessageMetadata;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vellumai/plugin-api",
3
- "version": "0.10.7-dev.202607101106.c87f4e3",
3
+ "version": "0.10.7-dev.202607101343.e727d4c",
4
4
  "description": "Public TypeScript authoring contract for Vellum assistant plugins.",
5
5
  "license": "MIT",
6
6
  "type": "module",