@remnic/core 9.3.660 → 9.3.661

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.
Files changed (179) hide show
  1. package/dist/access-cli.js +10 -10
  2. package/dist/access-http.d.ts +5 -5
  3. package/dist/access-http.js +10 -10
  4. package/dist/access-mcp.d.ts +5 -5
  5. package/dist/access-mcp.js +9 -9
  6. package/dist/{access-service-D_nbpexW.d.ts → access-service-D0SLB4MH.d.ts} +2 -2
  7. package/dist/access-service.d.ts +5 -5
  8. package/dist/access-service.js +8 -8
  9. package/dist/action-confidence.d.ts +1 -1
  10. package/dist/active-memory-bridge.d.ts +1 -1
  11. package/dist/active-recall.d.ts +1 -1
  12. package/dist/behavior-learner.d.ts +1 -1
  13. package/dist/behavior-signals.d.ts +1 -1
  14. package/dist/bootstrap.d.ts +3 -3
  15. package/dist/briefing.d.ts +1 -1
  16. package/dist/buffer-surprise-report.d.ts +1 -1
  17. package/dist/buffer.d.ts +1 -1
  18. package/dist/calibration.d.ts +1 -1
  19. package/dist/causal-behavior.d.ts +1 -1
  20. package/dist/causal-consolidation.d.ts +1 -1
  21. package/dist/{chunk-7PCZGNG2.js → chunk-34NSUPWS.js} +109 -24
  22. package/dist/chunk-34NSUPWS.js.map +1 -0
  23. package/dist/{chunk-FWIROLS6.js → chunk-44VFF3BB.js} +18 -16
  24. package/dist/chunk-44VFF3BB.js.map +1 -0
  25. package/dist/{chunk-2EVZ5EN6.js → chunk-4SYURHI6.js} +6 -6
  26. package/dist/{chunk-7H7J3ZWN.js → chunk-5G2DNO54.js} +2 -2
  27. package/dist/{chunk-OYXVENIS.js → chunk-7F7LC6HW.js} +3 -3
  28. package/dist/{chunk-256W7AXC.js → chunk-BP5O3GYD.js} +2 -2
  29. package/dist/{chunk-RP2U54GG.js → chunk-D44FQVCU.js} +2 -2
  30. package/dist/{chunk-R2EBP6CM.js → chunk-EMSC4P66.js} +5 -5
  31. package/dist/{chunk-6G5JEN55.js → chunk-FZC2WSDB.js} +2 -2
  32. package/dist/{chunk-UNLHHTKN.js → chunk-LFZUFZQR.js} +10 -2
  33. package/dist/chunk-LFZUFZQR.js.map +1 -0
  34. package/dist/{chunk-B57QYSWN.js → chunk-MHYRRV43.js} +109 -16
  35. package/dist/chunk-MHYRRV43.js.map +1 -0
  36. package/dist/{chunk-MO77TWPS.js → chunk-RQRKQJYM.js} +2 -2
  37. package/dist/{chunk-5PLUC5OB.js → chunk-WSQG37DV.js} +2 -2
  38. package/dist/{chunk-M3VYPE2H.js → chunk-YNQ6DFSV.js} +1 -1
  39. package/dist/chunk-YNQ6DFSV.js.map +1 -0
  40. package/dist/{chunk-GRYAECRV.js → chunk-ZJH723NM.js} +2 -2
  41. package/dist/{cli-aYxSuPvP.d.ts → cli-C6twwe84.d.ts} +3 -3
  42. package/dist/cli.d.ts +5 -5
  43. package/dist/cli.js +13 -13
  44. package/dist/compounding/engine.d.ts +1 -1
  45. package/dist/compounding/preference-consolidator.d.ts +1 -1
  46. package/dist/compression-optimizer.d.ts +1 -1
  47. package/dist/config.d.ts +1 -1
  48. package/dist/connectors/codex-materialize-runner.d.ts +1 -1
  49. package/dist/connectors/codex-materialize.d.ts +1 -1
  50. package/dist/connectors/index.d.ts +1 -1
  51. package/dist/consolidation-provenance-check.d.ts +1 -1
  52. package/dist/consolidation-undo.d.ts +1 -1
  53. package/dist/contradiction/index.d.ts +1 -1
  54. package/dist/conversation-index/backend.d.ts +1 -1
  55. package/dist/conversation-index/chunker.d.ts +1 -1
  56. package/dist/conversation-index/faiss-adapter.d.ts +1 -1
  57. package/dist/conversation-index/indexer.d.ts +1 -1
  58. package/dist/conversation-index/search.d.ts +1 -1
  59. package/dist/day-summary.d.ts +1 -1
  60. package/dist/delinearize.d.ts +1 -1
  61. package/dist/direct-answer-wiring.d.ts +1 -1
  62. package/dist/direct-answer.d.ts +1 -1
  63. package/dist/embedding-fallback.d.ts +1 -1
  64. package/dist/enrichment/index.d.ts +1 -1
  65. package/dist/entity-retrieval.d.ts +1 -1
  66. package/dist/entity-schema.d.ts +1 -1
  67. package/dist/explicit-capture.d.ts +3 -3
  68. package/dist/extraction-judge-telemetry.d.ts +1 -1
  69. package/dist/extraction-judge-training.d.ts +1 -1
  70. package/dist/extraction-judge.d.ts +1 -1
  71. package/dist/extraction.d.ts +1 -1
  72. package/dist/fallback-llm.d.ts +1 -1
  73. package/dist/identity-continuity.d.ts +1 -1
  74. package/dist/importance.d.ts +1 -1
  75. package/dist/index.d.ts +8 -8
  76. package/dist/index.js +15 -15
  77. package/dist/intent.d.ts +1 -1
  78. package/dist/lcm/engine.d.ts +1 -1
  79. package/dist/lcm/index.d.ts +1 -1
  80. package/dist/lcm/tools.d.ts +1 -1
  81. package/dist/lifecycle.d.ts +1 -1
  82. package/dist/live-connectors-runner.d.ts +1 -1
  83. package/dist/local-llm.d.ts +1 -1
  84. package/dist/maintenance/memory-governance.d.ts +1 -1
  85. package/dist/mcp-memory-inspector-app.d.ts +5 -5
  86. package/dist/memory-action-policy.d.ts +1 -1
  87. package/dist/memory-cache.d.ts +1 -1
  88. package/dist/memory-lifecycle-ledger-utils.d.ts +1 -1
  89. package/dist/memory-projection-store.d.ts +1 -1
  90. package/dist/memory-provenance.d.ts +1 -1
  91. package/dist/memory-worth-outcomes.d.ts +1 -1
  92. package/dist/models-json.d.ts +1 -1
  93. package/dist/namespaces/migrate.d.ts +1 -1
  94. package/dist/namespaces/migrate.js +8 -8
  95. package/dist/namespaces/principal.d.ts +1 -1
  96. package/dist/namespaces/search.d.ts +1 -1
  97. package/dist/namespaces/search.js +7 -7
  98. package/dist/namespaces/storage.d.ts +1 -1
  99. package/dist/native-knowledge.d.ts +1 -1
  100. package/dist/operator-toolkit.d.ts +1 -1
  101. package/dist/operator-toolkit.js +9 -9
  102. package/dist/{orchestrator-D1wcmPNj.d.ts → orchestrator-Cg1UkvmO.d.ts} +2 -2
  103. package/dist/orchestrator.d.ts +3 -3
  104. package/dist/orchestrator.js +9 -9
  105. package/dist/patterns-cli.d.ts +1 -1
  106. package/dist/policy-runtime.d.ts +1 -1
  107. package/dist/qmd-recall-cache.d.ts +1 -1
  108. package/dist/qmd.d.ts +17 -1
  109. package/dist/qmd.js +2 -2
  110. package/dist/recall-disclosure-escalation.d.ts +1 -1
  111. package/dist/recall-explain-renderer.d.ts +2 -1
  112. package/dist/recall-planner-llm.d.ts +1 -1
  113. package/dist/recall-state.d.ts +17 -1
  114. package/dist/recall-state.js +1 -1
  115. package/dist/recall-tag-filter.d.ts +1 -1
  116. package/dist/recall-xray-cli.d.ts +1 -1
  117. package/dist/recall-xray-renderer.d.ts +1 -1
  118. package/dist/recall-xray.d.ts +1 -1
  119. package/dist/resolve-auth-token.d.ts +1 -1
  120. package/dist/retrieval-agents.d.ts +1 -1
  121. package/dist/retrieval-tiers.d.ts +1 -1
  122. package/dist/routing/engine.d.ts +1 -1
  123. package/dist/routing/store.d.ts +1 -1
  124. package/dist/search/embed-helper.d.ts +1 -1
  125. package/dist/search/factory.d.ts +1 -1
  126. package/dist/search/factory.js +6 -6
  127. package/dist/search/index.d.ts +1 -1
  128. package/dist/search/index.js +6 -6
  129. package/dist/search/lancedb-backend.d.ts +1 -1
  130. package/dist/search/lancedb-backend.js +2 -2
  131. package/dist/search/meilisearch-backend.d.ts +1 -1
  132. package/dist/search/meilisearch-backend.js +2 -2
  133. package/dist/search/noop-backend.d.ts +1 -1
  134. package/dist/search/orama-backend.d.ts +1 -1
  135. package/dist/search/orama-backend.js +2 -2
  136. package/dist/search/port.d.ts +21 -2
  137. package/dist/search/port.js +1 -1
  138. package/dist/search/remote-backend.d.ts +1 -1
  139. package/dist/{semantic-consolidation-MWOdNtSE.d.ts → semantic-consolidation-BICZvQ3C.d.ts} +1 -1
  140. package/dist/semantic-consolidation.d.ts +2 -2
  141. package/dist/semantic-rule-verifier.d.ts +1 -1
  142. package/dist/session-observer-bands.d.ts +1 -1
  143. package/dist/session-observer-state.d.ts +1 -1
  144. package/dist/shared-context/manager.d.ts +1 -1
  145. package/dist/signal.d.ts +1 -1
  146. package/dist/storage.d.ts +1 -1
  147. package/dist/summarizer.d.ts +1 -1
  148. package/dist/summary-snapshot.d.ts +1 -1
  149. package/dist/temporal-supersession.d.ts +1 -1
  150. package/dist/temporal-validity.d.ts +1 -1
  151. package/dist/threading.d.ts +1 -1
  152. package/dist/tier-migration.d.ts +1 -1
  153. package/dist/tier-routing.d.ts +1 -1
  154. package/dist/topics.d.ts +1 -1
  155. package/dist/transcript.d.ts +1 -1
  156. package/dist/{types-CgcCpUrf.d.ts → types-D96bCB3C.d.ts} +1 -1
  157. package/dist/types.d.ts +1 -1
  158. package/dist/utility-runtime.d.ts +1 -1
  159. package/package.json +1 -1
  160. package/src/namespaces/search.ts +16 -0
  161. package/src/orchestrator.ts +144 -3
  162. package/src/qmd.ts +131 -18
  163. package/src/recall-state.ts +47 -21
  164. package/src/search/port.ts +25 -0
  165. package/dist/chunk-7PCZGNG2.js.map +0 -1
  166. package/dist/chunk-B57QYSWN.js.map +0 -1
  167. package/dist/chunk-FWIROLS6.js.map +0 -1
  168. package/dist/chunk-M3VYPE2H.js.map +0 -1
  169. package/dist/chunk-UNLHHTKN.js.map +0 -1
  170. /package/dist/{chunk-2EVZ5EN6.js.map → chunk-4SYURHI6.js.map} +0 -0
  171. /package/dist/{chunk-7H7J3ZWN.js.map → chunk-5G2DNO54.js.map} +0 -0
  172. /package/dist/{chunk-OYXVENIS.js.map → chunk-7F7LC6HW.js.map} +0 -0
  173. /package/dist/{chunk-256W7AXC.js.map → chunk-BP5O3GYD.js.map} +0 -0
  174. /package/dist/{chunk-RP2U54GG.js.map → chunk-D44FQVCU.js.map} +0 -0
  175. /package/dist/{chunk-R2EBP6CM.js.map → chunk-EMSC4P66.js.map} +0 -0
  176. /package/dist/{chunk-6G5JEN55.js.map → chunk-FZC2WSDB.js.map} +0 -0
  177. /package/dist/{chunk-MO77TWPS.js.map → chunk-RQRKQJYM.js.map} +0 -0
  178. /package/dist/{chunk-5PLUC5OB.js.map → chunk-WSQG37DV.js.map} +0 -0
  179. /package/dist/{chunk-GRYAECRV.js.map → chunk-ZJH723NM.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveEnsureCollectionArgs
3
- } from "./chunk-M3VYPE2H.js";
3
+ } from "./chunk-YNQ6DFSV.js";
4
4
  import {
5
5
  launchProcess
6
6
  } from "./chunk-O75CRYGF.js";
