@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.cjs
CHANGED
|
@@ -1063,6 +1063,30 @@ var Approvals = class {
|
|
|
1063
1063
|
});
|
|
1064
1064
|
}
|
|
1065
1065
|
};
|
|
1066
|
+
var AuditLog = class {
|
|
1067
|
+
/**
|
|
1068
|
+
* List audit entries
|
|
1069
|
+
*
|
|
1070
|
+
* 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.
|
|
1071
|
+
*/
|
|
1072
|
+
static listAuditEntries(options) {
|
|
1073
|
+
return (options?.client ?? client).get({
|
|
1074
|
+
url: "/api/v1/audit-log",
|
|
1075
|
+
...options
|
|
1076
|
+
});
|
|
1077
|
+
}
|
|
1078
|
+
/**
|
|
1079
|
+
* Get an audit entry
|
|
1080
|
+
*
|
|
1081
|
+
* Returns a single audit-log entry, including its `detail` payload
|
|
1082
|
+
*/
|
|
1083
|
+
static getAuditEntry(options) {
|
|
1084
|
+
return (options.client ?? client).get({
|
|
1085
|
+
url: "/api/v1/audit-log/{entry_id}",
|
|
1086
|
+
...options
|
|
1087
|
+
});
|
|
1088
|
+
}
|
|
1089
|
+
};
|
|
1066
1090
|
var Chats = class {
|
|
1067
1091
|
/**
|
|
1068
1092
|
* List chats
|
|
@@ -1618,6 +1642,56 @@ var Embeddings = class {
|
|
|
1618
1642
|
});
|
|
1619
1643
|
}
|
|
1620
1644
|
};
|
|
1645
|
+
var Exceptions = class {
|
|
1646
|
+
/**
|
|
1647
|
+
* List exception items
|
|
1648
|
+
*
|
|
1649
|
+
* Returns exception items for a project, filterable by status, severity, and kind.
|
|
1650
|
+
*/
|
|
1651
|
+
static listExceptions(options) {
|
|
1652
|
+
return (options?.client ?? client).get({
|
|
1653
|
+
url: "/api/v1/exceptions",
|
|
1654
|
+
...options
|
|
1655
|
+
});
|
|
1656
|
+
}
|
|
1657
|
+
/**
|
|
1658
|
+
* Get an exception item
|
|
1659
|
+
*
|
|
1660
|
+
* Returns a single exception item with its full detail.
|
|
1661
|
+
*/
|
|
1662
|
+
static getException(options) {
|
|
1663
|
+
return (options.client ?? client).get({
|
|
1664
|
+
url: "/api/v1/exceptions/{exception_id}",
|
|
1665
|
+
...options
|
|
1666
|
+
});
|
|
1667
|
+
}
|
|
1668
|
+
/**
|
|
1669
|
+
* Acknowledge an exception item
|
|
1670
|
+
*
|
|
1671
|
+
* 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.
|
|
1672
|
+
*/
|
|
1673
|
+
static acknowledgeException(options) {
|
|
1674
|
+
return (options.client ?? client).post({
|
|
1675
|
+
url: "/api/v1/exceptions/{exception_id}/acknowledge",
|
|
1676
|
+
...options
|
|
1677
|
+
});
|
|
1678
|
+
}
|
|
1679
|
+
/**
|
|
1680
|
+
* Resolve an exception item
|
|
1681
|
+
*
|
|
1682
|
+
* Moves the item to `resolved` ("fixed"), recording who and an optional note.
|
|
1683
|
+
*/
|
|
1684
|
+
static resolveException(options) {
|
|
1685
|
+
return (options.client ?? client).post({
|
|
1686
|
+
url: "/api/v1/exceptions/{exception_id}/resolve",
|
|
1687
|
+
...options,
|
|
1688
|
+
headers: {
|
|
1689
|
+
"Content-Type": "application/json",
|
|
1690
|
+
...options.headers
|
|
1691
|
+
}
|
|
1692
|
+
});
|
|
1693
|
+
}
|
|
1694
|
+
};
|
|
1621
1695
|
var Files = class {
|
|
1622
1696
|
/**
|
|
1623
1697
|
* List all files
|
|
@@ -1961,6 +2035,101 @@ var Generations = class {
|
|
|
1961
2035
|
});
|
|
1962
2036
|
}
|
|
1963
2037
|
};
|
|
2038
|
+
var Guardrails = class {
|
|
2039
|
+
/**
|
|
2040
|
+
* List guardrails
|
|
2041
|
+
*
|
|
2042
|
+
* Returns all guardrails in the project.
|
|
2043
|
+
*/
|
|
2044
|
+
static listGuardrails(options) {
|
|
2045
|
+
return (options?.client ?? client).get({
|
|
2046
|
+
url: "/api/v1/guardrails",
|
|
2047
|
+
...options
|
|
2048
|
+
});
|
|
2049
|
+
}
|
|
2050
|
+
/**
|
|
2051
|
+
* Create a guardrail
|
|
2052
|
+
*
|
|
2053
|
+
* 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.
|
|
2054
|
+
*
|
|
2055
|
+
*/
|
|
2056
|
+
static createGuardrail(options) {
|
|
2057
|
+
return (options.client ?? client).post({
|
|
2058
|
+
url: "/api/v1/guardrails",
|
|
2059
|
+
...options,
|
|
2060
|
+
headers: {
|
|
2061
|
+
"Content-Type": "application/json",
|
|
2062
|
+
...options.headers
|
|
2063
|
+
}
|
|
2064
|
+
});
|
|
2065
|
+
}
|
|
2066
|
+
/**
|
|
2067
|
+
* Delete a guardrail
|
|
2068
|
+
*
|
|
2069
|
+
* Deletes a guardrail and its archived versions by ID.
|
|
2070
|
+
*/
|
|
2071
|
+
static deleteGuardrail(options) {
|
|
2072
|
+
return (options.client ?? client).delete({
|
|
2073
|
+
url: "/api/v1/guardrails/{guardrail_id}",
|
|
2074
|
+
...options
|
|
2075
|
+
});
|
|
2076
|
+
}
|
|
2077
|
+
/**
|
|
2078
|
+
* Get a guardrail
|
|
2079
|
+
*
|
|
2080
|
+
* Returns a single guardrail by ID.
|
|
2081
|
+
*/
|
|
2082
|
+
static getGuardrail(options) {
|
|
2083
|
+
return (options.client ?? client).get({
|
|
2084
|
+
url: "/api/v1/guardrails/{guardrail_id}",
|
|
2085
|
+
...options
|
|
2086
|
+
});
|
|
2087
|
+
}
|
|
2088
|
+
/**
|
|
2089
|
+
* Update a guardrail
|
|
2090
|
+
*
|
|
2091
|
+
* 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.
|
|
2092
|
+
*
|
|
2093
|
+
*/
|
|
2094
|
+
static updateGuardrail(options) {
|
|
2095
|
+
return (options.client ?? client).patch({
|
|
2096
|
+
url: "/api/v1/guardrails/{guardrail_id}",
|
|
2097
|
+
...options,
|
|
2098
|
+
headers: {
|
|
2099
|
+
"Content-Type": "application/json",
|
|
2100
|
+
...options.headers
|
|
2101
|
+
}
|
|
2102
|
+
});
|
|
2103
|
+
}
|
|
2104
|
+
/**
|
|
2105
|
+
* Fetch an archived guardrail version
|
|
2106
|
+
*
|
|
2107
|
+
* 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.
|
|
2108
|
+
*
|
|
2109
|
+
*/
|
|
2110
|
+
static getGuardrailVersion(options) {
|
|
2111
|
+
return (options.client ?? client).get({
|
|
2112
|
+
url: "/api/v1/guardrails/{guardrail_id}/versions/{version}",
|
|
2113
|
+
...options
|
|
2114
|
+
});
|
|
2115
|
+
}
|
|
2116
|
+
/**
|
|
2117
|
+
* Dry-run evaluate a guardrail
|
|
2118
|
+
*
|
|
2119
|
+
* 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.*`.
|
|
2120
|
+
*
|
|
2121
|
+
*/
|
|
2122
|
+
static evaluateGuardrail(options) {
|
|
2123
|
+
return (options.client ?? client).post({
|
|
2124
|
+
url: "/api/v1/guardrails/{guardrail_id}/evaluate",
|
|
2125
|
+
...options,
|
|
2126
|
+
headers: {
|
|
2127
|
+
"Content-Type": "application/json",
|
|
2128
|
+
...options.headers
|
|
2129
|
+
}
|
|
2130
|
+
});
|
|
2131
|
+
}
|
|
2132
|
+
};
|
|
1964
2133
|
var IngestionRules = class {
|
|
1965
2134
|
/**
|
|
1966
2135
|
* List ingestion rules
|
|
@@ -2217,6 +2386,22 @@ var Orchestrations = class {
|
|
|
2217
2386
|
});
|
|
2218
2387
|
}
|
|
2219
2388
|
/**
|
|
2389
|
+
* Get orchestration queue stats
|
|
2390
|
+
*
|
|
2391
|
+
* 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`.
|
|
2392
|
+
*
|
|
2393
|
+
*/
|
|
2394
|
+
static getQueueStats(options) {
|
|
2395
|
+
return (options?.client ?? client).get({
|
|
2396
|
+
security: [{
|
|
2397
|
+
scheme: "bearer",
|
|
2398
|
+
type: "http"
|
|
2399
|
+
}],
|
|
2400
|
+
url: "/api/v1/orchestrations/queue/stats",
|
|
2401
|
+
...options
|
|
2402
|
+
});
|
|
2403
|
+
}
|
|
2404
|
+
/**
|
|
2220
2405
|
* Delete an orchestration
|
|
2221
2406
|
*
|
|
2222
2407
|
* Deletes an orchestration definition and all its runs.
|
|
@@ -2450,9 +2635,9 @@ var Projects = class {
|
|
|
2450
2635
|
});
|
|
2451
2636
|
}
|
|
2452
2637
|
/**
|
|
2453
|
-
*
|
|
2638
|
+
* Update a project
|
|
2454
2639
|
*
|
|
2455
|
-
* Updates a project's name. Requires admin role.
|
|
2640
|
+
* 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.
|
|
2456
2641
|
*/
|
|
2457
2642
|
static updateProject(options) {
|
|
2458
2643
|
return (options.client ?? client).patch({
|
|
@@ -2493,6 +2678,71 @@ var Projects = class {
|
|
|
2493
2678
|
});
|
|
2494
2679
|
}
|
|
2495
2680
|
};
|
|
2681
|
+
var Quotas = class {
|
|
2682
|
+
/**
|
|
2683
|
+
* List quotas
|
|
2684
|
+
*
|
|
2685
|
+
* Returns the quotas defined in a project
|
|
2686
|
+
*/
|
|
2687
|
+
static listQuotas(options) {
|
|
2688
|
+
return (options?.client ?? client).get({
|
|
2689
|
+
url: "/api/v1/quotas",
|
|
2690
|
+
...options
|
|
2691
|
+
});
|
|
2692
|
+
}
|
|
2693
|
+
/**
|
|
2694
|
+
* Create a quota
|
|
2695
|
+
*
|
|
2696
|
+
* 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.
|
|
2697
|
+
*/
|
|
2698
|
+
static createQuota(options) {
|
|
2699
|
+
return (options.client ?? client).post({
|
|
2700
|
+
url: "/api/v1/quotas",
|
|
2701
|
+
...options,
|
|
2702
|
+
headers: {
|
|
2703
|
+
"Content-Type": "application/json",
|
|
2704
|
+
...options.headers
|
|
2705
|
+
}
|
|
2706
|
+
});
|
|
2707
|
+
}
|
|
2708
|
+
/**
|
|
2709
|
+
* Delete a quota
|
|
2710
|
+
*
|
|
2711
|
+
* Deletes a quota and drops its window counters
|
|
2712
|
+
*/
|
|
2713
|
+
static deleteQuota(options) {
|
|
2714
|
+
return (options.client ?? client).delete({
|
|
2715
|
+
url: "/api/v1/quotas/{quota_id}",
|
|
2716
|
+
...options
|
|
2717
|
+
});
|
|
2718
|
+
}
|
|
2719
|
+
/**
|
|
2720
|
+
* Get a quota
|
|
2721
|
+
*
|
|
2722
|
+
* Returns a specific quota, including current window usage
|
|
2723
|
+
*/
|
|
2724
|
+
static getQuota(options) {
|
|
2725
|
+
return (options.client ?? client).get({
|
|
2726
|
+
url: "/api/v1/quotas/{quota_id}",
|
|
2727
|
+
...options
|
|
2728
|
+
});
|
|
2729
|
+
}
|
|
2730
|
+
/**
|
|
2731
|
+
* Update a quota
|
|
2732
|
+
*
|
|
2733
|
+
* Updates a quota's limit and/or mode. Other fields are immutable.
|
|
2734
|
+
*/
|
|
2735
|
+
static updateQuota(options) {
|
|
2736
|
+
return (options.client ?? client).patch({
|
|
2737
|
+
url: "/api/v1/quotas/{quota_id}",
|
|
2738
|
+
...options,
|
|
2739
|
+
headers: {
|
|
2740
|
+
"Content-Type": "application/json",
|
|
2741
|
+
...options.headers
|
|
2742
|
+
}
|
|
2743
|
+
});
|
|
2744
|
+
}
|
|
2745
|
+
};
|
|
2496
2746
|
var Secrets = class {
|
|
2497
2747
|
/**
|
|
2498
2748
|
* List secrets
|
|
@@ -3541,14 +3791,17 @@ exports.Agents = Agents;
|
|
|
3541
3791
|
exports.AiProviders = AiProviders;
|
|
3542
3792
|
exports.ApiKeys = ApiKeys;
|
|
3543
3793
|
exports.Approvals = Approvals;
|
|
3794
|
+
exports.AuditLog = AuditLog;
|
|
3544
3795
|
exports.Chats = Chats;
|
|
3545
3796
|
exports.Conversations = Conversations;
|
|
3546
3797
|
exports.Discussions = Discussions;
|
|
3547
3798
|
exports.Documents = Documents;
|
|
3548
3799
|
exports.Embeddings = Embeddings;
|
|
3800
|
+
exports.Exceptions = Exceptions;
|
|
3549
3801
|
exports.Files = Files;
|
|
3550
3802
|
exports.Formations = Formations;
|
|
3551
3803
|
exports.Generations = Generations;
|
|
3804
|
+
exports.Guardrails = Guardrails;
|
|
3552
3805
|
exports.IngestionRules = IngestionRules;
|
|
3553
3806
|
exports.Knowledge = Knowledge;
|
|
3554
3807
|
exports.Memories = Memories;
|
|
@@ -3556,6 +3809,7 @@ exports.MemoryEntries = MemoryEntries;
|
|
|
3556
3809
|
exports.Orchestrations = Orchestrations;
|
|
3557
3810
|
exports.Policies = Policies;
|
|
3558
3811
|
exports.Projects = Projects;
|
|
3812
|
+
exports.Quotas = Quotas;
|
|
3559
3813
|
exports.Secrets = Secrets;
|
|
3560
3814
|
exports.Sessions = Sessions;
|
|
3561
3815
|
exports.SoatClient = SoatClient;
|