@xemahq/llm-registry-api-client 0.8.9 → 0.8.13

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.
@@ -97,6 +97,7 @@ export declare class ClientError extends Error {
97
97
  readonly url: string;
98
98
  readonly body: unknown;
99
99
  constructor(status: number, url: string, body: unknown);
100
+ static [Symbol.hasInstance](candidate: unknown): boolean;
100
101
  }
101
102
  export declare function configureClient(config: ClientConfig): void;
102
103
  export declare function getClientConfig(): ClientConfig;
@@ -19,6 +19,50 @@ Object.defineProperty(exports, "__esModule", { value: true });
19
19
  exports.customFetch = exports.ClientError = void 0;
20
20
  exports.configureClient = configureClient;
21
21
  exports.getClientConfig = getClientConfig;
22
+ /**
23
+ * Cross-package identity for `ClientError`.
24
+ *
25
+ * ── THE OUTAGE THIS IS FOR ────────────────────────────────────────────────
26
+ *
27
+ * PRODUCTION, 2026-09-22. A session launch aborted on
28
+ * `HTTP 503 from http://skill-registry-api…/skills`. A 503 is the archetypal
29
+ * TRANSIENT — agent-session's launch taxonomy already listed it as retryable —
30
+ * but it was classified PERMANENT and the launch was abandoned.
31
+ *
32
+ * The cause was this file. Every generated client package gets its OWN copy of
33
+ * `ClientError`, so there are as many classes as there are clients (81 at the
34
+ * time of writing), all byte-identical and all DIFFERENT OBJECTS. A consumer
35
+ * naturally writes `err instanceof ClientError` against the one client it
36
+ * imported — which reads as obviously correct and is silently package-local. An
37
+ * error from any OTHER client fails it, falls past every status check, and lands
38
+ * on whatever the default is.
39
+ *
40
+ * That was not the first time: biome-host had already switched to structural
41
+ * detection for the same reason, and canopy imports TWO `ClientError` classes
42
+ * and tests both. Three more call sites elsewhere carry the same shape.
43
+ *
44
+ * ── WHY A BRAND AND NOT A SHARED PACKAGE ─────────────────────────────────
45
+ *
46
+ * The obvious fix is one shared runtime class every client imports. It was
47
+ * rejected on measurement: the 81 generated clients are DEPENDENCY-FREE by
48
+ * design (exactly one has any dependency at all), and a shared class would have
49
+ * to be a PEER dependency to be safe — a normal dependency can be installed
50
+ * twice under version skew, which reinstates this identical bug in a form that
51
+ * is HARDER to see, because the classes then look like they ought to match.
52
+ *
53
+ * `Symbol.for` is a process-wide registry keyed by STRING, so every copy of
54
+ * this template resolves the same symbol without importing anything. The brand
55
+ * costs no dependency, cannot skew, and needs no new package.
56
+ *
57
+ * `Symbol.hasInstance` then makes plain `instanceof` mean the right thing
58
+ * fleet-wide: an error from ANY generated client satisfies `instanceof
59
+ * ClientError` in ANY other. A helper would have made the safe pattern
60
+ * available; this makes the dangerous pattern impossible.
61
+ *
62
+ * Narrow on purpose — the brand is set only by this constructor, so an unrelated
63
+ * error carrying a `status` is not admitted.
64
+ */
65
+ const CLIENT_ERROR_BRAND = Symbol.for('xema.generatedClientError');
22
66
  class ClientError extends Error {
23
67
  status;
24
68
  url;
@@ -29,6 +73,14 @@ class ClientError extends Error {
29
73
  this.url = url;
30
74
  this.body = body;
31
75
  this.name = 'ClientError';
76
+ // Non-enumerable: it must not appear in JSON, logs or snapshots — it is an
77
+ // identity marker, not payload.
78
+ Object.defineProperty(this, CLIENT_ERROR_BRAND, { value: true });
79
+ }
80
+ static [Symbol.hasInstance](candidate) {
81
+ return (typeof candidate === 'object' &&
82
+ candidate !== null &&
83
+ CLIENT_ERROR_BRAND in candidate);
32
84
  }
33
85
  }
