@naturali/sdk 0.128.0 → 0.130.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 +92 -2
- package/dist/index.d.cts +697 -145
- package/dist/index.d.mts +697 -145
- package/dist/index.mjs +92 -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
|
-
*
|
|
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({
|
|
@@ -3102,6 +3102,17 @@ var Memories = class {
|
|
|
3102
3102
|
});
|
|
3103
3103
|
}
|
|
3104
3104
|
/**
|
|
3105
|
+
* List a memory's assertions
|
|
3106
|
+
*
|
|
3107
|
+
* 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.
|
|
3108
|
+
*/
|
|
3109
|
+
static listMemoryAssertions(options) {
|
|
3110
|
+
return (options.client ?? client).get({
|
|
3111
|
+
url: "/v1/projects/{project_id}/memories/{memory_id}/assertions",
|
|
3112
|
+
...options
|
|
3113
|
+
});
|
|
3114
|
+
}
|
|
3115
|
+
/**
|
|
3105
3116
|
* Get memory tags
|
|
3106
3117
|
*
|
|
3107
3118
|
* Returns all tags attached to the memory
|
|
@@ -3143,6 +3154,71 @@ var Memories = class {
|
|
|
3143
3154
|
});
|
|
3144
3155
|
}
|
|
3145
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
|
+
};
|
|
3146
3222
|
var MemoryStores = class {
|
|
3147
3223
|
/**
|
|
3148
3224
|
* List memory stores
|
|
@@ -3208,6 +3284,17 @@ var MemoryStores = class {
|
|
|
3208
3284
|
});
|
|
3209
3285
|
}
|
|
3210
3286
|
/**
|
|
3287
|
+
* List a memory store's write assertions
|
|
3288
|
+
*
|
|
3289
|
+
* 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.
|
|
3290
|
+
*/
|
|
3291
|
+
static listMemoryStoreAssertions(options) {
|
|
3292
|
+
return (options.client ?? client).get({
|
|
3293
|
+
url: "/v1/projects/{project_id}/memory-stores/{memory_store_id}/assertions",
|
|
3294
|
+
...options
|
|
3295
|
+
});
|
|
3296
|
+
}
|
|
3297
|
+
/**
|
|
3211
3298
|
* Get memory store tags
|
|
3212
3299
|
*
|
|
3213
3300
|
* Returns all tags attached to the memory store
|
|
@@ -4883,6 +4970,7 @@ var NaturaliClient = class {
|
|
|
4883
4970
|
ingestionRules;
|
|
4884
4971
|
knowledge;
|
|
4885
4972
|
memories;
|
|
4973
|
+
memoryRules;
|
|
4886
4974
|
memoryStores;
|
|
4887
4975
|
modelRoutes;
|
|
4888
4976
|
quotas;
|
|
@@ -4933,6 +5021,7 @@ var NaturaliClient = class {
|
|
|
4933
5021
|
this.ingestionRules = bindResource(IngestionRules, this.http);
|
|
4934
5022
|
this.knowledge = bindResource(Knowledge, this.http);
|
|
4935
5023
|
this.memories = bindResource(Memories, this.http);
|
|
5024
|
+
this.memoryRules = bindResource(MemoryRules, this.http);
|
|
4936
5025
|
this.memoryStores = bindResource(MemoryStores, this.http);
|
|
4937
5026
|
this.modelRoutes = bindResource(ModelRoutes, this.http);
|
|
4938
5027
|
this.quotas = bindResource(Quotas, this.http);
|
|
@@ -4976,6 +5065,7 @@ exports.Guardrails = Guardrails;
|
|
|
4976
5065
|
exports.IngestionRules = IngestionRules;
|
|
4977
5066
|
exports.Knowledge = Knowledge;
|
|
4978
5067
|
exports.Memories = Memories;
|
|
5068
|
+
exports.MemoryRules = MemoryRules;
|
|
4979
5069
|
exports.MemoryStores = MemoryStores;
|
|
4980
5070
|
exports.ModelRoutes = ModelRoutes;
|
|
4981
5071
|
exports.Models = Models;
|