Repository navigation
v0.13.0
Hook authoring without Zod, and every failure in your code reported
0.13.0 moves the SDK's Zod schemas to @hooknostic/sdk/schemas, so hooks and configuration no longer import Zod. Most of the rest is about what happens when code fails, yours or Hooknostic's. The command shims, hooknostic dispatch and every other command now run your config and hook source under a guard. A rejection, a timer that throws or a process.exit is reported, rather than ending the process with its own exit code or a stack trace, and a leaked handle no longer hangs a command. Every shim reports the errors it absorbs, in one format, and fails open. A new warning, HN110, names a CLI and an SDK from different releases. On OpenCode v2, subagents now report agent.start and agent.stop, and a plugin reload no longer reports a start or stop twice.
Several of these changes affect exit codes and output that scripts read. The breaking changes come first, each with its upgrade step.
Upgrading from 0.12.x
-
Upgrade the SDK and CLI together. An older CLI's shims import the schemas from the SDK root and cannot bundle against this SDK. Keep
@hooknostic/sdk,@hooknostic/agent-pluginand thehooknosticCLI on the same release. From 0.13.0, the CLI warns HN110 when it and the project's SDK differ. To upgrade, add@hooknostic/agent-plugin@0.13.0if you depend on it:npm install --save-dev @hooknostic/sdk@0.13.0 hooknostic@0.13.0
With pnpm, run
pnpm add -D @hooknostic/sdk@0.13.0 hooknostic@0.13.0, adding--allow-build=esbuildif the project has not allowed esbuild's install script yet. Without it, pnpm 12 exits 1 withERR_PNPM_IGNORED_BUILDS, though the packages are installed. If your project imports the SDK or@hooknostic/agent-pluginat runtime, use--save(pnpm: without-D) for those instead, so they stay regular dependencies. Both package managers save a^0.13.0range; if your project pins exact versions, add--save-exact. The same commands with@latestare in upgrading. Expect the re-sync to rewrite most of each generated runtime, even with Zod and esbuild unchanged, because this release bundles the same code in a different layout. Commit the regenerated output with the version bump. -
The SDK's schemas move to
@hooknostic/sdk/schemas. Every*Schemaexport moves from@hooknostic/sdkto the subpath, includingruntimeDiagnosticCodeSchema,handlerErrorSchemaandhookResultSchema. Nothing else moves:definePlugin,hook,defineConfig, the effect helpers,RUNTIME_DIAGNOSTIC_CODESand every type stay at the root. The root never loads Zod, at runtime or in its type declarations: only@hooknostic/sdk/schemasneeds it. The SDK'szod@^4.6.7peer stays required, as in 0.12.0. Making it optional sent npm into an endless loop when a project downgraded Zod (#240, #242).Until you change the imports,
checkandbuildfail with HN501 and esbuild'sNo matching export in "node_modules/@hooknostic/sdk/dist/index.js" for import "targetConfigSchema", naming the schema. The remediation printed with it does not mention the subpath. To upgrade, change the imports:import { effectSchema, toolInvocationSchema } from "@hooknostic/sdk/schemas";
The SDK's
zodpeer stays required: npm and pnpm install Zod beside the SDK, shared with the CLI's copy, so hooks and configuration need nozodof your own. Code that imports the subpath should listzod@^4.6.7in its own dependencies, because it imports Zod. Under Yarn Plug'n'Play that import fails until it does (yarn add -D zod@^4.6.7).Keep a
zoddependency at^4.6.7or a newer 4.x floor. Withhooknosticand@hooknostic/sdkinstalled, npm refuses an older Zod withERESOLVE; don't retry with--force, which can leave npm unable to finish. If your own code needs Zod 3, install it under an alias such aszod3@npm:zod@3. Under pnpm and Yarn the install warns, and the build warns HN109. See importing SDK schemas. -
Under Yarn Plug'n'Play, run Hooknostic through Yarn.
npx, a global install andpnpm dlxrun without the project's PnP runtime, and the build now fails with HN504.yarn dlxis not supported either. It fails with HN504 when the build needs the CLI's own Zod, because its install is not in the project's PnP manifest. On Linux with Node 22,yarn dlxthat shares Yarn's global cache with the project fails with HN501 ("controlled by multiple pnpapi instances") whatever the Zod. A plain-nodebuild that used to succeed, with misattributed licence notices and two SDK copies in the artifact, now fails too. This is intended. To upgrade, addhooknosticas a devDependency and runyarn hooknostic. npm, pnpm and Yarnnode_modulesprojects are unaffected. -
Rebuild packages or re-sync projects. Artifact bytes change even when your sources don't, so a project integration created by 0.12.x reports its hook files as modified until
syncruns again. That is expected. Sync, then verify. -
A hook source's exit no longer decides a shim's exit code. In the Claude Code, Codex and Copilot shims, a rejection nothing handles, a timer that throws or a call to
process.exitis reported as onehooknostic internalline. The hook then exits 0, or with the code its hooks decided. So aprocess.exit(2)no longer blocks a Claude Code event or denies a CopilotpreToolUse. Inside a handler, it is that handler's error,the hook source called process.exit(2). To upgrade, returnblock(...)to block, or setruntime.onHookError: "block"so that a failing handler blocks where the event can. -
Commands exit 2 when your config or hook source fails.
check,build,sync,verify,recover,doctorandinspect --configload them under a guard. A load that fails is HN501, and the command exits 2.sync,verify,recoveranddoctorprint a config that fails to load as its message alone, without the code, and their--jsonlists it undererrors(configurationErrorsfordoctor) rather than as a diagnostic, as in 0.12. That covers a top-level throw, aprocess.exit, a rejection, a timer that throws, a top-levelawaitor thenable default export that never settles, and a default export that throws when read, from a getter or a proxy. The message names the cause, as infailed to load config <path>: the config called process.exit(3). Before, these exited with your code's own exit code or Node's 1 or 13, exited 0 without a word, or hung on a leaked handle.- A failure after the load is a
hooknostic internalline, and the command still exits 2. That takes precedence oververify's drift exit 1. It does not hold back output:buildorsyncmay already have written its changes. - A timer or socket your code leaves open no longer keeps a command running once it has reported, and a load that fails no longer leaves a
hooknostic-eval-*directory in the temporary directory. - To upgrade, expect exit 2 where a script used to see your code's own exit code, a crash or a hang, and fix the failure the message names. See design §10.3.
- A failure after the load is a
-
hooknostic dispatchruns under the shims' guard, with new exit codes.- Exit 1 is new. The hook source failed outside a handler, with a rejection nothing handles or a timer that throws (at load or later) or a
process.exitafter it loaded, or it ended the process before every result was written. Each failure is reported on stderr against the event it interrupted, as inhooknostic internal [event 2]: stray rejection, and usually every result line is still written. - A load that fails exits 2 with no results. The config fails as it does under
check, with HN501, including when it rejects or throws from a timer while it loads. A load that never settles is a load failure, with a message that names what it waits on. - Before, the hook source's own exit code, Node's 1 or 13 ended the run, usually with no result lines.
- A
process.exitinside a handler is that handler's error. The run exits 0 on a command target, as the shim does, or 1 on a module target (OpenCode, Pi), with a note that the shim in the harness does not intercept it. - Exit 2 takes precedence over 1. The staged hook bundle's temporary directory is removed even when the run ends early.
To upgrade, note that a caller that treats any non-zero exit as failure now fails on a stray rejection or timer throw in the hook source. Fix it, or pass
--unguardedto keep the previous path, with the hook source's own exit code and Node's stack trace; other commands reject the flag. See when the hook source fails outside a handler and exit codes. - Exit 1 is new. The hook source failed outside a handler, with a rejection nothing handles or a timer that throws (at load or later) or a
-
Some error and JSON output changes. A usage or configuration mistake prints a plain message, followed by the usage for a usage error. Before, it printed
hooknostic: unexpected error:and a stack. Exit codes are unchanged. Under--json, the CLI's own usage checks keep their single JSON line:initwithout--local,--dry-runoutsidesync,--unguardedoutsidedispatch, and an invalid--delivery. An unknown option or command,inspectwithout a target,dispatchwithout exactly one--targetand an empty--targetstill print plain text on stderr, with nothing on stdout. These reports change:inspect --configwith a config that fails to load:errorsholds one"HN501: <message>"entry per diagnostic. A newdiagnosticsarray holds the same diagnostic objects ascheck --json. The report is pretty-printed, like inspect's other failures.inspect <target> --configwith a target the config does not declare:errorsreadstarget "<name>" is not configured; configured targets: ..., and the report is pretty-printed.init --local --jsonwith a path it cannot create: the report gainscreated, the files written before the failure. Its message readsinit failed: cannot create <path>: ....dispatch --eventswith a file it cannot read: it printscannot read --events "<path>": ...on stderr, even under a stray--json, and no longer prints a JSON line on stdout.init --local, in every case: the text lists the files it created and the existing files it left unchanged, with absolute paths, and saysCreated no files.when it created nothing. It writes "1 file", not "1 files". Under--json, success gains"ok": trueand anunchangedarray, and failure gainsunchangedtoo; no existing field changes.init --localwhen the configuration path orhooks.tsis a directory, or when--confignameshooks.ts: it now exits 2 and writes nothing. That includes--config .and--config "". Before, it exited 0 after writing what it could:hooks.tsbeside the directory, the configuration intohooks.ts, or the configuration alone.
To upgrade, update any parser of these reports and of
init's output, and give--configthe configuration file's path, not a directory orhooks.ts. Successfulinspect --jsonoutput is unchanged. -
Expect new stderr lines. Lines starting
hooknostic internalmay appear where earlier releases were silent, or where a hook used to end non-zero. Each one names an error that was previously swallowed or fatal. The line can come from your own config or hook source: a module that fails to load, or a rejection, a timer throw or aprocess.exitoutside a handler. Its message, and its stack underHOOKNOSTIC_DEBUG, then point into your code. Otherwise it reports a Hooknostic defect worth filing. See writing hooks safely. -
__proto__names are no longer dropped silently. Zod 4 skipped a record entry named__proto__, so such a name vanished without a diagnostic. A lone__proto__target, for example, failed asconfiguration declares no targets.__proto__now fails with HN501 as a target name, and as a name incomponents.excludeFor,components.mcpOverridesand a materializer'sinputs.- An MCP server may be named
__proto__.components.mcpOverrides.<target>.serversnow keeps and validates an own__proto__entry, ascomponents.mcpEnvironmentalready did, and the override reaches every adapter's project output. - An object literal entry written as
__proto__: {...}sets the record's prototype instead of adding an entry. It now fails with HN501 in all of these records,components.mcpEnvironmentincluded. 0.12.0 dropped it silently, unless its value was an array. - Inside
components.mcpEnvironment, a bad entry no longer hides a bad__proto__entry or a configuration-level issue, and per-call parse options (error,reportInput) now reach its issues.
To upgrade, rename a target or key that was
__proto__. To name an MCP server__proto__, write the key as a computed["__proto__"]key. If your code inspects or encodeshooknosticConfigSchemarather than only parsing with it, five of its fields changed shape: see importing SDK schemas and configuration. -
On OpenCode v2, a subagent's own
turn.stopcarries its agent ids. A child'sturn.stopnow hascorrelation.agentId(the child) andcorrelation.parentAgentId(the parent), as on Copilot; a top-levelturn.stophas neither. Everyturn.stophook sees them, declared or not; such a hook has always also run for each child. To upgrade, a hook meant for top-level stops only can skip a stop that hascorrelation.agentId; a child the plugin does not recognize, such as one whose lookup failed, still has neither. -
runClino longer takes over its caller's process. This affects only programs that call the exportedrunCli(argv, options). It never replacesprocess.exit, adds process listeners, claims stdout or forces an exit, with or without anio. A config or hook source it evaluates behaves like any module your program imports. Itsprocess.exitends your process, and a handle it leaks keeps your process alive.- Since 0.2.0,
runCli(["dispatch", ...])without anioclaimed stdout, setprocess.exitCode, and armed a forced exit after its results. It now does none of these. Without anio, whatever the hook source writes to stdout, such as its ownconsole.log, now shares stdout with the result lines. Before, it was moved to stderr. - To upgrade, pass an
ioto keep result lines apart from hook output. If you relied on the guard, the stdout claim or the forced exit, run thehooknosticbinary as a child process instead.
- Since 0.2.0,
What is new
- HN110: the CLI and the SDK are on different releases.
check,build,syncandverifycompare the CLI's version with that of the@hooknostic/sdkthe build resolves. When they differ, they warn once per run, even beside a configuration that fails to load.doctorwith a project configuration warns too, andrecoverwarns beside a load failure.- Any difference counts, prereleases included. Build metadata is ignored.
- Under
yarn dlxin a Plug'n'Play project, HN110 stays silent: looking up the project's SDK there would load the project's PnP runtime beside dlx's and break the build (#216). Runyarn hooknosticto get the check. - The message names the SDK's path, relative to the configuration's directory when the SDK is inside it. HN110 never changes an exit code.
- The remedy is to install
hooknosticat the SDK's version and run that CLI:npx hooknosticfrom the project, oryarn hooknosticunder Plug'n'Play.
- Generated runtimes bring their own Zod when yours cannot serve. Every runtime still validates effects with Zod. A build uses your project's Zod for the SDK's schemas when it is in the SDK's peer range, sharing one copy with your code. Because the SDK's
zodpeer is required, npm and pnpm give the SDK a Zod in range, shared with the CLI's copy, so this is the usual case. Where the SDK reaches no Zod at all, the build uses the CLI's own copy without a word. With a Zod outside the range, it uses the CLI's copy and warns HN109, naming the Zod it found. That includes Zod 3.24 and older, which have nozod/v4. The check reads one manifest instead of resolving the import, so it adds no nested resolve to a bundle. - OpenCode v2 reports finished subagents as
agent.stop, and their start asagent.start. Both are reported under the parent'ssession.id, with the child asagent.idandcorrelation.agentId, the parent ascorrelation.parentAgentId, and the child's agent type. Both are observe-only, on 2.0.17 and later.agent.startcomes just before the child's ownsession.start, after itsprompt.before, and is not ordered with the parent'stool.after. To stop a subagent from starting, blocktool.beforeforkind: "agent".agent.stopfollows the child's ownturn.stopwhen the child succeeds or fails, and reports again for each follow-up to it. When a hook declares it,lastMessageholds the child's last text: on 2.3.0, the way to get a background child's result.
- OpenCode v2 recognizes a child it never saw created. After a server restart, or for a child created through the API before the plugin set up (2.2.6 and later), the prompt hook looks up the child's parent with
session.get. The child then reportsagent.stopand its agent ids, but noagent.start, and takes no stop prevention or notices. Any session the plugin never saw created is looked up, top-level ones included, and only that session's completion waits for the lookup, for at most 2 seconds. A lookup that fails leaves the session as before. See OpenCode families.
What is fixed
Shims fail open, and say so
-
OpenCode v2 reports handler errors. A handler that throws or overruns its budget still fails open. The v2 shim now writes the same
hooknostic <code> [<hookId>]: <message>line as the other shims, where before it wrote nothing. See the capture. -
The OpenCode v2 shim fails open on its own errors. OpenCode 2.x fails closed whenever a plugin callback throws. A shim defect therefore denied tool calls and permissions, replaced tool results, failed prompt, context, generate and compaction requests, and showed the model the internal message as a block reason. Every host callback the v2 shim registers is now guarded.
- Deliberate blocks still propagate.
- A deny that cannot be written falls back to the host's own evaluation.
- One unreadable event no longer ends the event subscription.
See the capture.
-
One internal-error report in every shim. When an OpenCode v1, OpenCode v2, Pi, Claude Code, Codex or Copilot shim absorbs an error of its own, it writes
hooknostic internal [<native hook>]: <message>and fails open. The stack follows only underHOOKNOSTIC_DEBUG. OpenCode v1 and Pi previously swallowed these errors silently. The command shims printedhooknostic: <message>with no newline. -
Command shims fail open when the hook source fails outside a handler. An async
main()that rejected, a timer that threw, or a hook source that calledprocess.exitused to end Claude Code, Codex and Copilot hook processes with a non-zero exit, usually with no reply. On CopilotpreToolUse, that exit is a denial. Now each is reported once, and the hooks still decide. A decision the shim has made keeps its exit code, so a stray failure can neither add nor remove a Claude Code block. -
Hostile thrown values no longer fail closed. The shims, and the Pi MCP extension's server registration, told errors apart with checks that themselves throw on a revoked proxy. A plugin that threw one made a command shim exit 1, which is a denial on Copilot
preToolUse. In the Pi extension, the throw stopped the remaining MCP servers from registering. The checks and message rendering are now proxy-safe. -
Pi and OpenCode v1 guard host reads. Pi's per-event setup and OpenCode v1's plugin-input reads now sit inside the fail-open boundary.
OpenCode v2 plugin reloads
- A plugin reload no longer reports a start or stop twice. A reload while an execution runs leaves two plugin instances receiving every event: until that execution ends on 2.2.6 and 2.3.0, and for good on 2.0.17. A session started in that window reported
session.startandturn.stoptwice, and a stop could be prevented twice. Now each start and stop event is reported once on 2.0.17, 2.2.6 and 2.3.0, and each compaction event by the same rule (unit-tested only), by the newest instance that knows the session, with the hooks as last loaded. - Stops lost across a reload are recovered. When OpenCode disposes the old instance, it now hands its sessions and running executions to the new one. On 2.3.0 that recovers a subagent still running across the reload (its
turn.stop, with its last message and agent ids, itsagent.stop, and the parent's nextturn.stop); on 2.2.6, the parent'sturn.stop. A recovered parent stop can take stop prevention.
The CLI
- A config that throws while it is validated is HN501. A getter or proxy trap that throws while the configuration is read now gives
failed to load config <path>: reading its default export threw: ...in every command. Before, commands printed an unexpected error with a stack, printed a bare message, or crashed while rendering the thrown value. - Values that cannot be rendered keep their diagnostic. A materializer provider that throws a null-prototype object or a revoked proxy is now its own HN501, not HN301.
dispatchreports a hook entry that throws one as a load failure. An in-processrunClicall no longer rejects on such a value. - An undeclared
--targetis named without anentry.buildandcheckwith--target <name>on a package-only or components-only configuration exited 2 with no diagnostic. They now report HN501target "<name>" is not declared in the configuration.A target named twice is analysed once, so a successful build no longer writes duplicate diagnostics intohooknostic-build.json. init --localno longer writes outside the project.--config .and--config ""wrotehooks.tsinto the parent directory. They now name a directory, soinitexits 2 and writes nothing.
Names that match Object.prototype members
- Adapter and target names are looked up by own key. A name such as
toString,constructoror__proto__now fails as unknown indispatch,doctorandinspect --config, where it crashed or gave the wrong message. A target with such a name appears in the build report even when it fails early, and no longer receives another target's exclusion patterns or MCP override. - MCP server names are looked up by own key. An
mcpOverrides.<target>.serversentry named after anObject.prototypemember, with no such server, now fails as an unknown server. Such a server no longer breaks Codex's TOML generation, a server named__proto__no longer gets a non-numeric OpenCodetimeout, and on both a target-wide startup timeout now reaches it. On Claude Code and Pi, which cannot represent startup timeouts, a target-wide timeout whose only server is__proto__now reports HN205.
Documentation
- Getting started gives the project its own
package.jsonbefore the install, allows esbuild's install script and runs the CLI withpnpm execunder pnpm 12, shows the build report beside the configuration, and says whendoctorexits 2 (#241, #243). - The upgrading guide gives the one command that upgrades the SDK and the CLI together (#243).
- The shell-name lists drop
exec_command, which never reaches a hook. - The
tool.shellandtool.filedocs, including the SDK's TSDoc, say that a view is also absent when the input does not match the captured shape.
Dependencies
@hooknostic/agent-pluginnow requires minimatch^11.0.8.- Workspace tooling moves to pnpm 12.21, ESLint 10.15 and Prettier 3.10.1. No published API changes with them.
Limits
- HN109 is a warning, not a fix. When your Zod is out of range, the SDK's schemas use the CLI's copy, but your own code that imports Zod still bundles yours, so the artifact carries two. Install a Zod in range to share one.
- Yarn Plug'n'Play needs Yarn's runtime.
npx, global installs,pnpm dlxandyarn dlxare unsupported (#190). With the project's Zod in range,yarn dlxbuilds on Windows (Node 22 and 24) and on Linux with Node 24; otherwise it fails with HN504. - HN110 compares release numbers, not contents. A CLI before 0.13.0 never warns.
dispatchdoes not check.doctordoes not report HN110 for a package-only or hooks-only configuration, or for one that fails to load.syncandverifydon't check a configuration with no project-delivery targets or noproject.root. - On OpenCode v2, reports are visible only with
--print-logs.opencode run --standalone --print-logsis the only path measured to show plugin output. The TUI and the background service are unmeasured. - On OpenCode 2.3, a
tool.afterhook on a subagent call sees the launch notice. From 2.3.0 OpenCode always runs subagents in the background, so the hook sees "The subagent is working in the background...", not the child's result, which reaches the parent later as a separate message. Read the result fromagent.stop'slastMessage. One prompt can then end in several top-level stops: if the parent finishes first, the child's result starts another parent execution, whoseturn.stophas nocorrelation.turnId, and stop prevention does not wait for a running child. 2.3.0 is validated, by scheduled playback and by captures (#219). - OpenCode v2 plugin reloads have limits. De-duplication holds within one server process and one Hooknostic release, so a reload that also upgrades from an older release can still report twice.
- A second reload while the newer instance still has a hook running, or an event queued or pending, can drop that event (accepted and documented, #238).
- On 2.3.0, recovering a running subagent relies on OpenCode disposing the old instance before the child's completion arrives, as in every capture. If the order flips, the completion can be missed, never reported twice.
- After a reload that adds the first subscribing hook, a prompt steered into an execution the old instance runs can have its turn id reported on a later execution it did not start: a wrong turn id, as before.
- A reload that removes every subscribing hook leaves the old instance reporting with the old hooks while it lives.
- The guards cover accidental failures in the
hooknosticcommand and the shims. Your code runs as trusted code, and Hooknostic is not a sandbox: rearranging Node's process listeners can defeat a guard, andprocess.kill(process.pid),process.abort()andprocess.reallyExitstill end the process. A load that never settles while a leaked handle keeps the loop alive still hangs. Attribution to a load or adispatchevent is best effort, and adispatchrun that ends early loses some or all of its result lines.runCli,dispatchEvents(),buildProject()and the other programmatic APIs install no guard. See design §10.3. onHookError: "block"does not cover internal errors. Hooknostic's own failures always fail open.- Harness support ranges are unchanged; newer builds are validated. Every recommended range, validated range and reference build is as in 0.12.0. Scheduled playback now validates Claude Code 2.1.325, Codex 0.169.0, Copilot 1.0.112, pi 1.5.2 and OpenCode v2 2.3.0, up from 2.1.319, 0.167.0, 1.0.107, 1.5.0 and 2.2.6; OpenCode v1 keeps 1.19.5. OpenCode v2 gains new
validatedOnrecords: captures on 2.0.17 and 2.3.0, and live probes on 2.0.17, 2.2.6, 2.2.7 and 2.3.0.
Start with the README.
Harness support
| Harness | Recommended target range | Validated ranges | Reference build |
|---|---|---|---|
| Claude Code | >=2.1 <3 |
>=2.0 <3 |
2.1.238 |
| Codex CLI | >=0.148 <1 |
>=0.140 <1 |
0.148.0 |
| GitHub Copilot CLI | >=1.0.101 <2 |
>=1.0.101 <2 |
1.0.101 |
| OpenCode | >=1.18 <2 |
>=1.10 <2 |
1.18.18 |
| OpenCode v2 | >=2.0.17 <3 |
>=2.0.17 <3 |
2.0.17 |
| pi | >=1 <2 |
>=0.84 <1, >=1 <2 |
1.3.0 |
What's Changed
Other changes
- docs: scope Zod peer advice and correct shell-view wording by @roryeckel in #177
- fix(opencode): report handler errors from the v2 shim by @roryeckel in #178
- fix(opencode): fail open on v2 shim internal errors by @roryeckel in #184
- fix: report internal errors from every shim in one format by @roryeckel in #185
- fix(pi): survive a hostile value thrown by registerMcpServer by @roryeckel in #191
- fix: fail open when a hook source rejects or calls process.exit by @roryeckel in #192
- feat(sdk)!: move Zod schemas to @hooknostic/sdk/schemas by @roryeckel in #188
- feat(core): warn HN110 when the CLI and project SDK releases differ by @roryeckel in #196
- fix(cli): run hooknostic dispatch under the command-shim guard by @roryeckel in #197
- fix(core,cli): look adapters and targets up by own key only by @roryeckel in #202
- fix(sdk): reject proto as a config record key by @roryeckel in #203
- test(cli): accept any closed-reader write error, not only EPIPE by @roryeckel in #205
- fix(core): look MCP servers and targets up by own key only by @roryeckel in #209
- fix(core): report an undeclared --target when the config has no entry by @roryeckel in #210
- fix(cli): run every command's evaluation under the command-shim guard by @roryeckel in #211
- fix(cli): report usage and config errors as the user's mistakes by @roryeckel in #212
- fix(core): report a config that throws while validated as HN501 by @roryeckel in #213
- feat(sdk): accept proto as an MCP server name in mcpOverrides by @roryeckel in #214
- fix(cli): fail dispatch with 2 for a load that never settles by @roryeckel in #215
- harness-watch: claude 2.1.325 playback validation by @roryeckel in #220
- harness-watch: codex 0.169.0 playback validation by @roryeckel in #221
- harness-watch: copilot 1.0.112 playback validation by @roryeckel in #223
- harness-watch: pi 1.5.2 playback validation by @roryeckel in #222
- fix(cli): report files init leaves unchanged and refuse directories by @roryeckel in #228
- fix(core): skip HN110's SDK lookup under another install's PnP runtime by @roryeckel in #230
- test(opencode): validate background subagents on OpenCode v2 2.3.0 by @roryeckel in #233
- chore(deps): update npm dependencies (non-major) by @renovate[bot] in #227
- chore(deps): update ci and tooling (non-major) by @renovate[bot] in #226
- harness-watch: opencode-v2 2.3.0 playback validation by @roryeckel in #234
- feat(opencode): report v2 subagent completion as agent.stop by @roryeckel in #235
- feat(opencode): report v2 agent.start and a child's agent ids by @roryeckel in #237
- fix(opencode): report each v2 event once across reloaded instances by @roryeckel in #239
- fix(sdk): require the zod peer again to stop npm's downgrade loop by @roryeckel in #242
- docs: fix getting started for pnpm 12, package.json and report location by @roryeckel in #243
Full Changelog: v0.12.0...v0.13.0
Direct commits
Release v0.13.0 (#244) (b675054)
- docs(release): prepare 0.13.0
Rewrite the release highlights for 0.13.0 against master at e1893a5.
Breaking changes come first, each with its upgrade step: the SDK
schemas subpath, Yarn Plug'n'Play, runCli no longer owning the
process, the shim, command and dispatch exit codes, proto
names, and the error and JSON output changes. Then HN110, the
dispatch and evaluation guards, the Zod fallback, the fixes, and
the limits.
Record 0.13.0 for the schemas subpath guide in the upgrading index,
and name the release where the subpath and Zod 4 guides said "this
release" or "later releases".
For maintainers, note in the runbook that a CLI built before the
version bump is silent about HN110 against the registry's SDK, and
in the packaging notes that the CLI bundle is now code-split.
- docs(release): apply review edits to the 0.13.0 highlights
Correct dispatch's exit 1 to cover a rejection or timer throw at
load, say that runCli's dispatch also set process.exitCode, say
that commands used to exit with the user code's own code, and list
where sync and verify skip HN110. Name 0.13.0 instead of "this
release".
Shorten the highlights without losing an upgrade step: fold the
dispatch and evaluation guard entries into their exit-code items,
shrink the Object.prototype fixes to two bullets, link the subpath
guide for schema shape changes, merge the guard limits into one,
and drop the runbook pointer. Reorder the upgrade steps so that
runCli, which affects only programmatic callers, comes last.
Add a TODO(#216) placeholder under the fixes. The yarn dlx wording
waits for #216's fix and a re-measurement, so it is unchanged.
Getting started no longer says the packages are not on npm.
- docs(release): finish the 0.13.0 highlights
Replace the TODO(#216) placeholder: yarn dlx in a Plug'n'Play project
builds as in 0.12.x again, since HN110 now stays silent there. Match
every other yarn dlx mention to #230's measured state, and list
yarn dlx among what HN110 does not check.
Add init --local's new text and JSON output and its refusal of
directories and hooks.ts (#228) to the output changes, and the
parent-directory write to the fixes.
Add OpenCode 2.3.0's background subagents as a known limit (#219).
Replace the harness range note with what changed: no range or
reference build moved, and scheduled playback now validates newer
Claude Code, Codex, Copilot and pi builds.
- docs(release): apply final review edits to the 0.13.0 docs
Drop the yarn dlx fix entry: #216 fixed a regression in HN110, which
is unreleased, so it is not a 0.13.0 fix. Say instead, in the HN110
entry, that HN110 stays silent under yarn dlx in a Plug'n'Play
project, and drop the limit that repeated it.
Say that yarn dlx builds only with the project's Zod in range, and
that scheduled playback fails OpenCode 2.3.0's subagent check inside
the v2 ranges (#219). Describe init's refusals by what is a
directory, including --config . and "", and tell users what
--config should name.
Rewrap a paragraph in the schemas subpath guide.
- docs(release): add the OpenCode v2 subagent and reload work
Add OpenCode v2's agent.stop (#231) and agent.start (#232) and the
session.get recovery to what is new, and the agent ids on a child's
own turn.stop to the upgrade steps, since every turn.stop hook sees
them. Add the reload de-duplication and handover (#236) to the
fixes, and its documented limits, including #238.
Rewrite the OpenCode 2.3 limit now that 2.3.0 is validated (#219,
#234): point to agent.stop's lastMessage, and note that one prompt
can end in several top-level stops. Update the harness evidence
from the final profiles: no range moved. Note the minimatch ^11.0.8
floor in @hooknostic/agent-plugin and the tooling updates.
Trim older fix bullets to keep the highlights near 26k characters.
- docs(release): apply the accuracy review of the 0.13.0 highlights
Say that a reload no longer reports a start or stop twice, and that
compaction de-duplication is unit-tested only, in the fix itself.
Say that any session never seen created is looked up, and that an
unrecognized child's turn.stop still has no agent ids. Add the
limit for a reload that removes every subscribing hook, and drop
"by design" from the 2.3.0 limit.
Cut a repeated yarn dlx sentence and the OpenCode v2 visibility
note that the limits already carry.
The SDK's zod peer is required again (#242), so stop calling it
optional. Say that only @hooknostic/sdk/schemas needs Zod, that npm
and pnpm install it for the peer, and that Yarn Plug'n'Play users who
import the subpath add zod@^4.6.7. Give the downgrade path: npm's
ERESOLVE, no --force, a zod3@npm:zod@3 alias, and pnpm and Yarn's
install warning with HN109.
Apply the #241 smoke findings:
- F8: give the upgrade commands, matching docs/upgrading/README.md,
pinned to 0.13.0, with pnpm's --allow-build=esbuild. - F10: quote the HN501 error a root schema import gives.
- F7: drop "you can remove it", and say where the SDK reaches no Zod.
- F6: sync, verify, recover and doctor print a config load failure
without its code, and list it under errors in --json. - F5: name the usage checks that keep a JSON line, and those that
print plain text.
Credit #240/#242 and #241/#243 under the schemas move and
Documentation.
- docs: say "the commands above" in getting started
Getting started now shows an npm and a pnpm install, so the
unreleased-changes note refers to both commands.
- docs: show npm commands in the subpath guide's Zod section
The section listed only pnpm commands. Add the npm equivalents first, since npm is the most common consumer setup.
- docs(release): note --save-exact and the large re-sync diff
Upgrade commands save a ^ range; projects that pin exact versions need --save-exact. A consumer rehearsal also showed the 0.13.0 re-sync rewrites most of each generated runtime with Zod and esbuild unchanged.
- chore(release): 0.13.0
Co-authored-by: release-prepare <release-prepare@users.noreply.github.com>