@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.cjs CHANGED
@@ -1497,6 +1497,7 @@ var AiProviders = class {
1497
1497
  * 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.
1498
1498
  * 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`.
1499
1499
  * 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.
1500
+ * 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.
1500
1501
  *
1501
1502
  */
1502
1503
  static listAiProviderModels(options) {
@@ -3275,6 +3276,18 @@ var Generations = class {
3275
3276
  });
3276
3277
  }
3277
3278
  /**
3279
+ * List the memory writes a generation made
3280
+ *
3281
+ * 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`).
3282
+ *
3283
+ */
3284
+ static listGenerationMemoryAssertions(options) {
3285
+ return (options.client ?? client).get({
3286
+ url: "/v1/projects/{project_id}/generations/{generation_id}/memory-assertions",
3287
+ ...options
3288
+ });
3289
+ }
3290
+ /**
3278
3291
  * Get a generation's transcript
3279
3292
  *
3280
3293
  * 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.
@@ -4223,8 +4236,8 @@ var Orchestrations = class {
4223
4236
  /**
4224
4237
  * Get orchestration queue stats
4225
4238
  *
4226
- * 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`.
4227
- * 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.
4239
+ * 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`.
4240
+ * 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.
4228
4241
  *
4229
4242
  */
4230
4243
  static getQueueStats(options) {
@@ -4243,6 +4256,27 @@ var Orchestrations = class {
4243
4256
  });
4244
4257
  }
4245
4258
  /**
4259
+ * List the projects with queued orchestration work
4260
+ *
4261
+ * 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`.
4262
+ *
4263
+ */
4264
+ static listQueueStatsProjects(options) {
4265
+ return (options.client ?? client).get({
4266
+ security: [{
4267
+ key: "bearerAuth",
4268
+ scheme: "bearer",
4269
+ type: "http"
4270
+ }, {
4271
+ key: "oauth2",
4272
+ scheme: "bearer",
4273
+ type: "http"
4274
+ }],
4275
+ url: "/v1/projects/{project_id}/orchestrations/queue/stats/projects",
4276
+ ...options
4277
+ });
4278
+ }
4279
+ /**
4246
4280
  * Delete an orchestration
4247
4281
  *
4248
4282
  * Deletes an orchestration definition and all its runs.
@@ -4416,6 +4450,17 @@ var Orchestrations = class {
4416
4450
  ...options
4417
4451
  });
4418
4452
  }
4453
+ /**
4454
+ * List a run's node executions
4455
+ *
4456
+ * 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`).
4457
+ */
4458
+ static listOrchestrationRunNodeExecutions(options) {
4459
+ return (options.client ?? client).get({
4460
+ url: "/v1/projects/{project_id}/orchestration-runs/{orchestration_run_id}/node-executions",
4461
+ ...options
4462
+ });
4463
+ }
4419
4464
  };
4420
4465
  var Projects = class {
4421
4466
  /**
@@ -5237,7 +5282,7 @@ var Traces = class {
5237
5282
  /**
5238
5283
  * Get trace tree
5239
5284
  *
5240
- * 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.
5285
+ * 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=`.
5241
5286
  *
5242
5287
  */
5243
5288
  static getTraceTree(options) {