opencode-jobs 0.1.1 → 0.1.2

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.
Files changed (3) hide show
  1. package/README.md +2 -1
  2. package/dist/index.js +18 -10
  3. package/package.json +4 -2
package/README.md CHANGED
@@ -193,7 +193,8 @@ Not supported on macOS or Windows.
193
193
  npm install
194
194
  npm run check # prettier + eslint + tsc
195
195
  npm run build # Bun plugin bundle + Node CLI bundle + declarations
196
- npm run smoke # build, scheduler behavior, CLI install, and package contents
196
+ npm test # build + Node integration tests
197
+ npm run smoke # full behavioral gate, including generated scripts and CLI install
197
198
  ```
198
199
 
199
200
  Node >= 20 is required for the CLI and dev toolchain; the plugin runs on Bun
package/dist/index.js CHANGED
@@ -1020,16 +1020,24 @@ function scheduleJobOutput(input, directory) {
1020
1020
  } catch (error) {
1021
1021
  return fail(errorMessage(error));
1022
1022
  }
1023
- const run = validateRunSpec({
1024
- prompt: input.prompt,
1025
- command: input.command,
1026
- arguments: input.arguments,
1027
- agent: input.agent,
1028
- model: input.model
1029
- }, "job");
1030
- const session = validateSession(input.session, "job");
1031
- const guard = validateGuard(input.guard, "job");
1032
- const timeoutSeconds = validateTimeout(input.timeoutSeconds, "job");
1023
+ let run;
1024
+ let session;
1025
+ let guard;
1026
+ let timeoutSeconds;
1027
+ try {
1028
+ run = validateRunSpec({
1029
+ prompt: input.prompt,
1030
+ command: input.command,
1031
+ arguments: input.arguments,
1032
+ agent: input.agent,
1033
+ model: input.model
1034
+ }, "job");
1035
+ session = validateSession(input.session, "job");
1036
+ guard = validateGuard(input.guard, "job");
1037
+ timeoutSeconds = validateTimeout(input.timeoutSeconds, "job");
1038
+ } catch (error) {
1039
+ return fail(errorMessage(error));
1040
+ }
1033
1041
  const existing = loadJobFile(path6.join(jobsDirectory(directory), `${slug}.json`), slug);
1034
1042
  const job = {
1035
1043
  slug,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-jobs",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "opencode plugin that schedules recurring agent jobs as systemd user timers, with git-committable job definitions, run history, and session continuity",
5
5
  "type": "module",
6
6
  "engines": {
@@ -29,9 +29,11 @@
29
29
  "prepublishOnly": "npm run clean && npm run build",
30
30
  "format": "prettier --write .",
31
31
  "lint": "eslint",
32
+ "test": "npm run build && npm run test:integration",
33
+ "test:integration": "node --test test/integration/*.test.mjs",
32
34
  "typecheck": "tsc --noEmit",
33
35
  "check": "prettier --check . && eslint && tsc --noEmit",
34
- "smoke": "npm run build && node scripts/smoke.mjs && node scripts/cli-smoke.mjs"
36
+ "smoke": "npm run build && node scripts/smoke.mjs && node scripts/cli-smoke.mjs && npm run test:integration"
35
37
  },
36
38
  "keywords": [
37
39
  "opencode",