@soat/sdk 0.92.2 → 0.93.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
@@ -3719,6 +3719,8 @@ var Playbooks = class {
3719
3719
  * Validate a playbook definition
3720
3720
  *
3721
3721
  * Answers what a create or update would be told about a definition, without writing: `valid`, and every graph problem it holds. A definition whose shape cannot be read is `400 VALIDATION_FAILED`, as on a write.
3722
+ *
3723
+ * With `project_id`, the upstreams are also read against that project's playbooks, as a write there would read them, and the caller needs both `playbooks:ValidatePlaybook` and `playbooks:ListPlaybooks` on the project. Without it, only the definition's own graph is checked.
3722
3724
  */
3723
3725
  static validatePlaybook(options) {
3724
3726
  return (options.client ?? client).post({
@@ -3980,6 +3982,8 @@ var Playbooks = class {
3980
3982
  *
3981
3983
  * 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.
3982
3984
  *
3985
+ * The case's upstream bindings follow the target version: a name it declares on the same playbook keeps its case, any other binding is dropped, and each name it declares that the case does not bind is bound from `upstreams`, by the rules of create. A declared name left unbound is `400 PLAYBOOK_CASE_UPSTREAM_INVALID` and moves nothing.
3986
+ *
3983
3987
  * 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`.
3984
3988
  */
3985
3989
  static upgradePlaybookCase(options) {
package/dist/index.d.cts CHANGED
@@ -6304,6 +6304,14 @@ type UpdatePlaybookRequest = {
6304
6304
  expected_version?: ExpectedVersion;
6305
6305
  };
6306
6306
  type ValidatePlaybookRequest = {
6307
+ /**
6308
+ * Also check the upstreams against this project's playbooks: `UNKNOWN_UPSTREAM`, and the `MISSING_NODE` and `UNKNOWN_FIELD` of what an upstream node pulls.
6309
+ */
6310
+ project_id?: string;
6311
+ /**
6312
+ * The playbook the definition would update, so an upstream reading it back is `UPSTREAM_CYCLE`. Requires `project_id`.
6313
+ */
6314
+ playbook_id?: string;
6307
6315
  /**
6308
6316
  * The definition to check
6309
6317
  */
@@ -6312,7 +6320,7 @@ type ValidatePlaybookRequest = {
6312
6320
  type PlaybookValidationResult = {
6313
6321
  valid: boolean;
6314
6322
  /**
6315
- * Every reason the definition cannot be stored: `DUPLICATE_NODE`, `DUPLICATE_INPUT`, `MISSING_NODE`, `UNKNOWN_FIELD`, `EXECUTOR_REQUIRED`, `EXECUTOR_FORBIDDEN`, `TRANSFORMATIONS_NOT_FINAL`, `DUPLICATE_TRANSFORMATION` or `CYCLE`. The same items a refused write lists under `meta.problems`.
6323
+ * Every reason the definition cannot be stored: `DUPLICATE_NODE`, `DUPLICATE_INPUT`, `MISSING_NODE`, `UNKNOWN_FIELD`, `EXECUTOR_REQUIRED`, `EXECUTOR_FORBIDDEN`, `TRANSFORMATIONS_NOT_FINAL`, `DUPLICATE_TRANSFORMATION`, `CYCLE`, and, with `project_id`, `UNKNOWN_UPSTREAM` or `UPSTREAM_CYCLE`. The same items a refused write lists under `meta.problems`.
6316
6324
  */
6317
6325
  problems: Array<ValidationProblem>;
6318
6326
  };
@@ -6442,7 +6450,7 @@ type PlaybookCaseSummary = {
6442
6450
  updated_at?: Date;
6443
6451
  };
6444
6452
  /**
6445
- * The case bound to each of the playbook's declared `upstreams`, by name: every declared name and no other, each a case of the declared playbook. Fixed at create; empty when the playbook declares none.
6453
+ * The case bound to each of the playbook's declared `upstreams`, by name: every declared name and no other, each a case of the declared playbook. Bound at create and fitted to the version at each upgrade; empty when the version declares none.
6446
6454
  */
6447
6455
  type PlaybookCaseUpstreams = {
6448
6456
  [key: string]: string;
@@ -6669,6 +6677,10 @@ type UpgradePlaybookCaseRequest = {
6669
6677
  * The version to move the case to; the playbook's current one when omitted
6670
6678
  */
6671
6679
  version?: number;
6680
+ /**
6681
+ * A case for each upstream the target version declares and the case does not bind yet, by name, checked as at create. A binding the target version declares on the same playbook is kept and never named here; every other binding is dropped.
6682
+ */
6683
+ upstreams?: PlaybookCaseUpstreams;
6672
6684
  /**
6673
6685
  * Answer once every execution the write queued, and every one those queue in turn, has settled or parked, instead of right away
6674
6686
  */
@@ -18647,13 +18659,21 @@ type ValidatePlaybookData = {
18647
18659
  };
18648
18660
  type ValidatePlaybookErrors = {
18649
18661
  /**
18650
- * Bad request — the definition's shape cannot be read
18662
+ * Bad request — the definition's shape cannot be read, or `playbook_id` is given without `project_id`
18651
18663
  */
18652
18664
  400: unknown;
18653
18665
  /**
18654
18666
  * Unauthorized
18655
18667
  */
18656
18668
  401: unknown;
18669
+ /**
18670
+ * Forbidden
18671
+ */
18672
+ 403: unknown;
18673
+ /**
18674
+ * `playbook_id` names no playbook of the project
18675
+ */
18676
+ 404: unknown;
18657
18677
  };
18658
18678
  type ValidatePlaybookResponses = {
18659
18679
  /**
@@ -19495,7 +19515,7 @@ type UpgradePlaybookCaseData = {
19495
19515
  };
19496
19516
  type UpgradePlaybookCaseErrors = {
19497
19517
  /**
19498
- * Bad request — a version the playbook does not have
19518
+ * Bad request — a version the playbook does not have, or `PLAYBOOK_CASE_UPSTREAM_INVALID`: an upstream the target version declares left unbound, a name it does not declare or the case already binds, or a case that cannot be bound
19499
19519
  */
19500
19520
  400: unknown;
19501
19521
  /**
@@ -25869,6 +25889,8 @@ export declare class Playbooks {
25869
25889
  * Validate a playbook definition
25870
25890
  *
25871
25891
  * Answers what a create or update would be told about a definition, without writing: `valid`, and every graph problem it holds. A definition whose shape cannot be read is `400 VALIDATION_FAILED`, as on a write.
25892
+ *
25893
+ * With `project_id`, the upstreams are also read against that project's playbooks, as a write there would read them, and the caller needs both `playbooks:ValidatePlaybook` and `playbooks:ListPlaybooks` on the project. Without it, only the definition's own graph is checked.
25872
25894
  */
25873
25895
  static validatePlaybook<ThrowOnError extends boolean = false>(options: Options<ValidatePlaybookData, ThrowOnError>): RequestResult<ValidatePlaybookResponses, ValidatePlaybookErrors, ThrowOnError>;
25874
25896
  /**
@@ -26002,6 +26024,8 @@ export declare class Playbooks {
26002
26024
  *
26003
26025
  * 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.
26004
26026
  *
26027
+ * The case's upstream bindings follow the target version: a name it declares on the same playbook keeps its case, any other binding is dropped, and each name it declares that the case does not bind is bound from `upstreams`, by the rules of create. A declared name left unbound is `400 PLAYBOOK_CASE_UPSTREAM_INVALID` and moves nothing.
26028
+ *
26005
26029
  * 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`.
26006
26030
  */
26007
26031
  static upgradePlaybookCase<ThrowOnError extends boolean = false>(options: Options<UpgradePlaybookCaseData, ThrowOnError>): RequestResult<UpgradePlaybookCaseResponses, UpgradePlaybookCaseErrors, ThrowOnError>;
package/dist/index.d.mts CHANGED
@@ -6304,6 +6304,14 @@ type UpdatePlaybookRequest = {
6304
6304
  expected_version?: ExpectedVersion;
6305
6305
  };
6306
6306
  type ValidatePlaybookRequest = {
6307
+ /**
6308
+ * Also check the upstreams against this project's playbooks: `UNKNOWN_UPSTREAM`, and the `MISSING_NODE` and `UNKNOWN_FIELD` of what an upstream node pulls.
6309
+ */
6310
+ project_id?: string;
6311
+ /**
6312
+ * The playbook the definition would update, so an upstream reading it back is `UPSTREAM_CYCLE`. Requires `project_id`.
6313
+ */
6314
+ playbook_id?: string;
6307
6315
  /**
6308
6316
  * The definition to check
6309
6317
  */
@@ -6312,7 +6320,7 @@ type ValidatePlaybookRequest = {
6312
6320
  type PlaybookValidationResult = {
6313
6321
  valid: boolean;
6314
6322
  /**
6315
- * Every reason the definition cannot be stored: `DUPLICATE_NODE`, `DUPLICATE_INPUT`, `MISSING_NODE`, `UNKNOWN_FIELD`, `EXECUTOR_REQUIRED`, `EXECUTOR_FORBIDDEN`, `TRANSFORMATIONS_NOT_FINAL`, `DUPLICATE_TRANSFORMATION` or `CYCLE`. The same items a refused write lists under `meta.problems`.
6323
+ * Every reason the definition cannot be stored: `DUPLICATE_NODE`, `DUPLICATE_INPUT`, `MISSING_NODE`, `UNKNOWN_FIELD`, `EXECUTOR_REQUIRED`, `EXECUTOR_FORBIDDEN`, `TRANSFORMATIONS_NOT_FINAL`, `DUPLICATE_TRANSFORMATION`, `CYCLE`, and, with `project_id`, `UNKNOWN_UPSTREAM` or `UPSTREAM_CYCLE`. The same items a refused write lists under `meta.problems`.
6316
6324
  */
6317
6325
  problems: Array<ValidationProblem>;
6318
6326
  };
@@ -6442,7 +6450,7 @@ type PlaybookCaseSummary = {
6442
6450
  updated_at?: Date;
6443
6451
  };
6444
6452
  /**
6445
- * The case bound to each of the playbook's declared `upstreams`, by name: every declared name and no other, each a case of the declared playbook. Fixed at create; empty when the playbook declares none.
6453
+ * The case bound to each of the playbook's declared `upstreams`, by name: every declared name and no other, each a case of the declared playbook. Bound at create and fitted to the version at each upgrade; empty when the version declares none.
6446
6454
  */
6447
6455
  type PlaybookCaseUpstreams = {
6448
6456
  [key: string]: string;
@@ -6669,6 +6677,10 @@ type UpgradePlaybookCaseRequest = {
6669
6677
  * The version to move the case to; the playbook's current one when omitted
6670
6678
  */
6671
6679
  version?: number;
6680
+ /**
6681
+ * A case for each upstream the target version declares and the case does not bind yet, by name, checked as at create. A binding the target version declares on the same playbook is kept and never named here; every other binding is dropped.
6682
+ */
6683
+ upstreams?: PlaybookCaseUpstreams;
6672
6684
  /**
6673
6685
  * Answer once every execution the write queued, and every one those queue in turn, has settled or parked, instead of right away
6674
6686
  */
@@ -18647,13 +18659,21 @@ type ValidatePlaybookData = {
18647
18659
  };
18648
18660
  type ValidatePlaybookErrors = {
18649
18661
  /**
18650
- * Bad request — the definition's shape cannot be read
18662
+ * Bad request — the definition's shape cannot be read, or `playbook_id` is given without `project_id`
18651
18663
  */
18652
18664
  400: unknown;
18653
18665
  /**
18654
18666
  * Unauthorized
18655
18667
  */
18656
18668
  401: unknown;
18669
+ /**
18670
+ * Forbidden
18671
+ */
18672
+ 403: unknown;
18673
+ /**
18674
+ * `playbook_id` names no playbook of the project
18675
+ */
18676
+ 404: unknown;
18657
18677
  };
18658
18678
  type ValidatePlaybookResponses = {
18659
18679
  /**
@@ -19495,7 +19515,7 @@ type UpgradePlaybookCaseData = {
19495
19515
  };
19496
19516
  type UpgradePlaybookCaseErrors = {
19497
19517
  /**
19498
- * Bad request — a version the playbook does not have
19518
+ * Bad request — a version the playbook does not have, or `PLAYBOOK_CASE_UPSTREAM_INVALID`: an upstream the target version declares left unbound, a name it does not declare or the case already binds, or a case that cannot be bound
19499
19519
  */
19500
19520
  400: unknown;
19501
19521
  /**
@@ -25869,6 +25889,8 @@ export declare class Playbooks {
25869
25889
  * Validate a playbook definition
25870
25890
  *
25871
25891
  * Answers what a create or update would be told about a definition, without writing: `valid`, and every graph problem it holds. A definition whose shape cannot be read is `400 VALIDATION_FAILED`, as on a write.
25892
+ *
25893
+ * With `project_id`, the upstreams are also read against that project's playbooks, as a write there would read them, and the caller needs both `playbooks:ValidatePlaybook` and `playbooks:ListPlaybooks` on the project. Without it, only the definition's own graph is checked.
25872
25894
  */
25873
25895
  static validatePlaybook<ThrowOnError extends boolean = false>(options: Options<ValidatePlaybookData, ThrowOnError>): RequestResult<ValidatePlaybookResponses, ValidatePlaybookErrors, ThrowOnError>;
25874
25896
  /**
@@ -26002,6 +26024,8 @@ export declare class Playbooks {
26002
26024
  *
26003
26025
  * 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.
26004
26026
  *
26027
+ * The case's upstream bindings follow the target version: a name it declares on the same playbook keeps its case, any other binding is dropped, and each name it declares that the case does not bind is bound from `upstreams`, by the rules of create. A declared name left unbound is `400 PLAYBOOK_CASE_UPSTREAM_INVALID` and moves nothing.
26028
+ *
26005
26029
  * 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`.
26006
26030
  */
26007
26031
  static upgradePlaybookCase<ThrowOnError extends boolean = false>(options: Options<UpgradePlaybookCaseData, ThrowOnError>): RequestResult<UpgradePlaybookCaseResponses, UpgradePlaybookCaseErrors, ThrowOnError>;
package/dist/index.mjs CHANGED
@@ -3718,6 +3718,8 @@ var Playbooks = class {
3718
3718
  * Validate a playbook definition
3719
3719
  *
3720
3720
  * Answers what a create or update would be told about a definition, without writing: `valid`, and every graph problem it holds. A definition whose shape cannot be read is `400 VALIDATION_FAILED`, as on a write.
3721
+ *
3722
+ * With `project_id`, the upstreams are also read against that project's playbooks, as a write there would read them, and the caller needs both `playbooks:ValidatePlaybook` and `playbooks:ListPlaybooks` on the project. Without it, only the definition's own graph is checked.
3721
3723
  */
3722
3724
  static validatePlaybook(options) {
3723
3725
  return (options.client ?? client).post({
@@ -3979,6 +3981,8 @@ var Playbooks = class {
3979
3981
  *
3980
3982
  * 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.
3981
3983
  *
3984
+ * The case's upstream bindings follow the target version: a name it declares on the same playbook keeps its case, any other binding is dropped, and each name it declares that the case does not bind is bound from `upstreams`, by the rules of create. A declared name left unbound is `400 PLAYBOOK_CASE_UPSTREAM_INVALID` and moves nothing.
3985
+ *
3982
3986
  * 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`.
3983
3987
  */
3984
3988
  static upgradePlaybookCase(options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soat/sdk",
3
- "version": "0.92.2",
3
+ "version": "0.93.0",
4
4
  "description": "TypeScript SDK for SOAT — open-source infrastructure for production-ready AI agents.",
5
5
  "keywords": [
6
6
  "ai-agents",