34
86
  exports.ClientError = ClientError;
@@ -3,7 +3,7 @@
3
3
  * LLM Registry API
4
4
  * OpenAPI spec version: 0.1.3
5
5
  */
6
- import type { EmbeddingCommitmentActivationDtoDataEnvelope, EmbeddingCommitmentDtoDataEnvelope, EmbeddingMigrationDtoDataEnvelope, EmbeddingMigrationRollbackDtoDataEnvelope, EmbeddingModelOptionDtoDataArrayEnvelope, MigrationAcknowledgementDtoDataEnvelope, MigrationConsumerDoneDto, MigrationConsumerFailedDto, MigrationHeartbeatDto, MigrationProvisionDto, ResolvedEmbeddingCommitmentDtoDataEnvelope, StartEmbeddingMigrationDto, UpsertEmbeddingCommitmentDto } from '../../models';
6
+ import type { EmbeddingCommitmentActivationDtoDataEnvelope, EmbeddingCommitmentDtoDataEnvelope, EmbeddingMigrationDtoDataEnvelope, EmbeddingMigrationRollbackDtoDataEnvelope, EmbeddingModelOptionDtoDataArrayEnvelope, EmbeddingStorageDeclarationAckDtoDataEnvelope, EmbeddingStorageDeclarationDto, MigrationAcknowledgementDtoDataEnvelope, MigrationConsumerDoneDto, MigrationConsumerFailedDto, MigrationHeartbeatDto, MigrationProvisionDto, ResolvedEmbeddingCommitmentDtoDataEnvelope, StartEmbeddingMigrationDto, UpsertEmbeddingCommitmentDto } from '../../models';
7
7
  export declare const getEmbeddingCommitmentControllerGetCommitmentUrl: () => string;
8
8
  /**
9
9
  * @summary Get the org's embedding commitment
@@ -39,6 +39,11 @@ export declare const getEmbeddingCommitmentControllerProvisionUrl: (migrationId:
39
39
  * @summary Consumer worker reports that it has provisioned target storage and is ready to dual-write. Records the high-water-mark cursor.
40
40
  */
41
41
  export declare const embeddingCommitmentControllerProvision: (migrationId: string, migrationProvisionDto: MigrationProvisionDto, options?: RequestInit) => Promise<MigrationAcknowledgementDtoDataEnvelope>;
42
+ export declare const getEmbeddingCommitmentControllerDeclareStorageUrl: () => string;
43
+ /**
44
+ * @summary A consumer declares what its vector storage can hold. Called on the consumer's boot, which is the moment it has just read its own backend — so the declaration moves exactly when the fact does.
45
+ */
46
+ export declare const embeddingCommitmentControllerDeclareStorage: (embeddingStorageDeclarationDto: EmbeddingStorageDeclarationDto, options?: RequestInit) => Promise<EmbeddingStorageDeclarationAckDtoDataEnvelope>;
42
47
  export declare const getEmbeddingCommitmentControllerHeartbeatUrl: (migrationId: string) => string;