@@ -1421,7 +1421,10 @@ var QmdClient = class _QmdClient {
1421
1421
  const trimmed = query.trim();
1422
1422
  if (!trimmed) return [];
1423
1423
  await this.maybeProbeDaemon();
1424
- if (!this.isAvailable()) return [];
1424
+ if (!this.isAvailable()) {
1425
+ this.notifyDegradation(execution?.onDegradation, "backend_unavailable");
1426
+ return [];
1427
+ }
1425
1428
  const col = collection ?? this.collection;
1426
1429
  const n = maxResults ?? this.maxResults;
1427
1430
  const searchOptions = this.resolveSearchOptions(options);
@@ -1450,22 +1453,40 @@ var QmdClient = class _QmdClient {
1450
1453
  setCachedQmdSearch(cacheKey, results);
1451
1454
  return results;
1452
1455
  }
1453
- log.debug("QMD daemon search timed out/failed; skipping subprocess (daemon-only mode)");
1456
+ log.warn("QMD daemon search timed out/failed; skipping subprocess (daemon-only mode)");
1457
+ this.notifyDegradation(execution?.onDegradation, "daemon_timeout");
1454
1458
  return [];
1455
1459
  }
1456
1460
  if (this.daemonSession?.isLoading()) {
1457
1461
  log.debug("QMD search: daemon loading, skipping subprocess");
1462
+ this.notifyDegradation(execution?.onDegradation, "daemon_loading");
1458
1463
  return [];
1459
1464
  }
