@agenticprimitives/contracts 1.0.0-alpha.46 → 1.0.0-alpha.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/AUDIT.md +60 -26
  2. package/deployments-base-sepolia.json +2 -0
  3. package/deployments-faithchain.json +2 -0
  4. package/deployments-hopechain.json +2 -0
  5. package/dist/abi/AgentAccount.json +175 -0
  6. package/dist/abi/AgentAccountFactory.json +47 -0
  7. package/dist/abi/AgentNameAttributeResolver.json +24 -0
  8. package/dist/abi/AgentNameRegistry.json +369 -0
  9. package/dist/abi/AgentNameUniversalResolver.json +34 -0
  10. package/dist/abi/AgentProfileResolver.json +48 -0
  11. package/dist/abi/AgentRegistryBase.json +158 -0
  12. package/dist/abi/AgentRelationship.json +212 -0
  13. package/dist/abi/AgreementRegistry.json +10 -0
  14. package/dist/abi/AttestationRegistry.json +49 -0
  15. package/dist/abi/AttributeStorage.json +24 -0
  16. package/dist/abi/CustodyPolicy.json +184 -0
  17. package/dist/abi/DelegationManager.json +96 -0
  18. package/dist/abi/DigestBindingEnforcer.json +103 -1
  19. package/dist/abi/EstateProjectionRegistry.json +137 -24
  20. package/dist/abi/GeoFeatureRegistry.json +42 -0
  21. package/dist/abi/IAgentAccountFactoryView.json +13 -0
  22. package/dist/abi/IAgentAccountGovernanceTimelockView.json +15 -0
  23. package/dist/abi/ICustodyPolicyFactoryView.json +13 -0
  24. package/dist/abi/ICustodyPolicyPasskeyView.json +50 -0
  25. package/dist/abi/IRedemptionContext.json +15 -0
  26. package/dist/abi/ITreasurySpendPolicyAccountView.json +44 -0
  27. package/dist/abi/IUpgradeVoucherView.json +26 -0
  28. package/dist/abi/OntologyTermRegistry.json +57 -0
  29. package/dist/abi/PaymentEnforcer.json +10 -0
  30. package/dist/abi/PermissionlessSubregistry.json +165 -0
  31. package/dist/abi/PricedSubregistry.json +57 -0
  32. package/dist/abi/RelationshipTypeRegistry.json +57 -0
  33. package/dist/abi/ShapeRegistry.json +57 -0
  34. package/dist/abi/SkillDefinitionRegistry.json +42 -0
  35. package/dist/abi/TreasurySpendPolicy.json +106 -1
  36. package/dist/abi/UpgradeVoucher.json +176 -0
  37. package/dist/abi/index.d.ts +6 -0
  38. package/dist/abi/index.js +6 -0
  39. package/dist/deployments/base-sepolia.d.ts +2 -0
  40. package/dist/deployments/base-sepolia.js +4 -0
  41. package/dist/deployments/faithchain.d.ts +2 -0
  42. package/dist/deployments/faithchain.js +4 -0
  43. package/dist/deployments/hopechain.d.ts +2 -0
  44. package/dist/deployments/hopechain.js +4 -0
  45. package/package.json +1 -1
  46. package/src/AgentAccount.sol +531 -92
  47. package/src/AgentAccountFactory.sol +28 -2
  48. package/src/IAgentAccount.sol +14 -0
  49. package/src/SmartAgentPaymaster.sol +30 -3
  50. package/src/UpgradeVoucher.sol +74 -0
  51. package/src/agency/DelegationManager.sol +177 -52
  52. package/src/agency/ICaveatEnforcer.sol +10 -0
  53. package/src/agency/IDelegationManager.sol +6 -5
  54. package/src/agreement/AgreementRegistry.sol +61 -17
  55. package/src/attestation/AttestationRegistry.sol +115 -22
  56. package/src/custody/CustodyPolicy.sol +393 -47
  57. package/src/custody/TreasurySpendPolicy.sol +192 -29
  58. package/src/enforcers/AllowedMethodsEnforcer.sol +6 -1
  59. package/src/enforcers/AllowedTargetsEnforcer.sol +6 -1
  60. package/src/enforcers/DigestBindingEnforcer.sol +91 -19
  61. package/src/enforcers/PaymentEnforcer.sol +32 -1
  62. package/src/enforcers/QuorumEnforcer.sol +1 -1
  63. package/src/enforcers/ValueEnforcer.sol +6 -1
  64. package/src/geo/GeoFeatureRegistry.sol +25 -1
  65. package/src/governance/AgenticGovernance.sol +16 -0
  66. package/src/identity/AgentProfileResolver.sol +11 -0
  67. package/src/naming/AgentNameAttributeResolver.sol +17 -2
  68. package/src/naming/AgentNamePredicates.sol +1 -1
  69. package/src/naming/AgentNameRegistry.sol +205 -10
  70. package/src/naming/AgentNameUniversalResolver.sol +26 -0
  71. package/src/naming/PermissionlessSubregistry.sol +69 -23
  72. package/src/naming/PricedSubregistry.sol +28 -0
  73. package/src/ontology/AttributeStorage.sol +93 -80
  74. package/src/ontology/OntologyTermRegistry.sol +28 -0
  75. package/src/ontology/ShapeRegistry.sol +28 -0
  76. package/src/payments/PaymentEscrow.sol +23 -15
  77. package/src/payments/PaymentReceiptRegistry.sol +11 -3
  78. package/src/registry/AgentRegistryBase.sol +39 -0
  79. package/src/registry/EstateProjectionRegistry.sol +94 -40
  80. package/src/relationships/AgentRelationship.sol +112 -7
  81. package/src/relationships/RelationshipTypeRegistry.sol +28 -0
  82. package/src/skills/SkillDefinitionRegistry.sol +25 -1
package/AUDIT.md CHANGED
@@ -5,12 +5,12 @@
5
5
  **Prior refresh:** 2026-06-01 (R6 contracts hardening wave landed)
6
6
  **Owners:** contracts package CODEOWNERS
7
7
  **System audit cross-reference:** [`docs/architecture/product-readiness-audit.md`](../../docs/architecture/product-readiness-audit.md)
8
- **Prior dossier:** [`docs/audits/2026-05-packages-contracts-production-readiness.md`](../../docs/audits/2026-05-packages-contracts-production-readiness.md) (per-contract findings table)
9
- **Recon doc:** [`docs/audits/r6-contracts-recon-2026-05-31.md`](../../docs/audits/r6-contracts-recon-2026-05-31.md) (R6 wave triage)
8
+ **Prior dossier:** [`docs/audits/archive/2026-05/2026-05-packages-contracts-production-readiness.md`](../../docs/audits/archive/2026-05/2026-05-packages-contracts-production-readiness.md) (per-contract findings table)
9
+ **Recon doc:** [`docs/audits/archive/2026-05/r6-contracts-recon-2026-05-31.md`](../../docs/audits/archive/2026-05/r6-contracts-recon-2026-05-31.md) (R6 wave triage)
10
10
 
11
- > **Reader's note for external auditors.** This dossier is the AUDIT-ready summary of the security posture of every contract under `src/`. It pairs with `specs/214-production-audit-dossier.md` (the target shape we're auditing toward), the [`docs/audits/`](../../docs/audits) folder (threat model, architecture diagram, evidence checklist), and the **R10 internal readiness assessment** at [`docs/audits/2026-06-01-r10-internal-readiness-assessment.md`](../../docs/audits/2026-06-01-r10-internal-readiness-assessment.md) (active P0/P1/P2/P3 backlog). For finding-level detail use the cross-references at the bottom of each section.
11
+ > **Reader's note for external auditors.** This dossier is the AUDIT-ready summary of the security posture of every contract under `src/`. It pairs with `specs/214-production-audit-dossier.md` (the target shape we're auditing toward), the [`docs/audits/`](../../docs/audits) folder (threat model, architecture diagram, evidence checklist), and the **R10 internal readiness assessment** at [`docs/audits/archive/2026-06-01/2026-06-01-r10-internal-readiness-assessment.md`](../../docs/audits/archive/2026-06-01/2026-06-01-r10-internal-readiness-assessment.md) (active P0/P1/P2/P3 backlog). For finding-level detail use the cross-references at the bottom of each section.
12
12
  >
13
- > **Coverage stack as of R9 (2026-06-01):** 680 Foundry tests across 37 .sol files + 7 Halmos symbolic proofs + 4 Echidna nightly properties + 4 Medusa weekend properties. R6 (2026-06-01), H1-H4 (2026-05-23), and earlier waves are all reflected. Static analysis (Slither + Aderyn + CodeQL) + Solhint security lint are PR-blocking; pnpm-audit + gitleaks + SBOM in the security workflow.
13
+ > **Coverage stack (counts corrected 2026-11-10, audit ARCH-8; taken from source, not from a run):** ~1,000 Foundry `test*` functions in 75 `.t.sol` files + 15 stateful invariants (3 suites, all structural) + 7 Halmos symbolic proofs (written 2026-06-01 against generation-1 code; nothing symbolic covers generations 2–4) + 4 Echidna nightly properties + 4 Medusa weekend properties (one target, `CustodyPolicy`, the same four in each). PR-blocking: Halmos (pinned 0.3.3), Solhint, CodeQL, and Slither on any High and on any Medium not in the per-finding baseline (`scripts/slither-triage-baseline.json`, 24 entries; `docs/audits/r9-static-analysis-triage.md`). Aderyn is advisory (not triaged at the version CI pins). Echidna and Medusa are scheduled, not PR checks, and a falsified property fails their job (it did not before 2026-11-10). The Foundry `nightly` profile (10,000 fuzz runs; invariants 1024 × 250) is scheduled in `.github/workflows/nightly.yml` (no workflow ran it before 2026-11-10). `lib/` is plain clones at the commits in `lib.lock.json` (`setup.sh`, `pnpm check:contracts-lib-lock`), not submodules. pnpm-audit + gitleaks + SBOM run in the security workflow. Generation-2/3/4 properties with no invariant or proof: `docs/audits/external-audit-readiness.md` §4.1.
14
14
 
