skedyul 1.2.40 → 1.2.43
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.
- package/dist/cli/commands/agents.d.ts +1 -0
- package/dist/cli/commands/chat.d.ts +1 -0
- package/dist/cli/commands/crm.d.ts +1 -0
- package/dist/cli/commands/skills.d.ts +1 -0
- package/dist/cli/index.js +17636 -6197
- package/dist/cli/utils/auth.js +495 -0
- package/dist/cli/utils/mock-context.d.ts +22 -0
- package/dist/cli/utils/sse.d.ts +100 -0
- package/dist/compiler/compiler.d.ts +12 -0
- package/dist/compiler/index.d.ts +2 -0
- package/dist/compiler/types.d.ts +173 -0
- package/dist/config/index.d.ts +1 -0
- package/dist/config/schema-loader.d.ts +156 -0
- package/dist/config/types/model.d.ts +28 -0
- package/dist/context/index.d.ts +2 -0
- package/dist/context/resolver.d.ts +51 -0
- package/dist/context/types.d.ts +217 -0
- package/dist/dedicated/server.js +60 -15
- package/dist/esm/index.mjs +9815 -458
- package/dist/events/index.d.ts +1 -0
- package/dist/events/types.d.ts +528 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +9912 -458
- package/dist/memory/index.d.ts +4 -0
- package/dist/memory/service.d.ts +78 -0
- package/dist/memory/types.d.ts +169 -0
- package/dist/schemas/agent-schema-v3.d.ts +437 -0
- package/dist/schemas/agent-schema-v3.js +539 -0
- package/dist/schemas/agent-schema-v3.mjs +497 -0
- package/dist/schemas/agent-schema.d.ts +1504 -0
- package/dist/schemas/agent-schema.js +7896 -0
- package/dist/schemas/agent-schema.mjs +7867 -0
- package/dist/schemas/crm-schema.d.ts +448 -0
- package/dist/schemas/index.d.ts +2 -0
- package/dist/schemas.d.ts +69 -36
- package/dist/server.js +60 -15
- package/dist/serverless/server.mjs +60 -15
- package/dist/skills/index.d.ts +1 -0
- package/dist/skills/types.d.ts +355 -0
- package/dist/skills/types.js +281 -0
- package/dist/skills/types.mjs +234 -0
- package/dist/triggers/index.d.ts +2 -0
- package/dist/triggers/resolver.d.ts +31 -0
- package/dist/triggers/types.d.ts +313 -0
- package/dist/types/data-blocks.d.ts +105 -0
- package/dist/types/index.d.ts +3 -1
- package/dist/types/tool-response.d.ts +202 -0
- package/dist/types/tool.d.ts +157 -28
- package/dist/workflows/index.d.ts +1 -0
- package/dist/workflows/types.d.ts +295 -0
- package/package.json +19 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ThreadEventTypeSchema, CustomEventTypeSchema, EventTypeSchema, ParticipantKindSchema, BaseEventPayloadSchema, MessageEventPayloadSchema, ParticipantEventPayloadSchema, ContextChangedPayloadSchema, StatusChangedPayloadSchema, ScheduledEventPayloadSchema, AgentWorkflowEventPayloadSchema, CustomEventPayloadSchema, ThreadEventPayloadSchema, ThreadEventSchema, CreateThreadEventInputSchema, EventSubscriptionSchema, EventWaitSchema, EventsConfigSchema, type ThreadEventType, type CustomEventType, type EventType, type ParticipantKind, type BaseEventPayload, type MessageEventPayload, type ParticipantEventPayload, type ContextChangedPayload, type StatusChangedPayload, type ScheduledEventPayload, type AgentWorkflowEventPayload, type CustomEventPayload, type ThreadEventPayload, type ThreadEvent, type CreateThreadEventInput, type EventSubscription, type EventWait, type EventsConfig, } from './types';
|
|
@@ -0,0 +1,528 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
|
+
/**
|
|
3
|
+
* Thread Event Types
|
|
4
|
+
* These are the events that can be emitted and subscribed to in threads.
|
|
5
|
+
*/
|
|
6
|
+
export declare const ThreadEventTypeSchema: z.ZodEnum<{
|
|
7
|
+
"thread.message.received": "thread.message.received";
|
|
8
|
+
"thread.message.sent": "thread.message.sent";
|
|
9
|
+
"thread.participant.joined": "thread.participant.joined";
|
|
10
|
+
"thread.participant.left": "thread.participant.left";
|
|
11
|
+
"thread.participant.mentioned": "thread.participant.mentioned";
|
|
12
|
+
"thread.context.changed": "thread.context.changed";
|
|
13
|
+
"thread.status.changed": "thread.status.changed";
|
|
14
|
+
"thread.agent.delegated": "thread.agent.delegated";
|
|
15
|
+
"thread.agent.completed": "thread.agent.completed";
|
|
16
|
+
"thread.workflow.triggered": "thread.workflow.triggered";
|
|
17
|
+
"thread.workflow.completed": "thread.workflow.completed";
|
|
18
|
+
"thread.follow_up.due": "thread.follow_up.due";
|
|
19
|
+
"thread.reminder.due": "thread.reminder.due";
|
|
20
|
+
}>;
|
|
21
|
+
export type ThreadEventType = z.infer<typeof ThreadEventTypeSchema>;
|
|
22
|
+
/**
|
|
23
|
+
* Custom event type pattern for app-specific events
|
|
24
|
+
* e.g., "custom.payment.received", "custom.booking.confirmed"
|
|
25
|
+
*/
|
|
26
|
+
export declare const CustomEventTypeSchema: z.ZodString;
|
|
27
|
+
export type CustomEventType = z.infer<typeof CustomEventTypeSchema>;
|
|
28
|
+
/**
|
|
29
|
+
* Combined event type - either a standard thread event or a custom event
|
|
30
|
+
*/
|
|
31
|
+
export declare const EventTypeSchema: z.ZodUnion<readonly [z.ZodEnum<{
|
|
32
|
+
"thread.message.received": "thread.message.received";
|
|
33
|
+
"thread.message.sent": "thread.message.sent";
|
|
34
|
+
"thread.participant.joined": "thread.participant.joined";
|
|
35
|
+
"thread.participant.left": "thread.participant.left";
|
|
36
|
+
"thread.participant.mentioned": "thread.participant.mentioned";
|
|
37
|
+
"thread.context.changed": "thread.context.changed";
|
|
38
|
+
"thread.status.changed": "thread.status.changed";
|
|
39
|
+
"thread.agent.delegated": "thread.agent.delegated";
|
|
40
|
+
"thread.agent.completed": "thread.agent.completed";
|
|
41
|
+
"thread.workflow.triggered": "thread.workflow.triggered";
|
|
42
|
+
"thread.workflow.completed": "thread.workflow.completed";
|
|
43
|
+
"thread.follow_up.due": "thread.follow_up.due";
|
|
44
|
+
"thread.reminder.due": "thread.reminder.due";
|
|
45
|
+
}>, z.ZodString]>;
|
|
46
|
+
export type EventType = z.infer<typeof EventTypeSchema>;
|
|
47
|
+
/**
|
|
48
|
+
* Participant kind for event payloads
|
|
49
|
+
*/
|
|
50
|
+
export declare const ParticipantKindSchema: z.ZodEnum<{
|
|
51
|
+
CONTACT: "CONTACT";
|
|
52
|
+
MEMBER: "MEMBER";
|
|
53
|
+
AGENT: "AGENT";
|
|
54
|
+
WORKFLOW: "WORKFLOW";
|
|
55
|
+
}>;
|
|
56
|
+
export type ParticipantKind = z.infer<typeof ParticipantKindSchema>;
|
|
57
|
+
/**
|
|
58
|
+
* Base event payload structure
|
|
59
|
+
*/
|
|
60
|
+
export declare const BaseEventPayloadSchema: z.ZodObject<{
|
|
61
|
+
threadId: z.ZodString;
|
|
62
|
+
workplaceId: z.ZodString;
|
|
63
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
64
|
+
}, z.core.$strip>;
|
|
65
|
+
export type BaseEventPayload = z.infer<typeof BaseEventPayloadSchema>;
|
|
66
|
+
/**
|
|
67
|
+
* Message event payload
|
|
68
|
+
*/
|
|
69
|
+
export declare const MessageEventPayloadSchema: z.ZodObject<{
|
|
70
|
+
threadId: z.ZodString;
|
|
71
|
+
workplaceId: z.ZodString;
|
|
72
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
73
|
+
message: z.ZodObject<{
|
|
74
|
+
id: z.ZodString;
|
|
75
|
+
content: z.ZodString;
|
|
76
|
+
senderId: z.ZodOptional<z.ZodString>;
|
|
77
|
+
}, z.core.$strip>;
|
|
78
|
+
participant: z.ZodOptional<z.ZodObject<{
|
|
79
|
+
id: z.ZodString;
|
|
80
|
+
kind: z.ZodEnum<{
|
|
81
|
+
CONTACT: "CONTACT";
|
|
82
|
+
MEMBER: "MEMBER";
|
|
83
|
+
AGENT: "AGENT";
|
|
84
|
+
WORKFLOW: "WORKFLOW";
|
|
85
|
+
}>;
|
|
86
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
87
|
+
}, z.core.$strip>>;
|
|
88
|
+
isFirstMessage: z.ZodOptional<z.ZodBoolean>;
|
|
89
|
+
messageCount: z.ZodOptional<z.ZodNumber>;
|
|
90
|
+
}, z.core.$strip>;
|
|
91
|
+
export type MessageEventPayload = z.infer<typeof MessageEventPayloadSchema>;
|
|
92
|
+
/**
|
|
93
|
+
* Participant event payload
|
|
94
|
+
*/
|
|
95
|
+
export declare const ParticipantEventPayloadSchema: z.ZodObject<{
|
|
96
|
+
threadId: z.ZodString;
|
|
97
|
+
workplaceId: z.ZodString;
|
|
98
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
99
|
+
participant: z.ZodObject<{
|
|
100
|
+
id: z.ZodString;
|
|
101
|
+
kind: z.ZodEnum<{
|
|
102
|
+
CONTACT: "CONTACT";
|
|
103
|
+
MEMBER: "MEMBER";
|
|
104
|
+
AGENT: "AGENT";
|
|
105
|
+
WORKFLOW: "WORKFLOW";
|
|
106
|
+
}>;
|
|
107
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
108
|
+
contactId: z.ZodOptional<z.ZodString>;
|
|
109
|
+
memberId: z.ZodOptional<z.ZodString>;
|
|
110
|
+
agentId: z.ZodOptional<z.ZodString>;
|
|
111
|
+
workflowId: z.ZodOptional<z.ZodString>;
|
|
112
|
+
}, z.core.$strip>;
|
|
113
|
+
}, z.core.$strip>;
|
|
114
|
+
export type ParticipantEventPayload = z.infer<typeof ParticipantEventPayloadSchema>;
|
|
115
|
+
/**
|
|
116
|
+
* Context changed event payload
|
|
117
|
+
*/
|
|
118
|
+
export declare const ContextChangedPayloadSchema: z.ZodObject<{
|
|
119
|
+
threadId: z.ZodString;
|
|
120
|
+
workplaceId: z.ZodString;
|
|
121
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
122
|
+
context: z.ZodObject<{
|
|
123
|
+
handle: z.ZodString;
|
|
124
|
+
model: z.ZodString;
|
|
125
|
+
instanceId: z.ZodString;
|
|
126
|
+
}, z.core.$strip>;
|
|
127
|
+
change: z.ZodOptional<z.ZodObject<{
|
|
128
|
+
field: z.ZodOptional<z.ZodString>;
|
|
129
|
+
oldValue: z.ZodOptional<z.ZodUnknown>;
|
|
130
|
+
newValue: z.ZodOptional<z.ZodUnknown>;
|
|
131
|
+
}, z.core.$strip>>;
|
|
132
|
+
}, z.core.$strip>;
|
|
133
|
+
export type ContextChangedPayload = z.infer<typeof ContextChangedPayloadSchema>;
|
|
134
|
+
/**
|
|
135
|
+
* Status changed event payload
|
|
136
|
+
*/
|
|
137
|
+
export declare const StatusChangedPayloadSchema: z.ZodObject<{
|
|
138
|
+
threadId: z.ZodString;
|
|
139
|
+
workplaceId: z.ZodString;
|
|
140
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
141
|
+
oldStatus: z.ZodString;
|
|
142
|
+
newStatus: z.ZodString;
|
|
143
|
+
}, z.core.$strip>;
|
|
144
|
+
export type StatusChangedPayload = z.infer<typeof StatusChangedPayloadSchema>;
|
|
145
|
+
/**
|
|
146
|
+
* Scheduled event payload (follow-up, reminder)
|
|
147
|
+
*/
|
|
148
|
+
export declare const ScheduledEventPayloadSchema: z.ZodObject<{
|
|
149
|
+
threadId: z.ZodString;
|
|
150
|
+
workplaceId: z.ZodString;
|
|
151
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
152
|
+
scheduledEventId: z.ZodString;
|
|
153
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
154
|
+
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
155
|
+
}, z.core.$strip>;
|
|
156
|
+
export type ScheduledEventPayload = z.infer<typeof ScheduledEventPayloadSchema>;
|
|
157
|
+
/**
|
|
158
|
+
* Agent/Workflow event payload
|
|
159
|
+
*/
|
|
160
|
+
export declare const AgentWorkflowEventPayloadSchema: z.ZodObject<{
|
|
161
|
+
threadId: z.ZodString;
|
|
162
|
+
workplaceId: z.ZodString;
|
|
163
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
164
|
+
agentId: z.ZodOptional<z.ZodString>;
|
|
165
|
+
workflowId: z.ZodOptional<z.ZodString>;
|
|
166
|
+
workflowRunId: z.ZodOptional<z.ZodString>;
|
|
167
|
+
outputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
168
|
+
error: z.ZodOptional<z.ZodString>;
|
|
169
|
+
}, z.core.$strip>;
|
|
170
|
+
export type AgentWorkflowEventPayload = z.infer<typeof AgentWorkflowEventPayloadSchema>;
|
|
171
|
+
/**
|
|
172
|
+
* Custom event payload - flexible structure for app-specific events
|
|
173
|
+
*/
|
|
174
|
+
export declare const CustomEventPayloadSchema: z.ZodObject<{
|
|
175
|
+
threadId: z.ZodString;
|
|
176
|
+
workplaceId: z.ZodString;
|
|
177
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
178
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
179
|
+
}, z.core.$strip>;
|
|
180
|
+
export type CustomEventPayload = z.infer<typeof CustomEventPayloadSchema>;
|
|
181
|
+
/**
|
|
182
|
+
* Union of all event payloads
|
|
183
|
+
*/
|
|
184
|
+
export declare const ThreadEventPayloadSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
185
|
+
threadId: z.ZodString;
|
|
186
|
+
workplaceId: z.ZodString;
|
|
187
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
188
|
+
message: z.ZodObject<{
|
|
189
|
+
id: z.ZodString;
|
|
190
|
+
content: z.ZodString;
|
|
191
|
+
senderId: z.ZodOptional<z.ZodString>;
|
|
192
|
+
}, z.core.$strip>;
|
|
193
|
+
participant: z.ZodOptional<z.ZodObject<{
|
|
194
|
+
id: z.ZodString;
|
|
195
|
+
kind: z.ZodEnum<{
|
|
196
|
+
CONTACT: "CONTACT";
|
|
197
|
+
MEMBER: "MEMBER";
|
|
198
|
+
AGENT: "AGENT";
|
|
199
|
+
WORKFLOW: "WORKFLOW";
|
|
200
|
+
}>;
|
|
201
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
202
|
+
}, z.core.$strip>>;
|
|
203
|
+
isFirstMessage: z.ZodOptional<z.ZodBoolean>;
|
|
204
|
+
messageCount: z.ZodOptional<z.ZodNumber>;
|
|
205
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
206
|
+
threadId: z.ZodString;
|
|
207
|
+
workplaceId: z.ZodString;
|
|
208
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
209
|
+
participant: z.ZodObject<{
|
|
210
|
+
id: z.ZodString;
|
|
211
|
+
kind: z.ZodEnum<{
|
|
212
|
+
CONTACT: "CONTACT";
|
|
213
|
+
MEMBER: "MEMBER";
|
|
214
|
+
AGENT: "AGENT";
|
|
215
|
+
WORKFLOW: "WORKFLOW";
|
|
216
|
+
}>;
|
|
217
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
218
|
+
contactId: z.ZodOptional<z.ZodString>;
|
|
219
|
+
memberId: z.ZodOptional<z.ZodString>;
|
|
220
|
+
agentId: z.ZodOptional<z.ZodString>;
|
|
221
|
+
workflowId: z.ZodOptional<z.ZodString>;
|
|
222
|
+
}, z.core.$strip>;
|
|
223
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
224
|
+
threadId: z.ZodString;
|
|
225
|
+
workplaceId: z.ZodString;
|
|
226
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
227
|
+
context: z.ZodObject<{
|
|
228
|
+
handle: z.ZodString;
|
|
229
|
+
model: z.ZodString;
|
|
230
|
+
instanceId: z.ZodString;
|
|
231
|
+
}, z.core.$strip>;
|
|
232
|
+
change: z.ZodOptional<z.ZodObject<{
|
|
233
|
+
field: z.ZodOptional<z.ZodString>;
|
|
234
|
+
oldValue: z.ZodOptional<z.ZodUnknown>;
|
|
235
|
+
newValue: z.ZodOptional<z.ZodUnknown>;
|
|
236
|
+
}, z.core.$strip>>;
|
|
237
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
238
|
+
threadId: z.ZodString;
|
|
239
|
+
workplaceId: z.ZodString;
|
|
240
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
241
|
+
oldStatus: z.ZodString;
|
|
242
|
+
newStatus: z.ZodString;
|
|
243
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
244
|
+
threadId: z.ZodString;
|
|
245
|
+
workplaceId: z.ZodString;
|
|
246
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
247
|
+
scheduledEventId: z.ZodString;
|
|
248
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
249
|
+
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
250
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
251
|
+
threadId: z.ZodString;
|
|
252
|
+
workplaceId: z.ZodString;
|
|
253
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
254
|
+
agentId: z.ZodOptional<z.ZodString>;
|
|
255
|
+
workflowId: z.ZodOptional<z.ZodString>;
|
|
256
|
+
workflowRunId: z.ZodOptional<z.ZodString>;
|
|
257
|
+
outputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
258
|
+
error: z.ZodOptional<z.ZodString>;
|
|
259
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
260
|
+
threadId: z.ZodString;
|
|
261
|
+
workplaceId: z.ZodString;
|
|
262
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
263
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
264
|
+
}, z.core.$strip>]>;
|
|
265
|
+
export type ThreadEventPayload = z.infer<typeof ThreadEventPayloadSchema>;
|
|
266
|
+
/**
|
|
267
|
+
* Full ThreadEvent structure (as stored in database)
|
|
268
|
+
*/
|
|
269
|
+
export declare const ThreadEventSchema: z.ZodObject<{
|
|
270
|
+
id: z.ZodString;
|
|
271
|
+
threadId: z.ZodString;
|
|
272
|
+
type: z.ZodUnion<readonly [z.ZodEnum<{
|
|
273
|
+
"thread.message.received": "thread.message.received";
|
|
274
|
+
"thread.message.sent": "thread.message.sent";
|
|
275
|
+
"thread.participant.joined": "thread.participant.joined";
|
|
276
|
+
"thread.participant.left": "thread.participant.left";
|
|
277
|
+
"thread.participant.mentioned": "thread.participant.mentioned";
|
|
278
|
+
"thread.context.changed": "thread.context.changed";
|
|
279
|
+
"thread.status.changed": "thread.status.changed";
|
|
280
|
+
"thread.agent.delegated": "thread.agent.delegated";
|
|
281
|
+
"thread.agent.completed": "thread.agent.completed";
|
|
282
|
+
"thread.workflow.triggered": "thread.workflow.triggered";
|
|
283
|
+
"thread.workflow.completed": "thread.workflow.completed";
|
|
284
|
+
"thread.follow_up.due": "thread.follow_up.due";
|
|
285
|
+
"thread.reminder.due": "thread.reminder.due";
|
|
286
|
+
}>, z.ZodString]>;
|
|
287
|
+
payload: z.ZodUnion<readonly [z.ZodObject<{
|
|
288
|
+
threadId: z.ZodString;
|
|
289
|
+
workplaceId: z.ZodString;
|
|
290
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
291
|
+
message: z.ZodObject<{
|
|
292
|
+
id: z.ZodString;
|
|
293
|
+
content: z.ZodString;
|
|
294
|
+
senderId: z.ZodOptional<z.ZodString>;
|
|
295
|
+
}, z.core.$strip>;
|
|
296
|
+
participant: z.ZodOptional<z.ZodObject<{
|
|
297
|
+
id: z.ZodString;
|
|
298
|
+
kind: z.ZodEnum<{
|
|
299
|
+
CONTACT: "CONTACT";
|
|
300
|
+
MEMBER: "MEMBER";
|
|
301
|
+
AGENT: "AGENT";
|
|
302
|
+
WORKFLOW: "WORKFLOW";
|
|
303
|
+
}>;
|
|
304
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
305
|
+
}, z.core.$strip>>;
|
|
306
|
+
isFirstMessage: z.ZodOptional<z.ZodBoolean>;
|
|
307
|
+
messageCount: z.ZodOptional<z.ZodNumber>;
|
|
308
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
309
|
+
threadId: z.ZodString;
|
|
310
|
+
workplaceId: z.ZodString;
|
|
311
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
312
|
+
participant: z.ZodObject<{
|
|
313
|
+
id: z.ZodString;
|
|
314
|
+
kind: z.ZodEnum<{
|
|
315
|
+
CONTACT: "CONTACT";
|
|
316
|
+
MEMBER: "MEMBER";
|
|
317
|
+
AGENT: "AGENT";
|
|
318
|
+
WORKFLOW: "WORKFLOW";
|
|
319
|
+
}>;
|
|
320
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
321
|
+
contactId: z.ZodOptional<z.ZodString>;
|
|
322
|
+
memberId: z.ZodOptional<z.ZodString>;
|
|
323
|
+
agentId: z.ZodOptional<z.ZodString>;
|
|
324
|
+
workflowId: z.ZodOptional<z.ZodString>;
|
|
325
|
+
}, z.core.$strip>;
|
|
326
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
327
|
+
threadId: z.ZodString;
|
|
328
|
+
workplaceId: z.ZodString;
|
|
329
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
330
|
+
context: z.ZodObject<{
|
|
331
|
+
handle: z.ZodString;
|
|
332
|
+
model: z.ZodString;
|
|
333
|
+
instanceId: z.ZodString;
|
|
334
|
+
}, z.core.$strip>;
|
|
335
|
+
change: z.ZodOptional<z.ZodObject<{
|
|
336
|
+
field: z.ZodOptional<z.ZodString>;
|
|
337
|
+
oldValue: z.ZodOptional<z.ZodUnknown>;
|
|
338
|
+
newValue: z.ZodOptional<z.ZodUnknown>;
|
|
339
|
+
}, z.core.$strip>>;
|
|
340
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
341
|
+
threadId: z.ZodString;
|
|
342
|
+
workplaceId: z.ZodString;
|
|
343
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
344
|
+
oldStatus: z.ZodString;
|
|
345
|
+
newStatus: z.ZodString;
|
|
346
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
347
|
+
threadId: z.ZodString;
|
|
348
|
+
workplaceId: z.ZodString;
|
|
349
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
350
|
+
scheduledEventId: z.ZodString;
|
|
351
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
352
|
+
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
353
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
354
|
+
threadId: z.ZodString;
|
|
355
|
+
workplaceId: z.ZodString;
|
|
356
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
357
|
+
agentId: z.ZodOptional<z.ZodString>;
|
|
358
|
+
workflowId: z.ZodOptional<z.ZodString>;
|
|
359
|
+
workflowRunId: z.ZodOptional<z.ZodString>;
|
|
360
|
+
outputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
361
|
+
error: z.ZodOptional<z.ZodString>;
|
|
362
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
363
|
+
threadId: z.ZodString;
|
|
364
|
+
workplaceId: z.ZodString;
|
|
365
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
366
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
367
|
+
}, z.core.$strip>]>;
|
|
368
|
+
emittedBy: z.ZodOptional<z.ZodString>;
|
|
369
|
+
createdAt: z.ZodString;
|
|
370
|
+
}, z.core.$strip>;
|
|
371
|
+
export type ThreadEvent = z.infer<typeof ThreadEventSchema>;
|
|
372
|
+
/**
|
|
373
|
+
* Input for creating a new ThreadEvent
|
|
374
|
+
*/
|
|
375
|
+
export declare const CreateThreadEventInputSchema: z.ZodObject<{
|
|
376
|
+
threadId: z.ZodString;
|
|
377
|
+
type: z.ZodUnion<readonly [z.ZodEnum<{
|
|
378
|
+
"thread.message.received": "thread.message.received";
|
|
379
|
+
"thread.message.sent": "thread.message.sent";
|
|
380
|
+
"thread.participant.joined": "thread.participant.joined";
|
|
381
|
+
"thread.participant.left": "thread.participant.left";
|
|
382
|
+
"thread.participant.mentioned": "thread.participant.mentioned";
|
|
383
|
+
"thread.context.changed": "thread.context.changed";
|
|
384
|
+
"thread.status.changed": "thread.status.changed";
|
|
385
|
+
"thread.agent.delegated": "thread.agent.delegated";
|
|
386
|
+
"thread.agent.completed": "thread.agent.completed";
|
|
387
|
+
"thread.workflow.triggered": "thread.workflow.triggered";
|
|
388
|
+
"thread.workflow.completed": "thread.workflow.completed";
|
|
389
|
+
"thread.follow_up.due": "thread.follow_up.due";
|
|
390
|
+
"thread.reminder.due": "thread.reminder.due";
|
|
391
|
+
}>, z.ZodString]>;
|
|
392
|
+
payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
393
|
+
emittedBy: z.ZodOptional<z.ZodString>;
|
|
394
|
+
}, z.core.$strip>;
|
|
395
|
+
export type CreateThreadEventInput = z.infer<typeof CreateThreadEventInputSchema>;
|
|
396
|
+
/**
|
|
397
|
+
* Event subscription configuration (used in YAML)
|
|
398
|
+
*/
|
|
399
|
+
export declare const EventSubscriptionSchema: z.ZodObject<{
|
|
400
|
+
subscribes: z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
|
|
401
|
+
"thread.message.received": "thread.message.received";
|
|
402
|
+
"thread.message.sent": "thread.message.sent";
|
|
403
|
+
"thread.participant.joined": "thread.participant.joined";
|
|
404
|
+
"thread.participant.left": "thread.participant.left";
|
|
405
|
+
"thread.participant.mentioned": "thread.participant.mentioned";
|
|
406
|
+
"thread.context.changed": "thread.context.changed";
|
|
407
|
+
"thread.status.changed": "thread.status.changed";
|
|
408
|
+
"thread.agent.delegated": "thread.agent.delegated";
|
|
409
|
+
"thread.agent.completed": "thread.agent.completed";
|
|
410
|
+
"thread.workflow.triggered": "thread.workflow.triggered";
|
|
411
|
+
"thread.workflow.completed": "thread.workflow.completed";
|
|
412
|
+
"thread.follow_up.due": "thread.follow_up.due";
|
|
413
|
+
"thread.reminder.due": "thread.reminder.due";
|
|
414
|
+
}>, z.ZodString]>>;
|
|
415
|
+
condition: z.ZodOptional<z.ZodString>;
|
|
416
|
+
cancels: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
|
|
417
|
+
"thread.message.received": "thread.message.received";
|
|
418
|
+
"thread.message.sent": "thread.message.sent";
|
|
419
|
+
"thread.participant.joined": "thread.participant.joined";
|
|
420
|
+
"thread.participant.left": "thread.participant.left";
|
|
421
|
+
"thread.participant.mentioned": "thread.participant.mentioned";
|
|
422
|
+
"thread.context.changed": "thread.context.changed";
|
|
423
|
+
"thread.status.changed": "thread.status.changed";
|
|
424
|
+
"thread.agent.delegated": "thread.agent.delegated";
|
|
425
|
+
"thread.agent.completed": "thread.agent.completed";
|
|
426
|
+
"thread.workflow.triggered": "thread.workflow.triggered";
|
|
427
|
+
"thread.workflow.completed": "thread.workflow.completed";
|
|
428
|
+
"thread.follow_up.due": "thread.follow_up.due";
|
|
429
|
+
"thread.reminder.due": "thread.reminder.due";
|
|
430
|
+
}>, z.ZodString]>>>;
|
|
431
|
+
cancelCondition: z.ZodOptional<z.ZodString>;
|
|
432
|
+
}, z.core.$strip>;
|
|
433
|
+
export type EventSubscription = z.infer<typeof EventSubscriptionSchema>;
|
|
434
|
+
/**
|
|
435
|
+
* Event wait configuration (for async waits)
|
|
436
|
+
*/
|
|
437
|
+
export declare const EventWaitSchema: z.ZodObject<{
|
|
438
|
+
event: z.ZodUnion<readonly [z.ZodEnum<{
|
|
439
|
+
"thread.message.received": "thread.message.received";
|
|
440
|
+
"thread.message.sent": "thread.message.sent";
|
|
441
|
+
"thread.participant.joined": "thread.participant.joined";
|
|
442
|
+
"thread.participant.left": "thread.participant.left";
|
|
443
|
+
"thread.participant.mentioned": "thread.participant.mentioned";
|
|
444
|
+
"thread.context.changed": "thread.context.changed";
|
|
445
|
+
"thread.status.changed": "thread.status.changed";
|
|
446
|
+
"thread.agent.delegated": "thread.agent.delegated";
|
|
447
|
+
"thread.agent.completed": "thread.agent.completed";
|
|
448
|
+
"thread.workflow.triggered": "thread.workflow.triggered";
|
|
449
|
+
"thread.workflow.completed": "thread.workflow.completed";
|
|
450
|
+
"thread.follow_up.due": "thread.follow_up.due";
|
|
451
|
+
"thread.reminder.due": "thread.reminder.due";
|
|
452
|
+
}>, z.ZodString]>;
|
|
453
|
+
timeout: z.ZodOptional<z.ZodString>;
|
|
454
|
+
onTimeout: z.ZodOptional<z.ZodString>;
|
|
455
|
+
}, z.core.$strip>;
|
|
456
|
+
export type EventWait = z.infer<typeof EventWaitSchema>;
|
|
457
|
+
/**
|
|
458
|
+
* Full events configuration block for YAML
|
|
459
|
+
*/
|
|
460
|
+
export declare const EventsConfigSchema: z.ZodObject<{
|
|
461
|
+
subscribes: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
|
|
462
|
+
"thread.message.received": "thread.message.received";
|
|
463
|
+
"thread.message.sent": "thread.message.sent";
|
|
464
|
+
"thread.participant.joined": "thread.participant.joined";
|
|
465
|
+
"thread.participant.left": "thread.participant.left";
|
|
466
|
+
"thread.participant.mentioned": "thread.participant.mentioned";
|
|
467
|
+
"thread.context.changed": "thread.context.changed";
|
|
468
|
+
"thread.status.changed": "thread.status.changed";
|
|
469
|
+
"thread.agent.delegated": "thread.agent.delegated";
|
|
470
|
+
"thread.agent.completed": "thread.agent.completed";
|
|
471
|
+
"thread.workflow.triggered": "thread.workflow.triggered";
|
|
472
|
+
"thread.workflow.completed": "thread.workflow.completed";
|
|
473
|
+
"thread.follow_up.due": "thread.follow_up.due";
|
|
474
|
+
"thread.reminder.due": "thread.reminder.due";
|
|
475
|
+
}>, z.ZodString]>>>;
|
|
476
|
+
condition: z.ZodOptional<z.ZodString>;
|
|
477
|
+
emits: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
|
|
478
|
+
"thread.message.received": "thread.message.received";
|
|
479
|
+
"thread.message.sent": "thread.message.sent";
|
|
480
|
+
"thread.participant.joined": "thread.participant.joined";
|
|
481
|
+
"thread.participant.left": "thread.participant.left";
|
|
482
|
+
"thread.participant.mentioned": "thread.participant.mentioned";
|
|
483
|
+
"thread.context.changed": "thread.context.changed";
|
|
484
|
+
"thread.status.changed": "thread.status.changed";
|
|
485
|
+
"thread.agent.delegated": "thread.agent.delegated";
|
|
486
|
+
"thread.agent.completed": "thread.agent.completed";
|
|
487
|
+
"thread.workflow.triggered": "thread.workflow.triggered";
|
|
488
|
+
"thread.workflow.completed": "thread.workflow.completed";
|
|
489
|
+
"thread.follow_up.due": "thread.follow_up.due";
|
|
490
|
+
"thread.reminder.due": "thread.reminder.due";
|
|
491
|
+
}>, z.ZodString]>>>;
|
|
492
|
+
waits: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
493
|
+
event: z.ZodUnion<readonly [z.ZodEnum<{
|
|
494
|
+
"thread.message.received": "thread.message.received";
|
|
495
|
+
"thread.message.sent": "thread.message.sent";
|
|
496
|
+
"thread.participant.joined": "thread.participant.joined";
|
|
497
|
+
"thread.participant.left": "thread.participant.left";
|
|
498
|
+
"thread.participant.mentioned": "thread.participant.mentioned";
|
|
499
|
+
"thread.context.changed": "thread.context.changed";
|
|
500
|
+
"thread.status.changed": "thread.status.changed";
|
|
501
|
+
"thread.agent.delegated": "thread.agent.delegated";
|
|
502
|
+
"thread.agent.completed": "thread.agent.completed";
|
|
503
|
+
"thread.workflow.triggered": "thread.workflow.triggered";
|
|
504
|
+
"thread.workflow.completed": "thread.workflow.completed";
|
|
505
|
+
"thread.follow_up.due": "thread.follow_up.due";
|
|
506
|
+
"thread.reminder.due": "thread.reminder.due";
|
|
507
|
+
}>, z.ZodString]>;
|
|
508
|
+
timeout: z.ZodOptional<z.ZodString>;
|
|
509
|
+
onTimeout: z.ZodOptional<z.ZodString>;
|
|
510
|
+
}, z.core.$strip>>>;
|
|
511
|
+
cancels: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
|
|
512
|
+
"thread.message.received": "thread.message.received";
|
|
513
|
+
"thread.message.sent": "thread.message.sent";
|
|
514
|
+
"thread.participant.joined": "thread.participant.joined";
|
|
515
|
+
"thread.participant.left": "thread.participant.left";
|
|
516
|
+
"thread.participant.mentioned": "thread.participant.mentioned";
|
|
517
|
+
"thread.context.changed": "thread.context.changed";
|
|
518
|
+
"thread.status.changed": "thread.status.changed";
|
|
519
|
+
"thread.agent.delegated": "thread.agent.delegated";
|
|
520
|
+
"thread.agent.completed": "thread.agent.completed";
|
|
521
|
+
"thread.workflow.triggered": "thread.workflow.triggered";
|
|
522
|
+
"thread.workflow.completed": "thread.workflow.completed";
|
|
523
|
+
"thread.follow_up.due": "thread.follow_up.due";
|
|
524
|
+
"thread.reminder.due": "thread.reminder.due";
|
|
525
|
+
}>, z.ZodString]>>>;
|
|
526
|
+
cancelCondition: z.ZodOptional<z.ZodString>;
|
|
527
|
+
}, z.core.$strip>;
|
|
528
|
+
export type EventsConfig = z.infer<typeof EventsConfigSchema>;
|
package/dist/index.d.ts
CHANGED
|
@@ -15,4 +15,20 @@ declare const _default: {
|
|
|
15
15
|
};
|
|
16
16
|
export default _default;
|
|
17
17
|
export { defineConfig, defineModel, defineChannel, definePage, defineWorkflow, defineAgent, defineEnv, defineNavigation, loadConfig, validateConfig, CONFIG_FILE_NAMES, getAllEnvKeys, getRequiredInstallEnvKeys, } from './config';
|
|
18
|
+
export { defineSchema, validateCRMSchema, parseCRMSchema, safeParseCRMSchema, } from './schemas';
|
|
19
|
+
export { ThreadEventTypeSchema, CustomEventTypeSchema, EventTypeSchema, ParticipantKindSchema, BaseEventPayloadSchema, MessageEventPayloadSchema, ParticipantEventPayloadSchema, ContextChangedPayloadSchema, StatusChangedPayloadSchema, ScheduledEventPayloadSchema, AgentWorkflowEventPayloadSchema, CustomEventPayloadSchema, ThreadEventPayloadSchema, ThreadEventSchema, CreateThreadEventInputSchema, EventSubscriptionSchema, EventWaitSchema, EventsConfigSchema, } from './events';
|
|
20
|
+
export type { ThreadEventType, CustomEventType, EventType, ParticipantKind, BaseEventPayload, MessageEventPayload, ParticipantEventPayload, ContextChangedPayload, StatusChangedPayload, ScheduledEventPayload, AgentWorkflowEventPayload, CustomEventPayload, ThreadEventPayload, ThreadEvent, CreateThreadEventInput, EventSubscription, EventWait, EventsConfig, } from './events';
|
|
21
|
+
export { CRMDataSchema, SenderContextSchema as TriggerSenderContextSchema, ThreadContextItemSchema as TriggerThreadContextItemSchema, ParticipantContextSchema, TriggerContextSchema, InputMappingSchema, EventConditionsSchema, TriggerConfigSchema, ResolvedTriggerSchema, WorkflowInputDefinitionSchema, WorkflowInputSchemaSchema, TriggerResolutionError, evaluateTemplate, evaluateCondition, resolveInputMappings, matchesTrigger, } from './triggers';
|
|
22
|
+
export type { CRMData, SenderContext as TriggerSenderContext, ThreadContextItem as TriggerThreadContextItem, ParticipantContext, TriggerContext, InputMapping, EventConditions, TriggerConfig, ResolvedTrigger, WorkflowInputDefinition, WorkflowInputSchema as TriggerWorkflowInputSchema, } from './triggers';
|
|
23
|
+
export { WORKFLOW_SCHEMA_VERSION, WorkflowInputSchema as WorkflowYAMLInputSchema, WorkflowStepInputSchema, WorkflowStepSchema, WorkflowRuntimeSchema, WorkflowYAMLSchema, WorkflowMetadataSchema, WorkflowExecutionStatusSchema, WorkflowExecutionResultSchema, defineWorkflowYAML, validateWorkflowYAML, } from './workflows';
|
|
24
|
+
export type { WorkflowInput as WorkflowYAMLInput, WorkflowStepInput, WorkflowStep, WorkflowRuntime, WorkflowYAML, WorkflowMetadata, WorkflowExecutionStatus, WorkflowExecutionResult, } from './workflows';
|
|
25
|
+
export { SKILL_SCHEMA_VERSION, SkillSourceSchema, SkillToolRequirementSchema, SkillExampleSchema, SkillEvaluationMetricSchema, SkillYAMLSchema, SkillRefSchema, SkillMetadataSchema, ResolvedSkillSchema, defineSkill, validateSkillYAML, formatSkillInstructions, } from './skills';
|
|
26
|
+
export type { SkillSource, SkillToolRequirement, SkillExample, SkillEvaluationMetric, SkillYAML, SkillRef, SkillMetadata, ResolvedSkill, } from './skills';
|
|
27
|
+
export { CRMContextSchema, SenderContextSchema, ThreadContextItemSchema, ThreadInfoSchema, AgentContextSchema, MockSenderContextSchema, MockThreadContextSchema, MockContextSchema, SandboxConfigSchema, buildAgentContext, buildContextFromMock, formatContextForPrompt, getContextByHandle, getContextByModel, } from './context';
|
|
28
|
+
export type { CRMContext, SenderContext, ThreadContextItem, ThreadInfo, AgentContext, MockSenderContext, MockThreadContext, MockContext, SandboxConfig, } from './context';
|
|
29
|
+
export { MemoryEntryTypeSchema, MemoryEntrySchema, WorkingMemoryConfigSchema, SemanticMemoryConfigSchema, ExternalMemoryConfigSchema, MemoryConfigSchema, MemoryScopeSchema, MemoryQueryOptionsSchema, ConversationSummarySchema, AgentObservationSchema, ExternalDataCacheSchema, MemoryService, InMemoryStore, createInMemoryService, } from './memory';
|
|
30
|
+
export type { MemoryEntryType, MemoryEntry, WorkingMemoryConfig as MemoryWorkingConfig, SemanticMemoryConfig as MemorySemanticConfig, ExternalMemoryConfig as MemoryExternalConfig, MemoryConfig, MemoryScope, MemoryQueryOptions, ConversationSummary, AgentObservation, ExternalDataCache, MemoryStore, } from './memory';
|
|
31
|
+
export type { CRMFieldType, CRMFieldRequirement, CRMFieldOption, CRMFieldDefinition, CRMFieldSchema, CRMModelSchema, CRMCardinality, CRMOnDelete, CRMRelationshipLink, CRMRelationshipSchema, CRMSchema, CRMSchemaValidationResult, } from './schemas';
|
|
18
32
|
export type { SkedyulConfig, SerializableSkedyulConfig, InstallConfig, ProvisionConfig, BaseDefinition, Scope, FieldOwner, Visibility, ComputeLayer, StructuredFilter, FilterOperator, FilterCondition, FieldOption, EnvVariable, EnvSchema, FieldType, Cardinality, OnDelete, InlineFieldDefinition, FieldVisibility, FieldDefinition, ModelDefinition, RelationshipLink, RelationshipDefinition, CapabilityType, ChannelCapability, ChannelFieldPermissions, ChannelField, ChannelDefinition, WorkflowActionInput, WorkflowAction, WorkflowDefinition, AgentDefinition, NavigationItem, NavigationSection, NavigationSidebar, BreadcrumbItem, NavigationBreadcrumb, NavigationConfig, ContextMode, ContextItemModel, ContextItemTool, ContextItem, ContextDefinition, FormStyleProps, ButtonVariant, ButtonSize, ButtonProps, RelationshipExtension, FormHeader, FormActionDefinition, ActionDefinition, ModalFormDefinition, InputComponent, TextareaComponent, SelectComponent, ComboboxComponent, CheckboxComponent, DatePickerComponent, TimePickerComponent, StatusIndicator, FieldSettingComponent, ImageSettingComponent, FileSettingComponent, ListItemTemplate, ListComponent, EmptyFormComponent, AlertComponent, FormComponent, FormLayoutColumn, FormLayoutRow, FormLayoutConfig, FormProps, CardHeader, CardBlock, ListBlock, ModelMapperBlock, BlockDefinition, PageType, PageDefinition, HttpMethod, WebhookRequest, WebhookHandlerContext, WebhookHandlerResponse, WebhookHandlerFn, WebhookHandlerDefinition, Webhooks, WebhookHandlerMetadata, ModelDependency, ChannelDependency, WorkflowDependency, ResourceDependency, } from './config';
|
|
33
|
+
export { compileAgent, compileWorkflow } from './compiler';
|
|
34
|
+
export type { ValidationError, ValidationWarning, ResolvedPersona, ResolvedTool, EventConfig as CompilerEventConfig, IRMemoryConfig, PolicyConfig, IRRuntimeConfig, AgentIR, WorkflowStepIR, WorkflowIR, CompilationResult, } from './compiler';
|