@naturali/sdk 0.279.0 → 0.281.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/dist/index.mjs CHANGED
@@ -1365,6 +1365,30 @@ var AgentVersions = class {
1365
1365
  });
1366
1366
  }
1367
1367
  /**
1368
+ * List the claims an agent version holds
1369
+ *
1370
+ * Returns the claim of every eval in the agent's project whose newest `completed` run recorded against this agent and pinned to this version carries one, with the claim's verdict: the run's, made worse by the production and run-age rules the run's evidence declares. A newer run revokes an older one; a run with no claim holds none. Which claims promotion keeps: [Eval-gated promotion](/docs/modules/agents#eval-gated-promotion).
1371
+ *
1372
+ */
1373
+ static listAgentVersionClaims(options) {
1374
+ return (options.client ?? client).get({
1375
+ url: "/v1/projects/{project_id}/agents/{agent_id}/versions/{version}/claims",
1376
+ ...options
1377
+ });
1378
+ }
1379
+ /**
1380
+ * List the claims a promotion recorded on an agent version
1381
+ *
1382
+ * Returns the claims the promoted canary version held when a promotion made this version live, by `eval_id`, each as the claims read served it then, with its claim verdict at that moment. Empty for a version no promotion made live. The live read is `GET /v1/projects/{project_id}/agents/{agent_id}/versions/{version}/claims`.
1383
+ *
1384
+ */
1385
+ static listAgentVersionPromotionClaims(options) {
1386
+ return (options.client ?? client).get({
1387
+ url: "/v1/projects/{project_id}/agents/{agent_id}/versions/{version}/promotion-claims",
1388
+ ...options
1389
+ });
1390
+ }
1391
+ /**
1368
1392
  * Restore an archived config as a new version
1369
1393
  *
1370
1394
  * Copies the named version's configuration onto the agent as a **new** version rather than rewinding the counter, so history stays append-only and the versions in between remain retrievable. Restoring the config the agent already holds is a no-op and creates no version.
@@ -1407,7 +1431,9 @@ var AgentVersions = class {
1407
1431
  *
1408
1432
  * Makes the canary version's config the agent's live config and clears the release. The canary is pinned by version, so an edit that landed mid-rollout is not promoted in its place — it stays an unreleased draft in the version history.
1409
1433
  *
1410
- * When the release carries a `promotion_gate`, the newest `completed` run of the eval it names that was recorded against this agent (`agent_id`) and pinned to the canary version (`agent_version`) must read `verdict: supported`. A newer run revokes an older one. Otherwise the call is a `409`, whose `meta` names that run's `eval_run_id`, `claim`, `verdict` and `verdict_reasons` when there is one, and the rollout is left running untouched. The run that cleared the gate is recorded as `eval_run_id` on the version that goes live.
1434
+ * When the release carries a `promotion_gate`, the newest `completed` run of the eval it names that was recorded against this agent (`agent_id`) and pinned to the canary version (`agent_version`) must give a claim verdict of `supported`: the run's verdict, made worse by the production and run-age rules its evidence declares. A newer run revokes an older one. Otherwise the call is a `409`, whose `meta` names that run's `eval_run_id`, `claim`, and the claim's `verdict` and `verdict_reasons` when there is one, and the rollout is left running untouched. The run that cleared the gate is recorded as `eval_run_id` on the version that goes live.
1435
+ *
1436
+ * Every claim the stable version's run supports must be supported by the canary too, unless the release names its eval in `released_claims`. The stable side is judged by its run's verdict alone, so a claim it demonstrated stays required when its traffic stops or its run ages; the canary side by its claim's verdict, which adds the production rules and the run age its run recorded. Otherwise the call is a `409 PROMOTION_CLAIM_UNMET` whose `meta` names the `eval_id`, the stable version's `claim`, and the canary's `eval_run_id`, `verdict` and `verdict_reasons` (null when it has no run). The version that goes live records the claims the canary held (`GET /v1/projects/{project_id}/agents/{agent_id}/versions/{version}/promotion-claims`) and the release's `released_claims`.
1411
1437
  *
1412
1438
  */
1413
1439
  static promoteAgentRelease(options) {
@@ -1514,6 +1540,7 @@ var AiProviders = class {
1514
1540
  * List the models this provider can run
1515
1541
  *
1516
1542
  * Asks the provider which models it can run, using this provider record's own credentials and configuration, and returns provider-native model ids — the same strings `default_model` and an agent's `model` carry.
1543
+ * A provider with `model_aliases_only: true` answers its `model_aliases` names instead, sorted, each carrying only `id`, without calling the vendor; every provider type, `ollama` and `azure` included, lists this way.
1517
1544
  * Which models are reachable is a property of the credential, not of the provider type: a Vertex provider sees only the publisher models its Google Cloud project and location serve, and a Bedrock provider only the foundation models enabled in its region. Reading the list is how a caller avoids pinning a model that fails at generation time.
1518
1545
  * Not every provider type can answer. `azure` lists deployments an operator named rather than models, and `ollama` lists whatever was pulled onto that host, so both return `400 MODEL_LISTING_UNSUPPORTED`.
1519
1546
  * Listing resolves credentials the same way generation does, so a record that can generate can list. The API-key types (`openai`, `groq`, `xai`, `gateway`, `custom`, `anthropic`, `google`) use the record's linked secret and cannot list without one. `bedrock` and `vertex` use the linked secret — IAM keys or a Bedrock API key, a Google service-account key. A record with no `secret_id` would fall back to the server's own credentials (the AWS default credential chain, Google Application Default Credentials); it can list only on a deployment that allows a record to use them, and returns `400 AI_PROVIDER_MISCONFIGURED` otherwise.
@@ -4336,7 +4363,7 @@ var Models = class {
4336
4363
  * List models
4337
4364
  *
4338
4365
  * Lists the models naturali offers, sorted by name. Filter by vendor, input/output modality or lifecycle status.
4339
- * Every model listed here is available to any project with a `provider: "naturali"` [AI provider](/docs/api/ai-providers/create-ai-provider) — there is no second class to filter for. Models naturali cannot serve (unpriced, or producing something other than text) are not in this catalog; to generate on one of those, register your own credentials as an [AI provider](/docs/api/ai-providers/create-ai-provider) and ask that provider what it serves with [`GET /v1/projects/{project_id}/ai-providers/{ai_provider_id}/models`](/docs/api/ai-providers/list-ai-provider-models).
4366
+ * Every model listed here is served to every project through naturali's shared provider, the first entry of its [AI provider listing](/docs/api/ai-providers/list-ai-providers) — there is no second class to filter for. Models naturali cannot serve (unpriced, or producing something other than text) are not in this catalog; to generate on one of those, register your own credentials as an [AI provider](/docs/api/ai-providers/create-ai-provider) and ask that provider what it serves with [`GET /v1/projects/{project_id}/ai-providers/{ai_provider_id}/models`](/docs/api/ai-providers/list-ai-provider-models).
4340
4367
  *
4341
4368
  */
4342
4369
  static listModels(options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturali/sdk",
3
- "version": "0.279.0",
3
+ "version": "0.281.0",
4
4
  "description": "TypeScript SDK for the naturali.ai API, generated from its OpenAPI specs",
5
5
  "keywords": [
6
6
  "naturali",
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "devDependencies": {
40
40
  "@hey-api/openapi-ts": "^0.99.0",
41
- "@naturali/api": "0.279.0",
41
+ "@naturali/api": "0.281.0",
42
42
  "@ttoss/openapi-codegen": "^0.10.1",
43
43
  "@types/node": "^26.5.1",
44
44
  "tsdown": "^0.23.0",