@agenticprimitives/account-custody 1.0.0-alpha.6 → 1.0.0-alpha.8

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 (2) hide show
  1. package/README.md +22 -6
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,10 +1,12 @@
1
1
  # @agenticprimitives/account-custody
2
2
 
3
- Custody-layer SDK for Smart Agent account safety and recovery.
3
+ **Custody is not authority.**
4
4
 
5
- This package owns the TypeScript surface around `CustodyPolicy`: ABI exports,
6
- `CustodyAction` argument builders, EIP-712 typed data, quorum signature packing,
7
- and custody-domain types.
5
+ Most stacks blur the two: the key that lets an agent act is also the key that controls the account, so a leaked session becomes a lost identity. This package exists to keep them apart. Credential add, replace, and remove on a Smart Agent are custody-policy operations — gated by trustee quorums, guardian quorums, multi-credential self-recovery, or multi-sig — and are never modeled as delegations ([ADR-0011](../../docs/architecture/decisions/0011-credential-recovery-and-re-association.md), [spec 221](../../specs/221-credential-recovery.md)). A delegated party can act within its caveats; it can never promote itself into custody.
6
+
7
+ The payoff is recovery without identity loss. `CustodyAction.RecoverAccount` performs an atomic add-new + remove-old credential rotation under the account's custody policy. The canonical Smart Agent address never changes; every delegation it ever issued stays valid; only the credential set moves. This package is the TypeScript surface for that machinery: the `CustodyPolicy` ABI, `CustodyAction` argument builders, EIP-712 typed data, quorum signature packing, and the custody-domain types.
8
+
9
+ > Part of [agenticprimitives](../../README.md) — the trust substrate for the agent economy: one canonical Smart Agent identity with custody, delegation, naming, credentials, and audit evidence designed as one system.
8
10
 
9
11
  ## Install
10
12
 
@@ -23,6 +25,17 @@ import {
23
25
  } from '@agenticprimitives/account-custody';
24
26
  ```
25
27
 
28
+ What you get:
29
+
30
+ - `custodyPolicyAbi` — the ABI for the on-chain `CustodyPolicy` ERC-7579 module ([`packages/contracts/src/custody/CustodyPolicy.sol`](../contracts/src/custody/CustodyPolicy.sol)), kept in lockstep with the deployed bytecode.
31
+ - `CustodyAction` enum (a mirror of the on-chain enum) plus per-action `buildXxxArgs` encoders — including `buildRecoverAccountArgs` for credential rotation.
32
+ - EIP-712 typed-data shapes for `ScheduleCustodyChangeRequest` / `ApplyCustodyChangeRequest` / `CancelScheduledChangeRequest`, with `custodyDomain({ chainId, verifyingContract })` — guaranteed to hash to the same `structHash` the Solidity computes.
33
+ - Quorum signature packing (`packQuorumSigs`) and custody-domain types: `Custodian`, `Trustee`, `CustodyCouncil`, `ScheduledChange`, `CustodyMode`, `RiskTier`.
34
+
35
+ ## How it's different
36
+
37
+ The common pattern for org control and recovery is a third-party multi-sig (Safe) plus a separate recovery product (Argent-style guardians) bolted onto an account they don't define. That works until the seams matter: the multi-sig's notion of "owner" and the recovery product's notion of "guardian" are different identity models, and neither knows about the delegations the account has issued. Here custody is a native ERC-7579 module on the same Smart Agent — quorums, trustees, scheduled changes, and recovery in one policy, designed alongside the delegation layer it explicitly firewalls ([spec 213](../../specs/213-custody-layer-carve-out.md)). No third-party multi-sig dependency; we ported the signature-packing patterns worth porting and own the rest.
38
+
26
39
  ## Boundary
27
40
 
28
41
  This package speaks custody vocabulary only:
@@ -33,8 +46,7 @@ This package speaks custody vocabulary only:
33
46
  - `CustodyAction`
34
47
  - `ScheduledChange`
35
48
 
36
- It does not own delegation caveats, MCP transport, passkey ceremonies, account
37
- deployment, or key-custody providers. See `CLAUDE.md` for routing.
49
+ It does not own delegation caveats, MCP transport, passkey ceremonies, account deployment, or key-custody providers (note: `key-custody` is *key* custody — KMS backends; this is *account* custody). See [`CLAUDE.md`](CLAUDE.md) for routing and [`spec.md`](spec.md) for the contract.
38
50
 
39
51
  ## Validate
40
52
 
@@ -42,3 +54,7 @@ deployment, or key-custody providers. See `CLAUDE.md` for routing.
42
54
  pnpm --filter @agenticprimitives/account-custody typecheck
43
55
  pnpm --filter @agenticprimitives/account-custody test
44
56
  ```
57
+
58
+ ## Status
59
+
60
+ Testnet/pilot-ready. Production launch is gated on the public checklist in the root README — including third-party contract audit and governance key rotation. Track every security finding live in [`docs/audits/findings.yaml`](../../docs/audits/findings.yaml).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agenticprimitives/account-custody",
3
- "version": "1.0.0-alpha.6",
3
+ "version": "1.0.0-alpha.8",
4
4
  "description": "Custody-layer SDK: CustodyPolicy ABI, CustodyAction enum + arg builders, EIP-712 typed-data helpers, and Custodian/Trustee/CustodyCouncil types. Speaks custody-domain vocabulary only — no delegation / steward / caveat concepts (those belong in @agenticprimitives/delegation).",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "peerDependencies": {
34
34
  "viem": "^2.52.2",
35
- "@agenticprimitives/types": "1.0.0-alpha.6"
35
+ "@agenticprimitives/types": "1.0.0-alpha.8"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/node": "^22.7.0",