@naturali/cli 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.
Files changed (2) hide show
  1. package/dist/index.mjs +153 -8
  2. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -17,7 +17,7 @@ var __exportAll = (all, no_symbols) => {
17
17
  };
18
18
  //#endregion
19
19
  //#region package.json
20
- var version = "0.279.0";
20
+ var version = "0.281.0";
21
21
  //#endregion
22
22
  //#region ../sdk/src/generated/core/bodySerializer.gen.ts
23
23
  const serializeFormDataPair = (data, key, value) => {
@@ -1386,6 +1386,30 @@ var AgentVersions = class {
1386
1386
  });
1387
1387
  }
1388
1388
  /**
1389
+ * List the claims an agent version holds
1390
+ *
1391
+ * 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).
1392
+ *
1393
+ */
1394
+ static listAgentVersionClaims(options) {
1395
+ return (options.client ?? client).get({
1396
+ url: "/v1/projects/{project_id}/agents/{agent_id}/versions/{version}/claims",
1397
+ ...options
1398
+ });
1399
+ }
1400
+ /**
1401
+ * List the claims a promotion recorded on an agent version
1402
+ *
1403
+ * 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`.
1404
+ *
1405
+ */
1406
+ static listAgentVersionPromotionClaims(options) {
1407
+ return (options.client ?? client).get({
1408
+ url: "/v1/projects/{project_id}/agents/{agent_id}/versions/{version}/promotion-claims",
1409
+ ...options
1410
+ });
1411
+ }
1412
+ /**
1389
1413
  * Restore an archived config as a new version
1390
1414
  *
1391
1415
  * 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.
@@ -1428,7 +1452,9 @@ var AgentVersions = class {
1428
1452
  *
1429
1453
  * 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.
1430
1454
  *
1431
- * 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.
1455
+ * 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.
1456
+ *
1457
+ * 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`.
1432
1458
  *
1433
1459
  */
