TWO BUGS, one in each half.
the watcher demanded OFFICER_AUTH_TOKEN and nothing supplied it. the commander's
credential is written to `officer.env` beside the script, under OFFICER_API_KEY —
a sibling file this never sourced. so a commander created from this template would
have died on its first tick with "OFFICER_AUTH_TOKEN is not set", and I had missed
it by appending the values by hand while testing, which is exactly how a thing
looks like it works.
two files rather than one because they have different lifetimes: officer.env is the
platform's and can be re-minted, config.env is the owner's answers and must survive
that. the name is bridged in the script rather than renamed at either end — a
commander sources the platform's file and a task reads the platform's env, and
neither is this plugin's to rename.
AND libheif-plugin-libde265 IS NOW DECLARED, which cost an hour to find. libheif
packages its CODECS SEPARATELY: `libheif1` alone parses a HEIC container and
reports 4032x3024, then fails on the pixels with "Unsupported codec". ubuntu ships
the AV1 plugin in the common install and not the HEVC one — which is what every
iPhone actually writes.
observed today: identical libheif 1.17.6 on two hosts, HEIC decoding on fofos and
not on officer-dev, the only difference being that package. a plugin that silently
half-works on some machines is worse than one that refuses to install.
no dnf entry for imagemagick. fedora's package is literally `ImageMagick` with
capitals and the manifest validator refuses uppercase — correctly, since these
strings reach a root command line as a closed vocabulary. naming `imagemagick`
there would name a package that does not exist. left for the conversation the
manifest documentation says a case like this wants.
the validator caught that on the way through, and discovery refused the plugin
until it was fixed. verified after: no problems, no broken plugins, 3 osDeps read
back.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
watches a folder and converts what lands in it, so a photo uploaded from a phone is
immediately something a browser can show and a thumbnail can be made from.
configurable, which is the point: watch_dir, extensions, output_format, lossless,
delete_source. only watch_dir has no default, so it is the only thing that blocks
arming.
IT CALLS av-club RATHER THAN ffmpeg OR sharp. everything that makes a conversion
safe lives behind that API, and a watcher shelling out itself would have none of it.
it also breaks the usual commander shape deliberately, and says so. the standard is
"wait, then spawn a headless agent to exercise judgement" — but there is no
judgement in "a HEIC arrived and needs converting", and an agent per photograph
costs real money to reach the same answer every time. so the loop calls the API
directly and only involves an agent when something goes wrong.
three things in the watcher that are not obvious and each cost somebody an
afternoon somewhere:
close_write and moved_to, never create — `create` fires when a file is opened for
writing, before it has any bytes
two identical size readings before touching a file — a file still being copied in
converts to a truncated result and gets marked done
a failure is recorded as SEEN — the same file fails identically every tick, and a
watcher retrying forever is the failure mode that costs money. it is in the log
and the owner can clear the line.
the brief tells it to offer the Convert Image task for the BACKLOG before arming
anything. a watcher only sees what arrives, and one armed over a quiet folder looks
broken while working perfectly.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>