@naturali/sdk 0.145.0 → 0.147.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 CHANGED
@@ -3079,7 +3079,7 @@ var Guardrails = class {
3079
3079
  /**
3080
3080
  * Dry-run evaluate a guardrail
3081
3081
  *
3082
- * Runs the full evaluation pipeline — the `class` expression, the guard, the context tool per `context_mode`, live `runtime.*` resolution — against caller-supplied `args` and `guardrail_context`, and returns the exact `guardrail_evaluation` record a real call would produce. Nothing executes, no approval item is filed, and no activity entry is written. This is the adoption path: preview a document's decisions against production-shaped calls before attaching it — or before editing a widely-attached one. Pass an optional `tool_id` to resolve `runtime.tool.*`.
3082
+ * Runs the full evaluation pipeline — the `class` expression, the guard, the context tool per `context_mode`, live `runtime.*` resolution — against caller-supplied `args` and `guardrail_context`, and returns the exact `guardrail_evaluation` record a real call would produce. Nothing executes, no approval item is filed, and no activity entry is written. This is the adoption path: preview a document's decisions against production-shaped calls before attaching it — or before editing a widely-attached one. Pass an optional `tool_id` to resolve `runtime.tools.*`.
3083
3083
  *
3084
3084
  */
3085
3085
  static evaluateGuardrail(options) {
@@ -4904,11 +4904,11 @@ var Users = class {
4904
4904
  /**
4905
4905
  * Get the current account's runs this billing cycle
4906
4906
  *
4907
- * How many runs the account has made this billing cycle, and how many its plan includes. A **run is one agent generation** — the unit every rung is priced in.
4907
+ * How many runs the account has made this billing cycle, and how many its plan includes. A **run is one agent generation or one tool call** — the unit every rung is priced in. Every tool call counts, including those an agent makes inside a generation; a `client` tool counts nothing.
4908
4908
  *
4909
4909
  * Counted across the projects this account is the billing owner of, over the current UTC calendar month, from the meter itself. Archived projects are included: the runs they already made were made.
4910
4910
  *
4911
- * **On the `free` plan the allowance is enforced.** An account that has used it is refused `403 plan_limit_reached` with `resource: "runs"` on everything that starts a generation — on its own provider credential as much as on a managed model, because a run is a run — until the billing month turns or it upgrades. On `pro` and `business` nothing is refused: runs past the allowance are billed at the overage rate those plans are sold with. A contract plan is not counted.
4911
+ * **On the `free` plan the allowance is enforced.** An account that has used it is refused `403 plan_limit_reached` with `resource: "runs"` on everything that starts a generation and on a direct tool call — on its own provider credential as much as on a managed model, because a run is a run — until the billing month turns or it upgrades. On `pro` and `business` nothing is refused: runs past the allowance are billed at the overage rate those plans are sold with. A contract plan is not counted.
4912
4912
  *
4913
4913
  * The other thing that stops a managed-model generation is a negative credit balance, which is `GET /v1/users/me/billing`, and it never applies to your own credential.
4914
4914
  *
package/dist/index.d.cts CHANGED
@@ -4180,7 +4180,7 @@ type QuotaResourceProperties = {
4180
4180
  /**
4181
4181
  * Only for metric cost_usd. The meter this cap answers for; omit it and the cap sums every priced meter. See the quotas REST contract.
4182
4182
  */
4183
- meter_type?: 'llm_tokens' | 'compute_execution' | 'api_request' | 'storage';
4183
+ meter_type?: 'llm_tokens' | 'compute_execution' | 'api_request' | 'storage' | 'tool_execution';
4184
4184
  };
4185
4185
  /**
4186
4186
  * Creates a guardrail — an action-class document (`class`/`guard`) that gates tool-call autonomy. Attach it to a tool or agent via that resource's `guardrail_ids` (a `{ "ref": … }` to this resource in the same template resolves to its physical id at deploy time). Mirrors the guardrails REST contract; `class`/`default_class`/`guard`/`escalate` are flattened here from the REST API's single `document` object.
@@ -6388,7 +6388,7 @@ type ProjectUsageEvent = {
6388
6388
  */
6389
6389
  action_id?: string | null;
6390
6390
  /**
6391
- * llm_tokens, compute_execution, api_request or storage.
6391
+ * llm_tokens, compute_execution, api_request, storage or tool_execution.
6392
6392
  */
6393
6393
  meter_type: string;
6394
6394
  /**
@@ -6633,7 +6633,7 @@ type Quota = {
6633
6633
  /**
6634
6634
  * The meter a cost_usd cap answers for. Null is every priced meter, which is what a quota created without one carries.
6635
6635
  */
6636
- meter_type?: 'llm_tokens' | 'compute_execution' | 'api_request' | 'storage' | null;
6636
+ meter_type?: 'llm_tokens' | 'compute_execution' | 'api_request' | 'storage' | 'tool_execution' | null;
6637
6637
  /**
6638
6638
  * Pricing posture of a cost_usd quota over an unpriced blackout — block refuses generations, allow lets them through (the quota_unpriced exception is filed either way, and for a partly priced window, which no posture refuses). Null for metrics with no pricing dependency.
6639
6639
  */
@@ -8008,7 +8008,7 @@ type OrchestrationId = string;
8008
8008
  */
8009
8009
  type OrchestrationRunId = string;
8010
8010
  /**
8011
- * Narrow the rollup to one meter type (llm_tokens, compute_execution, api_request, storage). Omit to include every meter. Useful with group_by=model, whose dimension otherwise mixes model ids with platform SKUs. An unrecognized value yields an empty rollup, not an error.
8011
+ * Narrow the rollup to one meter type (llm_tokens, compute_execution, api_request, storage, tool_execution). Omit to include every meter. Useful with group_by=model, whose dimension otherwise mixes model ids with platform SKUs. An unrecognized value yields an empty rollup, not an error.
8012
8012
  *
8013
8013
  */
8014
8014
  type UsageMeterType = string;
@@ -15830,7 +15830,7 @@ type EvaluateGuardrailData = {
15830
15830
  [key: string]: unknown;
15831
15831
  };
15832
15832
  /**
15833
- * Optional tool to resolve `runtime.tool.*` against.
15833
+ * Optional tool to resolve `runtime.tools.*` against.
15834
15834
  */
15835
15835
  tool_id?: string;
15836
15836
  };
@@ -19109,7 +19109,7 @@ type GetProjectUsageData = {
19109
19109
  */
19110
19110
  group_by?: 'model' | 'ai_provider' | 'agent' | 'run' | 'day' | 'meter_type' | 'actor' | 'session' | 'source';
19111
19111
  /**
19112
- * Narrow the rollup to one meter type (llm_tokens, compute_execution, api_request, storage). Omit to include every meter. Useful with group_by=model, whose dimension otherwise mixes model ids with platform SKUs. An unrecognized value yields an empty rollup, not an error.
19112
+ * Narrow the rollup to one meter type (llm_tokens, compute_execution, api_request, storage, tool_execution). Omit to include every meter. Useful with group_by=model, whose dimension otherwise mixes model ids with platform SKUs. An unrecognized value yields an empty rollup, not an error.
19113
19113
  *
19114
19114
  */
19115
19115
  meter_type?: string;
@@ -19219,7 +19219,7 @@ type ListProjectUsageEventsData = {
19219
19219
  };
19220
19220
  query?: {
19221
19221
  /**
19222
- * Narrow the rollup to one meter type (llm_tokens, compute_execution, api_request, storage). Omit to include every meter. Useful with group_by=model, whose dimension otherwise mixes model ids with platform SKUs. An unrecognized value yields an empty rollup, not an error.
19222
+ * Narrow the rollup to one meter type (llm_tokens, compute_execution, api_request, storage, tool_execution). Omit to include every meter. Useful with group_by=model, whose dimension otherwise mixes model ids with platform SKUs. An unrecognized value yields an empty rollup, not an error.
19223
19223
  *
19224
19224
  */
19225
19225
  meter_type?: string;
@@ -19542,7 +19542,7 @@ type CreateQuotaData = {
19542
19542
  /**
19543
19543
  * Only for metric cost_usd (400 on any other metric). The meter this cap answers for. Omit it and the cap sums every priced meter, which is the existing behaviour; name one and only that meter's cost counts, so an AI spend cap is not consumed by platform meters the operator prices (and vice versa). Part of the quota's identity, so two meter scopes can share a scope/metric/window and neither conflicts with an unscoped cap. Immutable after creation — replace the quota to change it.
19544
19544
  */
19545
- meter_type?: 'llm_tokens' | 'compute_execution' | 'api_request' | 'storage';
19545
+ meter_type?: 'llm_tokens' | 'compute_execution' | 'api_request' | 'storage' | 'tool_execution';
19546
19546
  };
19547
19547
  path: {
19548
19548
  /**
@@ -23679,7 +23679,7 @@ export declare class Guardrails {
23679
23679
  /**
23680
23680
  * Dry-run evaluate a guardrail
23681
23681
  *
23682
- * Runs the full evaluation pipeline — the `class` expression, the guard, the context tool per `context_mode`, live `runtime.*` resolution — against caller-supplied `args` and `guardrail_context`, and returns the exact `guardrail_evaluation` record a real call would produce. Nothing executes, no approval item is filed, and no activity entry is written. This is the adoption path: preview a document's decisions against production-shaped calls before attaching it — or before editing a widely-attached one. Pass an optional `tool_id` to resolve `runtime.tool.*`.
23682
+ * Runs the full evaluation pipeline — the `class` expression, the guard, the context tool per `context_mode`, live `runtime.*` resolution — against caller-supplied `args` and `guardrail_context`, and returns the exact `guardrail_evaluation` record a real call would produce. Nothing executes, no approval item is filed, and no activity entry is written. This is the adoption path: preview a document's decisions against production-shaped calls before attaching it — or before editing a widely-attached one. Pass an optional `tool_id` to resolve `runtime.tools.*`.
23683
23683
  *
23684
23684
  */
23685
23685
  static evaluateGuardrail<ThrowOnError extends boolean = false>(options: Options<EvaluateGuardrailData, ThrowOnError>): RequestResult<EvaluateGuardrailResponses, EvaluateGuardrailErrors, ThrowOnError>;
@@ -24620,11 +24620,11 @@ export declare class Users {
24620
24620
  /**
24621
24621
  * Get the current account's runs this billing cycle
24622
24622
  *
24623
- * How many runs the account has made this billing cycle, and how many its plan includes. A **run is one agent generation** — the unit every rung is priced in.
24623
+ * How many runs the account has made this billing cycle, and how many its plan includes. A **run is one agent generation or one tool call** — the unit every rung is priced in. Every tool call counts, including those an agent makes inside a generation; a `client` tool counts nothing.
24624
24624
  *
24625
24625
  * Counted across the projects this account is the billing owner of, over the current UTC calendar month, from the meter itself. Archived projects are included: the runs they already made were made.
24626
24626
  *
24627
- * **On the `free` plan the allowance is enforced.** An account that has used it is refused `403 plan_limit_reached` with `resource: "runs"` on everything that starts a generation — on its own provider credential as much as on a managed model, because a run is a run — until the billing month turns or it upgrades. On `pro` and `business` nothing is refused: runs past the allowance are billed at the overage rate those plans are sold with. A contract plan is not counted.
24627
+ * **On the `free` plan the allowance is enforced.** An account that has used it is refused `403 plan_limit_reached` with `resource: "runs"` on everything that starts a generation and on a direct tool call — on its own provider credential as much as on a managed model, because a run is a run — until the billing month turns or it upgrades. On `pro` and `business` nothing is refused: runs past the allowance are billed at the overage rate those plans are sold with. A contract plan is not counted.
24628
24628
  *
24629
24629
  * The other thing that stops a managed-model generation is a negative credit balance, which is `GET /v1/users/me/billing`, and it never applies to your own credential.
24630
24630
  *
package/dist/index.d.mts CHANGED
@@ -4180,7 +4180,7 @@ type QuotaResourceProperties = {
4180
4180
  /**
4181
4181
  * Only for metric cost_usd. The meter this cap answers for; omit it and the cap sums every priced meter. See the quotas REST contract.
4182
4182
  */
4183
- meter_type?: 'llm_tokens' | 'compute_execution' | 'api_request' | 'storage';
4183
+ meter_type?: 'llm_tokens' | 'compute_execution' | 'api_request' | 'storage' | 'tool_execution';
4184
4184
  };
4185
4185
  /**
4186
4186
  * Creates a guardrail — an action-class document (`class`/`guard`) that gates tool-call autonomy. Attach it to a tool or agent via that resource's `guardrail_ids` (a `{ "ref": … }` to this resource in the same template resolves to its physical id at deploy time). Mirrors the guardrails REST contract; `class`/`default_class`/`guard`/`escalate` are flattened here from the REST API's single `document` object.
@@ -6388,7 +6388,7 @@ type ProjectUsageEvent = {
6388
6388
  */
6389
6389
  action_id?: string | null;
6390
6390
  /**
6391
- * llm_tokens, compute_execution, api_request or storage.
6391
+ * llm_tokens, compute_execution, api_request, storage or tool_execution.
6392
6392
  */
6393
6393
  meter_type: string;
6394
6394
  /**
@@ -6633,7 +6633,7 @@ type Quota = {
6633
6633
  /**
6634
6634
  * The meter a cost_usd cap answers for. Null is every priced meter, which is what a quota created without one carries.
6635
6635
  */
6636
- meter_type?: 'llm_tokens' | 'compute_execution' | 'api_request' | 'storage' | null;
6636
+ meter_type?: 'llm_tokens' | 'compute_execution' | 'api_request' | 'storage' | 'tool_execution' | null;
6637
6637
  /**
6638
6638
  * Pricing posture of a cost_usd quota over an unpriced blackout — block refuses generations, allow lets them through (the quota_unpriced exception is filed either way, and for a partly priced window, which no posture refuses). Null for metrics with no pricing dependency.
6639
6639
  */
@@ -8008,7 +8008,7 @@ type OrchestrationId = string;
8008
8008
  */
8009
8009
  type OrchestrationRunId = string;
8010
8010
  /**
8011
- * Narrow the rollup to one meter type (llm_tokens, compute_execution, api_request, storage). Omit to include every meter. Useful with group_by=model, whose dimension otherwise mixes model ids with platform SKUs. An unrecognized value yields an empty rollup, not an error.
8011
+ * Narrow the rollup to one meter type (llm_tokens, compute_execution, api_request, storage, tool_execution). Omit to include every meter. Useful with group_by=model, whose dimension otherwise mixes model ids with platform SKUs. An unrecognized value yields an empty rollup, not an error.
8012
8012
  *
8013
8013
  */
8014
8014
  type UsageMeterType = string;
@@ -15830,7 +15830,7 @@ type EvaluateGuardrailData = {
15830
15830
  [key: string]: unknown;
15831
15831
  };
15832
15832
  /**
15833
- * Optional tool to resolve `runtime.tool.*` against.
15833
+ * Optional tool to resolve `runtime.tools.*` against.
15834
15834
  */
15835
15835
  tool_id?: string;
15836
15836
  };
@@ -19109,7 +19109,7 @@ type GetProjectUsageData = {
19109
19109
  */
19110
19110
  group_by?: 'model' | 'ai_provider' | 'agent' | 'run' | 'day' | 'meter_type' | 'actor' | 'session' | 'source';
19111
19111
  /**
19112
- * Narrow the rollup to one meter type (llm_tokens, compute_execution, api_request, storage). Omit to include every meter. Useful with group_by=model, whose dimension otherwise mixes model ids with platform SKUs. An unrecognized value yields an empty rollup, not an error.
19112
+ * Narrow the rollup to one meter type (llm_tokens, compute_execution, api_request, storage, tool_execution). Omit to include every meter. Useful with group_by=model, whose dimension otherwise mixes model ids with platform SKUs. An unrecognized value yields an empty rollup, not an error.
19113
19113
  *
19114
19114
  */
19115
19115
  meter_type?: string;
@@ -19219,7 +19219,7 @@ type ListProjectUsageEventsData = {
19219
19219
  };
19220
19220
  query?: {
19221
19221
  /**
19222
- * Narrow the rollup to one meter type (llm_tokens, compute_execution, api_request, storage). Omit to include every meter. Useful with group_by=model, whose dimension otherwise mixes model ids with platform SKUs. An unrecognized value yields an empty rollup, not an error.
19222
+ * Narrow the rollup to one meter type (llm_tokens, compute_execution, api_request, storage, tool_execution). Omit to include every meter. Useful with group_by=model, whose dimension otherwise mixes model ids with platform SKUs. An unrecognized value yields an empty rollup, not an error.
19223
19223
  *
19224
19224
  */
19225
19225
  meter_type?: string;
@@ -19542,7 +19542,7 @@ type CreateQuotaData = {
19542
19542
  /**
19543
19543
  * Only for metric cost_usd (400 on any other metric). The meter this cap answers for. Omit it and the cap sums every priced meter, which is the existing behaviour; name one and only that meter's cost counts, so an AI spend cap is not consumed by platform meters the operator prices (and vice versa). Part of the quota's identity, so two meter scopes can share a scope/metric/window and neither conflicts with an unscoped cap. Immutable after creation — replace the quota to change it.
19544
19544
  */
19545
- meter_type?: 'llm_tokens' | 'compute_execution' | 'api_request' | 'storage';
19545
+ meter_type?: 'llm_tokens' | 'compute_execution' | 'api_request' | 'storage' | 'tool_execution';
19546
19546
  };
19547
19547
  path: {
19548
19548
  /**
@@ -23679,7 +23679,7 @@ export declare class Guardrails {
23679
23679
  /**
23680
23680
  * Dry-run evaluate a guardrail
23681
23681
  *
23682
- * Runs the full evaluation pipeline — the `class` expression, the guard, the context tool per `context_mode`, live `runtime.*` resolution — against caller-supplied `args` and `guardrail_context`, and returns the exact `guardrail_evaluation` record a real call would produce. Nothing executes, no approval item is filed, and no activity entry is written. This is the adoption path: preview a document's decisions against production-shaped calls before attaching it — or before editing a widely-attached one. Pass an optional `tool_id` to resolve `runtime.tool.*`.
23682
+ * Runs the full evaluation pipeline — the `class` expression, the guard, the context tool per `context_mode`, live `runtime.*` resolution — against caller-supplied `args` and `guardrail_context`, and returns the exact `guardrail_evaluation` record a real call would produce. Nothing executes, no approval item is filed, and no activity entry is written. This is the adoption path: preview a document's decisions against production-shaped calls before attaching it — or before editing a widely-attached one. Pass an optional `tool_id` to resolve `runtime.tools.*`.
23683
23683
  *
23684
23684
  */
23685
23685
  static evaluateGuardrail<ThrowOnError extends boolean = false>(options: Options<EvaluateGuardrailData, ThrowOnError>): RequestResult<EvaluateGuardrailResponses, EvaluateGuardrailErrors, ThrowOnError>;
@@ -24620,11 +24620,11 @@ export declare class Users {
24620
24620
  /**
24621
24621
  * Get the current account's runs this billing cycle
24622
24622
  *
24623
- * How many runs the account has made this billing cycle, and how many its plan includes. A **run is one agent generation** — the unit every rung is priced in.
24623
+ * How many runs the account has made this billing cycle, and how many its plan includes. A **run is one agent generation or one tool call** — the unit every rung is priced in. Every tool call counts, including those an agent makes inside a generation; a `client` tool counts nothing.
24624
24624
  *
24625
24625
  * Counted across the projects this account is the billing owner of, over the current UTC calendar month, from the meter itself. Archived projects are included: the runs they already made were made.
24626
24626
  *
24627
- * **On the `free` plan the allowance is enforced.** An account that has used it is refused `403 plan_limit_reached` with `resource: "runs"` on everything that starts a generation — on its own provider credential as much as on a managed model, because a run is a run — until the billing month turns or it upgrades. On `pro` and `business` nothing is refused: runs past the allowance are billed at the overage rate those plans are sold with. A contract plan is not counted.
24627
+ * **On the `free` plan the allowance is enforced.** An account that has used it is refused `403 plan_limit_reached` with `resource: "runs"` on everything that starts a generation and on a direct tool call — on its own provider credential as much as on a managed model, because a run is a run — until the billing month turns or it upgrades. On `pro` and `business` nothing is refused: runs past the allowance are billed at the overage rate those plans are sold with. A contract plan is not counted.
24628
24628
  *
24629
24629
  * The other thing that stops a managed-model generation is a negative credit balance, which is `GET /v1/users/me/billing`, and it never applies to your own credential.
24630
24630
  *
package/dist/index.mjs CHANGED
@@ -3078,7 +3078,7 @@ var Guardrails = class {
3078
3078
  /**
3079
3079
  * Dry-run evaluate a guardrail
3080
3080
  *
3081
- * Runs the full evaluation pipeline — the `class` expression, the guard, the context tool per `context_mode`, live `runtime.*` resolution — against caller-supplied `args` and `guardrail_context`, and returns the exact `guardrail_evaluation` record a real call would produce. Nothing executes, no approval item is filed, and no activity entry is written. This is the adoption path: preview a document's decisions against production-shaped calls before attaching it — or before editing a widely-attached one. Pass an optional `tool_id` to resolve `runtime.tool.*`.
3081
+ * Runs the full evaluation pipeline — the `class` expression, the guard, the context tool per `context_mode`, live `runtime.*` resolution — against caller-supplied `args` and `guardrail_context`, and returns the exact `guardrail_evaluation` record a real call would produce. Nothing executes, no approval item is filed, and no activity entry is written. This is the adoption path: preview a document's decisions against production-shaped calls before attaching it — or before editing a widely-attached one. Pass an optional `tool_id` to resolve `runtime.tools.*`.
3082
3082
  *
3083
3083
  */
3084
3084
  static evaluateGuardrail(options) {
@@ -4903,11 +4903,11 @@ var Users = class {
4903
4903
  /**
4904
4904
  * Get the current account's runs this billing cycle
4905
4905
  *
4906
- * How many runs the account has made this billing cycle, and how many its plan includes. A **run is one agent generation** — the unit every rung is priced in.
4906
+ * How many runs the account has made this billing cycle, and how many its plan includes. A **run is one agent generation or one tool call** — the unit every rung is priced in. Every tool call counts, including those an agent makes inside a generation; a `client` tool counts nothing.
4907
4907
  *
4908
4908
  * Counted across the projects this account is the billing owner of, over the current UTC calendar month, from the meter itself. Archived projects are included: the runs they already made were made.
4909
4909
  *
4910
- * **On the `free` plan the allowance is enforced.** An account that has used it is refused `403 plan_limit_reached` with `resource: "runs"` on everything that starts a generation — on its own provider credential as much as on a managed model, because a run is a run — until the billing month turns or it upgrades. On `pro` and `business` nothing is refused: runs past the allowance are billed at the overage rate those plans are sold with. A contract plan is not counted.
4910
+ * **On the `free` plan the allowance is enforced.** An account that has used it is refused `403 plan_limit_reached` with `resource: "runs"` on everything that starts a generation and on a direct tool call — on its own provider credential as much as on a managed model, because a run is a run — until the billing month turns or it upgrades. On `pro` and `business` nothing is refused: runs past the allowance are billed at the overage rate those plans are sold with. A contract plan is not counted.
4911
4911
  *
4912
4912
  * The other thing that stops a managed-model generation is a negative credit balance, which is `GET /v1/users/me/billing`, and it never applies to your own credential.
4913
4913
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturali/sdk",
3
- "version": "0.145.0",
3
+ "version": "0.147.0",
4
4
  "description": "TypeScript SDK for the naturali.ai API, generated from its OpenAPI specs",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -31,7 +31,7 @@
31
31
  },
32
32
  "devDependencies": {
33
33
  "@hey-api/openapi-ts": "^0.99.0",
34
- "@naturali/api": "0.145.0",
34
+ "@naturali/api": "0.147.0",
35
35
  "@ttoss/openapi-codegen": "^0.3.1",
36
36
  "@types/node": "^26.5.1",
37
37
  "tsdown": "^0.23.0",