Changelog¶
All notable changes to CallPact are documented in this file.
Format follows Keep a Changelog. Versioning follows Semantic Versioning.
[0.17.0] - 2026-12-05¶
Changed¶
- Renamed the product to CallPact. The Cargo package, primary executable and
release archives now use
callpact. - Updated installation instructions, command examples, help and documentation for the CallPact command and repository.
- Consolidated CLI, MCP, A2A and HTTP proxy integrations on APCore Surfaces 0.1.1 with APCore 0.34.1.
- Prefer
CALLPACT_*environment variables and accept theirAPEXE_*aliases when the corresponding CallPact variable is unset. - Use
callpactfor Rust imports,callpact-shfor shell hosts, and~/.callpactfor new installations. Keep the legacy state directory, shell aliases, and binding metadata readable across the rename.
[0.16.0] - 2026-11-25¶
Added¶
- First-class Antigravity host integration across
apexe hook antigravity,apexe agent antigravity,apexe sh --check,apexe setupandapexe env --disable. apexe hook antigravity(including--persistent) translates Antigravity's camelCasePreToolUseevents forrun_command: simple external commands are rewritten toapexe sh -cviaoverwrite.CommandLinewithdecision: "allow", builtins/pipelines/ compound/already-routed commands exit0with empty stdout to pass through, and a missing shim manifest fails closed withdecision: "deny".apexe agent antigravity --writeatomically merges and repairs theapexehook in.agents/hooks.json(project scope) or~/.gemini/config/hooks.json(--scope user), re-enabling a disabledapexehook while preserving unrelated named hooks.apexe agent antigravity --mcp-only [--write --scope user]prints or mergesmcpServers.apexeinto~/.gemini/config/mcp_config.json.apexe setupandapexe agent --check antigravitydetect Antigravity viaagy/antigravityonPATHor~/.gemini/antigravity*(covering Antigravity Desktop and IDE installations without a CLI binary onPATH).scripts/install_agent_skill.pysupports--agent antigravity(.agents/skills/apexein project scope,~/.gemini/config/skills/apexein user scope).- Verified end to end on Antigravity Desktop (macOS arm64):
run_commandrewrotels, hit~/.apexe/bin/lsand recorded ACL + execution entries in~/.apexe/audit.jsonl; compound and already-routed commands passed through unchanged; a missing shim manifest blocked execution with the hook's remedy message.
Changed¶
- Reorganized
README.mdwith a table of contents, an Integrations section, and clearer capability, coverage-limit,env, OpenAPI andexecguidance.
Fixed¶
scripts/install.shnow rebinds the terminal on theapexe setuphandoff rather than the outer shell so pipedcurl | shinstalls do not stall reading the script from the TTY.
[0.15.2] - 2026-11-20¶
Changed¶
- Raise the Rust SDK minimums to
apcore-toolkit0.15.0,apcore-cli0.14.1 andapcore-mcp0.23.4. The lockfile now shares oneapcore0.33.0 across the SDKs.
Fixed¶
- OpenAPI imports for MCP and A2A now resolve inherited parameters and same-document references. An operation can override its Path Item parameters. Fields that were previously omitted can now appear in the tool schema, including required fields that callers must supply.
- Validate the selected OpenAPI operations before proxy registration. Startup errors identify operations with ambiguous inputs or encodings the proxy cannot forward. Excluded operations do not block startup.
- Embedded native commands use the selected ACL. Child approval can prompt even when the parent needs no approval. Delegation grants are scoped to the spawned command and cleaned up on timeout.
- Native resolution checks the complete candidate set when leading options make routing ambiguous. A denied child route does not fall back to the root command. Dry-run reports failed path checks and shows the sandbox argv used at execution.
- Host configuration edits preserve existing MCP entries, refuse invalid or conflicting settings before publication, and report completed edits when a later file write fails.
Compatibility¶
- A2A startup warns about incomplete 1.0 interoperability. The authenticated
legacy
message/sendflow remains available.
[0.15.1] - 2026-11-19¶
Changed¶
- Refresh
Cargo.lock(tokio1.54.1,openssl0.10.82,rustls-webpki0.103.17,mio1.2.5, and other patch updates). No crate API changes. - Allow APCore 0.33 and APCore CLI 0.14 in the dependency manifest alongside the currently locked versions.
Compatibility¶
- This release was tested with local builds of APCore 0.33.0, APCore CLI 0.14.0, Toolkit 0.14.2, MCP 0.23.4, and A2A 0.8.5.
[0.15.0] - 2026-11-16¶
Added¶
- Opt-in sandbox delegation for selected modules.
sandbox.modulesnames module ids (the same vocabulary asacl.yaml);sandbox.defaultisoff,requiredorauto;sandbox.backendisautoor one ofsystemd-run,bwrap,sandbox-exec,docker. Noadvisoryexecution mode: a missing backend, an inexpressible policy, a missing Docker image or a translation error refuses before spawn underrequired/auto. - Four built-in backends. Linux prefers
bwrapwhen thebubblewrappackage is installed and otherwise usessystemd-run(both are OS-provided or a small package); macOS uses the OS-providedsandbox-exec; Docker is an optional container backend that requiressandbox.backends.docker.image. apexe sandbox checkreports the selected backend, enforcement, capabilities, mode, selected modules and reason in table or JSON.apexe exec --dry-runreports the translatedsandboxplan, enforcement, policy digest and launch argv without spawning.systemd-run --useris not a path backend. On Debian 12 / systemd 252 it acceptsReadOnlyPaths/InaccessiblePathsand silently ignores them (a service wrote into aReadOnlyPathsdirectory). Only a systemsystemd-runservice (root) enforces them. Linux local therefore usesbwrap(thebubblewrappackage);systemd-runis system/root only.- The Docker backend mounts only host data paths. Host system trees
(
/usr,/etc,/lib,/bin,/dev,/proc,/sys, …) stay the image's own read-only tree; mounting them over it would replace the image's tools with host binaries and fail on paths the container does not have. Missing baseline paths are dropped, and duplicate mount points are deduplicated. Docker Sandboxes (sbx, a microVM with its own kernel and private Docker Engine) is a separate product, not thisdocker runbackend. - The runtime normalizes
paths:toPathSpelling(original + resolved), then to aMountPlan;systemd-run,bwrap,sandbox-execanddockertranslators consume it.NoAccessdenies content and entries, with extra metadata denial onsandbox-exec;WriteOnlyis supported bysandbox-execand refused by backends that cannot express it;DenyWithinGrantis declared per backend. - Execution audits carry
sandbox_backend,sandbox_enforcement,sandbox_outcome,sandbox_policy_digestandsandbox_reason;sandbox checkwrites asandbox_probegovernance event. -
docs/features/v2-f9-sandbox.md, the contract/defaults/implementation notes indocs/sandbox.md, the conformance cases indocs/sandbox-testing.md, and the source review indocs/ideas/sandbox-source-notes.md. -
apexe setupprepares a machine in one step by orchestratinginit,env --enable --no-rcandagent <host> --writefor detected hosts. It is the same code path each command owns, not a second configuration surface. Shims are installed without editing shell startup files, so login-time tooling keeps resolving its own commands; the summary says what is and is not governed, and Codex is reported rather than changed. scripts/install.shdownloads the release for the platform, verifies its checksum, installs into~/.local/binwithoutsudo, and hands off toapexe setup.curl … | shreattaches the terminal before prompting, and a run without one writes no host configuration.apexe initreads the default corpus from a GitHub release archive instead of requiring Git. The recorded identity is the sha256 of the archive bytes, which names the exact rules that were admitted.--refremains a Git reference, so repositories that tag without publishing assets keep working, and a release is pinned by its archive URL.--refreshreproduces whichever source was recorded.- Archive extraction treats every byte as untrusted: one top-level directory
with a
manifest.jsonis required, and links, devices, duplicate entries and..components are rejected before anything is validated. - Corpus manifests declare a release version that
apexenow checks against a supported range (>=0.1.0, <1.0.0). An out-of-range corpus is refused with the range named, instead of being loaded silently and failing later. - A GitHub source with no
<repo>.tar.gzrelease asset falls back to the repository's Git history once, recordsHEAD, and keeps using Git on later refreshes. If Git also fails, initialization reports both attempts instead of only the last one. - Scan-time acquisition is isolated: when any managed corpus is installed, a
scan uses it and does not also fetch the configured default. Installed rule
sets therefore change only through an explicit
apexe init, never as a side effect of scanning a tool. apexe corpus listreports each installed corpus with its release version, source and identity;apexe corpus remove <name>deletes one without touching the others. Removing the default corpus by hand is no longer the only way to narrow a machine to a custom source.- A same-named corpus from a different source can replace the installed one
with consent:
init/setupask on a terminal and require--forceotherwise. A fork that keepsname: cli-permissionstherefore does not need to learn the manifest naming rule, and the replacement is still never silent. apexe setupandscripts/install.shaccept--overlays <SOURCE>and--ref <REF>, so installing the binary and preparing a custom corpus is a single command rather than an install followed by an additiveinit.
Fixed¶
- A flag-scoped approval ceiling stands down again for calls that send none of
its escalating arguments.
initwrites an ACL by default, and the executor treated "an ACL exists" as "the ACL demands approval", forcing everyrequires_approvalmodule to prompt on every call:sort filefailed even though onlysort -owas the gated argument. The gate now uses the precise answer from the loaded policy — a rule withapproval: requiredstill forces a prompt, and an ordinary allow/deny ACL no longer does. - A corpus whose overlay directory is missing reports that directory by path. The managed-path symlink check treated absence as an I/O error, so the message was a bare "No such file or directory".
Documentation¶
- Corrected the earlier
sandbox-execfalse negative:/tmpresolves to/private/tmp, and a profile that names only the spelling does not match.sandbox-execis deprecated but enforcing with canonical paths.
[0.14.1] - 2026-11-15¶
Fixed¶
apexe list --verbose | headno longer panics withfailed printing to stdout: Broken pipe. Rust ignoresSIGPIPE, so a reader that closed early turned the next stdout write intoEPIPE, whichprintln!panics on. The CLI now restores the defaultSIGPIPEdisposition at startup, so a pipeline terminates quietly like any other Unix filter. The behavior is covered by a regression test that closes the reader before a largelist --verboseoutput completes.
Documentation¶
- Corrected the sandbox delegation specification. The earlier
sandbox-execresult was a false negative: the test used/tmp/sbtest, which resolves to/private/tmp/sbtest, and Seatbelt matched only the literal spelling.sandbox-execis deprecated but enforcing with canonical paths. The default pair is now macOSsandbox-exec(OS, no install) and Linuxsystemd-run(OS, no install), withbwrap(thebubblewrappackage) preferred when installed. The specification defines the backend contract, the later out-of-process adapter protocol, per-module selection, fail-closedoff/required/automodes, and the audit fields. It is not implemented yet.
[0.14.0] - 2026-11-15¶
Added¶
x-apexe-tail-parsedlets an overlay declare a trailing mini-language that is parsed rather than forwarded, and the native resolver now accepts the grammar it was added for:find path ... [expression]. Until now everyfindinvocation through a shim was refused with "Ambiguous declared positional grammar": the overlay declares two variadic operands (the paths and the expression), and nothing said where the first one ends. The new marker says it. The boundary is the first token matching a declared trailing flag — an option markedx-apexe-flag-position: "before-operands"stays ahead of the paths, because that is where the executor renders it; the tokens before the boundary are the leading operand's values, type-checked as today; and every token from there on is resolved against the declared flags rather than forwarded.find /etc -name '*.conf'runs at read strength,find . -deletereaches the approval gate and is path-checked at write strength becausedeletelands in the inputx-apexe-writes-withreads, and an unclassifiable token refuses the call and names it.-execis not left as a generic unclassified tail token: theexec_listentry below makes it a policy decision (refused by default,analyze/delegatewhen reviewed), because its arguments are another program's argv. The argv the caller typed is still forwarded verbatim, in order, exactly as the module-JSON path renders it, and--keeps its meaning (a declared flag behind it is still seen, so a write cannot hide there).x-apexe-opaque-afteris untouched:node <script> args…still forwards its tail unvalidated, and a grammar declaring both markers is refused rather than guessed at. No existing grammar changes: a module without the marker parses byte-for-byte as in 0.13.0.- The non-dash expression operators are part of the parsed tail, not a gap.
find's(,),!and,are neither flags nor operand values, so the overlay declares them astail_tokens(contract keywordx-apexe-tail-literal). One opens the tail exactly like a declared flag; inside it the operators are skipped while every flag is still resolved, sofind . \( -name '*.txt' -o -name '*.log' \)runs and its-deletewould still reach the gate.;,+and{}are refused as declarations because they are-exec's terminators: accepting them would let-exec utility ;run a program. The corpus's twofindentries declare the four operators. child_exec.mode: delegateruns each embedded command through the installed child shim instead of the real binary, so the child's ACL and path guard see the actual{}value per match: symlinks are resolved,-execdir's working directory is the onefindsets, and a path outside the parent's starting paths is refused. The parent creates a short-lived grant (child modules + starting paths + parent trace, 0600 in a 0700 directory, 30-minute expiry, removed when the call returns) that stands the approval prompt down for those matches only; ACL and the path guard still run every time. The child program must be installed as a shim, and unanalyzable child modules stay refused. Every child decision is achild_execrow inaudit.jsonlwith the parent trace (and the grant id in delegate). File writes/reads that live in a program's own logic still need a confinement backend.- A command that computes filesystem paths inside its own logic can declare
computes_paths: true(contract keyx-apexe-computes-paths). The child-execution analysis refuses such a module rather than treating its argument paths as complete:sed 'w /etc/x',awk system(...)andpython -cneed a confinement backend or an explicit trust decision. The corpus marks bothsedvariants after probing thatsed -n 'w /tmp/...'really writes the named file. - Embedded child commands (
find -exec) are a policy decision now, not a hole. The corpus declares-exec/-execdir/-ok/-okdirasexec_list; the resolver collects the command list verbatim instead of refusing its tokens or classing them as the parent's flags, andchild_exec.modedecides what may run. The default isrefuse: the native surfaces reject the call and the module-JSON surface rejects an exec-list input, so the old approval-only--inputpath is closed.analyzeresolves the program to its own reviewed module and applies that module's schema, ACL, path policy and approval to the same caller; the effective decision is the intersection with the parent's gates.{}is checked as the parent's starting paths at the child's access mode, and--is inserted before it when the child module declaresend_of_options(thermoverlays now do, so a matched file named-rfis a path). Program identity is pinned by running the parent with a shim-freePATH. Programs with no reviewed binding, a program that computes its own paths, and nested exec lists are refused;trust_uncoveredis the explicit, audited exception. Module JSON/MCP never execute an exec-list without that analysis. - Native shim eligibility now asks whether a route re-emits its argv, not
whether the tool is order-independent in general. A
tail_parsedgrammar classified every token, so the shim replays the caller's argv verbatim;findis therefore eligible without across_flag_orderingclaim, which would have asserted something about its order-sensitive expression that the entry never checked. The audit tier staysreviewed, the overlay's bundling answer is kept, and the spelling and order the caller typed are what run (find . -L -name xis no longer silently rewritten tofind -L . -name x). Routes that re-emit — including anopaque_aftertail's rendered prefix — still need the claim.
Fixed¶
- The child-execution analyzer inserts
--before the child's first positional operand, not before the{}token. For a child with an operand before the placeholder (find . -exec printf '%s' {} \;) inserting before{}producedprintf '%s' -- file, which prints--file; a{}in a flag value (grep -e {} file) became a--pattern. The child argv is now parsed after the program token, so the program is no longer treated as an extra operand by the child preflight. Tests coverprintf's format,grep -e, and an existing--. - A refused child analysis is audited: the analyzer writes a
child_execrefusedrow, and the shim writes the parent'srefusalrow. Previously a path/ACL/computes_pathsrefusal leftaudit.jsonlwith no record at all. - The delegate grant file is created with mode 0600 by
OpenOptionsinstead of being written under the umask and chmod-ed afterwards; a failure in between could leave a readable grant with no handle to remove it. - The Cobra help parser no longer treats GNU coreutils' "use one of these
commands:" prose as a Cobra command section.
rm --helpon Debian was read as a Cobra command with a subcommand namedrm(the first indented example,rm -- -foo), sorm@gnucould not apply and a childfind -exec rmwas refused as unreviewed. The section header now requires a title-cased group label, which still matchesCommands:,Available Commands:,Management Commands:andCommon Commands:without matching prose. Verified by the realrm@gnuscan andfind -exec rmon the Debian reference image.
[0.13.0] - 2026-11-13¶
Fixed¶
- A flag list dropped for naming an undeclared property is now recorded on the
module (
metadata["x-apexe-overlay-undeclared"]), not only logged. Dropping is still the right call — a trigger that can never fire would check a writing call at read strength — but the drop is a claim that did not take effect, and a log line nobody reads is indistinguishable from silence.apexe list --format jsonnow shows it, and one helper computes it for both the drop and the record so the two cannot disagree. scan --write-aclrefreshes the readonly allow rule again. The compatibility path was wired toacl sync's deny-only floor, so a scan that made a modulereadonly— which is what a corpus update does when a command stops beingdestructive— left it matching no rule at all: it fell todefault_effect: denyand the upgrade looked like it changed nothing. Applying a scan is the explicit write and merges the full default;acl syncstays deny-only.- A refusal for a path that contains a protected location no longer reports the
protected path as the protector.
rm -r /tmpwhere~/.awslives under/tmpsaid "'/tmp' … which is protected by '/tmp/h/.aws'" — the relation runs the other way, and the sentence now says "which contains the protected location", so an operator is not sent to change the wrong entry. exec --dry-run'spath_guardsummary uses the same access mode as the call it describes. It derived the mode fromannotations.readonlyalone, so a call whoseargvcheck refused a path still reportedallowed: truebeside it — a summary disagreeing with the verdict it summarises.- A
readonlymodule that declaresx-apexe-writes-withis now checked at the strength its arguments call for.access_modeconsultedreadonlyfirst and returned before reading the list, which made the list unreachable for exactly the tools it exists for: areadonlyfindgiven-deletewas still checked at read strength, so a protected path stayed writable through it. Found by driving the real binary rather than by the unit tests, which had encoded the wrong order as an expectation. - The shipped
config.yamltemplate now means exactly what the compiled defaults mean. It disagreed in three lists —readonlywas missing nine words the baseline has (find,ps,whoami, …),requires_approvalomitted--recursive, andruns_other_commandsomittedsuandfind— so runningapexe config initsilently changed decisions relative to having no file at all. A test now compares the template againstAnnotationDefaults::default(), which is how the divergence was found and what keeps it from coming back. schema_versionanddefaults_revisionare real config fields. They were in the shipped template while nothing read them, becauseApexeConfigtolerates unknown keys: a file stating its schema version was stating something the binary never checked.
Documentation¶
docs/sandbox.mdanddocs/sandbox-testing.mdadd the specification for delegating confinement to an existing backend (systemd-run,bwrap, a container runtime) instead of implementing one. No behaviour changes: no backend is implemented. The contract answers two questions an operator asks first — what can the backend actually express (capabilities, includingdeny_within_grant), and what happened on this call (sandbox_backend,sandbox_enforcement,sandbox_outcome,sandbox_policy_digestinaudit.jsonl) — plus the selection rule (opt-in per module id, never a blanket wrapper) and the measured reason macOS isadvisory: on macOS 26.3 (arm64)sandbox-execaccepted a profile denying writes beneath a directory and did not block the write, with the commands and output recorded in the document so the finding can be re-run rather than believed.
Changed¶
apexe policyis nowapexe paths, matching thepaths:section it reports on.policywas the wrong word for it: the ACL is policy too, and the command only ever described locations. No alias is kept — the command is rarely used and an alias that readspolicywhile printingpathsvocabulary would preserve the confusion it was renamed to remove.
Added¶
list --diagnosticsnames the granted modules that are notreadonly, because their path checks cover only the arguments a call declares. A command that computes its own paths — an interpreter, a script, a pipeline — is outside that check: denyingrmwhile grantingpython3constrains which tool is spelled, not what can be done, and nothing said so. The list is deliberately labelled as every granted non-readonly module rather than a verdict on each, because apexe cannot tell which ones compute paths internally; a precise classification needs a corpus annotation.
Added¶
acl syncreports readonly modules that match no allow rule. A corpus update that turnsdestructiveintoreadonlyremoves the module from the deny rule and, because sync never generates an allow, leaves it matching nothing — it falls todefault_effect: denyand the upgrade looks like it did nothing. In the strict profile that was the whole effect of the change. Sync now names the modules and the command that rebuilds the allow rule; it does not grant them, because an allow the operator did not review is the thing this separation exists to prevent.
Added¶
- An overlay can scope approval and write behaviour to flags instead of the
whole module.
AnnotationOverridesgainsapproval_flags(properties whose presence puts the call to a human) andwrites_with(properties whose presence means the call may write), both written intoannotations.extrawhere the approval gate and the path guard already read them.writes_withdefaults to the approval list, because the two answer one question — which arguments are the dangerous ones — and a second hand-maintained list is a second thing to drift.
This is what makes a tool like find expressible at all: it reads the
filesystem unless -delete/-exec is given, so a blanket requires_approval
makes it unusable and no marking leaves arbitrary programs ungated.
A flag list naming a property the module does not declare is dropped, with an error that names the unknown property and the real ones. Applying it would be worse than dropping it: a trigger that can never fire checks a writing call at read strength, while dropping leaves the module at write strength — the same conservative state as a module with no lists.
AnnotationOverrides also refuses unknown keys now. Before this, an author who
misspelled one was silently ignored — an overlay that loads and does nothing is
indistinguishable from one that works, which is the failure mode this project
keeps having to fix.
- x-apexe-writes-with narrows the path guard's access mode per call: when
none of the named properties is set, a non-readonly module's path arguments
are checked at read strength. Module-level annotation was the wrong
granularity for tools that only write when asked — find -delete exists, so
every read-only find was checked as a writer. The key can only narrow, never
widen: a module that can write without the named properties must not carry it,
and sed is the standing example (sed -n 'w /etc/x' file writes with no flag
at all). Absent the key, nothing changes.
- config.yaml gains an annotations: section: the lists that label a command
when nothing has reviewed it are now the operator's. A configured list
replaces the compiled default rather than adding to it, because a machine
that removes rm from destructive expects rm to stop being labelled — an
additive merge would silently ignore that. Root executables and subcommand
words stay separate: merging them marked /usr/bin/sync as network-reaching,
a regression the existing test for it caught.
- config.yaml gains a paths: section that states the path policy in the
vocabulary the idea came from: read_only (systemd ReadOnlyPaths=),
read_write (ReadWritePaths=), no_access (InaccessiblePaths=) and
write_only (AppArmor's w right). The four names are the four subsets of
{read, write}, so there is no fifth state to explain and no allow/deny pair to
misread — the deepest matching entry decides, and a path may appear in only one
list. An absent section leaves the compiled-in baseline in force; an empty one
is a policy that protects nothing, which is why the distinction is kept.
- apexe config init writes the commented template from
docs/config.example.yaml instead of a bare serde_yaml dump of the defaults.
The template describes only what this release enforces.
The file an operator receives and the file the manual points at are now the
same text, and a build-time include_str! fails if one moves without the
other.
- The manual's "coverage and policy are two gates" model is now three: coverage
(bindings), permission (acl.yaml) and access (paths:), with the command
that inspects each and the migration table from the old path keys.
apexe list --path-censusreports the three states a command on this machine can be in:granted(bound and allowed for--caller),denied(bound and refused by the policy), andunscanned(onPATHwith no binding at all — the only oneapexe scan <tool>fixes). It reads directory entries and the policy and never scans or executes anything, so "this command does not work here" becomes a one-line diagnosis instead of a refusal met one call at a time. On this machine it reports 2017 executables, 27 bound, 1990 unscanned.apexe acl init/apexe acl sync/apexe acl explainsplit policy authorship out ofscan.initwrites a starter policy once and refuses to overwrite one,syncrefreshes only the destructive and open-world denials, andexplainnames the rule that decided a given module for a given caller. The split follows the authority: a generated denial can only restrict, while a generated allow is a grant nobody reviewed — which is how a policy came to be a projection of the last scan rather than an operator's document.acl init --profile developergrants the local shell the rest of what this machine installed (callers: ['local']→cli.*, placed below the denials so first-match-wins ordering still refusesrm). It replaces the per-module enumeration every developer had to hand-write: a module the scanner could not classify is now usable locally instead of falling todefault_effect: deny.--profile strictkeeps the previous shape, where every grant is one you wrote. Unauthenticatedserve/a2aclients are unaffected by the local rule.- Generated policies carry a header stating the model and the evaluation order, and a rewrite preserves it — YAML drops comments on parse, so without this the one part of the file that explains its rule order was erased by every sync.
Changed¶
~/.apexeis readable through a governed tool and still not writable. It holds the policy, the audit trail and the recorded security evidence, so reading is how an operator — or the agent helping them — finds out what is actually enforced; the old read refusal bought nothing, since the agent's own file tools already reach it and no shim governs those. Writing stays refused: a wrapped tool that can rewrite the policy can govern itself, including deleting the record of what it did.apexe scanno longer writesacl.yaml. It produces bindings, which is its declared deliverable; writing the policy as a side effect of learning about a tool is what let a policy drift away from any review.--write-aclkeeps an existing script working for one release: it writes a starter only when none exists, then syncs the denials, and never grants.apexe scannarrows the bindings it loads to the tool it scanned, and a shim loads only the bindings its own command can reach, not every installed tool's. The shim already knows from its manifest which routes a command serves, soapexeno longer parses the whole installation's grammar before running anything: a governedlson an install with 174 bindings went from ~150 ms to ~10 ms, and the cost of a call no longer grows with the number of tools installed. Selection is by module-id prefix, matching the{module_id}.binding.yamlconvention the writer uses, and every case that could make the subset narrower than the full load — no matching file, an empty route list, an operator-declaredbindings.pattern— falls back to the full load, so narrowing stays a performance decision and never a coverage one.apexe execnarrows the same way: a module-id call loads only its own binding, and a native call (apexe exec -- ls -la) loads thecli.<tool>namespace ofargv[0], which is the whole scope route resolution consults. A tool with many subcommands (e.g.git) still loads that tool's full route set, because resolving a subcommand needs its siblings to disambiguate;apexe exec -- lswent from ~130 ms to ~10 ms.
[0.12.0] - 2026-11-13¶
Added¶
apexe env --enablenames the commands whose whole surface is a heuristic subcommand tree, with a route count each. A shimmed command validates the caller's argv against the scanned grammar and refuses what falls outside it rather than forwarding it, so a tree the scan did not read completely fails ordinary calls closed —git rev-parse --show-toplevelwas refused as an undeclared flag. Single-route tools are excluded because one help block is a surface the scan reads in full; listing them produced nineteen lines on an ordinary install and pointed at the commands with the least to miss. The alternative to the report is meeting the gap one failed call at a time, and--exclude <command>is the decision it makes possible.positional_argsentries accept the sameriskassertion as flags, so a tool whose only write lives in an operand can be governed without gating the whole command.uniq INPUT OUTPUTtruncates and rewrites OUTPUT whileuniqwith no operand writes nothing, so the old choice was between failing every read-only pipeline and letting an unattended write through — which is whyuniqhad to be excluded from shims. The keyword lands on the operand's property asx-apexe-escalates, so the approval gate applies only when the caller fills it, andexecuteson an operand is refused outright like a flag.apexe env --enable --no-rcinstalls shims without touching shell startup files, and removes the blocks a previous installation left behind. The managed block puts the shim directory first onPATHin every new terminal, where login-time tooling (pyenv, nvm, brew) resolves its ownrm,lnandsortthrough the shims. With a policy that denies one of those, the bootstrap fails: apyenv rehashinterrupted this way leaves~/.pyenv/shims/.pyenv-shimbehind, and every later login reportscannot rehash. A host that selectsapexe-shreaches the shims without any startup block, so this is the setting to use when the governance boundary is the agent rather than the human shell.
Fixed¶
apexe execno longer reports a coverage gap in the shim's words. A command the installed shim manifest knew only asscannedwas inserted into the native route table with an empty route list, so route selection fell through to the shim's "Shim 'bun' has no route for 'bun run' … re-runapexe env --reload --scanned all". That flag belongs toenvand cannot reach native execution, so an operator who followed it changed a policy that was never the deciding layer; a pi host read it as "the shim is missing a route" and stopped work. A command with no installed reviewed route now stays absent from the native table, which reaches the honest answer: the binding exists, its grammar is not reviewed, and the refusal names the two surfaces that do work — its shim in a governed shell, orapexe exec <module> --input.- That refusal names the binding the arguments selected instead of the first
module that targets the same binary.
bunhas six routes, so abun runcaller was toldcli.bun.exechad no reviewed grammar and was pointed at the wrong--inputproperty set. - A multi-word angle-bracket placeholder is one operand again. The usage-line
parser runs three passes over the same line and the bare pass re-read the words
inside
<...>:bun run'sUsage: bun run [flags] <file or script>producedfile_or_scriptfrom the angle pass and then a second, required operandfile, and<input file>produced three. Deduplication by name could not catch it, because the two names differ. A binding carrying the duplicate renderedbun run <script> <script>, sobun run testreached the script runner asbun test test: the call exits 0 while the extra token changes what the script is asked to do. Bare and bracketed tokens opening inside an angle placeholder are now skipped. SCAN_FORMAT_VERSIONis bumped to 5, so an existing install actually receives the fix. A cached scan is a replay of what an older build understood, and every field added to the scanned model carries#[serde(default)], so a pre-fix document still deserializes and is returned before any parsing runs. Without the bumpapexe scan bunkeeps emitting the duplicate operand at exit 0, with nothing saying the new scanner never ran.
[0.11.0] - 2026-11-12¶
Added¶
apexe env --enable --also <NAMES>/--exclude <NAMES>name individual shim commands and outrank the scanned policy in the direction they state, so an interpreter can be governed without--scanned all:--scanned readonly --also node,python3. The names persist in the manifest, because the activation script'senv --reloadruns in every new terminal and would otherwise drop the route again.apexe env --checknow reports[WARN] INHERIT <command>when a shimmed command installs only part of its bindings, with the installed and available route counts. A shim refuses every route it was not given, and an application started from an activated shell inherits that shimPATH: an editor opened withcode .probesgit --versionandgit rev-parse, is refused both times, and reports "no repository" instead of the refusal. The warning names the commands where that can happen and carries the remedies — relaunch from a deactivated shell, start the app through LaunchServices (open -a), orapexe env --reload --exclude <command>. The behavior is unchanged: no refusal is relaxed and nothing falls back to an ungoverned binary.x-apexe-opaque-afterlets an overlay declare where a tool stops interpreting its own argv: everything from that token onwards is forwarded verbatim. An interpreter's grammar isinterpreter <script> <argv for the script>, so validating the tail against the interpreter refusesnode tsc.js --noEmit. It sits on the last, variadic operand for that form, and on a flag for the ones whose tail starts at a flag's value:python3 -m <module> <args>andpython3 -c <code> <argv>, which the operand form cannot express. Execution, the ACL and the audit are unchanged; the tail still lands in the declared operand, so a path-typed operand puts those tokens to the path guard.x-apexe-digit-valuelets an overlay declare that a bare-<digits>token is one flag's value, sohead -20andtail -20execute under a reviewed grammar instead of being refused as a-2/-0bundle (issue #46). At most one property per command may carry it; a second declaration is rejected as ambiguous. Only a probe can establish the spelling —usage: head [-n lines | -c bytes]does not mention-20— so a corpus overlay declaring it must record the probe inprovenance. apexe ships the support first: an overlay using the keyword against an older apexe fails to load, becauseOverlayFlagdenies unknown fields.
Changed¶
apexe-deactivate.shremoves only the shim directory fromPATH. It used to restore the environment saved at the first activation, and on macOS that snapshot is taken in.zprofile— before.zshrcadds pyenv, pnpm and similar directories. Leaving the governed shell therefore dropped every later entry:apdev(a pyenv shim),python3and anything else installed after activation resolved differently or disappeared. Activation still records the snapshot soAPEXE_SHIM_DIRand whetherPATHwas unset can be restored, but entries added while the shell is governed now survive deactivation.scripts/deactivate.shfollows the same rule in its after-disable fallback.- A scan now reports the overlays that matched but did not decide it. Selection
keeps the single strongest match, so a local overlay that matches less
strongly than the corpus file it means to amend is silently ignored, and one
that matches equally replaces it wholesale — dropping every flag and operand
it does not restate. An
annotations-onlyrm@bsddid exactly that and took the path-typed operand with it, sorm /etc/hostsreached the binary. Both cases are now a scan warning naming the two files, and the second one counts what was dropped. deactivateleaves the governed shell instead of uninstalling apexe. The installeddeactivate/apexe-deactivate.shandscripts/deactivate.shused to runapexe env --disable, so sourcing a per-shell helper removed every shim, theapexe-shentry point and the managed startup blocks for the whole machine — and a host configured to use the entry point loses its own command execution with it. They now restore PATH andAPEXE_SHIM_DIRfor the current shell and touch nothing on disk, matching whatdeactivatemeans in a Python virtualenv. Uninstalling isapexe env --disable, which stays the one command that removes an installation and records ashim_disableaudit event.scripts/deactivate.shno longer guesses which installation to remove. With neither_APEXE_ACTIVE_SHIM_DIRnorAPEXE_SHIM_DIRset it used to runapexe env --disableagainst the default directory, so sourcing the helper from a shell whose HOME held an installation disabled that installation without being pointed at it — twice, because the second source fell through again. It is now a no-op that says so. The installedapexe-deactivate.shis unaffected: it names its own directory.- A binding with no
metadata.grammarstamp is no longer promoted toreviewedby the legacy tool-levelshim_contract.authoritative(issue #47). It is reported aslegacy: admitted like a scanned route, labelled inenv --enableandenv --check, and never granted reviewed trust it did not earn. Reviewed routes are unaffected.
Migration¶
- An installation whose shims were only ever justified by that legacy flag now
runs them as scanned routes: install with
apexe env --reload --scanned readonly(orall), or rescan the tool (apexe scan <tool>, thenapexe env --reload) to earn the stamp back.
[0.10.0] - 2026-11-06¶
Added¶
apexe env --enable --replace-unownedregenerates the entry point and the activation helpers when the installation record that proves this apexe owns them is gone.--reloadand--disableread that record first, so losing it previously left the installation unrecoverable with no way out but deleting files by hand. The flag is scoped to apexe's reserved names; a file sitting on a command name is never replaced by it.apexe shruns a real shell with the installed shim environment throughexec, forwards arguments verbatim, and diagnoses readiness with--check [--format text|json].apexe env --enableinstalls the stableapexe-shentry point for hosts that select a shell by path. This launcher changes command lookup order only; it is not a sandbox or a full-governance boundary.- Local shim and native execution now inherit the caller's environment so
credential helpers (
GH_TOKEN,AWS_PROFILE,KUBECONFIG,SSH_AUTH_SOCK) keep working; dynamic-loader hooks (LD_PRELOAD,DYLD_*) are removed before the child starts. Captured MCP/A2A execution keeps the existing scrubbed allowlist. Descendant commands started by a locally executed tool keep the shim directory onPATH. apexe sh --locked [--allow-path DIR]restrictsPATHto the shim directory plus explicit directories.apexe-shreadsAPEXE_SHELL_LOCKEDandAPEXE_SHELL_ALLOW_PATH. This is a restricted command search path, not a sandbox or a full-governance boundary.apexe sh --checkreports the local environment policy and denylist.apexe agent <host>prints OpenCode, pi, Codex or Claude Code setup using the installedapexe-shpath;--checkreports launcher and host readiness.--writemerges the configuration atomically, and--mcp-onlygenerates an MCP-only deployment for OpenCode or Claude Code (Codex prints TOML).apexe hook claude --persistentroutes every Bash call through a detached governed shell session that preserves cwd, variables, functions and aliases across calls. Experimental; scoped to the host session id and project directory, with an idle timeout and an explicit stop command.apexe hook claudetranslates Claude CodePreToolUseBash events. Simple external commands are rewritten toapexe sh -c '<command>'throughupdatedInput; stateful builtins, pipelines and compound commands are left to the installed PATH shims. Missing shims are denied with a remedy.apexe env --enable --scanned <off|readonly|all>installs routes for bindings without a reviewed overlay. A scanned route parses and validates the caller's argv, then executes the original argv without rebuilding or reordering it; executions are audited withtier: scanned.readonlyadmits only readonly, non-destructive, closed-world modules.apexe sh --checklists modules that have a binding but are not shim-eligible, with the exclusion reason, so coverage gaps are visible without enabling ascannedexecution tier.- Local native, shim and
apexe shexecution now resolvesrequires_approvalmodules with a/dev/ttyprompt (y/yes) and a bounded wait. A non-interactive stdin is refused with a remedy instead of blocking; MCP/A2A and captured module execution keep their client or store based approval path.
Changed¶
apexe agent <host> --writerefuses to point a host at a launcher that is not installed. For pi and OpenCode,shell/shellPathis a hard dependency: a missingapexe-shdoes not fall back to the system shell, it stops the host from running any command, and the operator sees anEACCESfrom the host rather than anything naming apexe.--checkalready refused on the same problems;--writeprinted them and wrote anyway. Codex and Claude Code keep the system shell and are unaffected.apexe env --disablereports any host still configured to use the entry point it has just removed. It does not refuse: an uninstall has to remain possible.- Dependency floors moved to apcore 0.32.3, apcore-mcp 0.23.2, apcore-cli 0.13.0, apcore-a2a 0.8.4 and apcore-toolkit 0.14.1. No call sites change: apcore 0.32.1-0.32.3 are fixes only and its new cancellation scope APIs are additive, and apcore-mcp 0.23.x keeps the descriptor's runtime input schema, which is the side apexe's MCP builder already used. apcore-cli 0.13.0 leaves the man-page, module-detail and proxy-hazard APIs unchanged; its new embedded dispatcher and sandbox/stream/approval changes are outside apexe's own execution paths.
- Preview: an overlay can declare the routes it opens. A tool with no subcommands
keeps its flat
flagsspelling unchanged — at anyschema_version, including 2.0, since the version names the format generation and not the spelling; a single-command tool never needscommands[]. A tool with subcommands declarescommands[](path,mode,flags,positional_args,annotations) and saysschema_version: "2.0".global_flagsare the tool-level options inherited by every route and rendered before the subcommand, which the old singleflagslist conflated with the tool's own invocation.modemay be set per route (authoritativereplaces that route's scanned grammar,mergeadds to it). Behaviouralannotationsexist per route only: the file-level form markedgit pushreadonly whenever the file saidreadonly: true. Routes the overlay does not declare are dropped from the registry and recorded inmetadata.scan_inventory, shown byapexe list --diagnostics: they are not executable, not advertised, and--scannedcannot restore them, because declaring is permitting rather than describing. A flat overlay applied to a tool whose scan found subcommands is refused with a warning instead of silently closing every route. The reviewed corpus needs no change: 1.0/1.1 files are the flat spelling, which still means exactly one route. Verified ongit: a one-routecommands: [{path: ["status"], ...}]overlay makesapexe exec -- git status --shortreviewed and native while the other 141 routes stay closed and remain listed as inventory. This is a preview, not a published format.tool-overlay.schema.jsonstill pins1.0/1.1and rejectscommands[]andglobal_flagsas unknown properties, anddocs/overlay-consumers.mdstill specifies a single-command surface, so a 2.0 file validates nowhere outside this build. Use it locally throughapexe scan --overlayor~/.apexe/overlays/, and do not add a 2.0 file to the corpus until the schema and the consumer document describe the same surface. - Grammar trust is recorded per route instead of per tool.
apexe scanstampsmetadata.grammar: reviewed|scannedon every binding:reviewedonly when every flag the route can emit came from a curated overlay,scannedotherwise, including a route that declares no flags at all.eligible()and nativeapexe execnow read that stamp, so a reviewed route can be executed under amode: mergeoverlay — previously it took anauthoritativeoverlay for the whole tool, which also erased every subcommand (ToolOverlayhas no subcommand scope), leaving git-shaped tools with no usable path at all. A binding written before the stamp falls back toshim_contract.authoritative, which is the stricter of the two.apexe execadmits reviewed routes only: a--scannedshim policy is a shim policy, not a way to make native execution accept heuristics. Refusals now say what is actually missing —has no reviewed grammar for this routeinstead ofhas no matching authoritative overlay, and an unmatched shim path names the binding that exists and the policy that withheld it instead of advising a rescan that cannot help.
Fixed¶
- Ownership of an installed entry point and command shim no longer depends on
.apexe-shims.jsonalone. A link whose target is this executable is what apexe writes for both, so the link now proves what created it and an installation whose record was lost is rebuilt in place. make test-examplesbuilds the examples before validating them. It consumedtarget/debug/examples/<name>, which only a build produces and only as a by-product of the most recent one, so running the gate named byAGENTS.mdon any other tree failed for all three Rust examples.- A grant for a route a rescan no longer produces is retired.
merge_defaultreplaced only the ids in the current batch, so a curated overlay that narrowed its declared surface left the closed route's allow in the generated rule with nothing to match: dormant until the route was reopened, at which point it granted access nobody had reviewed. Exact ids belonging to the tools this batch produced modules for are now dropped; a glob, and a tool the batch never touched, keep their membership, so incremental scans stay non-destructive. apexe list --diagnosticsalso reports ACL targets that match no loaded module, next to the routes each overlay left closed. Those grants are usually a merge artefact and had no reporting surface before: the operator read a permission inacl.yamlthat no module could exercise. An installation with no policy keeps the document it always got — a bare map of tool to closed routes.- A coverage refusal reports
general_invalid_inputwithdetails.layer: coverageinstead ofgeneral_internal_error. The route is decided against the declared surface before the ACL is evaluated, so--error-format jsoncould not tell this refusal from a fault inside apexe and an agent had no remedy to apply. The last-resort route-miss message also stops describingapexe execas a shim, and now offers the overlay remedy before a rescan. - A tool that reuses one flag spelling on both sides of its subcommand is no
longer unparseable.
adapter::argv::Parserkept one flat spelling map per module, sogit -v(the version) andgit status -v(verbose) collided and every call to anygitroute failed withFlag '-v' names two propertiesbefore a single argument was read. Tool-level spellings (before-subcommandandbefore-operands) now live in their own namespace and are resolved by the side of the subcommand the token appears on, which is the distinction the parser already enforced on the value side;CommandMatcheruses the same rule sogit -C <dir> statuslocatesstatusat all. x-apexe-execis enforced on scanned routes. AScannedroute replays the caller's argv instead of rendering module input, sogit -c core.pager=<cmd> statusnever reachedreject_exec_parametersand ran the value as a command — the one guarantee the marker exists to keep. The check now runs on the parsed input that both tiers produce.- A native or shim route is no longer refused because a sibling route is
unusable, and a refusal now names the command path the caller selected.
route_candidatesvalidated every route of a command before any of them had been matched, so a single binding without an authoritative overlay refused the whole command and blamed whichever module sorted first:apexe exec -- git statusfailed ascli.git.add has no matching authoritative overlay, for a module the caller never asked for. Eligibility is now evaluated on the selected route only (check_route) and its refusal is prefixed withRoute '<command path>', sogit statusreportscli.git.statusandgit addreportscli.git.add. A route whose module is gone is likewise only reported when that route is the one selected. - Zsh activation now configures
.zprofilealongside.zshrc, including customZDOTDIRlocations, so noninteractive login shells used by Codex automatically resolve eligible commands through shims. Upgrade existing startup configuration withapexe env --reload --shell zshand restart Codex. Owned-block validation and cleanup apply to both files. apexe sh --checkincludes Codex and Claude Code startup guidance instead of the genericSHELL=apexe-shexample. Claude Code rejectsapexe-shasSHELL/CLAUDE_CODE_SHELLand falls back to/bin/zsh; start it with the shim directory already onPATH.
[0.9.0] - 2026-10-15¶
Added¶
- A portable apexe Agent Skill for Claude Code, Codex and pi, using reviewed
native
apexe exec -- <command> ...by default, module JSON when grammar alone is unavailable, and optionalenvshell integration. - A Python skill installer with project/user scope, per-agent destinations, idempotent reinstall, dry-run output and explicit overwrite protection.
- Repository-owned real CLI and example validators, integrated into the Rust
suite and
make check. The compiled Clap interface drives fail-closed coverage for commands, parameter spellings, positionals and enum values; newly added example entrypoints and Cargo example targets also require runtime scenarios. - Linux/macOS CI runtime gates with reviewed corpus checkouts, mandatory OS isolation, required shell execution, opt-in tests and uploaded JSON receipts. Validator regression tests cover missing coverage, failure propagation, Python optimization and descendant-process cleanup.
- Optional
APEXE_EXAMPLE_PORTfor the basic walkthrough, allowing independent test runs while retaining port 8000 by default. - Global
--error-format text|jsonfor versioned CLI failures on stderr, preserving domain codes, schema diagnostics, recovery guidance and trace IDs. Default text, help, success output and child exit statuses stay compatible. exec --input-file PATHreads one JSON object;--input-file -reads piped or redirected stdin. File/stdin input is capped at 1 MiB and shares inline-input validation and governance; source options and native argv are mutually exclusive.- The SDK structured-result integration (pending an apcore-mcp release) exposes object
outputSchemaand redactedstructuredContent, retaining JSON text. It negotiates2025-06-18, preserves legacy2025-03-26, and chooses HTTP fields per protocol-version header. Result schemas are validated after redaction without disclosing invalid payloads. The SDK implementation lives in apcore-mcp-rust; apexe retains its normal Cargo dependency. apexe initinitializes matching installed CLI tools from the configured rules source.--overlaysselects a Git source,--refpins a revision,--refreshupdates rules and unchanged init-owned bindings, and--offlineuses cached/local rules. Reports distinguish missing tools, unmatched variants, preserved bindings and degraded fallback coverage. Manual ACL/configuration and custom or edited bindings are preserved.- Native
apexe exec -- <command> [args...]reuses shim route resolution and the common executor without shell activation. Reviewed calls preserve streams and exit status, check executable identity and never fall back after refusal.--unmanaged deny|allow|approvaldefaults to deny; explicit opt-ins retain ACL/audit/timeout with literal argv, null stdin and no typed path guard. apexe verifysupports digest-pinneddry_runandisolatedcases. Dry-run execution requires explicit--allow-dry-run, a true reviewed switch and operating-system isolation. macOS usessandbox-exec; Linux uses optionalbwrapwith private namespaces and read-only system mounts. Unavailable required isolation is reported as unverifiable without case execution.--recordpersists case-scoped evidence. Binding loads validate binding, executable, case-file and verifier fingerprints before attaching runtime confidence. Failed, missing or stale evidence cannot retain an earned verdict. Existing binding documents and ordinary approval annotations are preserved.- Verification guide, runnable disposable CLI example, and regressions for filesystem/network boundaries, dry-run admission and evidence invalidation.
apexe env --enableinstalls shims and configures automatic activation for new terminals in one step, with shell detection, startup-file overrides and idempotent managed blocks.--reloadrefreshes the command set while retaining installed binding/ACL/filter settings, or automatically enables when no installation exists.--disableremoves owned shims and startup blocks, preserving other configuration and succeeding when already disabled.apexe verifycompares fresh pre-overlay source contracts with stored binding baselines, classifies drift, and never overwrites the baseline. Explicit readonly behavioral cases for system cat/head/ls run in temporary HOME/work directories through governed execution. Reports record binding, executable and case SHA-256 digests, separating earned case evidence from overlay claims.- A2A token/JWT authentication uses the existing transport credential policy. The CLI defaults to token auth; explicit unauthenticated public binds still require acknowledgement. Authenticated refusal reasons remain masked.
- Stage 2 local execution:
apexe env --enablecreates governed external-command links and configures automatic shell activation. The strict native argv resolver supports declared aliases, bundles, attached values, typed scalars, arrays and subcommand routing throughcommand_path; unresolved arguments never bypass governance. Missing or ineligible modules refuse without a native fallback. - Passthrough output with an explicit null/inherited stdin capability, distinct status-only results, exact child exit codes and restored POSIX SIGPIPE. Both scanning and children strip managed shim directories from PATH.
- Overlay format 1.1 declares stdin, bundling and cross-flag ordering. Format 1.0 remains scan-compatible; shim admission requires explicit order independence. The companion corpus adds locally verified BSD cat/head/ls capabilities and corrects 16 missing ls conflict pairs found by native order probes.
apexe exec <MODULE_ID> --input <JSON>: governed local execution with captured JSON output, thelocalACL caller, automatic default ACL loading and a non-executing--dry-run.--asis restricted to simulation. Schema, ACL, approval and path-guard checks remain active; refused preflights print JSON.- MCP and A2A accept
--openapiJSON/YAML files or specification URLs alongside CLI modules. Imported HTTP operations default toapi.*, share schema/ACL/ approval/audit controls and honor surface filters. Specification headers and upstream API bearer tokens are kept separate from transport credentials. - Bindings record an apexe scan-format version; loading a missing or incompatible version warns per module and asks for a rescan.
- Compatibility regressions for strict binding validation, custom metadata round trips, and native validation diagnostics (root, nested array, and escaped JSON Pointer paths) through the shared executor and both adapters.
Fixed¶
- Verification probes use a portable system shell instead of macOS's missing
/bin/true. Governed verification children keep temporary files inside their isolated work directory, so the path guard permits intended fixture writes. The macOS profile permits data writes to/dev/nullfor ordinary stream redirection while retaining its filesystem and network restrictions. - Verbose module listings expose validated
x-confidenceandx-verificationextensions. The verification example reads the existingmodulesenvelope and SDK-rendered IDs correctly and exercises real isolation and invalidation. - Verification digests sort object keys recursively, preserving array order, so valid recorded evidence survives independent CLI processes even when SDK dependencies enable insertion-ordered JSON objects.
- Reject global timeout values that cannot be represented in milliseconds; MCP, A2A and unmanaged execution report oversized configured timeouts instead of overflowing during server or module construction.
- Correct the programmatic example documentation to describe its actual server construction and tool export without claiming a readonly filter.
- Generated
json_outputschemas accept every JSON root parsed by the executor, preventing valid arrays, scalars and null from failing output validation. Raw stdout and the object result envelope remain compatible. Existing generated bindings with an object-only constraint need a rescan or an owned init refresh. - A2A assembly preserves apexe's configured logging middleware instead of adding
the SDK's payload-logging defaults.
--no-loggingand--no-log-argumentsnow control A2A call logging consistently with MCP, without duplicate loggers. - The CLI's logging switches also suppress MCP SDK call-router diagnostics,
which independently logged arguments and executor-error text. Payload
suppression remains effective at debug/trace levels and with
RUST_LOG. scanandverifynow honor configuredscan_depthwhen--depthis absent, while explicit CLI values continue to take precedence.- Generated bindings honor
json_output_preferencefor schema-declared output switches. Captured execution respects explicit alternatives and flag ordering; native output is preserved. Existing bindings need a rescan or owned refresh. Source drift baselines retain the underlying CLI defaults. - JSON module listings preserve their array or verbose envelope when no modules exist or availability filtering removes every module.
apexe configwithout an operation now shows resolved YAML instead of silently succeeding without output.- Installation guidance recommends the CI-tested stable Rust toolchain rather than claiming unsupported Rust 1.75 compatibility.
- Docker scanning recognizes common, management and swarm command groups,
plugin markers, typed option sections and inline usage. Repeated commands are
discovered once, including nested management commands such as
container ls. - Cached rules are matched by repository identity rather than the reserved default corpus name, so changing the configured source cannot refresh the previous repository by mistake.
- Initialization preserves custom bindings excluded by
bindings.patternand refuses newly generated filenames that the configured loader cannot read. - Unix diagnostic log directories restrict access to their owner, including existing directories with broader permissions.
- Published documentation includes the example guides and rebases internal, source and asset links. Strict publication also checks heading anchors.
- The Makefile, pre-commit hook and CI enforce formatting, lint, characters, a full build and the complete test suite consistently.
- A2A JSON-RPC notifications execute without replies; explicit null IDs still receive responses. A2A 1.0 stream and agent-card spellings remain unchanged.
- Correct #42's earlier attribution: apcore-a2a provides an
Authenticator; apexe now wires it for token/JWT identities. Unauthenticated public binds still require acknowledgement. Agent Card version comments describe the SDK.
Changed¶
- Apply Agent Skill routing from the first terminal call, including initial inspection and readonly probes. Cover OpenCode's shared Skill discovery and distinguish host ACL-reading permissions from apexe policy decisions.
- Make the shared Agent Skill the default external CLI execution route in projects or tasks declaring apexe governance, including ordinary terminal requests. Document project instructions, routing boundaries, coverage gaps and refusal handling without implying compulsory shell interception.
- Lead terminal-agent onboarding with the shared Skill and native exec. Keep
MCP/A2A as protocol/API integration options and distinguish the workflow Skill
from command-specific output generated by
scan --skills-dir. - Reposition apexe as governed execution for CLI tools and HTTP APIs. Align package metadata, CLI help/man pages, README and documentation with local execution, reviewed PATH shims, MCP/A2A, OpenAPI import and CLI verification. Clarify policy activation, native coverage and verification isolation scope.
- Upgrade published SDK requirements to apcore 0.32.1, apcore-a2a 0.8.3, apcore-cli 0.12.4 and apcore-mcp 0.23.0; refresh Cargo.lock while retaining apcore-toolkit 0.14.0.
- Enable the SDK's structured MCP results through the normal Cargo dependency.
Modern clients receive
outputSchemaand redactedstructuredContentalongside JSON text. Legacy clients retain text-only results; HTTP capabilities remain request-scoped. Referenced sensitive fields use core 0.32.1's redaction fix. - Synchronize the integration design, feature manifest and guides with the published SDK interfaces and supported schema/protocol versions.
- Help leads with initialization, discovery and execution, groups global options, gives readable argument labels, and includes native/module and shell examples. Existing command and option names remain accepted.
- Documentation states the negotiated MCP protocol and the current text-result contract, distinguishing it from newer optional structured-output capabilities.
- BREAKING: remove
apexe overlays; source installation, pinning and refresh move toapexe initoptions. README and quickstart now lead with initialization, followed by list, exec, env and serve; custom scanning is an advanced workflow. - BREAKING: rename
apexe runtoapexe execwith no compatibility alias. Module JSON execution now preserves the exact child exit status as well. - BREAKING: source-derived flag confidence is capped at
high; the corpus's legacyverifiedlabel remains a provenance-backed author assertion.Confidence::Verifiedis reserved for earned, explicitly scoped runtime case evidence with matching digests. - BREAKING:
apexe envremoves the legacy--load,--unload,--install,--initand--uninstalloptions. Use--enable,--reloadand--disable; callingapexe envwithout an operation still prints shell activation. - Upgrade SDK requirements to apcore 0.32.0, apcore-toolkit 0.14.0, apcore-cli 0.12.3, apcore-mcp 0.22.3, and apcore-a2a 0.8.2, all from published crates.io packages.
- Binding loading inherits toolkit 0.14.0's stricter validation: unknown
document/entry keys, unpaired inline schemas, and non-list tags fail loading.
Custom entry fields belong in
metadata; runtime-onlyauto_schemaandschema_refremain unsupported. Generated bindings already use paired schemas and list-valued tags. - Core governance gate binding, cancellation, logging redaction, and registry fixes are inherited through existing APIs. No executor or protocol routing changes are required. Schema validation diagnostics now retain canonical JSON Pointers through both MCP and A2A error adapters.
[0.8.0] - 2026-09-29¶
Added¶
- A binding records the apexe that wrote it.
metadata.generated_byis nowapexe <version>in every binding file. Nothing reads it yet, which is the point: a release that adds a contract keyword cannot distinguish a file written before the keyword existed from one written after, because the keyword is simply absent either way. 0.7.0 shipped the path guard, the approval gate and log redaction all keyed onx-apexe-*, so a binding written by 0.6.x was served with every one of them silently inert — and no mechanism existed, or could exist, to notice. On the machine this was found on, 166 of 166 bindings were in that state.
Recording the producer is the half that has to come first, and this release is the moment it is free: the bindings.dir move above means every install is re-scanning anyway, so the next release's check has something to read for 0.8.0-era files. Skipping it would push the same blind spot one release further out with no forced rescan to hide behind. test_the_generating_version_round_trips_through_a_binding_file pins that the value survives write-then-load, since a producer stamp that does not round-trip is worse than none.
- A bindings directory that yields nothing now says so, and names the previous default. A server with zero modules has no callable tools, and that arrived silently: the registry warned only when the directory was missing, and
apexe listprintedNo modules foundwithout saying why.src/module/registry.rshad even named the gap in a comment — an empty directory is "the other way to end up with a server that serves nothing" — and then handled only the filter case.
The bindings.dir move turns that from a possibility into a certainty for every existing install, so warn_if_no_bindings is called from both places a user reaches (apexe serve/apexe a2a and apexe list) and, when the pre-0.8.0 modules sibling still holds *.binding.yaml, names both paths and says to re-run apexe scan. Verified end to end against that exact layout.
A declared bindings.dir is never given a legacy sibling. The hint fires only for a directory actually named bindings whose modules sibling holds bindings: an operator who pointed the key at a directory of their own never upgraded from a modules beside it, and guessing one would name a path that was never apexe's — including when such a directory happens to exist, which a test pins.
bindings.patternis honoured, completing the alignmentbindings.dirstarted. apcore-toolkit 0.12 addedBindingLoader::load_with_pattern, closing aiperceivable/apcore-toolkit#18 — the loader previously hardcoded*.binding.yamlwith no parameter, so a consumer needing its return value rather than apcore's registration side effect could resolve the key and not apply it. apexe is that consumer: it converts eachScannedModuleinto its ownCliModule, so apcore's config-aware loader would bypass every controlCliModuleexists to apply. The glob is now read from the sameapcore.yamlasbindings.dir, on the same declared-only terms, and threaded to the loader throughExecutorOptions::bindings_patternandMcpServerBuilder/A2aServerBuilder::bindings_pattern.
apexe holds no copy of the default. There is no apexe config key and no fallback string: when nothing declares the key, None reaches the toolkit loader and it applies the identical canonical *.binding.yaml itself. A value apexe does not hold cannot drift from apcore's. The declared-only guard matters for the same reason it does for bindings.dir — Config::get answers the canonical default for a configuration that declares nothing, so without it every machine merely having an apcore.yaml would look like it had chosen a pattern.
overlay_dirs: overlay directories beyond~/.apexe/overlays/. The user overlay directory was hard-coded as<config_dir>/overlaysandconfig.rsdid not mention overlays at all, so the only ways to add a curated overlay were to copy files into the operator's own directory or to name one file per invocation with--overlay. Neither works for a corpus somebody else maintains — a team policy repository, a checked-out data set, a plugin that ships overlays — because both mix third-party content into a directory apexe also treats as the operator's scratch space, and neither survives the corpus being updated.overlay_dirsinconfig.yaml(orAPEXE_OVERLAY_DIRS,:-separated likePATH) names extra directories to read. Additive by construction, likeadditional_denied_paths: the personal directory is always read and no setting removes it.
Order is load order, and later wins, which is the part that needed deciding rather than just implementing. Configured directories are read first, in the order listed, and <config_dir>/overlays is read last, so a hand-written local file shadows a distributed corpus describing the same (command, variant) — the same rule that already governs built-in versus user overlays: the source closer to the operator ranks higher. --overlay still wins outright. That tie-break was previously an implicit property of OverlayStore::select using max_by_key, which keeps the last of several equally-ranked entries; nothing said so and nothing tested it, so a refactor to min_by_key, a sort, or a HashMap would have silently inverted the precedence while every other test stayed green. test_last_loaded_dir_wins_among_equally_ranked_overlays now pins it.
A configured directory that does not exist is a warning, not silence: load_dir already treats a missing directory as Ok(0), which is right for the personal directory (most installs never create one) and wrong for a path an operator typed, where it is indistinguishable from an empty directory. Each loaded directory logs its file count so an operator can confirm a corpus was actually picked up. Verified end to end against a real apexe scan: via config.yaml, via APEXE_OVERLAY_DIRS, with two directories where the later one wins, and with a missing directory that warns and lets the scan continue.
-
~/.config/apcorejoins the credential baseline. apcore-toolkit's device-authorization flow persists OAuth access and refresh tokens to~/.config/apcore/credentials.json($XDG_CONFIG_HOME/apcore/on Linux,%APPDATA%\apcore\on Windows), a location its spec fixes normatively. apexe protects credential stores rather than directories that happen to hold one — which is why~/.config/ghand~/.config/gcloudare listed individually while~/.configitself is not — and this is one of those stores. Added ahead of anything writing there, deliberately: a baseline entry for a path that does not yet exist costs nothing, while the reverse ordering leaves a window in which apexe wraps tools able to read a credential apexe does not know exists. That blind spot is the one aiperceivable/apcore-toolkit#17 called out for tools in exactly this position, and closing it is the whole reason the toolkit's storage path is normative rather than per-SDK. Documented in the user manual's protected-paths table and the threat model, which a test enforces — the baseline is a security boundary operators read about before relying on it, so a list entry with no documentation reads as unprotected. -
sedoverlays for thebsdandgnuvariants, contributed to the cli-permissions corpus (they were written here before the corpus moved out, below). Bothauthoritative+verified. BSD was checked against macOS 26.5.2's/usr/bin/sed, with the option set closed by the getopt(3) stringEHI:ae:f:i:lnruread out of the binary; GNU against Debian's sed 4.9 and re-checked against Homebrew's 4.10, with the long-option table enumerated rather than transcribed —getopt_longresolves an unambiguous prefix and names the candidates for an ambiguous one, so sweeping--<letter>over a-z closes the set at 18 options and catches two that--helpdoes not list at all (--binary,--zero-terminated). The traps each variant carries are recorded inprovenance.notes, chiefly that BSD's-irequires its extension operand while GNU's forbids separating it —-i.bakis the only spelling that works on both — and that thewfunction truncates its target before any input is read, on both variants, with no-ianywhere on the command line. -
LICENSEwas missing.Cargo.tomldeclaredlicense = "Apache-2.0"and the README carried the badge, but the repository shipped no licence text at all — so the one artifact that makes the declaration actionable was absent from every clone, tarball andcargo package. Added.
Changed¶
- Breaking:
modules_diris gone; binding files live where apcore'sbindings.dirsays. apcore 0.30 madebindings.dirthe canonical key for this (PROTOCOL_SPEC §9.1.1) and apexe carried a second one for the same thing. Two keys for one directory is a question with no good answer the moment they disagree, so apexe's went away rather than being kept as an alias — there is no external user to migrate and an alias would have preserved exactly the ambiguity worth removing.
The default path changed with it, from ~/.apexe/modules to ~/.apexe/bindings, following apcore's. An existing install keeps reading the old directory only if something declares it; otherwise bindings written before this release are not found and a rescan writes them to the new location. Config::bindings_dir is the field, and apply_core_bindings reads apcore.yaml.
Only a declared value is adopted. CoreConfig::get answers the canonical default for a configuration that declares nothing, so reading it unconditionally would make every machine that merely has an apcore.yaml look as though it had chosen a directory. The guard compares against CoreConfig::default_for and ignores a value equal to it — the same terms bindings.pattern later reuses.
Also in this upgrade (apcore 0.29/0.30, apcore-toolkit 0.11.1, apcore-mcp 0.21, apcore-a2a 0.7, apcore-cli 0.12): ACLRule became #[non_exhaustive], so six struct literals move to ACLRule::new; ModuleError::new now resolves a default retryable from the error code (apcore-rust#36), which apexe's guarantee that a killed non-idempotent command is never auto-retried had to be re-checked against.
- apcore-toolkit 0.13.0, apcore-mcp 0.22.1, apcore-a2a 0.8.1, apcore-cli 0.12.2. No apexe code changed. The toolkit bump is forced rather than optional: all three sibling crates raised their
apcore-toolkitfloor to>=0.13, which apexe's^0.12could not satisfy. apcore stays at 0.31.0.
Both of toolkit 0.13.0's breaking changes are outside apexe's surface. OpenAPIScanner's module IDs are now normalised into apcore's Canonical ID alphabet (Algorithm A02) — apexe derives its own IDs from scanned CLI commands and never calls that scanner. BaseScanner::scan became fallible, closing apcore-toolkit-rust#4; apexe implements no scanner trait. The three patch releases each exist only to adopt the toolkit's normalisation in their own OpenAPI backends, a surface apexe does not use either.
sanitize_id_segment is not an A02 implementation, and should not be compared to one. A02 (§2.2) normalises an identifier its author chose and rejects what the grammar cannot hold — the right answer when the author can rename it. CliToolConverter::sanitize_id_segment takes a name nobody can rename (7z is what 7-Zip is called) and must return something servable, so it repairs: it is the spec's other operation, the snake_case of §2.1.1, whose closest sibling is apcore-toolkit's own normalize_module_id. Against that sibling it agrees on every point — ASCII-scoped, a run of _ carried through rather than collapsed, idempotent — and differs on one: for a digit-leading name the toolkit warns and emits an illegal id where apexe prefixes (7z → t7z). Both are right for their own input domain, and the analysis behind this is aiperceivable/apcore#122; replacing apexe's copy with an exported upstream one is aiperceivable/apcore-toolkit#19. The contract is now stated on the function and asserted by test_sanitize_id_segment_holds_its_contract, because it was previously true and untested — the same gap that let apcore-python and apcore-rust collapse __ while their CI stayed green.
- Overlay
binary_globsmatching delegates to apcore's Algorithm A25, and the hand-rolled matcher is deleted — which fixes a bug.adapter::overlaycarried its own 25-line*/?matcher, justified when written by keeping "the adapter layer dependency-light"; apexe depends on apcore already, so that reasoning was void. apcore 0.31 promotedmatch_globto the spec's single glob dialect (PROTOCOL_SPEC §9.2.3), replacing three that disagreed, and it is reachable asapcore::utils::match_glob.
The swap was not taken on faith. A differential run over 87,067,561 pattern/value pairs drawn from a metacharacter-rich alphabet found apexe's matcher wrong on 154,668 of them and apcore's wrong on none: apexe checked literal equality before the wildcard branch, so a * in the value was consumed as a literal and the pattern * failed to match any path containing one. Every divergence needed a metacharacter in the value — zero when the value was a plain path — which is why no existing test caught it, and a Unix path may legally carry one. The failure direction was safe (a missed match means the overlay does not apply and the scan result stands) and there were no false positives, so adopting A25 can only add matches, never remove one.
- The generated ACL gained an open-world tier, and the auto-allow rule no longer covers a command that reaches the network.
apexe scanclassified modules into two buckets —readonly→allow,destructive→deny— and everything else, including every networked command, was denied bydefault_effect: denywhile matching no rule at all. On a stock policy that is the right outcome reached the wrong way. It stops being right the moment an operator setsdefault_effect: allow, where silence becomes blanket network access; and it leaves an operator who wantsgit fetchback with no rule to edit, only the option of discovering by trial which module ids were denied by the absence of a rule.open_world_idsnow builds a third unconditionaldenyrule ("Block open-world CLI commands by default"), carried throughmerge_defaultlike the other two. On a realapexe scan git curlthis movescli.git.clone,cli.git.fetch,cli.git.pull,cli.git.pushandcli.curlout of "matched no rule" and into a named one; the readonly and destructive rules are unchanged.
readonly_ids now excludes open_world modules. readonly is a claim about local state — the command does not modify the machine — and says nothing about what it sends; a read that reaches the network is the exfiltration shape, not the safe shape. Rule evaluation is first-match-wins and the readonly allow is written before the open-world deny, so a module in both lists would have been allowed by whichever rule came first — a correctness question settled by list order, which is what breaks silently when a rule moves. The three lists are kept disjoint instead (a destructive open-world module is listed once, under destructive), so no ordering makes the policy wrong, including in a file whose rules an operator has since rearranged. Inference alone never produces readonly + open_world — the two name lists do not intersect — so this closes a latent case rather than a live one, and the case became reachable when open_world joined the overlay schema in this same release.
Deliberately not allow + approval: required, which is the other defensible reading of "the network needs a human": that loosens the shipped default from deny to allow-with-a-prompt, and being reachable is a decision an operator should make explicitly rather than inherit from a generated file.
One trap found while testing, worth recording because the next person will hit it: apcore's ModuleAnnotations::default() sets open_world: true (MCP's conservative openWorldHint). The ACL test fixtures built annotations with ..Default::default(), so adding the !open_world filter silently emptied the auto-allow rule in three existing tests. Real modules are unaffected — annotations::infer always sets the field explicitly, verified against a live apexe scan git curl — but the fixture helper now sets it explicitly too, the same fix adapter::contract's helper already carries for the same reason.
- The overlay schema moved to the corpus repository as well, and apexe stopped compiling it in.
tool-overlay.schema.jsondefines the corpus (which left too — see Removed), so it belongs beside it; the$idis nowhttps://aiperceivable.github.io/cli-permissions/schemas/tool-overlay.schema.json. Nothing referenced the old URL — no overlay carried a$schemaline, because until this release the format forbade it — so the change costs no migration, and it is the last moment it is free.
The tests that guard the schema against drifting from the Rust types resolved it with include_str!, which would have recreated exactly the hard build coupling the overlay move was undoing. They now read it beside the corpus (APEXE_TEST_CORPUS's parent, or a sibling checkout) and skip when it is absent. schema_enum returns Option rather than an empty Vec for that reason: an empty list compares unequal to the Rust variants, so the empty-vec version failed on a checkout that simply had no corpus next to it — a developer without one, not a drifted schema.
One bug found on the way, worth recording because it compiles: for example in schema_enum(..) kept working after the return type became Option<Vec<String>>, because Option implements IntoIterator — it silently iterated the Option, not the Vec inside it.
Removed¶
- apexe no longer carries overlays at all. The previous release vendored the corpus here and kept it in step with a checker — two maintained copies of the same 44 files, which is the smell that motivated this.
BUILTIN_OVERLAYS, theinclude_str!list andoverlays/are gone; the corpus is the cli-permissions repository and apexe reads it like any other consumer.
What a user loses without it was measured, not assumed. Scanning with no overlays at all: rm keeps destructive and requires_approval — name-based inference still catches it — while conflicts_with and long_running drop to zero across the board, since overlays are their only source, and tail's readonly flips true to false. So the degradation is precision, not safety, and it moves annotations toward the conservative side rather than away from it. That is what made removing them acceptable; keeping a second copy to avoid it was not worth the drift risk.
New: packaged_overlay_dirs. $XDG_DATA_HOME/cli-permissions/overlays, /usr/local/share/…, /usr/share/…, and Homebrew's prefix on macOS, all read before overlay_dirs and <config_dir>/overlays. Without them, a corpus installed by a package manager would do nothing until the user discovered overlay_dirs and wrote a config file — the search paths are what make "install the package" sufficient. They rank lowest of the three sources, so a local correction always wins.
Tests resolve the corpus rather than assuming it. APEXE_TEST_CORPUS names it and CI sets that; otherwise a sibling cli-permissions checkout is used, which is the ordinary local layout. Set but pointing nowhere panics instead of skipping: a test that silently skips forever reports green while covering nothing, and these are the tests asserting the facts no scan can recover. A separate corpus CI job checks the corpus out and runs with the variable set, deliberately its own job — a corpus that cannot be fetched should fail visibly and alone rather than taking the other ~990 tests down with it.
test_every_overlay_file_is_registered_as_a_builtin is removed with the list it guarded — it was added earlier in this same cycle to close the one unguarded direction of that duplication, and deleting the duplication outright is the better answer.
docs/overlays.md keeps the "Where the file goes" section that work produced, now separating the two destinations that remain: ~/.apexe/overlays/, and a corpus directory named by overlay_dirs.
- The ACL inert-rule detector, which apcore 0.29 made unreachable.
validate_acl_rulescarriednever_matchesfor acallers/targetslist apcore's matcher could never satisfy —[], a bare$or, a bare$not— filed as apcore#112 and closed upstream by refusing that shape at every door:ACL::loadandtry_newreturn an error, the infallibleACL::newandadd_rulepanic. Both apexe doors go through one of those, so no such rule could reach the detector from a file or from a library consumer; it was unreachable code asserting a guarantee upstream now makes.
Removing it is a net gain in the diagnostic too: apcore's refusal names the field and says what to write instead (['*'] for "everything", or delete the rule for "nothing"), where apexe's said only that the list was empty. InertRule and AclValidationReport::inert_rules are gone from the public API.
Near-miss detection stays, because apcore does not do it and cannot: a rule naming cli.git.cat-file when the registry holds cli.git.cat_file is well-formed by every upstream check and still guards nothing — that needs the registry, which only apexe has at that point. Three tests that asserted the removed detector are replaced by one that pins apcore's refusal at both doors in both directions, so an upstream regression reopening the hole fails here rather than passing silently.
Fixed¶
- A corpus correction was masked by a warm scan cache. The scan cache stored the document after the curated overlay was applied, and a cache hit returned early — before the overlay layer ran at all. The cache key is the tool's name, variant and version plus a compiled-in
SCAN_FORMAT_VERSION, so nothing in it changes when an overlay is corrected. Update the corpus, re-runapexe scan sort, and the pre-correction contract came back at exit 0; the only trace was aninfoline readingUsing cached scan result, which says nothing about the overlay being skipped.--no-cachewas the only escape and nothing pointed at it.
This was sound until this release. While overlays were compiled in with include_str!, correcting one required a new build and bumping SCAN_FORMAT_VERSION was how that reached a warm cache — history entry 3 of that constant is exactly such a bump. Moving the corpus out (see Removed) voided the mechanism and left the rationale behind in a comment. The corrections shipped in this same release are the ones it would have suppressed: sort, find and xargs gaining open_world: true, plus the 36 overlays that newly assert open_world: false by enumeration. A host with a warm cache would have kept emitting openWorldHint: false to every MCP client and kept cli.sort out of the generated open-world deny tier.
The fix splits the cache by what the value is a function of, rather than widening the key. Tiers 1–3 are a function of the binary, which is what the key names, so they are cached. Tier 4 is a function of the corpus, so apply_curated_layer runs after every read instead — on a hit and on a miss alike. Widening the key with an overlay digest would also have worked, but it keeps a value in the cache that the key cannot describe, and it makes a corpus correction cost a full rescan (re-running --help, the man page and completions) where re-applying an in-memory overlay costs nothing. SCAN_FORMAT_VERSION goes to 4 because a document written by 3 has tier-4 data baked in; it is the last bump an overlay change will ever need.
test_a_corpus_correction_is_not_masked_by_a_warm_cache reproduces the original report end to end — warm the cache with no overlay, add one, re-scan with the cache still warm — and additionally pins the invariant the behaviour rests on: a cached document names no overlay and does not claim the curated tier. Checked to fail with the previous ordering restored.
-
The threat model had no entry for a binding older than the control it feeds. The path guard, the approval gate and log redaction all read keywords out of the schema (
x-apexe-path,x-apexe-escalates,x-sensitive), so a binding written before a keyword existed leaves that control with nothing to act on. §5.8's first bullet looks like it covers this and does not: there the scanner cannot infer the type and no rescan helps, whereas here the scanner infers it fine and the file merely predates it — a rescan fixes it completely, and reading the two as one would leave an operator concluding there is nothing to do. New §5.10 states it, with the measurement that made it concrete (166 of 166 bindings on the development machine, all three controls inert across the whole registry), and §6 gains the deployment step it implies: rescan after every apexe upgrade. §5.11 is the renumbered F8 reservation. -
docs/overlays.md's flag-diff command pointed at a deleted file. The verification procedure — whichCLAUDE.mdnames as the single source for it — told an author toopen('overlays/[email protected]'), a path this release removes. It now names the file as the corpus holds it and says which directory to run it from. -
An unauthenticated call's
caller_idsurvives apcore 0.31. apcore 0.31 stopped synthesizing anIdentityfor a call that supplied none (decision D-103) — correctly, since a module written to the spec's ownif not context.identity: raiseexample was being admitted by the manufactured principal. It marks such a call by settingContext::caller_idto@externalinstead. apexe readidentityalone, so after the upgrade every unauthenticatedexecutionandrefusalrow would have omittedcaller_idwhile apcore's ownacl_decisionrows for the same call kept recording@external— two record kinds in one file disagreeing about one caller, which is worse than either answer alone.
A shared governance::audit_caller_id now resolves identity first and Context::caller_id second, and both halves are load-bearing. identity comes first because Context::caller_id names the calling module in a nested chain, so preferring it would report the wrong thing for an authenticated call. Nothing is invented: @external is apcore's value, read rather than guessed, and a call carrying neither field still records no principal.
No test caught this, which is why it is recorded as a fix rather than an upgrade note: the audit tests passed @external in explicitly, and nothing drove an unauthenticated call through to a record and asserted the field. Three tests now pin all three paths — authenticated, unauthenticated, and neither.
- An overlay can now assert
open_world. The other four behavioral annotations were already overridable from an overlay; this one was not, and it is the one that needed it most.open_worldis the only annotation inferred from a name list rather than from the command's own scanned surface — an executable inOPEN_WORLD_TOOLS(curl,ssh,rsync, …) or a networked subcommand inOPEN_WORLD_SUBCOMMANDS(push,clone,login, …) — which makes it a floor that cannot see a boundary a name does not advertise, and, worse, cannot express a boundary that differs between variants of one name. GNU sed runs the replacement as a shell command fors///e(printf 'x\n' | sed 's/x/echo PWNED/e'printsPWNED;--sandboxrefuses it withe/r/w commands disabled in sandbox mode), while BSD sed rejects the flag outright withbad flag in substitute command: 'e'. One name, two answers.docs/user-manual.mdalready told authors that "an overlay'sannotation_overridesis the way to state the truth for a specific one" — the schema and theAnnotationOverridesstruct simply did not carry the field, so that instruction could not be followed.
The previous behaviour was silent rather than diagnosed, which is why this is a fix and not a feature. tool-overlay.schema.json set additionalProperties: false on annotations and listed only the four, so an overlay naming open_world was invalid — but nothing enforces that schema at load time (validate_overlay is hand-written Rust, not a JSON Schema check), and AnnotationOverrides does not set deny_unknown_fields, so serde dropped the key without a word. An overlay asserting open_world: true therefore loaded, applied its other annotations, and emitted open_world: false into the binding with no error and no warning.
Added to the schema's annotations block, to AnnotationOverrides as Option<bool> (unset still leaves inference alone), and honoured in apply_annotation_overrides. Both directions work: an overlay can raise open_world on a command no name list catches, and clear it on one a name list catches wrongly. The corpus's sed@gnu asserts true and sed@bsd asserts false as a checked negative, each with the probe recorded in provenance.notes. Note that this only changes what an overlay can say; risk_from_annotations already read the field, and destructive still outranks it when the annotations are reduced to one Risk.
- An overlay can carry a
$schemaline, and the format now documents itself for consumers other than apexe.ToolOverlaysetsdeny_unknown_fieldsand the standalone schema setsadditionalProperties: false, so the one line every editor looks for —"$schema": "…"— made a file fail to load outright withunknown field \$schema`. A format that cannot point at its own definition is a hard thing to hand to an outside implementer, which is what this release starts doing. The field is read by tooling and by nothing else: the loader neither fetches nor validates against it (validate_overlay` is hand-written Rust, not a JSON Schema check), a file naming some other schema still loads, and the line round-trips so a rewritten overlay keeps it. Both halves are tested, because the schema refusing what the loader accepts is the same defect in the other direction.
A second consumer now exists, and it found gaps. A Python script in the
cli-permissions corpus repository derives agent permission rules from an
overlay directory, written against the schema and the consumer guide alone —
different language, no shared code, no dependencies. It works: 22 commands
derived, including probe-based variant selection on a macOS host where every
path and platform signal says BSD and only running the binary distinguishes
GNU sed, whose open_world the BSD variant does not share. What it could not
read off the data is now docs/overlay-consumers.md §8 — chiefly that no
derivation rule exists from annotations to a permission tier, so two consumers
can reach different policies from the same corpus, and that the format has no
annotation for "creates", leaving mkdir and touch indistinguishable from
"nobody said".
mode and confidence are described in terms of the data rather than apexe's scanner. mode said "replaces the scan result" — true of apexe and meaningless to anyone else; the underlying assertion is complete enumeration versus partial patch, which any consumer holding a weaker description of the same command can act on. confidence named a trust level without saying what earns it; the four levels are now defined by the evidence behind them (verified = read off the running tool with a re-runnable check recorded, down to low = one unconfirmed source), with the note that they describe evidence rather than the author's certainty — writing from knowledge of a tool is low however sure the author is. No field changed shape and all 44 shipped overlays still validate.
New: docs/overlay-consumers.md. The reading half of docs/overlays.md, and the knowledge that until now existed only in apexe's source: how match is evaluated and why a declared-but-failing probe rejects an overlay outright rather than degrading to a path match, what authoritative obliges a consumer to discard, and the four fields that decide an argv — value_optional (attached spelling only), conflicts_with (unordered input has no last-one-wins), before_operands/before_flags (find puts two classes of dash-token on opposite sides of one operand), and end_of_options. It also states the two traps the corpus itself produced: readonly is not "safe" once open_world is set, and a command can destroy without any destructive-looking flag.
- An absent annotation now has a defined meaning, and the corpus states all five. The schema requires none of the five behavioural fields, so an overlay could omit one and a consumer had no rule for what that meant. In most languages the natural expression (
if annotations.get("open_world")) reads the absence as a denial, which is the unsafe direction — and it is not hypothetical: the reference consumer shipped with exactly that bug, andsortis the command it hid.docs/overlay-consumers.md§6 now states that absent means unknown and must not be read asfalse, and that a consumer with no inference of its own must take the conservative reading of a consequential property it does not know.
Stating the rule made the cost measurable. With open_world unstated across 38 of 44 overlays, the reference consumer could not justify a single blanket allow — not for cat, not for wc. The 36 remaining overlays now assert open_world: false by enumeration rather than assumption: each is mode: authoritative, so the flag list is the complete option set and the question "can any invocation reach off the machine or run another program?" is answerable from the overlay, with the method and its dependence on the completeness claim recorded in each provenance.notes. All 44 now state all five, and the derivation recovers its 9 allows.
-
sortreaches outside the machine, and the corpus did not say so.--compress-program=PROGruns PROG: sort spills to temporary files past its buffer and pipes each through the named program. Verified by execution rather than by reading the flag list —printf '#!/bin/sh\necho EXECUTED >> /tmp/proof.txt\nexec cat\n' > /tmp/marker.shthensort -S 1k --compress-program=/tmp/marker.sh /tmp/big.txtwritesEXECUTED.-S 1kis load-bearing: at a default buffer the input never spills and the program is never run, which is why a casual check finds nothing. Bothsortoverlays now assertopen_world: true. No access decision changes —sort -oalready made themdestructive— butopenWorldHintstops telling an MCP client thatsort's domain of interaction is closed. -
findandxargsnow declareopen_worldin all four overlays. Both spawn whatever program the caller names, soopenWorldHint: false-- which is what they emitted to every MCP client -- was a false statement about the domain of interaction rather than a missing one. Probed on macOS 26.5.2 and in Debian:echo hello | xargs /bin/echo SPAWNED:andfind . -name t.txt -exec /bin/echo SPAWNED: {} \;both spawn, and substitutingcurl --versionfor the echo reaches a network client from inside afindwalk. This is asserted rather than inferred on purpose:infer_open_worldreads two name lists that both mean network, and exec wrappers are deliberately routed throughdestructiveinstead (see the comment onEXEC_WRAPPER_TOOLS), which is the classification that actually drives the ACL and the path guard. That routing is left intact -- the overlays addopen_worldon top ofdestructiverather than moving between them.
This changes no access decision. Both are already destructive, so they are already in the destructive deny rule, and open_world_ids excludes destructive modules so an id is never listed in two deny rules; risk_from_annotations likewise ranks destructive above open-world. Verified on a real apexe scan find xargs curl: cli.find and cli.xargs stay in the destructive rule alone while cli.curl occupies the open-world rule. The only observable change is openWorldHint flipping false to true in tools/list, confirmed against a live stdio MCP server before and after.
Security¶
- A
..climb into a symlinked system directory was allowed to a writer on macOS.PathGuard::newpassed every baseline entry throughresolve, which canonicalizes — so on a platform where a guarded location is itself a symlink the stored list contained only the canonical spelling. macOS links/etcand/varinto/private, leaving nothing in the baseline spelled/etc. The comparison is then asymmetric, because a target does not always get canonicalized the same way:resolve_existing_prefixcanonicalizes only the part of a path that exists and folds the rest lexically, so a/etccomponent reached across a non-existent tail survives uncanonicalized./usr/local/share/../../../etc/passwdon a host without/usr/local/share— an ordinary arm64 Mac, where Homebrew lives in/opt/homebrew— resolves to the literal/etc/passwd, andstarts_with("/private/etc")does not match it. A writer aimed at/etc/passwdwent through.
The direct spelling was refused the whole time (/etc/passwd exists, so it canonicalizes to /private/etc/passwd and matches), which is what hid this: the guard looked correct in every test that named a path that was actually there. BASELINE_SYSTEM_PATHS lists /private/etc and /private/var alongside /etc and /var for exactly this hazard, but that could not help — resolve collapsed both spellings onto the same canonical one, so the pair was never in the list at the same time.
Every denied list now stores both spellings (baseline_spellings): the compiled-in system and credential baselines, and additional_denied_paths. Where the two coincide — every non-symlinked entry, and most Linux hosts — they dedupe to one and nothing changes. Carve-outs (allowed_paths) deliberately keep the single canonical spelling: an extra spelling can only ever match more paths, which is the right direction for a refusal and the wrong one for an exemption.
Found because test_check_refuses_a_relative_path_that_climbs_out_with_parent_dirs fails on macOS and passes on Linux — the test picks /usr/local/share as its root, which Debian has and an arm64 Mac does not. It had been failing in this working tree for the whole of the preceding work and was assumed environmental. test_a_lexically_folded_system_path_is_refused_in_both_spellings now pins the behaviour directly rather than relying on a path that happens not to exist, and was checked to fail without the fix. test_system_baseline_matches_the_compiled_in_list asserted a 1:1 count between the compiled-in list and the guard's; it is replaced by test_every_compiled_in_system_path_reaches_the_guard, which asserts what actually matters — that every entry reaches the guard in some spelling — since one entry may now legitimately contribute two.
[0.7.0] - 2026-09-02¶
Added¶
-
apexe serve/apexe a2ano longer register a module whose binary is gone. A binding file is a snapshot taken atapexe scantime; nothing re-checked it afterward, so a tool uninstalled, moved, or scanned on one host and served from another stayed listed intools/listand reachable bymodule_id— it just failed every call withModuleNotFound/"not installed", which is a worse outcome for an MCP/A2A client than not being offered the tool at all.filter_available(src/module/registry.rs) now runs inside the sharedbuild_executor, right afterModuleFilter, and drops any module whosetarget(exec://{binary_path} ...) does not resolve on this machine — an absolute path is checked on disk, a bare name againstPATH(scanner::resolver::target_is_available, a plain filesystem/PATH lookup, not the--versionprobeToolResolver::resolvedoes, since this runs once per module and has to stay cheap). Because both server builders sharebuild_executor, this applies to MCP and A2A alike, and — unlike--tags/--prefix— it is unconditional: there is no flag to turn it off, since an external caller has no reasonable way to recover from being told a tool exists when it does not. Each exclusion is logged (WARN … module_id=... target=...) so a sudden drop in the tool count is traceable.apexe listgained the same check as--available-only, opt-in rather than default there, since the plain listing is also used to review everything ever scanned (e.g. before copyingmodules_dirto a new host). Documented indocs/user-manual.md§10 "Availability Filtering". -
A path guard refuses a wrapped tool pointed at a system directory. The ACL decides whether a module may be called and cannot decide what a call may touch: apcore ACL rules match on
callersandtargets— module ids — and every registered condition key (identity_types,roles,max_call_depth,$or,$not) is a fact about the principal, never about an argument. So the only policies expressible forrmwere "allowed" and "denied", and the one that matters is neither:rmis not a command to forbid outright,rm /etcis. Nothing else covered the gap either —validate_argument_valuechecks for control characters and a leading-, and/etc/passwdhas neither, so{"file": ["/etc/passwd"]}reachedexecveverbatim.src/governance/path_guard.rsnow resolves and checks every argument the input schema types as a filesystem path (x-apexe-path, which the schema builder already emitted forValueType::Path—apexe scan rmproduces it onfile'sitemstoday, so no binding has to be regenerated). There are two compiled-in baselines, because reading and writing are different risks and one list forced a single answer onto both. System paths (/etc,/usr,/var, the macOS system directories) bind a module that can write; a module annotatedreadonlymay name them, because refusingcat /etc/hostsandls /usr/binprotected nothing — those files are world-readable and an agent's own file tools reach them regardless — while costing every legitimate diagnostic. Credential paths (~/.ssh,~/.aws,~/.gnupg,~/.kube,~/.docker,~/.apexe) bind both modes, because the asymmetry runs the other way there: a deleted private key announces itself the next time the key is used, while one copied into a model context leaves no trace at all, so the stricter treatment goes to the risk that is harder to notice.~/.apexeis on that list rather than the system one because it holds the ACL and audit trail governing the very call being made.~/.configis deliberately on neither — it holds ordinary application settings a wrapped tool has legitimate reason to touch. Neither list can be shortened, andconfig.yaml's newadditional_denied_pathsappends to the credential one, so a configured path binds readers too: an operator naming a path explicitly is asserting it is sensitive, and the stronger reading is the one that cannot be wrong in the dangerous direction. Confining the boundary to code is the point: this deliberately did not go into the overlays, where it would have had to be restated per command, would have left every tool no overlay covers unguarded, and would have expressed a security boundary in a data file thatmode: authoritativelets any other data file replace.
What is compared is the path the kernel would act on, not the string the caller sent. Three transformations sit between them and skipping any one makes the guard decorative. Relative paths are joined to the guard's root — which is now also what Command::current_dir is set to, closing a second defect found on the way: the child previously inherited apexe's working directory, so the meaning of every relative argument depended on which directory the operator happened to launch apexe serve from, and the guard and the child had no guarantee of agreeing on it. Symlinks are followed, because /tmp/x -> /etc makes rm -rf /tmp/x/ a request to delete /etc that no string comparison sees; the longest existing prefix is canonicalized, so a destination that does not exist yet is still judged. .. is folded last and only across the non-existent tail — std::path::absolute preserves it because POSIX requires it, and collapsing it lexically first is wrong, since /tmp/link/.. is the parent of link's target rather than /tmp. The check then runs in two directions, of which only one binds a reader. Containment — the path sits inside a protected location — applies to both modes and is what refuses cat ~/.ssh/id_rsa. Ancestry — the path sits above one — applies to writers only, because it exists for the recursive operation that takes the protected directory with it: rm -rf / never names /etc and destroys it regardless. Holding a reader to it would refuse ls ~ and ls / on the grounds that a home directory contains .ssh, which is most of what a reader does; the cost is that a recursive read rooted above a credential directory (grep -r … /) is not caught, and that is stated in the threat model rather than papered over. Matching is per path component either way, so /etcetera does not collide with /etc.
Two findings from writing the tests, both of which changed the design. / cannot be a baseline entry — every absolute path starts with it, so the containment test matched unconditionally and the first build refused the entire filesystem; rm / is instead caught by the ancestor direction, which is the only one that carries the intended meaning. And on macOS the per-user temp directory is /var/folders/<x>/<y>/T, so guarding /var refused every use of the directory whose entire purpose is being written to; a compiled-in carve-out keeps it usable, config.yaml cannot extend that list, a TMPDIR equal to or containing a system entry is discarded rather than honoured, and where a denied entry and the carve-out both cover a path the more specific one decides — with a tie going to the refusal. Weighing the credential list in that discard check was a third finding, and a bug: a home directory under $TMPDIR — ordinary in a sandbox or CI container — made every credential path a descendant of the carve-out, which voided it, which re-armed /var across the whole temp directory. Specificity already protects a credential path nested inside the carve-out, so the check consults the system list alone. A refusal is ACL_DENIED rather than GENERAL_INVALID_INPUT, which is both accurate (this is a governance decision, not a malformed value) and load-bearing: breaker.rs excludes governance refusals from circuit-breaker health, so a caller repeatedly probing /etc cannot open a circuit and deny cli.rm to every other caller. It carries the requested path, the resolved path and the protected location that matched — the requested one frequently does not look protected, which is the whole point of resolving it. Unlike --acl and --enable-approval, the guard is on by default on every surface and has no off switch; the access mode is the one thing that varies per call, and a module with no readonly annotation is treated as a writer. Documented in docs/threat-model.md §4.8 and §5.8 and docs/user-manual.md §9.7; the limits are stated there rather than implied, chiefly that a value the schema does not type as a path is not seen, that a recursive read above a credential directory is not caught, that the mode is per module rather than per argument (so cp /etc/hosts ~/backup is refused even though the system path is only being read), and that nothing bounds what the tool does after it starts.
-
config.yamlgainsallowed_paths, the one setting that relaxes the path guard. Empty by default, so the feature is inert until an operator writes it down. It exists because the rigid version was worse in practice: an agent that legitimately has to write/etc/nginx/conf.dhad no option but to be handed that tooling outside apexe, which drops the audit trail and the ACL along with the path check —docs/threat-model.md§5.1 in miniature, reached by way of a control too inflexible to use. Nothing validates that a carve-out is wise: naming/etc, or a credential directory, is honoured, because overruling an explicit instruction would put the guard in the business of second-guessing whoever deployed it, and an operator staring at a config file that appears to do nothing is its own failure mode. What the guard does instead is refuse to be quiet — every carve-out is logged at startup, and one that opens a whole system location or exposes credentials is logged atwarn. Carve-outs and denials share one specificity ladder, so a subtree can be opened and part of it fenced off again withadditional_denied_paths. An exact tie is broken by provenance: a configuredallowed_pathsentry wins because it is an instruction, while the derived temp-directory exemption loses because nobody asked for it and an exact overlap there is a coincidence — which is what keeps aTMPDIRpointed at~/.sshfrom reading a key out. Two properties are documented rather than implied: a carve-out grants everything beneath it, and one over a service's configuration directory grants that service's behaviour (/etc/nginx/conf.dwrite access is enough to add aproxy_pass). -
examples/path_guard— a runnable companion toexamples/acl_demo, kept separate because the two answer different questions: an ACL decides who may call which module, the guard decides what one call may touch. It registers a reader and a writer with an identical path-typed schema, differing only in thereadonlyannotation, and prints the four quadrants plus anallowed_pathscarve-out against the same paths.cargo test --example path_guardasserts the contract.acl_demo's README now points at it, since that demo's role rules are the boundary that is not yet reachable overapexe serve, while the guard always is. -
apexe policyreports the filesystem boundary without starting a server. The path guard added above is always-on and has no off switch, which makes "what can this module actually reach" a question an operator has to be able to answer — and until now answering it meant standing upapexe serveand driving it with an MCP client. With no arguments the command prints the guard as installed: the working directory relative paths resolve against, both compiled-in baselines, whateveradditional_denied_pathsadded, theallowed_pathscarve-outs, and the derived temp-directory exemption. That summary is read off the live guard rather than re-derived fromconfig.yaml, so it cannot describe a policy other than the one in force — which matters precisely because a misspelled config key leaves the baseline running and nothing else in the process would say so.--path <p> --mode read|writegoes one step further and calls the guard's owncheck, the exact call a wrapped tool's argument goes through, so a verdict here cannot drift from what a real invocation would get;--modeexists because the two baselines disagree on purpose, andapexe policy --path /etc/passwddenying while--mode readallows is the split working.--format jsonfor both. Documented indocs/user-manual.md§4.6 anddocs/threat-model.md§4.8. -
A curated overlay can state what a flag does, for the two things no scan can infer. Help text does not distinguish
git --exec-path=<path>, which sets a search path, fromgit --upload-pack=<cmd>, which runs one — both read as "takes a value" to every parser apexe has, and guessing would produce exactly the plausible-but-wrong assertion the overlay rules exist to prevent.ScannedFlag.risk(FlagRisk) defaults to absent and only a human raises it.escalatesputs the call to the approval gate, and reaches the flags no name list generalizes — nothing about the string--privilegedsuggests danger; it emitsx-apexe-escalates: true.benigngoes the other way, because the name list matches on spelling and spelling is sometimes a coincidence:bsdtar -yis bzip2,sort -ffolds case,cut -fselects fields, and before this the only way to stop the prompt was to assertrequires_approval: falsefor the whole command, which also saidtarmay overwrite files unattended. It emits an explicitx-apexe-escalates: false, so the keyword is three-state — absent means the name list decides.executesis not a severity notch aboveescalatesbut a different claim: apexe's central guarantee is that argv reachesexecvewith no shell on the path, and a flag whose value becomes a command hands that guarantee straight back, with no JSON Schema constraining what the string turns into. Such a parameter is therefore refused outright byexecutor::reject_exec_parameters(ACL_DENIED, effective values only, so{"upload_pack": false}is not sending one) rather than gated — an approval prompt would ask a human to predict what an arbitrary string will do, which is the judgement least likely to survive a stream of prompts. It emitsx-apexe-exec. Known members of that class, none of which look dangerous in a help listing, are listed indocs/overlays.md:git --upload-pack/--receive-pack,tar --use-compress-program,rsync -e/--rsync-path,find -exec/-ok. This is a floor and a small one — a flag of this class in an un-overlaid tool is not caught, and each assertion must be verified against a real installation before it ships. Documented indocs/user-manual.md§8 anddocs/threat-model.md§4.9. -
docs/features/v2-f8-local-execution.md— a design for giving the local terminal the same governed path MCP and A2A callers already get.Executor::callis reachable only over a transport today, so a shell script, a CI step or a human wanting to see what the ACL would decide has no way in. Two stages, and only the first is ready to build:apexe exec <module_id> --input <JSON>with a preflight that reports every governance decision (ACL verdict, path-guard verdict per path argument, whether approval would fire) and stops before spawning. Stage 2 — PATH shims, so a wrapped tool is invoked by its own name and its own argv — is blocked on two contracts the spec insists on settling first: anExecutionIomode for passthrough I/O, and astreaming_stdin_safeper-module allowlist, since an inherited stdin is not schema-validated, not path-checked and not recorded. The spec is unusually explicit about what the mechanism cannot do (shell builtins are never intercepted and the gap is invisible at the point of use; an absolute path bypasses any shim), and those four limitations are reserved asdocs/threat-model.md§5.10 so they land with the feature rather than after it. Design only — nothing here is implemented.
Changed¶
- BREAKING: the approval gate weighs the arguments a call actually sent, and flag boosting no longer happens at scan time. A scan sees the flags a command accepts; a call carries the flags a caller sent, and only the second is a reason to interrupt a human. Deriving
requires_approvalfrom the first markedgit log— which merely accepts--all— as needing human approval on every invocation, whilegit push --upload-pack=<cmd>earned exactly the same verdict. Of the 42 shipped overlays 32 declare a flag onAPPROVAL_FLAGS, and the readers among them (ls,grep,diff,du,df,tail,cut) stayed quiet only because a human had writtenrequires_approval: falseby hand; nothing kept an un-overlaid tool quiet at all. Approval fatigue is not a cosmetic failure — the documented response to a gate that prompts on every read is to switch the gate off, which lands on the ungoverned default. The list is now applied in two halves.mark_escalating_params(src/adapter/converter.rs) records the schema property names carrying those literals inx-apexe-escalating-params, withx-apexe-approval-basis: "flags"saying the mark came from accepted flags alone, and keepsrequires_approvaltrue as a ceiling — apcore decides whether to run the gate at all from that static flag, and neitherApprovalHandlernor itsExecutionPolicyhook is handed a call's arguments.ApprovalGatethen reads the recorded list against the arguments actually sent and stands down when none carry an effective value, recordingapproved_by: "apexe-approval-gate"so an audit reader can tell it from a human's yes.git logstops prompting;git log --allprompts;git push --forceprompts. A module markeddestructiveby name records no such basis and always prompts — no absent flag makesrmsafe. Every branch that cannot read the basis prompts, so a corrupted annotation fails toward the human rather than silently bypassing the gate. Names are read off the built schema rather thanScannedCommand::flags, because a positional argument can displace a same-named flag onto another key and the schema is the only place the name a caller will send is settled.
The --dry-run → idempotent boost is removed outright, with no per-call replacement. A command that accepts --dry-run does not run dry, so the boost made cacheable true for a mutating command whenever the caller left the flag off — and the next reader was served a cached result for a call that had changed something. Unlike approval there is no invocation-time hook to move it to, since nothing consults idempotent when a call is made; an overlay's annotation_overrides remains the way to assert it. Documented in docs/user-manual.md §8 and §9.6.
-
Command executors are classified
destructive, notreadonly.EXEC_WRAPPER_TOOLSinsrc/adapter/annotations.rscoversenv,xargs,nice,ionice,nohup,timeout,chroot,setsid,stdbuf,script,watch,time,sudo,doasandsu, and outranks both name-pattern lists. This was live rather than theoretical:env's name is inREADONLY_PATTERNS, soapexe scan envproducedreadonly: true, which earned it an explicit allow in the generated ACL and made the path guard judge its arguments as a reader's — and BSDenvaccepts-S <string>, which splits that string into argv and executes it.cli.envwith{"S": "rm -rf /etc"}passed both controls; a canary file in a scratch directory was verifiably deleted, and the same call naming/etcreturnedALLOWEDrather thanACLDenied, confirming the guard never inspected it (correctly, by its own contract —-Sis typedstring, and nothing in it is a path). Bothxargsoverlays carrieddestructive: falseand were corrected in the same change, since a curated overlay replaces the scan result and would otherwise have overridden the classification silently; a data guard now pins that for every command executor with an overlay. This is a floor, not a fix: no static analysis can decide what argv a caller-supplied string will become, sodocs/threat-model.md§5.9 recommends denying these in the ACL or, better, not scanning them into the registry at all — a wrappedenvbuys nothing that wrapping the underlying tool does not, and costs every control in §4. -
PathGuard::newandPathGuard::from_envtake aGuardConfiginstead of a slice. A struct rather than two slice parameters becausedeniedandallowedshare a type and mean opposite things, and a transposed call would turn a deny list into an allow list with no compiler error. -
executor::build_argumentsandexecutor::build_argvtake anAccessMode. Both arepub, so this is a breaking change for anything outside the crate that renders argv directly. The parameter is what the path guard consults, and it could not be a process-wide value the way the guard itself is: it varies per call.AccessMode::from_readonly(module.annotations.readonly)reproduces whatCliModulepasses, andAccessMode::Writeis the conservative choice for a caller with no annotation to hand.
Fixed¶
- An ACL denial over A2A says it was a denial. (#41) A refused call reached the caller as
TASK_STATE_FAILEDcarryingTask not found, and an approval denial asInternal server error. Both are worse than vague, they are actionable in the wrong direction:Task not foundnames the task id — the one thing that was fine — so an agent retries, or resends under a fresh message id, and is refused identically for as long as it keeps going, whileInternal server errorsays the server broke and earns a backoff-and-retry. The correct response to either is to stop and pick a different skill. The mapping is apcore-a2a's (ErrorMapper::to_jsonrpc_errordecides what a caller is told from the error code alone, andcarries_caller_detailgates the same text intostatus.message), and 0.6.1 documented it rather than overriding it, on the grounds that diverging from a convention shared with apcore-a2a's Python and TypeScript siblings to make one host's message nicer was the wrong trade. That reasoning does not survive being stated precisely. The masking exists so an unauthorized caller cannot enumerate what exists — the 404-instead-of-403 argument — and on this server it protects nothing: apcore-a2a already ACL-filters the agent card per caller, so a denied skill is absent from it and the refusal confirms nothing the card had not already settled, andapexe a2awires no authenticator, so every caller is the same anonymous@externalprincipal and there is no privileged caller to keep the secret from — apcore-a2a does shipAuthenticator/JWTAuthenticator/async_serve_with_auth, apexe just calls the no-authasync_serve, so that is a property of this subcommand rather than of the crate. What it costs is the one thing the transport exists to carry. apexe now relays the reason:DenialReasonRelay, an apcore pipeline step middleware installed on the A2A executor only, re-codesACL_DENIED/APPROVAL_DENIED/APPROVAL_TIMEOUTtoGENERAL_INVALID_INPUT— the one code upstream forwards a message for that does not additionally assert something false about where the problem is — keeping the original code at the front of the message so the two transports read alike, and attaching guidance that closes the retry loop explicitly. A caller now receivesInvalid input: [ACLDenied] Access denied: caller 'None' cannot access module 'cli.ls' (An access-control rule refuses this call. The task id is fine — retrying it, …). TheInvalid input:prefix is upstream's. Nothing else changes: the ACL still decides,audit.jsonlstill records the decision with the matched rule index and the caller'strace_id, MCP is untouched (it already reported[ACLDenied] …from the code itself, so relaying there would swap an accurate code for a re-coded one), and an approval pending is deliberately left alone — apcore-a2a maps it toTASK_STATE_INPUT_REQUIREDcarrying theapproval_ida caller resumes with, which re-coding would turn from a resumable pause into a terminal failure.
Two of the issue's incidental notes, resolved: Task not found is not the fallback arm of a short match — it is an explicit arm, and MODULE_NOT_FOUND was already mapped correctly (-32601 with its own message intact), so an unknown skill still reads as missing and the fix does not blur the two. APPROVAL_DENIED and APPROVAL_TIMEOUT were mis-served, landing in the catch-all Internal server error, and are relayed with the same mechanism.
-
The agent card's
urlandprotocolVersionare pinned, and were never missing. (#41, third incidental note) The card was read as omittingprotocolVersion,urlandpreferredTransportbecause onlysupportedInterfaceswas present. That is where they live: A2A 1.0 replaced the three 0.3 top-level fields with one entry per transport endpoint carryingurl,protocolBindingandprotocolVersion, and apexe's card has all three (http://127.0.0.1:8793,JSONRPC,1.0). No change beyond a test that pins it, so a reader expecting the 0.3 shape can see where the fields went and a regression in theurlapexe stamps fails here. The other two incidental notes are apcore-a2a's dispatcher and its stream-event encoding, neither of which apexe sits in front of: a JSON-RPC notification getting a reply, and SSE frames using the protobufoneofkey (statusUpdate/artifactUpdate) instead of akinddiscriminator. -
Tests: what a refused caller is told is now asserted over the real request path. The previous coverage anchored the manual's claim to
ErrorMapper::to_jsonrpc_error, which is upstream's decision function and not the bytes a client receives.tests/a2a_integration.rsnow drives amessage/sendthrough the apcore-a2a axum router built from the exact governedExecutorserveassembles (A2aServerBuilder::executor, new, the in-process counterpart ofagent_card), and readsstatus.messageoff the response — so a regression fails on the delivered text rather than on a remembered mapping. The upstream premise is still pinned separately: if apcore-a2a starts reporting the reason itself, the consistency test fails and says to drop the relay rather than restore anything.
[0.6.1] - 2026-08-24¶
Fixed¶
- An optional-value long option in a curated overlay carries its value again. (#40) The #24 fix gated the
--flag=valuespelling onx-apexe-value-optional, which help-text scanning recovers from--opt[=VAL]. That marker has been declarable in an overlay since 0.6.0 — the loader,schemas/tool-overlay.schema.jsonand the emitted contract all honour it — and no overlay set it, on any flag, in any of the 42 shipped files. So every optional-value long option in the curated surface rendered--flag value, which these tools read as "no value, and here is an operand". It is a wrong answer rather than a refusal, and it fails in two directions at once:cli.ls {"color": "never", "file": ["."]}submittedneveras a file that does not exist and left colour on, because a bare--colormeans "always";cli.grep {"color": "never", "pattern": "hello", ...}pushedneverinto the pattern position so the pattern became a filename.mkdir --context ctx dis the worst of the set — exit 0, having silently created a spurious directory. 34 flags across 17 overlays are now marked. Each was established by running both spellings against the build its overlay's provenance records: the GNU half in the pinneddebian@sha256:328d1649…reference image (coreutils 9.7, diffutils 3.10, grep 3.11, findutils 4.10.0), the BSD half against macOS's system binaries. The scope was re-derived rather than transcribed, and the shape it produced differs from the filed inventory in both directions — 20 of its 31 entries hold — 11 listed flags take a required value (ls --sort,--format,--time-style,--quoting-style,--indicator-style,grep@gnu --context,du --time-style,sort --sorton both variants) or no value at all (ls --context,mv --context, which are-Z), and 14 unlisted ones are optional (cp --update,diff --unifiedon both variants,mv --update,df --output,rm --interactive,--preserve-root,sort@apple --check— the flag the filed entry for that overlay should have named —tail --follow,uniq --all-repeatedon both variants,uniq --group,xargs --eof,--replace). Two facts are why this has to be a per-flag assertion and not a heuristic: an enum is not evidence —--coloris enum-valued and optional while--sortis enum-valued and required — and a variant is not evidence, since BSDgrep --contexttakes an optional value while GNUgrep --context=NUMrequires one, the same flag name with the opposite argv shape. - An optional-value flag's contract no longer forbids the bare form it advertises. Found while fixing the above and shipped with it, because 23 of the 34 flags reach it.
scalar_flag_schemaemitted"type": ["string", "boolean"]withx-apexe-value-optionaland anenumlisting only the words.typeandenumare independent assertions a value has to satisfy both of, sotrue— the spelling the union exists to permit, and the only way to reachls --colorbare — was rejected by the enum, leaving one of the two legal forms unreachable through the contract. Both booleans now join the list:trueselects the bare flag andfalseomits it, which is what the executor already does with either. - A repeatable flag no longer loses its optional-value marker or its allowed values. The same defect as the first entry, one branch along, found while verifying that fix.
flag_to_schemadispatches to two builders that were written independently, and the array one never learned aboutvalue_optionalorenum_values: a flag that repeats gotitems: {type: "string"}with no allowed-value list and nox-apexe-value-optional, so the executor rendered--flag valueper occurrence and every one of those values became an operand. Both fields are settable together today —schemas/tool-overlay.schema.jsonlists them side by side, and on the scan pathvalue_optionalcomes from--opt[=VAL]inscanner::man_pagewhilerepeatablecomes fromparsers::gnu, which infers it from a description containing"..."or"can be repeated"— so the two are independent inferences over the same merged flag and nothing prevents their meeting. Nothing hits it today: across the 42 shipped overlays and 1702 flags from 16 freshly scanned tools,repeatable + value_optionalco-occurs 0 times andrepeatable + enum_values0 times, so no emitted contract changes shape. This is hardening against a recurrence, not a live user-facing bug — but it is the third time this file has dropped a per-flag fact on the array branch alone (format_hintwas the first, fixed in 0.6.0), so theenumlist now comes from one sharedenum_constraintthat both builders call. The booleans are added on the scalar branch only, and deliberately: an array's element type is not a union and the executor has no spelling for a bare occurrence inside one — it renders every element as--flag=<element>, so admittingtruethere would advertise the literal--flag=true. The bare form stays unexpressible for a repeatable flag, which is a stated limit rather than a wrong render. SCAN_FORMAT_VERSIONis bumped to 3, so an existing install actually receives the fix. Overlays are compiled in withinclude_str!and, inauthoritativemode, are the answer for the tools they cover — so correcting one changes the emitted contract for a binary whose name, variant and version are all unchanged, which is exactly what the version component of the cache key exists to catch. Without the bumpapexe scan lsreturns the pre-fix contract from cache at exit 0 with nothing saying so, and--no-cacheis the only escape: the failure mode the key was introduced for, reached through overlay data instead of scanner code. The field's documentation now says overlays count.- Tests: the shipped overlay data is pinned to the spellings the executor renders.
build_argumentsalready had unit tests for both classes; nothing tied them to the curated files, which is how the whole overlay surface came to render the wrong form with the suite green. Two data guards assert the 34 flags are marked and — the half that stops the temptingenum_valuesshortcut — that the near-misses above stay unmarked, both without needing the matching host. Two end-to-end tests run the reallsin both spellings on either userland:--color=alwayscolourises and--color=neverdoes not, proving the value lands, while the unmarked schema's--color neverfails on the phantom operand and colourises anyway, proving the marker is what makes the difference.
[0.6.0] - 2026-08-21¶
Changed¶
- Upgraded to apcore 0.27, apcore-mcp 0.18 and apcore-a2a 0.5, which closes two defects apexe had been working around.
apcore-climoved to 0.10.5 in the same change and had to: 0.10.4 still required apcore 0.26, so the graph carried two incompatibleapcoreversions and apcore-mcp failed to build withexpected apcore::module::ModuleAnnotations, found ModuleAnnotations. No apexe source change was needed — none of apcore 0.27's breaking changes reach this crate, includingRegistry::describe, whose signature and return shape changed without appearing in the upstream changelog at all. --transport sseis served again, and no longer needs an acknowledgement. (#27) apexe refused it because apcore-mcp shared one process-global channel across every connection: responses went round-robin to whichever stream was next, so with two clients connected one client received the other's tool output. apcore-mcp 0.18 scopes a session per connection and emits theevent: endpointa spec-compliant client waits for, so the confidentiality defect that justified refusing is gone and the refusal went with it. Theapcore-mcp = "0.18"requirement is what makes that safe to assume — resolving back to the affected 0.17 would take a manifest edit, not a lockfile drift. SSE remains deprecated upstream, so apexe warns at startup and--transport httpstays the recommendation.- The audit trail records refused calls, and names who made them. (#31, #36)
audit.jsonlheld only the calls that ran, so a caller probing the argv guards or hitting the approval gate left no trace in the one file an audit exists for — the sequence most worth capturing was the one it could not show. apexe now owns the record instead of delegating toapcore_cli::AuditLogger, and writes anevent: "refusal"row from two places, because no single one sees every refusal:FailureLogMiddlewarecoversinput_validationand everything after it, andApprovalGatecovers the approval gate, which apcore runs before the middleware phase where a middleware could observe it. ACL denials are deliberately left to apcore's own richer entry rather than double-counted with less detail. Refusal rows are written regardless of--no-logging: that flag governs thetracingstream, and turning the operational log down must not turn the audit trail off. Breaking for audit-log consumers:event,trace_idandcaller_idare new;userandinput_hashare gone.usercame fromgetlogin(), which returns the owner of the controlling terminal — under a service manager that isrootor the terminal's owner, never the caller, so it attributed every request to the wrong principal, andcaller_id(the authenticated identity,@externalfor an unauthenticated inbound request) replaces it with something true.input_hashwas salted with 16 random bytes that were then discarded, so no input could ever be checked against it; a field nothing can verify is not a privacy control. See §9.2 for all three record shapes the file now contains.
Fixed¶
apexe scan --dry-runand--verify, and a global--timeout. (#37)docs/features/v2-f7-config-integration.md§8 listed all three as shipped capability and none existed — the flags were absent fromScanArgsandCli, so the doc described a surface a reader could not use.--dry-runreports what would be written for all three deliverables (bindings, ACL, skills) and touches nothing;--timeoutoverridesdefault_timeoutfromconfig.yamlthe way--log-leveloverrideslog_level, and refuses 0, which would kill every call before it started.
--verify deviates from the F7 wording deliberately. The spec said "run YAMLVerifier + SyntaxVerifier", but SyntaxVerifier parses its input as Rust source (syn::parse_file) — it is for code generators, and pointed at a YAML binding it fails every time. The real gap was elsewhere: YAMLVerifier already ran on every write and write_bindings discarded its verdict, so a binding that does not parse was reported as Generated binding and the command exited 0. A verification failure is now always a warning, and --verify escalates it to a non-zero exit — the form a pipeline needs, while a scan whose other tools succeeded still keeps its deliverables by default.
-
ApexeConfig::ensure_dirsreturns the crate's domain error. (#37) It returnedstd::io::Result<()>against an F7 spec that documentedResult<(), ModuleError>, so the one failure every run passes through rendered as a bare io error rather than throughreport_errorwith a code like every other apexe failure. The message now names the directory that could not be created. -
--exploreron stdio warns instead of silently doing nothing. (#37) The flag was applied unconditionally, soapexe serve --transport stdio --explorerwired explorer routes onto a transport with no HTTP surface: accepted, no UI, no diagnostic. It now behaves like--metrics, which had the transport gate all along — one warning, and nothing mounted. The decision lives in a named predicate because on stdio the effect is unobservable from outside, so a test cannot reach it any other way. -
--enable-approvalprompts a human again, through the connected MCP client. (#29) 0.6.0 replaced a prompt that could never be delivered with an honest unconditional deny gate. apcore-mcp 0.18 removed the reason for it: the router now registers the connection'sElicitCallbackper tool call and puts its id inContext.dataunderMCP_ELICIT_CALL_ID_KEY, which a handler built outside the router — all a CLI entry point can build — exchanges for the live callback. An id is aserde_json::Valuewhere a closure is not, and that was the whole obstacle. Verified end to end over stdio: a client declaringcapabilities.elicitationreceiveselicitation/create,acceptruns the call and writes the file,declinerefuses it. A client that declared no elicitation support still cannot be prompted and is still refused — the gate is fail-closed, and against such a client--enable-approvalremains an unconditional deny over everyrequires_approvalmodule. This needs apcore-mcp 0.18;apcore-mcp = "0.18"in the manifest is what makes that safe to assume. DenyApprovalHandleris replaced byApprovalGate, which wraps apcore-mcp's handler rather than standing in for it. Breaking for library consumers: the type is renamed andnew()/with_audit()keep their shapes. It exists for two things upstream cannot do from where it sits. Auditing: apcore runsapproval_gateahead ofmiddleware_before, so a refusal there reaches no middleware and nothing else in the stack records it — the audit work above would otherwise have regressed the moment the handler was swapped. A reason with a remedy: upstream refuses an unpromptable client withElicitation returned no response, which names the mechanism and no way out of it; that is the same opaque-refusal failure mode #29 was filed about, one layer along. A human's own decline is passed through verbatim — it is already clear. The decision lives in aclassifyfunction rather than inline, because driving the real handler can only ever produce a rejection, so an approval mistakenly audited as a refusal —APPROVAL_DENIEDin the trail for a call that actually ran — was undetectable until theGrantedarm could be reached from a test.- The Explorer's Try-It editor no longer prefills a call that is empty but looks valid. (#38)
defaultFromSchemafilled every schema property —""for a string,0for a number,falsefor a boolean — so openingcli.curlproduced 259 lines and 5637 characters of blanks in a textarea 120px tall. Because a present-but-empty value satisfies bothrequiredand the declared type,Validateanswered✓ Input is valid.andExecutesent it; the wrapped binary was the first thing to object. The fix is upstream inmcp-embedded-ui0.5, reached through apcore-mcp 0.18.1: the prefill now emits only therequiredkeys, using each property's declareddefaultwhen it has one andnullotherwise.cli.curlbecomes{"url": null}— 3 lines — andValidaterefuses it withnull is not of type "string"at/url, which is the honest answer. The validator itself was deliberately not touched: it is a correct JSON Schema validator, and{"url": ""}genuinely is schema-valid, so "fixing"Validatewould have broken it. The defect was always the prefill that produced a schema-valid empty payload. Verified end to end against the real 257-propertycli.curlcontract, including that an untouched prefill is now rejected atinput_validationrather than reaching the subprocess. - A caller denied by the ACL no longer receives the resolved binary path and argv through
__apcore_module_preview. (#39 item 4) This is the one #39 item the previous release could not close:handle_previewreportedacl: passed=falseand then ran the module preflight and preview anyway. apcore 0.27 implements PROTOCOL_SPEC §12.8.5.1 — an ACL denial must not invoke either hook, must not emit their checks, and must leavepredicted_changesempty — so the fix arrives with the upgrade rather than from apexe. Verified over stdio against a deny rule: the denied envelope now carriespredicted_changes: [], checks ending at the failedaclentry, and no occurrence of the resolved binary.
Verification of the governance and transport surfaces — the parts never exercised over the wire — found that two of the three things documented as access control were not access control, that the approval gate could only ever deny, and that credentials passed as tool arguments were written to the log in plaintext. All of that is fixed here, and the HTTP transports now require a credential by default.
Security¶
- The manual says how to actually call an A2A skill. (#35 item 1) §11 documented flags and endpoints and never showed a
message/send, so the first thing a reader tried was prose in a TextPart — and gotTextPart text is not valid JSON: expected value at line 1 column 1, which names the mechanism and no way out of it. Every apexe skill takes a JSON object (build_input_schemaalways emits"type": "object"), so arguments ride in a DataPart withskillIdin the message metadata; a TextPart works only when itstextis the JSON. §11 now shows the request. The issue's framing — that the card advertisestext/plainwhile no skill can accept it — is half right and worth stating precisely: apcore-a2a 0.5 computes each skill'sinputModesfrom its own schema and correctly emits["application/json"]alone, which is the field a client routing a call reads. Only the agent-leveldefaultInputModesstill carriestext/plain; that is apcore-a2a's hardcoded default describing what the framework can accept,APCoreA2AConfigexposes no field to narrow it, and per the A2A spec a skill's own modes override it. Both halves are now guarded: one test asserts every skill advertises JSON only, another asserts the converter never produces a string-rooted schema — the premise that makes the first true. - The manual states what an ACL denial actually looks like on each transport. (#35) Over MCP a denied caller gets
[ACLDenied] Access denied: caller 'None' cannot access module 'cli.cp'. Over A2A it gets JSON-RPC-32001with the fixed messageTask not found— apcore-a2a withholds the reason so an unauthorized caller cannot enumerate what exists, the 404-instead-of-403 argument, shared with its Python and TypeScript siblings and locked by an upstream test. apexe does not override it: diverging from a deliberate three-language convention to make one host's message nicer is the wrong trade. But an agent readingTask not foundconcludes its task id was wrong, and an operator watching that concludes the ACL is broken and removes it — the #29 failure mode, where an opaque refusal drives someone back to the ungoverned default. §9.1 now says so and points ataudit.jsonl, which records the real decision on both transports with the matched rule index and the caller's owntrace_id. A consistency test anchors the claim toErrorMapper::to_jsonrpc_error, so if upstream starts reporting the reason the caveat fails rather than quietly misleading. apexe a2agained--prefixand--tags, so the A2A surface can be narrowed at all. (#35) The filter added above forapexe servereached A2A asModuleFilter::default(), hardcoded — the flags did not exist, soapexe a2aadvertised and executed every scanned module with no way to serve a subset. That gap is worse on A2A than on MCP:apexe a2ahas no authenticator, so choosing which wrapped binaries the surface exposes is the only limiting mechanism available short of an--aclkeyed on an identity A2A never establishes. Both flags reuse the registration-level enforcement--prefix/--tagsalready had, so an excluded module is absent from the agent card and uncallable by name, rather than merely hidden from it.--prefixand--tagsnow gatetools/call, not justtools/list. (#28) apcore-mcp builds the advertised tool list throughregistry.list(tags, prefix, ..)but routes an incoming call by handing the received name straight toregistry.get, so the filter was a listing concern that never reached the execution path.apexe serve --prefix zzz.advertised zero CLI tools and executedcli.cpon request, writing the file;--tags gitdid the same forcli.curlandcli.ssh.resources/listandresources/readignored it too, so an excluded module's documentation stayed readable. The filter is now applied at registration, so an excluded module does not exist on the server at all and every lookup path returnsModuleNotFound— the same invariantmodule_idregistration already holds, applied to the other place the advertised and callable surfaces could diverge.--aclremains the per-caller boundary;--prefix/--tagsselect a subset of the surface for everyone.- Credentials passed as tool arguments are no longer logged in plaintext. (#30) The logging middleware is on by default and records
inputs=andoutput=at INFO. apcore'sredact_sensitiveredacts a property only if its schema carriesx-sensitive: true, and no apexe binding had ever carried that marker — not in any of the 168 real modules under~/.apexe/modules— so the redaction the manual credited it with was inert for every module apexe has ever produced.curl --user alice:S3cr3tPass,--oauth2-bearer, aBearertoken in--headerand a password in a--databody all appeared verbatim. The scanner now emitsx-sensitiveon credential-bearing options, and a new--no-log-argumentskeeps the operational record (module, caller, duration, error) while dropping the payload — so the choice is no longer between logging credentials and logging nothing. This is not retroactive: the marker is written into the binding file, so a binding scanned before this release carries none and still logs credentials verbatim. Upgrading apexe does not rewrite bindings already on disk —grep -L x-sensitive ~/.apexe/modules/*.yamllists the ones still affected, andapexe scan <tool> --no-cachefixes each. Verified on a real install: a 166-binding~/.apexe/modulesscanned before the fix redacted nothing, while the samecurl --user alice:<password>call against a freshly-scanned binding logged***REDACTED***.audit.jsonlwas and remains free of raw argument values. - The HTTP transports require authentication by default. (#31) apexe wraps arbitrary local binaries; the test set alone includes
cli.ssh(arbitrary remote execution) andcli.cp(arbitrary file write). An unauthenticated non-loopback bind is not an API without auth, it is a remote-execution entry point for every executable on the host, and it was one flag away with no warning. The upstream capability (HttpAuthConfig,run_sse_with_auth) had shipped and was never touched. The default now depends on the transport, because the three have genuinely different trust boundaries: stdio keeps no auth — the boundary is the parent/child process relationship, and a token would break every Claude Desktop / Cursor config for nothing; HTTP/SSE on loopback requires a bearer token, generated and printed at startup so a local dev server needs no secret management; HTTP/SSE anywhere else requires it too, and--auth nonethere refuses to start without the separate--allow-unauthenticated-bindacknowledgement.--auth <token|jwt|none>is named after the decision rather than after one mechanism, so adding a second does not orphan the flag, and--auth noneis a mode rather than a--disable-*that gets copied out of a tutorial and lives in startup scripts forever./healthis exempt for probes;/metricsdeliberately is not, since itsmodule_idlabels and call volumes are reconnaissance about what this host wraps. The Explorer'sAuthorizationfield is now wired to something real, andPOST /explorer/tools/{tool}/call— a plain-REST execution path that bypassed the MCP envelope entirely — sits behind the same authenticator as/mcp. --no-log-argumentsnow drops the payload on the error path too. The flag set apcore'slog_inputs/log_outputsbut leftlog_errorshardcodedtrue, and apcore'son_errorhook rendersinputs = ?redacted_inputs— the same partially-redacted argument object theSTARTline carries. So a call rejected by schema validation printed the--databody and the URL query string that the flag exists to suppress, which is precisely the residual gap the manual already admits thex-sensitiveheuristic cannot cover. Reproduced:tools/call cli.curl {"data": "password=hunter2", "bogus_unknown_field": 1}under--no-log-argumentslogged the password verbatim. All three flags now followlog_arguments. Turning apcore's error record off alone would have been an observability regression — an ACL denial, an approval denial and a schema rejection never reachCliModule, so nothing else in apexe announces them — so a newFailureLogMiddlewaretakes that job over with a field set that cannot carry a payload:module_id,trace_id,caller_id,error_code,duration_ms, and deliberately noterror_message, since a validation message quotes the value it rejected. A refused call still produces exactly oneERRORrecord either way.- A credential on a non-loopback bind now says it travels in cleartext. The auth default added above closes a remote-execution entry point by requiring a bearer token or JWT — but apexe terminates no TLS and neither does apcore-mcp, so on
--host 0.0.0.0that credential is readable by anything on the path, and whoever reads it holds the entry point the credential was added to close. The startup notice made it worse by printingConnect to http://{host}:{port}next to the token with no caveat, which is the line an operator copies.resolve_authnow warns whenever a bind is non-loopback and a credential is required, for both token and JWT, and the generated-token notice carries the caveat itself rather than relying on thetracingwarning — the two go to different places and can be filtered differently, which is the same reasoning that put the token on stderr in the first place. Loopback stays silent: that traffic reaches no network interface, and the local dev server is the case the generated token exists to make painless. This is a warning rather than a refusal because apexe behind a TLS-terminating reverse proxy is the correct deployment and is indistinguishable from a naked bind from inside the process — refusing would break the right answer to force the wrong one. - The generated bearer token is written to stderr, not through
tracing. It was emitted withtracing::info!, which broke in two directions. At--log-level warnthe event was dropped whileresolve_authstill installed the token, soPOST /mcpanswered 401 and no apexe command could recover the value —--show-configomits credentials by construction — leaving a server nothing could ever call. Andtracinggoes wherever the operator pointed it: a file, journald, a log aggregator. Routing the credential that guards a remote-execution surface through it persists the secret and often ships it off-host, which is the concern--no-log-argumentsexists for one layer down. The value now goes straight to stderr, unconditionally and off the log pipeline;tracing::info!still announces that token auth is on.
Fixed¶
--enable-approvalno longer denies everything with an opaque reason. (#29) It installedElicitationApprovalHandler::new(None), whose only reachable branch is theNoneone, so every gated call came backNo elicitation callback available— on stdio, onPOST /mcp, and on the Explorer REST path, and whether or not the client declared elicitation support ininitialize. The documented human-in-the-loop flow does not exist and cannot be built from outside apcore-mcp's router: theElicitCallbacklives in a side-channel map ofBox<dyn Any>, while anApprovalHandlerreceives only the JSONContext, which holds the string"available"rather than the callback. Failing closed is right; failing closed silently is what makes an operator disable the flag and land on the ungoverned default, which is worse than either alternative. apexe now installs its ownDenyApprovalHandler, which names the module, says the block is unconditional rather than a declined prompt, and points at--acland the libraryApprovalStore; a warning at startup says the same before the first call. The docs no longer promise a prompt. (Superseded in Unreleased: apcore-mcp 0.18 made the prompt reachable, and the deny gate went with it.) Approval granularity —requires_approvalis derived from whether a tool's help mentions anAPPROVAL_FLAGSentry, socli.git.logis gated whilecli.sshandcli.curlare not — is unchanged and recorded as a known limitation.- A long option's value is only attached with
=where that spelling is required. (#24) 0.6.0 attached every long option's value with=, on the premise that options with a required value accept both forms. That is the GNU convention, not a universal one: curl implements its own option parser and accepts no long option in=form, for required and optional values alike, so--max-time=1came backoption --max-time=1: is unknown. It made 134 ofcli.curl's 258 properties (52%) unusable — every long option that takes a value — in the tooldocs/examples/basic.mdis built around. The marker that distinguishes the two cases already existed as of the same release:x-apexe-value-optionalis emitted on exactly the options that need=and on none of curl's affected options.=is now used where that marker is present and a space everywhere else, which is right in both directions —ls --classify=neverkeeps working, and a required-value option gets the form GNU also accepts and curl only accepts. find's-fandexpressionaccept the values they exist for. (#25) The option-injection guard added in 0.6.0 refuses any value beginning with-, which is correct for the case it was written for and wrong for two offind's own parameters. Everyfindprimary begins with-, so theexpressionoperand was 100% unreachable; and-fexists precisely to introduce a path that would otherwise parse as an expression — its own overlay description says so — yet every route through it was closed, making a directory named-weird-dirinexpressible through apexe at all. Refusing the value is one way to stop it being read as an option;--is the other, and it is the one the wrapped tools actually provide. apexe now emits--where the tool supports it, which is a stronger guarantee than "the value did not look like an option", and keeps refusal as the fallback where it does not. Two related corrections: the rejection message now names the offending array element instead of implying it was the first, andpathis no longer unconditionallyrequired, matching BSD find's second usage form andpath's own description.SKILL.mdfrontmatter survives the characters a scanned--helpactually contains. The generated document is built from text apexe does not author, andyaml_scalar's quote predicate covered only\nof YAML's five line breaks —\r, NEL (U+0085), LS (U+2028) and PS (U+2029) all took the plain-scalar branch, and a raw one survives inside double quotes too, so quoting alone would not have saved it. A description carrying one plus a---ends the frontmatter block early and pushes the remainder into the Markdown body an agent reads as instructions; a tab (GNU--helpseparates a flag from its description with one, and no scanner stage strips it) breaks the parse on its own. A skill whose frontmatter fails to parse silently does not load, which is the opposite of whatSkillOutputexists to do. Line breaks are now flattened to spaces before quoting — the same setmodule::executor'sCONTROL_CHARSrejects on the way in, for the same reason — and the quoted form escapes tabs, the line breaks and any other control character.display.titlegoes through the same quoting. The frontmatter test now parses the block withserde_yamlinstead of asserting substrings that hold just as well on invalid YAML.- A man-page example containing backticks is no longer truncated. The
#26renderer wrapped each invocation in a single-backtick code span, so the first inner backtick closed it:sharandmandocboth ship EXAMPLES lines using shell command substitution, and the rendered skill showed the agent a different command than the man page gives (shar `find . -print` | mail ...lost its substitution entirely). The upstream renderer this replaced put the same string inside ajsonfence, where it was escaped, so the regression came in with the fix. The span now follows CommonMark's rule: one more backtick than the longest run inside, with the space padding that lets the content begin or end with one. SKILL.mdstates the constraints the scan works hardest to establish. (#26) The generated skill is the contract summary an agent actually reads, and it dropped three annotations.x-apexe-conflicts-withdid not reach it at all —cli.lscarries mutual exclusion on 24 of its 47 properties and the skill mentioned none of it, so every caller discovered the constraint by violating it. Ax-apexe-value-optionalproperty, correctly typed["string", "boolean"], rendered asany— which tells an agent nothing and is broader than the truth. And man-page invocations rendered as ajsonblock with"inputs": null, which is the shape of a call taking no arguments: the opposite of what the example demonstrates. apexe now rendersSKILL.mditself rather than delegating to a formatter that cannot know aboutx-apexe-*: exclusions appear per property, a union renders asstring | booleanwith a sentence on what each side spells, and examples are command lines with one line saying they are not call templates. Examples carrying real structured inputs still render as JSON, so nothing is lost.- A2A agent cards advertise their examples. Module registration hardcoded
examples: vec![], discarding the man-page invocations thatapexe scanextracts and the binding file preserves, so apcore-a2a's skill mapper had nothing to render. Found while checking whether #26's omissions applied to the other contract surfaces. - A subcommand's global options render before the subcommand, where they work. (#39)
cli.git.cat_file {"C": "/some/repo"}emittedgit cat-file -C /some/repo, and git's global options must precede the subcommand — after it they are rejected or, as with-C, read as a different option belonging to the subcommand. The old rendering answeredfatal: not a git repository; the new one dispatches correctly.cli.git.logalone carried eleven such inert properties (--git-dir,--paginate,--exec-path,-C,-c, …). This is the class #20 introduced machinery for, but the subcommand token is not an operand and does not come frombuild_argumentsat all — it comes from the target URI — so a third placement (x-apexe-flag-position: "before-subcommand") is reported out of the renderer as its own group and interleaved by the module that holdscommand_parts. Only tool-level flags merged into a subcommand's schema are marked; the synthesized root command's globals are ordinary flags and do not move. The #18 fix is what made this reachable: before itcli.git.loghad no subcommand-specific options at all, so the whole contract was wrong in a more obvious way. - Unicode line terminators no longer reach the log. (#39)
CONTROL_CHARScovered\0,\nand\ronly, so U+2028, U+2029 and U+0085 passed the guard and reached the default-on logging middleware verbatim — 62 physical\nlines versus 71 under the Unicode-aware line splitting that JavaScript, Java and many log processors use, which means the caller decides where a log consumer sees a line boundary. That is exactly the framing argument 0.6.0 used to justify rejecting\n/\r; the three are now rejected on the same grounds.\t, VT and ANSI ESC are deliberately still allowed — tracing's Debug escaping neutralises them. format: "path"is emitted asx-apexe-pathinstead. (#32)pathis not in the JSON Schema format registry, and apcore-js hard-fails any call passing a property whoseformatit does not recognise — the inverse of the specification, under which an unrecognised format is an annotation and must not be an assertion failure. 73 properties carried it at the property level and 4 insideitems, and theitemsones are the path operands, socli.find,cli.cpandcli.lshad no callable form from a JS consumer at all. Carrying the fact asx-apexe-path: true— the convention already used byx-apexe-flagand the placement keywords — keeps the information and cannot be mistaken for an assertion by any consumer.format: "uri"is registered and is unchanged. The apcore-js half is a separate upstream matter; this fix stands on its own, since apexe should not have been emitting an unregistered format keyword either way.- An ACL rule that protects nothing now says so. (#39) Two ways to write one silently: a deny rule naming
cli.git.cat-file(the pre-#19 hyphenated id),cp,lsorgit logmatched no module and all four ran, because the ACL matchesmodule_idand nothing else — notmetadata.command_path, not the MCP alias; and apcore rejects an omittedtargetskey but acceptstargets: [], so an empty list is inert.build_executoris the first point at which the policy and the surface it guards both exist, so validation happens there, against the modules actually registered (i.e. after--prefix/--tags). The refuse-vs-warn split follows what the operator can have meant: an inert rule, and a target that is a near-miss of a registered id, refuse to start — the same fail-closed rule--aclalready applies to a missing or malformed file. A glob that matches nothing today only warns, because an ACL shared across differently filtered servers is a legitimate reason for it. - Both transports report which apexe a client is talking to. (#35) The A2A agent card reported
"version": "0.4.1"on apexe 0.6.0 — apcore-a2a's own staleVERSIONconstant, surfacing becauseconfig.versionwas never set — and MCP'sserverInfo.versionreported0.17.2, which is apcore-mcp's version. Both are now stamped fromapexe::VERSION. The stale upstream constant remains and is not apexe's to fix; setting the field makes it irrelevant here. --show-configcarries the flags it was given. (#37) The stdio form emittedargs: ["serve","--transport","stdio"]regardless of--modules-dir,--tags,--prefix,--aclor--enable-approval, so a user who scanned into a non-default directory got a generated config that exposed none of their tools.cursorignored--transportentirely and emitted a stdio command block even for--transport http. And an unknown format printedUnknown config format: vscodeto stdout and exited 0, so piping the command into a config file wrote that sentence as the file body — it now goes to stderr with a non-zero exit. Credential flags (--auth-token,--jwt-secret) are deliberately never echoed into a generated snippet, which is something people paste into shared repositories.--show-configwrites absolute paths. (#37)--show-config claude-desktop --modules-dir ./modulesemitted"./modules"verbatim, but the MCP client that runs the snippet launchesapexefrom its own working directory — Claude Desktop's is/, Cursor's is the workspace root — so the launched server read a directory that does not exist, logged "Modules directory not found, starting with zero tools" and exited 0. A server with no tools and no error, which is the same consequence the rest of #37.3 was filed about. A relative--aclfailed more quietly still: the governance boundary was simply not the one requested. Every path in a snippet now goes throughstd::path::absolute, resolved against the directory--show-configran in.- A
$notACL target is diagnosed by what apcore does with it. (#39) The validator stripped the$notsentinel and tested the operand as if it were positive, so it reported "this rule currently protects nothing" about the exact opposite situation: apcore evaluates$notas!match(operand, module_id), so an operand matching nothing makes the rule match everything — and under first-match-wins a blanketallowthere nullifies every deny below it. A near-miss operand is worse:$not cli.git.cat-fileagainst a registeredcli.git.cat_filecovers the one module it was written to exclude, and now refuses to start. --tagsrefuses an empty tag instead of serving nothing.--tags readonly,split to["readonly", ""], and every listed tag must match — no module carries an empty tag, so the registry came up empty and the whole tool surface was uncallable, signalled only byadmitted=0at info level, indistinguishable from an empty modules directory. Harmless before the filter moved to registration time. An empty token is now an error naming the stray comma; separately, a filter that excludes every loaded module logs aWARNsaying so, since that case is registry-dependent and an invocation is meant to be portable across differently scanned hosts.- The manual shows the wire shape MCP actually returns. §13's
isErrorexample renderedexit_code,stdout,stderrandai_guidanceas siblings ofisError. apcore-mcp emits{"content":[{"type":"text","text":"<the payload as a JSON string>"}],"isError":bool}, so a client author following the old block readresult.exit_code, gotundefined, and fell back toisError— precisely the mistake the section exists to prevent. The example now shows the real envelope and saysexit_codemust be read after JSON-parsingcontent[0].text. - The F5 governance document no longer ships the inert
require_approvalACL condition. §9.1 of the manual was corrected in this cycle and pinned with a test;docs/features/v2-f5-governance.mdwas left behind and still showedconditions: {require_approval: true}in four places, one of which described it as whatgenerate_defaultcurrently emits. It is not one of the five condition keys apcore registers, so a rule copied from there denies nothing underdefault_effect: allow. - The preview no longer discloses the binary path and argv on an ACL denial (#39) — fixed upstream in apcore-mcp, not here. Listed so the three #39 items above are not read as the whole issue.
- The manual no longer calls
--enable-approvala "human-in-the-loop gate". §9.6 and this changelog both already said the flag denies unconditionally and that "the docs no longer promise a prompt"; §11's limitations note was missed by that sweep. The documentation-consistency test now forbids the phrase anywhere in the manual. apexe a2a's lack of transport authentication is disclosed in the README too, not only in the manual — a reader who starts from the README meets the--auth*flags underapexe serveand reasonably assumes they apply. A consistency test now checks both documents against the runtime refusal a non-loopback--urlproduces.- The ACL example in the manual can now match something. (#37) §9.1's deny rule carried
conditions: {require_approval: true}, which is not a registered apcore condition key, so apcore loggedUnknown ACL condition — treated as unsatisfiedand ran the destructive module anyway.src/governance/acl.rshad already documented this exact trap, removed it fromgenerate_default, and pinned it with a regression test — only the docs were left behind, so anyone following the manual to lock down destructive modules got a rule matching nothing. The generated~/.apexe/acl.yamlwas correct throughout.
Added¶
--auth <token|jwt|none>,--auth-token(orAPEXE_AUTH_TOKEN),--jwt-secret(orAPEXE_JWT_SECRET) and--allow-unauthenticated-bindonapexe serve;McpServerBuilder::auth. Theapexe::authmodule is public, so an embedder can supply its ownAuthenticator.--no-log-argumentsonapexe serveandapexe a2a;McpServerBuilder::log_arguments/A2aServerBuilder::log_arguments.--allow-deprecated-sseonapexe serve;McpServerBuilder::allow_deprecated_sse.
Removed¶
- BREAKING (library API):
McpServerBuilder::validate_inputs. The library twin of--skip-validation, and dead for the same reason: it forwarded to apcore-mcp's pre-dispatch hook, which callsMcpExecutor::validate— a trait method that defaults toNoneand thatApcoreExecutorAdapternever overrides. The method toggled nothing for either value. Deleted rather than reworded, on the grounds--skip-validation's own regression test already states: failing at parse is louder than accepting a no-op that reads as "validation is off". Nothing is lost — schema validation runs in apcore'sinput_validationpipeline step insideExecutor::call, which apexe never removes. - BREAKING:
apexe serve --skip-validation. (#37) It advertised "skip input validation against tool schemas" and skipped nothing — all 33 probes behaved identically with and without it, including theadditionalProperties,required,enumand type violations it claimed to bypass. Every schema check runs in apcore'sinput_validationpipeline step, which apexe never removes; the flag toggled apcore-mcp's separate pre-dispatch hook, which only fires when the executor adapter implementsMcpExecutor::validate, andApcoreExecutorAdapterdoes not. apcore does exposeExecutionStrategy::remove("input_validation"), so the flag could have been made to work — but a flag whose only effect is to unvalidate the input of a process spawner is not one worth having. Removing it is the honest end state. The argv guards were never affected either way: they live in theexecutestep.
Changed¶
- BREAKING (HTTP/SSE only): an existing
apexe serve --transport httpdeployment now needs a bearer token. stdio — how most users run apexe — is untouched. A breaking change for a security default is a defensible use of the same 0.x latitude 0.6.0 already spent on four of them. isError: falseon a non-zero exit is now documented as deliberate, rather than left to be discovered. (#39) A wrapped command that ran and exited non-zero is a successful call:grepexits 1 when it finds nothing,diffexits 1 when files differ,testexits 1 for a false predicate, and reporting all three as tool failures would be wrong.isError: truestays reserved for the call never reaching the binary — schema, ACL and approval refusals. The manual now says so, with the A2A equivalent (TASK_STATE_COMPLETEDcarrying a non-zeroexit_codein the artifact), so a client author keys onexit_coderather than onisError.
Every tool apexe served over MCP was uncallable, and most of the ones that could be called were spelled wrong on the command line. Both are fixed here, along with the input validation that made the two most-used wrapped tools unable to do any real work.
A second round of verification against real binaries over apexe serve
--transport stdio found seven more defects, fixed here as well: every tool with
subcommands ran the wrong command, 44% of them never reached a client at all,
and the ones that did described a different command's options. Those fixes are
verified by executing the wrapped binary rather than by asserting on the
rendered string — three of them rendered perfectly and failed only when run.
Fixed¶
- BREAKING: the MCP tool name is the
module_idagain, so advertised tools can actually be called. apcore-mcp listsdisplay.mcp.aliasas the tool name but routes an incomingtools/callby treating the received name as amodule_idand looking it up in the registry — there is no alias-to-id reverse map anywhere on that path. apcore-toolkit'ssanitize_mcp_aliasrewrites.to_, so a dottedmodule_id— the apcore convention, and what apexe emits — guaranteedalias != module_idand every tool apexe exposed failed with[ModuleNotFound], including every button in the Explorer UI. The alias is now stripped before registration, so the name intools/listis the nametools/callaccepts:cli.curl, notcurl. A2A was never affected — it keeps the id and the display name in separate fields (skill.id/skill.name) — andmcp.description/mcp.guidancestill apply, since only the name is load-bearing for routing. The upstream defect remains; this works around it without touching themodule_idthat ACL rules,--prefixfiltering, audit records and A2A skill ids are all anchored to. - BREAKING: flags are spelled the way the tool actually accepts them. The renderer prefixed every input key with
--, which is wrong for most of what a scan finds. 452 of the 1006 flags across the 42 built-in overlays (44.9%) are short-only and need one dash:ls -lwas emitted asls --l, which BSDlsrejects outright, so 45 ofcli.ls's 47 properties were unusable.find's-daystartand-regextypeare multi-character yet single-dash, which no "one character means one dash" heuristic recovers. And_→-is lossy, so a long flag containing an underscore could never round-trip. The scanner now records the literal token it saw asx-apexe-flagon the schema property and the renderer reproduces it, rather than trying to invert a lossy mapping. - BREAKING: a long option carries its value with
=. It was emitted as two argv entries, which silently breaks every option whose value is optional:ls --classify neverlists a file namedneverand exits 2, while--classify=neverworks. GNU spells--classify,--color,--hyperlink,--backup,--preserve,--reflinkand--contextthat way, and the schema records no marker distinguishing an optional value from a required one — so=, which options with a required value also accept, is the only form that is always right. Short options are the opposite case and still pass the value separately, since-I=PATTERNwould pass a value beginning with=. - BREAKING: positional arguments are passed bare, in their declared order. All 42 built-in overlays declare
positional_args, and every one of them was emitted as--name value:ls /tmpwent out asls --file /tmp. Order was lost too — nothing recorded it, socp source targetdepended on the order the caller happened to write the JSON keys in, andcpinverts its meaning if the two are swapped. Operands now carryx-apexe-positionalwith their index, are emitted after all flags, and are sorted by that index.curlmasked this in every demo: it accepts--urlas an equivalent long option, so the one positional anybody exercised happened to work by coincidence. - A positional no longer silently discards a same-named flag's description. Building the schema inserted operands last and unconditionally, so
curl's<url>operand overwrote the--urlproperty and took its documentation with it. The description is now inherited when the operand has none — the common case, since usage lines carry no prose — and a name that is both required as a flag and as an operand no longer appears twice inrequired. - Shell metacharacters are no longer rejected in parameter values. The 15-character blacklist was carried over from the v0.1 prototype and guarded a threat that does not exist on this execution path: arguments reach the child through
Command::args(), which passes argv straight toexecve, and no shell is spawned anywhere (the singlezshinvocation inscanner::completionruns a hardcoded constant with no interpolation).;,|,&,$, backtick and quotes are ordinary bytes in argv — they cannot start a command, open a pipe or expand a variable. Rejecting them bought nothing and madecurlunable to send a JSON body ({"a":1}) or a form (a=1&b=2), andjqunable to receive any filter containing|,(,)or$— that is, unable to do the only thingjqdoes.\0,\nand\rare still rejected: the first is refused byCommandanyway, and the latter two corrupt the audit log's line framing. - Option-injection is now blocked, which the old blacklist did not do.
-was not in that 15-character set, so a value of--output=/etc/passwdor-K /etc/shadowpassed validation and was handed to the wrapped tool's own parser, which cannot distinguish it from an option the caller was never granted. Values that begin with-are now rejected. This matters more after the change above, because an operand reaches argv bare with no flag token in front of it. A JSON number is exempt, so a legitimate negative number still works; the same thing typed as a string is not, because the caller asked for text. - Values from binding files keep the strict character set.
json_flagandcommand_partsare build-time scan artifacts, not runtime data, so nothing legitimate puts a shell metacharacter in them and the conservative check stays useful there as a tamper signal. Applying one rule to both classes was the original mistake: it imposed a build-time constraint on caller-supplied data. - GNU-style operands are extracted at all. The usage-line parser only understood the BSD spelling, where the ellipsis goes inside the brackets (
ls ... [file ...]). GNU puts it outside and writes required operands bare and in caps, and all 20 GNU tools checked spell them that way:ls [OPTION]... [FILE]...,cp [OPTION]... [-T] SOURCE DEST,mkdir [OPTION]... DIRECTORY...,grep [OPTION]... PATTERNS [FILE].... Not one of those forms matched, so every GNU tool without a curated overlay produced a contract with no operands — an agent reading it had no way to name the file to operate on. Both ellipsis placements and the bare all-caps form are now recognised. Two exclusions keep this from over-reporting:[OPTION]...andcut's bareOPTION...name the option group rather than an operand, and a bracketed group whose first character is-is options all the way through — which is what separates[FILE]from[-T],[-Olevel],[-D debugopts]and BSD's bundled[-@ABCF], where the capitals sit behind a@rather than behind the dash. Verified against usage lines read from GNU coreutils 9.7, grep 3.11, diffutils 3.10 and findutils 4.10.0 in the digest-pinned image the overlays' own provenance names. jq's filter — its only required argument — is now extracted. The usage-line parser required a placeholder name to be a single token, sojq [options] <jq filter> [file...]yielded nothing at all and the generated module could not filter anything. Multi-word placeholders are now read (<jq filter>→jq_filter), and bracketed variadic operands ([file...]) are recognised alongside the angle-bracket form. The trailing...is required for the bracketed form, which is what stops it from reading[options],[-l]or[--color=when]as operands — the same restriction the BSD parser has always carried. Both styles are returned in usage-line order, since order is the argument's meaning.- Subcommand modules ran the tool name twice (
git git log). (#17) The target was built by prefixing the binary path ontofull_command, which already carries the tool name, socli.git.logemittedexec:///usr/bin/git git logand every call came back withgit: 'git' is not a git command. It affected every tool that has subcommands — all 142cli.git.*and all 12cli.cargo.*modules on the reporter's machine. The target is now built from the subcommand path alone. The old shape was pinned as correct by a unit test asserting"exec:///usr/bin/mytool mytool list", forty-six lines above another test whose comment reads "Root-only target should NOT repeat the tool name as an argument" — the duplication was recognised on one branch and asserted on the other, which is how it survived the release. That assertion is corrected, and the new coverage executes the module rather than comparing strings: a target that renders is not a target that runs. - Hyphenated
module_ids were written, counted, and then silently dropped. (#19) apcore enforces^[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)*$at registration, but ids were derived straight from the command name, sogit cat-fileproducedcli.git.cat-file.apexe scanwrote it,apexe listreported "142 module(s) found", and the server then refused it with a warning on stderr — 63 of git's 142 subcommands (44%) never reached a client, and nothing on the success path said so. The charset is now applied at generation time, so the surface a scan reports and the surface a server serves are the same set. The mapping is lossy and one-way, so the real command name is preserved inmetadata["command_path"]— the hyphen is what argv needs. A unit test asserting that Unicode names survive into the id was pinning the same defect (cli.café.étatis exactly as unregistrable) and now asserts the id is registrable and the name is preserved beside it. - Subcommand contracts described the wrong command. (#18)
git log --helpdoes not print help — it runsman git-log. No Tier 1 parser recognised that shape, so the parse yielded nothing and the module was assembled from the tool's global flags alone: all 25 ofcli.git.log's properties were--git-dir,--paginate,--html-pathand friends, and{"oneline": true}was rejected as invalid input. A newManparser reads the man-page layout at Tier 1 using the machinery Tier 2 already had, so a subcommand finally describes itself:cli.git.lognow carries 111 properties including--oneline,--followand--max-count, plus the<revision-range>and<path>operands recovered from the SYNOPSIS, which were previously inexpressible. Four classes of malformed property name are fixed with it, all of which produced keys no caller could render back to a flag:--exec-path[=<path>]yieldedexec_path[,--[no-]verifyyielded[no_]verify,-n<num>yieldedn<num>, and the end-of-options marker--yielded a property whose key was the empty string. A real scan of git now produces zero unregistrable ids and zero malformed property names across all 142 modules. The bracket that marks an optional value is recorded rather than discarded, since it is the only thing distinguishing--exec-pathfrom--exec-path=<p>, and such a flag's schema now admits both spellings. - Options that take a value were typed
boolean, and swallowed the next flag. (#21) When a placeholder was spelled in a form the format's regex did not anticipate —--proxy [protocol://]host[:port], or a value separated from its description by one space rather than two — it fell into the description text and the flag was typed boolean. Both doors were then shut: the schema permitted onlytrue, andtruerendered a bare flag the binary rejects. Worse, a bare value-taking flag is not a no-op —{"proxy": true, "connect_timeout": true}rendered--proxy --connect-timeoutand curl dialled a proxy named--connect-timeout, which is the same "it runs, and honours something the caller never meant" failurex-apexe-conflicts-withexists to prevent, reached from the renderer's own output. Affected 11 ofcli.curl's 257 properties and 3 ofcli.ssh's 45, including every form of ssh port forwarding. A placeholder left at the head of a description is now recovered and the property retyped, in a pass shared by every parser rather than fixed one regex at a time. The renderer additionally refuses to emit a bare token for an option the schema says takes a value. find's predicates rendered before the path, which nofindaccepts. (#20) Operands were emitted after every flag unconditionally.find's grammar isfind path ... [expression], sofind -name '*.txt' diris rejected outright — "illegal option -- n" on BSD, "paths must precede expression" on GNU — making all 98 predicate properties ofcli.findunusable. Operands now carry a placement marker (x-apexe-operand-position), and each side of the flags keeps its own declared order, sincefindhas one operand on each side. Placement is not derivable from a scan: the usage line gives the operand order but never says which of a tool's options live inside the trailing operand slot — find's predicates are documented in PRIMARIES, not in the synopsis — so it is stated in an overlay or not at all, and a tool without one keeps the ordinary trailing-operand behaviour. Set onfind@bsdandfind@gnu, both checked behaviourally against the real binaries (macOS 26.3/usr/bin/find, and findutils 4.10.0 in the digest-pinned imagefind@gnu's own provenance names).- The circuit breaker counted caller mistakes as module failures. (#22) apcore's breaker feeds every
ModuleErrorinto its rolling window, which inverts the polarity for a module wrapping a CLI binary: five calls rejected by input validation — the binary never spawned — openedcli.lsfor every caller, while five calls wherelsreally did fail on a missing path left it closed, because a non-zero exit is a successful execution. So a tool that failed every time kept its circuit closed while a caller sending a schema-invalid object disabled it for everyone. That collides directly with apexe's audience: schema trial-and-error is the normal behaviour of an LLM caller, and an agent that reads a conflict refusal and corrects itself is the success case for theconflicts_withenforcement added in this same release. Only failures that say something about the dependency's health — spawn failure, timeout, signal death — now feed the breaker. Governance refusals are excluded too, so a denied caller cannot open a circuit shared with the callers an ACL allows. documentationembedded raw man-page overstrike sequences. (#23) Help text captured from a tool that delegates--helpto its man page was stored verbatim, so eachcli.git.*binding carriedg\bgi\bit\bt l\blo\bog\bgwhere it meantgit log— 2.4 MB for a single git scan, largely encoding, and unreadable as documentation for the agent that reads it. Overstrike is now collapsed at the point of capture.
Changed¶
- Existing bindings keep working, but need a rescan to benefit. Every schema keyword introduced in this release is optional, and its absence preserves the prior behaviour: the renderer falls back to the old
--{key}spelling for any property without the new annotations, so bindings generated before this release behave exactly as they did rather than silently emitting nothing. Re-runapexe scanto pick up the corrected flag forms, targets, registrable ids, subcommand contracts and operand ordering. lnis annotateddestructive.ln -funlinks an existing target before linking, discarding that file's directory entry irrecoverably — the same overwrite behaviour for whichcpandmvare already marked destructive, and the reason GNUlnoffers--backup. Verified against the binary rather than inferred.- A man-page placeholder now types the value it names.
--max-count=<number>was typedstring, so the3a caller naturally sends was rejected. Inference is deliberately narrow — an unrecognised placeholder stays a string, because a wrong numeric guess rejects a value the tool accepts.
Fixed (overlays)¶
ls@gnu:-F/--classifytakes an optional value. It was typedboolean, sols --classify=nevercould not be expressed at all undermode: authoritative. GNU coreutils 9.7 spells it--classify[=WHEN]and rejects--classify=bogus; it is now anenumoveralways/auto/never, matching how the same file already handles--colorand--hyperlink. Verified in the digest-pinned image the overlay's own provenance names.ls@gnu:-f,-cand-udescribed behaviour coreutils 9.7 does not have.-fwas documented asdisable -ls --color, which stopped being true years before the 9.7 the overlay claims to describe:ls -l -fproduces a full long listing andls -f -sprints block counts. GNU 9.7 says onlysame as -a -U.-cand-uwere flattened toSort by, and with -l show, ctime— but the real behaviour is three-way, and the flattened form asserts the opposite of one branch:ls -lcsorts by name, not by ctime (only-ltsorts by it). All three now carry GNU 9.7's own wording, verified against the binary.find@gnu:-prunewas described as false under-depth. It saidAlways true unless -depth is in effect; GNU's man page saysTrue; ... If -depth is given, then -prune has no effect, andfind /p/sub -depth -name sub -prune -printdoes print, proving the predicate still evaluates true. An agent reading the old text would invert the short-circuit in the standard-prune -o -printidiom.diff@gnu:--forward-edhad its ordering backwards. It claimed outputin the ed command order, which ed cannot itself digest. Per diffutils' own manual the forward form carries changes in the order they appear in the file; it is-e, the form ed can digest, that is reversed. The old phrasing was also a reworded BSD man-page line.sort: an unattributable claim, present in two variants. Bothsort@gnuandsort@appleended--outputwithThe file is truncated and rewritten.— a sentence in no GNU help, man page or texinfo, and in no macOS man page either. It also implies the opposite of a documented guarantee: sort reads all input before opening the output file, sosort -o F Fsorts in place, which both variants do. Replaced on the GNU side with the texinfo fact, dropped on the Apple side.grep@gnu:--colourcarried BSD's wording.The same as --coloris BSD grep's man page; GNU's help lists--color[=WHEN], --colour[=WHEN]as a single entry and never says it.cp@gnu,mv@gnu,ls@gnu: optional values are now stated consistently.--backup,--preserve,--reflink,--context,--classifyand--hyperlinkall take an optional value, and only some said so —cp --contextandmkdir --contextare the same flag with the same GNU help text, and one documented it while the other did not.ls --hyperlinkadditionally readHyperlink file names., dropping theWHENits ownvalue_nameandenum_valuesdeclared.chmod@bsd:modeis not always required. BSDchmod's second usage form —chmod [-fhv] [-R [-H | -L | -P]] [-E | -C | -N | -i | -I] file ...— takes an ACL option in place of a mode operand, andchmod -C <file>parses fine without one. Marking it required blocked the entire ACL usage form.
Added¶
conflicts_withreaches the generated contract, and a conflicting call is refused. The field thatdocs/overlays.mdcalls the single biggest reason overlays exist had no consumer: 42 built-in overlays declare mutual exclusion on 220 flags, andbuild_input_schemanever emitted any of it, so not one reached a binding. It is now written to each property asx-apexe-conflicts-with— translated from command-line spellings into the property names a caller actually sends — and the executor refuses an invocation that names both.
Refusing matters more than reporting. Without it the pair is not an error but something worse: it renders, and which of the two the tool honours is decided by the order the caller happened to write the JSON keys in. An object has no ordering anyone intended as an interface, so {"f": true, "i": true} on rm was never "interactive wins" — it was whichever key was typed last. The call now fails with a message naming both flags, identically whichever order they arrived in.
false and null still render nothing and so do not count as sending a flag: {"l": true, "1": false} remains a valid way to say "long listing, not single-column". Only curated overlays state mutual exclusion, so a schema without the annotation is unaffected.
Changed (overlay format)¶
- 175 mutual-exclusion pairs added across 22 overlays. Once the definition widened and the executor began enforcing it, the overlays that had recorded only diagnosed errors were left with real gaps — a group the binary resolves silently is exactly the one a caller cannot predict, so it is the more important of the two to declare. Every pair was run in both orders against the reference build named in that overlay's own provenance (BSD/apple on macOS, GNU in the digest-pinned image) and kept only where the outcome depends on that order, or where one side is silently discarded. Biggest gaps:
ls@gnu+45 (sorting, timestamp source, quoting style, indicator style, size units — seven separate dimensions, of which only output format had been recorded),df@bsd+22 (the seven-way block-size group its SYNOPSIS spells with|),grep@gnu+15 andgrep@bsd+11 (output modes had been declared against-nbut never against each other),du@gnu+13,df@gnu+10,diff@gnu+10 (-q/--briefoverrides every output style silently, which is why it escaped the group everything else was diagnosed into).
Same-named flags diverge between variants more than expected, and each side was derived only from its own evidence: wc -c -m overrides on BSD but prints both columns on GNU; uniq -d -u lets -d win outright on BSD while GNU yields the empty set identically in either order; rm -i -I coexists on BSD but is last-one-wins on GNU; sort -c -m is diagnosed by Apple's build and accepted by GNU's, and -c -o the other way round. Four pairs were tested and deliberately not declared, since a wrong entry now refuses a legal call: tail@bsd -f/-F (-F implies -f), grep -o/-n (both take effect), rm@bsd -i/-I (both prompts fire), df@gnu -P (not part of the block-size dimension). The provenance.notes in every touched file record which kind each group is, and sentences written under the older narrow reading were corrected rather than left to contradict the data.
- conflicts_with covers override groups, not only diagnosed errors. The 42 built-in overlays had been split between the two readings, so the same field meant different things in different files. It now means "these must not be sent together" in both senses, and the reason is specific to how apexe is called: its input is a JSON object, which has no ordering, so for a last-one-wins group which flag wins is decided by the order the caller happened to write the keys in. {"f": true, "i": true} on rm is not "-i wins", it is unpredictable — the same one correct move as for a hard conflict, namely send one or the other. The narrower reading is actively worse here: it marks such a pair as combinable, which tells an agent it may send both. du@bsd's note, which had stated the opposite rule, is corrected; provenance.notes is now where the kind of incompatibility is recorded.
- provenance.source is documented as the document read, not the check performed. No binary-probe value was added, and the reasoning is written down so it is not revisited by guess: probing establishes that a flag exists, what the binary prints on rejection, and whether a value must be attached — but not what a flag means, which is what a description asserts and what source attributes. ls@gnu's -f is the case in point: --help was right the whole time and the description was stale, so the probe's role was to send someone back to the document. Probe findings belong in notes, with the command that produced them.
Documentation¶
- The built-in GNU overlay count in
docs/overlays.mdsaid 14; there are 21, and four of them declareGNU diffutils/GNU grep/GNU findutilsrather thanGNU coreutils. - Every
provenance.commandthat names a container image now pins it by digest. Twenty GNU overlays randocker run --rm debian:stable-slim <tool> --helpwhile theirenvironmentpinned a digest — a self-contradiction that would have re-read a different build on any later run.docs/overlays.mdnow says so explicitly, since it already required a digest forenvironment. - The basic example advertised flag counts that no longer matched what a scan produces (
curl — 12 flags, against 257 actually found) and suggested acli.curlcall with nourl, which cannot succeed. Its sample calls now run, and it states that Explorer prefills every schema property as a blank template that has to be trimmed before calling — an empty string is a value, not an omission, andcurl --output ""fails on it.
Fixed (self-review of the above)¶
Seven defects the fixes above introduced, each found by reviewing this release against real binaries and each verified by re-running the failing case. They are listed separately because every one of them is a regression created by a fix in this same release, not a pre-existing bug.
- The circuit breaker's error filter disabled a module in the half-open state. Not counting a caller-fault error is not the same as the call never happening. In
HALF_OPENapcore admits exactly one probe and releases the slot in only two places —afteron success, and theon_error-that-opens branch, which in that state is everyon_error. Returning early therefore skipped the only release path the call had, and because apcore runs middlewarebeforeahead of input validation, one invalid argument object was admitted as the probe and then rejected, leaving the slot held. Every other caller was refused withCircuitBreakerOpenfor a full 30-second recovery window: the exact defect #22 exists to remove, relocated fromCLOSEDintoHALF_OPEN. The suppressed path now hands the slot back, leaving the rolling window untouched so a caller mistake still cannot launder an unhealthy dependency back toCLOSED. - Operand placement broke
find's options while fixing its predicates.findputs two classes of dash-token on opposite sides of the same operand — options before the paths, primaries after — andbefore_flagsis a single boolean on the operand, so it moved both at once.find dir -Lis "unknown primary or operator" on BSD and "unknown predicate" on GNU, so 8 BSD and 6 GNU properties went from working to broken while the 88 primaries went the other way. Placement is now expressible per flag as well (before_operands→x-apexe-flag-position), and the renderer emits four ordered groups: leading flags, leading operands, trailing flags, trailing operands. Each of the 14 options was run in both positions against the builds the two overlays' provenance names;-dwas tested and deliberately left unmarked, because BSD accepts it either way. apexe scan --format jsonreported command lines that do not run. The id fold is one-way, andCommandContract.commandstill reverse-derived from the id, so 68 of git's 142 commands were reported asgit check_ignore,git cherry_pick,git format_patch— strings git rejects.metadata["command_path"], added in this release precisely to hold the unfolded name, had no reader. The field is now built from it, falling back to the id only for bindings written before that key existed.- The placeholder-recovery pass re-typed working boolean switches. It accepted any first token containing brackets and any ALL-CAPS first word, neither of which is reliably a placeholder: Info-ZIP prefixes 16 boolean switches with
[WIN32]/[VMS]/[MacOS],[deprecated]is a widespread convention, and descriptions open with a caps identifier (ld -noprebind— "LD_PREBIND is no longer supported";ex --echo-wid— "GTK GUI only:"). Each became a value-taking string option that could no longer be sent astrueat all — the inverse of the bug the pass was written for. The bracket form now requires text outside the brackets, which is what distinguishes[protocol://]host[:port]from a tag, and the bare-caps form is restricted to a closed list of conventional operand words. --time-condwas typed as a number.contains("time")matched as a substring, so curl's-z, --time-cond <time>— which takes a date expression or a filename — admitted only values curl cannot use. Durations are now matched as whole words.- The end-of-options fix did not actually drop the flag.
parse_flag_lineskipped naming a bare--but still returned a flag, so it reached the schema throughcanonical_name's"unknown"fallback: 6 of git's 142 modules advertised a boolean property namedunknownthat renders as--unknown, which git rejects. Nameless flags are now dropped at the single point every parser path funnels through. The regression test passed throughout because it asserted the name was non-empty, which the fallback satisfies; it now asserts the count. - Man-page synopses leaked option letters and option values as operands. A synopsis spells an alias set as a parenthesised alternation —
[(-m | --max-count) <num>]— so the character after[is(rather than-and the group read as operands, and the check ran only on the innermost bracket.cli.git.grepdeclaredo,pagerandnumas positionals, and oncli.git.commitan operand namedcdisplaced git's real-coption, making it unreachable. The option-group check now skips a leading(and walks outward through every enclosing group, and the angle-bracket pass consults it at all — which it never had, because ordinary--helptext writes[-C <path>]and never exposed the gap.
A rescan of git now produces 142 modules with zero unregistrable ids, zero malformed property names, zero bogus unknown properties, zero non-invocable command strings, and -c restored as a flag.
Changed (self-review of the above)¶
Eight further findings from the same review. None is a wrong answer to a caller, so they are listed apart from the defects above.
- An existing cache silently bypassed every scanner fix. The cache key named only the tool, variant and version, so it did not change when apexe's own parsing did — and because every field added to the scanned model is
#[serde(default)], a document written by an older build still deserialized and was returned before any parsing ran. A user who upgraded and re-ranapexe scan gitgot the pre-fix result at exit 0 with nothing saying so, and--no-cachewas the only escape. The key now carries aSCAN_FORMAT_VERSION, bumped to 2 for this release. - A positional operand no longer erases a same-named flag. "Operand wins" is right for
curl, where--urland<url>are the same thing, butfind -path PATTERNis a glob predicate unrelated to thepathoperand, andgrep --file=FILEreads patterns from a file while thefileoperand names what to search. Both options had vanished from their contracts entirely. The displaced flag is now re-keyed (path_option,file_option) rather than dropped; the executor spells a flag fromx-apexe-flag, never from the property key, so the rendered command line is unchanged. - Accurate subcommand summaries are no longer padded with the parent tool's description. Appending the tool's man DESCRIPTION to any subcommand summary shorter than 20 characters made sense while those summaries were stubs. Once the man parser started supplying real NAME lines,
git log→ "Show commit logs" became "Show commit logs — Git is a fast, scalable, distributed revision control system…", 84% of which describesgit— the same "description of git filed under the name of git log" the man parser exists to prevent. A summary that came from a man page is now left alone. - Scanning by absolute path yields the same contract as scanning by name.
ManHelpParserforwarded the rawtool_nameto example extraction, which matches a bare invocation by prefix — so/usr/bin/gitmatched no EXAMPLES line and the same tool produced different output depending on how it was named. - One placeholder-to-type table instead of four.
parsers::gnu,parsers::clap_parser,parsers::clickand the new recovery pass each carried their own, and they disagreed:SIZEwas String in one and Integer in another,FLOAT/DECIMALexisted only in the GNU copy, durations only in the new one. Both the help path and the man path feed the same merged flag list, so an option's emitted JSON type depended on which parser happened to win on that host —{"size": 4096}validated against one machine's contract and was rejected by another's. - The circular dependency between
scanner::man_pageandscanner::parsersis gone.value_placeholderis a post-parse repair pass with consumers on both sides of the tier boundary, not aCliParser, so it now lives atscanner::value_placeholder. value_optionalis declarable and documented. It reached the Rust overlay loader and the emitted contract but never$defs/flaginschemas/tool-overlay.schema.json, which isadditionalProperties: false— so an author writing it got a validation failure for a field the loader honours, and the field appeared in no document. Both are fixed, andbefore_operandswas added to the schema alongside it.- BREAKING (library): one unscannable tool no longer discards the whole batch.
ScanOrchestrator::scanpropagated the first error with?, soapexe scan git curl nonexistentwrote no bindings at all — the tools already scanned were thrown away, the tools after it were never reached, and the message named no tool. Scanning is per-tool work with no shared state, so there was nothing to abort for. It now returns aScanOutcome { tools, failures }instead ofResult<Vec<_>>; each failure carries the tool as the caller named it and the rendered cause. The CLI writes bindings for everything that scanned, names every failure, and still exits non-zero — reportingScanned 21 of 22 toolswith the successes on disk, because a pipeline must not read a short surface as the whole surface. A run where nothing scanned fails outright and writes nothing, since an empty ACL over a good one is worse than doing nothing. - Array-typed paths and URLs carry their
formathint again. The hint exists so an agent can tell a path from free text, but it was attached inside the scalar branch of each schema builder, so both array branches dropped it — and arrays are the common case for exactly those types. Scanning ten of the overlay-backed tools recovers 12 hints that were previously emitted for none of them. It is attached toitems, where it describes each element rather than the array, andformat_hintis now the one place that decides it. - Documentation that this release invalidated. The parser inventory was stated in four places and only
FEATURE_MANIFEST.mdwas guarded, so the user manual still said "Five", and the README and the scanner's crate doc still listed the four parsers from before BSD Usage existed. §9.5 of the manual still describedCircuitBreakerMiddlewarecounting every failure — the behaviour this release removes. All four sites are corrected and the doc-consistency test now covers the manual, the README and the crate doc, so the next parser cannot go stale in one file only.
Known gaps¶
- The negated half of
--[no-]verifyis not listed separately. The notation documents both--verifyand--no-verify; the parser emits one flag per option line, and the affirmative form is what it keeps. Manufacturing the second flag is a change to that contract rather than a fix to a malformed name, so it is left for its own change.
[0.5.1] - 2026-07-28¶
Fixed¶
- A global option's value placeholder is no longer scanned as a positional argument. Usage lines spell an option's argument with the same
<name>angle brackets as a real operand, and the extractor took every<name>on the line — sousage: git [-v | --version] [-h | --help] [-C <path>] [-c <name>=<value>]gavegitthree required positional arguments namedpath,nameandvalue, none of which the bare command accepts. An agent reading that contract would construct a callgitrejects. Placeholders bound to an option (-C <path>,-c <name>=<value>,--git-dir=<path>,--exec-path[=<path>], and repeatable forms like--include=<path>...and-I <dir>...) are now skipped, and a placeholder inside an optional[...]group reportsrequired: falseinstead of the hardcodedtrue— the trailing<args>ingit [--version] <command> [<args>]is optional by construction. - The four help parsers share one usage-line extractor.
gnu,cobra,clapandclickeach carried a verbatim copy of the same naive regex, so the defect was present in all of them and a fix to one would have left three behind. They now callscanner::parsers::positional_args::extract_args_from_usage_line. The BSD parser already avoided this class of mistake (itsBUNDLED_REdocuments why valued options must not match) and is unchanged. Overlays are unaffected — they carry no subcommand layer and never took this path.
[0.5.0] - 2026-07-28¶
Added¶
- Man page
EXAMPLESare extracted —ScannedCLITool.examplesandCommandContract.examplesnow carry the hand-written invocations from a tool's man page:lsyields 3,find9,tar10 andgrep13, where every tool previously yielded 0. This is the only human-reviewed usage a scan can reach — help text lists what the flags are, whileEXAMPLESshows which combinations make sense together, and no amount of flag parsing recovers that. Both man layouts are matched: a shell prompt ($ grep -w 'patricia' myfile, used bylsandgrep) and a bare invocation (tar -czf file.tar.gz source.c, used bytarandfind). A bare invocation is accepted only when it starts with the tool's own name, which is what separates a command from the prose describing it — every one of these pages interleaves the two. Kept as command lines rather than parsed into structured inputs, deliberately:find / \! -name "*.c" -printdoes not survive being parsed back into schema fields, and a consumer that guessed at one would emit a call the tool rejects. CommandContract.examples— the flattened contract dropped the examples the generated binding carried, so one scan described the same command differently depending on which output a consumer read.- Prebuilt release binaries — a GitHub Actions workflow (
.github/workflows/release.yml) now buildsapexeforx86_64/aarch64on both macOS and Linux and attaches the archives (plussha256checksums) to the GitHub Release, so installing no longer requires a Rust toolchain. It runs on therust/v*tag thatapdev-rs releasepushes, or can be dispatched manually against an existing tag to backfill binaries.aarch64-unknown-linux-gnubuilds natively on GitHub'subuntu-24.04-armrunner rather than cross-compiling, avoiding apkg-configcross-compilation sysroot that isn't set up on thex86_64runners.
Changed¶
- Linux release builds statically link OpenSSL —
Cargo.tomlnow pulls inopensslwith thevendoredfeature forcfg(target_os = "linux"), so the released Linux binaries no longer depend on whatever OpenSSL version happens to be installed on the end user's distro.
Fixed¶
- BREAKING:
open_worldis inferred rather than asserted. It was hardcodedtruefor every command, which left the annotation carrying no signal at all:lsandcurlwere indistinguishable,risk_from_annotationshad to ignore the field (its own doc comment said so), andRisk::OpenWorldwas therefore never emitted by any scan — a declared risk class no output could contain. A consumer gating on the boundary (demanding a declared credential, or refusing to run a networked command in a local sandbox) had nothing to gate on. Two signals now: the executable itself (curl,wget,ssh,scp,sftp,rsync,nc,telnet,ftp, …), and networked subcommands of otherwise local tools (push,pull,fetch,clone,publish,install,deploy,login, …).gitscans to 4open-world, 7readonly, 127writeand 4destructivecommands where every one was previously alike. Name-based, so it is a floor rather than a guarantee — a tool that opens a socket under an unremarkable name is not caught, and an overlay'sannotation_overridesremains the way to state the truth for a specific one. - BREAKING:
riskconsumesopen_world.curl,wgetandsshreportopen-worldwhere they reportedwrite. Destructive outranks open-world, because irreversibility is what a consumer must gate on first; open-world outranks readonly, becausecurlreading a URL still crosses a trust boundary, and reporting it as readonly hides it from the gate that exists for exactly that. --formatand-jno longer imply JSON output. The structured-output regex fallback matched a bare--formator-janywhere in help text, sotarwas taggedstructured-output— telling an agent it could request JSON from a command that has never emitted any.tar --formatselects an archive format (ustar,pax,cpio) andtar -jselects bzip2 compression. Every pattern now requires the wordjsonon the same line as the flag, which keeps the Cobra-style--format string Output format (json, text)matching while droppingtar's bare--format <format>.-jis removed entirely: across CLIs it means "jobs" or "bzip2" far more often than JSON.
[0.4.0] - 2026-07-28¶
Added¶
- Tool variant detection — a command name does not identify a program, so every scan probes the binary (
<binary> --version) and classifies it asbsd,gnu,apple,busyboxorunknown, surfaced asScannedCLITool.variant. macOS/bin/lsis BSD, Linux/usr/bin/lsis GNU coreutils, Alpine is BusyBox, and Homebrew coreutils puts GNUlson a macOS box — the probe is the only signal that separates that last case from the system binary, so no path heuristic can replace it.gnuspans the whole GNU family rather than coreutils alone, sincediffutils,tar,sedandbashare separate projects;applecovers Apple's own ports, whose banner names Apple rather than BSD (sortreports2.3-Apple (197),gitreports(Apple Git-155)). - The classification order is fixed and load bearing. Six rules run in sequence:
busybox, a BSD marker, aGNU <package>pair, an Apple marker, a rejected--versioncorroborated by a BSD-family platform, thenunknown. BSD is tested before GNU because macOSgrepreportsgrep (BSD grep, GNU compatible) 2.6.0-FreeBSD— a BSD tool advertising GNU compatibility, not a GNU tool. The Apple rule strips<arch>-apple-<os>target triples first, sincecurl 8.7.1 (x86_64-apple-darwin25.0)andGNU bash ... (arm64-apple-darwin25)both carry the token without being Apple ports. Licence boilerplate is excluded from the GNU test, because every GPL tool printsGNU General Public Licensewhether or not it is a GNU project. Absdverdict from a rejected probe additionally requires platform corroboration: rejecting--versiononly proves a tool is not GNU. BSD markers match token prefixes, sobsdtar 3.5.3 - libarchiveclassifies as BSD. The reasoning is recorded indocs/overlays.mdso the order is not "simplified" later. - Curated tool overlays — a reviewed description of one variant of one command, keyed by
(command, variant, version_range)and matched byprobe>platform+binary_globs>platformalone.mode: authoritativereplaces the scan surface entirely (for system built-ins the overlay fully enumerates);mode: mergekeeps the scan as the base and overrides matching flags. Overlays are the only source that can stateconflicts_with, since no help or man page format expresses mutual exclusion machine-readably. 42 ship built in, covering the 21-command POSIX core across their BSD, GNU and Apple variants —cat chmod cp cut df diff du find grep head ln ls mkdir mv rm sort tail touch uniq wc xargs;~/.apexe/overlays/*.{json,yaml}andapexe scan --overlay <PATH>add more. The format is defined by a standalone JSON Schema atschemas/tool-overlay.schema.json, with tests guarding it against drifting from the Rust types. - Overlay provenance is mandatory at
confidence: verified— an overlay claiming to be verified must record how it was checked: the platform and version of the reference installation, the upstreampackage, which document was read (man-page/help/vendor-docs), the date, and ideally the re-runnable command and a digest-pinned environment. The schema rejects averifiedoverlay without it, andvendor-docsadditionally requires areferencecitation because it has no command anyone can re-run. Without this, averified+authoritativeoverlay replaces the entire scan result with an assertion nobody can re-check.EvidenceSourcehas exactly three variants by design — there is none meaning "I know this tool", because that is not evidence. - Per-flag
confidenceandsources— everyScannedFlagrecords which tiers produced it, plus a derived trust level:verified(overlay) >high(completion spec) >medium(two independent heuristic sources agree) >low(a single unconfirmed source). Consumers can now tell a curated fact from a text-scraping guess. On macOS,lsreports 46verifiedflags;curlreports 12mediumand 245low. ScannedCLITool.positional_args— tool-level positional arguments (ls [file ...]) now reach the generated input schema through the synthesized root command. Tier 1 parsed them and then discarded them.- Overlay behavioral annotations — an overlay may assert
readonly/destructive/idempotent/requires_approval, overriding the adapter's name-and-flag inference. Only fields the overlay actually sets are replaced. - Man pages promoted to a first-class usage source — Tier 2 now contributes flags to
global_flags, not just descriptions to flags Tier 1 already found. Tools whose--helpis a single bundled usage line (most BSD/macOS built-ins) previously scanned to zero flags: on macOS,lsnow yields 46 flags (was 0),grep51 (was 0),git25 (was 0),curl257 (was 12). - BSD man page layout support — options listed inside
DESCRIPTIONare parsed, in addition to the GNUOPTIONSsection. The intro line is matched as a pattern (the … options are as follows/available) rather than a fixed list, because the wording varies per page and the variants arrived one bug at a time:lssays "The following options are available",cat"The options are as follows",sort"The command line options are as follows",chmod"The generic options are as follows". Missing one is silent — the entire option block simply becomes invisible, which costsort10 flags andchmod4 before this was generalized. Option indentation is inferred from the first option line instead of being hardcoded to GNU's 7 columns (BSD uses 5). - Man page flag detail — alias lists (
-a, --all), inline values (--color=when), and separate value placeholders (-D format,-o FILE) are parsed, so value-taking flags map tostringand switches tobooleaninstead of everything defaulting tostring. ScannedCLITool.description— tool-level description sourced from the man pageDESCRIPTION. Subcommand-less tools previously fell back to a bareExecute <name>.- Empty-scan warning — a scan that extracts no flags and no subcommands now records a warning instead of silently returning an empty result.
BsdUsageParser— fifth built-in parser (priority 95, ahead of GNU) for the single-line bundled usage that BSD/macOS built-ins print when they reject--help:usage: ls [-@ABC...] [--color=when] [-D format] [file ...]. Expands the bundled group into individual boolean switches, and parses valued short options, long options with inline values, and variadic operands. It claims only text containing a genuine bundled group, so GNU-style help still routes to the GNU parser.- git-style subcommand lists — the GNU parser recognizes prose section intros ("These are common Git commands used in various situations:") in addition to
Commands:headers, and tolerates command lists split into blank-line-separated labelled groups.gitpreviously yielded zero subcommands. long_runningon an overlay flag — a machine-readable form of "this option may make the command never terminate on its own".tail -fblocked an agent against the harness timeout for a full two minutes during overlay verification, and the only way to say so was prose in adescription, which no executor can act on. It reachesScannedFlag.long_runningand then the emitted contract as the JSON Schema extension keywordx-apexe-long-running— an extension rather than a constraint, becausefollow: trueis a perfectly valid value; what it tells an executor is to bound the timeout or refuse. The claim is possibility, not certainty: the BSD man page statestail -freturns immediately when its input is a pipe, so a field asserting "always blocks" would be false. Set on exactly four verified flags (BSDtail -f/-F, GNUtail -f/--followand-F); flags that merely change how long a follow lasts (GNU--retry,--sleep-interval,--pid,--max-unchanged-stats) are deliberately out of scope, since none of them decides termination.match.platformis an open string, not an enum — taken verbatim fromstd::env::consts::OSand normalised to lower case, somacos,linux,freebsd,openbsd,netbsd,dragonfly,solarisand anything else a host reports all work without an apexe change. Operating systems are not an enumerable set, and a closed enum would collapse every unnamed one into a lossyOtherbucket.ToolVariantstays an enum for the opposite reason: each member exists only because the classifier can probe for it, and a string would let an overlay declarevariant: "gnu-ish"and silently never match. There is deliberately no Linux distribution dimension — GNU coreutilslshas the same 83 flags on Debian 9.7, Ubuntu 9.4 and Fedora 9.5, while BusyBoxlshas 21, so divergence tracks the implementation, whichvariantalready captures.- Single-dash multi-character flags — an overlay's
shortfield accepts-maxdepth,-delete,-name,-files0-from.find's entire expression language is built from these, so it was previously inexpressible: validation demanded exactly two characters. A--longtoken misfiled undershortis still rejected, since validation now checks each field against its own rule rather than walking the merged name list. docs/overlays.md— the overlay authoring guide: when an overlay is warranted, the per-variant verification procedure with exact commands (man -P cat <tool> | col -bfor BSD,docker run --rm debian:stable-slim <tool> --helpfor GNU,alpinefor BusyBox), how to fill in provenance, an explicit table of what can and cannot be machine-checked, and the traps already hit in practice.
Changed¶
- Shell completion directories discovered dynamically — zsh's
$fpathis queried once per process instead of guessing three hardcoded paths, none of which exist on macOS (system completions live in the version-stamped/usr/share/zsh/5.9/functions). Homebrew and distro bash-completion directories are also checked. Tier 3 previously never activated on macOS. - Completion subcommand extraction rewritten — prefers the
_<tool>-<subcommand> ()function convention that system zsh completions follow; thecommands=(...)array fallback is now confined to the array body. The previous whole-file scan for'name:description'matched_argumentsoption specs, which would have injected phantom subcommands (_lsadvertises aformatsspec despitelshaving no subcommands, and_gityielded 131 internal completion tags rather than git's actual commands). - BREAKING:
apexe scan --format json|yamlemits a singleScanReportdocument —{ "tools": [...], "commands": [...] }. Previously each tool was printed as its own document, so a multi-tool scan's stdout was not valid JSON.commands[]is a new flattened per-command contract (id,command,description,risk,input_schema,output_schema) for consumers that bind against commands rather than walking the parse tree. Consumers reading the old top-levelScannedCLIToolshape must now readtools[0]. - BREAKING: the dormant
user_overridepath is gone —ParserPipeline::parseno longer takesuser_override: Option<&Path>. That hook loaded aParsedHelpYAML document at a layer that cannot see the tool's variant, so it could not express "BSDls, but not the Homebrew GNU one", andScanOrchestratoralways passedNone— it was unreachable. Overriding a scan is now the overlay mechanism's job, reachable viaapexe scan --overlay <PATH>. An explicitly named overlay outranks every other source and skips the variant, platform and probe conditions it declares; only the command name must still agree, so a mistyped path cannot silently reshape an unrelated tool. - Scan cache keyed by variant — cache entries are now
<name>@<variant>_<version>.scan.json. A machine holding both BSD/bin/lsand Homebrew's GNUls(both reporting no usable version) previously shared one entry, so whichever was scanned last supplied the other's flags. - Tool identity normalized to the command name —
scan /bin/lsandscan lsnow produce the samename, module id (cli.ls), cache entry, and risk annotation; the full path is kept inbinary_pathfor execution. Previously an absolute path producedcli./bin/ls, skipped man/completion lookup entirely, failed to cache, and mis-inferred risk aswriteinstead ofreadonly.
Fixed¶
- Man page parsing was inert on macOS —
man -P catemits nroff overstrike (D\bD), so every section header read asDDEESSCCRRIIPPTTIIOONNand never matched. Overstrike is now stripped, which is what made Tier 2 reachable at all on BSD systems. - Logs no longer corrupt machine-readable stdout —
tracingwrites to stderr instead of stdout.scan --format jsoninterleaved log lines into its own output, so any consumer doingJSON.parse(stdout)failed unconditionally. - Help error text no longer used as a description — a tool that rejects
--help(ls: unrecognized option '--help') had its error message parsed as the tool description; the man pageDESCRIPTIONnow takes precedence. ls@gnuwas missing--zero— found by diffing the overlay against a real GNU coreutils 9.7--helpin a container. That overlay had been written without a GNU reference installation: it scored 100% precision but omitted a flag added in coreutils 8.25. Everything present was correct, which is what makes this failure mode hard to notice, and is why provenance is now required.
Notes¶
- No
apexe overlay verifysubcommand was added, deliberately. A tool can compare flag names; it cannot check descriptions,conflicts_with, types or enum values — and those are the reason overlays exist at all. A green check covering only the mechanical half would be read as "this overlay is correct". The verification procedure is documented for humans instead. See "What cannot be automated" indocs/overlays.md.
[0.3.0] - 2026-07-17¶
Added¶
apexe a2a— New subcommand exposing scanned CLI modules as an A2A agent viaapcore-a2a, sharing governance (ACL, logging, approval) withapexe servethrough a commonbuild_executor().- Live module annotations —
CliModulenow implementsModule::annotations(), so apcore's approval gate readsrequires_approval/destructivefrom the resolved module instance instead of silently defaulting. - Display/alias metadata now reaches the registry —
ModuleDescriptor.metadataand.displayare populated from the scanned binding, activating the MCP/A2A tool-alias resolution (metadata["display"]["mcp"|"a2a"]["alias"]) thatDisplayResolveralready computed but was previously discarded at registration. examples/acl_demo— New example (aligned withaxum-apcore/examples/acl_demo) demonstrating role-based ACL rules (orders.deleteadmin-only,orders.listpublic) enforced onCliModulecalls viaExecutor.- Subprocess hardening —
execute_subprocessnow caps captured stdout/stderr at 64 MiB (stdout_truncated/stderr_truncatedsurfaced in the result) and switched fromstd::process::Command+spawn_blockingtotokio::process::Commandwithkill_on_drop(true), so a timed-out subprocess is actually killed instead of leaking as an orphan. Module::preview()—CliModuleimplements apcore's dry-run preview hook for destructive commands, surfacing the exact resolved command line (not a simulated before/after) via apcore-mcp's__apcore_module_previewmeta-tool.- Resilience middleware —
CircuitBreakerMiddlewareandRetryMiddlewareare wired intobuild_executor(on by default;apexe serve/apexe a2a --no-circuit-breaker/--no-retryto disable). Retry only ever fires on a timeout for a module annotatedidempotent, so it can't cause a destructive command to run twice. SkillOutput+apexe scan --skills-dir <DIR>— writes a Claude Skill (SKILL.md) per module via apcore-toolkit'sModuleStyle::Skillformatter, directly usable by Claude Code.apexe serve --metrics— opt-in/metrics(Prometheus) and/usage(JSON) observability endpoints viaAPCoreMCPBuilder::observability. HTTP/SSE transports only; a no-op warning on stdio.- Pluggable approval store —
ExecutorOptions/McpServerBuilder/A2aServerBuilderaccept an optionalArc<dyn ApprovalStore>, switching arequires_approvalmodule's approval flow from the blockingElicitationApprovalHandlerto the non-blockingStorageBackedApprovalHandler. Library-only (no CLI flag —InMemoryApprovalStoreisn't shared across process invocations); bring your own persistent store to use it. - Governance audit trail (wired end to end) —
CliModule::executerecords every execution (module_id, status, exit_code, duration; input hashed, never stored raw) andACL::set_audit_loggerrecords every allow/deny decision, both appended as JSONL toconfig.audit_log. PreviouslyAuditManagerandconfig.audit_logwere dormant. - MCP & A2A serve-path integration tests —
tests/mcp_integration.rs/tests/a2a_integration.rsdrive a real on-disk binding through the request path (tools/callexecutes, injection blocked, agent card exposes the scanned skill). AddsA2aServerBuilder::agent_card()(in-process, no port bind — the A2A analog ofMcpServerBuilder::export_openai_tools).
Changed¶
- Upgraded apcore ecosystem —
apcore = "0.26",apcore-cli = "0.10",apcore-mcp = "0.17",apcore-toolkit = "0.10"(default-features = false), plus newapcore-a2a = "0.4". ModuleDescriptorconstruction rewritten — matches the reshaped struct (module_id,description,version,documentation,annotations: Option<...>, etc.) shared by the new MCP and A2A builders viacrate::module::registry::build_executor.output/loader.rs—load_modules_from_dirnow delegates to apcore-toolkit'sBindingLoader(strict mode) instead of a hand-rolled parser, picking up a 16 MiB per-file cap and a 10,000-file per-directory cap for free. Drops the undocumented bare-single-ScannedModule-without-a-bindings-key fallback, whichYamlOutputnever produced anyway.- Timeout retryability moved from
execute_subprocesstoCliModule::execute— a killed subprocess may have partially applied a non-idempotent side effect, so onlyCliModule(which knows the module'sidempotentannotation) decides whether a timeout is safe to retry. - Removed the non-functional
apexe a2a --enable-approvalflag — A2A has no elicitation transport and no CLI approval-store, so the flag could only ever error at serve time. Approval on A2A remains a library-only feature (supply anApprovalStore);apexe serve --enable-approvalis unaffected. - Parser regexes compiled once (
LazyLock) — help-format parsers hoisted per-callRegex::newto module-level statics, removing thousands of recompiles on deep subcommand trees. - CRLF help normalized at the parser pipeline boundary —
\r\n/\rhelp text (e.g. a Windows tool's output) now parses identically to\nacross all parsers. - Specs aligned to implementation — the F5
--sandbox/SandboxManagerand F4--require-authdesigns are removed from the feature specs; subprocess isolation is unconditional (see Security) and transport auth is delegated to the apcore library API with a localhost default.
Removed¶
SandboxManager/governance::sandbox— deleted.apcore-cli::Sandboxrequires the host binary to re-exec itself with an--internal-sandbox-runnersubcommand and rediscover modules fromAPCORE_EXTENSIONS_ROOT; apexe's runtime-scannedCliModules don't fit that model. There is no--sandboxtoggle: subprocess isolation (timeout + kill-on-drop, output caps, no-shell direct argv, environment scrubbing) is applied unconditionally inexecute_subprocess.nomdependency — the unused nom-basedparse_flag_lineGNU parser (~130 LOC, never wired into the parse path) was deleted; GNU help extraction uses regex only.
Security¶
- Environment scrubbing for wrapped subprocesses — an agent-invoked CLI no longer inherits apexe's full process environment.
execute_subprocessclears the env and passes only a base allowlist (PATH/HOME/USER/LOGNAME/SHELL/LANG/LC_*/TERM/TZ/TMPDIR), so secrets in apexe's environment (API tokens, cloud credentials) cannot leak to a wrapped tool. File-based credentials under$HOMEstill work. - ACL fails closed —
apexe serve/apexe a2a --acl <path>with a missing or malformed file now refuses to start, instead of logging a warning and serving with no access control (which apcore treats as allow-all). - Audit log hardened to
0o600— the JSONL audit log (executions + ACL decisions) is created owner-only, so caller identities and denied targets are not world-readable on shared hosts.
Fixed¶
ErrorCode::AclDenied→ACLDeniedrename tracked.- ACL audit logger now populated — the served ACL is built with an audit logger wired to
AuditManager(previously constructed withNone), so allow/deny decisions are actually recorded. apexe scan/apexe listsurface failures —scanexits non-zero when a binding/ACL/skill write fails (was warn-and-exit-0);listsurfaces a corrupt binding's parse error instead of a misleading "No modules found".- Resolved
log_levelapplied to logging —APEXE_LOG_LEVEL/config.yamllog_levelnow feed the tracing subscriber (precedenceRUST_LOG > --log-level > config > "info"); previously only--log-level/RUST_LOGtook effect. - Adapter propagates examples & deduplicates module ids — scanned
command.examplesnow reach the generated module; collidingmodule_ids after subcommand flattening are disambiguated; the output schema advertisesjson_outputonly when the structured format is JSON. - Scanner robustness — every scan subprocess is timeout-bounded (was only the top-level
--help); the shared timeout helper drains stdout/stderr concurrently to avoid a deadlock on large output; a discovered subcommand'shelp_formatis tagged from the matching parser (was hardcodedUnknown);cache.invalidate()matches the exact tool name (was an over-broad prefix); the cobra parser handles CRLF section boundaries. - Failed/killed executions are audited — a timed-out or spawn-failed run records a
status=erroraudit entry instead of leaving no trace.
[0.2.0] - 2026-03-29¶
Added¶
- 6 new
apexe serveflags —--tags,--prefix,--acl,--enable-approval,--no-logging,--skip-validationfor full McpServerBuilder control from CLI. - Expanded help fallback — Scanner tries
--help alland-hwhen--helpyields few flags. Fixes curl (0 → 12 flags on macOS). - GNU regex relaxation — Flag regex now matches 1-space indent (
\s{1,}) for curl-style help format. apexe --man— Generates complete roff man page viaapcore_cli::build_program_man_page(), including commands, flags, exit codes, and docs URL.- Documentation URL —
set_docs_url()setshttps://github.com/aiperceivable/apexein help/man output. - Explorer
allow_execute—serve_with_options()enables tool execution from Explorer UI. - Env var test stability — Global
ENV_LOCKMutex prevents parallel test race conditions on environment variables.
Changed¶
- Dependencies switched to crates.io —
apcore = "0.14",apcore-cli = "0.4",apcore-mcp = "0.11",apcore-toolkit = "0.4". Zero path dependencies. - ACL opt-in only —
--acl <path>required to enable access control. Without it, all tools are allowed (fixes ExplorerAclDeniedissue). require_authremoved — Was silently ineffective without JWT authenticator. Removed to prevent false security assumptions.- Config override validation — CLI
scan_depth(1-5) andtimeout(>0) overrides now range-checked with warning on rejection.
Fixed¶
- Explorer UI empty response — Fixed by using
serve_with_options()withExplorerOptions { explorer: true, allow_execute: true }instead ofserve(). - clippy
result_large_err— Suppressed onexecute_subprocess(Rust 1.94 stricter closure checking). - Flaky env var tests — Eliminated race condition with
ENV_LOCKmutex.
[0.1.0] - 2026-03-28¶
First release with full apcore ecosystem integration.
Added¶
Scanning Engine
- Three-tier deterministic CLI scanner: --help parsing (GNU, Click, Cobra, Clap), man page enrichment (DESCRIPTION + OPTIONS sections), shell completion subcommand discovery
- ParserPipeline with automatic format detection and priority routing
- SubcommandDiscovery with recursive scanning up to depth 5
- ScanCache with JSON filesystem caching and version-based invalidation
- ToolResolver with binary path resolution and version detection
- Plugin system via CliParser trait for custom parser registration
- Tier 3 completion-discovered subcommands merged back into scan results
Adapter Layer (ScannedCLITool → ScannedModule)
- CliToolConverter: recursive subcommand tree flattening, dot-separated module IDs (cli.git.commit)
- JSON Schema generation with full type mapping: String, Integer, Float, Boolean, Path (format: path), URL (format: uri), Enum (enum: [...])
- Repeatable flags → array schemas, required flags → required array, default value coercion
- Behavioral annotation inference from command names (readonly/destructive patterns) and flag boosting (--force → requires_approval, --dry-run → idempotent)
- DisplayResolver integration: auto-generated MCP aliases (cli.git.commit → git_commit), per-surface display metadata
Module Executor
- CliModule: implements apcore Module trait for CLI subprocess execution
- Async execution via tokio::task::spawn_blocking with tokio::time::timeout
- Shell injection prevention: 15-character blacklist validated at construction time and runtime
- Context integration: trace_id, identity, duration_ms propagated through execution
- ai_guidance on non-zero exit codes with stderr context for AI self-correction
MCP Server
- McpServerBuilder: fluent API for module loading → Registry → Executor → APCoreMCP
- Transports: stdio (Claude Desktop/Cursor), streamable-http, SSE
- LoggingMiddleware enabled by default (structured logging with redaction)
- ElicitationApprovalHandler for interactive destructive command approval (opt-in)
- Tags and prefix filtering for tool access control — correction (Unreleased): these filtered tools/list only, so an excluded module stayed callable by name. They became access control in Unreleased (#28); read this entry as "tool listing filters".
- Explorer UI support (HTTP transports)
- export_openai_tools(): OpenAI function calling format export
- Config snippet generation for Claude Desktop and Cursor
Governance
- AclManager: wraps apcore::ACL, auto-generates default-deny rules from annotations
- AuditManager: wraps apcore_cli::AuditLogger, JSONL append-only with SHA-256 input hashing
- SandboxManager: wraps apcore_cli::Sandbox, subprocess isolation with timeout enforcement
Output
- YamlOutput: wraps apcore_toolkit::YAMLWriter with optional verification
- load_modules_from_dir(): reads .binding.yaml files as Vec<ScannedModule>
Configuration
- 4-tier config resolution: CLI flags > env vars > config file > defaults
- 5 environment variables: APEXE_MODULES_DIR, APEXE_CACHE_DIR, APEXE_LOG_LEVEL, APEXE_TIMEOUT, APEXE_SCAN_DEPTH
- Optional apcore::Config integration via ~/.apexe/apcore.yaml
- Range validation on all numeric config overrides
Error Handling
- From<ApexeError> for ModuleError: all 9 error variants mapped with ai_guidance
- into_module_error_with_trace() for trace_id attachment
- Rich error display in CLI with suggestion text
CLI
- apexe scan <TOOLS>... — scan with --depth, --no-cache, --format, --output-dir
- apexe serve — --transport, --host, --port, --explorer, --name, --show-config
- apexe list — --format, --modules-dir
- apexe config — --show, --init
Documentation
- Quick Start guide (docs/quickstart.md)
- Full User Manual with 15 chapters (docs/user-manual.md)
- Technical Design document (docs/apcore-integration/tech-design.md)
- 7 feature specifications (docs/features/v2-f1..f7)
- Feature Manifest with module map (docs/FEATURE_MANIFEST.md)
Examples
- examples/basic/ — Shell script walkthrough: scan → list → serve
- examples/programmatic.rs — Rust library API: scan → convert → export → build server
Dependencies¶
| Crate | Version | Role |
|---|---|---|
| apcore | 0.14 | Core types: Module, Registry, ACL, ModuleError, Config |
| apcore-toolkit | 0.4 | ScannedModule, YAMLWriter, DisplayResolver, Verifier |
| apcore-mcp | 0.11 | MCP server: APCoreMCP, transports, auth, Explorer |
| apcore-cli | 0.3 | AuditLogger, Sandbox |
Stats¶
- 39 source files, ~8,850 lines of Rust
- 338 tests, 0 failures
- All quality gates pass:
cargo fmt,cargo clippy -D warnings,cargo test --all-features