@getpaseo/cli 0.1.87 → 0.1.89
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/commands/schedule/create.d.ts +1 -0
- package/dist/commands/schedule/create.js +1 -0
- package/dist/commands/schedule/index.js +2 -0
- package/dist/commands/schedule/schema.js +2 -2
- package/dist/commands/schedule/shared.d.ts +2 -0
- package/dist/commands/schedule/shared.js +30 -5
- package/dist/commands/schedule/types.d.ts +1 -0
- package/dist/commands/schedule/update.d.ts +1 -0
- package/dist/commands/schedule/update.js +1 -0
- package/package.json +4 -4
|
@@ -18,6 +18,7 @@ export function createScheduleCommand() {
|
|
|
18
18
|
.argument("<prompt>", "Prompt to run on the schedule")
|
|
19
19
|
.option("--every <duration>", "Fixed interval cadence (for example: 5m, 1h)")
|
|
20
20
|
.option("--cron <expr>", "Cron cadence expression")
|
|
21
|
+
.option("--timezone <iana>", "IANA time zone for cron cadence (default: UTC)")
|
|
21
22
|
.option("--name <name>", "Optional schedule name")
|
|
22
23
|
.option("--target <self|new-agent|agent-id>", "Run target")
|
|
23
24
|
.option("--provider <provider>", "Agent provider, or provider/model (e.g. codex or codex/gpt-5.4)")
|
|
@@ -49,6 +50,7 @@ export function createScheduleCommand() {
|
|
|
49
50
|
.argument("<id>", "Schedule ID")
|
|
50
51
|
.option("--every <duration>", "Switch to fixed interval cadence (for example: 5m, 1h)")
|
|
51
52
|
.option("--cron <expr>", "Switch to cron cadence expression")
|
|
53
|
+
.option("--timezone <iana>", "IANA time zone for cron cadence (requires --cron)")
|
|
52
54
|
.option("--name <name>", "Rename the schedule (empty string clears the name)")
|
|
53
55
|
.option("--prompt <text>", "Replace the schedule prompt")
|
|
54
56
|
.option("--provider <provider>", "New agent provider, or provider/model (only for new-agent target)")
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { formatTarget } from "./shared.js";
|
|
1
|
+
import { formatCadence, formatTarget } from "./shared.js";
|
|
2
2
|
export const scheduleSchema = {
|
|
3
3
|
idField: "id",
|
|
4
4
|
columns: [
|
|
@@ -49,7 +49,7 @@ export function createScheduleInspectRows(schedule) {
|
|
|
49
49
|
{
|
|
50
50
|
key: "Cadence",
|
|
51
51
|
value: schedule.cadence.type === "cron"
|
|
52
|
-
?
|
|
52
|
+
? formatCadence(schedule.cadence)
|
|
53
53
|
: `every:${schedule.cadence.everyMs}ms`,
|
|
54
54
|
},
|
|
55
55
|
{ key: "Target", value: formatTarget(schedule.target) },
|
|
@@ -15,6 +15,7 @@ export declare function parseScheduleCreateInput(options: {
|
|
|
15
15
|
prompt: string;
|
|
16
16
|
every?: string;
|
|
17
17
|
cron?: string;
|
|
18
|
+
timezone?: string;
|
|
18
19
|
name?: string;
|
|
19
20
|
target?: string;
|
|
20
21
|
provider?: string;
|
|
@@ -29,6 +30,7 @@ export interface ScheduleUpdateOptionsInput {
|
|
|
29
30
|
id: string;
|
|
30
31
|
every?: string;
|
|
31
32
|
cron?: string;
|
|
33
|
+
timezone?: string;
|
|
32
34
|
name?: string;
|
|
33
35
|
prompt?: string;
|
|
34
36
|
provider?: string;
|
|
@@ -30,7 +30,8 @@ export function toScheduleCommandError(code, action, error) {
|
|
|
30
30
|
}
|
|
31
31
|
export function formatCadence(cadence) {
|
|
32
32
|
if (cadence.type === "cron") {
|
|
33
|
-
|
|
33
|
+
const timezoneSuffix = cadence.timezone ? ` (${cadence.timezone})` : "";
|
|
34
|
+
return `cron:${cadence.expression}${timezoneSuffix}`;
|
|
34
35
|
}
|
|
35
36
|
return `every:${formatDurationMs(cadence.everyMs)}`;
|
|
36
37
|
}
|
|
@@ -101,7 +102,7 @@ export function parseScheduleCreateInput(options) {
|
|
|
101
102
|
message: "Schedule prompt cannot be empty",
|
|
102
103
|
};
|
|
103
104
|
}
|
|
104
|
-
const cadence = parseCadenceFromFlags(options.every, options.cron);
|
|
105
|
+
const cadence = parseCadenceFromFlags(options.every, options.cron, options.timezone);
|
|
105
106
|
if (!cadence) {
|
|
106
107
|
throw {
|
|
107
108
|
code: "INVALID_CADENCE",
|
|
@@ -177,7 +178,7 @@ export function parseScheduleUpdateInput(options) {
|
|
|
177
178
|
message: "Schedule id cannot be empty",
|
|
178
179
|
};
|
|
179
180
|
}
|
|
180
|
-
const cadence = parseCadenceFromFlags(options.every, options.cron);
|
|
181
|
+
const cadence = parseCadenceFromFlags(options.every, options.cron, options.timezone);
|
|
181
182
|
const newAgentConfig = buildNewAgentConfigPatch(options);
|
|
182
183
|
const maxRuns = parseUpdateMaxRuns(options);
|
|
183
184
|
const expiresAt = parseUpdateExpiresAt(options);
|
|
@@ -204,21 +205,45 @@ export function parseScheduleUpdateInput(options) {
|
|
|
204
205
|
...(expiresAt !== undefined ? { expiresAt } : {}),
|
|
205
206
|
};
|
|
206
207
|
}
|
|
207
|
-
function parseCadenceFromFlags(every, cron) {
|
|
208
|
+
function parseCadenceFromFlags(every, cron, timezone) {
|
|
208
209
|
if (every !== undefined && cron !== undefined) {
|
|
209
210
|
throw {
|
|
210
211
|
code: "INVALID_CADENCE",
|
|
211
212
|
message: "Specify at most one of --every or --cron",
|
|
212
213
|
};
|
|
213
214
|
}
|
|
215
|
+
const trimmedTimeZone = parseTimeZoneFlag(timezone);
|
|
216
|
+
if (trimmedTimeZone !== undefined && cron === undefined) {
|
|
217
|
+
throw {
|
|
218
|
+
code: "INVALID_TIME_ZONE",
|
|
219
|
+
message: "--timezone can only be used with --cron",
|
|
220
|
+
};
|
|
221
|
+
}
|
|
214
222
|
if (every !== undefined) {
|
|
215
223
|
return { type: "every", everyMs: parseDuration(every) };
|
|
216
224
|
}
|
|
217
225
|
if (cron !== undefined) {
|
|
218
|
-
return {
|
|
226
|
+
return {
|
|
227
|
+
type: "cron",
|
|
228
|
+
expression: cron.trim(),
|
|
229
|
+
...(trimmedTimeZone ? { timezone: trimmedTimeZone } : {}),
|
|
230
|
+
};
|
|
219
231
|
}
|
|
220
232
|
return undefined;
|
|
221
233
|
}
|
|
234
|
+
function parseTimeZoneFlag(timeZone) {
|
|
235
|
+
if (timeZone === undefined) {
|
|
236
|
+
return undefined;
|
|
237
|
+
}
|
|
238
|
+
const trimmed = timeZone.trim();
|
|
239
|
+
if (!trimmed) {
|
|
240
|
+
throw {
|
|
241
|
+
code: "INVALID_TIME_ZONE",
|
|
242
|
+
message: "--timezone cannot be empty",
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
return trimmed;
|
|
246
|
+
}
|
|
222
247
|
function parseUpdateMaxRuns(options) {
|
|
223
248
|
if (options.maxRuns !== undefined && options.clearMaxRuns) {
|
|
224
249
|
throw {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getpaseo/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.89",
|
|
4
4
|
"description": "Paseo CLI - control your AI coding agents from the command line",
|
|
5
5
|
"bin": {
|
|
6
6
|
"paseo": "bin/paseo"
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@clack/prompts": "^1.0.0",
|
|
28
|
-
"@getpaseo/client": "0.1.
|
|
29
|
-
"@getpaseo/protocol": "0.1.
|
|
30
|
-
"@getpaseo/server": "0.1.
|
|
28
|
+
"@getpaseo/client": "0.1.89",
|
|
29
|
+
"@getpaseo/protocol": "0.1.89",
|
|
30
|
+
"@getpaseo/server": "0.1.89",
|
|
31
31
|
"chalk": "^5.3.0",
|
|
32
32
|
"commander": "^12.0.0",
|
|
33
33
|
"mime-types": "^2.1.35",
|