1434
1460
  static promoteAgentRelease(options) {
@@ -1535,6 +1561,7 @@ var AiProviders = class {
1535
1561
  * List the models this provider can run
1536
1562
  *
1537
1563
  * 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.
1564
+ * 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.
1538
1565
  * 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.
1539
1566
  * 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`.
1540
1567
  * 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.
@@ -4357,7 +4384,7 @@ var Models = class {
4357
4384
  * List models
4358
4385
  *
4359
4386
  * Lists the models naturali offers, sorted by name. Filter by vendor, input/output modality or lifecycle status.
4360
- * 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).
4387
+ * 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).
4361
4388
  *
4362
4389
  */
4363
4390
  static listModels(options) {
@@ -9684,6 +9711,110 @@ const routes = {
9684
9711
  }
9685
9712
  ]
9686
9713
  },
9714
+ "list-agent-version-claims": {
9715
+ serviceClass: "AgentVersions",
9716
+ operationId: "listAgentVersionClaims",
9717
+ description: "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).",
9718
+ moduleDocsUrl: "https://naturali.ai/docs/modules/agents",
9719
+ httpMethod: "get",
9720
+ pathParams: [
9721
+ "project_id",
9722
+ "agent_id",
9723
+ "version"
9724
+ ],
9725
+ queryParams: ["limit", "cursor"],
9726
+ headerParams: [],
9727
+ cookieParams: [],
9728
+ flags: [
9729
+ {
9730
+ "name": "project_id",
9731
+ "description": "Project public ID (proj_ prefix).",
9732
+ "required": true,
9733
+ "type": "string",
9734
+ "in": "path"
9735
+ },
9736
+ {
9737
+ "name": "agent_id",
9738
+ "description": "Agent public ID",
9739
+ "required": true,
9740
+ "type": "string",
9741
+ "in": "path"
9742
+ },
9743
+ {
9744
+ "name": "version",
9745
+ "description": "Archived config version number",
9746
+ "required": true,
9747
+ "type": "integer",
9748
+ "in": "path"
9749
+ },
9750
+ {
9751
+ "name": "limit",
9752
+ "description": "Results per page, 1 to 100 (default 50). Above 100 it is clamped; below 1 or not an integer it is `400`.",
9753
+ "required": false,
9754
+ "type": "integer",
9755
+ "in": "query"
9756
+ },
9757
+ {
9758
+ "name": "cursor",
9759
+ "description": "The previous page's `next_cursor`; omit it for the first page. A cursor this list did not issue is `400`.",
9760
+ "required": false,
9761
+ "type": "string",
9762
+ "in": "query"
9763
+ }
9764
+ ]
9765
+ },
9766
+ "list-agent-version-promotion-claims": {
9767
+ serviceClass: "AgentVersions",
9768
+ operationId: "listAgentVersionPromotionClaims",
9769
+ description: "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`.",
9770
+ moduleDocsUrl: "https://naturali.ai/docs/modules/agents",
9771
+ httpMethod: "get",
9772
+ pathParams: [
9773
+ "project_id",
9774
+ "agent_id",
9775
+ "version"
9776
+ ],
9777
+ queryParams: ["limit", "cursor"],
9778
+ headerParams: [],
9779
+ cookieParams: [],
9780
+ flags: [
9781
+ {
9782
+ "name": "project_id",
9783
+ "description": "Project public ID (proj_ prefix).",
9784
+ "required": true,
9785
+ "type": "string",
9786
+ "in": "path"
9787
+ },
9788
+ {
9789
+ "name": "agent_id",
9790
+ "description": "Agent public ID",
9791
+ "required": true,
9792
+ "type": "string",
9793
+ "in": "path"
9794
+ },
9795
+ {
9796
+ "name": "version",
9797
+ "description": "Archived config version number",
9798
+ "required": true,
9799
+ "type": "integer",
9800
+ "in": "path"
9801
+ },
9802
+ {
9803
+ "name": "limit",
9804
+ "description": "Results per page, 1 to 100 (default 50). Above 100 it is clamped; below 1 or not an integer it is `400`.",
9805
+ "required": false,
9806
+ "type": "integer",
9807
+ "in": "query"
9808
+ },
9809
+ {
9810
+ "name": "cursor",
9811
+ "description": "The previous page's `next_cursor`; omit it for the first page. A cursor this list did not issue is `400`.",
9812
+ "required": false,
9813
+ "type": "string",
9814
+ "in": "query"
9815
+ }
9816
+ ]
9817
+ },
9687
9818
  "restore-agent-version": {
9688
9819
  serviceClass: "AgentVersions",
9689
9820
  operationId: "restoreAgentVersion",
@@ -9781,13 +9912,20 @@ const routes = {
9781
9912
  "required": false,
9782
9913
  "type": "string",
9783
9914
  "in": "body"
9915
+ },
9916
+ {
9917
+ "name": "released_claims",
9918
+ "description": "Evals whose claims the canary need not keep, unique and in this project; anything else is a `400`. Omit it, or send null, to keep every claim the stable version's run supports. Re-setting the release without it requires them again.",
9919
+ "required": false,
9920
+ "type": "array",
9921
+ "in": "body"
9784
9922
  }
9785
9923
  ]
9786
9924
  },
