@totalreclaw/core 2.1.0-rc.1 → 2.1.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 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.1.0-rc.1",
4
+ "version": "2.1.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -552,6 +552,15 @@ export function hexBlobToBase64(hex_blob: string): string | undefined;
552
552
  */
553
553
  export function isPinnedClaim(claim_json: string): boolean;
554
554
 
555
+ /**
556
+ * Check whether a JSON-encoded claim is pinned, recognizing both the v0
557
+ * short-key sentinel (`st == "p"`) and the v1.1 field (`pin_status ==
558
+ * "pinned"`). Returns `false` on any parse failure.
559
+ *
560
+ * Wrapper around [`crate::claims::is_pinned_json`] for TS clients.
561
+ */
562
+ export function isPinnedClaimJson(claim_json: string): boolean;
563
+
555
564
  /**
556
565
  * Runtime guard: is `value` a valid v1 memory type?
557
566
  */
@@ -617,6 +626,11 @@ export function parseMemorySource(s: string): string;
617
626
  */
618
627
  export function parseMemoryTypeV1(s: string): string;
619
628
 
629
+ /**
630
+ * Case-insensitive parse of a v1.1 pin_status string. Unknown input returns "unpinned".
631
+ */
632
+ export function parsePinStatus(s: string): string;
633
+
620
634
  /**
621
635
  * Parse a batch profiling LLM response into a PartialProfile.
622
636
  *
@@ -1772,6 +1772,23 @@ function isPinnedClaim(claim_json) {
1772
1772
  }
1773
1773
  exports.isPinnedClaim = isPinnedClaim;
1774
1774
 
1775
+ /**
1776
+ * Check whether a JSON-encoded claim is pinned, recognizing both the v0
1777
+ * short-key sentinel (`st == "p"`) and the v1.1 field (`pin_status ==
1778
+ * "pinned"`). Returns `false` on any parse failure.
1779
+ *
1780
+ * Wrapper around [`crate::claims::is_pinned_json`] for TS clients.
1781
+ * @param {string} claim_json
1782
+ * @returns {boolean}
1783
+ */
1784
+ function isPinnedClaimJson(claim_json) {
1785
+ const ptr0 = passStringToWasm0(claim_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1786
+ const len0 = WASM_VECTOR_LEN;
1787
+ const ret = wasm.isPinnedClaimJson(ptr0, len0);
1788
+ return ret !== 0;
1789
+ }
1790
+ exports.isPinnedClaimJson = isPinnedClaimJson;
1791
+
1775
1792
  /**
1776
1793
  * Runtime guard: is `value` a valid v1 memory type?
1777
1794
  * @param {string} value
@@ -1988,6 +2005,27 @@ function parseMemoryTypeV1(s) {
1988
2005
  }
1989
2006
  exports.parseMemoryTypeV1 = parseMemoryTypeV1;
1990
2007
 
2008
+ /**
2009
+ * Case-insensitive parse of a v1.1 pin_status string. Unknown input returns "unpinned".
2010
+ * @param {string} s
2011
+ * @returns {string}
2012
+ */
2013
+ function parsePinStatus(s) {
2014
+ let deferred2_0;
2015
+ let deferred2_1;
2016
+ try {
2017
+ const ptr0 = passStringToWasm0(s, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2018
+ const len0 = WASM_VECTOR_LEN;
2019
+ const ret = wasm.parsePinStatus(ptr0, len0);
2020
+ deferred2_0 = ret[0];
2021
+ deferred2_1 = ret[1];
2022
+ return getStringFromWasm0(ret[0], ret[1]);
2023
+ } finally {
2024
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
2025
+ }
2026
+ }
2027
+ exports.parsePinStatus = parsePinStatus;
2028
+
1991
2029
  /**
1992
2030
  * Parse a batch profiling LLM response into a PartialProfile.
1993
2031
  *
Binary file