@soat/sdk 0.49.0 → 0.50.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 +48 -52
- package/dist/index.d.cts +309 -306
- package/dist/index.d.mts +309 -306
- package/dist/index.mjs +48 -52
- package/package.json +6 -6
package/dist/index.mjs
CHANGED
|
@@ -353,9 +353,7 @@ async function setAuthParams(options) {
|
|
|
353
353
|
case "cookie":
|
|
354
354
|
options.headers.append("Cookie", `${name}=${token}`);
|
|
355
355
|
break;
|
|
356
|
-
default:
|
|
357
|
-
options.headers.set(name, token);
|
|
358
|
-
break;
|
|
356
|
+
default: options.headers.set(name, token);
|
|
359
357
|
}
|
|
360
358
|
}
|
|
361
359
|
}
|
|
@@ -512,9 +510,7 @@ const createClient = (config = {}) => {
|
|
|
512
510
|
case "stream":
|
|
513
511
|
emptyData = response.body;
|
|
514
512
|
break;
|
|
515
|
-
default:
|
|
516
|
-
emptyData = {};
|
|
517
|
-
break;
|
|
513
|
+
default: emptyData = {};
|
|
518
514
|
}
|
|
519
515
|
return opts.responseStyle === "data" ? emptyData : {
|
|
520
516
|
data: emptyData,
|
|
@@ -2630,7 +2626,7 @@ var Knowledge = class {
|
|
|
2630
2626
|
/**
|
|
2631
2627
|
* Search knowledge
|
|
2632
2628
|
*
|
|
2633
|
-
* 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.
|
|
2634
2630
|
*/
|
|
2635
2631
|
static searchKnowledge(options) {
|
|
2636
2632
|
return (options.client ?? client).post({
|
|
@@ -2647,10 +2643,10 @@ var Memories = class {
|
|
|
2647
2643
|
/**
|
|
2648
2644
|
* List memories
|
|
2649
2645
|
*
|
|
2650
|
-
* Returns
|
|
2646
|
+
* Returns all memories in a memory store
|
|
2651
2647
|
*/
|
|
2652
2648
|
static listMemories(options) {
|
|
2653
|
-
return (options
|
|
2649
|
+
return (options.client ?? client).get({
|
|
2654
2650
|
url: "/api/v1/memories",
|
|
2655
2651
|
...options
|
|
2656
2652
|
});
|
|
@@ -2658,7 +2654,7 @@ var Memories = class {
|
|
|
2658
2654
|
/**
|
|
2659
2655
|
* Create a memory
|
|
2660
2656
|
*
|
|
2661
|
-
* Creates a new memory
|
|
2657
|
+
* Creates a new memory in the specified memory store. Automatically generates an embedding for semantic search, and skips the write when an existing memory is a near-duplicate (see `duplicate_threshold`). A merely similar fact is stored as its own memory: this path has no agent context and therefore no model to consolidate two facts into one.
|
|
2662
2658
|
*/
|
|
2663
2659
|
static createMemory(options) {
|
|
2664
2660
|
return (options.client ?? client).post({
|
|
@@ -2673,7 +2669,7 @@ var Memories = class {
|
|
|
2673
2669
|
/**
|
|
2674
2670
|
* Delete a memory
|
|
2675
2671
|
*
|
|
2676
|
-
* Deletes a memory
|
|
2672
|
+
* Deletes a memory
|
|
2677
2673
|
*/
|
|
2678
2674
|
static deleteMemory(options) {
|
|
2679
2675
|
return (options.client ?? client).delete({
|
|
@@ -2684,7 +2680,7 @@ var Memories = class {
|
|
|
2684
2680
|
/**
|
|
2685
2681
|
* Get a memory
|
|
2686
2682
|
*
|
|
2687
|
-
* Returns a single memory
|
|
2683
|
+
* Returns a single memory by ID
|
|
2688
2684
|
*/
|
|
2689
2685
|
static getMemory(options) {
|
|
2690
2686
|
return (options.client ?? client).get({
|
|
@@ -2695,7 +2691,7 @@ var Memories = class {
|
|
|
2695
2691
|
/**
|
|
2696
2692
|
* Update a memory
|
|
2697
2693
|
*
|
|
2698
|
-
* Updates an existing memory
|
|
2694
|
+
* Updates an existing memory. Regenerates the embedding if content changes.
|
|
2699
2695
|
*/
|
|
2700
2696
|
static updateMemory(options) {
|
|
2701
2697
|
return (options.client ?? client).put({
|
|
@@ -2749,26 +2745,26 @@ var Memories = class {
|
|
|
2749
2745
|
});
|
|
2750
2746
|
}
|
|
2751
2747
|
};
|
|
2752
|
-
var
|
|
2748
|
+
var MemoryStores = class {
|
|
2753
2749
|
/**
|
|
2754
|
-
* List memory
|
|
2750
|
+
* List memory stores
|
|
2755
2751
|
*
|
|
2756
|
-
* Returns
|
|
2752
|
+
* Returns a list of memory store configurations for a project
|
|
2757
2753
|
*/
|
|
2758
|
-
static
|
|
2759
|
-
return (options
|
|
2760
|
-
url: "/api/v1/memory-
|
|
2754
|
+
static listMemoryStores(options) {
|
|
2755
|
+
return (options?.client ?? client).get({
|
|
2756
|
+
url: "/api/v1/memory-stores",
|
|
2761
2757
|
...options
|
|
2762
2758
|
});
|
|
2763
2759
|
}
|
|
2764
2760
|
/**
|
|
2765
|
-
* Create a memory
|
|
2761
|
+
* Create a memory store
|
|
2766
2762
|
*
|
|
2767
|
-
* Creates a new
|
|
2763
|
+
* Creates a new memory store configuration in a project
|
|
2768
2764
|
*/
|
|
2769
|
-
static
|
|
2765
|
+
static createMemoryStore(options) {
|
|
2770
2766
|
return (options.client ?? client).post({
|
|
2771
|
-
url: "/api/v1/memory-
|
|
2767
|
+
url: "/api/v1/memory-stores",
|
|
2772
2768
|
...options,
|
|
2773
2769
|
headers: {
|
|
2774
2770
|
"Content-Type": "application/json",
|
|
@@ -2777,35 +2773,35 @@ var MemoryEntries = class {
|
|
|
2777
2773
|
});
|
|
2778
2774
|
}
|
|
2779
2775
|
/**
|
|
2780
|
-
* Delete a memory
|
|
2776
|
+
* Delete a memory store
|
|
2781
2777
|
*
|
|
2782
|
-
* Deletes a memory
|
|
2778
|
+
* Deletes a memory store configuration
|
|
2783
2779
|
*/
|
|
2784
|
-
static
|
|
2780
|
+
static deleteMemoryStore(options) {
|
|
2785
2781
|
return (options.client ?? client).delete({
|
|
2786
|
-
url: "/api/v1/memory-
|
|
2782
|
+
url: "/api/v1/memory-stores/{memory_store_id}",
|
|
2787
2783
|
...options
|
|
2788
2784
|
});
|
|
2789
2785
|
}
|
|
2790
2786
|
/**
|
|
2791
|
-
* Get a memory
|
|
2787
|
+
* Get a memory store
|
|
2792
2788
|
*
|
|
2793
|
-
* Returns a single memory
|
|
2789
|
+
* Returns a single memory store configuration by ID
|
|
2794
2790
|
*/
|
|
2795
|
-
static
|
|
2791
|
+
static getMemoryStore(options) {
|
|
2796
2792
|
return (options.client ?? client).get({
|
|
2797
|
-
url: "/api/v1/memory-
|
|
2793
|
+
url: "/api/v1/memory-stores/{memory_store_id}",
|
|
2798
2794
|
...options
|
|
2799
2795
|
});
|
|
2800
2796
|
}
|
|
2801
2797
|
/**
|
|
2802
|
-
* Update a memory
|
|
2798
|
+
* Update a memory store
|
|
2803
2799
|
*
|
|
2804
|
-
* Updates an existing memory
|
|
2800
|
+
* Updates an existing memory store configuration
|
|
2805
2801
|
*/
|
|
2806
|
-
static
|
|
2802
|
+
static updateMemoryStore(options) {
|
|
2807
2803
|
return (options.client ?? client).put({
|
|
2808
|
-
url: "/api/v1/memory-
|
|
2804
|
+
url: "/api/v1/memory-stores/{memory_store_id}",
|
|
2809
2805
|
...options,
|
|
2810
2806
|
headers: {
|
|
2811
2807
|
"Content-Type": "application/json",
|
|
@@ -2814,24 +2810,24 @@ var MemoryEntries = class {
|
|
|
2814
2810
|
});
|
|
2815
2811
|
}
|
|
2816
2812
|
/**
|
|
2817
|
-
* Get memory
|
|
2813
|
+
* Get memory store tags
|
|
2818
2814
|
*
|
|
2819
|
-
* Returns all tags attached to the memory
|
|
2815
|
+
* Returns all tags attached to the memory store
|
|
2820
2816
|
*/
|
|
2821
|
-
static
|
|
2817
|
+
static getMemoryStoreTags(options) {
|
|
2822
2818
|
return (options.client ?? client).get({
|
|
2823
|
-
url: "/api/v1/memory-
|
|
2819
|
+
url: "/api/v1/memory-stores/{memory_store_id}/tags",
|
|
2824
2820
|
...options
|
|
2825
2821
|
});
|
|
2826
2822
|
}
|
|
2827
2823
|
/**
|
|
2828
|
-
* Merge memory
|
|
2824
|
+
* Merge memory store tags
|
|
2829
2825
|
*
|
|
2830
|
-
* Merges provided tags into the memory
|
|
2826
|
+
* Merges provided tags into the memory store's existing tags (existing tags are preserved unless overridden)
|
|
2831
2827
|
*/
|
|
2832
|
-
static
|
|
2828
|
+
static mergeMemoryStoreTags(options) {
|
|
2833
2829
|
return (options.client ?? client).patch({
|
|
2834
|
-
url: "/api/v1/memory-
|
|
2830
|
+
url: "/api/v1/memory-stores/{memory_store_id}/tags",
|
|
2835
2831
|
...options,
|
|
2836
2832
|
headers: {
|
|
2837
2833
|
"Content-Type": "application/json",
|
|
@@ -2840,13 +2836,13 @@ var MemoryEntries = class {
|
|
|
2840
2836
|
});
|
|
2841
2837
|
}
|
|
2842
2838
|
/**
|
|
2843
|
-
* Replace memory
|
|
2839
|
+
* Replace memory store tags
|
|
2844
2840
|
*
|
|
2845
|
-
* Replaces all tags on the memory
|
|
2841
|
+
* Replaces all tags on the memory store with the provided tags (not merged)
|
|
2846
2842
|
*/
|
|
2847
|
-
static
|
|
2843
|
+
static replaceMemoryStoreTags(options) {
|
|
2848
2844
|
return (options.client ?? client).put({
|
|
2849
|
-
url: "/api/v1/memory-
|
|
2845
|
+
url: "/api/v1/memory-stores/{memory_store_id}/tags",
|
|
2850
2846
|
...options,
|
|
2851
2847
|
headers: {
|
|
2852
2848
|
"Content-Type": "application/json",
|
|
@@ -3258,7 +3254,7 @@ var Projects = class {
|
|
|
3258
3254
|
*
|
|
3259
3255
|
* 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.
|
|
3260
3256
|
*
|
|
3261
|
-
* 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,
|
|
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, 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.
|
|
3262
3258
|
*
|
|
3263
3259
|
*/
|
|
3264
3260
|
static deleteProject(options) {
|
|
@@ -3339,7 +3335,7 @@ var Quotas = class {
|
|
|
3339
3335
|
*
|
|
3340
3336
|
* 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.
|
|
3341
3337
|
*
|
|
3342
|
-
* `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
|
|
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 create — with `409 QUOTA_STORAGE_EXCEEDED` and no `Retry-After`, since no window reset clears a footprint.
|
|
3343
3339
|
*/
|
|
3344
3340
|
static createQuota(options) {
|
|
3345
3341
|
return (options.client ?? client).post({
|
|
@@ -4541,7 +4537,7 @@ var SoatClient = class {
|
|
|
4541
4537
|
ingestionRules;
|
|
4542
4538
|
knowledge;
|
|
4543
4539
|
memories;
|
|
4544
|
-
|
|
4540
|
+
memoryStores;
|
|
4545
4541
|
modelRoutes;
|
|
4546
4542
|
orchestrations;
|
|
4547
4543
|
policies;
|
|
@@ -4588,7 +4584,7 @@ var SoatClient = class {
|
|
|
4588
4584
|
this.ingestionRules = bindResource(IngestionRules, httpClient);
|
|
4589
4585
|
this.knowledge = bindResource(Knowledge, httpClient);
|
|
4590
4586
|
this.memories = bindResource(Memories, httpClient);
|
|
4591
|
-
this.
|
|
4587
|
+
this.memoryStores = bindResource(MemoryStores, httpClient);
|
|
4592
4588
|
this.modelRoutes = bindResource(ModelRoutes, httpClient);
|
|
4593
4589
|
this.orchestrations = bindResource(Orchestrations, httpClient);
|
|
4594
4590
|
this.policies = bindResource(Policies, httpClient);
|
|
@@ -4607,4 +4603,4 @@ var SoatClient = class {
|
|
|
4607
4603
|
}
|
|
4608
4604
|
};
|
|
4609
4605
|
//#endregion
|
|
4610
|
-
export { Activity, Actors, AgentVersions, Agents, AiProviders, ApiKeys, Approvals, AuditLog, Chains, Chats, Conversations, Documents, Embeddings, Evaluations, Exceptions, Files, Formations, Generations, Guardrails, IngestionRules, Knowledge, Memories,
|
|
4606
|
+
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 };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soat/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.50.0",
|
|
4
4
|
"description": "TypeScript SDK for SOAT — open-source infrastructure for production-ready AI agents.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai-agents",
|
|
@@ -42,11 +42,11 @@
|
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@hey-api/openapi-ts": "^0.99.0",
|
|
45
|
-
"@ttoss/config": "^1.
|
|
46
|
-
"@ttoss/openapi-codegen": "^0.
|
|
47
|
-
"@types/node": "^26.
|
|
48
|
-
"tsdown": "^0.
|
|
49
|
-
"tsx": "^4.23.
|
|
45
|
+
"@ttoss/config": "^1.38.0",
|
|
46
|
+
"@ttoss/openapi-codegen": "^0.3.0",
|
|
47
|
+
"@types/node": "^26.5.1",
|
|
48
|
+
"tsdown": "^0.23.0",
|
|
49
|
+
"tsx": "^4.23.13",
|
|
50
50
|
"typescript": "~6.0.3"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|