43
48
  /**
44
49
  * @summary Consumer worker advances the durable cursor after processing a batch. Used by the reconciliation cron to detect stalled walkers.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.embeddingCommitmentControllerResolveOrg = exports.getEmbeddingCommitmentControllerResolveOrgUrl = exports.embeddingCommitmentControllerConsumerFailed = exports.getEmbeddingCommitmentControllerConsumerFailedUrl = exports.embeddingCommitmentControllerConsumerDone = exports.getEmbeddingCommitmentControllerConsumerDoneUrl = exports.embeddingCommitmentControllerHeartbeat = exports.getEmbeddingCommitmentControllerHeartbeatUrl = exports.embeddingCommitmentControllerProvision = exports.getEmbeddingCommitmentControllerProvisionUrl = exports.embeddingCommitmentControllerRollback = exports.getEmbeddingCommitmentControllerRollbackUrl = exports.embeddingCommitmentControllerStartMigration = exports.getEmbeddingCommitmentControllerStartMigrationUrl = exports.embeddingCommitmentControllerActivate = exports.getEmbeddingCommitmentControllerActivateUrl = exports.embeddingCommitmentControllerListAvailableModels = exports.getEmbeddingCommitmentControllerListAvailableModelsUrl = exports.embeddingCommitmentControllerUpsertCommitment = exports.getEmbeddingCommitmentControllerUpsertCommitmentUrl = exports.embeddingCommitmentControllerGetCommitment = exports.getEmbeddingCommitmentControllerGetCommitmentUrl = void 0;
3
+ exports.embeddingCommitmentControllerResolveOrg = exports.getEmbeddingCommitmentControllerResolveOrgUrl = exports.embeddingCommitmentControllerConsumerFailed = exports.getEmbeddingCommitmentControllerConsumerFailedUrl = exports.embeddingCommitmentControllerConsumerDone = exports.getEmbeddingCommitmentControllerConsumerDoneUrl = exports.embeddingCommitmentControllerHeartbeat = exports.getEmbeddingCommitmentControllerHeartbeatUrl = exports.embeddingCommitmentControllerDeclareStorage = exports.getEmbeddingCommitmentControllerDeclareStorageUrl = exports.embeddingCommitmentControllerProvision = exports.getEmbeddingCommitmentControllerProvisionUrl = exports.embeddingCommitmentControllerRollback = exports.getEmbeddingCommitmentControllerRollbackUrl = exports.embeddingCommitmentControllerStartMigration = exports.getEmbeddingCommitmentControllerStartMigrationUrl = exports.embeddingCommitmentControllerActivate = exports.getEmbeddingCommitmentControllerActivateUrl = exports.embeddingCommitmentControllerListAvailableModels = exports.getEmbeddingCommitmentControllerListAvailableModelsUrl = exports.embeddingCommitmentControllerUpsertCommitment = exports.getEmbeddingCommitmentControllerUpsertCommitmentUrl = exports.embeddingCommitmentControllerGetCommitment = exports.getEmbeddingCommitmentControllerGetCommitmentUrl = void 0;
4
4
  const custom_fetch_1 = require("../../custom-fetch");
5
5
  const getEmbeddingCommitmentControllerGetCommitmentUrl = () => {
6
6
  return `/embedding-commitment`;
@@ -106,6 +106,22 @@ const embeddingCommitmentControllerProvision = async (migrationId, migrationProv
106
106
  });
107
107
  };
108
108
  exports.embeddingCommitmentControllerProvision = embeddingCommitmentControllerProvision;
109
+ const getEmbeddingCommitmentControllerDeclareStorageUrl = () => {
110
+ return `/embedding-commitment/storage-declaration`;
111
+ };
112
+ exports.getEmbeddingCommitmentControllerDeclareStorageUrl = getEmbeddingCommitmentControllerDeclareStorageUrl;
113
+ /**
114
+ * @summary A consumer declares what its vector storage can hold. Called on the consumer's boot, which is the moment it has just read its own backend — so the declaration moves exactly when the fact does.
115
+ */
116
+ const embeddingCommitmentControllerDeclareStorage = async (embeddingStorageDeclarationDto, options) => {
117
+ return (0, custom_fetch_1.customFetch)((0, exports.getEmbeddingCommitmentControllerDeclareStorageUrl)(), {
118
+ ...options,
119
+ method: 'POST',
120
+ headers: { 'Content-Type': 'application/json', ...options?.headers },
121
+ body: JSON.stringify(embeddingStorageDeclarationDto)
122
+ });
123
+ };
124
+ exports.embeddingCommitmentControllerDeclareStorage = embeddingCommitmentControllerDeclareStorage;
109
125
  const getEmbeddingCommitmentControllerHeartbeatUrl = (migrationId) => {
110
126
  return `/embedding-commitment/migrate/${migrationId}/heartbeat`;
111
127
  };
