@soat/sdk 0.15.10 → 0.15.12
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 +256 -2
- package/dist/index.d.cts +1301 -59
- package/dist/index.d.mts +1301 -59
- package/dist/index.mjs +253 -3
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1062,6 +1062,30 @@ var Approvals = class {
|
|
|
1062
1062
|
});
|
|
1063
1063
|
}
|
|
1064
1064
|
};
|
|
1065
|
+
var AuditLog = class {
|
|
1066
|
+
/**
|
|
1067
|
+
* List audit entries
|
|
1068
|
+
*
|
|
1069
|
+
* 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. `soat:{project}:secret:` matches every secret action); every other filter is exact.
|
|
1070
|
+
*/
|
|
1071
|
+
static listAuditEntries(options) {
|
|
1072
|
+
return (options?.client ?? client).get({
|
|
1073
|
+
url: "/api/v1/audit-log",
|
|
1074
|
+
...options
|
|
1075
|
+
});
|
|
1076
|
+
}
|
|
1077
|
+
/**
|
|
1078
|
+
* Get an audit entry
|
|
1079
|
+
*
|
|
1080
|
+
* Returns a single audit-log entry, including its `detail` payload
|
|
1081
|
+
*/
|
|
1082
|
+
static getAuditEntry(options) {
|
|
1083
|
+
return (options.client ?? client).get({
|
|
1084
|
+
url: "/api/v1/audit-log/{entry_id}",
|
|
1085
|
+
...options
|
|
1086
|
+
});
|
|
1087
|
+
}
|
|
1088
|
+
};
|
|
1065
1089
|
var Chats = class {
|
|
1066
1090
|
/**
|
|
1067
1091
|
* List chats
|
|
@@ -1617,6 +1641,56 @@ var Embeddings = class {
|
|
|
1617
1641
|
});
|
|
1618
1642
|
}
|
|
1619
1643
|
};
|
|
1644
|
+
var Exceptions = class {
|
|
1645
|
+
/**
|
|
1646
|
+
* List exception items
|
|
1647
|
+
*
|
|
1648
|
+
* Returns exception items for a project, filterable by status, severity, and kind.
|
|
1649
|
+
*/
|
|
1650
|
+
static listExceptions(options) {
|
|
1651
|
+
return (options?.client ?? client).get({
|
|
1652
|
+
url: "/api/v1/exceptions",
|
|
1653
|
+
...options
|
|
1654
|
+
});
|
|
1655
|
+
}
|
|
1656
|
+
/**
|
|
1657
|
+
* Get an exception item
|
|
1658
|
+
*
|
|
1659
|
+
* Returns a single exception item with its full detail.
|
|
1660
|
+
*/
|
|
1661
|
+
static getException(options) {
|
|
1662
|
+
return (options.client ?? client).get({
|
|
1663
|
+
url: "/api/v1/exceptions/{exception_id}",
|
|
1664
|
+
...options
|
|
1665
|
+
});
|
|
1666
|
+
}
|
|
1667
|
+
/**
|
|
1668
|
+
* Acknowledge an exception item
|
|
1669
|
+
*
|
|
1670
|
+
* Moves the item to `acknowledged` ("someone is on it"), recording who. A no-op that returns the item unchanged when already acknowledged; rejected when already resolved.
|
|
1671
|
+
*/
|
|
1672
|
+
static acknowledgeException(options) {
|
|
1673
|
+
return (options.client ?? client).post({
|
|
1674
|
+
url: "/api/v1/exceptions/{exception_id}/acknowledge",
|
|
1675
|
+
...options
|
|
1676
|
+
});
|
|
1677
|
+
}
|
|
1678
|
+
/**
|
|
1679
|
+
* Resolve an exception item
|
|
1680
|
+
*
|
|
1681
|
+
* Moves the item to `resolved` ("fixed"), recording who and an optional note.
|
|
1682
|
+
*/
|
|
1683
|
+
static resolveException(options) {
|
|
1684
|
+
return (options.client ?? client).post({
|
|
1685
|
+
url: "/api/v1/exceptions/{exception_id}/resolve",
|
|
1686
|
+
...options,
|
|
1687
|
+
headers: {
|
|
1688
|
+
"Content-Type": "application/json",
|
|
1689
|
+
...options.headers
|
|
1690
|
+
}
|
|
1691
|
+
});
|
|
1692
|
+
}
|
|
1693
|
+
};
|
|
1620
1694
|
var Files = class {
|
|
1621
1695
|
/**
|
|
1622
1696
|
* List all files
|
|
@@ -1960,6 +2034,101 @@ var Generations = class {
|
|
|
1960
2034
|
});
|
|
1961
2035
|
}
|
|
1962
2036
|
};
|
|
2037
|
+
var Guardrails = class {
|
|
2038
|
+
/**
|
|
2039
|
+
* List guardrails
|
|
2040
|
+
*
|
|
2041
|
+
* Returns all guardrails in the project.
|
|
2042
|
+
*/
|
|
2043
|
+
static listGuardrails(options) {
|
|
2044
|
+
return (options?.client ?? client).get({
|
|
2045
|
+
url: "/api/v1/guardrails",
|
|
2046
|
+
...options
|
|
2047
|
+
});
|
|
2048
|
+
}
|
|
2049
|
+
/**
|
|
2050
|
+
* Create a guardrail
|
|
2051
|
+
*
|
|
2052
|
+
* Creates a new guardrail in the project. 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.*` / `soat.*` namespaces — an out-of-catalog `soat.*` key is rejected with 400.
|
|
2053
|
+
*
|
|
2054
|
+
*/
|
|
2055
|
+
static createGuardrail(options) {
|
|
2056
|
+
return (options.client ?? client).post({
|
|
2057
|
+
url: "/api/v1/guardrails",
|
|
2058
|
+
...options,
|
|
2059
|
+
headers: {
|
|
2060
|
+
"Content-Type": "application/json",
|
|
2061
|
+
...options.headers
|
|
2062
|
+
}
|
|
2063
|
+
});
|
|
2064
|
+
}
|
|
2065
|
+
/**
|
|
2066
|
+
* Delete a guardrail
|
|
2067
|
+
*
|
|
2068
|
+
* Deletes a guardrail and its archived versions by ID.
|
|
2069
|
+
*/
|
|
2070
|
+
static deleteGuardrail(options) {
|
|
2071
|
+
return (options.client ?? client).delete({
|
|
2072
|
+
url: "/api/v1/guardrails/{guardrail_id}",
|
|
2073
|
+
...options
|
|
2074
|
+
});
|
|
2075
|
+
}
|
|
2076
|
+
/**
|
|
2077
|
+
* Get a guardrail
|
|
2078
|
+
*
|
|
2079
|
+
* Returns a single guardrail by ID.
|
|
2080
|
+
*/
|
|
2081
|
+
static getGuardrail(options) {
|
|
2082
|
+
return (options.client ?? client).get({
|
|
2083
|
+
url: "/api/v1/guardrails/{guardrail_id}",
|
|
2084
|
+
...options
|
|
2085
|
+
});
|
|
2086
|
+
}
|
|
2087
|
+
/**
|
|
2088
|
+
* Update a guardrail
|
|
2089
|
+
*
|
|
2090
|
+
* Updates an existing guardrail. A `document` write increments `version` and archives the prior document as a GuardrailVersion; metadata-only edits (name / description / context) leave the version untouched.
|
|
2091
|
+
*
|
|
2092
|
+
*/
|
|
2093
|
+
static updateGuardrail(options) {
|
|
2094
|
+
return (options.client ?? client).patch({
|
|
2095
|
+
url: "/api/v1/guardrails/{guardrail_id}",
|
|
2096
|
+
...options,
|
|
2097
|
+
headers: {
|
|
2098
|
+
"Content-Type": "application/json",
|
|
2099
|
+
...options.headers
|
|
2100
|
+
}
|
|
2101
|
+
});
|
|
2102
|
+
}
|
|
2103
|
+
/**
|
|
2104
|
+
* Fetch an archived guardrail version
|
|
2105
|
+
*
|
|
2106
|
+
* Returns the exact `document` that governed at a given version. Approval items, activity entries, and exceptions record the version that governed them, so the audit chain survives edits.
|
|
2107
|
+
*
|
|
2108
|
+
*/
|
|
2109
|
+
static getGuardrailVersion(options) {
|
|
2110
|
+
return (options.client ?? client).get({
|
|
2111
|
+
url: "/api/v1/guardrails/{guardrail_id}/versions/{version}",
|
|
2112
|
+
...options
|
|
2113
|
+
});
|
|
2114
|
+
}
|
|
2115
|
+
/**
|
|
2116
|
+
* Dry-run evaluate a guardrail
|
|
2117
|
+
*
|
|
2118
|
+
* Runs the full evaluation pipeline — the `class` expression, the guard, the context tool per `context_mode`, live `soat.*` 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 `soat.tool.*`.
|
|
2119
|
+
*
|
|
2120
|
+
*/
|
|
2121
|
+
static evaluateGuardrail(options) {
|
|
2122
|
+
return (options.client ?? client).post({
|
|
2123
|
+
url: "/api/v1/guardrails/{guardrail_id}/evaluate",
|
|
2124
|
+
...options,
|
|
2125
|
+
headers: {
|
|
2126
|
+
"Content-Type": "application/json",
|
|
2127
|
+
...options.headers
|
|
2128
|
+
}
|
|
2129
|
+
});
|
|
2130
|
+
}
|
|
2131
|
+
};
|
|
1963
2132
|
var IngestionRules = class {
|
|
1964
2133
|
/**
|
|
1965
2134
|
* List ingestion rules
|
|
@@ -2216,6 +2385,22 @@ var Orchestrations = class {
|
|
|
2216
2385
|
});
|
|
2217
2386
|
}
|
|
2218
2387
|
/**
|
|
2388
|
+
* Get orchestration queue stats
|
|
2389
|
+
*
|
|
2390
|
+
* 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`. A project-scoped caller sees only their own projects under `per_project`.
|
|
2391
|
+
*
|
|
2392
|
+
*/
|
|
2393
|
+
static getQueueStats(options) {
|
|
2394
|
+
return (options?.client ?? client).get({
|
|
2395
|
+
security: [{
|
|
2396
|
+
scheme: "bearer",
|
|
2397
|
+
type: "http"
|
|
2398
|
+
}],
|
|
2399
|
+
url: "/api/v1/orchestrations/queue/stats",
|
|
2400
|
+
...options
|
|
2401
|
+
});
|
|
2402
|
+
}
|
|
2403
|
+
/**
|
|
2219
2404
|
* Delete an orchestration
|
|
2220
2405
|
*
|
|
2221
2406
|
* Deletes an orchestration definition and all its runs.
|
|
@@ -2449,9 +2634,9 @@ var Projects = class {
|
|
|
2449
2634
|
});
|
|
2450
2635
|
}
|
|
2451
2636
|
/**
|
|
2452
|
-
*
|
|
2637
|
+
* Update a project
|
|
2453
2638
|
*
|
|
2454
|
-
* Updates a project's name. Requires admin role.
|
|
2639
|
+
* Updates a project's name and/or its attached guardrails (`guardrail_ids` — the project-scope baseline governing every tool call by every agent in the project). Requires admin role. Detaching a guardrail (removing an id) additionally requires guardrails:DetachGuardrail.
|
|
2455
2640
|
*/
|
|
2456
2641
|
static updateProject(options) {
|
|
2457
2642
|
return (options.client ?? client).patch({
|
|
@@ -2492,6 +2677,71 @@ var Projects = class {
|
|
|
2492
2677
|
});
|
|
2493
2678
|
}
|
|
2494
2679
|
};
|
|
2680
|
+
var Quotas = class {
|
|
2681
|
+
/**
|
|
2682
|
+
* List quotas
|
|
2683
|
+
*
|
|
2684
|
+
* Returns the quotas defined in a project
|
|
2685
|
+
*/
|
|
2686
|
+
static listQuotas(options) {
|
|
2687
|
+
return (options?.client ?? client).get({
|
|
2688
|
+
url: "/api/v1/quotas",
|
|
2689
|
+
...options
|
|
2690
|
+
});
|
|
2691
|
+
}
|
|
2692
|
+
/**
|
|
2693
|
+
* Create a quota
|
|
2694
|
+
*
|
|
2695
|
+
* Creates a project-scoped quota. `scope: agent` with `metric: requests` and `scope: api_key` with `metric: tokens`/`cost_usd` are both rejected with 400 (no attribution exists to enforce them). A duplicate quota (same project, scope, scope_ref, metric, window) is rejected with 409.
|
|
2696
|
+
*/
|
|
2697
|
+
static createQuota(options) {
|
|
2698
|
+
return (options.client ?? client).post({
|
|
2699
|
+
url: "/api/v1/quotas",
|
|
2700
|
+
...options,
|
|
2701
|
+
headers: {
|
|
2702
|
+
"Content-Type": "application/json",
|
|
2703
|
+
...options.headers
|
|
2704
|
+
}
|
|
2705
|
+
});
|
|
2706
|
+
}
|
|
2707
|
+
/**
|
|
2708
|
+
* Delete a quota
|
|
2709
|
+
*
|
|
2710
|
+
* Deletes a quota and drops its window counters
|
|
2711
|
+
*/
|
|
2712
|
+
static deleteQuota(options) {
|
|
2713
|
+
return (options.client ?? client).delete({
|
|
2714
|
+
url: "/api/v1/quotas/{quota_id}",
|
|
2715
|
+
...options
|
|
2716
|
+
});
|
|
2717
|
+
}
|
|
2718
|
+
/**
|
|
2719
|
+
* Get a quota
|
|
2720
|
+
*
|
|
2721
|
+
* Returns a specific quota, including current window usage
|
|
2722
|
+
*/
|
|
2723
|
+
static getQuota(options) {
|
|
2724
|
+
return (options.client ?? client).get({
|
|
2725
|
+
url: "/api/v1/quotas/{quota_id}",
|
|
2726
|
+
...options
|
|
2727
|
+
});
|
|
2728
|
+
}
|
|
2729
|
+
/**
|
|
2730
|
+
* Update a quota
|
|
2731
|
+
*
|
|
2732
|
+
* Updates a quota's limit and/or mode. Other fields are immutable.
|
|
2733
|
+
*/
|
|
2734
|
+
static updateQuota(options) {
|
|
2735
|
+
return (options.client ?? client).patch({
|
|
2736
|
+
url: "/api/v1/quotas/{quota_id}",
|
|
2737
|
+
...options,
|
|
2738
|
+
headers: {
|
|
2739
|
+
"Content-Type": "application/json",
|
|
2740
|
+
...options.headers
|
|
2741
|
+
}
|
|
2742
|
+
});
|
|
2743
|
+
}
|
|
2744
|
+
};
|
|
2495
2745
|
var Secrets = class {
|
|
2496
2746
|
/**
|
|
2497
2747
|
* List secrets
|
|
@@ -3535,4 +3785,4 @@ var SoatClient = class {
|
|
|
3535
3785
|
}
|
|
3536
3786
|
};
|
|
3537
3787
|
//#endregion
|
|
3538
|
-
export { Actors, Agents, AiProviders, ApiKeys, Approvals, Chats, Conversations, Discussions, Documents, Embeddings, Files, Formations, Generations, IngestionRules, Knowledge, Memories, MemoryEntries, Orchestrations, Policies, Projects, Secrets, Sessions, SoatClient, Tasks, Tools, Traces, Triggers, Usage, Users, Webhooks, Workflows, createClient, createConfig };
|
|
3788
|
+
export { Actors, Agents, AiProviders, ApiKeys, Approvals, AuditLog, Chats, Conversations, Discussions, Documents, Embeddings, Exceptions, Files, Formations, Generations, Guardrails, IngestionRules, Knowledge, Memories, MemoryEntries, Orchestrations, Policies, Projects, Quotas, Secrets, Sessions, SoatClient, Tasks, Tools, Traces, Triggers, Usage, Users, Webhooks, Workflows, createClient, createConfig };
|