1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
/// Versioned, namespaced application state. Backs the
/// `vta/app-state/{get,put,list,delete,get-many,put-many}/1.0` Trust Tasks.
/// Records are keyed `app:<contextId>:<namespace>:<key>` in the
/// [`APP_STATE`](crate::keyspaces::APP_STATE) keyspace, alongside an `appv:`
/// version index and an `appc:` per-namespace write counter. Deliberately not
/// [`memory`] — clearing an agent's memory must stay safe, which it cannot be
/// if account state lives there.
/// Backup/restore export/import operations, extracted to the `vta-backup`
/// crate and re-exported so every `crate::operations::backup::…` path is
/// unchanged. The `AppState`-borrowing constructor stays here (see
/// `descriptor_deps_from_app_state` below), and the deployment glue — how a
/// restored seed is committed — in `crate::restore`.
pub use ops as backup;
/// Offline state-assembly helpers: read the VTA's local store and
/// produce the same wire-shape bundles (`DidSecretsBundle`,
/// `ContextProvisionBundle`) that the equivalent `VtaClient` flows
/// build over REST. Used by the on-host `vta context reprovision` /
/// `vta keys bundle` CLIs for cold-start environments where PNM can't
/// reach the VTA over the network.
/// ACL-gated holder-key resolution for credential presentation — derive the
/// VTA-managed subject key (kb-jwt signer + consent secret), refusing keys
/// outside the caller's authorised context.
/// Per-context key/value store for AI-agent memory. Backs the
/// `vta/memory/{put,list,delete}/0.1` Trust Tasks. Entries are keyed
/// `mem:<contextId>:<key>` in the [`MEMORY`](crate::keyspaces::MEMORY) keyspace;
/// `list` is a `mem:<contextId>:` prefix scan.
/// Runtime Policy Decision Point management (`policy/*`).
/// Passkey login — DID-VM-resolved WebAuthn assertion verification.
/// Drives `vta/auth/passkey-login-{start,finish}/1.0` trust-tasks.
/// Distinct from [`passkey_vms`] which handles VM *enrolment*.
/// Passkey-as-verificationMethod enrolment. Lets a browser wallet
/// (`pnm-browser-plugin`) add a WebAuthn passkey as a Multikey VM
/// (purpose `authentication`) on a VTA-managed webvh DID. See
/// `docs/02-vta/passkey-verification-methods.md`.
/// DIDComm protocol management: enable/disable/migrate operations that
/// patch the VTA's own DID document service array. See
/// `docs/05-design-notes/didcomm-protocol-management.md`.
/// Generic template-driven integration bootstrap. See
/// `docs/02-vta/provision-integration.md`. Feature-gated on `webvh`
/// because the phase-1 implementation delegates minting to
/// `create_did_webvh`.
/// Shared keyspace handles passed to operations that need multiple keyspaces.
/// The struct itself lives in `vta-keyspaces` (a pure field bundle with no
/// `vta-service` dependency); the `AppState` / `VtaState` constructors stay
/// here as free functions because they know those concrete state types.
pub use Keyspaces;
/// Borrow keyspaces from an `AppState`.
/// Borrow keyspaces from a `VtaState` (DIDComm handlers).
/// Borrow a backup `DescriptorDeps` (the two-phase export/import flow) from an
/// `AppState`. The struct lives in `vta-backup`; this constructor stays here
/// because it knows `AppState`. `committer` is how this deployment adopts a
/// restored seed — `state.backup_access().committer()`.