@naturali/sdk 0.116.0 → 0.118.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
@@ -1319,7 +1319,14 @@ var AiProviders = class {
1319
1319
  /**
1320
1320
  * Create an AI provider
1321
1321
  *
1322
- * Creates a new LLM provider configuration
1322
+ * Creates a new LLM provider configuration.
1323
+ *
1324
+ * A `bedrock` or `vertex` record must carry a credential of its own — a
1325
+ * linked `secret_id`, or an `apiKey` in `config`. Without one the provider
1326
+ * SDK signs with the server's own credentials (the AWS default credential
1327
+ * chain, Google Application Default Credentials), which is refused with
1328
+ * `400 VALIDATION_FAILED` unless the deployment allows it.
1329
+ *
1323
1330
  */
1324
1331
  static createAiProvider(options) {
1325
1332
  return (options.client ?? client).post({
@@ -1377,7 +1384,7 @@ var AiProviders = class {
1377
1384
  * 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.
1378
1385
  * 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.
1379
1386
  * 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`.
1380
- * 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 when there is one — IAM keys or a Bedrock API key, a Google service-account key and otherwise fall back to the server environment (the AWS default credential chain, Google Application Default Credentials), so a record with no `secret_id` can still list.
1387
+ * 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.
1381
1388
  * 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`.
1382
1389
  * 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.
1383
1390
  *
@@ -3359,7 +3366,7 @@ var Orchestrations = class {
3359
3366
  /**
3360
3367
  * List orchestration runs
3361
3368
  *
3362
- * Returns orchestration runs the caller can access, optionally filtered by orchestration, by parent run, or by whether the run has a parent at all.
3369
+ * Returns orchestration runs the caller can access, optionally filtered by orchestration, by parent run, by status, or by whether the run has a parent at all.
3363
3370
  *
3364
3371
  * Note when aggregating: a run's `usage` covers its whole subtree, so summing it over a list that contains both a parent and its children counts the children more than once. Pass `nested=false` to sum over runs a caller started.
3365
3372
  */
@@ -3574,7 +3581,9 @@ var Quotas = class {
3574
3581
  /**
3575
3582
  * Create a quota
3576
3583
  *
3577
- * Creates a project-scoped quota. `requests` is valid for `scope: project`/`api_key`; `tokens` and `cost_usd` are valid for `scope: project`/`agent`/`actor`. Any other scope/metric pair is rejected with 400 (no attribution exists to enforce it). An `actor` quota caps one end user's spend, matched from the generation's session; a null `scope_ref` means one budget *per* actor rather than a pooled project total. A duplicate quota (same project, scope, scope_ref, metric, window) is rejected with 409.
3584
+ * Creates a project-scoped quota. `requests` is valid for `scope: project`/`api_key`; `tokens` and `cost_usd` are valid for `scope: project`/`agent`/`actor`; `storage_bytes` is valid for `scope: project` only. Any other scope/metric pair is rejected with 400 (no attribution exists to enforce it). An `actor` quota caps one end user's spend, matched from the generation's session; a null `scope_ref` means one budget *per* actor rather than a pooled project total. A `cost_usd` quota may name one `meter_type` to cap; omitting it caps every priced meter. A duplicate quota (same project, scope, scope_ref, metric, window, meter_type) is rejected with 409.
3585
+ *
3586
+ * `storage_bytes` caps a stored total rather than a windowed one, so it takes `window: current` and every other metric refuses that value (400 either way). It is enforced at the corpus write paths — file upload and create, document create, document ingest and re-ingest, memory-entry create — with `409 QUOTA_STORAGE_EXCEEDED` and no `Retry-After`, since no window reset clears a footprint.
3578
3587
  */
3579
3588
  static createQuota(options) {
3580
3589
  return (options.client ?? client).post({
@@ -3881,7 +3890,7 @@ var Tasks = class {
3881
3890
  /**
3882
3891
  * List tasks
3883
3892
  *
3884
- * Lists tasks (the board query). Filter by workflow, state, status, or assignee — `GET /tasks?workflow_id=...&state=...` is one board column.
3893
+ * Lists tasks (the board query). Filter by workflow, state, status, automation status, or assignee — `GET /tasks?workflow_id=...&state=...` is one board column.
3885
3894
  */
3886
3895
  static listTasks(options) {
3887
3896
  return (options.client ?? client).get({
package/dist/index.d.cts CHANGED
@@ -3605,7 +3605,7 @@ type WorkflowResourceProperties = {
3605
3605
  } | null;
3606
3606
  };
3607
3607
  /**
3608
- * Creates a quota — a project-scoped cap that blocks (`enforce`) or reports (`monitor`) when a windowed aggregate is exceeded. `requests` quotas are enforced by the request middleware; `tokens`/`cost_usd` quotas at the pre-generation check. Mirrors the quotas REST contract; `scope`, `metric`, and `window` are immutable after creation (only `limit`, `mode`, and `on_unpriced` update).
3608
+ * Creates a quota — a project-scoped cap that blocks (`enforce`) or reports (`monitor`) when a windowed aggregate is exceeded. `requests` quotas are enforced by the request middleware; `tokens`/`cost_usd` quotas at the pre-generation check. Mirrors the quotas REST contract; `scope`, `metric`, `window`, and `meter_type` are immutable after creation (only `limit`, `mode`, and `on_unpriced` update).
3609
3609
  */
3610
3610
  type QuotaResourceProperties = {
3611
3611
  /**
@@ -3619,13 +3619,13 @@ type QuotaResourceProperties = {
3619
3619
  /**
3620
3620
  * The metric being capped
3621
3621
  */
3622
- metric: 'requests' | 'tokens' | 'cost_usd';
3622
+ metric: 'requests' | 'tokens' | 'cost_usd' | 'storage_bytes';
3623
3623
  /**
3624
- * The window over which the metric is aggregated
3624
+ * The window over which the metric is aggregated. storage_bytes caps a stored total rather than a windowed one, so it takes current and refuses every other value; current is refused for every other metric.
3625
3625
  */
3626
- window: 'rolling_1m' | 'rolling_1h' | 'rolling_24h' | 'calendar_month';
3626
+ window: 'rolling_1m' | 'rolling_1h' | 'rolling_24h' | 'calendar_month' | 'current';
3627
3627
  /**
3628
- * The cap. Positive integer for requests/tokens; fractional allowed for cost_usd.
3628
+ * The cap. Positive integer for requests/tokens/storage_bytes (bytes); fractional allowed for cost_usd.
3629
3629
  */
3630
3630
  limit: number;
3631
3631
  /**
@@ -3636,6 +3636,10 @@ type QuotaResourceProperties = {
3636
3636
  * Only for metric cost_usd. What an enforce quota does over a pricing blackout — block (the default) refuses generations with 409 QUOTA_UNENFORCEABLE, allow accepts the unmeasurable spend. See the quotas REST contract.
3637
3637
  */
3638
3638
  on_unpriced?: 'block' | 'allow';
3639
+ /**
3640
+ * 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.
3641
+ */
3642
+ meter_type?: 'llm_tokens' | 'compute_execution' | 'api_request' | 'storage';
3639
3643
  };
3640
3644
  /**
3641
3645
  * 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.
@@ -5497,16 +5501,23 @@ type Quota = {
5497
5501
  * Public id of the api key / agent / actor the quota applies to. For `api_key` and `agent` scope, NULL means all entities of that scope type in the project. For `actor` scope, NULL means one budget *per* actor rather than a pooled total across all actors.
5498
5502
  */
5499
5503
  scope_ref?: string | null;
5500
- metric?: 'requests' | 'tokens' | 'cost_usd';
5501
- window?: 'rolling_1m' | 'rolling_1h' | 'rolling_24h' | 'calendar_month';
5504
+ metric?: 'requests' | 'tokens' | 'cost_usd' | 'storage_bytes';
5505
+ /**
5506
+ * The window the metric is aggregated over; `current` on storage_bytes, which caps a stored total and never resets.
5507
+ */
5508
+ window?: 'rolling_1m' | 'rolling_1h' | 'rolling_24h' | 'calendar_month' | 'current';
5502
5509
  limit?: number;
5503
5510
  mode?: 'enforce' | 'monitor';
5511
+ /**
5512
+ * The meter a cost_usd cap answers for. Null is every priced meter, which is what a quota created without one carries.
5513
+ */
5514
+ meter_type?: 'llm_tokens' | 'compute_execution' | 'api_request' | 'storage' | null;
5504
5515
  /**
5505
5516
  * 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.
5506
5517
  */
5507
5518
  on_unpriced?: 'block' | 'allow' | null;
5508
5519
  /**
5509
- * Current fixed-window usage for the requests metric. Null for token/cost quotas (which aggregate the usage meter at check time rather than keeping a counter) and in list responses.
5520
+ * Current fixed-window usage for the requests metric. Null for token/cost quotas (which aggregate the usage meter at check time rather than keeping a counter), null for storage_bytes (a stored total has no window and no counter — read the footprint from the storage meter), and null in list responses.
5510
5521
  */
5511
5522
  current_usage?: {
5512
5523
  window_key?: string;
@@ -8322,7 +8333,7 @@ type CreateAiProviderData = {
8322
8333
  */
8323
8334
  default_model: string;
8324
8335
  /**
8325
- * Secret ID containing API credentials
8336
+ * Secret ID containing API credentials. Required for `bedrock` and `vertex` unless `config.apiKey` carries one.
8326
8337
  */
8327
8338
  secret_id?: string;
8328
8339
  /**
@@ -10976,6 +10987,10 @@ type CreateDocumentErrors = {
10976
10987
  * Forbidden
10977
10988
  */
10978
10989
  403: ErrorResponse;
10990
+ /**
10991
+ * The project's `storage_bytes` quota is exceeded (`QUOTA_STORAGE_EXCEEDED`). Delete stored content, or raise the quota — no window reset clears a stored total, so no `Retry-After` is sent.
10992
+ */
10993
+ 409: ErrorResponse;
10979
10994
  };
10980
10995
  type CreateDocumentError = CreateDocumentErrors[keyof CreateDocumentErrors];
10981
10996
  type CreateDocumentResponses = {
@@ -11042,7 +11057,7 @@ type IngestDocumentErrors = {
11042
11057
  */
11043
11058
  403: ErrorResponse;
11044
11059
  /**
11045
- * The file already backs a Document (a file can only be ingested once). Use `POST /documents/{document_id}/ingest` to re-process the existing document, or upload a new copy of the file to ingest it separately.
11060
+ * The file already backs a Document (a file can only be ingested once use `POST /documents/{document_id}/ingest` to re-process the existing document, or upload a new copy of the file to ingest it separately), or the project's `storage_bytes` quota is exceeded (`QUOTA_STORAGE_EXCEEDED`; delete stored content or raise the quota — no `Retry-After` is sent, since no window reset clears a stored total).
11046
11061
  */
11047
11062
  409: ErrorResponse;
11048
11063
  /**
@@ -11281,6 +11296,10 @@ type ReingestDocumentErrors = {
11281
11296
  * Document not found
11282
11297
  */
11283
11298
  404: ErrorResponse;
11299
+ /**
11300
+ * The project's `storage_bytes` quota is exceeded (`QUOTA_STORAGE_EXCEEDED`). Delete stored content, or raise the quota — no window reset clears a stored total, so no `Retry-After` is sent.
11301
+ */
11302
+ 409: ErrorResponse;
11284
11303
  /**
11285
11304
  * The file is too large to re-ingest synchronously (`?wait=true`). Retry in background mode.
11286
11305
  */
@@ -11773,6 +11792,10 @@ type CreateDatasetItemErrors = {
11773
11792
  * Dataset not found
11774
11793
  */
11775
11794
  404: unknown;
11795
+ /**
11796
+ * The project's `storage_bytes` quota is exceeded (`QUOTA_STORAGE_EXCEEDED`). A fixture is a corpus write like a document, so it is bounded by the same cap; delete stored content or raise the quota — no `Retry-After` is sent, since no window reset clears a stored total.
11797
+ */
11798
+ 409: unknown;
11776
11799
  };
11777
11800
  type CreateDatasetItemResponses = {
11778
11801
  /**
@@ -11829,7 +11852,7 @@ type CreateDatasetItemFromGenerationErrors = {
11829
11852
  */
11830
11853
  404: unknown;
11831
11854
  /**
11832
- * The generation has not completed, or its content was never stored or has been purged
11855
+ * The generation has not completed, its content was never stored or has been purged, or the project's `storage_bytes` quota is exceeded (`QUOTA_STORAGE_EXCEEDED`; delete stored content or raise the quota — no `Retry-After` is sent, since no window reset clears a stored total)
11833
11856
  */
11834
11857
  409: unknown;
11835
11858
  };
@@ -12674,6 +12697,10 @@ type CreateFileData = {
12674
12697
  url: '/v1/projects/{project_id}/files';
12675
12698
  };
12676
12699
  type CreateFileErrors = {
12700
+ /**
12701
+ * The project's `storage_bytes` quota is exceeded (`QUOTA_STORAGE_EXCEEDED`). Delete stored content, or raise the quota — no window reset clears a stored total, so no `Retry-After` is sent.
12702
+ */
12703
+ 409: ErrorResponse;
12677
12704
  /**
12678
12705
  * Internal server error
12679
12706
  */
@@ -12733,6 +12760,10 @@ type UploadFileErrors = {
12733
12760
  *
12734
12761
  */
12735
12762
  403: ErrorResponse;
12763
+ /**
12764
+ * The project's `storage_bytes` quota is exceeded (`QUOTA_STORAGE_EXCEEDED`). Delete stored content, or raise the quota — no window reset clears a stored total, so no `Retry-After` is sent.
12765
+ */
12766
+ 409: ErrorResponse;
12736
12767
  };
12737
12768
  type UploadFileError = UploadFileErrors[keyof UploadFileErrors];
12738
12769
  type UploadFileResponses = {
@@ -12767,6 +12798,10 @@ type UploadFileBase64Errors = {
12767
12798
  *
12768
12799
  */
12769
12800
  403: ErrorResponse;
12801
+ /**
12802
+ * The project's `storage_bytes` quota is exceeded (`QUOTA_STORAGE_EXCEEDED`). Delete stored content, or raise the quota — no window reset clears a stored total, so no `Retry-After` is sent.
12803
+ */
12804
+ 409: ErrorResponse;
12770
12805
  };
12771
12806
  type UploadFileBase64Error = UploadFileBase64Errors[keyof UploadFileBase64Errors];
12772
12807
  type UploadFileBase64Responses = {
@@ -14715,6 +14750,10 @@ type CreateMemoryEntryErrors = {
14715
14750
  * Memory not found
14716
14751
  */
14717
14752
  404: unknown;
14753
+ /**
14754
+ * The project's `storage_bytes` quota is exceeded (`QUOTA_STORAGE_EXCEEDED`). Delete stored content, or raise the quota — no window reset clears a stored total, so no `Retry-After` is sent.
14755
+ */
14756
+ 409: unknown;
14718
14757
  /**
14719
14758
  * Internal server error
14720
14759
  */
@@ -15570,6 +15609,12 @@ type ListOrchestrationRunsData = {
15570
15609
  * Contradicting `parent_orchestration_run_id` with `nested=false` is a `400`; any value other than `true` or `false` is a `400`.
15571
15610
  */
15572
15611
  nested?: boolean;
15612
+ /**
15613
+ * Filter by run status. Repeat the parameter to OR values — `status=queued&status=running&status=sleeping&status=awaiting_input` is the set still driving, which is how a caller finds live work without paging every run the project ever started.
15614
+ *
15615
+ * There is no `non_terminal` shorthand on purpose: which statuses count as live is the caller's policy. A value outside the enum, empty string included, is a `400`.
15616
+ */
15617
+ status?: Array<'queued' | 'running' | 'sleeping' | 'awaiting_input' | 'succeeded' | 'failed' | 'cancelled' | 'expired'>;
15573
15618
  /**
15574
15619
  * Maximum number of results to return
15575
15620
  */
@@ -16169,13 +16214,13 @@ type CreateQuotaData = {
16169
16214
  /**
16170
16215
  * The metric being capped
16171
16216
  */
16172
- metric: 'requests' | 'tokens' | 'cost_usd';
16217
+ metric: 'requests' | 'tokens' | 'cost_usd' | 'storage_bytes';
16173
16218
  /**
16174
- * The window over which the metric is aggregated
16219
+ * The window over which the metric is aggregated. `current` is the only accepted value for storage_bytes (a stored total is not aggregated over time) and is refused for every other metric.
16175
16220
  */
16176
- window: 'rolling_1m' | 'rolling_1h' | 'rolling_24h' | 'calendar_month';
16221
+ window: 'rolling_1m' | 'rolling_1h' | 'rolling_24h' | 'calendar_month' | 'current';
16177
16222
  /**
16178
- * The cap. Must be a positive integer for requests/tokens; fractional values are allowed for cost_usd.
16223
+ * The cap. Must be a positive integer for requests/tokens/storage_bytes (bytes); fractional values are allowed for cost_usd.
16179
16224
  */
16180
16225
  limit: number;
16181
16226
  /**
@@ -16186,6 +16231,10 @@ type CreateQuotaData = {
16186
16231
  * Only for metric cost_usd (400 on any other metric). What an enforce quota does when the current window is a pricing blackout — several metered llm_tokens events, none of them priced, so the aggregate is 0 however much was actually spent. Platform meters such as compute_execution are read for the aggregate but never for this verdict. block (the default) refuses new generations with 409 QUOTA_UNENFORCEABLE until pricing is configured; allow accepts the unmeasurable spend explicitly. Either way a quota_unpriced exception is filed. monitor-mode quotas never block regardless. A partly priced window is not a blackout: no posture refuses it, it is enforced on its priced total, and it files the same exception.
16187
16232
  */
16188
16233
  on_unpriced?: 'block' | 'allow';
16234
+ /**
16235
+ * 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.
16236
+ */
16237
+ meter_type?: 'llm_tokens' | 'compute_execution' | 'api_request' | 'storage';
16189
16238
  };
16190
16239
  path: {
16191
16240
  /**
@@ -17163,6 +17212,12 @@ type ListTasksData = {
17163
17212
  workflow_id?: string;
17164
17213
  state?: string;
17165
17214
  status?: 'open' | 'closed';
17215
+ /**
17216
+ * Filter by the current state's dispatch status. Repeat the parameter to OR values. `none` selects the tasks whose `automation_status` is `null` — the ones that never entered a state with an automation. It is a value a task really holds, so it is a value of the filter too; the parameter's own absence already means "every task".
17217
+ *
17218
+ * A value outside the enum, empty string included, is a `400`.
17219
+ */
17220
+ automation_status?: Array<'running' | 'completed' | 'failed' | 'unrouted' | 'paused' | 'none'>;
17166
17221
  assignee?: string;
17167
17222
  /**
17168
17223
  * Maximum number of results to return
@@ -19362,7 +19417,14 @@ declare class AiProviders {
19362
19417
  /**
19363
19418
  * Create an AI provider
19364
19419
  *
19365
- * Creates a new LLM provider configuration
19420
+ * Creates a new LLM provider configuration.
19421
+ *
19422
+ * A `bedrock` or `vertex` record must carry a credential of its own — a
19423
+ * linked `secret_id`, or an `apiKey` in `config`. Without one the provider
19424
+ * SDK signs with the server's own credentials (the AWS default credential
19425
+ * chain, Google Application Default Credentials), which is refused with
19426
+ * `400 VALIDATION_FAILED` unless the deployment allows it.
19427
+ *
19366
19428
  */
19367
19429
  static createAiProvider<ThrowOnError extends boolean = false>(options: Options<CreateAiProviderData, ThrowOnError>): RequestResult<CreateAiProviderResponses, CreateAiProviderErrors, ThrowOnError>;
19368
19430
  /**
@@ -19392,7 +19454,7 @@ declare class AiProviders {
19392
19454
  * 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.
19393
19455
  * 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.
19394
19456
  * 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`.
19395
- * 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 when there is one — IAM keys or a Bedrock API key, a Google service-account key and otherwise fall back to the server environment (the AWS default credential chain, Google Application Default Credentials), so a record with no `secret_id` can still list.
19457
+ * 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.
19396
19458
  * 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`.
19397
19459
  * 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.
19398
19460
  *
@@ -20419,7 +20481,7 @@ declare class Orchestrations {
20419
20481
  /**
20420
20482
  * List orchestration runs
20421
20483
  *
20422
- * Returns orchestration runs the caller can access, optionally filtered by orchestration, by parent run, or by whether the run has a parent at all.
20484
+ * Returns orchestration runs the caller can access, optionally filtered by orchestration, by parent run, by status, or by whether the run has a parent at all.
20423
20485
  *
20424
20486
  * Note when aggregating: a run's `usage` covers its whole subtree, so summing it over a list that contains both a parent and its children counts the children more than once. Pass `nested=false` to sum over runs a caller started.
20425
20487
  */
@@ -20539,7 +20601,9 @@ declare class Quotas {
20539
20601
  /**
20540
20602
  * Create a quota
20541
20603
  *
20542
- * Creates a project-scoped quota. `requests` is valid for `scope: project`/`api_key`; `tokens` and `cost_usd` are valid for `scope: project`/`agent`/`actor`. Any other scope/metric pair is rejected with 400 (no attribution exists to enforce it). An `actor` quota caps one end user's spend, matched from the generation's session; a null `scope_ref` means one budget *per* actor rather than a pooled project total. A duplicate quota (same project, scope, scope_ref, metric, window) is rejected with 409.
20604
+ * Creates a project-scoped quota. `requests` is valid for `scope: project`/`api_key`; `tokens` and `cost_usd` are valid for `scope: project`/`agent`/`actor`; `storage_bytes` is valid for `scope: project` only. Any other scope/metric pair is rejected with 400 (no attribution exists to enforce it). An `actor` quota caps one end user's spend, matched from the generation's session; a null `scope_ref` means one budget *per* actor rather than a pooled project total. A `cost_usd` quota may name one `meter_type` to cap; omitting it caps every priced meter. A duplicate quota (same project, scope, scope_ref, metric, window, meter_type) is rejected with 409.
20605
+ *
20606
+ * `storage_bytes` caps a stored total rather than a windowed one, so it takes `window: current` and every other metric refuses that value (400 either way). It is enforced at the corpus write paths — file upload and create, document create, document ingest and re-ingest, memory-entry create — with `409 QUOTA_STORAGE_EXCEEDED` and no `Retry-After`, since no window reset clears a footprint.
20543
20607
  */
20544
20608
  static createQuota<ThrowOnError extends boolean = false>(options: Options<CreateQuotaData, ThrowOnError>): RequestResult<CreateQuotaResponses, CreateQuotaErrors, ThrowOnError>;
20545
20609
  /**
@@ -20688,7 +20752,7 @@ declare class Tasks {
20688
20752
  /**
20689
20753
  * List tasks
20690
20754
  *
20691
- * Lists tasks (the board query). Filter by workflow, state, status, or assignee — `GET /tasks?workflow_id=...&state=...` is one board column.
20755
+ * Lists tasks (the board query). Filter by workflow, state, status, automation status, or assignee — `GET /tasks?workflow_id=...&state=...` is one board column.
20692
20756
  */
20693
20757
  static listTasks<ThrowOnError extends boolean = false>(options: Options<ListTasksData, ThrowOnError>): RequestResult<ListTasksResponses, ListTasksErrors, ThrowOnError>;
20694
20758
  /**
package/dist/index.d.mts CHANGED
@@ -3605,7 +3605,7 @@ type WorkflowResourceProperties = {
3605
3605
  } | null;
3606
3606
  };
3607
3607
  /**
3608
- * Creates a quota — a project-scoped cap that blocks (`enforce`) or reports (`monitor`) when a windowed aggregate is exceeded. `requests` quotas are enforced by the request middleware; `tokens`/`cost_usd` quotas at the pre-generation check. Mirrors the quotas REST contract; `scope`, `metric`, and `window` are immutable after creation (only `limit`, `mode`, and `on_unpriced` update).
3608
+ * Creates a quota — a project-scoped cap that blocks (`enforce`) or reports (`monitor`) when a windowed aggregate is exceeded. `requests` quotas are enforced by the request middleware; `tokens`/`cost_usd` quotas at the pre-generation check. Mirrors the quotas REST contract; `scope`, `metric`, `window`, and `meter_type` are immutable after creation (only `limit`, `mode`, and `on_unpriced` update).
3609
3609
  */
3610
3610
  type QuotaResourceProperties = {
3611
3611
  /**
@@ -3619,13 +3619,13 @@ type QuotaResourceProperties = {
3619
3619
  /**
3620
3620
  * The metric being capped
3621
3621
  */
3622
- metric: 'requests' | 'tokens' | 'cost_usd';
3622
+ metric: 'requests' | 'tokens' | 'cost_usd' | 'storage_bytes';
3623
3623
  /**
3624
- * The window over which the metric is aggregated
3624
+ * The window over which the metric is aggregated. storage_bytes caps a stored total rather than a windowed one, so it takes current and refuses every other value; current is refused for every other metric.
3625
3625
  */
3626
- window: 'rolling_1m' | 'rolling_1h' | 'rolling_24h' | 'calendar_month';
3626
+ window: 'rolling_1m' | 'rolling_1h' | 'rolling_24h' | 'calendar_month' | 'current';
3627
3627
  /**
3628
- * The cap. Positive integer for requests/tokens; fractional allowed for cost_usd.
3628
+ * The cap. Positive integer for requests/tokens/storage_bytes (bytes); fractional allowed for cost_usd.
3629
3629
  */
3630
3630
  limit: number;
3631
3631
  /**
@@ -3636,6 +3636,10 @@ type QuotaResourceProperties = {
3636
3636
  * Only for metric cost_usd. What an enforce quota does over a pricing blackout — block (the default) refuses generations with 409 QUOTA_UNENFORCEABLE, allow accepts the unmeasurable spend. See the quotas REST contract.
3637
3637
  */
3638
3638
  on_unpriced?: 'block' | 'allow';
3639
+ /**
3640
+ * 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.
3641
+ */
3642
+ meter_type?: 'llm_tokens' | 'compute_execution' | 'api_request' | 'storage';
3639
3643
  };
3640
3644
  /**
3641
3645
  * 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.
@@ -5497,16 +5501,23 @@ type Quota = {
5497
5501
  * Public id of the api key / agent / actor the quota applies to. For `api_key` and `agent` scope, NULL means all entities of that scope type in the project. For `actor` scope, NULL means one budget *per* actor rather than a pooled total across all actors.
5498
5502
  */
5499
5503
  scope_ref?: string | null;
5500
- metric?: 'requests' | 'tokens' | 'cost_usd';
5501
- window?: 'rolling_1m' | 'rolling_1h' | 'rolling_24h' | 'calendar_month';
5504
+ metric?: 'requests' | 'tokens' | 'cost_usd' | 'storage_bytes';
5505
+ /**
5506
+ * The window the metric is aggregated over; `current` on storage_bytes, which caps a stored total and never resets.
5507
+ */
5508
+ window?: 'rolling_1m' | 'rolling_1h' | 'rolling_24h' | 'calendar_month' | 'current';
5502
5509
  limit?: number;
5503
5510
  mode?: 'enforce' | 'monitor';
5511
+ /**
5512
+ * The meter a cost_usd cap answers for. Null is every priced meter, which is what a quota created without one carries.
5513
+ */
5514
+ meter_type?: 'llm_tokens' | 'compute_execution' | 'api_request' | 'storage' | null;
5504
5515
  /**
5505
5516
  * 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.
5506
5517
  */
5507
5518
  on_unpriced?: 'block' | 'allow' | null;
5508
5519
  /**
5509
- * Current fixed-window usage for the requests metric. Null for token/cost quotas (which aggregate the usage meter at check time rather than keeping a counter) and in list responses.
5520
+ * Current fixed-window usage for the requests metric. Null for token/cost quotas (which aggregate the usage meter at check time rather than keeping a counter), null for storage_bytes (a stored total has no window and no counter — read the footprint from the storage meter), and null in list responses.
5510
5521
  */
5511
5522
  current_usage?: {
5512
5523
  window_key?: string;
@@ -8322,7 +8333,7 @@ type CreateAiProviderData = {
8322
8333
  */
8323
8334
  default_model: string;
8324
8335
  /**
8325
- * Secret ID containing API credentials
8336
+ * Secret ID containing API credentials. Required for `bedrock` and `vertex` unless `config.apiKey` carries one.
8326
8337
  */
8327
8338
  secret_id?: string;
8328
8339
  /**
@@ -10976,6 +10987,10 @@ type CreateDocumentErrors = {
10976
10987
  * Forbidden
10977
10988
  */
10978
10989
  403: ErrorResponse;
10990
+ /**
10991
+ * The project's `storage_bytes` quota is exceeded (`QUOTA_STORAGE_EXCEEDED`). Delete stored content, or raise the quota — no window reset clears a stored total, so no `Retry-After` is sent.
10992
+ */
10993
+ 409: ErrorResponse;
10979
10994
  };
10980
10995
  type CreateDocumentError = CreateDocumentErrors[keyof CreateDocumentErrors];
10981
10996
  type CreateDocumentResponses = {
@@ -11042,7 +11057,7 @@ type IngestDocumentErrors = {
11042
11057
  */
11043
11058
  403: ErrorResponse;
11044
11059
  /**
11045
- * The file already backs a Document (a file can only be ingested once). Use `POST /documents/{document_id}/ingest` to re-process the existing document, or upload a new copy of the file to ingest it separately.
11060
+ * The file already backs a Document (a file can only be ingested once use `POST /documents/{document_id}/ingest` to re-process the existing document, or upload a new copy of the file to ingest it separately), or the project's `storage_bytes` quota is exceeded (`QUOTA_STORAGE_EXCEEDED`; delete stored content or raise the quota — no `Retry-After` is sent, since no window reset clears a stored total).
11046
11061
  */
11047
11062
  409: ErrorResponse;
11048
11063
  /**
@@ -11281,6 +11296,10 @@ type ReingestDocumentErrors = {
11281
11296
  * Document not found
11282
11297
  */
11283
11298
  404: ErrorResponse;
11299
+ /**
11300
+ * The project's `storage_bytes` quota is exceeded (`QUOTA_STORAGE_EXCEEDED`). Delete stored content, or raise the quota — no window reset clears a stored total, so no `Retry-After` is sent.
11301
+ */
11302
+ 409: ErrorResponse;
11284
11303
  /**
11285
11304
  * The file is too large to re-ingest synchronously (`?wait=true`). Retry in background mode.
11286
11305
  */
@@ -11773,6 +11792,10 @@ type CreateDatasetItemErrors = {
11773
11792
  * Dataset not found
11774
11793
  */
11775
11794
  404: unknown;
11795
+ /**
11796
+ * The project's `storage_bytes` quota is exceeded (`QUOTA_STORAGE_EXCEEDED`). A fixture is a corpus write like a document, so it is bounded by the same cap; delete stored content or raise the quota — no `Retry-After` is sent, since no window reset clears a stored total.
11797
+ */
11798
+ 409: unknown;
11776
11799
  };
11777
11800
  type CreateDatasetItemResponses = {
11778
11801
  /**
@@ -11829,7 +11852,7 @@ type CreateDatasetItemFromGenerationErrors = {
11829
11852
  */
11830
11853
  404: unknown;
11831
11854
  /**
11832
- * The generation has not completed, or its content was never stored or has been purged
11855
+ * The generation has not completed, its content was never stored or has been purged, or the project's `storage_bytes` quota is exceeded (`QUOTA_STORAGE_EXCEEDED`; delete stored content or raise the quota — no `Retry-After` is sent, since no window reset clears a stored total)
11833
11856
  */
11834
11857
  409: unknown;
11835
11858
  };
@@ -12674,6 +12697,10 @@ type CreateFileData = {
12674
12697
  url: '/v1/projects/{project_id}/files';
12675
12698
  };
12676
12699
  type CreateFileErrors = {
12700
+ /**
12701
+ * The project's `storage_bytes` quota is exceeded (`QUOTA_STORAGE_EXCEEDED`). Delete stored content, or raise the quota — no window reset clears a stored total, so no `Retry-After` is sent.
12702
+ */
12703
+ 409: ErrorResponse;
12677
12704
  /**
12678
12705
  * Internal server error
12679
12706
  */
@@ -12733,6 +12760,10 @@ type UploadFileErrors = {
12733
12760
  *
12734
12761
  */
12735
12762
  403: ErrorResponse;
12763
+ /**
12764
+ * The project's `storage_bytes` quota is exceeded (`QUOTA_STORAGE_EXCEEDED`). Delete stored content, or raise the quota — no window reset clears a stored total, so no `Retry-After` is sent.
12765
+ */
12766
+ 409: ErrorResponse;
12736
12767
  };
12737
12768
  type UploadFileError = UploadFileErrors[keyof UploadFileErrors];
12738
12769
  type UploadFileResponses = {
@@ -12767,6 +12798,10 @@ type UploadFileBase64Errors = {
12767
12798
  *
12768
12799
  */
12769
12800
  403: ErrorResponse;
12801
+ /**
12802
+ * The project's `storage_bytes` quota is exceeded (`QUOTA_STORAGE_EXCEEDED`). Delete stored content, or raise the quota — no window reset clears a stored total, so no `Retry-After` is sent.
12803
+ */
12804
+ 409: ErrorResponse;
12770
12805
  };
12771
12806
  type UploadFileBase64Error = UploadFileBase64Errors[keyof UploadFileBase64Errors];
12772
12807
  type UploadFileBase64Responses = {
@@ -14715,6 +14750,10 @@ type CreateMemoryEntryErrors = {
14715
14750
  * Memory not found
14716
14751
  */
14717
14752
  404: unknown;
14753
+ /**
14754
+ * The project's `storage_bytes` quota is exceeded (`QUOTA_STORAGE_EXCEEDED`). Delete stored content, or raise the quota — no window reset clears a stored total, so no `Retry-After` is sent.
14755
+ */
14756
+ 409: unknown;
14718
14757
  /**
14719
14758
  * Internal server error
14720
14759
  */
@@ -15570,6 +15609,12 @@ type ListOrchestrationRunsData = {
15570
15609
  * Contradicting `parent_orchestration_run_id` with `nested=false` is a `400`; any value other than `true` or `false` is a `400`.
15571
15610
  */
15572
15611
  nested?: boolean;
15612
+ /**
15613
+ * Filter by run status. Repeat the parameter to OR values — `status=queued&status=running&status=sleeping&status=awaiting_input` is the set still driving, which is how a caller finds live work without paging every run the project ever started.
15614
+ *
15615
+ * There is no `non_terminal` shorthand on purpose: which statuses count as live is the caller's policy. A value outside the enum, empty string included, is a `400`.
15616
+ */
15617
+ status?: Array<'queued' | 'running' | 'sleeping' | 'awaiting_input' | 'succeeded' | 'failed' | 'cancelled' | 'expired'>;
15573
15618
  /**
15574
15619
  * Maximum number of results to return
15575
15620
  */
@@ -16169,13 +16214,13 @@ type CreateQuotaData = {
16169
16214
  /**
16170
16215
  * The metric being capped
16171
16216
  */
16172
- metric: 'requests' | 'tokens' | 'cost_usd';
16217
+ metric: 'requests' | 'tokens' | 'cost_usd' | 'storage_bytes';
16173
16218
  /**
16174
- * The window over which the metric is aggregated
16219
+ * The window over which the metric is aggregated. `current` is the only accepted value for storage_bytes (a stored total is not aggregated over time) and is refused for every other metric.
16175
16220
  */
16176
- window: 'rolling_1m' | 'rolling_1h' | 'rolling_24h' | 'calendar_month';
16221
+ window: 'rolling_1m' | 'rolling_1h' | 'rolling_24h' | 'calendar_month' | 'current';
16177
16222
  /**
16178
- * The cap. Must be a positive integer for requests/tokens; fractional values are allowed for cost_usd.
16223
+ * The cap. Must be a positive integer for requests/tokens/storage_bytes (bytes); fractional values are allowed for cost_usd.
16179
16224
  */
16180
16225
  limit: number;
16181
16226
  /**
@@ -16186,6 +16231,10 @@ type CreateQuotaData = {
16186
16231
  * Only for metric cost_usd (400 on any other metric). What an enforce quota does when the current window is a pricing blackout — several metered llm_tokens events, none of them priced, so the aggregate is 0 however much was actually spent. Platform meters such as compute_execution are read for the aggregate but never for this verdict. block (the default) refuses new generations with 409 QUOTA_UNENFORCEABLE until pricing is configured; allow accepts the unmeasurable spend explicitly. Either way a quota_unpriced exception is filed. monitor-mode quotas never block regardless. A partly priced window is not a blackout: no posture refuses it, it is enforced on its priced total, and it files the same exception.
16187
16232
  */
16188
16233
  on_unpriced?: 'block' | 'allow';
16234
+ /**
16235
+ * 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.
16236
+ */
16237
+ meter_type?: 'llm_tokens' | 'compute_execution' | 'api_request' | 'storage';
16189
16238
  };
16190
16239
  path: {
16191
16240
  /**
@@ -17163,6 +17212,12 @@ type ListTasksData = {
17163
17212
  workflow_id?: string;
17164
17213
  state?: string;
17165
17214
  status?: 'open' | 'closed';
17215
+ /**
17216
+ * Filter by the current state's dispatch status. Repeat the parameter to OR values. `none` selects the tasks whose `automation_status` is `null` — the ones that never entered a state with an automation. It is a value a task really holds, so it is a value of the filter too; the parameter's own absence already means "every task".
17217
+ *
17218
+ * A value outside the enum, empty string included, is a `400`.
17219
+ */
17220
+ automation_status?: Array<'running' | 'completed' | 'failed' | 'unrouted' | 'paused' | 'none'>;
17166
17221
  assignee?: string;
17167
17222
  /**
17168
17223
  * Maximum number of results to return
@@ -19362,7 +19417,14 @@ declare class AiProviders {
19362
19417
  /**
19363
19418
  * Create an AI provider
19364
19419
  *
19365
- * Creates a new LLM provider configuration
19420
+ * Creates a new LLM provider configuration.
19421
+ *
19422
+ * A `bedrock` or `vertex` record must carry a credential of its own — a
19423
+ * linked `secret_id`, or an `apiKey` in `config`. Without one the provider
19424
+ * SDK signs with the server's own credentials (the AWS default credential
19425
+ * chain, Google Application Default Credentials), which is refused with
19426
+ * `400 VALIDATION_FAILED` unless the deployment allows it.
19427
+ *
19366
19428
  */
19367
19429
  static createAiProvider<ThrowOnError extends boolean = false>(options: Options<CreateAiProviderData, ThrowOnError>): RequestResult<CreateAiProviderResponses, CreateAiProviderErrors, ThrowOnError>;
19368
19430
  /**
@@ -19392,7 +19454,7 @@ declare class AiProviders {
19392
19454
  * 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.
19393
19455
  * 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.
19394
19456
  * 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`.
19395
- * 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 when there is one — IAM keys or a Bedrock API key, a Google service-account key and otherwise fall back to the server environment (the AWS default credential chain, Google Application Default Credentials), so a record with no `secret_id` can still list.
19457
+ * 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.
19396
19458
  * 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`.
19397
19459
  * 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.
19398
19460
  *
@@ -20419,7 +20481,7 @@ declare class Orchestrations {
20419
20481
  /**
20420
20482
  * List orchestration runs
20421
20483
  *
20422
- * Returns orchestration runs the caller can access, optionally filtered by orchestration, by parent run, or by whether the run has a parent at all.
20484
+ * Returns orchestration runs the caller can access, optionally filtered by orchestration, by parent run, by status, or by whether the run has a parent at all.
20423
20485
  *
20424
20486
  * Note when aggregating: a run's `usage` covers its whole subtree, so summing it over a list that contains both a parent and its children counts the children more than once. Pass `nested=false` to sum over runs a caller started.
20425
20487
  */
@@ -20539,7 +20601,9 @@ declare class Quotas {
20539
20601
  /**
20540
20602
  * Create a quota
20541
20603
  *
20542
- * Creates a project-scoped quota. `requests` is valid for `scope: project`/`api_key`; `tokens` and `cost_usd` are valid for `scope: project`/`agent`/`actor`. Any other scope/metric pair is rejected with 400 (no attribution exists to enforce it). An `actor` quota caps one end user's spend, matched from the generation's session; a null `scope_ref` means one budget *per* actor rather than a pooled project total. A duplicate quota (same project, scope, scope_ref, metric, window) is rejected with 409.
20604
+ * Creates a project-scoped quota. `requests` is valid for `scope: project`/`api_key`; `tokens` and `cost_usd` are valid for `scope: project`/`agent`/`actor`; `storage_bytes` is valid for `scope: project` only. Any other scope/metric pair is rejected with 400 (no attribution exists to enforce it). An `actor` quota caps one end user's spend, matched from the generation's session; a null `scope_ref` means one budget *per* actor rather than a pooled project total. A `cost_usd` quota may name one `meter_type` to cap; omitting it caps every priced meter. A duplicate quota (same project, scope, scope_ref, metric, window, meter_type) is rejected with 409.
20605
+ *
20606
+ * `storage_bytes` caps a stored total rather than a windowed one, so it takes `window: current` and every other metric refuses that value (400 either way). It is enforced at the corpus write paths — file upload and create, document create, document ingest and re-ingest, memory-entry create — with `409 QUOTA_STORAGE_EXCEEDED` and no `Retry-After`, since no window reset clears a footprint.
20543
20607
  */
20544
20608
  static createQuota<ThrowOnError extends boolean = false>(options: Options<CreateQuotaData, ThrowOnError>): RequestResult<CreateQuotaResponses, CreateQuotaErrors, ThrowOnError>;
20545
20609
  /**
@@ -20688,7 +20752,7 @@ declare class Tasks {
20688
20752
  /**
20689
20753
  * List tasks
20690
20754
  *
20691
- * Lists tasks (the board query). Filter by workflow, state, status, or assignee — `GET /tasks?workflow_id=...&state=...` is one board column.
20755
+ * Lists tasks (the board query). Filter by workflow, state, status, automation status, or assignee — `GET /tasks?workflow_id=...&state=...` is one board column.
20692
20756
  */
20693
20757
  static listTasks<ThrowOnError extends boolean = false>(options: Options<ListTasksData, ThrowOnError>): RequestResult<ListTasksResponses, ListTasksErrors, ThrowOnError>;
20694
20758
  /**
package/dist/index.mjs CHANGED
@@ -1318,7 +1318,14 @@ var AiProviders = class {
1318
1318
  /**
1319
1319
  * Create an AI provider
1320
1320
  *
1321
- * Creates a new LLM provider configuration
1321
+ * Creates a new LLM provider configuration.
1322
+ *
1323
+ * A `bedrock` or `vertex` record must carry a credential of its own — a
1324
+ * linked `secret_id`, or an `apiKey` in `config`. Without one the provider
1325
+ * SDK signs with the server's own credentials (the AWS default credential
1326
+ * chain, Google Application Default Credentials), which is refused with
1327
+ * `400 VALIDATION_FAILED` unless the deployment allows it.
1328
+ *
1322
1329
  */
1323
1330
  static createAiProvider(options) {
1324
1331
  return (options.client ?? client).post({
@@ -1376,7 +1383,7 @@ var AiProviders = class {
1376
1383
  * 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.
1377
1384
  * 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.
1378
1385
  * 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`.
1379
- * 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 when there is one — IAM keys or a Bedrock API key, a Google service-account key and otherwise fall back to the server environment (the AWS default credential chain, Google Application Default Credentials), so a record with no `secret_id` can still list.
1386
+ * 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.
1380
1387
  * 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`.
1381
1388
  * 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.
1382
1389
  *
@@ -3358,7 +3365,7 @@ var Orchestrations = class {
3358
3365
  /**
3359
3366
  * List orchestration runs
3360
3367
  *
3361
- * Returns orchestration runs the caller can access, optionally filtered by orchestration, by parent run, or by whether the run has a parent at all.
3368
+ * Returns orchestration runs the caller can access, optionally filtered by orchestration, by parent run, by status, or by whether the run has a parent at all.
3362
3369
  *
3363
3370
  * Note when aggregating: a run's `usage` covers its whole subtree, so summing it over a list that contains both a parent and its children counts the children more than once. Pass `nested=false` to sum over runs a caller started.
3364
3371
  */
@@ -3573,7 +3580,9 @@ var Quotas = class {
3573
3580
  /**
3574
3581
  * Create a quota
3575
3582
  *
3576
- * Creates a project-scoped quota. `requests` is valid for `scope: project`/`api_key`; `tokens` and `cost_usd` are valid for `scope: project`/`agent`/`actor`. Any other scope/metric pair is rejected with 400 (no attribution exists to enforce it). An `actor` quota caps one end user's spend, matched from the generation's session; a null `scope_ref` means one budget *per* actor rather than a pooled project total. A duplicate quota (same project, scope, scope_ref, metric, window) is rejected with 409.
3583
+ * Creates a project-scoped quota. `requests` is valid for `scope: project`/`api_key`; `tokens` and `cost_usd` are valid for `scope: project`/`agent`/`actor`; `storage_bytes` is valid for `scope: project` only. Any other scope/metric pair is rejected with 400 (no attribution exists to enforce it). An `actor` quota caps one end user's spend, matched from the generation's session; a null `scope_ref` means one budget *per* actor rather than a pooled project total. A `cost_usd` quota may name one `meter_type` to cap; omitting it caps every priced meter. A duplicate quota (same project, scope, scope_ref, metric, window, meter_type) is rejected with 409.
3584
+ *
3585
+ * `storage_bytes` caps a stored total rather than a windowed one, so it takes `window: current` and every other metric refuses that value (400 either way). It is enforced at the corpus write paths — file upload and create, document create, document ingest and re-ingest, memory-entry create — with `409 QUOTA_STORAGE_EXCEEDED` and no `Retry-After`, since no window reset clears a footprint.
3577
3586
  */
3578
3587
  static createQuota(options) {
3579
3588
  return (options.client ?? client).post({
@@ -3880,7 +3889,7 @@ var Tasks = class {
3880
3889
  /**
3881
3890
  * List tasks
3882
3891
  *
3883
- * Lists tasks (the board query). Filter by workflow, state, status, or assignee — `GET /tasks?workflow_id=...&state=...` is one board column.
3892
+ * Lists tasks (the board query). Filter by workflow, state, status, automation status, or assignee — `GET /tasks?workflow_id=...&state=...` is one board column.
3884
3893
  */
3885
3894
  static listTasks(options) {
3886
3895
  return (options.client ?? client).get({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturali/sdk",
3
- "version": "0.116.0",
3
+ "version": "0.118.0",
4
4
  "description": "TypeScript SDK for the naturali.ai API, generated from its OpenAPI specs",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -37,7 +37,7 @@
37
37
  "tsx": "^4.23.1",
38
38
  "typescript": "~6.0.3",
39
39
  "vitest": "^4.1.10",
40
- "@naturali/api": "0.116.0"
40
+ "@naturali/api": "0.118.0"
41
41
  },
42
42
  "scripts": {
43
43
  "generate": "tsx scripts/generate.ts",