@soat/sdk 0.116.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 +67 -4
- package/dist/index.d.cts +431 -29
- package/dist/index.d.mts +431 -29
- package/dist/index.mjs +67 -4
- 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
|
*
|
|
@@ -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.
|
|
@@ -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({
|