@@ -15,7 +15,14 @@ export interface CreateProviderDto {
15
15
  apiType: CreateProviderDtoApiType;
16
16
  baseUrl: string;
17
17
  authType?: CreateProviderDtoAuthType;
18
- apiKey: string;
18
+ /** Raw API key. ENROLMENT ONLY: it is sealed into the credential plane on arrival and never stored on the provider. Mutually exclusive with `credentialRef`; exactly one of the two is required. Prefer `credentialRef` in declarative configuration, where a raw key would reach a tfvars file, a plan and the state backend. */
19
+ apiKey?: string;
20
+ /**
21
+ * Opaque credential-binding id held by the credential plane. Mutually exclusive with `apiKey`; exactly one of the two is required. The raw key never crosses this door when this form is used.
22
+ * @minLength 1
23
+ * @maxLength 200
24
+ */
25
+ credentialRef?: string;
19
26
  /** Catalog provider slug — used to seed known models on creation */
20
27
  catalogSlug?: string;
21
28
  /**
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Generated by @xemahq/api-client-generator — do not edit manually.
3
+ * LLM Registry API
4
+ * OpenAPI spec version: 0.1.3
5
+ */
6
+ export type EmbeddingConsumer = typeof EmbeddingConsumer[keyof typeof EmbeddingConsumer];
7
+ export declare const EmbeddingConsumer: {
8
+ readonly search_api: "search_api";
9
+ readonly memory_api: "memory_api";
10
+ };
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ /**
3
+ * Generated by @xemahq/api-client-generator — do not edit manually.
4
+ * LLM Registry API
5
+ * OpenAPI spec version: 0.1.3
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.EmbeddingConsumer = void 0;
9
+ exports.EmbeddingConsumer = {
10
+ search_api: 'search_api',
11
+ memory_api: 'memory_api',
12
+ };
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Generated by @xemahq/api-client-generator — do not edit manually.
3
+ * LLM Registry API
4
+ * OpenAPI spec version: 0.1.3
5
+ */
6
+ /**
7
+ * What this deployment's vector storage would do with this model's dimension. `indexed` is fully served; `stored_unindexed` works and is a linear scan; `unsupported` cannot be stored and must not be offered; `unverified` means NO consumer has declared what it can hold — which is an ANSWER, not a synonym for "fine". A client MUST render this rather than deciding from a local list of dimensions: a local list is how 4096 came to be offered with no storage behind it.
8
+ */
9
+ export type EmbeddingDimensionVerdict = typeof EmbeddingDimensionVerdict[keyof typeof EmbeddingDimensionVerdict];
10
+ export declare const EmbeddingDimensionVerdict: {
11
+ readonly indexed: "indexed";
12
+ readonly stored_unindexed: "stored_unindexed";
13
+ readonly unsupported: "unsupported";
14
+ readonly unverified: "unverified";
15
+ };
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ /**
3
+ * Generated by @xemahq/api-client-generator — do not edit manually.
4
+ * LLM Registry API
5
+ * OpenAPI spec version: 0.1.3
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.EmbeddingDimensionVerdict = void 0;
9
+ exports.EmbeddingDimensionVerdict = {
10
+ indexed: 'indexed',
11
+ stored_unindexed: 'stored_unindexed',
12
+ unsupported: 'unsupported',
13
+ unverified: 'unverified',
14
+ };
@@ -3,6 +3,7 @@
3
3
  * LLM Registry API
4
4
  * OpenAPI spec version: 0.1.3
5
5
  */
6
+ import type { EmbeddingDimensionVerdict } from './embeddingDimensionVerdict.js';
6
7
  import type { EmbeddingProviderSummaryDto } from './embeddingProviderSummaryDto.js';
7
8
  export interface EmbeddingModelOptionDto {
8
9
  id: string;
@@ -12,4 +13,6 @@ export interface EmbeddingModelOptionDto {
12
13
  embeddingDimension: number;
13
14
  capabilities: string[];
14
15
  provider: EmbeddingProviderSummaryDto;
16
+ /** What this deployment's vector storage would do with this model's dimension. `indexed` is fully served; `stored_unindexed` works and is a linear scan; `unsupported` cannot be stored and must not be offered; `unverified` means NO consumer has declared what it can hold — which is an ANSWER, not a synonym for "fine". A client MUST render this rather than deciding from a local list of dimensions: a local list is how 4096 came to be offered with no storage behind it. */
17
+ dimensionVerdict: EmbeddingDimensionVerdict;
15
18
  }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Generated by @xemahq/api-client-generator — do not edit manually.
3
+ * LLM Registry API
4
+ * OpenAPI spec version: 0.1.3
5
+ */
6
+ export interface EmbeddingStorageDeclarationAckDto {
7
+ recorded: boolean;
8
+ /** When THIS service recorded it, from its own clock rather than the caller's. It is what makes a consumer that stopped re-declaring visible: its row simply stops moving. */
9
+ declaredAt: string;
10
+ }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ /**
3
+ * Generated by @xemahq/api-client-generator — do not edit manually.
4
+ * LLM Registry API
5
+ * OpenAPI spec version: 0.1.3
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Generated by @xemahq/api-client-generator — do not edit manually.
3
+ * LLM Registry API
4
+ * OpenAPI spec version: 0.1.3
5
+ */
6
+ import type { EmbeddingStorageDeclarationAckDto } from './embeddingStorageDeclarationAckDto.js';
7
+ export interface EmbeddingStorageDeclarationAckDtoDataEnvelope {
8
+ data: EmbeddingStorageDeclarationAckDto;
9
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Generated by @xemahq/api-client-generator — do not edit manually.
3
+ * LLM Registry API
4
+ * OpenAPI spec version: 0.1.3
5
+ */
6
+ import type { EmbeddingConsumer } from './embeddingConsumer.js';
7
+ export interface EmbeddingStorageDeclarationDto {
8
+ consumer: EmbeddingConsumer;
9
+ /**
10
+ * Narrowest vector this consumer can store.
11
+ * @minimum 1
12
+ */
13
+ minDimension: number;
14
+ /**
15
+ * Widest vector this consumer can store.
16
+ * @minimum 1
17
+ */
18
+ maxDimension: number;
19
+ /**
20
+ * Widest vector it can store AND serve from an ANN index. Between this and `maxDimension` recall is an exact scan: correct, and slower. It is advisory and never causes a refusal — conflating the two ceilings is what made 4096 look unsupported when it was merely unindexable.
21
+ * @minimum 0
22
+ */
23
+ maxIndexedDimension: number;
24
+ backend: string;
25
+ /** Provenance for the numbers above. A bare ceiling is a fact with no source; naming the backend and version makes it checkable, and makes a backend change visible instead of silently keeping an old number. */
26
+ backendVersion: string;
27
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -140,6 +140,8 @@ export * from './embeddingCommitmentActivationDtoDataEnvelope';
140
140
  export * from './embeddingCommitmentDto';
141
141
  export * from './embeddingCommitmentDtoDataEnvelope';
142
142
  export * from './embeddingCommitmentDtoState';
143
+ export * from './embeddingConsumer';
144
+ export * from './embeddingDimensionVerdict';
143
145
  export * from './embeddingMigrationDto';
144
146
  export * from './embeddingMigrationDtoDataEnvelope';
145
147
  export * from './embeddingMigrationDtoState';
@@ -148,6 +150,9 @@ export * from './embeddingMigrationRollbackDtoDataEnvelope';
148
150
  export * from './embeddingModelOptionDto';
149
151
  export * from './embeddingModelOptionDtoDataArrayEnvelope';
150
152
  export * from './embeddingProviderSummaryDto';
153
+ export * from './embeddingStorageDeclarationAckDto';
154
+ export * from './embeddingStorageDeclarationAckDtoDataEnvelope';
155
+ export * from './embeddingStorageDeclarationDto';
151
156
  export * from './exactAgentRevisionAuthorityResponseDto';
152
157
  export * from './exactAgentRevisionAuthorityResponseDtoDataEnvelope';
153
158
  export * from './exactAgentRevisionAuthorityResponseDtoReachTier';
@@ -157,6 +157,8 @@ __exportStar(require("./embeddingCommitmentActivationDtoDataEnvelope"), exports)
157
157
  __exportStar(require("./embeddingCommitmentDto"), exports);
158
158
  __exportStar(require("./embeddingCommitmentDtoDataEnvelope"), exports);
159
159
  __exportStar(require("./embeddingCommitmentDtoState"), exports);
160
+ __exportStar(require("./embeddingConsumer"), exports);
161
+ __exportStar(require("./embeddingDimensionVerdict"), exports);
160
162
  __exportStar(require("./embeddingMigrationDto"), exports);
161
163
  __exportStar(require("./embeddingMigrationDtoDataEnvelope"), exports);
162
164
  __exportStar(require("./embeddingMigrationDtoState"), exports);
@@ -165,6 +167,9 @@ __exportStar(require("./embeddingMigrationRollbackDtoDataEnvelope"), exports);
165
167
  __exportStar(require("./embeddingModelOptionDto"), exports);
166
168
  __exportStar(require("./embeddingModelOptionDtoDataArrayEnvelope"), exports);
167
169
  __exportStar(require("./embeddingProviderSummaryDto"), exports);
170
+ __exportStar(require("./embeddingStorageDeclarationAckDto"), exports);
171
+ __exportStar(require("./embeddingStorageDeclarationAckDtoDataEnvelope"), exports);
172
+ __exportStar(require("./embeddingStorageDeclarationDto"), exports);
168
173
  __exportStar(require("./exactAgentRevisionAuthorityResponseDto"), exports);
169
174
  __exportStar(require("./exactAgentRevisionAuthorityResponseDtoDataEnvelope"), exports);
170
175
  __exportStar(require("./exactAgentRevisionAuthorityResponseDtoReachTier"), exports);
@@ -11,7 +11,18 @@ export interface UpdateProviderDto {
11
11
  apiType?: UpdateProviderDtoApiType;
12
12
  baseUrl?: string;
13
13
  authType?: UpdateProviderDtoAuthType;
14
+ /**
15
+ * Replace the INLINE credential. Supplying this on a provider that currently
16
+ * holds a `credentialRef` SWITCHES it to the inline form — the service
17
+ * clears the reference in the same write, so the row never holds both.
18
+ */
14
19
  apiKey?: string;
20
+ /**
21
+ * Opaque credential-binding id held by the credential plane. Supplying it switches this provider to the reference form and clears the stored key. Mutually exclusive with `apiKey` in one request.
22
+ * @minLength 1
23
+ * @maxLength 200
24
+ */
25
+ credentialRef?: string;
15
26
  isActive?: boolean;
16
27
  /**
17
28
  * Maximum concurrent requests. Set to null to remove the limit.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xemahq/llm-registry-api-client",
3
- "version": "0.8.9",
3
+ "version": "0.8.13",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "files": [
@@ -19,7 +19,7 @@
19
19
  "service": "llm-registry-api",
20
20
  "biome": "agent-runtime",
21
21
  "target": "server",
22
- "generator": "@xemahq/api-client-generator@0.21.0",
22
+ "generator": "@xemahq/api-client-generator@1.1.2",
23
23
  "source": "openapi.public.json"
24
24
  },
25
25
  "license": "LicenseRef-Xema-BSL-1.1",