9787
9925
  "promote-agent-release": {
9788
9926
  serviceClass: "AgentVersions",
9789
9927
  operationId: "promoteAgentRelease",
9790
- description: "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. 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.",
9928
+ description: "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. 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. 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`.",
9791
9929
  moduleDocsUrl: "https://naturali.ai/docs/modules/agents",
9792
9930
  httpMethod: "post",
9793
9931
  pathParams: ["project_id", "agent_id"],
@@ -10100,7 +10238,7 @@ const routes = {
10100
10238
  "list-ai-provider-models": {
10101
10239
  serviceClass: "AIProviders",
10102
10240
  operationId: "listAiProviderModels",
10103
- description: "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. 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. 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`. 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. A Vertex record needs no `config.project` when its secret is a service-account key, since the key file names its own project. A Vertex record in express mode (API key) cannot list at all: the publisher-model listing rejects API keys and needs a credential that asserts a principal, so it returns `400 MODEL_LISTING_UNSUPPORTED`. The Vertex answer is the publisher catalogue the record's `config.location` region serves. The project behind the credential is billed and quota'd for the call but does not filter the result, so a listed model may still be unavailable to that project at generation time. The provider answers its whole catalogue in one call; `q`, `limit` and `cursor` narrow and page what it returned. A request without `limit` gets the first 50 models.",
10241
+ description: "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. 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. 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. 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`. 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. A Vertex record needs no `config.project` when its secret is a service-account key, since the key file names its own project. A Vertex record in express mode (API key) cannot list at all: the publisher-model listing rejects API keys and needs a credential that asserts a principal, so it returns `400 MODEL_LISTING_UNSUPPORTED`. The Vertex answer is the publisher catalogue the record's `config.location` region serves. The project behind the credential is billed and quota'd for the call but does not filter the result, so a listed model may still be unavailable to that project at generation time. The provider answers its whole catalogue in one call; `q`, `limit` and `cursor` narrow and page what it returned. A request without `limit` gets the first 50 models.",
10104
10242
  moduleDocsUrl: "https://naturali.ai/docs/modules/ai-providers",
10105
10243
  httpMethod: "get",
10106
10244
  pathParams: ["project_id", "ai_provider_id"],
@@ -15226,7 +15364,7 @@ const routes = {
15226
15364
  },
15227
15365
  {
15228
15366
  "name": "evidence",
15229
- "description": "The rules a run's verdict reads beyond the threshold. Null declares none.",
15367
+ "description": "The rules beyond the threshold: `required_groups` is read by the run's verdict, `live` and `max_run_age_days` only by its claim's verdict. Null declares none.",
15230
15368
  "required": false,
15231
15369
  "type": "object",
15232
15370
  "in": "body"
@@ -16753,7 +16891,7 @@ const routes = {
16753
16891
  "progress_only",
16754
16892
  "stream"
16755
16893
  ],
16756
- headerParams: [],
16894
+ headerParams: ["Last-Event-ID"],
16757
16895
  cookieParams: [],
16758
16896
  flags: [
16759
16897
  {
@@ -16777,6 +16915,13 @@ const routes = {
16777
16915
  "type": "integer",
16778
16916
  "in": "query"
16779
16917
  },
16918
+ {
16919
+ "name": "Last-Event-ID",
16920
+ "description": "The `id` of the last frame received, which an `EventSource` sends when it reconnects. Read as `after_seq` when `after_seq` is not sent.\n",
16921
+ "required": false,
16922
+ "type": "string",
16923
+ "in": "header"
16924
+ },
16780
16925
  {
16781
16926
  "name": "limit",
16782
16927
  "description": "Results per page, 1 to 100 (default 50). Above 100 it is clamped; below 1 or not an integer it is `400`.",
@@ -19785,7 +19930,7 @@ const routes = {
19785
19930
  "list-models": {
19786
19931
  serviceClass: "Models",
19787
19932
  operationId: "listModels",
19788
- description: "Lists the models naturali offers, sorted by name. Filter by vendor, input/output modality or lifecycle status. 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).",
19933
+ description: "Lists the models naturali offers, sorted by name. Filter by vendor, input/output modality or lifecycle status. 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).",
19789
19934
  moduleDocsUrl: "https://naturali.ai/docs/modules/models",
19790
19935
  httpMethod: "get",
19791
19936
  pathParams: [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturali/cli",
3
- "version": "0.279.0",
3
+ "version": "0.281.0",
4
4
  "description": "Command-line interface for the naturali.ai API, generated from its OpenAPI specs",
5
5
  "keywords": [
6
6
  "naturali",
@@ -31,7 +31,7 @@
31
31
  "yaml": "^2.9.1"
32
32
  },
33
33
  "devDependencies": {
34
- "@naturali/sdk": "0.279.0",
34
+ "@naturali/sdk": "0.281.0",
35
35
  "@ttoss/openapi-codegen": "^0.10.1",
36
36
  "@types/node": "^26.5.1",
37
37
  "tsdown": "^0.23.0",