@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 +13 -1
- package/dist/bin/pi-provider-launcher.js +430 -181
- package/dist/bin/pi-provider-launcher.js.map +1 -1
- package/dist/errors.d.ts +4 -2
- package/dist/index.d.ts +5 -3
- package/dist/index.js +310 -94
- package/dist/index.js.map +1 -1
- package/dist/pi-provider-launcher-core.d.ts +5 -2
- package/dist/pi-provider-projection.d.ts +11 -2
- package/dist/profile-store.d.ts +12 -12
- package/dist/provider-catalog.d.ts +73 -0
- package/dist/provider-profile.d.ts +86 -5
- package/dist/registry.d.ts +22 -9
- package/dist/secret-store.d.ts +17 -14
- package/dist/sqlite-profile-store.d.ts +6 -6
- package/dist/truth-profile-store.d.ts +14 -4
- package/package.json +2 -2
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
|
|
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 |
|