@vellumai/plugin-api 0.10.11-dev.202607221520.024d846 → 0.10.11-dev.202607221636.b1b80c3

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 +70 -58
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -1,64 +1,80 @@
1
1
  import { z } from 'zod';
2
2
 
3
- declare type _AcpServerMessages = AcpSessionSpawned | AcpSessionUpdate | AcpSessionCompleted | AcpSessionError | AcpSessionUsage;
3
+ declare type _AcpServerMessages = AcpSessionSpawnedEvent | AcpSessionUpdateEvent | AcpSessionCompletedEvent | AcpSessionErrorEvent | AcpSessionUsageEvent;
4
4
 
5
- declare interface AcpSessionCompleted {
6
- type: "acp_session_completed";
7
- acpSessionId: string;
8
- stopReason: "end_turn" | "max_tokens" | "max_turn_requests" | "refusal" | "cancelled";
9
- }
5
+ declare type AcpSessionCompletedEvent = z.infer<typeof AcpSessionCompletedEventSchema>;
10
6
 
11
- declare interface AcpSessionError {
12
- type: "acp_session_error";
13
- acpSessionId: string;
14
- error: string;
15
- }
7
+ declare const AcpSessionCompletedEventSchema: z.ZodObject<{
8
+ type: z.ZodLiteral<"acp_session_completed">;
9
+ acpSessionId: z.ZodString;
10
+ stopReason: z.ZodEnum<{
11
+ cancelled: "cancelled";
12
+ end_turn: "end_turn";
13
+ max_tokens: "max_tokens";
14
+ max_turn_requests: "max_turn_requests";
15
+ refusal: "refusal";
16
+ }>;
17
+ }, z.core.$strict>;
16
18
 
17
- declare interface AcpSessionSpawned {
18
- type: "acp_session_spawned";
19
- acpSessionId: string;
20
- agent: string;
21
- parentConversationId: string;
22
- /** Tool-use id of the `acp_spawn` call that spawned this session. */
23
- parentToolUseId?: string;
24
- /** Objective text for the spawned session. */
25
- task?: string;
26
- }
19
+ declare type AcpSessionErrorEvent = z.infer<typeof AcpSessionErrorEventSchema>;
27
20
 
28
- declare interface AcpSessionUpdate {
29
- type: "acp_session_update";
30
- acpSessionId: string;
31
- updateType: "agent_message_chunk" | "agent_thought_chunk" | "user_message_chunk" | "tool_call" | "tool_call_update" | "plan";
32
- content?: string;
33
- toolCallId?: string;
34
- toolTitle?: string;
35
- toolKind?: string;
36
- toolStatus?: string;
37
- /** Optional raw input parameters sent to the tool (ACP `rawInput`); shape is tool-specific. */
38
- rawInput?: unknown;
39
- /** Optional raw output returned by the tool (ACP `rawOutput`); shape is tool-specific. */
40
- rawOutput?: unknown;
41
- /** Files touched by this tool call (for the file-diff affordance). */
42
- locations?: {
43
- path: string;
44
- line?: number;
45
- }[];
46
- /** Stable id for the message this chunk belongs to. */
47
- messageId?: string;
48
- /** Monotonic ordering hint within the session. */
49
- seq?: number;
50
- }
21
+ declare const AcpSessionErrorEventSchema: z.ZodObject<{
22
+ type: z.ZodLiteral<"acp_session_error">;
23
+ acpSessionId: z.ZodString;
24
+ error: z.ZodString;
25
+ }, z.core.$strict>;
51
26
 
