@soat/sdk 0.72.0 → 0.74.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
@@ -1038,6 +1038,7 @@ var AiProviders = class {
1038
1038
  * 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.
1039
1039
  * 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`.
1040
1040
  * 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.
1041
+ * 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.
1041
1042
  *
1042
1043
  */
1043
1044
  static listAiProviderModels(options) {
@@ -1528,7 +1529,7 @@ var Deciders = class {
1528
1529
  /**
1529
1530
  * Create a decider
1530
1531
  *
1531
- * Creates a decider at version 1: a named question set and the backend that answers it, exactly one of `agent_id` and `tool_id`. Every question declares a finite answer space, validated here. The backend must be in the decider's project. An agent must carry no tool surface — no tool binding left active by `active_tool_ids` and no `knowledge_config.write_memory_store_id` — or the create is refused with `400 DECIDER_AGENT_NOT_TOOL_LESS`. A tool must be `http` or `pipeline` and must not pin `state` or `questions` in its `preset_parameters`, or the create is refused with `400 DECIDER_TOOL_NOT_CALLABLE`. A duplicate `name` in the project is `409 NAME_CONFLICT`.
1532
+ * Creates a decider at version 1: a named question set and the backend that answers it, exactly one of `agent_id` and `tool_id`. Every question declares a finite answer space, validated here. The backend must be in the decider's project. An agent must carry no tool surface — no tool binding left active by `active_tool_ids` and no `knowledge_config.write_memory_store_id` — or the create is refused with `400 DECIDER_AGENT_NOT_TOOL_LESS`. A tool must be `http` or `pipeline` and must not pin `input` or `questions` in its `preset_parameters`, or the create is refused with `400 DECIDER_TOOL_NOT_CALLABLE`. A duplicate `name` in the project is `409 NAME_CONFLICT`.
1532
1533
  */
1533
1534
  static createDecider(options) {
1534
1535
  return (options.client ?? client).post({
@@ -1617,11 +1618,11 @@ var Deciders = class {
1617
1618
  /**
1618
1619
  * Request a decision
1619
1620
  *
1620
- * Evaluates the decider against `state` and records the decision. The questions come from the decider, never from the request, so a call site can only supply what is judged.
1621
+ * Evaluates the decider against `input` and records the decision. The questions come from the decider, never from the request, so a call site can only supply what is judged. To send the questions with the request, use `POST /api/v1/decisions`.
1621
1622
  *
1622
1623
  * Everything that can refuse the request is checked before the decision is written, so a refusal is a `4xx` and never a polled failure: the agent's tool surface (`400 DECIDER_AGENT_NOT_TOOL_LESS`), a tool that cannot answer (`400 DECIDER_TOOL_NOT_CALLABLE`), a paused project (`409 PROJECT_PAUSED`) and, for an agent, quota admission (`429 QUOTA_EXCEEDED`).
1623
1624
  *
1624
- * A tool backend is called with `{ state, questions }` and must answer `{ answers: { <question id>: { choice | score | value, probabilities? } } }`; an answer outside that contract fails the decision with `DECISION_ANSWER_INVALID`.
1625
+ * A tool backend is called with `{ input, questions }` and must answer `{ answers: [{ name, probability | choice | score, probabilities?, confidence? }] }`, the request and response of OpenAI's Decisions API; an answer outside that contract fails the decision with `DECISION_ANSWER_INVALID`.
1625
1626
  *
1626
1627
  * With `wait: false`, the default, the answer is `201` with the decision `queued`; poll `GET /api/v1/decisions/{decision_id}` or subscribe to `decisions.completed` and `decisions.failed`. With `wait: true` it is `201` with the decision settled.
1627
1628
  */
@@ -1647,6 +1648,23 @@ var Deciders = class {
1647
1648
  });
1648
1649
  }
1649
1650
  /**
1651
+ * Request a decision with inline questions
1652
+ *
1653
+ * Evaluates `questions` sent with the request against `input`, answered by the agent or tool the request names (exactly one of `agent_id` and `tool_id`, held to the same rules as a decider's backend), and records the decision with its questions. The request and answers are those of OpenAI's Decisions API, with the backend in place of `model`.
1654
+ *
1655
+ * No decider names the questions, so the decision carries them in `questions` and has no `decider_id` or `decider_version`. Admission, `wait` and the tool contract are those of `POST /api/v1/deciders/{decider_id}/decisions`.
1656
+ */
1657
+ static createInlineDecision(options) {
1658
+ return (options.client ?? client).post({
1659
+ url: "/api/v1/decisions",
1660
+ ...options,
1661
+ headers: {
1662
+ "Content-Type": "application/json",
1663
+ ...options.headers
1664
+ }
1665
+ });
1666
+ }
1667
+ /**
1650
1668
  * Get a decision
1651
1669
  *
1652
1670
  * Returns a decision. Poll it after a `wait: false` request until `status` is `completed` or `failed`.
@@ -2690,6 +2708,18 @@ var Generations = class {
2690
2708
  });
2691
2709
  }
2692
2710
  /**
2711
+ * List the memory writes a generation made
2712
+ *
2713
+ * 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`).
2714
+ *
2715
+ */
2716
+ static listGenerationMemoryAssertions(options) {
2717
+ return (options.client ?? client).get({
2718
+ url: "/api/v1/generations/{generation_id}/memory-assertions",
2719
+ ...options
2720
+ });
2721
+ }
2722
+ /**
2693
2723
  * Get a generation's transcript
2694
2724
  *
2695
2725
  * 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.
@@ -3440,8 +3470,8 @@ var Orchestrations = class {
3440
3470
  /**
3441
3471
  * Get orchestration queue stats
3442
3472
  *
3443
- * 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`.
3444
- * 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.
3473
+ * 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 /api/v1/orchestrations/queue/stats/projects`. Intended for admin/operator policies; guarded by `orchestrations:GetQueueStats`.
3474
+ * 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.
3445
3475
  *
3446
3476
  */
