@naturali/sdk 0.144.1 → 0.146.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) {
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
  */
@@ -7496,7 +7496,7 @@ type UserBilling = {
7496
7496
  */
7497
7497
  retention_days: number | null;
7498
7498
  /**
7499
- * Model credit left, in US dollars — granted and purchased credit plus the plan's monthly allowance, less managed-model spend. A managed generation is refused while this is negative; a zero balance still generates, and the generation that crosses zero is absorbed. Only as current as `spend_reconciled_at`, so read the two together.
7499
+ * Model credit left, in US dollars — granted and purchased credit plus the plan's monthly allowance, less managed-model and embedding spend. Managed generations and writes that embed are refused while this is negative; zero is not. Only as current as `spend_reconciled_at`, so read the two together.
7500
7500
  */
7501
7501
  credit_balance_usd: number;
7502
7502
  /**
@@ -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>;
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
  */
@@ -7496,7 +7496,7 @@ type UserBilling = {
7496
7496
  */
7497
7497
  retention_days: number | null;
7498
7498
  /**
7499
- * Model credit left, in US dollars — granted and purchased credit plus the plan's monthly allowance, less managed-model spend. A managed generation is refused while this is negative; a zero balance still generates, and the generation that crosses zero is absorbed. Only as current as `spend_reconciled_at`, so read the two together.
7499
+ * Model credit left, in US dollars — granted and purchased credit plus the plan's monthly allowance, less managed-model and embedding spend. Managed generations and writes that embed are refused while this is negative; zero is not. Only as current as `spend_reconciled_at`, so read the two together.
7500
7500
  */
7501
7501
  credit_balance_usd: number;
7502
7502
  /**
@@ -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>;
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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturali/sdk",
3
- "version": "0.144.1",
3
+ "version": "0.146.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.144.1",
34
+ "@naturali/api": "0.146.0",
35
35
  "@ttoss/openapi-codegen": "^0.3.1",
36
36
  "@types/node": "^26.5.1",
37
37
  "tsdown": "^0.23.0",