1460
- const subprocessResults = await this.searchViaSubprocess(trimmed, col, n, searchOptions, execution?.signal);
1461
- setCachedQmdSearch(cacheKey, subprocessResults);
1465
+ let subprocessDegraded = false;
1466
+ const subprocessResults = await this.searchViaSubprocess(
1467
+ trimmed,
1468
+ col,
1469
+ n,
1470
+ searchOptions,
1471
+ execution?.signal,
1472
+ (degradation) => {
1473
+ subprocessDegraded = true;
1474
+ this.notifyDegradation(execution?.onDegradation, degradation.code, degradation.detail);
1475
+ }
1476
+ );
1477
+ if (!subprocessDegraded) {
1478
+ setCachedQmdSearch(cacheKey, subprocessResults);
1479
+ }
1462
1480
  return subprocessResults;
1463
1481
  }
1464
1482
  async searchGlobal(query, maxResults, execution) {
1465
1483
  const trimmed = query.trim();
1466
1484
  if (!trimmed) return [];
1467
1485
  await this.maybeProbeDaemon();
1468
- if (!this.isAvailable()) return [];
1486
+ if (!this.isAvailable()) {
1487
+ this.notifyDegradation(execution?.onDegradation, "backend_unavailable");
1488
+ return [];
1489
+ }
1469
1490
  const n = maxResults ?? 6;
1470
1491
  const searchOptions = this.resolveSearchOptions();
1471
1492
  if (this.daemonAvailable) {
@@ -1484,14 +1505,22 @@ var QmdClient = class _QmdClient {
1484
1505
  }
1485
1506
  return results;
1486
1507
  }
1487
- log.debug("QMD daemon global search timed out/failed; skipping subprocess (daemon-only mode)");
1508
+ log.warn("QMD daemon global search timed out/failed; skipping subprocess (daemon-only mode)");
1509
+ this.notifyDegradation(execution?.onDegradation, "daemon_timeout");
1488
1510
  return [];
1489
1511
  }
