@naturali/cli 0.128.0 → 0.129.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 +174 -4
- 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.129.0";
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region ../sdk/src/generated/core/bodySerializer.gen.ts
|
|
20
20
|
const serializeFormDataPair = (data, key, value) => {
|
|
@@ -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. 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
|
|
@@ -3225,6 +3236,17 @@ var MemoryStores = class {
|
|
|
3225
3236
|
});
|
|
3226
3237
|
}
|
|
3227
3238
|
/**
|
|
3239
|
+
* List a memory store's write assertions
|
|
3240
|
+
*
|
|
3241
|
+
* 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.
|
|
3242
|
+
*/
|
|
3243
|
+
static listMemoryStoreAssertions(options) {
|
|
3244
|
+
return (options.client ?? client).get({
|
|
3245
|
+
url: "/v1/projects/{project_id}/memory-stores/{memory_store_id}/assertions",
|
|
3246
|
+
...options
|
|
3247
|
+
});
|
|
3248
|
+
}
|
|
3249
|
+
/**
|
|
3228
3250
|
* Get memory store tags
|
|
3229
3251
|
*
|
|
3230
3252
|
* Returns all tags attached to the memory store
|
|
@@ -12433,7 +12455,7 @@ const routes = {
|
|
|
12433
12455
|
"create-memory": {
|
|
12434
12456
|
serviceClass: "Memories",
|
|
12435
12457
|
operationId: "createMemory",
|
|
12436
|
-
description: "
|
|
12458
|
+
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. Every call records one assertion, whatever the outcome.",
|
|
12437
12459
|
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/memories",
|
|
12438
12460
|
httpMethod: "post",
|
|
12439
12461
|
pathParams: ["project_id"],
|
|
@@ -12490,7 +12512,14 @@ const routes = {
|
|
|
12490
12512
|
},
|
|
12491
12513
|
{
|
|
12492
12514
|
"name": "duplicate_threshold",
|
|
12493
|
-
"description": "Cosine similarity
|
|
12515
|
+
"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`.",
|
|
12516
|
+
"required": false,
|
|
12517
|
+
"type": "number",
|
|
12518
|
+
"in": "body"
|
|
12519
|
+
},
|
|
12520
|
+
{
|
|
12521
|
+
"name": "supersede_threshold",
|
|
12522
|
+
"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
12523
|
"required": false,
|
|
12495
12524
|
"type": "number",
|
|
12496
12525
|
"in": "body"
|
|
@@ -12587,6 +12616,45 @@ const routes = {
|
|
|
12587
12616
|
"in": "path"
|
|
12588
12617
|
}]
|
|
12589
12618
|
},
|
|
12619
|
+
"list-memory-assertions": {
|
|
12620
|
+
serviceClass: "Memories",
|
|
12621
|
+
operationId: "listMemoryAssertions",
|
|
12622
|
+
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.",
|
|
12623
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/memories",
|
|
12624
|
+
httpMethod: "get",
|
|
12625
|
+
pathParams: ["project_id", "memory_id"],
|
|
12626
|
+
queryParams: ["limit", "offset"],
|
|
12627
|
+
flags: [
|
|
12628
|
+
{
|
|
12629
|
+
"name": "project_id",
|
|
12630
|
+
"description": "Project public ID (proj_ prefix).",
|
|
12631
|
+
"required": true,
|
|
12632
|
+
"type": "string",
|
|
12633
|
+
"in": "path"
|
|
12634
|
+
},
|
|
12635
|
+
{
|
|
12636
|
+
"name": "memory_id",
|
|
12637
|
+
"description": "",
|
|
12638
|
+
"required": true,
|
|
12639
|
+
"type": "string",
|
|
12640
|
+
"in": "path"
|
|
12641
|
+
},
|
|
12642
|
+
{
|
|
12643
|
+
"name": "limit",
|
|
12644
|
+
"description": "Maximum number of results to return",
|
|
12645
|
+
"required": false,
|
|
12646
|
+
"type": "integer",
|
|
12647
|
+
"in": "query"
|
|
12648
|
+
},
|
|
12649
|
+
{
|
|
12650
|
+
"name": "offset",
|
|
12651
|
+
"description": "Number of results to skip",
|
|
12652
|
+
"required": false,
|
|
12653
|
+
"type": "integer",
|
|
12654
|
+
"in": "query"
|
|
12655
|
+
}
|
|
12656
|
+
]
|
|
12657
|
+
},
|
|
12590
12658
|
"get-memory-tags": {
|
|
12591
12659
|
serviceClass: "Memories",
|
|
12592
12660
|
operationId: "getMemoryTags",
|
|
@@ -12732,6 +12800,20 @@ const routes = {
|
|
|
12732
12800
|
"required": false,
|
|
12733
12801
|
"type": "string",
|
|
12734
12802
|
"in": "body"
|
|
12803
|
+
},
|
|
12804
|
+
{
|
|
12805
|
+
"name": "duplicate_threshold",
|
|
12806
|
+
"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.",
|
|
12807
|
+
"required": false,
|
|
12808
|
+
"type": "number",
|
|
12809
|
+
"in": "body"
|
|
12810
|
+
},
|
|
12811
|
+
{
|
|
12812
|
+
"name": "supersede_threshold",
|
|
12813
|
+
"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`.",
|
|
12814
|
+
"required": false,
|
|
12815
|
+
"type": "number",
|
|
12816
|
+
"in": "body"
|
|
12735
12817
|
}
|
|
12736
12818
|
]
|
|
12737
12819
|
},
|
|
@@ -12800,6 +12882,20 @@ const routes = {
|
|
|
12800
12882
|
"required": false,
|
|
12801
12883
|
"type": "string",
|
|
12802
12884
|
"in": "body"
|
|
12885
|
+
},
|
|
12886
|
+
{
|
|
12887
|
+
"name": "duplicate_threshold",
|
|
12888
|
+
"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.",
|
|
12889
|
+
"required": false,
|
|
12890
|
+
"type": "number",
|
|
12891
|
+
"in": "body"
|
|
12892
|
+
},
|
|
12893
|
+
{
|
|
12894
|
+
"name": "supersede_threshold",
|
|
12895
|
+
"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`.",
|
|
12896
|
+
"required": false,
|
|
12897
|
+
"type": "number",
|
|
12898
|
+
"in": "body"
|
|
12803
12899
|
}
|
|
12804
12900
|
]
|
|
12805
12901
|
},
|
|
@@ -12825,6 +12921,80 @@ const routes = {
|
|
|
12825
12921
|
"in": "path"
|
|
12826
12922
|
}]
|
|
12827
12923
|
},
|
|
12924
|
+
"list-memory-store-assertions": {
|
|
12925
|
+
serviceClass: "MemoryStores",
|
|
12926
|
+
operationId: "listMemoryStoreAssertions",
|
|
12927
|
+
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.",
|
|
12928
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/memory-stores",
|
|
12929
|
+
httpMethod: "get",
|
|
12930
|
+
pathParams: ["project_id", "memory_store_id"],
|
|
12931
|
+
queryParams: [
|
|
12932
|
+
"mechanism",
|
|
12933
|
+
"outcome",
|
|
12934
|
+
"generation_id",
|
|
12935
|
+
"since",
|
|
12936
|
+
"limit",
|
|
12937
|
+
"offset"
|
|
12938
|
+
],
|
|
12939
|
+
flags: [
|
|
12940
|
+
{
|
|
12941
|
+
"name": "project_id",
|
|
12942
|
+
"description": "Project public ID (proj_ prefix).",
|
|
12943
|
+
"required": true,
|
|
12944
|
+
"type": "string",
|
|
12945
|
+
"in": "path"
|
|
12946
|
+
},
|
|
12947
|
+
{
|
|
12948
|
+
"name": "memory_store_id",
|
|
12949
|
+
"description": "",
|
|
12950
|
+
"required": true,
|
|
12951
|
+
"type": "string",
|
|
12952
|
+
"in": "path"
|
|
12953
|
+
},
|
|
12954
|
+
{
|
|
12955
|
+
"name": "mechanism",
|
|
12956
|
+
"description": "Only assertions that came through this door.",
|
|
12957
|
+
"required": false,
|
|
12958
|
+
"type": "string",
|
|
12959
|
+
"in": "query"
|
|
12960
|
+
},
|
|
12961
|
+
{
|
|
12962
|
+
"name": "outcome",
|
|
12963
|
+
"description": "Only assertions that resolved this way.",
|
|
12964
|
+
"required": false,
|
|
12965
|
+
"type": "string",
|
|
12966
|
+
"in": "query"
|
|
12967
|
+
},
|
|
12968
|
+
{
|
|
12969
|
+
"name": "generation_id",
|
|
12970
|
+
"description": "Only assertions made during this generation. A generation that does not exist matches nothing rather than widening to the whole store.",
|
|
12971
|
+
"required": false,
|
|
12972
|
+
"type": "string",
|
|
12973
|
+
"in": "query"
|
|
12974
|
+
},
|
|
12975
|
+
{
|
|
12976
|
+
"name": "since",
|
|
12977
|
+
"description": "Only assertions recorded at or after this instant.",
|
|
12978
|
+
"required": false,
|
|
12979
|
+
"type": "string",
|
|
12980
|
+
"in": "query"
|
|
12981
|
+
},
|
|
12982
|
+
{
|
|
12983
|
+
"name": "limit",
|
|
12984
|
+
"description": "Maximum number of results to return",
|
|
12985
|
+
"required": false,
|
|
12986
|
+
"type": "integer",
|
|
12987
|
+
"in": "query"
|
|
12988
|
+
},
|
|
12989
|
+
{
|
|
12990
|
+
"name": "offset",
|
|
12991
|
+
"description": "Number of results to skip",
|
|
12992
|
+
"required": false,
|
|
12993
|
+
"type": "integer",
|
|
12994
|
+
"in": "query"
|
|
12995
|
+
}
|
|
12996
|
+
]
|
|
12997
|
+
},
|
|
12828
12998
|
"get-memory-store-tags": {
|
|
12829
12999
|
serviceClass: "MemoryStores",
|
|
12830
13000
|
operationId: "getMemoryStoreTags",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.129.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.129.0",
|
|
28
28
|
"@ttoss/openapi-codegen": "^0.3.0",
|
|
29
29
|
"@types/node": "^26.5.1",
|
|
30
30
|
"tsdown": "^0.23.0",
|