Repository navigation
Releases
Releases · joe-broadhead/opencode-jobs
v0.0.4
[0.0.4] - 2026-11-20
Added
- List snapshot
jobs.runs.list(output: "list"). An app can bind it and render recent runs without knowing Jobs. It calls the existingjobs_historyread and leaves out run summaries.jobs.runsstays the events source and is not renamed. No write is declared. jelly.cost, the line Jelly shows on the plugin's review before it installs: Jobs adds no provider bill of its own. A prompt, a command, and a reminder set to wake the agent use the agent's model; a plain reminder and a script run no model turn, and the source reads only this machine. No price is stated.
Fixed
jobs.runs.listis readable through the tools RPC on every tested release, proven by a host test that reads it on each. The list rides thejobs_historymethod, whose answer the host validates: that method declares an object, so the list answer is accepted, and the method now declares thelistandaccountinputs it takes. The model'sjobs_historytool keeps its own schema, so nolistinput is ever a model's.- A run's name is screened whole and only then cut to the item's length, so a secret that straddles the cut cannot pass as a prefix; control characters are dropped, a repeated run id is listed once, and the list stops before the answer passes the declared
maxBytes.
Changed
sourcesgainsjobs.runs.listandjellygainscost, so Jelly asks for consent again.- The list's rules are guarded by unit and host tests now: the screen and its order, the id screen, a repeated run once, the 50-item cap, the order, the byte bound, the account check, and a host test that reads two seeded runs rather than an empty list.
- The source-contract devDependency is pinned at v0.3.0, still bundled into
dist/index.js. Jobs declares no fact, hint or routine, so a page reads the same for a consumer still on v0.2.0.
Known limits
- Runs happen only while OpenCode runs. Nothing runs while OpenCode is closed. A slot due in that time runs when OpenCode next starts if it is no later than the job's
maxLate(one hour by default); a later slot is skipped as expired. - Scripts have fixed limits by default. A script runs in a QuickJS VM with 64 MB of memory, 100 tool calls and 64 KB of output. A job can raise each one up to the maximum in docs/scripting.md.
- A changed declared file is re-approved under
all. The run record names the script's digest, but not yet the declared-file set (its paths, modes and caps), so the record alone does not show which file declaration a run used. - Declared files are read on the host. Each one is read up to its size limit, before the VM starts, and that memory is outside
memoryMb. - A restore can fail. When a file cannot be put back after a failed commit, its run records
rollback_failedand the error names the kept original, which a person must restore by hand. - A run stopped while its own subagent works ends at its timeout. A run waits until its session is idle with no
subagent or shell of its own still running. If the session is stopped while one is, OpenCode reports no further idle,
so the run is recorded astimed_outwhen the job's timeout passes, rather than at once. - An agent without the default rules still runs its jobs. Status warns with
JOBS_AGENT_UNGUARDEDand the block to paste; nothing blocks the run. - Updates are not automatic for a Git install, and
opencode plugin updateandopencode plugin checkdo not work on one: to move to a newer release, remove the old entry and add the new tag.
v0.0.3
[0.0.3] - 2026-11-18
Changed
- Admits OpenCode 2.3.1 and 2.3.2:
TESTED_HOSTSinsrc/constants.tsis 2.2.3 to 2.3.2, which the host and pack
stages, status and CI read. - Tested on OpenCode 2.3.1 and 2.3.2. The supported range is unchanged (
>=2.2.3 <2.4.0).
Known limits
- Runs happen only while OpenCode runs. Nothing runs while OpenCode is closed. A slot due in that time runs when OpenCode next starts if it is no later than the job's
maxLate(one hour by default); a later slot is skipped as expired. - Scripts have fixed limits by default. A script runs in a QuickJS VM with 64 MB of memory, 100 tool calls and 64 KB of output. A job can raise each one up to the maximum in docs/scripting.md.
- A changed declared file is re-approved under
all. The run record names the script's digest, but not yet the declared-file set (its paths, modes and caps), so the record alone does not show which file declaration a run used. - Declared files are read on the host. Each one is read up to its size limit, before the VM starts, and that memory is outside
memoryMb. - A restore can fail. When a file cannot be put back after a failed commit, its run records
rollback_failedand the error names the kept original, which a person must restore by hand. - A run stopped while its own subagent works ends at its timeout. A run waits until its session is idle with no
subagent or shell of its own still running. If the session is stopped while one is, OpenCode reports no further idle,
so the run is recorded astimed_outwhen the job's timeout passes, rather than at once. - An agent without the default rules still runs its jobs. Status warns with
JOBS_AGENT_UNGUARDEDand the block to paste; nothing blocks the run. - Updates are not automatic for a Git install, and
opencode plugin updateandopencode plugin checkdo not work on one: to move to a newer release, remove the old entry and add the new tag.
v0.0.2
[0.0.2] - 2026-11-17
Added
- The
jobs.runssource (source contract version 1,package.json'ssources): one event per finished job run, from
the plugin's own run records, with no network.events_listandprobeare tools RPC methods; an event is the job's
name and how its run ended, at the run's end, never what the run said. When retention has removed a run a read had
not reached, the page says so withgap.npm run conformanceruns the source contract's kit and writes the report
a release attaches.
Changed
- The tools RPC's transport is source-contract's
tools-rpcmodule (v0.2.0), bundled, instead of the family's copy:
the same rules,describeand envelope. events_listandprobeare reads: the default rules allowjobs_events_listandjobs_probeunder everyaccess.- A slot the runner skips (overlap, expired or ended) records when the skip was recorded as its end, so the
jobs.runssource lists it like every other skip. - Tested on OpenCode 2.2.3, 2.2.4, 2.2.5, 2.2.6, 2.2.7 and 2.3.0 (
TESTED_HOSTSinsrc/constants.ts), within the
host range>=2.2.3 <2.4.0.
Known limits
- Runs happen only while OpenCode runs. Nothing runs while OpenCode is closed. A slot due in that time runs when OpenCode next starts if it is no later than the job's
maxLate(one hour by default); a later slot is skipped as expired. - Scripts have fixed limits by default. A script runs in a QuickJS VM with 64 MB of memory, 100 tool calls and 64 KB of output. A job can raise each one up to the maximum in docs/scripting.md.
- A changed declared file is re-approved under
all. The run record names the script's digest, but not yet the declared-file set (its paths, modes and caps), so the record alone does not show which file declaration a run used. - Declared files are read on the host. Each one is read up to its size limit, before the VM starts, and that memory is outside
memoryMb. - A restore can fail. When a file cannot be put back after a failed commit, its run records
rollback_failedand the error names the kept original, which a person must restore by hand. - A run stopped while its own subagent works ends at its timeout. A run waits until its session is idle with no
subagent or shell of its own still running. If the session is stopped while one is, OpenCode reports no further idle,
so the run is recorded astimed_outwhen the job's timeout passes, rather than at once. - An agent without the default rules still runs its jobs. Status warns with
JOBS_AGENT_UNGUARDEDand the block to paste; nothing blocks the run. - Updates are not automatic for a Git install, and
opencode plugin updateandopencode plugin checkdo not work on one: to move to a newer release, remove the old entry and add the new tag.
v0.0.1
[0.0.1] - 2026-11-15
Changed
- Admits OpenCode 2.3: the host range is
>=2.2.3 <2.4.0, tested on 2.2.3, 2.2.4, 2.2.5, 2.2.6, 2.2.7 and 2.3.0. - A job run that starts a subagent waits for it. From OpenCode 2.3.0 every subagent runs in the background, so a run
is finished only when its session is idle with no subagent or shell of its own still running; before, it was
recorded at the first idle, with a partial summary. The job's timeout still bounds the whole run. - A person's Stop ends a
jobs_run_scriptcall's script (OpenCode 2.3.0 aborts the call's signal on Stop): it ends as
interrupted (JOBS_SCRIPT_INTERRUPTED) and writes none of its declared files. - Jelly: the
accesssetting offers Jelly's three choices, "Allowed" (all, the default), "Ask before changes"
(ask-changes) and "Read only" (read-only), so Jelly shows a choice instead of a free text field (needs a Jelly
that includes app#1301). - A script's approval follows
accesslike every other Jobs tool: at the defaultallno script asks for approval;
ask-changesasks once, through the digest-boundjobs_scriptprompt, before a script that can change something;
read-onlydenies one. Every path that approves a script (create, update,jobs_approve, a job file at load, a
one-off run) takes the answer from one place, and the docs and the skill say so. - Jelly: the declaration is checked against the tool registry: the fourteen tools, in order, each
allowat the
default access, with the four reads read-only and the two pauses, like every other change, not read-only.
docs/jelly.mdnow says what each access value does in Jelly, and that theaccesssetting is declared. - Under
ask-changes,jobs_pauseandjobs_pause_allask like every other change (they were allowed), so the
plugin's own rules give what Jelly gives the same declaration: only the four reads run without asking.
/jobs-pause, a command, still pauses every job without asking. - Releases come from the family's release kit: the release workflow is started on a
mastercommit whose CI passed,
makes the release commit itself, and creates the tag and the GitHub Release only after the owner approves. Pull
requests run CI on Linux; a push tomasteralso runs macOS. Jobs ships no native files, so a release carries none. npm run checkruns the kit's tool drift check. Jobs serves only its own tools (test/fixtures/tool-registry.json
says"upstream": "none"), so no live capture is expected.package.jsonis"private": true, so nothing can be published to npm by mistake. Installs from the GitHub release
tag are unaffected.
Known limits
- Runs happen only while OpenCode runs. Nothing runs while OpenCode is closed. A slot due in that time runs when OpenCode next starts if it is no later than the job's
maxLate(one hour by default); a later slot is skipped as expired. - Scripts have fixed limits by default. A script runs in a QuickJS VM with 64 MB of memory, 100 tool calls and 64 KB of output. A job can raise each one up to the maximum in docs/scripting.md.
- A changed declared file is re-approved under
all. The run record names the script's digest, but not yet the declared-file set (its paths, modes and caps), so the record alone does not show which file declaration a run used. - Declared files are read on the host. Each one is read up to its size limit, before the VM starts, and that memory is outside
memoryMb. - A restore can fail. When a file cannot be put back after a failed commit, its run records
rollback_failedand the error names the kept original, which a person must restore by hand. - A run stopped while its own subagent works ends at its timeout. A run waits until its session is idle with no
subagent or shell of its own still running. If the session is stopped while one is, OpenCode reports no further idle,
so the run is recorded astimed_outwhen the job's timeout passes, rather than at once. - An agent without the default rules still runs its jobs. Status warns with
JOBS_AGENT_UNGUARDEDand the block to paste; nothing blocks the run. - Updates are not automatic for a Git install, and
opencode plugin updateandopencode plugin checkdo not work on one: to move to a newer release, remove the old entry and add the new tag.
v0.0.0
[0.0.0] - 2026-11-10
Added
- The jobs skill is registered with OpenCode, so a question about scheduled jobs loads it.
- The Jelly declaration has an
accesssetting (defaultall), so Jelly can show and change the access option. - The
scriptaction: a job can run a confined program instead of a model prompt. Itsusesmanifest names the tools
it can call,/jobs-approvere-approves it, and the run record keeps what each call did, never a payload. - The script runtime: QuickJS compiled to WebAssembly (MIT, bundled as
dist/quickjs.wasmand inNOTICE), one VM per
run, with no direct filesystem, network, process, environment or timers; 100 calls, 64 MB of VM memory and 64 KB of
output by default, the job's timeout for wall time, and the kill switch mid-call. - Declared files: a script can read a snapshot and buffer writes to named files. Writes commit after a successful run,
with path checks, conflict detection and rollback on failure.scriptFilesRootspermits paths outside the job's
directory; files outside the project also need the agent'sexternal_directorypermission. - The
accessoption:allallows every Jobs tool by default,ask-changesasks for changes andread-onlydenies
them. The namespace rule covers tools added later; explicit later agent rules still win. - Script approval follows the manifest's worst class and includes declared file writes:
allapproves automatically,
ask-changesapproves all-read scripts automatically and asks for changes, andread-onlydenies changes. The digest
binds the source, sorted manifest, file declarations and resolved paths. Eligible file jobs are approved at load.
Every run re-checks approval, permissions and access; a changed or revoked approval can skip the slot. jobs_approve,/jobs-approve, andjobs_run_script(one run, nothing kept).- A status row for script jobs, script approval facts in the job list, and per-call facts in run records.
Changed
- The tools RPC is v2: every known tool is a method with a class, the rule is resolved before dispatch (an
askis
refused with no prompt),shapeInputruns besideshapeResult, anddescribereports classes and a session's
permission. Jobs exposes all fourteen tools as methods; a run session still denies the state changes. - An ad-hoc script no longer inherits a saved "Always allow": a script's permission is a config rule or a Jobs approval.
This is the one deliberate v2 break. ctx.agent.getis called without a location, where the job runs in the leader's own directory (a location passed back
could fail for a project-level plugin on 2.2.4).
Known limits
- Runs happen only while OpenCode runs. Nothing runs while OpenCode is closed. A slot due in that time runs when OpenCode next starts if it is no later than the job's
maxLate(one hour by default); a later slot is skipped as expired. - Scripts have fixed limits by default. A script runs in a QuickJS VM with 64 MB of memory, 100 tool calls and 64 KB of output. A job can raise each one up to the maximum in docs/scripting.md.
- A changed declared file is re-approved under
all. The run record names the script's digest, but not yet the declared-file set (its paths, modes and caps), so the record alone does not show which file declaration a run used. - Declared files are read on the host. Each one is read up to its size limit, before the VM starts, and that memory is outside
memoryMb. - A restore can fail. When a file cannot be put back after a failed commit, its run records
rollback_failedand the error names the kept original, which a person must restore by hand. - An agent without the default rules still runs its jobs. Status warns with
JOBS_AGENT_UNGUARDEDand the block to paste; nothing blocks the run. - Updates are not automatic for a Git install, and
opencode plugin updateandopencode plugin checkdo not work on one: to move to a newer release, remove the old entry and add the new tag.