1490
1512
  if (this.daemonSession?.isLoading()) {
1491
1513
  log.debug("QMD searchGlobal: daemon loading, skipping subprocess");
1514
+ this.notifyDegradation(execution?.onDegradation, "daemon_loading");
1492
1515
  return [];
1493
1516
  }
1494
- return this.searchGlobalViaSubprocess(trimmed, n, searchOptions, execution?.signal);
1517
+ return this.searchGlobalViaSubprocess(
1518
+ trimmed,
1519
+ n,
1520
+ searchOptions,
1521
+ execution?.signal,
1522
+ execution?.onDegradation
1523
+ );
1495
1524
  }
1496
1525
  /**
1497
1526
  * BM25 keyword search (fast, ~0.3s). Uses `qmd search`.
@@ -1500,7 +1529,10 @@ var QmdClient = class _QmdClient {
1500
1529
  const trimmed = query.trim();
1501
1530
  if (!trimmed) return [];
1502
1531
  await this.maybeProbeDaemon();
1503
- if (!this.isAvailable()) return [];
1532
+ if (!this.isAvailable()) {
1533
+ this.notifyDegradation(execution?.onDegradation, "backend_unavailable");
1534
+ return [];
1535
+ }
1504
1536
  const col = collection ?? this.collection;
1505
1537
  const n = maxResults ?? this.maxResults;
1506
1538
  if (this.daemonAvailable && this.daemonSession) {
@@ -1519,14 +1551,16 @@ var QmdClient = class _QmdClient {
1519
1551
  }
1520
1552
  return results;
1521
1553
  }
1522
- log.debug("QMD daemon bm25 timed out/failed; skipping subprocess (daemon-only mode)");
1554
+ log.warn("QMD daemon bm25 timed out/failed; skipping subprocess (daemon-only mode)");
1555
+ this.notifyDegradation(execution?.onDegradation, "daemon_timeout");
1523
1556
  return [];
1524
1557
  }
1525
1558
  if (this.daemonSession?.isLoading()) {
1526
1559
  log.debug("QMD bm25: daemon loading, skipping subprocess");
1560
+ this.notifyDegradation(execution?.onDegradation, "daemon_loading");
1527
1561
  return [];
1528
1562
  }
1529
- return this.bm25SearchViaSubprocess(trimmed, col, n, execution?.signal);
1563
+ return this.bm25SearchViaSubprocess(trimmed, col, n, execution?.signal, execution?.onDegradation);
1530
1564
  }
1531
1565
  /**
1532
1566
  * Vector similarity search (~3-4s). Uses `qmd vsearch`.
@@ -1535,7 +1569,10 @@ var QmdClient = class _QmdClient {
1535
1569
  const trimmed = query.trim();
1536
1570
  if (!trimmed) return [];
1537
1571
  await this.maybeProbeDaemon();
1538
- if (!this.isAvailable()) return [];
1572
+ if (!this.isAvailable()) {
1573
+ this.notifyDegradation(execution?.onDegradation, "backend_unavailable");
1574
+ return [];
1575
+ }
1539
1576
  const col = collection ?? this.collection;
1540
1577
  const n = maxResults ?? this.maxResults;
1541
1578
  if (this.daemonAvailable && this.daemonSession) {
@@ -1554,14 +1591,16 @@ var QmdClient = class _QmdClient {
1554
1591
  }
1555
1592
  return results;
1556
1593
  }
1557
- log.debug("QMD daemon vsearch timed out/failed; skipping subprocess (daemon-only mode)");
1594
+ log.warn("QMD daemon vsearch timed out/failed; skipping subprocess (daemon-only mode)");
1595
+ this.notifyDegradation(execution?.onDegradation, "daemon_timeout");
1558
1596
  return [];
1559
1597
  }
1560
1598
  if (this.daemonSession?.isLoading()) {
1561
1599
  log.debug("QMD vsearch: daemon loading, skipping subprocess");
1600
+ this.notifyDegradation(execution?.onDegradation, "daemon_loading");
1562
1601
  return [];
1563
1602
  }
1564
- return this.vsearchViaSubprocess(trimmed, col, n, execution?.signal);
1603
+ return this.vsearchViaSubprocess(trimmed, col, n, execution?.signal, execution?.onDegradation);
1565
1604
  }
1566
1605
  /**
1567
1606
  * Hybrid search: runs BM25 + vector in parallel, merges/dedupes by path
@@ -1721,10 +1760,48 @@ var QmdClient = class _QmdClient {
1721
1760
  return null;
1722
1761
  }
1723
1762
  }
1724
- async searchViaSubprocess(query, collection, maxResults, options, signal) {
1763
+ /**
1764
+ * Report a backend degradation to the caller's observer (#1536): an empty
1765
+ * result caused by unavailability/loading/timeout is otherwise
1766
+ * indistinguishable from "no matches" (CLAUDE.md rule 34). Observer
1767
+ * failures are swallowed — observability must never break search.
1768
+ */
1769
+ notifyDegradation(onDegradation, code, detail) {
1770
+ if (!onDegradation) return;
1771
+ try {
1772
+ onDegradation({ backend: "qmd", code, ...detail !== void 0 ? { detail } : {} });
1773
+ } catch (err) {
1774
+ log.debug(`QMD degradation observer threw: ${err}`);
1775
+ }
1776
+ }
1777
+ /**
1778
+ * Condense an error into a degradation `detail` string that is safe to
1779
+ * serialize on LastRecallSnapshot and expose via last-recall MCP/HTTP
1780
+ * surfaces (cursor review on #1544): first line only, path-like tokens
1781
+ * redacted (absolute, home-rooted, and Windows drive paths can leak
1782
+ * usernames and filesystem layout), capped at 160 chars. The unredacted
1783
+ * error still reaches operators via the warn log at the failure site.
1784
+ */
1785
+ degradationDetail(err, sensitive) {
1786
+ let message = String(err instanceof Error ? err.message : err);
1787
+ for (const value of sensitive ?? []) {
1788
+ if (typeof value !== "string" || value.length === 0) continue;
1789
+ message = message.split(value).join("<query>");
1790
+ for (const fragment of value.split("\n")) {
1791
+ const trimmed = fragment.trim();
1792
+ if (trimmed.length >= 4) {
1793
+ message = message.split(trimmed).join("<query>");
1794
+ }
1795
+ }
1796
+ }
1797
+ const firstLine = message.split("\n")[0] ?? "";
1798
+ const redacted = firstLine.replace(/(?:~|\/|[A-Za-z]:\\)[^\s'"`]+/g, "<path>");
1799
+ return redacted.length > 160 ? `${redacted.slice(0, 159)}\u2026` : redacted;
1800
+ }
1801
+ async searchViaSubprocess(query, collection, maxResults, options, signal, onDegradation) {
1725
1802
  if (this.available === false) return [];
1726
1803
  if (this.qmdSubprocessStrategy === "search") {
1727
- return this.bm25SearchViaSubprocess(query, collection, maxResults, signal);
1804
+ return this.bm25SearchViaSubprocess(query, collection, maxResults, signal, onDegradation);
1728
1805
  }
1729
1806
  const startedAtMs = Date.now();
1730
1807
  try {
@@ -1744,11 +1821,13 @@ var QmdClient = class _QmdClient {
1744
1821
  if (isCallerCancellation(err, signal)) {
1745
1822
  throw isAbortError(err) ? err : abortError("QMD subprocess search aborted");
1746
1823
  }
1747
- log.debug(`QMD search failed: ${err}`);
1824
+ const detail = this.degradationDetail(err, [query]);
1825
+ log.warn(`QMD subprocess search failed (returning empty): ${detail}`);
1826
+ this.notifyDegradation(onDegradation, "subprocess_error", detail);
1748
1827
  return [];
1749
1828
  }
1750
1829
  }
1751
- async bm25SearchViaSubprocess(query, collection, maxResults, signal) {
1830
+ async bm25SearchViaSubprocess(query, collection, maxResults, signal, onDegradation) {
1752
1831
  if (this.available === false) return [];
1753
1832
  const startedAtMs = Date.now();
1754
1833
  try {
@@ -1762,11 +1841,13 @@ var QmdClient = class _QmdClient {
1762
1841
  if (isCallerCancellation(err, signal)) {
1763
1842
  throw isAbortError(err) ? err : abortError("QMD subprocess bm25 aborted");
1764
1843
  }
1765
- log.debug(`QMD bm25 search failed: ${err}`);
1844
+ const detail = this.degradationDetail(err, [query]);
1845
+ log.warn(`QMD bm25 subprocess search failed (returning empty): ${detail}`);
1846
+ this.notifyDegradation(onDegradation, "subprocess_error", detail);
1766
1847
  return [];
1767
1848
  }
1768
1849
  }
1769
- async vsearchViaSubprocess(query, collection, maxResults, signal) {
1850
+ async vsearchViaSubprocess(query, collection, maxResults, signal, onDegradation) {
1770
1851
  if (this.available === false) return [];
1771
1852
  const startedAtMs = Date.now();
1772
1853
  try {
@@ -1781,11 +1862,13 @@ var QmdClient = class _QmdClient {
1781
1862
  if (isCallerCancellation(err, signal)) {
1782
1863
  throw isAbortError(err) ? err : abortError("QMD subprocess vsearch aborted");
1783
1864
  }
1784
- log.debug(`QMD vsearch failed: ${err}`);
1865
+ const detail = this.degradationDetail(err, [query]);
1866
+ log.warn(`QMD vsearch subprocess failed (returning empty): ${detail}`);
1867
+ this.notifyDegradation(onDegradation, "subprocess_error", detail);
1785
1868
  return [];
1786
1869
  }
1787
1870
  }
1788
- async searchGlobalViaSubprocess(query, maxResults, options, signal) {
1871
+ async searchGlobalViaSubprocess(query, maxResults, options, signal, onDegradation) {
1789
1872
  if (this.available === false) return [];
1790
1873
  const startedAtMs = Date.now();
1791
1874
  try {
@@ -1808,7 +1891,9 @@ var QmdClient = class _QmdClient {
1808
1891
  if (isCallerCancellation(err, signal)) {
1809
1892
  throw isAbortError(err) ? err : abortError("QMD subprocess global search aborted");
1810
1893
  }
1811
- log.debug(`QMD global search failed: ${err}`);
1894
+ const detail = this.degradationDetail(err, [query]);
1895
+ log.warn(`QMD global subprocess search failed (returning empty): ${detail}`);
1896
+ this.notifyDegradation(onDegradation, "subprocess_error", detail);
1812
1897
  return [];
1813
1898
  }
1814
1899
  }
@@ -2136,4 +2221,4 @@ export {
2136
2221
  getQmdCommandName,
2137
2222
  QmdClient
2138
2223
  };
2139
- //# sourceMappingURL=chunk-7PCZGNG2.js.map
2224
+ //# sourceMappingURL=chunk-34NSUPWS.js.map