@naturali/sdk 0.295.2 → 0.295.3
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.d.cts +142 -311
- package/dist/index.d.mts +142 -311
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -2207,6 +2207,14 @@ type InputLimits = {
|
|
|
2207
2207
|
audio?: number;
|
|
2208
2208
|
video?: number;
|
|
2209
2209
|
};
|
|
2210
|
+
/**
|
|
2211
|
+
* Seconds per audio or video file part, read from the container's headers; a part whose duration cannot be read is refused with `MEDIA_PARSE_FAILED`
|
|
2212
|
+
*
|
|
2213
|
+
*/
|
|
2214
|
+
max_duration_seconds?: {
|
|
2215
|
+
audio?: number;
|
|
2216
|
+
video?: number;
|
|
2217
|
+
};
|
|
2210
2218
|
/**
|
|
2211
2219
|
* Pages per PDF file part
|
|
2212
2220
|
*/
|
|
@@ -3418,6 +3426,10 @@ type ConversationMessageRecord = {
|
|
|
3418
3426
|
* Files the turn sends the model natively, in order; empty when none.
|
|
3419
3427
|
*/
|
|
3420
3428
|
file_ids?: Array<string>;
|
|
3429
|
+
/**
|
|
3430
|
+
* The `output.citations` of the generation that produced this assistant message, `quoted_text` included; `answer_span` points into `content`. Empty when that turn cited and none verified; null when no citing turn produced the message.
|
|
3431
|
+
*/
|
|
3432
|
+
citations?: Array<Citation> | null;
|
|
3421
3433
|
/**
|
|
3422
3434
|
* The idempotency key the message was posted with, null when none was sent. A channel that posts each inbound message under its provider's message id finds the transcript row for that message by this key.
|
|
3423
3435
|
*/
|
|
@@ -5072,7 +5084,7 @@ type AiProviderResourceProperties = {
|
|
|
5072
5084
|
*/
|
|
5073
5085
|
model_input_modalities?: ModelInputModalities;
|
|
5074
5086
|
/**
|
|
5075
|
-
* Model name (or alias) → the input limits it declares, each a positive integer: `max_bytes` per file part of a modality, `max_pages` per PDF, `max_parts` file parts per request. A request over one is refused with `INPUT_LIMIT_EXCEEDED` (400) before the provider is called; a model absent from the map, or a limit it omits, is not checked.
|
|
5087
|
+
* Model name (or alias) → the input limits it declares, each a positive integer: `max_bytes` per file part of a modality, `max_duration_seconds` per audio or video part, `max_pages` per PDF, `max_parts` file parts per request. A request over one is refused with `INPUT_LIMIT_EXCEEDED` (400) before the provider is called; a model absent from the map, or a limit it omits, is not checked.
|
|
5076
5088
|
*/
|
|
5077
5089
|
model_input_limits?: ModelInputLimits;
|
|
5078
5090
|
/**
|
|
@@ -5102,93 +5114,8 @@ type ToolResourceProperties = {
|
|
|
5102
5114
|
parameters?: {
|
|
5103
5115
|
[key: string]: unknown;
|
|
5104
5116
|
} | null;
|
|
5105
|
-
|
|
5106
|
-
|
|
5107
|
-
*/
|
|
5108
|
-
execute?: {
|
|
5109
|
-
/**
|
|
5110
|
-
* Endpoint URL. Supports `{param}` placeholders resolved from tool arguments.
|
|
5111
|
-
*/
|
|
5112
|
-
url?: string;
|
|
5113
|
-
/**
|
|
5114
|
-
* HTTP method (default: `POST`)
|
|
5115
|
-
*/
|
|
5116
|
-
method?: string | null;
|
|
5117
|
-
/**
|
|
5118
|
-
* Static headers included in every request
|
|
5119
|
-
*/
|
|
5120
|
-
headers?: {
|
|
5121
|
-
[key: string]: unknown;
|
|
5122
|
-
} | null;
|
|
5123
|
-
/**
|
|
5124
|
-
* Request body encoding for `POST`/`PUT`/`PATCH`: `json` (default) or `multipart`. Incompatible with `auth.type: aws_sigv4`.
|
|
5125
|
-
*/
|
|
5126
|
-
body_mode?: 'json' | 'multipart' | null;
|
|
5127
|
-
/**
|
|
5128
|
-
* How a 2xx response body is returned: `json` (default) or `base64`, which returns `{ content_type, filename, data_base64 }` for binary targets.
|
|
5129
|
-
*/
|
|
5130
|
-
response_mode?: 'json' | 'base64' | null;
|
|
5131
|
-
/**
|
|
5132
|
-
* Computed request credential. `type` is `aws_sigv4` (with `region`, `service`, `access_key_id`, `secret_access_key` and optional `session_token`), `gcp_service_account` (with `credentials` and `scopes`) or `oauth_connection` (with `oauth_client_id`). Credential fields accept `{{secret:...}}` references.
|
|
5133
|
-
*/
|
|
5134
|
-
auth?: {
|
|
5135
|
-
/**
|
|
5136
|
-
* Which credential is computed.
|
|
5137
|
-
*/
|
|
5138
|
-
type?: 'aws_sigv4' | 'gcp_service_account' | 'oauth_connection';
|
|
5139
|
-
/**
|
|
5140
|
-
* `aws_sigv4`: the signing region
|
|
5141
|
-
*/
|
|
5142
|
-
region?: string | null;
|
|
5143
|
-
/**
|
|
5144
|
-
* `aws_sigv4`: the signing service
|
|
5145
|
-
*/
|
|
5146
|
-
service?: string | null;
|
|
5147
|
-
/**
|
|
5148
|
-
* `aws_sigv4`: the access key id
|
|
5149
|
-
*/
|
|
5150
|
-
access_key_id?: string | null;
|
|
5151
|
-
/**
|
|
5152
|
-
* `aws_sigv4`: the secret access key
|
|
5153
|
-
*/
|
|
5154
|
-
secret_access_key?: string | null;
|
|
5155
|
-
/**
|
|
5156
|
-
* `aws_sigv4`: the temporary credential's session token
|
|
5157
|
-
*/
|
|
5158
|
-
session_token?: string | null;
|
|
5159
|
-
/**
|
|
5160
|
-
* `gcp_service_account`: the service account key file JSON, as a string
|
|
5161
|
-
*/
|
|
5162
|
-
credentials?: string | null;
|
|
5163
|
-
/**
|
|
5164
|
-
* `gcp_service_account`: the scopes to mint for
|
|
5165
|
-
*/
|
|
5166
|
-
scopes?: Array<string> | null;
|
|
5167
|
-
/**
|
|
5168
|
-
* `oauth_connection`: the OAuth client whose connection the turn's actor holds; `{ "ref": "<LogicalId>" }` for a template `oauth_client`
|
|
5169
|
-
*/
|
|
5170
|
-
oauth_client_id?: string | null;
|
|
5171
|
-
} | null;
|
|
5172
|
-
} | null;
|
|
5173
|
-
/**
|
|
5174
|
-
* MCP server connection configuration. Required for `mcp` tools.
|
|
5175
|
-
*/
|
|
5176
|
-
mcp?: {
|
|
5177
|
-
/**
|
|
5178
|
-
* MCP server URL
|
|
5179
|
-
*/
|
|
5180
|
-
url?: string;
|
|
5181
|
-
/**
|
|
5182
|
-
* Headers included in every MCP request
|
|
5183
|
-
*/
|
|
5184
|
-
headers?: {
|
|
5185
|
-
[key: string]: unknown;
|
|
5186
|
-
} | null;
|
|
5187
|
-
/**
|
|
5188
|
-
* Pin each action's definition on the first listing and withhold an action whose definition drifts. Re-applying an unchanged `mcp` keeps the pins; a new `url` clears them.
|
|
5189
|
-
*/
|
|
5190
|
-
pin_definitions?: boolean;
|
|
5191
|
-
} | null;
|
|
5117
|
+
execute?: ToolExecuteConfig;
|
|
5118
|
+
mcp?: ToolMcpConfig;
|
|
5192
5119
|
/**
|
|
5193
5120
|
* Allowlist of actions the tool exposes. For `builtin` tools: action names. For `mcp` tools: an optional allowlist of MCP tool names to scope the server surface (`null` exposes every tool).
|
|
5194
5121
|
*/
|
|
@@ -5257,12 +5184,7 @@ type DatasetItemResourceProperties = {
|
|
|
5257
5184
|
* Public ID of the parent dataset (or ref expression)
|
|
5258
5185
|
*/
|
|
5259
5186
|
dataset_id: string;
|
|
5260
|
-
|
|
5261
|
-
* The messages sent to the agent, as `{role, content}` objects
|
|
5262
|
-
*/
|
|
5263
|
-
input: Array<{
|
|
5264
|
-
[key: string]: unknown;
|
|
5265
|
-
}>;
|
|
5187
|
+
input: DatasetItemInput;
|
|
5266
5188
|
/**
|
|
5267
5189
|
* Reference answer for exact_match / contains / embedding_similarity / llm_judge scorers
|
|
5268
5190
|
*/
|
|
@@ -5279,7 +5201,7 @@ type EvalResourceProperties = {
|
|
|
5279
5201
|
/**
|
|
5280
5202
|
* The policies every run of the eval acts under. Use { "ref": "LogicalId" } for a policy in the template. The deploying caller must hold every grant they carry inside the project, else the resource fails with `POLICY_GRANT_NOT_HELD`.
|
|
5281
5203
|
*/
|
|
5282
|
-
policy_ids:
|
|
5204
|
+
policy_ids: AttachedPolicyIds;
|
|
5283
5205
|
/**
|
|
5284
5206
|
* Eval name, unique within the project
|
|
5285
5207
|
*/
|
|
@@ -5292,12 +5214,7 @@ type EvalResourceProperties = {
|
|
|
5292
5214
|
* Public ID of the dataset to run against (or ref expression)
|
|
5293
5215
|
*/
|
|
5294
5216
|
dataset_id: string;
|
|
5295
|
-
|
|
5296
|
-
* Scorer configs — `exact_match`, `contains`, `json_logic`, `output_schema`, `embedding_similarity`, `llm_judge`, `tool`, or `decider`. Same shape as the evals REST contract.
|
|
5297
|
-
*/
|
|
5298
|
-
scorers: Array<{
|
|
5299
|
-
[key: string]: unknown;
|
|
5300
|
-
}>;
|
|
5217
|
+
scorers: Scorers;
|
|
5301
5218
|
/**
|
|
5302
5219
|
* 0–1. A run's verdict reads the 95% interval of its pass rate over non-errored items against this. Omit for a run that reports scores without a verdict.
|
|
5303
5220
|
*/
|
|
@@ -5343,12 +5260,7 @@ type DocumentResourceProperties = {
|
|
|
5343
5260
|
* Arbitrary metadata key-value pairs
|
|
5344
5261
|
*/
|
|
5345
5262
|
metadata?: NullableMetadataBag;
|
|
5346
|
-
|
|
5347
|
-
* Tag key-value pairs for filtering
|
|
5348
|
-
*/
|
|
5349
|
-
tags?: {
|
|
5350
|
-
[key: string]: unknown;
|
|
5351
|
-
};
|
|
5263
|
+
tags?: TagBag;
|
|
5352
5264
|
/**
|
|
5353
5265
|
* How to split the content into embeddable chunks, matching `POST /documents`. `whole` (default) stores the content as a single chunk; `size` splits into fixed-size character windows with overlap. `page` is equivalent to `whole` for plain text.
|
|
5354
5266
|
*/
|
|
@@ -5502,7 +5414,7 @@ type TriggerResourceProperties = {
|
|
|
5502
5414
|
/**
|
|
5503
5415
|
* Event type patterns (`*`, `prefix.*`, or an exact event name). Required when type is event, rejected otherwise
|
|
5504
5416
|
*/
|
|
5505
|
-
events?:
|
|
5417
|
+
events?: EventTypePatterns | null;
|
|
5506
5418
|
/**
|
|
5507
5419
|
* One event type pattern, the same as `events` of one item
|
|
5508
5420
|
*/
|
|
@@ -5510,11 +5422,11 @@ type TriggerResourceProperties = {
|
|
|
5510
5422
|
/**
|
|
5511
5423
|
* Event triggers only: SRN patterns the event's resource must match. Omitted matches any resource in the project
|
|
5512
5424
|
*/
|
|
5513
|
-
event_resources?:
|
|
5425
|
+
event_resources?: EventResourcePatterns | null;
|
|
5514
5426
|
/**
|
|
5515
5427
|
* Event triggers only. A filter the event's `data` must match
|
|
5516
5428
|
*/
|
|
5517
|
-
event_data?:
|
|
5429
|
+
event_data?: EventDataFilter | null;
|
|
5518
5430
|
/**
|
|
5519
5431
|
* Whether the trigger fires (default true)
|
|
5520
5432
|
*/
|
|
@@ -5522,7 +5434,7 @@ type TriggerResourceProperties = {
|
|
|
5522
5434
|
/**
|
|
5523
5435
|
* The policies every firing acts under. Use { "ref": "LogicalId" } for a policy in the template. The deploying caller must hold every grant they carry inside the project, else the resource fails with `POLICY_GRANT_NOT_HELD`.
|
|
5524
5436
|
*/
|
|
5525
|
-
policy_ids:
|
|
5437
|
+
policy_ids: AttachedPolicyIds;
|
|
5526
5438
|
};
|
|
5527
5439
|
/**
|
|
5528
5440
|
* Creates a conversation within the formation's project.
|
|
@@ -5578,41 +5490,7 @@ type PolicyResourceProperties = {
|
|
|
5578
5490
|
* Description of what the policy grants
|
|
5579
5491
|
*/
|
|
5580
5492
|
description?: string;
|
|
5581
|
-
|
|
5582
|
-
* Policy document containing an array of statements
|
|
5583
|
-
*/
|
|
5584
|
-
document: {
|
|
5585
|
-
/**
|
|
5586
|
-
* IAM policy statements.
|
|
5587
|
-
*/
|
|
5588
|
-
statement?: Array<{
|
|
5589
|
-
effect: 'Allow' | 'Deny';
|
|
5590
|
-
/**
|
|
5591
|
-
* IAM action strings, e.g. `memories:*`.
|
|
5592
|
-
*/
|
|
5593
|
-
action: Array<string>;
|
|
5594
|
-
/**
|
|
5595
|
-
* Resource SRN patterns. Omitted, an `Allow` matches every resource of the formation's project (`srn:<project_id>:*:*`); a `Deny` matches every resource.
|
|
5596
|
-
*/
|
|
5597
|
-
resource?: Array<string> | null;
|
|
5598
|
-
/**
|
|
5599
|
-
* Condition block: keys are condition operators mapping to context-key/value maps.
|
|
5600
|
-
*/
|
|
5601
|
-
condition?: {
|
|
5602
|
-
[key: string]: unknown;
|
|
5603
|
-
} | null;
|
|
5604
|
-
/**
|
|
5605
|
-
* On a `Deny` only: the declared `code`, `message` and `meta` a request it denies answers. Only an unrestricted admin deploys one.
|
|
5606
|
-
*/
|
|
5607
|
-
denial?: {
|
|
5608
|
-
code: string;
|
|
5609
|
-
message: string;
|
|
5610
|
-
meta?: {
|
|
5611
|
-
[key: string]: unknown;
|
|
5612
|
-
};
|
|
5613
|
-
} | null;
|
|
5614
|
-
}>;
|
|
5615
|
-
};
|
|
5493
|
+
document: PolicyDocument;
|
|
5616
5494
|
};
|
|
5617
5495
|
/**
|
|
5618
5496
|
* Creates an encrypted secret within the formation's project.
|
|
@@ -5635,48 +5513,19 @@ type OauthClientResourceProperties = {
|
|
|
5635
5513
|
* Display name
|
|
5636
5514
|
*/
|
|
5637
5515
|
name: string;
|
|
5638
|
-
|
|
5639
|
-
|
|
5640
|
-
|
|
5641
|
-
|
|
5642
|
-
/**
|
|
5643
|
-
* The provider's token endpoint
|
|
5644
|
-
*/
|
|
5645
|
-
token_url: string;
|
|
5646
|
-
/**
|
|
5647
|
-
* The provider's RFC 7009 revocation endpoint
|
|
5648
|
-
*/
|
|
5649
|
-
revocation_url?: string | null;
|
|
5650
|
-
/**
|
|
5651
|
-
* Your app's client ID at the provider
|
|
5652
|
-
*/
|
|
5653
|
-
client_id: string;
|
|
5516
|
+
authorize_url: AuthorizeUrl;
|
|
5517
|
+
token_url: TokenUrl;
|
|
5518
|
+
revocation_url?: RevocationUrl;
|
|
5519
|
+
client_id: ClientId;
|
|
5654
5520
|
/**
|
|
5655
5521
|
* A `{{secret:sec_...}}` reference to the client secret, never the value; for a template secret, `{ "sub": "{{secret:${MySecret}}}" }`. Omit for a public client, which relies on PKCE.
|
|
5656
5522
|
*/
|
|
5657
|
-
client_secret?:
|
|
5658
|
-
|
|
5659
|
-
|
|
5660
|
-
|
|
5661
|
-
|
|
5662
|
-
|
|
5663
|
-
* Whether the authorization uses PKCE (`S256`); default `true`
|
|
5664
|
-
*/
|
|
5665
|
-
pkce?: boolean;
|
|
5666
|
-
/**
|
|
5667
|
-
* How the client authenticates at the token endpoint
|
|
5668
|
-
*/
|
|
5669
|
-
token_endpoint_auth_method?: 'client_secret_basic' | 'client_secret_post';
|
|
5670
|
-
/**
|
|
5671
|
-
* The callback registered with the provider. Omitted or `null`, it is this API's own `https://api.naturali.ai/v1/oauth/callback`, the URL to register with the provider.
|
|
5672
|
-
*/
|
|
5673
|
-
redirect_uri?: string | null;
|
|
5674
|
-
/**
|
|
5675
|
-
* Extra query parameters for the authorize URL
|
|
5676
|
-
*/
|
|
5677
|
-
authorize_params?: {
|
|
5678
|
-
[key: string]: string;
|
|
5679
|
-
} | null;
|
|
5523
|
+
client_secret?: ClientSecret | null;
|
|
5524
|
+
scopes: Scopes;
|
|
5525
|
+
pkce?: Pkce;
|
|
5526
|
+
token_endpoint_auth_method?: TokenEndpointAuthMethod;
|
|
5527
|
+
redirect_uri?: RedirectUri;
|
|
5528
|
+
authorize_params?: AuthorizeParams;
|
|
5680
5529
|
};
|
|
5681
5530
|
/**
|
|
5682
5531
|
* Creates a session attached to an agent within the formation's project.
|
|
@@ -5720,7 +5569,7 @@ type IngestionRuleResourceProperties = {
|
|
|
5720
5569
|
/**
|
|
5721
5570
|
* The policies every conversion the rule starts acts under. Use { "ref": "LogicalId" } for a policy in the template. The deploying caller must hold every grant they carry inside the project, else the resource fails with `POLICY_GRANT_NOT_HELD`.
|
|
5722
5571
|
*/
|
|
5723
|
-
policy_ids:
|
|
5572
|
+
policy_ids: AttachedPolicyIds;
|
|
5724
5573
|
/**
|
|
5725
5574
|
* MIME type glob matched against a file's content_type (e.g. image*, audio/mpeg, application/pdf)
|
|
5726
5575
|
*/
|
|
@@ -5775,15 +5624,12 @@ type MemoryRuleResourceProperties = {
|
|
|
5775
5624
|
/**
|
|
5776
5625
|
* The policies every handler the rule starts acts under. Use { "ref": "LogicalId" } for a policy in the template. The deploying caller must hold every grant they carry inside the project, else the resource fails with `POLICY_GRANT_NOT_HELD`.
|
|
5777
5626
|
*/
|
|
5778
|
-
policy_ids:
|
|
5627
|
+
policy_ids: AttachedPolicyIds;
|
|
5779
5628
|
/**
|
|
5780
5629
|
* Public ID of the destination memory store
|
|
5781
5630
|
*/
|
|
5782
5631
|
memory_store_id: string;
|
|
5783
|
-
|
|
5784
|
-
* `generations.completed` (once per completed turn, and the only event the built-in extractor may bind to) or `conversation_messages.generated` (per persisted assistant reply, custom handlers only).
|
|
5785
|
-
*/
|
|
5786
|
-
on: 'generations.completed' | 'conversation_messages.generated';
|
|
5632
|
+
on: MemoryRuleEvent;
|
|
5787
5633
|
/**
|
|
5788
5634
|
* Agents whose turns this rule reads; null is every agent in the project
|
|
5789
5635
|
*/
|
|
@@ -5859,12 +5705,7 @@ type OrchestrationResourceProperties = {
|
|
|
5859
5705
|
input_schema?: {
|
|
5860
5706
|
[key: string]: unknown;
|
|
5861
5707
|
} | null;
|
|
5862
|
-
|
|
5863
|
-
* Optional shape of a completed run's `output`: each key an output field, each value JSON Logic over `{ "state": <final run state> }`. Omitted keys `output` by terminal node id.
|
|
5864
|
-
*/
|
|
5865
|
-
output_mapping?: {
|
|
5866
|
-
[key: string]: unknown;
|
|
5867
|
-
} | null;
|
|
5708
|
+
output_mapping?: OrchestrationOutputMapping;
|
|
5868
5709
|
};
|
|
5869
5710
|
/**
|
|
5870
5711
|
* Creates a workflow — a state-machine definition (named states, allowed transitions, guards, and per-state automation) that tasks live in. State and transition dispatch references (`agent_id`, `orchestration_id`, `tool_id` inside an `on_enter` block) accept `{ "ref": "LogicalId" }` expressions to point at agents, orchestrations or tools declared in the same template, so a workflow plus the agents and tools that service its states can deploy as one stack. Mirrors the workflows REST contract (`states`, `transitions`, `payload_schema`).
|
|
@@ -5905,12 +5746,7 @@ type CollectionResourceProperties = {
|
|
|
5905
5746
|
* Unique within the project.
|
|
5906
5747
|
*/
|
|
5907
5748
|
name: string;
|
|
5908
|
-
|
|
5909
|
-
* A JSON Schema every item's `data` must satisfy, stored as written.
|
|
5910
|
-
*/
|
|
5911
|
-
schema?: {
|
|
5912
|
-
[key: string]: unknown;
|
|
5913
|
-
} | null;
|
|
5749
|
+
schema?: CollectionSchema;
|
|
5914
5750
|
};
|
|
5915
5751
|
/**
|
|
5916
5752
|
* Declares what `metadata` must satisfy for one resource type under one selector, so a template ships the corpus and the rule governing it together. `resource_type` is immutable: changing it in a template is a delete and a create.
|
|
@@ -6016,7 +5852,7 @@ type DeciderResourceProperties = {
|
|
|
6016
5852
|
/**
|
|
6017
5853
|
* The policies every decision's backend acts under. Use { "ref": "LogicalId" } for a policy in the template. The deploying caller must hold every grant they carry inside the project, else the resource fails with `POLICY_GRANT_NOT_HELD`.
|
|
6018
5854
|
*/
|
|
6019
|
-
policy_ids:
|
|
5855
|
+
policy_ids: AttachedPolicyIds;
|
|
6020
5856
|
/**
|
|
6021
5857
|
* Human-readable name, unique per project
|
|
6022
5858
|
*/
|
|
@@ -6033,12 +5869,7 @@ type DeciderResourceProperties = {
|
|
|
6033
5869
|
* The tool that answers, run with no action
|
|
6034
5870
|
*/
|
|
6035
5871
|
tool_id?: string | null;
|
|
6036
|
-
|
|
6037
|
-
* The questions (`type`, `name`, `instructions`, `choices` or `levels`), 1 to 20 of them, validated as the deciders REST contract validates them.
|
|
6038
|
-
*/
|
|
6039
|
-
questions: Array<{
|
|
6040
|
-
[key: string]: unknown;
|
|
6041
|
-
}>;
|
|
5872
|
+
questions: DeciderQuestions;
|
|
6042
5873
|
};
|
|
6043
5874
|
/**
|
|
6044
5875
|
* Creates a playbook — a versioned template of nodes that cases are filled against. An executor's `id` and a transformation's `tool` accept a `{ "ref": … }` to a resource in the same template. The version a deploy writes runs under its `policy_ids`, checked as a direct write is: `playbooks:CreatePlaybook` plus the start action of every executor it names, holding every grant of its `policy_ids`. Only a change to `definition` or `policy_ids` archives a new version; a playbook with cases is not deleted. Mirrors the playbooks REST contract.
|
|
@@ -6059,7 +5890,7 @@ type PlaybookResourceProperties = {
|
|
|
6059
5890
|
/**
|
|
6060
5891
|
* The policies every execution of the version runs under. Use { "ref": "LogicalId" } for a policy in the template. The deploying caller must hold every grant they carry inside the project, else the resource fails with `POLICY_GRANT_NOT_HELD`.
|
|
6061
5892
|
*/
|
|
6062
|
-
policy_ids:
|
|
5893
|
+
policy_ids: AttachedPolicyIds;
|
|
6063
5894
|
/**
|
|
6064
5895
|
* Whether each new version moves the playbook's cases to it. Defaults to `false`.
|
|
6065
5896
|
*/
|
|
@@ -6262,6 +6093,18 @@ type FormationOperation = {
|
|
|
6262
6093
|
created_at?: Date;
|
|
6263
6094
|
updated_at?: Date;
|
|
6264
6095
|
};
|
|
6096
|
+
/**
|
|
6097
|
+
* Event type patterns: `*` matches every event, `prefix.*` a namespace, or an exact name such as `documents.ingested` or a custom name an orchestration emits. A pattern in a platform namespace must match a registered event, else `400 INVALID_EVENT_PATTERN`.
|
|
6098
|
+
*/
|
|
6099
|
+
type EventTypePatterns = Array<string>;
|
|
6100
|
+
/**
|
|
6101
|
+
* SRN patterns with IAM wildcards (`srn:<project>:<type>:<id>` or `*`); an event is received only when its resource matches one. Null or omitted matches any resource in the project.
|
|
6102
|
+
*/
|
|
6103
|
+
type EventResourcePatterns = Array<string>;
|
|
6104
|
+
/**
|
|
6105
|
+
* A filter the event's `data` must match: a top-level field to a value, or to `in`, `gt`, `gte`, `lt`, `lte`, `prefix`. An absent field never matches.
|
|
6106
|
+
*/
|
|
6107
|
+
type EventDataFilter = StructuredFilter;
|
|
6265
6108
|
/**
|
|
6266
6109
|
* Narrows results by a JSON field, such as the `metadata` bag. Each key is a field; its value is either a value to match exactly, or an object naming one or more operators.
|
|
6267
6110
|
*
|
|
@@ -6274,6 +6117,90 @@ type FormationOperation = {
|
|
|
6274
6117
|
type StructuredFilter = {
|
|
6275
6118
|
[key: string]: unknown;
|
|
6276
6119
|
};
|
|
6120
|
+
type PolicyDocument = {
|
|
6121
|
+
statement: Array<PolicyStatement>;
|
|
6122
|
+
};
|
|
6123
|
+
type PolicyStatement = {
|
|
6124
|
+
effect: 'Allow' | 'Deny';
|
|
6125
|
+
action: Array<string>;
|
|
6126
|
+
/**
|
|
6127
|
+
* Resource SRN patterns. Omitted, an `Allow` in a project policy matches every resource of the policy's project (`srn:<project_id>:*:*`); anywhere else it matches every resource.
|
|
6128
|
+
*/
|
|
6129
|
+
resource?: Array<string>;
|
|
6130
|
+
/**
|
|
6131
|
+
* Optional condition block. Keys are condition operators (e.g. StringEquals) mapping to context-key/value maps; evaluated by the policy compiler. A context key must be one the platform supplies — `iam:ResourceType`, `iam:ResourceTag/<tag>` (the tag on the target resource) or `iam:RequestTag/<key>` (the tag value the request writes) — because an unknown key is absent from the evaluation context, so a `Deny` naming one would never deny. The tag name after the slash is opaque and unconstrained. Operator and context keys are matched by exact string and are never case-converted, so they round-trip exactly as written: `iam:ResourceTag/cost_center` selects the tag `cost_center`, not `costCenter`.
|
|
6132
|
+
*
|
|
6133
|
+
*/
|
|
6134
|
+
condition?: {
|
|
6135
|
+
[key: string]: unknown;
|
|
6136
|
+
};
|
|
6137
|
+
denial?: PolicyDenial;
|
|
6138
|
+
};
|
|
6139
|
+
/**
|
|
6140
|
+
* On a `Deny` only: what a request this statement denies answers in place of `FORBIDDEN`. `code` is one the deployment declares; `meta` is added beside `action`, `resource` and `denied_by`. Only an unrestricted admin writes a policy carrying one (`403 POLICY_DENIAL_RESERVED`).
|
|
6141
|
+
*/
|
|
6142
|
+
type PolicyDenial = {
|
|
6143
|
+
code: string;
|
|
6144
|
+
message: string;
|
|
6145
|
+
/**
|
|
6146
|
+
* Snake_case keys, none of `action`, `resource`, `denied_by`.
|
|
6147
|
+
*/
|
|
6148
|
+
meta?: {
|
|
6149
|
+
[key: string]: unknown;
|
|
6150
|
+
};
|
|
6151
|
+
};
|
|
6152
|
+
/**
|
|
6153
|
+
* The provider's authorization endpoint. Query parameters it already carries are kept.
|
|
6154
|
+
*/
|
|
6155
|
+
type AuthorizeUrl = string;
|
|
6156
|
+
/**
|
|
6157
|
+
* The provider's token endpoint.
|
|
6158
|
+
*/
|
|
6159
|
+
type TokenUrl = string;
|
|
6160
|
+
/**
|
|
6161
|
+
* The provider's RFC 7009 revocation endpoint, called when a connection is deleted. `null` skips revocation.
|
|
6162
|
+
*/
|
|
6163
|
+
type RevocationUrl = string | null;
|
|
6164
|
+
/**
|
|
6165
|
+
* Your app's client ID at the provider.
|
|
6166
|
+
*/
|
|
6167
|
+
type ClientId = string;
|
|
6168
|
+
/**
|
|
6169
|
+
* A `{{secret:sec_...}}` reference to your app's client secret, never the value. `null` for a public client, which relies on PKCE.
|
|
6170
|
+
*/
|
|
6171
|
+
type ClientSecret = string | null;
|
|
6172
|
+
/**
|
|
6173
|
+
* The scopes requested at authorization.
|
|
6174
|
+
*/
|
|
6175
|
+
type Scopes = Array<string>;
|
|
6176
|
+
/**
|
|
6177
|
+
* Whether the authorization uses PKCE (`S256`).
|
|
6178
|
+
*/
|
|
6179
|
+
type Pkce = boolean;
|
|
6180
|
+
/**
|
|
6181
|
+
* How the client authenticates at the token endpoint.
|
|
6182
|
+
*/
|
|
6183
|
+
type TokenEndpointAuthMethod = 'client_secret_basic' | 'client_secret_post';
|
|
6184
|
+
/**
|
|
6185
|
+
* The callback the provider redirects to, as registered with the provider. Absent on create, or `null`, it is this API's own `https://api.naturali.ai/v1/oauth/callback`, the URL to register with the provider; a front end that receives the redirect itself forwards `code` and `state` there.
|
|
6186
|
+
*/
|
|
6187
|
+
type RedirectUri = string | null;
|
|
6188
|
+
/**
|
|
6189
|
+
* Extra query parameters for the authorize URL, such as Google's `access_type: offline` and `prompt: consent` for a refresh token.
|
|
6190
|
+
*/
|
|
6191
|
+
type AuthorizeParams = {
|
|
6192
|
+
[key: string]: string;
|
|
6193
|
+
} | null;
|
|
6194
|
+
/**
|
|
6195
|
+
* The event a firing reads. `generations.completed` fires once per completed turn whatever the transport, and is the only event the built-in extractor may bind to. `conversation_messages.generated` fires per persisted assistant reply and is conversation-backed, so it is for custom handlers.
|
|
6196
|
+
*/
|
|
6197
|
+
type MemoryRuleEvent = 'generations.completed' | 'conversation_messages.generated';
|
|
6198
|
+
/**
|
|
6199
|
+
* The shape of a completed run's `output`, owned by the orchestration rather than by its terminal node ids. Each key is an output field (a dotted key such as `summary.title` builds a nested object, and no segment may be `__proto__`, `constructor` or `prototype`); each value is JSON Logic (https://jsonlogic.com) evaluated against `{ "state": <final run state> }`, which includes `state.input` and `state.nodes.<id>`. A missing path maps to `null`; a mapping that throws fails the run. Null (or omitted) keys `output` by terminal node id. Versioned with the graph; `null` on update clears it.
|
|
6200
|
+
*/
|
|
6201
|
+
type OrchestrationOutputMapping = {
|
|
6202
|
+
[key: string]: unknown;
|
|
6203
|
+
} | null;
|
|
6277
6204
|
type PlaybookDefinition = {
|
|
6278
6205
|
/**
|
|
6279
6206
|
* Playbooks whose cases a case of this one binds at create, one per name; many cases may share one upstream case.
|
|
@@ -7648,10 +7575,6 @@ type MemoryWriteResult = Memory & {
|
|
|
7648
7575
|
*/
|
|
7649
7576
|
action?: 'created' | 'superseded' | 'skipped';
|
|
7650
7577
|
};
|
|
7651
|
-
/**
|
|
7652
|
-
* The event a firing reads. `generations.completed` fires once per completed turn whatever the transport, and is the only event the built-in extractor may bind to. `conversation_messages.generated` fires per persisted assistant reply and is conversation-backed, so it is for custom handlers.
|
|
7653
|
-
*/
|
|
7654
|
-
type MemoryRuleEvent = 'generations.completed' | 'conversation_messages.generated';
|
|
7655
7578
|
type MemoryRule = {
|
|
7656
7579
|
/**
|
|
7657
7580
|
* The policies every handler the rule starts acts under. Empty for one written without any, which does not run until a write gives it one.
|
|
@@ -7806,48 +7729,6 @@ type Model = {
|
|
|
7806
7729
|
*/
|
|
7807
7730
|
synced_at: Date;
|
|
7808
7731
|
};
|
|
7809
|
-
/**
|
|
7810
|
-
* The provider's authorization endpoint. Query parameters it already carries are kept.
|
|
7811
|
-
*/
|
|
7812
|
-
type AuthorizeUrl = string;
|
|
7813
|
-
/**
|
|
7814
|
-
* The provider's token endpoint.
|
|
7815
|
-
*/
|
|
7816
|
-
type TokenUrl = string;
|
|
7817
|
-
/**
|
|
7818
|
-
* The provider's RFC 7009 revocation endpoint, called when a connection is deleted. `null` skips revocation.
|
|
7819
|
-
*/
|
|
7820
|
-
type RevocationUrl = string | null;
|
|
7821
|
-
/**
|
|
7822
|
-
* Your app's client ID at the provider.
|
|
7823
|
-
*/
|
|
7824
|
-
type ClientId = string;
|
|
7825
|
-
/**
|
|
7826
|
-
* A `{{secret:sec_...}}` reference to your app's client secret, never the value. `null` for a public client, which relies on PKCE.
|
|
7827
|
-
*/
|
|
7828
|
-
type ClientSecret = string | null;
|
|
7829
|
-
/**
|
|
7830
|
-
* The scopes requested at authorization.
|
|
7831
|
-
*/
|
|
7832
|
-
type Scopes = Array<string>;
|
|
7833
|
-
/**
|
|
7834
|
-
* Whether the authorization uses PKCE (`S256`).
|
|
7835
|
-
*/
|
|
7836
|
-
type Pkce = boolean;
|
|
7837
|
-
/**
|
|
7838
|
-
* How the client authenticates at the token endpoint.
|
|
7839
|
-
*/
|
|
7840
|
-
type TokenEndpointAuthMethod = 'client_secret_basic' | 'client_secret_post';
|
|
7841
|
-
/**
|
|
7842
|
-
* The callback the provider redirects to, as registered with the provider. Absent on create, or `null`, it is this API's own `https://api.naturali.ai/v1/oauth/callback`, the URL to register with the provider; a front end that receives the redirect itself forwards `code` and `state` there.
|
|
7843
|
-
*/
|
|
7844
|
-
type RedirectUri = string | null;
|
|
7845
|
-
/**
|
|
7846
|
-
* Extra query parameters for the authorize URL, such as Google's `access_type: offline` and `prompt: consent` for a refresh token.
|
|
7847
|
-
*/
|
|
7848
|
-
type AuthorizeParams = {
|
|
7849
|
-
[key: string]: string;
|
|
7850
|
-
} | null;
|
|
7851
7732
|
type OauthClient = {
|
|
7852
7733
|
id?: string;
|
|
7853
7734
|
project_id?: string;
|
|
@@ -8187,12 +8068,6 @@ type Orchestration = {
|
|
|
8187
8068
|
created_at: Date;
|
|
8188
8069
|
updated_at: Date;
|
|
8189
8070
|
};
|
|
8190
|
-
/**
|
|
8191
|
-
* The shape of a completed run's `output`, owned by the orchestration rather than by its terminal node ids. Each key is an output field (a dotted key such as `summary.title` builds a nested object, and no segment may be `__proto__`, `constructor` or `prototype`); each value is JSON Logic (https://jsonlogic.com) evaluated against `{ "state": <final run state> }`, which includes `state.input` and `state.nodes.<id>`. A missing path maps to `null`; a mapping that throws fails the run. Null (or omitted) keys `output` by terminal node id. Versioned with the graph; `null` on update clears it.
|
|
8192
|
-
*/
|
|
8193
|
-
type OrchestrationOutputMapping = {
|
|
8194
|
-
[key: string]: unknown;
|
|
8195
|
-
} | null;
|
|
8196
8071
|
type CreateOrchestrationRequest = {
|
|
8197
8072
|
/**
|
|
8198
8073
|
* Human-readable name.
|
|
@@ -9122,38 +8997,6 @@ type ConfirmPlaybookCaseNodeRequest = {
|
|
|
9122
8997
|
*/
|
|
9123
8998
|
wait?: boolean;
|
|
9124
8999
|
};
|
|
9125
|
-
type PolicyStatement = {
|
|
9126
|
-
effect: 'Allow' | 'Deny';
|
|
9127
|
-
action: Array<string>;
|
|
9128
|
-
/**
|
|
9129
|
-
* Resource SRN patterns. Omitted, an `Allow` in a project policy matches every resource of the policy's project (`srn:<project_id>:*:*`); anywhere else it matches every resource.
|
|
9130
|
-
*/
|
|
9131
|
-
resource?: Array<string>;
|
|
9132
|
-
/**
|
|
9133
|
-
* Optional condition block. Keys are condition operators (e.g. StringEquals) mapping to context-key/value maps; evaluated by the policy compiler. A context key must be one the platform supplies — `iam:ResourceType`, `iam:ResourceTag/<tag>` (the tag on the target resource) or `iam:RequestTag/<key>` (the tag value the request writes) — because an unknown key is absent from the evaluation context, so a `Deny` naming one would never deny. The tag name after the slash is opaque and unconstrained. Operator and context keys are matched by exact string and are never case-converted, so they round-trip exactly as written: `iam:ResourceTag/cost_center` selects the tag `cost_center`, not `costCenter`.
|
|
9134
|
-
*
|
|
9135
|
-
*/
|
|
9136
|
-
condition?: {
|
|
9137
|
-
[key: string]: unknown;
|
|
9138
|
-
};
|
|
9139
|
-
denial?: PolicyDenial;
|
|
9140
|
-
};
|
|
9141
|
-
/**
|
|
9142
|
-
* On a `Deny` only: what a request this statement denies answers in place of `FORBIDDEN`. `code` is one the deployment declares; `meta` is added beside `action`, `resource` and `denied_by`. Only an unrestricted admin writes a policy carrying one (`403 POLICY_DENIAL_RESERVED`).
|
|
9143
|
-
*/
|
|
9144
|
-
type PolicyDenial = {
|
|
9145
|
-
code: string;
|
|
9146
|
-
message: string;
|
|
9147
|
-
/**
|
|
9148
|
-
* Snake_case keys, none of `action`, `resource`, `denied_by`.
|
|
9149
|
-
*/
|
|
9150
|
-
meta?: {
|
|
9151
|
-
[key: string]: unknown;
|
|
9152
|
-
};
|
|
9153
|
-
};
|
|
9154
|
-
type PolicyDocument = {
|
|
9155
|
-
statement: Array<PolicyStatement>;
|
|
9156
|
-
};
|
|
9157
9000
|
type PolicyRecord = {
|
|
9158
9001
|
/**
|
|
9159
9002
|
* Public policy ID (pol_ prefix)
|
|
@@ -10850,18 +10693,6 @@ type TriggerFiring = {
|
|
|
10850
10693
|
type TriggerFiringListResponse = Page & {
|
|
10851
10694
|
data?: Array<TriggerFiring>;
|
|
10852
10695
|
};
|
|
10853
|
-
/**
|
|
10854
|
-
* Event type patterns: `*` matches every event, `prefix.*` a namespace, or an exact name such as `documents.ingested` or a custom name an orchestration emits. A pattern in a platform namespace must match a registered event, else `400 INVALID_EVENT_PATTERN`.
|
|
10855
|
-
*/
|
|
10856
|
-
type EventTypePatterns = Array<string>;
|
|
10857
|
-
/**
|
|
10858
|
-
* SRN patterns with IAM wildcards (`srn:<project>:<type>:<id>` or `*`); an event is received only when its resource matches one. Null or omitted matches any resource in the project.
|
|
10859
|
-
*/
|
|
10860
|
-
type EventResourcePatterns = Array<string>;
|
|
10861
|
-
/**
|
|
10862
|
-
* A filter the event's `data` must match: a top-level field to a value, or to `in`, `gt`, `gte`, `lt`, `lte`, `prefix`. An absent field never matches.
|
|
10863
|
-
*/
|
|
10864
|
-
type EventDataFilter = StructuredFilter;
|
|
10865
10696
|
/**
|
|
10866
10697
|
* Send at least one field.
|
|
10867
10698
|
*/
|
|
@@ -11535,6 +11366,10 @@ type FileRecordWritable = {
|
|
|
11535
11366
|
*/
|
|
11536
11367
|
updated_at?: Date;
|
|
11537
11368
|
};
|
|
11369
|
+
/**
|
|
11370
|
+
* A filter the event's `data` must match: a top-level field to a value, or to `in`, `gt`, `gte`, `lt`, `lte`, `prefix`. An absent field never matches.
|
|
11371
|
+
*/
|
|
11372
|
+
type EventDataFilterWritable = StructuredFilter;
|
|
11538
11373
|
/**
|
|
11539
11374
|
* A messaging channel connecting an agent to a transport.
|
|
11540
11375
|
*/
|
|
@@ -11710,10 +11545,6 @@ type ToolWritable = {
|
|
|
11710
11545
|
created_at?: Date;
|
|
11711
11546
|
updated_at?: Date;
|
|
11712
11547
|
};
|
|
11713
|
-
/**
|
|
11714
|
-
* A filter the event's `data` must match: a top-level field to a value, or to `in`, `gt`, `gte`, `lt`, `lte`, `prefix`. An absent field never matches.
|
|
11715
|
-
*/
|
|
11716
|
-
type EventDataFilterWritable = StructuredFilter;
|
|
11717
11548
|
/**
|
|
11718
11549
|
* Project public ID (proj_ prefix).
|
|
11719
11550
|
*/
|
package/dist/index.d.mts
CHANGED
|
@@ -2207,6 +2207,14 @@ type InputLimits = {
|
|
|
2207
2207
|
audio?: number;
|
|
2208
2208
|
video?: number;
|
|
2209
2209
|
};
|
|
2210
|
+
/**
|
|
2211
|
+
* Seconds per audio or video file part, read from the container's headers; a part whose duration cannot be read is refused with `MEDIA_PARSE_FAILED`
|
|
2212
|
+
*
|
|
2213
|
+
*/
|
|
2214
|
+
max_duration_seconds?: {
|
|
2215
|
+
audio?: number;
|
|
2216
|
+
video?: number;
|
|
2217
|
+
};
|
|
2210
2218
|
/**
|
|
2211
2219
|
* Pages per PDF file part
|
|
2212
2220
|
*/
|
|
@@ -3418,6 +3426,10 @@ type ConversationMessageRecord = {
|
|
|
3418
3426
|
* Files the turn sends the model natively, in order; empty when none.
|
|
3419
3427
|
*/
|
|
3420
3428
|
file_ids?: Array<string>;
|
|
3429
|
+
/**
|
|
3430
|
+
* The `output.citations` of the generation that produced this assistant message, `quoted_text` included; `answer_span` points into `content`. Empty when that turn cited and none verified; null when no citing turn produced the message.
|
|
3431
|
+
*/
|
|
3432
|
+
citations?: Array<Citation> | null;
|
|
3421
3433
|
/**
|
|
3422
3434
|
* The idempotency key the message was posted with, null when none was sent. A channel that posts each inbound message under its provider's message id finds the transcript row for that message by this key.
|
|
3423
3435
|
*/
|
|
@@ -5072,7 +5084,7 @@ type AiProviderResourceProperties = {
|
|
|
5072
5084
|
*/
|
|
5073
5085
|
model_input_modalities?: ModelInputModalities;
|
|
5074
5086
|
/**
|
|
5075
|
-
* Model name (or alias) → the input limits it declares, each a positive integer: `max_bytes` per file part of a modality, `max_pages` per PDF, `max_parts` file parts per request. A request over one is refused with `INPUT_LIMIT_EXCEEDED` (400) before the provider is called; a model absent from the map, or a limit it omits, is not checked.
|
|
5087
|
+
* Model name (or alias) → the input limits it declares, each a positive integer: `max_bytes` per file part of a modality, `max_duration_seconds` per audio or video part, `max_pages` per PDF, `max_parts` file parts per request. A request over one is refused with `INPUT_LIMIT_EXCEEDED` (400) before the provider is called; a model absent from the map, or a limit it omits, is not checked.
|
|
5076
5088
|
*/
|
|
5077
5089
|
model_input_limits?: ModelInputLimits;
|
|
5078
5090
|
/**
|
|
@@ -5102,93 +5114,8 @@ type ToolResourceProperties = {
|
|
|
5102
5114
|
parameters?: {
|
|
5103
5115
|
[key: string]: unknown;
|
|
5104
5116
|
} | null;
|
|
5105
|
-
|
|
5106
|
-
|
|
5107
|
-
*/
|
|
5108
|
-
execute?: {
|
|
5109
|
-
/**
|
|
5110
|
-
* Endpoint URL. Supports `{param}` placeholders resolved from tool arguments.
|
|
5111
|
-
*/
|
|
5112
|
-
url?: string;
|
|
5113
|
-
/**
|
|
5114
|
-
* HTTP method (default: `POST`)
|
|
5115
|
-
*/
|
|
5116
|
-
method?: string | null;
|
|
5117
|
-
/**
|
|
5118
|
-
* Static headers included in every request
|
|
5119
|
-
*/
|
|
5120
|
-
headers?: {
|
|
5121
|
-
[key: string]: unknown;
|
|
5122
|
-
} | null;
|
|
5123
|
-
/**
|
|
5124
|
-
* Request body encoding for `POST`/`PUT`/`PATCH`: `json` (default) or `multipart`. Incompatible with `auth.type: aws_sigv4`.
|
|
5125
|
-
*/
|
|
5126
|
-
body_mode?: 'json' | 'multipart' | null;
|
|
5127
|
-
/**
|
|
5128
|
-
* How a 2xx response body is returned: `json` (default) or `base64`, which returns `{ content_type, filename, data_base64 }` for binary targets.
|
|
5129
|
-
*/
|
|
5130
|
-
response_mode?: 'json' | 'base64' | null;
|
|
5131
|
-
/**
|
|
5132
|
-
* Computed request credential. `type` is `aws_sigv4` (with `region`, `service`, `access_key_id`, `secret_access_key` and optional `session_token`), `gcp_service_account` (with `credentials` and `scopes`) or `oauth_connection` (with `oauth_client_id`). Credential fields accept `{{secret:...}}` references.
|
|
5133
|
-
*/
|
|
5134
|
-
auth?: {
|
|
5135
|
-
/**
|
|
5136
|
-
* Which credential is computed.
|
|
5137
|
-
*/
|
|
5138
|
-
type?: 'aws_sigv4' | 'gcp_service_account' | 'oauth_connection';
|
|
5139
|
-
/**
|
|
5140
|
-
* `aws_sigv4`: the signing region
|
|
5141
|
-
*/
|
|
5142
|
-
region?: string | null;
|
|
5143
|
-
/**
|
|
5144
|
-
* `aws_sigv4`: the signing service
|
|
5145
|
-
*/
|
|
5146
|
-
service?: string | null;
|
|
5147
|
-
/**
|
|
5148
|
-
* `aws_sigv4`: the access key id
|
|
5149
|
-
*/
|
|
5150
|
-
access_key_id?: string | null;
|
|
5151
|
-
/**
|
|
5152
|
-
* `aws_sigv4`: the secret access key
|
|
5153
|
-
*/
|
|
5154
|
-
secret_access_key?: string | null;
|
|
5155
|
-
/**
|
|
5156
|
-
* `aws_sigv4`: the temporary credential's session token
|
|
5157
|
-
*/
|
|
5158
|
-
session_token?: string | null;
|
|
5159
|
-
/**
|
|
5160
|
-
* `gcp_service_account`: the service account key file JSON, as a string
|
|
5161
|
-
*/
|
|
5162
|
-
credentials?: string | null;
|
|
5163
|
-
/**
|
|
5164
|
-
* `gcp_service_account`: the scopes to mint for
|
|
5165
|
-
*/
|
|
5166
|
-
scopes?: Array<string> | null;
|
|
5167
|
-
/**
|
|
5168
|
-
* `oauth_connection`: the OAuth client whose connection the turn's actor holds; `{ "ref": "<LogicalId>" }` for a template `oauth_client`
|
|
5169
|
-
*/
|
|
5170
|
-
oauth_client_id?: string | null;
|
|
5171
|
-
} | null;
|
|
5172
|
-
} | null;
|
|
5173
|
-
/**
|
|
5174
|
-
* MCP server connection configuration. Required for `mcp` tools.
|
|
5175
|
-
*/
|
|
5176
|
-
mcp?: {
|
|
5177
|
-
/**
|
|
5178
|
-
* MCP server URL
|
|
5179
|
-
*/
|
|
5180
|
-
url?: string;
|
|
5181
|
-
/**
|
|
5182
|
-
* Headers included in every MCP request
|
|
5183
|
-
*/
|
|
5184
|
-
headers?: {
|
|
5185
|
-
[key: string]: unknown;
|
|
5186
|
-
} | null;
|
|
5187
|
-
/**
|
|
5188
|
-
* Pin each action's definition on the first listing and withhold an action whose definition drifts. Re-applying an unchanged `mcp` keeps the pins; a new `url` clears them.
|
|
5189
|
-
*/
|
|
5190
|
-
pin_definitions?: boolean;
|
|
5191
|
-
} | null;
|
|
5117
|
+
execute?: ToolExecuteConfig;
|
|
5118
|
+
mcp?: ToolMcpConfig;
|
|
5192
5119
|
/**
|
|
5193
5120
|
* Allowlist of actions the tool exposes. For `builtin` tools: action names. For `mcp` tools: an optional allowlist of MCP tool names to scope the server surface (`null` exposes every tool).
|
|
5194
5121
|
*/
|
|
@@ -5257,12 +5184,7 @@ type DatasetItemResourceProperties = {
|
|
|
5257
5184
|
* Public ID of the parent dataset (or ref expression)
|
|
5258
5185
|
*/
|
|
5259
5186
|
dataset_id: string;
|
|
5260
|
-
|
|
5261
|
-
* The messages sent to the agent, as `{role, content}` objects
|
|
5262
|
-
*/
|
|
5263
|
-
input: Array<{
|
|
5264
|
-
[key: string]: unknown;
|
|
5265
|
-
}>;
|
|
5187
|
+
input: DatasetItemInput;
|
|
5266
5188
|
/**
|
|
5267
5189
|
* Reference answer for exact_match / contains / embedding_similarity / llm_judge scorers
|
|
5268
5190
|
*/
|
|
@@ -5279,7 +5201,7 @@ type EvalResourceProperties = {
|
|
|
5279
5201
|
/**
|
|
5280
5202
|
* The policies every run of the eval acts under. Use { "ref": "LogicalId" } for a policy in the template. The deploying caller must hold every grant they carry inside the project, else the resource fails with `POLICY_GRANT_NOT_HELD`.
|
|
5281
5203
|
*/
|
|
5282
|
-
policy_ids:
|
|
5204
|
+
policy_ids: AttachedPolicyIds;
|
|
5283
5205
|
/**
|
|
5284
5206
|
* Eval name, unique within the project
|
|
5285
5207
|
*/
|
|
@@ -5292,12 +5214,7 @@ type EvalResourceProperties = {
|
|
|
5292
5214
|
* Public ID of the dataset to run against (or ref expression)
|
|
5293
5215
|
*/
|
|
5294
5216
|
dataset_id: string;
|
|
5295
|
-
|
|
5296
|
-
* Scorer configs — `exact_match`, `contains`, `json_logic`, `output_schema`, `embedding_similarity`, `llm_judge`, `tool`, or `decider`. Same shape as the evals REST contract.
|
|
5297
|
-
*/
|
|
5298
|
-
scorers: Array<{
|
|
5299
|
-
[key: string]: unknown;
|
|
5300
|
-
}>;
|
|
5217
|
+
scorers: Scorers;
|
|
5301
5218
|
/**
|
|
5302
5219
|
* 0–1. A run's verdict reads the 95% interval of its pass rate over non-errored items against this. Omit for a run that reports scores without a verdict.
|
|
5303
5220
|
*/
|
|
@@ -5343,12 +5260,7 @@ type DocumentResourceProperties = {
|
|
|
5343
5260
|
* Arbitrary metadata key-value pairs
|
|
5344
5261
|
*/
|
|
5345
5262
|
metadata?: NullableMetadataBag;
|
|
5346
|
-
|
|
5347
|
-
* Tag key-value pairs for filtering
|
|
5348
|
-
*/
|
|
5349
|
-
tags?: {
|
|
5350
|
-
[key: string]: unknown;
|
|
5351
|
-
};
|
|
5263
|
+
tags?: TagBag;
|
|
5352
5264
|
/**
|
|
5353
5265
|
* How to split the content into embeddable chunks, matching `POST /documents`. `whole` (default) stores the content as a single chunk; `size` splits into fixed-size character windows with overlap. `page` is equivalent to `whole` for plain text.
|
|
5354
5266
|
*/
|
|
@@ -5502,7 +5414,7 @@ type TriggerResourceProperties = {
|
|
|
5502
5414
|
/**
|
|
5503
5415
|
* Event type patterns (`*`, `prefix.*`, or an exact event name). Required when type is event, rejected otherwise
|
|
5504
5416
|
*/
|
|
5505
|
-
events?:
|
|
5417
|
+
events?: EventTypePatterns | null;
|
|
5506
5418
|
/**
|
|
5507
5419
|
* One event type pattern, the same as `events` of one item
|
|
5508
5420
|
*/
|
|
@@ -5510,11 +5422,11 @@ type TriggerResourceProperties = {
|
|
|
5510
5422
|
/**
|
|
5511
5423
|
* Event triggers only: SRN patterns the event's resource must match. Omitted matches any resource in the project
|
|
5512
5424
|
*/
|
|
5513
|
-
event_resources?:
|
|
5425
|
+
event_resources?: EventResourcePatterns | null;
|
|
5514
5426
|
/**
|
|
5515
5427
|
* Event triggers only. A filter the event's `data` must match
|
|
5516
5428
|
*/
|
|
5517
|
-
event_data?:
|
|
5429
|
+
event_data?: EventDataFilter | null;
|
|
5518
5430
|
/**
|
|
5519
5431
|
* Whether the trigger fires (default true)
|
|
5520
5432
|
*/
|
|
@@ -5522,7 +5434,7 @@ type TriggerResourceProperties = {
|
|
|
5522
5434
|
/**
|
|
5523
5435
|
* The policies every firing acts under. Use { "ref": "LogicalId" } for a policy in the template. The deploying caller must hold every grant they carry inside the project, else the resource fails with `POLICY_GRANT_NOT_HELD`.
|
|
5524
5436
|
*/
|
|
5525
|
-
policy_ids:
|
|
5437
|
+
policy_ids: AttachedPolicyIds;
|
|
5526
5438
|
};
|
|
5527
5439
|
/**
|
|
5528
5440
|
* Creates a conversation within the formation's project.
|
|
@@ -5578,41 +5490,7 @@ type PolicyResourceProperties = {
|
|
|
5578
5490
|
* Description of what the policy grants
|
|
5579
5491
|
*/
|
|
5580
5492
|
description?: string;
|
|
5581
|
-
|
|
5582
|
-
* Policy document containing an array of statements
|
|
5583
|
-
*/
|
|
5584
|
-
document: {
|
|
5585
|
-
/**
|
|
5586
|
-
* IAM policy statements.
|
|
5587
|
-
*/
|
|
5588
|
-
statement?: Array<{
|
|
5589
|
-
effect: 'Allow' | 'Deny';
|
|
5590
|
-
/**
|
|
5591
|
-
* IAM action strings, e.g. `memories:*`.
|
|
5592
|
-
*/
|
|
5593
|
-
action: Array<string>;
|
|
5594
|
-
/**
|
|
5595
|
-
* Resource SRN patterns. Omitted, an `Allow` matches every resource of the formation's project (`srn:<project_id>:*:*`); a `Deny` matches every resource.
|
|
5596
|
-
*/
|
|
5597
|
-
resource?: Array<string> | null;
|
|
5598
|
-
/**
|
|
5599
|
-
* Condition block: keys are condition operators mapping to context-key/value maps.
|
|
5600
|
-
*/
|
|
5601
|
-
condition?: {
|
|
5602
|
-
[key: string]: unknown;
|
|
5603
|
-
} | null;
|
|
5604
|
-
/**
|
|
5605
|
-
* On a `Deny` only: the declared `code`, `message` and `meta` a request it denies answers. Only an unrestricted admin deploys one.
|
|
5606
|
-
*/
|
|
5607
|
-
denial?: {
|
|
5608
|
-
code: string;
|
|
5609
|
-
message: string;
|
|
5610
|
-
meta?: {
|
|
5611
|
-
[key: string]: unknown;
|
|
5612
|
-
};
|
|
5613
|
-
} | null;
|
|
5614
|
-
}>;
|
|
5615
|
-
};
|
|
5493
|
+
document: PolicyDocument;
|
|
5616
5494
|
};
|
|
5617
5495
|
/**
|
|
5618
5496
|
* Creates an encrypted secret within the formation's project.
|
|
@@ -5635,48 +5513,19 @@ type OauthClientResourceProperties = {
|
|
|
5635
5513
|
* Display name
|
|
5636
5514
|
*/
|
|
5637
5515
|
name: string;
|
|
5638
|
-
|
|
5639
|
-
|
|
5640
|
-
|
|
5641
|
-
|
|
5642
|
-
/**
|
|
5643
|
-
* The provider's token endpoint
|
|
5644
|
-
*/
|
|
5645
|
-
token_url: string;
|
|
5646
|
-
/**
|
|
5647
|
-
* The provider's RFC 7009 revocation endpoint
|
|
5648
|
-
*/
|
|
5649
|
-
revocation_url?: string | null;
|
|
5650
|
-
/**
|
|
5651
|
-
* Your app's client ID at the provider
|
|
5652
|
-
*/
|
|
5653
|
-
client_id: string;
|
|
5516
|
+
authorize_url: AuthorizeUrl;
|
|
5517
|
+
token_url: TokenUrl;
|
|
5518
|
+
revocation_url?: RevocationUrl;
|
|
5519
|
+
client_id: ClientId;
|
|
5654
5520
|
/**
|
|
5655
5521
|
* A `{{secret:sec_...}}` reference to the client secret, never the value; for a template secret, `{ "sub": "{{secret:${MySecret}}}" }`. Omit for a public client, which relies on PKCE.
|
|
5656
5522
|
*/
|
|
5657
|
-
client_secret?:
|
|
5658
|
-
|
|
5659
|
-
|
|
5660
|
-
|
|
5661
|
-
|
|
5662
|
-
|
|
5663
|
-
* Whether the authorization uses PKCE (`S256`); default `true`
|
|
5664
|
-
*/
|
|
5665
|
-
pkce?: boolean;
|
|
5666
|
-
/**
|
|
5667
|
-
* How the client authenticates at the token endpoint
|
|
5668
|
-
*/
|
|
5669
|
-
token_endpoint_auth_method?: 'client_secret_basic' | 'client_secret_post';
|
|
5670
|
-
/**
|
|
5671
|
-
* The callback registered with the provider. Omitted or `null`, it is this API's own `https://api.naturali.ai/v1/oauth/callback`, the URL to register with the provider.
|
|
5672
|
-
*/
|
|
5673
|
-
redirect_uri?: string | null;
|
|
5674
|
-
/**
|
|
5675
|
-
* Extra query parameters for the authorize URL
|
|
5676
|
-
*/
|
|
5677
|
-
authorize_params?: {
|
|
5678
|
-
[key: string]: string;
|
|
5679
|
-
} | null;
|
|
5523
|
+
client_secret?: ClientSecret | null;
|
|
5524
|
+
scopes: Scopes;
|
|
5525
|
+
pkce?: Pkce;
|
|
5526
|
+
token_endpoint_auth_method?: TokenEndpointAuthMethod;
|
|
5527
|
+
redirect_uri?: RedirectUri;
|
|
5528
|
+
authorize_params?: AuthorizeParams;
|
|
5680
5529
|
};
|
|
5681
5530
|
/**
|
|
5682
5531
|
* Creates a session attached to an agent within the formation's project.
|
|
@@ -5720,7 +5569,7 @@ type IngestionRuleResourceProperties = {
|
|
|
5720
5569
|
/**
|
|
5721
5570
|
* The policies every conversion the rule starts acts under. Use { "ref": "LogicalId" } for a policy in the template. The deploying caller must hold every grant they carry inside the project, else the resource fails with `POLICY_GRANT_NOT_HELD`.
|
|
5722
5571
|
*/
|
|
5723
|
-
policy_ids:
|
|
5572
|
+
policy_ids: AttachedPolicyIds;
|
|
5724
5573
|
/**
|
|
5725
5574
|
* MIME type glob matched against a file's content_type (e.g. image*, audio/mpeg, application/pdf)
|
|
5726
5575
|
*/
|
|
@@ -5775,15 +5624,12 @@ type MemoryRuleResourceProperties = {
|
|
|
5775
5624
|
/**
|
|
5776
5625
|
* The policies every handler the rule starts acts under. Use { "ref": "LogicalId" } for a policy in the template. The deploying caller must hold every grant they carry inside the project, else the resource fails with `POLICY_GRANT_NOT_HELD`.
|
|
5777
5626
|
*/
|
|
5778
|
-
policy_ids:
|
|
5627
|
+
policy_ids: AttachedPolicyIds;
|
|
5779
5628
|
/**
|
|
5780
5629
|
* Public ID of the destination memory store
|
|
5781
5630
|
*/
|
|
5782
5631
|
memory_store_id: string;
|
|
5783
|
-
|
|
5784
|
-
* `generations.completed` (once per completed turn, and the only event the built-in extractor may bind to) or `conversation_messages.generated` (per persisted assistant reply, custom handlers only).
|
|
5785
|
-
*/
|
|
5786
|
-
on: 'generations.completed' | 'conversation_messages.generated';
|
|
5632
|
+
on: MemoryRuleEvent;
|
|
5787
5633
|
/**
|
|
5788
5634
|
* Agents whose turns this rule reads; null is every agent in the project
|
|
5789
5635
|
*/
|
|
@@ -5859,12 +5705,7 @@ type OrchestrationResourceProperties = {
|
|
|
5859
5705
|
input_schema?: {
|
|
5860
5706
|
[key: string]: unknown;
|
|
5861
5707
|
} | null;
|
|
5862
|
-
|
|
5863
|
-
* Optional shape of a completed run's `output`: each key an output field, each value JSON Logic over `{ "state": <final run state> }`. Omitted keys `output` by terminal node id.
|
|
5864
|
-
*/
|
|
5865
|
-
output_mapping?: {
|
|
5866
|
-
[key: string]: unknown;
|
|
5867
|
-
} | null;
|
|
5708
|
+
output_mapping?: OrchestrationOutputMapping;
|
|
5868
5709
|
};
|
|
5869
5710
|
/**
|
|
5870
5711
|
* Creates a workflow — a state-machine definition (named states, allowed transitions, guards, and per-state automation) that tasks live in. State and transition dispatch references (`agent_id`, `orchestration_id`, `tool_id` inside an `on_enter` block) accept `{ "ref": "LogicalId" }` expressions to point at agents, orchestrations or tools declared in the same template, so a workflow plus the agents and tools that service its states can deploy as one stack. Mirrors the workflows REST contract (`states`, `transitions`, `payload_schema`).
|
|
@@ -5905,12 +5746,7 @@ type CollectionResourceProperties = {
|
|
|
5905
5746
|
* Unique within the project.
|
|
5906
5747
|
*/
|
|
5907
5748
|
name: string;
|
|
5908
|
-
|
|
5909
|
-
* A JSON Schema every item's `data` must satisfy, stored as written.
|
|
5910
|
-
*/
|
|
5911
|
-
schema?: {
|
|
5912
|
-
[key: string]: unknown;
|
|
5913
|
-
} | null;
|
|
5749
|
+
schema?: CollectionSchema;
|
|
5914
5750
|
};
|
|
5915
5751
|
/**
|
|
5916
5752
|
* Declares what `metadata` must satisfy for one resource type under one selector, so a template ships the corpus and the rule governing it together. `resource_type` is immutable: changing it in a template is a delete and a create.
|
|
@@ -6016,7 +5852,7 @@ type DeciderResourceProperties = {
|
|
|
6016
5852
|
/**
|
|
6017
5853
|
* The policies every decision's backend acts under. Use { "ref": "LogicalId" } for a policy in the template. The deploying caller must hold every grant they carry inside the project, else the resource fails with `POLICY_GRANT_NOT_HELD`.
|
|
6018
5854
|
*/
|
|
6019
|
-
policy_ids:
|
|
5855
|
+
policy_ids: AttachedPolicyIds;
|
|
6020
5856
|
/**
|
|
6021
5857
|
* Human-readable name, unique per project
|
|
6022
5858
|
*/
|
|
@@ -6033,12 +5869,7 @@ type DeciderResourceProperties = {
|
|
|
6033
5869
|
* The tool that answers, run with no action
|
|
6034
5870
|
*/
|
|
6035
5871
|
tool_id?: string | null;
|
|
6036
|
-
|
|
6037
|
-
* The questions (`type`, `name`, `instructions`, `choices` or `levels`), 1 to 20 of them, validated as the deciders REST contract validates them.
|
|
6038
|
-
*/
|
|
6039
|
-
questions: Array<{
|
|
6040
|
-
[key: string]: unknown;
|
|
6041
|
-
}>;
|
|
5872
|
+
questions: DeciderQuestions;
|
|
6042
5873
|
};
|
|
6043
5874
|
/**
|
|
6044
5875
|
* Creates a playbook — a versioned template of nodes that cases are filled against. An executor's `id` and a transformation's `tool` accept a `{ "ref": … }` to a resource in the same template. The version a deploy writes runs under its `policy_ids`, checked as a direct write is: `playbooks:CreatePlaybook` plus the start action of every executor it names, holding every grant of its `policy_ids`. Only a change to `definition` or `policy_ids` archives a new version; a playbook with cases is not deleted. Mirrors the playbooks REST contract.
|
|
@@ -6059,7 +5890,7 @@ type PlaybookResourceProperties = {
|
|
|
6059
5890
|
/**
|
|
6060
5891
|
* The policies every execution of the version runs under. Use { "ref": "LogicalId" } for a policy in the template. The deploying caller must hold every grant they carry inside the project, else the resource fails with `POLICY_GRANT_NOT_HELD`.
|
|
6061
5892
|
*/
|
|
6062
|
-
policy_ids:
|
|
5893
|
+
policy_ids: AttachedPolicyIds;
|
|
6063
5894
|
/**
|
|
6064
5895
|
* Whether each new version moves the playbook's cases to it. Defaults to `false`.
|
|
6065
5896
|
*/
|
|
@@ -6262,6 +6093,18 @@ type FormationOperation = {
|
|
|
6262
6093
|
created_at?: Date;
|
|
6263
6094
|
updated_at?: Date;
|
|
6264
6095
|
};
|
|
6096
|
+
/**
|
|
6097
|
+
* Event type patterns: `*` matches every event, `prefix.*` a namespace, or an exact name such as `documents.ingested` or a custom name an orchestration emits. A pattern in a platform namespace must match a registered event, else `400 INVALID_EVENT_PATTERN`.
|
|
6098
|
+
*/
|
|
6099
|
+
type EventTypePatterns = Array<string>;
|
|
6100
|
+
/**
|
|
6101
|
+
* SRN patterns with IAM wildcards (`srn:<project>:<type>:<id>` or `*`); an event is received only when its resource matches one. Null or omitted matches any resource in the project.
|
|
6102
|
+
*/
|
|
6103
|
+
type EventResourcePatterns = Array<string>;
|
|
6104
|
+
/**
|
|
6105
|
+
* A filter the event's `data` must match: a top-level field to a value, or to `in`, `gt`, `gte`, `lt`, `lte`, `prefix`. An absent field never matches.
|
|
6106
|
+
*/
|
|
6107
|
+
type EventDataFilter = StructuredFilter;
|
|
6265
6108
|
/**
|
|
6266
6109
|
* Narrows results by a JSON field, such as the `metadata` bag. Each key is a field; its value is either a value to match exactly, or an object naming one or more operators.
|
|
6267
6110
|
*
|
|
@@ -6274,6 +6117,90 @@ type FormationOperation = {
|
|
|
6274
6117
|
type StructuredFilter = {
|
|
6275
6118
|
[key: string]: unknown;
|
|
6276
6119
|
};
|
|
6120
|
+
type PolicyDocument = {
|
|
6121
|
+
statement: Array<PolicyStatement>;
|
|
6122
|
+
};
|
|
6123
|
+
type PolicyStatement = {
|
|
6124
|
+
effect: 'Allow' | 'Deny';
|
|
6125
|
+
action: Array<string>;
|
|
6126
|
+
/**
|
|
6127
|
+
* Resource SRN patterns. Omitted, an `Allow` in a project policy matches every resource of the policy's project (`srn:<project_id>:*:*`); anywhere else it matches every resource.
|
|
6128
|
+
*/
|
|
6129
|
+
resource?: Array<string>;
|
|
6130
|
+
/**
|
|
6131
|
+
* Optional condition block. Keys are condition operators (e.g. StringEquals) mapping to context-key/value maps; evaluated by the policy compiler. A context key must be one the platform supplies — `iam:ResourceType`, `iam:ResourceTag/<tag>` (the tag on the target resource) or `iam:RequestTag/<key>` (the tag value the request writes) — because an unknown key is absent from the evaluation context, so a `Deny` naming one would never deny. The tag name after the slash is opaque and unconstrained. Operator and context keys are matched by exact string and are never case-converted, so they round-trip exactly as written: `iam:ResourceTag/cost_center` selects the tag `cost_center`, not `costCenter`.
|
|
6132
|
+
*
|
|
6133
|
+
*/
|
|
6134
|
+
condition?: {
|
|
6135
|
+
[key: string]: unknown;
|
|
6136
|
+
};
|
|
6137
|
+
denial?: PolicyDenial;
|
|
6138
|
+
};
|
|
6139
|
+
/**
|
|
6140
|
+
* On a `Deny` only: what a request this statement denies answers in place of `FORBIDDEN`. `code` is one the deployment declares; `meta` is added beside `action`, `resource` and `denied_by`. Only an unrestricted admin writes a policy carrying one (`403 POLICY_DENIAL_RESERVED`).
|
|
6141
|
+
*/
|
|
6142
|
+
type PolicyDenial = {
|
|
6143
|
+
code: string;
|
|
6144
|
+
message: string;
|
|
6145
|
+
/**
|
|
6146
|
+
* Snake_case keys, none of `action`, `resource`, `denied_by`.
|
|
6147
|
+
*/
|
|
6148
|
+
meta?: {
|
|
6149
|
+
[key: string]: unknown;
|
|
6150
|
+
};
|
|
6151
|
+
};
|
|
6152
|
+
/**
|
|
6153
|
+
* The provider's authorization endpoint. Query parameters it already carries are kept.
|
|
6154
|
+
*/
|
|
6155
|
+
type AuthorizeUrl = string;
|
|
6156
|
+
/**
|
|
6157
|
+
* The provider's token endpoint.
|
|
6158
|
+
*/
|
|
6159
|
+
type TokenUrl = string;
|
|
6160
|
+
/**
|
|
6161
|
+
* The provider's RFC 7009 revocation endpoint, called when a connection is deleted. `null` skips revocation.
|
|
6162
|
+
*/
|
|
6163
|
+
type RevocationUrl = string | null;
|
|
6164
|
+
/**
|
|
6165
|
+
* Your app's client ID at the provider.
|
|
6166
|
+
*/
|
|
6167
|
+
type ClientId = string;
|
|
6168
|
+
/**
|
|
6169
|
+
* A `{{secret:sec_...}}` reference to your app's client secret, never the value. `null` for a public client, which relies on PKCE.
|
|
6170
|
+
*/
|
|
6171
|
+
type ClientSecret = string | null;
|
|
6172
|
+
/**
|
|
6173
|
+
* The scopes requested at authorization.
|
|
6174
|
+
*/
|
|
6175
|
+
type Scopes = Array<string>;
|
|
6176
|
+
/**
|
|
6177
|
+
* Whether the authorization uses PKCE (`S256`).
|
|
6178
|
+
*/
|
|
6179
|
+
type Pkce = boolean;
|
|
6180
|
+
/**
|
|
6181
|
+
* How the client authenticates at the token endpoint.
|
|
6182
|
+
*/
|
|
6183
|
+
type TokenEndpointAuthMethod = 'client_secret_basic' | 'client_secret_post';
|
|
6184
|
+
/**
|
|
6185
|
+
* The callback the provider redirects to, as registered with the provider. Absent on create, or `null`, it is this API's own `https://api.naturali.ai/v1/oauth/callback`, the URL to register with the provider; a front end that receives the redirect itself forwards `code` and `state` there.
|
|
6186
|
+
*/
|
|
6187
|
+
type RedirectUri = string | null;
|
|
6188
|
+
/**
|
|
6189
|
+
* Extra query parameters for the authorize URL, such as Google's `access_type: offline` and `prompt: consent` for a refresh token.
|
|
6190
|
+
*/
|
|
6191
|
+
type AuthorizeParams = {
|
|
6192
|
+
[key: string]: string;
|
|
6193
|
+
} | null;
|
|
6194
|
+
/**
|
|
6195
|
+
* The event a firing reads. `generations.completed` fires once per completed turn whatever the transport, and is the only event the built-in extractor may bind to. `conversation_messages.generated` fires per persisted assistant reply and is conversation-backed, so it is for custom handlers.
|
|
6196
|
+
*/
|
|
6197
|
+
type MemoryRuleEvent = 'generations.completed' | 'conversation_messages.generated';
|
|
6198
|
+
/**
|
|
6199
|
+
* The shape of a completed run's `output`, owned by the orchestration rather than by its terminal node ids. Each key is an output field (a dotted key such as `summary.title` builds a nested object, and no segment may be `__proto__`, `constructor` or `prototype`); each value is JSON Logic (https://jsonlogic.com) evaluated against `{ "state": <final run state> }`, which includes `state.input` and `state.nodes.<id>`. A missing path maps to `null`; a mapping that throws fails the run. Null (or omitted) keys `output` by terminal node id. Versioned with the graph; `null` on update clears it.
|
|
6200
|
+
*/
|
|
6201
|
+
type OrchestrationOutputMapping = {
|
|
6202
|
+
[key: string]: unknown;
|
|
6203
|
+
} | null;
|
|
6277
6204
|
type PlaybookDefinition = {
|
|
6278
6205
|
/**
|
|
6279
6206
|
* Playbooks whose cases a case of this one binds at create, one per name; many cases may share one upstream case.
|
|
@@ -7648,10 +7575,6 @@ type MemoryWriteResult = Memory & {
|
|
|
7648
7575
|
*/
|
|
7649
7576
|
action?: 'created' | 'superseded' | 'skipped';
|
|
7650
7577
|
};
|
|
7651
|
-
/**
|
|
7652
|
-
* The event a firing reads. `generations.completed` fires once per completed turn whatever the transport, and is the only event the built-in extractor may bind to. `conversation_messages.generated` fires per persisted assistant reply and is conversation-backed, so it is for custom handlers.
|
|
7653
|
-
*/
|
|
7654
|
-
type MemoryRuleEvent = 'generations.completed' | 'conversation_messages.generated';
|
|
7655
7578
|
type MemoryRule = {
|
|
7656
7579
|
/**
|
|
7657
7580
|
* The policies every handler the rule starts acts under. Empty for one written without any, which does not run until a write gives it one.
|
|
@@ -7806,48 +7729,6 @@ type Model = {
|
|
|
7806
7729
|
*/
|
|
7807
7730
|
synced_at: Date;
|
|
7808
7731
|
};
|
|
7809
|
-
/**
|
|
7810
|
-
* The provider's authorization endpoint. Query parameters it already carries are kept.
|
|
7811
|
-
*/
|
|
7812
|
-
type AuthorizeUrl = string;
|
|
7813
|
-
/**
|
|
7814
|
-
* The provider's token endpoint.
|
|
7815
|
-
*/
|
|
7816
|
-
type TokenUrl = string;
|
|
7817
|
-
/**
|
|
7818
|
-
* The provider's RFC 7009 revocation endpoint, called when a connection is deleted. `null` skips revocation.
|
|
7819
|
-
*/
|
|
7820
|
-
type RevocationUrl = string | null;
|
|
7821
|
-
/**
|
|
7822
|
-
* Your app's client ID at the provider.
|
|
7823
|
-
*/
|
|
7824
|
-
type ClientId = string;
|
|
7825
|
-
/**
|
|
7826
|
-
* A `{{secret:sec_...}}` reference to your app's client secret, never the value. `null` for a public client, which relies on PKCE.
|
|
7827
|
-
*/
|
|
7828
|
-
type ClientSecret = string | null;
|
|
7829
|
-
/**
|
|
7830
|
-
* The scopes requested at authorization.
|
|
7831
|
-
*/
|
|
7832
|
-
type Scopes = Array<string>;
|
|
7833
|
-
/**
|
|
7834
|
-
* Whether the authorization uses PKCE (`S256`).
|
|
7835
|
-
*/
|
|
7836
|
-
type Pkce = boolean;
|
|
7837
|
-
/**
|
|
7838
|
-
* How the client authenticates at the token endpoint.
|
|
7839
|
-
*/
|
|
7840
|
-
type TokenEndpointAuthMethod = 'client_secret_basic' | 'client_secret_post';
|
|
7841
|
-
/**
|
|
7842
|
-
* The callback the provider redirects to, as registered with the provider. Absent on create, or `null`, it is this API's own `https://api.naturali.ai/v1/oauth/callback`, the URL to register with the provider; a front end that receives the redirect itself forwards `code` and `state` there.
|
|
7843
|
-
*/
|
|
7844
|
-
type RedirectUri = string | null;
|
|
7845
|
-
/**
|
|
7846
|
-
* Extra query parameters for the authorize URL, such as Google's `access_type: offline` and `prompt: consent` for a refresh token.
|
|
7847
|
-
*/
|
|
7848
|
-
type AuthorizeParams = {
|
|
7849
|
-
[key: string]: string;
|
|
7850
|
-
} | null;
|
|
7851
7732
|
type OauthClient = {
|
|
7852
7733
|
id?: string;
|
|
7853
7734
|
project_id?: string;
|
|
@@ -8187,12 +8068,6 @@ type Orchestration = {
|
|
|
8187
8068
|
created_at: Date;
|
|
8188
8069
|
updated_at: Date;
|
|
8189
8070
|
};
|
|
8190
|
-
/**
|
|
8191
|
-
* The shape of a completed run's `output`, owned by the orchestration rather than by its terminal node ids. Each key is an output field (a dotted key such as `summary.title` builds a nested object, and no segment may be `__proto__`, `constructor` or `prototype`); each value is JSON Logic (https://jsonlogic.com) evaluated against `{ "state": <final run state> }`, which includes `state.input` and `state.nodes.<id>`. A missing path maps to `null`; a mapping that throws fails the run. Null (or omitted) keys `output` by terminal node id. Versioned with the graph; `null` on update clears it.
|
|
8192
|
-
*/
|
|
8193
|
-
type OrchestrationOutputMapping = {
|
|
8194
|
-
[key: string]: unknown;
|
|
8195
|
-
} | null;
|
|
8196
8071
|
type CreateOrchestrationRequest = {
|
|
8197
8072
|
/**
|
|
8198
8073
|
* Human-readable name.
|
|
@@ -9122,38 +8997,6 @@ type ConfirmPlaybookCaseNodeRequest = {
|
|
|
9122
8997
|
*/
|
|
9123
8998
|
wait?: boolean;
|
|
9124
8999
|
};
|
|
9125
|
-
type PolicyStatement = {
|
|
9126
|
-
effect: 'Allow' | 'Deny';
|
|
9127
|
-
action: Array<string>;
|
|
9128
|
-
/**
|
|
9129
|
-
* Resource SRN patterns. Omitted, an `Allow` in a project policy matches every resource of the policy's project (`srn:<project_id>:*:*`); anywhere else it matches every resource.
|
|
9130
|
-
*/
|
|
9131
|
-
resource?: Array<string>;
|
|
9132
|
-
/**
|
|
9133
|
-
* Optional condition block. Keys are condition operators (e.g. StringEquals) mapping to context-key/value maps; evaluated by the policy compiler. A context key must be one the platform supplies — `iam:ResourceType`, `iam:ResourceTag/<tag>` (the tag on the target resource) or `iam:RequestTag/<key>` (the tag value the request writes) — because an unknown key is absent from the evaluation context, so a `Deny` naming one would never deny. The tag name after the slash is opaque and unconstrained. Operator and context keys are matched by exact string and are never case-converted, so they round-trip exactly as written: `iam:ResourceTag/cost_center` selects the tag `cost_center`, not `costCenter`.
|
|
9134
|
-
*
|
|
9135
|
-
*/
|
|
9136
|
-
condition?: {
|
|
9137
|
-
[key: string]: unknown;
|
|
9138
|
-
};
|
|
9139
|
-
denial?: PolicyDenial;
|
|
9140
|
-
};
|
|
9141
|
-
/**
|
|
9142
|
-
* On a `Deny` only: what a request this statement denies answers in place of `FORBIDDEN`. `code` is one the deployment declares; `meta` is added beside `action`, `resource` and `denied_by`. Only an unrestricted admin writes a policy carrying one (`403 POLICY_DENIAL_RESERVED`).
|
|
9143
|
-
*/
|
|
9144
|
-
type PolicyDenial = {
|
|
9145
|
-
code: string;
|
|
9146
|
-
message: string;
|
|
9147
|
-
/**
|
|
9148
|
-
* Snake_case keys, none of `action`, `resource`, `denied_by`.
|
|
9149
|
-
*/
|
|
9150
|
-
meta?: {
|
|
9151
|
-
[key: string]: unknown;
|
|
9152
|
-
};
|
|
9153
|
-
};
|
|
9154
|
-
type PolicyDocument = {
|
|
9155
|
-
statement: Array<PolicyStatement>;
|
|
9156
|
-
};
|
|
9157
9000
|
type PolicyRecord = {
|
|
9158
9001
|
/**
|
|
9159
9002
|
* Public policy ID (pol_ prefix)
|
|
@@ -10850,18 +10693,6 @@ type TriggerFiring = {
|
|
|
10850
10693
|
type TriggerFiringListResponse = Page & {
|
|
10851
10694
|
data?: Array<TriggerFiring>;
|
|
10852
10695
|
};
|
|
10853
|
-
/**
|
|
10854
|
-
* Event type patterns: `*` matches every event, `prefix.*` a namespace, or an exact name such as `documents.ingested` or a custom name an orchestration emits. A pattern in a platform namespace must match a registered event, else `400 INVALID_EVENT_PATTERN`.
|
|
10855
|
-
*/
|
|
10856
|
-
type EventTypePatterns = Array<string>;
|
|
10857
|
-
/**
|
|
10858
|
-
* SRN patterns with IAM wildcards (`srn:<project>:<type>:<id>` or `*`); an event is received only when its resource matches one. Null or omitted matches any resource in the project.
|
|
10859
|
-
*/
|
|
10860
|
-
type EventResourcePatterns = Array<string>;
|
|
10861
|
-
/**
|
|
10862
|
-
* A filter the event's `data` must match: a top-level field to a value, or to `in`, `gt`, `gte`, `lt`, `lte`, `prefix`. An absent field never matches.
|
|
10863
|
-
*/
|
|
10864
|
-
type EventDataFilter = StructuredFilter;
|
|
10865
10696
|
/**
|
|
10866
10697
|
* Send at least one field.
|
|
10867
10698
|
*/
|
|
@@ -11535,6 +11366,10 @@ type FileRecordWritable = {
|
|
|
11535
11366
|
*/
|
|
11536
11367
|
updated_at?: Date;
|
|
11537
11368
|
};
|
|
11369
|
+
/**
|
|
11370
|
+
* A filter the event's `data` must match: a top-level field to a value, or to `in`, `gt`, `gte`, `lt`, `lte`, `prefix`. An absent field never matches.
|
|
11371
|
+
*/
|
|
11372
|
+
type EventDataFilterWritable = StructuredFilter;
|
|
11538
11373
|
/**
|
|
11539
11374
|
* A messaging channel connecting an agent to a transport.
|
|
11540
11375
|
*/
|
|
@@ -11710,10 +11545,6 @@ type ToolWritable = {
|
|
|
11710
11545
|
created_at?: Date;
|
|
11711
11546
|
updated_at?: Date;
|
|
11712
11547
|
};
|
|
11713
|
-
/**
|
|
11714
|
-
* A filter the event's `data` must match: a top-level field to a value, or to `in`, `gt`, `gte`, `lt`, `lte`, `prefix`. An absent field never matches.
|
|
11715
|
-
*/
|
|
11716
|
-
type EventDataFilterWritable = StructuredFilter;
|
|
11717
11548
|
/**
|
|
11718
11549
|
* Project public ID (proj_ prefix).
|
|
11719
11550
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/sdk",
|
|
3
|
-
"version": "0.295.
|
|
3
|
+
"version": "0.295.3",
|
|
4
4
|
"description": "TypeScript SDK for the naturali.ai API, generated from its OpenAPI specs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"naturali",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@hey-api/openapi-ts": "^0.99.0",
|
|
41
|
-
"@naturali/api": "0.295.
|
|
41
|
+
"@naturali/api": "0.295.3",
|
|
42
42
|
"@ttoss/openapi-codegen": "^0.10.1",
|
|
43
43
|
"@types/node": "^26.5.1",
|
|
44
44
|
"tsdown": "^0.23.0",
|