@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 CHANGED
@@ -354,9 +354,7 @@ async function setAuthParams(options) {
354
354
  case "cookie":
355
355
  options.headers.append("Cookie", `${name}=${token}`);
356
356
  break;
357
- default:
358
- options.headers.set(name, token);
359
- break;
357
+ default: options.headers.set(name, token);
360
358
  }
361
359
  }
362
360
  }
@@ -513,9 +511,7 @@ const createClient = (config = {}) => {
513
511
  case "stream":
514
512
  emptyData = response.body;
515
513
  break;
516
- default:
517
- emptyData = {};
518
- break;
514
+ default: emptyData = {};
519
515
  }
520
516
  return opts.responseStyle === "data" ? emptyData : {
521
517
  data: emptyData,
@@ -2631,7 +2627,7 @@ var Knowledge = class {
2631
2627
  /**
2632
2628
  * Search knowledge
2633
2629
  *
2634
- * Searches across documents and memory entries using hybrid retrieval — a vector query and a full-text query per source, fused by reciprocal rank — or by file paths, document IDs, memory IDs, or tags. At least one of `query`, `tags`, `document_paths`, `document_ids`, or `memory_ids` must be provided.
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.
2635
2631
  */
2636
2632
  static searchKnowledge(options) {
2637
2633
  return (options.client ?? client).post({
@@ -2648,10 +2644,10 @@ var Memories = class {
2648
2644
  /**
2649
2645
  * List memories
2650
2646
  *
2651
- * Returns a list of memory configurations for a project
2647
+ * Returns all memories in a memory store
2652
2648
  */
2653
2649
  static listMemories(options) {
2654
- return (options?.client ?? client).get({
2650
+ return (options.client ?? client).get({
2655
2651
  url: "/api/v1/memories",
2656
2652
  ...options
2657
2653
  });
@@ -2659,7 +2655,7 @@ var Memories = class {
2659
2655
  /**
2660
2656
  * Create a memory
2661
2657
  *
2662
- * Creates a new memory configuration in a project
2658
+ * 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.
2663
2659
  */
2664
2660
  static createMemory(options) {
2665
2661
  return (options.client ?? client).post({
@@ -2674,7 +2670,7 @@ var Memories = class {
2674
2670
  /**
2675
2671
  * Delete a memory
2676
2672
  *
2677
- * Deletes a memory configuration
2673
+ * Deletes a memory
2678
2674
  */
2679
2675
  static deleteMemory(options) {
2680
2676
  return (options.client ?? client).delete({
@@ -2685,7 +2681,7 @@ var Memories = class {
2685
2681
  /**
2686
2682
  * Get a memory
2687
2683
  *
2688
- * Returns a single memory configuration by ID
2684
+ * Returns a single memory by ID
2689
2685
  */
2690
2686
  static getMemory(options) {
2691
2687
  return (options.client ?? client).get({
@@ -2696,7 +2692,7 @@ var Memories = class {
2696
2692
  /**
2697
2693
  * Update a memory
2698
2694
  *
2699
- * Updates an existing memory configuration
2695
+ * Updates an existing memory. Regenerates the embedding if content changes.
2700
2696
  */
2701
2697
  static updateMemory(options) {
2702
2698
  return (options.client ?? client).put({
@@ -2750,26 +2746,26 @@ var Memories = class {
2750
2746
  });
2751
2747
  }
2752
2748
  };
2753
- var MemoryEntries = class {
2749
+ var MemoryStores = class {
2754
2750
  /**
2755
- * List memory entries
2751
+ * List memory stores
2756
2752
  *
2757
- * Returns all entries in a memory container
2753
+ * Returns a list of memory store configurations for a project
2758
2754
  */
2759
- static listMemoryEntries(options) {
2760
- return (options.client ?? client).get({
2761
- url: "/api/v1/memory-entries",
2755
+ static listMemoryStores(options) {
2756
+ return (options?.client ?? client).get({
2757
+ url: "/api/v1/memory-stores",
2762
2758
  ...options
2763
2759
  });
2764
2760
  }
2765
2761
  /**
2766
- * Create a memory entry
2762
+ * Create a memory store
2767
2763
  *
2768
- * Creates a new entry in the specified memory container. Automatically generates an embedding for semantic search, and skips the write when an existing entry is a near-duplicate (see `duplicate_threshold`). A merely similar fact is stored as its own entry: this path has no agent context and therefore no model to consolidate two facts into one.
2764
+ * Creates a new memory store configuration in a project
2769
2765
  */
2770
- static createMemoryEntry(options) {
2766
+ static createMemoryStore(options) {
2771
2767
  return (options.client ?? client).post({
2772
- url: "/api/v1/memory-entries",
2768
+ url: "/api/v1/memory-stores",
2773
2769
  ...options,
2774
2770
  headers: {
2775
2771
  "Content-Type": "application/json",
@@ -2778,35 +2774,35 @@ var MemoryEntries = class {
2778
2774
  });
2779
2775
  }
2780
2776
  /**
2781
- * Delete a memory entry
2777
+ * Delete a memory store
2782
2778
  *
2783
- * Deletes a memory entry
2779
+ * Deletes a memory store configuration
2784
2780
  */
2785
- static deleteMemoryEntry(options) {
2781
+ static deleteMemoryStore(options) {
2786
2782
  return (options.client ?? client).delete({
2787
- url: "/api/v1/memory-entries/{entry_id}",
2783
+ url: "/api/v1/memory-stores/{memory_store_id}",
2788
2784
  ...options
2789
2785
  });
2790
2786
  }
2791
2787
  /**
2792
- * Get a memory entry
2788
+ * Get a memory store
2793
2789
  *
2794
- * Returns a single memory entry by ID
2790
+ * Returns a single memory store configuration by ID
2795
2791
  */
2796
- static getMemoryEntry(options) {
2792
+ static getMemoryStore(options) {
2797
2793
  return (options.client ?? client).get({
2798
- url: "/api/v1/memory-entries/{entry_id}",
2794
+ url: "/api/v1/memory-stores/{memory_store_id}",
2799
2795
  ...options
2800
2796
  });
2801
2797
  }
2802
2798
  /**
2803
- * Update a memory entry
2799
+ * Update a memory store
2804
2800
  *
2805
- * Updates an existing memory entry. Regenerates the embedding if content changes.
2801
+ * Updates an existing memory store configuration
2806
2802
  */
2807
- static updateMemoryEntry(options) {
2803
+ static updateMemoryStore(options) {
2808
2804
  return (options.client ?? client).put({
2809
- url: "/api/v1/memory-entries/{entry_id}",
2805
+ url: "/api/v1/memory-stores/{memory_store_id}",
2810
2806
  ...options,
2811
2807
  headers: {
2812
2808
  "Content-Type": "application/json",
@@ -2815,24 +2811,24 @@ var MemoryEntries = class {
2815
2811
  });
2816
2812
  }
2817
2813
  /**
2818
- * Get memory entry tags
2814
+ * Get memory store tags
2819
2815
  *
2820
- * Returns all tags attached to the memory entry
2816
+ * Returns all tags attached to the memory store
2821
2817
  */
2822
- static getMemoryEntryTags(options) {
2818
+ static getMemoryStoreTags(options) {
2823
2819
  return (options.client ?? client).get({
2824
- url: "/api/v1/memory-entries/{entry_id}/tags",
2820
+ url: "/api/v1/memory-stores/{memory_store_id}/tags",
2825
2821
  ...options
2826
2822
  });
2827
2823
  }
2828
2824
  /**
2829
- * Merge memory entry tags
2825
+ * Merge memory store tags
2830
2826
  *
2831
- * Merges provided tags into the memory entry's existing tags (existing tags are preserved unless overridden)
2827
+ * Merges provided tags into the memory store's existing tags (existing tags are preserved unless overridden)
2832
2828
  */
2833
- static mergeMemoryEntryTags(options) {
2829
+ static mergeMemoryStoreTags(options) {
2834
2830
  return (options.client ?? client).patch({
2835
- url: "/api/v1/memory-entries/{entry_id}/tags",
2831
+ url: "/api/v1/memory-stores/{memory_store_id}/tags",
2836
2832
  ...options,
2837
2833
  headers: {
2838
2834
  "Content-Type": "application/json",
@@ -2841,13 +2837,13 @@ var MemoryEntries = class {
2841
2837
  });
2842
2838
  }
2843
2839
  /**
2844
- * Replace memory entry tags
2840
+ * Replace memory store tags
2845
2841
  *
2846
- * Replaces all tags on the memory entry with the provided tags (not merged)
2842
+ * Replaces all tags on the memory store with the provided tags (not merged)
2847
2843
  */
2848
- static replaceMemoryEntryTags(options) {
2844
+ static replaceMemoryStoreTags(options) {
2849
2845
  return (options.client ?? client).put({
2850
- url: "/api/v1/memory-entries/{entry_id}/tags",
2846
+ url: "/api/v1/memory-stores/{memory_store_id}/tags",
2851
2847
  ...options,
2852
2848
  headers: {
2853
2849
  "Content-Type": "application/json",
@@ -3259,7 +3255,7 @@ var Projects = class {
3259
3255
  *
3260
3256
  * 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.
3261
3257
  *
3262
- * 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, memories, 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
+ * 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.
3263
3259
  *
3264
3260
  */
3265
3261
  static deleteProject(options) {
@@ -3340,7 +3336,7 @@ var Quotas = class {
3340
3336
  *
3341
3337
  * 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.
3342
3338
  *
3343
- * `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-entry create — with `409 QUOTA_STORAGE_EXCEEDED` and no `Retry-After`, since no window reset clears a footprint.
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 create — with `409 QUOTA_STORAGE_EXCEEDED` and no `Retry-After`, since no window reset clears a footprint.
3344
3340
  */
3345
3341
  static createQuota(options) {
3346
3342
  return (options.client ?? client).post({
@@ -4542,7 +4538,7 @@ var SoatClient = class {
4542
4538
  ingestionRules;
4543
4539
  knowledge;
4544
4540
  memories;
4545
- memoryEntries;
4541
+ memoryStores;
4546
4542
  modelRoutes;
4547
4543
  orchestrations;
4548
4544
  policies;
@@ -4589,7 +4585,7 @@ var SoatClient = class {
4589
4585
  this.ingestionRules = bindResource(IngestionRules, httpClient);
4590
4586
  this.knowledge = bindResource(Knowledge, httpClient);
4591
4587
  this.memories = bindResource(Memories, httpClient);
4592
- this.memoryEntries = bindResource(MemoryEntries, httpClient);
4588
+ this.memoryStores = bindResource(MemoryStores, httpClient);
4593
4589
  this.modelRoutes = bindResource(ModelRoutes, httpClient);
4594
4590
  this.orchestrations = bindResource(Orchestrations, httpClient);
4595
4591
  this.policies = bindResource(Policies, httpClient);
@@ -4630,7 +4626,7 @@ exports.Guardrails = Guardrails;
4630
4626
  exports.IngestionRules = IngestionRules;
4631
4627
  exports.Knowledge = Knowledge;
4632
4628
  exports.Memories = Memories;
4633
- exports.MemoryEntries = MemoryEntries;
4629
+ exports.MemoryStores = MemoryStores;
4634
4630
  exports.ModelRoutes = ModelRoutes;
4635
4631
  exports.Orchestrations = Orchestrations;
4636
4632
  exports.Policies = Policies;