@naturali/cli 0.45.0 → 0.46.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.
Files changed (2) hide show
  1. package/dist/index.mjs +98 -1
  2. 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.45.0";
17
+ var version = "0.46.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) };
@@ -1742,6 +1742,18 @@ var Sessions = class {
1742
1742
  });
1743
1743
  }
1744
1744
  /**
1745
+ * Read the session's transcript
1746
+ *
1747
+ * The session's messages, oldest first. naturali stores no message bodies — the dialogue lives in the backing runtime conversation the session 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. This is the one way to read back a session opened directly through this API (no [Channels](/docs/modules/channels) conversation involved) — see `GET .../channels/{channel_id}/conversations/{conversation_id}/messages` for the channel-backed equivalent.
1748
+ *
1749
+ */
1750
+ static listSessionMessages(options) {
1751
+ return (options.client ?? client).get({
1752
+ url: "/v1/projects/{project_id}/agents/{agent_id}/sessions/{session_id}/messages",
1753
+ ...options
1754
+ });
1755
+ }
1756
+ /**
1745
1757
  * Add a message
1746
1758
  *
1747
1759
  * Appends a user message to the session — plain `message` text or a `document_id`, exactly one of the two. `idempotency_key` makes the append safe to retry: a repeat with the same key returns the original message (HTTP 200) and triggers no new work. When the session has `auto_generate` on, the response is the agent's reply (a Generation shape) instead of the saved message.
@@ -1989,6 +2001,19 @@ var Traces = class {
1989
2001
  ...options
1990
2002
  });
1991
2003
  }
2004
+ /**
2005
+ * Get a trace's steps
2006
+ *
2007
+ * Returns the trace's step payload: every step of the execution's model loop, exactly as the runtime recorded it — tool calls, their arguments, results and cost — passed through unreshaped rather than mapped to a narrower contract, since the payload is the runtime's own step shape.
2008
+ * Saving the payload is fire-and-forget on the runtime, so a trace can report `has_steps: false` for a short window after it finishes; this route 404s with `steps_not_available` during that window rather than returning an empty list, so a caller does not mistake "not saved yet" for "no steps ran".
2009
+ *
2010
+ */
2011
+ static getTraceSteps(options) {
2012
+ return (options.client ?? client).get({
2013
+ url: "/v1/projects/{project_id}/traces/{trace_id}/steps",
2014
+ ...options
2015
+ });
2016
+ }
1992
2017
  };
1993
2018
  var Webhooks = class {
1994
2019
  /**
@@ -5591,6 +5616,56 @@ const routes = {
5591
5616
  }
5592
5617
  ]
5593
5618
  },
5619
+ "list-session-messages": {
5620
+ serviceClass: "Sessions",
5621
+ operationId: "listSessionMessages",
5622
+ description: "The session's messages, oldest first. naturali stores no message bodies — the dialogue lives in the backing runtime conversation the session 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. This is the one way to read back a session opened directly through this API (no [Channels](/docs/modules/channels) conversation involved) — see `GET .../channels/{channel_id}/conversations/{conversation_id}/messages` for the channel-backed equivalent.",
5623
+ moduleDocsUrl: "https://docs.naturali.ai/docs/modules/sessions",
5624
+ httpMethod: "get",
5625
+ pathParams: [
5626
+ "project_id",
5627
+ "agent_id",
5628
+ "session_id"
5629
+ ],
5630
+ queryParams: ["limit", "offset"],
5631
+ flags: [
5632
+ {
5633
+ "name": "project_id",
5634
+ "description": "Project public ID (proj_ prefix).",
5635
+ "required": true,
5636
+ "type": "string",
5637
+ "in": "path"
5638
+ },
5639
+ {
5640
+ "name": "agent_id",
5641
+ "description": "Agent public ID (agent_ prefix).",
5642
+ "required": true,
5643
+ "type": "string",
5644
+ "in": "path"
5645
+ },
5646
+ {
5647
+ "name": "session_id",
5648
+ "description": "Session public ID (session_ prefix).",
5649
+ "required": true,
5650
+ "type": "string",
5651
+ "in": "path"
5652
+ },
5653
+ {
5654
+ "name": "limit",
5655
+ "description": "Maximum messages per page.",
5656
+ "required": false,
5657
+ "type": "integer",
5658
+ "in": "query"
5659
+ },
5660
+ {
5661
+ "name": "offset",
5662
+ "description": "Number of messages to skip.",
5663
+ "required": false,
5664
+ "type": "integer",
5665
+ "in": "query"
5666
+ }
5667
+ ]
5668
+ },
5594
5669
  "add-session-message": {
5595
5670
  serviceClass: "Sessions",
5596
5671
  operationId: "addSessionMessage",
@@ -6364,6 +6439,28 @@ const routes = {
6364
6439
  }
6365
6440
  ]
6366
6441
  },
6442
+ "get-trace-steps": {
6443
+ serviceClass: "Traces",
6444
+ operationId: "getTraceSteps",
6445
+ description: "Returns the trace's step payload: every step of the execution's model loop, exactly as the runtime recorded it — tool calls, their arguments, results and cost — passed through unreshaped rather than mapped to a narrower contract, since the payload is the runtime's own step shape. Saving the payload is fire-and-forget on the runtime, so a trace can report `has_steps: false` for a short window after it finishes; this route 404s with `steps_not_available` during that window rather than returning an empty list, so a caller does not mistake \"not saved yet\" for \"no steps ran\".",
6446
+ moduleDocsUrl: "https://docs.naturali.ai/docs/modules/traces",
6447
+ httpMethod: "get",
6448
+ pathParams: ["project_id", "trace_id"],
6449
+ queryParams: [],
6450
+ flags: [{
6451
+ "name": "project_id",
6452
+ "description": "Project public ID (proj_ prefix).",
6453
+ "required": true,
6454
+ "type": "string",
6455
+ "in": "path"
6456
+ }, {
6457
+ "name": "trace_id",
6458
+ "description": "Trace public ID (trace_ prefix).",
6459
+ "required": true,
6460
+ "type": "string",
6461
+ "in": "path"
6462
+ }]
6463
+ },
6367
6464
  "list-webhooks": {
6368
6465
  serviceClass: "Webhooks",
6369
6466
  operationId: "listWebhooks",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturali/cli",
3
- "version": "0.45.0",
3
+ "version": "0.46.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.45.0"
33
+ "@naturali/sdk": "0.46.0"
34
34
  },
35
35
  "scripts": {
36
36
  "generate": "tsx scripts/generate.ts",