@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.mjs
CHANGED
|
@@ -2755,7 +2755,7 @@ var Generations = class {
|
|
|
2755
2755
|
/**
|
|
2756
2756
|
* List generations
|
|
2757
2757
|
*
|
|
2758
|
-
* Returns generations the caller can access, optionally filtered by agent, trace, orchestration run, node, and status.
|
|
2758
|
+
* 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.
|
|
2759
2759
|
*
|
|
2760
2760
|
* 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.
|
|
2761
2761
|
*
|
|
@@ -3051,7 +3051,7 @@ var Memories = class {
|
|
|
3051
3051
|
/**
|
|
3052
3052
|
* Create a memory
|
|
3053
3053
|
*
|
|
3054
|
-
* 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.
|
|
3054
|
+
* 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.
|
|
3055
3055
|
*/
|
|
3056
3056
|
static createMemory(options) {
|
|
3057
3057
|
return (options.client ?? client).post({
|
|
@@ -3153,6 +3153,71 @@ var Memories = class {
|
|
|
3153
3153
|
});
|
|
3154
3154
|
}
|
|
3155
3155
|
};
|
|
3156
|
+
var MemoryRules = class {
|
|
3157
|
+
/**
|
|
3158
|
+
* List memory rules
|
|
3159
|
+
*
|
|
3160
|
+
* 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.
|
|
3161
|
+
*/
|
|
3162
|
+
static listMemoryRules(options) {
|
|
3163
|
+
return (options.client ?? client).get({
|
|
3164
|
+
url: "/v1/projects/{project_id}/memory-rules",
|
|
3165
|
+
...options
|
|
3166
|
+
});
|
|
3167
|
+
}
|
|
3168
|
+
/**
|
|
3169
|
+
* Create a memory rule
|
|
3170
|
+
*
|
|
3171
|
+
* 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`.
|
|
3172
|
+
*/
|
|
3173
|
+
static createMemoryRule(options) {
|
|
3174
|
+
return (options.client ?? client).post({
|
|
3175
|
+
url: "/v1/projects/{project_id}/memory-rules",
|
|
3176
|
+
...options,
|
|
3177
|
+
headers: {
|
|
3178
|
+
"Content-Type": "application/json",
|
|
3179
|
+
...options.headers
|
|
3180
|
+
}
|
|
3181
|
+
});
|
|
3182
|
+
}
|
|
3183
|
+
/**
|
|
3184
|
+
* Delete a memory rule
|
|
3185
|
+
*
|
|
3186
|
+
* Deletes a memory rule. The assertions it wrote are kept; their `rule_id` becomes null.
|
|
3187
|
+
*/
|
|
3188
|
+
static deleteMemoryRule(options) {
|
|
3189
|
+
return (options.client ?? client).delete({
|
|
3190
|
+
url: "/v1/projects/{project_id}/memory-rules/{memory_rule_id}",
|
|
3191
|
+
...options
|
|
3192
|
+
});
|
|
3193
|
+
}
|
|
3194
|
+
/**
|
|
3195
|
+
* Get a memory rule
|
|
3196
|
+
*
|
|
3197
|
+
* Returns a specific memory rule
|
|
3198
|
+
*/
|
|
3199
|
+
static getMemoryRule(options) {
|
|
3200
|
+
return (options.client ?? client).get({
|
|
3201
|
+
url: "/v1/projects/{project_id}/memory-rules/{memory_rule_id}",
|
|
3202
|
+
...options
|
|
3203
|
+
});
|
|
3204
|
+
}
|
|
3205
|
+
/**
|
|
3206
|
+
* Update a memory rule
|
|
3207
|
+
*
|
|
3208
|
+
* 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.
|
|
3209
|
+
*/
|
|
3210
|
+
static updateMemoryRule(options) {
|
|
3211
|
+
return (options.client ?? client).patch({
|
|
3212
|
+
url: "/v1/projects/{project_id}/memory-rules/{memory_rule_id}",
|
|
3213
|
+
...options,
|
|
3214
|
+
headers: {
|
|
3215
|
+
"Content-Type": "application/json",
|
|
3216
|
+
...options.headers
|
|
3217
|
+
}
|
|
3218
|
+
});
|
|
3219
|
+
}
|
|
3220
|
+
};
|
|
3156
3221
|
var MemoryStores = class {
|
|
3157
3222
|
/**
|
|
3158
3223
|
* List memory stores
|
|
@@ -4904,6 +4969,7 @@ var NaturaliClient = class {
|
|
|
4904
4969
|
ingestionRules;
|
|
4905
4970
|
knowledge;
|
|
4906
4971
|
memories;
|
|
4972
|
+
memoryRules;
|
|
4907
4973
|
memoryStores;
|
|
4908
4974
|
modelRoutes;
|
|
4909
4975
|
quotas;
|
|
@@ -4954,6 +5020,7 @@ var NaturaliClient = class {
|
|
|
4954
5020
|
this.ingestionRules = bindResource(IngestionRules, this.http);
|
|
4955
5021
|
this.knowledge = bindResource(Knowledge, this.http);
|
|
4956
5022
|
this.memories = bindResource(Memories, this.http);
|
|
5023
|
+
this.memoryRules = bindResource(MemoryRules, this.http);
|
|
4957
5024
|
this.memoryStores = bindResource(MemoryStores, this.http);
|
|
4958
5025
|
this.modelRoutes = bindResource(ModelRoutes, this.http);
|
|
4959
5026
|
this.quotas = bindResource(Quotas, this.http);
|
|
@@ -4972,4 +5039,4 @@ var NaturaliClient = class {
|
|
|
4972
5039
|
}
|
|
4973
5040
|
};
|
|
4974
5041
|
//#endregion
|
|
4975
|
-
export { Activity, Actors, Admin, AgentVersions, Agents, AiProviders, ApiKeys, Approvals, Assistant, AuditLog, Auth, Chains, Channels, Conversations, Documents, Embeddings, Evaluations, Exceptions, Files, Formations, Generations, Guardrails, IngestionRules, Knowledge, Memories, MemoryStores, ModelRoutes, Models, NaturaliClient, Orchestrations, Projects, Quotas, Secrets, Sessions, Tasks, Tools, Traces, Triggers, Users, Webhooks, Workflows, createClient, createConfig };
|
|
5042
|
+
export { Activity, Actors, Admin, AgentVersions, Agents, AiProviders, ApiKeys, Approvals, Assistant, AuditLog, Auth, Chains, Channels, Conversations, Documents, Embeddings, Evaluations, Exceptions, Files, Formations, Generations, Guardrails, IngestionRules, Knowledge, Memories, MemoryRules, MemoryStores, ModelRoutes, Models, NaturaliClient, Orchestrations, Projects, Quotas, Secrets, Sessions, Tasks, Tools, Traces, Triggers, Users, Webhooks, Workflows, createClient, createConfig };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.131.0",
|
|
4
4
|
"description": "TypeScript SDK for the naturali.ai API, generated from its OpenAPI specs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@hey-api/openapi-ts": "^0.99.0",
|
|
34
|
-
"@naturali/api": "0.
|
|
34
|
+
"@naturali/api": "0.131.0",
|
|
35
35
|
"@ttoss/openapi-codegen": "^0.3.0",
|
|
36
36
|
"@types/node": "^26.5.1",
|
|
37
37
|
"tsdown": "^0.23.0",
|