@vellumai/plugin-api 0.10.9-staging.1 → 0.10.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 (3) hide show
  1. package/index.d.ts +59 -2
  2. package/index.js +1 -0
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -245,15 +245,15 @@ declare const AssistantActivityStateEventSchema: z.ZodObject<{
245
245
  reason: z.ZodEnum<{
246
246
  thinking_delta: "thinking_delta";
247
247
  generation_cancelled: "generation_cancelled";
248
+ tool_use_start: "tool_use_start";
249
+ message_complete: "message_complete";
248
250
  message_dequeued: "message_dequeued";
249
251
  first_text_delta: "first_text_delta";
250
- tool_use_start: "tool_use_start";
251
252
  preview_start: "preview_start";
252
253
  tool_result_received: "tool_result_received";
253
254
  confirmation_requested: "confirmation_requested";
254
255
  confirmation_resolved: "confirmation_resolved";
255
256
  context_compacting: "context_compacting";
256
- message_complete: "message_complete";
257
257
  error_terminal: "error_terminal";
258
258
  }>;
259
259
  requestId: z.ZodOptional<z.ZodString>;
@@ -4910,6 +4910,63 @@ export declare enum RiskLevel {
4910
4910
  */
4911
4911
  declare type RiskLevel_2 = "safe" | "low" | "medium" | "high" | "critical" | "unknown";
4912
4912
 
4913
+ /**
4914
+ * Run a full conversation agent-loop turn: persist the user message, execute
4915
+ * the agent loop (history, tools, compaction, injections), and return the
4916
+ * assistant's full content-block response.
4917
+ *
4918
+ * When `conversationId` is omitted, a new conversation is created and its ID
4919
+ * is returned in the result.
4920
+ *
4921
+ * Events are fanned out to SSE/event-hub subscribers via `broadcastMessage`
4922
+ * (the same path the daemon's HTTP message route uses) while also being
4923
+ * collected internally so the caller receives the final response content.
4924
+ * For streaming use cases, subscribe to the conversation's events via the
4925
+ * host event hub (`assistantEventHub`).
4926
+ *
4927
+ * If the conversation is currently processing another turn, the message is
4928
+ * queued via `enqueueMessage` and the result carries `queued: true` with
4929
+ * empty content -- the queued turn will execute automatically when the
4930
+ * current turn finishes.
4931
+ */
4932
+ export declare function runConversationTurn(options: RunConversationTurnOptions): Promise<RunConversationTurnResult>;
4933
+
4934
+ export declare interface RunConversationTurnOptions {
4935
+ /**
4936
+ * Conversation to run the turn in. If omitted, a new conversation is
4937
+ * created (its ID is generated with `uuidv7` and returned in the result).
4938
+ */
4939
+ conversationId?: string;
4940
+ /**
4941
+ * User message content blocks for this turn. Text blocks become the
4942
+ * user message body; image/file blocks are resolved to inline
4943
+ * attachments. Other block types (tool_use, tool_result, thinking) are
4944
+ * ignored as they are not valid user input.
4945
+ */
4946
+ content: ContentBlock[];
4947
+ /**
4948
+ * LLM call-site for inference profile resolution. Defaults to
4949
+ * `"mainAgent"` inside the agent loop when omitted.
4950
+ */
4951
+ callSite?: LLMCallSite;
4952
+ /**
4953
+ * Abort signal. When aborted, the conversation's internal abort
4954
+ * controller fires, terminating the in-flight agent loop.
4955
+ */
4956
+ signal?: AbortSignal;
4957
+ }
4958
+
4959
+ export declare interface RunConversationTurnResult {
4960
+ /** The assistant's full content blocks for this turn (text, tool_use, etc.). */
4961
+ content: ContentBlock[];
4962
+ /** The user message row ID assigned by the persistence layer. */
4963
+ userMessageId: string;
4964
+ /** The conversation this turn ran in. */
4965
+ conversationId: string;
4966
+ /** True when the message was queued because the conversation was busy. */
4967
+ queued?: boolean;
4968
+ }
4969
+
4913
4970
  /**
4914
4971
  * Emitted when the compaction circuit breaker trips. After three consecutive
4915
4972
  * summary-LLM failures (with local fallback covering each), auto-compaction is
package/index.js CHANGED
@@ -26,6 +26,7 @@ export const listInstalledSkills = api.listInstalledSkills;
26
26
  export const parseMessageMetadata = api.parseMessageMetadata;
27
27
  export const resolveMediaSourceData = api.resolveMediaSourceData;
28
28
  export const resolveUserName = api.resolveUserName;
29
+ export const runConversationTurn = api.runConversationTurn;
29
30
  export const searchMessageIdsLexical = api.searchMessageIdsLexical;
30
31
  export const selectedBackendSupportsMultimodal = api.selectedBackendSupportsMultimodal;
31
32
  export const stringifyMessageContent = api.stringifyMessageContent;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vellumai/plugin-api",
3
- "version": "0.10.9-staging.1",
3
+ "version": "0.10.9",
4
4
  "description": "Public TypeScript authoring contract for Vellum assistant plugins.",
5
5
  "license": "MIT",
6
6
  "type": "module",