@signetai/connector-base 0.226.11 → 0.226.14

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