@naturali/sdk 0.38.1 → 0.40.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.mjs CHANGED
@@ -633,7 +633,7 @@ var Agents = class {
633
633
  /**
634
634
  * Delete an agent
635
635
  *
636
- * Deletes the backing SOAT agent. Returns 409 if the agent still has dependent generations or traces — pass `force=true` to delete those along with the agent (destructive and irreversible).
636
+ * Deletes the backing runtime agent. Returns 409 if the agent still has dependent generations or traces — pass `force=true` to delete those along with the agent (destructive and irreversible).
637
637
  *
638
638
  */
639
639
  static deleteAgent(options) {
@@ -654,7 +654,7 @@ var Agents = class {
654
654
  /**
655
655
  * Update an agent
656
656
  *
657
- * Change the bound provider, name, model, instructions, sampling/step config, attached tools (tool_ids/tool_choice), or the naturali-side status. At least one field is required.
657
+ * Change the bound provider, name, model, instructions, sampling/step config, attached tools (tool_ids/tool_choice), the structured-output schema (output_schema), or the naturali-side status. At least one field is required.
658
658
  *
659
659
  */
660
660
  static updateAgent(options) {
@@ -1006,7 +1006,7 @@ var Channels = class {
1006
1006
  /**
1007
1007
  * List the channel's conversations
1008
1008
  *
1009
- * A cursor page of the channel's conversations, newest first. A conversation is one contact's dialogue on the channel — the continuity anchor that resumes the same SOAT 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.
1009
+ * A cursor page of the channel's conversations, newest first. A conversation is one contact'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.
1010
1010
  * Conversations are created by the inbound path (the WhatsApp webhook, the Discord gateway worker) when a real message arrives; there is no way to create one directly.
1011
1011
  *
1012
1012
  */
@@ -1028,7 +1028,7 @@ var Channels = class {
1028
1028
  /**
1029
1029
  * Read a conversation's transcript
1030
1030
  *
1031
- * The conversation's messages, oldest first. naturali stores no message bodies — the dialogue lives in the SOAT session the conversation maps to, so this reads through to SOAT. Pagination is `limit`/`offset` rather than an opaque cursor because the upstream is offset-based over a stable `position` ordering.
1031
+ * 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. Pagination is `limit`/`offset` rather than an opaque cursor because the upstream is offset-based over a stable `position` ordering.
1032
1032
  *
1033
1033
  */
1034
1034
  static listChannelConversationMessages(options) {
@@ -1056,7 +1056,7 @@ var Contacts = class {
1056
1056
  * Create a contact
1057
1057
  *
1058
1058
  * Record a contact the customer already knows about, optionally with the identifiers it is expected to arrive at.
1059
- * Optional by design — the inbound path creates contacts on its own. This is for the embedder who has a user in their own system and wants naturali to agree about who that is before the first message, which is what makes `external_id` (and, through it, a session's `tool_context`) useful. No SOAT actor is created here; the contact gets one on first need.
1059
+ * Optional by design — the inbound path creates contacts on its own. This is for the embedder who has a user in their own system and wants naturali to agree about who that is before the first message, which is what makes `external_id` (and, through it, a session's `tool_context`) useful. No runtime actor is created here; the contact gets one on first need.
1060
1060
  *
1061
1061
  */
1062
1062
  static createContact(options) {
@@ -1072,7 +1072,7 @@ var Contacts = class {
1072
1072
  /**
1073
1073
  * Erase a contact
1074
1074
  *
1075
- * **Erasure (C4/LGPD).** Not a soft delete and not reversible: the contact's sessions — with their messages and media — its SOAT actor, its memory container and every identifier it was reachable at are removed, along with the merge records that reference it.
1075
+ * **Erasure (C4/LGPD).** Not a soft delete and not reversible: the contact's sessions — with their messages and media — its runtime actor, its memory container and every identifier it was reachable at are removed, along with the merge records that reference it.
1076
1076
  * The upstream deletes happen first, so a failure there aborts before the local pointers are dropped and a retry can still find what is left. A contact that was merged into another cannot be erased directly: its data lives with the survivor, so erase that one.
1077
1077
  *
1078
1078
  */
@@ -1151,7 +1151,7 @@ var Contacts = class {
1151
1151
  * Merge another contact into this one
1152
1152
  *
1153
1153
  * Fold `source_contact_id` into this contact — "same human, two identifiers" (C4).
1154
- * What moves: every identity and every conversation, so the survivor's history is the union of both. What is *shared* rather than moved: agent memory — SOAT hangs it off the actor, so the source's actor is re-pointed at the survivor's memory container and both keep answering with one recollection. Existing sessions keep working, which is the point of not rewriting them.
1154
+ * What moves: every identity and every conversation, so the survivor's history is the union of both. What is *shared* rather than moved: agent memory — the runtime hangs it off the actor, so the source's actor is re-pointed at the survivor's memory container and both keep answering with one recollection. Existing sessions keep working, which is the point of not rewriting them.
1155
1155
  * The source is not deleted: it stays as a tombstone pointing at the survivor, and the returned merge record lists exactly what moved, so the merge can be audited and reverted.
1156
1156
  *
1157
1157
  */
@@ -1207,7 +1207,7 @@ var Generations = class {
1207
1207
  /**
1208
1208
  * Run an agent generation
1209
1209
  *
1210
- * Sends messages to the agent, resolves its tools, and runs the model loop. Returns the final text when `status` is `completed` (plus `object` when the agent has an output schema), or the pending `tool_calls` when `status` is `requires_action`. With `stream: true` the response is a Server-Sent Events stream (Content-Type text/event-stream) proxied from SOAT instead of a single JSON body.
1210
+ * Sends messages to the agent, resolves its tools, and runs the model loop. Returns the final text when `status` is `completed` (plus `object` when the agent has an output schema), or the pending `tool_calls` when `status` is `requires_action`. With `stream: true` the response is a Server-Sent Events stream (Content-Type text/event-stream) proxied from the runtime instead of a single JSON body.
1211
1211
  *
1212
1212
  */
1213
1213
  static createGeneration(options) {
@@ -1236,7 +1236,7 @@ var Generations = class {
1236
1236
  /**
1237
1237
  * Get a generation's cost
1238
1238
  *
1239
- * What this one generation cost, and the tokens it was charged on — the billing-grade receipt SOAT froze at write time, per model line item.
1239
+ * What this one generation cost, and the tokens it was charged on — the billing-grade receipt the runtime froze at write time, per model line item.
1240
1240
  * This is the per-generation grain that `GET /v1/projects/{project_id}/usage` cannot express: that meter buckets a whole project by model, agent, run, day or meter type, and a run can hold more than one generation. Use this to price a single turn, and the project meter to roll spend up.
1241
1241
  * `cost_usd` is `null` when nothing was priced — never that the work was free. Only naturali-managed providers are priced; a BYOK generation runs on your own provider account, so it carries no LLM cost here (its tokens are still reported).
1242
1242
  * A generation belonging to another project responds `404`, not `403`.
@@ -1442,7 +1442,7 @@ var Projects = class {
1442
1442
  /**
1443
1443
  * Delete a project
1444
1444
  *
1445
- * Permanently deletes the project and its backing SOAT project. Fails with 409 if the SOAT 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.
1445
+ * 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.
1446
1446
  *
1447
1447
  */
1448
1448
  static deleteProject(options) {
@@ -1478,7 +1478,7 @@ var Projects = class {
1478
1478
  /**
1479
1479
  * Get per-project usage
1480
1480
  *
1481
- * 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 SOAT freezes at write time; null means nothing in the bucket was priced (never that it was free). Only managed providers are priced (on SOAT), so cost reflects managed usage; BYOK usage carries no LLM cost.
1481
+ * 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.
1482
1482
  *
1483
1483
  */
1484
1484
  static getProjectUsage(options) {
@@ -1503,7 +1503,7 @@ var Providers = class {
1503
1503
  /**
1504
1504
  * Register a provider (managed or BYOK)
1505
1505
  *
1506
- * Register a managed provider (naturali-keyed, priced on SOAT) or a BYOK provider (your credentials, stored write-only and never priced). See ProviderCreate for the fields each mode takes.
1506
+ * Register a managed provider (naturali-keyed, priced on the runtime) or a BYOK provider (your credentials, stored write-only and never priced). See ProviderCreate for the fields each mode takes.
1507
1507
  *
1508
1508
  */
1509
1509
  static createProvider(options) {
@@ -1519,7 +1519,7 @@ var Providers = class {
1519
1519
  /**
1520
1520
  * Delete a provider
1521
1521
  *
1522
- * Deletes the backing SOAT ai_provider and its secret. Returns 409 if the provider is still referenced by live resources (agents) — detach those first. `force=true` clears only soft dependents (price overrides, usage history); live references always block deletion.
1522
+ * Deletes the backing provider record on the runtime and its secret. Returns 409 if the provider is still referenced by live resources (agents) — detach those first. `force=true` clears only soft dependents (price overrides, usage history); live references always block deletion.
1523
1523
  *
1524
1524
  */
1525
1525
  static deleteProvider(options) {
@@ -1558,7 +1558,7 @@ var Sessions = class {
1558
1558
  /**
1559
1559
  * Open a session
1560
1560
  *
1561
- * Opens a durable session against the agent. The session accumulates messages and is resumable by id; its lifecycle (open / closed / expired) and configuration live in the backing SOAT session.
1561
+ * Opens a durable session against the agent. The session accumulates messages and is resumable by id; its lifecycle (open / closed / expired) and configuration live in the backing runtime session.
1562
1562
  *
1563
1563
  */
1564
1564
  static createSession(options) {
@@ -1574,7 +1574,7 @@ var Sessions = class {
1574
1574
  /**
1575
1575
  * Get a session
1576
1576
  *
1577
- * Returns the session's current state — status, activity timestamps and configuration — read live from the backing SOAT session, so a resumed session reflects everything that has happened since it was opened.
1577
+ * Returns the session's current state — status, activity timestamps and configuration — read live from the backing runtime session, so a resumed session reflects everything that has happened since it was opened.
1578
1578
  *
1579
1579
  */
1580
1580
  static getSession(options) {
@@ -1747,7 +1747,7 @@ var Tools = class {
1747
1747
  /**
1748
1748
  * Delete a tool
1749
1749
  *
1750
- * Deletes the backing SOAT tool. Returns 409 if the tool is still attached to an agent (detach it first).
1750
+ * Deletes the backing runtime tool. Returns 409 if the tool is still attached to an agent (detach it first).
1751
1751
  *
1752
1752
  */
1753
1753
  static deleteTool(options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturali/sdk",
3
- "version": "0.38.1",
3
+ "version": "0.40.0",
4
4
  "description": "TypeScript SDK for the naturali.ai API, generated from its OpenAPI specs",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -37,7 +37,7 @@
37
37
  "tsx": "^4.23.1",
38
38
  "typescript": "~6.0.3",
39
39
  "vitest": "^4.1.10",
40
- "@naturali/api": "0.38.1"
40
+ "@naturali/api": "0.40.0"
41
41
  },
42
42
  "scripts": {
43
43
  "generate": "tsx scripts/generate.ts",