@naturali/sdk 0.181.0 → 0.182.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
@@ -1496,6 +1496,7 @@ var AiProviders = class {
1496
1496
  * Listing resolves credentials the same way generation does, so a record that can generate can list. The API-key types (`openai`, `groq`, `xai`, `gateway`, `custom`, `anthropic`, `google`) use the record's linked secret and cannot list without one. `bedrock` and `vertex` use the linked secret — IAM keys or a Bedrock API key, a Google service-account key. A record with no `secret_id` would fall back to the server's own credentials (the AWS default credential chain, Google Application Default Credentials); it can list only on a deployment that allows a record to use them, and returns `400 AI_PROVIDER_MISCONFIGURED` otherwise.
1497
1497
  * A Vertex record needs no `config.project` when its secret is a service-account key, since the key file names its own project. A Vertex record in express mode (API key) cannot list at all: the publisher-model listing rejects API keys and needs a credential that asserts a principal, so it returns `400 MODEL_LISTING_UNSUPPORTED`.
1498
1498
  * The Vertex answer is the publisher catalogue the record's `config.location` region serves. The project behind the credential is billed and quota'd for the call but does not filter the result, so a listed model may still be unavailable to that project at generation time.
1499
+ * The provider answers its whole catalogue in one call; `q`, `limit` and `offset` narrow and page what it returned. A request without `limit` gets the first 50 models.
1499
1500
  *
1500
1501
  */
1501
1502
  static listAiProviderModels(options) {
@@ -3274,6 +3275,18 @@ var Generations = class {
3274
3275
  });
3275
3276
  }
3276
3277
  /**
3278
+ * List the memory writes a generation made
3279
+ *
3280
+ * Every memory write this turn made, oldest first: each memory rule's firings and the agent's own `write_memory` calls alike. The rows behind the generation's per-rule `extraction` counts. Reading them is reading the generation (`generations:GetGeneration`).
3281
+ *
3282
+ */
3283
+ static listGenerationMemoryAssertions(options) {
3284
+ return (options.client ?? client).get({
3285
+ url: "/v1/projects/{project_id}/generations/{generation_id}/memory-assertions",
3286
+ ...options
3287
+ });
3288
+ }
3289
+ /**
3277
3290
  * Get a generation's transcript
3278
3291
  *
3279
3292
  * Returns one generation's turn read back as an ordered sequence of steps: what it was asked, each model step with its tool calls and results, and how it ended.
@@ -4222,8 +4235,8 @@ var Orchestrations = class {
4222
4235
  /**
4223
4236
  * Get orchestration queue stats
4224
4237
  *
4225
- * 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, and a per-project breakdown. Intended for admin/operator policies; guarded by `orchestrations:GetQueueStats`.
4226
- * Every figure is scoped to what the caller may see. A project-scoped caller gets `per_project` for their own projects only, `queue_depth` and `claimed_tasks` summed over those same 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.
4238
+ * 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`.
4239
+ * 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.
4227
4240
  *
4228
4241
  */
4229
4242
  static getQueueStats(options) {
@@ -4242,6 +4255,27 @@ var Orchestrations = class {
4242
4255
  });
4243
4256
  }
4244
4257
  /**
4258
+ * List the projects with queued orchestration work
4259
+ *
4260
+ * 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`.
4261
+ *
4262
+ */
4263
+ static listQueueStatsProjects(options) {
4264
+ return (options.client ?? client).get({
4265
+ security: [{
4266
+ key: "bearerAuth",
4267
+ scheme: "bearer",
4268
+ type: "http"
4269
+ }, {
4270
+ key: "oauth2",
4271
+ scheme: "bearer",
4272
+ type: "http"
4273
+ }],
4274
+ url: "/v1/projects/{project_id}/orchestrations/queue/stats/projects",
4275
+ ...options
4276
+ });
4277
+ }
4278
+ /**
4245
4279
  * Delete an orchestration
4246
4280
  *
4247
4281
  * Deletes an orchestration definition and all its runs.
@@ -4415,6 +4449,17 @@ var Orchestrations = class {
4415
4449
  ...options
4416
4450
  });
4417
4451
  }
4452
+ /**
4453
+ * List a run's node executions
4454
+ *
4455
+ * The run's per-node execution records, oldest first: one per node attempt, retries and skipped nodes included. Each captures the resolved input, output, status and error of that attempt — the orchestration analogue of an LLM trace. Reading them is reading the run (`orchestrations:GetRun`).
4456
+ */
4457
+ static listOrchestrationRunNodeExecutions(options) {
4458
+ return (options.client ?? client).get({
4459
+ url: "/v1/projects/{project_id}/orchestration-runs/{orchestration_run_id}/node-executions",
4460
+ ...options
4461
+ });
4462
+ }
4418
4463
  };
4419
4464
  var Projects = class {
4420
4465
  /**
@@ -5236,7 +5281,7 @@ var Traces = class {
5236
5281
  /**
5237
5282
  * Get trace tree
5238
5283
  *
5239
- * Returns the full execution tree rooted at the given trace (or its root if the given trace is a child). Each node represents one agent's execution session. The `children` array contains traces triggered by sub-agent tool calls from that trace.
5284
+ * Returns the full execution tree rooted at the given trace (or its root if the given trace is a child). Each node represents one agent's execution session. The `children` array contains traces triggered by sub-agent tool calls from that trace. A node's generations are listed by `GET /v1/projects/{project_id}/generations?trace_id=`, and a node's direct children page by `GET /v1/projects/{project_id}/traces?parent_trace_id=`.
5240
5285
  *
5241
5286
  */
5242
5287
  static getTraceTree(options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturali/sdk",
3
- "version": "0.181.0",
3
+ "version": "0.182.0",
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.181.0",
41
+ "@naturali/api": "0.182.0",
42
42
  "@ttoss/openapi-codegen": "^0.5.0",
43
43
  "@types/node": "^26.5.1",
44
44
  "tsdown": "^0.23.0",