@naturali/cli 0.127.11 → 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.mjs +182 -175
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -14,7 +14,7 @@ var __exportAll = (all, no_symbols) => {
|
|
|
14
14
|
};
|
|
15
15
|
//#endregion
|
|
16
16
|
//#region package.json
|
|
17
|
-
var version = "0.
|
|
17
|
+
var version = "0.128.0";
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region ../sdk/src/generated/core/bodySerializer.gen.ts
|
|
20
20
|
const serializeFormDataPair = (data, key, value) => {
|
|
@@ -3041,7 +3041,7 @@ var Knowledge = class {
|
|
|
3041
3041
|
/**
|
|
3042
3042
|
* Search knowledge
|
|
3043
3043
|
*
|
|
3044
|
-
* Searches across documents and
|
|
3044
|
+
* 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.
|
|
3045
3045
|
*/
|
|
3046
3046
|
static searchKnowledge(options) {
|
|
3047
3047
|
return (options.client ?? client).post({
|
|
@@ -3058,7 +3058,7 @@ var Memories = class {
|
|
|
3058
3058
|
/**
|
|
3059
3059
|
* List memories
|
|
3060
3060
|
*
|
|
3061
|
-
* Returns
|
|
3061
|
+
* Returns all memories in a memory store
|
|
3062
3062
|
*/
|
|
3063
3063
|
static listMemories(options) {
|
|
3064
3064
|
return (options.client ?? client).get({
|
|
@@ -3069,7 +3069,7 @@ var Memories = class {
|
|
|
3069
3069
|
/**
|
|
3070
3070
|
* Create a memory
|
|
3071
3071
|
*
|
|
3072
|
-
* Creates a new memory
|
|
3072
|
+
* 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.
|
|
3073
3073
|
*/
|
|
3074
3074
|
static createMemory(options) {
|
|
3075
3075
|
return (options.client ?? client).post({
|
|
@@ -3084,7 +3084,7 @@ var Memories = class {
|
|
|
3084
3084
|
/**
|
|
3085
3085
|
* Delete a memory
|
|
3086
3086
|
*
|
|
3087
|
-
* Deletes a memory
|
|
3087
|
+
* Deletes a memory
|
|
3088
3088
|
*/
|
|
3089
3089
|
static deleteMemory(options) {
|
|
3090
3090
|
return (options.client ?? client).delete({
|
|
@@ -3095,7 +3095,7 @@ var Memories = class {
|
|
|
3095
3095
|
/**
|
|
3096
3096
|
* Get a memory
|
|
3097
3097
|
*
|
|
3098
|
-
* Returns a single memory
|
|
3098
|
+
* Returns a single memory by ID
|
|
3099
3099
|
*/
|
|
3100
3100
|
static getMemory(options) {
|
|
3101
3101
|
return (options.client ?? client).get({
|
|
@@ -3106,7 +3106,7 @@ var Memories = class {
|
|
|
3106
3106
|
/**
|
|
3107
3107
|
* Update a memory
|
|
3108
3108
|
*
|
|
3109
|
-
* Updates an existing memory
|
|
3109
|
+
* Updates an existing memory. Regenerates the embedding if content changes.
|
|
3110
3110
|
*/
|
|
3111
3111
|
static updateMemory(options) {
|
|
3112
3112
|
return (options.client ?? client).put({
|
|
@@ -3160,26 +3160,26 @@ var Memories = class {
|
|
|
3160
3160
|
});
|
|
3161
3161
|
}
|
|
3162
3162
|
};
|
|
3163
|
-
var
|
|
3163
|
+
var MemoryStores = class {
|
|
3164
3164
|
/**
|
|
3165
|
-
* List memory
|
|
3165
|
+
* List memory stores
|
|
3166
3166
|
*
|
|
3167
|
-
* Returns
|
|
3167
|
+
* Returns a list of memory store configurations for a project
|
|
3168
3168
|
*/
|
|
3169
|
-
static
|
|
3169
|
+
static listMemoryStores(options) {
|
|
3170
3170
|
return (options.client ?? client).get({
|
|
3171
|
-
url: "/v1/projects/{project_id}/memory-
|
|
3171
|
+
url: "/v1/projects/{project_id}/memory-stores",
|
|
3172
3172
|
...options
|
|
3173
3173
|
});
|
|
3174
3174
|
}
|
|
3175
3175
|
/**
|
|
3176
|
-
* Create a memory
|
|
3176
|
+
* Create a memory store
|
|
3177
3177
|
*
|
|
3178
|
-
* Creates a new
|
|
3178
|
+
* Creates a new memory store configuration in a project
|
|
3179
3179
|
*/
|
|
3180
|
-
static
|
|
3180
|
+
static createMemoryStore(options) {
|
|
3181
3181
|
return (options.client ?? client).post({
|
|
3182
|
-
url: "/v1/projects/{project_id}/memory-
|
|
3182
|
+
url: "/v1/projects/{project_id}/memory-stores",
|
|
3183
3183
|
...options,
|
|
3184
3184
|
headers: {
|
|
3185
3185
|
"Content-Type": "application/json",
|
|
@@ -3188,35 +3188,35 @@ var MemoryEntries = class {
|
|
|
3188
3188
|
});
|
|
3189
3189
|
}
|
|
3190
3190
|
/**
|
|
3191
|
-
* Delete a memory
|
|
3191
|
+
* Delete a memory store
|
|
3192
3192
|
*
|
|
3193
|
-
* Deletes a memory
|
|
3193
|
+
* Deletes a memory store configuration
|
|
3194
3194
|
*/
|
|
3195
|
-
static
|
|
3195
|
+
static deleteMemoryStore(options) {
|
|
3196
3196
|
return (options.client ?? client).delete({
|
|
3197
|
-
url: "/v1/projects/{project_id}/memory-
|
|
3197
|
+
url: "/v1/projects/{project_id}/memory-stores/{memory_store_id}",
|
|
3198
3198
|
...options
|
|
3199
3199
|
});
|
|
3200
3200
|
}
|
|
3201
3201
|
/**
|
|
3202
|
-
* Get a memory
|
|
3202
|
+
* Get a memory store
|
|
3203
3203
|
*
|
|
3204
|
-
* Returns a single memory
|
|
3204
|
+
* Returns a single memory store configuration by ID
|
|
3205
3205
|
*/
|
|
3206
|
-
static
|
|
3206
|
+
static getMemoryStore(options) {
|
|
3207
3207
|
return (options.client ?? client).get({
|
|
3208
|
-
url: "/v1/projects/{project_id}/memory-
|
|
3208
|
+
url: "/v1/projects/{project_id}/memory-stores/{memory_store_id}",
|
|
3209
3209
|
...options
|
|
3210
3210
|
});
|
|
3211
3211
|
}
|
|
3212
3212
|
/**
|
|
3213
|
-
* Update a memory
|
|
3213
|
+
* Update a memory store
|
|
3214
3214
|
*
|
|
3215
|
-
* Updates an existing memory
|
|
3215
|
+
* Updates an existing memory store configuration
|
|
3216
3216
|
*/
|
|
3217
|
-
static
|
|
3217
|
+
static updateMemoryStore(options) {
|
|
3218
3218
|
return (options.client ?? client).put({
|
|
3219
|
-
url: "/v1/projects/{project_id}/memory-
|
|
3219
|
+
url: "/v1/projects/{project_id}/memory-stores/{memory_store_id}",
|
|
3220
3220
|
...options,
|
|
3221
3221
|
headers: {
|
|
3222
3222
|
"Content-Type": "application/json",
|
|
@@ -3225,24 +3225,24 @@ var MemoryEntries = class {
|
|
|
3225
3225
|
});
|
|
3226
3226
|
}
|
|
3227
3227
|
/**
|
|
3228
|
-
* Get memory
|
|
3228
|
+
* Get memory store tags
|
|
3229
3229
|
*
|
|
3230
|
-
* Returns all tags attached to the memory
|
|
3230
|
+
* Returns all tags attached to the memory store
|
|
3231
3231
|
*/
|
|
3232
|
-
static
|
|
3232
|
+
static getMemoryStoreTags(options) {
|
|
3233
3233
|
return (options.client ?? client).get({
|
|
3234
|
-
url: "/v1/projects/{project_id}/memory-
|
|
3234
|
+
url: "/v1/projects/{project_id}/memory-stores/{memory_store_id}/tags",
|
|
3235
3235
|
...options
|
|
3236
3236
|
});
|
|
3237
3237
|
}
|
|
3238
3238
|
/**
|
|
3239
|
-
* Merge memory
|
|
3239
|
+
* Merge memory store tags
|
|
3240
3240
|
*
|
|
3241
|
-
* Merges provided tags into the memory
|
|
3241
|
+
* Merges provided tags into the memory store's existing tags (existing tags are preserved unless overridden)
|
|
3242
3242
|
*/
|
|
3243
|
-
static
|
|
3243
|
+
static mergeMemoryStoreTags(options) {
|
|
3244
3244
|
return (options.client ?? client).patch({
|
|
3245
|
-
url: "/v1/projects/{project_id}/memory-
|
|
3245
|
+
url: "/v1/projects/{project_id}/memory-stores/{memory_store_id}/tags",
|
|
3246
3246
|
...options,
|
|
3247
3247
|
headers: {
|
|
3248
3248
|
"Content-Type": "application/json",
|
|
@@ -3251,13 +3251,13 @@ var MemoryEntries = class {
|
|
|
3251
3251
|
});
|
|
3252
3252
|
}
|
|
3253
3253
|
/**
|
|
3254
|
-
* Replace memory
|
|
3254
|
+
* Replace memory store tags
|
|
3255
3255
|
*
|
|
3256
|
-
* Replaces all tags on the memory
|
|
3256
|
+
* Replaces all tags on the memory store with the provided tags (not merged)
|
|
3257
3257
|
*/
|
|
3258
|
-
static
|
|
3258
|
+
static replaceMemoryStoreTags(options) {
|
|
3259
3259
|
return (options.client ?? client).put({
|
|
3260
|
-
url: "/v1/projects/{project_id}/memory-
|
|
3260
|
+
url: "/v1/projects/{project_id}/memory-stores/{memory_store_id}/tags",
|
|
3261
3261
|
...options,
|
|
3262
3262
|
headers: {
|
|
3263
3263
|
"Content-Type": "application/json",
|
|
@@ -3844,7 +3844,7 @@ var Quotas = class {
|
|
|
3844
3844
|
*
|
|
3845
3845
|
* 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.
|
|
3846
3846
|
*
|
|
3847
|
-
* `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
|
|
3847
|
+
* `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.
|
|
3848
3848
|
*/
|
|
3849
3849
|
static createQuota(options) {
|
|
3850
3850
|
return (options.client ?? client).post({
|
|
@@ -4900,7 +4900,7 @@ var NaturaliClient = class {
|
|
|
4900
4900
|
ingestionRules;
|
|
4901
4901
|
knowledge;
|
|
4902
4902
|
memories;
|
|
4903
|
-
|
|
4903
|
+
memoryStores;
|
|
4904
4904
|
modelRoutes;
|
|
4905
4905
|
quotas;
|
|
4906
4906
|
models;
|
|
@@ -4950,7 +4950,7 @@ var NaturaliClient = class {
|
|
|
4950
4950
|
this.ingestionRules = bindResource(IngestionRules, this.http);
|
|
4951
4951
|
this.knowledge = bindResource(Knowledge, this.http);
|
|
4952
4952
|
this.memories = bindResource(Memories, this.http);
|
|
4953
|
-
this.
|
|
4953
|
+
this.memoryStores = bindResource(MemoryStores, this.http);
|
|
4954
4954
|
this.modelRoutes = bindResource(ModelRoutes, this.http);
|
|
4955
4955
|
this.quotas = bindResource(Quotas, this.http);
|
|
4956
4956
|
this.models = bindResource(Models, this.http);
|
|
@@ -4995,7 +4995,7 @@ var src_exports = /* @__PURE__ */ __exportAll({
|
|
|
4995
4995
|
IngestionRules: () => IngestionRules,
|
|
4996
4996
|
Knowledge: () => Knowledge,
|
|
4997
4997
|
Memories: () => Memories,
|
|
4998
|
-
|
|
4998
|
+
MemoryStores: () => MemoryStores,
|
|
4999
4999
|
ModelRoutes: () => ModelRoutes,
|
|
5000
5000
|
Models: () => Models,
|
|
5001
5001
|
NaturaliClient: () => NaturaliClient,
|
|
@@ -6916,14 +6916,14 @@ const routes = {
|
|
|
6916
6916
|
},
|
|
6917
6917
|
{
|
|
6918
6918
|
"name": "extract",
|
|
6919
|
-
"description": "Per-turn override of the agent's `knowledge_config.extraction` default. Omit to follow the agent's stored config. Set `false` to suppress automatic memory extraction for this turn (e.g. an operational or tool-listing turn that would only add noise to a curated memory). Set `true` to force extraction on for this turn even when the agent does not enable it by default, provided the agent has a `
|
|
6919
|
+
"description": "Per-turn override of the agent's `knowledge_config.extraction` default. Omit to follow the agent's stored config. Set `false` to suppress automatic memory store extraction for this turn (e.g. an operational or tool-listing turn that would only add noise to a curated memory store). Set `true` to force extraction on for this turn even when the agent does not enable it by default, provided the agent has a `write_memory_store_id`. Has no effect on streaming or `requires_action` turns, which never extract.",
|
|
6920
6920
|
"required": false,
|
|
6921
6921
|
"type": "boolean",
|
|
6922
6922
|
"in": "body"
|
|
6923
6923
|
},
|
|
6924
6924
|
{
|
|
6925
6925
|
"name": "knowledge_config",
|
|
6926
|
-
"description": "Per-generation knowledge retrieval override. Array filters (
|
|
6926
|
+
"description": "Per-generation knowledge retrieval override. Array filters (memory_store_ids, document_ids, document_paths) are unioned with the agent's stored knowledge_config; `tags` pairs are merged with the override winning per key; scalar fields (min_score, limit) use the per-generation value when present.",
|
|
6927
6927
|
"required": false,
|
|
6928
6928
|
"type": "object",
|
|
6929
6929
|
"in": "body"
|
|
@@ -12286,7 +12286,7 @@ const routes = {
|
|
|
12286
12286
|
"search-knowledge": {
|
|
12287
12287
|
serviceClass: "Knowledge",
|
|
12288
12288
|
operationId: "searchKnowledge",
|
|
12289
|
-
description: "Searches across documents and
|
|
12289
|
+
description: "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.",
|
|
12290
12290
|
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/knowledge",
|
|
12291
12291
|
httpMethod: "post",
|
|
12292
12292
|
pathParams: ["project_id"],
|
|
@@ -12329,7 +12329,7 @@ const routes = {
|
|
|
12329
12329
|
},
|
|
12330
12330
|
{
|
|
12331
12331
|
"name": "recency_half_life_days",
|
|
12332
|
-
"description": "Half-life, in days, of a recency decay applied to **memory** results after fusion: a result's `score` is multiplied by `2 ^ (-age_in_days / recency_half_life_days)`, where age is measured from its `updated_at`. Document results are never decayed. `0` — the default, and the default of the deployment's `KNOWLEDGE_RECENCY_HALF_LIFE_DAYS` — disables the blend entirely; it is a switch, not a lower bound, and sending `0` turns off a deployment-wide decay for this one request. Accepts fractions (`0.5` is twelve hours). How many ranks a given half-life costs depends on `rrf_k`. Only applies when `query` is provided.",
|
|
12332
|
+
"description": "Half-life, in days, of a recency decay applied to **memory store** results after fusion: a result's `score` is multiplied by `2 ^ (-age_in_days / recency_half_life_days)`, where age is measured from its `updated_at`. Document results are never decayed. `0` — the default, and the default of the deployment's `KNOWLEDGE_RECENCY_HALF_LIFE_DAYS` — disables the blend entirely; it is a switch, not a lower bound, and sending `0` turns off a deployment-wide decay for this one request. Accepts fractions (`0.5` is twelve hours). How many ranks a given half-life costs depends on `rrf_k`. Only applies when `query` is provided.",
|
|
12333
12333
|
"required": false,
|
|
12334
12334
|
"type": "number",
|
|
12335
12335
|
"in": "body"
|
|
@@ -12342,8 +12342,8 @@ const routes = {
|
|
|
12342
12342
|
"in": "body"
|
|
12343
12343
|
},
|
|
12344
12344
|
{
|
|
12345
|
-
"name": "
|
|
12346
|
-
"description": "Search
|
|
12345
|
+
"name": "memory_store_ids",
|
|
12346
|
+
"description": "Search memories within these specific memory stores",
|
|
12347
12347
|
"required": false,
|
|
12348
12348
|
"type": "array",
|
|
12349
12349
|
"in": "body"
|
|
@@ -12364,7 +12364,7 @@ const routes = {
|
|
|
12364
12364
|
},
|
|
12365
12365
|
{
|
|
12366
12366
|
"name": "tags",
|
|
12367
|
-
"description": "Filter results to documents and
|
|
12367
|
+
"description": "Filter results to documents and memories whose `tags` contain every one of these key-value pairs (exact, case-sensitive match). The only filter that scopes both stores, so passing it alone searches both. For memories it matches at memory granularity: a memory is returned when its parent memory store's tags match or its own do.",
|
|
12368
12368
|
"required": false,
|
|
12369
12369
|
"type": "string",
|
|
12370
12370
|
"in": "body"
|
|
@@ -12374,14 +12374,16 @@ const routes = {
|
|
|
12374
12374
|
"list-memories": {
|
|
12375
12375
|
serviceClass: "Memories",
|
|
12376
12376
|
operationId: "listMemories",
|
|
12377
|
-
description: "Returns
|
|
12377
|
+
description: "Returns all memories in a memory store",
|
|
12378
12378
|
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/memories",
|
|
12379
12379
|
httpMethod: "get",
|
|
12380
12380
|
pathParams: ["project_id"],
|
|
12381
12381
|
queryParams: [
|
|
12382
|
+
"memory_store_id",
|
|
12382
12383
|
"tags",
|
|
12383
12384
|
"limit",
|
|
12384
|
-
"offset"
|
|
12385
|
+
"offset",
|
|
12386
|
+
"include_invalidated"
|
|
12385
12387
|
],
|
|
12386
12388
|
flags: [
|
|
12387
12389
|
{
|
|
@@ -12391,6 +12393,13 @@ const routes = {
|
|
|
12391
12393
|
"type": "string",
|
|
12392
12394
|
"in": "path"
|
|
12393
12395
|
},
|
|
12396
|
+
{
|
|
12397
|
+
"name": "memory_store_id",
|
|
12398
|
+
"description": "Memory store to list memories from (mstore_...)",
|
|
12399
|
+
"required": true,
|
|
12400
|
+
"type": "string",
|
|
12401
|
+
"in": "query"
|
|
12402
|
+
},
|
|
12394
12403
|
{
|
|
12395
12404
|
"name": "tags",
|
|
12396
12405
|
"description": "Filter by tag pairs, written `key:value` (split on the first colon, so a value may contain colons). Repeat the parameter for several pairs; **all** must be present with exactly that value.\n",
|
|
@@ -12411,13 +12420,20 @@ const routes = {
|
|
|
12411
12420
|
"required": false,
|
|
12412
12421
|
"type": "integer",
|
|
12413
12422
|
"in": "query"
|
|
12423
|
+
},
|
|
12424
|
+
{
|
|
12425
|
+
"name": "include_invalidated",
|
|
12426
|
+
"description": "Include invalidated (superseded) memories. They are excluded by default; set this to audit the supersede history.",
|
|
12427
|
+
"required": false,
|
|
12428
|
+
"type": "boolean",
|
|
12429
|
+
"in": "query"
|
|
12414
12430
|
}
|
|
12415
12431
|
]
|
|
12416
12432
|
},
|
|
12417
12433
|
"create-memory": {
|
|
12418
12434
|
serviceClass: "Memories",
|
|
12419
12435
|
operationId: "createMemory",
|
|
12420
|
-
description: "Creates a new memory
|
|
12436
|
+
description: "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.",
|
|
12421
12437
|
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/memories",
|
|
12422
12438
|
httpMethod: "post",
|
|
12423
12439
|
pathParams: ["project_id"],
|
|
@@ -12431,32 +12447,60 @@ const routes = {
|
|
|
12431
12447
|
"in": "path"
|
|
12432
12448
|
},
|
|
12433
12449
|
{
|
|
12434
|
-
"name": "
|
|
12435
|
-
"description": "Memory
|
|
12450
|
+
"name": "memory_store_id",
|
|
12451
|
+
"description": "Memory store to add the memory to (mstore_...)",
|
|
12436
12452
|
"required": true,
|
|
12437
12453
|
"type": "string",
|
|
12438
12454
|
"in": "body"
|
|
12439
12455
|
},
|
|
12440
12456
|
{
|
|
12441
|
-
"name": "
|
|
12442
|
-
"description": "
|
|
12457
|
+
"name": "content",
|
|
12458
|
+
"description": "The text content of the memory",
|
|
12459
|
+
"required": true,
|
|
12460
|
+
"type": "string",
|
|
12461
|
+
"in": "body"
|
|
12462
|
+
},
|
|
12463
|
+
{
|
|
12464
|
+
"name": "source_type",
|
|
12465
|
+
"description": "Whether there is a source to point at. `conversation` requires `source_id`; `manual` rejects it.",
|
|
12466
|
+
"required": false,
|
|
12467
|
+
"type": "string",
|
|
12468
|
+
"in": "body"
|
|
12469
|
+
},
|
|
12470
|
+
{
|
|
12471
|
+
"name": "source_id",
|
|
12472
|
+
"description": "The conversation this fact was learned in. Required when `source_type` is `conversation`, and rejected otherwise.",
|
|
12443
12473
|
"required": false,
|
|
12444
12474
|
"type": "string",
|
|
12445
12475
|
"in": "body"
|
|
12446
12476
|
},
|
|
12447
12477
|
{
|
|
12448
12478
|
"name": "tags",
|
|
12449
|
-
"description": "
|
|
12479
|
+
"description": "Per-memory key-value tags, used for memory-granularity filtering by `tags` in search-knowledge.",
|
|
12450
12480
|
"required": false,
|
|
12451
12481
|
"type": "string",
|
|
12452
12482
|
"in": "body"
|
|
12483
|
+
},
|
|
12484
|
+
{
|
|
12485
|
+
"name": "metadata",
|
|
12486
|
+
"description": "Arbitrary structured metadata attached to the memory",
|
|
12487
|
+
"required": false,
|
|
12488
|
+
"type": "object",
|
|
12489
|
+
"in": "body"
|
|
12490
|
+
},
|
|
12491
|
+
{
|
|
12492
|
+
"name": "duplicate_threshold",
|
|
12493
|
+
"description": "Cosine similarity score at or above which the incoming content is considered a duplicate of an existing memory and skipped (default 0.95). Below it the memory is always created.",
|
|
12494
|
+
"required": false,
|
|
12495
|
+
"type": "number",
|
|
12496
|
+
"in": "body"
|
|
12453
12497
|
}
|
|
12454
12498
|
]
|
|
12455
12499
|
},
|
|
12456
12500
|
"get-memory": {
|
|
12457
12501
|
serviceClass: "Memories",
|
|
12458
12502
|
operationId: "getMemory",
|
|
12459
|
-
description: "Returns a single memory
|
|
12503
|
+
description: "Returns a single memory by ID",
|
|
12460
12504
|
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/memories",
|
|
12461
12505
|
httpMethod: "get",
|
|
12462
12506
|
pathParams: ["project_id", "memory_id"],
|
|
@@ -12478,7 +12522,7 @@ const routes = {
|
|
|
12478
12522
|
"update-memory": {
|
|
12479
12523
|
serviceClass: "Memories",
|
|
12480
12524
|
operationId: "updateMemory",
|
|
12481
|
-
description: "Updates an existing memory
|
|
12525
|
+
description: "Updates an existing memory. Regenerates the embedding if content changes.",
|
|
12482
12526
|
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/memories",
|
|
12483
12527
|
httpMethod: "put",
|
|
12484
12528
|
pathParams: ["project_id", "memory_id"],
|
|
@@ -12499,24 +12543,24 @@ const routes = {
|
|
|
12499
12543
|
"in": "path"
|
|
12500
12544
|
},
|
|
12501
12545
|
{
|
|
12502
|
-
"name": "
|
|
12503
|
-
"description": "
|
|
12546
|
+
"name": "content",
|
|
12547
|
+
"description": "Updated text content",
|
|
12504
12548
|
"required": false,
|
|
12505
12549
|
"type": "string",
|
|
12506
12550
|
"in": "body"
|
|
12507
12551
|
},
|
|
12508
12552
|
{
|
|
12509
|
-
"name": "
|
|
12510
|
-
"description": "
|
|
12553
|
+
"name": "tags",
|
|
12554
|
+
"description": "Replaces the memory's tags. Pass null or an empty object to clear.",
|
|
12511
12555
|
"required": false,
|
|
12512
12556
|
"type": "string",
|
|
12513
12557
|
"in": "body"
|
|
12514
12558
|
},
|
|
12515
12559
|
{
|
|
12516
|
-
"name": "
|
|
12517
|
-
"description": "
|
|
12560
|
+
"name": "metadata",
|
|
12561
|
+
"description": "Replaces the memory's metadata. Pass null to clear.",
|
|
12518
12562
|
"required": false,
|
|
12519
|
-
"type": "
|
|
12563
|
+
"type": "object",
|
|
12520
12564
|
"in": "body"
|
|
12521
12565
|
}
|
|
12522
12566
|
]
|
|
@@ -12524,7 +12568,7 @@ const routes = {
|
|
|
12524
12568
|
"delete-memory": {
|
|
12525
12569
|
serviceClass: "Memories",
|
|
12526
12570
|
operationId: "deleteMemory",
|
|
12527
|
-
description: "Deletes a memory
|
|
12571
|
+
description: "Deletes a memory",
|
|
12528
12572
|
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/memories",
|
|
12529
12573
|
httpMethod: "delete",
|
|
12530
12574
|
pathParams: ["project_id", "memory_id"],
|
|
@@ -12609,19 +12653,17 @@ const routes = {
|
|
|
12609
12653
|
"in": "path"
|
|
12610
12654
|
}]
|
|
12611
12655
|
},
|
|
12612
|
-
"list-memory-
|
|
12613
|
-
serviceClass: "
|
|
12614
|
-
operationId: "
|
|
12615
|
-
description: "Returns
|
|
12616
|
-
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/memory-
|
|
12656
|
+
"list-memory-stores": {
|
|
12657
|
+
serviceClass: "MemoryStores",
|
|
12658
|
+
operationId: "listMemoryStores",
|
|
12659
|
+
description: "Returns a list of memory store configurations for a project",
|
|
12660
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/memory-stores",
|
|
12617
12661
|
httpMethod: "get",
|
|
12618
12662
|
pathParams: ["project_id"],
|
|
12619
12663
|
queryParams: [
|
|
12620
|
-
"memory_id",
|
|
12621
12664
|
"tags",
|
|
12622
12665
|
"limit",
|
|
12623
|
-
"offset"
|
|
12624
|
-
"include_invalidated"
|
|
12666
|
+
"offset"
|
|
12625
12667
|
],
|
|
12626
12668
|
flags: [
|
|
12627
12669
|
{
|
|
@@ -12631,13 +12673,6 @@ const routes = {
|
|
|
12631
12673
|
"type": "string",
|
|
12632
12674
|
"in": "path"
|
|
12633
12675
|
},
|
|
12634
|
-
{
|
|
12635
|
-
"name": "memory_id",
|
|
12636
|
-
"description": "Memory container to list entries from (mem_...)",
|
|
12637
|
-
"required": true,
|
|
12638
|
-
"type": "string",
|
|
12639
|
-
"in": "query"
|
|
12640
|
-
},
|
|
12641
12676
|
{
|
|
12642
12677
|
"name": "tags",
|
|
12643
12678
|
"description": "Filter by tag pairs, written `key:value` (split on the first colon, so a value may contain colons). Repeat the parameter for several pairs; **all** must be present with exactly that value.\n",
|
|
@@ -12658,21 +12693,14 @@ const routes = {
|
|
|
12658
12693
|
"required": false,
|
|
12659
12694
|
"type": "integer",
|
|
12660
12695
|
"in": "query"
|
|
12661
|
-
},
|
|
12662
|
-
{
|
|
12663
|
-
"name": "include_invalidated",
|
|
12664
|
-
"description": "Include invalidated (superseded) entries. They are excluded by default; set this to audit the supersede history.",
|
|
12665
|
-
"required": false,
|
|
12666
|
-
"type": "boolean",
|
|
12667
|
-
"in": "query"
|
|
12668
12696
|
}
|
|
12669
12697
|
]
|
|
12670
12698
|
},
|
|
12671
|
-
"create-memory-
|
|
12672
|
-
serviceClass: "
|
|
12673
|
-
operationId: "
|
|
12674
|
-
description: "Creates a new
|
|
12675
|
-
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/memory-
|
|
12699
|
+
"create-memory-store": {
|
|
12700
|
+
serviceClass: "MemoryStores",
|
|
12701
|
+
operationId: "createMemoryStore",
|
|
12702
|
+
description: "Creates a new memory store configuration in a project",
|
|
12703
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/memory-stores",
|
|
12676
12704
|
httpMethod: "post",
|
|
12677
12705
|
pathParams: ["project_id"],
|
|
12678
12706
|
queryParams: [],
|
|
@@ -12685,56 +12713,35 @@ const routes = {
|
|
|
12685
12713
|
"in": "path"
|
|
12686
12714
|
},
|
|
12687
12715
|
{
|
|
12688
|
-
"name": "
|
|
12689
|
-
"description": "Memory
|
|
12690
|
-
"required": true,
|
|
12691
|
-
"type": "string",
|
|
12692
|
-
"in": "body"
|
|
12693
|
-
},
|
|
12694
|
-
{
|
|
12695
|
-
"name": "content",
|
|
12696
|
-
"description": "The text content of the memory entry",
|
|
12716
|
+
"name": "name",
|
|
12717
|
+
"description": "Memory store name",
|
|
12697
12718
|
"required": true,
|
|
12698
12719
|
"type": "string",
|
|
12699
12720
|
"in": "body"
|
|
12700
12721
|
},
|
|
12701
12722
|
{
|
|
12702
|
-
"name": "
|
|
12703
|
-
"description": "
|
|
12723
|
+
"name": "description",
|
|
12724
|
+
"description": "Optional description",
|
|
12704
12725
|
"required": false,
|
|
12705
12726
|
"type": "string",
|
|
12706
12727
|
"in": "body"
|
|
12707
12728
|
},
|
|
12708
12729
|
{
|
|
12709
12730
|
"name": "tags",
|
|
12710
|
-
"description": "
|
|
12731
|
+
"description": "Optional key-value tags. Scopes the memory store in knowledge search, where every requested pair must match exactly.",
|
|
12711
12732
|
"required": false,
|
|
12712
12733
|
"type": "string",
|
|
12713
12734
|
"in": "body"
|
|
12714
|
-
},
|
|
12715
|
-
{
|
|
12716
|
-
"name": "metadata",
|
|
12717
|
-
"description": "Arbitrary structured metadata attached to the entry",
|
|
12718
|
-
"required": false,
|
|
12719
|
-
"type": "object",
|
|
12720
|
-
"in": "body"
|
|
12721
|
-
},
|
|
12722
|
-
{
|
|
12723
|
-
"name": "duplicate_threshold",
|
|
12724
|
-
"description": "Cosine similarity score at or above which the incoming content is considered a duplicate of an existing entry and skipped (default 0.95). Below it the entry is always created.",
|
|
12725
|
-
"required": false,
|
|
12726
|
-
"type": "number",
|
|
12727
|
-
"in": "body"
|
|
12728
12735
|
}
|
|
12729
12736
|
]
|
|
12730
12737
|
},
|
|
12731
|
-
"get-memory-
|
|
12732
|
-
serviceClass: "
|
|
12733
|
-
operationId: "
|
|
12734
|
-
description: "Returns a single memory
|
|
12735
|
-
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/memory-
|
|
12738
|
+
"get-memory-store": {
|
|
12739
|
+
serviceClass: "MemoryStores",
|
|
12740
|
+
operationId: "getMemoryStore",
|
|
12741
|
+
description: "Returns a single memory store configuration by ID",
|
|
12742
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/memory-stores",
|
|
12736
12743
|
httpMethod: "get",
|
|
12737
|
-
pathParams: ["project_id", "
|
|
12744
|
+
pathParams: ["project_id", "memory_store_id"],
|
|
12738
12745
|
queryParams: [],
|
|
12739
12746
|
flags: [{
|
|
12740
12747
|
"name": "project_id",
|
|
@@ -12743,20 +12750,20 @@ const routes = {
|
|
|
12743
12750
|
"type": "string",
|
|
12744
12751
|
"in": "path"
|
|
12745
12752
|
}, {
|
|
12746
|
-
"name": "
|
|
12753
|
+
"name": "memory_store_id",
|
|
12747
12754
|
"description": "",
|
|
12748
12755
|
"required": true,
|
|
12749
12756
|
"type": "string",
|
|
12750
12757
|
"in": "path"
|
|
12751
12758
|
}]
|
|
12752
12759
|
},
|
|
12753
|
-
"update-memory-
|
|
12754
|
-
serviceClass: "
|
|
12755
|
-
operationId: "
|
|
12756
|
-
description: "Updates an existing memory
|
|
12757
|
-
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/memory-
|
|
12760
|
+
"update-memory-store": {
|
|
12761
|
+
serviceClass: "MemoryStores",
|
|
12762
|
+
operationId: "updateMemoryStore",
|
|
12763
|
+
description: "Updates an existing memory store configuration",
|
|
12764
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/memory-stores",
|
|
12758
12765
|
httpMethod: "put",
|
|
12759
|
-
pathParams: ["project_id", "
|
|
12766
|
+
pathParams: ["project_id", "memory_store_id"],
|
|
12760
12767
|
queryParams: [],
|
|
12761
12768
|
flags: [
|
|
12762
12769
|
{
|
|
@@ -12767,42 +12774,42 @@ const routes = {
|
|
|
12767
12774
|
"in": "path"
|
|
12768
12775
|
},
|
|
12769
12776
|
{
|
|
12770
|
-
"name": "
|
|
12777
|
+
"name": "memory_store_id",
|
|
12771
12778
|
"description": "",
|
|
12772
12779
|
"required": true,
|
|
12773
12780
|
"type": "string",
|
|
12774
12781
|
"in": "path"
|
|
12775
12782
|
},
|
|
12776
12783
|
{
|
|
12777
|
-
"name": "
|
|
12778
|
-
"description": "
|
|
12784
|
+
"name": "name",
|
|
12785
|
+
"description": "Memory store name",
|
|
12779
12786
|
"required": false,
|
|
12780
12787
|
"type": "string",
|
|
12781
12788
|
"in": "body"
|
|
12782
12789
|
},
|
|
12783
12790
|
{
|
|
12784
|
-
"name": "
|
|
12785
|
-
"description": "
|
|
12791
|
+
"name": "description",
|
|
12792
|
+
"description": "Optional description",
|
|
12786
12793
|
"required": false,
|
|
12787
12794
|
"type": "string",
|
|
12788
12795
|
"in": "body"
|
|
12789
12796
|
},
|
|
12790
12797
|
{
|
|
12791
|
-
"name": "
|
|
12792
|
-
"description": "Replaces the
|
|
12798
|
+
"name": "tags",
|
|
12799
|
+
"description": "Optional key-value tags. Replaces the stored bag; `null` clears it.",
|
|
12793
12800
|
"required": false,
|
|
12794
|
-
"type": "
|
|
12801
|
+
"type": "string",
|
|
12795
12802
|
"in": "body"
|
|
12796
12803
|
}
|
|
12797
12804
|
]
|
|
12798
12805
|
},
|
|
12799
|
-
"delete-memory-
|
|
12800
|
-
serviceClass: "
|
|
12801
|
-
operationId: "
|
|
12802
|
-
description: "Deletes a memory
|
|
12803
|
-
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/memory-
|
|
12806
|
+
"delete-memory-store": {
|
|
12807
|
+
serviceClass: "MemoryStores",
|
|
12808
|
+
operationId: "deleteMemoryStore",
|
|
12809
|
+
description: "Deletes a memory store configuration",
|
|
12810
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/memory-stores",
|
|
12804
12811
|
httpMethod: "delete",
|
|
12805
|
-
pathParams: ["project_id", "
|
|
12812
|
+
pathParams: ["project_id", "memory_store_id"],
|
|
12806
12813
|
queryParams: [],
|
|
12807
12814
|
flags: [{
|
|
12808
12815
|
"name": "project_id",
|
|
@@ -12811,20 +12818,20 @@ const routes = {
|
|
|
12811
12818
|
"type": "string",
|
|
12812
12819
|
"in": "path"
|
|
12813
12820
|
}, {
|
|
12814
|
-
"name": "
|
|
12821
|
+
"name": "memory_store_id",
|
|
12815
12822
|
"description": "",
|
|
12816
12823
|
"required": true,
|
|
12817
12824
|
"type": "string",
|
|
12818
12825
|
"in": "path"
|
|
12819
12826
|
}]
|
|
12820
12827
|
},
|
|
12821
|
-
"get-memory-
|
|
12822
|
-
serviceClass: "
|
|
12823
|
-
operationId: "
|
|
12824
|
-
description: "Returns all tags attached to the memory
|
|
12825
|
-
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/memory-
|
|
12828
|
+
"get-memory-store-tags": {
|
|
12829
|
+
serviceClass: "MemoryStores",
|
|
12830
|
+
operationId: "getMemoryStoreTags",
|
|
12831
|
+
description: "Returns all tags attached to the memory store",
|
|
12832
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/memory-stores",
|
|
12826
12833
|
httpMethod: "get",
|
|
12827
|
-
pathParams: ["project_id", "
|
|
12834
|
+
pathParams: ["project_id", "memory_store_id"],
|
|
12828
12835
|
queryParams: [],
|
|
12829
12836
|
flags: [{
|
|
12830
12837
|
"name": "project_id",
|
|
@@ -12833,20 +12840,20 @@ const routes = {
|
|
|
12833
12840
|
"type": "string",
|
|
12834
12841
|
"in": "path"
|
|
12835
12842
|
}, {
|
|
12836
|
-
"name": "
|
|
12837
|
-
"description": "Memory
|
|
12843
|
+
"name": "memory_store_id",
|
|
12844
|
+
"description": "Memory store ID",
|
|
12838
12845
|
"required": true,
|
|
12839
12846
|
"type": "string",
|
|
12840
12847
|
"in": "path"
|
|
12841
12848
|
}]
|
|
12842
12849
|
},
|
|
12843
|
-
"replace-memory-
|
|
12844
|
-
serviceClass: "
|
|
12845
|
-
operationId: "
|
|
12846
|
-
description: "Replaces all tags on the memory
|
|
12847
|
-
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/memory-
|
|
12850
|
+
"replace-memory-store-tags": {
|
|
12851
|
+
serviceClass: "MemoryStores",
|
|
12852
|
+
operationId: "replaceMemoryStoreTags",
|
|
12853
|
+
description: "Replaces all tags on the memory store with the provided tags (not merged)",
|
|
12854
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/memory-stores",
|
|
12848
12855
|
httpMethod: "put",
|
|
12849
|
-
pathParams: ["project_id", "
|
|
12856
|
+
pathParams: ["project_id", "memory_store_id"],
|
|
12850
12857
|
queryParams: [],
|
|
12851
12858
|
flags: [{
|
|
12852
12859
|
"name": "project_id",
|
|
@@ -12855,20 +12862,20 @@ const routes = {
|
|
|
12855
12862
|
"type": "string",
|
|
12856
12863
|
"in": "path"
|
|
12857
12864
|
}, {
|
|
12858
|
-
"name": "
|
|
12859
|
-
"description": "Memory
|
|
12865
|
+
"name": "memory_store_id",
|
|
12866
|
+
"description": "Memory store ID",
|
|
12860
12867
|
"required": true,
|
|
12861
12868
|
"type": "string",
|
|
12862
12869
|
"in": "path"
|
|
12863
12870
|
}]
|
|
12864
12871
|
},
|
|
12865
|
-
"merge-memory-
|
|
12866
|
-
serviceClass: "
|
|
12867
|
-
operationId: "
|
|
12868
|
-
description: "Merges provided tags into the memory
|
|
12869
|
-
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/memory-
|
|
12872
|
+
"merge-memory-store-tags": {
|
|
12873
|
+
serviceClass: "MemoryStores",
|
|
12874
|
+
operationId: "mergeMemoryStoreTags",
|
|
12875
|
+
description: "Merges provided tags into the memory store's existing tags (existing tags are preserved unless overridden)",
|
|
12876
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/memory-stores",
|
|
12870
12877
|
httpMethod: "patch",
|
|
12871
|
-
pathParams: ["project_id", "
|
|
12878
|
+
pathParams: ["project_id", "memory_store_id"],
|
|
12872
12879
|
queryParams: [],
|
|
12873
12880
|
flags: [{
|
|
12874
12881
|
"name": "project_id",
|
|
@@ -12877,8 +12884,8 @@ const routes = {
|
|
|
12877
12884
|
"type": "string",
|
|
12878
12885
|
"in": "path"
|
|
12879
12886
|
}, {
|
|
12880
|
-
"name": "
|
|
12881
|
-
"description": "Memory
|
|
12887
|
+
"name": "memory_store_id",
|
|
12888
|
+
"description": "Memory store ID",
|
|
12882
12889
|
"required": true,
|
|
12883
12890
|
"type": "string",
|
|
12884
12891
|
"in": "path"
|
|
@@ -14466,7 +14473,7 @@ const routes = {
|
|
|
14466
14473
|
"create-quota": {
|
|
14467
14474
|
serviceClass: "Quotas",
|
|
14468
14475
|
operationId: "createQuota",
|
|
14469
|
-
description: "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. `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
|
|
14476
|
+
description: "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. `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.",
|
|
14470
14477
|
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/quotas",
|
|
14471
14478
|
httpMethod: "post",
|
|
14472
14479
|
pathParams: ["project_id"],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.128.0",
|
|
4
4
|
"description": "Command-line interface for the naturali.ai API, generated from its OpenAPI specs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"commander": "^15.0.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@naturali/sdk": "0.
|
|
27
|
+
"@naturali/sdk": "0.128.0",
|
|
28
28
|
"@ttoss/openapi-codegen": "^0.3.0",
|
|
29
29
|
"@types/node": "^26.5.1",
|
|
30
30
|
"tsdown": "^0.23.0",
|