You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(delete): coerce recursive at the boundary so a stringified "true" is honored
aft_delete rejected a directory ("is a directory. Pass recursive: true.") even
when the agent passed recursive: true, reproduced across multiple agents. Root
cause: the plugin read the flag with a strict `args.recursive === true`, but
hosts deliver a boolean-typed arg as the model's raw emitted value despite the
declared schema — and models non-deterministically emit `true` as the string
"true" (the same host behavior `coerceStringArray` already absorbs for `files`,
documented in coerce.ts). A stringified "true" then read as false and the flag
was silently dropped, so Rust correctly refused the directory.
Adds a shared `coerceBoolean` to @cortexkit/aft-bridge (true/"true"/1/"1" → true;
everything else → false, a deliberately tight truthy set so a destructive gate
can't be flipped by an arbitrary truthy value) and uses it for `recursive` in
both the OpenCode and Pi delete paths. Real booleans pass through unchanged
(hoisted-tools 62/0, fs 4/0). A follow-up sweeps the same strict-=== true class
on the other agent-facing boolean args (dryRun, replaceAll, background/pty,
files, callgraph).
Co-authored-by: Alfonso <289616620+alfonso-aft@users.noreply.github.com>
0 commit comments