@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 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 (`403 PLAYBOOK_EXECUTOR_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
  *
@@ -4289,7 +4289,7 @@ var Playbooks = class {
4289
4289
  *
4290
4290
  * 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.
4291
4291
  *
4292
- * 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, which must allow calling it (`403 PLAYBOOK_EXECUTOR_FORBIDDEN`). A paused case is `409 PLAYBOOK_CASE_PAUSED`, and a case in a paused project `409 PROJECT_PAUSED`.
4292
+ * 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`.
4293
4293
  *
4294
4294
  * Without `wait` every export answers `running` and settles in the background; with `wait: true` it answers once each has its file or its error.
4295
4295
  */
@@ -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.
@@ -5387,7 +5450,7 @@ var Triggers = class {
5387
5450
  /**
5388
5451
  * Create a trigger
5389
5452
  *
5390
- * Creates a new trigger for a project. A `{{secret:...}}` reference in `tool_context` also needs `secrets:UseSecret` on that secret, else `403`.
5453
+ * 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`.
5391
5454
  */
5392
5455
  static createTrigger(options) {
5393
5456
  return (options.client ?? client).post({
@@ -5435,7 +5498,7 @@ var Triggers = class {
5435
5498
  /**
5436
5499
  * Update a trigger
5437
5500
  *
5438
- * 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`.
5501
+ * 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`.
5439
5502
  *
5440
5503
  */
5441
5504
  static updateTrigger(options) {
@@ -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({