@vellumai/plugin-api 0.11.2-dev.202608060701.ede4331 → 0.11.2-dev.202608062308.5442cf1

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 +79 -0
  2. package/index.js +1 -0
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -515,6 +515,11 @@ declare const AssistantConfigSchema: z.ZodObject<{
515
515
  }, z.core.$strip>>;
516
516
  }, z.core.$strip>>;
517
517
  retrospective: z.ZodDefault<z.ZodObject<{
518
+ enabled: z.ZodDefault<z.ZodBoolean>;
519
+ forkStrategy: z.ZodDefault<z.ZodEnum<{
520
+ cloning: "cloning";
521
+ reference: "reference";
522
+ }>>;
518
523
  timeThresholdMs: z.ZodDefault<z.ZodNumber>;
519
524
  messageThreshold: z.ZodDefault<z.ZodNumber>;
520
525
  minCooldownMs: z.ZodDefault<z.ZodNumber>;
@@ -1101,6 +1106,7 @@ declare const AssistantConfigSchema: z.ZodObject<{
1101
1106
  botId: z.ZodDefault<z.ZodString>;
1102
1107
  botUsername: z.ZodDefault<z.ZodString>;
1103
1108
  apiBaseUrl: z.ZodDefault<z.ZodString>;
1109
+ registeredWebhookUrl: z.ZodOptional<z.ZodString>;
1104
1110
  deliverAuthBypass: z.ZodDefault<z.ZodBoolean>;
1105
1111
  timeoutMs: z.ZodDefault<z.ZodNumber>;
1106
1112
  maxRetries: z.ZodDefault<z.ZodNumber>;
@@ -1193,6 +1199,18 @@ declare const AssistantConfigSchema: z.ZodObject<{
1193
1199
  journalRetentionDays: z.ZodDefault<z.ZodNumber>;
1194
1200
  }, z.core.$strip>>;
1195
1201
  plugins: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1202
+ pluginUpdates: z.ZodDefault<z.ZodObject<{
1203
+ mode: z.ZodDefault<z.ZodEnum<{
1204
+ auto: "auto";
1205
+ manual: "manual";
1206
+ }>>;
1207
+ strategy: z.ZodDefault<z.ZodEnum<{
1208
+ theirs: "theirs";
1209
+ ours: "ours";
1210
+ overwrite: "overwrite";
1211
+ }>>;
1212
+ checkIntervalMs: z.ZodDefault<z.ZodNumber>;
1213
+ }, z.core.$strip>>;
1196
1214
  legacyTelemetryOptOut: z.ZodOptional<z.ZodBoolean>;
1197
1215
  legacyDiagnosticsOptOut: z.ZodOptional<z.ZodBoolean>;
1198
1216
  maxStepsPerSession: z.ZodDefault<z.ZodNumber>;
@@ -4156,6 +4174,8 @@ export declare interface ConversationRow {
4156
4174
  originInterface: string | null;
4157
4175
  forkParentConversationId: string | null;
4158
4176
  forkParentMessageId: string | null;
4177
+ /** `"reference"` on referential forks; `"cloning"` or null on copied ones. */
4178
+ forkStrategy: string | null;
4159
4179
  isAutoTitle: number;
4160
4180
  scheduleJobId: string | null;
4161
4181
  lastMessageAt: number | null;
@@ -4752,6 +4772,19 @@ declare interface LiveVoiceErrorServerFrame extends LiveVoiceServerFrameBase {
4752
4772
  readonly type: "error";
4753
4773
  readonly code: LiveVoiceProtocolErrorCode;
4754
4774
  readonly message: string;
4775
+ /**
4776
+ * The client frame this error is about, when the failure was a parse or
4777
+ * validation failure of a specific frame. Absent otherwise, and absent from
4778
+ * daemons predating the field.
4779
+ *
4780
+ * It exists so an `unknown_type` is attributable. A client that sends more
4781
+ * than one optional frame (today: `update_config` and `attach_image`) gets
4782
+ * the same code for either, and without this has to assume which one was
4783
+ * refused. The wrong assumption is silent in both directions: settings stop
4784
+ * applying for a session, or a photo the user watched themselves take is
4785
+ * dropped with nothing said.
4786
+ */
4787
+ readonly frameType?: string;
4755
4788
  /**
4756
4789
  * True when the session continues past the error (e.g. a transient
4757
4790
  * transcriber blip or one failed TTS segment). Absent (including on frames
@@ -5919,6 +5952,20 @@ export declare function resolveMediaSourceData(source: MediaSource_2): {
5919
5952
  */
5920
5953
  export declare function resolveUserName(workspaceDir: string): string | null;
5921
5954
 
5955
+ /**
5956
+ * Resolve the public URL a third party should deliver to for `path`.
5957
+ *
5958
+ * On the managed branches this registers a callback route with the platform,
5959
+ * which is idempotent and matches what `assistant webhooks register` does.
5960
+ *
5961
+ * @throws when the plugin cannot be determined, when `path` is not one the
5962
+ * gateway would serve, or when no ingress is configured and the assistant is
5963
+ * not connected to the platform. That last case has no URL that would work,
5964
+ * and a plausible one would produce a vendor registration that silently
5965
+ * receives nothing.
5966
+ */
5967
+ export declare function resolveWebhookUrl(options: WebhookUrlOptions): Promise<string>;
5968
+
5922
5969
  export declare enum RiskLevel {
5923
5970
  Low = "low",
5924
5971
  Medium = "medium",
@@ -7288,6 +7335,38 @@ declare interface WebFetchMetadata {
7288
7335
  /** Provider that backed a `web_fetch` call. `default` is the built-in fetcher. */
7289
7336
  declare type WebFetchProviderId = "default" | "firecrawl";
7290
7337
 
7338
+ /**
7339
+ * Public URL resolution for a plugin's own ingress route.
7340
+ *
7341
+ * A plugin that receives third-party webhooks has to tell the vendor where to
7342
+ * deliver. Which URL is correct depends on how the assistant is reachable:
7343
+ * a platform pod and a platform-connected assistant are served through a
7344
+ * managed callback route, while a self-hosted deployment is served through its
7345
+ * configured public ingress. `ingress.publicBaseUrl` alone does not decide it,
7346
+ * because on a platform-connected assistant that value holds the Velay tunnel
7347
+ * address, which is not where plugin routes are served.
7348
+ *
7349
+ * `resolveCallbackUrl` owns that decision for every caller in the codebase
7350
+ * (`webhooks register`, the Telegram webhook manager). This exposes it to
7351
+ * plugins so there is one implementation rather than one per plugin.
7352
+ */
7353
+ export declare interface WebhookUrlOptions {
7354
+ /**
7355
+ * Route path within the plugin's namespace, such as `"events-photon"`.
7356
+ * Relative, with no leading slash.
7357
+ */
7358
+ path: string;
7359
+ /**
7360
+ * Plugin whose namespace the route belongs to.
7361
+ *
7362
+ * Defaults to the plugin in context, which covers hooks and tools. Supply it
7363
+ * explicitly from a plugin route handler, where no context is established.
7364
+ */
7365
+ plugin?: string;
7366
+ /** Human-readable label for the platform's admin display. */
7367
+ sourceIdentifier?: string;
7368
+ }
7369
+
7291
7370
  declare interface WebSearchMetadata {
7292
7371
  query: string;
7293
7372
  provider: WebSearchProviderId;
package/index.js CHANGED
@@ -45,6 +45,7 @@ export const removeDocument = api.removeDocument;
45
45
  export const resolveCredential = api.resolveCredential;
46
46
  export const resolveMediaSourceData = api.resolveMediaSourceData;
47
47
  export const resolveUserName = api.resolveUserName;
48
+ export const resolveWebhookUrl = api.resolveWebhookUrl;
48
49
  export const runConversationTurn = api.runConversationTurn;
49
50
  export const searchMessageIdsLexical = api.searchMessageIdsLexical;
50
51
  export const selectedBackendSupportsMultimodal = api.selectedBackendSupportsMultimodal;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vellumai/plugin-api",
3
- "version": "0.11.2-dev.202608060701.ede4331",
3
+ "version": "0.11.2-dev.202608062308.5442cf1",
4
4
  "description": "Public TypeScript authoring contract for Vellum assistant plugins.",
5
5
  "license": "MIT",
6
6
  "type": "module",