skedyul 1.2.44 → 1.2.48
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/workflows.d.ts +1 -0
- package/dist/cli/index.js +3670 -9073
- package/dist/cli/utils/auth.d.ts +4 -1
- package/dist/cli/utils/auth.js +32 -8
- package/dist/cli/utils/config.d.ts +23 -0
- package/dist/cli/utils/env-sync.d.ts +46 -0
- package/dist/cli/utils/mcp-http-client.d.ts +74 -0
- package/dist/cli/utils/migration-approval.d.ts +39 -0
- package/dist/cli/utils/mock-context.d.ts +19 -9
- package/dist/cli/utils/sse.d.ts +33 -0
- package/dist/cli/utils.d.ts +5 -1
- package/dist/compiler/types.d.ts +11 -9
- package/dist/config/schema-loader.d.ts +15 -2
- package/dist/config/types/model.d.ts +2 -0
- package/dist/config/types/page.d.ts +9 -0
- package/dist/context/index.d.ts +2 -2
- package/dist/context/resolver.d.ts +29 -28
- package/dist/context/types.d.ts +195 -37
- package/dist/core/client.d.ts +189 -233
- package/dist/dedicated/server.js +252 -163
- package/dist/esm/index.mjs +1149 -7671
- package/dist/index.d.ts +11 -6
- package/dist/index.js +1194 -7669
- package/dist/scheduling/calculateWaitTime.d.ts +16 -0
- package/dist/scheduling/index.d.ts +11 -0
- package/dist/scheduling/index.js +334 -0
- package/dist/scheduling/index.mjs +305 -0
- package/dist/scheduling/isTimeInWindow.d.ts +15 -0
- package/dist/scheduling/types-workflow.d.ts +54 -0
- package/dist/scheduling/types.d.ts +166 -0
- package/dist/schemas/agent-schema-v3.d.ts +406 -60
- package/dist/schemas/agent-schema-v3.js +248 -75
- package/dist/schemas/agent-schema-v3.mjs +234 -73
- package/dist/schemas/agent-schema.js +3 -7295
- package/dist/schemas/agent-schema.mjs +3 -7323
- package/dist/schemas/crm-schema.d.ts +53 -19
- package/dist/schemas/index.d.ts +1 -1
- package/dist/schemas.d.ts +128 -40
- package/dist/server/route-handlers/handlers.d.ts +7 -0
- package/dist/server/utils/env.d.ts +9 -0
- package/dist/server/utils/index.d.ts +1 -0
- package/dist/server/utils/mcp-response.d.ts +11 -0
- package/dist/server.js +252 -163
- package/dist/serverless/server.mjs +252 -163
- package/dist/skills/index.d.ts +1 -1
- package/dist/skills/types.d.ts +34 -23
- package/dist/skills/types.js +8 -17
- package/dist/skills/types.mjs +7 -16
- package/dist/types/index.d.ts +3 -3
- package/dist/types/server.d.ts +1 -0
- package/dist/types/tool-context.d.ts +31 -4
- package/dist/types/tool-response.d.ts +2 -0
- package/dist/types/tool.d.ts +33 -1
- package/package.json +8 -1
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workflow-Safe Scheduling Types
|
|
3
|
+
*
|
|
4
|
+
* These types are plain TypeScript interfaces without zod dependencies.
|
|
5
|
+
* They can be safely imported in Temporal workflow code.
|
|
6
|
+
*
|
|
7
|
+
* Note: The zod schemas in types.ts are the source of truth for validation.
|
|
8
|
+
* These interfaces mirror them for workflow use.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* TimeStamp can be either:
|
|
12
|
+
* - A number representing hour of day (0-23)
|
|
13
|
+
* - An object with hour, minute, second (minute and second default to 0 in parsing)
|
|
14
|
+
*
|
|
15
|
+
* Note: After zod parsing, minute and second are always numbers (defaulted to 0).
|
|
16
|
+
* For workflow input, you can omit them but the resolved type expects numbers.
|
|
17
|
+
*/
|
|
18
|
+
export type TimeStamp = number | {
|
|
19
|
+
hour: number;
|
|
20
|
+
minute: number;
|
|
21
|
+
second: number;
|
|
22
|
+
};
|
|
23
|
+
export type DayOfWeek = 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | 'sunday';
|
|
24
|
+
export interface TimeWindowSlot {
|
|
25
|
+
startTime: TimeStamp;
|
|
26
|
+
endTime: TimeStamp;
|
|
27
|
+
days: DayOfWeek[];
|
|
28
|
+
timezone?: string;
|
|
29
|
+
}
|
|
30
|
+
export type WaitUnit = 'second' | 'seconds' | 'minute' | 'minutes' | 'hour' | 'hours' | 'day' | 'days' | 'week' | 'weeks' | 'month' | 'months' | 'year' | 'years';
|
|
31
|
+
export interface WaitInputRelative {
|
|
32
|
+
mode: 'relative';
|
|
33
|
+
amount: number;
|
|
34
|
+
unit: WaitUnit;
|
|
35
|
+
windows?: TimeWindowSlot[];
|
|
36
|
+
}
|
|
37
|
+
export interface WaitInputAbsolute {
|
|
38
|
+
mode: 'absolute';
|
|
39
|
+
scheduleAt: string | number;
|
|
40
|
+
}
|
|
41
|
+
export type WaitInputType = WaitInputRelative | WaitInputAbsolute;
|
|
42
|
+
export interface CalculateWaitTimeResult {
|
|
43
|
+
waitTime: number;
|
|
44
|
+
scheduledAt: Date;
|
|
45
|
+
}
|
|
46
|
+
export interface TimeWindowPolicy {
|
|
47
|
+
timezone: string;
|
|
48
|
+
windows: TimeWindowSlot[];
|
|
49
|
+
behavior?: {
|
|
50
|
+
responseMode?: 'immediate' | 'ack_and_schedule' | 'schedule_only';
|
|
51
|
+
prompt?: string;
|
|
52
|
+
scheduleFor?: string;
|
|
53
|
+
};
|
|
54
|
+
}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scheduling Types
|
|
3
|
+
*
|
|
4
|
+
* Time window and scheduling types used for agent scheduling and workflow waits.
|
|
5
|
+
* This is the source of truth - skedyul-core re-exports these for backward compatibility.
|
|
6
|
+
*/
|
|
7
|
+
import { z } from 'zod/v4';
|
|
8
|
+
/**
|
|
9
|
+
* TimeStamp can be either:
|
|
10
|
+
* - A number representing hour of day (0-23)
|
|
11
|
+
* - An object with hour, minute, second
|
|
12
|
+
*/
|
|
13
|
+
export declare const TimeStampSchema: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
14
|
+
hour: z.ZodNumber;
|
|
15
|
+
minute: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
16
|
+
second: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
17
|
+
}, z.core.$strip>]>;
|
|
18
|
+
export type TimeStamp = z.infer<typeof TimeStampSchema>;
|
|
19
|
+
export declare const DayOfWeekSchema: z.ZodEnum<{
|
|
20
|
+
monday: "monday";
|
|
21
|
+
tuesday: "tuesday";
|
|
22
|
+
wednesday: "wednesday";
|
|
23
|
+
thursday: "thursday";
|
|
24
|
+
friday: "friday";
|
|
25
|
+
saturday: "saturday";
|
|
26
|
+
sunday: "sunday";
|
|
27
|
+
}>;
|
|
28
|
+
export type DayOfWeek = z.infer<typeof DayOfWeekSchema>;
|
|
29
|
+
export declare const TimeWindowSlotSchema: z.ZodObject<{
|
|
30
|
+
startTime: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
31
|
+
hour: z.ZodNumber;
|
|
32
|
+
minute: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
33
|
+
second: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
34
|
+
}, z.core.$strip>]>;
|
|
35
|
+
endTime: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
36
|
+
hour: z.ZodNumber;
|
|
37
|
+
minute: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
38
|
+
second: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
39
|
+
}, z.core.$strip>]>;
|
|
40
|
+
days: z.ZodArray<z.ZodEnum<{
|
|
41
|
+
monday: "monday";
|
|
42
|
+
tuesday: "tuesday";
|
|
43
|
+
wednesday: "wednesday";
|
|
44
|
+
thursday: "thursday";
|
|
45
|
+
friday: "friday";
|
|
46
|
+
saturday: "saturday";
|
|
47
|
+
sunday: "sunday";
|
|
48
|
+
}>>;
|
|
49
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
50
|
+
}, z.core.$strip>;
|
|
51
|
+
export type TimeWindowSlot = z.infer<typeof TimeWindowSlotSchema>;
|
|
52
|
+
export declare const WaitUnitSchema: z.ZodEnum<{
|
|
53
|
+
hour: "hour";
|
|
54
|
+
minute: "minute";
|
|
55
|
+
days: "days";
|
|
56
|
+
second: "second";
|
|
57
|
+
seconds: "seconds";
|
|
58
|
+
minutes: "minutes";
|
|
59
|
+
hours: "hours";
|
|
60
|
+
day: "day";
|
|
61
|
+
week: "week";
|
|
62
|
+
weeks: "weeks";
|
|
63
|
+
month: "month";
|
|
64
|
+
months: "months";
|
|
65
|
+
year: "year";
|
|
66
|
+
years: "years";
|
|
67
|
+
}>;
|
|
68
|
+
export type WaitUnit = z.infer<typeof WaitUnitSchema>;
|
|
69
|
+
export declare const WaitInputRelativeSchema: z.ZodObject<{
|
|
70
|
+
mode: z.ZodLiteral<"relative">;
|
|
71
|
+
amount: z.ZodNumber;
|
|
72
|
+
unit: z.ZodEnum<{
|
|
73
|
+
hour: "hour";
|
|
74
|
+
minute: "minute";
|
|
75
|
+
days: "days";
|
|
76
|
+
second: "second";
|
|
77
|
+
seconds: "seconds";
|
|
78
|
+
minutes: "minutes";
|
|
79
|
+
hours: "hours";
|
|
80
|
+
day: "day";
|
|
81
|
+
week: "week";
|
|
82
|
+
weeks: "weeks";
|
|
83
|
+
month: "month";
|
|
84
|
+
months: "months";
|
|
85
|
+
year: "year";
|
|
86
|
+
years: "years";
|
|
87
|
+
}>;
|
|
88
|
+
windows: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
89
|
+
startTime: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
90
|
+
hour: z.ZodNumber;
|
|
91
|
+
minute: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
92
|
+
second: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
93
|
+
}, z.core.$strip>]>;
|
|
94
|
+
endTime: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
95
|
+
hour: z.ZodNumber;
|
|
96
|
+
minute: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
97
|
+
second: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
98
|
+
}, z.core.$strip>]>;
|
|
99
|
+
days: z.ZodArray<z.ZodEnum<{
|
|
100
|
+
monday: "monday";
|
|
101
|
+
tuesday: "tuesday";
|
|
102
|
+
wednesday: "wednesday";
|
|
103
|
+
thursday: "thursday";
|
|
104
|
+
friday: "friday";
|
|
105
|
+
saturday: "saturday";
|
|
106
|
+
sunday: "sunday";
|
|
107
|
+
}>>;
|
|
108
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
109
|
+
}, z.core.$strip>>>;
|
|
110
|
+
}, z.core.$strip>;
|
|
111
|
+
export declare const WaitInputAbsoluteSchema: z.ZodObject<{
|
|
112
|
+
mode: z.ZodLiteral<"absolute">;
|
|
113
|
+
scheduleAt: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
114
|
+
}, z.core.$strip>;
|
|
115
|
+
export declare const WaitInputSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
116
|
+
mode: z.ZodLiteral<"relative">;
|
|
117
|
+
amount: z.ZodNumber;
|
|
118
|
+
unit: z.ZodEnum<{
|
|
119
|
+
hour: "hour";
|
|
120
|
+
minute: "minute";
|
|
121
|
+
days: "days";
|
|
122
|
+
second: "second";
|
|
123
|
+
seconds: "seconds";
|
|
124
|
+
minutes: "minutes";
|
|
125
|
+
hours: "hours";
|
|
126
|
+
day: "day";
|
|
127
|
+
week: "week";
|
|
128
|
+
weeks: "weeks";
|
|
129
|
+
month: "month";
|
|
130
|
+
months: "months";
|
|
131
|
+
year: "year";
|
|
132
|
+
years: "years";
|
|
133
|
+
}>;
|
|
134
|
+
windows: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
135
|
+
startTime: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
136
|
+
hour: z.ZodNumber;
|
|
137
|
+
minute: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
138
|
+
second: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
139
|
+
}, z.core.$strip>]>;
|
|
140
|
+
endTime: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
141
|
+
hour: z.ZodNumber;
|
|
142
|
+
minute: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
143
|
+
second: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
144
|
+
}, z.core.$strip>]>;
|
|
145
|
+
days: z.ZodArray<z.ZodEnum<{
|
|
146
|
+
monday: "monday";
|
|
147
|
+
tuesday: "tuesday";
|
|
148
|
+
wednesday: "wednesday";
|
|
149
|
+
thursday: "thursday";
|
|
150
|
+
friday: "friday";
|
|
151
|
+
saturday: "saturday";
|
|
152
|
+
sunday: "sunday";
|
|
153
|
+
}>>;
|
|
154
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
155
|
+
}, z.core.$strip>>>;
|
|
156
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
157
|
+
mode: z.ZodLiteral<"absolute">;
|
|
158
|
+
scheduleAt: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
159
|
+
}, z.core.$strip>]>;
|
|
160
|
+
export type WaitInputRelative = z.infer<typeof WaitInputRelativeSchema>;
|
|
161
|
+
export type WaitInputAbsolute = z.infer<typeof WaitInputAbsoluteSchema>;
|
|
162
|
+
export type WaitInputType = z.infer<typeof WaitInputSchema>;
|
|
163
|
+
export interface CalculateWaitTimeResult {
|
|
164
|
+
waitTime: number;
|
|
165
|
+
scheduledAt: Date;
|
|
166
|
+
}
|