@naturali/sdk 0.314.1 → 0.315.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
@@ -1150,7 +1150,7 @@ var Channels = class {
1150
1150
  /**
1151
1151
  * List the channel's conversations
1152
1152
  *
1153
- * A cursor page of the channel's conversations, newest first. A conversation is one address's dialogue on the channel — the continuity anchor that resumes the same runtime session instead of starting fresh per message — so this is the read path for who has talked to the channel and which actor/session their dialogue resolved to.
1153
+ * A cursor page of the channel's conversations, newest first. A conversation is one address's dialogue on the channel — the continuity anchor that resumes the same session instead of starting fresh per message — so this is the read path for who has talked to the channel and which actor/session their dialogue resolved to.
1154
1154
  * Conversations are created by the inbound path (the WhatsApp and X webhooks, the Discord gateway worker) when a real message arrives; there is no way to create one directly.
1155
1155
  *
1156
1156
  */
@@ -1179,7 +1179,7 @@ var Channels = class {
1179
1179
  /**
1180
1180
  * Delete a conversation
1181
1181
  *
1182
- * Removes the conversation and the runtime session it maps to. The address, its actor and its other conversations are left alone; the address's next message opens a fresh conversation. To erase the address itself, use [`DELETE /v1/projects/{project_id}/addresses/{identifier}`](/docs/api/addresses/delete-address).
1182
+ * Removes the conversation and the session it maps to. The address, its actor and its other conversations are left alone; the address's next message opens a fresh conversation. To erase the address itself, use [`DELETE /v1/projects/{project_id}/addresses/{identifier}`](/docs/api/addresses/delete-address).
1183
1183
  *
1184
1184
  */
1185
1185
  static deleteChannelConversation(options) {
@@ -1191,7 +1191,7 @@ var Channels = class {
1191
1191
  /**
1192
1192
  * Get a conversation
1193
1193
  *
1194
- * Where the conversation points: the address it belongs to, the route (or sentinel) whose action opened it, and the runtime session it maps 1:1 to. The messages are not here — read them with [`GET /v1/projects/{project_id}/channels/{channel_id}/conversations/{conversation_id}/messages`](/docs/api/channels/list-channel-conversation-messages).
1194
+ * Where the conversation points: the address it belongs to, the route (or sentinel) whose action opened it, and the session it maps 1:1 to. The messages are not here — read them with [`GET /v1/projects/{project_id}/channels/{channel_id}/conversations/{conversation_id}/messages`](/docs/api/channels/list-channel-conversation-messages).
1195
1195
  *
1196
1196
  */
1197
1197
  static getChannelConversation(options) {
@@ -1203,7 +1203,7 @@ var Channels = class {
1203
1203
  /**
1204
1204
  * Read a conversation's transcript
1205
1205
  *
1206
- * The conversation's messages, oldest first. naturali stores no message bodies — the dialogue lives in the runtime session the conversation maps to, so this reads through to the runtime.
1206
+ * The conversation's messages, oldest first, read from the session the conversation maps to.
1207
1207
  *
1208
1208
  */
1209
1209
  static listChannelConversationMessages(options) {
@@ -1323,7 +1323,7 @@ var Admin = class {
1323
1323
  /**
1324
1324
  * Read the global price book
1325
1325
  *
1326
- * The upstream runtime's global default prices — the rows carrying neither a provider nor a project, which is all the upstream listing returns, so no tenant's own rates appear here.
1326
+ * The global default prices — the rows carrying neither a provider nor a project, so no tenant's own rates appear here.
1327
1327
  *
1328
1328
  * These are a cost basis, not a tariff: what a customer pays is the plan they bought plus the multiplier in PRICING.md section 3, applied when spend is reconciled. This is the read behind the storage-rate assertion at boot and the pinned embedding rate.
1329
1329
  *
@@ -4185,6 +4185,43 @@ var McpServers = class {
4185
4185
  ...options
4186
4186
  });
4187
4187
  }
4188
+ /**
4189
+ * List MCP server grants
4190
+ *
4191
+ * The clients actors signed in from on a `mode: actors` server, one active grant per actor and client, newest first. Empty on any other server. No token is returned.
4192
+ */
4193
+ static listMcpServerGrants(options) {
4194
+ return (options.client ?? client).get({
4195
+ url: "/v1/projects/{project_id}/mcp-servers/{mcp_server_id}/grants",
4196
+ ...options
4197
+ });
4198
+ }
4199
+ /**
4200
+ * Revoke MCP server grants
4201
+ *
4202
+ * Revokes every active grant of `actor_id` on the server, or every active grant of the server without it; each client's next request is `401`. The actors are kept and may sign in again.
4203
+ */
4204
+ static revokeMcpServerGrants(options) {
4205
+ return (options.client ?? client).post({
4206
+ url: "/v1/projects/{project_id}/mcp-servers/{mcp_server_id}/grants/revoke",
4207
+ ...options,
4208
+ headers: {
4209
+ "Content-Type": "application/json",
4210
+ ...options.headers
4211
+ }
4212
+ });
4213
+ }
4214
+ /**
4215
+ * Revoke an MCP server grant
4216
+ *
4217
+ * Revokes the grant; that client's next request is `401`. The actor is kept and may sign in again.
4218
+ */
4219
+ static revokeMcpServerGrant(options) {
4220
+ return (options.client ?? client).delete({
4221
+ url: "/v1/projects/{project_id}/mcp-servers/{mcp_server_id}/grants/{grant_id}",
4222
+ ...options
4223
+ });
4224
+ }
4188
4225
  };
4189
4226
  var Memories = class {
4190
4227
  /**
@@ -5618,7 +5655,7 @@ var Projects = class {
5618
5655
  /**
5619
5656
  * Delete a project
5620
5657
  *
5621
- * Permanently deletes the project and its backing runtime project. Fails with 409 if the runtime project still has dependent resources — remove them first, or pass `force=true` to delete the project and all its dependents (agents, providers, tools, sessions, generations, traces). Forcing is destructive and irreversible. The managed conversion rules every project is created with are not dependents: they are removed with the project.
5658
+ * Permanently deletes the project. Fails with 409 if the project still has dependent resources — remove them first, or pass `force=true` to delete the project and all its dependents (agents, providers, tools, sessions, generations, traces). Forcing is destructive and irreversible. The managed conversion rules every project is created with are not dependents: they are removed with the project.
5622
5659
  * Requires the `owner` role — an `admin` runs the project day to day, but destroying it is the billing owner's call.
5623
5660
  * The project's spend so far is settled on the owner's balance first, and its runs this cycle stay on the owner's run allowance and statement.
5624
5661
  *
@@ -5837,7 +5874,7 @@ var Projects = class {
5837
5874
  /**
5838
5875
  * Get per-project usage
5839
5876
  *
5840
- * The per-project meter — the re-billing view (A11/C12/P3). Aggregates the project's usage over an optional [from, to] window, bucketed by a single dimension. Costs are the billing-grade cost_usd the runtime freezes at write time; null means nothing in the bucket was priced (never that it was free). Only managed providers are priced (on the runtime), so cost reflects managed usage; BYOK usage carries no LLM cost.
5877
+ * The per-project meter — the re-billing view. Aggregates the project's usage over an optional [from, to] window, bucketed by a single dimension. Costs are the billing-grade cost_usd frozen at write time; null means nothing in the bucket was priced (never that it was free). Only managed providers are priced, so cost reflects managed usage; BYOK usage carries no LLM cost.
5841
5878
  *
5842
5879
  * Every bucket also carries components — the amounts actually measured. The token counts describe LLM usage alone, so that is where a storage, api_request or compute_execution bucket reports its real quantity instead of zeroed token fields.
5843
5880
  *
@@ -6868,7 +6905,7 @@ var Users = class {
6868
6905
  *
6869
6906
  * **This route counts live; the refusal reads a figure counted every few minutes.** So the two can differ by a burst: this is the more current number, and a refusal quotes the one it actually enforced.
6870
6907
  *
6871
- * It is also more expensive than the balance read: it reads the runtime several times per project. Poll it on the order of minutes, not seconds. A figure that could not be read is `null` rather than failing the request.
6908
+ * It is also more expensive than the balance read: it reads several sources per project. Poll it on the order of minutes, not seconds. A figure that could not be read is `null` rather than failing the request.
6872
6909
  *
6873
6910
  */
6874
6911
  static getCurrentUserUsage(options) {