@naturali/sdk 0.129.0 → 0.131.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 +70 -2
- package/dist/index.d.cts +742 -203
- package/dist/index.d.mts +742 -203
- package/dist/index.mjs +70 -3
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -2756,7 +2756,7 @@ var Generations = class {
|
|
|
2756
2756
|
/**
|
|
2757
2757
|
* List generations
|
|
2758
2758
|
*
|
|
2759
|
-
* Returns generations the caller can access, optionally filtered by agent, trace, orchestration run, node, and status.
|
|
2759
|
+
* 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.
|
|
2760
2760
|
*
|
|
2761
2761
|
* 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.
|
|
2762
2762
|
*
|
|
@@ -3052,7 +3052,7 @@ var Memories = class {
|
|
|
3052
3052
|
/**
|
|
3053
3053
|
* Create a memory
|
|
3054
3054
|
*
|
|
3055
|
-
* 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.
|
|
3055
|
+
* 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.
|
|
3056
3056
|
*/
|
|
3057
3057
|
static createMemory(options) {
|
|
3058
3058
|
return (options.client ?? client).post({
|
|
@@ -3154,6 +3154,71 @@ var Memories = class {
|
|
|
3154
3154
|
});
|
|
3155
3155
|
}
|
|
3156
3156
|
};
|
|
3157
|
+
var MemoryRules = class {
|
|
3158
|
+
/**
|
|
3159
|
+
* List memory rules
|
|
3160
|
+
*
|
|
3161
|
+
* 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.
|
|
3162
|
+
*/
|
|
3163
|
+
static listMemoryRules(options) {
|
|
3164
|
+
return (options.client ?? client).get({
|
|
3165
|
+
url: "/v1/projects/{project_id}/memory-rules",
|
|
3166
|
+
...options
|
|
3167
|
+
});
|
|
3168
|
+
}
|
|
3169
|
+
/**
|
|
3170
|
+
* Create a memory rule
|
|
3171
|
+
*
|
|
3172
|
+
* 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`.
|
|
3173
|
+
*/
|
|
3174
|
+
static createMemoryRule(options) {
|
|
3175
|
+
return (options.client ?? client).post({
|
|
3176
|
+
url: "/v1/projects/{project_id}/memory-rules",
|
|
3177
|
+
...options,
|
|
3178
|
+
headers: {
|
|
3179
|
+
"Content-Type": "application/json",
|
|
3180
|
+
...options.headers
|
|
3181
|
+
}
|
|
3182
|
+
});
|
|
3183
|
+
}
|
|
3184
|
+
/**
|
|
3185
|
+
* Delete a memory rule
|
|
3186
|
+
*
|
|
3187
|
+
* Deletes a memory rule. The assertions it wrote are kept; their `rule_id` becomes null.
|
|
3188
|
+
*/
|
|
3189
|
+
static deleteMemoryRule(options) {
|
|
3190
|
+
return (options.client ?? client).delete({
|
|
3191
|
+
url: "/v1/projects/{project_id}/memory-rules/{memory_rule_id}",
|
|
3192
|
+
...options
|
|
3193
|
+
});
|
|
3194
|
+
}
|
|
3195
|
+
/**
|
|
3196
|
+
* Get a memory rule
|
|
3197
|
+
*
|
|
3198
|
+
* Returns a specific memory rule
|
|
3199
|
+
*/
|
|
3200
|
+
static getMemoryRule(options) {
|
|
3201
|
+
return (options.client ?? client).get({
|
|
3202
|
+
url: "/v1/projects/{project_id}/memory-rules/{memory_rule_id}",
|
|
3203
|
+
...options
|
|
3204
|
+
});
|
|
3205
|
+
}
|
|
3206
|
+
/**
|
|
3207
|
+
* Update a memory rule
|
|
3208
|
+
*
|
|
3209
|
+
* 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.
|
|
3210
|
+
*/
|
|
3211
|
+
static updateMemoryRule(options) {
|
|
3212
|
+
return (options.client ?? client).patch({
|
|
3213
|
+
url: "/v1/projects/{project_id}/memory-rules/{memory_rule_id}",
|
|
3214
|
+
...options,
|
|
3215
|
+
headers: {
|
|
3216
|
+
"Content-Type": "application/json",
|
|
3217
|
+
...options.headers
|
|
3218
|
+
}
|
|
3219
|
+
});
|
|
3220
|
+
}
|
|
3221
|
+
};
|
|
3157
3222
|
var MemoryStores = class {
|
|
3158
3223
|
/**
|
|
3159
3224
|
* List memory stores
|
|
@@ -4905,6 +4970,7 @@ var NaturaliClient = class {
|
|
|
4905
4970
|
ingestionRules;
|
|
4906
4971
|
knowledge;
|
|
4907
4972
|
memories;
|
|
4973
|
+
memoryRules;
|
|
4908
4974
|
memoryStores;
|
|
4909
4975
|
modelRoutes;
|
|
4910
4976
|
quotas;
|
|
@@ -4955,6 +5021,7 @@ var NaturaliClient = class {
|
|
|
4955
5021
|
this.ingestionRules = bindResource(IngestionRules, this.http);
|
|
4956
5022
|
this.knowledge = bindResource(Knowledge, this.http);
|
|
4957
5023
|
this.memories = bindResource(Memories, this.http);
|
|
5024
|
+
this.memoryRules = bindResource(MemoryRules, this.http);
|
|
4958
5025
|
this.memoryStores = bindResource(MemoryStores, this.http);
|
|
4959
5026
|
this.modelRoutes = bindResource(ModelRoutes, this.http);
|
|
4960
5027
|
this.quotas = bindResource(Quotas, this.http);
|
|
@@ -4998,6 +5065,7 @@ exports.Guardrails = Guardrails;
|
|
|
4998
5065
|
exports.IngestionRules = IngestionRules;
|
|
4999
5066
|
exports.Knowledge = Knowledge;
|
|
5000
5067
|
exports.Memories = Memories;
|
|
5068
|
+
exports.MemoryRules = MemoryRules;
|
|
5001
5069
|
exports.MemoryStores = MemoryStores;
|
|
5002
5070
|
exports.ModelRoutes = ModelRoutes;
|
|
5003
5071
|
exports.Models = Models;
|