@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.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
|
-
*
|
|
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({
|
|
@@ -3101,6 +3101,17 @@ var Memories = class {
|
|
|
3101
3101
|
});
|
|
3102
3102
|
}
|
|
3103
3103
|
/**
|
|
3104
|
+
* List a memory's assertions
|
|
3105
|
+
*
|
|
3106
|
+
* 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.
|
|
3107
|
+
*/
|
|
3108
|
+
static listMemoryAssertions(options) {
|
|
3109
|
+
return (options.client ?? client).get({
|
|
3110
|
+
url: "/v1/projects/{project_id}/memories/{memory_id}/assertions",
|
|
3111
|
+
...options
|
|
3112
|
+
});
|
|
3113
|
+
}
|
|
3114
|
+
/**
|
|
3104
3115
|
* Get memory tags
|
|
3105
3116
|
*
|
|
3106
3117
|
* Returns all tags attached to the memory
|
|
@@ -3142,6 +3153,71 @@ var Memories = class {
|
|
|
3142
3153
|
});
|
|
3143
3154
|
}
|
|
3144
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
|
+
};
|
|
3145
3221
|
var MemoryStores = class {
|
|
3146
3222
|
/**
|
|
3147
3223
|
* List memory stores
|
|
@@ -3207,6 +3283,17 @@ var MemoryStores = class {
|
|
|
3207
3283
|
});
|
|
3208
3284
|
}
|
|
3209
3285
|
/**
|
|
3286
|
+
* List a memory store's write assertions
|
|
3287
|
+
*
|
|
3288
|
+
* 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.
|
|
3289
|
+
*/
|
|
3290
|
+
static listMemoryStoreAssertions(options) {
|
|
3291
|
+
return (options.client ?? client).get({
|
|
3292
|
+
url: "/v1/projects/{project_id}/memory-stores/{memory_store_id}/assertions",
|
|
3293
|
+
...options
|
|
3294
|
+
});
|
|
3295
|
+
}
|
|
3296
|
+
/**
|
|
3210
3297
|
* Get memory store tags
|
|
3211
3298
|
*
|
|
3212
3299
|
* Returns all tags attached to the memory store
|
|
@@ -4882,6 +4969,7 @@ var NaturaliClient = class {
|
|
|
4882
4969
|
ingestionRules;
|
|
4883
4970
|
knowledge;
|
|
4884
4971
|
memories;
|
|
4972
|
+
memoryRules;
|
|
4885
4973
|
memoryStores;
|
|
4886
4974
|
modelRoutes;
|
|
4887
4975
|
quotas;
|
|
@@ -4932,6 +5020,7 @@ var NaturaliClient = class {
|
|
|
4932
5020
|
this.ingestionRules = bindResource(IngestionRules, this.http);
|
|
4933
5021
|
this.knowledge = bindResource(Knowledge, this.http);
|
|
4934
5022
|
this.memories = bindResource(Memories, this.http);
|
|
5023
|
+
this.memoryRules = bindResource(MemoryRules, this.http);
|
|
4935
5024
|
this.memoryStores = bindResource(MemoryStores, this.http);
|
|
4936
5025
|
this.modelRoutes = bindResource(ModelRoutes, this.http);
|
|
4937
5026
|
this.quotas = bindResource(Quotas, this.http);
|
|
@@ -4950,4 +5039,4 @@ var NaturaliClient = class {
|
|
|
4950
5039
|
}
|
|
4951
5040
|
};
|
|
4952
5041
|
//#endregion
|
|
4953
|
-
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.130.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.130.0",
|
|
35
35
|
"@ttoss/openapi-codegen": "^0.3.0",
|
|
36
36
|
"@types/node": "^26.5.1",
|
|
37
37
|
"tsdown": "^0.23.0",
|