@soat/sdk 0.91.0 → 0.92.1

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.mjs CHANGED
@@ -3732,7 +3732,7 @@ var Playbooks = class {
3732
3732
  /**
3733
3733
  * Delete a playbook
3734
3734
  *
3735
- * Deletes a playbook and its version archive. A playbook with cases is refused with `409 PLAYBOOK_HAS_CASES`.
3735
+ * Deletes a playbook and its version archive. A playbook with cases is refused with `409 PLAYBOOK_HAS_CASES`, and one another playbook's current definition declares as an upstream with `409 PLAYBOOK_HAS_DEPENDENTS`.
3736
3736
  */
3737
3737
  static deletePlaybook(options) {
3738
3738
  return (options.client ?? client).delete({
@@ -3808,7 +3808,7 @@ var Playbooks = class {
3808
3808
  /**
3809
3809
  * Create a case
3810
3810
  *
3811
- * Creates a case for one subject on the playbook's current version. The case stays on that version however the playbook changes later.
3811
+ * Creates a case for one subject on the playbook's current version. The case stays on that version however the playbook changes later. A playbook that declares `upstreams` needs each bound to a case of the declared playbook, in the same project, of the same `actor_id`, that the caller may read (`playbooks:GetPlaybookCase`); anything else is `400 PLAYBOOK_CASE_UPSTREAM_INVALID`. The binding is fixed for the life of the case.
3812
3812
  */
3813
3813
  static createPlaybookCase(options) {
3814
3814
  return (options.client ?? client).post({
@@ -3834,7 +3834,7 @@ var Playbooks = class {
3834
3834
  /**
3835
3835
  * Delete a case
3836
3836
  *
3837
- * Deletes a case and every entry written to it.
3837
+ * Deletes a case and every entry written to it. A case other cases are bound to as their upstream is refused with `409 PLAYBOOK_CASE_HAS_DEPENDENTS`.
3838
3838
  */
3839
3839
  static deletePlaybookCase(options) {
3840
3840
  return (options.client ?? client).delete({
@@ -3856,7 +3856,7 @@ var Playbooks = class {
3856
3856
  /**
3857
3857
  * Write a case's inputs
3858
3858
  *
3859
- * Writes a batch of manual inputs, all or none. Each write names the revision it read in `expected_revision`, `null` for a field still unset; when any field has moved on the whole batch is refused with `409 PLAYBOOK_INPUT_CONFLICT` and `meta.conflicts` names each field. An input the case's version does not declare, one that reads another node, or a value its schema refuses is `400 PLAYBOOK_INPUT_INVALID`. A value equal to the field's current one writes no revision. Once written, every node the write makes runnable is queued to run, unless the case is paused. With `wait: true` it answers once every execution queued, and every one those queue, has settled or parked. A write made with a credential the case's own work runs as — the case, one of its executions in flight, or the task or run one started — is `403 PLAYBOOK_SELF_WRITE`.
3859
+ * Writes a batch of manual inputs, all or none. Each write names the revision it read in `expected_revision`, `null` for a field still unset; when any field has moved on the whole batch is refused with `409 PLAYBOOK_INPUT_CONFLICT` and `meta.conflicts` names each field. An input the case's version does not declare, one that reads another node, or a value its schema refuses is `400 PLAYBOOK_INPUT_INVALID`. A value equal to the field's current one writes no revision. Once written, every node the write makes runnable is queued to run, unless the case is paused. With `wait: true` it answers once every execution queued, and every one those queue, has settled or parked. A write made with a credential the case's own work runs as — the case, one of its executions in flight, or the task or run one started — or on a project key with the `On-Behalf-Of` of a tool call that work's generation made, or by the work of a case reading it as an upstream, at any depth, is `403 PLAYBOOK_SELF_WRITE`.
3860
3860
  */
3861
3861
  static writePlaybookCaseInputs(options) {
3862
3862
  return (options.client ?? client).post({
@@ -3871,7 +3871,7 @@ var Playbooks = class {
3871
3871
  /**
3872
3872
  * List what a node still needs
3873
3873
  *
3874
- * Returns the manual inputs still unset, or refused by their schema, upstream of `node_id`, grouped in waves: nothing in a later wave can run before the earlier ones' required inputs are filled. Optional inputs are listed with `required: false`; they never block a node.
3874
+ * Returns the manual inputs still unset, or refused by their schema, upstream of `node_id`, grouped in waves: nothing in a later wave can run before the earlier ones' required inputs are filled. Optional inputs are listed with `required: false`; they never block a node. An `upstream` node before `node_id` adds the missing inputs of the case it is bound to, each with that case's `case_id`, so one read lists everything to ask and each answer is written to its own case.
3875
3875
  */
3876
3876
  static getPlaybookCaseMissing(options) {
3877
3877
  return (options.client ?? client).get({
@@ -3895,6 +3895,8 @@ var Playbooks = class {
3895
3895
  *
3896
3896
  * 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 as the author of the case's playbook version, whose permission to start it is checked again here (`403 PLAYBOOK_EXECUTOR_FORBIDDEN`); an author that no longer exists is `409 PLAYBOOK_AUTHOR_UNAVAILABLE`. 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`.
3897
3897
  *
3898
+ * 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`.
3899
+ *
3898
3900
  * The output is written as an entry when the execution settles. A value equal to the node's current output writes no revision. If the node's inputs change while it runs, the execution settles as `superseded` and writes nothing.
3899
3901
  *
3900
3902
  * Without `wait` the execution answers `running` and settles in the background. With `wait: true` it answers once the executor settles, or once it parks: a workflow task still open, or an orchestration run waiting on a person or a timer, settles the node when it closes or ends.
@@ -3977,7 +3979,7 @@ var Playbooks = class {
3977
3979
  *
3978
3980
  * Moves a case to another version of its playbook: the playbook's current version, or the `version` named, an earlier one included. Values carry over by node ID, and every node's state is read against the new version: a node added is open, a node removed leaves the structure while its entries stay, a node whose input reads another field is `stale`, and a value its input's new schema refuses is missing again. The cascade then runs what became runnable. With `wait: true` it answers once every execution queued, and every one those queue, has settled or parked. Each upgrade is recorded with what moved; the version the case is already on records nothing.
3979
3981
  *
3980
- * An execution running is `409 PLAYBOOK_CASE_BUSY`; one queued but not started settles `superseded`. An upgrade made with a credential the case's own work runs as is `403 PLAYBOOK_SELF_WRITE`.
3982
+ * An execution running is `409 PLAYBOOK_CASE_BUSY`; one queued but not started settles `superseded`. An upgrade made with a credential the case's own work, or that of a case reading it as an upstream, runs as is `403 PLAYBOOK_SELF_WRITE`.
3981
3983
  */
3982
3984
  static upgradePlaybookCase(options) {
3983
3985
  return (options.client ?? client).post({
@@ -4027,7 +4029,7 @@ var Playbooks = class {
4027
4029
  *
4028
4030
  * Approves or rejects a `confirm` node on the inputs the confirmer read. `expected_revisions` names the revision of each of the node's inputs as read (`nodes[].inputs[].revision` on the case); an input that moved since is `409 PLAYBOOK_INPUT_CONFLICT`, `meta.conflicts` naming each, and nothing is written.
4029
4031
  *
4030
- * An approval writes a `confirmation` entry whose value is the node's input values: it is the node's output, and the nodes reading it run next. With `wait: true` it answers once every execution queued, and every one those queue, has settled or parked. A rejection writes a `rejection` entry with the `reason`: the node is `rejected`, and every node reading it is blocked, until its inputs change or it is approved. Another node, or a `confirm` node with a required input unset or reading a node that is not `done`, is `409 PLAYBOOK_NODE_NOT_CONFIRMABLE`. A confirmation made with a credential the case's own work runs as is `403 PLAYBOOK_SELF_WRITE`.
4032
+ * An approval writes a `confirmation` entry whose value is the node's input values: it is the node's output, and the nodes reading it run next. With `wait: true` it answers once every execution queued, and every one those queue, has settled or parked. A rejection writes a `rejection` entry with the `reason`: the node is `rejected`, and every node reading it is blocked, until its inputs change or it is approved. Another node, or a `confirm` node with a required input unset or reading a node that is not `done`, is `409 PLAYBOOK_NODE_NOT_CONFIRMABLE`. A confirmation made with a credential the case's own work, or that of a case reading it as an upstream, runs as is `403 PLAYBOOK_SELF_WRITE`.
4031
4033
  */
4032
4034
  static confirmPlaybookCaseNode(options) {
4033
4035
  return (options.client ?? client).post({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soat/sdk",
3
- "version": "0.91.0",
3
+ "version": "0.92.1",
4
4
  "description": "TypeScript SDK for SOAT — open-source infrastructure for production-ready AI agents.",
5
5
  "keywords": [
6
6
  "ai-agents",