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.
Files changed (51) hide show
  1. package/dist/cli/commands/agents.d.ts +1 -0
  2. package/dist/cli/commands/chat.d.ts +1 -0
  3. package/dist/cli/commands/crm.d.ts +1 -0
  4. package/dist/cli/commands/skills.d.ts +1 -0
  5. package/dist/cli/index.js +17636 -6197
  6. package/dist/cli/utils/auth.js +495 -0
  7. package/dist/cli/utils/mock-context.d.ts +22 -0
  8. package/dist/cli/utils/sse.d.ts +100 -0
  9. package/dist/compiler/compiler.d.ts +12 -0
  10. package/dist/compiler/index.d.ts +2 -0
  11. package/dist/compiler/types.d.ts +173 -0
  12. package/dist/config/index.d.ts +1 -0
  13. package/dist/config/schema-loader.d.ts +156 -0
  14. package/dist/config/types/model.d.ts +28 -0
  15. package/dist/context/index.d.ts +2 -0
  16. package/dist/context/resolver.d.ts +51 -0
  17. package/dist/context/types.d.ts +217 -0
  18. package/dist/dedicated/server.js +60 -15
  19. package/dist/esm/index.mjs +9815 -458
  20. package/dist/events/index.d.ts +1 -0
  21. package/dist/events/types.d.ts +528 -0
  22. package/dist/index.d.ts +16 -0
  23. package/dist/index.js +9912 -458
  24. package/dist/memory/index.d.ts +4 -0
  25. package/dist/memory/service.d.ts +78 -0
  26. package/dist/memory/types.d.ts +169 -0
  27. package/dist/schemas/agent-schema-v3.d.ts +437 -0
  28. package/dist/schemas/agent-schema-v3.js +539 -0
  29. package/dist/schemas/agent-schema-v3.mjs +497 -0
  30. package/dist/schemas/agent-schema.d.ts +1504 -0
  31. package/dist/schemas/agent-schema.js +7896 -0
  32. package/dist/schemas/agent-schema.mjs +7867 -0
  33. package/dist/schemas/crm-schema.d.ts +448 -0
  34. package/dist/schemas/index.d.ts +2 -0
  35. package/dist/schemas.d.ts +69 -36
  36. package/dist/server.js +60 -15
  37. package/dist/serverless/server.mjs +60 -15
  38. package/dist/skills/index.d.ts +1 -0
  39. package/dist/skills/types.d.ts +355 -0
  40. package/dist/skills/types.js +281 -0
  41. package/dist/skills/types.mjs +234 -0
  42. package/dist/triggers/index.d.ts +2 -0
  43. package/dist/triggers/resolver.d.ts +31 -0
  44. package/dist/triggers/types.d.ts +313 -0
  45. package/dist/types/data-blocks.d.ts +105 -0
  46. package/dist/types/index.d.ts +3 -1
  47. package/dist/types/tool-response.d.ts +202 -0
  48. package/dist/types/tool.d.ts +157 -28
  49. package/dist/workflows/index.d.ts +1 -0
  50. package/dist/workflows/types.d.ts +295 -0
  51. package/package.json +19 -1
