@soat/sdk 0.25.1 → 0.27.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 +12 -9
- package/dist/index.d.cts +72 -55
- package/dist/index.d.mts +72 -55
- package/dist/index.mjs +12 -9
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1019,7 +1019,8 @@ var AiProviders = class {
|
|
|
1019
1019
|
* Which models are reachable is a property of the credential, not of the provider type: a Vertex provider sees only the publisher models its Google Cloud project and location serve, and a Bedrock provider only the foundation models enabled in its region. Reading the list is how a caller avoids pinning a model that fails at generation time.
|
|
1020
1020
|
* Not every provider type can answer. `azure` lists deployments an operator named rather than models, and `ollama` lists whatever was pulled onto that host, so both return `400 MODEL_LISTING_UNSUPPORTED`.
|
|
1021
1021
|
* 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 when there is one — IAM keys or a Bedrock API key, a Google service-account key — and otherwise fall back to the server environment (the AWS default credential chain, Google Application Default Credentials), so a record with no `secret_id` can still list.
|
|
1022
|
-
* 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:
|
|
1022
|
+
* 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`.
|
|
1023
|
+
* 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.
|
|
1023
1024
|
*
|
|
1024
1025
|
*/
|
|
1025
1026
|
static listAiProviderModels(options) {
|
|
@@ -1197,7 +1198,7 @@ var AuditLog = class {
|
|
|
1197
1198
|
/**
|
|
1198
1199
|
* List audit entries
|
|
1199
1200
|
*
|
|
1200
|
-
* Returns audit-log entries visible to the caller, newest first. All filters are optional and combine with AND. `resource_srn` is a prefix match (e.g. `
|
|
1201
|
+
* Returns audit-log entries visible to the caller, newest first. All filters are optional and combine with AND. `resource_srn` is a prefix match (e.g. `srn:{project}:secret:` matches every secret action); every other filter is exact.
|
|
1201
1202
|
*/
|
|
1202
1203
|
static listAuditEntries(options) {
|
|
1203
1204
|
return (options?.client ?? client).get({
|
|
@@ -2245,7 +2246,7 @@ var Formations = class {
|
|
|
2245
2246
|
*
|
|
2246
2247
|
* Validates the template, creates the formation record, then provisions all declared resources in dependency order.
|
|
2247
2248
|
*
|
|
2248
|
-
* A **template-shape** error is refused with `400`. A **deploy** failure is not: the operation ran, so the formation is returned with `201` and `status: "failed"`, and `error` explains why (the resources created before the failure are rolled back). Read `status` — a `2xx` here means the deploy was attempted, not that it worked. The `
|
|
2249
|
+
* A **template-shape** error is refused with `400`. A **deploy** failure is not: the operation ran, so the formation is returned with `201` and `status: "failed"`, and `error` explains why (the resources created before the failure are rolled back). Read `status` — a `2xx` here means the deploy was attempted, not that it worked. The `builtin` CLI exits non-zero on that body so `create-formation && …` does not lie.
|
|
2249
2250
|
*
|
|
2250
2251
|
*/
|
|
2251
2252
|
static createFormation(options) {
|
|
@@ -2290,7 +2291,7 @@ var Formations = class {
|
|
|
2290
2291
|
*
|
|
2291
2292
|
* Applies a new template to the formation. Resources are created, updated, or deleted to reconcile the current state with the desired state.
|
|
2292
2293
|
*
|
|
2293
|
-
* A **template-shape** error is refused with `400`. A **deploy** failure is not: the operation ran, so the formation is returned with `200` and `status: "failed"`, and `error` explains why. Read `status` — a `2xx` here means the deploy was attempted, not that it worked. The `
|
|
2294
|
+
* A **template-shape** error is refused with `400`. A **deploy** failure is not: the operation ran, so the formation is returned with `200` and `status: "failed"`, and `error` explains why. Read `status` — a `2xx` here means the deploy was attempted, not that it worked. The `builtin` CLI exits non-zero on that body so `update-formation && …` does not lie.
|
|
2294
2295
|
*
|
|
2295
2296
|
*/
|
|
2296
2297
|
static updateFormation(options) {
|
|
@@ -2407,7 +2408,7 @@ var Guardrails = class {
|
|
|
2407
2408
|
/**
|
|
2408
2409
|
* Create a guardrail
|
|
2409
2410
|
*
|
|
2410
|
-
* Creates a new guardrail in the project, archiving its document as version 1. The `document` is validated on write: `class` must be a literal (A/B/C/D) or a JSON Logic expression, and every variable it (and `guard`) reference must resolve to the `args.*` / `context.*` / `
|
|
2411
|
+
* Creates a new guardrail in the project, archiving its document as version 1. The `document` is validated on write: `class` must be a literal (A/B/C/D) or a JSON Logic expression, and every variable it (and `guard`) reference must resolve to the `args.*` / `context.*` / `runtime.*` namespaces — an out-of-catalog `runtime.*` key is rejected with 400.
|
|
2411
2412
|
*
|
|
2412
2413
|
*/
|
|
2413
2414
|
static createGuardrail(options) {
|
|
@@ -2503,7 +2504,7 @@ var Guardrails = class {
|
|
|
2503
2504
|
/**
|
|
2504
2505
|
* Dry-run evaluate a guardrail
|
|
2505
2506
|
*
|
|
2506
|
-
* Runs the full evaluation pipeline — the `class` expression, the guard, the context tool per `context_mode`, live `
|
|
2507
|
+
* Runs the full evaluation pipeline — the `class` expression, the guard, the context tool per `context_mode`, live `runtime.*` resolution — against caller-supplied `args` and `guardrail_context`, and returns the exact `guardrail_evaluation` record a real call would produce. Nothing executes, no approval item is filed, and no activity entry is written. This is the adoption path: preview a document's decisions against production-shaped calls before attaching it — or before editing a widely-attached one. Pass an optional `tool_id` to resolve `runtime.tool.*`.
|
|
2507
2508
|
*
|
|
2508
2509
|
*/
|
|
2509
2510
|
static evaluateGuardrail(options) {
|
|
@@ -3108,7 +3109,9 @@ var Projects = class {
|
|
|
3108
3109
|
/**
|
|
3109
3110
|
* Delete a project
|
|
3110
3111
|
*
|
|
3111
|
-
* Deletes a project. Requires admin role. Fails with `409` if the project has any dependent
|
|
3112
|
+
* Deletes a project. Requires admin role. Fails with `409` if the project has any dependent resource, unless `force=true` is passed, in which case those resources are deleted along with the project.
|
|
3113
|
+
*
|
|
3114
|
+
* Every project-scoped resource counts: agents, ai providers, model routes, tools, ingestion rules, actors, chats, conversations, sessions, generations, traces, datasets, evals, workflows, tasks, triggers, orchestrations and their runs, formations, memories, secrets, files, guardrails, quotas, usage history — and the activity, approval, exception and guardrail-evaluation records a project accumulates while it runs. Audit log entries are the one exception: they outlive the project, keeping their record with `project_id` cleared.
|
|
3112
3115
|
*
|
|
3113
3116
|
*/
|
|
3114
3117
|
static deleteProject(options) {
|
|
@@ -3648,8 +3651,8 @@ var Tools = class {
|
|
|
3648
3651
|
/**
|
|
3649
3652
|
* Call a tool
|
|
3650
3653
|
*
|
|
3651
|
-
* Directly invokes a tool and returns its output. Supported for `http`, `
|
|
3652
|
-
* For `
|
|
3654
|
+
* Directly invokes a tool and returns its output. Supported for `http`, `builtin`, `mcp`, and `pipeline` tools. `client` tools cannot be invoked server-side and will return 422. A `pipeline` tool runs its declared steps in order and returns the mapped `output` (or the last step's output); `action` is ignored and `input` is the pipeline input.
|
|
3655
|
+
* For `builtin` and `mcp` tools the `action` field is required and identifies which action (SOAT) or tool name (MCP) to invoke. For `http` tools `action` is ignored. When a `builtin` or `mcp` tool declares an `actions` allowlist, an action outside it is rejected with `400 VALIDATION_FAILED` ("not available on this tool") before any outbound request is made.
|
|
3653
3656
|
* `preset_parameters` stored on the tool are merged with the caller-supplied `input` before execution; preset keys take lower precedence.
|
|
3654
3657
|
*
|
|
3655
3658
|
*/
|