@naturali/cli 0.58.0 → 0.59.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 +36 -10
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -14,7 +14,7 @@ var __exportAll = (all, no_symbols) => {
|
|
|
14
14
|
};
|
|
15
15
|
//#endregion
|
|
16
16
|
//#region package.json
|
|
17
|
-
var version = "0.
|
|
17
|
+
var version = "0.59.0";
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region ../sdk/src/generated/core/bodySerializer.gen.ts
|
|
20
20
|
const jsonBodySerializer = { bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value) };
|
|
@@ -1322,7 +1322,13 @@ var Generations = class {
|
|
|
1322
1322
|
/**
|
|
1323
1323
|
* Run an agent generation
|
|
1324
1324
|
*
|
|
1325
|
-
* Sends messages to the agent, resolves its tools, and runs the model loop.
|
|
1325
|
+
* Sends messages to the agent, resolves its tools, and runs the model loop.
|
|
1326
|
+
*
|
|
1327
|
+
* Background by default: this returns `202` immediately with a `generation_id`, and the turn runs on. Poll [`GET /v1/projects/{project_id}/generations/{generation_id}`](/docs/api/generations/get-generation) until its `status` leaves `in_progress`.
|
|
1328
|
+
*
|
|
1329
|
+
* Pass `?wait=true` to block instead and receive the turn itself — 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`.
|
|
1330
|
+
*
|
|
1331
|
+
* With `stream: true` the response is a Server-Sent Events stream (Content-Type text/event-stream) proxied from the runtime. A stream holds the request open by definition, so it always waits; combining it with an explicit `wait=false` is a `400`.
|
|
1326
1332
|
*
|
|
1327
1333
|
*/
|
|
1328
1334
|
static createGeneration(options) {
|
|
@@ -1994,7 +2000,13 @@ var Sessions = class {
|
|
|
1994
2000
|
/**
|
|
1995
2001
|
* Generate a response
|
|
1996
2002
|
*
|
|
1997
|
-
* Runs the agent over the session's accumulated messages
|
|
2003
|
+
* Runs the agent over the session's accumulated messages.
|
|
2004
|
+
*
|
|
2005
|
+
* Background by default: this returns `202` immediately and the turn runs on. The reply lands in the transcript, so poll [`GET /v1/projects/{project_id}/agents/{agent_id}/sessions/{session_id}/messages`](/docs/api/sessions/list-session-messages) for the assistant message, or read the session for its `status`.
|
|
2006
|
+
*
|
|
2007
|
+
* Pass `?wait=true` to block instead and receive the turn itself: `status` is `completed` with the assistant `message`, or `requires_action` with the pending `required_action` tool calls.
|
|
2008
|
+
*
|
|
2009
|
+
* `model` overrides the agent's default model for this turn only.
|
|
1998
2010
|
*
|
|
1999
2011
|
*/
|
|
2000
2012
|
static generateSessionResponse(options) {
|
|
@@ -4908,11 +4920,11 @@ const routes = {
|
|
|
4908
4920
|
"create-generation": {
|
|
4909
4921
|
serviceClass: "Generations",
|
|
4910
4922
|
operationId: "createGeneration",
|
|
4911
|
-
description: "Sends messages to the agent, resolves its tools, and runs the model loop.
|
|
4923
|
+
description: "Sends messages to the agent, resolves its tools, and runs the model loop. Background by default: this returns `202` immediately with a `generation_id`, and the turn runs on. Poll [`GET /v1/projects/{project_id}/generations/{generation_id}`](/docs/api/generations/get-generation) until its `status` leaves `in_progress`. Pass `?wait=true` to block instead and receive the turn itself — 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. A stream holds the request open by definition, so it always waits; combining it with an explicit `wait=false` is a `400`.",
|
|
4912
4924
|
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/generations",
|
|
4913
4925
|
httpMethod: "post",
|
|
4914
4926
|
pathParams: ["project_id", "agent_id"],
|
|
4915
|
-
queryParams: [],
|
|
4927
|
+
queryParams: ["wait"],
|
|
4916
4928
|
flags: [
|
|
4917
4929
|
{
|
|
4918
4930
|
"name": "project_id",
|
|
@@ -4928,6 +4940,13 @@ const routes = {
|
|
|
4928
4940
|
"type": "string",
|
|
4929
4941
|
"in": "path"
|
|
4930
4942
|
},
|
|
4943
|
+
{
|
|
4944
|
+
"name": "wait",
|
|
4945
|
+
"description": "When omitted or `false` (the default), the generation runs in the background and this returns `202` with a `generation_id` to poll. Pass `true` to block until the turn settles and receive it inline.",
|
|
4946
|
+
"required": false,
|
|
4947
|
+
"type": "boolean",
|
|
4948
|
+
"in": "query"
|
|
4949
|
+
},
|
|
4931
4950
|
{
|
|
4932
4951
|
"name": "messages",
|
|
4933
4952
|
"description": "The conversation to run the model turn over.",
|
|
@@ -6635,7 +6654,7 @@ const routes = {
|
|
|
6635
6654
|
},
|
|
6636
6655
|
{
|
|
6637
6656
|
"name": "tool_context",
|
|
6638
|
-
"description": "
|
|
6657
|
+
"description": "Context forwarded to every `http`/`mcp` tool call made during the session or generation: each entry is sent as an `X-Naturali-Context-<key>` request header, so a per-user credential can reach a tool endpoint without being written into the prompt.\n\nA key becomes an HTTP header name verbatim — no character is re-cased, so `ocaToken` and `oca_token` are two different keys — and must contain only letters, digits and `!#$%&'*+-.^_`|~`; two keys that differ only in case are rejected, since HTTP folds them into one. To land a value in a header the target already expects (usually `Authorization`), have the tool declare it with a `{{context:<key>}}` reference in its own `headers`, and set the tool's `context_keys` so the value reaches that tool alone.\n",
|
|
6639
6658
|
"required": false,
|
|
6640
6659
|
"type": "object",
|
|
6641
6660
|
"in": "body"
|
|
@@ -6792,7 +6811,7 @@ const routes = {
|
|
|
6792
6811
|
},
|
|
6793
6812
|
{
|
|
6794
6813
|
"name": "tool_context",
|
|
6795
|
-
"description": "
|
|
6814
|
+
"description": "Context forwarded to every `http`/`mcp` tool call made during the session or generation: each entry is sent as an `X-Naturali-Context-<key>` request header, so a per-user credential can reach a tool endpoint without being written into the prompt.\n\nA key becomes an HTTP header name verbatim — no character is re-cased, so `ocaToken` and `oca_token` are two different keys — and must contain only letters, digits and `!#$%&'*+-.^_`|~`; two keys that differ only in case are rejected, since HTTP folds them into one. To land a value in a header the target already expects (usually `Authorization`), have the tool declare it with a `{{context:<key>}}` reference in its own `headers`, and set the tool's `context_keys` so the value reaches that tool alone.\n",
|
|
6796
6815
|
"required": false,
|
|
6797
6816
|
"type": "object",
|
|
6798
6817
|
"in": "body"
|
|
@@ -6809,7 +6828,7 @@ const routes = {
|
|
|
6809
6828
|
"generate-session-response": {
|
|
6810
6829
|
serviceClass: "Sessions",
|
|
6811
6830
|
operationId: "generateSessionResponse",
|
|
6812
|
-
description: "Runs the agent over the session's accumulated messages
|
|
6831
|
+
description: "Runs the agent over the session's accumulated messages. Background by default: this returns `202` immediately and the turn runs on. The reply lands in the transcript, so poll [`GET /v1/projects/{project_id}/agents/{agent_id}/sessions/{session_id}/messages`](/docs/api/sessions/list-session-messages) for the assistant message, or read the session for its `status`. Pass `?wait=true` to block instead and receive the turn itself: `status` is `completed` with the assistant `message`, or `requires_action` with the pending `required_action` tool calls. `model` overrides the agent's default model for this turn only.",
|
|
6813
6832
|
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/sessions",
|
|
6814
6833
|
httpMethod: "post",
|
|
6815
6834
|
pathParams: [
|
|
@@ -6817,7 +6836,7 @@ const routes = {
|
|
|
6817
6836
|
"agent_id",
|
|
6818
6837
|
"session_id"
|
|
6819
6838
|
],
|
|
6820
|
-
queryParams: [],
|
|
6839
|
+
queryParams: ["wait"],
|
|
6821
6840
|
flags: [
|
|
6822
6841
|
{
|
|
6823
6842
|
"name": "project_id",
|
|
@@ -6840,6 +6859,13 @@ const routes = {
|
|
|
6840
6859
|
"type": "string",
|
|
6841
6860
|
"in": "path"
|
|
6842
6861
|
},
|
|
6862
|
+
{
|
|
6863
|
+
"name": "wait",
|
|
6864
|
+
"description": "When omitted or `false` (the default), the turn runs in the background and this returns `202`; its reply lands in the session transcript. Pass `true` to block until the turn settles and receive it inline.",
|
|
6865
|
+
"required": false,
|
|
6866
|
+
"type": "boolean",
|
|
6867
|
+
"in": "query"
|
|
6868
|
+
},
|
|
6843
6869
|
{
|
|
6844
6870
|
"name": "model",
|
|
6845
6871
|
"description": "Overrides the agent's default model for this turn only.",
|
|
@@ -6849,7 +6875,7 @@ const routes = {
|
|
|
6849
6875
|
},
|
|
6850
6876
|
{
|
|
6851
6877
|
"name": "tool_context",
|
|
6852
|
-
"description": "
|
|
6878
|
+
"description": "Context forwarded to every `http`/`mcp` tool call made during the session or generation: each entry is sent as an `X-Naturali-Context-<key>` request header, so a per-user credential can reach a tool endpoint without being written into the prompt.\n\nA key becomes an HTTP header name verbatim — no character is re-cased, so `ocaToken` and `oca_token` are two different keys — and must contain only letters, digits and `!#$%&'*+-.^_`|~`; two keys that differ only in case are rejected, since HTTP folds them into one. To land a value in a header the target already expects (usually `Authorization`), have the tool declare it with a `{{context:<key>}}` reference in its own `headers`, and set the tool's `context_keys` so the value reaches that tool alone.\n",
|
|
6853
6879
|
"required": false,
|
|
6854
6880
|
"type": "object",
|
|
6855
6881
|
"in": "body"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.59.0",
|
|
4
4
|
"description": "Command-line interface for the naturali.ai API, generated from its OpenAPI specs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"tsx": "^4.23.1",
|
|
31
31
|
"typescript": "~6.0.3",
|
|
32
32
|
"vitest": "^4.1.10",
|
|
33
|
-
"@naturali/sdk": "0.
|
|
33
|
+
"@naturali/sdk": "0.59.0"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"generate": "tsx scripts/generate.ts",
|