@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.cjs
CHANGED
|
@@ -2627,7 +2627,7 @@ var Knowledge = class {
|
|
|
2627
2627
|
/**
|
|
2628
2628
|
* Search knowledge
|
|
2629
2629
|
*
|
|
2630
|
-
* Searches across documents and
|
|
2630
|
+
* 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.
|
|
2631
2631
|
*/
|
|
2632
2632
|
static searchKnowledge(options) {
|
|
2633
2633
|
return (options.client ?? client).post({
|
|
@@ -2644,10 +2644,10 @@ var Memories = class {
|
|
|
2644
2644
|
/**
|
|
2645
2645
|
* List memories
|
|
2646
2646
|
*
|
|
2647
|
-
* Returns
|
|
2647
|
+
* Returns all memories in a memory store
|
|
2648
2648
|
*/
|
|
2649
2649
|
static listMemories(options) {
|
|
2650
|
-
return (options
|
|
2650
|
+
return (options.client ?? client).get({
|
|
2651
2651
|
url: "/api/v1/memories",
|
|
2652
2652
|
...options
|
|
2653
2653
|
});
|
|
@@ -2655,7 +2655,7 @@ var Memories = class {
|
|
|
2655
2655
|
/**
|
|
2656
2656
|
* Create a memory
|
|
2657
2657
|
*
|
|
2658
|
-
*
|
|
2658
|
+
* 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.
|
|
2659
2659
|
*/
|
|
2660
2660
|
static createMemory(options) {
|
|
2661
2661
|
return (options.client ?? client).post({
|
|
@@ -2670,7 +2670,7 @@ var Memories = class {
|
|
|
2670
2670
|
/**
|
|
2671
2671
|
* Delete a memory
|
|
2672
2672
|
*
|
|
2673
|
-
* Deletes a memory
|
|
2673
|
+
* Deletes a memory
|
|
2674
2674
|
*/
|
|
2675
2675
|
static deleteMemory(options) {
|
|
2676
2676
|
return (options.client ?? client).delete({
|
|
@@ -2681,7 +2681,7 @@ var Memories = class {
|
|
|
2681
2681
|
/**
|
|
2682
2682
|
* Get a memory
|
|
2683
2683
|
*
|
|
2684
|
-
* Returns a single memory
|
|
2684
|
+
* Returns a single memory by ID
|
|
2685
2685
|
*/
|
|
2686
2686
|
static getMemory(options) {
|
|
2687
2687
|
return (options.client ?? client).get({
|
|
@@ -2692,7 +2692,7 @@ var Memories = class {
|
|
|
2692
2692
|
/**
|
|
2693
2693
|
* Update a memory
|
|
2694
2694
|
*
|
|
2695
|
-
* Updates an existing memory
|
|
2695
|
+
* Updates an existing memory. Regenerates the embedding if content changes.
|
|
2696
2696
|
*/
|
|
2697
2697
|
static updateMemory(options) {
|
|
2698
2698
|
return (options.client ?? client).put({
|
|
@@ -2705,6 +2705,17 @@ var Memories = class {
|
|
|
2705
2705
|
});
|
|
2706
2706
|
}
|
|
2707
2707
|
/**
|
|
2708
|
+
* List a memory's assertions
|
|
2709
|
+
*
|
|
2710
|
+
* 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.
|
|
2711
|
+
*/
|
|
2712
|
+
static listMemoryAssertions(options) {
|
|
2713
|
+
return (options.client ?? client).get({
|
|
2714
|
+
url: "/api/v1/memories/{memory_id}/assertions",
|
|
2715
|
+
...options
|
|
2716
|
+
});
|
|
2717
|
+
}
|
|
2718
|
+
/**
|
|
2708
2719
|
* Get memory tags
|
|
2709
2720
|
*
|
|
2710
2721
|
* Returns all tags attached to the memory
|
|
@@ -2746,26 +2757,26 @@ var Memories = class {
|
|
|
2746
2757
|
});
|
|
2747
2758
|
}
|
|
2748
2759
|
};
|
|
2749
|
-
var
|
|
2760
|
+
var MemoryStores = class {
|
|
2750
2761
|
/**
|
|
2751
|
-
* List memory
|
|
2762
|
+
* List memory stores
|
|
2752
2763
|
*
|
|
2753
|
-
* Returns
|
|
2764
|
+
* Returns a list of memory store configurations for a project
|
|
2754
2765
|
*/
|
|
2755
|
-
static
|
|
2756
|
-
return (options
|
|
2757
|
-
url: "/api/v1/memory-
|
|
2766
|
+
static listMemoryStores(options) {
|
|
2767
|
+
return (options?.client ?? client).get({
|
|
2768
|
+
url: "/api/v1/memory-stores",
|
|
2758
2769
|
...options
|
|
2759
2770
|
});
|
|
2760
2771
|
}
|
|
2761
2772
|
/**
|
|
2762
|
-
* Create a memory
|
|
2773
|
+
* Create a memory store
|
|
2763
2774
|
*
|
|
2764
|
-
* Creates a new
|
|
2775
|
+
* Creates a new memory store configuration in a project
|
|
2765
2776
|
*/
|
|
2766
|
-
static
|
|
2777
|
+
static createMemoryStore(options) {
|
|
2767
2778
|
return (options.client ?? client).post({
|
|
2768
|
-
url: "/api/v1/memory-
|
|
2779
|
+
url: "/api/v1/memory-stores",
|
|
2769
2780
|
...options,
|
|
2770
2781
|
headers: {
|
|
2771
2782
|
"Content-Type": "application/json",
|
|
@@ -2774,35 +2785,35 @@ var MemoryEntries = class {
|
|
|
2774
2785
|
});
|
|
2775
2786
|
}
|
|
2776
2787
|
/**
|
|
2777
|
-
* Delete a memory
|
|
2788
|
+
* Delete a memory store
|
|
2778
2789
|
*
|
|
2779
|
-
* Deletes a memory
|
|
2790
|
+
* Deletes a memory store configuration
|
|
2780
2791
|
*/
|
|
2781
|
-
static
|
|
2792
|
+
static deleteMemoryStore(options) {
|
|
2782
2793
|
return (options.client ?? client).delete({
|
|
2783
|
-
url: "/api/v1/memory-
|
|
2794
|
+
url: "/api/v1/memory-stores/{memory_store_id}",
|
|
2784
2795
|
...options
|
|
2785
2796
|
});
|
|
2786
2797
|
}
|
|
2787
2798
|
/**
|
|
2788
|
-
* Get a memory
|
|
2799
|
+
* Get a memory store
|
|
2789
2800
|
*
|
|
2790
|
-
* Returns a single memory
|
|
2801
|
+
* Returns a single memory store configuration by ID
|
|
2791
2802
|
*/
|
|
2792
|
-
static
|
|
2803
|
+
static getMemoryStore(options) {
|
|
2793
2804
|
return (options.client ?? client).get({
|
|
2794
|
-
url: "/api/v1/memory-
|
|
2805
|
+
url: "/api/v1/memory-stores/{memory_store_id}",
|
|
2795
2806
|
...options
|
|
2796
2807
|
});
|
|
2797
2808
|
}
|
|
2798
2809
|
/**
|
|
2799
|
-
* Update a memory
|
|
2810
|
+
* Update a memory store
|
|
2800
2811
|
*
|
|
2801
|
-
* Updates an existing memory
|
|
2812
|
+
* Updates an existing memory store configuration
|
|
2802
2813
|
*/
|
|
2803
|
-
static
|
|
2814
|
+
static updateMemoryStore(options) {
|
|
2804
2815
|
return (options.client ?? client).put({
|
|
2805
|
-
url: "/api/v1/memory-
|
|
2816
|
+
url: "/api/v1/memory-stores/{memory_store_id}",
|
|
2806
2817
|
...options,
|
|
2807
2818
|
headers: {
|
|
2808
2819
|
"Content-Type": "application/json",
|
|
@@ -2811,24 +2822,35 @@ var MemoryEntries = class {
|
|
|
2811
2822
|
});
|
|
2812
2823
|
}
|
|
2813
2824
|
/**
|
|
2814
|
-
*
|
|
2825
|
+
* List a memory store's write assertions
|
|
2826
|
+
*
|
|
2827
|
+
* 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.
|
|
2828
|
+
*/
|
|
2829
|
+
static listMemoryStoreAssertions(options) {
|
|
2830
|
+
return (options.client ?? client).get({
|
|
2831
|
+
url: "/api/v1/memory-stores/{memory_store_id}/assertions",
|
|
2832
|
+
...options
|
|
2833
|
+
});
|
|
2834
|
+
}
|
|
2835
|
+
/**
|
|
2836
|
+
* Get memory store tags
|
|
2815
2837
|
*
|
|
2816
|
-
* Returns all tags attached to the memory
|
|
2838
|
+
* Returns all tags attached to the memory store
|
|
2817
2839
|
*/
|
|
2818
|
-
static
|
|
2840
|
+
static getMemoryStoreTags(options) {
|
|
2819
2841
|
return (options.client ?? client).get({
|
|
2820
|
-
url: "/api/v1/memory-
|
|
2842
|
+
url: "/api/v1/memory-stores/{memory_store_id}/tags",
|
|
2821
2843
|
...options
|
|
2822
2844
|
});
|
|
2823
2845
|
}
|
|
2824
2846
|
/**
|
|
2825
|
-
* Merge memory
|
|
2847
|
+
* Merge memory store tags
|
|
2826
2848
|
*
|
|
2827
|
-
* Merges provided tags into the memory
|
|
2849
|
+
* Merges provided tags into the memory store's existing tags (existing tags are preserved unless overridden)
|
|
2828
2850
|
*/
|
|
2829
|
-
static
|
|
2851
|
+
static mergeMemoryStoreTags(options) {
|
|
2830
2852
|
return (options.client ?? client).patch({
|
|
2831
|
-
url: "/api/v1/memory-
|
|
2853
|
+
url: "/api/v1/memory-stores/{memory_store_id}/tags",
|
|
2832
2854
|
...options,
|
|
2833
2855
|
headers: {
|
|
2834
2856
|
"Content-Type": "application/json",
|
|
@@ -2837,13 +2859,13 @@ var MemoryEntries = class {
|
|
|
2837
2859
|
});
|
|
2838
2860
|
}
|
|
2839
2861
|
/**
|
|
2840
|
-
* Replace memory
|
|
2862
|
+
* Replace memory store tags
|
|
2841
2863
|
*
|
|
2842
|
-
* Replaces all tags on the memory
|
|
2864
|
+
* Replaces all tags on the memory store with the provided tags (not merged)
|
|
2843
2865
|
*/
|
|
2844
|
-
static
|
|
2866
|
+
static replaceMemoryStoreTags(options) {
|
|
2845
2867
|
return (options.client ?? client).put({
|
|
2846
|
-
url: "/api/v1/memory-
|
|
2868
|
+
url: "/api/v1/memory-stores/{memory_store_id}/tags",
|
|
2847
2869
|
...options,
|
|
2848
2870
|
headers: {
|
|
2849
2871
|
"Content-Type": "application/json",
|
|
@@ -3255,7 +3277,7 @@ var Projects = class {
|
|
|
3255
3277
|
*
|
|
3256
3278
|
* 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.
|
|
3257
3279
|
*
|
|
3258
|
-
* 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,
|
|
3280
|
+
* 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.
|
|
3259
3281
|
*
|
|
3260
3282
|
*/
|
|
3261
3283
|
static deleteProject(options) {
|
|
@@ -3336,7 +3358,7 @@ var Quotas = class {
|
|
|
3336
3358
|
*
|
|
3337
3359
|
* 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.
|
|
3338
3360
|
*
|
|
3339
|
-
* `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
|
|
3361
|
+
* `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.
|
|
3340
3362
|
*/
|
|
3341
3363
|
static createQuota(options) {
|
|
3342
3364
|
return (options.client ?? client).post({
|
|
@@ -4538,7 +4560,7 @@ var SoatClient = class {
|
|
|
4538
4560
|
ingestionRules;
|
|
4539
4561
|
knowledge;
|
|
4540
4562
|
memories;
|
|
4541
|
-
|
|
4563
|
+
memoryStores;
|
|
4542
4564
|
modelRoutes;
|
|
4543
4565
|
orchestrations;
|
|
4544
4566
|
policies;
|
|
@@ -4585,7 +4607,7 @@ var SoatClient = class {
|
|
|
4585
4607
|
this.ingestionRules = bindResource(IngestionRules, httpClient);
|
|
4586
4608
|
this.knowledge = bindResource(Knowledge, httpClient);
|
|
4587
4609
|
this.memories = bindResource(Memories, httpClient);
|
|
4588
|
-
this.
|
|
4610
|
+
this.memoryStores = bindResource(MemoryStores, httpClient);
|
|
4589
4611
|
this.modelRoutes = bindResource(ModelRoutes, httpClient);
|
|
4590
4612
|
this.orchestrations = bindResource(Orchestrations, httpClient);
|
|
4591
4613
|
this.policies = bindResource(Policies, httpClient);
|
|
@@ -4626,7 +4648,7 @@ exports.Guardrails = Guardrails;
|
|
|
4626
4648
|
exports.IngestionRules = IngestionRules;
|
|
4627
4649
|
exports.Knowledge = Knowledge;
|
|
4628
4650
|
exports.Memories = Memories;
|
|
4629
|
-
exports.
|
|
4651
|
+
exports.MemoryStores = MemoryStores;
|
|
4630
4652
|
exports.ModelRoutes = ModelRoutes;
|
|
4631
4653
|
exports.Orchestrations = Orchestrations;
|
|
4632
4654
|
exports.Policies = Policies;
|