15
15
  ## 1. Charter
16
16
 
@@ -18,12 +18,12 @@ This package ships the **on-chain enforcement layer** for the agenticprimitives
18
18
 
19
19
  | File | Role |
20
20
  |---|---|
21
- | `AgentAccount.sol` | ERC-4337 v0.7 SA (UUPS-upgradeable, ERC-7579 module-host, ERC-1271 verifier, WebAuthn-supporting) |
21
+ | `AgentAccount.sol` | ERC-4337 v0.9 SA (`lib/account-abstraction` pinned in `lib.lock.json`; UUPS-upgradeable, ERC-7579 module-host, ERC-1271 verifier, WebAuthn-supporting) |
22
22
  | `AgentAccountFactory.sol` | CREATE2 deterministic deployer; salt derives from auth methods + scope (NEVER from a name, per ADR-0010) |
23
23
  | `agency/DelegationManager.sol` + `enforcers/*` | Scoped ERC-7710 delegation with on-chain caveat enforcement (AllowedTargets, AllowedMethods, Timestamp, Value, Quorum) |
24
24
  | `custody/CustodyPolicy.sol` | Multi-sig custodian / trustee quorum + scheduled-action machinery (spec 213 carve-out, ERC-7579 module) |
25
25
  | `SmartAgentPaymaster.sol` | ERC-4337 paymaster — three validation modes (dev / allowlist / verifying-paymaster) |
26
- | `naming/{AgentNameRegistry, PermissionlessSubregistry, AgentNameUniversalResolver}.sol` | `.agent` + `.impact` TLDs + hierarchical registry + resolver |
26
+ | `naming/{AgentNameRegistry, PermissionlessSubregistry, AgentNameUniversalResolver}.sol` | `.agent` + the nine typed roots (`.me .org .team .svc .workspace .treasury .registry .church .circle`) + hierarchical registry + resolver. The impact root was retired 2026-11-10: never provisioned again; existing on-chain instances are recorded as `_retiredRoots` history in the manifests |
27
27
  | `identity/AgentProfileResolver.sol` | ERC-1056-style profile / AgentCard facet resolver |
28
28
  | `ontology/{OntologyTermRegistry, ShapeRegistry, AttributeStorage}.sol` | SHACL shape + JSON-LD predicate registries |
29
29
  | `relationships/AgentRelationship.sol` | Public on-chain edge model (⚠ Privacy Fork — see EXT-019; remains *experimental* surface) |
@@ -43,7 +43,7 @@ This package ships the **on-chain enforcement layer** for the agenticprimitives
43
43
  | 2.3 | **WebAuthn assertion verification pins RP-ID + UP flag.** | ✅ CLOSED H7-C.1 / CON-WEBAUTHN-001 | `_setupInitialPasskey` rejects zero rpIdHash (`AgentAccount.sol:354-356`); R6.10 added `_validateUserOp` happy-path test pack |
44
44
  | 2.4 | **P256Verifier dispatcher rejects silent Daimo fallback.** | ✅ CLOSED H7-C.2 / CON-P256-001 | `P256Verifier.sol` |
45
45
  | 2.5 | **`SignatureSlotRecovery` bounds-checks `v=0` + `v=2` slots.** | ✅ CLOSED H7-C.3 / CON-SIG-SLOT-001/-002 | `libraries/SignatureSlotRecovery.sol` |
46
- | 2.6 | **`AgentNameRegistry.initializeRoot` cannot be frontrun.** | ✅ CLOSED H7-C.4 / CON-NAMING-001 | `AgentNameRegistry.sol:144-147` — immutable `initializer` + same-tx deploy |
46
+ | 2.6 | **`AgentNameRegistry.initializeRoot` cannot be frontrun, and at most one address may ever initialize.** The initializer is the constructor's, or the ONE successor it named: `transferInitializer(to)` is one-shot and RELINQUISHING (the caller holds nothing from that call; `initializer` reads zero until `acceptInitializer()` by `to`). `Deploy.s.sol` initializes every root as the broadcaster (each owned by the naming authority), hands over, and emits one pending `acceptInitializer`; the production end-state accepts only `initializer == authority` or `initializer == 0 && pendingInitializer == authority`. | ✅ CLOSED H7-C.4 / CON-NAMING-001; hand-over spec 445 B2 item 8 — generation 4, source only until deployed | `AgentNameRegistry.sol:transferInitializer` / `acceptInitializer`; `test/naming/Naming445B2.t.sol::test_initializer_*`; `test/DeployProduction445.t.sol` (`…pendingGovernanceCalls…`, `…NamingInitializerIsPendingToAnotherAddress`) |
47
47
  | 2.7 | **`DelegationManager.redeemDelegation` is `nonReentrant`.** | ✅ CLOSED SC5 §6.2 | OpenZeppelin `ReentrancyGuard` mixin on `redeemDelegation` |
48
48
  | 2.8 | **Factory + Paymaster governance is timelock + multisig, not a deployer EOA.** | ⏳ OPEN — N1 (operator-deferred) | Testnet currently uses the disclosed demo deployer; production rotation runbook is § 4 below |
49
49
  | 2.9 | **Pause surfaces wired on critical paths.** | ✅ CLOSED R6.5 / R6.6 / R6.8 — pause matrix in § 3.4 | See § 3.4 |
@@ -54,17 +54,38 @@ This package ships the **on-chain enforcement layer** for the agenticprimitives
54
54
  | 2.14 | **`SmartAgentPaymaster` constructor takes EXPLICIT `devMode` (no implicit fail-open).** | ✅ CLOSED R5.7 / PKG-PAYMASTER-002 / external audit P0-2 | `SmartAgentPaymaster.sol:126-141`; tested in `SmartAgentPaymaster.t.sol::test_R5_7_*` |
55
55
  | 2.15 | **The account's `execute` never reaches its own custody-tier contracts from below the custody tier.** `CustodyPolicy.onUninstall` reverts `StillInstalledOn` unless `uninstallModule` already dropped the module; a delegation stack (`_delegationExecCtx`) may not target `custodyPolicy` or `approvedHashRegistry` at all. | ✅ CLOSED R917-C-1 (spec 408 §1.1) | `CustodyPolicy.sol:onUninstall`, `AgentAccount.sol:_isAccountTrustedTarget`; `test/HardeningR917.t.sol` |
56
56
  | 2.16 | **An approved hash dies with the custody set that approved it.** The `0x03` sentinel consults `isApproved(this, keccak256(hash ‖ custodyEpoch))`; `custodyEpoch` bumps on every credential retirement (`removeCustodian` / `removePasskey`); `ApprovedHashRegistry.revokeAll()` voids per signer. | ✅ CLOSED R917-C-2 (spec 408 §1.2) | `AgentAccount.sol:approvedHashKey`, `ApprovedHashRegistry.sol`; `test/HardeningR917.t.sol`, `test/ApprovedHashIsValidSignature.t.sol` |
