@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 +63 -6
- package/dist/index.d.cts +532 -202
- package/dist/index.d.mts +532 -202
- package/dist/index.mjs +63 -6
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1037,6 +1037,7 @@ var AiProviders = class {
|
|
|
1037
1037
|
* 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.
|
|
1038
1038
|
* 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`.
|
|
1039
1039
|
* 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.
|
|
1040
|
+
* 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.
|
|
1040
1041
|
*
|
|
1041
1042
|
*/
|
|
1042
1043
|
static listAiProviderModels(options) {
|
|
@@ -1527,7 +1528,7 @@ var Deciders = class {
|
|
|
1527
1528
|
/**
|
|
1528
1529
|
* Create a decider
|
|
1529
1530
|
*
|
|
1530
|
-
* 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 `
|
|
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 `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`.
|
|
1531
1532
|
*/
|
|
1532
1533
|
static createDecider(options) {
|
|
1533
1534
|
return (options.client ?? client).post({
|
|
@@ -1616,11 +1617,11 @@ var Deciders = class {
|
|
|
1616
1617
|
/**
|
|
1617
1618
|
* Request a decision
|
|
1618
1619
|
*
|
|
1619
|
-
* Evaluates the decider against `
|
|
1620
|
+
* 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`.
|
|
1620
1621
|
*
|
|
1621
1622
|
* 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`).
|
|
1622
1623
|
*
|
|
1623
|
-
* A tool backend is called with `{
|
|
1624
|
+
* 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`.
|
|
1624
1625
|
*
|
|
1625
1626
|
* 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.
|
|
1626
1627
|
*/
|
|
@@ -1646,6 +1647,23 @@ var Deciders = class {
|
|
|
1646
1647
|
});
|
|
1647
1648
|
}
|
|
1648
1649
|
/**
|
|
1650
|
+
* Request a decision with inline questions
|
|
1651
|
+
*
|
|
1652
|
+
* 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`.
|
|
1653
|
+
*
|
|
1654
|
+
* 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`.
|
|
1655
|
+
*/
|
|
1656
|
+
static createInlineDecision(options) {
|
|
1657
|
+
return (options.client ?? client).post({
|
|
1658
|
+
url: "/api/v1/decisions",
|
|
1659
|
+
...options,
|
|
1660
|
+
headers: {
|
|
1661
|
+
"Content-Type": "application/json",
|
|
1662
|
+
...options.headers
|
|
1663
|
+
}
|
|
1664
|
+
});
|
|
1665
|
+
}
|
|
1666
|
+
/**
|
|
1649
1667
|
* Get a decision
|
|
1650
1668
|
*
|
|
1651
1669
|
* Returns a decision. Poll it after a `wait: false` request until `status` is `completed` or `failed`.
|
|
@@ -2689,6 +2707,18 @@ var Generations = class {
|
|
|
2689
2707
|
});
|
|
2690
2708
|
}
|
|
2691
2709
|
/**
|
|
2710
|
+
* List the memory writes a generation made
|
|
2711
|
+
*
|
|
2712
|
+
* 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`).
|
|
2713
|
+
*
|
|
2714
|
+
*/
|
|
2715
|
+
static listGenerationMemoryAssertions(options) {
|
|
2716
|
+
return (options.client ?? client).get({
|
|
2717
|
+
url: "/api/v1/generations/{generation_id}/memory-assertions",
|
|
2718
|
+
...options
|
|
2719
|
+
});
|
|
2720
|
+
}
|
|
2721
|
+
/**
|
|
2692
2722
|
* Get a generation's transcript
|
|
2693
2723
|
*
|
|
2694
2724
|
* 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.
|
|
@@ -3439,8 +3469,8 @@ var Orchestrations = class {
|
|
|
3439
3469
|
/**
|
|
3440
3470
|
* Get orchestration queue stats
|
|
3441
3471
|
*
|
|
3442
|
-
* 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
|
|
3443
|
-
* Every figure is scoped to what the caller may see. A project-scoped caller gets `
|
|
3472
|
+
* 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`.
|
|
3473
|
+
* 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.
|
|
3444
3474
|
*
|
|
3445
3475
|
*/
|
|
3446
3476
|
static getQueueStats(options) {
|
|
@@ -3454,6 +3484,22 @@ var Orchestrations = class {
|
|
|
3454
3484
|
});
|
|
3455
3485
|
}
|
|
3456
3486
|
/**
|
|
3487
|
+
* List the projects with queued orchestration work
|
|
3488
|
+
*
|
|
3489
|
+
* 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`.
|
|
3490
|
+
*
|
|
3491
|
+
*/
|
|
3492
|
+
static listQueueStatsProjects(options) {
|
|
3493
|
+
return (options?.client ?? client).get({
|
|
3494
|
+
security: [{
|
|
3495
|
+
scheme: "bearer",
|
|
3496
|
+
type: "http"
|
|
3497
|
+
}],
|
|
3498
|
+
url: "/api/v1/orchestrations/queue/stats/projects",
|
|
3499
|
+
...options
|
|
3500
|
+
});
|
|
3501
|
+
}
|
|
3502
|
+
/**
|
|
3457
3503
|
* Delete an orchestration
|
|
3458
3504
|
*
|
|
3459
3505
|
* Deletes an orchestration definition and all its runs.
|
|
@@ -3627,6 +3673,17 @@ var Orchestrations = class {
|
|
|
3627
3673
|
...options
|
|
3628
3674
|
});
|
|
3629
3675
|
}
|
|
3676
|
+
/**
|
|
3677
|
+
* List a run's node executions
|
|
3678
|
+
*
|
|
3679
|
+
* 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`).
|
|
3680
|
+
*/
|
|
3681
|
+
static listOrchestrationRunNodeExecutions(options) {
|
|
3682
|
+
return (options.client ?? client).get({
|
|
3683
|
+
url: "/api/v1/orchestration-runs/{orchestration_run_id}/node-executions",
|
|
3684
|
+
...options
|
|
3685
|
+
});
|
|
3686
|
+
}
|
|
3630
3687
|
};
|
|
3631
3688
|
var Policies = class {
|
|
3632
3689
|
/**
|
|
@@ -4538,7 +4595,7 @@ var Traces = class {
|
|
|
4538
4595
|
/**
|
|
4539
4596
|
* Get trace tree
|
|
4540
4597
|
*
|
|
4541
|
-
* 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.
|
|
4598
|
+
* 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=`.
|
|
4542
4599
|
*
|
|
4543
4600
|
*/
|
|
4544
4601
|
static getTraceTree(options) {
|