@naturali/sdk 0.262.0 → 0.263.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.
package/dist/index.cjs CHANGED
@@ -2269,8 +2269,9 @@ var Conversations = class {
2269
2269
  * Generate the next message in a conversation
2270
2270
  *
2271
2271
  * Generates the next message using the specified actor's linked agent or chat.
2272
- * Background by default: returns `202 Accepted` immediately and the reply
2273
- * lands as a new ConversationMessage when it completes — poll
2272
+ * Background by default: returns `202 Accepted` with the generation's id
2273
+ * once its record exists, and the reply lands as a new ConversationMessage
2274
+ * when it completes — poll `GET /v1/projects/{project_id}/generations/{generation_id}` or
2274
2275
  * `GET /v1/projects/{project_id}/conversations/{conversation_id}/messages` for it.
2275
2276
  * Pass `?wait=true` to block and receive the result inline. On
2276
2277
  * `completed`, the reply is persisted as a new ConversationMessage
@@ -3315,7 +3316,7 @@ var Formations = class {
3315
3316
  /**
3316
3317
  * Plan a formation deployment
3317
3318
  *
3318
- * Computes a diff between the desired template and the current stack state without making any changes. Returns the list of planned actions.
3319
+ * Computes a diff between the desired template and the current stack state without making any changes. Returns the list of planned actions. With `formation_id`, a `{ "no_echo": true }` placeholder takes that formation's stored value, as on an update.
3319
3320
  *
3320
3321
  */
3321
3322
  static planFormation(options) {
@@ -3389,6 +3390,8 @@ var Formations = class {
3389
3390
  *
3390
3391
  * Applies a new template to the formation. Resources are created, updated, or deleted to reconcile the current state with the desired state.
3391
3392
  *
3393
+ * A template read back can be sent as read: each `{ "no_echo": true }` placeholder takes the stored value at its path, in a resource that then equals its deployed declaration, or the update is `400 VALIDATION_FAILED`.
3394
+ *
3392
3395
  * A **template-shape** error is refused with `400`. A **deploy** failure is not: the operation ran, so the formation is returned with `200` and `status: "failed"`, and `error` explains why. Read `status` — a `2xx` here means the deploy was attempted, not that it worked. The `naturali` CLI exits non-zero on that body so `update-formation && …` does not lie.
3393
3396
  *
3394
3397
  * A deploy that replaced a resource and could not delete the superseded one answers `status: "active"` with `error.code: "FORMATION_REPLACE_CLEANUP_FAILED"` — the desired state is realised, and `error.meta.failures` names every resource still live. The next deploy retries the disposal.
@@ -5708,7 +5711,7 @@ var Sessions = class {
5708
5711
  /**
5709
5712
  * Trigger agent generation
5710
5713
  *
5711
- * Triggers the agent to generate a response based on the current conversation. Background by default: returns `202 Accepted` immediately while the generation runs. Pass ?wait=true to block and receive the assistant reply (or a requires_action status if the agent needs client tool outputs) in the response.
5714
+ * Triggers the agent to generate a response based on the current conversation. Background by default: returns `202 Accepted` with the generation's id once its record exists. Pass ?wait=true to block and receive the assistant reply (or a requires_action status if the agent needs client tool outputs) in the response.
5712
5715
  *
5713
5716
  */
5714
5717
  static generateSessionResponse(options) {
package/dist/index.d.cts CHANGED
@@ -12623,7 +12623,7 @@ type CreateAgentGenerationData = {
12623
12623
  };
12624
12624
  query?: {
12625
12625
  /**
12626
- * When omitted or `false` (default), the generation runs in the background and `202 Accepted` is returned immediately with a `generation_id` to poll. Pass `true` to block until the generation settles and receive the result. Mutually exclusive with `stream: true`. A tool call, `builtin` or MCP, always waits.
12626
+ * When omitted or `false` (default), the generation runs in the background and `202 Accepted` is returned immediately with a `generation_id` to poll. Pass `true` to block until the generation settles and receive the result. Mutually exclusive with `stream: true`. A tool call, `builtin` or MCP, always waits. An agent's `builtin` call that is still waiting after the 5-minute tool-call timeout answers with the running generation (`status: running`, `generation_id`), and the generation's outcome is sent to that agent as a continuation once both have settled.
12627
12627
  */
12628
12628
  wait?: boolean;
12629
12629
  };
@@ -17439,11 +17439,13 @@ type GenerateConversationMessageResponses = {
17439
17439
  */
17440
17440
  200: GenerateConversationMessageResponse;
17441
17441
  /**
17442
- * Generation accepted and running in the background (default, when `wait` is omitted or `false`). The reply is persisted as a ConversationMessage when it completes.
17442
+ * Generation accepted and running in the background (default, when `wait` is omitted or `false`). The generation record already exists, so `generation_id` is pollable via `GET /v1/projects/{project_id}/generations/{generation_id}`; the reply is persisted as a ConversationMessage when it completes.
17443
17443
  */
17444
17444
  202: {
17445
17445
  status: 'accepted';
17446
17446
  conversation_id: string;
17447
+ generation_id: string;
17448
+ trace_id: string;
17447
17449
  };
17448
17450
  };
17449
17451
  type GenerateConversationMessageResponse2 = GenerateConversationMessageResponses[keyof GenerateConversationMessageResponses];
@@ -32653,11 +32655,13 @@ type GenerateSessionResponseResponses = {
32653
32655
  */
32654
32656
  200: GenerateConversationMessageResponse;
32655
32657
  /**
32656
- * Generation accepted and running in the background (default, when `wait` is omitted or `false`)
32658
+ * Generation accepted and running in the background (default, when `wait` is omitted or `false`). The generation record already exists: poll `GET /v1/projects/{project_id}/generations/{generation_id}` for it.
32657
32659
  */
32658
32660
  202: {
32659
- status?: 'accepted';
32660
- session_id?: string;
32661
+ status: 'accepted';
32662
+ session_id: string;
32663
+ generation_id: string;
32664
+ trace_id: string;
32661
32665
  };
32662
32666
  };
32663
32667
  type GenerateSessionResponseResponse = GenerateSessionResponseResponses[keyof GenerateSessionResponseResponses];
@@ -37714,8 +37718,9 @@ export declare class Conversations {
37714
37718
  * Generate the next message in a conversation
37715
37719
  *
37716
37720
  * Generates the next message using the specified actor's linked agent or chat.
37717
- * Background by default: returns `202 Accepted` immediately and the reply
37718
- * lands as a new ConversationMessage when it completes — poll
37721
+ * Background by default: returns `202 Accepted` with the generation's id
37722
+ * once its record exists, and the reply lands as a new ConversationMessage
37723
+ * when it completes — poll `GET /v1/projects/{project_id}/generations/{generation_id}` or
37719
37724
  * `GET /v1/projects/{project_id}/conversations/{conversation_id}/messages` for it.
37720
37725
  * Pass `?wait=true` to block and receive the result inline. On
37721
37726
  * `completed`, the reply is persisted as a new ConversationMessage
@@ -38253,7 +38258,7 @@ export declare class Formations {
38253
38258
  /**
38254
38259
  * Plan a formation deployment
38255
38260
  *
38256
- * Computes a diff between the desired template and the current stack state without making any changes. Returns the list of planned actions.
38261
+ * Computes a diff between the desired template and the current stack state without making any changes. Returns the list of planned actions. With `formation_id`, a `{ "no_echo": true }` placeholder takes that formation's stored value, as on an update.
38257
38262
  *
38258
38263
  */
38259
38264
  static planFormation<ThrowOnError extends boolean = false>(options: Options<PlanFormationData, ThrowOnError>): RequestResult<PlanFormationResponses, PlanFormationErrors, ThrowOnError>;
@@ -38294,6 +38299,8 @@ export declare class Formations {
38294
38299
  *
38295
38300
  * Applies a new template to the formation. Resources are created, updated, or deleted to reconcile the current state with the desired state.
38296
38301
  *
38302
+ * A template read back can be sent as read: each `{ "no_echo": true }` placeholder takes the stored value at its path, in a resource that then equals its deployed declaration, or the update is `400 VALIDATION_FAILED`.
38303
+ *
38297
38304
  * A **template-shape** error is refused with `400`. A **deploy** failure is not: the operation ran, so the formation is returned with `200` and `status: "failed"`, and `error` explains why. Read `status` — a `2xx` here means the deploy was attempted, not that it worked. The `naturali` CLI exits non-zero on that body so `update-formation && …` does not lie.
38298
38305
  *
38299
38306
  * A deploy that replaced a resource and could not delete the superseded one answers `status: "active"` with `error.code: "FORMATION_REPLACE_CLEANUP_FAILED"` — the desired state is realised, and `error.meta.failures` names every resource still live. The next deploy retries the disposal.
@@ -39494,7 +39501,7 @@ export declare class Sessions {
39494
39501
  /**
39495
39502
  * Trigger agent generation
39496
39503
  *
39497
- * Triggers the agent to generate a response based on the current conversation. Background by default: returns `202 Accepted` immediately while the generation runs. Pass ?wait=true to block and receive the assistant reply (or a requires_action status if the agent needs client tool outputs) in the response.
39504
+ * Triggers the agent to generate a response based on the current conversation. Background by default: returns `202 Accepted` with the generation's id once its record exists. Pass ?wait=true to block and receive the assistant reply (or a requires_action status if the agent needs client tool outputs) in the response.
39498
39505
  *
39499
39506
  */
39500
39507
  static generateSessionResponse<ThrowOnError extends boolean = false>(options: Options<GenerateSessionResponseData, ThrowOnError>): RequestResult<GenerateSessionResponseResponses, GenerateSessionResponseErrors, ThrowOnError>;
package/dist/index.d.mts CHANGED
@@ -12623,7 +12623,7 @@ type CreateAgentGenerationData = {
12623
12623
  };
12624
12624
  query?: {
12625
12625
  /**
12626
- * When omitted or `false` (default), the generation runs in the background and `202 Accepted` is returned immediately with a `generation_id` to poll. Pass `true` to block until the generation settles and receive the result. Mutually exclusive with `stream: true`. A tool call, `builtin` or MCP, always waits.
12626
+ * When omitted or `false` (default), the generation runs in the background and `202 Accepted` is returned immediately with a `generation_id` to poll. Pass `true` to block until the generation settles and receive the result. Mutually exclusive with `stream: true`. A tool call, `builtin` or MCP, always waits. An agent's `builtin` call that is still waiting after the 5-minute tool-call timeout answers with the running generation (`status: running`, `generation_id`), and the generation's outcome is sent to that agent as a continuation once both have settled.
12627
12627
  */
12628
12628
  wait?: boolean;
12629
12629
  };
@@ -17439,11 +17439,13 @@ type GenerateConversationMessageResponses = {
17439
17439
  */
17440
17440
  200: GenerateConversationMessageResponse;
17441
17441
  /**
17442
- * Generation accepted and running in the background (default, when `wait` is omitted or `false`). The reply is persisted as a ConversationMessage when it completes.
17442
+ * Generation accepted and running in the background (default, when `wait` is omitted or `false`). The generation record already exists, so `generation_id` is pollable via `GET /v1/projects/{project_id}/generations/{generation_id}`; the reply is persisted as a ConversationMessage when it completes.
17443
17443
  */
17444
17444
  202: {
17445
17445
  status: 'accepted';
17446
17446
  conversation_id: string;
17447
+ generation_id: string;
17448
+ trace_id: string;
17447
17449
  };
17448
17450
  };
17449
17451
  type GenerateConversationMessageResponse2 = GenerateConversationMessageResponses[keyof GenerateConversationMessageResponses];
@@ -32653,11 +32655,13 @@ type GenerateSessionResponseResponses = {
32653
32655
  */
32654
32656
  200: GenerateConversationMessageResponse;
32655
32657
  /**
32656
- * Generation accepted and running in the background (default, when `wait` is omitted or `false`)
32658
+ * Generation accepted and running in the background (default, when `wait` is omitted or `false`). The generation record already exists: poll `GET /v1/projects/{project_id}/generations/{generation_id}` for it.
32657
32659
  */
32658
32660
  202: {
32659
- status?: 'accepted';
32660
- session_id?: string;
32661
+ status: 'accepted';
32662
+ session_id: string;
32663
+ generation_id: string;
32664
+ trace_id: string;
32661
32665
  };
32662
32666
  };
32663
32667
  type GenerateSessionResponseResponse = GenerateSessionResponseResponses[keyof GenerateSessionResponseResponses];
@@ -37714,8 +37718,9 @@ export declare class Conversations {
37714
37718
  * Generate the next message in a conversation
37715
37719
  *
37716
37720
  * Generates the next message using the specified actor's linked agent or chat.
37717
- * Background by default: returns `202 Accepted` immediately and the reply
37718
- * lands as a new ConversationMessage when it completes — poll
37721
+ * Background by default: returns `202 Accepted` with the generation's id
37722
+ * once its record exists, and the reply lands as a new ConversationMessage
37723
+ * when it completes — poll `GET /v1/projects/{project_id}/generations/{generation_id}` or
37719
37724
  * `GET /v1/projects/{project_id}/conversations/{conversation_id}/messages` for it.
37720
37725
  * Pass `?wait=true` to block and receive the result inline. On
37721
37726
  * `completed`, the reply is persisted as a new ConversationMessage
@@ -38253,7 +38258,7 @@ export declare class Formations {
38253
38258
  /**
38254
38259
  * Plan a formation deployment
38255
38260
  *
38256
- * Computes a diff between the desired template and the current stack state without making any changes. Returns the list of planned actions.
38261
+ * Computes a diff between the desired template and the current stack state without making any changes. Returns the list of planned actions. With `formation_id`, a `{ "no_echo": true }` placeholder takes that formation's stored value, as on an update.
38257
38262
  *
38258
38263
  */
38259
38264
  static planFormation<ThrowOnError extends boolean = false>(options: Options<PlanFormationData, ThrowOnError>): RequestResult<PlanFormationResponses, PlanFormationErrors, ThrowOnError>;
@@ -38294,6 +38299,8 @@ export declare class Formations {
38294
38299
  *
38295
38300
  * Applies a new template to the formation. Resources are created, updated, or deleted to reconcile the current state with the desired state.
38296
38301
  *
38302
+ * A template read back can be sent as read: each `{ "no_echo": true }` placeholder takes the stored value at its path, in a resource that then equals its deployed declaration, or the update is `400 VALIDATION_FAILED`.
38303
+ *
38297
38304
  * A **template-shape** error is refused with `400`. A **deploy** failure is not: the operation ran, so the formation is returned with `200` and `status: "failed"`, and `error` explains why. Read `status` — a `2xx` here means the deploy was attempted, not that it worked. The `naturali` CLI exits non-zero on that body so `update-formation && …` does not lie.
38298
38305
  *
38299
38306
  * A deploy that replaced a resource and could not delete the superseded one answers `status: "active"` with `error.code: "FORMATION_REPLACE_CLEANUP_FAILED"` — the desired state is realised, and `error.meta.failures` names every resource still live. The next deploy retries the disposal.
@@ -39494,7 +39501,7 @@ export declare class Sessions {
39494
39501
  /**
39495
39502
  * Trigger agent generation
39496
39503
  *
39497
- * Triggers the agent to generate a response based on the current conversation. Background by default: returns `202 Accepted` immediately while the generation runs. Pass ?wait=true to block and receive the assistant reply (or a requires_action status if the agent needs client tool outputs) in the response.
39504
+ * Triggers the agent to generate a response based on the current conversation. Background by default: returns `202 Accepted` with the generation's id once its record exists. Pass ?wait=true to block and receive the assistant reply (or a requires_action status if the agent needs client tool outputs) in the response.
39498
39505
  *
39499
39506
  */
39500
39507
  static generateSessionResponse<ThrowOnError extends boolean = false>(options: Options<GenerateSessionResponseData, ThrowOnError>): RequestResult<GenerateSessionResponseResponses, GenerateSessionResponseErrors, ThrowOnError>;
package/dist/index.mjs CHANGED
@@ -2268,8 +2268,9 @@ var Conversations = class {
2268
2268
  * Generate the next message in a conversation
2269
2269
  *
2270
2270
  * Generates the next message using the specified actor's linked agent or chat.
2271
- * Background by default: returns `202 Accepted` immediately and the reply
2272
- * lands as a new ConversationMessage when it completes — poll
2271
+ * Background by default: returns `202 Accepted` with the generation's id
2272
+ * once its record exists, and the reply lands as a new ConversationMessage
2273
+ * when it completes — poll `GET /v1/projects/{project_id}/generations/{generation_id}` or
2273
2274
  * `GET /v1/projects/{project_id}/conversations/{conversation_id}/messages` for it.
2274
2275
  * Pass `?wait=true` to block and receive the result inline. On
2275
2276
  * `completed`, the reply is persisted as a new ConversationMessage
@@ -3314,7 +3315,7 @@ var Formations = class {
3314
3315
  /**
3315
3316
  * Plan a formation deployment
3316
3317
  *
3317
- * Computes a diff between the desired template and the current stack state without making any changes. Returns the list of planned actions.
3318
+ * Computes a diff between the desired template and the current stack state without making any changes. Returns the list of planned actions. With `formation_id`, a `{ "no_echo": true }` placeholder takes that formation's stored value, as on an update.
3318
3319
  *
3319
3320
  */
3320
3321
  static planFormation(options) {
@@ -3388,6 +3389,8 @@ var Formations = class {
3388
3389
  *
3389
3390
  * Applies a new template to the formation. Resources are created, updated, or deleted to reconcile the current state with the desired state.
3390
3391
  *
3392
+ * A template read back can be sent as read: each `{ "no_echo": true }` placeholder takes the stored value at its path, in a resource that then equals its deployed declaration, or the update is `400 VALIDATION_FAILED`.
3393
+ *
3391
3394
  * A **template-shape** error is refused with `400`. A **deploy** failure is not: the operation ran, so the formation is returned with `200` and `status: "failed"`, and `error` explains why. Read `status` — a `2xx` here means the deploy was attempted, not that it worked. The `naturali` CLI exits non-zero on that body so `update-formation && …` does not lie.
3392
3395
  *
3393
3396
  * A deploy that replaced a resource and could not delete the superseded one answers `status: "active"` with `error.code: "FORMATION_REPLACE_CLEANUP_FAILED"` — the desired state is realised, and `error.meta.failures` names every resource still live. The next deploy retries the disposal.
@@ -5707,7 +5710,7 @@ var Sessions = class {
5707
5710
  /**
5708
5711
  * Trigger agent generation
5709
5712
  *
5710
- * Triggers the agent to generate a response based on the current conversation. Background by default: returns `202 Accepted` immediately while the generation runs. Pass ?wait=true to block and receive the assistant reply (or a requires_action status if the agent needs client tool outputs) in the response.
5713
+ * Triggers the agent to generate a response based on the current conversation. Background by default: returns `202 Accepted` with the generation's id once its record exists. Pass ?wait=true to block and receive the assistant reply (or a requires_action status if the agent needs client tool outputs) in the response.
5711
5714
  *
5712
5715
  */
5713
5716
  static generateSessionResponse(options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturali/sdk",
3
- "version": "0.262.0",
3
+ "version": "0.263.1",
4
4
  "description": "TypeScript SDK for the naturali.ai API, generated from its OpenAPI specs",
5
5
  "keywords": [
6
6
  "naturali",
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "devDependencies": {
40
40
  "@hey-api/openapi-ts": "^0.99.0",
41
- "@naturali/api": "0.262.0",
41
+ "@naturali/api": "0.263.1",
42
42
  "@ttoss/openapi-codegen": "^0.10.1",
43
43
  "@types/node": "^26.5.1",
44
44
  "tsdown": "^0.23.0",