@camerontaylor/paseo-cli 0.8.0-fork.1
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/bin/paseo +3 -0
- package/dist/classify.d.ts +19 -0
- package/dist/classify.js +49 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.js +135 -0
- package/dist/commands/agent/archive.d.ts +18 -0
- package/dist/commands/agent/archive.js +102 -0
- package/dist/commands/agent/attach.d.ts +11 -0
- package/dist/commands/agent/attach.js +161 -0
- package/dist/commands/agent/delete.d.ts +15 -0
- package/dist/commands/agent/delete.js +107 -0
- package/dist/commands/agent/detach.d.ts +9 -0
- package/dist/commands/agent/detach.js +38 -0
- package/dist/commands/agent/import.d.ts +14 -0
- package/dist/commands/agent/import.js +122 -0
- package/dist/commands/agent/index.d.ts +3 -0
- package/dist/commands/agent/index.js +56 -0
- package/dist/commands/agent/inspect.d.ts +15 -0
- package/dist/commands/agent/inspect.js +209 -0
- package/dist/commands/agent/logs.d.ts +19 -0
- package/dist/commands/agent/logs.js +180 -0
- package/dist/commands/agent/ls.d.ts +44 -0
- package/dist/commands/agent/ls.js +212 -0
- package/dist/commands/agent/mode.d.ts +18 -0
- package/dist/commands/agent/mode.js +100 -0
- package/dist/commands/agent/open.d.ts +11 -0
- package/dist/commands/agent/open.js +61 -0
- package/dist/commands/agent/reload.d.ts +15 -0
- package/dist/commands/agent/reload.js +75 -0
- package/dist/commands/agent/run.d.ts +78 -0
- package/dist/commands/agent/run.js +554 -0
- package/dist/commands/agent/send.d.ts +19 -0
- package/dist/commands/agent/send.js +187 -0
- package/dist/commands/agent/stop.d.ts +17 -0
- package/dist/commands/agent/stop.js +115 -0
- package/dist/commands/agent/update.d.ts +51 -0
- package/dist/commands/agent/update.js +186 -0
- package/dist/commands/agent/wait.d.ts +17 -0
- package/dist/commands/agent/wait.js +158 -0
- package/dist/commands/clone.d.ts +17 -0
- package/dist/commands/clone.js +65 -0
- package/dist/commands/daemon/index.d.ts +3 -0
- package/dist/commands/daemon/index.js +60 -0
- package/dist/commands/daemon/local-daemon.d.ts +78 -0
- package/dist/commands/daemon/local-daemon.js +547 -0
- package/dist/commands/daemon/pair.d.ts +35 -0
- package/dist/commands/daemon/pair.js +167 -0
- package/dist/commands/daemon/reload.d.ts +10 -0
- package/dist/commands/daemon/reload.js +36 -0
- package/dist/commands/daemon/restart.d.ts +12 -0
- package/dist/commands/daemon/restart.js +99 -0
- package/dist/commands/daemon/runtime-toolchain.d.ts +6 -0
- package/dist/commands/daemon/runtime-toolchain.js +87 -0
- package/dist/commands/daemon/set-password.d.ts +17 -0
- package/dist/commands/daemon/set-password.js +82 -0
- package/dist/commands/daemon/start.d.ts +6 -0
- package/dist/commands/daemon/start.js +57 -0
- package/dist/commands/daemon/status.d.ts +21 -0
- package/dist/commands/daemon/status.js +363 -0
- package/dist/commands/daemon/stop.d.ts +15 -0
- package/dist/commands/daemon/stop.js +60 -0
- package/dist/commands/heartbeat/index.d.ts +3 -0
- package/dist/commands/heartbeat/index.js +139 -0
- package/dist/commands/hooks.d.ts +19 -0
- package/dist/commands/hooks.js +89 -0
- package/dist/commands/hub/authority.d.ts +17 -0
- package/dist/commands/hub/authority.js +18 -0
- package/dist/commands/hub/connect.d.ts +23 -0
- package/dist/commands/hub/connect.js +44 -0
- package/dist/commands/hub/credentials.d.ts +21 -0
- package/dist/commands/hub/credentials.js +143 -0
- package/dist/commands/hub/daemon-client.d.ts +40 -0
- package/dist/commands/hub/daemon-client.js +14 -0
- package/dist/commands/hub/deploy-bundle.d.ts +16 -0
- package/dist/commands/hub/deploy-bundle.js +248 -0
- package/dist/commands/hub/deploy-triggers.d.ts +6 -0
- package/dist/commands/hub/deploy-triggers.js +116 -0
- package/dist/commands/hub/deploy.d.ts +50 -0
- package/dist/commands/hub/deploy.js +159 -0
- package/dist/commands/hub/disconnect.d.ts +16 -0
- package/dist/commands/hub/disconnect.js +24 -0
- package/dist/commands/hub/error.d.ts +6 -0
- package/dist/commands/hub/error.js +9 -0
- package/dist/commands/hub/export.d.ts +28 -0
- package/dist/commands/hub/export.js +80 -0
- package/dist/commands/hub/help.d.ts +3 -0
- package/dist/commands/hub/help.js +5 -0
- package/dist/commands/hub/hub-client/index.d.ts +22 -0
- package/dist/commands/hub/hub-client/index.js +135 -0
- package/dist/commands/hub/hub-client/internal/contracts.d.ts +126 -0
- package/dist/commands/hub/hub-client/internal/contracts.js +85 -0
- package/dist/commands/hub/hub-client/internal/problem.d.ts +3 -0
- package/dist/commands/hub/hub-client/internal/problem.js +85 -0
- package/dist/commands/hub/hub-client/internal/transport.d.ts +15 -0
- package/dist/commands/hub/hub-client/internal/transport.js +30 -0
- package/dist/commands/hub/index.d.ts +20 -0
- package/dist/commands/hub/index.js +94 -0
- package/dist/commands/hub/init-plan.d.ts +33 -0
- package/dist/commands/hub/init-plan.js +94 -0
- package/dist/commands/hub/init.d.ts +35 -0
- package/dist/commands/hub/init.js +524 -0
- package/dist/commands/hub/login-flow.d.ts +34 -0
- package/dist/commands/hub/login-flow.js +78 -0
- package/dist/commands/hub/login.d.ts +23 -0
- package/dist/commands/hub/login.js +40 -0
- package/dist/commands/hub/logout.d.ts +32 -0
- package/dist/commands/hub/logout.js +71 -0
- package/dist/commands/hub/origin.d.ts +2 -0
- package/dist/commands/hub/origin.js +27 -0
- package/dist/commands/hub/permissions.d.ts +21 -0
- package/dist/commands/hub/permissions.js +61 -0
- package/dist/commands/hub/projects.d.ts +24 -0
- package/dist/commands/hub/projects.js +49 -0
- package/dist/commands/hub/reporter.d.ts +10 -0
- package/dist/commands/hub/reporter.js +11 -0
- package/dist/commands/hub/starter-agent-runtime.d.ts +37 -0
- package/dist/commands/hub/starter-agent-runtime.js +49 -0
- package/dist/commands/hub/starter-trigger.d.ts +10 -0
- package/dist/commands/hub/starter-trigger.js +30 -0
- package/dist/commands/hub/status-output.d.ts +13 -0
- package/dist/commands/hub/status-output.js +30 -0
- package/dist/commands/onboard.d.ts +10 -0
- package/dist/commands/onboard.js +400 -0
- package/dist/commands/open.d.ts +4 -0
- package/dist/commands/open.js +89 -0
- package/dist/commands/permit/allow.d.ts +20 -0
- package/dist/commands/permit/allow.js +133 -0
- package/dist/commands/permit/deny.d.ts +12 -0
- package/dist/commands/permit/deny.js +105 -0
- package/dist/commands/permit/index.d.ts +3 -0
- package/dist/commands/permit/index.js +27 -0
- package/dist/commands/permit/ls.d.ts +18 -0
- package/dist/commands/permit/ls.js +66 -0
- package/dist/commands/plugin/index.d.ts +17 -0
- package/dist/commands/plugin/index.js +138 -0
- package/dist/commands/plugin/scaffold.d.ts +6 -0
- package/dist/commands/plugin/scaffold.js +162 -0
- package/dist/commands/plugin/shared.d.ts +5 -0
- package/dist/commands/plugin/shared.js +30 -0
- package/dist/commands/project/create.d.ts +10 -0
- package/dist/commands/project/create.js +41 -0
- package/dist/commands/project/delete.d.ts +9 -0
- package/dist/commands/project/delete.js +33 -0
- package/dist/commands/project/index.d.ts +3 -0
- package/dist/commands/project/index.js +28 -0
- package/dist/commands/project/ls.d.ts +5 -0
- package/dist/commands/project/ls.js +19 -0
- package/dist/commands/project/rename.d.ts +15 -0
- package/dist/commands/project/rename.js +50 -0
- package/dist/commands/project/shared.d.ts +11 -0
- package/dist/commands/project/shared.js +18 -0
- package/dist/commands/provider/add.d.ts +30 -0
- package/dist/commands/provider/add.js +123 -0
- package/dist/commands/provider/diagnostic.d.ts +12 -0
- package/dist/commands/provider/diagnostic.js +31 -0
- package/dist/commands/provider/index.d.ts +3 -0
- package/dist/commands/provider/index.js +38 -0
- package/dist/commands/provider/ls.d.ts +20 -0
- package/dist/commands/provider/ls.js +76 -0
- package/dist/commands/provider/models.d.ts +20 -0
- package/dist/commands/provider/models.js +53 -0
- package/dist/commands/provider/rm.d.ts +10 -0
- package/dist/commands/provider/rm.js +45 -0
- package/dist/commands/provider/shared.d.ts +7 -0
- package/dist/commands/provider/shared.js +10 -0
- package/dist/commands/schedule/create.d.ts +19 -0
- package/dist/commands/schedule/create.js +41 -0
- package/dist/commands/schedule/delete.d.ts +10 -0
- package/dist/commands/schedule/delete.js +32 -0
- package/dist/commands/schedule/index.d.ts +3 -0
- package/dist/commands/schedule/index.js +66 -0
- package/dist/commands/schedule/inspect.d.ts +6 -0
- package/dist/commands/schedule/inspect.js +27 -0
- package/dist/commands/schedule/logs.d.ts +6 -0
- package/dist/commands/schedule/logs.js +24 -0
- package/dist/commands/schedule/ls.d.ts +5 -0
- package/dist/commands/schedule/ls.js +25 -0
- package/dist/commands/schedule/pause.d.ts +5 -0
- package/dist/commands/schedule/pause.js +24 -0
- package/dist/commands/schedule/resume.d.ts +5 -0
- package/dist/commands/schedule/resume.js +24 -0
- package/dist/commands/schedule/run-once.d.ts +5 -0
- package/dist/commands/schedule/run-once.js +24 -0
- package/dist/commands/schedule/schema.d.ts +21 -0
- package/dist/commands/schedule/schema.js +67 -0
- package/dist/commands/schedule/shared.d.ts +59 -0
- package/dist/commands/schedule/shared.js +358 -0
- package/dist/commands/schedule/types.d.ts +165 -0
- package/dist/commands/schedule/types.js +2 -0
- package/dist/commands/schedule/update.d.ts +21 -0
- package/dist/commands/schedule/update.js +40 -0
- package/dist/commands/script/index.d.ts +3 -0
- package/dist/commands/script/index.js +19 -0
- package/dist/commands/script/ls.d.ts +6 -0
- package/dist/commands/script/ls.js +20 -0
- package/dist/commands/script/schema.d.ts +5 -0
- package/dist/commands/script/schema.js +13 -0
- package/dist/commands/script/shared.d.ts +11 -0
- package/dist/commands/script/shared.js +59 -0
- package/dist/commands/script/start.d.ts +6 -0
- package/dist/commands/script/start.js +23 -0
- package/dist/commands/script/stop.d.ts +6 -0
- package/dist/commands/script/stop.js +23 -0
- package/dist/commands/speech/index.d.ts +3 -0
- package/dist/commands/speech/index.js +5 -0
- package/dist/commands/terminal/capture.d.ts +10 -0
- package/dist/commands/terminal/capture.js +68 -0
- package/dist/commands/terminal/create.d.ts +11 -0
- package/dist/commands/terminal/create.js +29 -0
- package/dist/commands/terminal/index.d.ts +3 -0
- package/dist/commands/terminal/index.js +45 -0
- package/dist/commands/terminal/kill.d.ts +6 -0
- package/dist/commands/terminal/kill.js +36 -0
- package/dist/commands/terminal/ls.d.ts +11 -0
- package/dist/commands/terminal/ls.js +21 -0
- package/dist/commands/terminal/schema.d.ts +10 -0
- package/dist/commands/terminal/schema.js +17 -0
- package/dist/commands/terminal/send-keys.d.ts +7 -0
- package/dist/commands/terminal/send-keys.js +45 -0
- package/dist/commands/terminal/shared.d.ts +12 -0
- package/dist/commands/terminal/shared.js +62 -0
- package/dist/commands/workspace/archive.d.ts +12 -0
- package/dist/commands/workspace/archive.js +41 -0
- package/dist/commands/workspace/create.d.ts +49 -0
- package/dist/commands/workspace/create.js +114 -0
- package/dist/commands/workspace/index.d.ts +3 -0
- package/dist/commands/workspace/index.js +45 -0
- package/dist/commands/workspace/ls.d.ts +7 -0
- package/dist/commands/workspace/ls.js +28 -0
- package/dist/commands/workspace/rename.d.ts +22 -0
- package/dist/commands/workspace/rename.js +61 -0
- package/dist/commands/workspace/setup.d.ts +11 -0
- package/dist/commands/workspace/setup.js +41 -0
- package/dist/commands/workspace/shared.d.ts +12 -0
- package/dist/commands/workspace/shared.js +20 -0
- package/dist/commands/worktree/archive.d.ts +20 -0
- package/dist/commands/worktree/archive.js +104 -0
- package/dist/commands/worktree/create-input.d.ts +15 -0
- package/dist/commands/worktree/create-input.js +56 -0
- package/dist/commands/worktree/create.d.ts +11 -0
- package/dist/commands/worktree/create.js +58 -0
- package/dist/commands/worktree/index.d.ts +3 -0
- package/dist/commands/worktree/index.js +25 -0
- package/dist/commands/worktree/ls.d.ts +19 -0
- package/dist/commands/worktree/ls.js +97 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +6 -0
- package/dist/output/index.d.ts +45 -0
- package/dist/output/index.js +47 -0
- package/dist/output/json.d.ts +11 -0
- package/dist/output/json.js +37 -0
- package/dist/output/pairing.d.ts +8 -0
- package/dist/output/pairing.js +24 -0
- package/dist/output/quiet.d.ts +9 -0
- package/dist/output/quiet.js +22 -0
- package/dist/output/render.d.ts +15 -0
- package/dist/output/render.js +84 -0
- package/dist/output/table.d.ts +13 -0
- package/dist/output/table.js +135 -0
- package/dist/output/types.d.ts +73 -0
- package/dist/output/types.js +8 -0
- package/dist/output/with-output.d.ts +41 -0
- package/dist/output/with-output.js +85 -0
- package/dist/output/yaml.d.ts +11 -0
- package/dist/output/yaml.js +38 -0
- package/dist/run.d.ts +14 -0
- package/dist/run.js +40 -0
- package/dist/ssh/ssh-tunnel.d.ts +9 -0
- package/dist/ssh/ssh-tunnel.js +79 -0
- package/dist/utils/client-id.d.ts +2 -0
- package/dist/utils/client-id.js +37 -0
- package/dist/utils/client.d.ts +54 -0
- package/dist/utils/client.js +363 -0
- package/dist/utils/command-options.d.ts +7 -0
- package/dist/utils/command-options.js +25 -0
- package/dist/utils/duration.d.ts +7 -0
- package/dist/utils/duration.js +39 -0
- package/dist/utils/errors.d.ts +5 -0
- package/dist/utils/errors.js +10 -0
- package/dist/utils/paths.d.ts +12 -0
- package/dist/utils/paths.js +22 -0
- package/dist/utils/provider-model.d.ts +11 -0
- package/dist/utils/provider-model.js +49 -0
- package/dist/utils/timeline.d.ts +11 -0
- package/dist/utils/timeline.js +11 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.js +10 -0
- package/package.json +50 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { connectToDaemon, getDaemonHost } from "../../utils/client.js";
|
|
2
|
+
import { isBuiltinProviderId } from "./shared.js";
|
|
3
|
+
export const providerRmSchema = {
|
|
4
|
+
idField: "provider",
|
|
5
|
+
columns: [
|
|
6
|
+
{ header: "PROVIDER", field: "provider", width: 16 },
|
|
7
|
+
{ header: "REMOVED", field: "removed", width: 10 },
|
|
8
|
+
],
|
|
9
|
+
};
|
|
10
|
+
export async function runRmCommand(id, options, _command) {
|
|
11
|
+
if (isBuiltinProviderId(id)) {
|
|
12
|
+
throw {
|
|
13
|
+
code: "INVALID_PROVIDER_CONFIG",
|
|
14
|
+
message: `"${id}" is a built-in provider and cannot be removed.`,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
const host = getDaemonHost({ host: options.host });
|
|
18
|
+
const client = await connectToDaemon({ host: options.host }).catch((error) => {
|
|
19
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
20
|
+
throw {
|
|
21
|
+
code: "DAEMON_NOT_RUNNING",
|
|
22
|
+
message: `Cannot connect to daemon at ${host}: ${message}`,
|
|
23
|
+
};
|
|
24
|
+
});
|
|
25
|
+
try {
|
|
26
|
+
const { config } = await client.getDaemonConfig();
|
|
27
|
+
if (!(id in (config.providers ?? {}))) {
|
|
28
|
+
throw new Error(`No custom provider "${id}" is configured.`);
|
|
29
|
+
}
|
|
30
|
+
await client.patchDaemonConfig({ removeProviders: [id] });
|
|
31
|
+
return {
|
|
32
|
+
type: "single",
|
|
33
|
+
data: { provider: id, removed: "yes" },
|
|
34
|
+
schema: providerRmSchema,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
39
|
+
throw { code: "PROVIDER_RM_FAILED", message };
|
|
40
|
+
}
|
|
41
|
+
finally {
|
|
42
|
+
await client.close().catch(() => undefined);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=rm.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Mirrors the id pattern enforced by ProviderOverridesSchema in the protocol. */
|
|
2
|
+
export declare const PROVIDER_ID_PATTERN: RegExp;
|
|
3
|
+
export declare const BUILTIN_PROVIDER_ID_SET: Set<string>;
|
|
4
|
+
/** Built-in providers plus the generic ACP base. */
|
|
5
|
+
export declare const VALID_EXTENDS_VALUES: string[];
|
|
6
|
+
export declare function isBuiltinProviderId(id: string): boolean;
|
|
7
|
+
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BUILTIN_PROVIDER_IDS } from "@camerontaylor/paseo-protocol/provider-manifest";
|
|
2
|
+
/** Mirrors the id pattern enforced by ProviderOverridesSchema in the protocol. */
|
|
3
|
+
export const PROVIDER_ID_PATTERN = /^[a-z][a-z0-9-]*$/;
|
|
4
|
+
export const BUILTIN_PROVIDER_ID_SET = new Set(BUILTIN_PROVIDER_IDS);
|
|
5
|
+
/** Built-in providers plus the generic ACP base. */
|
|
6
|
+
export const VALID_EXTENDS_VALUES = [...BUILTIN_PROVIDER_IDS, "acp"];
|
|
7
|
+
export function isBuiltinProviderId(id) {
|
|
8
|
+
return BUILTIN_PROVIDER_ID_SET.has(id);
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=shared.js.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
import type { SingleResult } from "../../output/index.js";
|
|
3
|
+
import { type ScheduleCommandOptions, type ScheduleRow } from "./shared.js";
|
|
4
|
+
export interface ScheduleCreateOptions extends ScheduleCommandOptions {
|
|
5
|
+
every?: string;
|
|
6
|
+
cron?: string;
|
|
7
|
+
timezone?: string;
|
|
8
|
+
name?: string;
|
|
9
|
+
target?: string;
|
|
10
|
+
provider?: string;
|
|
11
|
+
mode?: string;
|
|
12
|
+
thinking?: string;
|
|
13
|
+
cwd?: string;
|
|
14
|
+
maxRuns?: string;
|
|
15
|
+
expiresIn?: string;
|
|
16
|
+
runNow?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare function runCreateCommand(prompt: string, options: ScheduleCreateOptions, command: Command): Promise<SingleResult<ScheduleRow>>;
|
|
19
|
+
//# sourceMappingURL=create.d.ts.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { scheduleSchema } from "./schema.js";
|
|
2
|
+
import { connectScheduleClient, parseScheduleCreateInput, toScheduleCommandError, toScheduleRow, } from "./shared.js";
|
|
3
|
+
export async function runCreateCommand(prompt, options, command) {
|
|
4
|
+
const runNowSource = command.getOptionValueSource("runNow");
|
|
5
|
+
const runNow = runNowSource === "cli" ? Boolean(options.runNow) : undefined;
|
|
6
|
+
const input = parseScheduleCreateInput({
|
|
7
|
+
prompt,
|
|
8
|
+
every: options.every,
|
|
9
|
+
cron: options.cron,
|
|
10
|
+
timezone: options.timezone,
|
|
11
|
+
name: options.name,
|
|
12
|
+
target: options.target,
|
|
13
|
+
provider: options.provider,
|
|
14
|
+
mode: options.mode,
|
|
15
|
+
thinking: options.thinking,
|
|
16
|
+
cwd: options.cwd,
|
|
17
|
+
host: options.host,
|
|
18
|
+
maxRuns: options.maxRuns,
|
|
19
|
+
expiresIn: options.expiresIn,
|
|
20
|
+
runNow,
|
|
21
|
+
});
|
|
22
|
+
const { client } = await connectScheduleClient(options.host);
|
|
23
|
+
try {
|
|
24
|
+
const payload = await client.scheduleCreate(input);
|
|
25
|
+
if (payload.error || !payload.schedule) {
|
|
26
|
+
throw new Error(payload.error ?? "Schedule creation failed");
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
type: "single",
|
|
30
|
+
data: toScheduleRow(payload.schedule),
|
|
31
|
+
schema: scheduleSchema,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
throw toScheduleCommandError("SCHEDULE_CREATE_FAILED", "create schedule", error);
|
|
36
|
+
}
|
|
37
|
+
finally {
|
|
38
|
+
await client.close().catch(() => { });
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=create.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
import type { SingleResult } from "../../output/index.js";
|
|
3
|
+
import { type ScheduleCommandOptions } from "./shared.js";
|
|
4
|
+
interface ScheduleDeleteRow {
|
|
5
|
+
id: string;
|
|
6
|
+
status: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function runDeleteCommand(id: string, options: ScheduleCommandOptions, _command: Command): Promise<SingleResult<ScheduleDeleteRow>>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=delete.d.ts.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { connectScheduleClient, toScheduleCommandError, } from "./shared.js";
|
|
2
|
+
const scheduleDeleteSchema = {
|
|
3
|
+
idField: "id",
|
|
4
|
+
columns: [
|
|
5
|
+
{ header: "ID", field: "id", width: 10 },
|
|
6
|
+
{ header: "STATUS", field: "status", width: 12 },
|
|
7
|
+
],
|
|
8
|
+
};
|
|
9
|
+
export async function runDeleteCommand(id, options, _command) {
|
|
10
|
+
const { client } = await connectScheduleClient(options.host);
|
|
11
|
+
try {
|
|
12
|
+
const payload = await client.scheduleDelete({ id });
|
|
13
|
+
if (payload.error) {
|
|
14
|
+
throw new Error(payload.error);
|
|
15
|
+
}
|
|
16
|
+
return {
|
|
17
|
+
type: "single",
|
|
18
|
+
data: {
|
|
19
|
+
id: payload.scheduleId,
|
|
20
|
+
status: "deleted",
|
|
21
|
+
},
|
|
22
|
+
schema: scheduleDeleteSchema,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
catch (error) {
|
|
26
|
+
throw toScheduleCommandError("SCHEDULE_DELETE_FAILED", "delete schedule", error);
|
|
27
|
+
}
|
|
28
|
+
finally {
|
|
29
|
+
await client.close().catch(() => { });
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=delete.js.map
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { Command, Option } from "commander";
|
|
2
|
+
import { withOutput } from "../../output/index.js";
|
|
3
|
+
import { addJsonAndDaemonHostOptions } from "../../utils/command-options.js";
|
|
4
|
+
import { runCreateCommand } from "./create.js";
|
|
5
|
+
import { runLsCommand } from "./ls.js";
|
|
6
|
+
import { runInspectCommand } from "./inspect.js";
|
|
7
|
+
import { runLogsCommand } from "./logs.js";
|
|
8
|
+
import { runPauseCommand } from "./pause.js";
|
|
9
|
+
import { runResumeCommand } from "./resume.js";
|
|
10
|
+
import { runDeleteCommand } from "./delete.js";
|
|
11
|
+
import { runRunOnceCommand } from "./run-once.js";
|
|
12
|
+
import { runUpdateCommand } from "./update.js";
|
|
13
|
+
export function createScheduleCommand() {
|
|
14
|
+
const schedule = new Command("schedule").description("Manage recurring schedules");
|
|
15
|
+
addJsonAndDaemonHostOptions(schedule
|
|
16
|
+
.command("create")
|
|
17
|
+
.description("Create a schedule")
|
|
18
|
+
.argument("<prompt>", "Prompt to run on the schedule")
|
|
19
|
+
.option("--every <duration>", "Cron-compatible cadence preset (for example: 5m, 1h)")
|
|
20
|
+
.option("--cron <expr>", "Cron cadence expression")
|
|
21
|
+
.option("--timezone <iana>", "IANA time zone for cron cadence (default: UTC)")
|
|
22
|
+
.option("--name <name>", "Optional schedule name")
|
|
23
|
+
.addOption(new Option("--target <target>", "Legacy schedule target").hideHelp())
|
|
24
|
+
.option("--provider <provider>", "Agent provider, or provider/model (e.g. codex or codex/gpt-5.4)")
|
|
25
|
+
.option("--mode <mode>", "Provider-specific mode (e.g. claude bypassPermissions, opencode build)")
|
|
26
|
+
.option("--thinking <id>", "Thinking option ID for new-agent runs")
|
|
27
|
+
.option("--cwd <path>", "Working directory (default: current; required with --host)")
|
|
28
|
+
.option("--run-now", "Fire one immediate run on creation")
|
|
29
|
+
.option("--max-runs <n>", "Maximum number of runs")
|
|
30
|
+
.option("--expires-in <duration>", "Time to live for the schedule")).action(withOutput(runCreateCommand));
|
|
31
|
+
addJsonAndDaemonHostOptions(schedule.command("ls").description("List schedules")).action(withOutput(runLsCommand));
|
|
32
|
+
addJsonAndDaemonHostOptions(schedule.command("inspect").description("Inspect a schedule").argument("<id>", "Schedule ID")).action(withOutput(runInspectCommand));
|
|
33
|
+
addJsonAndDaemonHostOptions(schedule
|
|
34
|
+
.command("logs")
|
|
35
|
+
.description("Show recent schedule run logs")
|
|
36
|
+
.argument("<id>", "Schedule ID")).action(withOutput(runLogsCommand));
|
|
37
|
+
addJsonAndDaemonHostOptions(schedule.command("pause").description("Pause a schedule").argument("<id>", "Schedule ID")).action(withOutput(runPauseCommand));
|
|
38
|
+
addJsonAndDaemonHostOptions(schedule
|
|
39
|
+
.command("resume")
|
|
40
|
+
.description("Resume a paused schedule")
|
|
41
|
+
.argument("<id>", "Schedule ID")).action(withOutput(runResumeCommand));
|
|
42
|
+
addJsonAndDaemonHostOptions(schedule.command("delete").description("Delete a schedule").argument("<id>", "Schedule ID")).action(withOutput(runDeleteCommand));
|
|
43
|
+
addJsonAndDaemonHostOptions(schedule
|
|
44
|
+
.command("run-once")
|
|
45
|
+
.description("Manually trigger a single run of a schedule without affecting cadence")
|
|
46
|
+
.argument("<id>", "Schedule ID")).action(withOutput(runRunOnceCommand));
|
|
47
|
+
addJsonAndDaemonHostOptions(schedule
|
|
48
|
+
.command("update")
|
|
49
|
+
.description("Update an existing schedule in place")
|
|
50
|
+
.argument("<id>", "Schedule ID")
|
|
51
|
+
.option("--every <duration>", "Cron-compatible cadence preset (for example: 5m, 1h)")
|
|
52
|
+
.option("--cron <expr>", "Switch to cron cadence expression")
|
|
53
|
+
.option("--timezone <iana>", "IANA time zone for cron cadence (requires --cron)")
|
|
54
|
+
.option("--name <name>", "Rename the schedule (empty string clears the name)")
|
|
55
|
+
.option("--prompt <text>", "Replace the schedule prompt")
|
|
56
|
+
.option("--provider <provider>", "New agent provider, or provider/model (only for new-agent target)")
|
|
57
|
+
.option("--model <model>", "New agent model (only for new-agent target)")
|
|
58
|
+
.option("--mode <mode>", "New agent provider mode (only for new-agent target)")
|
|
59
|
+
.option("--cwd <path>", "New working directory (only for new-agent target)")
|
|
60
|
+
.option("--max-runs <n>", "Set or change maximum number of runs")
|
|
61
|
+
.option("--no-max-runs", "Clear the max-runs limit")
|
|
62
|
+
.option("--expires-in <duration>", "Set or change time to live for the schedule")
|
|
63
|
+
.option("--no-expires-in", "Clear the expiration")).action(withOutput(runUpdateCommand));
|
|
64
|
+
return schedule;
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
import type { ListResult } from "../../output/index.js";
|
|
3
|
+
import { type ScheduleInspectRow } from "./schema.js";
|
|
4
|
+
import { type ScheduleCommandOptions } from "./shared.js";
|
|
5
|
+
export declare function runInspectCommand(id: string, options: ScheduleCommandOptions, _command: Command): Promise<ListResult<ScheduleInspectRow>>;
|
|
6
|
+
//# sourceMappingURL=inspect.d.ts.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { createScheduleInspectRows, createScheduleInspectSchema, } from "./schema.js";
|
|
2
|
+
import { connectScheduleClient, toScheduleCommandError, } from "./shared.js";
|
|
3
|
+
export async function runInspectCommand(id, options, _command) {
|
|
4
|
+
const { client } = await connectScheduleClient(options.host);
|
|
5
|
+
try {
|
|
6
|
+
const payload = await client.scheduleInspect({ id });
|
|
7
|
+
if (payload.error || !payload.schedule) {
|
|
8
|
+
throw new Error(payload.error ?? `Schedule not found: ${id}`);
|
|
9
|
+
}
|
|
10
|
+
if (payload.schedule.target.type !== "new-agent") {
|
|
11
|
+
throw new Error(`Schedule not found: ${id}`);
|
|
12
|
+
}
|
|
13
|
+
const rows = createScheduleInspectRows(payload.schedule);
|
|
14
|
+
return {
|
|
15
|
+
type: "list",
|
|
16
|
+
data: rows,
|
|
17
|
+
schema: createScheduleInspectSchema(payload.schedule),
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
catch (error) {
|
|
21
|
+
throw toScheduleCommandError("SCHEDULE_INSPECT_FAILED", "inspect schedule", error);
|
|
22
|
+
}
|
|
23
|
+
finally {
|
|
24
|
+
await client.close().catch(() => { });
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=inspect.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
import type { ListResult } from "../../output/index.js";
|
|
3
|
+
import { type ScheduleLogRow } from "./schema.js";
|
|
4
|
+
import { type ScheduleCommandOptions } from "./shared.js";
|
|
5
|
+
export declare function runLogsCommand(id: string, options: ScheduleCommandOptions, _command: Command): Promise<ListResult<ScheduleLogRow>>;
|
|
6
|
+
//# sourceMappingURL=logs.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { scheduleLogSchema, toScheduleLogRow } from "./schema.js";
|
|
2
|
+
import { connectScheduleClient, requireNewAgentSchedule, toScheduleCommandError, } from "./shared.js";
|
|
3
|
+
export async function runLogsCommand(id, options, _command) {
|
|
4
|
+
const { client } = await connectScheduleClient(options.host);
|
|
5
|
+
try {
|
|
6
|
+
await requireNewAgentSchedule(client, id);
|
|
7
|
+
const payload = await client.scheduleLogs({ id });
|
|
8
|
+
if (payload.error) {
|
|
9
|
+
throw new Error(payload.error);
|
|
10
|
+
}
|
|
11
|
+
return {
|
|
12
|
+
type: "list",
|
|
13
|
+
data: payload.runs.map(toScheduleLogRow),
|
|
14
|
+
schema: scheduleLogSchema,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
catch (error) {
|
|
18
|
+
throw toScheduleCommandError("SCHEDULE_LOGS_FAILED", "read schedule logs", error);
|
|
19
|
+
}
|
|
20
|
+
finally {
|
|
21
|
+
await client.close().catch(() => { });
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=logs.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
import type { ListResult } from "../../output/index.js";
|
|
3
|
+
import { type ScheduleCommandOptions, type ScheduleRow } from "./shared.js";
|
|
4
|
+
export declare function runLsCommand(options: ScheduleCommandOptions, _command: Command): Promise<ListResult<ScheduleRow>>;
|
|
5
|
+
//# sourceMappingURL=ls.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { scheduleSchema } from "./schema.js";
|
|
2
|
+
import { connectScheduleClient, toScheduleCommandError, toScheduleRow, } from "./shared.js";
|
|
3
|
+
export async function runLsCommand(options, _command) {
|
|
4
|
+
const { client } = await connectScheduleClient(options.host);
|
|
5
|
+
try {
|
|
6
|
+
const payload = await client.scheduleList();
|
|
7
|
+
if (payload.error) {
|
|
8
|
+
throw new Error(payload.error);
|
|
9
|
+
}
|
|
10
|
+
return {
|
|
11
|
+
type: "list",
|
|
12
|
+
data: payload.schedules
|
|
13
|
+
.filter((schedule) => schedule.target.type === "new-agent")
|
|
14
|
+
.map(toScheduleRow),
|
|
15
|
+
schema: scheduleSchema,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
catch (error) {
|
|
19
|
+
throw toScheduleCommandError("SCHEDULE_LIST_FAILED", "list schedules", error);
|
|
20
|
+
}
|
|
21
|
+
finally {
|
|
22
|
+
await client.close().catch(() => { });
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=ls.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
import type { SingleResult } from "../../output/index.js";
|
|
3
|
+
import { type ScheduleCommandOptions, type ScheduleRow } from "./shared.js";
|
|
4
|
+
export declare function runPauseCommand(id: string, options: ScheduleCommandOptions, _command: Command): Promise<SingleResult<ScheduleRow>>;
|
|
5
|
+
//# sourceMappingURL=pause.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { scheduleSchema } from "./schema.js";
|
|
2
|
+
import { connectScheduleClient, requireNewAgentSchedule, toScheduleCommandError, toScheduleRow, } from "./shared.js";
|
|
3
|
+
export async function runPauseCommand(id, options, _command) {
|
|
4
|
+
const { client } = await connectScheduleClient(options.host);
|
|
5
|
+
try {
|
|
6
|
+
await requireNewAgentSchedule(client, id);
|
|
7
|
+
const payload = await client.schedulePause({ id });
|
|
8
|
+
if (payload.error || !payload.schedule) {
|
|
9
|
+
throw new Error(payload.error ?? `Failed to pause schedule: ${id}`);
|
|
10
|
+
}
|
|
11
|
+
return {
|
|
12
|
+
type: "single",
|
|
13
|
+
data: toScheduleRow(payload.schedule),
|
|
14
|
+
schema: scheduleSchema,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
catch (error) {
|
|
18
|
+
throw toScheduleCommandError("SCHEDULE_PAUSE_FAILED", "pause schedule", error);
|
|
19
|
+
}
|
|
20
|
+
finally {
|
|
21
|
+
await client.close().catch(() => { });
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=pause.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
import type { SingleResult } from "../../output/index.js";
|
|
3
|
+
import { type ScheduleCommandOptions, type ScheduleRow } from "./shared.js";
|
|
4
|
+
export declare function runResumeCommand(id: string, options: ScheduleCommandOptions, _command: Command): Promise<SingleResult<ScheduleRow>>;
|
|
5
|
+
//# sourceMappingURL=resume.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { scheduleSchema } from "./schema.js";
|
|
2
|
+
import { connectScheduleClient, requireNewAgentSchedule, toScheduleCommandError, toScheduleRow, } from "./shared.js";
|
|
3
|
+
export async function runResumeCommand(id, options, _command) {
|
|
4
|
+
const { client } = await connectScheduleClient(options.host);
|
|
5
|
+
try {
|
|
6
|
+
await requireNewAgentSchedule(client, id);
|
|
7
|
+
const payload = await client.scheduleResume({ id });
|
|
8
|
+
if (payload.error || !payload.schedule) {
|
|
9
|
+
throw new Error(payload.error ?? `Failed to resume schedule: ${id}`);
|
|
10
|
+
}
|
|
11
|
+
return {
|
|
12
|
+
type: "single",
|
|
13
|
+
data: toScheduleRow(payload.schedule),
|
|
14
|
+
schema: scheduleSchema,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
catch (error) {
|
|
18
|
+
throw toScheduleCommandError("SCHEDULE_RESUME_FAILED", "resume schedule", error);
|
|
19
|
+
}
|
|
20
|
+
finally {
|
|
21
|
+
await client.close().catch(() => { });
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=resume.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
import type { SingleResult } from "../../output/index.js";
|
|
3
|
+
import { type ScheduleCommandOptions, type ScheduleRow } from "./shared.js";
|
|
4
|
+
export declare function runRunOnceCommand(id: string, options: ScheduleCommandOptions, _command: Command): Promise<SingleResult<ScheduleRow>>;
|
|
5
|
+
//# sourceMappingURL=run-once.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { scheduleSchema } from "./schema.js";
|
|
2
|
+
import { connectScheduleClient, requireNewAgentSchedule, toScheduleCommandError, toScheduleRow, } from "./shared.js";
|
|
3
|
+
export async function runRunOnceCommand(id, options, _command) {
|
|
4
|
+
const { client } = await connectScheduleClient(options.host);
|
|
5
|
+
try {
|
|
6
|
+
await requireNewAgentSchedule(client, id);
|
|
7
|
+
const payload = await client.scheduleRunOnce({ id });
|
|
8
|
+
if (payload.error || !payload.schedule) {
|
|
9
|
+
throw new Error(payload.error ?? `Failed to run schedule once: ${id}`);
|
|
10
|
+
}
|
|
11
|
+
return {
|
|
12
|
+
type: "single",
|
|
13
|
+
data: toScheduleRow(payload.schedule),
|
|
14
|
+
schema: scheduleSchema,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
catch (error) {
|
|
18
|
+
throw toScheduleCommandError("SCHEDULE_RUN_ONCE_FAILED", "run schedule once", error);
|
|
19
|
+
}
|
|
20
|
+
finally {
|
|
21
|
+
await client.close().catch(() => { });
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=run-once.js.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { OutputSchema } from "../../output/index.js";
|
|
2
|
+
import { type ScheduleRow } from "./shared.js";
|
|
3
|
+
import type { ScheduleRecord, ScheduleRunRecord } from "./types.js";
|
|
4
|
+
export declare const scheduleSchema: OutputSchema<ScheduleRow>;
|
|
5
|
+
export interface ScheduleInspectRow {
|
|
6
|
+
key: string;
|
|
7
|
+
value: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function createScheduleInspectSchema(record: ScheduleRecord): OutputSchema<ScheduleInspectRow>;
|
|
10
|
+
export interface ScheduleLogRow {
|
|
11
|
+
id: string;
|
|
12
|
+
status: string;
|
|
13
|
+
startedAt: string;
|
|
14
|
+
agentId: string | null;
|
|
15
|
+
output: string | null;
|
|
16
|
+
error: string | null;
|
|
17
|
+
}
|
|
18
|
+
export declare const scheduleLogSchema: OutputSchema<ScheduleLogRow>;
|
|
19
|
+
export declare function toScheduleLogRow(run: ScheduleRunRecord): ScheduleLogRow;
|
|
20
|
+
export declare function createScheduleInspectRows(schedule: ScheduleRecord): ScheduleInspectRow[];
|
|
21
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { formatCadence, formatTarget } from "./shared.js";
|
|
2
|
+
export const scheduleSchema = {
|
|
3
|
+
idField: "id",
|
|
4
|
+
columns: [
|
|
5
|
+
{ header: "ID", field: "id", width: 10 },
|
|
6
|
+
{ header: "NAME", field: "name", width: 20 },
|
|
7
|
+
{ header: "CADENCE", field: "cadence", width: 20 },
|
|
8
|
+
{ header: "TARGET", field: "target", width: 20 },
|
|
9
|
+
{ header: "STATUS", field: "status", width: 12 },
|
|
10
|
+
{ header: "NEXT RUN", field: "nextRunAt", width: 24 },
|
|
11
|
+
],
|
|
12
|
+
};
|
|
13
|
+
export function createScheduleInspectSchema(record) {
|
|
14
|
+
return {
|
|
15
|
+
idField: "key",
|
|
16
|
+
columns: [
|
|
17
|
+
{ header: "KEY", field: "key", width: 18 },
|
|
18
|
+
{ header: "VALUE", field: "value", width: 80 },
|
|
19
|
+
],
|
|
20
|
+
serialize: () => record,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export const scheduleLogSchema = {
|
|
24
|
+
idField: "id",
|
|
25
|
+
columns: [
|
|
26
|
+
{ header: "RUN ID", field: "id", width: 14 },
|
|
27
|
+
{ header: "STATUS", field: "status", width: 12 },
|
|
28
|
+
{ header: "STARTED", field: "startedAt", width: 24 },
|
|
29
|
+
{ header: "AGENT", field: "agentId", width: 12 },
|
|
30
|
+
{ header: "OUTPUT", field: "output", width: 40 },
|
|
31
|
+
{ header: "ERROR", field: "error", width: 40 },
|
|
32
|
+
],
|
|
33
|
+
};
|
|
34
|
+
export function toScheduleLogRow(run) {
|
|
35
|
+
return {
|
|
36
|
+
id: run.id,
|
|
37
|
+
status: run.status,
|
|
38
|
+
startedAt: run.startedAt,
|
|
39
|
+
agentId: run.agentId ? run.agentId.slice(0, 7) : null,
|
|
40
|
+
output: run.output,
|
|
41
|
+
error: run.error,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export function createScheduleInspectRows(schedule) {
|
|
45
|
+
return [
|
|
46
|
+
{ key: "Id", value: schedule.id },
|
|
47
|
+
{ key: "Name", value: schedule.name ?? "null" },
|
|
48
|
+
{ key: "Prompt", value: schedule.prompt },
|
|
49
|
+
{
|
|
50
|
+
key: "Cadence",
|
|
51
|
+
value: schedule.cadence.type === "cron"
|
|
52
|
+
? formatCadence(schedule.cadence)
|
|
53
|
+
: `every:${schedule.cadence.everyMs}ms`,
|
|
54
|
+
},
|
|
55
|
+
{ key: "Target", value: formatTarget(schedule.target) },
|
|
56
|
+
{ key: "Status", value: schedule.status },
|
|
57
|
+
{ key: "CreatedAt", value: schedule.createdAt },
|
|
58
|
+
{ key: "UpdatedAt", value: schedule.updatedAt },
|
|
59
|
+
{ key: "NextRunAt", value: schedule.nextRunAt ?? "null" },
|
|
60
|
+
{ key: "LastRunAt", value: schedule.lastRunAt ?? "null" },
|
|
61
|
+
{ key: "PausedAt", value: schedule.pausedAt ?? "null" },
|
|
62
|
+
{ key: "ExpiresAt", value: schedule.expiresAt ?? "null" },
|
|
63
|
+
{ key: "MaxRuns", value: schedule.maxRuns == null ? "null" : `${schedule.maxRuns}` },
|
|
64
|
+
{ key: "RunCount", value: `${schedule.runs.length}` },
|
|
65
|
+
];
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { CommandError, CommandOptions } from "../../output/index.js";
|
|
2
|
+
import type { CreateScheduleInput, ScheduleCadence, ScheduleDaemonClient, ScheduleListItem, ScheduleRecord, ScheduleTarget, UpdateScheduleInput } from "./types.js";
|
|
3
|
+
export interface ScheduleCommandOptions extends CommandOptions {
|
|
4
|
+
host?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function connectScheduleClient(host: string | undefined): Promise<{
|
|
7
|
+
client: ScheduleDaemonClient;
|
|
8
|
+
host: string;
|
|
9
|
+
}>;
|
|
10
|
+
export declare function toScheduleCommandError(code: string, action: string, error: unknown): CommandError;
|
|
11
|
+
export declare function requireNewAgentSchedule(client: ScheduleDaemonClient, id: string): Promise<void>;
|
|
12
|
+
export declare function formatCadence(cadence: ScheduleCadence): string;
|
|
13
|
+
export declare function formatTarget(target: ScheduleTarget | ScheduleListItem["target"]): string;
|
|
14
|
+
export declare function formatDurationMs(durationMs: number): string;
|
|
15
|
+
export declare function parseScheduleCreateInput(options: {
|
|
16
|
+
prompt: string;
|
|
17
|
+
every?: string;
|
|
18
|
+
cron?: string;
|
|
19
|
+
timezone?: string;
|
|
20
|
+
name?: string;
|
|
21
|
+
target?: string;
|
|
22
|
+
provider?: string;
|
|
23
|
+
mode?: string;
|
|
24
|
+
thinking?: string;
|
|
25
|
+
cwd?: string;
|
|
26
|
+
host?: string;
|
|
27
|
+
maxRuns?: string;
|
|
28
|
+
expiresIn?: string;
|
|
29
|
+
runNow?: boolean;
|
|
30
|
+
}): CreateScheduleInput;
|
|
31
|
+
export interface ScheduleUpdateOptionsInput {
|
|
32
|
+
id: string;
|
|
33
|
+
every?: string;
|
|
34
|
+
cron?: string;
|
|
35
|
+
timezone?: string;
|
|
36
|
+
name?: string;
|
|
37
|
+
prompt?: string;
|
|
38
|
+
provider?: string;
|
|
39
|
+
model?: string;
|
|
40
|
+
mode?: string;
|
|
41
|
+
cwd?: string;
|
|
42
|
+
maxRuns?: string;
|
|
43
|
+
expiresIn?: string;
|
|
44
|
+
clearMaxRuns?: boolean;
|
|
45
|
+
clearExpires?: boolean;
|
|
46
|
+
}
|
|
47
|
+
export declare function parseScheduleUpdateInput(options: ScheduleUpdateOptionsInput): UpdateScheduleInput;
|
|
48
|
+
export declare function compileEveryPresetToCron(value: string): string;
|
|
49
|
+
export interface ScheduleRow {
|
|
50
|
+
id: string;
|
|
51
|
+
name: string | null;
|
|
52
|
+
cadence: string;
|
|
53
|
+
target: string;
|
|
54
|
+
status: string;
|
|
55
|
+
nextRunAt: string | null;
|
|
56
|
+
lastRunAt: string | null;
|
|
57
|
+
}
|
|
58
|
+
export declare function toScheduleRow(schedule: ScheduleListItem | ScheduleRecord): ScheduleRow;
|
|
59
|
+
//# sourceMappingURL=shared.d.ts.map
|