@naturali/cli 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.mjs +546 -24
- 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.130.0";
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region ../sdk/src/generated/core/bodySerializer.gen.ts
|
|
20
20
|
const serializeFormDataPair = (data, key, value) => {
|
|
@@ -2773,7 +2773,7 @@ var Generations = class {
|
|
|
2773
2773
|
/**
|
|
2774
2774
|
* List generations
|
|
2775
2775
|
*
|
|
2776
|
-
* Returns generations the caller can access, optionally filtered by agent, trace, orchestration run, node, and status.
|
|
2776
|
+
* 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.
|
|
2777
2777
|
*
|
|
2778
2778
|
* 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.
|
|
2779
2779
|
*
|
|
@@ -3069,7 +3069,7 @@ var Memories = class {
|
|
|
3069
3069
|
/**
|
|
3070
3070
|
* Create a memory
|
|
3071
3071
|
*
|
|
3072
|
-
*
|
|
3072
|
+
* 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.
|
|
3073
3073
|
*/
|
|
3074
3074
|
static createMemory(options) {
|
|
3075
3075
|
return (options.client ?? client).post({
|
|
@@ -3119,6 +3119,17 @@ var Memories = class {
|
|
|
3119
3119
|
});
|
|
3120
3120
|
}
|
|
3121
3121
|
/**
|
|
3122
|
+
* List a memory's assertions
|
|
3123
|
+
*
|
|
3124
|
+
* 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.
|
|
3125
|
+
*/
|
|
3126
|
+
static listMemoryAssertions(options) {
|
|
3127
|
+
return (options.client ?? client).get({
|
|
3128
|
+
url: "/v1/projects/{project_id}/memories/{memory_id}/assertions",
|
|
3129
|
+
...options
|
|
3130
|
+
});
|
|
3131
|
+
}
|
|
3132
|
+
/**
|
|
3122
3133
|
* Get memory tags
|
|
3123
3134
|
*
|
|
3124
3135
|
* Returns all tags attached to the memory
|
|
@@ -3160,6 +3171,71 @@ var Memories = class {
|
|
|
3160
3171
|
});
|
|
3161
3172
|
}
|
|
3162
3173
|
};
|
|
3174
|
+
var MemoryRules = class {
|
|
3175
|
+
/**
|
|
3176
|
+
* List memory rules
|
|
3177
|
+
*
|
|
3178
|
+
* 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.
|
|
3179
|
+
*/
|
|
3180
|
+
static listMemoryRules(options) {
|
|
3181
|
+
return (options.client ?? client).get({
|
|
3182
|
+
url: "/v1/projects/{project_id}/memory-rules",
|
|
3183
|
+
...options
|
|
3184
|
+
});
|
|
3185
|
+
}
|
|
3186
|
+
/**
|
|
3187
|
+
* Create a memory rule
|
|
3188
|
+
*
|
|
3189
|
+
* 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`.
|
|
3190
|
+
*/
|
|
3191
|
+
static createMemoryRule(options) {
|
|
3192
|
+
return (options.client ?? client).post({
|
|
3193
|
+
url: "/v1/projects/{project_id}/memory-rules",
|
|
3194
|
+
...options,
|
|
3195
|
+
headers: {
|
|
3196
|
+
"Content-Type": "application/json",
|
|
3197
|
+
...options.headers
|
|
3198
|
+
}
|
|
3199
|
+
});
|
|
3200
|
+
}
|
|
3201
|
+
/**
|
|
3202
|
+
* Delete a memory rule
|
|
3203
|
+
*
|
|
3204
|
+
* Deletes a memory rule. The assertions it wrote are kept; their `rule_id` becomes null.
|
|
3205
|
+
*/
|
|
3206
|
+
static deleteMemoryRule(options) {
|
|
3207
|
+
return (options.client ?? client).delete({
|
|
3208
|
+
url: "/v1/projects/{project_id}/memory-rules/{memory_rule_id}",
|
|
3209
|
+
...options
|
|
3210
|
+
});
|
|
3211
|
+
}
|
|
3212
|
+
/**
|
|
3213
|
+
* Get a memory rule
|
|
3214
|
+
*
|
|
3215
|
+
* Returns a specific memory rule
|
|
3216
|
+
*/
|
|
3217
|
+
static getMemoryRule(options) {
|
|
3218
|
+
return (options.client ?? client).get({
|
|
3219
|
+
url: "/v1/projects/{project_id}/memory-rules/{memory_rule_id}",
|
|
3220
|
+
...options
|
|
3221
|
+
});
|
|
3222
|
+
}
|
|
3223
|
+
/**
|
|
3224
|
+
* Update a memory rule
|
|
3225
|
+
*
|
|
3226
|
+
* 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.
|
|
3227
|
+
*/
|
|
3228
|
+
static updateMemoryRule(options) {
|
|
3229
|
+
return (options.client ?? client).patch({
|
|
3230
|
+
url: "/v1/projects/{project_id}/memory-rules/{memory_rule_id}",
|
|
3231
|
+
...options,
|
|
3232
|
+
headers: {
|
|
3233
|
+
"Content-Type": "application/json",
|
|
3234
|
+
...options.headers
|
|
3235
|
+
}
|
|
3236
|
+
});
|
|
3237
|
+
}
|
|
3238
|
+
};
|
|
3163
3239
|
var MemoryStores = class {
|
|
3164
3240
|
/**
|
|
3165
3241
|
* List memory stores
|
|
@@ -3225,6 +3301,17 @@ var MemoryStores = class {
|
|
|
3225
3301
|
});
|
|
3226
3302
|
}
|
|
3227
3303
|
/**
|
|
3304
|
+
* List a memory store's write assertions
|
|
3305
|
+
*
|
|
3306
|
+
* 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.
|
|
3307
|
+
*/
|
|
3308
|
+
static listMemoryStoreAssertions(options) {
|
|
3309
|
+
return (options.client ?? client).get({
|
|
3310
|
+
url: "/v1/projects/{project_id}/memory-stores/{memory_store_id}/assertions",
|
|
3311
|
+
...options
|
|
3312
|
+
});
|
|
3313
|
+
}
|
|
3314
|
+
/**
|
|
3228
3315
|
* Get memory store tags
|
|
3229
3316
|
*
|
|
3230
3317
|
* Returns all tags attached to the memory store
|
|
@@ -4900,6 +4987,7 @@ var NaturaliClient = class {
|
|
|
4900
4987
|
ingestionRules;
|
|
4901
4988
|
knowledge;
|
|
4902
4989
|
memories;
|
|
4990
|
+
memoryRules;
|
|
4903
4991
|
memoryStores;
|
|
4904
4992
|
modelRoutes;
|
|
4905
4993
|
quotas;
|
|
@@ -4950,6 +5038,7 @@ var NaturaliClient = class {
|
|
|
4950
5038
|
this.ingestionRules = bindResource(IngestionRules, this.http);
|
|
4951
5039
|
this.knowledge = bindResource(Knowledge, this.http);
|
|
4952
5040
|
this.memories = bindResource(Memories, this.http);
|
|
5041
|
+
this.memoryRules = bindResource(MemoryRules, this.http);
|
|
4953
5042
|
this.memoryStores = bindResource(MemoryStores, this.http);
|
|
4954
5043
|
this.modelRoutes = bindResource(ModelRoutes, this.http);
|
|
4955
5044
|
this.quotas = bindResource(Quotas, this.http);
|
|
@@ -4995,6 +5084,7 @@ var src_exports = /* @__PURE__ */ __exportAll({
|
|
|
4995
5084
|
IngestionRules: () => IngestionRules,
|
|
4996
5085
|
Knowledge: () => Knowledge,
|
|
4997
5086
|
Memories: () => Memories,
|
|
5087
|
+
MemoryRules: () => MemoryRules,
|
|
4998
5088
|
MemoryStores: () => MemoryStores,
|
|
4999
5089
|
ModelRoutes: () => ModelRoutes,
|
|
5000
5090
|
Models: () => Models,
|
|
@@ -6914,13 +7004,6 @@ const routes = {
|
|
|
6914
7004
|
"type": "object",
|
|
6915
7005
|
"in": "body"
|
|
6916
7006
|
},
|
|
6917
|
-
{
|
|
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 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
|
-
"required": false,
|
|
6921
|
-
"type": "boolean",
|
|
6922
|
-
"in": "body"
|
|
6923
|
-
},
|
|
6924
7007
|
{
|
|
6925
7008
|
"name": "knowledge_config",
|
|
6926
7009
|
"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.",
|
|
@@ -11441,7 +11524,7 @@ const routes = {
|
|
|
11441
11524
|
"list-generations": {
|
|
11442
11525
|
serviceClass: "Generations",
|
|
11443
11526
|
operationId: "listGenerations",
|
|
11444
|
-
description: "Returns generations the caller can access, optionally filtered by agent, trace, orchestration run, node, and status.
|
|
11527
|
+
description: "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. 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.",
|
|
11445
11528
|
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/generations",
|
|
11446
11529
|
httpMethod: "get",
|
|
11447
11530
|
pathParams: ["project_id"],
|
|
@@ -12313,13 +12396,6 @@ const routes = {
|
|
|
12313
12396
|
"type": "number",
|
|
12314
12397
|
"in": "body"
|
|
12315
12398
|
},
|
|
12316
|
-
{
|
|
12317
|
-
"name": "min_score",
|
|
12318
|
-
"description": "Deprecated alias for `min_similarity`, with identical behavior. While ranking was single-signal `score` equaled `similarity_score`, so this has only ever filtered cosine and an existing value keeps returning the same results. `min_similarity` wins when both are sent. Removed in v2.",
|
|
12319
|
-
"required": false,
|
|
12320
|
-
"type": "number",
|
|
12321
|
-
"in": "body"
|
|
12322
|
-
},
|
|
12323
12399
|
{
|
|
12324
12400
|
"name": "rrf_k",
|
|
12325
12401
|
"description": "The `k` in the reciprocal rank fusion term `1 / (k + rank)`, which sets how steeply a result's contribution decays with its position in each ranked list. A smaller value weights the very top of each list more heavily. Defaults to the deployment's `KNOWLEDGE_RRF_K`, itself 60 by default. Only applies when `query` is provided.",
|
|
@@ -12329,7 +12405,7 @@ const routes = {
|
|
|
12329
12405
|
},
|
|
12330
12406
|
{
|
|
12331
12407
|
"name": "recency_half_life_days",
|
|
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.",
|
|
12408
|
+
"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. **No value is known to be safe in general**: every half-life measured against the reference corpus that lifted recency-sensitive queries also cost relevance-sensitive ones, which is why this ships disabled. Measure against your own corpus before setting it — see the Retrieval Quality guide.",
|
|
12333
12409
|
"required": false,
|
|
12334
12410
|
"type": "number",
|
|
12335
12411
|
"in": "body"
|
|
@@ -12341,6 +12417,20 @@ const routes = {
|
|
|
12341
12417
|
"type": "integer",
|
|
12342
12418
|
"in": "body"
|
|
12343
12419
|
},
|
|
12420
|
+
{
|
|
12421
|
+
"name": "include_documents",
|
|
12422
|
+
"description": "Set `false` to leave the document store out of this search. A `query` names no store, so it reaches both; the store-specific filters narrow *within* a store rather than choosing between them. This is the switch, and a filter naming the other store never overrides it. `false` for both stores is `400`.",
|
|
12423
|
+
"required": false,
|
|
12424
|
+
"type": "boolean",
|
|
12425
|
+
"in": "body"
|
|
12426
|
+
},
|
|
12427
|
+
{
|
|
12428
|
+
"name": "include_memories",
|
|
12429
|
+
"description": "Set `false` to leave the memory store out of this search. The mirror of `include_documents`, for a caller that wants documents alone.",
|
|
12430
|
+
"required": false,
|
|
12431
|
+
"type": "boolean",
|
|
12432
|
+
"in": "body"
|
|
12433
|
+
},
|
|
12344
12434
|
{
|
|
12345
12435
|
"name": "memory_store_ids",
|
|
12346
12436
|
"description": "Search memories within these specific memory stores",
|
|
@@ -12364,7 +12454,7 @@ const routes = {
|
|
|
12364
12454
|
},
|
|
12365
12455
|
{
|
|
12366
12456
|
"name": "tags",
|
|
12367
|
-
"description": "Filter results to documents and memories whose `tags` contain every one of these key-value pairs (exact, case-sensitive match).
|
|
12457
|
+
"description": "Filter results to documents and memories whose `tags` contain every one of these key-value pairs (exact, case-sensitive match). Scopes both stores, so passing it alone searches both — as `query` does. For memories it matches at memory granularity: a memory is returned when its parent memory store's tags match or its own do.",
|
|
12368
12458
|
"required": false,
|
|
12369
12459
|
"type": "string",
|
|
12370
12460
|
"in": "body"
|
|
@@ -12433,7 +12523,7 @@ const routes = {
|
|
|
12433
12523
|
"create-memory": {
|
|
12434
12524
|
serviceClass: "Memories",
|
|
12435
12525
|
operationId: "createMemory",
|
|
12436
|
-
description: "
|
|
12526
|
+
description: "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.",
|
|
12437
12527
|
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/memories",
|
|
12438
12528
|
httpMethod: "post",
|
|
12439
12529
|
pathParams: ["project_id"],
|
|
@@ -12488,9 +12578,23 @@ const routes = {
|
|
|
12488
12578
|
"type": "object",
|
|
12489
12579
|
"in": "body"
|
|
12490
12580
|
},
|
|
12581
|
+
{
|
|
12582
|
+
"name": "supersedes",
|
|
12583
|
+
"description": "The memory this write replaces, named outright. The declaration outranks the thresholds in both directions: the target is retired and the write returns `superseded` however similar or distant the two texts are. This is what reaches a contradiction cosine cannot see (\"The office is in Lisbon\" then \"We closed the Lisbon office\"). The target must be a still-valid memory in the same memory store, and the caller needs `memories:UpdateMemory` on it as well as `memories:CreateMemory` on the store.",
|
|
12584
|
+
"required": false,
|
|
12585
|
+
"type": "string",
|
|
12586
|
+
"in": "body"
|
|
12587
|
+
},
|
|
12491
12588
|
{
|
|
12492
12589
|
"name": "duplicate_threshold",
|
|
12493
|
-
"description": "Cosine similarity
|
|
12590
|
+
"description": "Cosine similarity at or above which the incoming content is a duplicate of an existing memory and the write is skipped. Overrides the store's `duplicate_threshold` for this call; falls back to the store's value, then to `0.95`.",
|
|
12591
|
+
"required": false,
|
|
12592
|
+
"type": "number",
|
|
12593
|
+
"in": "body"
|
|
12594
|
+
},
|
|
12595
|
+
{
|
|
12596
|
+
"name": "supersede_threshold",
|
|
12597
|
+
"description": "Cosine similarity at or above which the incoming content restates a fact that has changed: the top match is invalidated and a new memory replaces it. Overrides the store's `supersede_threshold` for this call; falls back to the store's value, then to `0.90`. The effective pair must satisfy `supersede_threshold < duplicate_threshold`, and the check runs against the effective pair — so overriding only one value cannot invert it against the store's other one.",
|
|
12494
12598
|
"required": false,
|
|
12495
12599
|
"type": "number",
|
|
12496
12600
|
"in": "body"
|
|
@@ -12587,6 +12691,45 @@ const routes = {
|
|
|
12587
12691
|
"in": "path"
|
|
12588
12692
|
}]
|
|
12589
12693
|
},
|
|
12694
|
+
"list-memory-assertions": {
|
|
12695
|
+
serviceClass: "Memories",
|
|
12696
|
+
operationId: "listMemoryAssertions",
|
|
12697
|
+
description: "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.",
|
|
12698
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/memories",
|
|
12699
|
+
httpMethod: "get",
|
|
12700
|
+
pathParams: ["project_id", "memory_id"],
|
|
12701
|
+
queryParams: ["limit", "offset"],
|
|
12702
|
+
flags: [
|
|
12703
|
+
{
|
|
12704
|
+
"name": "project_id",
|
|
12705
|
+
"description": "Project public ID (proj_ prefix).",
|
|
12706
|
+
"required": true,
|
|
12707
|
+
"type": "string",
|
|
12708
|
+
"in": "path"
|
|
12709
|
+
},
|
|
12710
|
+
{
|
|
12711
|
+
"name": "memory_id",
|
|
12712
|
+
"description": "",
|
|
12713
|
+
"required": true,
|
|
12714
|
+
"type": "string",
|
|
12715
|
+
"in": "path"
|
|
12716
|
+
},
|
|
12717
|
+
{
|
|
12718
|
+
"name": "limit",
|
|
12719
|
+
"description": "Maximum number of results to return",
|
|
12720
|
+
"required": false,
|
|
12721
|
+
"type": "integer",
|
|
12722
|
+
"in": "query"
|
|
12723
|
+
},
|
|
12724
|
+
{
|
|
12725
|
+
"name": "offset",
|
|
12726
|
+
"description": "Number of results to skip",
|
|
12727
|
+
"required": false,
|
|
12728
|
+
"type": "integer",
|
|
12729
|
+
"in": "query"
|
|
12730
|
+
}
|
|
12731
|
+
]
|
|
12732
|
+
},
|
|
12590
12733
|
"get-memory-tags": {
|
|
12591
12734
|
serviceClass: "Memories",
|
|
12592
12735
|
operationId: "getMemoryTags",
|
|
@@ -12653,6 +12796,283 @@ const routes = {
|
|
|
12653
12796
|
"in": "path"
|
|
12654
12797
|
}]
|
|
12655
12798
|
},
|
|
12799
|
+
"list-memory-rules": {
|
|
12800
|
+
serviceClass: "MemoryRules",
|
|
12801
|
+
operationId: "listMemoryRules",
|
|
12802
|
+
description: "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.",
|
|
12803
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/memory-rules",
|
|
12804
|
+
httpMethod: "get",
|
|
12805
|
+
pathParams: ["project_id"],
|
|
12806
|
+
queryParams: [
|
|
12807
|
+
"memory_store_id",
|
|
12808
|
+
"limit",
|
|
12809
|
+
"offset"
|
|
12810
|
+
],
|
|
12811
|
+
flags: [
|
|
12812
|
+
{
|
|
12813
|
+
"name": "project_id",
|
|
12814
|
+
"description": "Project public ID (proj_ prefix).",
|
|
12815
|
+
"required": true,
|
|
12816
|
+
"type": "string",
|
|
12817
|
+
"in": "path"
|
|
12818
|
+
},
|
|
12819
|
+
{
|
|
12820
|
+
"name": "memory_store_id",
|
|
12821
|
+
"description": "Only the rules of this memory store",
|
|
12822
|
+
"required": false,
|
|
12823
|
+
"type": "string",
|
|
12824
|
+
"in": "query"
|
|
12825
|
+
},
|
|
12826
|
+
{
|
|
12827
|
+
"name": "limit",
|
|
12828
|
+
"description": "Number of results per page",
|
|
12829
|
+
"required": false,
|
|
12830
|
+
"type": "integer",
|
|
12831
|
+
"in": "query"
|
|
12832
|
+
},
|
|
12833
|
+
{
|
|
12834
|
+
"name": "offset",
|
|
12835
|
+
"description": "Number of results to skip",
|
|
12836
|
+
"required": false,
|
|
12837
|
+
"type": "integer",
|
|
12838
|
+
"in": "query"
|
|
12839
|
+
}
|
|
12840
|
+
]
|
|
12841
|
+
},
|
|
12842
|
+
"create-memory-rule": {
|
|
12843
|
+
serviceClass: "MemoryRules",
|
|
12844
|
+
operationId: "createMemoryRule",
|
|
12845
|
+
description: "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`.",
|
|
12846
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/memory-rules",
|
|
12847
|
+
httpMethod: "post",
|
|
12848
|
+
pathParams: ["project_id"],
|
|
12849
|
+
queryParams: [],
|
|
12850
|
+
flags: [
|
|
12851
|
+
{
|
|
12852
|
+
"name": "project_id",
|
|
12853
|
+
"description": "Project public ID (proj_ prefix).",
|
|
12854
|
+
"required": true,
|
|
12855
|
+
"type": "string",
|
|
12856
|
+
"in": "path"
|
|
12857
|
+
},
|
|
12858
|
+
{
|
|
12859
|
+
"name": "memory_store_id",
|
|
12860
|
+
"description": "The destination store, and the rule's owning scope",
|
|
12861
|
+
"required": true,
|
|
12862
|
+
"type": "string",
|
|
12863
|
+
"in": "body"
|
|
12864
|
+
},
|
|
12865
|
+
{
|
|
12866
|
+
"name": "on",
|
|
12867
|
+
"description": "The event a firing reads. `agents.generation.completed` fires once per completed turn whatever the transport, and is the only event the built-in extractor may bind to. `conversations.message.generated` fires per persisted assistant reply and is conversation-backed, so it is for custom handlers.",
|
|
12868
|
+
"required": true,
|
|
12869
|
+
"type": "string",
|
|
12870
|
+
"in": "body"
|
|
12871
|
+
},
|
|
12872
|
+
{
|
|
12873
|
+
"name": "source_agent_ids",
|
|
12874
|
+
"description": "Agents whose turns this rule reads. Omit or send `null` for every agent in the store's project.",
|
|
12875
|
+
"required": false,
|
|
12876
|
+
"type": "array",
|
|
12877
|
+
"in": "body"
|
|
12878
|
+
},
|
|
12879
|
+
{
|
|
12880
|
+
"name": "agent_id",
|
|
12881
|
+
"description": "Handler agent (mutually exclusive with tool_id)",
|
|
12882
|
+
"required": false,
|
|
12883
|
+
"type": "string",
|
|
12884
|
+
"in": "body"
|
|
12885
|
+
},
|
|
12886
|
+
{
|
|
12887
|
+
"name": "tool_id",
|
|
12888
|
+
"description": "Handler tool (mutually exclusive with agent_id)",
|
|
12889
|
+
"required": false,
|
|
12890
|
+
"type": "string",
|
|
12891
|
+
"in": "body"
|
|
12892
|
+
},
|
|
12893
|
+
{
|
|
12894
|
+
"name": "action",
|
|
12895
|
+
"description": "Operation id, for a tool handler",
|
|
12896
|
+
"required": false,
|
|
12897
|
+
"type": "string",
|
|
12898
|
+
"in": "body"
|
|
12899
|
+
},
|
|
12900
|
+
{
|
|
12901
|
+
"name": "preset_parameters",
|
|
12902
|
+
"description": "Merged into a tool handler's input before invocation. The turn's own fields are reserved and win.",
|
|
12903
|
+
"required": false,
|
|
12904
|
+
"type": "object",
|
|
12905
|
+
"in": "body"
|
|
12906
|
+
},
|
|
12907
|
+
{
|
|
12908
|
+
"name": "prompt",
|
|
12909
|
+
"description": "Replaces the built-in extractor's task instructions. The JSON response contract and the transcript are always appended. Not valid with a handler.",
|
|
12910
|
+
"required": false,
|
|
12911
|
+
"type": "string",
|
|
12912
|
+
"in": "body"
|
|
12913
|
+
},
|
|
12914
|
+
{
|
|
12915
|
+
"name": "ai_provider_id",
|
|
12916
|
+
"description": "Provider override for the built-in extractor's completion. Not valid with a handler.",
|
|
12917
|
+
"required": false,
|
|
12918
|
+
"type": "string",
|
|
12919
|
+
"in": "body"
|
|
12920
|
+
},
|
|
12921
|
+
{
|
|
12922
|
+
"name": "model",
|
|
12923
|
+
"description": "Model override for the built-in extractor's completion. Not valid with a handler.",
|
|
12924
|
+
"required": false,
|
|
12925
|
+
"type": "string",
|
|
12926
|
+
"in": "body"
|
|
12927
|
+
},
|
|
12928
|
+
{
|
|
12929
|
+
"name": "enabled",
|
|
12930
|
+
"description": "A disabled rule is kept and never fires",
|
|
12931
|
+
"required": false,
|
|
12932
|
+
"type": "boolean",
|
|
12933
|
+
"in": "body"
|
|
12934
|
+
}
|
|
12935
|
+
]
|
|
12936
|
+
},
|
|
12937
|
+
"get-memory-rule": {
|
|
12938
|
+
serviceClass: "MemoryRules",
|
|
12939
|
+
operationId: "getMemoryRule",
|
|
12940
|
+
description: "Returns a specific memory rule",
|
|
12941
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/memory-rules",
|
|
12942
|
+
httpMethod: "get",
|
|
12943
|
+
pathParams: ["project_id", "memory_rule_id"],
|
|
12944
|
+
queryParams: [],
|
|
12945
|
+
flags: [{
|
|
12946
|
+
"name": "project_id",
|
|
12947
|
+
"description": "Project public ID (proj_ prefix).",
|
|
12948
|
+
"required": true,
|
|
12949
|
+
"type": "string",
|
|
12950
|
+
"in": "path"
|
|
12951
|
+
}, {
|
|
12952
|
+
"name": "memory_rule_id",
|
|
12953
|
+
"description": "Memory rule ID",
|
|
12954
|
+
"required": true,
|
|
12955
|
+
"type": "string",
|
|
12956
|
+
"in": "path"
|
|
12957
|
+
}]
|
|
12958
|
+
},
|
|
12959
|
+
"update-memory-rule": {
|
|
12960
|
+
serviceClass: "MemoryRules",
|
|
12961
|
+
operationId: "updateMemoryRule",
|
|
12962
|
+
description: "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.",
|
|
12963
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/memory-rules",
|
|
12964
|
+
httpMethod: "patch",
|
|
12965
|
+
pathParams: ["project_id", "memory_rule_id"],
|
|
12966
|
+
queryParams: [],
|
|
12967
|
+
flags: [
|
|
12968
|
+
{
|
|
12969
|
+
"name": "project_id",
|
|
12970
|
+
"description": "Project public ID (proj_ prefix).",
|
|
12971
|
+
"required": true,
|
|
12972
|
+
"type": "string",
|
|
12973
|
+
"in": "path"
|
|
12974
|
+
},
|
|
12975
|
+
{
|
|
12976
|
+
"name": "memory_rule_id",
|
|
12977
|
+
"description": "Memory rule ID",
|
|
12978
|
+
"required": true,
|
|
12979
|
+
"type": "string",
|
|
12980
|
+
"in": "path"
|
|
12981
|
+
},
|
|
12982
|
+
{
|
|
12983
|
+
"name": "on",
|
|
12984
|
+
"description": "The event a firing reads. `agents.generation.completed` fires once per completed turn whatever the transport, and is the only event the built-in extractor may bind to. `conversations.message.generated` fires per persisted assistant reply and is conversation-backed, so it is for custom handlers.",
|
|
12985
|
+
"required": false,
|
|
12986
|
+
"type": "string",
|
|
12987
|
+
"in": "body"
|
|
12988
|
+
},
|
|
12989
|
+
{
|
|
12990
|
+
"name": "source_agent_ids",
|
|
12991
|
+
"description": "Send `null` to widen the rule to every agent in the project",
|
|
12992
|
+
"required": false,
|
|
12993
|
+
"type": "array",
|
|
12994
|
+
"in": "body"
|
|
12995
|
+
},
|
|
12996
|
+
{
|
|
12997
|
+
"name": "agent_id",
|
|
12998
|
+
"description": "",
|
|
12999
|
+
"required": false,
|
|
13000
|
+
"type": "string",
|
|
13001
|
+
"in": "body"
|
|
13002
|
+
},
|
|
13003
|
+
{
|
|
13004
|
+
"name": "tool_id",
|
|
13005
|
+
"description": "",
|
|
13006
|
+
"required": false,
|
|
13007
|
+
"type": "string",
|
|
13008
|
+
"in": "body"
|
|
13009
|
+
},
|
|
13010
|
+
{
|
|
13011
|
+
"name": "action",
|
|
13012
|
+
"description": "",
|
|
13013
|
+
"required": false,
|
|
13014
|
+
"type": "string",
|
|
13015
|
+
"in": "body"
|
|
13016
|
+
},
|
|
13017
|
+
{
|
|
13018
|
+
"name": "preset_parameters",
|
|
13019
|
+
"description": "",
|
|
13020
|
+
"required": false,
|
|
13021
|
+
"type": "object",
|
|
13022
|
+
"in": "body"
|
|
13023
|
+
},
|
|
13024
|
+
{
|
|
13025
|
+
"name": "prompt",
|
|
13026
|
+
"description": "",
|
|
13027
|
+
"required": false,
|
|
13028
|
+
"type": "string",
|
|
13029
|
+
"in": "body"
|
|
13030
|
+
},
|
|
13031
|
+
{
|
|
13032
|
+
"name": "ai_provider_id",
|
|
13033
|
+
"description": "",
|
|
13034
|
+
"required": false,
|
|
13035
|
+
"type": "string",
|
|
13036
|
+
"in": "body"
|
|
13037
|
+
},
|
|
13038
|
+
{
|
|
13039
|
+
"name": "model",
|
|
13040
|
+
"description": "",
|
|
13041
|
+
"required": false,
|
|
13042
|
+
"type": "string",
|
|
13043
|
+
"in": "body"
|
|
13044
|
+
},
|
|
13045
|
+
{
|
|
13046
|
+
"name": "enabled",
|
|
13047
|
+
"description": "",
|
|
13048
|
+
"required": false,
|
|
13049
|
+
"type": "boolean",
|
|
13050
|
+
"in": "body"
|
|
13051
|
+
}
|
|
13052
|
+
]
|
|
13053
|
+
},
|
|
13054
|
+
"delete-memory-rule": {
|
|
13055
|
+
serviceClass: "MemoryRules",
|
|
13056
|
+
operationId: "deleteMemoryRule",
|
|
13057
|
+
description: "Deletes a memory rule. The assertions it wrote are kept; their `rule_id` becomes null.",
|
|
13058
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/memory-rules",
|
|
13059
|
+
httpMethod: "delete",
|
|
13060
|
+
pathParams: ["project_id", "memory_rule_id"],
|
|
13061
|
+
queryParams: [],
|
|
13062
|
+
flags: [{
|
|
13063
|
+
"name": "project_id",
|
|
13064
|
+
"description": "Project public ID (proj_ prefix).",
|
|
13065
|
+
"required": true,
|
|
13066
|
+
"type": "string",
|
|
13067
|
+
"in": "path"
|
|
13068
|
+
}, {
|
|
13069
|
+
"name": "memory_rule_id",
|
|
13070
|
+
"description": "Memory rule ID",
|
|
13071
|
+
"required": true,
|
|
13072
|
+
"type": "string",
|
|
13073
|
+
"in": "path"
|
|
13074
|
+
}]
|
|
13075
|
+
},
|
|
12656
13076
|
"list-memory-stores": {
|
|
12657
13077
|
serviceClass: "MemoryStores",
|
|
12658
13078
|
operationId: "listMemoryStores",
|
|
@@ -12732,6 +13152,20 @@ const routes = {
|
|
|
12732
13152
|
"required": false,
|
|
12733
13153
|
"type": "string",
|
|
12734
13154
|
"in": "body"
|
|
13155
|
+
},
|
|
13156
|
+
{
|
|
13157
|
+
"name": "duplicate_threshold",
|
|
13158
|
+
"description": "The store's dedup policy: cosine similarity at or above which an incoming fact is already known and the write is skipped. `null` (the default) uses the algorithm constant `0.95`. A single `POST /v1/projects/{project_id}/memories` call may override it; the agent tool and the post-turn rule never can.",
|
|
13159
|
+
"required": false,
|
|
13160
|
+
"type": "number",
|
|
13161
|
+
"in": "body"
|
|
13162
|
+
},
|
|
13163
|
+
{
|
|
13164
|
+
"name": "supersede_threshold",
|
|
13165
|
+
"description": "Cosine similarity at or above which an incoming fact restates a known one that has changed: the matched memory is invalidated and replaced. `null` (the default) uses the algorithm constant `0.90`. Must be lower than the effective `duplicate_threshold`, or the write is rejected with `400 VALIDATION_FAILED` — equal makes `superseded` unreachable and inverted swallows `skipped`.",
|
|
13166
|
+
"required": false,
|
|
13167
|
+
"type": "number",
|
|
13168
|
+
"in": "body"
|
|
12735
13169
|
}
|
|
12736
13170
|
]
|
|
12737
13171
|
},
|
|
@@ -12800,6 +13234,20 @@ const routes = {
|
|
|
12800
13234
|
"required": false,
|
|
12801
13235
|
"type": "string",
|
|
12802
13236
|
"in": "body"
|
|
13237
|
+
},
|
|
13238
|
+
{
|
|
13239
|
+
"name": "duplicate_threshold",
|
|
13240
|
+
"description": "The store's dedup policy: cosine similarity at or above which an incoming fact is already known and the write is skipped. `null` (the default) uses the algorithm constant `0.95`. A single `POST /v1/projects/{project_id}/memories` call may override it; the agent tool and the post-turn rule never can.",
|
|
13241
|
+
"required": false,
|
|
13242
|
+
"type": "number",
|
|
13243
|
+
"in": "body"
|
|
13244
|
+
},
|
|
13245
|
+
{
|
|
13246
|
+
"name": "supersede_threshold",
|
|
13247
|
+
"description": "Cosine similarity at or above which an incoming fact restates a known one that has changed: the matched memory is invalidated and replaced. `null` (the default) uses the algorithm constant `0.90`. Must be lower than the effective `duplicate_threshold`, or the write is rejected with `400 VALIDATION_FAILED` — equal makes `superseded` unreachable and inverted swallows `skipped`.",
|
|
13248
|
+
"required": false,
|
|
13249
|
+
"type": "number",
|
|
13250
|
+
"in": "body"
|
|
12803
13251
|
}
|
|
12804
13252
|
]
|
|
12805
13253
|
},
|
|
@@ -12825,6 +13273,80 @@ const routes = {
|
|
|
12825
13273
|
"in": "path"
|
|
12826
13274
|
}]
|
|
12827
13275
|
},
|
|
13276
|
+
"list-memory-store-assertions": {
|
|
13277
|
+
serviceClass: "MemoryStores",
|
|
13278
|
+
operationId: "listMemoryStoreAssertions",
|
|
13279
|
+
description: "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.",
|
|
13280
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/memory-stores",
|
|
13281
|
+
httpMethod: "get",
|
|
13282
|
+
pathParams: ["project_id", "memory_store_id"],
|
|
13283
|
+
queryParams: [
|
|
13284
|
+
"mechanism",
|
|
13285
|
+
"outcome",
|
|
13286
|
+
"generation_id",
|
|
13287
|
+
"since",
|
|
13288
|
+
"limit",
|
|
13289
|
+
"offset"
|
|
13290
|
+
],
|
|
13291
|
+
flags: [
|
|
13292
|
+
{
|
|
13293
|
+
"name": "project_id",
|
|
13294
|
+
"description": "Project public ID (proj_ prefix).",
|
|
13295
|
+
"required": true,
|
|
13296
|
+
"type": "string",
|
|
13297
|
+
"in": "path"
|
|
13298
|
+
},
|
|
13299
|
+
{
|
|
13300
|
+
"name": "memory_store_id",
|
|
13301
|
+
"description": "",
|
|
13302
|
+
"required": true,
|
|
13303
|
+
"type": "string",
|
|
13304
|
+
"in": "path"
|
|
13305
|
+
},
|
|
13306
|
+
{
|
|
13307
|
+
"name": "mechanism",
|
|
13308
|
+
"description": "Only assertions that came through this door.",
|
|
13309
|
+
"required": false,
|
|
13310
|
+
"type": "string",
|
|
13311
|
+
"in": "query"
|
|
13312
|
+
},
|
|
13313
|
+
{
|
|
13314
|
+
"name": "outcome",
|
|
13315
|
+
"description": "Only assertions that resolved this way.",
|
|
13316
|
+
"required": false,
|
|
13317
|
+
"type": "string",
|
|
13318
|
+
"in": "query"
|
|
13319
|
+
},
|
|
13320
|
+
{
|
|
13321
|
+
"name": "generation_id",
|
|
13322
|
+
"description": "Only assertions made during this generation. A generation that does not exist matches nothing rather than widening to the whole store.",
|
|
13323
|
+
"required": false,
|
|
13324
|
+
"type": "string",
|
|
13325
|
+
"in": "query"
|
|
13326
|
+
},
|
|
13327
|
+
{
|
|
13328
|
+
"name": "since",
|
|
13329
|
+
"description": "Only assertions recorded at or after this instant.",
|
|
13330
|
+
"required": false,
|
|
13331
|
+
"type": "string",
|
|
13332
|
+
"in": "query"
|
|
13333
|
+
},
|
|
13334
|
+
{
|
|
13335
|
+
"name": "limit",
|
|
13336
|
+
"description": "Maximum number of results to return",
|
|
13337
|
+
"required": false,
|
|
13338
|
+
"type": "integer",
|
|
13339
|
+
"in": "query"
|
|
13340
|
+
},
|
|
13341
|
+
{
|
|
13342
|
+
"name": "offset",
|
|
13343
|
+
"description": "Number of results to skip",
|
|
13344
|
+
"required": false,
|
|
13345
|
+
"type": "integer",
|
|
13346
|
+
"in": "query"
|
|
13347
|
+
}
|
|
13348
|
+
]
|
|
13349
|
+
},
|
|
12828
13350
|
"get-memory-store-tags": {
|
|
12829
13351
|
serviceClass: "MemoryStores",
|
|
12830
13352
|
operationId: "getMemoryStoreTags",
|
|
@@ -15799,7 +16321,7 @@ const routes = {
|
|
|
15799
16321
|
},
|
|
15800
16322
|
{
|
|
15801
16323
|
"name": "context_keys",
|
|
15802
|
-
"description": "Optional allowlist of `tool_context` keys that may be forwarded to this tool as prefixed context headers (`X-Naturali-Context-<key>` by default). When `null` or omitted, every key in the caller's `tool_context` is forwarded
|
|
16324
|
+
"description": "Optional allowlist of `tool_context` keys that may be forwarded to this tool as prefixed context headers (`X-Naturali-Context-<key>` by default). When `null` or omitted, every key in the caller's `tool_context` is forwarded. When set, only the listed keys are, so a per-user credential in `tool_context` can be confined to the tools that need it; `[]` forwards none. The server-pinned identity keys (`session_id`, `actor_id`, `actor_external_id`) are always forwarded. A key consumed by a `{{context:<key>}}` token in this tool's own headers is substituted regardless of this list — the tool declared that header itself.",
|
|
15803
16325
|
"required": false,
|
|
15804
16326
|
"type": "array",
|
|
15805
16327
|
"in": "body"
|
|
@@ -15937,7 +16459,7 @@ const routes = {
|
|
|
15937
16459
|
},
|
|
15938
16460
|
{
|
|
15939
16461
|
"name": "context_keys",
|
|
15940
|
-
"description": "Optional allowlist of `tool_context` keys that may be forwarded to this tool as prefixed context headers (`X-Naturali-Context-<key>` by default). When `null` or omitted, every key in the caller's `tool_context` is forwarded
|
|
16462
|
+
"description": "Optional allowlist of `tool_context` keys that may be forwarded to this tool as prefixed context headers (`X-Naturali-Context-<key>` by default). When `null` or omitted, every key in the caller's `tool_context` is forwarded. When set, only the listed keys are, so a per-user credential in `tool_context` can be confined to the tools that need it; `[]` forwards none. The server-pinned identity keys (`session_id`, `actor_id`, `actor_external_id`) are always forwarded. A key consumed by a `{{context:<key>}}` token in this tool's own headers is substituted regardless of this list — the tool declared that header itself.",
|
|
15941
16463
|
"required": false,
|
|
15942
16464
|
"type": "array",
|
|
15943
16465
|
"in": "body"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.130.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.130.0",
|
|
28
28
|
"@ttoss/openapi-codegen": "^0.3.0",
|
|
29
29
|
"@types/node": "^26.5.1",
|
|
30
30
|
"tsdown": "^0.23.0",
|