@totalreclaw/core 2.1.0-rc.1 → 2.2.0-rc.1
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/package.json +1 -1
- package/totalreclaw_core.d.ts +32 -0
- package/totalreclaw_core.js +82 -0
- package/totalreclaw_core_bg.wasm +0 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@totalreclaw/core",
|
|
3
3
|
"description": "TotalReclaw core — E2EE crypto, reranker, wallet, UserOp, store/search pipelines. Single source of truth for all clients.",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.2.0-rc.1",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
package/totalreclaw_core.d.ts
CHANGED
|
@@ -425,6 +425,14 @@ export function generateSearchTrapdoors(query: string, query_embedding: Float32A
|
|
|
425
425
|
*/
|
|
426
426
|
export function getBroadenedSearchQuery(): string;
|
|
427
427
|
|
|
428
|
+
/**
|
|
429
|
+
* Get the canonical v1 compaction system prompt.
|
|
430
|
+
*
|
|
431
|
+
* Used on end-of-context surfaces where the importance floor is 5 rather
|
|
432
|
+
* than the default 6.
|
|
433
|
+
*/
|
|
434
|
+
export function getCompactionSystemPrompt(): string;
|
|
435
|
+
|
|
428
436
|
/**
|
|
429
437
|
* WASM binding: get the consolidation cosine threshold constant.
|
|
430
438
|
*/
|
|
@@ -462,6 +470,16 @@ export function getEntryPointAddress(): string;
|
|
|
462
470
|
*/
|
|
463
471
|
export function getExportQuery(): string;
|
|
464
472
|
|
|
473
|
+
/**
|
|
474
|
+
* Get the canonical v1 merged-topic extraction system prompt.
|
|
475
|
+
*
|
|
476
|
+
* Single source of truth across all TotalReclaw clients — TS/WASM
|
|
477
|
+
* callers get the same bytes the Python `totalreclaw_core` module
|
|
478
|
+
* returns from `get_extraction_system_prompt()`. Includes the Rule 6
|
|
479
|
+
* meta-request filter (see the docstring on `prompts.rs`).
|
|
480
|
+
*/
|
|
481
|
+
export function getExtractionSystemPrompt(): string;
|
|
482
|
+
|
|
465
483
|
/**
|
|
466
484
|
* Get the maximum batch size constant.
|
|
467
485
|
*/
|
|
@@ -552,6 +570,15 @@ export function hexBlobToBase64(hex_blob: string): string | undefined;
|
|
|
552
570
|
*/
|
|
553
571
|
export function isPinnedClaim(claim_json: string): boolean;
|
|
554
572
|
|
|
573
|
+
/**
|
|
574
|
+
* Check whether a JSON-encoded claim is pinned, recognizing both the v0
|
|
575
|
+
* short-key sentinel (`st == "p"`) and the v1.1 field (`pin_status ==
|
|
576
|
+
* "pinned"`). Returns `false` on any parse failure.
|
|
577
|
+
*
|
|
578
|
+
* Wrapper around [`crate::claims::is_pinned_json`] for TS clients.
|
|
579
|
+
*/
|
|
580
|
+
export function isPinnedClaimJson(claim_json: string): boolean;
|
|
581
|
+
|
|
555
582
|
/**
|
|
556
583
|
* Runtime guard: is `value` a valid v1 memory type?
|
|
557
584
|
*/
|
|
@@ -617,6 +644,11 @@ export function parseMemorySource(s: string): string;
|
|
|
617
644
|
*/
|
|
618
645
|
export function parseMemoryTypeV1(s: string): string;
|
|
619
646
|
|
|
647
|
+
/**
|
|
648
|
+
* Case-insensitive parse of a v1.1 pin_status string. Unknown input returns "unpinned".
|
|
649
|
+
*/
|
|
650
|
+
export function parsePinStatus(s: string): string;
|
|
651
|
+
|
|
620
652
|
/**
|
|
621
653
|
* Parse a batch profiling LLM response into a PartialProfile.
|
|
622
654
|
*
|
package/totalreclaw_core.js
CHANGED
|
@@ -1438,6 +1438,27 @@ function getBroadenedSearchQuery() {
|
|
|
1438
1438
|
}
|
|
1439
1439
|
exports.getBroadenedSearchQuery = getBroadenedSearchQuery;
|
|
1440
1440
|
|
|
1441
|
+
/**
|
|
1442
|
+
* Get the canonical v1 compaction system prompt.
|
|
1443
|
+
*
|
|
1444
|
+
* Used on end-of-context surfaces where the importance floor is 5 rather
|
|
1445
|
+
* than the default 6.
|
|
1446
|
+
* @returns {string}
|
|
1447
|
+
*/
|
|
1448
|
+
function getCompactionSystemPrompt() {
|
|
1449
|
+
let deferred1_0;
|
|
1450
|
+
let deferred1_1;
|
|
1451
|
+
try {
|
|
1452
|
+
const ret = wasm.getCompactionSystemPrompt();
|
|
1453
|
+
deferred1_0 = ret[0];
|
|
1454
|
+
deferred1_1 = ret[1];
|
|
1455
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1456
|
+
} finally {
|
|
1457
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1458
|
+
}
|
|
1459
|
+
}
|
|
1460
|
+
exports.getCompactionSystemPrompt = getCompactionSystemPrompt;
|
|
1461
|
+
|
|
1441
1462
|
/**
|
|
1442
1463
|
* WASM binding: get the consolidation cosine threshold constant.
|
|
1443
1464
|
* @returns {number}
|
|
@@ -1558,6 +1579,29 @@ function getExportQuery() {
|
|
|
1558
1579
|
}
|
|
1559
1580
|
exports.getExportQuery = getExportQuery;
|
|
1560
1581
|
|
|
1582
|
+
/**
|
|
1583
|
+
* Get the canonical v1 merged-topic extraction system prompt.
|
|
1584
|
+
*
|
|
1585
|
+
* Single source of truth across all TotalReclaw clients — TS/WASM
|
|
1586
|
+
* callers get the same bytes the Python `totalreclaw_core` module
|
|
1587
|
+
* returns from `get_extraction_system_prompt()`. Includes the Rule 6
|
|
1588
|
+
* meta-request filter (see the docstring on `prompts.rs`).
|
|
1589
|
+
* @returns {string}
|
|
1590
|
+
*/
|
|
1591
|
+
function getExtractionSystemPrompt() {
|
|
1592
|
+
let deferred1_0;
|
|
1593
|
+
let deferred1_1;
|
|
1594
|
+
try {
|
|
1595
|
+
const ret = wasm.getExtractionSystemPrompt();
|
|
1596
|
+
deferred1_0 = ret[0];
|
|
1597
|
+
deferred1_1 = ret[1];
|
|
1598
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1599
|
+
} finally {
|
|
1600
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1601
|
+
}
|
|
1602
|
+
}
|
|
1603
|
+
exports.getExtractionSystemPrompt = getExtractionSystemPrompt;
|
|
1604
|
+
|
|
1561
1605
|
/**
|
|
1562
1606
|
* Get the maximum batch size constant.
|
|
1563
1607
|
* @returns {number}
|
|
@@ -1772,6 +1816,23 @@ function isPinnedClaim(claim_json) {
|
|
|
1772
1816
|
}
|
|
1773
1817
|
exports.isPinnedClaim = isPinnedClaim;
|
|
1774
1818
|
|
|
1819
|
+
/**
|
|
1820
|
+
* Check whether a JSON-encoded claim is pinned, recognizing both the v0
|
|
1821
|
+
* short-key sentinel (`st == "p"`) and the v1.1 field (`pin_status ==
|
|
1822
|
+
* "pinned"`). Returns `false` on any parse failure.
|
|
1823
|
+
*
|
|
1824
|
+
* Wrapper around [`crate::claims::is_pinned_json`] for TS clients.
|
|
1825
|
+
* @param {string} claim_json
|
|
1826
|
+
* @returns {boolean}
|
|
1827
|
+
*/
|
|
1828
|
+
function isPinnedClaimJson(claim_json) {
|
|
1829
|
+
const ptr0 = passStringToWasm0(claim_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1830
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1831
|
+
const ret = wasm.isPinnedClaimJson(ptr0, len0);
|
|
1832
|
+
return ret !== 0;
|
|
1833
|
+
}
|
|
1834
|
+
exports.isPinnedClaimJson = isPinnedClaimJson;
|
|
1835
|
+
|
|
1775
1836
|
/**
|
|
1776
1837
|
* Runtime guard: is `value` a valid v1 memory type?
|
|
1777
1838
|
* @param {string} value
|
|
@@ -1988,6 +2049,27 @@ function parseMemoryTypeV1(s) {
|
|
|
1988
2049
|
}
|
|
1989
2050
|
exports.parseMemoryTypeV1 = parseMemoryTypeV1;
|
|
1990
2051
|
|
|
2052
|
+
/**
|
|
2053
|
+
* Case-insensitive parse of a v1.1 pin_status string. Unknown input returns "unpinned".
|
|
2054
|
+
* @param {string} s
|
|
2055
|
+
* @returns {string}
|
|
2056
|
+
*/
|
|
2057
|
+
function parsePinStatus(s) {
|
|
2058
|
+
let deferred2_0;
|
|
2059
|
+
let deferred2_1;
|
|
2060
|
+
try {
|
|
2061
|
+
const ptr0 = passStringToWasm0(s, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2062
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2063
|
+
const ret = wasm.parsePinStatus(ptr0, len0);
|
|
2064
|
+
deferred2_0 = ret[0];
|
|
2065
|
+
deferred2_1 = ret[1];
|
|
2066
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2067
|
+
} finally {
|
|
2068
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
2069
|
+
}
|
|
2070
|
+
}
|
|
2071
|
+
exports.parsePinStatus = parsePinStatus;
|
|
2072
|
+
|
|
1991
2073
|
/**
|
|
1992
2074
|
* Parse a batch profiling LLM response into a PartialProfile.
|
|
1993
2075
|
*
|
package/totalreclaw_core_bg.wasm
CHANGED
|
Binary file
|