skedyul 1.2.41 → 1.2.44

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 +17637 -6230
  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 +23 -10
  19. package/dist/esm/index.mjs +9630 -449
  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 +9723 -460
  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 +23 -10
  37. package/dist/serverless/server.mjs +23 -10
  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 +2 -1
  47. package/dist/types/tool-response.d.ts +16 -0
  48. package/dist/types/tool.d.ts +32 -8
  49. package/dist/workflows/index.d.ts +1 -0
  50. package/dist/workflows/types.d.ts +295 -0
  51. package/package.json +19 -1
@@ -9,7 +9,7 @@ export type { InvocationType, ServerHookHandle, InvocationContext, } from './inv
9
9
  export { createToolCallContext, createServerHookContext, createWebhookContext, createWorkflowStepContext, } from './invocation';
10
10
  export type { ToolTrigger, ProvisionToolContext, FieldChangeToolContext, PageActionToolContext, FormSubmitToolContext, AgentToolContext, WorkflowToolContext, ToolExecutionContext, } from './tool-context';
11
11
  export { isProvisionContext, isRuntimeContext } from './tool-context';
12
- export type { ToolResult, ToolSuccess, ToolFailure, ErrorCode, ErrorCategory, ToolWarning, ToolPagination, ToolBilling, ToolRetry, ToolTiming, BillingInfo, ToolResponseMeta, ToolEffect, ToolError, ToolExecutionResult, ToolSchemaWithJson, ToolSchema, ToolHandler, ToolDefinition, ToolRegistryEntry, ToolRegistry, ToolName, ToolMetadata, ToolCallResponse, } from './tool';
12
+ export type { ToolResult, ToolSuccess, ToolFailure, ErrorCode, ErrorCategory, ToolWarning, ToolPagination, ToolBilling, ToolRetry, ToolTiming, ToolCompletionHints, ToolConfig, BillingInfo, ToolResponseMeta, ToolEffect, ToolError, ToolExecutionResult, ToolSchemaWithJson, ToolSchema, ToolHandler, ToolDefinition, ToolRegistryEntry, ToolRegistry, ToolName, ToolMetadata, ToolCallResponse, } from './tool';
13
13
  export { ToolResponseMetaSchema } from './tool';
14
14
  export { createSuccessResponse, createListResponse, createErrorResponse, createValidationError, createNotFoundError, createAuthError, createRateLimitError, createExternalError, createTimeoutError, createPermissionError, createConflictError, isSuccess, isFailure, isRetryable, getRetryDelay, } from './tool-response';
15
15
  export type { HealthStatus, ComputeLayer, DedicatedServerInstance, ServerlessServerInstance, SkedyulServerInstance, } from './server';
@@ -18,3 +18,4 @@ export type { APIGatewayProxyEvent, APIGatewayProxyResult } from './aws';
18
18
  export type { WebhookWireRequest, HandlerRawRequest, WebhookRequest, WebhookResponse, ProvisionWebhookContext, RuntimeWebhookContext, WebhookContext, WebhookHandler, WebhookLifecycleContext, CommunicationChannelLifecycleContext, WebhookLifecycleResult, WebhookLifecycleHook, WebhookInvocationMode, WebhookType, WebhookDefinition, WebhookRegistry, WebhookName, WebhookMetadata, } from './webhook';
19
19
  export { isRuntimeWebhookContext } from './webhook';
20
20
  export type { MCPError, MCPContentItem, MCPResult, MCPResponse, MCPRequest, } from './mcp-protocol';
21
+ export type { DataBlock, DataBlockLink, SpreadsheetBlock, SpreadsheetColumn, ProfileBlock, ProfileAvatar, ProfileField, FieldChangesBlock, FieldChangeItem, DateTimeBlock, } from './data-blocks';
@@ -1,4 +1,5 @@
1
1
  import type { ToolSuccess, ToolFailure, ToolResult, ErrorCode, ErrorCategory, ToolWarning, ToolPagination, ToolBilling, ToolEffect, ToolRetry } from './tool';
2
+ import type { DataBlock } from './data-blocks';
2
3
  /**
3
4
  * Create a successful tool result.
4
5
  *
@@ -7,9 +8,24 @@ import type { ToolSuccess, ToolFailure, ToolResult, ErrorCode, ErrorCategory, To
7
8
  * import { createSuccessResponse } from 'skedyul'
8
9
  *
9
10
  * return createSuccessResponse({ order: orderData })
11
+ *
12
+ * // With dataBlocks for rich UI rendering
13
+ * return createSuccessResponse(
14
+ * { booking: bookingData },
15
+ * {
16
+ * dataBlocks: [{
17
+ * type: 'dateTime',
18
+ * title: 'Booking Confirmed',
19
+ * datetime: '2026-05-20T14:00:00',
20
+ * status: 'confirmed',
21
+ * }]
22
+ * }
23
+ * )
10
24
  * ```
11
25
  */
