Skip to content

Commit 96437ea

Browse files
authored
Merge pull request #140 from auths-dev/dev-fixDoc404
docs: fix 404 on doc pages and automate gen-docs for cli
2 parents 0d176b4 + 1bd5b30 commit 96437ea

33 files changed

Lines changed: 1611 additions & 1301 deletions

crates/xtask/src/gen_docs.rs

Lines changed: 257 additions & 404 deletions
Large diffs are not rendered by default.

docs/architecture/crates/auths-core.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ flowchart LR
2525
| `agent` | SSH agent daemon (`AgentCore`, `AgentHandle`, `AgentSession`) |
2626
| `error` | `AgentError` enum with `AuthsErrorInfo` trait for structured error codes |
2727
| `config` | `EnvironmentConfig` for reading keychain and path settings |
28-
| `keri_did` | KERI DID parsing and construction |
2928
| `pairing` | Ephemeral ECDH pairing protocol types |
3029
| `paths` | `auths_home()` and related path resolution |
3130
| `policy` | Policy evaluation types |
@@ -101,11 +100,12 @@ Platform-agnostic interface for storing and loading encrypted private keys. All
101100

102101
```rust
103102
pub trait KeyStorage: Send + Sync {
104-
fn store_key(&self, alias: &KeyAlias, identity_did: &IdentityDID, encrypted_key_data: &[u8]) -> Result<(), AgentError>;
105-
fn load_key(&self, alias: &KeyAlias) -> Result<(IdentityDID, Vec<u8>), AgentError>;
103+
fn store_key(&self, alias: &KeyAlias, identity_did: &IdentityDID, role: KeyRole, encrypted_key_data: &[u8]) -> Result<(), AgentError>;
104+
fn load_key(&self, alias: &KeyAlias) -> Result<(IdentityDID, KeyRole, Vec<u8>), AgentError>;
106105
fn delete_key(&self, alias: &KeyAlias) -> Result<(), AgentError>;
107106
fn list_aliases(&self) -> Result<Vec<KeyAlias>, AgentError>;
108107
fn list_aliases_for_identity(&self, identity_did: &IdentityDID) -> Result<Vec<KeyAlias>, AgentError>;
108+
fn list_aliases_for_identity_with_role(&self, identity_did: &IdentityDID, role: KeyRole) -> Result<Vec<KeyAlias>, AgentError>;
109109
fn get_identity_for_alias(&self, alias: &KeyAlias) -> Result<IdentityDID, AgentError>;
110110
fn backend_name(&self) -> &'static str;
111111
}

docs/architecture/crates/auths-sdk.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ flowchart LR
3333
| `types` | Plain-old-data config structs for all SDK workflows |
3434
| `result` | Return types for SDK workflow functions |
3535
| `error` | Domain error types (`SetupError`, `DeviceError`, `RotationError`, etc.) |
36+
| `audit` | Audit event emission convenience for SDK operations |
37+
| `domains` | Domain services for specialized business logic |
38+
| `keys` | Key import and management operations |
39+
| `namespace_registry` | Namespace verifier adapter registry mapping ecosystems to implementations |
40+
| `oidc_jti_registry` | OIDC JWT ID (jti) registry for token replay detection |
3641
| `presentation` | HTML and structured report rendering |
3742

3843
## `AuthsContext` -- The Dependency Container
@@ -50,6 +55,7 @@ pub struct AuthsContext {
5055
pub attestation_source: Arc<dyn AttestationSource + Send + Sync>,
5156
pub passphrase_provider: Arc<dyn PassphraseProvider + Send + Sync>,
5257
pub uuid_provider: Arc<dyn UuidProvider + Send + Sync>,
58+
pub agent_signing: Arc<dyn AgentSigningPort + Send + Sync>,
5359
}
5460
```
5561

@@ -69,7 +75,7 @@ pub struct AuthsContext {
6975

7076
### Builder Pattern
7177

72-
`AuthsContext` uses a typestate builder to enforce compile-time correctness. The three required fields (`registry`, `key_storage`, `clock`) use typestate markers (`Missing` / `Set<T>`) so that `build()` is only callable once all three are set.
78+
`AuthsContext` uses a typestate builder to enforce compile-time correctness. The six required fields (`registry`, `key_storage`, `clock`, `identity_storage`, `attestation_sink`, `attestation_source`) use typestate markers (`Missing` / `Set<T>`) so that `build()` is only callable once all three are set.
7379

7480
```rust
7581
let ctx = AuthsContext::builder()

docs/architecture/crates/auths-verifier.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ flowchart BT
1010
CORE["auths-core"]
1111
ID["auths-id"]
1212
SDK["auths-sdk"]
13-
VERIFIER --> CORE
14-
VERIFIER --> ID
15-
VERIFIER --> SDK
13+
CORE --> VERIFIER
14+
ID --> VERIFIER
15+
SDK --> VERIFIER
1616
```
1717

1818
`auths-verifier` is a standalone crate at the bottom of the dependency graph. It provides signature verification, attestation types, DID types, KERI verification, and witness receipt validation. It is deliberately free of heavy dependencies like `git2`, platform keychains, or tokio (except when the `ffi` feature brings in a minimal tokio runtime).

0 commit comments

Comments
 (0)