@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.cjs
CHANGED
|
@@ -3024,7 +3024,7 @@ var Knowledge = class {
|
|
|
3024
3024
|
/**
|
|
3025
3025
|
* Search knowledge
|
|
3026
3026
|
*
|
|
3027
|
-
* Searches across documents and
|
|
3027
|
+
* 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.
|
|
3028
3028
|
*/
|
|
3029
3029
|
static searchKnowledge(options) {
|
|
3030
3030
|
return (options.client ?? client).post({
|
|
@@ -3041,7 +3041,7 @@ var Memories = class {
|
|
|
3041
3041
|
/**
|
|
3042
3042
|
* List memories
|
|
3043
3043
|
*
|
|
3044
|
-
* Returns
|
|
3044
|
+
* Returns all memories in a memory store
|
|
3045
3045
|
*/
|
|
3046
3046
|
static listMemories(options) {
|
|
3047
3047
|
return (options.client ?? client).get({
|
|
@@ -3052,7 +3052,7 @@ var Memories = class {
|
|
|
3052
3052
|
/**
|
|
3053
3053
|
* Create a memory
|
|
3054
3054
|
*
|
|
3055
|
-
* Creates a new memory
|
|
3055
|
+
* 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.
|
|
3056
3056
|
*/
|
|
3057
3057
|
static createMemory(options) {
|
|
3058
3058
|
return (options.client ?? client).post({
|
|
@@ -3067,7 +3067,7 @@ var Memories = class {
|
|
|
3067
3067
|
/**
|
|
3068
3068
|
* Delete a memory
|
|
3069
3069
|
*
|
|
3070
|
-
* Deletes a memory
|
|
3070
|
+
* Deletes a memory
|
|
3071
3071
|
*/
|
|
3072
3072
|
static deleteMemory(options) {
|
|
3073
3073
|
return (options.client ?? client).delete({
|
|
@@ -3078,7 +3078,7 @@ var Memories = class {
|
|
|
3078
3078
|
/**
|
|
3079
3079
|
* Get a memory
|
|
3080
3080
|
*
|
|
3081
|
-
* Returns a single memory
|
|
3081
|
+
* Returns a single memory by ID
|
|
3082
3082
|
*/
|
|
3083
3083
|
static getMemory(options) {
|
|
3084
3084
|
return (options.client ?? client).get({
|
|
@@ -3089,7 +3089,7 @@ var Memories = class {
|
|
|
3089
3089
|
/**
|
|
3090
3090
|
* Update a memory
|
|
3091
3091
|
*
|
|
3092
|
-
* Updates an existing memory
|
|
3092
|
+
* Updates an existing memory. Regenerates the embedding if content changes.
|
|
3093
3093
|
*/
|
|
3094
3094
|
static updateMemory(options) {
|
|
3095
3095
|
return (options.client ?? client).put({
|
|
@@ -3143,26 +3143,26 @@ var Memories = class {
|
|
|
3143
3143
|
});
|
|
3144
3144
|
}
|
|
3145
3145
|
};
|
|
3146
|
-
var
|
|
3146
|
+
var MemoryStores = class {
|
|
3147
3147
|
/**
|
|
3148
|
-
* List memory
|
|
3148
|
+
* List memory stores
|
|
3149
3149
|
*
|
|
3150
|
-
* Returns
|
|
3150
|
+
* Returns a list of memory store configurations for a project
|
|
3151
3151
|
*/
|
|
3152
|
-
static
|
|
3152
|
+
static listMemoryStores(options) {
|
|
3153
3153
|
return (options.client ?? client).get({
|
|
3154
|
-
url: "/v1/projects/{project_id}/memory-
|
|
3154
|
+
url: "/v1/projects/{project_id}/memory-stores",
|
|
3155
3155
|
...options
|
|
3156
3156
|
});
|
|
3157
3157
|
}
|
|
3158
3158
|
/**
|
|
3159
|
-
* Create a memory
|
|
3159
|
+
* Create a memory store
|
|
3160
3160
|
*
|
|
3161
|
-
* Creates a new
|
|
3161
|
+
* Creates a new memory store configuration in a project
|
|
3162
3162
|
*/
|
|
3163
|
-
static
|
|
3163
|
+
static createMemoryStore(options) {
|
|
3164
3164
|
return (options.client ?? client).post({
|
|
3165
|
-
url: "/v1/projects/{project_id}/memory-
|
|
3165
|
+
url: "/v1/projects/{project_id}/memory-stores",
|
|
3166
3166
|
...options,
|
|
3167
3167
|
headers: {
|
|
3168
3168
|
"Content-Type": "application/json",
|
|
@@ -3171,35 +3171,35 @@ var MemoryEntries = class {
|
|
|
3171
3171
|
});
|
|
3172
3172
|
}
|
|
3173
3173
|
/**
|
|
3174
|
-
* Delete a memory
|
|
3174
|
+
* Delete a memory store
|
|
3175
3175
|
*
|
|
3176
|
-
* Deletes a memory
|
|
3176
|
+
* Deletes a memory store configuration
|
|
3177
3177
|
*/
|
|
3178
|
-
static
|
|
3178
|
+
static deleteMemoryStore(options) {
|
|
3179
3179
|
return (options.client ?? client).delete({
|
|
3180
|
-
url: "/v1/projects/{project_id}/memory-
|
|
3180
|
+
url: "/v1/projects/{project_id}/memory-stores/{memory_store_id}",
|
|
3181
3181
|
...options
|
|
3182
3182
|
});
|
|
3183
3183
|
}
|
|
3184
3184
|
/**
|
|
3185
|
-
* Get a memory
|
|
3185
|
+
* Get a memory store
|
|
3186
3186
|
*
|
|
3187
|
-
* Returns a single memory
|
|
3187
|
+
* Returns a single memory store configuration by ID
|
|
3188
3188
|
*/
|
|
3189
|
-
static
|
|
3189
|
+
static getMemoryStore(options) {
|
|
3190
3190
|
return (options.client ?? client).get({
|
|
3191
|
-
url: "/v1/projects/{project_id}/memory-
|
|
3191
|
+
url: "/v1/projects/{project_id}/memory-stores/{memory_store_id}",
|
|
3192
3192
|
...options
|
|
3193
3193
|
});
|
|
3194
3194
|
}
|
|
3195
3195
|
/**
|
|
3196
|
-
* Update a memory
|
|
3196
|
+
* Update a memory store
|
|
3197
3197
|
*
|
|
3198
|
-
* Updates an existing memory
|
|
3198
|
+
* Updates an existing memory store configuration
|
|
3199
3199
|
*/
|
|
3200
|
-
static
|
|
3200
|
+
static updateMemoryStore(options) {
|
|
3201
3201
|
return (options.client ?? client).put({
|
|
3202
|
-
url: "/v1/projects/{project_id}/memory-
|
|
3202
|
+
url: "/v1/projects/{project_id}/memory-stores/{memory_store_id}",
|
|
3203
3203
|
...options,
|
|
3204
3204
|
headers: {
|
|
3205
3205
|
"Content-Type": "application/json",
|
|
@@ -3208,24 +3208,24 @@ var MemoryEntries = class {
|
|
|
3208
3208
|
});
|
|
3209
3209
|
}
|
|
3210
3210
|
/**
|
|
3211
|
-
* Get memory
|
|
3211
|
+
* Get memory store tags
|
|
3212
3212
|
*
|
|
3213
|
-
* Returns all tags attached to the memory
|
|
3213
|
+
* Returns all tags attached to the memory store
|
|
3214
3214
|
*/
|
|
3215
|
-
static
|
|
3215
|
+
static getMemoryStoreTags(options) {
|
|
3216
3216
|
return (options.client ?? client).get({
|
|
3217
|
-
url: "/v1/projects/{project_id}/memory-
|
|
3217
|
+
url: "/v1/projects/{project_id}/memory-stores/{memory_store_id}/tags",
|
|
3218
3218
|
...options
|
|
3219
3219
|
});
|
|
3220
3220
|
}
|
|
3221
3221
|
/**
|
|
3222
|
-
* Merge memory
|
|
3222
|
+
* Merge memory store tags
|
|
3223
3223
|
*
|
|
3224
|
-
* Merges provided tags into the memory
|
|
3224
|
+
* Merges provided tags into the memory store's existing tags (existing tags are preserved unless overridden)
|
|
3225
3225
|
*/
|
|
3226
|
-
static
|
|
3226
|
+
static mergeMemoryStoreTags(options) {
|
|
3227
3227
|
return (options.client ?? client).patch({
|
|
3228
|
-
url: "/v1/projects/{project_id}/memory-
|
|
3228
|
+
url: "/v1/projects/{project_id}/memory-stores/{memory_store_id}/tags",
|
|
3229
3229
|
...options,
|
|
3230
3230
|
headers: {
|
|
3231
3231
|
"Content-Type": "application/json",
|
|
@@ -3234,13 +3234,13 @@ var MemoryEntries = class {
|
|
|
3234
3234
|
});
|
|
3235
3235
|
}
|
|
3236
3236
|
/**
|
|
3237
|
-
* Replace memory
|
|
3237
|
+
* Replace memory store tags
|
|
3238
3238
|
*
|
|
3239
|
-
* Replaces all tags on the memory
|
|
3239
|
+
* Replaces all tags on the memory store with the provided tags (not merged)
|
|
3240
3240
|
*/
|
|
3241
|
-
static
|
|
3241
|
+
static replaceMemoryStoreTags(options) {
|
|
3242
3242
|
return (options.client ?? client).put({
|
|
3243
|
-
url: "/v1/projects/{project_id}/memory-
|
|
3243
|
+
url: "/v1/projects/{project_id}/memory-stores/{memory_store_id}/tags",
|
|
3244
3244
|
...options,
|
|
3245
3245
|
headers: {
|
|
3246
3246
|
"Content-Type": "application/json",
|
|
@@ -3827,7 +3827,7 @@ var Quotas = class {
|
|
|
3827
3827
|
*
|
|
3828
3828
|
* 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.
|
|
3829
3829
|
*
|
|
3830
|
-
* `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
|
|
3830
|
+
* `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.
|
|
3831
3831
|
*/
|
|
3832
3832
|
static createQuota(options) {
|
|
3833
3833
|
return (options.client ?? client).post({
|
|
@@ -4883,7 +4883,7 @@ var NaturaliClient = class {
|
|
|
4883
4883
|
ingestionRules;
|
|
4884
4884
|
knowledge;
|
|
4885
4885
|
memories;
|
|
4886
|
-
|
|
4886
|
+
memoryStores;
|
|
4887
4887
|
modelRoutes;
|
|
4888
4888
|
quotas;
|
|
4889
4889
|
models;
|
|
@@ -4933,7 +4933,7 @@ var NaturaliClient = class {
|
|
|
4933
4933
|
this.ingestionRules = bindResource(IngestionRules, this.http);
|
|
4934
4934
|
this.knowledge = bindResource(Knowledge, this.http);
|
|
4935
4935
|
this.memories = bindResource(Memories, this.http);
|
|
4936
|
-
this.
|
|
4936
|
+
this.memoryStores = bindResource(MemoryStores, this.http);
|
|
4937
4937
|
this.modelRoutes = bindResource(ModelRoutes, this.http);
|
|
4938
4938
|
this.quotas = bindResource(Quotas, this.http);
|
|
4939
4939
|
this.models = bindResource(Models, this.http);
|
|
@@ -4976,7 +4976,7 @@ exports.Guardrails = Guardrails;
|
|
|
4976
4976
|
exports.IngestionRules = IngestionRules;
|
|
4977
4977
|
exports.Knowledge = Knowledge;
|
|
4978
4978
|
exports.Memories = Memories;
|
|
4979
|
-
exports.
|
|
4979
|
+
exports.MemoryStores = MemoryStores;
|
|
4980
4980
|
exports.ModelRoutes = ModelRoutes;
|
|
4981
4981
|
exports.Models = Models;
|
|
4982
4982
|
exports.NaturaliClient = NaturaliClient;
|