@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 CHANGED
@@ -4244,7 +4244,7 @@ var Playbooks = class {
4244
4244
  /**
4245
4245
  * Run a node of a case
4246
4246
  *
4247
- * 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: a decider, workflow or orchestration it may not start is `403 PLAYBOOK_EXECUTOR_FORBIDDEN`, and an agent or tool 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
+ * 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`.
4248
4248
  *
4249
4249
  * 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`.
4250
4250
  *
@@ -5075,7 +5075,7 @@ var Tasks = class {
5075
5075
  /**
5076
5076
  * List tasks
5077
5077
  *
5078
- * Lists tasks (the board query). Filter by workflow, state, status, automation status, assignee, or `metadata` — `GET /tasks?workflow_id=...&state=...` is one board column.
5078
+ * 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.
5079
5079
  */
5080
5080
  static listTasks(options) {
5081
5081
  return (options?.client ?? client).get({
@@ -5101,7 +5101,7 @@ var Tasks = class {
5101
5101
  /**
5102
5102
  * Delete a task
5103
5103
  *
5104
- * Deletes a task. Its transition history cascades.
5104
+ * Deletes a task. Its transition history and dependencies cascade; a dependent it was the last open dependency of is freed.
5105
5105
  */
5106
5106
  static deleteTask(options) {
5107
5107
  return (options.client ?? client).delete({
@@ -5177,6 +5177,21 @@ var Tasks = class {
5177
5177
  });
5178
5178
  }
5179
5179
  /**
5180
+ * Set a task's priority
5181
+ *
5182
+ * 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`.
5183
+ */
5184
+ static setTaskPriority(options) {
5185
+ return (options.client ?? client).put({
5186
+ url: "/api/v1/tasks/{task_id}/priority",
5187
+ ...options,
5188
+ headers: {
5189
+ "Content-Type": "application/json",
5190
+ ...options.headers
5191
+ }
5192
+ });
5193
+ }
5194
+ /**
5180
5195
  * Pause a task
5181
5196
  *
5182
5197
  * 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.
@@ -5207,6 +5222,54 @@ var Tasks = class {
5207
5222
  });
5208
5223
  }
5209
5224
  /**
5225
+ * List a task's dependencies
5226
+ *
5227
+ * Lists the tasks this task depends on, open and closed, oldest first. Only the open ones block it.
5228
+ */
5229
+ static listTaskDependencies(options) {
5230
+ return (options.client ?? client).get({
5231
+ url: "/api/v1/tasks/{task_id}/dependencies",
5232
+ ...options
5233
+ });
5234
+ }
5235
+ /**
5236
+ * Add a task dependency
5237
+ *
5238
+ * 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.
5239
+ */
5240
+ static addTaskDependency(options) {
5241
+ return (options.client ?? client).post({
5242
+ url: "/api/v1/tasks/{task_id}/dependencies",
5243
+ ...options,
5244
+ headers: {
5245
+ "Content-Type": "application/json",
5246
+ ...options.headers
5247
+ }
5248
+ });
5249
+ }
5250
+ /**
5251
+ * List a task's dependents
5252
+ *
5253
+ * Lists the tasks that depend on this task, open and closed, oldest first.
5254
+ */
5255
+ static listTaskDependents(options) {
5256
+ return (options.client ?? client).get({
5257
+ url: "/api/v1/tasks/{task_id}/dependents",
5258
+ ...options
5259
+ });
5260
+ }
5261
+ /**
5262
+ * Remove a task dependency
5263
+ *
5264
+ * 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.
5265
+ */
5266
+ static removeTaskDependency(options) {
5267
+ return (options.client ?? client).delete({
5268
+ url: "/api/v1/tasks/{task_id}/dependencies/{depends_on_task_id}",
5269
+ ...options
5270
+ });
5271
+ }
5272
+ /**
5210
5273
  * Get task history
5211
5274
  *
5212
5275
  * Returns the append-only transition history of a task.
@@ -5451,7 +5514,7 @@ var Triggers = class {
5451
5514
  /**
5452
5515
  * Fire a trigger
5453
5516
  *
5454
- * 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.
5517
+ * 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.
5455
5518
  */
5456
5519
  static fireTrigger(options) {
5457
5520
  return (options.client ?? client).post({