@axiom-lattice/protocols 4.5.0 → 4.6.1

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @axiom-lattice/protocols@4.5.0 build /home/runner/work/agentic/agentic/packages/protocols
2
+ > @axiom-lattice/protocols@4.6.1 build /home/runner/work/agentic/agentic/packages/protocols
3
3
  > tsup src/index.ts --format cjs,esm --dts --sourcemap
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -8,13 +8,13 @@
8
8
  CLI Target: es2020
9
9
  CJS Build start
10
10
  ESM Build start
11
- CJS dist/index.js 45.77 KB
12
- CJS dist/index.js.map 166.43 KB
13
- CJS ⚡️ Build success in 496ms
14
- ESM dist/index.mjs 41.17 KB
15
- ESM dist/index.mjs.map 162.75 KB
16
- ESM ⚡️ Build success in 519ms
11
+ ESM dist/index.mjs 42.09 KB
12
+ ESM dist/index.mjs.map 185.97 KB
13
+ ESM ⚡️ Build success in 316ms
14
+ CJS dist/index.js 46.85 KB
15
+ CJS dist/index.js.map 189.74 KB
16
+ CJS ⚡️ Build success in 347ms
17
17
  DTS Build start
18
- DTS ⚡️ Build success in 12748ms
19
- DTS dist/index.d.ts 221.93 KB
20
- DTS dist/index.d.mts 221.93 KB
18
+ DTS ⚡️ Build success in 12182ms
19
+ DTS dist/index.d.ts 244.47 KB
20
+ DTS dist/index.d.mts 244.47 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,64 @@
1
1
  # @axiom-lattice/protocols
2
2
 
3
+ ## 4.6.1
4
+
5
+ ### Patch Changes
6
+
7
+ - c5e45fb: fix task issue
8
+
9
+ ## 4.6.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 6e07f01: Add a tenant-scoped model provider catalog.
14
+
15
+ Model lists were a process-wide in-memory registry: every model lived under
16
+ `models:default:{key}`, nothing was persisted, and `GET /api/models` returned
17
+ each model's `apiKey` in plaintext to any caller.
18
+
19
+ A tenant owner/admin can now register an upstream provider (base URL + API key),
20
+ run discovery against `{baseURL}/v1/models`, and see a tenant-isolated model
21
+ catalog. See ADR-138 for the full decision record.
22
+
23
+ Key points:
24
+
25
+ - **`modelKey` is `${providerId}/${modelId}`.** The same upstream model id
26
+ offered by two providers is two independent models — the real case being a
27
+ tenant running OpenAI direct and Azure OpenAI side by side. The provider id is
28
+ immutable, so renaming a provider never invalidates a key already stored in
29
+ agent or eval configuration.
30
+ - **Credentials never leave the server.** The API key is stored AES-256-GCM
31
+ encrypted and responses carry only `hasApiKey` / `apiKeyHint`. An omitted or
32
+ empty `apiKey` on update keeps the stored value.
33
+ - **Tenant scope comes from the authenticated session only**, never from the
34
+ request body, and writes require a tenant owner/admin role. A provider
35
+ belonging to another tenant is indistinguishable from a missing one (404).
36
+ - **Upstream URLs are validated** before any outbound request: http(s) only, no
37
+ embedded credentials, and private/loopback/link-local/CGNAT addresses are
38
+ rejected. Discovery does not follow redirects, times out after 8s, and never
39
+ echoes the upstream body in an error.
40
+ - **Discovery is explicit.** `POST /api/model-providers/:id/discover` refreshes a
41
+ persisted snapshot; the catalog endpoints never make outbound calls, so an
42
+ upstream outage leaves the list intact.
43
+
44
+ Phase 1 registers discovered models for execution only for the `default` tenant,
45
+ whose registry keys are byte-identical to the previous key-only API. Other
46
+ tenants get the catalog but their models report `executable: false`. Registering
47
+ them would let one tenant's model silently overwrite another's, sending the
48
+ second tenant's agents to the first tenant's upstream with the first tenant's
49
+ credentials.
50
+
51
+ **Contract changes on the legacy endpoints** (breaking for any consumer of
52
+ `GET /api/models`):
53
+
54
+ - `GET /api/models` no longer returns `apiKey`; it returns `hasApiKey` instead,
55
+ and is now scoped to the `default` tenant rather than enumerating all of them.
56
+ - `PUT /api/models` treats an empty `apiKey` as "keep the existing key". Without
57
+ this, the first save after the change above would clear every stored key.
58
+
59
+ The console UI ships the matching change, so a react-sdk built from this version
60
+ must be deployed together with this gateway.
61
+
3
62
  ## 4.5.0
4
63
 
5
64
  ### Minor Changes