mirror of
https://github.com/qwibitai/nanoclaw.git
synced 2026-07-12 19:00:58 +08:00
f24edc2c3b
Three trims to the seam, no behavior change (713/713 green):
- Boot-time conformance check deleted (src/guard-conformance.ts + its
main() call). The invariant — every holding action has a registered
approve continuation — is already covered in-tree by the conformance
test, and at runtime response-handler.ts handles a missing continuation
loudly (warn + "approved, but no handler is installed" notify + row
cleanup). Refusing to boot bought no safety over that and could brick
the host on a mis-installed skill.
- GuardedActionSpec vocabulary renamed to read as what each field does:
baseline → decide (the decision function — allow | hold | deny),
approvalAction → grantActionName (the pending_approvals.action string a
grant's row must carry; "Name" because at consult sites `action` means
the branded GuardedAction value), grantMatches → grantCoversRequest.
Comment prose follows ("structural baseline" → the checks / the
decision).
- runGuarded + DeliveryGuardSpec extracted to src/delivery-guard.ts.
delivery.ts is a high-traffic file for forks: the registry itself
(tagged entries, spec-or-unguarded registration overloads, disarm-throw,
one-door getDeliveryAction, grant-carrying reenter) stays there, evolved
in place — only the consult pipeline (precheck → guard → deny/hold/allow)
and the spec type move out; runGuarded takes spec + handler explicitly so
the new file has no import back into delivery.ts.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>