@soat/sdk 0.50.0 → 0.52.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.mjs CHANGED
@@ -2358,7 +2358,7 @@ var Generations = class {
2358
2358
  /**
2359
2359
  * List generations
2360
2360
  *
2361
- * Returns generations the caller can access, optionally filtered by agent, trace, orchestration run, node, and status. Replaces the former per-trace generations endpoint (use the trace_id query filter).
2361
+ * Returns generations the caller can access, optionally filtered by agent, trace, orchestration run, node, and status. The generations of one trace are the `trace_id` filter.
2362
2362
  *
2363
2363
  * Filtering by `orchestration_run_id` is the supported way to get from an orchestration run to the generations its agent nodes produced: a node execution record carries no generation id, so the pointer lives here, alongside the run's other attribution columns.
2364
2364
  *
@@ -2654,7 +2654,7 @@ var Memories = class {
2654
2654
  /**
2655
2655
  * Create a memory
2656
2656
  *
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.
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. `supersedes` overrides that comparison entirely, retiring the memory it names. Every call records one assertion, whatever the outcome.
2658
2658
  */
2659
2659
  static createMemory(options) {
2660
2660
  return (options.client ?? client).post({
@@ -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,6 +2756,71 @@ var Memories = class {
2745
2756
  });
2746
2757
  }
2747
2758
  };
2759
+ var MemoryRules = class {
2760
+ /**
2761
+ * List memory rules
2762
+ *
2763
+ * Returns memory rules, newest first. Narrow to one store with `memory_store_id` — that form is authorized against the store itself, so it answers "what feeds this store?" in one call.
2764
+ */
2765
+ static listMemoryRules(options) {
2766
+ return (options?.client ?? client).get({
2767
+ url: "/api/v1/memory-rules",
2768
+ ...options
2769
+ });
2770
+ }
2771
+ /**
2772
+ * Create a memory rule
2773
+ *
2774
+ * Creates an ingestion rule on a memory store. With neither `agent_id` nor `tool_id` the built-in extractor runs, configurable through `prompt`, `ai_provider_id` and `model`.
2775
+ */
2776
+ static createMemoryRule(options) {
2777
+ return (options.client ?? client).post({
2778
+ url: "/api/v1/memory-rules",
2779
+ ...options,
2780
+ headers: {
2781
+ "Content-Type": "application/json",
2782
+ ...options.headers
2783
+ }
2784
+ });
2785
+ }
2786
+ /**
2787
+ * Delete a memory rule
2788
+ *
2789
+ * Deletes a memory rule. The assertions it wrote are kept; their `rule_id` becomes null.
2790
+ */
2791
+ static deleteMemoryRule(options) {
2792
+ return (options.client ?? client).delete({
2793
+ url: "/api/v1/memory-rules/{memory_rule_id}",
2794
+ ...options
2795
+ });
2796
+ }
2797
+ /**
2798
+ * Get a memory rule
2799
+ *
2800
+ * Returns a specific memory rule
2801
+ */
2802
+ static getMemoryRule(options) {
2803
+ return (options.client ?? client).get({
2804
+ url: "/api/v1/memory-rules/{memory_rule_id}",
2805
+ ...options
2806
+ });
2807
+ }
2808
+ /**
2809
+ * Update a memory rule
2810
+ *
2811
+ * Updates a memory rule. Validation runs against the rule as it would stand after the change, so a one-field update cannot pair a handler with a stored extractor override from the side.
2812
+ */
2813
+ static updateMemoryRule(options) {
2814
+ return (options.client ?? client).patch({
2815
+ url: "/api/v1/memory-rules/{memory_rule_id}",
2816
+ ...options,
2817
+ headers: {
2818
+ "Content-Type": "application/json",
2819
+ ...options.headers
2820
+ }
2821
+ });
2822
+ }
2823
+ };
2748
2824
  var MemoryStores = class {
2749
2825
  /**
2750
2826
  * List memory stores
@@ -2810,6 +2886,17 @@ var MemoryStores = class {
2810
2886
  });
2811
2887
  }
2812
2888
  /**
2889
+ * List a memory store's write assertions
2890
+ *
2891
+ * 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.
2892
+ */
2893
+ static listMemoryStoreAssertions(options) {
2894
+ return (options.client ?? client).get({
2895
+ url: "/api/v1/memory-stores/{memory_store_id}/assertions",
2896
+ ...options
2897
+ });
2898
+ }
2899
+ /**
2813
2900
  * Get memory store tags
2814
2901
  *
2815
2902
  * Returns all tags attached to the memory store
@@ -3155,7 +3242,7 @@ var Policies = class {
3155
3242
  /**
3156
3243
  * List all policies
3157
3244
  *
3158
- * Returns global policies. Requires admin role. Pass user_id to list only the policies attached to that user (replaces the former per-user policies endpoint).
3245
+ * Returns global policies. Requires admin role. Pass user_id to list only the policies attached to that user.
3159
3246
  *
3160
3247
  */
3161
3248
  static listPolicies(options) {
@@ -4537,6 +4624,7 @@ var SoatClient = class {
4537
4624
  ingestionRules;
4538
4625
  knowledge;
4539
4626
  memories;
4627
+ memoryRules;
4540
4628
  memoryStores;
4541
4629
  modelRoutes;
4542
4630
  orchestrations;
@@ -4584,6 +4672,7 @@ var SoatClient = class {
4584
4672
  this.ingestionRules = bindResource(IngestionRules, httpClient);
4585
4673
  this.knowledge = bindResource(Knowledge, httpClient);
4586
4674
  this.memories = bindResource(Memories, httpClient);
4675
+ this.memoryRules = bindResource(MemoryRules, httpClient);
4587
4676
  this.memoryStores = bindResource(MemoryStores, httpClient);
4588
4677
  this.modelRoutes = bindResource(ModelRoutes, httpClient);
4589
4678
  this.orchestrations = bindResource(Orchestrations, httpClient);
@@ -4603,4 +4692,4 @@ var SoatClient = class {
4603
4692
  }
4604
4693
  };
4605
4694
  //#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, MemoryStores, ModelRoutes, Orchestrations, Policies, Projects, Quotas, Secrets, Sessions, SoatClient, Tasks, Tools, Traces, Triggers, Usage, Users, Webhooks, Workflows, createClient, createConfig };
4695
+ export { Activity, Actors, AgentVersions, Agents, AiProviders, ApiKeys, Approvals, AuditLog, Chains, Chats, Conversations, Documents, Embeddings, Evaluations, Exceptions, Files, Formations, Generations, Guardrails, IngestionRules, Knowledge, Memories, MemoryRules, 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.50.0",
3
+ "version": "0.52.0",
4
4
  "description": "TypeScript SDK for SOAT — open-source infrastructure for production-ready AI agents.",
5
5
  "keywords": [
6
6
  "ai-agents",