@byok-sdk/keys 0.3.9 → 0.4.0

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.
package/README.md CHANGED
@@ -125,6 +125,18 @@ authority selection, not a mirror, migration shim, cache, or dual-write path.
125
125
  It stores the complete four-ID provider registry as one versioned deterministic
126
126
  snapshot so delete and the one-enabled invariant share one CAS decision.
127
127
 
128
+ Each normalized profile also has an exact credential-free binding. The
129
+ registry exposes `profile_revision` (a strictly advancing decimal derived from
130
+ `updated_at`) and `profile_hash` (SHA-256 over the normalized runtime-relevant,
131
+ non-secret record). `exactProviderProfileBinding()` and
132
+ `assertExactProviderProfileBinding()` are the local authority used by Agent
133
+ admission. Base URLs and credential bytes never enter the wire binding.
134
+
135
+ For `byok-profile` launches, the Pi launcher receives the exact ref,
136
+ revision/hash, model, and required capabilities. A validation-only invocation
137
+ checks the read-only SQLite authority before task claim; the launch invocation
138
+ checks the same fields again before reading the OS credential or spawning Pi.
139
+
128
140
  ## Module inventory
129
141
 
130
142
  Every module under `src/`, one line of responsibility each. The public surface is
@@ -134,7 +146,7 @@ whatever `index.ts` re-exports; nothing here is reachable by deep import.
134
146
  | --- | --- |
135
147
  | `index.ts` | The package barrel — the single public entry point, and the only supported import path |
136
148
  | `errors.ts` | `ByokKeysError` (`code` + message) and `BYOK_KEYS_ERROR_CODES`, the code strings consumers branch on |
137
- | `provider-profile.ts` | zod schema for the model provider profile, including the adapter/auth-mode legality rules |
149
+ | `provider-profile.ts` | zod schema plus exact credential-free revision/hash binding for the model provider profile |
138
150
  | `headers.ts` | `providerHeaders()` and fail-closed `requiredProviderSecret()` |
139
151
  | `url.ts` | `normalizeProviderUrl()` with the HTTPS / loopback / private-network guard |
140
152
  | `http.ts` | Shared transport guards: injectable `fetch`, timeout, bounded JSON, HTTP error classification |