@naturali/sdk 0.218.1 → 0.219.1
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 +17 -11
- package/dist/index.d.cts +28 -22
- package/dist/index.d.mts +28 -22
- package/dist/index.mjs +17 -11
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1266,7 +1266,7 @@ var Agents = class {
|
|
|
1266
1266
|
/**
|
|
1267
1267
|
* Create an agent
|
|
1268
1268
|
*
|
|
1269
|
-
* Creates a new agent bound to an AI provider.
|
|
1269
|
+
* Creates a new agent bound to an AI provider. A `{{secret:...}}` reference in an inline `tool_bindings[].tool` also needs `secrets:UseSecret` on that secret, else `403`.
|
|
1270
1270
|
*/
|
|
1271
1271
|
static createAgent(options) {
|
|
1272
1272
|
return (options.client ?? client).post({
|
|
@@ -1305,7 +1305,7 @@ var Agents = class {
|
|
|
1305
1305
|
/**
|
|
1306
1306
|
* Partially update an agent
|
|
1307
1307
|
*
|
|
1308
|
-
* Partially updates an existing agent. Identical to PUT — both perform partial updates.
|
|
1308
|
+
* Partially updates an existing agent. Identical to PUT — both perform partial updates. A `{{secret:...}}` reference in an inline `tool_bindings[].tool` also needs `secrets:UseSecret` on that secret, else `403`.
|
|
1309
1309
|
*/
|
|
1310
1310
|
static patchAgent(options) {
|
|
1311
1311
|
return (options.client ?? client).patch({
|
|
@@ -1320,7 +1320,7 @@ var Agents = class {
|
|
|
1320
1320
|
/**
|
|
1321
1321
|
* Update an agent
|
|
1322
1322
|
*
|
|
1323
|
-
* Updates an existing agent. Identical to PATCH — both perform partial updates.
|
|
1323
|
+
* Updates an existing agent. Identical to PATCH — both perform partial updates. A `{{secret:...}}` reference in an inline `tool_bindings[].tool` also needs `secrets:UseSecret` on that secret, else `403`.
|
|
1324
1324
|
*/
|
|
1325
1325
|
static updateAgent(options) {
|
|
1326
1326
|
return (options.client ?? client).put({
|
|
@@ -1474,8 +1474,14 @@ var AiProviders = class {
|
|
|
1474
1474
|
*
|
|
1475
1475
|
* Creates a new LLM provider configuration.
|
|
1476
1476
|
*
|
|
1477
|
-
* A
|
|
1478
|
-
*
|
|
1477
|
+
* A provider's credential is its linked `secret_id`; `config.apiKey` is
|
|
1478
|
+
* refused with `400 VALIDATION_FAILED`.
|
|
1479
|
+
*
|
|
1480
|
+
* A record with both `base_url` and `secret_id` sends the secret to that
|
|
1481
|
+
* URL, so creating one also needs `secrets:UseSecret` on the secret, else
|
|
1482
|
+
* `403`.
|
|
1483
|
+
*
|
|
1484
|
+
* A `bedrock` or `vertex` record must link one. Without it the provider
|
|
1479
1485
|
* SDK signs with the server's own credentials (the AWS default credential
|
|
1480
1486
|
* chain, Google Application Default Credentials), which is refused with
|
|
1481
1487
|
* `400 VALIDATION_FAILED` unless the deployment allows it.
|
|
@@ -1519,7 +1525,7 @@ var AiProviders = class {
|
|
|
1519
1525
|
/**
|
|
1520
1526
|
* Update an AI provider
|
|
1521
1527
|
*
|
|
1522
|
-
* Updates an AI provider configuration
|
|
1528
|
+
* Updates an AI provider configuration. Setting `base_url` or `secret_id` so the record holds both also needs `secrets:UseSecret` on the secret, else `403`.
|
|
1523
1529
|
*/
|
|
1524
1530
|
static updateAiProvider(options) {
|
|
1525
1531
|
return (options.client ?? client).patch({
|
|
@@ -4545,7 +4551,7 @@ var Playbooks = class {
|
|
|
4545
4551
|
*
|
|
4546
4552
|
* Creates a playbook at version 1. The definition is refused with `400 PLAYBOOK_VALIDATION_FAILED` when it holds a duplicate node or input, an input reading a missing node or field, an `execute` node without an executor or another kind with one, transformations on a non-final node, or a cycle; `meta.problems` lists every one. A duplicate `name` in the project is `409 NAME_CONFLICT`.
|
|
4547
4553
|
*
|
|
4548
|
-
* The caller becomes the version's author, whom its executors run as, so it must be allowed to start every executor the definition names (`403 PLAYBOOK_EXECUTOR_FORBIDDEN`), and each must exist in the project, or be an agent or tool shared with it (`400 PLAYBOOK_VALIDATION_FAILED`, an `EXECUTOR_NOT_FOUND` problem). A `tool` executor on an `mcp` tool must name in `operation_id` an action the tool's binding allows (`EXECUTOR_ACTION_REQUIRED`, `EXECUTOR_ACTION_UNAVAILABLE`). A definition with executors written with a trigger or OAuth token is `409 PLAYBOOK_AUTHOR_UNAVAILABLE`: those carry their boundary in the token, so no run can act as them.
|
|
4554
|
+
* The caller becomes the version's author, whom its executors run as, so it must be allowed to start every executor the definition names (`403 PLAYBOOK_EXECUTOR_FORBIDDEN`), and each must exist in the project, or be an agent or tool shared with it (`400 PLAYBOOK_VALIDATION_FAILED`, an `EXECUTOR_NOT_FOUND` problem). A `tool` executor on an `mcp` tool must name in `operation_id` an action the tool's binding allows (`EXECUTOR_ACTION_REQUIRED`, `EXECUTOR_ACTION_UNAVAILABLE`). An executor cannot be a `client` tool (`EXECUTOR_TOOL_UNSUPPORTED`), nor a transformation's tool a `client` or `mcp` tool (`TRANSFORMATION_TOOL_UNSUPPORTED`). A definition with executors written with a trigger or OAuth token is `409 PLAYBOOK_AUTHOR_UNAVAILABLE`: those carry their boundary in the token, so no run can act as them.
|
|
4549
4555
|
*/
|
|
4550
4556
|
static createPlaybook(options) {
|
|
4551
4557
|
return (options.client ?? client).post({
|
|
@@ -4562,7 +4568,7 @@ var Playbooks = class {
|
|
|
4562
4568
|
*
|
|
4563
4569
|
* Answers what a create or update would be told about a definition, without writing: `valid`, and every graph problem it holds. A definition whose shape cannot be read is `400 VALIDATION_FAILED`, as on a write.
|
|
4564
4570
|
*
|
|
4565
|
-
* With `project_id`, the references are checked too, as a write there would check them: the upstreams against that project's playbooks, and each executor the caller may start must exist (`EXECUTOR_NOT_FOUND`) and name an action its `mcp` tool allows (`EXECUTOR_ACTION_REQUIRED`, `EXECUTOR_ACTION_UNAVAILABLE`). The caller needs both `playbooks:ValidatePlaybook` and `playbooks:ListPlaybooks` on the project. Without it, only the definition's own graph is checked.
|
|
4571
|
+
* With `project_id`, the references are checked too, as a write there would check them: the upstreams against that project's playbooks, and each executor the caller may start must exist (`EXECUTOR_NOT_FOUND`) and name an action its `mcp` tool allows (`EXECUTOR_ACTION_REQUIRED`, `EXECUTOR_ACTION_UNAVAILABLE`) and not be a `client` tool (`EXECUTOR_TOOL_UNSUPPORTED`), and each transformation's tool must not be a `client` or `mcp` tool (`TRANSFORMATION_TOOL_UNSUPPORTED`). The caller needs both `playbooks:ValidatePlaybook` and `playbooks:ListPlaybooks` on the project. Without it, only the definition's own graph is checked.
|
|
4566
4572
|
*/
|
|
4567
4573
|
static validatePlaybook(options) {
|
|
4568
4574
|
return (options.client ?? client).post({
|
|
@@ -4601,7 +4607,7 @@ var Playbooks = class {
|
|
|
4601
4607
|
*
|
|
4602
4608
|
* Updates any of `name`, `description` and `definition`. Only a change to `definition` archives a new version; a rename or a rewrite of the definition the playbook already holds leaves `version` where it is. A case keeps the version it was created on.
|
|
4603
4609
|
*
|
|
4604
|
-
* A new version is authored by the caller, checked as on create: `403 PLAYBOOK_EXECUTOR_FORBIDDEN` for an executor it may not start, an `EXECUTOR_NOT_FOUND` problem for one that does not exist, `EXECUTOR_ACTION_REQUIRED` or `EXECUTOR_ACTION_UNAVAILABLE` for an `mcp` tool action a run could not call, `409 PLAYBOOK_AUTHOR_UNAVAILABLE` for a trigger or OAuth token.
|
|
4610
|
+
* A new version is authored by the caller, checked as on create: `403 PLAYBOOK_EXECUTOR_FORBIDDEN` for an executor it may not start, an `EXECUTOR_NOT_FOUND` problem for one that does not exist, `EXECUTOR_ACTION_REQUIRED` or `EXECUTOR_ACTION_UNAVAILABLE` for an `mcp` tool action a run could not call, `EXECUTOR_TOOL_UNSUPPORTED` for a `client` tool executor, `TRANSFORMATION_TOOL_UNSUPPORTED` for a `client` or `mcp` transformation tool, `409 PLAYBOOK_AUTHOR_UNAVAILABLE` for a trigger or OAuth token.
|
|
4605
4611
|
*/
|
|
4606
4612
|
static updatePlaybook(options) {
|
|
4607
4613
|
return (options.client ?? client).patch({
|
|
@@ -5847,7 +5853,7 @@ var Triggers = class {
|
|
|
5847
5853
|
/**
|
|
5848
5854
|
* Create a trigger
|
|
5849
5855
|
*
|
|
5850
|
-
* Creates a new trigger for a project
|
|
5856
|
+
* Creates a new trigger for a project. A `{{secret:...}}` reference in `tool_context` also needs `secrets:UseSecret` on that secret, else `403`.
|
|
5851
5857
|
*/
|
|
5852
5858
|
static createTrigger(options) {
|
|
5853
5859
|
return (options.client ?? client).post({
|
|
@@ -5895,7 +5901,7 @@ var Triggers = class {
|
|
|
5895
5901
|
/**
|
|
5896
5902
|
* Update a trigger
|
|
5897
5903
|
*
|
|
5898
|
-
* Updates an existing trigger's configuration. The type is immutable. Changing `target_type` or `target_id` re-checks that the caller may start the resulting target, because a firing runs with the trigger creator's authority rather than the updater's. A caller who could not start the new target is answered `403` and the trigger keeps the target it had.
|
|
5904
|
+
* Updates an existing trigger's configuration. The type is immutable. Changing `target_type` or `target_id` re-checks that the caller may start the resulting target, because a firing runs with the trigger creator's authority rather than the updater's. A caller who could not start the new target is answered `403` and the trigger keeps the target it had. A `{{secret:...}}` reference in a written `tool_context`, or in the stored one when the target changes, also needs `secrets:UseSecret` on that secret, else `403`.
|
|
5899
5905
|
*
|
|
5900
5906
|
*/
|
|
5901
5907
|
static updateTrigger(options) {
|
package/dist/index.d.cts
CHANGED
|
@@ -7149,9 +7149,9 @@ type NodeExecution = {
|
|
|
7149
7149
|
*/
|
|
7150
7150
|
type RequiredAction = {
|
|
7151
7151
|
/**
|
|
7152
|
-
* Discriminator identifying the kind of pause. Open enum — new pause kinds may be added in minor releases; clients must tolerate unknown values.
|
|
7152
|
+
* Discriminator identifying the kind of pause. Open enum — new pause kinds may be added in minor releases; clients must tolerate unknown values. `child_run` is a `loop` or `sub_orchestration` node whose child runs, listed in `context.orchestration_run_ids`, have not settled; their settle resumes it, and it accepts no human input.
|
|
7153
7153
|
*/
|
|
7154
|
-
type: 'human_input' | 'webhook_receive' | 'approval' | 'paused';
|
|
7154
|
+
type: 'human_input' | 'webhook_receive' | 'approval' | 'paused' | 'child_run';
|
|
7155
7155
|
/**
|
|
7156
7156
|
* The node the run is parked at. Absent for a `paused` action, which no node produced.
|
|
7157
7157
|
*/
|
|
@@ -7353,7 +7353,7 @@ type ValidatePlaybookRequest = {
|
|
|
7353
7353
|
type PlaybookValidationResult = {
|
|
7354
7354
|
valid: boolean;
|
|
7355
7355
|
/**
|
|
7356
|
-
* Every reason the definition cannot be stored: `DUPLICATE_NODE`, `DUPLICATE_INPUT`, `MISSING_NODE`, `UNKNOWN_FIELD`, `EXECUTOR_REQUIRED`, `EXECUTOR_FORBIDDEN`, `TRANSFORMATIONS_NOT_FINAL`, `DUPLICATE_TRANSFORMATION`, `CYCLE`, and, with `project_id`, `UNKNOWN_UPSTREAM`, `UPSTREAM_CYCLE`, `EXECUTOR_NOT_FOUND`, `EXECUTOR_ACTION_REQUIRED` or `
|
|
7356
|
+
* Every reason the definition cannot be stored: `DUPLICATE_NODE`, `DUPLICATE_INPUT`, `MISSING_NODE`, `UNKNOWN_FIELD`, `EXECUTOR_REQUIRED`, `EXECUTOR_FORBIDDEN`, `TRANSFORMATIONS_NOT_FINAL`, `DUPLICATE_TRANSFORMATION`, `CYCLE`, and, with `project_id`, `UNKNOWN_UPSTREAM`, `UPSTREAM_CYCLE`, `EXECUTOR_NOT_FOUND`, `EXECUTOR_ACTION_REQUIRED`, `EXECUTOR_ACTION_UNAVAILABLE`, `EXECUTOR_TOOL_UNSUPPORTED` or `TRANSFORMATION_TOOL_UNSUPPORTED`. The same items a refused write lists under `meta.problems`.
|
|
7357
7357
|
*/
|
|
7358
7358
|
problems: Array<ValidationProblem>;
|
|
7359
7359
|
};
|
|
@@ -12300,7 +12300,7 @@ type ListAiProvidersResponses = {
|
|
|
12300
12300
|
*/
|
|
12301
12301
|
base_url?: string;
|
|
12302
12302
|
/**
|
|
12303
|
-
* Additional provider-specific configuration. Absent when the record sets none.
|
|
12303
|
+
* Additional provider-specific configuration. Absent when the record sets none. Never carries a credential.
|
|
12304
12304
|
*/
|
|
12305
12305
|
config?: {
|
|
12306
12306
|
[key: string]: unknown;
|
|
@@ -12327,7 +12327,7 @@ type CreateAiProviderData = {
|
|
|
12327
12327
|
*/
|
|
12328
12328
|
default_model: string;
|
|
12329
12329
|
/**
|
|
12330
|
-
* Secret ID containing API credentials. Required for `bedrock` and `vertex
|
|
12330
|
+
* Secret ID containing API credentials. Required for `bedrock` and `vertex`.
|
|
12331
12331
|
*/
|
|
12332
12332
|
secret_id?: string;
|
|
12333
12333
|
/**
|
|
@@ -12335,7 +12335,7 @@ type CreateAiProviderData = {
|
|
|
12335
12335
|
*/
|
|
12336
12336
|
base_url?: string;
|
|
12337
12337
|
/**
|
|
12338
|
-
* Additional provider-specific configuration. `
|
|
12338
|
+
* Additional provider-specific configuration. `apiKey` is refused: the credential goes in the linked secret.
|
|
12339
12339
|
*/
|
|
12340
12340
|
config?: {
|
|
12341
12341
|
[key: string]: unknown;
|
|
@@ -12511,7 +12511,7 @@ type GetAiProviderResponses = {
|
|
|
12511
12511
|
secret_id?: string | null;
|
|
12512
12512
|
base_url?: string;
|
|
12513
12513
|
/**
|
|
12514
|
-
* Additional provider-specific configuration.
|
|
12514
|
+
* Additional provider-specific configuration. Never carries a credential.
|
|
12515
12515
|
*/
|
|
12516
12516
|
config?: {
|
|
12517
12517
|
[key: string]: unknown;
|
|
@@ -12532,7 +12532,7 @@ type UpdateAiProviderData = {
|
|
|
12532
12532
|
secret_id?: string | null;
|
|
12533
12533
|
base_url?: string;
|
|
12534
12534
|
/**
|
|
12535
|
-
* Replaces the whole configuration
|
|
12535
|
+
* Replaces the whole configuration. `apiKey` is refused: the credential goes in the linked secret.
|
|
12536
12536
|
*/
|
|
12537
12537
|
config?: {
|
|
12538
12538
|
[key: string]: unknown;
|
|
@@ -16862,7 +16862,7 @@ type UpdateDocumentErrors = {
|
|
|
16862
16862
|
*/
|
|
16863
16863
|
404: ErrorResponse;
|
|
16864
16864
|
/**
|
|
16865
|
-
* The document has moved past the version this write read (`VERSION_CONFLICT`, with `meta.current_version`),
|
|
16865
|
+
* The document has moved past the version this write read (`VERSION_CONFLICT`, with `meta.current_version`), `path` is held by another file in the project (`NAME_CONFLICT`), or new `content` would exceed the project's `storage_bytes` quota (`QUOTA_STORAGE_EXCEEDED`, no `Retry-After`). Nothing is written.
|
|
16866
16866
|
*/
|
|
16867
16867
|
409: ErrorResponse;
|
|
16868
16868
|
/**
|
|
@@ -17311,7 +17311,7 @@ type RestoreDocumentVersionErrors = {
|
|
|
17311
17311
|
*/
|
|
17312
17312
|
404: ErrorResponse;
|
|
17313
17313
|
/**
|
|
17314
|
-
* Another write took the document's version first (`VERSION_CONFLICT`, with `meta.current_version`),
|
|
17314
|
+
* Another write took the document's version first (`VERSION_CONFLICT`, with `meta.current_version`), the restored `path` is held by another file in the project (`NAME_CONFLICT`), or the restored content would exceed the project's `storage_bytes` quota (`QUOTA_STORAGE_EXCEEDED`, no `Retry-After`). Nothing is written.
|
|
17315
17315
|
*/
|
|
17316
17316
|
409: ErrorResponse;
|
|
17317
17317
|
/**
|
|
@@ -22433,7 +22433,7 @@ type UpdateMemoryErrors = {
|
|
|
22433
22433
|
*/
|
|
22434
22434
|
404: ErrorResponse;
|
|
22435
22435
|
/**
|
|
22436
|
-
* The
|
|
22436
|
+
* The memory has moved past the version this write read (`VERSION_CONFLICT`, with `meta.current_version`), or new `content` would exceed the project's `storage_bytes` quota (`QUOTA_STORAGE_EXCEEDED`, no `Retry-After`). Nothing is written.
|
|
22437
22437
|
*/
|
|
22438
22438
|
409: ErrorResponse;
|
|
22439
22439
|
/**
|
|
@@ -32938,7 +32938,7 @@ export declare class Agents {
|
|
|
32938
32938
|
/**
|
|
32939
32939
|
* Create an agent
|
|
32940
32940
|
*
|
|
32941
|
-
* Creates a new agent bound to an AI provider.
|
|
32941
|
+
* Creates a new agent bound to an AI provider. A `{{secret:...}}` reference in an inline `tool_bindings[].tool` also needs `secrets:UseSecret` on that secret, else `403`.
|
|
32942
32942
|
*/
|
|
32943
32943
|
static createAgent<ThrowOnError extends boolean = false>(options: Options<CreateAgentData, ThrowOnError>): RequestResult<CreateAgentResponses, CreateAgentErrors, ThrowOnError>;
|
|
32944
32944
|
/**
|
|
@@ -32958,13 +32958,13 @@ export declare class Agents {
|
|
|
32958
32958
|
/**
|
|
32959
32959
|
* Partially update an agent
|
|
32960
32960
|
*
|
|
32961
|
-
* Partially updates an existing agent. Identical to PUT — both perform partial updates.
|
|
32961
|
+
* Partially updates an existing agent. Identical to PUT — both perform partial updates. A `{{secret:...}}` reference in an inline `tool_bindings[].tool` also needs `secrets:UseSecret` on that secret, else `403`.
|
|
32962
32962
|
*/
|
|
32963
32963
|
static patchAgent<ThrowOnError extends boolean = false>(options: Options<PatchAgentData, ThrowOnError>): RequestResult<PatchAgentResponses, PatchAgentErrors, ThrowOnError>;
|
|
32964
32964
|
/**
|
|
32965
32965
|
* Update an agent
|
|
32966
32966
|
*
|
|
32967
|
-
* Updates an existing agent. Identical to PATCH — both perform partial updates.
|
|
32967
|
+
* Updates an existing agent. Identical to PATCH — both perform partial updates. A `{{secret:...}}` reference in an inline `tool_bindings[].tool` also needs `secrets:UseSecret` on that secret, else `403`.
|
|
32968
32968
|
*/
|
|
32969
32969
|
static updateAgent<ThrowOnError extends boolean = false>(options: Options<UpdateAgentData, ThrowOnError>): RequestResult<UpdateAgentResponses, UpdateAgentErrors, ThrowOnError>;
|
|
32970
32970
|
/**
|
|
@@ -33048,8 +33048,14 @@ export declare class AiProviders {
|
|
|
33048
33048
|
*
|
|
33049
33049
|
* Creates a new LLM provider configuration.
|
|
33050
33050
|
*
|
|
33051
|
-
* A
|
|
33052
|
-
*
|
|
33051
|
+
* A provider's credential is its linked `secret_id`; `config.apiKey` is
|
|
33052
|
+
* refused with `400 VALIDATION_FAILED`.
|
|
33053
|
+
*
|
|
33054
|
+
* A record with both `base_url` and `secret_id` sends the secret to that
|
|
33055
|
+
* URL, so creating one also needs `secrets:UseSecret` on the secret, else
|
|
33056
|
+
* `403`.
|
|
33057
|
+
*
|
|
33058
|
+
* A `bedrock` or `vertex` record must link one. Without it the provider
|
|
33053
33059
|
* SDK signs with the server's own credentials (the AWS default credential
|
|
33054
33060
|
* chain, Google Application Default Credentials), which is refused with
|
|
33055
33061
|
* `400 VALIDATION_FAILED` unless the deployment allows it.
|
|
@@ -33074,7 +33080,7 @@ export declare class AiProviders {
|
|
|
33074
33080
|
/**
|
|
33075
33081
|
* Update an AI provider
|
|
33076
33082
|
*
|
|
33077
|
-
* Updates an AI provider configuration
|
|
33083
|
+
* Updates an AI provider configuration. Setting `base_url` or `secret_id` so the record holds both also needs `secrets:UseSecret` on the secret, else `403`.
|
|
33078
33084
|
*/
|
|
33079
33085
|
static updateAiProvider<ThrowOnError extends boolean = false>(options: Options<UpdateAiProviderData, ThrowOnError>): RequestResult<UpdateAiProviderResponses, UpdateAiProviderErrors, ThrowOnError>;
|
|
33080
33086
|
/**
|
|
@@ -34634,7 +34640,7 @@ export declare class Playbooks {
|
|
|
34634
34640
|
*
|
|
34635
34641
|
* Creates a playbook at version 1. The definition is refused with `400 PLAYBOOK_VALIDATION_FAILED` when it holds a duplicate node or input, an input reading a missing node or field, an `execute` node without an executor or another kind with one, transformations on a non-final node, or a cycle; `meta.problems` lists every one. A duplicate `name` in the project is `409 NAME_CONFLICT`.
|
|
34636
34642
|
*
|
|
34637
|
-
* The caller becomes the version's author, whom its executors run as, so it must be allowed to start every executor the definition names (`403 PLAYBOOK_EXECUTOR_FORBIDDEN`), and each must exist in the project, or be an agent or tool shared with it (`400 PLAYBOOK_VALIDATION_FAILED`, an `EXECUTOR_NOT_FOUND` problem). A `tool` executor on an `mcp` tool must name in `operation_id` an action the tool's binding allows (`EXECUTOR_ACTION_REQUIRED`, `EXECUTOR_ACTION_UNAVAILABLE`). A definition with executors written with a trigger or OAuth token is `409 PLAYBOOK_AUTHOR_UNAVAILABLE`: those carry their boundary in the token, so no run can act as them.
|
|
34643
|
+
* The caller becomes the version's author, whom its executors run as, so it must be allowed to start every executor the definition names (`403 PLAYBOOK_EXECUTOR_FORBIDDEN`), and each must exist in the project, or be an agent or tool shared with it (`400 PLAYBOOK_VALIDATION_FAILED`, an `EXECUTOR_NOT_FOUND` problem). A `tool` executor on an `mcp` tool must name in `operation_id` an action the tool's binding allows (`EXECUTOR_ACTION_REQUIRED`, `EXECUTOR_ACTION_UNAVAILABLE`). An executor cannot be a `client` tool (`EXECUTOR_TOOL_UNSUPPORTED`), nor a transformation's tool a `client` or `mcp` tool (`TRANSFORMATION_TOOL_UNSUPPORTED`). A definition with executors written with a trigger or OAuth token is `409 PLAYBOOK_AUTHOR_UNAVAILABLE`: those carry their boundary in the token, so no run can act as them.
|
|
34638
34644
|
*/
|
|
34639
34645
|
static createPlaybook<ThrowOnError extends boolean = false>(options: Options<CreatePlaybookData, ThrowOnError>): RequestResult<CreatePlaybookResponses, CreatePlaybookErrors, ThrowOnError>;
|
|
34640
34646
|
/**
|
|
@@ -34642,7 +34648,7 @@ export declare class Playbooks {
|
|
|
34642
34648
|
*
|
|
34643
34649
|
* Answers what a create or update would be told about a definition, without writing: `valid`, and every graph problem it holds. A definition whose shape cannot be read is `400 VALIDATION_FAILED`, as on a write.
|
|
34644
34650
|
*
|
|
34645
|
-
* With `project_id`, the references are checked too, as a write there would check them: the upstreams against that project's playbooks, and each executor the caller may start must exist (`EXECUTOR_NOT_FOUND`) and name an action its `mcp` tool allows (`EXECUTOR_ACTION_REQUIRED`, `EXECUTOR_ACTION_UNAVAILABLE`). The caller needs both `playbooks:ValidatePlaybook` and `playbooks:ListPlaybooks` on the project. Without it, only the definition's own graph is checked.
|
|
34651
|
+
* With `project_id`, the references are checked too, as a write there would check them: the upstreams against that project's playbooks, and each executor the caller may start must exist (`EXECUTOR_NOT_FOUND`) and name an action its `mcp` tool allows (`EXECUTOR_ACTION_REQUIRED`, `EXECUTOR_ACTION_UNAVAILABLE`) and not be a `client` tool (`EXECUTOR_TOOL_UNSUPPORTED`), and each transformation's tool must not be a `client` or `mcp` tool (`TRANSFORMATION_TOOL_UNSUPPORTED`). The caller needs both `playbooks:ValidatePlaybook` and `playbooks:ListPlaybooks` on the project. Without it, only the definition's own graph is checked.
|
|
34646
34652
|
*/
|
|
34647
34653
|
static validatePlaybook<ThrowOnError extends boolean = false>(options: Options<ValidatePlaybookData, ThrowOnError>): RequestResult<ValidatePlaybookResponses, ValidatePlaybookErrors, ThrowOnError>;
|
|
34648
34654
|
/**
|
|
@@ -34662,7 +34668,7 @@ export declare class Playbooks {
|
|
|
34662
34668
|
*
|
|
34663
34669
|
* Updates any of `name`, `description` and `definition`. Only a change to `definition` archives a new version; a rename or a rewrite of the definition the playbook already holds leaves `version` where it is. A case keeps the version it was created on.
|
|
34664
34670
|
*
|
|
34665
|
-
* A new version is authored by the caller, checked as on create: `403 PLAYBOOK_EXECUTOR_FORBIDDEN` for an executor it may not start, an `EXECUTOR_NOT_FOUND` problem for one that does not exist, `EXECUTOR_ACTION_REQUIRED` or `EXECUTOR_ACTION_UNAVAILABLE` for an `mcp` tool action a run could not call, `409 PLAYBOOK_AUTHOR_UNAVAILABLE` for a trigger or OAuth token.
|
|
34671
|
+
* A new version is authored by the caller, checked as on create: `403 PLAYBOOK_EXECUTOR_FORBIDDEN` for an executor it may not start, an `EXECUTOR_NOT_FOUND` problem for one that does not exist, `EXECUTOR_ACTION_REQUIRED` or `EXECUTOR_ACTION_UNAVAILABLE` for an `mcp` tool action a run could not call, `EXECUTOR_TOOL_UNSUPPORTED` for a `client` tool executor, `TRANSFORMATION_TOOL_UNSUPPORTED` for a `client` or `mcp` transformation tool, `409 PLAYBOOK_AUTHOR_UNAVAILABLE` for a trigger or OAuth token.
|
|
34666
34672
|
*/
|
|
34667
34673
|
static updatePlaybook<ThrowOnError extends boolean = false>(options: Options<UpdatePlaybookData, ThrowOnError>): RequestResult<UpdatePlaybookResponses, UpdatePlaybookErrors, ThrowOnError>;
|
|
34668
34674
|
/**
|
|
@@ -35318,7 +35324,7 @@ export declare class Triggers {
|
|
|
35318
35324
|
/**
|
|
35319
35325
|
* Create a trigger
|
|
35320
35326
|
*
|
|
35321
|
-
* Creates a new trigger for a project
|
|
35327
|
+
* Creates a new trigger for a project. A `{{secret:...}}` reference in `tool_context` also needs `secrets:UseSecret` on that secret, else `403`.
|
|
35322
35328
|
*/
|
|
35323
35329
|
static createTrigger<ThrowOnError extends boolean = false>(options: Options<CreateTriggerData, ThrowOnError>): RequestResult<CreateTriggerResponses, CreateTriggerErrors, ThrowOnError>;
|
|
35324
35330
|
/**
|
|
@@ -35342,7 +35348,7 @@ export declare class Triggers {
|
|
|
35342
35348
|
/**
|
|
35343
35349
|
* Update a trigger
|
|
35344
35350
|
*
|
|
35345
|
-
* Updates an existing trigger's configuration. The type is immutable. Changing `target_type` or `target_id` re-checks that the caller may start the resulting target, because a firing runs with the trigger creator's authority rather than the updater's. A caller who could not start the new target is answered `403` and the trigger keeps the target it had.
|
|
35351
|
+
* Updates an existing trigger's configuration. The type is immutable. Changing `target_type` or `target_id` re-checks that the caller may start the resulting target, because a firing runs with the trigger creator's authority rather than the updater's. A caller who could not start the new target is answered `403` and the trigger keeps the target it had. A `{{secret:...}}` reference in a written `tool_context`, or in the stored one when the target changes, also needs `secrets:UseSecret` on that secret, else `403`.
|
|
35346
35352
|
*
|
|
35347
35353
|
*/
|
|
35348
35354
|
static updateTrigger<ThrowOnError extends boolean = false>(options: Options<UpdateTriggerData, ThrowOnError>): RequestResult<UpdateTriggerResponses, UpdateTriggerErrors, ThrowOnError>;
|
package/dist/index.d.mts
CHANGED
|
@@ -7149,9 +7149,9 @@ type NodeExecution = {
|
|
|
7149
7149
|
*/
|
|
7150
7150
|
type RequiredAction = {
|
|
7151
7151
|
/**
|
|
7152
|
-
* Discriminator identifying the kind of pause. Open enum — new pause kinds may be added in minor releases; clients must tolerate unknown values.
|
|
7152
|
+
* Discriminator identifying the kind of pause. Open enum — new pause kinds may be added in minor releases; clients must tolerate unknown values. `child_run` is a `loop` or `sub_orchestration` node whose child runs, listed in `context.orchestration_run_ids`, have not settled; their settle resumes it, and it accepts no human input.
|
|
7153
7153
|
*/
|
|
7154
|
-
type: 'human_input' | 'webhook_receive' | 'approval' | 'paused';
|
|
7154
|
+
type: 'human_input' | 'webhook_receive' | 'approval' | 'paused' | 'child_run';
|
|
7155
7155
|
/**
|
|
7156
7156
|
* The node the run is parked at. Absent for a `paused` action, which no node produced.
|
|
7157
7157
|
*/
|
|
@@ -7353,7 +7353,7 @@ type ValidatePlaybookRequest = {
|
|
|
7353
7353
|
type PlaybookValidationResult = {
|
|
7354
7354
|
valid: boolean;
|
|
7355
7355
|
/**
|
|
7356
|
-
* Every reason the definition cannot be stored: `DUPLICATE_NODE`, `DUPLICATE_INPUT`, `MISSING_NODE`, `UNKNOWN_FIELD`, `EXECUTOR_REQUIRED`, `EXECUTOR_FORBIDDEN`, `TRANSFORMATIONS_NOT_FINAL`, `DUPLICATE_TRANSFORMATION`, `CYCLE`, and, with `project_id`, `UNKNOWN_UPSTREAM`, `UPSTREAM_CYCLE`, `EXECUTOR_NOT_FOUND`, `EXECUTOR_ACTION_REQUIRED` or `
|
|
7356
|
+
* Every reason the definition cannot be stored: `DUPLICATE_NODE`, `DUPLICATE_INPUT`, `MISSING_NODE`, `UNKNOWN_FIELD`, `EXECUTOR_REQUIRED`, `EXECUTOR_FORBIDDEN`, `TRANSFORMATIONS_NOT_FINAL`, `DUPLICATE_TRANSFORMATION`, `CYCLE`, and, with `project_id`, `UNKNOWN_UPSTREAM`, `UPSTREAM_CYCLE`, `EXECUTOR_NOT_FOUND`, `EXECUTOR_ACTION_REQUIRED`, `EXECUTOR_ACTION_UNAVAILABLE`, `EXECUTOR_TOOL_UNSUPPORTED` or `TRANSFORMATION_TOOL_UNSUPPORTED`. The same items a refused write lists under `meta.problems`.
|
|
7357
7357
|
*/
|
|
7358
7358
|
problems: Array<ValidationProblem>;
|
|
7359
7359
|
};
|
|
@@ -12300,7 +12300,7 @@ type ListAiProvidersResponses = {
|
|
|
12300
12300
|
*/
|
|
12301
12301
|
base_url?: string;
|
|
12302
12302
|
/**
|
|
12303
|
-
* Additional provider-specific configuration. Absent when the record sets none.
|
|
12303
|
+
* Additional provider-specific configuration. Absent when the record sets none. Never carries a credential.
|
|
12304
12304
|
*/
|
|
12305
12305
|
config?: {
|
|
12306
12306
|
[key: string]: unknown;
|
|
@@ -12327,7 +12327,7 @@ type CreateAiProviderData = {
|
|
|
12327
12327
|
*/
|
|
12328
12328
|
default_model: string;
|
|
12329
12329
|
/**
|
|
12330
|
-
* Secret ID containing API credentials. Required for `bedrock` and `vertex
|
|
12330
|
+
* Secret ID containing API credentials. Required for `bedrock` and `vertex`.
|
|
12331
12331
|
*/
|
|
12332
12332
|
secret_id?: string;
|
|
12333
12333
|
/**
|
|
@@ -12335,7 +12335,7 @@ type CreateAiProviderData = {
|
|
|
12335
12335
|
*/
|
|
12336
12336
|
base_url?: string;
|
|
12337
12337
|
/**
|
|
12338
|
-
* Additional provider-specific configuration. `
|
|
12338
|
+
* Additional provider-specific configuration. `apiKey` is refused: the credential goes in the linked secret.
|
|
12339
12339
|
*/
|
|
12340
12340
|
config?: {
|
|
12341
12341
|
[key: string]: unknown;
|
|
@@ -12511,7 +12511,7 @@ type GetAiProviderResponses = {
|
|
|
12511
12511
|
secret_id?: string | null;
|
|
12512
12512
|
base_url?: string;
|
|
12513
12513
|
/**
|
|
12514
|
-
* Additional provider-specific configuration.
|
|
12514
|
+
* Additional provider-specific configuration. Never carries a credential.
|
|
12515
12515
|
*/
|
|
12516
12516
|
config?: {
|
|
12517
12517
|
[key: string]: unknown;
|
|
@@ -12532,7 +12532,7 @@ type UpdateAiProviderData = {
|
|
|
12532
12532
|
secret_id?: string | null;
|
|
12533
12533
|
base_url?: string;
|
|
12534
12534
|
/**
|
|
12535
|
-
* Replaces the whole configuration
|
|
12535
|
+
* Replaces the whole configuration. `apiKey` is refused: the credential goes in the linked secret.
|
|
12536
12536
|
*/
|
|
12537
12537
|
config?: {
|
|
12538
12538
|
[key: string]: unknown;
|
|
@@ -16862,7 +16862,7 @@ type UpdateDocumentErrors = {
|
|
|
16862
16862
|
*/
|
|
16863
16863
|
404: ErrorResponse;
|
|
16864
16864
|
/**
|
|
16865
|
-
* The document has moved past the version this write read (`VERSION_CONFLICT`, with `meta.current_version`),
|
|
16865
|
+
* The document has moved past the version this write read (`VERSION_CONFLICT`, with `meta.current_version`), `path` is held by another file in the project (`NAME_CONFLICT`), or new `content` would exceed the project's `storage_bytes` quota (`QUOTA_STORAGE_EXCEEDED`, no `Retry-After`). Nothing is written.
|
|
16866
16866
|
*/
|
|
16867
16867
|
409: ErrorResponse;
|
|
16868
16868
|
/**
|
|
@@ -17311,7 +17311,7 @@ type RestoreDocumentVersionErrors = {
|
|
|
17311
17311
|
*/
|
|
17312
17312
|
404: ErrorResponse;
|
|
17313
17313
|
/**
|
|
17314
|
-
* Another write took the document's version first (`VERSION_CONFLICT`, with `meta.current_version`),
|
|
17314
|
+
* Another write took the document's version first (`VERSION_CONFLICT`, with `meta.current_version`), the restored `path` is held by another file in the project (`NAME_CONFLICT`), or the restored content would exceed the project's `storage_bytes` quota (`QUOTA_STORAGE_EXCEEDED`, no `Retry-After`). Nothing is written.
|
|
17315
17315
|
*/
|
|
17316
17316
|
409: ErrorResponse;
|
|
17317
17317
|
/**
|
|
@@ -22433,7 +22433,7 @@ type UpdateMemoryErrors = {
|
|
|
22433
22433
|
*/
|
|
22434
22434
|
404: ErrorResponse;
|
|
22435
22435
|
/**
|
|
22436
|
-
* The
|
|
22436
|
+
* The memory has moved past the version this write read (`VERSION_CONFLICT`, with `meta.current_version`), or new `content` would exceed the project's `storage_bytes` quota (`QUOTA_STORAGE_EXCEEDED`, no `Retry-After`). Nothing is written.
|
|
22437
22437
|
*/
|
|
22438
22438
|
409: ErrorResponse;
|
|
22439
22439
|
/**
|
|
@@ -32938,7 +32938,7 @@ export declare class Agents {
|
|
|
32938
32938
|
/**
|
|
32939
32939
|
* Create an agent
|
|
32940
32940
|
*
|
|
32941
|
-
* Creates a new agent bound to an AI provider.
|
|
32941
|
+
* Creates a new agent bound to an AI provider. A `{{secret:...}}` reference in an inline `tool_bindings[].tool` also needs `secrets:UseSecret` on that secret, else `403`.
|
|
32942
32942
|
*/
|
|
32943
32943
|
static createAgent<ThrowOnError extends boolean = false>(options: Options<CreateAgentData, ThrowOnError>): RequestResult<CreateAgentResponses, CreateAgentErrors, ThrowOnError>;
|
|
32944
32944
|
/**
|
|
@@ -32958,13 +32958,13 @@ export declare class Agents {
|
|
|
32958
32958
|
/**
|
|
32959
32959
|
* Partially update an agent
|
|
32960
32960
|
*
|
|
32961
|
-
* Partially updates an existing agent. Identical to PUT — both perform partial updates.
|
|
32961
|
+
* Partially updates an existing agent. Identical to PUT — both perform partial updates. A `{{secret:...}}` reference in an inline `tool_bindings[].tool` also needs `secrets:UseSecret` on that secret, else `403`.
|
|
32962
32962
|
*/
|
|
32963
32963
|
static patchAgent<ThrowOnError extends boolean = false>(options: Options<PatchAgentData, ThrowOnError>): RequestResult<PatchAgentResponses, PatchAgentErrors, ThrowOnError>;
|
|
32964
32964
|
/**
|
|
32965
32965
|
* Update an agent
|
|
32966
32966
|
*
|
|
32967
|
-
* Updates an existing agent. Identical to PATCH — both perform partial updates.
|
|
32967
|
+
* Updates an existing agent. Identical to PATCH — both perform partial updates. A `{{secret:...}}` reference in an inline `tool_bindings[].tool` also needs `secrets:UseSecret` on that secret, else `403`.
|
|
32968
32968
|
*/
|
|
32969
32969
|
static updateAgent<ThrowOnError extends boolean = false>(options: Options<UpdateAgentData, ThrowOnError>): RequestResult<UpdateAgentResponses, UpdateAgentErrors, ThrowOnError>;
|
|
32970
32970
|
/**
|
|
@@ -33048,8 +33048,14 @@ export declare class AiProviders {
|
|
|
33048
33048
|
*
|
|
33049
33049
|
* Creates a new LLM provider configuration.
|
|
33050
33050
|
*
|
|
33051
|
-
* A
|
|
33052
|
-
*
|
|
33051
|
+
* A provider's credential is its linked `secret_id`; `config.apiKey` is
|
|
33052
|
+
* refused with `400 VALIDATION_FAILED`.
|
|
33053
|
+
*
|
|
33054
|
+
* A record with both `base_url` and `secret_id` sends the secret to that
|
|
33055
|
+
* URL, so creating one also needs `secrets:UseSecret` on the secret, else
|
|
33056
|
+
* `403`.
|
|
33057
|
+
*
|
|
33058
|
+
* A `bedrock` or `vertex` record must link one. Without it the provider
|
|
33053
33059
|
* SDK signs with the server's own credentials (the AWS default credential
|
|
33054
33060
|
* chain, Google Application Default Credentials), which is refused with
|
|
33055
33061
|
* `400 VALIDATION_FAILED` unless the deployment allows it.
|
|
@@ -33074,7 +33080,7 @@ export declare class AiProviders {
|
|
|
33074
33080
|
/**
|
|
33075
33081
|
* Update an AI provider
|
|
33076
33082
|
*
|
|
33077
|
-
* Updates an AI provider configuration
|
|
33083
|
+
* Updates an AI provider configuration. Setting `base_url` or `secret_id` so the record holds both also needs `secrets:UseSecret` on the secret, else `403`.
|
|
33078
33084
|
*/
|
|
33079
33085
|
static updateAiProvider<ThrowOnError extends boolean = false>(options: Options<UpdateAiProviderData, ThrowOnError>): RequestResult<UpdateAiProviderResponses, UpdateAiProviderErrors, ThrowOnError>;
|
|
33080
33086
|
/**
|
|
@@ -34634,7 +34640,7 @@ export declare class Playbooks {
|
|
|
34634
34640
|
*
|
|
34635
34641
|
* Creates a playbook at version 1. The definition is refused with `400 PLAYBOOK_VALIDATION_FAILED` when it holds a duplicate node or input, an input reading a missing node or field, an `execute` node without an executor or another kind with one, transformations on a non-final node, or a cycle; `meta.problems` lists every one. A duplicate `name` in the project is `409 NAME_CONFLICT`.
|
|
34636
34642
|
*
|
|
34637
|
-
* The caller becomes the version's author, whom its executors run as, so it must be allowed to start every executor the definition names (`403 PLAYBOOK_EXECUTOR_FORBIDDEN`), and each must exist in the project, or be an agent or tool shared with it (`400 PLAYBOOK_VALIDATION_FAILED`, an `EXECUTOR_NOT_FOUND` problem). A `tool` executor on an `mcp` tool must name in `operation_id` an action the tool's binding allows (`EXECUTOR_ACTION_REQUIRED`, `EXECUTOR_ACTION_UNAVAILABLE`). A definition with executors written with a trigger or OAuth token is `409 PLAYBOOK_AUTHOR_UNAVAILABLE`: those carry their boundary in the token, so no run can act as them.
|
|
34643
|
+
* The caller becomes the version's author, whom its executors run as, so it must be allowed to start every executor the definition names (`403 PLAYBOOK_EXECUTOR_FORBIDDEN`), and each must exist in the project, or be an agent or tool shared with it (`400 PLAYBOOK_VALIDATION_FAILED`, an `EXECUTOR_NOT_FOUND` problem). A `tool` executor on an `mcp` tool must name in `operation_id` an action the tool's binding allows (`EXECUTOR_ACTION_REQUIRED`, `EXECUTOR_ACTION_UNAVAILABLE`). An executor cannot be a `client` tool (`EXECUTOR_TOOL_UNSUPPORTED`), nor a transformation's tool a `client` or `mcp` tool (`TRANSFORMATION_TOOL_UNSUPPORTED`). A definition with executors written with a trigger or OAuth token is `409 PLAYBOOK_AUTHOR_UNAVAILABLE`: those carry their boundary in the token, so no run can act as them.
|
|
34638
34644
|
*/
|
|
34639
34645
|
static createPlaybook<ThrowOnError extends boolean = false>(options: Options<CreatePlaybookData, ThrowOnError>): RequestResult<CreatePlaybookResponses, CreatePlaybookErrors, ThrowOnError>;
|
|
34640
34646
|
/**
|
|
@@ -34642,7 +34648,7 @@ export declare class Playbooks {
|
|
|
34642
34648
|
*
|
|
34643
34649
|
* Answers what a create or update would be told about a definition, without writing: `valid`, and every graph problem it holds. A definition whose shape cannot be read is `400 VALIDATION_FAILED`, as on a write.
|
|
34644
34650
|
*
|
|
34645
|
-
* With `project_id`, the references are checked too, as a write there would check them: the upstreams against that project's playbooks, and each executor the caller may start must exist (`EXECUTOR_NOT_FOUND`) and name an action its `mcp` tool allows (`EXECUTOR_ACTION_REQUIRED`, `EXECUTOR_ACTION_UNAVAILABLE`). The caller needs both `playbooks:ValidatePlaybook` and `playbooks:ListPlaybooks` on the project. Without it, only the definition's own graph is checked.
|
|
34651
|
+
* With `project_id`, the references are checked too, as a write there would check them: the upstreams against that project's playbooks, and each executor the caller may start must exist (`EXECUTOR_NOT_FOUND`) and name an action its `mcp` tool allows (`EXECUTOR_ACTION_REQUIRED`, `EXECUTOR_ACTION_UNAVAILABLE`) and not be a `client` tool (`EXECUTOR_TOOL_UNSUPPORTED`), and each transformation's tool must not be a `client` or `mcp` tool (`TRANSFORMATION_TOOL_UNSUPPORTED`). The caller needs both `playbooks:ValidatePlaybook` and `playbooks:ListPlaybooks` on the project. Without it, only the definition's own graph is checked.
|
|
34646
34652
|
*/
|
|
34647
34653
|
static validatePlaybook<ThrowOnError extends boolean = false>(options: Options<ValidatePlaybookData, ThrowOnError>): RequestResult<ValidatePlaybookResponses, ValidatePlaybookErrors, ThrowOnError>;
|
|
34648
34654
|
/**
|
|
@@ -34662,7 +34668,7 @@ export declare class Playbooks {
|
|
|
34662
34668
|
*
|
|
34663
34669
|
* Updates any of `name`, `description` and `definition`. Only a change to `definition` archives a new version; a rename or a rewrite of the definition the playbook already holds leaves `version` where it is. A case keeps the version it was created on.
|
|
34664
34670
|
*
|
|
34665
|
-
* A new version is authored by the caller, checked as on create: `403 PLAYBOOK_EXECUTOR_FORBIDDEN` for an executor it may not start, an `EXECUTOR_NOT_FOUND` problem for one that does not exist, `EXECUTOR_ACTION_REQUIRED` or `EXECUTOR_ACTION_UNAVAILABLE` for an `mcp` tool action a run could not call, `409 PLAYBOOK_AUTHOR_UNAVAILABLE` for a trigger or OAuth token.
|
|
34671
|
+
* A new version is authored by the caller, checked as on create: `403 PLAYBOOK_EXECUTOR_FORBIDDEN` for an executor it may not start, an `EXECUTOR_NOT_FOUND` problem for one that does not exist, `EXECUTOR_ACTION_REQUIRED` or `EXECUTOR_ACTION_UNAVAILABLE` for an `mcp` tool action a run could not call, `EXECUTOR_TOOL_UNSUPPORTED` for a `client` tool executor, `TRANSFORMATION_TOOL_UNSUPPORTED` for a `client` or `mcp` transformation tool, `409 PLAYBOOK_AUTHOR_UNAVAILABLE` for a trigger or OAuth token.
|
|
34666
34672
|
*/
|
|
34667
34673
|
static updatePlaybook<ThrowOnError extends boolean = false>(options: Options<UpdatePlaybookData, ThrowOnError>): RequestResult<UpdatePlaybookResponses, UpdatePlaybookErrors, ThrowOnError>;
|
|
34668
34674
|
/**
|
|
@@ -35318,7 +35324,7 @@ export declare class Triggers {
|
|
|
35318
35324
|
/**
|
|
35319
35325
|
* Create a trigger
|
|
35320
35326
|
*
|
|
35321
|
-
* Creates a new trigger for a project
|
|
35327
|
+
* Creates a new trigger for a project. A `{{secret:...}}` reference in `tool_context` also needs `secrets:UseSecret` on that secret, else `403`.
|
|
35322
35328
|
*/
|
|
35323
35329
|
static createTrigger<ThrowOnError extends boolean = false>(options: Options<CreateTriggerData, ThrowOnError>): RequestResult<CreateTriggerResponses, CreateTriggerErrors, ThrowOnError>;
|
|
35324
35330
|
/**
|
|
@@ -35342,7 +35348,7 @@ export declare class Triggers {
|
|
|
35342
35348
|
/**
|
|
35343
35349
|
* Update a trigger
|
|
35344
35350
|
*
|
|
35345
|
-
* Updates an existing trigger's configuration. The type is immutable. Changing `target_type` or `target_id` re-checks that the caller may start the resulting target, because a firing runs with the trigger creator's authority rather than the updater's. A caller who could not start the new target is answered `403` and the trigger keeps the target it had.
|
|
35351
|
+
* Updates an existing trigger's configuration. The type is immutable. Changing `target_type` or `target_id` re-checks that the caller may start the resulting target, because a firing runs with the trigger creator's authority rather than the updater's. A caller who could not start the new target is answered `403` and the trigger keeps the target it had. A `{{secret:...}}` reference in a written `tool_context`, or in the stored one when the target changes, also needs `secrets:UseSecret` on that secret, else `403`.
|
|
35346
35352
|
*
|
|
35347
35353
|
*/
|
|
35348
35354
|
static updateTrigger<ThrowOnError extends boolean = false>(options: Options<UpdateTriggerData, ThrowOnError>): RequestResult<UpdateTriggerResponses, UpdateTriggerErrors, ThrowOnError>;
|
package/dist/index.mjs
CHANGED
|
@@ -1265,7 +1265,7 @@ var Agents = class {
|
|
|
1265
1265
|
/**
|
|
1266
1266
|
* Create an agent
|
|
1267
1267
|
*
|
|
1268
|
-
* Creates a new agent bound to an AI provider.
|
|
1268
|
+
* Creates a new agent bound to an AI provider. A `{{secret:...}}` reference in an inline `tool_bindings[].tool` also needs `secrets:UseSecret` on that secret, else `403`.
|
|
1269
1269
|
*/
|
|
1270
1270
|
static createAgent(options) {
|
|
1271
1271
|
return (options.client ?? client).post({
|
|
@@ -1304,7 +1304,7 @@ var Agents = class {
|
|
|
1304
1304
|
/**
|
|
1305
1305
|
* Partially update an agent
|
|
1306
1306
|
*
|
|
1307
|
-
* Partially updates an existing agent. Identical to PUT — both perform partial updates.
|
|
1307
|
+
* Partially updates an existing agent. Identical to PUT — both perform partial updates. A `{{secret:...}}` reference in an inline `tool_bindings[].tool` also needs `secrets:UseSecret` on that secret, else `403`.
|
|
1308
1308
|
*/
|
|
1309
1309
|
static patchAgent(options) {
|
|
1310
1310
|
return (options.client ?? client).patch({
|
|
@@ -1319,7 +1319,7 @@ var Agents = class {
|
|
|
1319
1319
|
/**
|
|
1320
1320
|
* Update an agent
|
|
1321
1321
|
*
|
|
1322
|
-
* Updates an existing agent. Identical to PATCH — both perform partial updates.
|
|
1322
|
+
* Updates an existing agent. Identical to PATCH — both perform partial updates. A `{{secret:...}}` reference in an inline `tool_bindings[].tool` also needs `secrets:UseSecret` on that secret, else `403`.
|
|
1323
1323
|
*/
|
|
1324
1324
|
static updateAgent(options) {
|
|
1325
1325
|
return (options.client ?? client).put({
|
|
@@ -1473,8 +1473,14 @@ var AiProviders = class {
|
|
|
1473
1473
|
*
|
|
1474
1474
|
* Creates a new LLM provider configuration.
|
|
1475
1475
|
*
|
|
1476
|
-
* A
|
|
1477
|
-
*
|
|
1476
|
+
* A provider's credential is its linked `secret_id`; `config.apiKey` is
|
|
1477
|
+
* refused with `400 VALIDATION_FAILED`.
|
|
1478
|
+
*
|
|
1479
|
+
* A record with both `base_url` and `secret_id` sends the secret to that
|
|
1480
|
+
* URL, so creating one also needs `secrets:UseSecret` on the secret, else
|
|
1481
|
+
* `403`.
|
|
1482
|
+
*
|
|
1483
|
+
* A `bedrock` or `vertex` record must link one. Without it the provider
|
|
1478
1484
|
* SDK signs with the server's own credentials (the AWS default credential
|
|
1479
1485
|
* chain, Google Application Default Credentials), which is refused with
|
|
1480
1486
|
* `400 VALIDATION_FAILED` unless the deployment allows it.
|
|
@@ -1518,7 +1524,7 @@ var AiProviders = class {
|
|
|
1518
1524
|
/**
|
|
1519
1525
|
* Update an AI provider
|
|
1520
1526
|
*
|
|
1521
|
-
* Updates an AI provider configuration
|
|
1527
|
+
* Updates an AI provider configuration. Setting `base_url` or `secret_id` so the record holds both also needs `secrets:UseSecret` on the secret, else `403`.
|
|
1522
1528
|
*/
|
|
1523
1529
|
static updateAiProvider(options) {
|
|
1524
1530
|
return (options.client ?? client).patch({
|
|
@@ -4544,7 +4550,7 @@ var Playbooks = class {
|
|
|
4544
4550
|
*
|
|
4545
4551
|
* Creates a playbook at version 1. The definition is refused with `400 PLAYBOOK_VALIDATION_FAILED` when it holds a duplicate node or input, an input reading a missing node or field, an `execute` node without an executor or another kind with one, transformations on a non-final node, or a cycle; `meta.problems` lists every one. A duplicate `name` in the project is `409 NAME_CONFLICT`.
|
|
4546
4552
|
*
|
|
4547
|
-
* The caller becomes the version's author, whom its executors run as, so it must be allowed to start every executor the definition names (`403 PLAYBOOK_EXECUTOR_FORBIDDEN`), and each must exist in the project, or be an agent or tool shared with it (`400 PLAYBOOK_VALIDATION_FAILED`, an `EXECUTOR_NOT_FOUND` problem). A `tool` executor on an `mcp` tool must name in `operation_id` an action the tool's binding allows (`EXECUTOR_ACTION_REQUIRED`, `EXECUTOR_ACTION_UNAVAILABLE`). A definition with executors written with a trigger or OAuth token is `409 PLAYBOOK_AUTHOR_UNAVAILABLE`: those carry their boundary in the token, so no run can act as them.
|
|
4553
|
+
* The caller becomes the version's author, whom its executors run as, so it must be allowed to start every executor the definition names (`403 PLAYBOOK_EXECUTOR_FORBIDDEN`), and each must exist in the project, or be an agent or tool shared with it (`400 PLAYBOOK_VALIDATION_FAILED`, an `EXECUTOR_NOT_FOUND` problem). A `tool` executor on an `mcp` tool must name in `operation_id` an action the tool's binding allows (`EXECUTOR_ACTION_REQUIRED`, `EXECUTOR_ACTION_UNAVAILABLE`). An executor cannot be a `client` tool (`EXECUTOR_TOOL_UNSUPPORTED`), nor a transformation's tool a `client` or `mcp` tool (`TRANSFORMATION_TOOL_UNSUPPORTED`). A definition with executors written with a trigger or OAuth token is `409 PLAYBOOK_AUTHOR_UNAVAILABLE`: those carry their boundary in the token, so no run can act as them.
|
|
4548
4554
|
*/
|
|
4549
4555
|
static createPlaybook(options) {
|
|
4550
4556
|
return (options.client ?? client).post({
|
|
@@ -4561,7 +4567,7 @@ var Playbooks = class {
|
|
|
4561
4567
|
*
|
|
4562
4568
|
* Answers what a create or update would be told about a definition, without writing: `valid`, and every graph problem it holds. A definition whose shape cannot be read is `400 VALIDATION_FAILED`, as on a write.
|
|
4563
4569
|
*
|
|
4564
|
-
* With `project_id`, the references are checked too, as a write there would check them: the upstreams against that project's playbooks, and each executor the caller may start must exist (`EXECUTOR_NOT_FOUND`) and name an action its `mcp` tool allows (`EXECUTOR_ACTION_REQUIRED`, `EXECUTOR_ACTION_UNAVAILABLE`). The caller needs both `playbooks:ValidatePlaybook` and `playbooks:ListPlaybooks` on the project. Without it, only the definition's own graph is checked.
|
|
4570
|
+
* With `project_id`, the references are checked too, as a write there would check them: the upstreams against that project's playbooks, and each executor the caller may start must exist (`EXECUTOR_NOT_FOUND`) and name an action its `mcp` tool allows (`EXECUTOR_ACTION_REQUIRED`, `EXECUTOR_ACTION_UNAVAILABLE`) and not be a `client` tool (`EXECUTOR_TOOL_UNSUPPORTED`), and each transformation's tool must not be a `client` or `mcp` tool (`TRANSFORMATION_TOOL_UNSUPPORTED`). The caller needs both `playbooks:ValidatePlaybook` and `playbooks:ListPlaybooks` on the project. Without it, only the definition's own graph is checked.
|
|
4565
4571
|
*/
|
|
4566
4572
|
static validatePlaybook(options) {
|
|
4567
4573
|
return (options.client ?? client).post({
|
|
@@ -4600,7 +4606,7 @@ var Playbooks = class {
|
|
|
4600
4606
|
*
|
|
4601
4607
|
* Updates any of `name`, `description` and `definition`. Only a change to `definition` archives a new version; a rename or a rewrite of the definition the playbook already holds leaves `version` where it is. A case keeps the version it was created on.
|
|
4602
4608
|
*
|
|
4603
|
-
* A new version is authored by the caller, checked as on create: `403 PLAYBOOK_EXECUTOR_FORBIDDEN` for an executor it may not start, an `EXECUTOR_NOT_FOUND` problem for one that does not exist, `EXECUTOR_ACTION_REQUIRED` or `EXECUTOR_ACTION_UNAVAILABLE` for an `mcp` tool action a run could not call, `409 PLAYBOOK_AUTHOR_UNAVAILABLE` for a trigger or OAuth token.
|
|
4609
|
+
* A new version is authored by the caller, checked as on create: `403 PLAYBOOK_EXECUTOR_FORBIDDEN` for an executor it may not start, an `EXECUTOR_NOT_FOUND` problem for one that does not exist, `EXECUTOR_ACTION_REQUIRED` or `EXECUTOR_ACTION_UNAVAILABLE` for an `mcp` tool action a run could not call, `EXECUTOR_TOOL_UNSUPPORTED` for a `client` tool executor, `TRANSFORMATION_TOOL_UNSUPPORTED` for a `client` or `mcp` transformation tool, `409 PLAYBOOK_AUTHOR_UNAVAILABLE` for a trigger or OAuth token.
|
|
4604
4610
|
*/
|
|
4605
4611
|
static updatePlaybook(options) {
|
|
4606
4612
|
return (options.client ?? client).patch({
|
|
@@ -5846,7 +5852,7 @@ var Triggers = class {
|
|
|
5846
5852
|
/**
|
|
5847
5853
|
* Create a trigger
|
|
5848
5854
|
*
|
|
5849
|
-
* Creates a new trigger for a project
|
|
5855
|
+
* Creates a new trigger for a project. A `{{secret:...}}` reference in `tool_context` also needs `secrets:UseSecret` on that secret, else `403`.
|
|
5850
5856
|
*/
|
|
5851
5857
|
static createTrigger(options) {
|
|
5852
5858
|
return (options.client ?? client).post({
|
|
@@ -5894,7 +5900,7 @@ var Triggers = class {
|
|
|
5894
5900
|
/**
|
|
5895
5901
|
* Update a trigger
|
|
5896
5902
|
*
|
|
5897
|
-
* Updates an existing trigger's configuration. The type is immutable. Changing `target_type` or `target_id` re-checks that the caller may start the resulting target, because a firing runs with the trigger creator's authority rather than the updater's. A caller who could not start the new target is answered `403` and the trigger keeps the target it had.
|
|
5903
|
+
* Updates an existing trigger's configuration. The type is immutable. Changing `target_type` or `target_id` re-checks that the caller may start the resulting target, because a firing runs with the trigger creator's authority rather than the updater's. A caller who could not start the new target is answered `403` and the trigger keeps the target it had. A `{{secret:...}}` reference in a written `tool_context`, or in the stored one when the target changes, also needs `secrets:UseSecret` on that secret, else `403`.
|
|
5898
5904
|
*
|
|
5899
5905
|
*/
|
|
5900
5906
|
static updateTrigger(options) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.219.1",
|
|
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.
|
|
41
|
+
"@naturali/api": "0.219.1",
|
|
42
42
|
"@ttoss/openapi-codegen": "^0.10.0",
|
|
43
43
|
"@types/node": "^26.5.1",
|
|
44
44
|
"tsdown": "^0.23.0",
|