@@ -0,0 +1,295 @@
1
+ import { z } from 'zod/v4';
2
+ /**
3
+ * Workflow YAML schema version
4
+ */
5
+ export declare const WORKFLOW_SCHEMA_VERSION = "https://skedyul.com/schemas/workflow/v1";
6
+ /**
7
+ * Workflow input definition (what inputs the workflow needs)
8
+ */
9
+ export declare const WorkflowInputSchema: z.ZodObject<{
10
+ type: z.ZodString;
11
+ required: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
12
+ description: z.ZodOptional<z.ZodString>;
13
+ default: z.ZodOptional<z.ZodUnknown>;
14
+ }, z.core.$strip>;
15
+ export type WorkflowInput = z.infer<typeof WorkflowInputSchema>;
16
+ /**
17
+ * Workflow step input - can be a literal value or a Liquid template
18
+ */
19
+ export declare const WorkflowStepInputSchema: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
20
+ export type WorkflowStepInput = z.infer<typeof WorkflowStepInputSchema>;
21
+ /**
22
+ * Workflow step definition
23
+ */
24
+ export declare const WorkflowStepSchema: z.ZodObject<{
25
+ service: z.ZodString;
26
+ cmd: z.ZodString;
27
+ needs: z.ZodOptional<z.ZodArray<z.ZodString>>;
28
+ inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>>;
29
+ condition: z.ZodOptional<z.ZodString>;
30
+ retry: z.ZodOptional<z.ZodObject<{
31
+ attempts: z.ZodOptional<z.ZodNumber>;
32
+ backoff: z.ZodOptional<z.ZodEnum<{
33
+ linear: "linear";
34
+ exponential: "exponential";
35
+ }>>;
36
+ }, z.core.$strip>>;
37
+ timeout: z.ZodOptional<z.ZodString>;
38
+ }, z.core.$strip>;
39
+ export type WorkflowStep = z.infer<typeof WorkflowStepSchema>;
40
+ /**
41
+ * Workflow runtime configuration
42
+ */
43
+ export declare const WorkflowRuntimeSchema: z.ZodObject<{
44
+ durable: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
45
+ timeout: z.ZodOptional<z.ZodString>;
46
+ retry: z.ZodOptional<z.ZodObject<{
47
+ attempts: z.ZodOptional<z.ZodNumber>;
48
+ backoff: z.ZodOptional<z.ZodEnum<{
49
+ linear: "linear";
50
+ exponential: "exponential";
51
+ }>>;
52
+ }, z.core.$strip>>;
53
+ }, z.core.$strip>;
54
+ export type WorkflowRuntime = z.infer<typeof WorkflowRuntimeSchema>;
55
+ /**
56
+ * Full Workflow YAML schema (v2 - event-driven)
57
+ */
58
+ export declare const WorkflowYAMLSchema: z.ZodObject<{
59
+ $schema: z.ZodOptional<z.ZodString>;
60
+ handle: z.ZodString;
61
+ name: z.ZodString;
62
+ version: z.ZodOptional<z.ZodString>;
63
+ description: z.ZodOptional<z.ZodString>;
64
+ inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
65
+ type: z.ZodString;
66
+ required: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
67
+ description: z.ZodOptional<z.ZodString>;
68
+ default: z.ZodOptional<z.ZodUnknown>;
69
+ }, z.core.$strip>>>;
70
+ events: z.ZodOptional<z.ZodObject<{
71
+ subscribes: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
72
+ "thread.message.received": "thread.message.received";
73
+ "thread.message.sent": "thread.message.sent";
74
+ "thread.participant.joined": "thread.participant.joined";
75
+ "thread.participant.left": "thread.participant.left";
76
+ "thread.participant.mentioned": "thread.participant.mentioned";
77
+ "thread.context.changed": "thread.context.changed";
78
+ "thread.status.changed": "thread.status.changed";
79
+ "thread.agent.delegated": "thread.agent.delegated";
80
+ "thread.agent.completed": "thread.agent.completed";
81
+ "thread.workflow.triggered": "thread.workflow.triggered";
82
+ "thread.workflow.completed": "thread.workflow.completed";
83
+ "thread.follow_up.due": "thread.follow_up.due";
84
+ "thread.reminder.due": "thread.reminder.due";
85
+ }>, z.ZodString]>>>;
86
+ condition: z.ZodOptional<z.ZodString>;
87
+ emits: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
88
+ "thread.message.received": "thread.message.received";
89
+ "thread.message.sent": "thread.message.sent";
90
+ "thread.participant.joined": "thread.participant.joined";
91
+ "thread.participant.left": "thread.participant.left";
92
+ "thread.participant.mentioned": "thread.participant.mentioned";
93
+ "thread.context.changed": "thread.context.changed";
94
+ "thread.status.changed": "thread.status.changed";
95
+ "thread.agent.delegated": "thread.agent.delegated";
96
+ "thread.agent.completed": "thread.agent.completed";
97
+ "thread.workflow.triggered": "thread.workflow.triggered";
98
+ "thread.workflow.completed": "thread.workflow.completed";
99
+ "thread.follow_up.due": "thread.follow_up.due";
100
+ "thread.reminder.due": "thread.reminder.due";
101
+ }>, z.ZodString]>>>;
102
+ waits: z.ZodOptional<z.ZodArray<z.ZodObject<{
103
+ event: z.ZodUnion<readonly [z.ZodEnum<{
104
+ "thread.message.received": "thread.message.received";
105
+ "thread.message.sent": "thread.message.sent";
106
+ "thread.participant.joined": "thread.participant.joined";
107
+ "thread.participant.left": "thread.participant.left";
108
+ "thread.participant.mentioned": "thread.participant.mentioned";
109
+ "thread.context.changed": "thread.context.changed";
110
+ "thread.status.changed": "thread.status.changed";
111
+ "thread.agent.delegated": "thread.agent.delegated";
112
+ "thread.agent.completed": "thread.agent.completed";
113
+ "thread.workflow.triggered": "thread.workflow.triggered";
114
+ "thread.workflow.completed": "thread.workflow.completed";
115
+ "thread.follow_up.due": "thread.follow_up.due";
116
+ "thread.reminder.due": "thread.reminder.due";
117
+ }>, z.ZodString]>;
118
+ timeout: z.ZodOptional<z.ZodString>;
119
+ onTimeout: z.ZodOptional<z.ZodString>;
120
+ }, z.core.$strip>>>;
121
+ cancels: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
122
+ "thread.message.received": "thread.message.received";
123
+ "thread.message.sent": "thread.message.sent";
124
+ "thread.participant.joined": "thread.participant.joined";
125
+ "thread.participant.left": "thread.participant.left";
126
+ "thread.participant.mentioned": "thread.participant.mentioned";
127
+ "thread.context.changed": "thread.context.changed";
128
+ "thread.status.changed": "thread.status.changed";
129
+ "thread.agent.delegated": "thread.agent.delegated";
130
+ "thread.agent.completed": "thread.agent.completed";
131
+ "thread.workflow.triggered": "thread.workflow.triggered";
132
+ "thread.workflow.completed": "thread.workflow.completed";
133
+ "thread.follow_up.due": "thread.follow_up.due";
134
+ "thread.reminder.due": "thread.reminder.due";
135
+ }>, z.ZodString]>>>;
136
+ cancelCondition: z.ZodOptional<z.ZodString>;
137
+ }, z.core.$strip>>;
138
+ steps: z.ZodRecord<z.ZodString, z.ZodObject<{
139
+ service: z.ZodString;
140
+ cmd: z.ZodString;
141
+ needs: z.ZodOptional<z.ZodArray<z.ZodString>>;
142
+ inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>>;
143
+ condition: z.ZodOptional<z.ZodString>;
144
+ retry: z.ZodOptional<z.ZodObject<{
145
+ attempts: z.ZodOptional<z.ZodNumber>;
146
+ backoff: z.ZodOptional<z.ZodEnum<{
147
+ linear: "linear";
148
+ exponential: "exponential";
149
+ }>>;
150
+ }, z.core.$strip>>;
151
+ timeout: z.ZodOptional<z.ZodString>;
152
+ }, z.core.$strip>>;
153
+ runtime: z.ZodOptional<z.ZodObject<{
154
+ durable: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
155
+ timeout: z.ZodOptional<z.ZodString>;
156
+ retry: z.ZodOptional<z.ZodObject<{
157
+ attempts: z.ZodOptional<z.ZodNumber>;
158
+ backoff: z.ZodOptional<z.ZodEnum<{
159
+ linear: "linear";
160
+ exponential: "exponential";
161
+ }>>;
162
+ }, z.core.$strip>>;
163
+ }, z.core.$strip>>;
164
+ }, z.core.$strip>;
165
+ export type WorkflowYAML = z.infer<typeof WorkflowYAMLSchema>;
166
+ /**
167
+ * Workflow file metadata (for registry)
168
+ */
169
+ export declare const WorkflowMetadataSchema: z.ZodObject<{
170
+ handle: z.ZodString;
171
+ name: z.ZodString;
172
+ version: z.ZodOptional<z.ZodString>;
173
+ description: z.ZodOptional<z.ZodString>;
174
+ inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
175
+ type: z.ZodString;
176
+ required: z.ZodOptional<z.ZodBoolean>;
177
+ description: z.ZodOptional<z.ZodString>;
178
+ default: z.ZodOptional<z.ZodUnknown>;
179
+ }, z.core.$strip>>>;
180
+ events: z.ZodOptional<z.ZodObject<{
181
+ subscribes: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
182
+ "thread.message.received": "thread.message.received";
183
+ "thread.message.sent": "thread.message.sent";
184
+ "thread.participant.joined": "thread.participant.joined";
185
+ "thread.participant.left": "thread.participant.left";
186
+ "thread.participant.mentioned": "thread.participant.mentioned";
187
+ "thread.context.changed": "thread.context.changed";
188
+ "thread.status.changed": "thread.status.changed";
189
+ "thread.agent.delegated": "thread.agent.delegated";
190
+ "thread.agent.completed": "thread.agent.completed";
191
+ "thread.workflow.triggered": "thread.workflow.triggered";
192
+ "thread.workflow.completed": "thread.workflow.completed";
193
+ "thread.follow_up.due": "thread.follow_up.due";
194
+ "thread.reminder.due": "thread.reminder.due";
195
+ }>, z.ZodString]>>>;
196
+ condition: z.ZodOptional<z.ZodString>;
197
+ emits: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
198
+ "thread.message.received": "thread.message.received";
199
+ "thread.message.sent": "thread.message.sent";
200
+ "thread.participant.joined": "thread.participant.joined";
201
+ "thread.participant.left": "thread.participant.left";
202
+ "thread.participant.mentioned": "thread.participant.mentioned";
203
+ "thread.context.changed": "thread.context.changed";
204
+ "thread.status.changed": "thread.status.changed";
205
+ "thread.agent.delegated": "thread.agent.delegated";
206
+ "thread.agent.completed": "thread.agent.completed";
207
+ "thread.workflow.triggered": "thread.workflow.triggered";
208
+ "thread.workflow.completed": "thread.workflow.completed";
209
+ "thread.follow_up.due": "thread.follow_up.due";
210
+ "thread.reminder.due": "thread.reminder.due";
211
+ }>, z.ZodString]>>>;
212
+ waits: z.ZodOptional<z.ZodArray<z.ZodObject<{
213
+ event: z.ZodUnion<readonly [z.ZodEnum<{
214
+ "thread.message.received": "thread.message.received";
215
+ "thread.message.sent": "thread.message.sent";
216
+ "thread.participant.joined": "thread.participant.joined";
217
+ "thread.participant.left": "thread.participant.left";
218
+ "thread.participant.mentioned": "thread.participant.mentioned";
219
+ "thread.context.changed": "thread.context.changed";
220
+ "thread.status.changed": "thread.status.changed";
221
+ "thread.agent.delegated": "thread.agent.delegated";
222
+ "thread.agent.completed": "thread.agent.completed";
223
+ "thread.workflow.triggered": "thread.workflow.triggered";
224
+ "thread.workflow.completed": "thread.workflow.completed";
225
+ "thread.follow_up.due": "thread.follow_up.due";
226
+ "thread.reminder.due": "thread.reminder.due";
227
+ }>, z.ZodString]>;
228
+ timeout: z.ZodOptional<z.ZodString>;
229
+ onTimeout: z.ZodOptional<z.ZodString>;
230
+ }, z.core.$strip>>>;
231
+ cancels: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
232
+ "thread.message.received": "thread.message.received";
233
+ "thread.message.sent": "thread.message.sent";
234
+ "thread.participant.joined": "thread.participant.joined";
235
+ "thread.participant.left": "thread.participant.left";
236
+ "thread.participant.mentioned": "thread.participant.mentioned";
237
+ "thread.context.changed": "thread.context.changed";
238
+ "thread.status.changed": "thread.status.changed";
239
+ "thread.agent.delegated": "thread.agent.delegated";
240
+ "thread.agent.completed": "thread.agent.completed";
241
+ "thread.workflow.triggered": "thread.workflow.triggered";
242
+ "thread.workflow.completed": "thread.workflow.completed";
243
+ "thread.follow_up.due": "thread.follow_up.due";
244
+ "thread.reminder.due": "thread.reminder.due";
245
+ }>, z.ZodString]>>>;
246
+ cancelCondition: z.ZodOptional<z.ZodString>;
247
+ }, z.core.$strip>>;
248
+ }, z.core.$strip>;
249
+ export type WorkflowMetadata = z.infer<typeof WorkflowMetadataSchema>;
250
+ /**
251
+ * Workflow execution status
252
+ */
253
+ export declare const WorkflowExecutionStatusSchema: z.ZodEnum<{
254
+ PENDING: "PENDING";
255
+ RUNNING: "RUNNING";
256
+ COMPLETED: "COMPLETED";
257
+ FAILED: "FAILED";
258
+ CANCELLED: "CANCELLED";
259
+ WAITING: "WAITING";
260
+ }>;
261
+ export type WorkflowExecutionStatus = z.infer<typeof WorkflowExecutionStatusSchema>;
262
+ /**
263
+ * Workflow execution result
264
+ */
265
+ export declare const WorkflowExecutionResultSchema: z.ZodObject<{
266
+ status: z.ZodEnum<{
267
+ PENDING: "PENDING";
268
+ RUNNING: "RUNNING";
269
+ COMPLETED: "COMPLETED";
270
+ FAILED: "FAILED";
271
+ CANCELLED: "CANCELLED";
272
+ WAITING: "WAITING";
273
+ }>;
274
+ outputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
275
+ error: z.ZodOptional<z.ZodString>;
276
+ startedAt: z.ZodOptional<z.ZodString>;
277
+ completedAt: z.ZodOptional<z.ZodString>;
278
+ cancelledAt: z.ZodOptional<z.ZodString>;
279
+ cancelReason: z.ZodOptional<z.ZodString>;
280
+ }, z.core.$strip>;
281
+ export type WorkflowExecutionResult = z.infer<typeof WorkflowExecutionResultSchema>;
282
+ /**
283
+ * Helper function to define a workflow with type safety
284
+ */
285
+ export declare function defineWorkflowYAML(workflow: WorkflowYAML): WorkflowYAML;
286
+ /**
287
+ * Validate a workflow YAML object
288
+ */
289
+ export declare function validateWorkflowYAML(workflow: unknown): {
290
+ success: true;
291
+ data: WorkflowYAML;
292
+ } | {
293
+ success: false;
294
+ error: z.ZodError;
295
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skedyul",
3
- "version": "1.2.40",
3
+ "version": "1.2.43",
4
4
  "description": "The Skedyul SDK for Node.js",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -31,6 +31,24 @@
31
31
  "types": "./dist/cli/utils/auth.d.ts",
32
32
  "require": "./dist/cli/utils/auth.js",
33
33
  "default": "./dist/cli/utils/auth.js"
34
+ },
35
+ "./schemas/agent-schema": {
36
+ "types": "./dist/schemas/agent-schema.d.ts",
37
+ "import": "./dist/schemas/agent-schema.mjs",
38
+ "require": "./dist/schemas/agent-schema.js",
39
+ "default": "./dist/schemas/agent-schema.js"
40
+ },
41
+ "./schemas/agent-schema-v3": {
42
+ "types": "./dist/schemas/agent-schema-v3.d.ts",
43
+ "import": "./dist/schemas/agent-schema-v3.mjs",
44
+ "require": "./dist/schemas/agent-schema-v3.js",
45
+ "default": "./dist/schemas/agent-schema-v3.js"
46
+ },
47
+ "./skills/types": {
48
+ "types": "./dist/skills/types.d.ts",
49
+ "import": "./dist/skills/types.mjs",
50
+ "require": "./dist/skills/types.js",
51
+ "default": "./dist/skills/types.js"
34
52
  }
35
53
  },
36
54
  "files": [