12
26
  export declare function createSuccessResponse<T>(output: T, options?: {
27
+ /** Rich data blocks for UI rendering (profiles, spreadsheets, datetime cards) */
28
+ dataBlocks?: DataBlock[];
13
29
  warnings?: ToolWarning[];
14
30
  pagination?: ToolPagination;
15
31
  billing?: ToolBilling;
@@ -81,6 +81,28 @@ export interface ToolEffect {
81
81
  export interface ToolTiming {
82
82
  durationMs: number;
83
83
  }
84
+ /**
85
+ * Hints for controlling tool completion behavior in agent loops.
86
+ * Used to prevent duplicate calls and determine when to stop tool execution.
87
+ */
88
+ export interface ToolCompletionHints {
89
+ /** Maximum times this tool can be called per agent run. Default: unlimited */
90
+ maxCallsPerRun?: number;
91
+ /** If true, tool is safe to call multiple times with same args (no side effects) */
92
+ idempotent?: boolean;
93
+ }
94
+ /**
95
+ * Configuration options for tool execution behavior.
96
+ * Groups timeout, retry, and completion hint settings.
97
+ */
98
+ export interface ToolConfig {
99
+ /** Timeout in milliseconds. Defaults to 10000 (10 seconds) if not specified. */
100
+ timeout?: number;
101
+ /** Maximum retry attempts. Defaults to 1 (no retries) if not specified. */
102
+ retries?: number;
103
+ /** Hints for controlling tool completion behavior in agent loops */
104
+ completionHints?: ToolCompletionHints;
105
+ }
84
106
  /**
85
107
  * Successful tool execution result.
86
108
  * Output is guaranteed to exist.
@@ -88,6 +110,8 @@ export interface ToolTiming {
88
110
  export interface ToolSuccess<T = unknown> {
89
111
  success: true;
90
112
  output: T;
113
+ /** Rich data blocks for UI rendering (profiles, spreadsheets, datetime cards) */
114
+ dataBlocks?: import('./data-blocks').DataBlock[];
91
115
  warnings?: ToolWarning[];
92
116
  pagination?: ToolPagination;
93
117
  billing?: ToolBilling;
@@ -151,6 +175,8 @@ export interface ToolExecutionResult<Output = unknown> {
151
175
  meta: ToolResponseMeta;
152
176
  effect?: ToolEffect;
153
177
  error?: ToolError | null;
178
+ /** Rich data blocks for UI rendering (profiles, spreadsheets, datetime cards) */
179
+ dataBlocks?: import('./data-blocks').DataBlock[];
154
180
  }
155
181
  export interface ToolSchemaWithJson<Schema extends z.ZodTypeAny = z.ZodTypeAny> {
156
182
  zod: Schema;
@@ -170,10 +196,8 @@ export interface ToolDefinition<Input = unknown, Output = unknown, InputSchema e
170
196
  inputSchema: ToolSchema<InputSchema>;
171
197
  handler: ToolHandler<Input, Output>;
172
198
  outputSchema?: ToolSchema<OutputSchema>;
173
- /** Timeout in milliseconds. Defaults to 10000 (10 seconds) if not specified. */
174
- timeout?: number;
175
- /** Maximum retry attempts. Defaults to 1 (no retries) if not specified. */
176
- retries?: number;
199
+ /** Tool execution configuration (timeout, retries, completion hints) */
200
+ config?: ToolConfig;
177
201
  [key: string]: unknown;
178
202
  }
179
203
  export interface ToolRegistryEntry {
@@ -183,6 +207,8 @@ export interface ToolRegistryEntry {
183
207
  inputSchema: ToolSchema;
184
208
  handler: unknown;
185
209
  outputSchema?: ToolSchema;
210
+ /** Tool execution configuration (timeout, retries, completion hints) */
211
+ config?: ToolConfig;
186
212
  [key: string]: unknown;
187
213
  }
188
214
  export type ToolRegistry = Record<string, ToolRegistryEntry>;
@@ -193,10 +219,8 @@ export interface ToolMetadata {
193
219
  description: string;
194
220
  inputSchema?: Record<string, unknown>;
195
221
  outputSchema?: Record<string, unknown>;
196
- /** Timeout in milliseconds. Defaults to 10000 (10 seconds) if not specified. */
197
- timeout?: number;
198
- /** Maximum retry attempts. Defaults to 1 (no retries) if not specified. */
199
- retries?: number;
222
+ /** Tool execution configuration (timeout, retries, completion hints) */
223
+ config?: ToolConfig;
200
224
  }
201
225
  /**
202
226
  * Response from a tool call.
@@ -0,0 +1 @@
1
+ export { WORKFLOW_SCHEMA_VERSION, WorkflowInputSchema, WorkflowStepInputSchema, WorkflowStepSchema, WorkflowRuntimeSchema, WorkflowYAMLSchema, WorkflowMetadataSchema, WorkflowExecutionStatusSchema, WorkflowExecutionResultSchema, type WorkflowInput, type WorkflowStepInput, type WorkflowStep, type WorkflowRuntime, type WorkflowYAML, type WorkflowMetadata, type WorkflowExecutionStatus, type WorkflowExecutionResult, defineWorkflowYAML, validateWorkflowYAML, } from './types';
@@ -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.41",
3
+ "version": "1.2.44",
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": [