@naturali/sdk 0.209.2 → 0.209.4

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
@@ -787,6 +787,8 @@ var Channels = class {
787
787
  *
788
788
  * `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.
789
789
  *
790
+ * An identifier no channel kind produces is `400`.
791
+ *
790
792
  */
791
793
  static setAddress(options) {
792
794
  return (options.client ?? client).put({
@@ -893,7 +895,7 @@ var Channels = class {
893
895
  /**
894
896
  * Read the whole route table
895
897
  *
896
- * Every route across every channel in the project, one read — the table is small by construction (CHANNELS-ROUTING.md §3.6), so this is unpaginated.
898
+ * Every route across every channel in the project, one read — the table is small by construction, so this is unpaginated.
897
899
  *
898
900
  */
899
901
  static listProjectChannelRoutes(options) {
@@ -917,7 +919,7 @@ var Channels = class {
917
919
  * Connect a channel
918
920
  *
919
921
  * Connect a channel. The required fields depend on `channel`; no credential is ever returned.
920
- * **Discord** (`channel: discord`) — supply `application_id` and `bot_token`, plus the `modes` selecting which Gateway flows to serve (direct messages, and/or @mention-opens-a-thread). The token is checked with Discord first: `400 invalid_bot_token` when Discord rejects it, `400 application_mismatch` when it belongs to another application. Returns `501` when the deployment has no `CHANNEL_TOKEN_KEY` configured.
922
+ * **Discord** (`channel: discord`) — supply `application_id` and `bot_token`, plus the `modes` selecting which Gateway flows to serve (direct messages, and/or @mention-opens-a-thread). The token is checked with Discord first: `400 invalid_bot_token` when Discord rejects it, `400 application_mismatch` when it belongs to another application. Returns `501` when this deployment does not enable Discord channels.
921
923
  * **WhatsApp** (default) — one of two credential paths, both filling the same write-only secret:
922
924
  * * **BYOT** (`credential_source: byot`, default) — supply
923
925
  * `phone_number_id` and `access_token` from your own Meta app.
@@ -1488,7 +1490,7 @@ var AiProviders = class {
1488
1490
  *
1489
1491
  * Deletes an AI provider configuration.
1490
1492
  *
1491
- * Live references — chats, agents, and model routes whose targets name this provider — always block deletion with `409 AI_PROVIDER_HAS_DEPENDENTS`; `force` does not override them, so delete or repoint those resources first. Soft dependents — price overrides and usage/generation records — also block with `409` unless `force=true`, which deletes the provider's price overrides and unlinks its usage history, preserving those rows: each usage event keeps the provider's id as its `ai_provider_id`. The `409` body's `error.meta` reports the counts, a sample of offending IDs, and a `forcible` flag that is `true` when a `force=true` retry would succeed.
1493
+ * Live references — agents and model routes whose targets name this provider — always block deletion with `409 AI_PROVIDER_HAS_DEPENDENTS`; `force` does not override them, so delete or repoint those resources first. Soft dependents — price overrides and usage/generation records — also block with `409` unless `force=true`, which deletes the provider's price overrides and unlinks its usage history, preserving those rows: each usage event keeps the provider's id as its `ai_provider_id`. The `409` body's `error.meta` reports the counts, a sample of offending IDs, and a `forcible` flag that is `true` when a `force=true` retry would succeed.
1492
1494
  *
1493
1495
  */
1494
1496
  static deleteAiProvider(options) {
@@ -1950,7 +1952,7 @@ var Auth = class {
1950
1952
  /**
1951
1953
  * Refresh a session
1952
1954
  *
1953
- * Exchanges a valid refresh token for a new access JWT and a rotated refresh token, taken from the body or from the `refresh_token` cookie set at sign-in — a browser sends an empty body and the cookie carries the credential. Refresh tokens are single-use; presenting a previously-rotated token is treated as reuse and revokes the whole session family (createRefreshRotation reuse detection), except within a few seconds of the rotation, where it is treated as two tabs racing on one cookie and rotated again.
1955
+ * Exchanges a valid refresh token for a new access JWT and a rotated refresh token, taken from the body or from the `refresh_token` cookie set at sign-in — a browser sends an empty body and the cookie carries the credential. Refresh tokens are single-use; presenting a previously-rotated token is treated as reuse and revokes the whole session family, except within a few seconds of the rotation, where it is treated as two tabs racing on one cookie and rotated again.
1954
1956
  *
1955
1957
  */
1956
1958
  static refreshSession(options) {
@@ -2625,10 +2627,7 @@ var Embeddings = class {
2625
2627
  * Provide `input` for a single text or `inputs` for a batch. At least one is required.
2626
2628
  * Returns `embedding` when `input` is used, and `embeddings` when `inputs` is used.
2627
2629
  *
2628
- * `project_id` names the project the call's token usage is metered against, so
2629
- * embedding spend reaches the usage rollup and the project's `cost_usd` / `tokens`
2630
- * quotas. A project-scoped credential supplies its own project; a call that names
2631
- * none and is bound to none is `400 VALIDATION_FAILED`.
2630
+ * The call's token usage is metered against the project in the path, so embedding spend reaches the usage rollup and the project's `cost_usd` / `tokens` quotas. A body `project_id` is ignored.
2632
2631
  *
2633
2632
  */
2634
2633
  static createEmbeddings(options) {
@@ -3679,7 +3678,7 @@ var Listings = class {
3679
3678
  * Update a listing
3680
3679
  *
3681
3680
  * Change the title or description, or pause and resume the listing.
3682
- * `state: suspended` stops the listing for every installing project at once; their installs are kept. `state: listed` resumes a listing you suspended, provided naturali had listed it; nobody reinstalls. A listing naturali suspended cannot be resumed here, and an invalid move answers `409 invalid_listing_state`.
3681
+ * `state: suspended` stops a `listed` listing for every installing project at once; their installs are kept. `state: listed` resumes a listing you suspended, provided naturali had listed it; nobody reinstalls. A listing naturali suspended cannot be resumed here, and an invalid move answers `409 invalid_listing_state`.
3683
3682
  *
3684
3683
  */
3685
3684
  static updateListing(options) {
@@ -4283,8 +4282,8 @@ var Orchestrations = class {
4283
4282
  /**
4284
4283
  * Get orchestration queue stats
4285
4284
  *
4286
- * Returns a point-in-time snapshot of the orchestration run queue: how many tasks are waiting to be claimed (`queue_depth`), how many are currently claimed with a valid lease (`claimed_tasks`), the age of the oldest waiting task, recent claim-latency percentiles over a rolling in-process window. The per-project breakdown is listed by `GET /v1/projects/{project_id}/orchestrations/queue/stats/projects`. Intended for admin/operator policies; guarded by `orchestrations:GetQueueStats`.
4287
- * Every figure is scoped to what the caller may see. A project-scoped caller gets `queue_depth` and `claimed_tasks` summed over their own projects, and `null` for `oldest_queued_age_seconds` and the `claim_latency_ms` percentiles — both describe the whole deployment and cannot be narrowed, so they are withheld rather than approximated. An unrestricted caller (the action granted on every project) gets the deployment-wide figures.
4285
+ * Returns a point-in-time snapshot of the orchestration run queue: how many tasks are waiting to be claimed (`queue_depth`), how many are currently claimed with a valid lease (`claimed_tasks`), the age of the oldest waiting task, recent claim-latency percentiles over a rolling in-process window. The per-project breakdown is listed by `GET /v1/projects/{project_id}/orchestrations/queue/stats/projects`.
4286
+ * Every figure is scoped to what the caller may see. A project-scoped caller gets `queue_depth` and `claimed_tasks` summed over their own projects, and `null` for `oldest_queued_age_seconds` and the `claim_latency_ms` percentiles — both describe the whole deployment and cannot be narrowed, so they are withheld rather than approximated.
4288
4287
  *
4289
4288
  */
4290
4289
  static getQueueStats(options) {
@@ -4305,7 +4304,7 @@ var Orchestrations = class {
4305
4304
  /**
4306
4305
  * List the projects with queued orchestration work
4307
4306
  *
4308
- * One row per project with any queued or claimed task, ordered by project ID: the per-project breakdown of `GET /v1/projects/{project_id}/orchestrations/queue/stats`. A project-scoped caller sees its own projects only. Guarded by `orchestrations:GetQueueStats`.
4307
+ * One row per project with any queued or claimed task, ordered by project ID: the per-project breakdown of `GET /v1/projects/{project_id}/orchestrations/queue/stats`. A project-scoped caller sees its own projects only.
4309
4308
  *
4310
4309
  */
4311
4310
  static listQueueStatsProjects(options) {
@@ -5874,7 +5873,7 @@ var Triggers = class {
5874
5873
  /**
5875
5874
  * Update a trigger
5876
5875
  *
5877
- * Updates an existing trigger's configuration. The type is immutable. Changing `target_type` or `target_id` re-checks the target-start action (`orchestrations:StartRun`, `agents:CreateAgentGeneration` or `tools:CallTool`) against the resulting target, because a firing runs with the trigger creator's authority rather than the updater's. A caller who could not start the new target is answered `403` and the trigger keeps the target it had.
5876
+ * Updates an existing trigger's configuration. The type is immutable. Changing `target_type` or `target_id` re-checks that the caller may start the resulting target, because a firing runs with the trigger creator's authority rather than the updater's. A caller who could not start the new target is answered `403` and the trigger keeps the target it had.
5878
5877
  *
5879
5878
  */
5880
5879
  static updateTrigger(options) {