@staticduo/opencode-scheduler 1.3.0 → 1.3.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/dist/index.d.ts CHANGED
@@ -12,72 +12,5 @@
12
12
  * - Environment variable injection (PATH for node/npx)
13
13
  */
14
14
  import type { Plugin } from "@opencode-ai/plugin";
15
- import { execSync } from "child_process";
16
- declare function jobFilePath(scopeId: string, slug: string): string;
17
- type OpencodeRunFormat = "default" | "json";
18
- interface JobRunSpec {
19
- prompt?: string;
20
- command?: string;
21
- arguments?: string;
22
- files?: string[];
23
- agent?: string;
24
- model?: string;
25
- variant?: string;
26
- title?: string;
27
- share?: boolean;
28
- continue?: boolean;
29
- session?: string;
30
- runFormat?: OpencodeRunFormat;
31
- attachUrl?: string;
32
- port?: number;
33
- }
34
- type JobInvocation = {
35
- command: string;
36
- args: string[];
37
- };
38
- interface Job {
39
- scopeId?: string;
40
- slug: string;
41
- name: string;
42
- schedule: string;
43
- prompt?: string;
44
- attachUrl?: string;
45
- run?: JobRunSpec;
46
- invocation?: JobInvocation;
47
- timeoutSeconds?: number;
48
- source?: string;
49
- workdir?: string;
50
- createdAt: string;
51
- updatedAt?: string;
52
- lastRunAt?: string;
53
- lastRunExitCode?: number;
54
- lastRunError?: string;
55
- lastRunSource?: "manual" | "scheduled";
56
- lastRunStatus?: "running" | "success" | "failed";
57
- }
58
- declare function cronToSystemdCalendars(cron: string): string[];
59
- declare function withSystemdRuntimeEnv(env: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
60
- declare function systemdRunEnv(): NodeJS.ProcessEnv;
61
- type SystemdCommandRunner = (command: string, options?: Parameters<typeof execSync>[1]) => ReturnType<typeof execSync>;
62
- declare function createSystemdTimer(job: Job): string;
63
- declare function installSystemdJob(job: Job): void;
64
- declare function uninstallSystemdJob(job: Job): void;
65
- declare function saveJob(job: Job): void;
66
- declare function deleteJobFile(job: Job): void;
67
15
  export declare const SchedulerPlugin: Plugin;
68
16
  export default SchedulerPlugin;
69
- export type { SystemdCommandRunner };
70
- export declare const __test__: {
71
- cronToSystemdCalendars: typeof cronToSystemdCalendars;
72
- createSystemdTimer: typeof createSystemdTimer;
73
- withSystemdRuntimeEnv: typeof withSystemdRuntimeEnv;
74
- systemdRunEnv: typeof systemdRunEnv;
75
- installSystemdJob: typeof installSystemdJob;
76
- uninstallSystemdJob: typeof uninstallSystemdJob;
77
- saveJob: typeof saveJob;
78
- deleteJobFile: typeof deleteJobFile;
79
- jobFilePath: typeof jobFilePath;
80
- SYSTEMD_USER_DIR: string;
81
- SCOPES_DIR: string;
82
- setSystemdCommandRunner(runner: SystemdCommandRunner | null): void;
83
- };
package/dist/index.js CHANGED
@@ -15019,24 +15019,25 @@ ${logs}`, { job, logPath, logs });
15019
15019
  };
15020
15020
  };
15021
15021
  var src_default = SchedulerPlugin;
15022
- var __test__ = {
15023
- cronToSystemdCalendars,
15024
- createSystemdTimer,
15025
- withSystemdRuntimeEnv,
15026
- systemdRunEnv,
15027
- installSystemdJob,
15028
- uninstallSystemdJob,
15029
- saveJob,
15030
- deleteJobFile,
15031
- jobFilePath,
15032
- SYSTEMD_USER_DIR,
15033
- SCOPES_DIR,
15034
- setSystemdCommandRunner(runner) {
15035
- systemdCommandRunner = runner ?? defaultSystemdCommandRunner;
15022
+ Object.assign(SchedulerPlugin, {
15023
+ __test__: {
15024
+ cronToSystemdCalendars,
15025
+ createSystemdTimer,
15026
+ withSystemdRuntimeEnv,
15027
+ systemdRunEnv,
15028
+ installSystemdJob,
15029
+ uninstallSystemdJob,
15030
+ saveJob,
15031
+ deleteJobFile,
15032
+ jobFilePath,
15033
+ SYSTEMD_USER_DIR,
15034
+ SCOPES_DIR,
15035
+ setSystemdCommandRunner(runner) {
15036
+ systemdCommandRunner = runner ?? defaultSystemdCommandRunner;
15037
+ }
15036
15038
  }
15037
- };
15039
+ });
15038
15040
  export {
15039
15041
  src_default as default,
15040
- __test__,
15041
15042
  SchedulerPlugin
15042
15043
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staticduo/opencode-scheduler",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "OpenCode plugin for scheduling recurring jobs using launchd, systemd, Task Scheduler, or cron fallback",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",