@soat/sdk 0.18.4 → 0.18.6
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 +37 -3
- package/dist/index.d.cts +261 -69
- package/dist/index.d.mts +261 -69
- package/dist/index.mjs +37 -3
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2149,7 +2149,7 @@ var Generations = class {
|
|
|
2149
2149
|
/**
|
|
2150
2150
|
* Update generation metadata
|
|
2151
2151
|
*
|
|
2152
|
-
* Attaches caller-supplied key/value metadata to a generation record for per-run audit attribution (e.g. recording which knowledge-corpus version produced an AI action). The provided keys are shallow-merged over the existing metadata
|
|
2152
|
+
* Attaches caller-supplied key/value metadata to a generation record for per-run audit attribution (e.g. recording which knowledge-corpus version produced an AI action). The provided keys are shallow-merged over the existing `metadata`, so repeated patches accumulate. The bag is caller-owned and no key is reserved: server-owned state (usage attribution, the served agent version, the route's record, the extraction summary) lives in its own top-level fields and cannot be written from here.
|
|
2153
2153
|
*
|
|
2154
2154
|
*/
|
|
2155
2155
|
static updateGeneration(options) {
|
|
@@ -2162,6 +2162,24 @@ var Generations = class {
|
|
|
2162
2162
|
}
|
|
2163
2163
|
});
|
|
2164
2164
|
}
|
|
2165
|
+
/**
|
|
2166
|
+
* Purge generation content
|
|
2167
|
+
*
|
|
2168
|
+
* Clears the generation's content — `metadata`, `error`, `extraction`, and the internal recovery state of a paused run — and stamps `content_redacted_at`.
|
|
2169
|
+
*
|
|
2170
|
+
* The usage and audit skeleton is preserved: ids, timestamps, status, stop reason, and the attribution fields (`action_id`, `trigger_id`, `orchestration_run_id`, `node_id`, `agent_version`, `routing`) the billing ledger reads. A purged generation reads back as that skeleton, not a 404.
|
|
2171
|
+
*
|
|
2172
|
+
* This does **not** delete the parent trace's steps object, which holds this generation's content alongside its siblings'. To erase the run's content completely, purge the trace (`DELETE /api/v1/traces/{trace_id}/content`), which cascades here.
|
|
2173
|
+
*
|
|
2174
|
+
* Idempotent — purging an already-purged generation succeeds and leaves the original `content_redacted_at` in place.
|
|
2175
|
+
*
|
|
2176
|
+
*/
|
|
2177
|
+
static purgeGenerationContent(options) {
|
|
2178
|
+
return (options.client ?? client).delete({
|
|
2179
|
+
url: "/api/v1/generations/{generation_id}/content",
|
|
2180
|
+
...options
|
|
2181
|
+
});
|
|
2182
|
+
}
|
|
2165
2183
|
};
|
|
2166
2184
|
var Guardrails = class {
|
|
2167
2185
|
/**
|
|
@@ -3172,7 +3190,7 @@ var Tasks = class {
|
|
|
3172
3190
|
/**
|
|
3173
3191
|
* Create a task
|
|
3174
3192
|
*
|
|
3175
|
-
* Creates a task bound to a workflow.
|
|
3193
|
+
* Creates a task bound to a workflow. By default the task is placed in the workflow's initial state; passing `state` places it directly in that named state instead — an alternate entry point for starting a task mid-flow (e.g. "a new recorte for an existing theme by id"), rather than re-submitting from the initial state and hoping a guard or similarity gate recognizes it. Entering the resulting state, initial or named, behaves identically: that state's `on_enter` automation fires and its `stalled_after` clock arms.
|
|
3176
3194
|
*/
|
|
3177
3195
|
static createTask(options) {
|
|
3178
3196
|
return (options.client ?? client).post({
|
|
@@ -3209,7 +3227,7 @@ var Tasks = class {
|
|
|
3209
3227
|
/**
|
|
3210
3228
|
* Update a task
|
|
3211
3229
|
*
|
|
3212
|
-
* Updates a task's payload, title, or assignee. `state` is never directly writable — move it with a transition; sending a `state` field is rejected as an unknown field (`VALIDATION_FAILED`). `payload` is shallow-merged over the existing payload (PATCH semantics): keys the request omits are preserved
|
|
3230
|
+
* Updates a task's payload, title, or assignee. `state` is never directly writable — move it with a transition; sending a `state` field is rejected as an unknown field (`VALIDATION_FAILED`). `payload` is shallow-merged over the existing payload (PATCH semantics): keys the request omits are preserved. The payload is caller-owned; the automation result lives in the read-only `last_result` field, which no patch can reach. The merged payload is validated against the workflow's `payload_schema`.
|
|
3213
3231
|
*/
|
|
3214
3232
|
static updateTask(options) {
|
|
3215
3233
|
return (options.client ?? client).patch({
|
|
@@ -3366,6 +3384,22 @@ var Traces = class {
|
|
|
3366
3384
|
...options
|
|
3367
3385
|
});
|
|
3368
3386
|
}
|
|
3387
|
+
/**
|
|
3388
|
+
* Purge trace content
|
|
3389
|
+
*
|
|
3390
|
+
* Deletes the trace's steps object from storage and clears its content columns (`file_id`, `error`), cascading to every descendant trace and to all of their generations. A descendant holds its own steps object covering the same run, so the cascade is what makes the erasure complete rather than merely partial.
|
|
3391
|
+
*
|
|
3392
|
+
* The rows survive as auditable skeletons with `content_redacted_at` set — ids, timestamps, step counts, and the generations' usage-attribution fields are preserved, because the billing and audit ledger must outlive a tenant's erasure of the content. A purged trace therefore reads back as a skeleton, not a 404: a 404 would prove nothing.
|
|
3393
|
+
*
|
|
3394
|
+
* Idempotent — purging an already-purged trace succeeds and leaves the original `content_redacted_at` in place.
|
|
3395
|
+
*
|
|
3396
|
+
*/
|
|
3397
|
+
static purgeTraceContent(options) {
|
|
3398
|
+
return (options.client ?? client).delete({
|
|
3399
|
+
url: "/api/v1/traces/{trace_id}/content",
|
|
3400
|
+
...options
|
|
3401
|
+
});
|
|
3402
|
+
}
|
|
3369
3403
|
};
|
|
3370
3404
|
var Triggers = class {
|
|
3371
3405
|
/**
|