Skip to content

v0.44.0

Choose a tag to compare

@github-actions github-actions released this 20 Nov 23:02
· 225 commits to main since this release
013c20a

Pohunek 0.44 is about agents that run other agents, and about plugins. A session can now only manage the sessions it started, so one confused agent cannot stop or type into another. Your host keeps a verified copy of the official plugin index, plugin authors get a ready-made kit and CI, and the assistant and first prompts behave better.

What's new

Agents can only manage their own sessions

A pohunek command that runs inside a session can now stop, resume, remove, rename, label, resize, type into or attach to only the sessions that session started, and send input to the session that started it. An agent can no longer reach a sibling or its own manager by mistake. Your own terminal and services that run outside any session keep full rights.

A session started from inside another one is always recorded as its child, and you can move a session under another parent yourself:

pohunek session adopt <child> <new-parent>

Agent profiles can carry a [rights] table: spawn_profiles = [...] limits which profiles a session may launch, and owner_equivalent = true gives a manager profile the rights of your own shell. pohunek doctor shows the new session_rights check.

The official plugin index is stored and kept fresh

pohunek plugin index refresh fetches the signed official plugin index and keeps it on your host. pohunek plugin install <id> uses that copy while it is fresh, and refreshes it after 24 hours, when it expires, or when it does not list the package you asked for. Pohunek refuses an index older than one it has already seen, pohunek doctor reports the stored copy, and a locally installed package can no longer take the name of an official runtime.

A kit and CI for plugin authors

The new pohunek-plugin-kit checks a plugin package the way the official pipeline does: lint, a reproducible build, verify, and a smoke test that installs the package on a throwaway daemon and checks that the agent starts and its state is detected. Plugin repositories can reuse the plugin-ci.yml workflow, which runs these checks against the matching Pohunek release, the previous minor release and nightly. The kit also handles context packages, such as the assistant knowledge, and packages that only provide commands.

The assistant and first prompts behave better

pohunek assistant without --project now starts in its own private directory, so Claude Code asks about folder trust once per host instead of on every launch. When Claude shows a dialog at startup, pohunek session new --input "..." keeps the session and delivers your prompt once you answer the dialog, and pohunek session show tells you whether it is still waiting. A first prompt that starts with - or is a single word, such as logout, is now typed into the agent instead of being passed to it as a command-line argument.

Smaller fixes

pohunek attach ends cleanly when the session ends or is removed while it reconnects. Agents installed through a version manager such as mise, as on Omarchy, now launch. A dialog stays marked as blocked while the agent redraws the screen. Replies from a remote daemon over NetBird or Tailscale no longer wait on TCP delays, and NetBird 0.83 accounts that do not own the connection get a hint that names the fix.

Upgrading

On its first start, the 0.44 daemon moves its session store from schema 21 to 22 automatically. Before it migrates, it copies the original to metadata.jsonl.pre-schema-21 (metadata.jsonl.pre-schema-20 if you come from 0.43.0). A 0.43 daemon cannot read the migrated store, so keep that file until 0.44 has run well for a while.

Two files of the plugin store, registry.json and index-state.json in ~/.local/state/pohunek/plugins/, move to a new format the first time you install, update, enable, disable, select or remove a plugin, or refresh the plugin index. A 0.43 daemon cannot read them either. If you might go back to 0.43, copy both files before you upgrade.

The protocol stays at version 5, so 0.41, 0.42 and 0.43 command-line tools, SDKs and the current companion app keep working with a 0.44 daemon.

If you run manager or automation tooling inside sessions that acts on sessions it did not start, or renames, labels or stops its own session, give its agent profile [rights] owner_equivalent = true, or run those steps from your own terminal. Otherwise the daemon refuses them. After upgrading, pohunek doctor shows the session_rights check.

For Rust developers: OverlayError::StateRestricted has a new required remedy field, which matters only if you implement your own overlay provider.

Updates of the companion app and the Omarchy widget follow separately. The compatibility notes below the changelog describe a rollback.

Full changelog

