@naturali/cli 0.199.0 → 0.200.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.
Files changed (2) hide show
  1. package/dist/index.mjs +27 -18
  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.199.0";
20
+ var version = "0.200.1";
21
21
  //#endregion
22
22
  //#region ../sdk/src/generated/core/bodySerializer.gen.ts
23
23
  const serializeFormDataPair = (data, key, value) => {
@@ -779,7 +779,7 @@ var Channels = class {
779
779
  /**
780
780
  * Erase an address
781
781
  *
782
- * Removes the address, its conversations, and its runtime actor and sessions.
782
+ * Removes the address, its conversations and their sessions, and the actor naturali created for it. An actor bound with `actor_id` is yours and is kept.
783
783
  *
784
784
  */
785
785
  static deleteAddress(options) {
@@ -791,7 +791,7 @@ var Channels = class {
791
791
  /**
792
792
  * Get an address
793
793
  *
794
- * Reads one identifier's own action, if it has one. An identifier naturali has never seen is a `404`; to set an action without knowing whether it exists, use [`PUT /v1/projects/{project_id}/addresses/{identifier}`](/docs/api/addresses/set-address-action), which upserts.
794
+ * Reads one identifier's own action, if it has one. An identifier naturali has never seen is a `404`; to set an action without knowing whether it exists, use [`PUT /v1/projects/{project_id}/addresses/{identifier}`](/docs/api/addresses/set-address), which upserts.
795
795
  *
796
796
  */
797
797
  static getAddress(options) {
@@ -801,12 +801,14 @@ var Channels = class {
801
801
  });
802
802
  }
803
803
  /**
804
- * Set or clear this address's own action
804
+ * Set or clear this address's own action or actor
805
805
  *
806
- * Upserts the address and its `action` in one call. `action: null` forgets the exception and defers back to the route table; any other `action` requires the same fields a route or channel default would (`agent_id` for `agent`, `text` for `message`).
806
+ * Upserts the address with its `action`, the actor it speaks as, or both; a field left out is left alone. `action: null` forgets the exception and defers back to the route table; any other `action` requires the same fields a route or channel default would (`agent_id` for `agent`, `text` for `message`).
807
+ *
808
+ * `actor_id` binds an actor of this project, so the address speaks as the same actor your own sessions use. A changed actor deletes the address's conversations and their sessions — a session's actor is fixed — and the next message opens a fresh one; the actor naturali created for the address is deleted with them. An actor you bind is never deleted here.
807
809
  *
808
810
  */
809
- static setAddressAction(options) {
811
+ static setAddress(options) {
810
812
  return (options.client ?? client).put({
811
813
  url: "/v1/projects/{project_id}/addresses/{identifier}",
812
814
  ...options,
@@ -898,7 +900,7 @@ var Channels = class {
898
900
  * Full replace, the same validation as create: an omitted field takes its create default. Where that default would widen a value the route sets, omission is `400 replace_omits_fields`, naming the fields in `details.fields`, and nothing is written: a set `surface` (the default is any surface), a non-empty `match` (every message), a non-empty `config` (it carries the Discord allowlist), and `status` on a `disabled` route (the default re-activates it). Send the value to keep it, or `"surface": null`, `"match": {}`, `"config": null`, `"status": "active"` to clear it.
899
901
  *
900
902
  */
901
- static updateChannelRoute(options) {
903
+ static replaceChannelRoute(options) {
902
904
  return (options.client ?? client).patch({
903
905
  url: "/v1/projects/{project_id}/channels/{channel_id}/routes/{route_id}",
904
906
  ...options,
@@ -1120,7 +1122,7 @@ var Admin = class {
1120
1122
  * Replaces the platform roles of any user. Needs the `admin` role, and each role that changes needs the caller to hold the role that grants it (today `admin` grants `admin`). Values outside the catalog are rejected with a 400, and a caller cannot remove their own `admin` role.
1121
1123
  *
1122
1124
  */
1123
- static updateUserRoles(options) {
1125
+ static setUserRoles(options) {
1124
1126
  return (options.client ?? client).put({
1125
1127
  url: "/v1/admin/users/{user_id}/roles",
1126
1128
  ...options,
@@ -7779,7 +7781,7 @@ const routes = {
7779
7781
  "get-address": {
7780
7782
  serviceClass: "Channels",
7781
7783
  operationId: "getAddress",
7782
- description: "Reads one identifier's own action, if it has one. An identifier naturali has never seen is a `404`; to set an action without knowing whether it exists, use [`PUT /v1/projects/{project_id}/addresses/{identifier}`](/docs/api/addresses/set-address-action), which upserts.",
7784
+ description: "Reads one identifier's own action, if it has one. An identifier naturali has never seen is a `404`; to set an action without knowing whether it exists, use [`PUT /v1/projects/{project_id}/addresses/{identifier}`](/docs/api/addresses/set-address), which upserts.",
7783
7785
  moduleDocsUrl: "https://naturali.ai/docs/modules/addresses",
7784
7786
  httpMethod: "get",
7785
7787
  pathParams: ["project_id", "identifier"],
@@ -7800,10 +7802,10 @@ const routes = {
7800
7802
  "in": "path"
7801
7803
  }]
7802
7804
  },
7803
- "set-address-action": {
7805
+ "set-address": {
7804
7806
  serviceClass: "Channels",
7805
- operationId: "setAddressAction",
7806
- description: "Upserts the address and its `action` in one call. `action: null` forgets the exception and defers back to the route table; any other `action` requires the same fields a route or channel default would (`agent_id` for `agent`, `text` for `message`).",
7807
+ operationId: "setAddress",
7808
+ description: "Upserts the address with its `action`, the actor it speaks as, or both; a field left out is left alone. `action: null` forgets the exception and defers back to the route table; any other `action` requires the same fields a route or channel default would (`agent_id` for `agent`, `text` for `message`). `actor_id` binds an actor of this project, so the address speaks as the same actor your own sessions use. A changed actor deletes the address's conversations and their sessions — a session's actor is fixed — and the next message opens a fresh one; the actor naturali created for the address is deleted with them. An actor you bind is never deleted here.",
7807
7809
  moduleDocsUrl: "https://naturali.ai/docs/modules/addresses",
7808
7810
  httpMethod: "put",
7809
7811
  pathParams: ["project_id", "identifier"],
@@ -7825,10 +7827,17 @@ const routes = {
7825
7827
  "type": "string",
7826
7828
  "in": "path"
7827
7829
  },
7830
+ {
7831
+ "name": "actor_id",
7832
+ "description": "An actor of this project for the address to speak as, `404` when the project has none by that id. Create it with your own user id as its `external_id`: every tool call in the address's sessions carries that actor's `actor_id` and `actor_external_id` as tool context, set by the runtime and never by the caller, so a tool knows which of your users is talking.\n\n`null` releases a bound actor (kept, not deleted); the next message gets an actor naturali creates.\n",
7833
+ "required": false,
7834
+ "type": "string",
7835
+ "in": "body"
7836
+ },
7828
7837
  {
7829
7838
  "name": "action",
7830
7839
  "description": "What an inbound message becomes.\n\n`agent` is a dialogue: the identity behind the message gets a session, and every later message on it continues the same one. `oneshot` runs the agent once and keeps nothing — no address, no actor, no session, no conversation — so each message is answered on its own. Choose it for work that is filed rather than discussed; choose `agent` when the answer depends on what came before.\n\n`message` delivers fixed text without running an agent, and `silence` answers nothing.\n",
7831
- "required": true,
7840
+ "required": false,
7832
7841
  "type": "string",
7833
7842
  "in": "body"
7834
7843
  },
@@ -7879,7 +7888,7 @@ const routes = {
7879
7888
  "delete-address": {
7880
7889
  serviceClass: "Channels",
7881
7890
  operationId: "deleteAddress",
7882
- description: "Removes the address, its conversations, and its runtime actor and sessions.",
7891
+ description: "Removes the address, its conversations and their sessions, and the actor naturali created for it. An actor bound with `actor_id` is yours and is kept.",
7883
7892
  moduleDocsUrl: "https://naturali.ai/docs/modules/addresses",
7884
7893
  httpMethod: "delete",
7885
7894
  pathParams: ["project_id", "identifier"],
@@ -7979,9 +7988,9 @@ const routes = {
7979
7988
  }
7980
7989
  ]
7981
7990
  },
7982
- "update-user-roles": {
7991
+ "set-user-roles": {
7983
7992
  serviceClass: "Admin",
7984
- operationId: "updateUserRoles",
7993
+ operationId: "setUserRoles",
7985
7994
  description: "Replaces the platform roles of any user. Needs the `admin` role, and each role that changes needs the caller to hold the role that grants it (today `admin` grants `admin`). Values outside the catalog are rejected with a 400, and a caller cannot remove their own `admin` role.",
7986
7995
  moduleDocsUrl: "https://naturali.ai/docs/modules/admin",
7987
7996
  httpMethod: "put",
@@ -10820,9 +10829,9 @@ const routes = {
10820
10829
  }
10821
10830
  ]
10822
10831
  },
10823
- "update-channel-route": {
10832
+ "replace-channel-route": {
10824
10833
  serviceClass: "Channels",
10825
- operationId: "updateChannelRoute",
10834
+ operationId: "replaceChannelRoute",
10826
10835
  description: "Full replace, the same validation as create: an omitted field takes its create default. Where that default would widen a value the route sets, omission is `400 replace_omits_fields`, naming the fields in `details.fields`, and nothing is written: a set `surface` (the default is any surface), a non-empty `match` (every message), a non-empty `config` (it carries the Discord allowlist), and `status` on a `disabled` route (the default re-activates it). Send the value to keep it, or `\"surface\": null`, `\"match\": {}`, `\"config\": null`, `\"status\": \"active\"` to clear it.",
10827
10836
  moduleDocsUrl: "https://naturali.ai/docs/modules/channel-routes",
10828
10837
  httpMethod: "patch",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturali/cli",
3
- "version": "0.199.0",
3
+ "version": "0.200.1",
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.199.0",
34
+ "@naturali/sdk": "0.200.1",
35
35
  "@ttoss/openapi-codegen": "^0.5.0",
36
36
  "@types/node": "^26.5.1",
37
37
  "tsdown": "^0.23.0",