52
- declare interface AcpSessionUsage {
53
- type: "acp_session_usage";
54
- acpSessionId: string;
55
- usedTokens: number;
56
- contextSize: number;
57
- costAmount?: number;
58
- costCurrency?: string;
59
- inputTokens?: number;
60
- outputTokens?: number;
61
- }
27
+ declare type AcpSessionSpawnedEvent = z.infer<typeof AcpSessionSpawnedEventSchema>;
28
+
29
+ declare const AcpSessionSpawnedEventSchema: z.ZodObject<{
30
+ type: z.ZodLiteral<"acp_session_spawned">;
31
+ acpSessionId: z.ZodString;
32
+ agent: z.ZodString;
33
+ parentConversationId: z.ZodString;
34
+ parentToolUseId: z.ZodOptional<z.ZodString>;
35
+ task: z.ZodOptional<z.ZodString>;
36
+ }, z.core.$strict>;
37
+
38
+ declare type AcpSessionUpdateEvent = z.infer<typeof AcpSessionUpdateEventSchema>;
39
+
40
+ declare const AcpSessionUpdateEventSchema: z.ZodObject<{
41
+ type: z.ZodLiteral<"acp_session_update">;
42
+ acpSessionId: z.ZodString;
43
+ updateType: z.ZodEnum<{
44
+ plan: "plan";
45
+ agent_message_chunk: "agent_message_chunk";
46
+ agent_thought_chunk: "agent_thought_chunk";
47
+ user_message_chunk: "user_message_chunk";
48
+ tool_call: "tool_call";
49
+ tool_call_update: "tool_call_update";
50
+ }>;
51
+ content: z.ZodOptional<z.ZodString>;
52
+ toolCallId: z.ZodOptional<z.ZodString>;
53
+ toolTitle: z.ZodOptional<z.ZodString>;
54
+ toolKind: z.ZodOptional<z.ZodString>;
55
+ toolStatus: z.ZodOptional<z.ZodString>;
56
+ rawInput: z.ZodOptional<z.ZodUnknown>;
57
+ rawOutput: z.ZodOptional<z.ZodUnknown>;
58
+ locations: z.ZodOptional<z.ZodArray<z.ZodObject<{
59
+ path: z.ZodString;
60
+ line: z.ZodOptional<z.ZodNumber>;
61
+ }, z.core.$strip>>>;
62
+ messageId: z.ZodOptional<z.ZodString>;
63
+ seq: z.ZodOptional<z.ZodNumber>;
64
+ }, z.core.$strict>;
65
+
66
+ declare type AcpSessionUsageEvent = z.infer<typeof AcpSessionUsageEventSchema>;
67
+
68
+ declare const AcpSessionUsageEventSchema: z.ZodObject<{
69
+ type: z.ZodLiteral<"acp_session_usage">;
70
+ acpSessionId: z.ZodString;
71
+ usedTokens: z.ZodNumber;
72
+ contextSize: z.ZodNumber;
73
+ inputTokens: z.ZodOptional<z.ZodNumber>;
74
+ outputTokens: z.ZodOptional<z.ZodNumber>;
75
+ costAmount: z.ZodOptional<z.ZodNumber>;
76
+ costCurrency: z.ZodOptional<z.ZodString>;
77
+ }, z.core.$strict>;
62
78
 
63
79
  /**
64
80
  * Append a message to a conversation. This is the low-level insert: it
@@ -286,10 +302,6 @@ declare const AssistantConfigSchema: z.ZodObject<{
286
302
  model: z.ZodDefault<z.ZodString>;
287
303
  }, z.core.$strip>>;
288
304
  "web-search": z.ZodDefault<z.ZodObject<{
289
- mode: z.ZodDefault<z.ZodEnum<{
290
- managed: "managed";
291
- "your-own": "your-own";
292
- }>>;
293
305
  provider: z.ZodDefault<z.ZodEnum<{
294
306
  [x: string]: string;
295
307
  }>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vellumai/plugin-api",
3
- "version": "0.10.11-dev.202607221520.024d846",
3
+ "version": "0.10.11-dev.202607221636.b1b80c3",
4
4
  "description": "Public TypeScript authoring contract for Vellum assistant plugins.",
5
5
  "license": "MIT",
6
6
  "type": "module",