Added

  • The release build ships the owner-side plugin kit bundle pohunek-plugin-kit-<version>-<target>.tar.zst (x86_64-unknown-linux-gnu and aarch64-apple-darwin, holding pohunek, pohunekd, pohunek-sessiond and pohunek-plugin-kit) as the build-kit-<target> artifacts, attested with the other producer artifacts in a release (and by the attest-kit job on the nightly tier) but never part of the release bundle. The plugin-kit-publish workflow publishes them as releases of pohunekd/pohunek-plugin-kit once the owner setup exists (until then it stays gated): core-vX.Y.Z after a release, nightly-YYYYMMDD-<sha12> prereleases with nightlies older than 30 days pruned. (#1613)
  • The reusable .github/workflows/plugin-ci.yml gives plugin repositories the required CI: one contents: read job per row and platform that lints, double-builds with a byte compare, verifies, detect-checks (when corpus-dir is set), smokes and version-bump checks the package. Rows pin the core the kit is built from: release (the kit from core-tag, smoked against that tag's attested daemon archive), previous-minor (the kit from the newest release of the previous minor) and nightly (the kit from main); the optional smoke-script runs inside the generic smoke on the same live isolated root after every generic check passed: bare pohunek reaches the isolated daemon through the isolated XDG_RUNTIME_DIR (the isolated prefix is first on the script's PATH), with POHUNEK_SMOKE_SESSION exporting the live session id (POHUNEK_SOCKET_PATH is only information for hook-style clients). (#1613)
  • The pohunek-plugin-kit binary (crates/plugin-kit) gives plugin repositories lint, build, verify, detect-check, smoke and prove over one package directory. smoke --release-dir <dir> [--upstream <path>] installs the built package on an isolated daemon through a throwaway index, waits for detection past unknown, requires a non-empty screen, then stops after the screen check, and cargo xtask plugin build shares the kit logic as a thin wrapper. The prove evidence carries kit_sha256, the digest of the binary the proof ran in. (#1613)
  • The host keeps a stored official plugin index. pohunek plugin index refresh fetches and stores it, a 24 hour cadence keeps it current, and installs by id use a fresh stored copy and refresh when it is expired, below the daemon's sequence marks, or does not list the package. The daemon verifies and applies an index through plugin.index.apply, refuses a rollback with package_index_rollback, and refuses an unreadable state file with package_index_state_unreadable. daemon.doctor reports the stored index in the plugin_index check, and official runtime ids are reserved. (#1614)
  • cargo xtask plugin features-check (run by the docs job of CI) is the feature-removal check of #1659 D4: it fails when a runtime feature required by a package is missing from the registry. It collects requires from runtime-packages/*/runtime.toml and from every runtime entry of an index document (the entry's archive is fetched from its url, verified against the entry's digest and read for its descriptor; a context entry is skipped). Without --index <file> the official index v2 is fetched, and a failed fetch prints a warn naming the URL while the check continues with the other sources, so it never fails on the network alone. (#1659)
  • cargo xtask plugin prove proves context index entries: the install reports the archive as the entry's official package, the inspect must report it enabled and selected with no runtime, and the assistant entry renders its prompt for an explicit agent name that skips auto selection. prove --no-enable stages a disabled install the inspect predicate must refuse, and prove --pre-install stages a newer installed version so the proved version stays unselected. cargo xtask index throwaway --schema-version 2 signs a schema 2 document for the context tree. (#2170)
  • scripts/red-on-old --base <rev> --scratch-root <dir> --rows R1,R2 --scenario R1=<filterset> runs each regression scenario on the old code (the changed non-test files restored to the merge base, in a scratch worktree; modules that a #[cfg(test)] mod declaration names count as test code) and on the new code, and prints the | row | scenario | old code | new code | table for the pull request body; a scenario that passes on both, a missing row and a build failure are rejected. (#2178)
  • scripts/guard-pack --base <rev> runs the pull-request gates a local gate run misses (changelog fragment, package version bump against the last release, macOS test selection for an added #[ignore, docs check), prints one line per gate and exits 1 on any failure; a gate that only CI can decide is listed as UNDECIDED in the summary line. (#2179)
  • fetch_ref_commit_mismatch now carries typed details naming expected_commit, fetched_commit and source_ref, so a client that sends fetch_ref reads the mismatch from details instead of parsing msg. (#2365)
  • package_runtime_conflict now names the holder: details.holder carries the installed package id that serves the runtime id, and is absent (with no details key at all) when a built-in runtime serves it. The CLI prints the holder in the human error. (#2384)
  • The plugin kit and the reusable plugin-ci.yml support commands-only packages (package-commands-v1, [commands] without [runtime] or [context]). pohunek-plugin-kit lint loads them through the install-time loader and reports commands as the kind, and smoke installs the archive on an isolated daemon and runs every exported command once. plugin-ci.yml runs the checks that apply to the kind and fails a caller that sets corpus-dir, upstream-install or smoke-script for a package without a runtime, with a named reason. (#2415)
  • pohunek-plugin-kit smoke takes --script-timeout <seconds> (integer 1..=900, absent keeps the 60 s default) bounding only the smoke script; a script that outlives its bound fails the smoke with an error naming the script and the bound, and the passing --json report carries the effective bound as script_timeout_s. The reusable plugin-ci.yml passes its optional smoke-script-timeout input through the same way. (#2446)
  • pohunek-plugin-kit smoke takes --detection-timeout <seconds> (integer 1..=60, absent keeps the 60 s default) bounding the wait for the detector to leave unknown. The option can only tighten the bound: a larger value, or any value for a commands-only package, is refused before the rig starts. A runtime that stays unknown past the bound fails the smoke with an error naming the bound, and the passing --json report carries the effective bound as detection_timeout_s. (#2455)

Changed

  • Breaking: overlay::OverlayError::StateRestricted has a required remedy: String field that carries the operator action. External provider implementations that construct or destructure the variant must handle the new field. (#2382)
  • The runtime packages guide now states what a local install (--sha256 or plugin link) refuses: reserved runtime ids, not a pohunek.* package id. It names the origin field of plugin list --json and plugin inspect --json (explicit_digest, link or official) as the way to tell a local package from an official one. (#1659)
  • The plugin repositories guide now says that the --signer-digest of the plugin archive attestation check is the object the qualified tag ref of the core tag source.built_with points to: for an annotated tag, the tag object, not its commit. It names the gh api lookup and records that the first official entry passed the check. (#1940)
  • cargo xtask docs check gains a numeric-facts check: the public protocol window, the worker protocol window and the store schema version that the docs state must match PROTOCOL_VERSION, MIN_PROTOCOL_VERSION, CURRENT_VERSION, PREVIOUS_VERSION and STORE_SCHEMA_VERSION, and a wrong statement fails with its page and line. docs/public-api.md now names store schema 22. (#2182)
  • Wrap the NetBird 0.83 non-owner account troubleshooting bullet in the remote-hosts guide and name OverlayError::StateRestricted in the OverlayTransport::remedy sentence of the public API reference. (#2390)

Fixed

  • pohunek attach now ends with exit 0 instead of a runtime/session_not_running error when the session ends after a reconnect probe saw it running: the refused re-attach is confirmed with one inspect, and the client prints [pohunek] session <id> <state>; attach ended. (#1184)
  • The daemon now disables Nagle (TCP_NODELAY) on each connection it accepts on an overlay (NetBird or Tailscale) address, next to the existing TCP keepalive setup. Small daemon replies no longer wait for the ACK of the previous unacknowledged segment, so they stop leaving in RTT-spaced bursts on a real link. A failure to set the option is logged as a warning (remote TCP_NODELAY setup failed, with the peer and the errno) and the connection is still served. (#1796)
  • A stop of a frozen worker whose supervisor retirement changed nothing now rolls its durable stop intent back and schedules a supervision retry, so the session keeps its previous desired state durably instead of staying marked to be stopped. (#2007)
  • project.candidates with the history source no longer collects and sorts every entry of one history directory before applying the entry bound: the listing keeps at most the remaining budget (the newest names first) and checks the deadline while listing, and a cut listing is reported as entries or time rather than silently partial. History files are now opened relative to directory fds with O_NOFOLLOW on every component below the history root (the root itself is opened by its canonical path), so an intermediate directory below the root swapped for a symlink between the walk and the read is refused. (#2168)
  • Proof daemons and the release smoke start with --local-only, so the overlay listener stays disabled (remote control listener disabled by --local-only in the daemon log) on the proof host and on the release. (#2372)
  • A restore that cannot read the host boot identity no longer judges the recorded worker stale: the session stays unverified and an outside caller is refused until the runtime is settled (reattached or lost), instead of passing the outside caller off as the owner. A record naming a worker of another boot is still judged stale, but only in memory; a second restart names the session unverified again until the runtime is settled. (#2377)
  • An account that does not own the NetBird 0.83 connection now gets a netbird_state_restricted hint that names the [netbird.static_peers.<name>] table and the host-id command, or sudo netbird profile claim. A failure of several overlays keeps that hint, and the message says whether the host is not listed or the NetBird daemon is not Connected. Holding NetBird below 0.83 is no longer suggested. (#2382)
  • A profile whose program is a version-manager shim (a symlink to the mise manager under the agent's name, as on Omarchy) is probed through the installed executable the manager names and launched through the shim link. A shim with no installed release refuses the launch with agent_runtime_unsupported and a hint to run the agent once in a login shell; the version check never installs or updates a tool. (#2383)
  • host.inspect now shares one version-manager lookup per inventory for profiles behind the same shim and preflight probes carry the owner locations in their key, so two profiles naming different installs through different location variables no longer judge one session by the other profile's release. (#2387)
  • cargo xtask plugin prove refuses a --pre-install archive whose package id differs from the proved entry's (the proof fails at install); the inspect wording now names the digest check as the refusal of an unselected version, which any other installed version of the same id leaves behind. cargo xtask plugin features-check fails (exit 1) on a file:// entry archive over the size cap instead of warning and passing, and the exit-status docs now state that unreadable or oversized local-tree files exit 2 while a malformed --index document exits 1 like fetched index content. (#2378, #2393)
  • A session.new --input timeout while the agent waits on a dialog now names the blocked state and says the session was not kept: start the session without --input, answer the agent's dialog in it (pohunek attach <session-id>) and then send the input, instead of suggesting a longer input.initial_startup_grace_ms, which only a merely slow start keeps. The error code stays session_input_not_ready and the session is still removed. (#2404)
  • A local pohunek assistant without --project or --repo now starts its session in a dedicated <data-dir>/assistant directory, created at mode 0700 together with its missing parents, so a Claude Code folder-trust answer persists per host instead of re-asking on every launch. An existing path that is not a directory the invoking user owns, or that is group- or world-writable, is refused with assistant_workdir_unusable before any daemon is started or dialed; the launcher never chmods or replaces it. Pohunek never writes ~/.claude.json. A session.new --input whose grace expires while a hook-handshake runtime (Claude) waits on a dialog now keeps the session instead of rolling it back: the daemon delivers the prompt exactly once when the agent is ready, --json carries prompt_delivered: false with initial_input: pending, and session.input before the handshake is refused with session_input_blocked (answer in pohunek attach). A deferred prompt is discarded with a recorded reason when it can never be delivered: session_stopped or session_exited on stop or exit (also when the stop or exit lands during the write itself), daemon_restart on restart (the text is never persisted at rest and is gone with the old daemon), and delivery_failed when the write itself fails on a still-running session. A replayed client_request_id of a kept create returns the session instead of session_request_in_progress. pohunek session show prints the pending or dropped state, and an empty --input keeps no deferred prompt at all. (#2406)
  • pohunek-plugin-kit lint lints context packages through the same install-time descriptor loader a runtime package lints through: a context package passes with plugin lint ok: <package_id> <version> context (--json reports "kind": "context" with no runtime_id). The kind is the [context] export the descriptor carries, never merely the absence of a runtime: a commands-only package refuses with a named reason (the kit does not support commands-only packages), and a package with neither a runtime nor a context export refuses with a named reason. The reusable .github/workflows/plugin-ci.yml reads the kind from the kit (--json, never a caller input): a context package lints, double-builds, verifies and version-bump checks, while the smoke and the detect-check are skipped and setting any runtime-only input (smoke-script, upstream-install, corpus-dir) fails the run. The reusable .github/workflows/plugin-release.yml declares environment: release on its publishing job, so the caller repository's environment protection applies to every plugin release. (#2412)
  • A first prompt of session.new that starts with - is typed into the agent after readiness instead of being appended to the launch arguments of a prompt_arg runtime, where the agent could read it as an option. (#2426)
  • cargo xtask claude canary capture takes --first-screen-timeout-secs, the bound of the wait for the first screen of a session (the step timeout when absent). The flag bounds only that setup wait, so a loaded runner no longer stops the run at an earlier screen than the step the scenario names. The record and the first notification waits keep --step-timeout-secs. (#2431)
  • A first prompt of session.new that is a single bare word is typed into the agent after readiness instead of being appended to the launch arguments of a prompt_arg runtime, where the agent CLI could dispatch it as a subcommand (for example codex logout). A bare word is non-empty and holds only ASCII letters, digits, -, _, . and :; any other prompt keeps its delivery. (#2433)
  • pohunek attach now ends at once with exit 0 when the session is removed while the attach waits to reconnect: as soon as the reconnect probe sees the session gone, the client prints [pohunek] session <id> removed; attach ended instead of retrying until attach reconnect window expired. A daemon that is unreachable, that is shutting down (daemon_shutting_down), or a session that is starting, is still retried until the window ends, so an attach keeps waiting across a daemon restart. (#2440)
  • A blocking dialog a screen rule marks visible_blocker stays blocked while the agent keeps writing output that changes no screen text (cursor moves, cursor show/hide, a redraw of the same frame); it no longer reads working over the dialog for programs that report no program-status record, such as Mistral Vibe. A visible_blocker title or progress rule that outranks the dialog (Codex "Action Required") holds blocked the same way while the screen still shows the dialog, with source osc_title or osc_progress. (#2447)
  • A session.new refused for its initial input (session_input_not_ready) no longer leaves the session listed when its worker stops answering during the rollback: the daemon ends the worker through its supervisor, as session.stop does. (#2453)

Security

  • A session.new from inside a session's process tree now records that session as the parent whatever origin markers the request carries, and markers that name another session are refused with session_right_denied (reason=origin_mismatch). pohunek session adopt <child> <new-parent> (session.adopt, advertised as session_adopt_supported) is the owner's way to move a session under another parent; a session gets owner_only, and a loop or a session inside a running session rm --with-children is session_adopt_refused. A host profile may carry a [rights] table: spawn_profiles = [...] limits the profiles a session launches (spawn_profile_not_allowed), and owner_equivalent = true gives a manager profile the rights of the owner's shell. The package methods that write profile files are owner only (owner_only), a session keeps at most the rights its profile had at launch, also across a daemon restart (the session record stores them from store schema 22), plugin profile create --replace keeps the [rights] table it replaces, and an owner-equivalent profile still honours its spawn_profiles. Manager tooling that mutates sessions it did not spawn from inside a session needs a profile with owner_equivalent = true. (#2002)
  • The daemon now places each local caller by its kernel-attested process: a pohunek command run inside a session's process tree can stop, resume, remove, rename, label, resize, type into or attach to only that session's descendants, plus session.input to its own parent while the parent is not waiting on a dialog. Anything else is refused with session_right_denied (reason=not_descendant, parent_blocked or unknown_caller) and an audit refusal line, so a worker can no longer reach a sibling or its manager's lifecycle through the owner socket. The owner's own terminal, services outside every session tree and shell sessions keep owner rights. A process below a session's worker is attributed to that session from the moment the worker starts, on a first launch and on a resume alike, and the daemon records the worker's identity (bound to the boot) so a restart attributes it again even while the worker is unreachable, and a worker it refuses to adopt is attributed from the identity it reported. A live session whose worker the daemon has no record of and cannot place by control group makes pohunek doctor fail the session_rights check and refuses callers no root attributes as unattributed_caller, whose hint names restarting the daemon job as the local way out. This is a guardrail, not a wall: a process of the same user that leaves the session tree (a double fork, or systemd-run --user --scope on Linux) keeps owner rights, and pohunek doctor reports the session_rights check that says so. Tooling that mutates sessions it did not spawn from inside a session, such as a manager sending input to another manager's worker, needs a profile with [rights] owner_equivalent = true, or must run from the owner's terminal or a service outside the session tree. (#2005)
  • A session.retention.sweep from inside a session now sweeps only that session's own subtree: a record outside it survives even when the policy selects it, and a session_ids entry outside it is not examined and not reported, like an unknown id. Connections the daemon cannot place are refused the sweep outright, including dry_run. plugin profile fold treats [rights] like any other launch key: inputs whose tables differ no longer fold into one parent (a preset takes its parent's rights), and an equal table is carried to the proposed parent. (#2376)

Compatibility notes

Constants that differ from v0.43.1 (computed with the resolver of scripts/release).
Unchanged: PROTOCOL_VERSION 5, MIN_PROTOCOL_VERSION 5 (protocol window 5..=5; every 0.41, 0.42 and 0.43 CLI, Rust client and TypeScript SDK keeps working against a 0.44.0 daemon; result changes are additive fields only), worker protocol CURRENT_VERSION 8 and PREVIOUS_VERSION 7, WORKER_JOURNAL_SCHEMA_VERSION 4, EXPECTED_INTEGRATION_VERSION 17, service.toml schema 6, runtime packages unchanged (claude 2.2.0, codex 1.9.0, hermes 1.3.0, pi 1.4.0).

STORE_SCHEMA_VERSION 21 -> 22: on first start the daemon migrates metadata.jsonl (21 -> 22 lets a session record carry launch_rights, the [rights] its profile held at launch; existing records gain nothing and their sessions read the profile file at first use) and keeps the backup metadata.jsonl.pre-schema-21 beside it (metadata.jsonl.pre-schema-20 from 0.43.0, -19 from 0.42.x, -17 from 0.41.x). A 0.43.x or older daemon refuses the migrated store with StoreSchemaError and leaves it untouched. Roll back by stopping the daemon, restoring the backup over metadata.jsonl and starting the older binary; sessions created after the upgrade are lost.

Package store files (not a scripts/release constant, same one-way rule): registry.json schema 1 -> 2 (records the provenance of each package) and index-state.json schema 1 -> 2, both in <state dir>/plugins/ (default ~/.local/state/pohunek/plugins/). 0.44.0 reads schema 1 and rewrites the file as schema 2 on its first change: any package install, update, enable, disable, select or removal for registry.json, any applied plugin index (plugin index refresh, an install by id) for index-state.json. No backup of either file is kept after a finished upgrade. A 0.43.x daemon refuses a schema 2 file (registry_failed on package operations). A rollback after such a change also needs copies of both files taken before the upgrade; without them, stay on 0.44.0.

New host capabilities session_adopt_supported (method session.adopt, CLI pohunek session adopt <child> <new-parent>) and package_index_apply_supported (method plugin.index.apply, CLI pohunek plugin index refresh); a client checks the flag before sending the method, older daemons answer method_not_found. New error codes: session_right_denied (reasons not_descendant, parent_blocked, unknown_caller, origin_mismatch), unattributed_caller, session_adopt_refused, spawn_profile_not_allowed, owner_only, session_input_blocked, assistant_workdir_unusable, package_index_invalid, package_index_expired, package_index_rollback, package_index_channel_missing, package_index_state_unreadable, package_runtime_not_claimable; typed details on fetch_ref_commit_mismatch and package_runtime_conflict. session.new results and SessionInfo gain the optional initial_input state. TypeScript SDK adds PluginIndexApplyParams, PluginIndexApplyResult, SessionAdoptParams, SessionAdoptResult, SessionInitialInput, SessionInitialInputDrop, SessionInitialInputState and the two methods; no export removed.

Behaviour change for callers inside a session's process tree (not a protocol change): such a caller may stop, resume, remove, rename, label, resize, type into or attach to only its own session's descendants, plus session.input to its parent while the parent is not blocked on a dialog; anything else is session_right_denied, and a mutation of the caller's own session (stop, rename, label, input) is plugin_self_target_denied whatever origin markers it sends. Tooling that mutates its own session or sessions it did not spawn from inside a session (manager sessions) needs a host profile with [rights] owner_equivalent = true, or must run from the owner's terminal or a service outside every session tree. After the upgrade, check pohunek doctor (session_rights); a live session the daemon cannot place makes it fail, and callers no session root attributes are refused as unattributed_caller until the daemon job is restarted.

Breaking Rust API: overlay::OverlayError::StateRestricted has a required remedy: String field; external overlay provider implementations that construct or destructure it must add it.

Assistant package pohunek.context.assistant 0.44.0 sha256: eb40e8e3df2c221734cf944a23f4ba664774104693be9fc134dd886ef58b03ca