@naturali/cli 0.154.0 → 0.155.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.
Files changed (2) hide show
  1. package/dist/index.mjs +627 -3
  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.154.0";
20
+ var version = "0.155.0";
21
21
  //#endregion
22
22
  //#region ../sdk/src/generated/core/bodySerializer.gen.ts
23
23
  const serializeFormDataPair = (data, key, value) => {
@@ -2004,6 +2004,151 @@ var Conversations = class {
2004
2004
  });
2005
2005
  }
2006
2006
  };
2007
+ var Deciders = class {
2008
+ /**
2009
+ * List deciders
2010
+ *
2011
+ * Returns the deciders defined in a project, newest first.
2012
+ */
2013
+ static listDeciders(options) {
2014
+ return (options.client ?? client).get({
2015
+ url: "/v1/projects/{project_id}/deciders",
2016
+ ...options
2017
+ });
2018
+ }
2019
+ /**
2020
+ * Create a decider
2021
+ *
2022
+ * Creates a decider at version 1: a named question set and the backend that answers it, exactly one of `agent_id` and `tool_id`. Every question declares a finite answer space, validated here. The backend must be in the decider's project. An agent must carry no tool surface — no tool binding left active by `active_tool_ids` and no `knowledge_config.write_memory_store_id` — or the create is refused with `400 DECIDER_AGENT_NOT_TOOL_LESS`. A tool must be `http` or `pipeline` and must not pin `state` or `questions` in its `preset_parameters`, or the create is refused with `400 DECIDER_TOOL_NOT_CALLABLE`. A duplicate `name` in the project is `409 NAME_CONFLICT`.
2023
+ */
2024
+ static createDecider(options) {
2025
+ return (options.client ?? client).post({
2026
+ url: "/v1/projects/{project_id}/deciders",
2027
+ ...options,
2028
+ headers: {
2029
+ "Content-Type": "application/json",
2030
+ ...options.headers
2031
+ }
2032
+ });
2033
+ }
2034
+ /**
2035
+ * Delete a decider
2036
+ *
2037
+ * Deletes a decider and its version archive. Its decisions remain and keep naming the decider's ID.
2038
+ */
2039
+ static deleteDecider(options) {
2040
+ return (options.client ?? client).delete({
2041
+ url: "/v1/projects/{project_id}/deciders/{decider_id}",
2042
+ ...options
2043
+ });
2044
+ }
2045
+ /**
2046
+ * Get a decider
2047
+ *
2048
+ * Returns a decider with its current question set and version.
2049
+ */
2050
+ static getDecider(options) {
2051
+ return (options.client ?? client).get({
2052
+ url: "/v1/projects/{project_id}/deciders/{decider_id}",
2053
+ ...options
2054
+ });
2055
+ }
2056
+ /**
2057
+ * Update a decider
2058
+ *
2059
+ * Updates any of `name`, `description`, the backend and `questions`. Naming `agent_id` or `tool_id` replaces the current backend; naming both is `400`. Only a change to `questions` archives a new version; a rename, a new backend or a rewrite of the questions the decider already holds leaves `version` where it is. A new backend is held to the same rules as on create.
2060
+ */
2061
+ static updateDecider(options) {
2062
+ return (options.client ?? client).patch({
2063
+ url: "/v1/projects/{project_id}/deciders/{decider_id}",
2064
+ ...options,
2065
+ headers: {
2066
+ "Content-Type": "application/json",
2067
+ ...options.headers
2068
+ }
2069
+ });
2070
+ }
2071
+ /**
2072
+ * List a decider's versions
2073
+ *
2074
+ * Returns the decider's archived question sets, newest first. A version is written on create and on every write that changes `questions`.
2075
+ */
2076
+ static listDeciderVersions(options) {
2077
+ return (options.client ?? client).get({
2078
+ url: "/v1/projects/{project_id}/deciders/{decider_id}/versions",
2079
+ ...options
2080
+ });
2081
+ }
2082
+ /**
2083
+ * Fetch an archived decider version
2084
+ *
2085
+ * Returns the question set a version held. A decision names the `decider_version` it was answered under, so this is how its criteria are read after the decider has changed.
2086
+ */
2087
+ static getDeciderVersion(options) {
2088
+ return (options.client ?? client).get({
2089
+ url: "/v1/projects/{project_id}/deciders/{decider_id}/versions/{version}",
2090
+ ...options
2091
+ });
2092
+ }
2093
+ /**
2094
+ * Restore an archived decider version
2095
+ *
2096
+ * Writes an archived question set back as the decider's live one, which archives it again as a new version rather than rewinding the counter. Restoring the question set the decider already holds is a no-op.
2097
+ */
2098
+ static restoreDeciderVersion(options) {
2099
+ return (options.client ?? client).post({
2100
+ url: "/v1/projects/{project_id}/deciders/{decider_id}/versions/{version}/restore",
2101
+ ...options,
2102
+ headers: {
2103
+ "Content-Type": "application/json",
2104
+ ...options.headers
2105
+ }
2106
+ });
2107
+ }
2108
+ /**
2109
+ * Request a decision
2110
+ *
2111
+ * Evaluates the decider against `state` and records the decision. The questions come from the decider, never from the request, so a call site can only supply what is judged.
2112
+ *
2113
+ * Everything that can refuse the request is checked before the decision is written, so a refusal is a `4xx` and never a polled failure: the agent's tool surface (`400 DECIDER_AGENT_NOT_TOOL_LESS`), a tool that cannot answer (`400 DECIDER_TOOL_NOT_CALLABLE`), a paused project (`409 PROJECT_PAUSED`) and, for an agent, quota admission (`429 QUOTA_EXCEEDED`).
2114
+ *
2115
+ * A tool backend is called with `{ state, questions }` and must answer `{ answers: { <question id>: { choice | score | value, probabilities? } } }`; an answer outside that contract fails the decision with `DECISION_ANSWER_INVALID`.
2116
+ *
2117
+ * With `wait: false`, the default, the answer is `201` with the decision `queued`; poll `GET /v1/projects/{project_id}/decisions/{decision_id}` or subscribe to `decisions.completed` and `decisions.failed`. With `wait: true` it is `201` with the decision settled.
2118
+ */
2119
+ static createDecision(options) {
2120
+ return (options.client ?? client).post({
2121
+ url: "/v1/projects/{project_id}/deciders/{decider_id}/decisions",
2122
+ ...options,
2123
+ headers: {
2124
+ "Content-Type": "application/json",
2125
+ ...options.headers
2126
+ }
2127
+ });
2128
+ }
2129
+ /**
2130
+ * List decisions
2131
+ *
2132
+ * Returns the decisions in a project, newest first.
2133
+ */
2134
+ static listDecisions(options) {
2135
+ return (options.client ?? client).get({
2136
+ url: "/v1/projects/{project_id}/decisions",
2137
+ ...options
2138
+ });
2139
+ }
2140
+ /**
2141
+ * Get a decision
2142
+ *
2143
+ * Returns a decision. Poll it after a `wait: false` request until `status` is `completed` or `failed`.
2144
+ */
2145
+ static getDecision(options) {
2146
+ return (options.client ?? client).get({
2147
+ url: "/v1/projects/{project_id}/decisions/{decision_id}",
2148
+ ...options
2149
+ });
2150
+ }
2151
+ };
2007
2152
  var Documents = class {
2008
2153
  /**
2009
2154
  * List documents
@@ -4689,7 +4834,7 @@ var Tools = class {
4689
4834
  /**
4690
4835
  * Delete a tool
4691
4836
  *
4692
- * Deletes a tool by ID.
4837
+ * Deletes a tool by ID. A tool that is a decider's backend is refused with `409 TOOL_HAS_DEPENDENTS`.
4693
4838
  */
4694
4839
  static deleteTool(options) {
4695
4840
  return (options.client ?? client).delete({
@@ -5324,6 +5469,7 @@ var NaturaliClient = class {
5324
5469
  channels;
5325
5470
  auth;
5326
5471
  conversations;
5472
+ deciders;
5327
5473
  documents;
5328
5474
  embeddings;
5329
5475
  evaluations;
@@ -5376,6 +5522,7 @@ var NaturaliClient = class {
5376
5522
  this.channels = bindResource(Channels, this.http);
5377
5523
  this.auth = bindResource(Auth, this.http);
5378
5524
  this.conversations = bindResource(Conversations, this.http);
5525
+ this.deciders = bindResource(Deciders, this.http);
5379
5526
  this.documents = bindResource(Documents, this.http);
5380
5527
  this.embeddings = bindResource(Embeddings, this.http);
5381
5528
  this.evaluations = bindResource(Evaluations, this.http);
@@ -5423,6 +5570,7 @@ var src_exports = /* @__PURE__ */ __exportAll({
5423
5570
  Chains: () => Chains,
5424
5571
  Channels: () => Channels,
5425
5572
  Conversations: () => Conversations,
5573
+ Deciders: () => Deciders,
5426
5574
  Documents: () => Documents,
5427
5575
  Embeddings: () => Embeddings,
5428
5576
  Evaluations: () => Evaluations,
@@ -10355,6 +10503,482 @@ const routes = {
10355
10503
  "in": "path"
10356
10504
  }]
10357
10505
  },
10506
+ "list-deciders": {
10507
+ serviceClass: "Deciders",
10508
+ operationId: "listDeciders",
10509
+ description: "Returns the deciders defined in a project, newest first.",
10510
+ moduleDocsUrl: "https://docs.naturali.ai/docs/modules/deciders",
10511
+ httpMethod: "get",
10512
+ pathParams: ["project_id"],
10513
+ queryParams: ["limit", "offset"],
10514
+ headerParams: [],
10515
+ cookieParams: [],
10516
+ flags: [
10517
+ {
10518
+ "name": "project_id",
10519
+ "description": "Project public ID (proj_ prefix).",
10520
+ "required": true,
10521
+ "type": "string",
10522
+ "in": "path"
10523
+ },
10524
+ {
10525
+ "name": "limit",
10526
+ "description": "Maximum number of results to return",
10527
+ "required": false,
10528
+ "type": "integer",
10529
+ "in": "query"
10530
+ },
10531
+ {
10532
+ "name": "offset",
10533
+ "description": "Number of results to skip",
10534
+ "required": false,
10535
+ "type": "integer",
10536
+ "in": "query"
10537
+ }
10538
+ ]
10539
+ },
10540
+ "create-decider": {
10541
+ serviceClass: "Deciders",
10542
+ operationId: "createDecider",
10543
+ description: "Creates a decider at version 1: a named question set and the backend that answers it, exactly one of `agent_id` and `tool_id`. Every question declares a finite answer space, validated here. The backend must be in the decider's project. An agent must carry no tool surface — no tool binding left active by `active_tool_ids` and no `knowledge_config.write_memory_store_id` — or the create is refused with `400 DECIDER_AGENT_NOT_TOOL_LESS`. A tool must be `http` or `pipeline` and must not pin `state` or `questions` in its `preset_parameters`, or the create is refused with `400 DECIDER_TOOL_NOT_CALLABLE`. A duplicate `name` in the project is `409 NAME_CONFLICT`.",
10544
+ moduleDocsUrl: "https://docs.naturali.ai/docs/modules/deciders",
10545
+ httpMethod: "post",
10546
+ pathParams: ["project_id"],
10547
+ queryParams: [],
10548
+ headerParams: [],
10549
+ cookieParams: [],
10550
+ flags: [
10551
+ {
10552
+ "name": "project_id",
10553
+ "description": "Project public ID (proj_ prefix).",
10554
+ "required": true,
10555
+ "type": "string",
10556
+ "in": "path"
10557
+ },
10558
+ {
10559
+ "name": "name",
10560
+ "description": "Human-readable name, unique per project",
10561
+ "required": true,
10562
+ "type": "string",
10563
+ "in": "body"
10564
+ },
10565
+ {
10566
+ "name": "description",
10567
+ "description": "",
10568
+ "required": false,
10569
+ "type": "string",
10570
+ "in": "body"
10571
+ },
10572
+ {
10573
+ "name": "agent_id",
10574
+ "description": "A tool-less agent that answers",
10575
+ "required": false,
10576
+ "type": "string",
10577
+ "in": "body"
10578
+ },
10579
+ {
10580
+ "name": "tool_id",
10581
+ "description": "An http or pipeline tool that answers",
10582
+ "required": false,
10583
+ "type": "string",
10584
+ "in": "body"
10585
+ },
10586
+ {
10587
+ "name": "questions",
10588
+ "description": "Question id → question, 1 to 20 of them. A question id starts with a letter or underscore and holds only letters, digits and underscores (at most 64), since it keys the answer object.",
10589
+ "required": true,
10590
+ "type": "object",
10591
+ "in": "body"
10592
+ },
10593
+ {
10594
+ "name": "version_label",
10595
+ "description": "Optional tag for version 1, e.g. `initial`",
10596
+ "required": false,
10597
+ "type": "string",
10598
+ "in": "body"
10599
+ }
10600
+ ]
10601
+ },
10602
+ "get-decider": {
10603
+ serviceClass: "Deciders",
10604
+ operationId: "getDecider",
10605
+ description: "Returns a decider with its current question set and version.",
10606
+ moduleDocsUrl: "https://docs.naturali.ai/docs/modules/deciders",
10607
+ httpMethod: "get",
10608
+ pathParams: ["project_id", "decider_id"],
10609
+ queryParams: [],
10610
+ headerParams: [],
10611
+ cookieParams: [],
10612
+ flags: [{
10613
+ "name": "project_id",
10614
+ "description": "Project public ID (proj_ prefix).",
10615
+ "required": true,
10616
+ "type": "string",
10617
+ "in": "path"
10618
+ }, {
10619
+ "name": "decider_id",
10620
+ "description": "The decider ID",
10621
+ "required": true,
10622
+ "type": "string",
10623
+ "in": "path"
10624
+ }]
10625
+ },
10626
+ "update-decider": {
10627
+ serviceClass: "Deciders",
10628
+ operationId: "updateDecider",
10629
+ description: "Updates any of `name`, `description`, the backend and `questions`. Naming `agent_id` or `tool_id` replaces the current backend; naming both is `400`. Only a change to `questions` archives a new version; a rename, a new backend or a rewrite of the questions the decider already holds leaves `version` where it is. A new backend is held to the same rules as on create.",
10630
+ moduleDocsUrl: "https://docs.naturali.ai/docs/modules/deciders",
10631
+ httpMethod: "patch",
10632
+ pathParams: ["project_id", "decider_id"],
10633
+ queryParams: [],
10634
+ headerParams: ["If-Match"],
10635
+ cookieParams: [],
10636
+ flags: [
10637
+ {
10638
+ "name": "project_id",
10639
+ "description": "Project public ID (proj_ prefix).",
10640
+ "required": true,
10641
+ "type": "string",
10642
+ "in": "path"
10643
+ },
10644
+ {
10645
+ "name": "decider_id",
10646
+ "description": "The decider ID",
10647
+ "required": true,
10648
+ "type": "string",
10649
+ "in": "path"
10650
+ },
10651
+ {
10652
+ "name": "If-Match",
10653
+ "description": "The version the caller believes the resource holds, as an entity tag (`3` or `\"3\"`). Equivalent to `expected_version` in the request body; `*` states no precondition beyond the resource existing. A mismatch is `409 VERSION_CONFLICT`.",
10654
+ "required": false,
10655
+ "type": "string",
10656
+ "in": "header"
10657
+ },
10658
+ {
10659
+ "name": "name",
10660
+ "description": "",
10661
+ "required": false,
10662
+ "type": "string",
10663
+ "in": "body"
10664
+ },
10665
+ {
10666
+ "name": "description",
10667
+ "description": "",
10668
+ "required": false,
10669
+ "type": "string",
10670
+ "in": "body"
10671
+ },
10672
+ {
10673
+ "name": "agent_id",
10674
+ "description": "Replaces the backend with this agent",
10675
+ "required": false,
10676
+ "type": "string",
10677
+ "in": "body"
10678
+ },
10679
+ {
10680
+ "name": "tool_id",
10681
+ "description": "Replaces the backend with this tool",
10682
+ "required": false,
10683
+ "type": "string",
10684
+ "in": "body"
10685
+ },
10686
+ {
10687
+ "name": "questions",
10688
+ "description": "Question id → question, 1 to 20 of them. A question id starts with a letter or underscore and holds only letters, digits and underscores (at most 64), since it keys the answer object.",
10689
+ "required": false,
10690
+ "type": "object",
10691
+ "in": "body"
10692
+ },
10693
+ {
10694
+ "name": "version_label",
10695
+ "description": "Optional tag for the version this write archives. Ignored when the write changes no question, since no version is archived.",
10696
+ "required": false,
10697
+ "type": "string",
10698
+ "in": "body"
10699
+ },
10700
+ {
10701
+ "name": "expected_version",
10702
+ "description": "Refuses the write unless the decider is at this version.",
10703
+ "required": false,
10704
+ "type": "integer",
10705
+ "in": "body"
10706
+ }
10707
+ ]
10708
+ },
10709
+ "delete-decider": {
10710
+ serviceClass: "Deciders",
10711
+ operationId: "deleteDecider",
10712
+ description: "Deletes a decider and its version archive. Its decisions remain and keep naming the decider's ID.",
10713
+ moduleDocsUrl: "https://docs.naturali.ai/docs/modules/deciders",
10714
+ httpMethod: "delete",
10715
+ pathParams: ["project_id", "decider_id"],
10716
+ queryParams: [],
10717
+ headerParams: [],
10718
+ cookieParams: [],
10719
+ flags: [{
10720
+ "name": "project_id",
10721
+ "description": "Project public ID (proj_ prefix).",
10722
+ "required": true,
10723
+ "type": "string",
10724
+ "in": "path"
10725
+ }, {
10726
+ "name": "decider_id",
10727
+ "description": "The decider ID",
10728
+ "required": true,
10729
+ "type": "string",
10730
+ "in": "path"
10731
+ }]
10732
+ },
10733
+ "list-decider-versions": {
10734
+ serviceClass: "Deciders",
10735
+ operationId: "listDeciderVersions",
10736
+ description: "Returns the decider's archived question sets, newest first. A version is written on create and on every write that changes `questions`.",
10737
+ moduleDocsUrl: "https://docs.naturali.ai/docs/modules/deciders",
10738
+ httpMethod: "get",
10739
+ pathParams: ["project_id", "decider_id"],
10740
+ queryParams: ["limit", "offset"],
10741
+ headerParams: [],
10742
+ cookieParams: [],
10743
+ flags: [
10744
+ {
10745
+ "name": "project_id",
10746
+ "description": "Project public ID (proj_ prefix).",
10747
+ "required": true,
10748
+ "type": "string",
10749
+ "in": "path"
10750
+ },
10751
+ {
10752
+ "name": "decider_id",
10753
+ "description": "The decider ID",
10754
+ "required": true,
10755
+ "type": "string",
10756
+ "in": "path"
10757
+ },
10758
+ {
10759
+ "name": "limit",
10760
+ "description": "Maximum number of results to return",
10761
+ "required": false,
10762
+ "type": "integer",
10763
+ "in": "query"
10764
+ },
10765
+ {
10766
+ "name": "offset",
10767
+ "description": "Number of results to skip",
10768
+ "required": false,
10769
+ "type": "integer",
10770
+ "in": "query"
10771
+ }
10772
+ ]
10773
+ },
10774
+ "get-decider-version": {
10775
+ serviceClass: "Deciders",
10776
+ operationId: "getDeciderVersion",
10777
+ description: "Returns the question set a version held. A decision names the `decider_version` it was answered under, so this is how its criteria are read after the decider has changed.",
10778
+ moduleDocsUrl: "https://docs.naturali.ai/docs/modules/deciders",
10779
+ httpMethod: "get",
10780
+ pathParams: [
10781
+ "project_id",
10782
+ "decider_id",
10783
+ "version"
10784
+ ],
10785
+ queryParams: [],
10786
+ headerParams: [],
10787
+ cookieParams: [],
10788
+ flags: [
10789
+ {
10790
+ "name": "project_id",
10791
+ "description": "Project public ID (proj_ prefix).",
10792
+ "required": true,
10793
+ "type": "string",
10794
+ "in": "path"
10795
+ },
10796
+ {
10797
+ "name": "decider_id",
10798
+ "description": "The decider ID",
10799
+ "required": true,
10800
+ "type": "string",
10801
+ "in": "path"
10802
+ },
10803
+ {
10804
+ "name": "version",
10805
+ "description": "The archived version number",
10806
+ "required": true,
10807
+ "type": "integer",
10808
+ "in": "path"
10809
+ }
10810
+ ]
10811
+ },
10812
+ "restore-decider-version": {
10813
+ serviceClass: "Deciders",
10814
+ operationId: "restoreDeciderVersion",
10815
+ description: "Writes an archived question set back as the decider's live one, which archives it again as a new version rather than rewinding the counter. Restoring the question set the decider already holds is a no-op.",
10816
+ moduleDocsUrl: "https://docs.naturali.ai/docs/modules/deciders",
10817
+ httpMethod: "post",
10818
+ pathParams: [
10819
+ "project_id",
10820
+ "decider_id",
10821
+ "version"
10822
+ ],
10823
+ queryParams: [],
10824
+ headerParams: [],
10825
+ cookieParams: [],
10826
+ flags: [
10827
+ {
10828
+ "name": "project_id",
10829
+ "description": "Project public ID (proj_ prefix).",
10830
+ "required": true,
10831
+ "type": "string",
10832
+ "in": "path"
10833
+ },
10834
+ {
10835
+ "name": "decider_id",
10836
+ "description": "The decider ID",
10837
+ "required": true,
10838
+ "type": "string",
10839
+ "in": "path"
10840
+ },
10841
+ {
10842
+ "name": "version",
10843
+ "description": "The archived version number",
10844
+ "required": true,
10845
+ "type": "integer",
10846
+ "in": "path"
10847
+ },
10848
+ {
10849
+ "name": "label",
10850
+ "description": "Optional tag for the new version. Defaults to `restored from vN`.",
10851
+ "required": false,
10852
+ "type": "string",
10853
+ "in": "body"
10854
+ }
10855
+ ]
10856
+ },
10857
+ "create-decision": {
10858
+ serviceClass: "Deciders",
10859
+ operationId: "createDecision",
10860
+ description: "Evaluates the decider against `state` and records the decision. The questions come from the decider, never from the request, so a call site can only supply what is judged. Everything that can refuse the request is checked before the decision is written, so a refusal is a `4xx` and never a polled failure: the agent's tool surface (`400 DECIDER_AGENT_NOT_TOOL_LESS`), a tool that cannot answer (`400 DECIDER_TOOL_NOT_CALLABLE`), a paused project (`409 PROJECT_PAUSED`) and, for an agent, quota admission (`429 QUOTA_EXCEEDED`). A tool backend is called with `{ state, questions }` and must answer `{ answers: { <question id>: { choice | score | value, probabilities? } } }`; an answer outside that contract fails the decision with `DECISION_ANSWER_INVALID`. With `wait: false`, the default, the answer is `201` with the decision `queued`; poll `GET /v1/projects/{project_id}/decisions/{decision_id}` or subscribe to `decisions.completed` and `decisions.failed`. With `wait: true` it is `201` with the decision settled.",
10861
+ moduleDocsUrl: "https://docs.naturali.ai/docs/modules/deciders",
10862
+ httpMethod: "post",
10863
+ pathParams: ["project_id", "decider_id"],
10864
+ queryParams: [],
10865
+ headerParams: [],
10866
+ cookieParams: [],
10867
+ flags: [
10868
+ {
10869
+ "name": "project_id",
10870
+ "description": "Project public ID (proj_ prefix).",
10871
+ "required": true,
10872
+ "type": "string",
10873
+ "in": "path"
10874
+ },
10875
+ {
10876
+ "name": "decider_id",
10877
+ "description": "The decider ID",
10878
+ "required": true,
10879
+ "type": "string",
10880
+ "in": "path"
10881
+ },
10882
+ {
10883
+ "name": "state",
10884
+ "description": "What is judged: any JSON value. A string reaches the agent verbatim; anything else is serialized as JSON. Not stored.",
10885
+ "required": true,
10886
+ "type": "string",
10887
+ "in": "body"
10888
+ },
10889
+ {
10890
+ "name": "metadata",
10891
+ "description": "Caller-owned annotations stored on the decision and returned on every read — typically the id of what was judged, since the state itself is not stored. Written once, with the decision. A non-object is rejected with `400 VALIDATION_FAILED` and no decision is written.",
10892
+ "required": false,
10893
+ "type": "object",
10894
+ "in": "body"
10895
+ },
10896
+ {
10897
+ "name": "wait",
10898
+ "description": "True evaluates before answering and returns the settled decision. False — the default — returns the `queued` decision at once.",
10899
+ "required": false,
10900
+ "type": "boolean",
10901
+ "in": "body"
10902
+ }
10903
+ ]
10904
+ },
10905
+ "list-decisions": {
10906
+ serviceClass: "Deciders",
10907
+ operationId: "listDecisions",
10908
+ description: "Returns the decisions in a project, newest first.",
10909
+ moduleDocsUrl: "https://docs.naturali.ai/docs/modules/deciders",
10910
+ httpMethod: "get",
10911
+ pathParams: ["project_id"],
10912
+ queryParams: [
10913
+ "decider_id",
10914
+ "status",
10915
+ "limit",
10916
+ "offset"
10917
+ ],
10918
+ headerParams: [],
10919
+ cookieParams: [],
10920
+ flags: [
10921
+ {
10922
+ "name": "project_id",
10923
+ "description": "Project public ID (proj_ prefix).",
10924
+ "required": true,
10925
+ "type": "string",
10926
+ "in": "path"
10927
+ },
10928
+ {
10929
+ "name": "decider_id",
10930
+ "description": "Only decisions requested from this decider",
10931
+ "required": false,
10932
+ "type": "string",
10933
+ "in": "query"
10934
+ },
10935
+ {
10936
+ "name": "status",
10937
+ "description": "Only decisions in this status",
10938
+ "required": false,
10939
+ "type": "string",
10940
+ "in": "query"
10941
+ },
10942
+ {
10943
+ "name": "limit",
10944
+ "description": "Maximum number of results to return",
10945
+ "required": false,
10946
+ "type": "integer",
10947
+ "in": "query"
10948
+ },
10949
+ {
10950
+ "name": "offset",
10951
+ "description": "Number of results to skip",
10952
+ "required": false,
10953
+ "type": "integer",
10954
+ "in": "query"
10955
+ }
10956
+ ]
10957
+ },
10958
+ "get-decision": {
10959
+ serviceClass: "Deciders",
10960
+ operationId: "getDecision",
10961
+ description: "Returns a decision. Poll it after a `wait: false` request until `status` is `completed` or `failed`.",
10962
+ moduleDocsUrl: "https://docs.naturali.ai/docs/modules/deciders",
10963
+ httpMethod: "get",
10964
+ pathParams: ["project_id", "decision_id"],
10965
+ queryParams: [],
10966
+ headerParams: [],
10967
+ cookieParams: [],
10968
+ flags: [{
10969
+ "name": "project_id",
10970
+ "description": "Project public ID (proj_ prefix).",
10971
+ "required": true,
10972
+ "type": "string",
10973
+ "in": "path"
10974
+ }, {
10975
+ "name": "decision_id",
10976
+ "description": "The decision ID",
10977
+ "required": true,
10978
+ "type": "string",
10979
+ "in": "path"
10980
+ }]
10981
+ },
10358
10982
  "list-documents": {
10359
10983
  serviceClass: "Documents",
10360
10984
  operationId: "listDocuments",
@@ -18516,7 +19140,7 @@ const routes = {
18516
19140
  "delete-tool": {
18517
19141
  serviceClass: "Tools",
18518
19142
  operationId: "deleteTool",
18519
- description: "Deletes a tool by ID.",
19143
+ description: "Deletes a tool by ID. A tool that is a decider's backend is refused with `409 TOOL_HAS_DEPENDENTS`.",
18520
19144
  moduleDocsUrl: "https://docs.naturali.ai/docs/modules/tools",
18521
19145
  httpMethod: "delete",
18522
19146
  pathParams: ["project_id", "tool_id"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturali/cli",
3
- "version": "0.154.0",
3
+ "version": "0.155.0",
4
4
  "description": "Command-line interface for the naturali.ai API, generated from its OpenAPI specs",
5
5
  "type": "module",
6
6
  "bin": {
@@ -25,7 +25,7 @@
25
25
  "yaml": "^2.9.1"
26
26
  },
27
27
  "devDependencies": {
28
- "@naturali/sdk": "0.154.0",
28
+ "@naturali/sdk": "0.155.0",
29
29
  "@ttoss/openapi-codegen": "^0.3.1",
30
30
  "@types/node": "^26.5.1",
31
31
  "tsdown": "^0.23.0",