opencode-cron-job 0.1.4 → 0.1.5
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/README.md +2 -0
- package/dist/index.d.ts +1 -4
- package/dist/index.js +121 -52
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -53,6 +53,7 @@ The agent calls the following tools internally — you don't need to use them di
|
|
|
53
53
|
| `cron_list` | List all scheduled tasks |
|
|
54
54
|
| `cron_run` | Run a task immediately |
|
|
55
55
|
| `cron_delete` | Delete a task |
|
|
56
|
+
| `cron_once` | Schedule a one-shot delay task |
|
|
56
57
|
|
|
57
58
|
### Task file format
|
|
58
59
|
|
|
@@ -125,6 +126,7 @@ Agent 内部会调用以下工具来完成,你不需要直接使用:
|
|
|
125
126
|
| `cron_list` | 列出所有任务 |
|
|
126
127
|
| `cron_run` | 立即执行一个任务 |
|
|
127
128
|
| `cron_delete` | 删除任务 |
|
|
129
|
+
| `cron_once` | 定时一次性延迟任务 |
|
|
128
130
|
|
|
129
131
|
### 任务文件格式
|
|
130
132
|
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { readFileSync, existsSync } from "fs";
|
|
1
|
+
import { readFileSync, existsSync, appendFileSync, mkdirSync, writeFileSync } from "fs";
|
|
2
2
|
import { join } from "path";
|
|
3
3
|
import cron from "node-cron";
|
|
4
4
|
import { tool } from "@opencode-ai/plugin";
|
|
@@ -19,7 +19,7 @@ function parseDelay(s) {
|
|
|
19
19
|
return n * 60000;
|
|
20
20
|
}
|
|
21
21
|
function parseTasks(content) {
|
|
22
|
-
const
|
|
22
|
+
const result = [];
|
|
23
23
|
const sections = content.split(/^## /m).filter((s) => s.trim());
|
|
24
24
|
for (const section of sections) {
|
|
25
25
|
const lines = section.split("\n");
|
|
@@ -31,51 +31,126 @@ function parseTasks(content) {
|
|
|
31
31
|
const t = line.trim();
|
|
32
32
|
if (t.startsWith("- cron:"))
|
|
33
33
|
schedule = t.slice("- cron:".length).trim();
|
|
34
|
+
else if (t.startsWith("- delay:"))
|
|
35
|
+
schedule = t.slice("- delay:".length).trim();
|
|
34
36
|
else if (t.startsWith("- prompt:"))
|
|
35
37
|
prompt = t.slice("- prompt:".length).trim();
|
|
36
38
|
}
|
|
37
39
|
if (schedule && prompt)
|
|
38
|
-
|
|
40
|
+
result.push({ name, schedule, prompt });
|
|
39
41
|
}
|
|
40
|
-
return
|
|
42
|
+
return result;
|
|
41
43
|
}
|
|
42
44
|
let jobs = [];
|
|
43
45
|
let nextId = 1;
|
|
44
|
-
const
|
|
46
|
+
export const CronPlugin = async ({ client, directory }) => {
|
|
45
47
|
const tasksFile = join(directory, ".cron-job", "tasks.md");
|
|
46
|
-
function fire(job) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
async function fire(job) {
|
|
49
|
+
try {
|
|
50
|
+
const res = await client.session.list({ query: { directory } });
|
|
51
|
+
const sessions = res.data;
|
|
52
|
+
if (!sessions || sessions.length === 0)
|
|
53
|
+
return;
|
|
54
|
+
sessions.sort((a, b) => b.time.updated - a.time.updated);
|
|
55
|
+
await client.session.promptAsync({
|
|
56
|
+
path: { id: sessions[0].id },
|
|
57
|
+
body: {
|
|
58
|
+
parts: [{ type: "text", text: job.prompt }],
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
catch (e) {
|
|
63
|
+
process.stderr.write(`[cron] fire error: ${e.message}\n`);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
function scheduleCron(job) {
|
|
67
|
+
job.task = cron.schedule(job.schedule, () => {
|
|
68
|
+
if (job.cancelled)
|
|
69
|
+
return;
|
|
70
|
+
fire(job);
|
|
71
|
+
});
|
|
50
72
|
}
|
|
51
|
-
function
|
|
52
|
-
|
|
53
|
-
|
|
73
|
+
function scheduleDelay(job) {
|
|
74
|
+
const ms = parseDelay(job.schedule);
|
|
75
|
+
if (ms <= 0)
|
|
76
|
+
return;
|
|
77
|
+
job.timer = setTimeout(() => {
|
|
78
|
+
if (job.cancelled)
|
|
79
|
+
return;
|
|
80
|
+
fire(job);
|
|
81
|
+
removeJobFromFile(job.name);
|
|
82
|
+
const idx = jobs.indexOf(job);
|
|
83
|
+
if (idx !== -1)
|
|
84
|
+
jobs.splice(idx, 1);
|
|
85
|
+
}, ms);
|
|
86
|
+
}
|
|
87
|
+
function startJob(item) {
|
|
88
|
+
const job = { ...item, id: String(nextId++), task: null, timer: null, cancelled: false };
|
|
89
|
+
if (cron.validate(job.schedule)) {
|
|
90
|
+
scheduleCron(job);
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
scheduleDelay(job);
|
|
54
94
|
}
|
|
95
|
+
return job;
|
|
55
96
|
}
|
|
56
|
-
|
|
57
|
-
|
|
97
|
+
function stopJob(job) {
|
|
98
|
+
job.cancelled = true;
|
|
99
|
+
job.task?.stop();
|
|
100
|
+
if (job.timer)
|
|
101
|
+
clearTimeout(job.timer);
|
|
102
|
+
}
|
|
103
|
+
function reloadJobs() {
|
|
104
|
+
for (const j of jobs)
|
|
105
|
+
stopJob(j);
|
|
106
|
+
jobs = [];
|
|
107
|
+
if (!existsSync(tasksFile))
|
|
108
|
+
return;
|
|
58
109
|
const items = parseTasks(readFileSync(tasksFile, "utf-8"));
|
|
59
110
|
for (const item of items) {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
111
|
+
jobs.push(startJob(item));
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
function removeJobFromFile(name) {
|
|
115
|
+
try {
|
|
116
|
+
const content = readFileSync(tasksFile, "utf-8");
|
|
117
|
+
const tasks = parseTasks(content);
|
|
118
|
+
const remaining = tasks.filter((t) => t.name !== name);
|
|
119
|
+
const lines = ["# 周期任务"];
|
|
120
|
+
for (const t of remaining) {
|
|
121
|
+
lines.push("");
|
|
122
|
+
lines.push(`## ${t.name}`);
|
|
123
|
+
lines.push(cron.validate(t.schedule) ? `- cron: ${t.schedule}` : `- delay: ${t.schedule}`);
|
|
124
|
+
lines.push(`- prompt: ${t.prompt}`);
|
|
125
|
+
}
|
|
126
|
+
writeFileSync(tasksFile, lines.join("\n") + "\n");
|
|
127
|
+
}
|
|
128
|
+
catch (e) {
|
|
129
|
+
process.stderr.write(`[cron] remove file error: ${e.message}\n`);
|
|
63
130
|
}
|
|
64
131
|
}
|
|
132
|
+
// Load from file on startup
|
|
133
|
+
reloadJobs();
|
|
65
134
|
return {
|
|
66
135
|
tool: {
|
|
67
136
|
cron_create: tool({
|
|
68
|
-
description: "Create a new cron job.
|
|
137
|
+
description: "Create a new cron job. Writes to .cron-job/tasks.md and schedules it.",
|
|
69
138
|
args: {
|
|
70
139
|
name: tool.schema.string().describe("Unique name for this job"),
|
|
71
|
-
schedule: tool.schema.string().describe("Cron expression
|
|
72
|
-
prompt: tool.schema.string().describe("
|
|
140
|
+
schedule: tool.schema.string().describe("Cron expression, e.g. '0 9 * * *'"),
|
|
141
|
+
prompt: tool.schema.string().describe("Prompt to inject when the job fires"),
|
|
73
142
|
},
|
|
74
143
|
async execute(args) {
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
144
|
+
const entry = `\n## ${args.name}\n- cron: ${args.schedule}\n- prompt: ${args.prompt}\n\n`;
|
|
145
|
+
if (!existsSync(tasksFile)) {
|
|
146
|
+
mkdirSync(join(directory, ".cron-job"), { recursive: true });
|
|
147
|
+
appendFileSync(tasksFile, `# 周期任务\n${entry}`);
|
|
148
|
+
}
|
|
149
|
+
else {
|
|
150
|
+
appendFileSync(tasksFile, entry);
|
|
151
|
+
}
|
|
152
|
+
jobs.push(startJob({ name: args.name, schedule: args.schedule, prompt: args.prompt }));
|
|
153
|
+
return `Created: ${args.name} (${args.schedule})`;
|
|
79
154
|
},
|
|
80
155
|
}),
|
|
81
156
|
cron_list: tool({
|
|
@@ -88,9 +163,9 @@ const _CronPlugin = async ({ client, directory }) => {
|
|
|
88
163
|
},
|
|
89
164
|
}),
|
|
90
165
|
cron_run: tool({
|
|
91
|
-
description: "Run a job immediately
|
|
166
|
+
description: "Run a job immediately",
|
|
92
167
|
args: {
|
|
93
|
-
jobId: tool.schema.string().describe("ID
|
|
168
|
+
jobId: tool.schema.string().describe("Job ID. Get it from cron_list."),
|
|
94
169
|
},
|
|
95
170
|
async execute(args) {
|
|
96
171
|
const job = jobs.find((j) => j.id === args.jobId);
|
|
@@ -101,52 +176,46 @@ const _CronPlugin = async ({ client, directory }) => {
|
|
|
101
176
|
},
|
|
102
177
|
}),
|
|
103
178
|
cron_delete: tool({
|
|
104
|
-
description: "Delete a cron job
|
|
179
|
+
description: "Delete a cron job from .cron-job/tasks.md",
|
|
105
180
|
args: {
|
|
106
|
-
jobId: tool.schema.string().describe("ID
|
|
181
|
+
jobId: tool.schema.string().describe("Job ID. Get it from cron_list."),
|
|
107
182
|
},
|
|
108
183
|
async execute(args) {
|
|
109
184
|
const idx = jobs.findIndex((j) => j.id === args.jobId);
|
|
110
185
|
if (idx === -1)
|
|
111
186
|
return `Job ${args.jobId} not found.`;
|
|
112
|
-
const
|
|
113
|
-
job
|
|
114
|
-
|
|
115
|
-
|
|
187
|
+
const job = jobs[idx];
|
|
188
|
+
stopJob(job);
|
|
189
|
+
jobs.splice(idx, 1);
|
|
190
|
+
removeJobFromFile(job.name);
|
|
116
191
|
return `${job.name}: deleted`;
|
|
117
192
|
},
|
|
118
193
|
}),
|
|
119
194
|
cron_once: tool({
|
|
120
|
-
description: "Schedule a one-shot prompt after a delay.
|
|
195
|
+
description: "Schedule a one-shot prompt after a delay. Saved to .cron-job/tasks.md for persistence across restarts.",
|
|
121
196
|
args: {
|
|
122
|
-
prompt: tool.schema.string().describe("
|
|
123
|
-
delay: tool.schema.string().describe("Delay
|
|
124
|
-
name: tool.schema.string().optional().describe("Optional name
|
|
197
|
+
prompt: tool.schema.string().describe("Prompt to inject when timer fires"),
|
|
198
|
+
delay: tool.schema.string().describe("Delay: '5m', '30s', '2h', '1d'"),
|
|
199
|
+
name: tool.schema.string().optional().describe("Optional name"),
|
|
125
200
|
},
|
|
126
201
|
async execute(args) {
|
|
127
202
|
const ms = parseDelay(args.delay);
|
|
128
203
|
if (ms <= 0)
|
|
129
|
-
return `Invalid delay: ${args.delay}
|
|
204
|
+
return `Invalid delay: ${args.delay}`;
|
|
130
205
|
const name = args.name || `reminder-${nextId}`;
|
|
131
|
-
const
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
jobs.splice(idx, 1);
|
|
141
|
-
}, ms);
|
|
142
|
-
jobs.push(job);
|
|
206
|
+
const entry = `\n## ${name}\n- delay: ${args.delay}\n- prompt: ${args.prompt}\n\n`;
|
|
207
|
+
if (!existsSync(tasksFile)) {
|
|
208
|
+
mkdirSync(join(directory, ".cron-job"), { recursive: true });
|
|
209
|
+
appendFileSync(tasksFile, `# 周期任务\n${entry}`);
|
|
210
|
+
}
|
|
211
|
+
else {
|
|
212
|
+
appendFileSync(tasksFile, entry);
|
|
213
|
+
}
|
|
214
|
+
jobs.push(startJob({ name, schedule: args.delay, prompt: args.prompt }));
|
|
143
215
|
return `Scheduled: ${name} (fires in ${args.delay})`;
|
|
144
216
|
},
|
|
145
217
|
}),
|
|
146
218
|
},
|
|
147
219
|
};
|
|
148
220
|
};
|
|
149
|
-
export default {
|
|
150
|
-
server: _CronPlugin,
|
|
151
|
-
};
|
|
152
221
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,IAAI,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AA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