@naturali/sdk 0.127.10 → 0.128.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 +43 -43
- package/dist/index.d.cts +265 -262
- package/dist/index.d.mts +265 -262
- package/dist/index.mjs +43 -43
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -3023,7 +3023,7 @@ var Knowledge = class {
|
|
|
3023
3023
|
/**
|
|
3024
3024
|
* Search knowledge
|
|
3025
3025
|
*
|
|
3026
|
-
* Searches across documents and
|
|
3026
|
+
* Searches across documents and memories using hybrid retrieval — a vector query and a full-text query per source, fused by reciprocal rank — or by file paths, document IDs, memory store IDs, or tags. At least one of `query`, `tags`, `document_paths`, `document_ids`, or `memory_store_ids` must be provided.
|
|
3027
3027
|
*/
|
|
3028
3028
|
static searchKnowledge(options) {
|
|
3029
3029
|
return (options.client ?? client).post({
|
|
@@ -3040,7 +3040,7 @@ var Memories = class {
|
|
|
3040
3040
|
/**
|
|
3041
3041
|
* List memories
|
|
3042
3042
|
*
|
|
3043
|
-
* Returns
|
|
3043
|
+
* Returns all memories in a memory store
|
|
3044
3044
|
*/
|
|
3045
3045
|
static listMemories(options) {
|
|
3046
3046
|
return (options.client ?? client).get({
|
|
@@ -3051,7 +3051,7 @@ var Memories = class {
|
|
|
3051
3051
|
/**
|
|
3052
3052
|
* Create a memory
|
|
3053
3053
|
*
|
|
3054
|
-
* Creates a new memory
|
|
3054
|
+
* 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.
|
|
3055
3055
|
*/
|
|
3056
3056
|
static createMemory(options) {
|
|
3057
3057
|
return (options.client ?? client).post({
|
|
@@ -3066,7 +3066,7 @@ var Memories = class {
|
|
|
3066
3066
|
/**
|
|
3067
3067
|
* Delete a memory
|
|
3068
3068
|
*
|
|
3069
|
-
* Deletes a memory
|
|
3069
|
+
* Deletes a memory
|
|
3070
3070
|
*/
|
|
3071
3071
|
static deleteMemory(options) {
|
|
3072
3072
|
return (options.client ?? client).delete({
|
|
@@ -3077,7 +3077,7 @@ var Memories = class {
|
|
|
3077
3077
|
/**
|
|
3078
3078
|
* Get a memory
|
|
3079
3079
|
*
|
|
3080
|
-
* Returns a single memory
|
|
3080
|
+
* Returns a single memory by ID
|
|
3081
3081
|
*/
|
|
3082
3082
|
static getMemory(options) {
|
|
3083
3083
|
return (options.client ?? client).get({
|
|
@@ -3088,7 +3088,7 @@ var Memories = class {
|
|
|
3088
3088
|
/**
|
|
3089
3089
|
* Update a memory
|
|
3090
3090
|
*
|
|
3091
|
-
* Updates an existing memory
|
|
3091
|
+
* Updates an existing memory. Regenerates the embedding if content changes.
|
|
3092
3092
|
*/
|
|
3093
3093
|
static updateMemory(options) {
|
|
3094
3094
|
return (options.client ?? client).put({
|
|
@@ -3142,26 +3142,26 @@ var Memories = class {
|
|
|
3142
3142
|
});
|
|
3143
3143
|
}
|
|
3144
3144
|
};
|
|
3145
|
-
var
|
|
3145
|
+
var MemoryStores = class {
|
|
3146
3146
|
/**
|
|
3147
|
-
* List memory
|
|
3147
|
+
* List memory stores
|
|
3148
3148
|
*
|
|
3149
|
-
* Returns
|
|
3149
|
+
* Returns a list of memory store configurations for a project
|
|
3150
3150
|
*/
|
|
3151
|
-
static
|
|
3151
|
+
static listMemoryStores(options) {
|
|
3152
3152
|
return (options.client ?? client).get({
|
|
3153
|
-
url: "/v1/projects/{project_id}/memory-
|
|
3153
|
+
url: "/v1/projects/{project_id}/memory-stores",
|
|
3154
3154
|
...options
|
|
3155
3155
|
});
|
|
3156
3156
|
}
|
|
3157
3157
|
/**
|
|
3158
|
-
* Create a memory
|
|
3158
|
+
* Create a memory store
|
|
3159
3159
|
*
|
|
3160
|
-
* Creates a new
|
|
3160
|
+
* Creates a new memory store configuration in a project
|
|
3161
3161
|
*/
|
|
3162
|
-
static
|
|
3162
|
+
static createMemoryStore(options) {
|
|
3163
3163
|
return (options.client ?? client).post({
|
|
3164
|
-
url: "/v1/projects/{project_id}/memory-
|
|
3164
|
+
url: "/v1/projects/{project_id}/memory-stores",
|
|
3165
3165
|
...options,
|
|
3166
3166
|
headers: {
|
|
3167
3167
|
"Content-Type": "application/json",
|
|
@@ -3170,35 +3170,35 @@ var MemoryEntries = class {
|
|
|
3170
3170
|
});
|
|
3171
3171
|
}
|
|
3172
3172
|
/**
|
|
3173
|
-
* Delete a memory
|
|
3173
|
+
* Delete a memory store
|
|
3174
3174
|
*
|
|
3175
|
-
* Deletes a memory
|
|
3175
|
+
* Deletes a memory store configuration
|
|
3176
3176
|
*/
|
|
3177
|
-
static
|
|
3177
|
+
static deleteMemoryStore(options) {
|
|
3178
3178
|
return (options.client ?? client).delete({
|
|
3179
|
-
url: "/v1/projects/{project_id}/memory-
|
|
3179
|
+
url: "/v1/projects/{project_id}/memory-stores/{memory_store_id}",
|
|
3180
3180
|
...options
|
|
3181
3181
|
});
|
|
3182
3182
|
}
|
|
3183
3183
|
/**
|
|
3184
|
-
* Get a memory
|
|
3184
|
+
* Get a memory store
|
|
3185
3185
|
*
|
|
3186
|
-
* Returns a single memory
|
|
3186
|
+
* Returns a single memory store configuration by ID
|
|
3187
3187
|
*/
|
|
3188
|
-
static
|
|
3188
|
+
static getMemoryStore(options) {
|
|
3189
3189
|
return (options.client ?? client).get({
|
|
3190
|
-
url: "/v1/projects/{project_id}/memory-
|
|
3190
|
+
url: "/v1/projects/{project_id}/memory-stores/{memory_store_id}",
|
|
3191
3191
|
...options
|
|
3192
3192
|
});
|
|
3193
3193
|
}
|
|
3194
3194
|
/**
|
|
3195
|
-
* Update a memory
|
|
3195
|
+
* Update a memory store
|
|
3196
3196
|
*
|
|
3197
|
-
* Updates an existing memory
|
|
3197
|
+
* Updates an existing memory store configuration
|
|
3198
3198
|
*/
|
|
3199
|
-
static
|
|
3199
|
+
static updateMemoryStore(options) {
|
|
3200
3200
|
return (options.client ?? client).put({
|
|
3201
|
-
url: "/v1/projects/{project_id}/memory-
|
|
3201
|
+
url: "/v1/projects/{project_id}/memory-stores/{memory_store_id}",
|
|
3202
3202
|
...options,
|
|
3203
3203
|
headers: {
|
|
3204
3204
|
"Content-Type": "application/json",
|
|
@@ -3207,24 +3207,24 @@ var MemoryEntries = class {
|
|
|
3207
3207
|
});
|
|
3208
3208
|
}
|
|
3209
3209
|
/**
|
|
3210
|
-
* Get memory
|
|
3210
|
+
* Get memory store tags
|
|
3211
3211
|
*
|
|
3212
|
-
* Returns all tags attached to the memory
|
|
3212
|
+
* Returns all tags attached to the memory store
|
|
3213
3213
|
*/
|
|
3214
|
-
static
|
|
3214
|
+
static getMemoryStoreTags(options) {
|
|
3215
3215
|
return (options.client ?? client).get({
|
|
3216
|
-
url: "/v1/projects/{project_id}/memory-
|
|
3216
|
+
url: "/v1/projects/{project_id}/memory-stores/{memory_store_id}/tags",
|
|
3217
3217
|
...options
|
|
3218
3218
|
});
|
|
3219
3219
|
}
|
|
3220
3220
|
/**
|
|
3221
|
-
* Merge memory
|
|
3221
|
+
* Merge memory store tags
|
|
3222
3222
|
*
|
|
3223
|
-
* Merges provided tags into the memory
|
|
3223
|
+
* Merges provided tags into the memory store's existing tags (existing tags are preserved unless overridden)
|
|
3224
3224
|
*/
|
|
3225
|
-
static
|
|
3225
|
+
static mergeMemoryStoreTags(options) {
|
|
3226
3226
|
return (options.client ?? client).patch({
|
|
3227
|
-
url: "/v1/projects/{project_id}/memory-
|
|
3227
|
+
url: "/v1/projects/{project_id}/memory-stores/{memory_store_id}/tags",
|
|
3228
3228
|
...options,
|
|
3229
3229
|
headers: {
|
|
3230
3230
|
"Content-Type": "application/json",
|
|
@@ -3233,13 +3233,13 @@ var MemoryEntries = class {
|
|
|
3233
3233
|
});
|
|
3234
3234
|
}
|
|
3235
3235
|
/**
|
|
3236
|
-
* Replace memory
|
|
3236
|
+
* Replace memory store tags
|
|
3237
3237
|
*
|
|
3238
|
-
* Replaces all tags on the memory
|
|
3238
|
+
* Replaces all tags on the memory store with the provided tags (not merged)
|
|
3239
3239
|
*/
|
|
3240
|
-
static
|
|
3240
|
+
static replaceMemoryStoreTags(options) {
|
|
3241
3241
|
return (options.client ?? client).put({
|
|
3242
|
-
url: "/v1/projects/{project_id}/memory-
|
|
3242
|
+
url: "/v1/projects/{project_id}/memory-stores/{memory_store_id}/tags",
|
|
3243
3243
|
...options,
|
|
3244
3244
|
headers: {
|
|
3245
3245
|
"Content-Type": "application/json",
|
|
@@ -3826,7 +3826,7 @@ var Quotas = class {
|
|
|
3826
3826
|
*
|
|
3827
3827
|
* Creates a project-scoped quota. `requests` is valid for `scope: project`/`api_key`; `tokens` and `cost_usd` are valid for `scope: project`/`agent`/`actor`; `storage_bytes` is valid for `scope: project` only. Any other scope/metric pair is rejected with 400 (no attribution exists to enforce it). An `actor` quota caps one end user's spend, matched from the generation's session; a null `scope_ref` means one budget *per* actor rather than a pooled project total. A `cost_usd` quota may name one `meter_type` to cap; omitting it caps every priced meter. A duplicate quota (same project, scope, scope_ref, metric, window, meter_type) is rejected with 409.
|
|
3828
3828
|
*
|
|
3829
|
-
* `storage_bytes` caps a stored total rather than a windowed one, so it takes `window: current` and every other metric refuses that value (400 either way). It is enforced at the corpus write paths — file upload and create, document create, document ingest and re-ingest, memory
|
|
3829
|
+
* `storage_bytes` caps a stored total rather than a windowed one, so it takes `window: current` and every other metric refuses that value (400 either way). It is enforced at the corpus write paths — file upload and create, document create, document ingest and re-ingest, memory create — with `409 QUOTA_STORAGE_EXCEEDED` and no `Retry-After`, since no window reset clears a footprint.
|
|
3830
3830
|
*/
|
|
3831
3831
|
static createQuota(options) {
|
|
3832
3832
|
return (options.client ?? client).post({
|
|
@@ -4882,7 +4882,7 @@ var NaturaliClient = class {
|
|
|
4882
4882
|
ingestionRules;
|
|
4883
4883
|
knowledge;
|
|
4884
4884
|
memories;
|
|
4885
|
-
|
|
4885
|
+
memoryStores;
|
|
4886
4886
|
modelRoutes;
|
|
4887
4887
|
quotas;
|
|
4888
4888
|
models;
|
|
@@ -4932,7 +4932,7 @@ var NaturaliClient = class {
|
|
|
4932
4932
|
this.ingestionRules = bindResource(IngestionRules, this.http);
|
|
4933
4933
|
this.knowledge = bindResource(Knowledge, this.http);
|
|
4934
4934
|
this.memories = bindResource(Memories, this.http);
|
|
4935
|
-
this.
|
|
4935
|
+
this.memoryStores = bindResource(MemoryStores, this.http);
|
|
4936
4936
|
this.modelRoutes = bindResource(ModelRoutes, this.http);
|
|
4937
4937
|
this.quotas = bindResource(Quotas, this.http);
|
|
4938
4938
|
this.models = bindResource(Models, this.http);
|
|
@@ -4950,4 +4950,4 @@ var NaturaliClient = class {
|
|
|
4950
4950
|
}
|
|
4951
4951
|
};
|
|
4952
4952
|
//#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,
|
|
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 };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.128.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.128.0",
|
|
35
35
|
"@ttoss/openapi-codegen": "^0.3.0",
|
|
36
36
|
"@types/node": "^26.5.1",
|
|
37
37
|
"tsdown": "^0.23.0",
|