@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.cjs +29 -2
- package/dist/index.d.cts +254 -40
- package/dist/index.d.mts +254 -40
- package/dist/index.mjs +29 -2
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1366,6 +1366,30 @@ var AgentVersions = class {
|
|
|
1366
1366
|
});
|
|
1367
1367
|
}
|
|
1368
1368
|
/**
|
|
1369
|
+
* List the claims an agent version holds
|
|
1370
|
+
*
|
|
1371
|
+
* 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).
|
|
1372
|
+
*
|
|
1373
|
+
*/
|
|
1374
|
+
static listAgentVersionClaims(options) {
|
|
1375
|
+
return (options.client ?? client).get({
|
|
1376
|
+
url: "/v1/projects/{project_id}/agents/{agent_id}/versions/{version}/claims",
|
|
1377
|
+
...options
|
|
1378
|
+
});
|
|
1379
|
+
}
|
|
1380
|
+
/**
|
|
1381
|
+
* List the claims a promotion recorded on an agent version
|
|
1382
|
+
*
|
|
1383
|
+
* 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`.
|
|
1384
|
+
*
|
|
1385
|
+
*/
|
|
1386
|
+
static listAgentVersionPromotionClaims(options) {
|
|
1387
|
+
return (options.client ?? client).get({
|
|
1388
|
+
url: "/v1/projects/{project_id}/agents/{agent_id}/versions/{version}/promotion-claims",
|
|
1389
|
+
...options
|
|
1390
|
+
});
|
|
1391
|
+
}
|
|
1392
|
+
/**
|
|
1369
1393
|
* Restore an archived config as a new version
|
|
1370
1394
|
*
|
|
1371
1395
|
* 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.
|
|
@@ -1408,7 +1432,9 @@ var AgentVersions = class {
|
|
|
1408
1432
|
*
|
|
1409
1433
|
* 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.
|
|
1410
1434
|
*
|
|
1411
|
-
* 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
|
|
1435
|
+
* 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.
|
|
1436
|
+
*
|
|
1437
|
+
* 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`.
|
|
1412
1438
|
*
|
|
1413
1439
|
*/
|
|
1414
1440
|
static promoteAgentRelease(options) {
|
|
@@ -1515,6 +1541,7 @@ var AiProviders = class {
|
|
|
1515
1541
|
* List the models this provider can run
|
|
1516
1542
|
*
|
|
1517
1543
|
* 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.
|
|
1544
|
+
* 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.
|
|
1518
1545
|
* 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.
|
|
1519
1546
|
* 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`.
|
|
1520
1547
|
* 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.
|
|
@@ -4337,7 +4364,7 @@ var Models = class {
|
|
|
4337
4364
|
* List models
|
|
4338
4365
|
*
|
|
4339
4366
|
* Lists the models naturali offers, sorted by name. Filter by vendor, input/output modality or lifecycle status.
|
|
4340
|
-
* Every model listed here is
|
|
4367
|
+
* 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).
|
|
4341
4368
|
*
|
|
4342
4369
|
*/
|
|
4343
4370
|
static listModels(options) {
|