terse-types 0.0.4 → 0.0.6

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.
@@ -130,6 +130,7 @@ export declare const ApiRoutes: {
130
130
  VERIFY_JOB_SERVER: string;
131
131
  TOOL_EXECUTE: string;
132
132
  TOOL_DEFINITIONS: string;
133
+ RUN_TRIGGER_EVENT: string;
133
134
  AGENT_RUN: string;
134
135
  APPROVAL_DECISION: string;
135
136
  SESSION_EVENTS: string;
@@ -160,6 +161,7 @@ export declare const ApiRoutes: {
160
161
  };
161
162
  REFRESH_TOKENS: string;
162
163
  REVIEW_AGENTS: string;
164
+ CLEANUP_SDK_IMAGES: string;
163
165
  USERS: {
164
166
  CREATE: string;
165
167
  BY_ID: string;
@@ -130,6 +130,7 @@
130
130
  "VERIFY_JOB_SERVER": "/sdk/agents/:agentId/verify-job-server",
131
131
  "TOOL_EXECUTE": "/sdk/tool-execute",
132
132
  "TOOL_DEFINITIONS": "/sdk/tool-definitions",
133
+ "RUN_TRIGGER_EVENT": "/sdk/runs/:runId/trigger-event",
133
134
  "AGENT_RUN": "/sdk/agent-run",
134
135
  "APPROVAL_DECISION": "/sdk/approval-decision",
135
136
  "SESSION_EVENTS": "/sdk/session-events",
@@ -160,6 +161,7 @@
160
161
  },
161
162
  "REFRESH_TOKENS": "/refresh-tokens",
162
163
  "REVIEW_AGENTS": "/review-agents",
164
+ "CLEANUP_SDK_IMAGES": "/cleanup-sdk-images",
163
165
  "USERS": {
164
166
  "CREATE": "/users",
165
167
  "BY_ID": "/users/:id"
@@ -19,13 +19,27 @@ export declare const changedItemSchema: z.ZodObject<{
19
19
  export type ChangedItem = z.infer<typeof changedItemSchema>;
20
20
  export declare const runErrorSchema: z.ZodObject<{
21
21
  type: z.ZodLiteral<"RunError">;
22
+ id: z.ZodOptional<z.ZodString>;
22
23
  error: z.ZodString;
23
24
  code: z.ZodOptional<z.ZodString>;
24
25
  timestamp: z.ZodNumber;
25
26
  }, z.core.$strip>;
26
27
  export type RunError = z.infer<typeof runErrorSchema>;
28
+ export declare const processOutputSchema: z.ZodObject<{
29
+ type: z.ZodLiteral<"ProcessOutput">;
30
+ id: z.ZodOptional<z.ZodString>;
31
+ stream: z.ZodEnum<{
32
+ stdout: "stdout";
33
+ stderr: "stderr";
34
+ }>;
35
+ content: z.ZodString;
36
+ label: z.ZodString;
37
+ timestamp: z.ZodNumber;
38
+ }, z.core.$strip>;
39
+ export type ProcessOutput = z.infer<typeof processOutputSchema>;
27
40
  export declare const cancelledSchema: z.ZodObject<{
28
41
  type: z.ZodLiteral<"Cancelled">;
42
+ id: z.ZodOptional<z.ZodString>;
29
43
  reason: z.ZodOptional<z.ZodString>;
30
44
  timestamp: z.ZodNumber;
31
45
  }, z.core.$strip>;
@@ -39,11 +53,13 @@ export type FunctionCall = z.infer<typeof functionCallSchema>;
39
53
  export declare const naturalStopSchema: z.ZodObject<{
40
54
  step_id: z.ZodString;
41
55
  type: z.ZodLiteral<"NaturalStop">;
56
+ id: z.ZodOptional<z.ZodString>;
42
57
  timestamp: z.ZodNumber;
43
58
  }, z.core.$strip>;
44
59
  export type NaturalStop = z.infer<typeof naturalStopSchema>;
45
60
  export declare const sendModelRequestSchema: z.ZodObject<{
46
61
  type: z.ZodLiteral<"SendModelRequest">;
62
+ id: z.ZodOptional<z.ZodString>;
47
63
  user_message: z.ZodString;
48
64
  timezone: z.ZodString;
49
65
  ui_state: z.ZodOptional<z.ZodString>;
@@ -54,6 +70,7 @@ export type SendModelRequest = z.infer<typeof sendModelRequestSchema>;
54
70
  export declare const toolApprovalResponseSchema: z.ZodObject<{
55
71
  step_id: z.ZodString;
56
72
  type: z.ZodLiteral<"ToolApprovalResponse">;
73
+ id: z.ZodOptional<z.ZodString>;
57
74
  approved: z.ZodBoolean;
58
75
  rejection_reason: z.ZodOptional<z.ZodString>;
59
76
  timestamp: z.ZodNumber;
@@ -62,6 +79,7 @@ export type ToolApprovalResponse = z.infer<typeof toolApprovalResponseSchema>;
62
79
  export declare const toolApprovalRequestSchema: z.ZodObject<{
63
80
  step_id: z.ZodString;
64
81
  type: z.ZodLiteral<"ToolApprovalRequest">;
82
+ id: z.ZodOptional<z.ZodString>;
65
83
  name: z.ZodString;
66
84
  arguments: z.ZodString;
67
85
  timestamp: z.ZodNumber;
@@ -71,6 +89,7 @@ export declare const textDeltaSchema: z.ZodObject<{
71
89
  delta: z.ZodString;
72
90
  step_id: z.ZodString;
73
91
  type: z.ZodLiteral<"TextDelta">;
92
+ id: z.ZodOptional<z.ZodString>;
74
93
  timestamp: z.ZodNumber;
75
94
  }, z.core.$strip>;
76
95
  export type TextDelta = z.infer<typeof textDeltaSchema>;
@@ -78,6 +97,7 @@ export declare const toolCallGeneratingSchema: z.ZodObject<{
78
97
  tool_name: z.ZodString;
79
98
  step_id: z.ZodString;
80
99
  type: z.ZodLiteral<"ToolCallGenerating">;
100
+ id: z.ZodOptional<z.ZodString>;
81
101
  timestamp: z.ZodNumber;
82
102
  }, z.core.$strip>;
83
103
  export type ToolCallGenerating = z.infer<typeof toolCallGeneratingSchema>;
@@ -85,6 +105,7 @@ export declare const toolCallSchema: z.ZodObject<{
85
105
  summary: z.ZodString;
86
106
  step_id: z.ZodString;
87
107
  type: z.ZodLiteral<"ToolCall">;
108
+ id: z.ZodOptional<z.ZodString>;
88
109
  parameters: z.ZodString;
89
110
  integration: z.ZodString;
90
111
  timestamp: z.ZodNumber;
@@ -93,6 +114,7 @@ export type ToolCall = z.infer<typeof toolCallSchema>;
93
114
  export declare const thinkingSchema: z.ZodObject<{
94
115
  step_id: z.ZodString;
95
116
  type: z.ZodLiteral<"Thinking">;
117
+ id: z.ZodOptional<z.ZodString>;
96
118
  timestamp: z.ZodNumber;
97
119
  }, z.core.$strip>;
98
120
  export type Thinking = z.infer<typeof thinkingSchema>;
@@ -109,6 +131,7 @@ export declare const toolCallCompleteSchema: z.ZodObject<{
109
131
  status: z.ZodEnum<typeof ToolCallExecutionStatus>;
110
132
  step_id: z.ZodString;
111
133
  type: z.ZodLiteral<"ToolCallComplete">;
134
+ id: z.ZodOptional<z.ZodString>;
112
135
  changed_items: z.ZodArray<z.ZodObject<{
113
136
  type_name: z.ZodEnum<typeof EntityType>;
114
137
  id: z.ZodString;
@@ -128,6 +151,7 @@ export declare const filterResultSchema: z.ZodObject<{
128
151
  confidence: z.ZodNumber;
129
152
  step_id: z.ZodString;
130
153
  type: z.ZodLiteral<"FilterResult">;
154
+ id: z.ZodOptional<z.ZodString>;
131
155
  timestamp: z.ZodNumber;
132
156
  }, z.core.$strip>;
133
157
  export type FilterResult = z.infer<typeof filterResultSchema>;
@@ -142,6 +166,7 @@ export declare const sandboxStageSchema: z.ZodEnum<typeof SandboxStage>;
142
166
  export declare const SANDBOX_STAGE_LABELS: Record<SandboxStage, string>;
143
167
  export declare const userMessageSchema: z.ZodObject<{
144
168
  type: z.ZodLiteral<"UserMessage">;
169
+ id: z.ZodOptional<z.ZodString>;
145
170
  message: z.ZodString;
146
171
  step_id: z.ZodString;
147
172
  client_turn_id: z.ZodString;
@@ -250,6 +275,7 @@ export declare const chatSnippetSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
250
275
  export type ChatSnippet = z.infer<typeof chatSnippetSchema>;
251
276
  export declare const modelEventChatSnippetSchema: z.ZodObject<{
252
277
  type: z.ZodLiteral<"Snippet">;
278
+ id: z.ZodOptional<z.ZodString>;
253
279
  timestamp: z.ZodNumber;
254
280
  snippet: z.ZodDiscriminatedUnion<[z.ZodObject<{
255
281
  type: z.ZodLiteral<"button">;
@@ -295,12 +321,14 @@ export declare const modelEventChatSnippetSchema: z.ZodObject<{
295
321
  export declare const modelEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
296
322
  step_id: z.ZodString;
297
323
  type: z.ZodLiteral<"ToolApprovalResponse">;
324
+ id: z.ZodOptional<z.ZodString>;
298
325
  approved: z.ZodBoolean;
299
326
  rejection_reason: z.ZodOptional<z.ZodString>;
300
327
  timestamp: z.ZodNumber;
301
328
  }, z.core.$strip>, z.ZodObject<{
302
329
  step_id: z.ZodString;
303
330
  type: z.ZodLiteral<"ToolApprovalRequest">;
331
+ id: z.ZodOptional<z.ZodString>;
304
332
  name: z.ZodString;
305
333
  arguments: z.ZodString;
306
334
  timestamp: z.ZodNumber;
@@ -308,11 +336,13 @@ export declare const modelEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
308
336
  tool_name: z.ZodString;
309
337
  step_id: z.ZodString;
310
338
  type: z.ZodLiteral<"ToolCallGenerating">;
339
+ id: z.ZodOptional<z.ZodString>;
311
340
  timestamp: z.ZodNumber;
312
341
  }, z.core.$strip>, z.ZodObject<{
313
342
  summary: z.ZodString;
314
343
  step_id: z.ZodString;
315
344
  type: z.ZodLiteral<"ToolCall">;
345
+ id: z.ZodOptional<z.ZodString>;
316
346
  parameters: z.ZodString;
317
347
  integration: z.ZodString;
318
348
  timestamp: z.ZodNumber;
@@ -322,6 +352,7 @@ export declare const modelEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
322
352
  status: z.ZodEnum<typeof ToolCallExecutionStatus>;
323
353
  step_id: z.ZodString;
324
354
  type: z.ZodLiteral<"ToolCallComplete">;
355
+ id: z.ZodOptional<z.ZodString>;
325
356
  changed_items: z.ZodArray<z.ZodObject<{
326
357
  type_name: z.ZodEnum<typeof EntityType>;
327
358
  id: z.ZodString;
@@ -337,19 +368,23 @@ export declare const modelEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
337
368
  delta: z.ZodString;
338
369
  step_id: z.ZodString;
339
370
  type: z.ZodLiteral<"TextDelta">;
371
+ id: z.ZodOptional<z.ZodString>;
340
372
  timestamp: z.ZodNumber;
341
373
  }, z.core.$strip>, z.ZodObject<{
342
374
  type: z.ZodLiteral<"RunError">;
375
+ id: z.ZodOptional<z.ZodString>;
343
376
  error: z.ZodString;
344
377
  code: z.ZodOptional<z.ZodString>;
345
378
  timestamp: z.ZodNumber;
346
379
  }, z.core.$strip>, z.ZodObject<{
347
380
  type: z.ZodLiteral<"Cancelled">;
381
+ id: z.ZodOptional<z.ZodString>;
348
382
  reason: z.ZodOptional<z.ZodString>;
349
383
  timestamp: z.ZodNumber;
350
384
  }, z.core.$strip>, z.ZodObject<{
351
385
  step_id: z.ZodString;
352
386
  type: z.ZodLiteral<"NaturalStop">;
387
+ id: z.ZodOptional<z.ZodString>;
353
388
  timestamp: z.ZodNumber;
354
389
  }, z.core.$strip>, z.ZodObject<{
355
390
  isRelevant: z.ZodBoolean;
@@ -357,9 +392,11 @@ export declare const modelEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
357
392
  confidence: z.ZodNumber;
358
393
  step_id: z.ZodString;
359
394
  type: z.ZodLiteral<"FilterResult">;
395
+ id: z.ZodOptional<z.ZodString>;
360
396
  timestamp: z.ZodNumber;
361
397
  }, z.core.$strip>, z.ZodObject<{
362
398
  type: z.ZodLiteral<"UserMessage">;
399
+ id: z.ZodOptional<z.ZodString>;
363
400
  message: z.ZodString;
364
401
  step_id: z.ZodString;
365
402
  client_turn_id: z.ZodString;
@@ -367,9 +404,11 @@ export declare const modelEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
367
404
  }, z.core.$strip>, z.ZodObject<{
368
405
  step_id: z.ZodString;
369
406
  type: z.ZodLiteral<"Thinking">;
407
+ id: z.ZodOptional<z.ZodString>;
370
408
  timestamp: z.ZodNumber;
371
409
  }, z.core.$strip>, z.ZodObject<{
372
410
  type: z.ZodLiteral<"Snippet">;
411
+ id: z.ZodOptional<z.ZodString>;
373
412
  timestamp: z.ZodNumber;
374
413
  snippet: z.ZodDiscriminatedUnion<[z.ZodObject<{
375
414
  type: z.ZodLiteral<"button">;
@@ -411,10 +450,21 @@ export declare const modelEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
411
450
  step_id: z.ZodOptional<z.ZodString>;
412
451
  selectedValue: z.ZodOptional<z.ZodString>;
413
452
  }, z.core.$strip>], "type">;
453
+ }, z.core.$strip>, z.ZodObject<{
454
+ type: z.ZodLiteral<"ProcessOutput">;
455
+ id: z.ZodOptional<z.ZodString>;
456
+ stream: z.ZodEnum<{
457
+ stdout: "stdout";
458
+ stderr: "stderr";
459
+ }>;
460
+ content: z.ZodString;
461
+ label: z.ZodString;
462
+ timestamp: z.ZodNumber;
414
463
  }, z.core.$strip>], "type">;
415
464
  export type ModelEvent = z.infer<typeof modelEventSchema>;
416
465
  export declare const modelRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
417
466
  type: z.ZodLiteral<"SendModelRequest">;
467
+ id: z.ZodOptional<z.ZodString>;
418
468
  user_message: z.ZodString;
419
469
  timezone: z.ZodString;
420
470
  ui_state: z.ZodOptional<z.ZodString>;
@@ -423,6 +473,7 @@ export declare const modelRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
423
473
  }, z.core.$strip>, z.ZodObject<{
424
474
  step_id: z.ZodString;
425
475
  type: z.ZodLiteral<"ToolApprovalResponse">;
476
+ id: z.ZodOptional<z.ZodString>;
426
477
  approved: z.ZodBoolean;
427
478
  rejection_reason: z.ZodOptional<z.ZodString>;
428
479
  timestamp: z.ZodNumber;
@@ -18,12 +18,22 @@ export const changedItemSchema = z.object({
18
18
  });
19
19
  export const runErrorSchema = z.object({
20
20
  type: z.literal("RunError"),
21
+ id: z.string().optional(),
21
22
  error: z.string(),
22
23
  code: z.string().optional(),
23
24
  timestamp: z.number()
24
25
  });
26
+ export const processOutputSchema = z.object({
27
+ type: z.literal("ProcessOutput"),
28
+ id: z.string().optional(),
29
+ stream: z.enum(["stdout", "stderr"]),
30
+ content: z.string(),
31
+ label: z.string(),
32
+ timestamp: z.number()
33
+ });
25
34
  export const cancelledSchema = z.object({
26
35
  type: z.literal("Cancelled"),
36
+ id: z.string().optional(),
27
37
  reason: z.string().optional(),
28
38
  timestamp: z.number()
29
39
  });
@@ -35,10 +45,12 @@ export const functionCallSchema = z.object({
35
45
  export const naturalStopSchema = z.object({
36
46
  step_id: z.string(),
37
47
  type: z.literal("NaturalStop"),
48
+ id: z.string().optional(),
38
49
  timestamp: z.number()
39
50
  });
40
51
  export const sendModelRequestSchema = z.object({
41
52
  type: z.literal("SendModelRequest"),
53
+ id: z.string().optional(),
42
54
  user_message: z.string(),
43
55
  timezone: z.string(),
44
56
  ui_state: z.string().optional(),
@@ -48,6 +60,7 @@ export const sendModelRequestSchema = z.object({
48
60
  export const toolApprovalResponseSchema = z.object({
49
61
  step_id: z.string(),
50
62
  type: z.literal("ToolApprovalResponse"),
63
+ id: z.string().optional(),
51
64
  approved: z.boolean(),
52
65
  rejection_reason: z.string().optional(),
53
66
  timestamp: z.number()
@@ -55,6 +68,7 @@ export const toolApprovalResponseSchema = z.object({
55
68
  export const toolApprovalRequestSchema = z.object({
56
69
  step_id: z.string(),
57
70
  type: z.literal("ToolApprovalRequest"),
71
+ id: z.string().optional(),
58
72
  name: z.string(),
59
73
  arguments: z.string(),
60
74
  timestamp: z.number()
@@ -63,18 +77,21 @@ export const textDeltaSchema = z.object({
63
77
  delta: z.string(),
64
78
  step_id: z.string(),
65
79
  type: z.literal("TextDelta"),
80
+ id: z.string().optional(),
66
81
  timestamp: z.number()
67
82
  });
68
83
  export const toolCallGeneratingSchema = z.object({
69
84
  tool_name: z.string(),
70
85
  step_id: z.string(),
71
86
  type: z.literal("ToolCallGenerating"),
87
+ id: z.string().optional(),
72
88
  timestamp: z.number()
73
89
  });
74
90
  export const toolCallSchema = z.object({
75
91
  summary: z.string(),
76
92
  step_id: z.string(),
77
93
  type: z.literal("ToolCall"),
94
+ id: z.string().optional(),
78
95
  parameters: z.string(),
79
96
  integration: z.string(),
80
97
  timestamp: z.number()
@@ -82,6 +99,7 @@ export const toolCallSchema = z.object({
82
99
  export const thinkingSchema = z.object({
83
100
  step_id: z.string(),
84
101
  type: z.literal("Thinking"),
102
+ id: z.string().optional(),
85
103
  timestamp: z.number()
86
104
  });
87
105
  export var ToolCallExecutionStatus;
@@ -98,6 +116,7 @@ export const toolCallCompleteSchema = z.object({
98
116
  status: toolCallExecutionStatusSchema,
99
117
  step_id: z.string(),
100
118
  type: z.literal("ToolCallComplete"),
119
+ id: z.string().optional(),
101
120
  changed_items: z.array(changedItemSchema),
102
121
  integration: z.string(),
103
122
  url: z.string().optional(),
@@ -110,6 +129,7 @@ export const filterResultSchema = z.object({
110
129
  confidence: z.number(),
111
130
  step_id: z.string(),
112
131
  type: z.literal("FilterResult"),
132
+ id: z.string().optional(),
113
133
  timestamp: z.number()
114
134
  });
115
135
  export var SandboxStage;
@@ -130,6 +150,7 @@ export const SANDBOX_STAGE_LABELS = {
130
150
  };
131
151
  export const userMessageSchema = z.object({
132
152
  type: z.literal("UserMessage"),
153
+ id: z.string().optional(),
133
154
  message: z.string(),
134
155
  step_id: z.string(),
135
156
  client_turn_id: z.string(),
@@ -180,6 +201,7 @@ export const chatSnippetSchema = z.discriminatedUnion("type", [
180
201
  ]);
181
202
  export const modelEventChatSnippetSchema = z.object({
182
203
  type: z.literal("Snippet"),
204
+ id: z.string().optional(),
183
205
  timestamp: z.number(),
184
206
  snippet: chatSnippetSchema
185
207
  });
@@ -196,6 +218,7 @@ export const modelEventSchema = z.discriminatedUnion("type", [
196
218
  filterResultSchema,
197
219
  userMessageSchema,
198
220
  thinkingSchema,
199
- modelEventChatSnippetSchema
221
+ modelEventChatSnippetSchema,
222
+ processOutputSchema
200
223
  ]);
201
224
  export const modelRequestSchema = z.discriminatedUnion("type", [sendModelRequestSchema, toolApprovalResponseSchema]);
@@ -991,26 +991,6 @@ const TOOL_DISPLAY_CONFIG = {
991
991
  // ===================
992
992
  // Sandbox Lifecycle
993
993
  // ===================
994
- "Downloading source code": {
995
- preparing: "Downloading source code",
996
- executing: () => "Downloading source code",
997
- complete: (_params, result) => `Downloaded source code${result ? ` (${result})` : ""}`
998
- },
999
- "Booting sandbox": {
1000
- preparing: "Booting sandbox",
1001
- executing: () => "Booting sandbox",
1002
- complete: (_params, result) => `Sandbox booted${result ? ` (${result})` : ""}`
1003
- },
1004
- "Installing dependencies": {
1005
- preparing: "Installing dependencies",
1006
- executing: () => "Installing dependencies",
1007
- complete: (_params, result) => `Dependencies installed${result ? ` (${result})` : ""}`
1008
- },
1009
- "Installing CLI": {
1010
- preparing: "Installing CLI",
1011
- executing: () => "Installing CLI",
1012
- complete: (_params, result) => `CLI installed${result ? ` (${result})` : ""}`
1013
- },
1014
994
  "Running agent": {
1015
995
  preparing: "Running agent",
1016
996
  executing: () => "Running agent",
@@ -2047,11 +2047,13 @@ export type WorkOSTrigger = z.infer<typeof workOSTriggerSchema>;
2047
2047
  export declare const webhookTriggerSchema: z.ZodObject<{
2048
2048
  integrationType: z.ZodLiteral<IntegrationType.WEBHOOK>;
2049
2049
  eventType: z.ZodLiteral<"webhook">;
2050
- body: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2050
+ body: z.ZodUnknown;
2051
2051
  headers: z.ZodRecord<z.ZodString, z.ZodString>;
2052
2052
  method: z.ZodString;
2053
2053
  }, z.core.$strip>;
2054
- export type WebhookTrigger = z.infer<typeof webhookTriggerSchema>;
2054
+ export type WebhookTrigger<TBody = unknown> = Omit<z.infer<typeof webhookTriggerSchema>, "body"> & {
2055
+ body: TBody;
2056
+ };
2055
2057
  export declare const cronTriggerSchema: z.ZodObject<{
2056
2058
  integrationType: z.ZodLiteral<IntegrationType.CRON_JOB>;
2057
2059
  eventType: z.ZodLiteral<"cron">;
@@ -2704,7 +2706,7 @@ export declare const TriggerSchema: z.ZodUnion<readonly [z.ZodDiscriminatedUnion
2704
2706
  }, z.core.$strip>], "eventType">, z.ZodObject<{
2705
2707
  integrationType: z.ZodLiteral<IntegrationType.WEBHOOK>;
2706
2708
  eventType: z.ZodLiteral<"webhook">;
2707
- body: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2709
+ body: z.ZodUnknown;
2708
2710
  headers: z.ZodRecord<z.ZodString, z.ZodString>;
2709
2711
  method: z.ZodString;
2710
2712
  }, z.core.$strip>, z.ZodObject<{
@@ -3362,7 +3364,7 @@ export declare const TriggerArraySchema: z.ZodArray<z.ZodUnion<readonly [z.ZodDi
3362
3364
  }, z.core.$strip>], "eventType">, z.ZodObject<{
3363
3365
  integrationType: z.ZodLiteral<IntegrationType.WEBHOOK>;
3364
3366
  eventType: z.ZodLiteral<"webhook">;
3365
- body: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3367
+ body: z.ZodUnknown;
3366
3368
  headers: z.ZodRecord<z.ZodString, z.ZodString>;
3367
3369
  method: z.ZodString;
3368
3370
  }, z.core.$strip>, z.ZodObject<{
@@ -4047,7 +4049,7 @@ export declare const serializedEventSchema: z.ZodObject<{
4047
4049
  }, z.core.$strip>], "eventType">, z.ZodObject<{
4048
4050
  integrationType: z.ZodLiteral<IntegrationType.WEBHOOK>;
4049
4051
  eventType: z.ZodLiteral<"webhook">;
4050
- body: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4052
+ body: z.ZodUnknown;
4051
4053
  headers: z.ZodRecord<z.ZodString, z.ZodString>;
4052
4054
  method: z.ZodString;
4053
4055
  }, z.core.$strip>, z.ZodObject<{
package/dist/Triggers.js CHANGED
@@ -390,7 +390,7 @@ export const workOSTriggerSchema = z.discriminatedUnion("eventType", [
390
390
  export const webhookTriggerSchema = baseTriggerSchema.extend({
391
391
  integrationType: z.literal(IntegrationType.WEBHOOK),
392
392
  eventType: webhookTriggerTypeSchema,
393
- body: z.record(z.string(), z.unknown()),
393
+ body: z.unknown(),
394
394
  headers: z.record(z.string(), z.string()),
395
395
  method: z.string()
396
396
  });
package/dist/types.d.ts CHANGED
@@ -534,7 +534,7 @@ export declare const agentOutputSchema: z.ZodObject<{
534
534
  export type AgentOutput = z.infer<typeof agentOutputSchema>;
535
535
  export declare const agentPromptSchema: z.ZodObject<{
536
536
  text: z.ZodString;
537
- remoteServerUrl: z.ZodOptional<z.ZodString>;
537
+ remoteServerUrl: z.ZodNullable<z.ZodOptional<z.ZodString>>;
538
538
  }, z.core.$strip>;
539
539
  export type AgentPrompt = z.infer<typeof agentPromptSchema>;
540
540
  export declare const transientAgentTriggerSchema: z.ZodObject<{
@@ -868,7 +868,7 @@ export declare const agentTemplateSchema: z.ZodObject<{
868
868
  chatPrompt: z.ZodString;
869
869
  prompt: z.ZodObject<{
870
870
  text: z.ZodString;
871
- remoteServerUrl: z.ZodOptional<z.ZodString>;
871
+ remoteServerUrl: z.ZodNullable<z.ZodOptional<z.ZodString>>;
872
872
  }, z.core.$strip>;
873
873
  triggers: z.ZodArray<z.ZodObject<{
874
874
  config: z.ZodObject<{
@@ -895,6 +895,11 @@ export declare const runHistoryTriggerSchema: z.ZodObject<{
895
895
  url: z.ZodOptional<z.ZodString>;
896
896
  }, z.core.$strip>;
897
897
  export type RunHistoryTrigger = z.infer<typeof runHistoryTriggerSchema>;
898
+ export type TriggerPayload = {
899
+ triggerEvent: string | null;
900
+ triggerEventType: string | null;
901
+ isTriggerEventTruncated: boolean;
902
+ };
898
903
  export declare const runHistoryDecisionSchema: z.ZodObject<{
899
904
  action: z.ZodEnum<{
900
905
  processed: "processed";
@@ -1027,7 +1032,7 @@ export declare const agentSchema: z.ZodObject<{
1027
1032
  requireApproval: z.ZodBoolean;
1028
1033
  prompt: z.ZodObject<{
1029
1034
  text: z.ZodString;
1030
- remoteServerUrl: z.ZodOptional<z.ZodString>;
1035
+ remoteServerUrl: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1031
1036
  }, z.core.$strip>;
1032
1037
  triggers: z.ZodArray<z.ZodObject<{
1033
1038
  id: z.ZodString;
@@ -1635,7 +1640,7 @@ export declare const agentUpdateSchema: z.ZodObject<{
1635
1640
  }, z.core.$strip>>>;
1636
1641
  prompt: z.ZodOptional<z.ZodObject<{
1637
1642
  text: z.ZodString;
1638
- remoteServerUrl: z.ZodOptional<z.ZodString>;
1643
+ remoteServerUrl: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1639
1644
  }, z.core.$strip>>;
1640
1645
  isActive: z.ZodOptional<z.ZodBoolean>;
1641
1646
  requireApproval: z.ZodOptional<z.ZodBoolean>;
@@ -1658,7 +1663,7 @@ export declare const agentCreateSchema: z.ZodObject<{
1658
1663
  name: z.ZodString;
1659
1664
  prompt: z.ZodObject<{
1660
1665
  text: z.ZodString;
1661
- remoteServerUrl: z.ZodOptional<z.ZodString>;
1666
+ remoteServerUrl: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1662
1667
  }, z.core.$strip>;
1663
1668
  triggers: z.ZodArray<z.ZodObject<{
1664
1669
  id: z.ZodString;
@@ -1971,7 +1976,7 @@ export declare const agentDraftSchema: z.ZodObject<{
1971
1976
  name: z.ZodString;
1972
1977
  prompt: z.ZodObject<{
1973
1978
  text: z.ZodString;
1974
- remoteServerUrl: z.ZodOptional<z.ZodString>;
1979
+ remoteServerUrl: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1975
1980
  }, z.core.$strip>;
1976
1981
  triggers: z.ZodArray<z.ZodObject<{
1977
1982
  id: z.ZodString;
@@ -2295,7 +2300,7 @@ export declare const agentsResponseSchema: z.ZodObject<{
2295
2300
  requireApproval: z.ZodBoolean;
2296
2301
  prompt: z.ZodObject<{
2297
2302
  text: z.ZodString;
2298
- remoteServerUrl: z.ZodOptional<z.ZodString>;
2303
+ remoteServerUrl: z.ZodNullable<z.ZodOptional<z.ZodString>>;
2299
2304
  }, z.core.$strip>;
2300
2305
  triggers: z.ZodArray<z.ZodObject<{
2301
2306
  id: z.ZodString;
@@ -2622,7 +2627,7 @@ export declare const recentAgentSchema: z.ZodObject<{
2622
2627
  requireApproval: z.ZodBoolean;
2623
2628
  prompt: z.ZodObject<{
2624
2629
  text: z.ZodString;
2625
- remoteServerUrl: z.ZodOptional<z.ZodString>;
2630
+ remoteServerUrl: z.ZodNullable<z.ZodOptional<z.ZodString>>;
2626
2631
  }, z.core.$strip>;
2627
2632
  triggers: z.ZodArray<z.ZodObject<{
2628
2633
  id: z.ZodString;
@@ -3946,7 +3951,7 @@ export declare const sdkAgentRunRequestBodySchema: z.ZodObject<{
3946
3951
  }, z.core.$strip>], "eventType">, z.ZodObject<{
3947
3952
  integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.WEBHOOK>;
3948
3953
  eventType: z.ZodLiteral<"webhook">;
3949
- body: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3954
+ body: z.ZodUnknown;
3950
3955
  headers: z.ZodRecord<z.ZodString, z.ZodString>;
3951
3956
  method: z.ZodString;
3952
3957
  }, z.core.$strip>, z.ZodObject<{
@@ -4687,7 +4692,7 @@ export declare const sdkAgentRunNormalizedRequestSchema: z.ZodObject<{
4687
4692
  }, z.core.$strip>], "eventType">, z.ZodObject<{
4688
4693
  integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.WEBHOOK>;
4689
4694
  eventType: z.ZodLiteral<"webhook">;
4690
- body: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4695
+ body: z.ZodUnknown;
4691
4696
  headers: z.ZodRecord<z.ZodString, z.ZodString>;
4692
4697
  method: z.ZodString;
4693
4698
  }, z.core.$strip>, z.ZodObject<{
@@ -5427,7 +5432,7 @@ export declare const sdkAgentRunResponseBodySchema: z.ZodObject<{
5427
5432
  }, z.core.$strip>], "eventType">, z.ZodObject<{
5428
5433
  integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.WEBHOOK>;
5429
5434
  eventType: z.ZodLiteral<"webhook">;
5430
- body: z.ZodRecord<z.ZodString, z.ZodUnknown>;
5435
+ body: z.ZodUnknown;
5431
5436
  headers: z.ZodRecord<z.ZodString, z.ZodString>;
5432
5437
  method: z.ZodString;
5433
5438
  }, z.core.$strip>, z.ZodObject<{
@@ -6063,6 +6068,695 @@ export declare const sdkToolExecuteRequestSchema: z.ZodObject<{
6063
6068
  params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
6064
6069
  }, z.core.$strip>;
6065
6070
  export type SdkToolExecuteRequest = z.infer<typeof sdkToolExecuteRequestSchema>;
6071
+ export declare const sdkRunTriggerEventResponseSchema: z.ZodObject<{
6072
+ event: z.ZodObject<{
6073
+ integrationType: z.ZodEnum<typeof import("./Integrations.js").IntegrationType>;
6074
+ eventType: z.ZodUnion<readonly [z.ZodEnum<{
6075
+ readonly MESSAGE: "message";
6076
+ readonly APP_MENTION: "app_mention";
6077
+ readonly REACTION_ADDED: "reaction_added";
6078
+ }>, z.ZodEnum<{
6079
+ readonly PUSH: "push";
6080
+ readonly PR_OPENED: "pull_request.opened";
6081
+ readonly PR_MERGED: "pull_request.merged";
6082
+ readonly PR_CLOSED: "pull_request.closed";
6083
+ readonly PR_SYNCHRONIZE: "pull_request.synchronize";
6084
+ }>, z.ZodEnum<{
6085
+ readonly ISSUE_CREATED: "issue.created";
6086
+ readonly ISSUE_UPDATED: "issue.updated";
6087
+ readonly COMMENT_CREATED: "comment.created";
6088
+ }>, z.ZodEnum<{
6089
+ readonly EMAIL_RECEIVED: "email.received";
6090
+ }>, z.ZodEnum<{
6091
+ readonly USER_CREATED: "user.created";
6092
+ readonly USER_UPDATED: "user.updated";
6093
+ readonly USER_DELETED: "user.deleted";
6094
+ readonly ORGANIZATION_CREATED: "organization.created";
6095
+ readonly ORGANIZATION_MEMBERSHIP_CREATED: "organization_membership.created";
6096
+ readonly ORGANIZATION_MEMBERSHIP_UPDATED: "organization_membership.updated";
6097
+ readonly ORGANIZATION_MEMBERSHIP_DELETED: "organization_membership.deleted";
6098
+ readonly INVITATION_CREATED: "invitation.created";
6099
+ readonly INVITATION_ACCEPTED: "invitation.accepted";
6100
+ readonly INVITATION_RESENT: "invitation.resent";
6101
+ readonly INVITATION_REVOKED: "invitation.revoked";
6102
+ }>, z.ZodLiteral<"webhook">, z.ZodLiteral<"cron">, z.ZodLiteral<"manual_sample">]>;
6103
+ formattedContent: z.ZodString;
6104
+ debugLog: z.ZodString;
6105
+ data: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
6106
+ integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.SLACK>;
6107
+ channelId: z.ZodString;
6108
+ channelName: z.ZodNullable<z.ZodString>;
6109
+ userId: z.ZodString;
6110
+ userName: z.ZodNullable<z.ZodString>;
6111
+ text: z.ZodString;
6112
+ timestamp: z.ZodString;
6113
+ threadTs: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6114
+ threadTimestamp: z.ZodNullable<z.ZodString>;
6115
+ teamId: z.ZodString;
6116
+ permalink: z.ZodNullable<z.ZodString>;
6117
+ channelType: z.ZodNullable<z.ZodEnum<typeof SlackChannelType>>;
6118
+ blocks: z.ZodNullable<z.ZodArray<z.ZodUnknown>>;
6119
+ attachments: z.ZodNullable<z.ZodArray<z.ZodUnknown>>;
6120
+ files: z.ZodNullable<z.ZodArray<z.ZodUnknown>>;
6121
+ eventType: z.ZodLiteral<"message">;
6122
+ }, z.core.$strip>, z.ZodObject<{
6123
+ integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.SLACK>;
6124
+ channelId: z.ZodString;
6125
+ channelName: z.ZodNullable<z.ZodString>;
6126
+ userId: z.ZodString;
6127
+ userName: z.ZodNullable<z.ZodString>;
6128
+ text: z.ZodString;
6129
+ timestamp: z.ZodString;
6130
+ threadTs: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6131
+ threadTimestamp: z.ZodNullable<z.ZodString>;
6132
+ teamId: z.ZodString;
6133
+ permalink: z.ZodNullable<z.ZodString>;
6134
+ channelType: z.ZodNullable<z.ZodEnum<typeof SlackChannelType>>;
6135
+ blocks: z.ZodNullable<z.ZodArray<z.ZodUnknown>>;
6136
+ attachments: z.ZodNullable<z.ZodArray<z.ZodUnknown>>;
6137
+ files: z.ZodNullable<z.ZodArray<z.ZodUnknown>>;
6138
+ eventType: z.ZodLiteral<"app_mention">;
6139
+ }, z.core.$strip>, z.ZodObject<{
6140
+ integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.SLACK>;
6141
+ channelId: z.ZodString;
6142
+ channelName: z.ZodNullable<z.ZodString>;
6143
+ userId: z.ZodString;
6144
+ userName: z.ZodNullable<z.ZodString>;
6145
+ text: z.ZodString;
6146
+ timestamp: z.ZodString;
6147
+ threadTs: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6148
+ threadTimestamp: z.ZodNullable<z.ZodString>;
6149
+ teamId: z.ZodString;
6150
+ permalink: z.ZodNullable<z.ZodString>;
6151
+ channelType: z.ZodNullable<z.ZodEnum<typeof SlackChannelType>>;
6152
+ blocks: z.ZodNullable<z.ZodArray<z.ZodUnknown>>;
6153
+ attachments: z.ZodNullable<z.ZodArray<z.ZodUnknown>>;
6154
+ files: z.ZodNullable<z.ZodArray<z.ZodUnknown>>;
6155
+ eventType: z.ZodLiteral<"reaction_added">;
6156
+ reaction: z.ZodString;
6157
+ itemType: z.ZodNullable<z.ZodString>;
6158
+ itemUserId: z.ZodNullable<z.ZodString>;
6159
+ itemChannelId: z.ZodNullable<z.ZodString>;
6160
+ itemTimestamp: z.ZodNullable<z.ZodString>;
6161
+ }, z.core.$strip>], "eventType">, z.ZodDiscriminatedUnion<[z.ZodObject<{
6162
+ integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.GITHUB>;
6163
+ username: z.ZodString;
6164
+ installationId: z.ZodNumber;
6165
+ repositoryName: z.ZodString;
6166
+ repository: z.ZodObject<{
6167
+ id: z.ZodNumber;
6168
+ name: z.ZodString;
6169
+ owner: z.ZodString;
6170
+ defaultBranch: z.ZodString;
6171
+ }, z.core.$strip>;
6172
+ sender: z.ZodObject<{
6173
+ login: z.ZodString;
6174
+ email: z.ZodOptional<z.ZodString>;
6175
+ }, z.core.$strip>;
6176
+ eventType: z.ZodLiteral<"push">;
6177
+ branch: z.ZodString;
6178
+ commits: z.ZodArray<z.ZodObject<{
6179
+ sha: z.ZodString;
6180
+ message: z.ZodOptional<z.ZodString>;
6181
+ name: z.ZodString;
6182
+ fileDiffs: z.ZodArray<z.ZodObject<{
6183
+ filename: z.ZodString;
6184
+ diff: z.ZodString;
6185
+ }, z.core.$strip>>;
6186
+ }, z.core.$strip>>;
6187
+ pullRequest: z.ZodOptional<z.ZodUndefined>;
6188
+ }, z.core.$strip>, z.ZodObject<{
6189
+ integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.GITHUB>;
6190
+ username: z.ZodString;
6191
+ installationId: z.ZodNumber;
6192
+ repositoryName: z.ZodString;
6193
+ repository: z.ZodObject<{
6194
+ id: z.ZodNumber;
6195
+ name: z.ZodString;
6196
+ owner: z.ZodString;
6197
+ defaultBranch: z.ZodString;
6198
+ }, z.core.$strip>;
6199
+ sender: z.ZodObject<{
6200
+ login: z.ZodString;
6201
+ email: z.ZodOptional<z.ZodString>;
6202
+ }, z.core.$strip>;
6203
+ pullRequest: z.ZodObject<{
6204
+ id: z.ZodString;
6205
+ number: z.ZodNumber;
6206
+ title: z.ZodString;
6207
+ body: z.ZodOptional<z.ZodString>;
6208
+ state: z.ZodEnum<{
6209
+ open: "open";
6210
+ closed: "closed";
6211
+ }>;
6212
+ merged: z.ZodBoolean;
6213
+ head: z.ZodObject<{
6214
+ ref: z.ZodString;
6215
+ sha: z.ZodString;
6216
+ }, z.core.$strip>;
6217
+ base: z.ZodObject<{
6218
+ ref: z.ZodString;
6219
+ sha: z.ZodString;
6220
+ }, z.core.$strip>;
6221
+ user: z.ZodObject<{
6222
+ login: z.ZodString;
6223
+ email: z.ZodOptional<z.ZodString>;
6224
+ }, z.core.$strip>;
6225
+ author: z.ZodOptional<z.ZodObject<{
6226
+ login: z.ZodString;
6227
+ email: z.ZodOptional<z.ZodString>;
6228
+ }, z.core.$strip>>;
6229
+ url: z.ZodOptional<z.ZodString>;
6230
+ }, z.core.$strip>;
6231
+ branch: z.ZodOptional<z.ZodString>;
6232
+ commits: z.ZodArray<z.ZodObject<{
6233
+ sha: z.ZodString;
6234
+ message: z.ZodOptional<z.ZodString>;
6235
+ name: z.ZodString;
6236
+ fileDiffs: z.ZodArray<z.ZodObject<{
6237
+ filename: z.ZodString;
6238
+ diff: z.ZodString;
6239
+ }, z.core.$strip>>;
6240
+ }, z.core.$strip>>;
6241
+ eventType: z.ZodLiteral<"pull_request.opened">;
6242
+ }, z.core.$strip>, z.ZodObject<{
6243
+ integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.GITHUB>;
6244
+ username: z.ZodString;
6245
+ installationId: z.ZodNumber;
6246
+ repositoryName: z.ZodString;
6247
+ repository: z.ZodObject<{
6248
+ id: z.ZodNumber;
6249
+ name: z.ZodString;
6250
+ owner: z.ZodString;
6251
+ defaultBranch: z.ZodString;
6252
+ }, z.core.$strip>;
6253
+ sender: z.ZodObject<{
6254
+ login: z.ZodString;
6255
+ email: z.ZodOptional<z.ZodString>;
6256
+ }, z.core.$strip>;
6257
+ pullRequest: z.ZodObject<{
6258
+ id: z.ZodString;
6259
+ number: z.ZodNumber;
6260
+ title: z.ZodString;
6261
+ body: z.ZodOptional<z.ZodString>;
6262
+ state: z.ZodEnum<{
6263
+ open: "open";
6264
+ closed: "closed";
6265
+ }>;
6266
+ merged: z.ZodBoolean;
6267
+ head: z.ZodObject<{
6268
+ ref: z.ZodString;
6269
+ sha: z.ZodString;
6270
+ }, z.core.$strip>;
6271
+ base: z.ZodObject<{
6272
+ ref: z.ZodString;
6273
+ sha: z.ZodString;
6274
+ }, z.core.$strip>;
6275
+ user: z.ZodObject<{
6276
+ login: z.ZodString;
6277
+ email: z.ZodOptional<z.ZodString>;
6278
+ }, z.core.$strip>;
6279
+ author: z.ZodOptional<z.ZodObject<{
6280
+ login: z.ZodString;
6281
+ email: z.ZodOptional<z.ZodString>;
6282
+ }, z.core.$strip>>;
6283
+ url: z.ZodOptional<z.ZodString>;
6284
+ }, z.core.$strip>;
6285
+ branch: z.ZodOptional<z.ZodString>;
6286
+ commits: z.ZodArray<z.ZodObject<{
6287
+ sha: z.ZodString;
6288
+ message: z.ZodOptional<z.ZodString>;
6289
+ name: z.ZodString;
6290
+ fileDiffs: z.ZodArray<z.ZodObject<{
6291
+ filename: z.ZodString;
6292
+ diff: z.ZodString;
6293
+ }, z.core.$strip>>;
6294
+ }, z.core.$strip>>;
6295
+ eventType: z.ZodLiteral<"pull_request.synchronize">;
6296
+ }, z.core.$strip>, z.ZodObject<{
6297
+ integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.GITHUB>;
6298
+ username: z.ZodString;
6299
+ installationId: z.ZodNumber;
6300
+ repositoryName: z.ZodString;
6301
+ repository: z.ZodObject<{
6302
+ id: z.ZodNumber;
6303
+ name: z.ZodString;
6304
+ owner: z.ZodString;
6305
+ defaultBranch: z.ZodString;
6306
+ }, z.core.$strip>;
6307
+ sender: z.ZodObject<{
6308
+ login: z.ZodString;
6309
+ email: z.ZodOptional<z.ZodString>;
6310
+ }, z.core.$strip>;
6311
+ pullRequest: z.ZodObject<{
6312
+ id: z.ZodString;
6313
+ number: z.ZodNumber;
6314
+ title: z.ZodString;
6315
+ body: z.ZodOptional<z.ZodString>;
6316
+ state: z.ZodEnum<{
6317
+ open: "open";
6318
+ closed: "closed";
6319
+ }>;
6320
+ merged: z.ZodBoolean;
6321
+ head: z.ZodObject<{
6322
+ ref: z.ZodString;
6323
+ sha: z.ZodString;
6324
+ }, z.core.$strip>;
6325
+ base: z.ZodObject<{
6326
+ ref: z.ZodString;
6327
+ sha: z.ZodString;
6328
+ }, z.core.$strip>;
6329
+ user: z.ZodObject<{
6330
+ login: z.ZodString;
6331
+ email: z.ZodOptional<z.ZodString>;
6332
+ }, z.core.$strip>;
6333
+ author: z.ZodOptional<z.ZodObject<{
6334
+ login: z.ZodString;
6335
+ email: z.ZodOptional<z.ZodString>;
6336
+ }, z.core.$strip>>;
6337
+ url: z.ZodOptional<z.ZodString>;
6338
+ }, z.core.$strip>;
6339
+ branch: z.ZodOptional<z.ZodString>;
6340
+ commits: z.ZodArray<z.ZodObject<{
6341
+ sha: z.ZodString;
6342
+ message: z.ZodOptional<z.ZodString>;
6343
+ name: z.ZodString;
6344
+ fileDiffs: z.ZodArray<z.ZodObject<{
6345
+ filename: z.ZodString;
6346
+ diff: z.ZodString;
6347
+ }, z.core.$strip>>;
6348
+ }, z.core.$strip>>;
6349
+ eventType: z.ZodLiteral<"pull_request.closed">;
6350
+ }, z.core.$strip>, z.ZodObject<{
6351
+ integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.GITHUB>;
6352
+ username: z.ZodString;
6353
+ installationId: z.ZodNumber;
6354
+ repositoryName: z.ZodString;
6355
+ repository: z.ZodObject<{
6356
+ id: z.ZodNumber;
6357
+ name: z.ZodString;
6358
+ owner: z.ZodString;
6359
+ defaultBranch: z.ZodString;
6360
+ }, z.core.$strip>;
6361
+ sender: z.ZodObject<{
6362
+ login: z.ZodString;
6363
+ email: z.ZodOptional<z.ZodString>;
6364
+ }, z.core.$strip>;
6365
+ pullRequest: z.ZodObject<{
6366
+ id: z.ZodString;
6367
+ number: z.ZodNumber;
6368
+ title: z.ZodString;
6369
+ body: z.ZodOptional<z.ZodString>;
6370
+ state: z.ZodEnum<{
6371
+ open: "open";
6372
+ closed: "closed";
6373
+ }>;
6374
+ merged: z.ZodBoolean;
6375
+ head: z.ZodObject<{
6376
+ ref: z.ZodString;
6377
+ sha: z.ZodString;
6378
+ }, z.core.$strip>;
6379
+ base: z.ZodObject<{
6380
+ ref: z.ZodString;
6381
+ sha: z.ZodString;
6382
+ }, z.core.$strip>;
6383
+ user: z.ZodObject<{
6384
+ login: z.ZodString;
6385
+ email: z.ZodOptional<z.ZodString>;
6386
+ }, z.core.$strip>;
6387
+ author: z.ZodOptional<z.ZodObject<{
6388
+ login: z.ZodString;
6389
+ email: z.ZodOptional<z.ZodString>;
6390
+ }, z.core.$strip>>;
6391
+ url: z.ZodOptional<z.ZodString>;
6392
+ }, z.core.$strip>;
6393
+ branch: z.ZodOptional<z.ZodString>;
6394
+ commits: z.ZodArray<z.ZodObject<{
6395
+ sha: z.ZodString;
6396
+ message: z.ZodOptional<z.ZodString>;
6397
+ name: z.ZodString;
6398
+ fileDiffs: z.ZodArray<z.ZodObject<{
6399
+ filename: z.ZodString;
6400
+ diff: z.ZodString;
6401
+ }, z.core.$strip>>;
6402
+ }, z.core.$strip>>;
6403
+ eventType: z.ZodLiteral<"pull_request.merged">;
6404
+ }, z.core.$strip>], "eventType">, z.ZodObject<{
6405
+ integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.GMAIL>;
6406
+ eventType: z.ZodEnum<{
6407
+ readonly EMAIL_RECEIVED: "email.received";
6408
+ }>;
6409
+ id: z.ZodString;
6410
+ threadId: z.ZodString;
6411
+ subject: z.ZodString;
6412
+ from: z.ZodString;
6413
+ to: z.ZodString;
6414
+ date: z.ZodString;
6415
+ internalDate: z.ZodString;
6416
+ messageId: z.ZodString;
6417
+ body: z.ZodString;
6418
+ snippet: z.ZodString;
6419
+ labelIds: z.ZodArray<z.ZodString>;
6420
+ attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
6421
+ attachmentId: z.ZodString;
6422
+ filename: z.ZodString;
6423
+ mimeType: z.ZodString;
6424
+ contentId: z.ZodOptional<z.ZodString>;
6425
+ isInline: z.ZodBoolean;
6426
+ }, z.core.$strip>>>;
6427
+ }, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
6428
+ integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.LINEAR>;
6429
+ actor: z.ZodObject<{
6430
+ id: z.ZodString;
6431
+ name: z.ZodString;
6432
+ email: z.ZodString;
6433
+ url: z.ZodString;
6434
+ type: z.ZodString;
6435
+ }, z.core.$strip>;
6436
+ createdAt: z.ZodString;
6437
+ url: z.ZodOptional<z.ZodString>;
6438
+ organizationId: z.ZodString;
6439
+ webhookTimestamp: z.ZodNumber;
6440
+ webhookId: z.ZodString;
6441
+ eventType: z.ZodLiteral<"issue.created">;
6442
+ action: z.ZodLiteral<"create">;
6443
+ type: z.ZodLiteral<"Issue">;
6444
+ data: z.ZodObject<{
6445
+ id: z.ZodString;
6446
+ createdAt: z.ZodString;
6447
+ updatedAt: z.ZodString;
6448
+ number: z.ZodNumber;
6449
+ title: z.ZodString;
6450
+ priority: z.ZodNumber;
6451
+ sortOrder: z.ZodNumber;
6452
+ prioritySortOrder: z.ZodNumber;
6453
+ slaType: z.ZodString;
6454
+ addedToTeamAt: z.ZodString;
6455
+ trashed: z.ZodBoolean;
6456
+ labelIds: z.ZodArray<z.ZodString>;
6457
+ teamId: z.ZodString;
6458
+ previousIdentifiers: z.ZodArray<z.ZodString>;
6459
+ stateId: z.ZodString;
6460
+ reactionData: z.ZodArray<z.ZodAny>;
6461
+ priorityLabel: z.ZodString;
6462
+ botActor: z.ZodOptional<z.ZodString>;
6463
+ identifier: z.ZodString;
6464
+ url: z.ZodString;
6465
+ subscriberIds: z.ZodArray<z.ZodString>;
6466
+ state: z.ZodObject<{
6467
+ id: z.ZodString;
6468
+ color: z.ZodString;
6469
+ name: z.ZodString;
6470
+ type: z.ZodString;
6471
+ }, z.core.$strip>;
6472
+ team: z.ZodObject<{
6473
+ id: z.ZodString;
6474
+ key: z.ZodString;
6475
+ name: z.ZodString;
6476
+ }, z.core.$strip>;
6477
+ labels: z.ZodArray<z.ZodAny>;
6478
+ description: z.ZodOptional<z.ZodString>;
6479
+ descriptionData: z.ZodOptional<z.ZodString>;
6480
+ assignee: z.ZodOptional<z.ZodObject<{
6481
+ id: z.ZodString;
6482
+ name: z.ZodString;
6483
+ }, z.core.$strip>>;
6484
+ projectId: z.ZodOptional<z.ZodString>;
6485
+ }, z.core.$strip>;
6486
+ }, z.core.$strip>, z.ZodObject<{
6487
+ integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.LINEAR>;
6488
+ actor: z.ZodObject<{
6489
+ id: z.ZodString;
6490
+ name: z.ZodString;
6491
+ email: z.ZodString;
6492
+ url: z.ZodString;
6493
+ type: z.ZodString;
6494
+ }, z.core.$strip>;
6495
+ createdAt: z.ZodString;
6496
+ url: z.ZodOptional<z.ZodString>;
6497
+ organizationId: z.ZodString;
6498
+ webhookTimestamp: z.ZodNumber;
6499
+ webhookId: z.ZodString;
6500
+ eventType: z.ZodLiteral<"issue.updated">;
6501
+ action: z.ZodLiteral<"update">;
6502
+ type: z.ZodLiteral<"Issue">;
6503
+ data: z.ZodObject<{
6504
+ id: z.ZodString;
6505
+ createdAt: z.ZodString;
6506
+ updatedAt: z.ZodString;
6507
+ number: z.ZodNumber;
6508
+ title: z.ZodString;
6509
+ priority: z.ZodNumber;
6510
+ sortOrder: z.ZodNumber;
6511
+ prioritySortOrder: z.ZodNumber;
6512
+ slaType: z.ZodString;
6513
+ addedToTeamAt: z.ZodString;
6514
+ trashed: z.ZodBoolean;
6515
+ labelIds: z.ZodArray<z.ZodString>;
6516
+ teamId: z.ZodString;
6517
+ previousIdentifiers: z.ZodArray<z.ZodString>;
6518
+ stateId: z.ZodString;
6519
+ reactionData: z.ZodArray<z.ZodAny>;
6520
+ priorityLabel: z.ZodString;
6521
+ botActor: z.ZodOptional<z.ZodString>;
6522
+ identifier: z.ZodString;
6523
+ url: z.ZodString;
6524
+ subscriberIds: z.ZodArray<z.ZodString>;
6525
+ state: z.ZodObject<{
6526
+ id: z.ZodString;
6527
+ color: z.ZodString;
6528
+ name: z.ZodString;
6529
+ type: z.ZodString;
6530
+ }, z.core.$strip>;
6531
+ team: z.ZodObject<{
6532
+ id: z.ZodString;
6533
+ key: z.ZodString;
6534
+ name: z.ZodString;
6535
+ }, z.core.$strip>;
6536
+ labels: z.ZodArray<z.ZodAny>;
6537
+ description: z.ZodOptional<z.ZodString>;
6538
+ descriptionData: z.ZodOptional<z.ZodString>;
6539
+ assignee: z.ZodOptional<z.ZodObject<{
6540
+ id: z.ZodString;
6541
+ name: z.ZodString;
6542
+ }, z.core.$strip>>;
6543
+ projectId: z.ZodOptional<z.ZodString>;
6544
+ }, z.core.$strip>;
6545
+ }, z.core.$strip>, z.ZodObject<{
6546
+ integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.LINEAR>;
6547
+ actor: z.ZodObject<{
6548
+ id: z.ZodString;
6549
+ name: z.ZodString;
6550
+ email: z.ZodString;
6551
+ url: z.ZodString;
6552
+ type: z.ZodString;
6553
+ }, z.core.$strip>;
6554
+ createdAt: z.ZodString;
6555
+ url: z.ZodOptional<z.ZodString>;
6556
+ organizationId: z.ZodString;
6557
+ webhookTimestamp: z.ZodNumber;
6558
+ webhookId: z.ZodString;
6559
+ eventType: z.ZodLiteral<"comment.created">;
6560
+ action: z.ZodLiteral<"create">;
6561
+ type: z.ZodLiteral<"Comment">;
6562
+ data: z.ZodObject<{
6563
+ id: z.ZodString;
6564
+ body: z.ZodOptional<z.ZodString>;
6565
+ issueId: z.ZodOptional<z.ZodString>;
6566
+ }, z.core.$loose>;
6567
+ }, z.core.$strip>], "eventType">, z.ZodDiscriminatedUnion<[z.ZodObject<{
6568
+ integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.WORKOS>;
6569
+ eventId: z.ZodString;
6570
+ createdAt: z.ZodString;
6571
+ eventType: z.ZodLiteral<"user.created">;
6572
+ user: z.ZodObject<{
6573
+ id: z.ZodString;
6574
+ email: z.ZodString;
6575
+ firstName: z.ZodOptional<z.ZodString>;
6576
+ lastName: z.ZodOptional<z.ZodString>;
6577
+ emailVerified: z.ZodBoolean;
6578
+ profilePictureUrl: z.ZodOptional<z.ZodString>;
6579
+ }, z.core.$strip>;
6580
+ }, z.core.$strip>, z.ZodObject<{
6581
+ integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.WORKOS>;
6582
+ eventId: z.ZodString;
6583
+ createdAt: z.ZodString;
6584
+ eventType: z.ZodLiteral<"user.updated">;
6585
+ user: z.ZodObject<{
6586
+ id: z.ZodString;
6587
+ email: z.ZodString;
6588
+ firstName: z.ZodOptional<z.ZodString>;
6589
+ lastName: z.ZodOptional<z.ZodString>;
6590
+ emailVerified: z.ZodBoolean;
6591
+ profilePictureUrl: z.ZodOptional<z.ZodString>;
6592
+ }, z.core.$strip>;
6593
+ }, z.core.$strip>, z.ZodObject<{
6594
+ integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.WORKOS>;
6595
+ eventId: z.ZodString;
6596
+ createdAt: z.ZodString;
6597
+ eventType: z.ZodLiteral<"user.deleted">;
6598
+ user: z.ZodObject<{
6599
+ id: z.ZodString;
6600
+ email: z.ZodString;
6601
+ firstName: z.ZodOptional<z.ZodString>;
6602
+ lastName: z.ZodOptional<z.ZodString>;
6603
+ emailVerified: z.ZodBoolean;
6604
+ profilePictureUrl: z.ZodOptional<z.ZodString>;
6605
+ }, z.core.$strip>;
6606
+ }, z.core.$strip>, z.ZodObject<{
6607
+ integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.WORKOS>;
6608
+ eventId: z.ZodString;
6609
+ createdAt: z.ZodString;
6610
+ eventType: z.ZodLiteral<"organization_membership.created">;
6611
+ membership: z.ZodObject<{
6612
+ id: z.ZodString;
6613
+ userId: z.ZodString;
6614
+ organizationId: z.ZodString;
6615
+ role: z.ZodObject<{
6616
+ slug: z.ZodString;
6617
+ }, z.core.$strip>;
6618
+ status: z.ZodString;
6619
+ }, z.core.$strip>;
6620
+ }, z.core.$strip>, z.ZodObject<{
6621
+ integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.WORKOS>;
6622
+ eventId: z.ZodString;
6623
+ createdAt: z.ZodString;
6624
+ eventType: z.ZodLiteral<"organization_membership.updated">;
6625
+ membership: z.ZodObject<{
6626
+ id: z.ZodString;
6627
+ userId: z.ZodString;
6628
+ organizationId: z.ZodString;
6629
+ role: z.ZodObject<{
6630
+ slug: z.ZodString;
6631
+ }, z.core.$strip>;
6632
+ status: z.ZodString;
6633
+ }, z.core.$strip>;
6634
+ }, z.core.$strip>, z.ZodObject<{
6635
+ integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.WORKOS>;
6636
+ eventId: z.ZodString;
6637
+ createdAt: z.ZodString;
6638
+ eventType: z.ZodLiteral<"organization_membership.deleted">;
6639
+ membership: z.ZodObject<{
6640
+ id: z.ZodString;
6641
+ userId: z.ZodString;
6642
+ organizationId: z.ZodString;
6643
+ role: z.ZodObject<{
6644
+ slug: z.ZodString;
6645
+ }, z.core.$strip>;
6646
+ status: z.ZodString;
6647
+ }, z.core.$strip>;
6648
+ }, z.core.$strip>, z.ZodObject<{
6649
+ integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.WORKOS>;
6650
+ eventId: z.ZodString;
6651
+ createdAt: z.ZodString;
6652
+ eventType: z.ZodLiteral<"invitation.created">;
6653
+ invitation: z.ZodObject<{
6654
+ id: z.ZodString;
6655
+ email: z.ZodString;
6656
+ organizationId: z.ZodString;
6657
+ inviterEmail: z.ZodOptional<z.ZodString>;
6658
+ state: z.ZodString;
6659
+ acceptedAt: z.ZodOptional<z.ZodString>;
6660
+ }, z.core.$strip>;
6661
+ user: z.ZodOptional<z.ZodObject<{
6662
+ id: z.ZodString;
6663
+ email: z.ZodString;
6664
+ firstName: z.ZodOptional<z.ZodString>;
6665
+ lastName: z.ZodOptional<z.ZodString>;
6666
+ emailVerified: z.ZodBoolean;
6667
+ profilePictureUrl: z.ZodOptional<z.ZodString>;
6668
+ }, z.core.$strip>>;
6669
+ }, z.core.$strip>, z.ZodObject<{
6670
+ integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.WORKOS>;
6671
+ eventId: z.ZodString;
6672
+ createdAt: z.ZodString;
6673
+ eventType: z.ZodLiteral<"invitation.accepted">;
6674
+ invitation: z.ZodObject<{
6675
+ id: z.ZodString;
6676
+ email: z.ZodString;
6677
+ organizationId: z.ZodString;
6678
+ inviterEmail: z.ZodOptional<z.ZodString>;
6679
+ state: z.ZodString;
6680
+ acceptedAt: z.ZodOptional<z.ZodString>;
6681
+ }, z.core.$strip>;
6682
+ user: z.ZodOptional<z.ZodObject<{
6683
+ id: z.ZodString;
6684
+ email: z.ZodString;
6685
+ firstName: z.ZodOptional<z.ZodString>;
6686
+ lastName: z.ZodOptional<z.ZodString>;
6687
+ emailVerified: z.ZodBoolean;
6688
+ profilePictureUrl: z.ZodOptional<z.ZodString>;
6689
+ }, z.core.$strip>>;
6690
+ }, z.core.$strip>, z.ZodObject<{
6691
+ integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.WORKOS>;
6692
+ eventId: z.ZodString;
6693
+ createdAt: z.ZodString;
6694
+ eventType: z.ZodLiteral<"invitation.resent">;
6695
+ invitation: z.ZodObject<{
6696
+ id: z.ZodString;
6697
+ email: z.ZodString;
6698
+ organizationId: z.ZodString;
6699
+ inviterEmail: z.ZodOptional<z.ZodString>;
6700
+ state: z.ZodString;
6701
+ acceptedAt: z.ZodOptional<z.ZodString>;
6702
+ }, z.core.$strip>;
6703
+ user: z.ZodOptional<z.ZodObject<{
6704
+ id: z.ZodString;
6705
+ email: z.ZodString;
6706
+ firstName: z.ZodOptional<z.ZodString>;
6707
+ lastName: z.ZodOptional<z.ZodString>;
6708
+ emailVerified: z.ZodBoolean;
6709
+ profilePictureUrl: z.ZodOptional<z.ZodString>;
6710
+ }, z.core.$strip>>;
6711
+ }, z.core.$strip>, z.ZodObject<{
6712
+ integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.WORKOS>;
6713
+ eventId: z.ZodString;
6714
+ createdAt: z.ZodString;
6715
+ eventType: z.ZodLiteral<"invitation.revoked">;
6716
+ invitation: z.ZodObject<{
6717
+ id: z.ZodString;
6718
+ email: z.ZodString;
6719
+ organizationId: z.ZodString;
6720
+ inviterEmail: z.ZodOptional<z.ZodString>;
6721
+ state: z.ZodString;
6722
+ acceptedAt: z.ZodOptional<z.ZodString>;
6723
+ }, z.core.$strip>;
6724
+ user: z.ZodOptional<z.ZodObject<{
6725
+ id: z.ZodString;
6726
+ email: z.ZodString;
6727
+ firstName: z.ZodOptional<z.ZodString>;
6728
+ lastName: z.ZodOptional<z.ZodString>;
6729
+ emailVerified: z.ZodBoolean;
6730
+ profilePictureUrl: z.ZodOptional<z.ZodString>;
6731
+ }, z.core.$strip>>;
6732
+ }, z.core.$strip>, z.ZodObject<{
6733
+ integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.WORKOS>;
6734
+ eventId: z.ZodString;
6735
+ createdAt: z.ZodString;
6736
+ eventType: z.ZodLiteral<"organization.created">;
6737
+ organization: z.ZodObject<{
6738
+ id: z.ZodString;
6739
+ name: z.ZodString;
6740
+ }, z.core.$strip>;
6741
+ }, z.core.$strip>], "eventType">, z.ZodObject<{
6742
+ integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.WEBHOOK>;
6743
+ eventType: z.ZodLiteral<"webhook">;
6744
+ body: z.ZodUnknown;
6745
+ headers: z.ZodRecord<z.ZodString, z.ZodString>;
6746
+ method: z.ZodString;
6747
+ }, z.core.$strip>, z.ZodObject<{
6748
+ integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.CRON_JOB>;
6749
+ eventType: z.ZodLiteral<"cron">;
6750
+ inputId: z.ZodString;
6751
+ isManualTrigger: z.ZodOptional<z.ZodBoolean>;
6752
+ manualContext: z.ZodOptional<z.ZodString>;
6753
+ }, z.core.$strip>, z.ZodObject<{
6754
+ integrationType: z.ZodEnum<typeof import("./Integrations.js").IntegrationType>;
6755
+ eventType: z.ZodLiteral<"manual_sample">;
6756
+ }, z.core.$strip>]>;
6757
+ }, z.core.$strip>;
6758
+ }, z.core.$strip>;
6759
+ export type SdkRunTriggerEventResponse = z.infer<typeof sdkRunTriggerEventResponseSchema>;
6066
6760
  export declare const manualTriggerRequestSchema: z.ZodObject<{
6067
6761
  context: z.ZodOptional<z.ZodString>;
6068
6762
  }, z.core.$strip>;
@@ -6864,7 +7558,7 @@ export declare const triggerWithEventRequestSchema: z.ZodObject<{
6864
7558
  }, z.core.$strip>], "eventType">, z.ZodObject<{
6865
7559
  integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.WEBHOOK>;
6866
7560
  eventType: z.ZodLiteral<"webhook">;
6867
- body: z.ZodRecord<z.ZodString, z.ZodUnknown>;
7561
+ body: z.ZodUnknown;
6868
7562
  headers: z.ZodRecord<z.ZodString, z.ZodString>;
6869
7563
  method: z.ZodString;
6870
7564
  }, z.core.$strip>, z.ZodObject<{
@@ -7570,7 +8264,7 @@ export declare const webhookJobTriggerRequestSchema: z.ZodObject<{
7570
8264
  }, z.core.$strip>], "eventType">, z.ZodObject<{
7571
8265
  integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.WEBHOOK>;
7572
8266
  eventType: z.ZodLiteral<"webhook">;
7573
- body: z.ZodRecord<z.ZodString, z.ZodUnknown>;
8267
+ body: z.ZodUnknown;
7574
8268
  headers: z.ZodRecord<z.ZodString, z.ZodString>;
7575
8269
  method: z.ZodString;
7576
8270
  }, z.core.$strip>, z.ZodObject<{
package/dist/types.js CHANGED
@@ -146,7 +146,7 @@ export const agentOutputSchema = z.object({
146
146
  });
147
147
  export const agentPromptSchema = z.object({
148
148
  text: z.string(),
149
- remoteServerUrl: z.string().optional()
149
+ remoteServerUrl: z.string().optional().nullable()
150
150
  });
151
151
  export const transientAgentTriggerSchema = z.object({
152
152
  id: z.string(),
@@ -556,6 +556,9 @@ export const sdkToolExecuteRequestSchema = z.object({
556
556
  toolName: z.string(),
557
557
  params: z.record(z.string(), z.unknown()).optional()
558
558
  });
559
+ export const sdkRunTriggerEventResponseSchema = z.object({
560
+ event: serializedEventSchema
561
+ });
559
562
  export const manualTriggerRequestSchema = z.object({
560
563
  context: z.string().optional()
561
564
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "terse-types",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "type": "module",
5
5
  "description": "Shared Terse TypeScript types, enums, constants, and helpers.",
6
6
  "main": "./dist/index.js",