@signetai/connector-base 0.226.11 → 0.226.15

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.js CHANGED
@@ -18,12 +18,14 @@ var __toESM = (mod, isNodeMode, target) => {
18
18
  }
19
19
  target = mod != null ? __create(__getProtoOf(mod)) : {};
20
20
  const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
21
- for (let key of __getOwnPropNames(mod))
22
- if (!__hasOwnProp.call(to, key))
23
- __defProp(to, key, {
24
- get: __accessProp.bind(mod, key),
25
- enumerable: true
26
- });
21
+ if (mod && typeof mod === "object" || typeof mod === "function") {
22
+ for (let key of __getOwnPropNames(mod))
23
+ if (!__hasOwnProp.call(to, key))
24
+ __defProp(to, key, {
25
+ get: __accessProp.bind(mod, key),
26
+ enumerable: true
27
+ });
28
+ }
27
29
  if (canCache)
28
30
  cache.set(mod, to);
29
31
  return to;
@@ -51,11 +53,9 @@ import { promisify } from "node:util";
51
53
  import { createHash } from "node:crypto";
52
54
  import { homedir as homedir2 } from "node:os";
53
55
  import { join as join2, resolve } from "node:path";
54
- import { createHash as createHash2 } from "node:crypto";
55
- import { createRequire as createRequire2 } from "node:module";
56
56
  import {
57
57
  closeSync as closeSync2,
58
- existsSync as existsSync6,
58
+ existsSync as existsSync7,
59
59
  fsyncSync as fsyncSync2,
60
60
  mkdirSync as mkdirSync3,
61
61
  openSync as openSync2,
@@ -66,15 +66,15 @@ import {
66
66
  writeSync
67
67
  } from "node:fs";
68
68
  import { homedir as homedir4 } from "node:os";
69
- import { dirname as dirname3, join as join7, resolve as resolve2 } from "node:path";
70
- import { createRequire as createRequire3 } from "node:module";
69
+ import { dirname as dirname4, join as join8, resolve as resolve2 } from "node:path";
70
+ import { createRequire as createRequire2 } from "node:module";
71
71
  import { homedir as homedir5 } from "node:os";
72
- import { dirname as dirname4, join as join8, resolve as resolve3 } from "node:path";
72
+ import { dirname as dirname5, join as join9, resolve as resolve3 } from "node:path";
73
73
  import { homedir as homedir6, platform as platform2 } from "node:os";
74
- import { basename, dirname as dirname5, resolve as resolve5 } from "node:path";
74
+ import { basename, dirname as dirname6, resolve as resolve5 } from "node:path";
75
75
  import { homedir as homedir8 } from "node:os";
76
- import { existsSync as existsSync13, lstatSync, mkdirSync as mkdirSync8, readdirSync as readdirSync6, symlinkSync, unlinkSync as unlinkSync2 } from "node:fs";
77
- import { join as join13 } from "node:path";
76
+ import { existsSync as existsSync14, lstatSync, mkdirSync as mkdirSync8, readdirSync as readdirSync6, symlinkSync, unlinkSync as unlinkSync2 } from "node:fs";
77
+ import { join as join14 } from "node:path";
78
78
  var __create2 = Object.create;
79
79
  var __getProtoOf2 = Object.getPrototypeOf;
80
80
  var __defProp2 = Object.defineProperty;
@@ -95,12 +95,14 @@ var __toESM2 = (mod, isNodeMode, target) => {
95
95
  }
96
96
  target = mod != null ? __create2(__getProtoOf2(mod)) : {};
97
97
  const to = isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target;
98
- for (let key of __getOwnPropNames2(mod))
99
- if (!__hasOwnProp2.call(to, key))
100
- __defProp2(to, key, {
101
- get: __accessProp2.bind(mod, key),
102
- enumerable: true
103
- });
98
+ if (mod && typeof mod === "object" || typeof mod === "function") {
99
+ for (let key of __getOwnPropNames2(mod))
100
+ if (!__hasOwnProp2.call(to, key))
101
+ __defProp2(to, key, {
102
+ get: __accessProp2.bind(mod, key),
103
+ enumerable: true
104
+ });
105
+ }
104
106
  if (canCache)
105
107
  cache.set(mod, to);
106
108
  return to;
@@ -121,7 +123,7 @@ var __export = (target, all) => {
121
123
  };
122
124
  var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
123
125
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
124
- var require_identity = __commonJS2((exports) => {
126
+ var require_identity = __commonJS2(function(exports) {
125
127
  var ALIAS = Symbol.for("yaml.alias");
126
128
  var DOC = Symbol.for("yaml.document");
127
129
  var MAP = Symbol.for("yaml.map");
@@ -173,7 +175,7 @@ var require_identity = __commonJS2((exports) => {
173
175
  exports.isScalar = isScalar;
174
176
  exports.isSeq = isSeq;
175
177
  });
176
- var require_visit = __commonJS2((exports) => {
178
+ var require_visit = __commonJS2(function(exports) {
177
179
  var identity = require_identity();
178
180
  var BREAK = Symbol("break visit");
179
181
  var SKIP = Symbol("skip children");
@@ -326,7 +328,7 @@ var require_visit = __commonJS2((exports) => {
326
328
  exports.visit = visit;
327
329
  exports.visitAsync = visitAsync;
328
330
  });
329
- var require_directives = __commonJS2((exports) => {
331
+ var require_directives = __commonJS2(function(exports) {
330
332
  var identity = require_identity();
331
333
  var visit = require_visit();
332
334
  var escapeChars = {
@@ -476,7 +478,7 @@ var require_directives = __commonJS2((exports) => {
476
478
  Directives.defaultTags = { "!!": "tag:yaml.org,2002:" };
477
479
  exports.Directives = Directives;
478
480
  });
479
- var require_anchors = __commonJS2((exports) => {
481
+ var require_anchors = __commonJS2(function(exports) {
480
482
  var identity = require_identity();
481
483
  var visit = require_visit();
482
484
  function anchorIsValid(anchor) {
@@ -536,7 +538,7 @@ var require_anchors = __commonJS2((exports) => {
536
538
  exports.createNodeAnchors = createNodeAnchors;
537
539
  exports.findNewAnchor = findNewAnchor;
538
540
  });
539
- var require_applyReviver = __commonJS2((exports) => {
541
+ var require_applyReviver = __commonJS2(function(exports) {
540
542
  function applyReviver(reviver, obj, key, val) {
541
543
  if (val && typeof val === "object") {
542
544
  if (Array.isArray(val)) {
@@ -581,7 +583,7 @@ var require_applyReviver = __commonJS2((exports) => {
581
583
  }
582
584
  exports.applyReviver = applyReviver;
583
585
  });
584
- var require_toJS = __commonJS2((exports) => {
586
+ var require_toJS = __commonJS2(function(exports) {
585
587
  var identity = require_identity();
586
588
  function toJS(value, arg, ctx) {
587
589
  if (Array.isArray(value))
@@ -606,7 +608,7 @@ var require_toJS = __commonJS2((exports) => {
606
608
  }
607
609
  exports.toJS = toJS;
608
610
  });
609
- var require_Node = __commonJS2((exports) => {
611
+ var require_Node = __commonJS2(function(exports) {
610
612
  var applyReviver = require_applyReviver();
611
613
  var identity = require_identity();
612
614
  var toJS = require_toJS();
@@ -641,7 +643,7 @@ var require_Node = __commonJS2((exports) => {
641
643
  }
642
644
  exports.NodeBase = NodeBase;
643
645
  });
644
- var require_Alias = __commonJS2((exports) => {
646
+ var require_Alias = __commonJS2(function(exports) {
645
647
  var anchors = require_anchors();
646
648
  var visit = require_visit();
647
649
  var identity = require_identity();
@@ -749,7 +751,7 @@ var require_Alias = __commonJS2((exports) => {
749
751
  }
750
752
  exports.Alias = Alias;
751
753
  });
752
- var require_Scalar = __commonJS2((exports) => {
754
+ var require_Scalar = __commonJS2(function(exports) {
753
755
  var identity = require_identity();
754
756
  var Node = require_Node();
755
757
  var toJS = require_toJS();
@@ -775,7 +777,7 @@ var require_Scalar = __commonJS2((exports) => {
775
777
  exports.Scalar = Scalar;
776
778
  exports.isScalarValue = isScalarValue;
777
779
  });
778
- var require_createNode = __commonJS2((exports) => {
780
+ var require_createNode = __commonJS2(function(exports) {
779
781
  var Alias = require_Alias();
780
782
  var identity = require_identity();
781
783
  var Scalar = require_Scalar();
@@ -845,7 +847,7 @@ var require_createNode = __commonJS2((exports) => {
845
847
  }
846
848
  exports.createNode = createNode;
847
849
  });
848
- var require_Collection = __commonJS2((exports) => {
850
+ var require_Collection = __commonJS2(function(exports) {
849
851
  var createNode = require_createNode();
850
852
  var identity = require_identity();
851
853
  var Node = require_Node();
@@ -958,7 +960,7 @@ var require_Collection = __commonJS2((exports) => {
958
960
  exports.collectionFromPath = collectionFromPath;
959
961
  exports.isEmptyPath = isEmptyPath;
960
962
  });
961
- var require_stringifyComment = __commonJS2((exports) => {
963
+ var require_stringifyComment = __commonJS2(function(exports) {
962
964
  var stringifyComment = (str) => str.replace(/^(?!$)(?: $)?/gm, "#");
963
965
  function indentComment(comment, indent) {
964
966
  if (/^\n+$/.test(comment))
@@ -973,7 +975,7 @@ var require_stringifyComment = __commonJS2((exports) => {
973
975
  exports.lineComment = lineComment;
974
976
  exports.stringifyComment = stringifyComment;
975
977
  });
976
- var require_foldFlowLines = __commonJS2((exports) => {
978
+ var require_foldFlowLines = __commonJS2(function(exports) {
977
979
  var FOLD_FLOW = "flow";
978
980
  var FOLD_BLOCK = "block";
979
981
  var FOLD_QUOTED = "quoted";
@@ -1108,7 +1110,7 @@ ${indent}${text.slice(fold + 1, end2)}`;
1108
1110
  exports.FOLD_QUOTED = FOLD_QUOTED;
1109
1111
  exports.foldFlowLines = foldFlowLines;
1110
1112
  });
1111
- var require_stringifyString = __commonJS2((exports) => {
1113
+ var require_stringifyString = __commonJS2(function(exports) {
1112
1114
  var Scalar = require_Scalar();
1113
1115
  var foldFlowLines = require_foldFlowLines();
1114
1116
  var getFoldOptions = (ctx, isBlock) => ({
@@ -1404,7 +1406,7 @@ ${indent}`);
1404
1406
  }
1405
1407
  exports.stringifyString = stringifyString;
1406
1408
  });
1407
- var require_stringify = __commonJS2((exports) => {
1409
+ var require_stringify = __commonJS2(function(exports) {
1408
1410
  var anchors = require_anchors();
1409
1411
  var identity = require_identity();
1410
1412
  var stringifyComment = require_stringifyComment();
@@ -1523,7 +1525,7 @@ ${ctx.indent}${str}`;
1523
1525
  exports.createStringifyContext = createStringifyContext;
1524
1526
  exports.stringify = stringify;
1525
1527
  });
1526
- var require_stringifyPair = __commonJS2((exports) => {
1528
+ var require_stringifyPair = __commonJS2(function(exports) {
1527
1529
  var identity = require_identity();
1528
1530
  var Scalar = require_Scalar();
1529
1531
  var stringify = require_stringify();
@@ -1657,7 +1659,7 @@ ${ctx.indent}`;
1657
1659
  }
1658
1660
  exports.stringifyPair = stringifyPair;
1659
1661
  });
1660
- var require_log = __commonJS2((exports) => {
1662
+ var require_log = __commonJS2(function(exports) {
1661
1663
  var node_process = __require("process");
1662
1664
  function debug(logLevel, ...messages) {
1663
1665
  if (logLevel === "debug")
@@ -1674,7 +1676,7 @@ var require_log = __commonJS2((exports) => {
1674
1676
  exports.debug = debug;
1675
1677
  exports.warn = warn;
1676
1678
  });
1677
- var require_merge = __commonJS2((exports) => {
1679
+ var require_merge = __commonJS2(function(exports) {
1678
1680
  var identity = require_identity();
1679
1681
  var Scalar = require_Scalar();
1680
1682
  var MERGE_KEY = "<<";
@@ -1729,7 +1731,7 @@ var require_merge = __commonJS2((exports) => {
1729
1731
  exports.isMergeKey = isMergeKey;
1730
1732
  exports.merge = merge;
1731
1733
  });
1732
- var require_addPairToJSMap = __commonJS2((exports) => {
1734
+ var require_addPairToJSMap = __commonJS2(function(exports) {
1733
1735
  var log = require_log();
1734
1736
  var merge = require_merge();
1735
1737
  var stringify = require_stringify();
@@ -1788,7 +1790,7 @@ var require_addPairToJSMap = __commonJS2((exports) => {
1788
1790
  }
1789
1791
  exports.addPairToJSMap = addPairToJSMap;
1790
1792
  });
1791
- var require_Pair = __commonJS2((exports) => {
1793
+ var require_Pair = __commonJS2(function(exports) {
1792
1794
  var createNode = require_createNode();
1793
1795
  var stringifyPair = require_stringifyPair();
1794
1796
  var addPairToJSMap = require_addPairToJSMap();
@@ -1824,7 +1826,7 @@ var require_Pair = __commonJS2((exports) => {
1824
1826
  exports.Pair = Pair;
1825
1827
  exports.createPair = createPair;
1826
1828
  });
1827
- var require_stringifyCollection = __commonJS2((exports) => {
1829
+ var require_stringifyCollection = __commonJS2(function(exports) {
1828
1830
  var identity = require_identity();
1829
1831
  var stringify = require_stringify();
1830
1832
  var stringifyComment = require_stringifyComment();
@@ -1974,7 +1976,7 @@ ${indent}${end}`;
1974
1976
  }
1975
1977
  exports.stringifyCollection = stringifyCollection;
1976
1978
  });
1977
- var require_YAMLMap = __commonJS2((exports) => {
1979
+ var require_YAMLMap = __commonJS2(function(exports) {
1978
1980
  var stringifyCollection = require_stringifyCollection();
1979
1981
  var addPairToJSMap = require_addPairToJSMap();
1980
1982
  var Collection = require_Collection();
@@ -2099,7 +2101,7 @@ var require_YAMLMap = __commonJS2((exports) => {
2099
2101
  exports.YAMLMap = YAMLMap;
2100
2102
  exports.findPair = findPair;
2101
2103
  });
2102
- var require_map = __commonJS2((exports) => {
2104
+ var require_map = __commonJS2(function(exports) {
2103
2105
  var identity = require_identity();
2104
2106
  var YAMLMap = require_YAMLMap();
2105
2107
  var map = {
@@ -2116,7 +2118,7 @@ var require_map = __commonJS2((exports) => {
2116
2118
  };
2117
2119
  exports.map = map;
2118
2120
  });
2119
- var require_YAMLSeq = __commonJS2((exports) => {
2121
+ var require_YAMLSeq = __commonJS2(function(exports) {
2120
2122
  var createNode = require_createNode();
2121
2123
  var stringifyCollection = require_stringifyCollection();
2122
2124
  var Collection = require_Collection();
@@ -2207,7 +2209,7 @@ var require_YAMLSeq = __commonJS2((exports) => {
2207
2209
  }
2208
2210
  exports.YAMLSeq = YAMLSeq;
2209
2211
  });
2210
- var require_seq = __commonJS2((exports) => {
2212
+ var require_seq = __commonJS2(function(exports) {
2211
2213
  var identity = require_identity();
2212
2214
  var YAMLSeq = require_YAMLSeq();
2213
2215
  var seq = {
@@ -2224,7 +2226,7 @@ var require_seq = __commonJS2((exports) => {
2224
2226
  };
2225
2227
  exports.seq = seq;
2226
2228
  });
2227
- var require_string = __commonJS2((exports) => {
2229
+ var require_string = __commonJS2(function(exports) {
2228
2230
  var stringifyString = require_stringifyString();
2229
2231
  var string = {
2230
2232
  identify: (value) => typeof value === "string",
@@ -2238,7 +2240,7 @@ var require_string = __commonJS2((exports) => {
2238
2240
  };
2239
2241
  exports.string = string;
2240
2242
  });
2241
- var require_null = __commonJS2((exports) => {
2243
+ var require_null = __commonJS2(function(exports) {
2242
2244
  var Scalar = require_Scalar();
2243
2245
  var nullTag = {
2244
2246
  identify: (value) => value == null,
@@ -2251,7 +2253,7 @@ var require_null = __commonJS2((exports) => {
2251
2253
  };
2252
2254
  exports.nullTag = nullTag;
2253
2255
  });
2254
- var require_bool = __commonJS2((exports) => {
2256
+ var require_bool = __commonJS2(function(exports) {
2255
2257
  var Scalar = require_Scalar();
2256
2258
  var boolTag = {
2257
2259
  identify: (value) => typeof value === "boolean",
@@ -2270,7 +2272,7 @@ var require_bool = __commonJS2((exports) => {
2270
2272
  };
2271
2273
  exports.boolTag = boolTag;
2272
2274
  });
2273
- var require_stringifyNumber = __commonJS2((exports) => {
2275
+ var require_stringifyNumber = __commonJS2(function(exports) {
2274
2276
  function stringifyNumber({ format, minFractionDigits, tag, value }) {
2275
2277
  if (typeof value === "bigint")
2276
2278
  return String(value);
@@ -2292,7 +2294,7 @@ var require_stringifyNumber = __commonJS2((exports) => {
2292
2294
  }
2293
2295
  exports.stringifyNumber = stringifyNumber;
2294
2296
  });
2295
- var require_float = __commonJS2((exports) => {
2297
+ var require_float = __commonJS2(function(exports) {
2296
2298
  var Scalar = require_Scalar();
2297
2299
  var stringifyNumber = require_stringifyNumber();
2298
2300
  var floatNaN = {
@@ -2333,7 +2335,7 @@ var require_float = __commonJS2((exports) => {
2333
2335
  exports.floatExp = floatExp;
2334
2336
  exports.floatNaN = floatNaN;
2335
2337
  });
2336
- var require_int = __commonJS2((exports) => {
2338
+ var require_int = __commonJS2(function(exports) {
2337
2339
  var stringifyNumber = require_stringifyNumber();
2338
2340
  var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
2339
2341
  var intResolve = (str, offset, radix, { intAsBigInt }) => intAsBigInt ? BigInt(str) : parseInt(str.substring(offset), radix);
@@ -2373,7 +2375,7 @@ var require_int = __commonJS2((exports) => {
2373
2375
  exports.intHex = intHex;
2374
2376
  exports.intOct = intOct;
2375
2377
  });
2376
- var require_schema = __commonJS2((exports) => {
2378
+ var require_schema = __commonJS2(function(exports) {
2377
2379
  var map = require_map();
2378
2380
  var _null = require_null();
2379
2381
  var seq = require_seq();
@@ -2396,7 +2398,7 @@ var require_schema = __commonJS2((exports) => {
2396
2398
  ];
2397
2399
  exports.schema = schema;
2398
2400
  });
2399
- var require_schema2 = __commonJS2((exports) => {
2401
+ var require_schema2 = __commonJS2(function(exports) {
2400
2402
  var Scalar = require_Scalar();
2401
2403
  var map = require_map();
2402
2404
  var seq = require_seq();
@@ -2458,7 +2460,7 @@ var require_schema2 = __commonJS2((exports) => {
2458
2460
  var schema = [map.map, seq.seq].concat(jsonScalars, jsonError);
2459
2461
  exports.schema = schema;
2460
2462
  });
2461
- var require_binary = __commonJS2((exports) => {
2463
+ var require_binary = __commonJS2(function(exports) {
2462
2464
  var node_buffer = __require("buffer");
2463
2465
  var Scalar = require_Scalar();
2464
2466
  var stringifyString = require_stringifyString();
@@ -2511,7 +2513,7 @@ var require_binary = __commonJS2((exports) => {
2511
2513
  };
2512
2514
  exports.binary = binary;
2513
2515
  });
2514
- var require_pairs = __commonJS2((exports) => {
2516
+ var require_pairs = __commonJS2(function(exports) {
2515
2517
  var identity = require_identity();
2516
2518
  var Pair = require_Pair();
2517
2519
  var Scalar = require_Scalar();
@@ -2584,7 +2586,7 @@ ${cn.comment}` : item.comment;
2584
2586
  exports.pairs = pairs;
2585
2587
  exports.resolvePairs = resolvePairs;
2586
2588
  });
2587
- var require_omap = __commonJS2((exports) => {
2589
+ var require_omap = __commonJS2(function(exports) {
2588
2590
  var identity = require_identity();
2589
2591
  var toJS = require_toJS();
2590
2592
  var YAMLMap = require_YAMLMap();
@@ -2654,7 +2656,7 @@ var require_omap = __commonJS2((exports) => {
2654
2656
  exports.YAMLOMap = YAMLOMap;
2655
2657
  exports.omap = omap;
2656
2658
  });
2657
- var require_bool2 = __commonJS2((exports) => {
2659
+ var require_bool2 = __commonJS2(function(exports) {
2658
2660
  var Scalar = require_Scalar();
2659
2661
  function boolStringify({ value, source }, ctx) {
2660
2662
  const boolObj = value ? trueTag : falseTag;
@@ -2681,7 +2683,7 @@ var require_bool2 = __commonJS2((exports) => {
2681
2683
  exports.falseTag = falseTag;
2682
2684
  exports.trueTag = trueTag;
2683
2685
  });
2684
- var require_float2 = __commonJS2((exports) => {
2686
+ var require_float2 = __commonJS2(function(exports) {
2685
2687
  var Scalar = require_Scalar();
2686
2688
  var stringifyNumber = require_stringifyNumber();
2687
2689
  var floatNaN = {
@@ -2725,7 +2727,7 @@ var require_float2 = __commonJS2((exports) => {
2725
2727
  exports.floatExp = floatExp;
2726
2728
  exports.floatNaN = floatNaN;
2727
2729
  });
2728
- var require_int2 = __commonJS2((exports) => {
2730
+ var require_int2 = __commonJS2(function(exports) {
2729
2731
  var stringifyNumber = require_stringifyNumber();
2730
2732
  var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
2731
2733
  function intResolve(str, offset, radix, { intAsBigInt }) {
@@ -2799,7 +2801,7 @@ var require_int2 = __commonJS2((exports) => {
2799
2801
  exports.intHex = intHex;
2800
2802
  exports.intOct = intOct;
2801
2803
  });
2802
- var require_set = __commonJS2((exports) => {
2804
+ var require_set = __commonJS2(function(exports) {
2803
2805
  var identity = require_identity();
2804
2806
  var Pair = require_Pair();
2805
2807
  var YAMLMap = require_YAMLMap();
@@ -2880,7 +2882,7 @@ var require_set = __commonJS2((exports) => {
2880
2882
  exports.YAMLSet = YAMLSet;
2881
2883
  exports.set = set;
2882
2884
  });
2883
- var require_timestamp = __commonJS2((exports) => {
2885
+ var require_timestamp = __commonJS2(function(exports) {
2884
2886
  var stringifyNumber = require_stringifyNumber();
2885
2887
  function parseSexagesimal(str, asBigInt) {
2886
2888
  const sign = str[0];
@@ -2960,7 +2962,7 @@ var require_timestamp = __commonJS2((exports) => {
2960
2962
  exports.intTime = intTime;
2961
2963
  exports.timestamp = timestamp;
2962
2964
  });
2963
- var require_schema3 = __commonJS2((exports) => {
2965
+ var require_schema3 = __commonJS2(function(exports) {
2964
2966
  var map = require_map();
2965
2967
  var _null = require_null();
2966
2968
  var seq = require_seq();
@@ -2999,7 +3001,7 @@ var require_schema3 = __commonJS2((exports) => {
2999
3001
  ];
3000
3002
  exports.schema = schema;
3001
3003
  });
3002
- var require_tags = __commonJS2((exports) => {
3004
+ var require_tags = __commonJS2(function(exports) {
3003
3005
  var map = require_map();
3004
3006
  var _null = require_null();
3005
3007
  var seq = require_seq();
@@ -3088,7 +3090,7 @@ var require_tags = __commonJS2((exports) => {
3088
3090
  exports.coreKnownTags = coreKnownTags;
3089
3091
  exports.getTags = getTags;
3090
3092
  });
3091
- var require_Schema = __commonJS2((exports) => {
3093
+ var require_Schema = __commonJS2(function(exports) {
3092
3094
  var identity = require_identity();
3093
3095
  var map = require_map();
3094
3096
  var seq = require_seq();
@@ -3116,7 +3118,7 @@ var require_Schema = __commonJS2((exports) => {
3116
3118
  }
3117
3119
  exports.Schema = Schema;
3118
3120
  });
3119
- var require_stringifyDocument = __commonJS2((exports) => {
3121
+ var require_stringifyDocument = __commonJS2(function(exports) {
3120
3122
  var identity = require_identity();
3121
3123
  var stringify = require_stringify();
3122
3124
  var stringifyComment = require_stringifyComment();
@@ -3194,7 +3196,7 @@ var require_stringifyDocument = __commonJS2((exports) => {
3194
3196
  }
3195
3197
  exports.stringifyDocument = stringifyDocument;
3196
3198
  });
3197
- var require_Document = __commonJS2((exports) => {
3199
+ var require_Document = __commonJS2(function(exports) {
3198
3200
  var Alias = require_Alias();
3199
3201
  var Collection = require_Collection();
3200
3202
  var identity = require_identity();
@@ -3427,7 +3429,7 @@ var require_Document = __commonJS2((exports) => {
3427
3429
  }
3428
3430
  exports.Document = Document;
3429
3431
  });
3430
- var require_errors = __commonJS2((exports) => {
3432
+ var require_errors = __commonJS2(function(exports) {
3431
3433
 
3432
3434
  class YAMLError extends Error {
3433
3435
  constructor(name, pos, code, message) {
@@ -3491,7 +3493,7 @@ ${pointer}
3491
3493
  exports.YAMLWarning = YAMLWarning;
3492
3494
  exports.prettifyError = prettifyError;
3493
3495
  });
3494
- var require_resolve_props = __commonJS2((exports) => {
3496
+ var require_resolve_props = __commonJS2(function(exports) {
3495
3497
  function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIndent, startOnNewline }) {
3496
3498
  let spaceBefore = false;
3497
3499
  let atNewline = startOnNewline;
@@ -3619,7 +3621,7 @@ var require_resolve_props = __commonJS2((exports) => {
3619
3621
  }
3620
3622
  exports.resolveProps = resolveProps;
3621
3623
  });
3622
- var require_util_contains_newline = __commonJS2((exports) => {
3624
+ var require_util_contains_newline = __commonJS2(function(exports) {
3623
3625
  function containsNewline(key) {
3624
3626
  if (!key)
3625
3627
  return null;
@@ -3657,7 +3659,7 @@ var require_util_contains_newline = __commonJS2((exports) => {
3657
3659
  }
3658
3660
  exports.containsNewline = containsNewline;
3659
3661
  });
3660
- var require_util_flow_indent_check = __commonJS2((exports) => {
3662
+ var require_util_flow_indent_check = __commonJS2(function(exports) {
3661
3663
  var utilContainsNewline = require_util_contains_newline();
3662
3664
  function flowIndentCheck(indent, fc, onError) {
3663
3665
  if (fc?.type === "flow-collection") {
@@ -3670,7 +3672,7 @@ var require_util_flow_indent_check = __commonJS2((exports) => {
3670
3672
  }
3671
3673
  exports.flowIndentCheck = flowIndentCheck;
3672
3674
  });
3673
- var require_util_map_includes = __commonJS2((exports) => {
3675
+ var require_util_map_includes = __commonJS2(function(exports) {
3674
3676
  var identity = require_identity();
3675
3677
  function mapIncludes(ctx, items, search) {
3676
3678
  const { uniqueKeys } = ctx.options;
@@ -3681,7 +3683,7 @@ var require_util_map_includes = __commonJS2((exports) => {
3681
3683
  }
3682
3684
  exports.mapIncludes = mapIncludes;
3683
3685
  });
3684
- var require_resolve_block_map = __commonJS2((exports) => {
3686
+ var require_resolve_block_map = __commonJS2(function(exports) {
3685
3687
  var Pair = require_Pair();
3686
3688
  var YAMLMap = require_YAMLMap();
3687
3689
  var resolveProps = require_resolve_props();
@@ -3786,7 +3788,7 @@ var require_resolve_block_map = __commonJS2((exports) => {
3786
3788
  }
3787
3789
  exports.resolveBlockMap = resolveBlockMap;
3788
3790
  });
3789
- var require_resolve_block_seq = __commonJS2((exports) => {
3791
+ var require_resolve_block_seq = __commonJS2(function(exports) {
3790
3792
  var YAMLSeq = require_YAMLSeq();
3791
3793
  var resolveProps = require_resolve_props();
3792
3794
  var utilFlowIndentCheck = require_util_flow_indent_check();
@@ -3832,7 +3834,7 @@ var require_resolve_block_seq = __commonJS2((exports) => {
3832
3834
  }
3833
3835
  exports.resolveBlockSeq = resolveBlockSeq;
3834
3836
  });
3835
- var require_resolve_end = __commonJS2((exports) => {
3837
+ var require_resolve_end = __commonJS2(function(exports) {
3836
3838
  function resolveEnd(end, offset, reqSpace, onError) {
3837
3839
  let comment = "";
3838
3840
  if (end) {
@@ -3870,7 +3872,7 @@ var require_resolve_end = __commonJS2((exports) => {
3870
3872
  }
3871
3873
  exports.resolveEnd = resolveEnd;
3872
3874
  });
3873
- var require_resolve_flow_collection = __commonJS2((exports) => {
3875
+ var require_resolve_flow_collection = __commonJS2(function(exports) {
3874
3876
  var identity = require_identity();
3875
3877
  var Pair = require_Pair();
3876
3878
  var YAMLMap = require_YAMLMap();
@@ -4059,7 +4061,7 @@ var require_resolve_flow_collection = __commonJS2((exports) => {
4059
4061
  }
4060
4062
  exports.resolveFlowCollection = resolveFlowCollection;
4061
4063
  });
4062
- var require_compose_collection = __commonJS2((exports) => {
4064
+ var require_compose_collection = __commonJS2(function(exports) {
4063
4065
  var identity = require_identity();
4064
4066
  var Scalar = require_Scalar();
4065
4067
  var YAMLMap = require_YAMLMap();
@@ -4119,7 +4121,7 @@ var require_compose_collection = __commonJS2((exports) => {
4119
4121
  }
4120
4122
  exports.composeCollection = composeCollection;
4121
4123
  });
4122
- var require_resolve_block_scalar = __commonJS2((exports) => {
4124
+ var require_resolve_block_scalar = __commonJS2(function(exports) {
4123
4125
  var Scalar = require_Scalar();
4124
4126
  function resolveBlockScalar(ctx, scalar, onError) {
4125
4127
  const start = scalar.offset;
@@ -4310,7 +4312,7 @@ var require_resolve_block_scalar = __commonJS2((exports) => {
4310
4312
  }
4311
4313
  exports.resolveBlockScalar = resolveBlockScalar;
4312
4314
  });
4313
- var require_resolve_flow_scalar = __commonJS2((exports) => {
4315
+ var require_resolve_flow_scalar = __commonJS2(function(exports) {
4314
4316
  var Scalar = require_Scalar();
4315
4317
  var resolveEnd = require_resolve_end();
4316
4318
  function resolveFlowScalar(scalar, strict, onError) {
@@ -4525,7 +4527,7 @@ var require_resolve_flow_scalar = __commonJS2((exports) => {
4525
4527
  }
4526
4528
  exports.resolveFlowScalar = resolveFlowScalar;
4527
4529
  });
4528
- var require_compose_scalar = __commonJS2((exports) => {
4530
+ var require_compose_scalar = __commonJS2(function(exports) {
4529
4531
  var identity = require_identity();
4530
4532
  var Scalar = require_Scalar();
4531
4533
  var resolveBlockScalar = require_resolve_block_scalar();
@@ -4601,7 +4603,7 @@ var require_compose_scalar = __commonJS2((exports) => {
4601
4603
  }
4602
4604
  exports.composeScalar = composeScalar;
4603
4605
  });
4604
- var require_util_empty_scalar_position = __commonJS2((exports) => {
4606
+ var require_util_empty_scalar_position = __commonJS2(function(exports) {
4605
4607
  function emptyScalarPosition(offset, before, pos) {
4606
4608
  if (before) {
4607
4609
  pos ?? (pos = before.length);
@@ -4626,7 +4628,7 @@ var require_util_empty_scalar_position = __commonJS2((exports) => {
4626
4628
  }
4627
4629
  exports.emptyScalarPosition = emptyScalarPosition;
4628
4630
  });
4629
- var require_compose_node = __commonJS2((exports) => {
4631
+ var require_compose_node = __commonJS2(function(exports) {
4630
4632
  var Alias = require_Alias();
4631
4633
  var identity = require_identity();
4632
4634
  var composeCollection = require_compose_collection();
@@ -4727,7 +4729,7 @@ var require_compose_node = __commonJS2((exports) => {
4727
4729
  exports.composeEmptyNode = composeEmptyNode;
4728
4730
  exports.composeNode = composeNode;
4729
4731
  });
4730
- var require_compose_doc = __commonJS2((exports) => {
4732
+ var require_compose_doc = __commonJS2(function(exports) {
4731
4733
  var Document = require_Document();
4732
4734
  var composeNode = require_compose_node();
4733
4735
  var resolveEnd = require_resolve_end();
@@ -4765,7 +4767,7 @@ var require_compose_doc = __commonJS2((exports) => {
4765
4767
  }
4766
4768
  exports.composeDoc = composeDoc;
4767
4769
  });
4768
- var require_composer = __commonJS2((exports) => {
4770
+ var require_composer = __commonJS2(function(exports) {
4769
4771
  var node_process = __require("process");
4770
4772
  var directives = require_directives();
4771
4773
  var Document = require_Document();
@@ -4954,7 +4956,7 @@ ${end.comment}` : end.comment;
4954
4956
  }
4955
4957
  exports.Composer = Composer;
4956
4958
  });
4957
- var require_cst_scalar = __commonJS2((exports) => {
4959
+ var require_cst_scalar = __commonJS2(function(exports) {
4958
4960
  var resolveBlockScalar = require_resolve_block_scalar();
4959
4961
  var resolveFlowScalar = require_resolve_flow_scalar();
4960
4962
  var errors = require_errors();
@@ -5142,7 +5144,7 @@ var require_cst_scalar = __commonJS2((exports) => {
5142
5144
  exports.resolveAsScalar = resolveAsScalar;
5143
5145
  exports.setScalarValue = setScalarValue;
5144
5146
  });
5145
- var require_cst_stringify = __commonJS2((exports) => {
5147
+ var require_cst_stringify = __commonJS2(function(exports) {
5146
5148
  var stringify = (cst) => ("type" in cst) ? stringifyToken(cst) : stringifyItem(cst);
5147
5149
  function stringifyToken(token) {
5148
5150
  switch (token.type) {
@@ -5198,7 +5200,7 @@ var require_cst_stringify = __commonJS2((exports) => {
5198
5200
  }
5199
5201
  exports.stringify = stringify;
5200
5202
  });
5201
- var require_cst_visit = __commonJS2((exports) => {
5203
+ var require_cst_visit = __commonJS2(function(exports) {
5202
5204
  var BREAK = Symbol("break visit");
5203
5205
  var SKIP = Symbol("skip children");
5204
5206
  var REMOVE = Symbol("remove item");
@@ -5255,7 +5257,7 @@ var require_cst_visit = __commonJS2((exports) => {
5255
5257
  }
5256
5258
  exports.visit = visit;
5257
5259
  });
5258
- var require_cst = __commonJS2((exports) => {
5260
+ var require_cst = __commonJS2(function(exports) {
5259
5261
  var cstScalar = require_cst_scalar();
5260
5262
  var cstStringify = require_cst_stringify();
5261
5263
  var cstVisit = require_cst_visit();
@@ -5354,7 +5356,7 @@ var require_cst = __commonJS2((exports) => {
5354
5356
  exports.prettyToken = prettyToken;
5355
5357
  exports.tokenType = tokenType;
5356
5358
  });
5357
- var require_lexer = __commonJS2((exports) => {
5359
+ var require_lexer = __commonJS2(function(exports) {
5358
5360
  var cst = require_cst();
5359
5361
  function isEmpty(ch) {
5360
5362
  switch (ch) {
@@ -5949,7 +5951,7 @@ var require_lexer = __commonJS2((exports) => {
5949
5951
  }
5950
5952
  exports.Lexer = Lexer;
5951
5953
  });
5952
- var require_line_counter = __commonJS2((exports) => {
5954
+ var require_line_counter = __commonJS2(function(exports) {
5953
5955
 
5954
5956
  class LineCounter {
5955
5957
  constructor() {
@@ -5976,7 +5978,7 @@ var require_line_counter = __commonJS2((exports) => {
5976
5978
  }
5977
5979
  exports.LineCounter = LineCounter;
5978
5980
  });
5979
- var require_parser = __commonJS2((exports) => {
5981
+ var require_parser = __commonJS2(function(exports) {
5980
5982
  var node_process = __require("process");
5981
5983
  var cst = require_cst();
5982
5984
  var lexer = require_lexer();
@@ -6830,7 +6832,7 @@ var require_parser = __commonJS2((exports) => {
6830
6832
  }
6831
6833
  exports.Parser = Parser;
6832
6834
  });
6833
- var require_public_api = __commonJS2((exports) => {
6835
+ var require_public_api = __commonJS2(function(exports) {
6834
6836
  var composer = require_composer();
6835
6837
  var Document = require_Document();
6836
6838
  var errors = require_errors();
@@ -6922,7 +6924,7 @@ var require_public_api = __commonJS2((exports) => {
6922
6924
  exports.parseDocument = parseDocument;
6923
6925
  exports.stringify = stringify;
6924
6926
  });
6925
- var require_dist = __commonJS2((exports) => {
6927
+ var require_dist = __commonJS2(function(exports) {
6926
6928
  var composer = require_composer();
6927
6929
  var Document = require_Document();
6928
6930
  var Schema = require_Schema();
@@ -6969,715 +6971,6 @@ var require_dist = __commonJS2((exports) => {
6969
6971
  exports.visit = visit.visit;
6970
6972
  exports.visitAsync = visit.visitAsync;
6971
6973
  });
6972
- var require_keyring_linux_x64_musl = __commonJS2((exports, module) => {
6973
- module.exports = __require("./keyring.linux-x64-musl-gxd42x54.node");
6974
- });
6975
- var require_package = __commonJS2((exports, module) => {
6976
- module.exports = {
6977
- name: "@napi-rs/keyring-linux-x64-musl",
6978
- version: "1.3.0",
6979
- cpu: [
6980
- "x64"
6981
- ],
6982
- main: "keyring.linux-x64-musl.node",
6983
- files: [
6984
- "keyring.linux-x64-musl.node"
6985
- ],
6986
- description: "https://github.com/hwchen/keyring-rs Node.js binding via https://napi.rs",
6987
- keywords: [
6988
- "napi-rs",
6989
- "NAPI",
6990
- "N-API",
6991
- "Rust",
6992
- "node-addon",
6993
- "node-addon-api"
6994
- ],
6995
- license: "MIT",
6996
- engines: {
6997
- node: ">= 10"
6998
- },
6999
- repository: "https://github.com/Brooooooklyn/keyring-node",
7000
- publishConfig: {
7001
- registry: "https://registry.npmjs.org/",
7002
- access: "public"
7003
- },
7004
- os: [
7005
- "linux"
7006
- ],
7007
- libc: [
7008
- "musl"
7009
- ]
7010
- };
7011
- });
7012
- var require_keyring_linux_x64_gnu = __commonJS2((exports, module) => {
7013
- module.exports = __require("./keyring.linux-x64-gnu-0wbgnj90.node");
7014
- });
7015
- var require_package2 = __commonJS2((exports, module) => {
7016
- module.exports = {
7017
- name: "@napi-rs/keyring-linux-x64-gnu",
7018
- version: "1.3.0",
7019
- cpu: [
7020
- "x64"
7021
- ],
7022
- main: "keyring.linux-x64-gnu.node",
7023
- files: [
7024
- "keyring.linux-x64-gnu.node"
7025
- ],
7026
- description: "https://github.com/hwchen/keyring-rs Node.js binding via https://napi.rs",
7027
- keywords: [
7028
- "napi-rs",
7029
- "NAPI",
7030
- "N-API",
7031
- "Rust",
7032
- "node-addon",
7033
- "node-addon-api"
7034
- ],
7035
- license: "MIT",
7036
- engines: {
7037
- node: ">= 10"
7038
- },
7039
- repository: "https://github.com/Brooooooklyn/keyring-node",
7040
- publishConfig: {
7041
- registry: "https://registry.npmjs.org/",
7042
- access: "public"
7043
- },
7044
- os: [
7045
- "linux"
7046
- ],
7047
- libc: [
7048
- "glibc"
7049
- ]
7050
- };
7051
- });
7052
- var require_keyring = __commonJS2((exports, module) => {
7053
- var __filename2 = "/home/runner/work/signetai/signetai/node_modules/.bun/@napi-rs+keyring@1.3.0/node_modules/@napi-rs/keyring/index.js";
7054
- var { createRequire: createRequire22 } = __require("node:module");
7055
- __require = createRequire22(__filename2);
7056
- var { readFileSync: readFileSync3 } = __require("node:fs");
7057
- var nativeBinding = null;
7058
- var loadErrors = [];
7059
- var isMusl = () => {
7060
- let musl = false;
7061
- if (process.platform === "linux") {
7062
- musl = isMuslFromFilesystem();
7063
- if (musl === null) {
7064
- musl = isMuslFromReport();
7065
- }
7066
- if (musl === null) {
7067
- musl = isMuslFromChildProcess();
7068
- }
7069
- }
7070
- return musl;
7071
- };
7072
- var isFileMusl = (f) => f.includes("libc.musl-") || f.includes("ld-musl-");
7073
- var isMuslFromFilesystem = () => {
7074
- try {
7075
- return readFileSync3("/usr/bin/ldd", "utf-8").includes("musl");
7076
- } catch {
7077
- return null;
7078
- }
7079
- };
7080
- var isMuslFromReport = () => {
7081
- let report = null;
7082
- if (typeof process.report?.getReport === "function") {
7083
- process.report.excludeNetwork = true;
7084
- report = process.report.getReport();
7085
- }
7086
- if (!report) {
7087
- return null;
7088
- }
7089
- if (report.header && report.header.glibcVersionRuntime) {
7090
- return false;
7091
- }
7092
- if (Array.isArray(report.sharedObjects)) {
7093
- if (report.sharedObjects.some(isFileMusl)) {
7094
- return true;
7095
- }
7096
- }
7097
- return false;
7098
- };
7099
- var isMuslFromChildProcess = () => {
7100
- try {
7101
- return __require("child_process").execSync("ldd --version", { encoding: "utf8" }).includes("musl");
7102
- } catch (e) {
7103
- return false;
7104
- }
7105
- };
7106
- function requireNative() {
7107
- if (process.env.NAPI_RS_NATIVE_LIBRARY_PATH) {
7108
- try {
7109
- nativeBinding = __require(process.env.NAPI_RS_NATIVE_LIBRARY_PATH);
7110
- } catch (err) {
7111
- loadErrors.push(err);
7112
- }
7113
- } else if (process.platform === "android") {
7114
- if (process.arch === "arm64") {
7115
- try {
7116
- return (() => {
7117
- throw new Error("Cannot require module " + "./keyring.android-arm64.node");
7118
- })();
7119
- } catch (e) {
7120
- loadErrors.push(e);
7121
- }
7122
- try {
7123
- const binding = (() => {
7124
- throw new Error("Cannot require module " + "@napi-rs/keyring-android-arm64");
7125
- })();
7126
- const bindingPackageVersion = (() => {
7127
- throw new Error("Cannot require module " + "@napi-rs/keyring-android-arm64/package.json");
7128
- })().version;
7129
- if (bindingPackageVersion !== "1.3.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
7130
- throw new Error(`Native binding package version mismatch, expected 1.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
7131
- }
7132
- return binding;
7133
- } catch (e) {
7134
- loadErrors.push(e);
7135
- }
7136
- } else if (process.arch === "arm") {
7137
- try {
7138
- return (() => {
7139
- throw new Error("Cannot require module " + "./keyring.android-arm-eabi.node");
7140
- })();
7141
- } catch (e) {
7142
- loadErrors.push(e);
7143
- }
7144
- try {
7145
- const binding = (() => {
7146
- throw new Error("Cannot require module " + "@napi-rs/keyring-android-arm-eabi");
7147
- })();
7148
- const bindingPackageVersion = (() => {
7149
- throw new Error("Cannot require module " + "@napi-rs/keyring-android-arm-eabi/package.json");
7150
- })().version;
7151
- if (bindingPackageVersion !== "1.3.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
7152
- throw new Error(`Native binding package version mismatch, expected 1.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
7153
- }
7154
- return binding;
7155
- } catch (e) {
7156
- loadErrors.push(e);
7157
- }
7158
- } else {
7159
- loadErrors.push(new Error(`Unsupported architecture on Android ${process.arch}`));
7160
- }
7161
- } else if (process.platform === "win32") {
7162
- if (process.arch === "x64") {
7163
- try {
7164
- return (() => {
7165
- throw new Error("Cannot require module " + "./keyring.win32-x64-msvc.node");
7166
- })();
7167
- } catch (e) {
7168
- loadErrors.push(e);
7169
- }
7170
- try {
7171
- const binding = (() => {
7172
- throw new Error("Cannot require module " + "@napi-rs/keyring-win32-x64-msvc");
7173
- })();
7174
- const bindingPackageVersion = (() => {
7175
- throw new Error("Cannot require module " + "@napi-rs/keyring-win32-x64-msvc/package.json");
7176
- })().version;
7177
- if (bindingPackageVersion !== "1.3.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
7178
- throw new Error(`Native binding package version mismatch, expected 1.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
7179
- }
7180
- return binding;
7181
- } catch (e) {
7182
- loadErrors.push(e);
7183
- }
7184
- } else if (process.arch === "ia32") {
7185
- try {
7186
- return (() => {
7187
- throw new Error("Cannot require module " + "./keyring.win32-ia32-msvc.node");
7188
- })();
7189
- } catch (e) {
7190
- loadErrors.push(e);
7191
- }
7192
- try {
7193
- const binding = (() => {
7194
- throw new Error("Cannot require module " + "@napi-rs/keyring-win32-ia32-msvc");
7195
- })();
7196
- const bindingPackageVersion = (() => {
7197
- throw new Error("Cannot require module " + "@napi-rs/keyring-win32-ia32-msvc/package.json");
7198
- })().version;
7199
- if (bindingPackageVersion !== "1.3.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
7200
- throw new Error(`Native binding package version mismatch, expected 1.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
7201
- }
7202
- return binding;
7203
- } catch (e) {
7204
- loadErrors.push(e);
7205
- }
7206
- } else if (process.arch === "arm64") {
7207
- try {
7208
- return (() => {
7209
- throw new Error("Cannot require module " + "./keyring.win32-arm64-msvc.node");
7210
- })();
7211
- } catch (e) {
7212
- loadErrors.push(e);
7213
- }
7214
- try {
7215
- const binding = (() => {
7216
- throw new Error("Cannot require module " + "@napi-rs/keyring-win32-arm64-msvc");
7217
- })();
7218
- const bindingPackageVersion = (() => {
7219
- throw new Error("Cannot require module " + "@napi-rs/keyring-win32-arm64-msvc/package.json");
7220
- })().version;
7221
- if (bindingPackageVersion !== "1.3.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
7222
- throw new Error(`Native binding package version mismatch, expected 1.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
7223
- }
7224
- return binding;
7225
- } catch (e) {
7226
- loadErrors.push(e);
7227
- }
7228
- } else {
7229
- loadErrors.push(new Error(`Unsupported architecture on Windows: ${process.arch}`));
7230
- }
7231
- } else if (process.platform === "darwin") {
7232
- try {
7233
- return (() => {
7234
- throw new Error("Cannot require module " + "./keyring.darwin-universal.node");
7235
- })();
7236
- } catch (e) {
7237
- loadErrors.push(e);
7238
- }
7239
- try {
7240
- const binding = (() => {
7241
- throw new Error("Cannot require module " + "@napi-rs/keyring-darwin-universal");
7242
- })();
7243
- const bindingPackageVersion = (() => {
7244
- throw new Error("Cannot require module " + "@napi-rs/keyring-darwin-universal/package.json");
7245
- })().version;
7246
- if (bindingPackageVersion !== "1.3.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
7247
- throw new Error(`Native binding package version mismatch, expected 1.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
7248
- }
7249
- return binding;
7250
- } catch (e) {
7251
- loadErrors.push(e);
7252
- }
7253
- if (process.arch === "x64") {
7254
- try {
7255
- return (() => {
7256
- throw new Error("Cannot require module " + "./keyring.darwin-x64.node");
7257
- })();
7258
- } catch (e) {
7259
- loadErrors.push(e);
7260
- }
7261
- try {
7262
- const binding = (() => {
7263
- throw new Error("Cannot require module " + "@napi-rs/keyring-darwin-x64");
7264
- })();
7265
- const bindingPackageVersion = (() => {
7266
- throw new Error("Cannot require module " + "@napi-rs/keyring-darwin-x64/package.json");
7267
- })().version;
7268
- if (bindingPackageVersion !== "1.3.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
7269
- throw new Error(`Native binding package version mismatch, expected 1.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
7270
- }
7271
- return binding;
7272
- } catch (e) {
7273
- loadErrors.push(e);
7274
- }
7275
- } else if (process.arch === "arm64") {
7276
- try {
7277
- return (() => {
7278
- throw new Error("Cannot require module " + "./keyring.darwin-arm64.node");
7279
- })();
7280
- } catch (e) {
7281
- loadErrors.push(e);
7282
- }
7283
- try {
7284
- const binding = (() => {
7285
- throw new Error("Cannot require module " + "@napi-rs/keyring-darwin-arm64");
7286
- })();
7287
- const bindingPackageVersion = (() => {
7288
- throw new Error("Cannot require module " + "@napi-rs/keyring-darwin-arm64/package.json");
7289
- })().version;
7290
- if (bindingPackageVersion !== "1.3.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
7291
- throw new Error(`Native binding package version mismatch, expected 1.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
7292
- }
7293
- return binding;
7294
- } catch (e) {
7295
- loadErrors.push(e);
7296
- }
7297
- } else {
7298
- loadErrors.push(new Error(`Unsupported architecture on macOS: ${process.arch}`));
7299
- }
7300
- } else if (process.platform === "freebsd") {
7301
- if (process.arch === "x64") {
7302
- try {
7303
- return (() => {
7304
- throw new Error("Cannot require module " + "./keyring.freebsd-x64.node");
7305
- })();
7306
- } catch (e) {
7307
- loadErrors.push(e);
7308
- }
7309
- try {
7310
- const binding = (() => {
7311
- throw new Error("Cannot require module " + "@napi-rs/keyring-freebsd-x64");
7312
- })();
7313
- const bindingPackageVersion = (() => {
7314
- throw new Error("Cannot require module " + "@napi-rs/keyring-freebsd-x64/package.json");
7315
- })().version;
7316
- if (bindingPackageVersion !== "1.3.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
7317
- throw new Error(`Native binding package version mismatch, expected 1.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
7318
- }
7319
- return binding;
7320
- } catch (e) {
7321
- loadErrors.push(e);
7322
- }
7323
- } else if (process.arch === "arm64") {
7324
- try {
7325
- return (() => {
7326
- throw new Error("Cannot require module " + "./keyring.freebsd-arm64.node");
7327
- })();
7328
- } catch (e) {
7329
- loadErrors.push(e);
7330
- }
7331
- try {
7332
- const binding = (() => {
7333
- throw new Error("Cannot require module " + "@napi-rs/keyring-freebsd-arm64");
7334
- })();
7335
- const bindingPackageVersion = (() => {
7336
- throw new Error("Cannot require module " + "@napi-rs/keyring-freebsd-arm64/package.json");
7337
- })().version;
7338
- if (bindingPackageVersion !== "1.3.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
7339
- throw new Error(`Native binding package version mismatch, expected 1.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
7340
- }
7341
- return binding;
7342
- } catch (e) {
7343
- loadErrors.push(e);
7344
- }
7345
- } else {
7346
- loadErrors.push(new Error(`Unsupported architecture on FreeBSD: ${process.arch}`));
7347
- }
7348
- } else if (process.platform === "linux") {
7349
- if (process.arch === "x64") {
7350
- if (isMusl()) {
7351
- try {
7352
- return (() => {
7353
- throw new Error("Cannot require module " + "./keyring.linux-x64-musl.node");
7354
- })();
7355
- } catch (e) {
7356
- loadErrors.push(e);
7357
- }
7358
- try {
7359
- const binding = require_keyring_linux_x64_musl();
7360
- const bindingPackageVersion = require_package().version;
7361
- if (bindingPackageVersion !== "1.3.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
7362
- throw new Error(`Native binding package version mismatch, expected 1.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
7363
- }
7364
- return binding;
7365
- } catch (e) {
7366
- loadErrors.push(e);
7367
- }
7368
- } else {
7369
- try {
7370
- return (() => {
7371
- throw new Error("Cannot require module " + "./keyring.linux-x64-gnu.node");
7372
- })();
7373
- } catch (e) {
7374
- loadErrors.push(e);
7375
- }
7376
- try {
7377
- const binding = require_keyring_linux_x64_gnu();
7378
- const bindingPackageVersion = require_package2().version;
7379
- if (bindingPackageVersion !== "1.3.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
7380
- throw new Error(`Native binding package version mismatch, expected 1.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
7381
- }
7382
- return binding;
7383
- } catch (e) {
7384
- loadErrors.push(e);
7385
- }
7386
- }
7387
- } else if (process.arch === "arm64") {
7388
- if (isMusl()) {
7389
- try {
7390
- return (() => {
7391
- throw new Error("Cannot require module " + "./keyring.linux-arm64-musl.node");
7392
- })();
7393
- } catch (e) {
7394
- loadErrors.push(e);
7395
- }
7396
- try {
7397
- const binding = (() => {
7398
- throw new Error("Cannot require module " + "@napi-rs/keyring-linux-arm64-musl");
7399
- })();
7400
- const bindingPackageVersion = (() => {
7401
- throw new Error("Cannot require module " + "@napi-rs/keyring-linux-arm64-musl/package.json");
7402
- })().version;
7403
- if (bindingPackageVersion !== "1.3.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
7404
- throw new Error(`Native binding package version mismatch, expected 1.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
7405
- }
7406
- return binding;
7407
- } catch (e) {
7408
- loadErrors.push(e);
7409
- }
7410
- } else {
7411
- try {
7412
- return (() => {
7413
- throw new Error("Cannot require module " + "./keyring.linux-arm64-gnu.node");
7414
- })();
7415
- } catch (e) {
7416
- loadErrors.push(e);
7417
- }
7418
- try {
7419
- const binding = (() => {
7420
- throw new Error("Cannot require module " + "@napi-rs/keyring-linux-arm64-gnu");
7421
- })();
7422
- const bindingPackageVersion = (() => {
7423
- throw new Error("Cannot require module " + "@napi-rs/keyring-linux-arm64-gnu/package.json");
7424
- })().version;
7425
- if (bindingPackageVersion !== "1.3.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
7426
- throw new Error(`Native binding package version mismatch, expected 1.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
7427
- }
7428
- return binding;
7429
- } catch (e) {
7430
- loadErrors.push(e);
7431
- }
7432
- }
7433
- } else if (process.arch === "arm") {
7434
- if (isMusl()) {
7435
- try {
7436
- return (() => {
7437
- throw new Error("Cannot require module " + "./keyring.linux-arm-musleabihf.node");
7438
- })();
7439
- } catch (e) {
7440
- loadErrors.push(e);
7441
- }
7442
- try {
7443
- const binding = (() => {
7444
- throw new Error("Cannot require module " + "@napi-rs/keyring-linux-arm-musleabihf");
7445
- })();
7446
- const bindingPackageVersion = (() => {
7447
- throw new Error("Cannot require module " + "@napi-rs/keyring-linux-arm-musleabihf/package.json");
7448
- })().version;
7449
- if (bindingPackageVersion !== "1.3.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
7450
- throw new Error(`Native binding package version mismatch, expected 1.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
7451
- }
7452
- return binding;
7453
- } catch (e) {
7454
- loadErrors.push(e);
7455
- }
7456
- } else {
7457
- try {
7458
- return (() => {
7459
- throw new Error("Cannot require module " + "./keyring.linux-arm-gnueabihf.node");
7460
- })();
7461
- } catch (e) {
7462
- loadErrors.push(e);
7463
- }
7464
- try {
7465
- const binding = (() => {
7466
- throw new Error("Cannot require module " + "@napi-rs/keyring-linux-arm-gnueabihf");
7467
- })();
7468
- const bindingPackageVersion = (() => {
7469
- throw new Error("Cannot require module " + "@napi-rs/keyring-linux-arm-gnueabihf/package.json");
7470
- })().version;
7471
- if (bindingPackageVersion !== "1.3.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
7472
- throw new Error(`Native binding package version mismatch, expected 1.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
7473
- }
7474
- return binding;
7475
- } catch (e) {
7476
- loadErrors.push(e);
7477
- }
7478
- }
7479
- } else if (process.arch === "riscv64") {
7480
- if (isMusl()) {
7481
- try {
7482
- return (() => {
7483
- throw new Error("Cannot require module " + "./keyring.linux-riscv64-musl.node");
7484
- })();
7485
- } catch (e) {
7486
- loadErrors.push(e);
7487
- }
7488
- try {
7489
- const binding = (() => {
7490
- throw new Error("Cannot require module " + "@napi-rs/keyring-linux-riscv64-musl");
7491
- })();
7492
- const bindingPackageVersion = (() => {
7493
- throw new Error("Cannot require module " + "@napi-rs/keyring-linux-riscv64-musl/package.json");
7494
- })().version;
7495
- if (bindingPackageVersion !== "1.3.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
7496
- throw new Error(`Native binding package version mismatch, expected 1.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
7497
- }
7498
- return binding;
7499
- } catch (e) {
7500
- loadErrors.push(e);
7501
- }
7502
- } else {
7503
- try {
7504
- return (() => {
7505
- throw new Error("Cannot require module " + "./keyring.linux-riscv64-gnu.node");
7506
- })();
7507
- } catch (e) {
7508
- loadErrors.push(e);
7509
- }
7510
- try {
7511
- const binding = (() => {
7512
- throw new Error("Cannot require module " + "@napi-rs/keyring-linux-riscv64-gnu");
7513
- })();
7514
- const bindingPackageVersion = (() => {
7515
- throw new Error("Cannot require module " + "@napi-rs/keyring-linux-riscv64-gnu/package.json");
7516
- })().version;
7517
- if (bindingPackageVersion !== "1.3.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
7518
- throw new Error(`Native binding package version mismatch, expected 1.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
7519
- }
7520
- return binding;
7521
- } catch (e) {
7522
- loadErrors.push(e);
7523
- }
7524
- }
7525
- } else if (process.arch === "ppc64") {
7526
- try {
7527
- return (() => {
7528
- throw new Error("Cannot require module " + "./keyring.linux-ppc64-gnu.node");
7529
- })();
7530
- } catch (e) {
7531
- loadErrors.push(e);
7532
- }
7533
- try {
7534
- const binding = (() => {
7535
- throw new Error("Cannot require module " + "@napi-rs/keyring-linux-ppc64-gnu");
7536
- })();
7537
- const bindingPackageVersion = (() => {
7538
- throw new Error("Cannot require module " + "@napi-rs/keyring-linux-ppc64-gnu/package.json");
7539
- })().version;
7540
- if (bindingPackageVersion !== "1.3.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
7541
- throw new Error(`Native binding package version mismatch, expected 1.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
7542
- }
7543
- return binding;
7544
- } catch (e) {
7545
- loadErrors.push(e);
7546
- }
7547
- } else if (process.arch === "s390x") {
7548
- try {
7549
- return (() => {
7550
- throw new Error("Cannot require module " + "./keyring.linux-s390x-gnu.node");
7551
- })();
7552
- } catch (e) {
7553
- loadErrors.push(e);
7554
- }
7555
- try {
7556
- const binding = (() => {
7557
- throw new Error("Cannot require module " + "@napi-rs/keyring-linux-s390x-gnu");
7558
- })();
7559
- const bindingPackageVersion = (() => {
7560
- throw new Error("Cannot require module " + "@napi-rs/keyring-linux-s390x-gnu/package.json");
7561
- })().version;
7562
- if (bindingPackageVersion !== "1.3.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
7563
- throw new Error(`Native binding package version mismatch, expected 1.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
7564
- }
7565
- return binding;
7566
- } catch (e) {
7567
- loadErrors.push(e);
7568
- }
7569
- } else {
7570
- loadErrors.push(new Error(`Unsupported architecture on Linux: ${process.arch}`));
7571
- }
7572
- } else if (process.platform === "openharmony") {
7573
- if (process.arch === "arm64") {
7574
- try {
7575
- return (() => {
7576
- throw new Error("Cannot require module " + "./keyring.openharmony-arm64.node");
7577
- })();
7578
- } catch (e) {
7579
- loadErrors.push(e);
7580
- }
7581
- try {
7582
- const binding = (() => {
7583
- throw new Error("Cannot require module " + "@napi-rs/keyring-openharmony-arm64");
7584
- })();
7585
- const bindingPackageVersion = (() => {
7586
- throw new Error("Cannot require module " + "@napi-rs/keyring-openharmony-arm64/package.json");
7587
- })().version;
7588
- if (bindingPackageVersion !== "1.3.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
7589
- throw new Error(`Native binding package version mismatch, expected 1.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
7590
- }
7591
- return binding;
7592
- } catch (e) {
7593
- loadErrors.push(e);
7594
- }
7595
- } else if (process.arch === "x64") {
7596
- try {
7597
- return (() => {
7598
- throw new Error("Cannot require module " + "./keyring.openharmony-x64.node");
7599
- })();
7600
- } catch (e) {
7601
- loadErrors.push(e);
7602
- }
7603
- try {
7604
- const binding = (() => {
7605
- throw new Error("Cannot require module " + "@napi-rs/keyring-openharmony-x64");
7606
- })();
7607
- const bindingPackageVersion = (() => {
7608
- throw new Error("Cannot require module " + "@napi-rs/keyring-openharmony-x64/package.json");
7609
- })().version;
7610
- if (bindingPackageVersion !== "1.3.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
7611
- throw new Error(`Native binding package version mismatch, expected 1.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
7612
- }
7613
- return binding;
7614
- } catch (e) {
7615
- loadErrors.push(e);
7616
- }
7617
- } else if (process.arch === "arm") {
7618
- try {
7619
- return (() => {
7620
- throw new Error("Cannot require module " + "./keyring.openharmony-arm.node");
7621
- })();
7622
- } catch (e) {
7623
- loadErrors.push(e);
7624
- }
7625
- try {
7626
- const binding = (() => {
7627
- throw new Error("Cannot require module " + "@napi-rs/keyring-openharmony-arm");
7628
- })();
7629
- const bindingPackageVersion = (() => {
7630
- throw new Error("Cannot require module " + "@napi-rs/keyring-openharmony-arm/package.json");
7631
- })().version;
7632
- if (bindingPackageVersion !== "1.3.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
7633
- throw new Error(`Native binding package version mismatch, expected 1.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
7634
- }
7635
- return binding;
7636
- } catch (e) {
7637
- loadErrors.push(e);
7638
- }
7639
- } else {
7640
- loadErrors.push(new Error(`Unsupported architecture on OpenHarmony: ${process.arch}`));
7641
- }
7642
- } else {
7643
- loadErrors.push(new Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`));
7644
- }
7645
- }
7646
- nativeBinding = requireNative();
7647
- if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
7648
- try {
7649
- nativeBinding = (() => {
7650
- throw new Error("Cannot require module " + "./keyring.wasi.cjs");
7651
- })();
7652
- } catch (err) {
7653
- if (process.env.NAPI_RS_FORCE_WASI) {
7654
- loadErrors.push(err);
7655
- }
7656
- }
7657
- if (!nativeBinding) {
7658
- try {
7659
- nativeBinding = (() => {
7660
- throw new Error("Cannot require module " + "@napi-rs/keyring-wasm32-wasi");
7661
- })();
7662
- } catch (err) {
7663
- if (process.env.NAPI_RS_FORCE_WASI) {
7664
- loadErrors.push(err);
7665
- }
7666
- }
7667
- }
7668
- }
7669
- if (!nativeBinding) {
7670
- if (loadErrors.length > 0) {
7671
- throw new Error(`Cannot find native binding. ` + `npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). ` + "Please try `npm i` again after removing both package-lock.json and node_modules directory.", { cause: loadErrors });
7672
- }
7673
- throw new Error(`Failed to load native binding`);
7674
- }
7675
- module.exports = nativeBinding;
7676
- module.exports.AsyncEntry = nativeBinding.AsyncEntry;
7677
- module.exports.Entry = nativeBinding.Entry;
7678
- module.exports.findCredentials = nativeBinding.findCredentials;
7679
- module.exports.findCredentialsAsync = nativeBinding.findCredentialsAsync;
7680
- });
7681
6974
  async function A(A2 = {}) {
7682
6975
  var I, g = A2, C = !!globalThis.window, B = !!globalThis.WorkerGlobalScope, Q = (globalThis.process?.versions?.node && globalThis.process, import.meta.url);
7683
6976
  if (C || B) {
@@ -7895,26 +7188,26 @@ var init_libsodium = __esm(() => {
7895
7188
  });
7896
7189
  var exports_libsodium_wrappers = {};
7897
7190
  __export(exports_libsodium_wrappers, {
7898
- unpad: () => d,
7899
- to_string: () => g,
7900
- to_hex: () => f,
7901
- to_base64: () => E,
7902
- symbols: () => c,
7903
- ready: () => s,
7904
- pad: () => u,
7905
- output_formats: () => T,
7906
- memzero: () => y,
7907
- memcmp: () => i,
7908
- libsodium: () => r,
7909
- is_zero: () => h,
7910
- increment: () => p,
7911
- from_string: () => v,
7912
- from_hex: () => b,
7913
- from_base64: () => x,
7914
- default: () => libsodium_wrappers_default,
7915
- compare: () => l,
7191
+ add: () => o,
7916
7192
  base64_variants: () => m,
7917
- add: () => o
7193
+ compare: () => l,
7194
+ default: () => libsodium_wrappers_default,
7195
+ from_base64: () => x,
7196
+ from_hex: () => b,
7197
+ from_string: () => v,
7198
+ increment: () => p,
7199
+ is_zero: () => h,
7200
+ libsodium: () => r,
7201
+ memcmp: () => i,
7202
+ memzero: () => y,
7203
+ output_formats: () => T,
7204
+ pad: () => u,
7205
+ ready: () => s,
7206
+ symbols: () => c,
7207
+ to_base64: () => E,
7208
+ to_hex: () => f,
7209
+ to_string: () => g,
7210
+ unpad: () => d
7918
7211
  });
7919
7212
  function c() {
7920
7213
  return Object.keys(t).sort();
@@ -11247,7 +10540,6 @@ var execFileHiddenImpl = (...args) => Reflect.apply(nodeExecFile, undefined, wit
11247
10540
  Object.defineProperty(execFileHiddenImpl, promisify.custom, {
11248
10541
  value: (...args) => Reflect.apply(nodeExecFileAsync, undefined, withWindowsHideArgument(args, 1))
11249
10542
  });
11250
- var execFileSyncHidden = (...args) => Reflect.apply(nodeExecFileSync, undefined, withWindowsHideArgument(args, 1));
11251
10543
  var MEMORY_CONTENT_SAFETY_POLICY_VERSION = "memory-content-safety-v1";
11252
10544
  var MEMORY_CONTENT_SAFETY_REASONS = [
11253
10545
  "prompt_injection",
@@ -11437,6 +10729,29 @@ function up3(db) {
11437
10729
  ON transcript_capture_jobs(agent_id, source_sha256);
11438
10730
  `);
11439
10731
  }
10732
+ function up4(db) {
10733
+ db.exec(`
10734
+ CREATE TABLE IF NOT EXISTS source_sync_failures (
10735
+ agent_id TEXT NOT NULL,
10736
+ source_key TEXT NOT NULL,
10737
+ phase TEXT NOT NULL,
10738
+ item_path TEXT NOT NULL,
10739
+ fingerprint TEXT NOT NULL,
10740
+ failure_code TEXT NOT NULL,
10741
+ terminal INTEGER NOT NULL DEFAULT 1,
10742
+ diagnostic TEXT NOT NULL,
10743
+ attempt_count INTEGER NOT NULL DEFAULT 1,
10744
+ first_observed_at TEXT NOT NULL,
10745
+ last_observed_at TEXT NOT NULL,
10746
+ retry_after TEXT,
10747
+ resolved_at TEXT,
10748
+ PRIMARY KEY (agent_id, source_key, phase, item_path)
10749
+ );
10750
+ CREATE INDEX IF NOT EXISTS idx_source_sync_failures_active
10751
+ ON source_sync_failures(agent_id, source_key, phase, item_path)
10752
+ WHERE resolved_at IS NULL;
10753
+ `);
10754
+ }
11440
10755
  var MEMORIES_FTS_TOKENIZER = "unicode61";
11441
10756
  var FTS_STATE_TABLE = "memories_fts_state";
11442
10757
  function normalizeSql(sql) {
@@ -11552,7 +10867,7 @@ function memoriesFtsNeedsTokenizerRepair(sql) {
11552
10867
  return true;
11553
10868
  return !normalized.includes(`tokenize='${MEMORIES_FTS_TOKENIZER}'`);
11554
10869
  }
11555
- function up4(db) {
10870
+ function up5(db) {
11556
10871
  db.exec(`
11557
10872
  CREATE TABLE IF NOT EXISTS schema_migrations (
11558
10873
  version INTEGER PRIMARY KEY,
@@ -11650,7 +10965,7 @@ function addColumnIfMissing2(db, table, column, definition) {
11650
10965
  db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
11651
10966
  }
11652
10967
  }
11653
- function up5(db) {
10968
+ function up6(db) {
11654
10969
  addColumnIfMissing2(db, "memories", "content_hash", "TEXT");
11655
10970
  addColumnIfMissing2(db, "memories", "normalized_content", "TEXT");
11656
10971
  addColumnIfMissing2(db, "memories", "is_deleted", "INTEGER DEFAULT 0");
@@ -11768,7 +11083,7 @@ function addColumnIfMissing3(db, table, column, definition) {
11768
11083
  db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
11769
11084
  return true;
11770
11085
  }
11771
- function up6(db) {
11086
+ function up7(db) {
11772
11087
  addColumnIfMissing3(db, "memories", "why", "TEXT");
11773
11088
  addColumnIfMissing3(db, "memories", "project", "TEXT");
11774
11089
  db.exec(`DROP INDEX IF EXISTS idx_memories_content_hash`);
@@ -11805,7 +11120,7 @@ function addColumnIfMissing4(db, table, column, definition) {
11805
11120
  db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
11806
11121
  }
11807
11122
  }
11808
- function up7(db) {
11123
+ function up8(db) {
11809
11124
  addColumnIfMissing4(db, "memory_history", "actor_type", "TEXT");
11810
11125
  addColumnIfMissing4(db, "memory_history", "session_id", "TEXT");
11811
11126
  addColumnIfMissing4(db, "memory_history", "request_id", "TEXT");
@@ -11838,7 +11153,7 @@ function addColumnIfMissing5(db, table, column, definition) {
11838
11153
  db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
11839
11154
  }
11840
11155
  }
11841
- function up8(db) {
11156
+ function up9(db) {
11842
11157
  addColumnIfMissing5(db, "entities", "canonical_name", "TEXT");
11843
11158
  addColumnIfMissing5(db, "entities", "mentions", "INTEGER DEFAULT 0");
11844
11159
  addColumnIfMissing5(db, "entities", "embedding", "BLOB");
@@ -11855,7 +11170,7 @@ function hasColumn4(db, table, column) {
11855
11170
  const rows = db.prepare(`PRAGMA table_info(${table})`).all();
11856
11171
  return rows.some((r2) => r2.name === column);
11857
11172
  }
11858
- function up9(db) {
11173
+ function up10(db) {
11859
11174
  if (!hasColumn4(db, "memories", "idempotency_key")) {
11860
11175
  db.exec("ALTER TABLE memories ADD COLUMN idempotency_key TEXT");
11861
11176
  }
@@ -11870,7 +11185,7 @@ function hasColumn5(db, table, column) {
11870
11185
  const rows = db.prepare(`PRAGMA table_info(${table})`).all();
11871
11186
  return rows.some((r2) => r2.name === column);
11872
11187
  }
11873
- function up10(db) {
11188
+ function up11(db) {
11874
11189
  db.exec(`
11875
11190
  CREATE TABLE IF NOT EXISTS documents (
11876
11191
  id TEXT PRIMARY KEY,
@@ -11927,7 +11242,7 @@ function up10(db) {
11927
11242
  db.exec("ALTER TABLE memory_jobs ADD COLUMN document_id TEXT");
11928
11243
  }
11929
11244
  }
11930
- function up11(db) {
11245
+ function up12(db) {
11931
11246
  const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='embeddings'").all();
11932
11247
  if (tables.length === 0)
11933
11248
  return;
@@ -11944,7 +11259,7 @@ function up11(db) {
11944
11259
  ON embeddings(content_hash)
11945
11260
  `);
11946
11261
  }
11947
- function up12(db) {
11262
+ function up13(db) {
11948
11263
  db.exec(`
11949
11264
  CREATE TABLE IF NOT EXISTS summary_jobs (
11950
11265
  id TEXT PRIMARY KEY,
@@ -11964,7 +11279,7 @@ function up12(db) {
11964
11279
  db.exec(`CREATE INDEX IF NOT EXISTS idx_summary_jobs_status
11965
11280
  ON summary_jobs(status)`);
11966
11281
  }
11967
- function up13(db) {
11282
+ function up14(db) {
11968
11283
  db.exec(`
11969
11284
  CREATE TABLE IF NOT EXISTS umap_cache (
11970
11285
  id INTEGER PRIMARY KEY,
@@ -11975,7 +11290,7 @@ function up13(db) {
11975
11290
  )
11976
11291
  `);
11977
11292
  }
11978
- function up14(db) {
11293
+ function up15(db) {
11979
11294
  db.exec(`
11980
11295
  CREATE TABLE IF NOT EXISTS session_scores (
11981
11296
  id TEXT PRIMARY KEY,
@@ -11995,7 +11310,7 @@ function up14(db) {
11995
11310
  ON session_scores(session_key);
11996
11311
  `);
11997
11312
  }
11998
- function up15(db) {
11313
+ function up16(db) {
11999
11314
  db.exec(`
12000
11315
  CREATE TABLE IF NOT EXISTS scheduled_tasks (
12001
11316
  id TEXT PRIMARY KEY,
@@ -12036,7 +11351,7 @@ function addColumnIfMissing6(db, table, column, definition) {
12036
11351
  db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
12037
11352
  }
12038
11353
  }
12039
- function up16(db) {
11354
+ function up17(db) {
12040
11355
  db.exec(`
12041
11356
  CREATE TABLE IF NOT EXISTS ingestion_jobs (
12042
11357
  id TEXT PRIMARY KEY,
@@ -12062,7 +11377,7 @@ function up16(db) {
12062
11377
  addColumnIfMissing6(db, "memories", "source_path", "TEXT");
12063
11378
  addColumnIfMissing6(db, "memories", "source_section", "TEXT");
12064
11379
  }
12065
- function up17(db) {
11380
+ function up18(db) {
12066
11381
  db.exec(`
12067
11382
  CREATE TABLE IF NOT EXISTS telemetry_events (
12068
11383
  id TEXT PRIMARY KEY,
@@ -12087,7 +11402,7 @@ function addColumnIfMissing7(db, table, column, definition) {
12087
11402
  db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
12088
11403
  }
12089
11404
  }
12090
- function up18(db) {
11405
+ function up19(db) {
12091
11406
  db.exec(`
12092
11407
  CREATE TABLE IF NOT EXISTS session_memories (
12093
11408
  id TEXT PRIMARY KEY,
@@ -12114,7 +11429,7 @@ function up18(db) {
12114
11429
  addColumnIfMissing7(db, "session_scores", "confidence", "REAL");
12115
11430
  addColumnIfMissing7(db, "session_scores", "continuity_reasoning", "TEXT");
12116
11431
  }
12117
- function up19(db) {
11432
+ function up20(db) {
12118
11433
  db.exec(`
12119
11434
  CREATE TABLE IF NOT EXISTS session_checkpoints (
12120
11435
  id TEXT PRIMARY KEY,
@@ -12136,7 +11451,7 @@ function up19(db) {
12136
11451
  ON session_checkpoints(project_normalized, created_at DESC);
12137
11452
  `);
12138
11453
  }
12139
- function up20(db) {
11454
+ function up21(db) {
12140
11455
  const cols = db.prepare("PRAGMA table_info(scheduled_tasks)").all();
12141
11456
  const colNames = new Set(cols.flatMap((c2) => typeof c2.name === "string" ? [c2.name] : []));
12142
11457
  if (!colNames.has("skill_name")) {
@@ -12147,7 +11462,7 @@ function up20(db) {
12147
11462
  CHECK (skill_mode IN ('inject', 'slash') OR skill_mode IS NULL)`);
12148
11463
  }
12149
11464
  }
12150
- function up21(db) {
11465
+ function up22(db) {
12151
11466
  const existing = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='skill_meta'").get();
12152
11467
  if (existing)
12153
11468
  return;
@@ -12179,7 +11494,7 @@ function up21(db) {
12179
11494
  CREATE INDEX idx_skill_meta_source ON skill_meta(source);
12180
11495
  `);
12181
11496
  }
12182
- function up22(db) {
11497
+ function up23(db) {
12183
11498
  const entityCols = db.prepare("PRAGMA table_info(entities)").all();
12184
11499
  const entityColNames = new Set(entityCols.flatMap((c2) => typeof c2.name === "string" ? [c2.name] : []));
12185
11500
  if (!entityColNames.has("agent_id")) {
@@ -12264,13 +11579,13 @@ function addColumnIfMissing8(db, table, column, definition) {
12264
11579
  db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
12265
11580
  }
12266
11581
  }
12267
- function up23(db) {
11582
+ function up24(db) {
12268
11583
  addColumnIfMissing8(db, "session_memories", "entity_slot", "INTEGER");
12269
11584
  addColumnIfMissing8(db, "session_memories", "aspect_slot", "INTEGER");
12270
11585
  addColumnIfMissing8(db, "session_memories", "is_constraint", "INTEGER NOT NULL DEFAULT 0");
12271
11586
  addColumnIfMissing8(db, "session_memories", "structural_density", "INTEGER");
12272
11587
  }
12273
- function up24(db) {
11588
+ function up25(db) {
12274
11589
  const columns = db.prepare("PRAGMA table_info(session_checkpoints)").all();
12275
11590
  const columnNames = new Set(columns.flatMap((column) => typeof column.name === "string" ? [column.name] : []));
12276
11591
  if (!columnNames.has("focal_entity_ids")) {
@@ -12295,25 +11610,25 @@ function addColumnIfMissing9(db, table, column, definition) {
12295
11610
  db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
12296
11611
  }
12297
11612
  }
12298
- function up25(db) {
11613
+ function up26(db) {
12299
11614
  addColumnIfMissing9(db, "entities", "pinned", "INTEGER NOT NULL DEFAULT 0");
12300
11615
  addColumnIfMissing9(db, "entities", "pinned_at", "TEXT");
12301
11616
  db.exec("CREATE INDEX IF NOT EXISTS idx_entities_pinned ON entities(agent_id, pinned, pinned_at DESC)");
12302
11617
  }
12303
- function up26(_db) {}
12304
11618
  function up27(_db) {}
11619
+ function up28(_db) {}
12305
11620
  function addColumnIfMissing10(db, table, column, definition) {
12306
11621
  const cols = db.prepare(`PRAGMA table_info(${table})`).all();
12307
11622
  if (!cols.some((c2) => c2.name === column)) {
12308
11623
  db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
12309
11624
  }
12310
11625
  }
12311
- function up28(db) {
11626
+ function up29(db) {
12312
11627
  addColumnIfMissing10(db, "session_memories", "agent_relevance_score", "REAL");
12313
11628
  addColumnIfMissing10(db, "session_memories", "agent_feedback_count", "INTEGER DEFAULT 0");
12314
11629
  }
12315
- function up29(_db) {}
12316
- function up30(db) {
11630
+ function up30(_db) {}
11631
+ function up31(db) {
12317
11632
  db.exec(`
12318
11633
  UPDATE entities
12319
11634
  SET canonical_name = REPLACE(REPLACE(REPLACE(
@@ -12322,7 +11637,7 @@ function up30(db) {
12322
11637
  WHERE canonical_name IS NULL
12323
11638
  `);
12324
11639
  }
12325
- function up31(db) {
11640
+ function up32(db) {
12326
11641
  db.exec(`
12327
11642
  CREATE TABLE IF NOT EXISTS memories_cold (
12328
11643
  archive_id TEXT PRIMARY KEY,
@@ -12359,7 +11674,7 @@ function up31(db) {
12359
11674
  CREATE INDEX IF NOT EXISTS idx_cold_source ON memories_cold(cold_source_id);
12360
11675
  `);
12361
11676
  }
12362
- function up32(db) {
11677
+ function up33(db) {
12363
11678
  db.exec(`
12364
11679
  CREATE TABLE IF NOT EXISTS session_summaries (
12365
11680
  id TEXT PRIMARY KEY,
@@ -12404,7 +11719,7 @@ function up32(db) {
12404
11719
  WHERE session_key IS NOT NULL;
12405
11720
  `);
12406
11721
  }
12407
- function up33(db) {
11722
+ function up34(db) {
12408
11723
  db.exec(`
12409
11724
  CREATE TABLE IF NOT EXISTS memory_jobs_new (
12410
11725
  id TEXT PRIMARY KEY,
@@ -12449,7 +11764,7 @@ function up33(db) {
12449
11764
  ON memory_jobs(failed_at);
12450
11765
  `);
12451
11766
  }
12452
- function up34(db) {
11767
+ function up35(db) {
12453
11768
  const depCols = db.prepare("PRAGMA table_info(entity_dependencies)").all();
12454
11769
  if (!depCols.some((c2) => c2.name === "reason")) {
12455
11770
  db.exec("ALTER TABLE entity_dependencies ADD COLUMN reason TEXT");
@@ -12459,7 +11774,7 @@ function up34(db) {
12459
11774
  db.exec("ALTER TABLE entities ADD COLUMN last_synthesized_at TEXT");
12460
11775
  }
12461
11776
  }
12462
- function up35(db) {
11777
+ function up36(db) {
12463
11778
  const cols = db.prepare("PRAGMA table_info(embeddings)").all();
12464
11779
  if (cols.length === 0)
12465
11780
  return;
@@ -12467,14 +11782,14 @@ function up35(db) {
12467
11782
  db.exec("ALTER TABLE embeddings ADD COLUMN vector BLOB");
12468
11783
  }
12469
11784
  }
12470
- function up36(db) {
11785
+ function up37(db) {
12471
11786
  const cols = db.prepare("PRAGMA table_info(memories)").all();
12472
11787
  if (!cols.some((c2) => c2.name === "scope")) {
12473
11788
  db.exec("ALTER TABLE memories ADD COLUMN scope TEXT DEFAULT NULL");
12474
11789
  }
12475
11790
  db.exec("CREATE INDEX IF NOT EXISTS idx_memories_scope ON memories(scope) WHERE scope IS NOT NULL");
12476
11791
  }
12477
- function up37(db) {
11792
+ function up38(db) {
12478
11793
  db.exec("DROP INDEX IF EXISTS idx_memories_content_hash_unique");
12479
11794
  db.exec(`
12480
11795
  CREATE UNIQUE INDEX idx_memories_content_hash_unique
@@ -12482,7 +11797,7 @@ function up37(db) {
12482
11797
  WHERE content_hash IS NOT NULL AND is_deleted = 0
12483
11798
  `);
12484
11799
  }
12485
- function up38(db) {
11800
+ function up39(db) {
12486
11801
  db.exec(`
12487
11802
  CREATE VIRTUAL TABLE IF NOT EXISTS entities_fts USING fts5(
12488
11803
  name, canonical_name,
@@ -12514,13 +11829,13 @@ function up38(db) {
12514
11829
  END
12515
11830
  `);
12516
11831
  }
12517
- function up39(db) {
11832
+ function up40(db) {
12518
11833
  const cols = db.prepare("PRAGMA table_info(entity_dependencies)").all();
12519
11834
  if (!cols.some((c2) => c2.name === "confidence")) {
12520
11835
  db.exec("ALTER TABLE entity_dependencies ADD COLUMN confidence REAL DEFAULT 0.7");
12521
11836
  }
12522
11837
  }
12523
- function up40(db) {
11838
+ function up41(db) {
12524
11839
  db.exec(`
12525
11840
  CREATE TABLE IF NOT EXISTS entity_communities (
12526
11841
  id TEXT PRIMARY KEY,
@@ -12538,7 +11853,7 @@ function up40(db) {
12538
11853
  db.exec("ALTER TABLE entities ADD COLUMN community_id TEXT REFERENCES entity_communities(id)");
12539
11854
  }
12540
11855
  }
12541
- function up41(db) {
11856
+ function up42(db) {
12542
11857
  db.exec(`
12543
11858
  CREATE TABLE IF NOT EXISTS memory_hints (
12544
11859
  id TEXT PRIMARY KEY,
@@ -12578,7 +11893,7 @@ function up41(db) {
12578
11893
  END
12579
11894
  `);
12580
11895
  }
12581
- function up42(db) {
11896
+ function up43(db) {
12582
11897
  db.exec(`
12583
11898
  DELETE FROM entity_dependencies
12584
11899
  WHERE id NOT IN (
@@ -12596,7 +11911,7 @@ function up42(db) {
12596
11911
  )
12597
11912
  `);
12598
11913
  }
12599
- function up43(db) {
11914
+ function up44(db) {
12600
11915
  db.exec(`
12601
11916
  CREATE TABLE IF NOT EXISTS session_transcripts (
12602
11917
  session_key TEXT PRIMARY KEY,
@@ -12619,7 +11934,7 @@ function addColumnIfMissing11(db, table, column, definition) {
12619
11934
  db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
12620
11935
  }
12621
11936
  }
12622
- function up44(db) {
11937
+ function up45(db) {
12623
11938
  addColumnIfMissing11(db, "session_memories", "path_json", "TEXT");
12624
11939
  db.exec(`
12625
11940
  CREATE TABLE IF NOT EXISTS path_feedback_events (
@@ -12694,7 +12009,7 @@ function addColumnIfMissing12(db, table, column, definition) {
12694
12009
  return;
12695
12010
  db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
12696
12011
  }
12697
- function up45(db) {
12012
+ function up46(db) {
12698
12013
  addColumnIfMissing12(db, "session_memories", "entity_slot", "INTEGER");
12699
12014
  addColumnIfMissing12(db, "session_memories", "aspect_slot", "INTEGER");
12700
12015
  addColumnIfMissing12(db, "session_memories", "is_constraint", "INTEGER NOT NULL DEFAULT 0");
@@ -12782,7 +12097,7 @@ function addColumnIfMissing13(db, table, column, definition) {
12782
12097
  return;
12783
12098
  db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
12784
12099
  }
12785
- function up46(db) {
12100
+ function up47(db) {
12786
12101
  db.exec(`
12787
12102
  CREATE TABLE IF NOT EXISTS agents (
12788
12103
  id TEXT PRIMARY KEY,
@@ -12811,7 +12126,7 @@ function addColumnIfMissing14(db, table, column, definition) {
12811
12126
  return;
12812
12127
  db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
12813
12128
  }
12814
- function up47(db) {
12129
+ function up48(db) {
12815
12130
  addColumnIfMissing14(db, "session_summaries", "source_type", "TEXT");
12816
12131
  addColumnIfMissing14(db, "session_summaries", "source_ref", "TEXT");
12817
12132
  addColumnIfMissing14(db, "session_summaries", "meta_json", "TEXT");
@@ -12837,7 +12152,7 @@ function addColumnIfMissing15(db, table, column, definition) {
12837
12152
  return;
12838
12153
  db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
12839
12154
  }
12840
- function up48(db) {
12155
+ function up49(db) {
12841
12156
  addColumnIfMissing15(db, "session_transcripts", "updated_at", "TEXT");
12842
12157
  addColumnIfMissing15(db, "summary_jobs", "agent_id", "TEXT NOT NULL DEFAULT 'default'");
12843
12158
  addColumnIfMissing15(db, "session_scores", "agent_id", "TEXT NOT NULL DEFAULT 'default'");
@@ -12908,7 +12223,7 @@ function up48(db) {
12908
12223
  ON memory_md_heads(lease_expires_at);
12909
12224
  `);
12910
12225
  }
12911
- function up49(db) {
12226
+ function up50(db) {
12912
12227
  db.exec(`
12913
12228
  DROP INDEX IF EXISTS idx_summaries_session_depth;
12914
12229
 
@@ -12969,7 +12284,7 @@ function up49(db) {
12969
12284
  AND COALESCE(source_type, 'summary') = 'summary';
12970
12285
  `);
12971
12286
  }
12972
- function up50(db) {
12287
+ function up51(db) {
12973
12288
  db.exec(`
12974
12289
  DROP TRIGGER IF EXISTS session_transcripts_fts_ai;
12975
12290
  DROP TRIGGER IF EXISTS session_transcripts_fts_ad;
@@ -13067,7 +12382,7 @@ function up50(db) {
13067
12382
  AND COALESCE(source_type, 'summary') = 'summary';
13068
12383
  `);
13069
12384
  }
13070
- function up51(db) {
12385
+ function up52(db) {
13071
12386
  db.exec(`
13072
12387
  CREATE TABLE IF NOT EXISTS memory_thread_heads (
13073
12388
  agent_id TEXT NOT NULL DEFAULT 'default',
@@ -13185,7 +12500,7 @@ function up51(db) {
13185
12500
  WHERE excluded.latest_at >= memory_thread_heads.latest_at;
13186
12501
  `);
13187
12502
  }
13188
- function up52(db) {
12503
+ function up53(db) {
13189
12504
  db.exec(`
13190
12505
  CREATE TABLE IF NOT EXISTS session_extract_cursors (
13191
12506
  session_key TEXT NOT NULL,
@@ -13202,7 +12517,7 @@ function hasTable(db, name) {
13202
12517
  WHERE type = 'table' AND name = ?
13203
12518
  LIMIT 1`).get(name) !== undefined;
13204
12519
  }
13205
- function up53(db) {
12520
+ function up54(db) {
13206
12521
  db.exec(`
13207
12522
  CREATE TABLE IF NOT EXISTS entity_dependency_history (
13208
12523
  id TEXT PRIMARY KEY,
@@ -13372,7 +12687,7 @@ function addColumnIfMissing16(db, table, column, definition) {
13372
12687
  return;
13373
12688
  db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
13374
12689
  }
13375
- function up54(db) {
12690
+ function up55(db) {
13376
12691
  addColumnIfMissing16(db, "summary_jobs", "session_id", "TEXT");
13377
12692
  addColumnIfMissing16(db, "summary_jobs", "trigger", "TEXT NOT NULL DEFAULT 'session_end'");
13378
12693
  addColumnIfMissing16(db, "summary_jobs", "captured_at", "TEXT");
@@ -13464,7 +12779,7 @@ function up54(db) {
13464
12779
  VALUES ('rebuild');
13465
12780
  `);
13466
12781
  }
13467
- function up55(db) {
12782
+ function up56(db) {
13468
12783
  db.exec(`
13469
12784
  CREATE TABLE IF NOT EXISTS mcp_invocations (
13470
12785
  id TEXT PRIMARY KEY,
@@ -13481,7 +12796,7 @@ function up55(db) {
13481
12796
  CREATE INDEX IF NOT EXISTS idx_mcp_inv_agent ON mcp_invocations(agent_id, created_at);
13482
12797
  `);
13483
12798
  }
13484
- function up56(db) {
12799
+ function up57(db) {
13485
12800
  db.exec(`
13486
12801
  CREATE TABLE IF NOT EXISTS skill_invocations (
13487
12802
  id TEXT PRIMARY KEY,
@@ -13497,7 +12812,7 @@ function up56(db) {
13497
12812
  CREATE INDEX IF NOT EXISTS idx_skill_inv_agent ON skill_invocations(agent_id, created_at);
13498
12813
  `);
13499
12814
  }
13500
- function up57(db) {
12815
+ function up58(db) {
13501
12816
  db.exec(`
13502
12817
  CREATE TABLE IF NOT EXISTS task_scope_hints (
13503
12818
  task_id TEXT PRIMARY KEY REFERENCES scheduled_tasks(id) ON DELETE CASCADE,
@@ -13528,7 +12843,7 @@ function up57(db) {
13528
12843
  ON task_scope_hints(agent_id, updated_at);
13529
12844
  `);
13530
12845
  }
13531
- function up58(db) {
12846
+ function up59(db) {
13532
12847
  db.exec(`
13533
12848
  CREATE TABLE IF NOT EXISTS dreaming_state (
13534
12849
  agent_id TEXT PRIMARY KEY NOT NULL,
@@ -13571,7 +12886,7 @@ function ensureMemoriesScopeColumns(db) {
13571
12886
  if (!names.has("scope"))
13572
12887
  db.exec("ALTER TABLE memories ADD COLUMN scope TEXT");
13573
12888
  }
13574
- function up59(db) {
12889
+ function up60(db) {
13575
12890
  ensureMemoriesScopeColumns(db);
13576
12891
  db.exec("DROP INDEX IF EXISTS idx_memories_content_hash_unique");
13577
12892
  db.exec(`
@@ -13584,20 +12899,20 @@ function up59(db) {
13584
12899
  WHERE content_hash IS NOT NULL AND is_deleted = 0
13585
12900
  `);
13586
12901
  }
13587
- function up60(db) {
12902
+ function up61(db) {
13588
12903
  const sql = readMemoriesFtsSql(db);
13589
12904
  if (sql !== null && !memoriesFtsNeedsTokenizerRepair(sql))
13590
12905
  return;
13591
12906
  recreateMemoriesFts(db);
13592
12907
  }
13593
- function up61(db) {
12908
+ function up62(db) {
13594
12909
  db.exec(`CREATE INDEX IF NOT EXISTS idx_entities_order
13595
12910
  ON entities(agent_id, pinned DESC, pinned_at DESC, mentions DESC, updated_at DESC, name)`);
13596
12911
  db.exec(`CREATE INDEX IF NOT EXISTS idx_entities_extracted_mentions
13597
12912
  ON entities(entity_type, mentions)
13598
12913
  WHERE entity_type = 'extracted'`);
13599
12914
  }
13600
- function up62(db) {
12915
+ function up63(db) {
13601
12916
  const cols = db.prepare("PRAGMA table_info(entity_attributes)").all();
13602
12917
  if (!cols.some((col) => col.name === "claim_key")) {
13603
12918
  db.exec("ALTER TABLE entity_attributes ADD COLUMN claim_key TEXT");
@@ -13606,7 +12921,7 @@ function up62(db) {
13606
12921
  ON entity_attributes(agent_id, aspect_id, claim_key, status)
13607
12922
  WHERE claim_key IS NOT NULL`);
13608
12923
  }
13609
- function up63(db) {
12924
+ function up64(db) {
13610
12925
  const cols = db.prepare("PRAGMA table_info(entity_attributes)").all();
13611
12926
  if (!cols.some((col) => col.name === "group_key")) {
13612
12927
  db.exec("ALTER TABLE entity_attributes ADD COLUMN group_key TEXT");
@@ -13618,13 +12933,13 @@ function up63(db) {
13618
12933
  ON entity_attributes(agent_id, aspect_id, group_key, claim_key, status)
13619
12934
  WHERE claim_key IS NOT NULL`);
13620
12935
  }
13621
- function up64(db) {
12936
+ function up65(db) {
13622
12937
  const cols = db.prepare("PRAGMA table_info(memory_artifacts)").all();
13623
12938
  if (cols.some((col) => col.name === "source_mtime_ms"))
13624
12939
  return;
13625
12940
  db.exec("ALTER TABLE memory_artifacts ADD COLUMN source_mtime_ms REAL");
13626
12941
  }
13627
- function up65(db) {
12942
+ function up66(db) {
13628
12943
  const cols = db.prepare("PRAGMA table_info(memory_artifacts)").all();
13629
12944
  const names = new Set(cols.map((col) => col.name));
13630
12945
  if (!names.has("is_deleted")) {
@@ -13638,7 +12953,7 @@ function up65(db) {
13638
12953
  ON memory_artifacts(agent_id, is_deleted, deleted_at)
13639
12954
  `);
13640
12955
  }
13641
- function up66(db) {
12956
+ function up67(db) {
13642
12957
  db.exec("DROP TRIGGER IF EXISTS memories_au");
13643
12958
  db.exec(`
13644
12959
  CREATE TRIGGER IF NOT EXISTS memories_au AFTER UPDATE OF content ON memories BEGIN
@@ -13656,7 +12971,7 @@ function addColumnIfMissing17(db, table, column, definition) {
13656
12971
  db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
13657
12972
  }
13658
12973
  }
13659
- function up67(db) {
12974
+ function up68(db) {
13660
12975
  for (const table of ["entities", "entity_communities", "entity_attributes", "entity_dependencies"]) {
13661
12976
  addColumnIfMissing17(db, table, "source_id", "TEXT");
13662
12977
  addColumnIfMissing17(db, table, "source_kind", "TEXT");
@@ -13676,7 +12991,7 @@ function hasColumn7(db, table, column) {
13676
12991
  const rows = db.prepare(`PRAGMA table_info(${table})`).all();
13677
12992
  return rows.some((row) => row.name === column);
13678
12993
  }
13679
- function up68(db) {
12994
+ function up69(db) {
13680
12995
  if (!hasTable2(db, "embeddings"))
13681
12996
  return;
13682
12997
  if (!hasColumn7(db, "embeddings", "agent_id")) {
@@ -13684,7 +12999,7 @@ function up68(db) {
13684
12999
  }
13685
13000
  db.exec("CREATE INDEX IF NOT EXISTS idx_embeddings_agent_source ON embeddings(agent_id, source_type, source_id)");
13686
13001
  }
13687
- function up69(db) {
13002
+ function up70(db) {
13688
13003
  db.exec(`
13689
13004
  CREATE TABLE IF NOT EXISTS memory_search_telemetry (
13690
13005
  id TEXT PRIMARY KEY,
@@ -13725,7 +13040,7 @@ function addColumnIfMissing18(db, table, column, definition) {
13725
13040
  db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
13726
13041
  }
13727
13042
  }
13728
- function up70(db) {
13043
+ function up71(db) {
13729
13044
  db.exec(`
13730
13045
  CREATE TABLE IF NOT EXISTS ontology_proposals (
13731
13046
  id TEXT PRIMARY KEY,
@@ -13768,7 +13083,7 @@ function up70(db) {
13768
13083
  db.exec(`CREATE INDEX IF NOT EXISTS idx_${table}_proposal ON ${table}(agent_id, proposal_id)`);
13769
13084
  }
13770
13085
  }
13771
- function up71(db) {
13086
+ function up72(db) {
13772
13087
  db.exec(`
13773
13088
  CREATE TABLE IF NOT EXISTS daily_reflections (
13774
13089
  id TEXT PRIMARY KEY,
@@ -13795,7 +13110,7 @@ function up71(db) {
13795
13110
  WHERE content_key IS NOT NULL;
13796
13111
  `);
13797
13112
  }
13798
- function up72(db) {
13113
+ function up73(db) {
13799
13114
  const cols = db.prepare("PRAGMA table_info(daily_reflections)").all();
13800
13115
  const colNames = new Set(cols.flatMap((c2) => typeof c2.name === "string" ? [c2.name] : []));
13801
13116
  if (!colNames.has("content_key")) {
@@ -13832,7 +13147,7 @@ function backfillVersionRoots(db) {
13832
13147
  WHERE version_root_id IS NULL
13833
13148
  `);
13834
13149
  }
13835
- function up73(db) {
13150
+ function up74(db) {
13836
13151
  for (const table of ["entities", "entity_aspects", "entity_dependencies"]) {
13837
13152
  addColumnIfMissing19(db, table, "status", "TEXT NOT NULL DEFAULT 'active'");
13838
13153
  addColumnIfMissing19(db, table, "archived_at", "TEXT");
@@ -13867,7 +13182,7 @@ function up73(db) {
13867
13182
  ON entity_aspects(agent_id, proposal_id);
13868
13183
  `);
13869
13184
  }
13870
- function up74(db) {
13185
+ function up75(db) {
13871
13186
  db.exec(`
13872
13187
  CREATE TABLE IF NOT EXISTS epistemic_assertions (
13873
13188
  id TEXT PRIMARY KEY,
@@ -13923,7 +13238,7 @@ function ensureMemoriesScopeColumns2(db) {
13923
13238
  if (!names.has("runtime_path"))
13924
13239
  db.exec("ALTER TABLE memories ADD COLUMN runtime_path TEXT");
13925
13240
  }
13926
- function up75(db) {
13241
+ function up76(db) {
13927
13242
  ensureMemoriesScopeColumns2(db);
13928
13243
  db.exec("DROP INDEX IF EXISTS idx_memories_idempotency_key");
13929
13244
  db.exec(`
@@ -13937,7 +13252,7 @@ function up75(db) {
13937
13252
  WHERE idempotency_key IS NOT NULL AND is_deleted = 0
13938
13253
  `);
13939
13254
  }
13940
- function up76(db) {
13255
+ function up77(db) {
13941
13256
  db.exec(`
13942
13257
  CREATE TABLE IF NOT EXISTS session_context_epochs (
13943
13258
  session_key TEXT NOT NULL,
@@ -13972,7 +13287,7 @@ function up76(db) {
13972
13287
  ON session_recall_events(item_kind, item_id, created_at DESC);
13973
13288
  `);
13974
13289
  }
13975
- function up77(db) {
13290
+ function up78(db) {
13976
13291
  db.exec(`
13977
13292
  CREATE TABLE IF NOT EXISTS aggregate_memory_sources (
13978
13293
  aggregate_memory_id TEXT NOT NULL,
@@ -13991,7 +13306,7 @@ function addColumnIfMissing20(db, table, column, definition) {
13991
13306
  return;
13992
13307
  db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
13993
13308
  }
13994
- function up78(db) {
13309
+ function up79(db) {
13995
13310
  addColumnIfMissing20(db, "memory_artifacts", "source_id", "TEXT");
13996
13311
  addColumnIfMissing20(db, "memory_artifacts", "source_root", "TEXT");
13997
13312
  addColumnIfMissing20(db, "memory_artifacts", "source_external_id", "TEXT");
@@ -14004,7 +13319,7 @@ function up78(db) {
14004
13319
  ON memory_artifacts(agent_id, source_id, source_root);
14005
13320
  `);
14006
13321
  }
14007
- function up79(db) {
13322
+ function up80(db) {
14008
13323
  db.exec(`
14009
13324
  CREATE TABLE IF NOT EXISTS temporal_edges (
14010
13325
  id TEXT PRIMARY KEY,
@@ -14027,7 +13342,7 @@ function up79(db) {
14027
13342
  ON temporal_edges(agent_id, subject_type, subject_id);
14028
13343
  `);
14029
13344
  }
14030
- function up80(db) {
13345
+ function up81(db) {
14031
13346
  db.exec(`
14032
13347
  CREATE TABLE IF NOT EXISTS entity_aliases (
14033
13348
  id TEXT PRIMARY KEY,
@@ -14051,7 +13366,7 @@ function up80(db) {
14051
13366
  ON entity_aliases(agent_id, canonical_alias, status);
14052
13367
  `);
14053
13368
  }
14054
- function up81(db) {
13369
+ function up82(db) {
14055
13370
  db.exec(`
14056
13371
  CREATE TABLE IF NOT EXISTS api_keys (
14057
13372
  id TEXT PRIMARY KEY,
@@ -14079,7 +13394,7 @@ function up81(db) {
14079
13394
  ON api_keys(connector, harness);
14080
13395
  `);
14081
13396
  }
14082
- function up82(db) {
13397
+ function up83(db) {
14083
13398
  db.exec(`
14084
13399
  CREATE TABLE IF NOT EXISTS transcript_capture_jobs (
14085
13400
  id TEXT PRIMARY KEY,
@@ -14114,7 +13429,7 @@ function hasColumn10(db, table, column) {
14114
13429
  const rows = db.prepare(`PRAGMA table_info(${table})`).all();
14115
13430
  return rows.some((row) => row.name === column);
14116
13431
  }
14117
- function up83(db) {
13432
+ function up84(db) {
14118
13433
  if (!hasColumn10(db, "documents", "agent_id")) {
14119
13434
  db.exec("ALTER TABLE documents ADD COLUMN agent_id TEXT NOT NULL DEFAULT 'default'");
14120
13435
  }
@@ -14200,7 +13515,7 @@ function up83(db) {
14200
13515
  db.exec("CREATE INDEX IF NOT EXISTS idx_documents_agent_project ON documents(agent_id, project)");
14201
13516
  db.exec("CREATE INDEX IF NOT EXISTS idx_documents_source_scope ON documents(source_url, agent_id, project)");
14202
13517
  }
14203
- function up84(db) {
13518
+ function up85(db) {
14204
13519
  db.exec(`
14205
13520
  CREATE TABLE IF NOT EXISTS aggregate_evidence_sources (
14206
13521
  aggregate_memory_id TEXT NOT NULL,
@@ -14222,7 +13537,7 @@ function hasColumn11(db, table, column) {
14222
13537
  return rows.some((row) => row.name === column);
14223
13538
  }
14224
13539
  var COLUMNS = ["harness", "session_id", "tool_use_id", "cwd", "origin", "args"];
14225
- function up85(db) {
13540
+ function up86(db) {
14226
13541
  for (const column of COLUMNS) {
14227
13542
  if (!hasColumn11(db, "skill_invocations", column)) {
14228
13543
  db.exec(`ALTER TABLE skill_invocations ADD COLUMN ${column} TEXT`);
@@ -14303,7 +13618,7 @@ function documentScopeColumnsPreservingExisting(db) {
14303
13618
  `);
14304
13619
  }
14305
13620
  try {
14306
- up83(db);
13621
+ up84(db);
14307
13622
  if (preserveAgentId) {
14308
13623
  db.exec(`
14309
13624
  UPDATE documents
@@ -14323,12 +13638,12 @@ function documentScopeColumnsPreservingExisting(db) {
14323
13638
  db.exec("DROP TABLE IF EXISTS temp.__signet_doc_project_guard");
14324
13639
  }
14325
13640
  }
14326
- function up86(db) {
14327
- up82(db);
13641
+ function up87(db) {
13642
+ up83(db);
14328
13643
  if (hasTable3(db, "documents")) {
14329
13644
  documentScopeColumnsPreservingExisting(db);
14330
13645
  }
14331
- up84(db);
13646
+ up85(db);
14332
13647
  addColumnIfMissing21(db, "memories", "superseded_by", "TEXT");
14333
13648
  addColumnIfMissing21(db, "memories", "superseded_at", "TEXT");
14334
13649
  addColumnIfMissing21(db, "memories", "superseded_reason", "TEXT");
@@ -14385,7 +13700,7 @@ function up86(db) {
14385
13700
  AND ${sourceAgentId} = ${targetAgentId}
14386
13701
  `);
14387
13702
  }
14388
- function up87(db) {
13703
+ function up88(db) {
14389
13704
  db.exec(`
14390
13705
  CREATE TABLE IF NOT EXISTS legacy_markdown_imports (
14391
13706
  path TEXT PRIMARY KEY,
@@ -14415,7 +13730,7 @@ function up87(db) {
14415
13730
  ON legacy_markdown_chunks(memory_id);
14416
13731
  `);
14417
13732
  }
14418
- function up88(db) {
13733
+ function up89(db) {
14419
13734
  const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name IN ('relations', 'entity_dependencies')").all();
14420
13735
  const tableNames = new Set(tables.map((r2) => String(r2.name)));
14421
13736
  if (!tableNames.has("relations") || !tableNames.has("entity_dependencies"))
@@ -14474,7 +13789,7 @@ function addColumnIfMissing22(db, table, column, definition) {
14474
13789
  return;
14475
13790
  db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
14476
13791
  }
14477
- function up89(db) {
13792
+ function up90(db) {
14478
13793
  addColumnIfMissing22(db, "summary_jobs", "content_hash", "TEXT");
14479
13794
  db.exec(`
14480
13795
  CREATE INDEX IF NOT EXISTS idx_summary_jobs_agent_session_content_hash
@@ -14487,14 +13802,14 @@ function addColumnIfMissing23(db, table, column, definition) {
14487
13802
  return;
14488
13803
  db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
14489
13804
  }
14490
- function up90(db) {
13805
+ function up91(db) {
14491
13806
  addColumnIfMissing23(db, "summary_jobs", "boundary_reason", "TEXT");
14492
13807
  db.exec(`
14493
13808
  CREATE INDEX IF NOT EXISTS idx_summary_jobs_boundary_reason
14494
13809
  ON summary_jobs(agent_id, session_key, boundary_reason)
14495
13810
  `);
14496
13811
  }
14497
- function up91(db) {
13812
+ function up92(db) {
14498
13813
  db.exec(`
14499
13814
  CREATE TABLE IF NOT EXISTS transcript_recovery_files (
14500
13815
  agent_id TEXT NOT NULL,
@@ -14512,7 +13827,7 @@ function up91(db) {
14512
13827
  ON transcript_capture_jobs(agent_id, session_id, status);
14513
13828
  `);
14514
13829
  }
14515
- function up92(db) {
13830
+ function up93(db) {
14516
13831
  db.exec(`
14517
13832
  CREATE TABLE IF NOT EXISTS job_cancellations (
14518
13833
  id TEXT PRIMARY KEY,
@@ -14540,7 +13855,7 @@ function indexExists(db, table, indexName) {
14540
13855
  const rows = db.prepare(`PRAGMA index_list(${table})`).all();
14541
13856
  return rows.some((row) => row.name === indexName);
14542
13857
  }
14543
- function up93(db) {
13858
+ function up94(db) {
14544
13859
  db.exec(`
14545
13860
  CREATE TABLE IF NOT EXISTS job_archive (
14546
13861
  id TEXT PRIMARY KEY,
@@ -14567,7 +13882,7 @@ function indexExists2(db, table, indexName) {
14567
13882
  const rows = db.prepare(`PRAGMA index_list(${table})`).all();
14568
13883
  return rows.some((row) => row.name === indexName);
14569
13884
  }
14570
- function up94(db) {
13885
+ function up95(db) {
14571
13886
  db.exec(`
14572
13887
  CREATE TABLE IF NOT EXISTS embedding_index_state (
14573
13888
  id INTEGER PRIMARY KEY CHECK (id = 1),
@@ -14580,7 +13895,7 @@ function up94(db) {
14580
13895
  )
14581
13896
  `);
14582
13897
  }
14583
- function up95(db) {
13898
+ function up96(db) {
14584
13899
  db.exec(`
14585
13900
  CREATE TABLE IF NOT EXISTS embeddings_staging (
14586
13901
  id TEXT PRIMARY KEY,
@@ -14599,7 +13914,7 @@ function up95(db) {
14599
13914
  ON embeddings_staging(agent_id, source_type, source_id);
14600
13915
  `);
14601
13916
  }
14602
- function up96(db) {
13917
+ function up97(db) {
14603
13918
  const columns = db.prepare("PRAGMA table_info(dreaming_state)").all();
14604
13919
  if (!columns.some((column) => column.name === "evidence_cursor")) {
14605
13920
  db.exec("ALTER TABLE dreaming_state ADD COLUMN evidence_cursor TEXT");
@@ -14610,7 +13925,7 @@ function hasColumn13(db, table, column) {
14610
13925
  const rows = db.prepare(`PRAGMA table_info(${table})`).all();
14611
13926
  return rows.some((r2) => r2.name === column);
14612
13927
  }
14613
- function up97(db) {
13928
+ function up98(db) {
14614
13929
  const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name = 'memories'").all();
14615
13930
  if (tables.length === 0)
14616
13931
  return;
@@ -14635,23 +13950,23 @@ function up97(db) {
14635
13950
  function hasColumn14(db, table, column) {
14636
13951
  return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
14637
13952
  }
14638
- function up98(db) {
13953
+ function up99(db) {
14639
13954
  const hasMemories = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'memories'").get();
14640
13955
  if (!hasMemories || !hasColumn14(db, "memories", "memory_kind") || !hasColumn14(db, "memories", "type"))
14641
13956
  return;
14642
13957
  db.exec("UPDATE memories SET memory_kind = NULL WHERE type = 'session_summary'");
14643
13958
  }
14644
- function up99(db) {
13959
+ function up100(db) {
14645
13960
  db.exec("DROP TABLE IF EXISTS ingestion_jobs");
14646
13961
  }
14647
- function up100(db) {
13962
+ function up101(db) {
14648
13963
  const columns = db.prepare("PRAGMA table_info(dreaming_state)").all();
14649
13964
  if (!columns.some((column) => column.name === "last_failure_at")) {
14650
13965
  db.exec("ALTER TABLE dreaming_state ADD COLUMN last_failure_at TEXT");
14651
13966
  }
14652
13967
  db.exec("UPDATE dreaming_state SET last_failure_at = updated_at WHERE consecutive_failures > 0 AND last_failure_at IS NULL");
14653
13968
  }
14654
- function up101(db) {
13969
+ function up102(db) {
14655
13970
  db.exec(`
14656
13971
  CREATE TABLE IF NOT EXISTS dreaming_evidence_exclusions (
14657
13972
  agent_id TEXT NOT NULL,
@@ -14668,7 +13983,7 @@ function up101(db) {
14668
13983
  ON dreaming_evidence_exclusions (agent_id, resolved_at, requeue_requested_at, excluded_at DESC);
14669
13984
  `);
14670
13985
  }
14671
- function up102(db) {
13986
+ function up103(db) {
14672
13987
  db.exec(`
14673
13988
  CREATE TABLE IF NOT EXISTS dreaming_tool_calls (
14674
13989
  id TEXT PRIMARY KEY,
@@ -14688,7 +14003,7 @@ function up102(db) {
14688
14003
  ON dreaming_tool_calls (agent_id, pass_id, sequence ASC);
14689
14004
  `);
14690
14005
  }
14691
- function up103(db) {
14006
+ function up104(db) {
14692
14007
  const columns = db.prepare("PRAGMA table_info(dreaming_passes)").all();
14693
14008
  if (!columns.some((column) => column.name === "evidence_window_json")) {
14694
14009
  db.exec("ALTER TABLE dreaming_passes ADD COLUMN evidence_window_json TEXT");
@@ -14697,7 +14012,7 @@ function up103(db) {
14697
14012
  db.exec("ALTER TABLE dreaming_passes ADD COLUMN runbook_json TEXT");
14698
14013
  }
14699
14014
  }
14700
- function up104(db) {
14015
+ function up105(db) {
14701
14016
  db.exec(`
14702
14017
  CREATE TABLE IF NOT EXISTS dreaming_attention (
14703
14018
  id TEXT PRIMARY KEY,
@@ -14719,7 +14034,7 @@ function up104(db) {
14719
14034
  function hasColumn15(db, table, column) {
14720
14035
  return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
14721
14036
  }
14722
- function up105(db) {
14037
+ function up106(db) {
14723
14038
  const requiredMemoryColumns = [
14724
14039
  "content_hash",
14725
14040
  "normalized_content",
@@ -14770,7 +14085,7 @@ function up105(db) {
14770
14085
  WHERE EXISTS (SELECT 1 FROM memory_entity_mentions WHERE entity_id = entities.id)
14771
14086
  `);
14772
14087
  }
14773
- function up106(db) {
14088
+ function up107(db) {
14774
14089
  const tables = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name IN ('memories', 'entity_attributes')").all();
14775
14090
  if (tables.length !== 2)
14776
14091
  return;
@@ -14793,7 +14108,7 @@ function tableExists(db, table) {
14793
14108
  function hasColumn16(db, table, column) {
14794
14109
  return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
14795
14110
  }
14796
- function up107(db) {
14111
+ function up108(db) {
14797
14112
  db.exec(`
14798
14113
  CREATE TABLE IF NOT EXISTS derived_memory_sources (
14799
14114
  derived_memory_id TEXT NOT NULL,
@@ -14836,7 +14151,7 @@ function up107(db) {
14836
14151
  `);
14837
14152
  }
14838
14153
  }
14839
- function up108(db) {
14154
+ function up109(db) {
14840
14155
  db.exec(`
14841
14156
  DROP TRIGGER IF EXISTS entities_fts_ai;
14842
14157
  DROP TRIGGER IF EXISTS entities_fts_ad;
@@ -14925,7 +14240,7 @@ function up108(db) {
14925
14240
  function hasColumn17(db, table, column) {
14926
14241
  return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
14927
14242
  }
14928
- function up109(db) {
14243
+ function up110(db) {
14929
14244
  if (!hasColumn17(db, "memories", "review_after")) {
14930
14245
  db.exec("ALTER TABLE memories ADD COLUMN review_after TEXT;");
14931
14246
  }
@@ -14941,14 +14256,14 @@ var TOKEN_COLUMNS = [
14941
14256
  ["tokens_cache_write", "INTEGER"],
14942
14257
  ["tokens_cost", "REAL"]
14943
14258
  ];
14944
- function up110(db) {
14259
+ function up111(db) {
14945
14260
  for (const [column, type] of TOKEN_COLUMNS) {
14946
14261
  if (!hasColumn18(db, "dreaming_passes", column)) {
14947
14262
  db.exec(`ALTER TABLE dreaming_passes ADD COLUMN ${column} ${type};`);
14948
14263
  }
14949
14264
  }
14950
14265
  }
14951
- function up111(db) {
14266
+ function up112(db) {
14952
14267
  db.exec(`
14953
14268
  CREATE TABLE IF NOT EXISTS embedding_usage (
14954
14269
  day TEXT NOT NULL,
@@ -14961,7 +14276,7 @@ function up111(db) {
14961
14276
  );
14962
14277
  `);
14963
14278
  }
14964
- function up112(db) {
14279
+ function up113(db) {
14965
14280
  db.exec(`
14966
14281
  CREATE TABLE IF NOT EXISTS telemetry_install (
14967
14282
  id TEXT PRIMARY KEY,
@@ -14969,7 +14284,7 @@ function up112(db) {
14969
14284
  );
14970
14285
  `);
14971
14286
  }
14972
- function up113(db) {
14287
+ function up114(db) {
14973
14288
  db.exec(`
14974
14289
  CREATE INDEX IF NOT EXISTS idx_memory_entity_mentions_entity_memory
14975
14290
  ON memory_entity_mentions(entity_id, memory_id);
@@ -14980,7 +14295,7 @@ function hasColumn19(db, table, column) {
14980
14295
  return rows.some((row) => row.name === column);
14981
14296
  }
14982
14297
  var COLUMNS2 = ["first_remember_at", "first_recall_at"];
14983
- function up114(db) {
14298
+ function up115(db) {
14984
14299
  for (const column of COLUMNS2) {
14985
14300
  if (!hasColumn19(db, "telemetry_install", column)) {
14986
14301
  db.exec(`ALTER TABLE telemetry_install ADD COLUMN ${column} TEXT`);
@@ -14996,7 +14311,7 @@ function addColumnIfMissing24(db, column, definition) {
14996
14311
  db.exec(`ALTER TABLE telemetry_events ADD COLUMN ${column} ${definition}`);
14997
14312
  }
14998
14313
  }
14999
- function up115(db) {
14314
+ function up116(db) {
15000
14315
  addColumnIfMissing24(db, "source", "TEXT NOT NULL DEFAULT 'daemon'");
15001
14316
  addColumnIfMissing24(db, "claim_token", "TEXT");
15002
14317
  addColumnIfMissing24(db, "claimed_at", "TEXT");
@@ -15005,7 +14320,7 @@ function up115(db) {
15005
14320
  ON telemetry_events(source, sent_to_posthog, claimed_at, timestamp);
15006
14321
  `);
15007
14322
  }
15008
- function up116(db) {
14323
+ function up117(db) {
15009
14324
  db.exec(`
15010
14325
  CREATE TABLE IF NOT EXISTS session_claims (
15011
14326
  session_key TEXT NOT NULL,
@@ -15026,7 +14341,7 @@ function up116(db) {
15026
14341
  ON session_claims(agent_id, state, expires_at);
15027
14342
  `);
15028
14343
  }
15029
- function up117(db) {
14344
+ function up118(db) {
15030
14345
  const table = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'entity_attributes'").get();
15031
14346
  if (table == null)
15032
14347
  return;
@@ -15035,7 +14350,7 @@ function up117(db) {
15035
14350
  ON entity_attributes(memory_id, agent_id, status, importance);
15036
14351
  `);
15037
14352
  }
15038
- function up118(db) {
14353
+ function up119(db) {
15039
14354
  db.exec(`
15040
14355
  CREATE TABLE IF NOT EXISTS cross_agent_messages (
15041
14356
  id TEXT PRIMARY KEY,
@@ -15092,7 +14407,7 @@ function addColumnIfMissing25(db, column, definition) {
15092
14407
  db.exec(`ALTER TABLE cross_agent_messages ADD COLUMN ${column} ${definition}`);
15093
14408
  }
15094
14409
  }
15095
- function up119(db) {
14410
+ function up120(db) {
15096
14411
  const table = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'cross_agent_messages'").get();
15097
14412
  if (table == null)
15098
14413
  return;
@@ -15293,7 +14608,7 @@ function backfillTranscriptsFromSummaryJobs(db) {
15293
14608
  insert.run(...values);
15294
14609
  }
15295
14610
  }
15296
- function up120(db) {
14611
+ function up121(db) {
15297
14612
  if (!hasTable4(db, "session_transcripts"))
15298
14613
  return;
15299
14614
  addColumnIfMissing26(db, "session_transcripts", "completed_at", "TEXT");
@@ -15346,7 +14661,7 @@ function up120(db) {
15346
14661
  ON session_transcripts(agent_id, content_hash);
15347
14662
  `);
15348
14663
  }
15349
- function up121(db) {
14664
+ function up122(db) {
15350
14665
  db.exec(`
15351
14666
  CREATE INDEX IF NOT EXISTS idx_memory_jobs_pressure_status
15352
14667
  ON memory_jobs(status)
@@ -15365,12 +14680,12 @@ function up121(db) {
15365
14680
  function hasColumn22(db, table, column) {
15366
14681
  return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
15367
14682
  }
15368
- function up122(db) {
14683
+ function up123(db) {
15369
14684
  if (!hasColumn22(db, "telemetry_install", "last_seen_version")) {
15370
14685
  db.exec("ALTER TABLE telemetry_install ADD COLUMN last_seen_version TEXT");
15371
14686
  }
15372
14687
  }
15373
- function up123(db) {
14688
+ function up124(db) {
15374
14689
  db.exec(`
15375
14690
  CREATE TABLE IF NOT EXISTS source_lifecycle_state (
15376
14691
  agent_id TEXT NOT NULL,
@@ -15399,7 +14714,7 @@ function addColumnIfMissing27(db, column, definition) {
15399
14714
  db.exec(`ALTER TABLE telemetry_events ADD COLUMN ${column} ${definition}`);
15400
14715
  }
15401
14716
  }
15402
- function up124(db) {
14717
+ function up125(db) {
15403
14718
  addColumnIfMissing27(db, "delivery_attempts", "INTEGER NOT NULL DEFAULT 0");
15404
14719
  addColumnIfMissing27(db, "last_attempt_at", "TEXT");
15405
14720
  addColumnIfMissing27(db, "sent_at", "TEXT");
@@ -15420,7 +14735,7 @@ function up124(db) {
15420
14735
  VALUES (1, CURRENT_TIMESTAMP);
15421
14736
  `);
15422
14737
  }
15423
- function up125(db) {
14738
+ function up126(db) {
15424
14739
  const columns = db.prepare("PRAGMA table_info(dreaming_evidence_exclusions)").all();
15425
14740
  const names = new Set(columns.map((column) => column.name));
15426
14741
  if (!names.has("failure_class")) {
@@ -15437,7 +14752,7 @@ function up125(db) {
15437
14752
  }
15438
14753
  db.exec("CREATE INDEX IF NOT EXISTS idx_dreaming_evidence_exclusions_retry ON dreaming_evidence_exclusions (resolved_at, requeue_requested_at, failure_class, retry_count, last_requeued_at)");
15439
14754
  }
15440
- function up126(db) {
14755
+ function up127(db) {
15441
14756
  db.exec(`
15442
14757
  CREATE TABLE IF NOT EXISTS embedding_index_failures (
15443
14758
  id INTEGER PRIMARY KEY AUTOINCREMENT,
@@ -15461,7 +14776,7 @@ function up126(db) {
15461
14776
  ON embedding_index_failures(source_type, source_id);
15462
14777
  `);
15463
14778
  }
15464
- function up127(db) {
14779
+ function up128(db) {
15465
14780
  db.exec(`
15466
14781
  CREATE TABLE IF NOT EXISTS imported_source_lifecycle (
15467
14782
  id TEXT PRIMARY KEY,
@@ -15511,7 +14826,7 @@ function backfillTable(db, params) {
15511
14826
  FROM ${params.table}${params.where ? ` WHERE ${params.where}` : ""}`).all();
15512
14827
  backfill(db, rows, params.sourceKind, params.scannedAt);
15513
14828
  }
15514
- function up128(db) {
14829
+ function up129(db) {
15515
14830
  db.exec(`
15516
14831
  CREATE TABLE IF NOT EXISTS memory_content_safety (
15517
14832
  agent_id TEXT NOT NULL,
@@ -15568,7 +14883,7 @@ function up128(db) {
15568
14883
  scannedAt
15569
14884
  });
15570
14885
  }
15571
- function up129(db) {
14886
+ function up130(db) {
15572
14887
  const table = db.prepare("SELECT sql FROM sqlite_master WHERE type = 'table' AND name = 'dreaming_attention'").get();
15573
14888
  if (!table)
15574
14889
  return;
@@ -15602,7 +14917,7 @@ function up129(db) {
15602
14917
  ON dreaming_attention (agent_id, resolved_at, priority DESC, created_at ASC);
15603
14918
  `);
15604
14919
  }
15605
- function up130(db) {
14920
+ function up131(db) {
15606
14921
  db.exec(`
15607
14922
  CREATE TABLE IF NOT EXISTS ontology_contradictions (
15608
14923
  id TEXT PRIMARY KEY,
@@ -15658,7 +14973,7 @@ function up130(db) {
15658
14973
  ON ontology_contradictions(agent_id, left_source_id, right_source_id);
15659
14974
  `);
15660
14975
  }
15661
- function up131(db) {
14976
+ function up132(db) {
15662
14977
  db.exec(`
15663
14978
  CREATE INDEX IF NOT EXISTS idx_memory_jobs_diagnostics_status_created_at
15664
14979
  ON memory_jobs(status, created_at)
@@ -15673,7 +14988,7 @@ function up131(db) {
15673
14988
  function tableExists3(db, table) {
15674
14989
  return db.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = ?").get(table) != null;
15675
14990
  }
15676
- function up132(db) {
14991
+ function up133(db) {
15677
14992
  if (!tableExists3(db, "memory_jobs"))
15678
14993
  return;
15679
14994
  if (!tableExists3(db, "job_cancellations")) {
@@ -15722,7 +15037,7 @@ function up132(db) {
15722
15037
  AND status IN ('pending', 'leased');
15723
15038
  `);
15724
15039
  }
15725
- function up133(db) {
15040
+ function up134(db) {
15726
15041
  db.exec(`
15727
15042
  CREATE TABLE IF NOT EXISTS embedding_repair_budget (
15728
15043
  id INTEGER PRIMARY KEY CHECK (id = 1),
@@ -15762,7 +15077,7 @@ function up133(db) {
15762
15077
  END;
15763
15078
  `);
15764
15079
  }
15765
- function up134(db) {
15080
+ function up135(db) {
15766
15081
  db.exec(`
15767
15082
  CREATE TABLE IF NOT EXISTS dreaming_evidence_consumption (
15768
15083
  agent_id TEXT NOT NULL,
@@ -15785,13 +15100,13 @@ function up134(db) {
15785
15100
  ON dreaming_evidence_consumption(agent_id, pass_id, delivered_offset, source_length);
15786
15101
  `);
15787
15102
  }
15788
- function up135(db) {
15103
+ function up136(db) {
15789
15104
  db.exec(`
15790
15105
  CREATE INDEX IF NOT EXISTS idx_epistemic_assertions_observer_entity
15791
15106
  ON epistemic_assertions(agent_id, subject_entity_id, status, asserted_at DESC, created_at DESC);
15792
15107
  `);
15793
15108
  }
15794
- function up136(db) {
15109
+ function up137(db) {
15795
15110
  db.exec(`
15796
15111
  CREATE TABLE IF NOT EXISTS memory_head_revisions (
15797
15112
  id TEXT PRIMARY KEY,
@@ -15843,7 +15158,7 @@ function up136(db) {
15843
15158
  if (!names.has("format_version"))
15844
15159
  db.exec("ALTER TABLE memory_md_heads ADD COLUMN format_version INTEGER NOT NULL DEFAULT 1");
15845
15160
  }
15846
- function up137(db) {
15161
+ function up138(db) {
15847
15162
  db.exec(`
15848
15163
  CREATE TABLE memory_head_entries_v134 (
15849
15164
  entry_id TEXT NOT NULL, agent_id TEXT NOT NULL, canonical_text TEXT NOT NULL,
@@ -15861,7 +15176,7 @@ function up137(db) {
15861
15176
  ON memory_head_entries(agent_id, entry_id, last_revision DESC);
15862
15177
  `);
15863
15178
  }
15864
- function up138(db) {
15179
+ function up139(db) {
15865
15180
  db.exec(`
15866
15181
  CREATE TABLE IF NOT EXISTS memory_head_publications (
15867
15182
  agent_id TEXT NOT NULL,
@@ -15877,7 +15192,7 @@ function up138(db) {
15877
15192
  ON memory_head_publications(agent_id, status, revision DESC);
15878
15193
  `);
15879
15194
  }
15880
- function up139(db) {
15195
+ function up140(db) {
15881
15196
  const cols = new Set(db.prepare("PRAGMA table_info(memory_head_revisions)").all().map((r2) => r2.name));
15882
15197
  for (const [name, type] of [
15883
15198
  ["entry_id", "TEXT"],
@@ -15891,7 +15206,7 @@ function up139(db) {
15891
15206
  }
15892
15207
  db.exec("CREATE UNIQUE INDEX IF NOT EXISTS idx_memory_head_revisions_entry ON memory_head_revisions(agent_id, revision, entry_id)");
15893
15208
  }
15894
- function up140(db) {
15209
+ function up141(db) {
15895
15210
  const cols = new Set(db.prepare("PRAGMA table_info(dreaming_passes)").all().map((r2) => r2.name));
15896
15211
  for (const [name, type] of [
15897
15212
  ["head_revision", "INTEGER"],
@@ -15913,7 +15228,7 @@ function addColumnIfMissing28(db, table, column, definition) {
15913
15228
  if (!hasColumn25(db, table, column))
15914
15229
  db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
15915
15230
  }
15916
- function up141(db) {
15231
+ function up142(db) {
15917
15232
  addColumnIfMissing28(db, "memories", "manual_override", "INTEGER DEFAULT 0");
15918
15233
  db.exec(`
15919
15234
  CREATE TABLE IF NOT EXISTS transcript_capture_status (
@@ -16218,7 +15533,7 @@ function up141(db) {
16218
15533
  GROUP BY j.agent_id;
16219
15534
  `);
16220
15535
  }
16221
- function up142(db) {
15536
+ function up143(db) {
16222
15537
  db.exec(`
16223
15538
  CREATE TABLE IF NOT EXISTS native_source_sync_state (
16224
15539
  agent_id TEXT NOT NULL,
@@ -16234,7 +15549,7 @@ function up142(db) {
16234
15549
  ON native_source_sync_state(agent_id, status);
16235
15550
  `);
16236
15551
  }
16237
- function up143(db) {
15552
+ function up144(db) {
16238
15553
  db.exec(`
16239
15554
  CREATE TABLE IF NOT EXISTS transcript_recovery_frontiers (
16240
15555
  agent_id TEXT NOT NULL,
@@ -16246,7 +15561,7 @@ function up143(db) {
16246
15561
  );
16247
15562
  `);
16248
15563
  }
16249
- function up144(db) {
15564
+ function up145(db) {
16250
15565
  db.exec(`
16251
15566
  CREATE TABLE IF NOT EXISTS source_sync_checkpoints (
16252
15567
  agent_id TEXT NOT NULL,
@@ -16260,13 +15575,13 @@ function up144(db) {
16260
15575
  );
16261
15576
  `);
16262
15577
  }
16263
- function up145(db) {
15578
+ function up146(db) {
16264
15579
  const columns = db.prepare("PRAGMA table_info(source_sync_checkpoints)").all();
16265
15580
  if (!columns.some((column) => column.name === "frontier")) {
16266
15581
  db.exec("ALTER TABLE source_sync_checkpoints ADD COLUMN frontier TEXT");
16267
15582
  }
16268
15583
  }
16269
- function up146(db) {
15584
+ function up147(db) {
16270
15585
  const columns = new Set(db.prepare("PRAGMA table_info(embedding_index_state)").all().map((row) => row.name).filter((name) => typeof name === "string"));
16271
15586
  const additions = [
16272
15587
  ["migration_phase", "TEXT"],
@@ -16301,13 +15616,13 @@ function up146(db) {
16301
15616
  `);
16302
15617
  }
16303
15618
  }
16304
- function up147(db) {
15619
+ function up148(db) {
16305
15620
  const columns = new Set(db.prepare("PRAGMA table_info(memory_jobs)").all().map((row) => row.name).filter((name) => typeof name === "string"));
16306
15621
  if (!columns.has("lease_token")) {
16307
15622
  db.exec("ALTER TABLE memory_jobs ADD COLUMN lease_token TEXT");
16308
15623
  }
16309
15624
  }
16310
- function up148(db) {
15625
+ function up149(db) {
16311
15626
  db.exec(`
16312
15627
  CREATE TABLE IF NOT EXISTS dreaming_evidence_reviews (
16313
15628
  agent_id TEXT NOT NULL,
@@ -16325,7 +15640,7 @@ function up148(db) {
16325
15640
  ON dreaming_evidence_reviews (agent_id, reviewed_at DESC);
16326
15641
  `);
16327
15642
  }
16328
- function up149(db) {
15643
+ function up150(db) {
16329
15644
  db.exec(`
16330
15645
  CREATE TABLE IF NOT EXISTS source_import_jobs (
16331
15646
  id TEXT PRIMARY KEY, kind TEXT NOT NULL CHECK (kind = 'import'), agent_id TEXT NOT NULL,
@@ -16392,16 +15707,16 @@ function up149(db) {
16392
15707
  }
16393
15708
  db.exec("CREATE INDEX IF NOT EXISTS idx_session_transcripts_agent_source ON session_transcripts(agent_id, source_id)");
16394
15709
  }
16395
- function up150(db) {
15710
+ function up151(db) {
16396
15711
  db.exec("CREATE INDEX IF NOT EXISTS idx_source_import_files_job_state ON source_import_files(job_id, state)");
16397
15712
  }
16398
- function up151(db) {
15713
+ function up152(db) {
16399
15714
  const columns = db.prepare("PRAGMA table_info(source_import_record_attempts)").all();
16400
15715
  if (!columns.some((column) => column.name === "source_id")) {
16401
15716
  db.exec("ALTER TABLE source_import_record_attempts ADD COLUMN source_id TEXT");
16402
15717
  }
16403
15718
  }
16404
- function up152(db) {
15719
+ function up153(db) {
16405
15720
  const addColumn = (table, column, definition) => {
16406
15721
  const statement = db.prepare("SELECT 1 AS found FROM pragma_table_info(?) WHERE name = ?");
16407
15722
  let exists;
@@ -16422,7 +15737,7 @@ function addColumnIfMissing29(db, table, column, definition) {
16422
15737
  if (!columns.some((row) => row.name === column))
16423
15738
  db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
16424
15739
  }
16425
- function up153(db) {
15740
+ function up154(db) {
16426
15741
  addColumnIfMissing29(db, "memory_md_heads", "is_current", "INTEGER NOT NULL DEFAULT 0");
16427
15742
  addColumnIfMissing29(db, "dreaming_passes", "head_base_revision", "INTEGER");
16428
15743
  db.exec("CREATE INDEX IF NOT EXISTS idx_memory_head_revisions_content_hash ON memory_head_revisions(content_hash)");
@@ -16572,7 +15887,7 @@ function up153(db) {
16572
15887
  `);
16573
15888
  }
16574
15889
  }
16575
- function up154(db) {
15890
+ function up155(db) {
16576
15891
  db.exec(`
16577
15892
  CREATE TABLE IF NOT EXISTS vector_repair_checkpoints (
16578
15893
  operation TEXT NOT NULL CHECK (operation IN ('resync', 'clean-orphans')),
@@ -16597,17 +15912,53 @@ function up154(db) {
16597
15912
  ON vector_repair_checkpoints(status, updated_at);
16598
15913
  `);
16599
15914
  }
15915
+ function up156(db) {
15916
+ db.exec(`
15917
+ CREATE TABLE IF NOT EXISTS embedding_repair_checkpoints (
15918
+ checkpoint_id TEXT PRIMARY KEY,
15919
+ agent_id TEXT NOT NULL CHECK (length(trim(agent_id)) > 0),
15920
+ model TEXT NOT NULL CHECK (length(trim(model)) > 0),
15921
+ status TEXT NOT NULL DEFAULT 'running' CHECK (status IN ('running', 'complete', 'failed')),
15922
+ batches INTEGER NOT NULL DEFAULT 0 CHECK (batches >= 0),
15923
+ selected INTEGER NOT NULL DEFAULT 0 CHECK (selected >= 0),
15924
+ written INTEGER NOT NULL DEFAULT 0 CHECK (written >= 0),
15925
+ failed INTEGER NOT NULL DEFAULT 0 CHECK (failed >= 0),
15926
+ stale INTEGER NOT NULL DEFAULT 0 CHECK (stale >= 0),
15927
+ cross_agent_hash_conflicts INTEGER NOT NULL DEFAULT 0 CHECK (cross_agent_hash_conflicts >= 0),
15928
+ last_error TEXT,
15929
+ created_at TEXT NOT NULL,
15930
+ updated_at TEXT NOT NULL
15931
+ );
15932
+ CREATE INDEX IF NOT EXISTS idx_embedding_repair_checkpoints_status
15933
+ ON embedding_repair_checkpoints(status, updated_at);
15934
+ `);
15935
+ }
15936
+ function up157(db) {
15937
+ const columns = new Set(db.prepare("PRAGMA table_info(embedding_repair_checkpoints)").all().map((row) => row.name));
15938
+ if (!columns.has("profile_fingerprint")) {
15939
+ db.exec("ALTER TABLE embedding_repair_checkpoints ADD COLUMN profile_fingerprint TEXT");
15940
+ }
15941
+ db.exec(`
15942
+ CREATE TABLE IF NOT EXISTS embedding_repair_progress (
15943
+ agent_id TEXT PRIMARY KEY CHECK (length(trim(agent_id)) > 0),
15944
+ last_completed_at TEXT,
15945
+ last_affected INTEGER NOT NULL DEFAULT 0 CHECK (last_affected >= 0),
15946
+ last_error TEXT,
15947
+ updated_at TEXT NOT NULL
15948
+ );
15949
+ `);
15950
+ }
16600
15951
  var MIGRATIONS = [
16601
15952
  {
16602
15953
  version: 1,
16603
15954
  name: "baseline",
16604
- up: up4,
15955
+ up: up5,
16605
15956
  artifacts: { tables: ["memories", "conversations", "embeddings"] }
16606
15957
  },
16607
15958
  {
16608
15959
  version: 2,
16609
15960
  name: "pipeline-v2",
16610
- up: up5,
15961
+ up: up6,
16611
15962
  artifacts: {
16612
15963
  tables: ["memory_history", "memory_jobs", "entities", "relations", "memory_entity_mentions"]
16613
15964
  }
@@ -16615,12 +15966,12 @@ var MIGRATIONS = [
16615
15966
  {
16616
15967
  version: 3,
16617
15968
  name: "unique-content-hash",
16618
- up: up6
15969
+ up: up7
16619
15970
  },
16620
15971
  {
16621
15972
  version: 4,
16622
15973
  name: "history-actor-and-retention",
16623
- up: up7,
15974
+ up: up8,
16624
15975
  artifacts: {
16625
15976
  columns: [{ table: "memory_history", column: "actor_type" }]
16626
15977
  }
@@ -16628,7 +15979,7 @@ var MIGRATIONS = [
16628
15979
  {
16629
15980
  version: 5,
16630
15981
  name: "graph-extended",
16631
- up: up8,
15982
+ up: up9,
16632
15983
  artifacts: {
16633
15984
  columns: [{ table: "entities", column: "canonical_name" }]
16634
15985
  }
@@ -16636,7 +15987,7 @@ var MIGRATIONS = [
16636
15987
  {
16637
15988
  version: 6,
16638
15989
  name: "idempotency-key",
16639
- up: up9,
15990
+ up: up10,
16640
15991
  artifacts: {
16641
15992
  columns: [{ table: "memories", column: "idempotency_key" }]
16642
15993
  }
@@ -16644,42 +15995,42 @@ var MIGRATIONS = [
16644
15995
  {
16645
15996
  version: 7,
16646
15997
  name: "documents-and-connectors",
16647
- up: up10,
15998
+ up: up11,
16648
15999
  artifacts: { tables: ["documents", "document_memories", "connectors"] }
16649
16000
  },
16650
16001
  {
16651
16002
  version: 8,
16652
16003
  name: "embeddings-unique-hash",
16653
- up: up11
16004
+ up: up12
16654
16005
  },
16655
16006
  {
16656
16007
  version: 9,
16657
16008
  name: "summary-jobs",
16658
- up: up12,
16009
+ up: up13,
16659
16010
  artifacts: { tables: ["summary_jobs"] }
16660
16011
  },
16661
16012
  {
16662
16013
  version: 10,
16663
16014
  name: "umap-cache",
16664
- up: up13,
16015
+ up: up14,
16665
16016
  artifacts: { tables: ["umap_cache"] }
16666
16017
  },
16667
16018
  {
16668
16019
  version: 11,
16669
16020
  name: "session-scores",
16670
- up: up14,
16021
+ up: up15,
16671
16022
  artifacts: { tables: ["session_scores"] }
16672
16023
  },
16673
16024
  {
16674
16025
  version: 12,
16675
16026
  name: "scheduled-tasks",
16676
- up: up15,
16027
+ up: up16,
16677
16028
  artifacts: { tables: ["scheduled_tasks", "task_runs"] }
16678
16029
  },
16679
16030
  {
16680
16031
  version: 13,
16681
16032
  name: "ingestion-tracking",
16682
- up: up16,
16033
+ up: up17,
16683
16034
  artifacts: {
16684
16035
  columns: [
16685
16036
  { table: "memories", column: "source_path" },
@@ -16690,13 +16041,13 @@ var MIGRATIONS = [
16690
16041
  {
16691
16042
  version: 14,
16692
16043
  name: "telemetry",
16693
- up: up17,
16044
+ up: up18,
16694
16045
  artifacts: { tables: ["telemetry_events"] }
16695
16046
  },
16696
16047
  {
16697
16048
  version: 15,
16698
16049
  name: "session-memories",
16699
- up: up18,
16050
+ up: up19,
16700
16051
  artifacts: {
16701
16052
  tables: ["session_memories"],
16702
16053
  columns: [
@@ -16708,13 +16059,13 @@ var MIGRATIONS = [
16708
16059
  {
16709
16060
  version: 16,
16710
16061
  name: "session-checkpoints",
16711
- up: up19,
16062
+ up: up20,
16712
16063
  artifacts: { tables: ["session_checkpoints"] }
16713
16064
  },
16714
16065
  {
16715
16066
  version: 17,
16716
16067
  name: "task-skills",
16717
- up: up20,
16068
+ up: up21,
16718
16069
  artifacts: {
16719
16070
  columns: [{ table: "scheduled_tasks", column: "skill_name" }]
16720
16071
  }
@@ -16722,13 +16073,13 @@ var MIGRATIONS = [
16722
16073
  {
16723
16074
  version: 18,
16724
16075
  name: "skill-meta",
16725
- up: up21,
16076
+ up: up22,
16726
16077
  artifacts: { tables: ["skill_meta"] }
16727
16078
  },
16728
16079
  {
16729
16080
  version: 19,
16730
16081
  name: "knowledge-structure",
16731
- up: up22,
16082
+ up: up23,
16732
16083
  artifacts: {
16733
16084
  tables: ["entity_aspects", "entity_attributes", "entity_dependencies", "task_meta"],
16734
16085
  columns: [{ table: "entities", column: "agent_id" }]
@@ -16737,7 +16088,7 @@ var MIGRATIONS = [
16737
16088
  {
16738
16089
  version: 20,
16739
16090
  name: "session-structural-columns",
16740
- up: up23,
16091
+ up: up24,
16741
16092
  artifacts: {
16742
16093
  columns: [
16743
16094
  { table: "session_memories", column: "entity_slot" },
@@ -16750,7 +16101,7 @@ var MIGRATIONS = [
16750
16101
  {
16751
16102
  version: 21,
16752
16103
  name: "checkpoint-structural",
16753
- up: up24,
16104
+ up: up25,
16754
16105
  artifacts: {
16755
16106
  columns: [{ table: "session_checkpoints", column: "focal_entity_ids" }]
16756
16107
  }
@@ -16758,7 +16109,7 @@ var MIGRATIONS = [
16758
16109
  {
16759
16110
  version: 22,
16760
16111
  name: "entity-pinning",
16761
- up: up25,
16112
+ up: up26,
16762
16113
  artifacts: {
16763
16114
  columns: [
16764
16115
  { table: "entities", column: "pinned" },
@@ -16769,17 +16120,17 @@ var MIGRATIONS = [
16769
16120
  {
16770
16121
  version: 23,
16771
16122
  name: "retired-scorer-gap",
16772
- up: up26
16123
+ up: up27
16773
16124
  },
16774
16125
  {
16775
16126
  version: 24,
16776
16127
  name: "retired-scorer-gap",
16777
- up: up27
16128
+ up: up28
16778
16129
  },
16779
16130
  {
16780
16131
  version: 25,
16781
16132
  name: "agent-feedback",
16782
- up: up28,
16133
+ up: up29,
16783
16134
  artifacts: {
16784
16135
  columns: [{ table: "session_memories", column: "agent_relevance_score" }]
16785
16136
  }
@@ -16787,32 +16138,32 @@ var MIGRATIONS = [
16787
16138
  {
16788
16139
  version: 26,
16789
16140
  name: "retired-scorer-gap",
16790
- up: up29
16141
+ up: up30
16791
16142
  },
16792
16143
  {
16793
16144
  version: 27,
16794
16145
  name: "backfill-canonical-names",
16795
- up: up30
16146
+ up: up31
16796
16147
  },
16797
16148
  {
16798
16149
  version: 28,
16799
16150
  name: "lossless-retention",
16800
- up: up31
16151
+ up: up32
16801
16152
  },
16802
16153
  {
16803
16154
  version: 29,
16804
16155
  name: "session-summary-dag",
16805
- up: up32
16156
+ up: up33
16806
16157
  },
16807
16158
  {
16808
16159
  version: 30,
16809
16160
  name: "nullable-memory-job-memory-id",
16810
- up: up33
16161
+ up: up34
16811
16162
  },
16812
16163
  {
16813
16164
  version: 31,
16814
16165
  name: "dependency-reason",
16815
- up: up34,
16166
+ up: up35,
16816
16167
  artifacts: {
16817
16168
  columns: [
16818
16169
  { table: "entity_dependencies", column: "reason" },
@@ -16823,7 +16174,7 @@ var MIGRATIONS = [
16823
16174
  {
16824
16175
  version: 32,
16825
16176
  name: "embeddings-vector-column",
16826
- up: up35,
16177
+ up: up36,
16827
16178
  artifacts: {
16828
16179
  columns: [{ table: "embeddings", column: "vector", optional: true }]
16829
16180
  }
@@ -16831,7 +16182,7 @@ var MIGRATIONS = [
16831
16182
  {
16832
16183
  version: 33,
16833
16184
  name: "scope",
16834
- up: up36,
16185
+ up: up37,
16835
16186
  artifacts: {
16836
16187
  columns: [{ table: "memories", column: "scope" }]
16837
16188
  }
@@ -16839,17 +16190,17 @@ var MIGRATIONS = [
16839
16190
  {
16840
16191
  version: 34,
16841
16192
  name: "scope-aware-dedup",
16842
- up: up37
16193
+ up: up38
16843
16194
  },
16844
16195
  {
16845
16196
  version: 35,
16846
16197
  name: "entity-fts",
16847
- up: up38
16198
+ up: up39
16848
16199
  },
16849
16200
  {
16850
16201
  version: 36,
16851
16202
  name: "dependency-confidence",
16852
- up: up39,
16203
+ up: up40,
16853
16204
  artifacts: {
16854
16205
  columns: [{ table: "entity_dependencies", column: "confidence" }]
16855
16206
  }
@@ -16857,7 +16208,7 @@ var MIGRATIONS = [
16857
16208
  {
16858
16209
  version: 37,
16859
16210
  name: "entity-communities",
16860
- up: up40,
16211
+ up: up41,
16861
16212
  artifacts: {
16862
16213
  tables: ["entity_communities"],
16863
16214
  columns: [{ table: "entities", column: "community_id" }]
@@ -16866,24 +16217,24 @@ var MIGRATIONS = [
16866
16217
  {
16867
16218
  version: 38,
16868
16219
  name: "memory-hints",
16869
- up: up41,
16220
+ up: up42,
16870
16221
  artifacts: { tables: ["memory_hints"] }
16871
16222
  },
16872
16223
  {
16873
16224
  version: 39,
16874
16225
  name: "dedup-entity-dependencies",
16875
- up: up42
16226
+ up: up43
16876
16227
  },
16877
16228
  {
16878
16229
  version: 40,
16879
16230
  name: "session-transcripts",
16880
- up: up43,
16231
+ up: up44,
16881
16232
  artifacts: { tables: ["session_transcripts"] }
16882
16233
  },
16883
16234
  {
16884
16235
  version: 41,
16885
16236
  name: "path-feedback",
16886
- up: up44,
16237
+ up: up45,
16887
16238
  artifacts: {
16888
16239
  tables: [
16889
16240
  "path_feedback_events",
@@ -16898,7 +16249,7 @@ var MIGRATIONS = [
16898
16249
  {
16899
16250
  version: 42,
16900
16251
  name: "session-memories-agent-id",
16901
- up: up45,
16252
+ up: up46,
16902
16253
  artifacts: {
16903
16254
  columns: [{ table: "session_memories", column: "agent_id" }]
16904
16255
  }
@@ -16906,7 +16257,7 @@ var MIGRATIONS = [
16906
16257
  {
16907
16258
  version: 43,
16908
16259
  name: "agents-table",
16909
- up: up46,
16260
+ up: up47,
16910
16261
  artifacts: {
16911
16262
  tables: ["agents"],
16912
16263
  columns: [
@@ -16918,7 +16269,7 @@ var MIGRATIONS = [
16918
16269
  {
16919
16270
  version: 44,
16920
16271
  name: "memory-md-temporal-head",
16921
- up: up47,
16272
+ up: up48,
16922
16273
  artifacts: {
16923
16274
  columns: [
16924
16275
  { table: "session_summaries", column: "source_type" },
@@ -16930,7 +16281,7 @@ var MIGRATIONS = [
16930
16281
  {
16931
16282
  version: 45,
16932
16283
  name: "lossless-working-memory-hardening",
16933
- up: up48,
16284
+ up: up49,
16934
16285
  artifacts: {
16935
16286
  tables: ["session_transcripts_fts", "memory_md_heads"],
16936
16287
  columns: [
@@ -16943,17 +16294,17 @@ var MIGRATIONS = [
16943
16294
  {
16944
16295
  version: 46,
16945
16296
  name: "session-summary-uniqueness",
16946
- up: up49
16297
+ up: up50
16947
16298
  },
16948
16299
  {
16949
16300
  version: 47,
16950
16301
  name: "agent-scoped-temporal-uniqueness",
16951
- up: up50
16302
+ up: up51
16952
16303
  },
16953
16304
  {
16954
16305
  version: 48,
16955
16306
  name: "thread-heads",
16956
- up: up51,
16307
+ up: up52,
16957
16308
  artifacts: {
16958
16309
  tables: ["memory_thread_heads"]
16959
16310
  }
@@ -16961,7 +16312,7 @@ var MIGRATIONS = [
16961
16312
  {
16962
16313
  version: 49,
16963
16314
  name: "session-extract-cursors",
16964
- up: up52,
16315
+ up: up53,
16965
16316
  artifacts: {
16966
16317
  tables: ["session_extract_cursors"]
16967
16318
  }
@@ -16969,7 +16320,7 @@ var MIGRATIONS = [
16969
16320
  {
16970
16321
  version: 50,
16971
16322
  name: "related-to-audit",
16972
- up: up53,
16323
+ up: up54,
16973
16324
  artifacts: {
16974
16325
  tables: ["entity_dependency_history"]
16975
16326
  }
@@ -16977,7 +16328,7 @@ var MIGRATIONS = [
16977
16328
  {
16978
16329
  version: 51,
16979
16330
  name: "memory-md-rolling-window-lineage",
16980
- up: up54,
16331
+ up: up55,
16981
16332
  artifacts: {
16982
16333
  tables: ["memory_artifacts", "memory_artifact_tombstones", "memory_artifacts_fts"],
16983
16334
  columns: [
@@ -16992,7 +16343,7 @@ var MIGRATIONS = [
16992
16343
  {
16993
16344
  version: 52,
16994
16345
  name: "mcp-invocations",
16995
- up: up55,
16346
+ up: up56,
16996
16347
  artifacts: {
16997
16348
  tables: ["mcp_invocations"]
16998
16349
  }
@@ -17000,7 +16351,7 @@ var MIGRATIONS = [
17000
16351
  {
17001
16352
  version: 53,
17002
16353
  name: "skill-invocations",
17003
- up: up56,
16354
+ up: up57,
17004
16355
  artifacts: {
17005
16356
  tables: ["skill_invocations"]
17006
16357
  }
@@ -17008,7 +16359,7 @@ var MIGRATIONS = [
17008
16359
  {
17009
16360
  version: 54,
17010
16361
  name: "task-agent-scope",
17011
- up: up57,
16362
+ up: up58,
17012
16363
  artifacts: {
17013
16364
  tables: ["task_scope_hints"]
17014
16365
  }
@@ -17016,7 +16367,7 @@ var MIGRATIONS = [
17016
16367
  {
17017
16368
  version: 55,
17018
16369
  name: "dreaming-state",
17019
- up: up58,
16370
+ up: up59,
17020
16371
  artifacts: {
17021
16372
  tables: ["dreaming_state", "dreaming_passes"]
17022
16373
  }
@@ -17024,22 +16375,22 @@ var MIGRATIONS = [
17024
16375
  {
17025
16376
  version: 56,
17026
16377
  name: "agent-scoped-content-hash",
17027
- up: up59
16378
+ up: up60
17028
16379
  },
17029
16380
  {
17030
16381
  version: 57,
17031
16382
  name: "memories-fts-tokenizer-repair",
17032
- up: up60
16383
+ up: up61
17033
16384
  },
17034
16385
  {
17035
16386
  version: 58,
17036
16387
  name: "knowledge-graph-indices",
17037
- up: up61
16388
+ up: up62
17038
16389
  },
17039
16390
  {
17040
16391
  version: 59,
17041
16392
  name: "entity-attribute-claim-key",
17042
- up: up62,
16393
+ up: up63,
17043
16394
  artifacts: {
17044
16395
  columns: [{ table: "entity_attributes", column: "claim_key" }]
17045
16396
  }
@@ -17047,7 +16398,7 @@ var MIGRATIONS = [
17047
16398
  {
17048
16399
  version: 60,
17049
16400
  name: "entity-attribute-group-key",
17050
- up: up63,
16401
+ up: up64,
17051
16402
  artifacts: {
17052
16403
  columns: [{ table: "entity_attributes", column: "group_key" }]
17053
16404
  }
@@ -17055,7 +16406,7 @@ var MIGRATIONS = [
17055
16406
  {
17056
16407
  version: 61,
17057
16408
  name: "memory-artifact-source-mtime",
17058
- up: up64,
16409
+ up: up65,
17059
16410
  artifacts: {
17060
16411
  columns: [{ table: "memory_artifacts", column: "source_mtime_ms" }]
17061
16412
  }
@@ -17063,7 +16414,7 @@ var MIGRATIONS = [
17063
16414
  {
17064
16415
  version: 62,
17065
16416
  name: "memory-artifact-soft-delete",
17066
- up: up65,
16417
+ up: up66,
17067
16418
  artifacts: {
17068
16419
  columns: [
17069
16420
  { table: "memory_artifacts", column: "is_deleted" },
@@ -17074,12 +16425,12 @@ var MIGRATIONS = [
17074
16425
  {
17075
16426
  version: 63,
17076
16427
  name: "content-only-memories-fts-update",
17077
- up: up66
16428
+ up: up67
17078
16429
  },
17079
16430
  {
17080
16431
  version: 64,
17081
16432
  name: "source-graph-provenance",
17082
- up: up67,
16433
+ up: up68,
17083
16434
  artifacts: {
17084
16435
  columns: [
17085
16436
  { table: "entities", column: "source_path" },
@@ -17092,7 +16443,7 @@ var MIGRATIONS = [
17092
16443
  {
17093
16444
  version: 65,
17094
16445
  name: "source-embedding-agent-scope",
17095
- up: up68,
16446
+ up: up69,
17096
16447
  artifacts: {
17097
16448
  columns: [{ table: "embeddings", column: "agent_id", optional: true }]
17098
16449
  }
@@ -17100,7 +16451,7 @@ var MIGRATIONS = [
17100
16451
  {
17101
16452
  version: 66,
17102
16453
  name: "memory-search-telemetry",
17103
- up: up69,
16454
+ up: up70,
17104
16455
  artifacts: {
17105
16456
  tables: ["memory_search_telemetry"]
17106
16457
  }
@@ -17108,7 +16459,7 @@ var MIGRATIONS = [
17108
16459
  {
17109
16460
  version: 67,
17110
16461
  name: "ontology-proposals",
17111
- up: up70,
16462
+ up: up71,
17112
16463
  artifacts: {
17113
16464
  tables: ["ontology_proposals"],
17114
16465
  columns: [
@@ -17122,7 +16473,7 @@ var MIGRATIONS = [
17122
16473
  {
17123
16474
  version: 68,
17124
16475
  name: "daily-reflections",
17125
- up: up71,
16476
+ up: up72,
17126
16477
  artifacts: {
17127
16478
  tables: ["daily_reflections"]
17128
16479
  }
@@ -17130,7 +16481,7 @@ var MIGRATIONS = [
17130
16481
  {
17131
16482
  version: 69,
17132
16483
  name: "daily-reflections-multiple-insights",
17133
- up: up72,
16484
+ up: up73,
17134
16485
  artifacts: {
17135
16486
  tables: ["daily_reflections"]
17136
16487
  }
@@ -17138,7 +16489,7 @@ var MIGRATIONS = [
17138
16489
  {
17139
16490
  version: 70,
17140
16491
  name: "ontology-control-plane-state",
17141
- up: up73,
16492
+ up: up74,
17142
16493
  artifacts: {
17143
16494
  columns: [
17144
16495
  { table: "entities", column: "status" },
@@ -17153,7 +16504,7 @@ var MIGRATIONS = [
17153
16504
  {
17154
16505
  version: 71,
17155
16506
  name: "epistemic-assertions",
17156
- up: up74,
16507
+ up: up75,
17157
16508
  artifacts: {
17158
16509
  tables: ["epistemic_assertions"]
17159
16510
  }
@@ -17161,7 +16512,7 @@ var MIGRATIONS = [
17161
16512
  {
17162
16513
  version: 72,
17163
16514
  name: "agent-scoped-idempotency-key",
17164
- up: up75,
16515
+ up: up76,
17165
16516
  artifacts: {
17166
16517
  columns: [
17167
16518
  { table: "memories", column: "idempotency_key" },
@@ -17172,7 +16523,7 @@ var MIGRATIONS = [
17172
16523
  {
17173
16524
  version: 73,
17174
16525
  name: "recall-context-dedupe",
17175
- up: up76,
16526
+ up: up77,
17176
16527
  artifacts: {
17177
16528
  tables: ["session_context_epochs", "session_recall_events"]
17178
16529
  }
@@ -17180,7 +16531,7 @@ var MIGRATIONS = [
17180
16531
  {
17181
16532
  version: 74,
17182
16533
  name: "aggregate-memory-links",
17183
- up: up77,
16534
+ up: up78,
17184
16535
  artifacts: {
17185
16536
  tables: ["aggregate_memory_sources"]
17186
16537
  }
@@ -17188,7 +16539,7 @@ var MIGRATIONS = [
17188
16539
  {
17189
16540
  version: 75,
17190
16541
  name: "memory-artifact-source-provenance",
17191
- up: up78,
16542
+ up: up79,
17192
16543
  artifacts: {
17193
16544
  columns: [
17194
16545
  { table: "memory_artifacts", column: "source_id" },
@@ -17202,7 +16553,7 @@ var MIGRATIONS = [
17202
16553
  {
17203
16554
  version: 76,
17204
16555
  name: "temporal-edges",
17205
- up: up79,
16556
+ up: up80,
17206
16557
  artifacts: {
17207
16558
  tables: ["temporal_edges"]
17208
16559
  }
@@ -17210,7 +16561,7 @@ var MIGRATIONS = [
17210
16561
  {
17211
16562
  version: 77,
17212
16563
  name: "entity-aliases",
17213
- up: up80,
16564
+ up: up81,
17214
16565
  artifacts: {
17215
16566
  tables: ["entity_aliases"]
17216
16567
  }
@@ -17218,7 +16569,7 @@ var MIGRATIONS = [
17218
16569
  {
17219
16570
  version: 78,
17220
16571
  name: "api-keys",
17221
- up: up81,
16572
+ up: up82,
17222
16573
  artifacts: {
17223
16574
  tables: ["api_keys"]
17224
16575
  }
@@ -17226,7 +16577,7 @@ var MIGRATIONS = [
17226
16577
  {
17227
16578
  version: 79,
17228
16579
  name: "transcript-capture-jobs",
17229
- up: up82,
16580
+ up: up83,
17230
16581
  artifacts: {
17231
16582
  tables: ["transcript_capture_jobs"]
17232
16583
  }
@@ -17234,7 +16585,7 @@ var MIGRATIONS = [
17234
16585
  {
17235
16586
  version: 80,
17236
16587
  name: "document-scope-columns",
17237
- up: up83,
16588
+ up: up84,
17238
16589
  artifacts: {
17239
16590
  columns: [
17240
16591
  { table: "documents", column: "agent_id" },
@@ -17245,7 +16596,7 @@ var MIGRATIONS = [
17245
16596
  {
17246
16597
  version: 81,
17247
16598
  name: "aggregate-evidence-sources",
17248
- up: up84,
16599
+ up: up85,
17249
16600
  artifacts: {
17250
16601
  tables: ["aggregate_evidence_sources"]
17251
16602
  }
@@ -17253,7 +16604,7 @@ var MIGRATIONS = [
17253
16604
  {
17254
16605
  version: 82,
17255
16606
  name: "skill-invocations-harness",
17256
- up: up85,
16607
+ up: up86,
17257
16608
  artifacts: {
17258
16609
  columns: [
17259
16610
  { table: "skill_invocations", column: "harness" },
@@ -17264,7 +16615,7 @@ var MIGRATIONS = [
17264
16615
  {
17265
16616
  version: 83,
17266
16617
  name: "memory-lifecycle-repair",
17267
- up: up86,
16618
+ up: up87,
17268
16619
  artifacts: {
17269
16620
  tables: ["transcript_capture_jobs", "aggregate_evidence_sources", "entity_dependencies"],
17270
16621
  columns: [
@@ -17279,7 +16630,7 @@ var MIGRATIONS = [
17279
16630
  {
17280
16631
  version: 84,
17281
16632
  name: "legacy-markdown-import-state",
17282
- up: up87,
16633
+ up: up88,
17283
16634
  artifacts: {
17284
16635
  tables: ["legacy_markdown_imports", "legacy_markdown_chunks"]
17285
16636
  }
@@ -17287,7 +16638,7 @@ var MIGRATIONS = [
17287
16638
  {
17288
16639
  version: 85,
17289
16640
  name: "backfill-relations-to-dependencies",
17290
- up: up88,
16641
+ up: up89,
17291
16642
  artifacts: {
17292
16643
  tables: ["entity_dependencies"]
17293
16644
  }
@@ -17295,7 +16646,7 @@ var MIGRATIONS = [
17295
16646
  {
17296
16647
  version: 86,
17297
16648
  name: "summary-jobs-content-hash",
17298
- up: up89,
16649
+ up: up90,
17299
16650
  artifacts: {
17300
16651
  columns: [{ table: "summary_jobs", column: "content_hash" }]
17301
16652
  }
@@ -17303,7 +16654,7 @@ var MIGRATIONS = [
17303
16654
  {
17304
16655
  version: 87,
17305
16656
  name: "summary-jobs-boundary-reason",
17306
- up: up90,
16657
+ up: up91,
17307
16658
  artifacts: {
17308
16659
  columns: [{ table: "summary_jobs", column: "boundary_reason" }]
17309
16660
  }
@@ -17311,7 +16662,7 @@ var MIGRATIONS = [
17311
16662
  {
17312
16663
  version: 88,
17313
16664
  name: "transcript-recovery-files",
17314
- up: up91,
16665
+ up: up92,
17315
16666
  artifacts: {
17316
16667
  tables: ["transcript_recovery_files"]
17317
16668
  }
@@ -17319,7 +16670,7 @@ var MIGRATIONS = [
17319
16670
  {
17320
16671
  version: 89,
17321
16672
  name: "job-cancellations",
17322
- up: up92,
16673
+ up: up93,
17323
16674
  artifacts: {
17324
16675
  tables: ["job_cancellations"]
17325
16676
  }
@@ -17327,7 +16678,7 @@ var MIGRATIONS = [
17327
16678
  {
17328
16679
  version: 90,
17329
16680
  name: "job-archive",
17330
- up: up93,
16681
+ up: up94,
17331
16682
  artifacts: {
17332
16683
  tables: ["job_archive"]
17333
16684
  }
@@ -17335,25 +16686,25 @@ var MIGRATIONS = [
17335
16686
  {
17336
16687
  version: 91,
17337
16688
  name: "embedding-index-generations",
17338
- up: up94,
16689
+ up: up95,
17339
16690
  artifacts: { tables: ["embedding_index_state"] }
17340
16691
  },
17341
16692
  {
17342
16693
  version: 92,
17343
16694
  name: "embedding-staging-store",
17344
- up: up95,
16695
+ up: up96,
17345
16696
  artifacts: { tables: ["embeddings_staging"] }
17346
16697
  },
17347
16698
  {
17348
16699
  version: 93,
17349
16700
  name: "dreaming-evidence-cursor",
17350
- up: up96,
16701
+ up: up97,
17351
16702
  artifacts: { columns: [{ table: "dreaming_state", column: "evidence_cursor" }] }
17352
16703
  },
17353
16704
  {
17354
16705
  version: 94,
17355
16706
  name: "memory-kind",
17356
- up: up97,
16707
+ up: up98,
17357
16708
  artifacts: {
17358
16709
  columns: [
17359
16710
  { table: "memories", column: "memory_kind" },
@@ -17364,35 +16715,35 @@ var MIGRATIONS = [
17364
16715
  {
17365
16716
  version: 95,
17366
16717
  name: "compaction-recall-projections",
17367
- up: up98
16718
+ up: up99
17368
16719
  },
17369
16720
  {
17370
16721
  version: 96,
17371
16722
  name: "retire-legacy-ingestion",
17372
- up: up99
16723
+ up: up100
17373
16724
  },
17374
16725
  {
17375
16726
  version: 97,
17376
16727
  name: "dreaming-failure-backoff",
17377
- up: up100,
16728
+ up: up101,
17378
16729
  artifacts: { columns: [{ table: "dreaming_state", column: "last_failure_at" }] }
17379
16730
  },
17380
16731
  {
17381
16732
  version: 98,
17382
16733
  name: "dreaming-evidence-exclusions",
17383
- up: up101,
16734
+ up: up102,
17384
16735
  artifacts: { tables: ["dreaming_evidence_exclusions"] }
17385
16736
  },
17386
16737
  {
17387
16738
  version: 99,
17388
16739
  name: "dreaming-tool-calls",
17389
- up: up102,
16740
+ up: up103,
17390
16741
  artifacts: { tables: ["dreaming_tool_calls"] }
17391
16742
  },
17392
16743
  {
17393
16744
  version: 100,
17394
16745
  name: "dreaming-runbook",
17395
- up: up103,
16746
+ up: up104,
17396
16747
  artifacts: {
17397
16748
  columns: [
17398
16749
  { table: "dreaming_passes", column: "evidence_window_json" },
@@ -17403,23 +16754,23 @@ var MIGRATIONS = [
17403
16754
  {
17404
16755
  version: 101,
17405
16756
  name: "dreaming-attention",
17406
- up: up104,
16757
+ up: up105,
17407
16758
  artifacts: { tables: ["dreaming_attention"] }
17408
16759
  },
17409
16760
  {
17410
16761
  version: 102,
17411
16762
  name: "attribute-semantic-memories",
17412
- up: up105
16763
+ up: up106
17413
16764
  },
17414
16765
  {
17415
16766
  version: 103,
17416
16767
  name: "semantic-memory-kind",
17417
- up: up106
16768
+ up: up107
17418
16769
  },
17419
16770
  {
17420
16771
  version: 104,
17421
16772
  name: "derived-memory-provenance",
17422
- up: up107,
16773
+ up: up108,
17423
16774
  artifacts: {
17424
16775
  tables: ["derived_memory_sources"],
17425
16776
  columns: [{ table: "memories", column: "stale_at" }]
@@ -17428,12 +16779,12 @@ var MIGRATIONS = [
17428
16779
  {
17429
16780
  version: 105,
17430
16781
  name: "agent-scoped-entity-name",
17431
- up: up108
16782
+ up: up109
17432
16783
  },
17433
16784
  {
17434
16785
  version: 106,
17435
16786
  name: "memory-review-after",
17436
- up: up109,
16787
+ up: up110,
17437
16788
  artifacts: {
17438
16789
  columns: [{ table: "memories", column: "review_after" }]
17439
16790
  }
@@ -17441,7 +16792,7 @@ var MIGRATIONS = [
17441
16792
  {
17442
16793
  version: 107,
17443
16794
  name: "dreaming-pass-usage",
17444
- up: up110,
16795
+ up: up111,
17445
16796
  artifacts: {
17446
16797
  columns: [
17447
16798
  { table: "dreaming_passes", column: "tokens_input" },
@@ -17455,7 +16806,7 @@ var MIGRATIONS = [
17455
16806
  {
17456
16807
  version: 108,
17457
16808
  name: "embedding-usage",
17458
- up: up111,
16809
+ up: up112,
17459
16810
  artifacts: {
17460
16811
  tables: ["embedding_usage"]
17461
16812
  }
@@ -17463,7 +16814,7 @@ var MIGRATIONS = [
17463
16814
  {
17464
16815
  version: 109,
17465
16816
  name: "telemetry-install",
17466
- up: up112,
16817
+ up: up113,
17467
16818
  artifacts: {
17468
16819
  tables: ["telemetry_install"]
17469
16820
  }
@@ -17471,12 +16822,12 @@ var MIGRATIONS = [
17471
16822
  {
17472
16823
  version: 110,
17473
16824
  name: "memory-mention-join-index",
17474
- up: up113
16825
+ up: up114
17475
16826
  },
17476
16827
  {
17477
16828
  version: 111,
17478
16829
  name: "telemetry-first-use",
17479
- up: up114,
16830
+ up: up115,
17480
16831
  artifacts: {
17481
16832
  columns: [
17482
16833
  { table: "telemetry_install", column: "first_remember_at" },
@@ -17487,7 +16838,7 @@ var MIGRATIONS = [
17487
16838
  {
17488
16839
  version: 112,
17489
16840
  name: "telemetry-queue-ownership",
17490
- up: up115,
16841
+ up: up116,
17491
16842
  artifacts: {
17492
16843
  columns: [
17493
16844
  { table: "telemetry_events", column: "source" },
@@ -17499,7 +16850,7 @@ var MIGRATIONS = [
17499
16850
  {
17500
16851
  version: 113,
17501
16852
  name: "session-claims",
17502
- up: up116,
16853
+ up: up117,
17503
16854
  artifacts: {
17504
16855
  tables: ["session_claims"],
17505
16856
  columns: [
@@ -17513,12 +16864,12 @@ var MIGRATIONS = [
17513
16864
  {
17514
16865
  version: 114,
17515
16866
  name: "memory-traversal-hydration-index",
17516
- up: up117
16867
+ up: up118
17517
16868
  },
17518
16869
  {
17519
16870
  version: 115,
17520
16871
  name: "cross-agent-message-notifications",
17521
- up: up118,
16872
+ up: up119,
17522
16873
  artifacts: {
17523
16874
  tables: ["cross_agent_messages", "cross_agent_message_receipts"]
17524
16875
  }
@@ -17526,7 +16877,7 @@ var MIGRATIONS = [
17526
16877
  {
17527
16878
  version: 116,
17528
16879
  name: "acp-delivery-reconciliation",
17529
- up: up119,
16880
+ up: up120,
17530
16881
  artifacts: {
17531
16882
  columns: [
17532
16883
  { table: "cross_agent_messages", column: "delivery_state" },
@@ -17540,7 +16891,7 @@ var MIGRATIONS = [
17540
16891
  {
17541
16892
  version: 117,
17542
16893
  name: "retire-summary-worker",
17543
- up: up120,
16894
+ up: up121,
17544
16895
  artifacts: {
17545
16896
  columns: [
17546
16897
  { table: "session_transcripts", column: "completed_at" },
@@ -17551,24 +16902,24 @@ var MIGRATIONS = [
17551
16902
  {
17552
16903
  version: 118,
17553
16904
  name: "queue-pressure-indices",
17554
- up: up121
16905
+ up: up122
17555
16906
  },
17556
16907
  {
17557
16908
  version: 119,
17558
16909
  name: "telemetry-version-observation",
17559
- up: up122,
16910
+ up: up123,
17560
16911
  artifacts: { columns: [{ table: "telemetry_install", column: "last_seen_version" }] }
17561
16912
  },
17562
16913
  {
17563
16914
  version: 120,
17564
16915
  name: "source-lifecycle-telemetry",
17565
- up: up123,
16916
+ up: up124,
17566
16917
  artifacts: { tables: ["source_lifecycle_state"] }
17567
16918
  },
17568
16919
  {
17569
16920
  version: 121,
17570
16921
  name: "telemetry-delivery-health",
17571
- up: up124,
16922
+ up: up125,
17572
16923
  artifacts: {
17573
16924
  tables: ["telemetry_delivery_state"],
17574
16925
  columns: [
@@ -17582,7 +16933,7 @@ var MIGRATIONS = [
17582
16933
  {
17583
16934
  version: 122,
17584
16935
  name: "dreaming-evidence-retry",
17585
- up: up125,
16936
+ up: up126,
17586
16937
  artifacts: {
17587
16938
  columns: [
17588
16939
  { table: "dreaming_evidence_exclusions", column: "failure_class" },
@@ -17595,13 +16946,13 @@ var MIGRATIONS = [
17595
16946
  {
17596
16947
  version: 123,
17597
16948
  name: "embedding-index-failures",
17598
- up: up126,
16949
+ up: up127,
17599
16950
  artifacts: { tables: ["embedding_index_failures"] }
17600
16951
  },
17601
16952
  {
17602
16953
  version: 124,
17603
16954
  name: "import-derived-lifecycle",
17604
- up: up127,
16955
+ up: up128,
17605
16956
  artifacts: {
17606
16957
  tables: ["imported_source_lifecycle"]
17607
16958
  }
@@ -17609,77 +16960,77 @@ var MIGRATIONS = [
17609
16960
  {
17610
16961
  version: 125,
17611
16962
  name: "memory-content-safety",
17612
- up: up128,
16963
+ up: up129,
17613
16964
  artifacts: { tables: ["memory_content_safety"] }
17614
16965
  },
17615
16966
  {
17616
16967
  version: 126,
17617
16968
  name: "dreaming-surprisal-attention",
17618
- up: up129,
16969
+ up: up130,
17619
16970
  artifacts: { tables: ["dreaming_attention"] }
17620
16971
  },
17621
16972
  {
17622
16973
  version: 127,
17623
16974
  name: "ontology-contradictions",
17624
- up: up130,
16975
+ up: up131,
17625
16976
  artifacts: { tables: ["ontology_contradictions"] }
17626
16977
  },
17627
16978
  {
17628
16979
  version: 128,
17629
16980
  name: "bounded-queue-diagnostics",
17630
- up: up131
16981
+ up: up132
17631
16982
  },
17632
16983
  {
17633
16984
  version: 129,
17634
16985
  name: "retire-structural-jobs",
17635
- up: up132
16986
+ up: up133
17636
16987
  },
17637
16988
  {
17638
16989
  version: 130,
17639
16990
  name: "embedding-repair-state",
17640
- up: up133,
16991
+ up: up134,
17641
16992
  artifacts: { tables: ["embedding_repair_budget", "embedding_repair_backoff"] }
17642
16993
  },
17643
16994
  {
17644
16995
  version: 131,
17645
16996
  name: "dreaming-evidence-consumption",
17646
- up: up134,
16997
+ up: up135,
17647
16998
  artifacts: { tables: ["dreaming_evidence_consumption"] }
17648
16999
  },
17649
17000
  {
17650
17001
  version: 132,
17651
17002
  name: "observer-scoped-epistemic-assertions",
17652
- up: up135,
17003
+ up: up136,
17653
17004
  artifacts: { tables: ["epistemic_assertions"] }
17654
17005
  },
17655
17006
  {
17656
17007
  version: 133,
17657
17008
  name: "dreaming-memory-head",
17658
- up: up136,
17009
+ up: up137,
17659
17010
  artifacts: { tables: ["memory_head_revisions", "memory_head_entries", "memory_head_revision_entries"] }
17660
17011
  },
17661
17012
  {
17662
17013
  version: 134,
17663
17014
  name: "scope-memory-head-entries",
17664
- up: up137,
17015
+ up: up138,
17665
17016
  artifacts: { tables: ["memory_head_entries"] }
17666
17017
  },
17667
17018
  {
17668
17019
  version: 135,
17669
17020
  name: "memory-head-publication",
17670
- up: up138,
17021
+ up: up139,
17671
17022
  artifacts: { tables: ["memory_head_publications"] }
17672
17023
  },
17673
17024
  {
17674
17025
  version: 136,
17675
17026
  name: "memory-head-revisions",
17676
- up: up139,
17027
+ up: up140,
17677
17028
  artifacts: { tables: ["memory_head_revisions"] }
17678
17029
  },
17679
17030
  {
17680
17031
  version: 137,
17681
17032
  name: "dreaming-head-manifest",
17682
- up: up140,
17033
+ up: up141,
17683
17034
  artifacts: {
17684
17035
  columns: [
17685
17036
  { table: "dreaming_passes", column: "head_revision" },
@@ -17690,7 +17041,7 @@ var MIGRATIONS = [
17690
17041
  {
17691
17042
  version: 138,
17692
17043
  name: "bounded-status-projections",
17693
- up: up141,
17044
+ up: up142,
17694
17045
  artifacts: {
17695
17046
  tables: ["transcript_capture_status", "memories_duplicate_hash_counts", "memories_diagnostics_state"]
17696
17047
  }
@@ -17698,31 +17049,31 @@ var MIGRATIONS = [
17698
17049
  {
17699
17050
  version: 139,
17700
17051
  name: "native-source-sync-state",
17701
- up: up142,
17052
+ up: up143,
17702
17053
  artifacts: { tables: ["native_source_sync_state"] }
17703
17054
  },
17704
17055
  {
17705
17056
  version: 140,
17706
17057
  name: "transcript-recovery-frontier",
17707
- up: up143,
17058
+ up: up144,
17708
17059
  artifacts: { tables: ["transcript_recovery_frontiers"] }
17709
17060
  },
17710
17061
  {
17711
17062
  version: 141,
17712
17063
  name: "source-sync-checkpoints",
17713
- up: up144,
17064
+ up: up145,
17714
17065
  artifacts: { tables: ["source_sync_checkpoints"] }
17715
17066
  },
17716
17067
  {
17717
17068
  version: 142,
17718
17069
  name: "source-sync-frontier",
17719
- up: up145,
17070
+ up: up146,
17720
17071
  artifacts: { columns: [{ table: "source_sync_checkpoints", column: "frontier" }] }
17721
17072
  },
17722
17073
  {
17723
17074
  version: 143,
17724
17075
  name: "embedding-index-progress",
17725
- up: up146,
17076
+ up: up147,
17726
17077
  artifacts: {
17727
17078
  columns: [
17728
17079
  { table: "embedding_index_state", column: "migration_phase" },
@@ -17738,19 +17089,19 @@ var MIGRATIONS = [
17738
17089
  {
17739
17090
  version: 144,
17740
17091
  name: "memory-job-lease-token",
17741
- up: up147,
17092
+ up: up148,
17742
17093
  artifacts: { columns: [{ table: "memory_jobs", column: "lease_token" }] }
17743
17094
  },
17744
17095
  {
17745
17096
  version: 145,
17746
17097
  name: "dreaming-evidence-reviews",
17747
- up: up148,
17098
+ up: up149,
17748
17099
  artifacts: { tables: ["dreaming_evidence_reviews"] }
17749
17100
  },
17750
17101
  {
17751
17102
  version: 146,
17752
17103
  name: "source-transcript-import",
17753
- up: up149,
17104
+ up: up150,
17754
17105
  artifacts: {
17755
17106
  tables: [
17756
17107
  "source_import_jobs",
@@ -17769,19 +17120,19 @@ var MIGRATIONS = [
17769
17120
  {
17770
17121
  version: 147,
17771
17122
  name: "source-import-replay-file-slots",
17772
- up: up150,
17123
+ up: up151,
17773
17124
  artifacts: { tables: ["source_import_files"] }
17774
17125
  },
17775
17126
  {
17776
17127
  version: 148,
17777
17128
  name: "source-import-attempt-provenance",
17778
- up: up151,
17129
+ up: up152,
17779
17130
  artifacts: { columns: [{ table: "source_import_record_attempts", column: "source_id" }] }
17780
17131
  },
17781
17132
  {
17782
17133
  version: 149,
17783
17134
  name: "transcript-import-state-machine",
17784
- up: up152,
17135
+ up: up153,
17785
17136
  artifacts: {
17786
17137
  columns: [
17787
17138
  { table: "source_import_jobs", column: "duplicate_mode" },
@@ -17793,7 +17144,7 @@ var MIGRATIONS = [
17793
17144
  {
17794
17145
  version: 150,
17795
17146
  name: "memory-head-freshness",
17796
- up: up153,
17147
+ up: up154,
17797
17148
  artifacts: {
17798
17149
  columns: [
17799
17150
  { table: "memory_md_heads", column: "is_current" },
@@ -17839,7 +17190,7 @@ var MIGRATIONS = [
17839
17190
  {
17840
17191
  version: 153,
17841
17192
  name: "vector-repair-checkpoints",
17842
- up: up154,
17193
+ up: up155,
17843
17194
  artifacts: { tables: ["vector_repair_checkpoints"] }
17844
17195
  },
17845
17196
  {
@@ -17856,6 +17207,27 @@ var MIGRATIONS = [
17856
17207
  { table: "transcript_capture_jobs", column: "audit_path" }
17857
17208
  ]
17858
17209
  }
17210
+ },
17211
+ {
17212
+ version: 155,
17213
+ name: "source-sync-failures",
17214
+ up: up4,
17215
+ artifacts: { tables: ["source_sync_failures"], indexes: ["idx_source_sync_failures_active"] }
17216
+ },
17217
+ {
17218
+ version: 156,
17219
+ name: "embedding-repair-checkpoints",
17220
+ up: up156,
17221
+ artifacts: { tables: ["embedding_repair_checkpoints"] }
17222
+ },
17223
+ {
17224
+ version: 157,
17225
+ name: "embedding-repair-progress",
17226
+ up: up157,
17227
+ artifacts: {
17228
+ tables: ["embedding_repair_progress"],
17229
+ columns: [{ table: "embedding_repair_checkpoints", column: "profile_fingerprint" }]
17230
+ }
17859
17231
  }
17860
17232
  ];
17861
17233
  var LATEST_SCHEMA_VERSION = MIGRATIONS[MIGRATIONS.length - 1]?.version ?? 0;
@@ -17870,158 +17242,16 @@ function expandHome(p2, home = homedir2()) {
17870
17242
  return join2(home, p2.slice(2));
17871
17243
  return p2;
17872
17244
  }
17873
- var SERVICE = "ai.signet.secrets";
17874
- var require2 = createRequire2(import.meta.url);
17875
- var modulePromise = null;
17876
- var syncModule;
17877
- function workspaceAccount(workspace) {
17878
- return createHash2("sha256").update(workspace).digest("hex").slice(0, 32);
17879
- }
17880
- function errorMessage(error) {
17881
- return error instanceof Error ? error.message : String(error);
17882
- }
17883
- function classifyError(error) {
17884
- const message = errorMessage(error);
17885
- const code = typeof error === "object" && error !== null && "code" in error ? String(error.code) : "";
17886
- const detail = `${code} ${message}`.toLowerCase();
17887
- if (/noentry|no entry|no such item|item.*not found|credential.*missing|does not exist/.test(detail)) {
17888
- return { state: "missing", message };
17889
- }
17890
- if (/locked|interaction|required|authfailed|authentication|islocked|prompt/.test(detail)) {
17891
- return { state: "locked", message };
17892
- }
17893
- if (/permission|access denied|denied/.test(detail)) {
17894
- return { state: "permission-denied", message };
17895
- }
17896
- if (/unsupported|not implemented|dbus|secret service|keyutils|connection|unavailable|no such file/.test(detail)) {
17897
- return { state: "unavailable", message };
17898
- }
17899
- return { state: "corrupt", message };
17900
- }
17901
- function tryRequireOverride() {
17902
- const override = process.env.SIGNET_KEYRING_NATIVE_MODULE_PATH?.trim();
17903
- if (!override)
17904
- return null;
17905
- const isAbsolute = override.startsWith("/") || /^\\\\[^\\]+\\[^\\]+/.test(override) || /^[A-Za-z]:[\\/]/.test(override);
17906
- if (!isAbsolute)
17907
- return null;
17908
- try {
17909
- return require2(override);
17910
- } catch {
17911
- return null;
17912
- }
17913
- }
17914
- async function loadModule() {
17915
- modulePromise ??= (async () => {
17916
- const override = process.env.SIGNET_KEYRING_NATIVE_MODULE_PATH?.trim();
17917
- if (override)
17918
- return tryRequireOverride();
17919
- return await Promise.resolve().then(() => __toESM2(require_keyring(), 1)).catch(() => null);
17920
- })();
17921
- return modulePromise;
17922
- }
17923
- function loadModuleSync() {
17924
- if (syncModule !== undefined)
17925
- return syncModule;
17926
- if (process.env.SIGNET_KEYRING_NATIVE_MODULE_PATH?.trim()) {
17927
- syncModule = tryRequireOverride();
17928
- return syncModule;
17929
- }
17930
- const override = tryRequireOverride();
17931
- if (override) {
17932
- syncModule = override;
17933
- return syncModule;
17934
- }
17935
- try {
17936
- syncModule = require2("@napi-rs/keyring");
17937
- } catch {
17938
- syncModule = null;
17939
- }
17940
- return syncModule;
17941
- }
17942
- function linuxKeyringAvailable() {
17943
- if (process.platform !== "linux")
17944
- return null;
17945
- if (process.env.SIGNET_SECRETS_LINUX_KEYRING === "keyutils") {
17946
- return { state: "unsupported", message: "Linux keyutils is not an implicit Signet secrets backend" };
17947
- }
17948
- if (!process.env.DBUS_SESSION_BUS_ADDRESS) {
17949
- return {
17950
- state: "unavailable",
17951
- message: "Linux Secret Service requires a user D-Bus session; no prompt or desktop session is available"
17952
- };
17953
- }
17954
- try {
17955
- execFileSyncHidden("busctl", ["--user", "status", "org.freedesktop.secrets"], {
17956
- stdio: "ignore",
17957
- timeout: 1000
17958
- });
17959
- return null;
17960
- } catch {
17961
- return {
17962
- state: "unavailable",
17963
- message: "Linux Secret Service is not registered on the user D-Bus session"
17964
- };
17965
- }
17966
- }
17967
-
17968
- class NativeSecretKeyringAdapter {
17969
- platform = process.platform;
17970
- service = SERVICE;
17971
- account;
17972
- constructor(workspace) {
17973
- this.account = workspaceAccount(workspace);
17974
- }
17975
- async entry() {
17976
- const mod = await loadModule();
17977
- if (!mod)
17978
- return null;
17979
- return new mod.AsyncEntry(this.service, this.account);
17980
- }
17981
- async get() {
17982
- const linuxUnavailable = linuxKeyringAvailable();
17983
- if (linuxUnavailable)
17984
- return linuxUnavailable;
17985
- try {
17986
- const entry = await this.entry();
17987
- if (!entry)
17988
- return { state: "unsupported", message: "The native keyring module is not installed for this platform" };
17989
- const value = await entry.getPassword();
17990
- return value === undefined || value === null || value.length === 0 ? { state: "missing" } : { state: "found", value };
17991
- } catch (error) {
17992
- return classifyError(error);
17993
- }
17994
- }
17995
- async set(value) {
17996
- const linuxUnavailable = linuxKeyringAvailable();
17997
- if (linuxUnavailable)
17998
- return linuxUnavailable;
17999
- try {
18000
- const entry = await this.entry();
18001
- if (!entry)
18002
- return { state: "unsupported", message: "The native keyring module is not installed for this platform" };
18003
- await entry.setPassword(value);
18004
- return { state: "found", value };
18005
- } catch (error) {
18006
- return classifyError(error);
18007
- }
18008
- }
18009
- getStatus() {
18010
- const linuxUnavailable = linuxKeyringAvailable();
18011
- if (linuxUnavailable)
18012
- return linuxUnavailable;
18013
- try {
18014
- const mod = loadModuleSync();
18015
- if (!mod)
18016
- return { state: "unsupported", message: "The native keyring module is not installed for this platform" };
18017
- const entry = new mod.Entry(this.service, this.account);
18018
- const value = entry.getPassword();
18019
- return value === undefined || value === null || value.length === 0 ? { state: "missing" } : { state: "found", value };
18020
- } catch (error) {
18021
- return classifyError(error);
18022
- }
18023
- }
18024
- }
17245
+ var STATES = new Set([
17246
+ "found",
17247
+ "missing",
17248
+ "locked",
17249
+ "unavailable",
17250
+ "permission-denied",
17251
+ "corrupt",
17252
+ "unsupported"
17253
+ ]);
17254
+ var mutation = Promise.resolve();
18025
17255
  var LOOPBACK_HOST = "127.0.0.1";
18026
17256
  function normalizeLoopbackHost(host) {
18027
17257
  const normalized = host.trim().toLowerCase().replace(/^\[|\]$/g, "");
@@ -18120,9 +17350,9 @@ function readTrimmedEnv(env, name) {
18120
17350
  function readConfigHome(env, home) {
18121
17351
  const raw = env.XDG_CONFIG_HOME;
18122
17352
  if (typeof raw !== "string")
18123
- return join7(home, ".config");
17353
+ return join8(home, ".config");
18124
17354
  const trimmed = raw.trim();
18125
- return trimmed.length > 0 ? normalizeWorkspacePath(trimmed, home) : join7(home, ".config");
17355
+ return trimmed.length > 0 ? normalizeWorkspacePath(trimmed, home) : join8(home, ".config");
18126
17356
  }
18127
17357
  function isExistingDirectory(path) {
18128
17358
  try {
@@ -18135,12 +17365,12 @@ function isRecord5(value) {
18135
17365
  return typeof value === "object" && value !== null && !Array.isArray(value);
18136
17366
  }
18137
17367
  function getWorkspaceConfigPath(env = process.env, home = homedir4()) {
18138
- return join7(readConfigHome(env, home), "signet", "workspace.json");
17368
+ return join8(readConfigHome(env, home), "signet", "workspace.json");
18139
17369
  }
18140
17370
  function readConfiguredWorkspacePath(env = process.env, home = homedir4(), options = {}) {
18141
17371
  const strict = options.strict ?? true;
18142
17372
  const configPath = getWorkspaceConfigPath(env, home);
18143
- if (!existsSync6(configPath))
17373
+ if (!existsSync7(configPath))
18144
17374
  return null;
18145
17375
  let raw;
18146
17376
  try {
@@ -18189,7 +17419,7 @@ function resolveWorkspacePath(options = {}) {
18189
17419
  };
18190
17420
  }
18191
17421
  return {
18192
- path: join7(home, DEFAULT_AGENTS_DIRNAME),
17422
+ path: join8(home, DEFAULT_AGENTS_DIRNAME),
18193
17423
  source: "default",
18194
17424
  configPath,
18195
17425
  configuredPath: configValue
@@ -18209,10 +17439,10 @@ function resolveEnvWorkspace(env, home, requireExisting) {
18209
17439
  }
18210
17440
  var native = null;
18211
17441
  try {
18212
- const esmRequire = createRequire3(import.meta.url);
17442
+ const esmRequire = createRequire2(import.meta.url);
18213
17443
  native = esmRequire("@signet/native");
18214
17444
  } catch {}
18215
- var GRAPHIQ_DEFAULT_INSTALL_DIR = join8(homedir5(), ".local", "bin");
17445
+ var GRAPHIQ_DEFAULT_INSTALL_DIR = join9(homedir5(), ".local", "bin");
18216
17446
  var SIGNET_SOURCE_CHECKOUT_DIRNAME = "signetai";
18217
17447
  var SIGNET_GIT_ALLOWED_DIRECTORIES = ["skills", "tools", "dreaming"];
18218
17448
  var SIGNET_GIT_PROTECTED_PATHS = [
@@ -18354,14 +17584,14 @@ function symlinkSkills(sourceDir, targetDir, options = {}) {
18354
17584
  skipped: [],
18355
17585
  errors: []
18356
17586
  };
18357
- if (!existsSync13(sourceDir)) {
17587
+ if (!existsSync14(sourceDir)) {
18358
17588
  return result;
18359
17589
  }
18360
- const targetParent = join13(targetDir, "..");
18361
- if (!existsSync13(targetParent)) {
17590
+ const targetParent = join14(targetDir, "..");
17591
+ if (!existsSync14(targetParent)) {
18362
17592
  mkdirSync8(targetParent, { recursive: true });
18363
17593
  }
18364
- if (!existsSync13(targetDir)) {
17594
+ if (!existsSync14(targetDir)) {
18365
17595
  mkdirSync8(targetDir, { recursive: true });
18366
17596
  }
18367
17597
  let entries;
@@ -18375,8 +17605,8 @@ function symlinkSkills(sourceDir, targetDir, options = {}) {
18375
17605
  return result;
18376
17606
  }
18377
17607
  for (const entry of entries) {
18378
- const srcPath = join13(sourceDir, entry);
18379
- const destPath = join13(targetDir, entry);
17608
+ const srcPath = join14(sourceDir, entry);
17609
+ const destPath = join14(targetDir, entry);
18380
17610
  try {
18381
17611
  const src = lstatSync(srcPath);
18382
17612
  if (src.isSymbolicLink() || !src.isDirectory()) {
@@ -18809,28 +18039,28 @@ function runConnectorInstaller(harness, ConnectorClass, options = {}) {
18809
18039
  });
18810
18040
  }
18811
18041
  export {
18812
- runConnectorInstaller,
18813
- resolveSignetWorkspacePath,
18814
- resolveSignetMcpCommand,
18815
- resolveSignetDaemonUrl2 as resolveSignetDaemonUrl,
18816
- resolveSignetCliCommand,
18817
- resolveSignetApiKey,
18818
- resolveSignetAgentId,
18819
- resolveRemoteDaemonUrl,
18820
- removeManagedExtensionFile,
18821
- readTrimmedEnv2 as readTrimmedEnv,
18822
- readManagedTrimmedEnv,
18823
- managedExtensionFilePath,
18824
- isSignetGeneratedFile,
18825
- isManagedExtensionFile,
18826
- isJsonObject,
18827
- isChildOf,
18828
- buildSignetRuntimeEnv,
18829
- buildManagedExtensionEnvBootstrap,
18830
- buildManagedExtensionContent,
18831
- atomicWriteText,
18832
- atomicWriteJson,
18833
- MANAGED_DAEMON_URL_DEFAULT,
18042
+ BaseConnector,
18834
18043
  MANAGED_AGENT_ID_DEFAULT,
18835
- BaseConnector
18044
+ MANAGED_DAEMON_URL_DEFAULT,
18045
+ atomicWriteJson,
18046
+ atomicWriteText,
18047
+ buildManagedExtensionContent,
18048
+ buildManagedExtensionEnvBootstrap,
18049
+ buildSignetRuntimeEnv,
18050
+ isChildOf,
18051
+ isJsonObject,
18052
+ isManagedExtensionFile,
18053
+ isSignetGeneratedFile,
18054
+ managedExtensionFilePath,
18055
+ readManagedTrimmedEnv,
18056
+ readTrimmedEnv2 as readTrimmedEnv,
18057
+ removeManagedExtensionFile,
18058
+ resolveRemoteDaemonUrl,
18059
+ resolveSignetAgentId,
18060
+ resolveSignetApiKey,
18061
+ resolveSignetCliCommand,
18062
+ resolveSignetDaemonUrl2 as resolveSignetDaemonUrl,
18063
+ resolveSignetMcpCommand,
18064
+ resolveSignetWorkspacePath,
18065
+ runConnectorInstaller
18836
18066
  };