57
- | 2.17 | **A digest-bound redemption is single-use per step.** `DigestBindingEnforcer` is stateful + DM-only: `(delegator, delegationHash, kind, stepNonce)` consumed in `beforeHook`. | ✅ CLOSED R917-C-4 (spec 408 §1.4) | `enforcers/DigestBindingEnforcer.sol`; `test/DigestBindingEnforcer.t.sol` |
57
+ | 2.17 | **Digest binding is counted from the signed terms.** A mandate redeems at most the number of times its signed terms state — `abi.encode(kind, digest)` ⇒ exactly one, `abi.encode(kind, digest, maxUses)` ⇒ at most `maxUses ≥ 1` — counted per `(delegator, delegationHash, kind)` with nothing from `args`; a replayed step nonce is refused (recorded per redeemer, so one party cannot burn another's step on an open grant). A reverted call burns nothing. Stateful + DM-only. | ✅ CLOSED R917-C-4 (spec 408 §1.4), re-closed audit 2026-11-10 DLG-3 (spec 445 B1) — generation 4, source only until deployed | `enforcers/DigestBindingEnforcer.sol`; `test/DigestBindingEnforcer.t.sol`, `test/DlgDigestBinding445B1.t.sol` |
58
58
  | 2.18 | **Network posture is a constructor fact, never a chain-id list.** `AgentAccountFactory.relaxedT4Floor` (immutable) is the only way to lift the 1 h T4 floor; recorded in the deployments JSON; refused by `check:production-deploy` off anvil. | ✅ CLOSED R917-C-5 (spec 408 §1.3) | `AgentAccountFactory.sol:_custodyInitData`; `test/AgentAccountFactoryMode.t.sol` |
59
59
  | 2.19 | **Receipt anchors are keyed by who anchored.** `(anchoredBy, receiptDigest)` — no squat on a public mempool. | ✅ CLOSED R917-C-3 (spec 408 §1.5) | `provenance/ReceiptAnchorRegistry.sol`; `test/provenance/ReceiptAnchorRegistry.t.sol` |
60
+ | 2.20 | **A delegation chain has exactly one root, and it is the last link.** Every non-terminal link must name its parent by hash (`authority == hashDelegation(next)`); `ROOT_AUTHORITY` in a non-terminal position and a terminal link that is not root both revert `InvalidAuthority` — in `redeemDelegation` and identically in the `verifyAuthorization*` views. | ✅ CLOSED audit 2026-11-10 H-1 / DLG-1 (spec 445 §1.1) — generation 4, source only until deployed | `agency/DelegationManager.sol:_validateDelegation` + `_validateDelegationView`; `test/DelegationManagerChainShape445.t.sol` |
61
+ | 2.21 | **A pause is always liftable, and the exempt targets are exactly these.** Under a pause `AgentAccount.execute` (single call) still accepts a VALIDATED USER OPERATION (`msg.sender` = the immutable EntryPoint) whose target is (1) the factory's governance contract, (2) that governance's own `timelock()`, or (3) the account itself with a selector on the recovery allow-list (§3.4). Both addresses are read `_factory → governance() → timelock()` (an immutable getter and an immutable) — nothing an account can write selects them. `executeBatch` has no exemption; `executeFromModule` only for the canonical custody policy dispatching an allow-listed self-call. The exemption grants nothing at the target: timelock roles and `NotTimelock` / `NotGuardian` still decide. The door is the same in every custody mode — one custodian's user operation (see the open risk, 2.27). | ✅ CLOSED audit 2026-11-10 H-3 / CUST-1 / ACCT-2 (spec 445 §1.2) — generation 4, source only until deployed | `AgentAccount.sol:_requireExecutableUnderPause` + `_isPauseRecoverySelector`, `CustodyPolicy.sol:_isPauseExemptAction`; `test/governance/PauseIsLiftable445.t.sol` (every account mode × role topology, through signed user operations), `test/AgentAccountPauseR65.t.sol::AgentAccountPauseRecovery445Test`, `test/DeployProduction445.t.sol::test_H3_*`; `Deploy.s.sol:_assertPauseLiftable` |
62
+ | 2.22 | **What a retired credential installed is retired with it.** An EXECUTOR (or validator) module and a non-canonical delegation manager are stamped with the custody epoch they were installed / set / re-affirmed under and are honoured only while `stamp == custodyEpoch + 1`; every retirement (`removeCustodian`, `removePasskey`) bumps the epoch and clears the upgrade queue. Exempt: the factory's canonical `custodyPolicy()` and `delegationManager()`. A HOOK is never stamped and never lapses (a protection, not a power). An unstamped module (installed before generation 4) is not honoured until re-affirmed. **Rotation re-affirms what the owner lists, atomically (`add → retire → approveDigest×N → reaffirm×M`); recovery re-affirms nothing.** `reaffirmModule` / `reaffirmDelegationManager` are gated exactly like `installModule` / `setDelegationManager`. | ✅ CLOSED audit 2026-11-10 H-2 / ACCT-1 (spec 445 §1.3 (ii)) — generation 4, source only until deployed | `AgentAccount.sol:_moduleEpochStamp`, `_delegationManagerEpochStamp`, `executeFromModule`, `_requireForExecute`, `_bumpCustodyEpoch`; `CustodyPolicy.sol:_applyRotateCredential`; `test/RetirementExpels445.t.sol` |
63
+ | 2.23 | **Every upgrade is vouched — implementation AND migration data — at the moment it executes.** `upgradeToAndCall(newImpl, data)` requires `UpgradeVoucher.isVouched(newImpl, keccak256(data))` on every path (self-governed, custody `ApplySystemUpdate`, the matured queue — which is bound to empty data), after every pre-existing gate. The voucher is an IMMUTABLE of the implementation (not a factory view), governance-managed through the timelock; unset / codeless / reverting / non-`true` ⇒ refused. **Migration caveat:** a generation ≤ 3 account makes its last upgrade under its old rules — nothing here constrains that step, and an account compromised BEFORE it migrates is not made clean by migrating (a hidden custodian, planted approvals or a swapped implementation survive). An in-place-upgraded account also keeps its ORIGINAL factory, so its canonical custody policy and delegation manager stay generation ≤ 3. Governance must never vouch an implementation that carries no voucher. | ✅ CLOSED audit 2026-11-10 H-2 / ACCT-1 (spec 445 §1.3 (i), with the 2026-11-10 correction: the voucher travels with the implementation) — generation 4, source only until deployed | `src/UpgradeVoucher.sol`, `AgentAccount.sol:upgradeToAndCall` + `_requireVouchedUpgrade`; `test/RetirementExpels445.t.sol` (`test_H2_plantedFutureEpochApproval_*`, `test_H2_twin_unvouchedData_*`, `test_H2_voucherUnsetOrBroken_failsClosed`, `test_H2_custodyPath_*`, `test_H2_queuedUpgrade_*`, `UpgradeVoucher445Test`); `Deploy.s.sol:_assertProductionEndState` (`UpgradeVoucherNotGoverned`) |
64
+ | 2.24 | **The treasury ceiling counts what a call can commit, fails closed, and is not reachable from below the custody tier.** `TreasurySpendPolicy` counts `transfer` / `transferFrom` / `approve` / `increaseAllowance` on the budgeted token (an unlimited approval exceeds any ceiling; `approve(…,0)` / `decreaseAllowance` add nothing and credit nothing back), native value and EntryPoint `withdrawTo` for a native budget; any other selector on the budgeted token and any undecodable payload are REFUSED. An installed module is never an `execute` / `executeBatch` target from a delegation (any mode), from a non-canonical executor, or — on a custody-governed account — from a single custodian's user operation (the canonical custody policy excepted: its entry points are signature-authorized or self-defending). Hooks also run on a non-canonical executor's `executeFromModule`. `onInstall` / `onUninstall` of `TreasurySpendPolicy` and `CustodyPolicy.onInstall` verify the account's installed flag. On a governed treasury install / uninstall / raise are T5 custody actions and lower is T4. **Not bounded (stated in the contract notice):** other assets, pre-existing allowances, signature-based transfers (`permit`, EIP-3009, Permit2), gas prefund, non-standard tokens; allowances make the bound cumulative, not per-window. **A mode-0 treasury's ceiling bounds delegates only — its one key (and that key's executor modules) can remove it.** | ✅ CLOSED audit 2026-11-10 CUST-2 / CUST-3 / ACCT-3 (+ ACCT-11, ACCT-13) (spec 445 §1.5) — generation 4, source only until deployed | `custody/TreasurySpendPolicy.sol`, `AgentAccount.sol:_rejectModuleTarget` + `_isAccountTrustedTarget` + `executeFromModule`, `CustodyPolicy.sol` actions 17–20; `test/TreasuryCeilingAndModules445.t.sol` |
65
+ | 2.25 | **Modules are never execute targets — and the DelegationManager is not a module.** An installed module (any type) is refused as an `execute` / `executeBatch` target from a delegation, from a non-canonical executor, and on a custody-governed account from a single custodian (canonical custody policy excepted — invariant 2.24). The delegation manager is wired as `_delegationManager`, never installed, so a governed account still reaches it as a target: the ap-home revoke-through-mandate flow and a custodian's own revoke both land. | ✅ CLOSED audit 2026-11-10 ACCT-3 (spec 445 §1.5); interaction pinned at the B1 merge — generation 4, source only until deployed | `AgentAccount.sol:_rejectModuleTarget`, `_isAccountTrustedTarget`; `test/TreasuryCeilingAndModules445.t.sol`, `test/MergeInteractions445.t.sol` |
66
+ | 2.26 | **No self-targeted redemption.** `redeemDelegation` reverts `SelfTargetedRedemption` when the target is the ROOT delegator (the account the manager executes through); `verifyAuthorizationForCall` returns `(false, "self-target")`. Closes `execute(self, executeBatch(…))` — a batch the caveats never saw. An intermediate link's delegator stays an ordinary target. The account's own DM-3 nest guards remain as defence in depth; no legitimate flow is blocked twice (an ordinary target passes both; the self-target is refused by the manager first). | ✅ CLOSED audit 2026-11-10 DLG-2 (spec 445 B1) — generation 4, source only until deployed | `agency/DelegationManager.sol:redeemDelegation`; `test/DlgSelfTarget445B1.t.sol`, `test/MergeInteractions445.t.sol` |
67
+ | 2.27 | ⚠ **OPEN RISK (H-5) — an AgentAccount holding a timelock role is exercisable by ANY SINGLE CUSTODIAN's signature.** `AgentAccount.execute` validates one custodian signature in every custody mode; the M-of-N of a custody-governed account governs its custody changes only. So a timelock proposer / executor / admin role held by an AgentAccount — mode 0, or a custody-governed "multisig" of mode 1–3 — can be exercised by one key, live and under a pause (the H-3 exemption, 2.21, is that same door). **The custody quorum for governance calls is DEFERRED by owner decision 2026-11-10** (a `GovernanceCall` custody action, a refusal of governance targets in `execute` / `executeBatch` / delegations / non-canonical executors, and a mode-0-account refusal in the deploy were drafted and withdrawn). What the production deploy does refuse (H-5): an EOA or an EIP-7702-delegated EOA as timelock proposer / executor / admin (`SingleKeyGovernanceRole`). **To be closed when the owner sets up governance:** hold every timelock role in a non-account multisig (Safe-style, own threshold), or reinstate the custody quorum. Until then a production deploy must not hand a timelock role to an AgentAccount whose single key it would not trust with that role. | ⚠ OPEN — tracked under H-5 (owner decision 2026-11-10) | `AgentAccount.sol:execute`, `_requireExecutableUnderPause`; `Deploy.s.sol:_refuseSingleKeyRoleHolder`, `_callAs`; pinned by `test/governance/PauseIsLiftable445.t.sol::test_H3_openRisk_oneCustodianOfARoleHoldingAccount_makesTheCallAlone`, `test/DeployProduction445.t.sol::test_H5_openRisk_modeZeroAccountAsProposer_isNotRefused` (+ twin `test_H5_endState_refusesAnEoaRoleHolder`) |
68
+ | 2.28 | **Reserved labels and host injectivity are enforced on chain.** `AgentNameRegistry.register` (every path: root owner, `PermissionlessSubregistry`, `PricedSubregistry`) refuses `ws www mtls edge api well-known` and every initialized typed root's label under ANY parent (`ReservedLabel`), and under a bare-host root a label whose segment after the last `-` is a typed root's label (`LabelReadsAsTypedName`). A root label carries no `-`. | ✅ CLOSED spec 445 NAME-8 (B2 item 7) — generation 4, source only until deployed | `naming/AgentNameRegistry.sol:register`; `test/naming/Naming445B2.t.sol::test_NAME8_*` |
69
+ | 2.29 | **Records belong to an owner epoch.** A change of owner (and the reclaim of an expired name) bumps `recordEpoch(node)`; `AgentNameAttributeResolver` keys every record by `(node, epoch)` and answers empty for a non-live node — the previous owner's records stop resolving in the same transaction for every reader, and transferring back resurrects nothing. Expired ⇒ empty for every record type; only the parent may renew, extension only. | ✅ CLOSED audit 2026-11-10 REG-4 / REG-6 (NAMING-RECLAIM-STALE-RESOLVER-1) — generation 4, source only until deployed | `AgentNameRegistry.sol` (`epoch`, `recordState`), `AttributeStorage._storageKey`, `AgentNameAttributeResolver`; `test/naming/Naming445B2.t.sol::test_REG4_*`, `test_REG6_*` |
70
+ | 2.30 | **Permissionless claims are commit-reveal.** `commit(keccak256(abi.encode(subregistry, chainId, labelhash, newOwner, secret)))`, then `register(label, newOwner, secret)` between 10 s and 1 day later; the commitment binds the OWNER, is single-use and cannot be re-committed while live. The one-claim-per-caller cap is a courtesy, not sybil resistance; production estates use `PricedSubregistry`. | ✅ CLOSED audit 2026-11-10 REG-5 (SUB-1 / SUB-2) — generation 4, source only until deployed | `naming/PermissionlessSubregistry.sol`; `test/naming/Naming445B2.t.sol::test_REG5_*` |
71
+ | 2.31 | **Estate roots are keyed by signer.** `EstateProjectionRegistry` rows are `(estateId, signer)`; there is no registration and no first-come id. A verifier reads `roots(estateId, <the signer the estate declares>)` — a stranger's row is never read; `rotateSigner` retires only the caller's row; `MAX_SEQUENCE_STEP` bounds a jump. | ✅ CLOSED audit 2026-11-10 REG-2 — generation 4, source only until deployed | `registry/EstateProjectionRegistry.sol`; `test/EstateProjectionRegistry410.t.sol`, `test/Registries445B2.t.sol::test_REG2_*` |
72
+ | 2.32 | **The paymaster signs the gas limits it sponsors, and a pushed pause survives sync.** `getHash` binds `paymasterAndData[20:52]` (verification ‖ postOp gas limits) — a sender cannot raise them after the sponsor signed; `syncPauseFromGovernance` cannot undo governance's explicit `setPauseMirror(true)` (`_pausePushed`, packed into the mirror's slot). | ✅ CLOSED audit 2026-11-10 DLG-4 / DLG-13a (spec 445 B1) — generation 4, source only until deployed | `SmartAgentPaymaster.sol:getHash`, `_pausePushed`; `test/DlgLows445B1.t.sol::test_DLG4_*`, `test_DLG13_*`; storage snapshot `SmartAgentPaymaster.snap.json` (slot 3, offset 21) |
73
+ | 2.33 | **A retired credential holds no trustee seat.** Every retirement the custody policy performs — `RemoveCustodian`, `RemovePasskeyCredential`, `RotateCredential`, `RotateAllCustodians`, `RecoverAccount` — vacates that credential's trustee seat (a passkey's seat is its per-account PIA, read before the key is deleted) in the same applied change; on a custody-governed account these are the only retirement paths (`_requireCustodyGoverned`). An approval the credential signed earlier stops counting, because every apply / cancel verifies its signers against the trustee set as it is then. If the recovery quorum would exceed the remaining trustees it is CLAMPED to them (0 = recovery disabled when none remain; `RecoveryThresholdChanged`) — refusing would stop an owner retiring a lost device that is also her only trustee. A quorum of zero is no quorum: `_verifyQuorum` refuses `reqThreshold == 0` (`RecoveryRequiresGuardianQuorum`), so a recovery scheduled before the clamp is dead. **Accepted consequence:** a clamp lowers the recovery quorum among the remaining trustees (e.g. {own passkey, Bob} 2-of-2 → {Bob} 1-of-1) — no new power, since a T4 quorum can already `SetRecoveryApprovals`. | ✅ CLOSED audit 2026-11-10 CUST-4 (spec 445 §1.5 / §9) — generation 4, source only until deployed | `CustodyPolicy.sol:_retireCustodian`, `_retirePasskey`, `_vacateTrusteeSeat`, `_verifyQuorum`; `test/CustodyMediums445.t.sol::test_CUST4_*` (real P-256 assertions + ECDSA quorums) |
74
+ | 2.34 | **Every tier stays reachable.** After every applied custody change: `approvalsRequired(t) ≤ custodianCount` for T1..T5, and in org mode `2 × T4/T5 ≤ custodianCount` with `custodianCount ≥ 2` (`ThresholdUnreachable(tier, required, bound)` / `InfeasibleOrgConfig`). A removal that would strand a tier carries its own lowering: `RemoveCustodian` / `RemovePasskeyCredential` args are `abi.encode(subject)` (unchanged) or `abi.encode(subject, uint8 newT4, uint8 newT5)` (0 = keep; lower-or-equal only; any decrease makes the action T5, audit C-8); other lengths `MalformedRemovalArgs` at schedule. `RotateAllCustodians` that strands is refused (lower first). A RECOVERY clamps instead of refusing (`ThresholdChanged` per tier) — the lifeline never strands the owner it returns the account to; org mode left with < 2 custodians is refused. | ✅ CLOSED audit 2026-11-10 CUST-5 (completes `ACCT-M1`, `acct-mode3-sod-cap-runtime` on the removal direction) — generation 4, source only until deployed | `CustodyPolicy.sol:_requireThresholdsReachable`, `_applyRemovalLowering`, `_clampThresholdsToCustodians`, `_effectiveTierFor`; `test/CustodyMediums445.t.sol::test_CUST5_*`; `test/invariant/CustodyThresholdsReachable445.invariant.t.sol` (INV-445-1..4 over real quorum-signed action sequences) |
75
+ | 2.35 | **A scheduled change lapses.** It applies from `eta` to `expiresAt = eta + APPLY_WINDOW` (7 days, every tier, recovery included) inclusive; after that `ProposalExpired(changeId, expiresAt)`, checked before any signature is read. `expiresAt` is a pure function of `eta`, so an apply approval (which signs `eta`) signs the expiry — no typehash change; the policy is not upgradeable, so the window cannot move under a signature. Recovery cancel rule unchanged: custodians (T4) within the first 24 h, the trustee quorum after; past the window a recovery is dead and a new one restarts both the 48 h and the owner's 24 h. View `scheduledChangeExpiry(account, id)`; `getScheduledChange` keeps its shape. | ✅ CLOSED audit 2026-11-10 CUST-6 — generation 4, source only until deployed | `CustodyPolicy.sol:APPLY_WINDOW`, `ScheduledChange.expiresAt` (appended; packs into the `proposer` slot), `applyCustodyChange`; `test/CustodyMediums445.t.sol::test_CUST6_*` |
76
+ | 2.36 | **A post-deploy install meets the factory's bounds.** Beyond the caller check and delay floors (2.24), `onInstall` for mode ≥ 1 requires trustees ≥ mode (1 / 2 / 3), ≤ 32 (`MAX_INITIAL_TRUSTEES`) and `recoveryApprovals ≥ 1` (`TrusteesOutsideModeBounds`); defaulted T4 / T5 in mode 3 get the factory's `floor(n/2)` cap; every tier must be reachable (2.34) — an explicit over-cap or above-count value is refused, not rewritten. | ✅ CLOSED audit 2026-11-10 ACCT-11 (remainder) — generation 4, source only until deployed | `CustodyPolicy.sol:onInstall`; `test/CustodyMediums445.t.sol::test_ACCT11_*` (signed user operations, spec-422 shape) |
60
77
 