3447
3477
  static getQueueStats(options) {
@@ -3455,6 +3485,22 @@ var Orchestrations = class {
3455
3485
  });
3456
3486
  }
3457
3487
  /**
3488
+ * List the projects with queued orchestration work
3489
+ *
3490
+ * One row per project with any queued or claimed task, ordered by project ID: the per-project breakdown of `GET /api/v1/orchestrations/queue/stats`. A project-scoped caller sees its own projects only. Guarded by `orchestrations:GetQueueStats`.
3491
+ *
3492
+ */
3493
+ static listQueueStatsProjects(options) {
3494
+ return (options?.client ?? client).get({
3495
+ security: [{
3496
+ scheme: "bearer",
3497
+ type: "http"
3498
+ }],
3499
+ url: "/api/v1/orchestrations/queue/stats/projects",
3500
+ ...options
3501
+ });
3502
+ }
3503
+ /**
3458
3504
  * Delete an orchestration
3459
3505
  *
3460
3506
  * Deletes an orchestration definition and all its runs.
@@ -3628,6 +3674,17 @@ var Orchestrations = class {
3628
3674
  ...options
3629
3675
  });
3630
3676
  }
3677
+ /**
3678
+ * List a run's node executions
3679
+ *
3680
+ * 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`).
3681
+ */
3682
+ static listOrchestrationRunNodeExecutions(options) {
3683
+ return (options.client ?? client).get({
3684
+ url: "/api/v1/orchestration-runs/{orchestration_run_id}/node-executions",
3685
+ ...options
3686
+ });
3687
+ }
3631
3688
  };
3632
3689
  var Policies = class {
3633
3690
  /**
@@ -4539,7 +4596,7 @@ var Traces = class {
4539
4596
  /**
4540
4597
  * Get trace tree
4541
4598
  *
4542
- * 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.
4599
+ * 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 /api/v1/generations?trace_id=`, and a node's direct children page by `GET /api/v1/traces?parent_trace_id=`.
4543
4600
  *
4544
4601
  */
4545
4602
  static getTraceTree(options) {