@naturali/cli 0.208.2 → 0.208.3

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.
Files changed (2) hide show
  1. package/dist/index.mjs +244 -81
  2. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -17,7 +17,7 @@ var __exportAll = (all, no_symbols) => {
17
17
  };
18
18
  //#endregion
19
19
  //#region package.json
20
- var version = "0.208.2";
20
+ var version = "0.208.3";
21
21
  //#endregion
22
22
  //#region ../sdk/src/generated/core/bodySerializer.gen.ts
23
23
  const serializeFormDataPair = (data, key, value) => {
@@ -4576,7 +4576,7 @@ var Playbooks = class {
4576
4576
  /**
4577
4577
  * Delete a playbook
4578
4578
  *
4579
- * Deletes a playbook and its version archive. A playbook with cases is refused with `409 PLAYBOOK_HAS_CASES`.
4579
+ * 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`.
4580
4580
  */
4581
4581
  static deletePlaybook(options) {
4582
4582
  return (options.client ?? client).delete({
@@ -4652,7 +4652,7 @@ var Playbooks = class {
4652
4652
  /**
4653
4653
  * Create a case
4654
4654
  *
4655
- * Creates a case for one subject on the playbook's current version. The case stays on that version however the playbook changes later.
4655
+ * 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.
4656
4656
  */
4657
4657
  static createPlaybookCase(options) {
4658
4658
  return (options.client ?? client).post({
@@ -4678,7 +4678,7 @@ var Playbooks = class {
4678
4678
  /**
4679
4679
  * Delete a case
4680
4680
  *
4681
- * Deletes a case and every entry written to it.
4681
+ * 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`.
4682
4682
  */
4683
4683
  static deletePlaybookCase(options) {
4684
4684
  return (options.client ?? client).delete({
@@ -4700,7 +4700,7 @@ var Playbooks = class {
4700
4700
  /**
4701
4701
  * Write a case's inputs
4702
4702
  *
4703
- * 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`.
4703
+ * 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 the work of a case reading it as an upstream, at any depth, is `403 PLAYBOOK_SELF_WRITE`.
4704
4704
  */
4705
4705
  static writePlaybookCaseInputs(options) {
4706
4706
  return (options.client ?? client).post({
@@ -4715,7 +4715,7 @@ var Playbooks = class {
4715
4715
  /**
4716
4716
  * List what a node still needs
4717
4717
  *
4718
- * 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.
4718
+ * 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.
4719
4719
  */
4720
4720
  static getPlaybookCaseMissing(options) {
4721
4721
  return (options.client ?? client).get({
@@ -4739,6 +4739,8 @@ var Playbooks = class {
4739
4739
  *
4740
4740
  * 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`.
4741
4741
  *
4742
+ * 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`.
4743
+ *
4742
4744
  * 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.
4743
4745
  *
4744
4746
  * 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.
@@ -4821,7 +4823,7 @@ var Playbooks = class {
4821
4823
  *
4822
4824
  * 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.
4823
4825
  *
4824
- * 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`.
4826
+ * 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`.
4825
4827
  */
4826
4828
  static upgradePlaybookCase(options) {
4827
4829
  return (options.client ?? client).post({
@@ -4871,7 +4873,7 @@ var Playbooks = class {
4871
4873
  *
4872
4874
  * 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.
4873
4875
  *
4874
- * 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`.
4876
+ * 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`.
4875
4877
  */
4876
4878
  static confirmPlaybookCaseNode(options) {
4877
4879
  return (options.client ?? client).post({
@@ -19370,7 +19372,7 @@ const routes = {
19370
19372
  "delete-playbook": {
19371
19373
  serviceClass: "Playbooks",
19372
19374
  operationId: "deletePlaybook",
19373
- description: "Deletes a playbook and its version archive. A playbook with cases is refused with `409 PLAYBOOK_HAS_CASES`.",
19375
+ description: "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`.",
19374
19376
  moduleDocsUrl: "https://naturali.ai/docs/modules/playbooks",
19375
19377
  httpMethod: "delete",
19376
19378
  pathParams: ["project_id", "playbook_id"],
@@ -19518,7 +19520,7 @@ const routes = {
19518
19520
  "create-playbook-case": {
19519
19521
  serviceClass: "Playbooks",
19520
19522
  operationId: "createPlaybookCase",
19521
- description: "Creates a case for one subject on the playbook's current version. The case stays on that version however the playbook changes later.",
19523
+ description: "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.",
19522
19524
  moduleDocsUrl: "https://naturali.ai/docs/modules/playbooks",
19523
19525
  httpMethod: "post",
19524
19526
  pathParams: ["project_id", "playbook_id"],
@@ -19546,6 +19548,20 @@ const routes = {
19546
19548
  "required": true,
19547
19549
  "type": "string",
19548
19550
  "in": "body"
19551
+ },
19552
+ {
19553
+ "name": "actor_id",
19554
+ "description": "The end user the case belongs to, an actor of the playbook's project; an unknown one is `400 ACTOR_NOT_FOUND`. Omitted, the case belongs to no actor.",
19555
+ "required": false,
19556
+ "type": "string",
19557
+ "in": "body"
19558
+ },
19559
+ {
19560
+ "name": "upstreams",
19561
+ "description": "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.",
19562
+ "required": false,
19563
+ "type": "object",
19564
+ "in": "body"
19549
19565
  }
19550
19566
  ]
19551
19567
  },
@@ -19558,6 +19574,8 @@ const routes = {
19558
19574
  pathParams: ["project_id"],
19559
19575
  queryParams: [
19560
19576
  "playbook_id",
19577
+ "actor_id",
19578
+ "subject",
19561
19579
  "automation_status",
19562
19580
  "limit",
19563
19581
  "offset"
@@ -19579,6 +19597,20 @@ const routes = {
19579
19597
  "type": "string",
19580
19598
  "in": "query"
19581
19599
  },
19600
+ {
19601
+ "name": "actor_id",
19602
+ "description": "Only the cases that belong to this actor. Pin it in a tool's `preset_parameters` as `{{context:actor_id}}` so an agent lists the cases of the end user it serves only.",
19603
+ "required": false,
19604
+ "type": "string",
19605
+ "in": "query"
19606
+ },
19607
+ {
19608
+ "name": "subject",
19609
+ "description": "Only the cases whose `subject` is exactly this",
19610
+ "required": false,
19611
+ "type": "string",
19612
+ "in": "query"
19613
+ },
19582
19614
  {
19583
19615
  "name": "automation_status",
19584
19616
  "description": "Only the cases in these automation statuses. Repeat the parameter to OR values. A value outside the enum, empty string included, is a `400`.",
@@ -19609,55 +19641,75 @@ const routes = {
19609
19641
  moduleDocsUrl: "https://naturali.ai/docs/modules/playbooks",
19610
19642
  httpMethod: "get",
19611
19643
  pathParams: ["project_id", "case_id"],
19612
- queryParams: [],
19644
+ queryParams: ["actor_id"],
19613
19645
  headerParams: [],
19614
19646
  cookieParams: [],
19615
- flags: [{
19616
- "name": "project_id",
19617
- "description": "Project public ID (proj_ prefix).",
19618
- "required": true,
19619
- "type": "string",
19620
- "in": "path"
19621
- }, {
19622
- "name": "case_id",
19623
- "description": "The case ID",
19624
- "required": true,
19625
- "type": "string",
19626
- "in": "path"
19627
- }]
19647
+ flags: [
19648
+ {
19649
+ "name": "project_id",
19650
+ "description": "Project public ID (proj_ prefix).",
19651
+ "required": true,
19652
+ "type": "string",
19653
+ "in": "path"
19654
+ },
19655
+ {
19656
+ "name": "case_id",
19657
+ "description": "The case ID",
19658
+ "required": true,
19659
+ "type": "string",
19660
+ "in": "path"
19661
+ },
19662
+ {
19663
+ "name": "actor_id",
19664
+ "description": "Acts only on a case that belongs to this actor: any other case, one that belongs to no actor included, is `404` as if it did not exist. Pin it in a tool's `preset_parameters` as `{{context:actor_id}}` so an agent serving an end user reaches that user's cases only.",
19665
+ "required": false,
19666
+ "type": "string",
19667
+ "in": "query"
19668
+ }
19669
+ ]
19628
19670
  },
19629
19671
  "delete-playbook-case": {
19630
19672
  serviceClass: "Playbooks",
19631
19673
  operationId: "deletePlaybookCase",
19632
- description: "Deletes a case and every entry written to it.",
19674
+ description: "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`.",
19633
19675
  moduleDocsUrl: "https://naturali.ai/docs/modules/playbooks",
19634
19676
  httpMethod: "delete",
19635
19677
  pathParams: ["project_id", "case_id"],
19636
- queryParams: [],
19678
+ queryParams: ["actor_id"],
19637
19679
  headerParams: [],
19638
19680
  cookieParams: [],
19639
- flags: [{
19640
- "name": "project_id",
19641
- "description": "Project public ID (proj_ prefix).",
19642
- "required": true,
19643
- "type": "string",
19644
- "in": "path"
19645
- }, {
19646
- "name": "case_id",
19647
- "description": "The case ID",
19648
- "required": true,
19649
- "type": "string",
19650
- "in": "path"
19651
- }]
19681
+ flags: [
19682
+ {
19683
+ "name": "project_id",
19684
+ "description": "Project public ID (proj_ prefix).",
19685
+ "required": true,
19686
+ "type": "string",
19687
+ "in": "path"
19688
+ },
19689
+ {
19690
+ "name": "case_id",
19691
+ "description": "The case ID",
19692
+ "required": true,
19693
+ "type": "string",
19694
+ "in": "path"
19695
+ },
19696
+ {
19697
+ "name": "actor_id",
19698
+ "description": "Acts only on a case that belongs to this actor: any other case, one that belongs to no actor included, is `404` as if it did not exist. Pin it in a tool's `preset_parameters` as `{{context:actor_id}}` so an agent serving an end user reaches that user's cases only.",
19699
+ "required": false,
19700
+ "type": "string",
19701
+ "in": "query"
19702
+ }
19703
+ ]
19652
19704
  },
19653
19705
  "write-playbook-case-inputs": {
19654
19706
  serviceClass: "Playbooks",
19655
19707
  operationId: "writePlaybookCaseInputs",
19656
- description: "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`.",
19708
+ description: "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 the work of a case reading it as an upstream, at any depth, is `403 PLAYBOOK_SELF_WRITE`.",
19657
19709
  moduleDocsUrl: "https://naturali.ai/docs/modules/playbooks",
19658
19710
  httpMethod: "post",
19659
19711
  pathParams: ["project_id", "case_id"],
19660
- queryParams: [],
19712
+ queryParams: ["actor_id"],
19661
19713
  headerParams: [],
19662
19714
  cookieParams: [],
19663
19715
  flags: [
@@ -19675,6 +19727,13 @@ const routes = {
19675
19727
  "type": "string",
19676
19728
  "in": "path"
19677
19729
  },
19730
+ {
19731
+ "name": "actor_id",
19732
+ "description": "Acts only on a case that belongs to this actor: any other case, one that belongs to no actor included, is `404` as if it did not exist. Pin it in a tool's `preset_parameters` as `{{context:actor_id}}` so an agent serving an end user reaches that user's cases only.",
19733
+ "required": false,
19734
+ "type": "string",
19735
+ "in": "query"
19736
+ },
19678
19737
  {
19679
19738
  "name": "inputs",
19680
19739
  "description": "The writes, applied all or none",
@@ -19694,11 +19753,11 @@ const routes = {
19694
19753
  "get-playbook-case-missing": {
19695
19754
  serviceClass: "Playbooks",
19696
19755
  operationId: "getPlaybookCaseMissing",
19697
- description: "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.",
19756
+ description: "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.",
19698
19757
  moduleDocsUrl: "https://naturali.ai/docs/modules/playbooks",
19699
19758
  httpMethod: "get",
19700
19759
  pathParams: ["project_id", "case_id"],
19701
- queryParams: ["node_id"],
19760
+ queryParams: ["actor_id", "node_id"],
19702
19761
  headerParams: [],
19703
19762
  cookieParams: [],
19704
19763
  flags: [
@@ -19716,6 +19775,13 @@ const routes = {
19716
19775
  "type": "string",
19717
19776
  "in": "path"
19718
19777
  },
19778
+ {
19779
+ "name": "actor_id",
19780
+ "description": "Acts only on a case that belongs to this actor: any other case, one that belongs to no actor included, is `404` as if it did not exist. Pin it in a tool's `preset_parameters` as `{{context:actor_id}}` so an agent serving an end user reaches that user's cases only.",
19781
+ "required": false,
19782
+ "type": "string",
19783
+ "in": "query"
19784
+ },
19719
19785
  {
19720
19786
  "name": "node_id",
19721
19787
  "description": "The ID of the node to reach, usually a final node",
@@ -19733,6 +19799,7 @@ const routes = {
19733
19799
  httpMethod: "get",
19734
19800
  pathParams: ["project_id", "case_id"],
19735
19801
  queryParams: [
19802
+ "actor_id",
19736
19803
  "node_id",
19737
19804
  "limit",
19738
19805
  "offset"
@@ -19754,6 +19821,13 @@ const routes = {
19754
19821
  "type": "string",
19755
19822
  "in": "path"
19756
19823
  },
19824
+ {
19825
+ "name": "actor_id",
19826
+ "description": "Acts only on a case that belongs to this actor: any other case, one that belongs to no actor included, is `404` as if it did not exist. Pin it in a tool's `preset_parameters` as `{{context:actor_id}}` so an agent serving an end user reaches that user's cases only.",
19827
+ "required": false,
19828
+ "type": "string",
19829
+ "in": "query"
19830
+ },
19757
19831
  {
19758
19832
  "name": "node_id",
19759
19833
  "description": "Only the entries of this node",
@@ -19780,7 +19854,7 @@ const routes = {
19780
19854
  "run-playbook-case-node": {
19781
19855
  serviceClass: "Playbooks",
19782
19856
  operationId: "runPlaybookCaseNode",
19783
- description: "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`. 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. 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.",
19857
+ description: "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`. 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`. 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. 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.",
19784
19858
  moduleDocsUrl: "https://naturali.ai/docs/modules/playbooks",
19785
19859
  httpMethod: "post",
19786
19860
  pathParams: [
@@ -19788,7 +19862,7 @@ const routes = {
19788
19862
  "case_id",
19789
19863
  "node"
19790
19864
  ],
19791
- queryParams: [],
19865
+ queryParams: ["actor_id"],
19792
19866
  headerParams: [],
19793
19867
  cookieParams: [],
19794
19868
  flags: [
@@ -19806,6 +19880,13 @@ const routes = {
19806
19880
  "type": "string",
19807
19881
  "in": "path"
19808
19882
  },
19883
+ {
19884
+ "name": "actor_id",
19885
+ "description": "Acts only on a case that belongs to this actor: any other case, one that belongs to no actor included, is `404` as if it did not exist. Pin it in a tool's `preset_parameters` as `{{context:actor_id}}` so an agent serving an end user reaches that user's cases only.",
19886
+ "required": false,
19887
+ "type": "string",
19888
+ "in": "query"
19889
+ },
19809
19890
  {
19810
19891
  "name": "node",
19811
19892
  "description": "The ID of a node of the case's playbook version",
@@ -19830,6 +19911,7 @@ const routes = {
19830
19911
  httpMethod: "get",
19831
19912
  pathParams: ["project_id", "case_id"],
19832
19913
  queryParams: [
19914
+ "actor_id",
19833
19915
  "node_id",
19834
19916
  "limit",
19835
19917
  "offset"
@@ -19851,6 +19933,13 @@ const routes = {
19851
19933
  "type": "string",
19852
19934
  "in": "path"
19853
19935
  },
19936
+ {
19937
+ "name": "actor_id",
19938
+ "description": "Acts only on a case that belongs to this actor: any other case, one that belongs to no actor included, is `404` as if it did not exist. Pin it in a tool's `preset_parameters` as `{{context:actor_id}}` so an agent serving an end user reaches that user's cases only.",
19939
+ "required": false,
19940
+ "type": "string",
19941
+ "in": "query"
19942
+ },
19854
19943
  {
19855
19944
  "name": "node_id",
19856
19945
  "description": "Only the executions of this node",
@@ -19885,7 +19974,7 @@ const routes = {
19885
19974
  "case_id",
19886
19975
  "execution_id"
19887
19976
  ],
19888
- queryParams: [],
19977
+ queryParams: ["actor_id"],
19889
19978
  headerParams: [],
19890
19979
  cookieParams: [],
19891
19980
  flags: [
@@ -19903,6 +19992,13 @@ const routes = {
19903
19992
  "type": "string",
19904
19993
  "in": "path"
19905
19994
  },
19995
+ {
19996
+ "name": "actor_id",
19997
+ "description": "Acts only on a case that belongs to this actor: any other case, one that belongs to no actor included, is `404` as if it did not exist. Pin it in a tool's `preset_parameters` as `{{context:actor_id}}` so an agent serving an end user reaches that user's cases only.",
19998
+ "required": false,
19999
+ "type": "string",
20000
+ "in": "query"
20001
+ },
19906
20002
  {
19907
20003
  "name": "execution_id",
19908
20004
  "description": "The execution ID",
@@ -19923,7 +20019,7 @@ const routes = {
19923
20019
  "case_id",
19924
20020
  "node"
19925
20021
  ],
19926
- queryParams: [],
20022
+ queryParams: ["actor_id"],
19927
20023
  headerParams: [],
19928
20024
  cookieParams: [],
19929
20025
  flags: [
@@ -19941,6 +20037,13 @@ const routes = {
19941
20037
  "type": "string",
19942
20038
  "in": "path"
19943
20039
  },
20040
+ {
20041
+ "name": "actor_id",
20042
+ "description": "Acts only on a case that belongs to this actor: any other case, one that belongs to no actor included, is `404` as if it did not exist. Pin it in a tool's `preset_parameters` as `{{context:actor_id}}` so an agent serving an end user reaches that user's cases only.",
20043
+ "required": false,
20044
+ "type": "string",
20045
+ "in": "query"
20046
+ },
19944
20047
  {
19945
20048
  "name": "node",
19946
20049
  "description": "The ID of a node of the case's playbook version",
@@ -19979,6 +20082,7 @@ const routes = {
19979
20082
  httpMethod: "get",
19980
20083
  pathParams: ["project_id", "case_id"],
19981
20084
  queryParams: [
20085
+ "actor_id",
19982
20086
  "node_id",
19983
20087
  "transformation",
19984
20088
  "limit",
@@ -20001,6 +20105,13 @@ const routes = {
20001
20105
  "type": "string",
20002
20106
  "in": "path"
20003
20107
  },
20108
+ {
20109
+ "name": "actor_id",
20110
+ "description": "Acts only on a case that belongs to this actor: any other case, one that belongs to no actor included, is `404` as if it did not exist. Pin it in a tool's `preset_parameters` as `{{context:actor_id}}` so an agent serving an end user reaches that user's cases only.",
20111
+ "required": false,
20112
+ "type": "string",
20113
+ "in": "query"
20114
+ },
20004
20115
  {
20005
20116
  "name": "node_id",
20006
20117
  "description": "Only the exports of this node",
@@ -20042,7 +20153,7 @@ const routes = {
20042
20153
  "case_id",
20043
20154
  "export_id"
20044
20155
  ],
20045
- queryParams: [],
20156
+ queryParams: ["actor_id"],
20046
20157
  headerParams: [],
20047
20158
  cookieParams: [],
20048
20159
  flags: [
@@ -20060,6 +20171,13 @@ const routes = {
20060
20171
  "type": "string",
20061
20172
  "in": "path"
20062
20173
  },
20174
+ {
20175
+ "name": "actor_id",
20176
+ "description": "Acts only on a case that belongs to this actor: any other case, one that belongs to no actor included, is `404` as if it did not exist. Pin it in a tool's `preset_parameters` as `{{context:actor_id}}` so an agent serving an end user reaches that user's cases only.",
20177
+ "required": false,
20178
+ "type": "string",
20179
+ "in": "query"
20180
+ },
20063
20181
  {
20064
20182
  "name": "export_id",
20065
20183
  "description": "The export ID",
@@ -20072,11 +20190,11 @@ const routes = {
20072
20190
  "upgrade-playbook-case": {
20073
20191
  serviceClass: "Playbooks",
20074
20192
  operationId: "upgradePlaybookCase",
20075
- description: "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. 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`.",
20193
+ description: "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. 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`.",
20076
20194
  moduleDocsUrl: "https://naturali.ai/docs/modules/playbooks",
20077
20195
  httpMethod: "post",
20078
20196
  pathParams: ["project_id", "case_id"],
20079
- queryParams: [],
20197
+ queryParams: ["actor_id"],
20080
20198
  headerParams: [],
20081
20199
  cookieParams: [],
20082
20200
  flags: [
@@ -20094,6 +20212,13 @@ const routes = {
20094
20212
  "type": "string",
20095
20213
  "in": "path"
20096
20214
  },
20215
+ {
20216
+ "name": "actor_id",
20217
+ "description": "Acts only on a case that belongs to this actor: any other case, one that belongs to no actor included, is `404` as if it did not exist. Pin it in a tool's `preset_parameters` as `{{context:actor_id}}` so an agent serving an end user reaches that user's cases only.",
20218
+ "required": false,
20219
+ "type": "string",
20220
+ "in": "query"
20221
+ },
20097
20222
  {
20098
20223
  "name": "version",
20099
20224
  "description": "The version to move the case to; the playbook's current one when omitted",
@@ -20117,7 +20242,11 @@ const routes = {
20117
20242
  moduleDocsUrl: "https://naturali.ai/docs/modules/playbooks",
20118
20243
  httpMethod: "get",
20119
20244
  pathParams: ["project_id", "case_id"],
20120
- queryParams: ["limit", "offset"],
20245
+ queryParams: [
20246
+ "actor_id",
20247
+ "limit",
20248
+ "offset"
20249
+ ],
20121
20250
  headerParams: [],
20122
20251
  cookieParams: [],
20123
20252
  flags: [
@@ -20135,6 +20264,13 @@ const routes = {
20135
20264
  "type": "string",
20136
20265
  "in": "path"
20137
20266
  },
20267
+ {
20268
+ "name": "actor_id",
20269
+ "description": "Acts only on a case that belongs to this actor: any other case, one that belongs to no actor included, is `404` as if it did not exist. Pin it in a tool's `preset_parameters` as `{{context:actor_id}}` so an agent serving an end user reaches that user's cases only.",
20270
+ "required": false,
20271
+ "type": "string",
20272
+ "in": "query"
20273
+ },
20138
20274
  {
20139
20275
  "name": "limit",
20140
20276
  "description": "Results per page, 1 to 100 (default 50). Above 100 it is clamped; below 1 or not an integer it is `400`.",
@@ -20158,22 +20294,32 @@ const routes = {
20158
20294
  moduleDocsUrl: "https://naturali.ai/docs/modules/playbooks",
20159
20295
  httpMethod: "post",
20160
20296
  pathParams: ["project_id", "case_id"],
20161
- queryParams: [],
20297
+ queryParams: ["actor_id"],
20162
20298
  headerParams: [],
20163
20299
  cookieParams: [],
20164
- flags: [{
20165
- "name": "project_id",
20166
- "description": "Project public ID (proj_ prefix).",
20167
- "required": true,
20168
- "type": "string",
20169
- "in": "path"
20170
- }, {
20171
- "name": "case_id",
20172
- "description": "The case ID",
20173
- "required": true,
20174
- "type": "string",
20175
- "in": "path"
20176
- }]
20300
+ flags: [
20301
+ {
20302
+ "name": "project_id",
20303
+ "description": "Project public ID (proj_ prefix).",
20304
+ "required": true,
20305
+ "type": "string",
20306
+ "in": "path"
20307
+ },
20308
+ {
20309
+ "name": "case_id",
20310
+ "description": "The case ID",
20311
+ "required": true,
20312
+ "type": "string",
20313
+ "in": "path"
20314
+ },
20315
+ {
20316
+ "name": "actor_id",
20317
+ "description": "Acts only on a case that belongs to this actor: any other case, one that belongs to no actor included, is `404` as if it did not exist. Pin it in a tool's `preset_parameters` as `{{context:actor_id}}` so an agent serving an end user reaches that user's cases only.",
20318
+ "required": false,
20319
+ "type": "string",
20320
+ "in": "query"
20321
+ }
20322
+ ]
20177
20323
  },
20178
20324
  "resume-playbook-case": {
20179
20325
  serviceClass: "Playbooks",
@@ -20182,27 +20328,37 @@ const routes = {
20182
20328
  moduleDocsUrl: "https://naturali.ai/docs/modules/playbooks",
20183
20329
  httpMethod: "post",
20184
20330
  pathParams: ["project_id", "case_id"],
20185
- queryParams: [],
20331
+ queryParams: ["actor_id"],
20186
20332
  headerParams: [],
20187
20333
  cookieParams: [],
20188
- flags: [{
20189
- "name": "project_id",
20190
- "description": "Project public ID (proj_ prefix).",
20191
- "required": true,
20192
- "type": "string",
20193
- "in": "path"
20194
- }, {
20195
- "name": "case_id",
20196
- "description": "The case ID",
20197
- "required": true,
20198
- "type": "string",
20199
- "in": "path"
20200
- }]
20334
+ flags: [
20335
+ {
20336
+ "name": "project_id",
20337
+ "description": "Project public ID (proj_ prefix).",
20338
+ "required": true,
20339
+ "type": "string",
20340
+ "in": "path"
20341
+ },
20342
+ {
20343
+ "name": "case_id",
20344
+ "description": "The case ID",
20345
+ "required": true,
20346
+ "type": "string",
20347
+ "in": "path"
20348
+ },
20349
+ {
20350
+ "name": "actor_id",
20351
+ "description": "Acts only on a case that belongs to this actor: any other case, one that belongs to no actor included, is `404` as if it did not exist. Pin it in a tool's `preset_parameters` as `{{context:actor_id}}` so an agent serving an end user reaches that user's cases only.",
20352
+ "required": false,
20353
+ "type": "string",
20354
+ "in": "query"
20355
+ }
20356
+ ]
20201
20357
  },
20202
20358
  "confirm-playbook-case-node": {
20203
20359
  serviceClass: "Playbooks",
20204
20360
  operationId: "confirmPlaybookCaseNode",
20205
- description: "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. 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`.",
20361
+ description: "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. 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`.",
20206
20362
  moduleDocsUrl: "https://naturali.ai/docs/modules/playbooks",
20207
20363
  httpMethod: "post",
20208
20364
  pathParams: [
@@ -20210,7 +20366,7 @@ const routes = {
20210
20366
  "case_id",
20211
20367
  "node"
20212
20368
  ],
20213
- queryParams: [],
20369
+ queryParams: ["actor_id"],
20214
20370
  headerParams: [],
20215
20371
  cookieParams: [],
20216
20372
  flags: [
@@ -20228,6 +20384,13 @@ const routes = {
20228
20384
  "type": "string",
20229
20385
  "in": "path"
20230
20386
  },
20387
+ {
20388
+ "name": "actor_id",
20389
+ "description": "Acts only on a case that belongs to this actor: any other case, one that belongs to no actor included, is `404` as if it did not exist. Pin it in a tool's `preset_parameters` as `{{context:actor_id}}` so an agent serving an end user reaches that user's cases only.",
20390
+ "required": false,
20391
+ "type": "string",
20392
+ "in": "query"
20393
+ },
20231
20394
  {
20232
20395
  "name": "node",
20233
20396
  "description": "The ID of a node of the case's playbook version",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturali/cli",
3
- "version": "0.208.2",
3
+ "version": "0.208.3",
4
4
  "description": "Command-line interface for the naturali.ai API, generated from its OpenAPI specs",
5
5
  "keywords": [
6
6
  "naturali",
@@ -31,7 +31,7 @@
31
31
  "yaml": "^2.9.1"
32
32
  },
33
33
  "devDependencies": {
34
- "@naturali/sdk": "0.208.2",
34
+ "@naturali/sdk": "0.208.3",
35
35
  "@ttoss/openapi-codegen": "^0.5.0",
36
36
  "@types/node": "^26.5.1",
37
37
  "tsdown": "^0.23.0",