@soat/sdk 0.116.0 → 0.118.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
@@ -3152,7 +3152,7 @@ var Knowledge = class {
3152
3152
  /**
3153
3153
  * Search knowledge
3154
3154
  *
3155
- * Searches across documents and memories using hybrid retrieval — a vector query and a full-text query per source, fused by reciprocal rank — or by file paths, document IDs, memory store IDs, or tags. At least one of `query`, `tags`, `document_paths`, `document_ids`, or `memory_store_ids` must be provided.
3155
+ * Searches across documents and memories using hybrid retrieval — a vector query and a full-text query per source, fused by reciprocal rank — by the stored vector of an existing document or memory (`similar_to_document_id`, `similar_to_memory_id`), or by file paths, document IDs, memory store IDs, or tags. At least one of `query`, `similar_to_document_id`, `similar_to_memory_id`, `tags`, `document_paths`, `document_ids`, or `memory_store_ids` must be provided.
3156
3156
  */
3157
3157
  static searchKnowledge(options) {
3158
3158
  return (options.client ?? client).post({
@@ -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
  *
@@ -4411,7 +4411,7 @@ var Policies = class {
4411
4411
  /**
4412
4412
  * Create a policy
4413
4413
  *
4414
- * Creates a project policy when `project_id` is given or the credential is bound to a project: its `Allow` statements may name only that project's resources (`srn:<project_id>:<type>:<id>`), else `400`. Without a project, creates a global policy, which only the unrestricted admin may.
4414
+ * Creates a project policy when `project_id` is given or the credential is bound to a project: its `Allow` statements may name only that project's resources (`srn:<project_id>:<type>:<id>`), else `400`; an `Allow` without `resource` grants every resource of that project. Without a project, creates a global policy, which only the unrestricted admin may.
4415
4415
  */
4416
4416
  static createPolicy(options) {
4417
4417
  return (options.client ?? client).post({
@@ -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`. An event trigger whose `policy_ids` cannot read a platform namespace its `events` subscribe to is refused with `400` `TRIGGER_EVENTS_UNREADABLE`.
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` `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`. 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`.
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` `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({
@@ -5741,7 +5804,7 @@ var Webhooks = class {
5741
5804
  /**
5742
5805
  * Create a webhook
5743
5806
  *
5744
- * Creates a new webhook for a project
5807
+ * Creates a new webhook for a project. A webhook whose `policy_ids` cannot read a platform namespace its `events` subscribe to is refused with `400` `EVENTS_UNREADABLE`.
5745
5808
  */
5746
5809
  static createWebhook(options) {
5747
5810
  return (options.client ?? client).post({
@@ -5778,7 +5841,7 @@ var Webhooks = class {
5778
5841
  /**
5779
5842
  * Update a webhook
5780
5843
  *
5781
- * Updates an existing webhook's configuration
5844
+ * Updates an existing webhook's configuration. An update leaving its `policy_ids` unable to read a platform namespace its `events` subscribe to is refused with `400` `EVENTS_UNREADABLE`.
5782
5845
  */
5783
5846
  static updateWebhook(options) {
5784
5847
  return (options.client ?? client).put({