Repository navigation
v0.0.2
Unofficial OpenCode plugin: weather, time, polled timers and local speech tools.
opencode plugin add @joe-broadhead/opencode-utilitiesnpm: @joe-broadhead/opencode-utilities@0.0.2
Added
- README sections for what to do after
plugin add(opencode reload, then/utilities-status) and for updating withopencode plugin update. Uninstall now signs out of Open-Meteo first, while the plugin is installed, and names both data folders.
Changed
- The tools RPC's envelope errors use the wording shared by every plugin in this family.
describewith any input but{}now saysdescribe takes no input(before:Expected never at ["sessionID"]), and an envelope that is not an object saysthe envelope must be an object, such as {"sessionID":"<session>","input":<the tool's input>}(before:Expected an object). - The status RPC (
utilities.toolsstatus) has the fields every plugin in this family now shares, with the same names and meanings:version,host{ version, range, tested },state,unguardedAgentsandnextStep. Renamed:host.found→host.version,host.required→host.range,host.availability→host.tested,permissions.unguardedAgents→unguardedAgents,permissions.next→nextStep, which is now always present and equals theNext steprow. New:stateandspeech.preseeded. Theutilities_statustool and thestatusscript method follow:permissions.unguardedAgents(a count) →unguardedAgents,next→nextStep. - OpenCode 2.2.5 is a tested host, with 2.2.3 and 2.2.4. Another 2.2 release still runs normally, but status now calls it untested (
2.2.6 (untested; supported range >=2.2.3 <2.3.0),host.tested: false) instead of tested. - Status lists an agent without the default rules only when its own rules would run a Utilities side effect without asking. An agent whose rules already ask or deny for every one, such as an agent that ends with
* * ask, is no longer listed. - A fresh install's status reads
Next step: Nothing to do.It used to send every user to the 105 MB speech download, or to the Open-Meteo key. The Speech files row still says how to install the speech files, and missing pre-seeded files still set the next step. - Timers are per project, as the docs said. Before, each folder of a project had its own timers, so a timer set at the project root was missing in a subfolder. Timers that 0.0.1 kept per folder move into the project's store the first time a timer tool or status runs in that folder: none are lost, a duplicate is kept once, and a different timer whose name is taken is kept as
<name> (2). Default synthesis files go to a per-project folder too. - Business days skip only the holidays a whole country observes. Before,
utilities_time_business_dayswithcountry: "GB"also skipped holidays of only one nation, such as Scotland's Summer Bank Holiday, for all of the UK. A new optionalregionparameter (England, Wales, Scotland or Northern Ireland, withcountry: "GB") counts that nation's holidays too. A count lists the regional holidays it did not skip inregional_holidays_not_skipped. - Holiday lists and checks still show regional holidays, now with
nationwideandregionsfields on every holiday, not only the bracket in the name.utilities_time_holidaystakesregiontoo.
Fixed
- The scripting docs gave the wrong place for
opencode apicalls. They run in the service's default location, your home folder, not the directory you run them in, so a script's timer reads see the home folder's project.docs/scripting.mdshows how to call a project through the HTTP API with?location[directory]=, and thatopencode apiexits 1 when a call fails. - The README's Speech files section overstated pre-seeding: a file missing from
speech.assetsDiris taken from the cache when a verified copy is there. - A symbolic link above the plugin's state, cache or install folder no longer breaks it. On Fedora Atomic and Silverblue (
/homeis a link to/var/home), withstateRootorspeech.assetsDirunder macOS/tmp, or with a dotfile link to~/.localor~/.cache, every module failed, and time and weather wrongly reportedINTEGRITY_MISMATCH. The plugin now resolves its roots once at startup and refuses links only inside its own folders. Such a link is nowUNSAFE_PATH, never an integrity failure, and status reports it per module. - A daylight-saving gap or overlap, and a date outside the holiday data, no longer reach the model as a bare
BACKEND_FAILED: The program behind this tool reported an error.They are nowTIME_NONEXISTENT,TIME_AMBIGUOUS(with both UTC offsets, so the model can ask which one and retry with it),TIME_OFFSET_MISMATCH,HOLIDAY_COVERAGEandTIME_OUT_OF_RANGE, each with its own next step. - Date-times without seconds, such as
2026-03-29T02:30, work. The tools accepted them, but the time program rejected them withBACKEND_FAILED. - The weather cache works. Each call ran weather-signal with a cache folder that was deleted afterwards, so every call re-fetched the place and the forecast (two requests against the free tier's 10,000 a day) and every result said
"cache": "miss". The cache now lives in~/.cache/opencode-utilities/weather($XDG_CACHE_HOME), private to you: a forecast is reused for 30 minutes and a place search for 30 days. Entries older than 31 days are removed at startup. - A script's refusal names the action that was refused.
speech_transcribewith the speech files missing saidutilities_speech_transcribe was refused, though the refused ask was the download, and its next step pointed at the wrong rule. It now saysutilities_speech_transcribe needs utilities_speech_download, which was refused …, withAdd an allow rule for utilities_speech_download …as the next step. - An out-of-range date says which range applies, for example
date: must be from 2000 to 2030, the years the offline holiday data covers, instead ofdate: Invalid input. Time zone, date and date-time errors name their rule too.
Verify
This version was published from this tag by GitHub Actions, through npm trusted publishing, with provenance. To check the registry signature and the provenance attestation after installing it, run npm audit signatures.
Speech files
The assets below are the speech engines and models that the plugin downloads on the first transcription or synthesis, or with /utilities-speech-install. manifest/speech-assets.json pins every file by SHA-256. Each engine also has a build provenance attestation: verify one with gh attestation verify <file> --repo joe-broadhead/opencode-utilities. macOS x64 has no speech engine.