@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 +73 -10
- package/dist/index.d.cts +465 -40
- package/dist/index.d.mts +465 -40
- package/dist/index.mjs +73 -10
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3151,7 +3151,7 @@ var Knowledge = class {
|
|
|
3151
3151
|
/**
|
|
3152
3152
|
* Search knowledge
|
|
3153
3153
|
*
|
|
3154
|
-
* 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.
|
|
3154
|
+
* 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.
|
|
3155
3155
|
*/
|
|
3156
3156
|
static searchKnowledge(options) {
|
|
3157
3157
|
return (options.client ?? client).post({
|
|
@@ -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
|
*
|
|
@@ -4410,7 +4410,7 @@ var Policies = class {
|
|
|
4410
4410
|
/**
|
|
4411
4411
|
* Create a policy
|
|
4412
4412
|
*
|
|
4413
|
-
* 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
|
|
4413
|
+
* 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.
|
|
4414
4414
|
*/
|
|
4415
4415
|
static createPolicy(options) {
|
|
4416
4416
|
return (options.client ?? client).post({
|
|
@@ -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`. An event trigger whose `policy_ids` cannot read a platform namespace its `events` subscribe to is refused with `400` `
|
|
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` `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`. An update leaving an event trigger's `policy_ids` unable to read a platform namespace its `events` subscribe to is refused with `400` `
|
|
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` `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({
|
|
@@ -5740,7 +5803,7 @@ var Webhooks = class {
|
|
|
5740
5803
|
/**
|
|
5741
5804
|
* Create a webhook
|
|
5742
5805
|
*
|
|
5743
|
-
* Creates a new webhook for a project
|
|
5806
|
+
* 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`.
|
|
5744
5807
|
*/
|
|
5745
5808
|
static createWebhook(options) {
|
|
5746
5809
|
return (options.client ?? client).post({
|
|
@@ -5777,7 +5840,7 @@ var Webhooks = class {
|
|
|
5777
5840
|
/**
|
|
5778
5841
|
* Update a webhook
|
|
5779
5842
|
*
|
|
5780
|
-
* Updates an existing webhook's configuration
|
|
5843
|
+
* 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`.
|
|
5781
5844
|
*/
|
|
5782
5845
|
static updateWebhook(options) {
|
|
5783
5846
|
return (options.client ?? client).put({
|