@soat/sdk 0.115.0 → 0.117.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +70 -7
- package/dist/index.d.cts +1308 -38
- package/dist/index.d.mts +1308 -38
- package/dist/index.mjs +70 -7
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -4243,7 +4243,7 @@ var Playbooks = class {
|
|
|
4243
4243
|
/**
|
|
4244
4244
|
* Run a node of a case
|
|
4245
4245
|
*
|
|
4246
|
-
* Runs one node now. The cascade already runs every node whose inputs are set once a write, a settle or a resume makes it runnable, and never reruns a `failed` or `done` one: this is how a failed node is retried, and how a `done` node is recomputed after an upgrade changed its executor. A `collect` node takes its own input values as its output, any other node starts its executor with the node's input values mapped through the executor's `input`. The executor runs under the `policy_ids` of the case's playbook version, which must allow starting it (`
|
|
4246
|
+
* Runs one node now. The cascade already runs every node whose inputs are set once a write, a settle or a resume makes it runnable, and never reruns a `failed` or `done` one: this is how a failed node is retried, and how a `done` node is recomputed after an upgrade changed its executor. A `collect` node takes its own input values as its output, any other node starts its executor with the node's input values mapped through the executor's `input`. The executor runs under the `policy_ids` of the case's playbook version, which must allow starting it: an executor it may not start fails the execution (`FORBIDDEN`). Only a `ready`, `stale`, `failed` or `done` node with every required input set runs; anything else is `409 PLAYBOOK_NODE_NOT_RUNNABLE`. A paused case is `409 PLAYBOOK_CASE_PAUSED`, and a case in a paused project `409 PROJECT_PAUSED`.
|
|
4247
4247
|
*
|
|
4248
4248
|
* An `upstream` node has no executor: running it pulls the current output of the node it names in the bound case, which must be `done`. This is the only way to refresh one that an upstream change left `stale`.
|
|
4249
4249
|
*
|
|
@@ -4288,7 +4288,7 @@ var Playbooks = class {
|
|
|
4288
4288
|
*
|
|
4289
4289
|
* Renders one revision of a final node as files, one export per transformation: each transformation's tool is called with the case's `case_id` and `subject`, the `node_id`, the `revision` and that revision's `output`, and must answer a file (`execute.response_mode: base64`) of its `format`'s content type. The file is kept in the project's files under `/.system/playbooks/`. An export never feeds a node.
|
|
4290
4290
|
*
|
|
4291
|
-
* Without `revision` the node's current output is exported, which needs the node `done` (`409 PLAYBOOK_NODE_NOT_EXPORTABLE`); a `revision` names an earlier output or confirmation of the node. Each tool runs under the `policy_ids` of the case's playbook version
|
|
4291
|
+
* Without `revision` the node's current output is exported, which needs the node `done` (`409 PLAYBOOK_NODE_NOT_EXPORTABLE`); a `revision` names an earlier output or confirmation of the node. Each tool runs under the `policy_ids` of the case's playbook version: an export whose tool it may not call fails (`FORBIDDEN`). A paused case is `409 PLAYBOOK_CASE_PAUSED`, and a case in a paused project `409 PROJECT_PAUSED`.
|
|
4292
4292
|
*
|
|
4293
4293
|
* Without `wait` every export answers `running` and settles in the background; with `wait: true` it answers once each has its file or its error.
|
|
4294
4294
|
*/
|
|
@@ -5074,7 +5074,7 @@ var Tasks = class {
|
|
|
5074
5074
|
/**
|
|
5075
5075
|
* List tasks
|
|
5076
5076
|
*
|
|
5077
|
-
* Lists tasks (the board query). Filter by workflow, state, status, automation status, assignee, or `metadata` — `GET /tasks?workflow_id=...&state=...` is one board column.
|
|
5077
|
+
* Lists tasks (the board query). Filter by workflow, state, status, automation status, priority, assignee, or `metadata` — `GET /tasks?workflow_id=...&state=...` is one board column.
|
|
5078
5078
|
*/
|
|
5079
5079
|
static listTasks(options) {
|
|
5080
5080
|
return (options?.client ?? client).get({
|
|
@@ -5100,7 +5100,7 @@ var Tasks = class {
|
|
|
5100
5100
|
/**
|
|
5101
5101
|
* Delete a task
|
|
5102
5102
|
*
|
|
5103
|
-
* Deletes a task. Its transition history
|
|
5103
|
+
* Deletes a task. Its transition history and dependencies cascade; a dependent it was the last open dependency of is freed.
|
|
5104
5104
|
*/
|
|
5105
5105
|
static deleteTask(options) {
|
|
5106
5106
|
return (options.client ?? client).delete({
|
|
@@ -5176,6 +5176,21 @@ var Tasks = class {
|
|
|
5176
5176
|
});
|
|
5177
5177
|
}
|
|
5178
5178
|
/**
|
|
5179
|
+
* Set a task's priority
|
|
5180
|
+
*
|
|
5181
|
+
* Sets or clears a task's priority. An action of its own, `tasks:SetTaskPriority`, so a principal can update a task without reprioritising it; create-task and update-task do not accept `priority`.
|
|
5182
|
+
*/
|
|
5183
|
+
static setTaskPriority(options) {
|
|
5184
|
+
return (options.client ?? client).put({
|
|
5185
|
+
url: "/api/v1/tasks/{task_id}/priority",
|
|
5186
|
+
...options,
|
|
5187
|
+
headers: {
|
|
5188
|
+
"Content-Type": "application/json",
|
|
5189
|
+
...options.headers
|
|
5190
|
+
}
|
|
5191
|
+
});
|
|
5192
|
+
}
|
|
5193
|
+
/**
|
|
5179
5194
|
* Pause a task
|
|
5180
5195
|
*
|
|
5181
5196
|
* Pauses a task's automation. While a pause is in force no state's `on_enter` dispatches and no retry chain continues — an agent generation, a tool call and a sub-orchestration alike — so the task stops spending without losing its place.
|
|
@@ -5206,6 +5221,54 @@ var Tasks = class {
|
|
|
5206
5221
|
});
|
|
5207
5222
|
}
|
|
5208
5223
|
/**
|
|
5224
|
+
* List a task's dependencies
|
|
5225
|
+
*
|
|
5226
|
+
* Lists the tasks this task depends on, open and closed, oldest first. Only the open ones block it.
|
|
5227
|
+
*/
|
|
5228
|
+
static listTaskDependencies(options) {
|
|
5229
|
+
return (options.client ?? client).get({
|
|
5230
|
+
url: "/api/v1/tasks/{task_id}/dependencies",
|
|
5231
|
+
...options
|
|
5232
|
+
});
|
|
5233
|
+
}
|
|
5234
|
+
/**
|
|
5235
|
+
* Add a task dependency
|
|
5236
|
+
*
|
|
5237
|
+
* Makes the task depend on `depends_on_task_id`, a task in the same project: the path's task is blocked until that one closes, in any terminal state. The pair is the dependency's identity: adding it again answers `200` with the existing one. An edge that would close a cycle is refused.
|
|
5238
|
+
*/
|
|
5239
|
+
static addTaskDependency(options) {
|
|
5240
|
+
return (options.client ?? client).post({
|
|
5241
|
+
url: "/api/v1/tasks/{task_id}/dependencies",
|
|
5242
|
+
...options,
|
|
5243
|
+
headers: {
|
|
5244
|
+
"Content-Type": "application/json",
|
|
5245
|
+
...options.headers
|
|
5246
|
+
}
|
|
5247
|
+
});
|
|
5248
|
+
}
|
|
5249
|
+
/**
|
|
5250
|
+
* List a task's dependents
|
|
5251
|
+
*
|
|
5252
|
+
* Lists the tasks that depend on this task, open and closed, oldest first.
|
|
5253
|
+
*/
|
|
5254
|
+
static listTaskDependents(options) {
|
|
5255
|
+
return (options.client ?? client).get({
|
|
5256
|
+
url: "/api/v1/tasks/{task_id}/dependents",
|
|
5257
|
+
...options
|
|
5258
|
+
});
|
|
5259
|
+
}
|
|
5260
|
+
/**
|
|
5261
|
+
* Remove a task dependency
|
|
5262
|
+
*
|
|
5263
|
+
* Removes the task's dependency on `depends_on_task_id`; answers `204` also when there is none. When it was the task's last open dependency, `tasks.unblocked` fires.
|
|
5264
|
+
*/
|
|
5265
|
+
static removeTaskDependency(options) {
|
|
5266
|
+
return (options.client ?? client).delete({
|
|
5267
|
+
url: "/api/v1/tasks/{task_id}/dependencies/{depends_on_task_id}",
|
|
5268
|
+
...options
|
|
5269
|
+
});
|
|
5270
|
+
}
|
|
5271
|
+
/**
|
|
5209
5272
|
* Get task history
|
|
5210
5273
|
*
|
|
5211
5274
|
* Returns the append-only transition history of a task.
|
|
@@ -5386,7 +5449,7 @@ var Triggers = class {
|
|
|
5386
5449
|
/**
|
|
5387
5450
|
* Create a trigger
|
|
5388
5451
|
*
|
|
5389
|
-
* Creates a new trigger for a project. A `{{secret:...}}` reference in `tool_context` also needs `secrets:UseSecret` on that secret, else `403`.
|
|
5452
|
+
* Creates a new trigger for a project. A `{{secret:...}}` reference in `tool_context` also needs `secrets:UseSecret` on that secret, else `403`. An event trigger whose `policy_ids` cannot read a platform namespace its `events` subscribe to is refused with `400` `TRIGGER_EVENTS_UNREADABLE`.
|
|
5390
5453
|
*/
|
|
5391
5454
|
static createTrigger(options) {
|
|
5392
5455
|
return (options.client ?? client).post({
|
|
@@ -5434,7 +5497,7 @@ var Triggers = class {
|
|
|
5434
5497
|
/**
|
|
5435
5498
|
* Update a trigger
|
|
5436
5499
|
*
|
|
5437
|
-
* Updates an existing trigger's configuration. The type is immutable. Changing `target_type` or `target_id` re-checks the target-start action (`orchestrations:StartRun`, `agents:CreateAgentGeneration` or `tools:CallTool`) against the resulting target, because a firing acts under the trigger's `policy_ids` rather than the updater's grant. 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`.
|
|
5500
|
+
* Updates an existing trigger's configuration. The type is immutable. Changing `target_type` or `target_id` re-checks the target-start action (`orchestrations:StartRun`, `agents:CreateAgentGeneration` or `tools:CallTool`) against the resulting target, because a firing acts under the trigger's `policy_ids` rather than the updater's grant. 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`. An update leaving an event trigger's `policy_ids` unable to read a platform namespace its `events` subscribe to is refused with `400` `TRIGGER_EVENTS_UNREADABLE`.
|
|
5438
5501
|
*
|
|
5439
5502
|
*/
|
|
5440
5503
|
static updateTrigger(options) {
|
|
@@ -5450,7 +5513,7 @@ var Triggers = class {
|
|
|
5450
5513
|
/**
|
|
5451
5514
|
* Fire a trigger
|
|
5452
5515
|
*
|
|
5453
|
-
* Fires a trigger synchronously and returns the terminal firing record. The firing acts as the caller ∩ the trigger's `policy_ids`, which must allow starting the target, else `403`. The firing itself always settles here; an `eval` target's run is queued rather than executed inline, so the record names a `queued` run to poll.
|
|
5516
|
+
* Fires a trigger synchronously and returns the terminal firing record. The firing acts as the caller ∩ the trigger's `policy_ids`, which must allow starting the target, else the firing fails `FORBIDDEN`. A body carrying `input` or `tool_context` also needs the caller to start the target, else `403`. The firing itself always settles here; an `eval` target's run is queued rather than executed inline, so the record names a `queued` run to poll.
|
|
5454
5517
|
*/
|
|
5455
5518
|
static fireTrigger(options) {
|
|
5456
5519
|
return (options.client ?? client).post({
|