61
78
  ## 3. Per-contract notes for the external review
62
79
 
63
80
  ### 3.1 `AgentAccount.sol` + `AgentAccountFactory.sol`
64
81
 
65
- - **ERC-4337 v0.7 + ERC-7579.** AgentAccount is a thin core (custody / threshold / spend / sessions live in modules, NOT inlined) — see spec 209 + `feedback_erc7579_module_architecture`.
82
+ - **ERC-4337 v0.9 + ERC-7579.** AgentAccount is a thin core (custody / threshold / spend / sessions live in modules, NOT inlined) — see spec 209 + `feedback_erc7579_module_architecture`.
66
83
  - **UUPS upgradeable** with `_authorizeUpgrade` gated by `onlySelf` (modifier requires `msg.sender == address(this)`). The ONLY path is a re-entrant call from `upgradeToWithAuthorization` — that function is **explicitly disabled (`LegacyUpgradePathDisabled()`)** per H7-A.5 / audit C-3 closure. Per-account upgrades route through `CustodyPolicy.ApplySystemUpdate` (T5 / 24h timelock by default).
67
- - **Pause coverage (R6.5):** `whenNotPaused` on `execute`, `executeBatch`, `executeFromModule`, `installModule`, `executePendingUpgrade`, `addCustodian` (6 functions). Recovery paths INTENTIONALLY UNGUARDED: `uninstallModule`, `cancelPendingUpgrade`, `removeCustodian` — incident response must remain functional under pause. Test pack: `test/AgentAccountPauseR65.t.sol` (14 tests).
84
+ - **Pause coverage (R6.5, corrected in generation 4 — audit 2026-11-10 ACCT-2 / H-3):** pause-gated: `execute`, `executeBatch`, `executeFromModule`, `installModule`, `reaffirmModule`, `executePendingUpgrade`, `addCustodian`. Incident response must remain functional under pause, and until generation 4 it did not: the recovery functions carried no modifier but are `onlySelf`, and every door to a self-call was paused (the R6.5 tests pranked as the account). The doors are now open for exactly the cases in §3.4 — a signed user operation's `execute` to self with a recovery selector, or to the governance / its timelock; and the canonical custody policy's `executeFromModule` for the removal actions. Test packs: `test/AgentAccountPauseR65.t.sol` (pause gates + `AgentAccountPauseRecovery445Test`, through real user operations and quorum signatures), `test/governance/PauseIsLiftable445.t.sol`.
85
+ - **Governance-read failure = not paused (decision, audit DLG-7 as it concerns the account).** `_pauseState` treats a failed `factory.governance()` / `isPaused()` read as "not paused". Kept deliberately: failing closed would turn a broken or non-conforming governance into a permanent freeze nobody can lift (the only unpause authority is that same governance, and the factory's pointer is immutable); a caller cannot induce the failure (immutable getter + one storage read; gas starvation leaves too little for the gated call); and which governance a factory points at is asserted at deploy (`_assertProductionEndState`). An account with no factory, or whose factory's governance is an EOA, is outside the kill switch by construction.
86
+ - **Upgrades are vouched (generation 4, invariant 2.23).** `upgradeToAndCall` is overridden; see the NatSpec there for the migration statement.
87
+ - **Epoch stamps (generation 4, invariant 2.22).** Two slots taken from the gap (`_moduleEpochStamp`, `_delegationManagerEpochStamp`; 47 remain); the layout is append-only relative to generation 3.
88
+ - **Bytecode size:** `AgentAccount` is 23,092 B of the 24,576 B limit after generation 4 (1,484 B margin; was ~19.4 KB at generation 3). The next addition must move something out first — candidates: `executeFromBundler` (a view that executes nothing), the disabled `upgradeToWithAuthorization` stub, the inert `acceptSessionDelegation` set, or WebAuthn verification behind an external library.
68
89
  - **`isValidSignature` dispatch:** type byte 0x01 → WebAuthn, type byte 0x02 → ECDSA, raw fallback → custodian sig. WebAuthn path pins per-credential rpIdHash + requires UP flag.
69
90
  - **CREATE2 salt invariant.** Salt MUST derive from auth methods + scope, NEVER from a name (ADR-0010 + spec 220). Credential rotation does NOT change the SA address (ADR-0011 + spec 221).
70
91
 
@@ -74,30 +95,38 @@ This package ships the **on-chain enforcement layer** for the agenticprimitives
74
95
  - **PaymentEnforcer is the STATEFUL exception (EXT-PMT-1, was C-NEW-1).** It SSTOREs budget/nonce and writes a settlement receipt, so it is explicitly NOT safe to call externally. It is bound to an immutable `delegationManager` at construction and both hooks carry `onlyDelegationManager`; a direct caller reverts `NotDelegationManager` and can neither forge a `PaymentSettled` receipt nor grief the victim's budget/nonce. Fail-closed regression: `test/PaymentEnforcer.t.sol::test_EXTPMT1_*`. (Pre-fix, the unbound `beforeHook` let any EOA forge receipts + burn nonces — see `docs/audits/findings.yaml` EXT-PMT-1.)
75
96
  - **EIP-712 Caveat typehash** = `keccak256("Caveat(address enforcer,bytes terms)")` — EXCLUDES `args` (audit F-1 — the inclusion bug caused every caveat-carrying delegation to fail on-chain ERC-1271 redeem AND let a redeemer's chosen args ride inside the delegator's signature). `packages/delegation/src/hash.ts` mirrors this.
76
97
  - **Test posture:** DelegationManager 95.8% lines / 88.2% branches (post-R6 aggregator).
98
+ - **Generation 4 (spec 445 B1).** H-1 one root, last (2.20); DLG-2 no self-target (2.26); DLG-3 counted digest binding (2.17); DLG-7 the manager's pause read fails CLOSED when governance is configured (a codeless non-zero governance is refused at construction; a reverting / malformed `isPaused()` reverts `GovernanceReadFailed`) — unlike the account's read (§3.1), because the manager is a re-deploy-on-bug singleton; DLG-9 the delegator revokes without a verifying signature, `revokeDelegationAsUpstream` for hash-linked upstreams; DLG-10 the domain separator follows a chain split.
99
+ - **Generation coupling — a generation-4 `PaymentEnforcer` needs a generation-4 `DelegationManager`.** The enforcer reads the payer from `DelegationManager.redemptionRootDelegator()` (transient, set for one redemption; DLG-8c); pointed at an older manager every charge reverts. `DeployPayments.s.sol` binds an EXISTING manager by env — deploy both as one generation.
77
100
  - **QuorumEnforcer:** payload-hash binding closed in H7 (`QuorumEnforcer.sol` checks `keccak256(args) == decoded_payload_hash`). R6.9 aggregator confirms 95.5% lines / 100% branches.
78
101
 
79
102
  ### 3.3 Pause invariant for enforcers (R6.7)
80
103
 
81
104
  All five enforcer `beforeHook` / `afterHook` functions are `external view` AND read no storage. Pause is not applicable because there is no state to mutate. The invariant is documented in source and **test-locked**: `test/EnforcerPauseInvariantR67.t.sol::SideEffectfulEnforcer` mock proves any future enforcer that writes state would fail the test.
82
105
 
83
- ### 3.4 Pause matrix (R6.5 / R6.6 / R6.8)
106
+ ### 3.4 Pause matrix (R6.5 / R6.6 / R6.8 — corrected for generation 4, spec 445 §1.2)
84
107
 
85
- Pause is system-wide via `AgenticGovernance.setPaused(bool)`. Each consumer reads the flag via a fail-soft staticcall (governance == EOA / non-conforming contract → treated as "not paused" — legacy/test compat) per `_pausedSafe()` in `GovernanceManaged.sol:69-74`.
108
+ Pause is system-wide: `AgenticGovernance.pause()` by the guardian (immediate), `unpause()` by the timelock. Each consumer reads the flag via a fail-soft staticcall (governance == EOA / non-conforming contract → treated as "not paused" — see §3.1 for why that is a decision, not an accident) per `_pausedSafe()` in `GovernanceManaged.sol`.
86
109
 
87
- | Contract | Guarded paths | Unguarded (intentional) | Closure |
110
+ **The correction (audit 2026-11-10 ACCT-2 / H-3).** The previous matrix listed `uninstallModule`, `cancelPendingUpgrade`, `removeCustodian` as "unguarded (recovery primitives)". They were un-gated and unreachable: all but `cancelPendingUpgrade` are `onlySelf`, and `execute` / `executeBatch` / `executeFromModule` — the only ways an account calls itself — were paused, as were the custody policy's schedule / apply. This matrix lists what a real caller can do under a pause.
111
+
112
+ | Contract | Frozen under pause | Reachable under pause — and through which door | Closure |
88
113
  |---|---|---|---|
89
- | `AgentAccount` | execute, executeBatch, executeFromModule, installModule, executePendingUpgrade, addCustodian | uninstallModule, cancelPendingUpgrade, removeCustodian (recovery primitives) | R6.5 |
90
- | `CustodyPolicy` | scheduleCustodyChange, applyCustodyChange | cancelScheduledChange (allow recovery cancel during incident), onUninstall (operator escape) | R6.6 |
114
+ | `AgentAccount` | `executeBatch` (no exemption); every `execute` and `executeFromModule` not listed to the right; `installModule`, `reaffirmModule`, `executePendingUpgrade`, `addCustodian` (own modifier); and therefore every self-call that adds or changes authority: `addPasskey`, `setDelegationManager`, `reaffirmDelegationManager`, `setUpgradeTimelock`, `scheduleUpgrade`, `upgradeToAndCall`, `acceptSessionDelegation`, `approveDigest` | **`execute` from a validated user operation** to: the factory's governance; that governance's `timelock()`; or SELF with a recovery selector — `removeCustodian`, `removePasskey`, `uninstallModule`, `cancelPendingUpgrade`, `revokeDigest`, `revokeAllApprovedDigests`. **`executeFromModule` from the canonical custody policy** with a recovery selector on self. The user-operation door to the governance / timelock is the same in every custody mode (one custodian — open risk, invariant 2.27). `cancelPendingUpgrade` called directly with the owner's signed grant (mode 0). Each function keeps its own gates (`onlySelf`, the custody quorum on a governed account). Still live and NOT pause-gated: `validateUserOp`, `isValidSignature` (incl. the `0x03` sentinel) — a pause does not stop signature-authorized outflows (`permit`, EIP-3009, Permit2); it lets the owner retire the credential that signs them. | R6.5 → spec 445 §1.2 |
115
+ | `CustodyPolicy` | `scheduleCustodyChange` + `applyCustodyChange` for every action except the three to the right | `scheduleCustodyChange` + `applyCustodyChange` for `RemoveCustodian`, `RemovePasskeyCredential`, `UninstallModule` (same quorum, same safety delay; a removal may carry its CUST-5 T4/T5 lowering); `cancelScheduledChange`; `onUninstall` | R6.6 → spec 445 §1.2 |
91
116
  | `AgentNameRegistry` | register, backfillLabel, setOwner, setResolver, setSubregistry, renew, setPrimaryName (7 functions) | initializeRoot (deployer init, runs ONCE per TLD anyway) | R6.8 |
92
117
  | `PermissionlessSubregistry` | (no own guard — inherits via inner `REGISTRY.register` call) | — | Transitive R6.8 coverage; proven by `test_R6_8_subregistryRegister_pausedRevertsTransitively` |
93
- | `SmartAgentPaymaster` | `_validatePaymasterUserOp` (early reverts on governance.isPaused()) | — | H7-C.10 / EXT3-010 |
118
+ | `SmartAgentPaymaster` | `_validatePaymasterUserOp` (early reverts on governance.isPaused()) — so an account acting under a pause pays its own gas | — | H7-C.10 / EXT3-010 |
119
+ | `UpgradeVoucher` | — (`vouch` / `unvouch` are governance-only and move no value) | all | spec 445 §1.3 |
120
+
121
+ Operational consequences: (1) role-holding accounts need an EntryPoint deposit or native balance to lift a pause (no sponsorship); (2) `AgentAccount.execute` validates ONE custodian signature on every custody mode — so a governance role held by any AgentAccount is one custodian's (open risk, invariant 2.27; ledger `acct-validator-modules-inert-1ofn`); the custody quorum for governance calls is deferred by owner decision 2026-11-10; (3) rotation, recovery, re-affirmation and upgrades are not available under a pause — only removal is.
94
122
 
95
123
  ### 3.5 `custody/CustodyPolicy.sol`
96
124
 
97
125
  - **One ERC-7579 module per AgentAccount,** factory-immutable per spec 213 § 2.4. Per-account install via `onInstall(initData)` with ABI: `(uint8 mode, uint8 recoveryApprovals, address[] trustees, uint8[7] thresholds, uint32[7] timelocks, uint256 t3Ceiling, address approvedHashReg)`.
98
- - **16 CustodyAction enum cases** (per § `_applyCustodyChange` dispatcher). Coverage by branch family in R6.10b + R6.10c — final state: **81.4% lines / 53% branches** (R6.10b) → after R6.10c **92.4% lines / 68% branches**.
126
+ - **21 CustodyAction enum cases** (0–16 unchanged; generation 4 appends `InstallModule` (17, T5), `UninstallModule` (18, T5), `LowerSpendCeiling` (19, T4), `SetSpendCeiling` (20, T5) — audit CUST-3 / ACCT-5; `RotateCredential`'s payload gains `reaffirmModules` + `reaffirmDelegationManager`; per § `_applyCustodyChange` dispatcher).
127
+ - **`onInstall` is reached only through `installModule` and applies the factory's delay floors (ACCT-11 / CUST-8):** the caller must list the policy as an installed EXECUTOR; for mode ≥ 1, T5 ≥ 24 h, T6 ≥ 48 h when recovery is enabled, T4 ≥ 1 h unless the account's factory declares `relaxedT4Floor`. Generation 4 (ACCT-11 remainder): the per-mode trustee bounds and the mode-3 cap are applied too, and every tier must be reachable (invariants 2.34, 2.36). Coverage by branch family in R6.10b + R6.10c — final state: **81.4% lines / 53% branches** (R6.10b) → after R6.10c **92.4% lines / 68% branches**.
99
128
  - **Audit C-6..C-11 closures:** zero `credentialIdDigest` rejected, RotateAllCustodians wire shape add+remove, CustodyPolicy reinstall permanently forbidden, etc. See `test/CustodyPolicyWave2C.t.sol`.
100
- - **Pause coverage (R6.6):** `scheduleCustodyChange` + `applyCustodyChange` guarded with `whenAccountNotPaused(account)`; `cancelScheduledChange` UNGUARDED intentionally (recovery cancel during incident).
129
+ - **Pause coverage (R6.6, corrected in generation 4):** `scheduleCustodyChange` + `applyCustodyChange` are pause-gated for every action except `RemoveCustodian`, `RemovePasskeyCredential`, `UninstallModule` (§3.4); `cancelScheduledChange` UNGUARDED intentionally (recovery cancel during incident). A removal's three-word form (CUST-5, invariant 2.34) lowers T4 / T5 under a pause too — deliberately: under the 3-of-3 default, expelling a compromised custodian during an incident is impossible without it; it is still a full T5 quorum and the T5 delay.
101
130
  - **Threshold defaults (spec § 5.1):** T4 default = max(N − 2, 1); T5 default = max(N − 1, 1); T6 default = `recoveryApprovals`. Factory derives `recoveryApprovals = trustees/2 + 1` if not overridden.
102
131
 
103
132
  ### 3.6 `SmartAgentPaymaster.sol` — economics + paymaster modes
@@ -145,8 +174,9 @@ Per spec 214 SB-4. **One library function consumers call (`validateSig(signer, h
145
174
 
146
175
  ### 3.8 `naming/*`
147
176
 
148
- - **Multi-root registry.** `.agent` (deployed via Deploy.s.sol) + `.impact` (added 2026-06-01 via `script/AddImpactTld.s.sol`). Each TLD has an immutable initializer set at construction — front-run-proof.
149
- - **PermissionlessSubregistry per TLD** — one-name-per-caller, no whitelist. Backing the `<handle>.impact-agent.{me,io}` subdomain mapping.
177
+ - **Multi-root registry.** `.agent` + the nine typed roots, all initialized by `Deploy.s.sol` in its bootstrap phase; the initializer is then relinquished to the naming authority (invariant 2.6). The impact root (2026-06-01 → retired 2026-11-10) is no longer provisioned and its script is deleted; deployed instances remain on chain as manifest history (`_retiredRoots`) and are closed by `AddPricedSubregistries.s.sol` with `LEGACY_ROOTS`.
178
+ - **PermissionlessSubregistry per root (testnet posture only)** — commit-reveal (2.30), one reveal per caller as a courtesy cap. Production roots are fronted by `PricedSubregistry`, chosen by the naming authority after the deploy.
179
+ - **Generation 4 (spec 445 B2):** reserved labels on chain (2.28), owner-epoch records + parent-only renewal (2.29), `setOwner` single-step (ENS-like; the scripted root hand-over relies on it). Rule for scripts: never write resolver records on a node before handing it over — the epoch bump drops them.
150
180
  - **`reverseResolveString` (spec/222)** is the canonical reverse path — NO `eth_getLogs` walker fallback (ADR-0012, ADR-0013).
151
181
  - **Pause coverage (R6.8):** all mutating functions guarded; `initializeRoot` exempt because it runs ONCE per TLD ever.
152
182
 
@@ -173,9 +203,11 @@ EXT-019 status: **experimental** — public on-chain edges leak the social graph
173
203
 
174
204
  ### 4.2 Upgrade pattern
175
205
 
176
- - AgentAccount: UUPSUpgradeable. `_authorizeUpgrade` gated by `onlySelf`. Per-account upgrades routed through `CustodyPolicy.ApplySystemUpdate` (T5 / 24h timelock by default).
206
+ - AgentAccount: UUPSUpgradeable. `_authorizeUpgrade` gated by `onlySelf`. Per-account upgrades routed through `CustodyPolicy.ApplySystemUpdate` (T5 / 24h timelock by default). **Generation 4:** every upgrade — on every path — must also be vouched by the implementation's `UpgradeVoucher` (governance through the timelock) for the exact `(implementation, keccak256(migration data))`; invariant 2.23.
207
+ - UpgradeVoucher: NOT upgradeable, no setter for its governance. To change who vouches, deploy a new voucher and a new account implementation built around it (reaching that implementation is an upgrade the OLD voucher must vouch for).
208
+ - **Migrating a generation ≤ 3 account** (runbook input): (1) governance cannot constrain the account's last old-rules upgrade — review the target implementation address off-chain; (2) after the upgrade, every pre-existing non-canonical executor module and a non-canonical delegation manager are unstamped and NOT honoured until the owner re-affirms them (`reaffirmModule` / `reaffirmDelegationManager`); hooks keep working; (3) the account's factory pointer does not change, so its canonical custody policy and delegation manager remain the generation ≤ 3 ones — moving to the generation-4 DelegationManager is a `setDelegationManager` that must then be re-affirmed in every rotation, and a governed account keeps the old custody action set (no actions 17–20, no re-affirmation in `RotateCredential`); (4) migration does not clean an account that was compromised before it.
177
209
  - AgenticGovernance: NOT upgradeable. Operator deploys a new governance instance to migrate.
178
- - AgentAccountFactory + SmartAgentPaymaster + DelegationManager + CustodyPolicy + naming/* + enforcers: NOT upgradeable. Redeploy + migrate-by-naming-handle. The 2026-06-01 R6 redeploy + `.impact` re-init demonstrates the runbook.
210
+ - AgentAccountFactory + SmartAgentPaymaster + DelegationManager + CustodyPolicy + naming/* + enforcers: NOT upgradeable. Redeploy + migrate-by-naming-handle. The 2026-06-01 R6 redeploy + root re-init demonstrates the runbook.
179
211
 
180
212
  ### 4.3 TimelockController
181
213
 
@@ -225,9 +257,9 @@ Each proof: caller address symbolic, all args symbolic, only constraint is `call
225
257
  | `DelegationManager.invariant.t.sol` | revocation irreversible • hash deterministic • domain separator immutable • root/open constants unchanged • revoked-set monotonic |
226
258
  | `SmartAgentPaymaster.invariant.t.sol` | devMode locked • governance immutable • verifyingSigner locked • arbitrary-sender not accepted • governance gate holds for fresh caller |
227
259
 
228
- **Echidna nightly fuzz (R9.4):** `test/echidna/CustodyPolicyEchidna.t.sol` — 4 properties × 50,000 sequences × 4 parallel workers, runs nightly at 02:17 UTC via `.github/workflows/contracts-echidna-nightly.yml`. Artifact-only (`continue-on-error: true`); corpus uploaded as a 30-day-retained artifact. Smoke run: 1.3M calls / 4524 unique instructions / all 4 properties PASS in 26 seconds.
260
+ **Echidna nightly fuzz (R9.4):** `test/echidna/CustodyPolicyEchidna.t.sol` — 4 properties × 50,000 sequences × 4 parallel workers, runs nightly at 02:17 UTC via `.github/workflows/contracts-echidna-nightly.yml`. A falsified property fails the job (since 2026-11-10; before that it was `continue-on-error: true`); corpus uploaded as a 30-day-retained artifact. Smoke run: 1.3M calls / 4524 unique instructions / all 4 properties PASS in 26 seconds.
229
261
 
230
- **Medusa weekend fuzz (R9.5):** `test/medusa/CustodyPolicyMedusa.t.sol` — 4 properties × 4-hour budget × 4 parallel workers, runs Saturday 03:17 UTC via `.github/workflows/contracts-medusa-weekend.yml`. Different EVM engine (go-ethereum vs Echidna's HEVM) — independent coverage graphs. Artifact-only; 60-day corpus retention.
262
+ **Medusa weekend fuzz (R9.5):** `test/medusa/CustodyPolicyMedusa.t.sol` — 4 properties × 4-hour budget × 4 parallel workers, runs Saturday 03:17 UTC via `.github/workflows/contracts-medusa-weekend.yml`. Different EVM engine (go-ethereum vs Echidna's HEVM) — independent coverage graphs. A falsified property fails the job (since 2026-11-10); 60-day corpus retention; corpora are artifacts, not committed.
231
263
 
232
264
  **Stack mix rationale.** Each tool has a different blind spot:
233
265
  - Foundry invariants — stateful random + seeded shrinking; PR-blocking; catches per-PR regressions.
@@ -253,7 +285,7 @@ Historical detail: [`docs/audits/archive/2026-05/2026-05-packages-contracts-prod
253
285
  - **SC-1** (critical) — agreement issuer signature now bound to contents: `AgreementRegistry.register()` recomputes the digest over `agreementCommitment, schemaHash, issuer, chainId, address(this)` (`AGREEMENT_ISSUER_TYPEHASH`).
254
286
  - **SC-2** (high) — attestation subject-spoofing closed: `assertAssociation()` binds `subject, issuer, schemaId, credentialType, credentialHash, chainId, address(this)` (`ASSOCIATION_ATTESTATION_TYPEHASH`); joint path requires both party co-signatures.
255
287
  - **SC-3** (medium) — `DelegationManager.verifyAuthorizationForCall()` returns `(false,"no-code-enforcer")` instead of failing open on a no-code enforcer.
256
- - **SC-4** (medium) — `.impact` TLD root handed to `roles.namingRootOwner` (governance) at deploy, with a post-deploy assertion.
288
+ - **SC-4** (medium) — the then-user-facing root handed to `roles.namingRootOwner` (governance) at deploy, with a post-deploy assertion. Moot since 2026-11-10: that root is retired and not provisioned; every provisioned root is asserted owned by the naming authority in `_assertProductionEndState`.
257
289
  - **SC-5** (medium) — paymaster deploy `require`-rejects deployer-as-governance/owner in production mode.
258
290
 
259
291
  **Open — contract deep audit 2026-06-10** (full detail: [`docs/audits/2026-06-10-contract-by-contract-audit.md`](../../docs/audits/2026-06-10-contract-by-contract-audit.md); status in `findings.yaml`):
@@ -331,7 +363,9 @@ For the full threat model see [`docs/audits/threat-model.md`](../../docs/audits/
331
363
  | **Cross-EntryPoint replay** | Reuses a paymaster envelope against a redeployed EntryPoint | `getHash` binds `address(entryPoint())` — H7-C.7 / CON-PAYMASTER-004 |
332
364
  | **Caveat author** | Picks `args` to slip a redeem through a delegator's signature | Caveat typehash EXCLUDES `args` — audit F-1 closure |
333
365
  | **Reentrant subregistry caller** | Mock registry re-enters during inner `register` call | `nonReentrant` on `PermissionlessSubregistry.register` — R6.2 |
334
- | **Governance pause bypass** | Calls during incident | `whenNotPaused` modifier on all write surfaces; recovery primitives explicitly exempt |
366
+ | **Governance pause bypass** | Calls during incident | Pause gate on all write surfaces; exempt only: a user operation's `execute` to governance / its timelock / an allow-listed removal on self, and the custody quorum's removal actions (§3.4) |
367
+ | **Retired credential** | Installed a module / delegation manager / queued an upgrade / tried to run code as the account before it was retired | Epoch-stamped modules + delegation manager, queue cleared at retirement, vouched upgrades (invariants 2.22, 2.23). NOT covered: what it did before the account reached generation 4 |
368
+ | **Treasury custodian or delegate** | `approve` + external pull, an unpriced token call, speaking to the hook as the treasury | `TreasurySpendPolicy` counts allowances and fails closed; modules are not execute targets (invariant 2.24). A mode-0 treasury's own key is not bounded |
335
369
  | **WebAuthn rp-id swap** | Registers passkey for one origin, signs for another | `_setupInitialPasskey` rejects zero `rpIdHash`; per-credential rpIdHash stored + checked at verify time |
336
370
 
337
371
  ## 10. Audit engagement targets
@@ -23,6 +23,8 @@
23
23
  "paymentEnforcer": "0x4DAc5F8891112D0C34d207FcE5ED78f13cD2b7d8",
24
24
  "paymentReceiptRegistry": "0xF659091DDB30D3A608d6f96fAEDB41e966B72433",
25
25
  "permissionlessSubregistry": "0x598C7bbAf25f5246BE3D5A75FdEDC180D67D8026",
26
+ "_permissionlessSubregistryRetired": "retired 2026-11-10 (owner's decision): the subregistry of the impact root, which remains on chain as recorded history — not resolved or claimed through the SDK, never written by Deploy.s.sol again. Read permissionlessSubregistries.<tld> (a person claims under .me).",
27
+ "_retiredRoots": ["impact"],
26
28
  "permissionlessSubregistryDemoAgent": "0x571f9F2e12939F2fEDFC431aD6d7323d7483e02B",
27
29
  "quorumEnforcer": "0xA4b148EfF1Ff1c116849F6e9D9c0059bC644873F",
28
30
  "relationshipTypeRegistry": "0x8991a3ECf1DD41064Aa48DaF15a24B3d6a2811C5",
@@ -23,6 +23,8 @@
23
23
  "paymentEnforcer": "0x07fA0aE59FdE4B7ce8962d6fE7a1d648ec3DD5CE",
24
24
  "paymentReceiptRegistry": "0x5FfDd6186C1bBc4628187B1c4C1fDaA39F870d43",
25
25
  "permissionlessSubregistry": "0x9E803ac48b0F32BCE10BFC183b30f6d756DB11CC",
26
+ "_permissionlessSubregistryRetired": "retired 2026-11-10 (owner's decision): the subregistry of the impact root, which remains on chain as recorded history — not resolved or claimed through the SDK, never written by Deploy.s.sol again. Read permissionlessSubregistries.<tld> (a person claims under .me).",
27
+ "_retiredRoots": ["impact"],
26
28
  "permissionlessSubregistryDemoAgent": "0xEeB709C92C9287dBc3151d90c2ef18b07E9f303a",
27
29
  "quorumEnforcer": "0x9bF556A36F3dF3972E355dE4215476Dc268bD0C7",
28
30
  "relationshipTypeRegistry": "0x0222388C3F9612058fb1bB2A9760c470DbD2121b",
@@ -39,6 +39,8 @@
39
39
  "workspace": "0xfD07A5A28A4e430ee6ca4Cd825451CB4FF81DCF7"
40
40
  },
41
41
  "permissionlessSubregistry": "0xa91c1ff07b79460d8a763aed3C882ACDB2cB3719",
42
+ "_permissionlessSubregistryRetired": "retired 2026-11-10 (owner's decision): the subregistry of the impact root, which remains on chain as recorded history — not resolved or claimed through the SDK, never written by Deploy.s.sol again. Read permissionlessSubregistries.<tld> (a person claims under .me).",
43
+ "_retiredRoots": ["impact"],
42
44
  "permissionlessSubregistryDemoAgent": "0x0222388C3F9612058fb1bB2A9760c470DbD2121b",
43
45
  "quorumEnforcer": "0xdaE09066A2cc32f6203605619137dcF01A9B49Ae",
44
46
  "relationshipTypeRegistry": "0xA14afaE192596CE0B1Eb86C583d1EEC62f246999",
@@ -11,6 +11,11 @@
11
11
  "name": "approvedHashRegistry_",
12
12
  "type": "address",
13
13
  "internalType": "address"
14
+ },
15
+ {
16
+ "name": "upgradeVoucher_",
17
+ "type": "address",
18
+ "internalType": "address"
14
19
  }
15
20
  ],
16
21
  "stateMutability": "nonpayable"
@@ -654,6 +659,19 @@
654
659
  ],
655
660
  "stateMutability": "view"
656
661
  },
662
+ {
663
+ "type": "function",
664
+ "name": "isDelegationManagerCurrent",
665
+ "inputs": [],
666
+ "outputs": [
667
+ {
668
+ "name": "",
669
+ "type": "bool",
670
+ "internalType": "bool"
671
+ }
672
+ ],
673
+ "stateMutability": "view"
674
+ },
657
675
  {
658
676
  "type": "function",
659
677
  "name": "isExternalCustodianOrPasskey",
@@ -673,6 +691,25 @@
673
691
  ],
674
692
  "stateMutability": "view"
675
693
  },
694
+ {
695
+ "type": "function",
696
+ "name": "isModuleCurrent",
697
+ "inputs": [
698
+ {
699
+ "name": "module",
700
+ "type": "address",
701
+ "internalType": "address"
702
+ }
703
+ ],
704
+ "outputs": [
705
+ {
706
+ "name": "",
707
+ "type": "bool",
708
+ "internalType": "bool"
709
+ }
710
+ ],
711
+ "stateMutability": "view"
712
+ },
676
713
  {
677
714
  "type": "function",
678
715
  "name": "isModuleInstalled",
@@ -794,6 +831,26 @@
794
831
  ],
795
832
  "stateMutability": "view"
796
833
  },
834
+ {
835
+ "type": "function",
836
+ "name": "reaffirmDelegationManager",
837
+ "inputs": [],
838
+ "outputs": [],
839
+ "stateMutability": "nonpayable"
840
+ },
841
+ {
842
+ "type": "function",
843
+ "name": "reaffirmModule",
844
+ "inputs": [
845
+ {
846
+ "name": "module",
847
+ "type": "address",
848
+ "internalType": "address"
849
+ }
850
+ ],
851
+ "outputs": [],
852
+ "stateMutability": "nonpayable"
853
+ },
797
854
  {
798
855
  "type": "function",
799
856
  "name": "removeCustodian",
@@ -1021,6 +1078,19 @@
1021
1078
  "outputs": [],
1022
1079
  "stateMutability": "pure"
1023
1080
  },
1081
+ {
1082
+ "type": "function",
1083
+ "name": "upgradeVoucher",
1084
+ "inputs": [],
1085
+ "outputs": [
1086
+ {
1087
+ "name": "",
1088
+ "type": "address",
1089
+ "internalType": "address"
1090
+ }
1091
+ ],
1092
+ "stateMutability": "view"
1093
+ },
1024
1094
  {
1025
1095
  "type": "function",
1026
1096
  "name": "validateUserOp",
@@ -1155,6 +1225,25 @@
1155
1225
  ],
1156
1226
  "anonymous": false
1157
1227
  },
1228
+ {
1229
+ "type": "event",
1230
+ "name": "DelegationManagerReaffirmed",
1231
+ "inputs": [
1232
+ {
1233
+ "name": "delegationManager",
1234
+ "type": "address",
1235
+ "indexed": true,
1236
+ "internalType": "address"
1237
+ },
1238
+ {
1239
+ "name": "epoch",
1240
+ "type": "uint64",
1241
+ "indexed": false,
1242
+ "internalType": "uint64"
1243
+ }
1244
+ ],
1245
+ "anonymous": false
1246
+ },
1158
1247
  {
1159
1248
  "type": "event",
1160
1249
  "name": "DelegationManagerRotated",
@@ -1263,6 +1352,38 @@
1263
1352
  ],
1264
1353
  "anonymous": false
1265
1354
  },
1355
+ {
1356
+ "type": "event",
1357
+ "name": "ModuleReaffirmed",
1358
+ "inputs": [
1359
+ {
1360
+ "name": "module",
1361
+ "type": "address",
1362
+ "indexed": true,
1363
+ "internalType": "address"
1364
+ },
1365
+ {
1366
+ "name": "epoch",
1367
+ "type": "uint64",
1368
+ "indexed": false,
1369
+ "internalType": "uint64"
1370
+ }
1371
+ ],
1372
+ "anonymous": false
1373
+ },
1374
+ {
1375
+ "type": "event",
1376
+ "name": "ModuleUninstallCallbackFailed",
1377
+ "inputs": [
1378
+ {
1379
+ "name": "module",
1380
+ "type": "address",
1381
+ "indexed": true,
1382
+ "internalType": "address"
1383
+ }
1384
+ ],
1385
+ "anonymous": false
1386
+ },
1266
1387
  {
1267
1388
  "type": "event",
1268
1389
  "name": "ModuleUninstalled",
@@ -1467,6 +1588,17 @@
1467
1588
  "name": "DelegatedGovernanceForbidden",
1468
1589
  "inputs": []
1469
1590
  },
1591
+ {
1592
+ "type": "error",
1593
+ "name": "DelegationManagerEpochLapsed",
1594
+ "inputs": [
1595
+ {
1596
+ "name": "delegationManager",
1597
+ "type": "address",
1598
+ "internalType": "address"
1599
+ }
1600
+ ]
1601
+ },
1470
1602
  {
1471
1603
  "type": "error",
1472
1604
  "name": "DirectUpgradeBlocked",
@@ -1514,6 +1646,11 @@
1514
1646
  "name": "FailedInnerCall",
1515
1647
  "inputs": []
1516
1648
  },
1649
+ {
1650
+ "type": "error",
1651
+ "name": "InsufficientGasForHookUninstall",
1652
+ "inputs": []
1653
+ },
1517
1654
  {
1518
1655
  "type": "error",
1519
1656
  "name": "InvalidCredentialIdDigest",
@@ -1560,6 +1697,28 @@
1560
1697
  }
1561
1698
  ]
1562
1699
  },
1700
+ {
1701
+ "type": "error",
1702
+ "name": "ModuleEpochLapsed",
1703
+ "inputs": [
1704
+ {
1705
+ "name": "module",
1706
+ "type": "address",
1707
+ "internalType": "address"
1708
+ }
1709
+ ]
1710
+ },
1711
+ {
1712
+ "type": "error",
1713
+ "name": "ModuleNotAnExecuteTarget",
1714
+ "inputs": [
1715
+ {
1716
+ "name": "module",
1717
+ "type": "address",
1718
+ "internalType": "address"
1719
+ }
1720
+ ]
1721
+ },
1563
1722
  {
1564
1723
  "type": "error",
1565
1724
  "name": "ModuleNotInstalled",
@@ -1788,6 +1947,22 @@
1788
1947
  }
1789
1948
  ]
1790
1949
  },
1950
+ {
1951
+ "type": "error",
1952
+ "name": "UpgradeNotVouched",
1953
+ "inputs": [
1954
+ {
1955
+ "name": "newImplementation",
1956
+ "type": "address",
1957
+ "internalType": "address"
1958
+ },
1959
+ {
1960
+ "name": "dataHash",
1961
+ "type": "bytes32",
1962
+ "internalType": "bytes32"
1963
+ }
1964
+ ]
1965
+ },
1791
1966
  {
1792
1967
  "type": "error",
1793
1968
  "name": "UpgradePending",
@@ -41,6 +41,11 @@
41
41
  "name": "relaxedT4Floor_",
42
42
  "type": "bool",
43
43
  "internalType": "bool"
44
+ },
45
+ {
46
+ "name": "upgradeVoucher_",
47
+ "type": "address",
48
+ "internalType": "address"
44
49
  }
45
50
  ],
46
51
  "stateMutability": "nonpayable"
@@ -58,6 +63,19 @@
58
63
  ],
59
64
  "stateMutability": "view"
60
65
  },
66
+ {
67
+ "type": "function",
68
+ "name": "MAX_INITIAL_TRUSTEES",
69
+ "inputs": [],
70
+ "outputs": [
71
+ {
72
+ "name": "",
73
+ "type": "uint256",
74
+ "internalType": "uint256"
75
+ }
76
+ ],
77
+ "stateMutability": "view"
78
+ },
61
79
  {
62
80
  "type": "function",
63
81
  "name": "SELF_PASSKEY_TRUSTEE",
@@ -346,6 +364,19 @@
346
364
  "outputs": [],
347
365
  "stateMutability": "nonpayable"
348
366
  },
367
+ {
368
+ "type": "function",
369
+ "name": "upgradeVoucher",
370
+ "inputs": [],
371
+ "outputs": [
372
+ {
373
+ "name": "",
374
+ "type": "address",
375
+ "internalType": "address"
376
+ }
377
+ ],
378
+ "stateMutability": "view"
379
+ },
349
380
  {
350
381
  "type": "event",
351
382
  "name": "AgentAccountCreated",
@@ -521,6 +552,22 @@
521
552
  }
522
553
  ]
523
554
  },
555
+ {
556
+ "type": "error",
557
+ "name": "TooManyInitialTrustees",
558
+ "inputs": [
559
+ {
560
+ "name": "actual",
561
+ "type": "uint256",
562
+ "internalType": "uint256"
563
+ },
564
+ {
565
+ "name": "max",
566
+ "type": "uint256",
567
+ "internalType": "uint256"
568
+ }
569
+ ]
570
+ },
524
571
  {
525
572
  "type": "error",
526
573
  "name": "TrusteesRequiredForRecoverableMode",