@soat/sdk 0.49.1 → 0.51.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 +68 -46
- package/dist/index.d.cts +487 -259
- package/dist/index.d.mts +487 -259
- package/dist/index.mjs +68 -46
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2626,7 +2626,7 @@ var Knowledge = class {
|
|
|
2626
2626
|
/**
|
|
2627
2627
|
* Search knowledge
|
|
2628
2628
|
*
|
|
2629
|
-
* Searches across documents and
|
|
2629
|
+
* Searches across documents and memories using hybrid retrieval — a vector query and a full-text query per source, fused by reciprocal rank — or by file paths, document IDs, memory store IDs, or tags. At least one of `query`, `tags`, `document_paths`, `document_ids`, or `memory_store_ids` must be provided.
|
|
2630
2630
|
*/
|
|
2631
2631
|
static searchKnowledge(options) {
|
|
2632
2632
|
return (options.client ?? client).post({
|
|
@@ -2643,10 +2643,10 @@ var Memories = class {
|
|
|
2643
2643
|
/**
|
|
2644
2644
|
* List memories
|
|
2645
2645
|
*
|
|
2646
|
-
* Returns
|
|
2646
|
+
* Returns all memories in a memory store
|
|
2647
2647
|
*/
|
|
2648
2648
|
static listMemories(options) {
|
|
2649
|
-
return (options
|
|
2649
|
+
return (options.client ?? client).get({
|
|
2650
2650
|
url: "/api/v1/memories",
|
|
2651
2651
|
...options
|
|
2652
2652
|
});
|
|
@@ -2654,7 +2654,7 @@ var Memories = class {
|
|
|
2654
2654
|
/**
|
|
2655
2655
|
* Create a memory
|
|
2656
2656
|
*
|
|
2657
|
-
*
|
|
2657
|
+
* Writes a fact to the specified memory store through the standard write algorithm: the content is embedded (or matched to text the store already holds), compared against the most similar currently-valid memory, and resolved to exactly one of three outcomes — `skipped` at or above `duplicate_threshold`, `superseded` at or above `supersede_threshold`, `created` below it. Every call records one assertion, whatever the outcome.
|
|
2658
2658
|
*/
|
|
2659
2659
|
static createMemory(options) {
|
|
2660
2660
|
return (options.client ?? client).post({
|
|
@@ -2669,7 +2669,7 @@ var Memories = class {
|
|
|
2669
2669
|
/**
|
|
2670
2670
|
* Delete a memory
|
|
2671
2671
|
*
|
|
2672
|
-
* Deletes a memory
|
|
2672
|
+
* Deletes a memory
|
|
2673
2673
|
*/
|
|
2674
2674
|
static deleteMemory(options) {
|
|
2675
2675
|
return (options.client ?? client).delete({
|
|
@@ -2680,7 +2680,7 @@ var Memories = class {
|
|
|
2680
2680
|
/**
|
|
2681
2681
|
* Get a memory
|
|
2682
2682
|
*
|
|
2683
|
-
* Returns a single memory
|
|
2683
|
+
* Returns a single memory by ID
|
|
2684
2684
|
*/
|
|
2685
2685
|
static getMemory(options) {
|
|
2686
2686
|
return (options.client ?? client).get({
|
|
@@ -2691,7 +2691,7 @@ var Memories = class {
|
|
|
2691
2691
|
/**
|
|
2692
2692
|
* Update a memory
|
|
2693
2693
|
*
|
|
2694
|
-
* Updates an existing memory
|
|
2694
|
+
* Updates an existing memory. Regenerates the embedding if content changes.
|
|
2695
2695
|
*/
|
|
2696
2696
|
static updateMemory(options) {
|
|
2697
2697
|
return (options.client ?? client).put({
|
|
@@ -2704,6 +2704,17 @@ var Memories = class {
|
|
|
2704
2704
|
});
|
|
2705
2705
|
}
|
|
2706
2706
|
/**
|
|
2707
|
+
* List a memory's assertions
|
|
2708
|
+
*
|
|
2709
|
+
* Returns every write that resolved into this memory, oldest first: the one that created it, the duplicates it absorbed, and the assertion that superseded another memory in its favour. A superseded memory keeps its own assertions, so the chain can be walked in both directions.
|
|
2710
|
+
*/
|
|
2711
|
+
static listMemoryAssertions(options) {
|
|
2712
|
+
return (options.client ?? client).get({
|
|
2713
|
+
url: "/api/v1/memories/{memory_id}/assertions",
|
|
2714
|
+
...options
|
|
2715
|
+
});
|
|
2716
|
+
}
|
|
2717
|
+
/**
|
|
2707
2718
|
* Get memory tags
|
|
2708
2719
|
*
|
|
2709
2720
|
* Returns all tags attached to the memory
|
|
@@ -2745,26 +2756,26 @@ var Memories = class {
|
|
|
2745
2756
|
});
|
|
2746
2757
|
}
|
|
2747
2758
|
};
|
|
2748
|
-
var
|
|
2759
|
+
var MemoryStores = class {
|
|
2749
2760
|
/**
|
|
2750
|
-
* List memory
|
|
2761
|
+
* List memory stores
|
|
2751
2762
|
*
|
|
2752
|
-
* Returns
|
|
2763
|
+
* Returns a list of memory store configurations for a project
|
|
2753
2764
|
*/
|
|
2754
|
-
static
|
|
2755
|
-
return (options
|
|
2756
|
-
url: "/api/v1/memory-
|
|
2765
|
+
static listMemoryStores(options) {
|
|
2766
|
+
return (options?.client ?? client).get({
|
|
2767
|
+
url: "/api/v1/memory-stores",
|
|
2757
2768
|
...options
|
|
2758
2769
|
});
|
|
2759
2770
|
}
|
|
2760
2771
|
/**
|
|
2761
|
-
* Create a memory
|
|
2772
|
+
* Create a memory store
|
|
2762
2773
|
*
|
|
2763
|
-
* Creates a new
|
|
2774
|
+
* Creates a new memory store configuration in a project
|
|
2764
2775
|
*/
|
|
2765
|
-
static
|
|
2776
|
+
static createMemoryStore(options) {
|
|
2766
2777
|
return (options.client ?? client).post({
|
|
2767
|
-
url: "/api/v1/memory-
|
|
2778
|
+
url: "/api/v1/memory-stores",
|
|
2768
2779
|
...options,
|
|
2769
2780
|
headers: {
|
|
2770
2781
|
"Content-Type": "application/json",
|
|
@@ -2773,35 +2784,35 @@ var MemoryEntries = class {
|
|
|
2773
2784
|
});
|
|
2774
2785
|
}
|
|
2775
2786
|
/**
|
|
2776
|
-
* Delete a memory
|
|
2787
|
+
* Delete a memory store
|
|
2777
2788
|
*
|
|
2778
|
-
* Deletes a memory
|
|
2789
|
+
* Deletes a memory store configuration
|
|
2779
2790
|
*/
|
|
2780
|
-
static
|
|
2791
|
+
static deleteMemoryStore(options) {
|
|
2781
2792
|
return (options.client ?? client).delete({
|
|
2782
|
-
url: "/api/v1/memory-
|
|
2793
|
+
url: "/api/v1/memory-stores/{memory_store_id}",
|
|
2783
2794
|
...options
|
|
2784
2795
|
});
|
|
2785
2796
|
}
|
|
2786
2797
|
/**
|
|
2787
|
-
* Get a memory
|
|
2798
|
+
* Get a memory store
|
|
2788
2799
|
*
|
|
2789
|
-
* Returns a single memory
|
|
2800
|
+
* Returns a single memory store configuration by ID
|
|
2790
2801
|
*/
|
|
2791
|
-
static
|
|
2802
|
+
static getMemoryStore(options) {
|
|
2792
2803
|
return (options.client ?? client).get({
|
|
2793
|
-
url: "/api/v1/memory-
|
|
2804
|
+
url: "/api/v1/memory-stores/{memory_store_id}",
|
|
2794
2805
|
...options
|
|
2795
2806
|
});
|
|
2796
2807
|
}
|
|
2797
2808
|
/**
|
|
2798
|
-
* Update a memory
|
|
2809
|
+
* Update a memory store
|
|
2799
2810
|
*
|
|
2800
|
-
* Updates an existing memory
|
|
2811
|
+
* Updates an existing memory store configuration
|
|
2801
2812
|
*/
|
|
2802
|
-
static
|
|
2813
|
+
static updateMemoryStore(options) {
|
|
2803
2814
|
return (options.client ?? client).put({
|
|
2804
|
-
url: "/api/v1/memory-
|
|
2815
|
+
url: "/api/v1/memory-stores/{memory_store_id}",
|
|
2805
2816
|
...options,
|
|
2806
2817
|
headers: {
|
|
2807
2818
|
"Content-Type": "application/json",
|
|
@@ -2810,24 +2821,35 @@ var MemoryEntries = class {
|
|
|
2810
2821
|
});
|
|
2811
2822
|
}
|
|
2812
2823
|
/**
|
|
2813
|
-
*
|
|
2824
|
+
* List a memory store's write assertions
|
|
2825
|
+
*
|
|
2826
|
+
* Returns the store's write ledger, newest first: one row per write attempt, skips included. This is how "which write path is filling this store?" is asked — a question no column on a memory row could answer, because a skipped write produced no memory at all.
|
|
2827
|
+
*/
|
|
2828
|
+
static listMemoryStoreAssertions(options) {
|
|
2829
|
+
return (options.client ?? client).get({
|
|
2830
|
+
url: "/api/v1/memory-stores/{memory_store_id}/assertions",
|
|
2831
|
+
...options
|
|
2832
|
+
});
|
|
2833
|
+
}
|
|
2834
|
+
/**
|
|
2835
|
+
* Get memory store tags
|
|
2814
2836
|
*
|
|
2815
|
-
* Returns all tags attached to the memory
|
|
2837
|
+
* Returns all tags attached to the memory store
|
|
2816
2838
|
*/
|
|
2817
|
-
static
|
|
2839
|
+
static getMemoryStoreTags(options) {
|
|
2818
2840
|
return (options.client ?? client).get({
|
|
2819
|
-
url: "/api/v1/memory-
|
|
2841
|
+
url: "/api/v1/memory-stores/{memory_store_id}/tags",
|
|
2820
2842
|
...options
|
|
2821
2843
|
});
|
|
2822
2844
|
}
|
|
2823
2845
|
/**
|
|
2824
|
-
* Merge memory
|
|
2846
|
+
* Merge memory store tags
|
|
2825
2847
|
*
|
|
2826
|
-
* Merges provided tags into the memory
|
|
2848
|
+
* Merges provided tags into the memory store's existing tags (existing tags are preserved unless overridden)
|
|
2827
2849
|
*/
|
|
2828
|
-
static
|
|
2850
|
+
static mergeMemoryStoreTags(options) {
|
|
2829
2851
|
return (options.client ?? client).patch({
|
|
2830
|
-
url: "/api/v1/memory-
|
|
2852
|
+
url: "/api/v1/memory-stores/{memory_store_id}/tags",
|
|
2831
2853
|
...options,
|
|
2832
2854
|
headers: {
|
|
2833
2855
|
"Content-Type": "application/json",
|
|
@@ -2836,13 +2858,13 @@ var MemoryEntries = class {
|
|
|
2836
2858
|
});
|
|
2837
2859
|
}
|
|
2838
2860
|
/**
|
|
2839
|
-
* Replace memory
|
|
2861
|
+
* Replace memory store tags
|
|
2840
2862
|
*
|
|
2841
|
-
* Replaces all tags on the memory
|
|
2863
|
+
* Replaces all tags on the memory store with the provided tags (not merged)
|
|
2842
2864
|
*/
|
|
2843
|
-
static
|
|
2865
|
+
static replaceMemoryStoreTags(options) {
|
|
2844
2866
|
return (options.client ?? client).put({
|
|
2845
|
-
url: "/api/v1/memory-
|
|
2867
|
+
url: "/api/v1/memory-stores/{memory_store_id}/tags",
|
|
2846
2868
|
...options,
|
|
2847
2869
|
headers: {
|
|
2848
2870
|
"Content-Type": "application/json",
|
|
@@ -3254,7 +3276,7 @@ var Projects = class {
|
|
|
3254
3276
|
*
|
|
3255
3277
|
* 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.
|
|
3256
3278
|
*
|
|
3257
|
-
* 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,
|
|
3279
|
+
* 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, memory stores, 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.
|
|
3258
3280
|
*
|
|
3259
3281
|
*/
|
|
3260
3282
|
static deleteProject(options) {
|
|
@@ -3335,7 +3357,7 @@ var Quotas = class {
|
|
|
3335
3357
|
*
|
|
3336
3358
|
* Creates a project-scoped quota. `requests` is valid for `scope: project`/`api_key`; `tokens` and `cost_usd` are valid for `scope: project`/`agent`/`actor`; `storage_bytes` is valid for `scope: project` only. Any other scope/metric pair is rejected with 400 (no attribution exists to enforce it). An `actor` quota caps one end user's spend, matched from the generation's session; a null `scope_ref` means one budget *per* actor rather than a pooled project total. A `cost_usd` quota may name one `meter_type` to cap; omitting it caps every priced meter. A duplicate quota (same project, scope, scope_ref, metric, window, meter_type) is rejected with 409.
|
|
3337
3359
|
*
|
|
3338
|
-
* `storage_bytes` caps a stored total rather than a windowed one, so it takes `window: current` and every other metric refuses that value (400 either way). It is enforced at the corpus write paths — file upload and create, document create, document ingest and re-ingest, memory
|
|
3360
|
+
* `storage_bytes` caps a stored total rather than a windowed one, so it takes `window: current` and every other metric refuses that value (400 either way). It is enforced at the corpus write paths — file upload and create, document create, document ingest and re-ingest, memory create — with `409 QUOTA_STORAGE_EXCEEDED` and no `Retry-After`, since no window reset clears a footprint.
|
|
3339
3361
|
*/
|
|
3340
3362
|
static createQuota(options) {
|
|
3341
3363
|
return (options.client ?? client).post({
|
|
@@ -4537,7 +4559,7 @@ var SoatClient = class {
|
|
|
4537
4559
|
ingestionRules;
|
|
4538
4560
|
knowledge;
|
|
4539
4561
|
memories;
|
|
4540
|
-
|
|
4562
|
+
memoryStores;
|
|
4541
4563
|
modelRoutes;
|
|
4542
4564
|
orchestrations;
|
|
4543
4565
|
policies;
|
|
@@ -4584,7 +4606,7 @@ var SoatClient = class {
|
|
|
4584
4606
|
this.ingestionRules = bindResource(IngestionRules, httpClient);
|
|
4585
4607
|
this.knowledge = bindResource(Knowledge, httpClient);
|
|
4586
4608
|
this.memories = bindResource(Memories, httpClient);
|
|
4587
|
-
this.
|
|
4609
|
+
this.memoryStores = bindResource(MemoryStores, httpClient);
|
|
4588
4610
|
this.modelRoutes = bindResource(ModelRoutes, httpClient);
|
|
4589
4611
|
this.orchestrations = bindResource(Orchestrations, httpClient);
|
|
4590
4612
|
this.policies = bindResource(Policies, httpClient);
|
|
@@ -4603,4 +4625,4 @@ var SoatClient = class {
|
|
|
4603
4625
|
}
|
|
4604
4626
|
};
|
|
4605
4627
|
//#endregion
|
|
4606
|
-
export { Activity, Actors, AgentVersions, Agents, AiProviders, ApiKeys, Approvals, AuditLog, Chains, Chats, Conversations, Documents, Embeddings, Evaluations, Exceptions, Files, Formations, Generations, Guardrails, IngestionRules, Knowledge, Memories,
|
|
4628
|
+
export { Activity, Actors, AgentVersions, Agents, AiProviders, ApiKeys, Approvals, AuditLog, Chains, Chats, Conversations, Documents, Embeddings, Evaluations, Exceptions, Files, Formations, Generations, Guardrails, IngestionRules, Knowledge, Memories, MemoryStores, ModelRoutes, Orchestrations, Policies, Projects, Quotas, Secrets, Sessions, SoatClient, Tasks, Tools, Traces, Triggers, Usage, Users, Webhooks, Workflows, createClient, createConfig };
|