@remnic/core 1.0.3 → 1.1.0

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 (148) hide show
  1. package/dist/abort-error.d.ts +32 -0
  2. package/dist/abort-error.js +11 -0
  3. package/dist/access-cli.js +41 -40
  4. package/dist/access-cli.js.map +1 -1
  5. package/dist/access-http.d.ts +3 -2
  6. package/dist/access-http.js +11 -11
  7. package/dist/access-mcp.d.ts +3 -2
  8. package/dist/access-mcp.js +7 -7
  9. package/dist/access-schema.d.ts +16 -16
  10. package/dist/access-service-HmO1Trrx.d.ts +732 -0
  11. package/dist/access-service.d.ts +11 -658
  12. package/dist/access-service.js +9 -9
  13. package/dist/bootstrap.d.ts +1 -1
  14. package/dist/briefing.js +6 -6
  15. package/dist/calibration.js +3 -3
  16. package/dist/causal-consolidation.js +10 -10
  17. package/dist/{chunk-PMB3WGDL.js → chunk-37UIFYWO.js} +64 -3
  18. package/dist/chunk-37UIFYWO.js.map +1 -0
  19. package/dist/{chunk-X4WESCKA.js → chunk-3QHL5ABG.js} +5 -5
  20. package/dist/{chunk-2VFW5K5U.js → chunk-3SV6CQHO.js} +10 -8
  21. package/dist/chunk-3SV6CQHO.js.map +1 -0
  22. package/dist/{chunk-U2IQTSBY.js → chunk-3WHVNEN7.js} +1 -1
  23. package/dist/chunk-3WHVNEN7.js.map +1 -0
  24. package/dist/{chunk-QKAH5B6E.js → chunk-44ICJRF3.js} +97 -9
  25. package/dist/chunk-44ICJRF3.js.map +1 -0
  26. package/dist/{chunk-S4LX5EBI.js → chunk-47UU5PU2.js} +48 -9
  27. package/dist/chunk-47UU5PU2.js.map +1 -0
  28. package/dist/{chunk-ECKDIK5F.js → chunk-4LACOVZX.js} +2 -2
  29. package/dist/{chunk-AYPYCLR7.js → chunk-6LX5ORAS.js} +2 -2
  30. package/dist/{chunk-GJQPH5G3.js → chunk-6UJ47TVX.js} +2 -2
  31. package/dist/{chunk-KWP7T3DP.js → chunk-7ECD5ATE.js} +2 -2
  32. package/dist/{chunk-74JR4N5J.js → chunk-7WQ6SLIE.js} +2 -2
  33. package/dist/{chunk-7PA4OZEU.js → chunk-BLKTA7MM.js} +6 -14
  34. package/dist/chunk-BLKTA7MM.js.map +1 -0
  35. package/dist/{chunk-XMGSSBFX.js → chunk-DEPL3635.js} +172 -100
  36. package/dist/chunk-DEPL3635.js.map +1 -0
  37. package/dist/{chunk-JROGC36Y.js → chunk-DHHP2Z4X.js} +2 -2
  38. package/dist/{chunk-BKQJBXXX.js → chunk-GGD5W7TB.js} +2 -2
  39. package/dist/chunk-GGD5W7TB.js.map +1 -0
  40. package/dist/{chunk-POMSFKTB.js → chunk-GV6NLQ4X.js} +14 -14
  41. package/dist/{chunk-AAI7JARD.js → chunk-HMDCOMYU.js} +8 -11
  42. package/dist/chunk-HMDCOMYU.js.map +1 -0
  43. package/dist/{chunk-POBPGDWI.js → chunk-ITRLGI2T.js} +2 -2
  44. package/dist/{chunk-MYQWXITD.js → chunk-JIU55F3X.js} +2 -2
  45. package/dist/{chunk-UPMD5XND.js → chunk-JL2PU6AI.js} +16 -5
  46. package/dist/chunk-JL2PU6AI.js.map +1 -0
  47. package/dist/{chunk-OJFGVJS6.js → chunk-MBJHSA7F.js} +65 -9
  48. package/dist/chunk-MBJHSA7F.js.map +1 -0
  49. package/dist/{chunk-V7XCAHIB.js → chunk-MVTHXUBX.js} +46 -23
  50. package/dist/chunk-MVTHXUBX.js.map +1 -0
  51. package/dist/{chunk-BTY5RRRF.js → chunk-N42IWANG.js} +5 -5
  52. package/dist/{chunk-NSB3WSYS.js → chunk-NQEVYWX6.js} +74 -3
  53. package/dist/chunk-NQEVYWX6.js.map +1 -0
  54. package/dist/chunk-OIT5QGG4.js +80 -0
  55. package/dist/chunk-OIT5QGG4.js.map +1 -0
  56. package/dist/chunk-PVGDJXVK.js +21 -0
  57. package/dist/chunk-PVGDJXVK.js.map +1 -0
  58. package/dist/{chunk-RCICHSHL.js → chunk-SYUK3VLY.js} +2 -2
  59. package/dist/{chunk-YFYL2SIJ.js → chunk-WBSAYXVI.js} +127 -39
  60. package/dist/chunk-WBSAYXVI.js.map +1 -0
  61. package/dist/{chunk-KEG4GNGI.js → chunk-XZ2TIKGC.js} +38 -8
  62. package/dist/chunk-XZ2TIKGC.js.map +1 -0
  63. package/dist/chunk-Y4FHOFJ2.js +140 -0
  64. package/dist/chunk-Y4FHOFJ2.js.map +1 -0
  65. package/dist/chunk-YNB73F22.js +137 -0
  66. package/dist/chunk-YNB73F22.js.map +1 -0
  67. package/dist/{chunk-HITJFT7E.js → chunk-ZVBB3T7V.js} +10 -5
  68. package/dist/chunk-ZVBB3T7V.js.map +1 -0
  69. package/dist/{cli-DwIBnp2g.d.ts → cli-BneVIEvh.d.ts} +2 -2
  70. package/dist/cli.d.ts +4 -3
  71. package/dist/cli.js +25 -24
  72. package/dist/config.js +1 -1
  73. package/dist/contradiction-review-WIUBAR52.js +21 -0
  74. package/dist/contradiction-review-WIUBAR52.js.map +1 -0
  75. package/dist/contradiction-scan-GR33PONM.js +376 -0
  76. package/dist/contradiction-scan-GR33PONM.js.map +1 -0
  77. package/dist/direct-answer-wiring.d.ts +77 -0
  78. package/dist/direct-answer-wiring.js +75 -0
  79. package/dist/direct-answer-wiring.js.map +1 -0
  80. package/dist/direct-answer.d.ts +106 -0
  81. package/dist/direct-answer.js +10 -0
  82. package/dist/direct-answer.js.map +1 -0
  83. package/dist/{engine-X7X3AAG3.js → engine-5TIQBYZR.js} +7 -7
  84. package/dist/engine-5TIQBYZR.js.map +1 -0
  85. package/dist/entity-retrieval.js +6 -6
  86. package/dist/explicit-capture.d.ts +1 -1
  87. package/dist/extraction.js +6 -6
  88. package/dist/fallback-llm.d.ts +11 -2
  89. package/dist/fallback-llm.js +3 -3
  90. package/dist/harmonic-retrieval.js +2 -1
  91. package/dist/index.d.ts +10 -124
  92. package/dist/index.js +74 -137
  93. package/dist/index.js.map +1 -1
  94. package/dist/intent.js +1 -1
  95. package/dist/local-llm.d.ts +10 -3
  96. package/dist/local-llm.js +1 -1
  97. package/dist/operator-toolkit.js +12 -11
  98. package/dist/{orchestrator-B9kwlCep.d.ts → orchestrator-DRYA6_lW.d.ts} +21 -2
  99. package/dist/orchestrator.d.ts +1 -1
  100. package/dist/orchestrator.js +36 -35
  101. package/dist/qmd.js +2 -1
  102. package/dist/recall-state.d.ts +28 -1
  103. package/dist/recall-state.js +1 -1
  104. package/dist/resolution-QBTDHTG7.js +100 -0
  105. package/dist/resolution-QBTDHTG7.js.map +1 -0
  106. package/dist/resolve-provider-secret.d.ts +24 -1
  107. package/dist/resolve-provider-secret.js +3 -1
  108. package/dist/resume-bundles.js +3 -3
  109. package/dist/schemas.d.ts +14 -14
  110. package/dist/semantic-consolidation.js +6 -6
  111. package/dist/semantic-rule-promotion.js +6 -6
  112. package/dist/semantic-rule-verifier.js +6 -6
  113. package/dist/storage.js +5 -5
  114. package/dist/summarizer.js +5 -5
  115. package/dist/types-DJhqDJUV.d.ts +50 -0
  116. package/dist/types.d.ts +34 -2
  117. package/dist/types.js +1 -1
  118. package/dist/verified-recall.js +6 -6
  119. package/package.json +1 -1
  120. package/dist/chunk-2VFW5K5U.js.map +0 -1
  121. package/dist/chunk-7PA4OZEU.js.map +0 -1
  122. package/dist/chunk-AAI7JARD.js.map +0 -1
  123. package/dist/chunk-BKQJBXXX.js.map +0 -1
  124. package/dist/chunk-HITJFT7E.js.map +0 -1
  125. package/dist/chunk-KEG4GNGI.js.map +0 -1
  126. package/dist/chunk-NSB3WSYS.js.map +0 -1
  127. package/dist/chunk-OJFGVJS6.js.map +0 -1
  128. package/dist/chunk-PMB3WGDL.js.map +0 -1
  129. package/dist/chunk-QKAH5B6E.js.map +0 -1
  130. package/dist/chunk-S4LX5EBI.js.map +0 -1
  131. package/dist/chunk-U2IQTSBY.js.map +0 -1
  132. package/dist/chunk-UPMD5XND.js.map +0 -1
  133. package/dist/chunk-V7XCAHIB.js.map +0 -1
  134. package/dist/chunk-XMGSSBFX.js.map +0 -1
  135. package/dist/chunk-YFYL2SIJ.js.map +0 -1
  136. /package/dist/{engine-X7X3AAG3.js.map → abort-error.js.map} +0 -0
  137. /package/dist/{chunk-X4WESCKA.js.map → chunk-3QHL5ABG.js.map} +0 -0
  138. /package/dist/{chunk-ECKDIK5F.js.map → chunk-4LACOVZX.js.map} +0 -0
  139. /package/dist/{chunk-AYPYCLR7.js.map → chunk-6LX5ORAS.js.map} +0 -0
  140. /package/dist/{chunk-GJQPH5G3.js.map → chunk-6UJ47TVX.js.map} +0 -0
  141. /package/dist/{chunk-KWP7T3DP.js.map → chunk-7ECD5ATE.js.map} +0 -0
  142. /package/dist/{chunk-74JR4N5J.js.map → chunk-7WQ6SLIE.js.map} +0 -0
  143. /package/dist/{chunk-JROGC36Y.js.map → chunk-DHHP2Z4X.js.map} +0 -0
  144. /package/dist/{chunk-POMSFKTB.js.map → chunk-GV6NLQ4X.js.map} +0 -0
  145. /package/dist/{chunk-POBPGDWI.js.map → chunk-ITRLGI2T.js.map} +0 -0
  146. /package/dist/{chunk-MYQWXITD.js.map → chunk-JIU55F3X.js.map} +0 -0
  147. /package/dist/{chunk-BTY5RRRF.js.map → chunk-N42IWANG.js.map} +0 -0
  148. /package/dist/{chunk-RCICHSHL.js.map → chunk-SYUK3VLY.js.map} +0 -0
@@ -0,0 +1,106 @@
1
+ import { MemoryFile } from './types.js';
2
+ import { TrustZoneName } from './trust-zones.js';
3
+
4
+ /**
5
+ * Direct-answer retrieval tier eligibility (issue #518 slice 2).
6
+ *
7
+ * This module is a pure decision layer. It takes a query, a set of
8
+ * caller-resolved candidates (each already decorated with trust-zone,
9
+ * taxonomy-bucket, and importance information), and the direct-answer
10
+ * config, then returns an eligibility verdict.
11
+ *
12
+ * Keeping the module pure means:
13
+ *
14
+ * - Tests do not need a trust-zones store, taxonomy resolver, or importance
15
+ * scorer on disk.
16
+ * - Slice 3 (retrieval.ts wiring) is responsible for resolving those signals
17
+ * before calling in; the wiring layer decides where candidates come from
18
+ * (entity index, token prefilter, etc.). This module only decides
19
+ * whether the surfaced candidates add up to a confident direct answer.
20
+ *
21
+ * Not wired into retrieval yet — see slice 3.
22
+ */
23
+
24
+ /**
25
+ * Caller-supplied candidate.
26
+ *
27
+ * `trustZone`, `taxonomyBucket`, and `importanceScore` are resolved outside
28
+ * this module because each comes from a different subsystem. Passing them
29
+ * as inputs keeps the function deterministic and easy to unit-test.
30
+ *
31
+ * `matchScore` is optional; if omitted, candidates are ranked by
32
+ * token-overlap ratio. Callers that already computed a better ranking
33
+ * score (e.g. BM25, vector similarity) can supply it to drive the
34
+ * ambiguity check.
35
+ */
36
+ interface DirectAnswerCandidate {
37
+ memory: MemoryFile;
38
+ trustZone: TrustZoneName | null;
39
+ taxonomyBucket: string | null;
40
+ importanceScore: number;
41
+ matchScore?: number;
42
+ }
43
+ interface DirectAnswerConfig {
44
+ enabled: boolean;
45
+ tokenOverlapFloor: number;
46
+ importanceFloor: number;
47
+ ambiguityMargin: number;
48
+ eligibleTaxonomyBuckets: string[];
49
+ }
50
+ interface DirectAnswerInput {
51
+ query: string;
52
+ candidates: DirectAnswerCandidate[];
53
+ config: DirectAnswerConfig;
54
+ /**
55
+ * Optional entity-ref hints resolved from the query upstream. When
56
+ * supplied, a candidate with a set `entityRef` must match one of these
57
+ * (case-insensitive) to remain eligible. Candidates without an
58
+ * `entityRef` are allowed through regardless.
59
+ */
60
+ queryEntityRefs?: string[];
61
+ }
62
+ type DirectAnswerReason = "disabled" | "empty-query" | "no-candidates" | "no-eligible-candidates" | "below-token-overlap-floor" | "ambiguous" | "eligible";
63
+ interface DirectAnswerResult {
64
+ eligible: boolean;
65
+ reason: DirectAnswerReason;
66
+ /** Winning candidate when eligible. */
67
+ winner?: DirectAnswerCandidate;
68
+ /** Computed token-overlap ratio (0..1) of the winner. */
69
+ tokenOverlap?: number;
70
+ /**
71
+ * Human-readable summary suitable for
72
+ * `RecallTierExplain.tierReason`.
73
+ */
74
+ narrative: string;
75
+ /**
76
+ * Filter labels that eliminated at least one candidate along the way.
77
+ * Populated regardless of eligibility so the caller can surface the
78
+ * narrowing steps in `RecallTierExplain.filteredBy`.
79
+ */
80
+ filteredBy: string[];
81
+ }
82
+ /** Filter labels — exported so callers and tests can match them structurally. */
83
+ declare const FILTER_LABELS: {
84
+ readonly nonActiveStatus: "non-active-status";
85
+ readonly notTrustedZone: "not-trusted-zone";
86
+ readonly ineligibleTaxonomyBucket: "ineligible-taxonomy-bucket";
87
+ readonly belowImportanceFloor: "below-importance-floor";
88
+ readonly entityRefMismatch: "entity-ref-mismatch";
89
+ readonly belowTokenOverlapFloor: "below-token-overlap-floor";
90
+ };
91
+ /**
92
+ * Determine whether a query can be served by the direct-answer tier.
93
+ *
94
+ * Decision ladder, in order:
95
+ *
96
+ * 1. config.enabled === false → "disabled"
97
+ * 2. empty query tokens → "empty-query"
98
+ * 3. empty candidates → "no-candidates"
99
+ * 4. hard filters drop all candidates → "no-eligible-candidates"
100
+ * 5. token-overlap floor drops all → "below-token-overlap-floor"
101
+ * 6. top two candidates within ambiguityMargin → "ambiguous"
102
+ * 7. otherwise → "eligible"
103
+ */
104
+ declare function isDirectAnswerEligible(input: DirectAnswerInput): DirectAnswerResult;
105
+
106
+ export { type DirectAnswerCandidate, type DirectAnswerConfig, type DirectAnswerInput, type DirectAnswerReason, type DirectAnswerResult, FILTER_LABELS, isDirectAnswerEligible };
@@ -0,0 +1,10 @@
1
+ import {
2
+ FILTER_LABELS,
3
+ isDirectAnswerEligible
4
+ } from "./chunk-Y4FHOFJ2.js";
5
+ import "./chunk-DT5TVLJE.js";
6
+ export {
7
+ FILTER_LABELS,
8
+ isDirectAnswerEligible
9
+ };
10
+ //# sourceMappingURL=direct-answer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  CompoundingEngine,
3
3
  defaultTierMigrationCycleBudget
4
- } from "./chunk-JROGC36Y.js";
5
- import "./chunk-POMSFKTB.js";
6
- import "./chunk-U2IQTSBY.js";
4
+ } from "./chunk-DHHP2Z4X.js";
5
+ import "./chunk-GV6NLQ4X.js";
6
+ import "./chunk-3WHVNEN7.js";
7
7
  import "./chunk-4KAN3GZ3.js";
8
8
  import "./chunk-6ZH4TU6I.js";
9
- import "./chunk-6PFRXT4K.js";
10
- import "./chunk-TP4FZJIZ.js";
11
9
  import "./chunk-SCU65EZI.js";
12
10
  import "./chunk-BOUYNNYD.js";
13
- import "./chunk-QSVPYQPG.js";
11
+ import "./chunk-6PFRXT4K.js";
12
+ import "./chunk-TP4FZJIZ.js";
14
13
  import "./chunk-DM2T26WE.js";
14
+ import "./chunk-QSVPYQPG.js";
15
15
  import "./chunk-M62O4P4T.js";
16
16
  import "./chunk-4DJQYKMN.js";
17
17
  import "./chunk-2ODBA7MQ.js";
@@ -19,4 +19,4 @@ export {
19
19
  CompoundingEngine,
20
20
  defaultTierMigrationCycleBudget
21
21
  };
22
- //# sourceMappingURL=engine-X7X3AAG3.js.map
22
+ //# sourceMappingURL=engine-5TIQBYZR.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -3,18 +3,18 @@ import {
3
3
  entityIndexVersion,
4
4
  entityRecentTranscriptLookbackHours,
5
5
  readRecentEntityTranscriptEntries
6
- } from "./chunk-74JR4N5J.js";
6
+ } from "./chunk-7WQ6SLIE.js";
7
7
  import "./chunk-7SEAZFFB.js";
8
- import "./chunk-POMSFKTB.js";
9
- import "./chunk-U2IQTSBY.js";
8
+ import "./chunk-GV6NLQ4X.js";
9
+ import "./chunk-3WHVNEN7.js";
10
10
  import "./chunk-4KAN3GZ3.js";
11
11
  import "./chunk-6ZH4TU6I.js";
12
- import "./chunk-6PFRXT4K.js";
13
- import "./chunk-TP4FZJIZ.js";
14
12
  import "./chunk-SCU65EZI.js";
15
13
  import "./chunk-BOUYNNYD.js";
16
- import "./chunk-QSVPYQPG.js";
14
+ import "./chunk-6PFRXT4K.js";
15
+ import "./chunk-TP4FZJIZ.js";
17
16
  import "./chunk-DM2T26WE.js";
17
+ import "./chunk-QSVPYQPG.js";
18
18
  import "./chunk-M62O4P4T.js";
19
19
  import "./chunk-4DJQYKMN.js";
20
20
  import "./chunk-2ODBA7MQ.js";
@@ -1,4 +1,4 @@
1
- import { O as Orchestrator } from './orchestrator-B9kwlCep.js';
1
+ import { O as Orchestrator } from './orchestrator-DRYA6_lW.js';
2
2
  import { MemoryCategory, PluginConfig } from './types.js';
3
3
  import './buffer.js';
4
4
  import './storage.js';
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  ExtractionEngine
3
- } from "./chunk-2VFW5K5U.js";
3
+ } from "./chunk-3SV6CQHO.js";
4
4
  import "./chunk-UEYA6UC7.js";
5
5
  import "./chunk-NBNN5GOB.js";
6
- import "./chunk-UPMD5XND.js";
7
6
  import "./chunk-FEMOX5AD.js";
7
+ import "./chunk-JL2PU6AI.js";
8
+ import "./chunk-GZCUW5IC.js";
8
9
  import "./chunk-VEWZZM3H.js";
9
10
  import "./chunk-LK6SGL53.js";
10
- import "./chunk-GZCUW5IC.js";
11
11
  import "./chunk-EJI5XIBB.js";
12
- import "./chunk-QKAH5B6E.js";
13
- import "./chunk-KEG4GNGI.js";
14
- import "./chunk-ODWDQNRE.js";
12
+ import "./chunk-44ICJRF3.js";
13
+ import "./chunk-XZ2TIKGC.js";
15
14
  import "./chunk-Y27UJK6V.js";
15
+ import "./chunk-ODWDQNRE.js";
16
16
  import "./chunk-UZB5KHKX.js";
17
17
  import "./chunk-MARWOCVP.js";
18
18
  import "./chunk-EEQLFRUM.js";
@@ -16,6 +16,10 @@ interface FallbackLlmResponse {
16
16
  totalTokens?: number;
17
17
  };
18
18
  }
19
+ interface FallbackLlmRuntimeContext {
20
+ agentDir?: string;
21
+ workspaceDir?: string;
22
+ }
19
23
  /**
20
24
  * Generic fallback LLM client that uses the gateway's default AI configuration
21
25
  * and walks through the full fallback chain (primary + fallbacks).
@@ -23,7 +27,8 @@ interface FallbackLlmResponse {
23
27
  */
24
28
  declare class FallbackLlmClient {
25
29
  private gatewayConfig;
26
- constructor(gatewayConfig?: GatewayConfig);
30
+ private runtimeContext;
31
+ constructor(gatewayConfig?: GatewayConfig, runtimeContext?: FallbackLlmRuntimeContext);
27
32
  /**
28
33
  * Check if fallback is available (gateway config has at least one model).
29
34
  */
@@ -105,10 +110,14 @@ declare class FallbackLlmClient {
105
110
  * Call OpenAI-compatible API.
106
111
  */
107
112
  private callOpenAI;
113
+ /**
114
+ * Call an OpenAI-compatible Responses API.
115
+ */
116
+ private callOpenAIResponses;
108
117
  /**
109
118
  * Call Anthropic Messages API.
110
119
  */
111
120
  private callAnthropic;
112
121
  }
113
122
 
114
- export { FallbackLlmClient, type FallbackLlmOptions, type FallbackLlmResponse };
123
+ export { FallbackLlmClient, type FallbackLlmOptions, type FallbackLlmResponse, type FallbackLlmRuntimeContext };
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  FallbackLlmClient
3
- } from "./chunk-QKAH5B6E.js";
4
- import "./chunk-KEG4GNGI.js";
5
- import "./chunk-ODWDQNRE.js";
3
+ } from "./chunk-44ICJRF3.js";
4
+ import "./chunk-XZ2TIKGC.js";
6
5
  import "./chunk-Y27UJK6V.js";
6
+ import "./chunk-ODWDQNRE.js";
7
7
  import "./chunk-UZB5KHKX.js";
8
8
  import "./chunk-MARWOCVP.js";
9
9
  import "./chunk-2ODBA7MQ.js";
@@ -1,7 +1,8 @@
1
1
  import {
2
2
  searchHarmonicRetrieval
3
- } from "./chunk-AAI7JARD.js";
3
+ } from "./chunk-HMDCOMYU.js";
4
4
  import "./chunk-C6QPK5GG.js";
5
+ import "./chunk-PVGDJXVK.js";
5
6
  import "./chunk-NGAVDO7E.js";
6
7
  import "./chunk-DT5TVLJE.js";
7
8
  import "./chunk-DGXUHMOV.js";
package/dist/index.d.ts CHANGED
@@ -1,19 +1,20 @@
1
1
  export { LEGACY_PLUGIN_ID, PLUGIN_ID, resolveRemnicPluginEntry } from './plugin-id.js';
2
2
  export { parseConfig } from './config.js';
3
- import { f as BulkImportSourceAdapter } from './orchestrator-B9kwlCep.js';
4
- export { g as BulkImportError, c as BulkImportOptions, d as BulkImportResult, B as BulkImportSource, h as ImportSourceRole, b as ImportTurn, i as ImportTurnValidationIssue, O as Orchestrator, j as defaultWorkspaceDir, k as isImportRole, p as parseIsoTimestamp, s as sanitizeSessionKeyForFilename, v as validateImportTurn } from './orchestrator-B9kwlCep.js';
3
+ import { f as BulkImportSourceAdapter } from './orchestrator-DRYA6_lW.js';
4
+ export { g as BulkImportError, c as BulkImportOptions, d as BulkImportResult, B as BulkImportSource, h as ImportSourceRole, b as ImportTurn, i as ImportTurnValidationIssue, O as Orchestrator, j as defaultWorkspaceDir, k as isImportRole, p as parseIsoTimestamp, s as sanitizeSessionKeyForFilename, v as validateImportTurn } from './orchestrator-DRYA6_lW.js';
5
5
  import { StorageManager } from './storage.js';
6
6
  export { ExtractionEngine } from './extraction.js';
7
7
  export { JudgeBatchResult, JudgeCandidate, JudgeVerdict, clearVerdictCache, createVerdictCache, judgeFactDurability, verdictCacheSize } from './extraction-judge.js';
8
8
  export { hasBroadGraphIntent, inferIntentFromText, intentCompatibilityScore, isTaskInitiationIntent, planRecallMode } from './intent.js';
9
9
  import { PluginConfig, MemoryFile, MemoryCategory, ImportanceLevel } from './types.js';
10
- export { BriefingActiveThread, BriefingConfig, BriefingFocus, BriefingFollowup, BriefingOpenCommitment, BriefingRecentEntity, BriefingResult, BriefingSections, BriefingWindow, CalendarEvent, CalendarSource, CodexCompatConfig, ContinuityImprovementLoop, MemoryActionEligibilityContext, MemoryActionEligibilitySource, MemoryActionType } from './types.js';
10
+ export { BriefingActiveThread, BriefingConfig, BriefingFocus, BriefingFollowup, BriefingOpenCommitment, BriefingRecentEntity, BriefingResult, BriefingSections, BriefingWindow, CalendarEvent, CalendarSource, CodexCompatConfig, ContinuityImprovementLoop, GatewayConfig, MemoryActionEligibilityContext, MemoryActionEligibilitySource, MemoryActionType } from './types.js';
11
+ export { FILTER_LABELS as DIRECT_ANSWER_FILTER_LABELS, DirectAnswerCandidate, DirectAnswerConfig, DirectAnswerInput, DirectAnswerReason, DirectAnswerResult, isDirectAnswerEligible } from './direct-answer.js';
11
12
  export { CITATION_UNKNOWN, CitationContext, DEFAULT_CITATION_FORMAT, ParsedCitation, attachCitation, deriveSessionId, formatCitation, hasCitation, parseAllCitations, parseCitation, stripCitation } from './source-attribution.js';
12
13
  export { QmdClient } from './qmd.js';
13
14
  import { S as SearchBackend, a as SearchQueryOptions, b as SearchExecutionOptions, c as SearchResult } from './port-C1GZFv8h.js';
14
15
  export { buildEntityRecallSection } from './entity-retrieval.js';
15
16
  export { TrustZoneName, TrustZoneRecord, TrustZoneRecordKind, TrustZoneSourceClass, isTrustZoneName } from './trust-zones.js';
16
- export { EngramAccessInputError, EngramAccessService } from './access-service.js';
17
+ export { a as EngramAccessInputError, E as EngramAccessService, S as SemanticDedupDecision, b as SemanticDedupHit, c as SemanticDedupLookup, d as SemanticDedupOptions, e as decideSemanticDedup } from './access-service-HmO1Trrx.js';
17
18
  export { EngramAccessHttpServer } from './access-http.js';
18
19
  export { EngramMcpServer } from './access-mcp.js';
19
20
  export { MemoryStoreRequest, ObserveRequest, RecallRequest, SchemaName, SchemaValidationError, SuggestionSubmitRequest, formatZodError, memoryStoreRequestSchema, observeRequestSchema, recallRequestSchema, suggestionSubmitRequestSchema, validateRequest } from './access-schema.js';
@@ -31,7 +32,10 @@ export { E as ExtensionSchema, R as REMNIC_EXTENSIONS_TOTAL_TOKEN_LIMIT, b as bu
31
32
  export { TokenEntry, TokenStore, generateToken, getAllValidTokens, getAllValidTokensCached, listTokens, loadTokenStore, resolveConnectorFromToken, revokeToken, saveTokenStore } from './tokens.js';
32
33
  import { R as RolloutSummaryInput, M as MaterializeResult } from './codex-materialize-CQlLTzke.js';
33
34
  export { a as MATERIALIZE_VERSION, b as MaterializeOptions, S as SENTINEL_FILE, d as describeMemoriesDir, e as ensureSentinel, m as materializeForNamespace } from './codex-materialize-CQlLTzke.js';
34
- export { B as BulkImportCliCommandOptions, P as ProcessBatchFn, a as ProcessBatchResult, f as formatBatchTranscript, p as parseStrictCliDate, r as runBulkImportCliCommand, b as runBulkImportPipeline } from './cli-DwIBnp2g.js';
35
+ import { T as Taxonomy, R as ResolverDecision } from './types-DJhqDJUV.js';
36
+ export { a as TaxonomyCategory } from './types-DJhqDJUV.js';
37
+ export { B as BulkImportCliCommandOptions, P as ProcessBatchFn, a as ProcessBatchResult, f as formatBatchTranscript, p as parseStrictCliDate, r as runBulkImportCliCommand, b as runBulkImportPipeline } from './cli-BneVIEvh.js';
38
+ export { FallbackLlmClient, FallbackLlmOptions, FallbackLlmResponse, FallbackLlmRuntimeContext } from './fallback-llm.js';
35
39
  import './buffer.js';
36
40
  import './memory-projection-store-DeSXPh1j.js';
37
41
  import 'better-sqlite3';
@@ -49,7 +53,6 @@ import 'zod';
49
53
  import './policy-runtime.js';
50
54
  import './profiling.js';
51
55
  import './schemas.js';
52
- import './fallback-llm.js';
53
56
  import './explicit-capture.js';
54
57
  import 'node:http';
55
58
  import 'node:stream';
@@ -807,74 +810,6 @@ interface ContradictionPair {
807
810
  declare function findDuplicates(options: DedupOptions): DedupResult;
808
811
  declare function findContradictions(options: ContradictionOptions): ContradictionResult;
809
812
 
810
- /**
811
- * @remnic/core — Write-time semantic dedup guard
812
- *
813
- * Complements the exact content-hash check in the orchestrator's write path
814
- * by detecting near-duplicate candidate facts via embedding cosine similarity.
815
- *
816
- * The module intentionally has no dependency on the EmbeddingFallback or QMD
817
- * classes directly — callers pass in a `lookup` function that returns the
818
- * top-K nearest neighbors with their cosine scores. This keeps the decision
819
- * logic pure and trivially testable with synthetic fixtures, and lets the
820
- * orchestrator reuse whichever backend it already has wired up.
821
- *
822
- * Related issue: joshuaswarren/remnic#373
823
- */
824
- /** A single nearest-neighbor hit from the embedding backend. */
825
- interface SemanticDedupHit {
826
- /** Memory id of the existing neighbor. */
827
- id: string;
828
- /** Cosine similarity score in [0, 1]. */
829
- score: number;
830
- /** Optional source path, purely informational. */
831
- path?: string;
832
- }
833
- /**
834
- * Lookup function passed by the caller. Must return an array of hits sorted
835
- * descending by score. Implementations should return an empty array (never
836
- * throw) when the embedding backend is unavailable — the decision function
837
- * treats that as "no near duplicate" (fail-open).
838
- */
839
- type SemanticDedupLookup = (content: string, limit: number) => Promise<SemanticDedupHit[]>;
840
- interface SemanticDedupOptions {
841
- /** Master switch. When false, `decideSemanticDedup` always returns `keep`. */
842
- enabled: boolean;
843
- /** Cosine similarity threshold (0-1). ≥ threshold ⇒ treat as duplicate. */
844
- threshold: number;
845
- /** How many nearest neighbors to compare against. */
846
- candidates: number;
847
- }
848
- type SemanticDedupDecision = {
849
- action: "keep";
850
- reason: "disabled" | "backend_unavailable" | "no_candidates" | "no_near_duplicate";
851
- topScore?: number;
852
- topId?: string;
853
- } | {
854
- action: "skip";
855
- reason: "near_duplicate";
856
- topScore: number;
857
- topId: string;
858
- topPath?: string;
859
- };
860
- /**
861
- * Pure decision function: given a lookup callback and options, decide whether
862
- * the candidate content should be written or skipped as a near-duplicate.
863
- *
864
- * Contract:
865
- * - When `options.enabled` is false → always keep, reason="disabled".
866
- * - When the lookup throws (provider down / network error) → keep,
867
- * reason="backend_unavailable". Fail-open: a lookup failure must not block
868
- * writes.
869
- * - When the lookup succeeds but returns 0 hits (empty index or no
870
- * neighbors above the score floor) → keep, reason="no_candidates".
871
- * This is distinct from backend_unavailable so telemetry dashboards can
872
- * correctly distinguish "provider is down" from "index is empty".
873
- * - When the top hit's score ≥ threshold → skip with reason="near_duplicate".
874
- * - Otherwise → keep with reason="no_near_duplicate".
875
- */
876
- declare function decideSemanticDedup(content: string, lookup: SemanticDedupLookup, options: SemanticDedupOptions): Promise<SemanticDedupDecision>;
877
-
878
813
  /**
879
814
  * @remnic/core — Review Inbox
880
815
  *
@@ -1687,55 +1622,6 @@ declare function publisherFor(hostId: string): MemoryExtensionPublisher | undefi
1687
1622
  */
1688
1623
  declare function publisherForConnector(connectorId: string): MemoryExtensionPublisher | undefined;
1689
1624
 
1690
- /**
1691
- * Taxonomy types for the MECE knowledge directory.
1692
- *
1693
- * A taxonomy defines a set of categories that partition the knowledge
1694
- * space so that every memory maps to exactly one category (Mutually
1695
- * Exclusive, Collectively Exhaustive).
1696
- */
1697
- /**
1698
- * A single category in the taxonomy.
1699
- *
1700
- * @property id - Slug: lowercase letters, digits, hyphens; max 32 chars.
1701
- * @property name - Human-readable display name.
1702
- * @property description - What belongs in this category.
1703
- * @property filingRules - Prose rules used by the resolver decision tree.
1704
- * @property parentId - Optional parent category for nesting.
1705
- * @property priority - Tie-breaker: lower number wins when a memory
1706
- * could belong to multiple categories.
1707
- * @property memoryCategories - Which MemoryCategory values map here.
1708
- */
1709
- interface TaxonomyCategory {
1710
- id: string;
1711
- name: string;
1712
- description: string;
1713
- filingRules: string[];
1714
- parentId?: string;
1715
- priority: number;
1716
- memoryCategories: string[];
1717
- }
1718
- /**
1719
- * A versioned taxonomy comprising an ordered list of categories.
1720
- */
1721
- interface Taxonomy {
1722
- version: number;
1723
- categories: TaxonomyCategory[];
1724
- }
1725
- /**
1726
- * The output of the resolver: which category a piece of knowledge
1727
- * belongs to, with confidence and alternatives.
1728
- */
1729
- interface ResolverDecision {
1730
- categoryId: string;
1731
- confidence: number;
1732
- reason: string;
1733
- alternatives: Array<{
1734
- categoryId: string;
1735
- reason: string;
1736
- }>;
1737
- }
1738
-
1739
1625
  /**
1740
1626
  * Default MECE taxonomy that maps every existing MemoryCategory value
1741
1627
  * to exactly one taxonomy category, ordered by priority.
@@ -2052,4 +1938,4 @@ declare function clearTrainingExportAdapters(): void;
2052
1938
  */
2053
1939
  declare function convertMemoriesToRecords(options: TrainingExportOptions): Promise<TrainingExportRecord[]>;
2054
1940
 
2055
- export { type AuditEntry, type BinaryAssetRecord, type BinaryAssetStatus, type BinaryLifecycleConfig, type BinaryLifecycleManifest, type BinaryStorageBackend, type BinaryStorageBackendConfig, BulkImportSourceAdapter, ClaudeCodeMemoryExtensionPublisher, CodexMemoryExtensionPublisher, type ConflictEntry, type ConnectorCapability, type ConnectorInstance, type ConnectorManifest, type ConnectorRegistry, type ContradictionOptions, type ContradictionPair, type ContradictionResult$1 as CurateContradictionResult, type DuplicateResult as CurateDuplicateResult, type CurateOptions, type CurateResult, type CuratedStatement, DEFAULT_GRACE_PERIOD_DAYS, DEFAULT_MAX_BINARY_SIZE_BYTES, DEFAULT_SCAN_PATTERNS, DEFAULT_TAXONOMY, type DedupOptions, type DedupResult, DiscoveredExtension, type DocFile, type DoctorCheck, type DoctorResult, type DuplicatePair, type EnrichmentAuditEntry, type EnrichmentCandidate, type EnrichmentCostTier, type EnrichmentPipelineConfig, type EnrichmentProvider, type EnrichmentProviderConfig, EnrichmentProviderRegistry, type EnrichmentResult, type EntityEnrichmentInput, type FileChange, FilesystemBackend, type GenerateOptions, type GenerateResult, HermesMemoryExtensionPublisher, type IngestionPlan, type InstallOptions, type InstallResult, LanceDbBackend, type LanguageInfo, MARKETPLACE_MANIFEST_FILENAME, MARKETPLACE_SCHEMA_VERSION, type MarketplaceConfig, type MarketplaceEntry, type MarketplaceInstallResult, type MarketplaceInstallType, type MarketplaceLogger, type MarketplaceManifest, type MarketplaceValidation, MaterializeResult, MeilisearchBackend, MemoryCategory, type MemoryEntry, type MemoryExtensionPublisher, MemoryFile, type MergeResult, type MigrationOptions, type MigrationResult, NoneBackend, type OnboardOptions, type OnboardResult, OramaBackend, PUBLISHERS, type PipelineResult, PluginConfig, type PostConsolidationMaterializeOptions, type ProjectShape, type ProvenanceEntry, type PublishContext, type PublishResult, type PublisherCapabilities, REMNIC_CITATION_FORMAT, REMNIC_MCP_TOOL_INVENTORY, REMNIC_RECALL_DECISION_RULES, REMNIC_SEMANTIC_OVERVIEW, type RemoveResult, type ResolverDecision, type ReviewAction, type ReviewItem, type ReviewListResult, type ReviewOptions, type ReviewResult, type RollbackResult, RolloutSummaryInput, type RunMaterializeOptions, type SemanticDedupDecision, type SemanticDedupHit, type SemanticDedupLookup, type SemanticDedupOptions, type Space, type SpaceKind, type SpaceManifest, type SpacePromoteResult, type SpacePullResult, type SpacePushResult, type SpaceShareResult, type SpaceSwitchResult, type StatementProvenance, StorageManager, type SyncOptions, type SyncResult, type SyncState, type Taxonomy, type TaxonomyCategory, type TrainingExportAdapter, type TrainingExportOptions, type TrainingExportRecord, type TreeNode, type WebSearchFn, WebSearchProvider, type WebSearchProviderOptions, appendAuditEntry, buildProcedureMarkdownBody, buildProcedureRecallSection, checkMarketplaceManifest, clearBulkImportSources, clearTrainingExportAdapters, coerceInstallExtension, convertMemoriesToRecords, createBackend, createSpace, curate, decideSemanticDedup, defaultEnrichmentPipelineConfig, deleteSpace, doctorConnector, emptyManifest, findContradictions, findDuplicates, generateContextTree, generateMarketplaceManifest, generateResolverDocument, getActiveSpace, getAuditLog, getBulkImportSource, getManifestPath, getSpacesDir, getTaxonomyDir, getTaxonomyFilePath, getTrainingExportAdapter, hostIdForConnector, installConnector, installFromMarketplace, listBulkImportSources, listConnectors, listReviewItems, listSpaces, listTrainingExportAdapters, loadManifest, loadRegistry, loadTaxonomy, manifestDir, manifestPath, matchesPatterns, mergeSpaces, migrateFromEngram, onboard, parseProcedureStepsFromBody, performReview, promoteSpace, publisherFor, publisherForConnector, pullFromSpace, pushToSpace, readAuditLog, readManifest, registerBulkImportSource, registerPublisher, registerTrainingExportAdapter, removeConnector, renderExtensionsBlock, renderExtensionsFooter, resolveCategory, resolvePrincipal, rollbackFromEngramMigration, runBinaryLifecyclePipeline, runCodexMaterialize, runEnrichmentPipeline, runPostConsolidationMaterialize, saveManifest, saveRegistry, saveTaxonomy, scanForBinaries, shareSpace, switchSpace, syncChanges, validateMarketplaceManifest, validateSlug, validateTaxonomy, watchForChanges, writeManifest, writeMarketplaceManifest };
1941
+ export { type AuditEntry, type BinaryAssetRecord, type BinaryAssetStatus, type BinaryLifecycleConfig, type BinaryLifecycleManifest, type BinaryStorageBackend, type BinaryStorageBackendConfig, BulkImportSourceAdapter, ClaudeCodeMemoryExtensionPublisher, CodexMemoryExtensionPublisher, type ConflictEntry, type ConnectorCapability, type ConnectorInstance, type ConnectorManifest, type ConnectorRegistry, type ContradictionOptions, type ContradictionPair, type ContradictionResult$1 as CurateContradictionResult, type DuplicateResult as CurateDuplicateResult, type CurateOptions, type CurateResult, type CuratedStatement, DEFAULT_GRACE_PERIOD_DAYS, DEFAULT_MAX_BINARY_SIZE_BYTES, DEFAULT_SCAN_PATTERNS, DEFAULT_TAXONOMY, type DedupOptions, type DedupResult, DiscoveredExtension, type DocFile, type DoctorCheck, type DoctorResult, type DuplicatePair, type EnrichmentAuditEntry, type EnrichmentCandidate, type EnrichmentCostTier, type EnrichmentPipelineConfig, type EnrichmentProvider, type EnrichmentProviderConfig, EnrichmentProviderRegistry, type EnrichmentResult, type EntityEnrichmentInput, type FileChange, FilesystemBackend, type GenerateOptions, type GenerateResult, HermesMemoryExtensionPublisher, type IngestionPlan, type InstallOptions, type InstallResult, LanceDbBackend, type LanguageInfo, MARKETPLACE_MANIFEST_FILENAME, MARKETPLACE_SCHEMA_VERSION, type MarketplaceConfig, type MarketplaceEntry, type MarketplaceInstallResult, type MarketplaceInstallType, type MarketplaceLogger, type MarketplaceManifest, type MarketplaceValidation, MaterializeResult, MeilisearchBackend, MemoryCategory, type MemoryEntry, type MemoryExtensionPublisher, MemoryFile, type MergeResult, type MigrationOptions, type MigrationResult, NoneBackend, type OnboardOptions, type OnboardResult, OramaBackend, PUBLISHERS, type PipelineResult, PluginConfig, type PostConsolidationMaterializeOptions, type ProjectShape, type ProvenanceEntry, type PublishContext, type PublishResult, type PublisherCapabilities, REMNIC_CITATION_FORMAT, REMNIC_MCP_TOOL_INVENTORY, REMNIC_RECALL_DECISION_RULES, REMNIC_SEMANTIC_OVERVIEW, type RemoveResult, ResolverDecision, type ReviewAction, type ReviewItem, type ReviewListResult, type ReviewOptions, type ReviewResult, type RollbackResult, RolloutSummaryInput, type RunMaterializeOptions, type Space, type SpaceKind, type SpaceManifest, type SpacePromoteResult, type SpacePullResult, type SpacePushResult, type SpaceShareResult, type SpaceSwitchResult, type StatementProvenance, StorageManager, type SyncOptions, type SyncResult, type SyncState, Taxonomy, type TrainingExportAdapter, type TrainingExportOptions, type TrainingExportRecord, type TreeNode, type WebSearchFn, WebSearchProvider, type WebSearchProviderOptions, appendAuditEntry, buildProcedureMarkdownBody, buildProcedureRecallSection, checkMarketplaceManifest, clearBulkImportSources, clearTrainingExportAdapters, coerceInstallExtension, convertMemoriesToRecords, createBackend, createSpace, curate, defaultEnrichmentPipelineConfig, deleteSpace, doctorConnector, emptyManifest, findContradictions, findDuplicates, generateContextTree, generateMarketplaceManifest, generateResolverDocument, getActiveSpace, getAuditLog, getBulkImportSource, getManifestPath, getSpacesDir, getTaxonomyDir, getTaxonomyFilePath, getTrainingExportAdapter, hostIdForConnector, installConnector, installFromMarketplace, listBulkImportSources, listConnectors, listReviewItems, listSpaces, listTrainingExportAdapters, loadManifest, loadRegistry, loadTaxonomy, manifestDir, manifestPath, matchesPatterns, mergeSpaces, migrateFromEngram, onboard, parseProcedureStepsFromBody, performReview, promoteSpace, publisherFor, publisherForConnector, pullFromSpace, pushToSpace, readAuditLog, readManifest, registerBulkImportSource, registerPublisher, registerTrainingExportAdapter, removeConnector, renderExtensionsBlock, renderExtensionsFooter, resolveCategory, resolvePrincipal, rollbackFromEngramMigration, runBinaryLifecyclePipeline, runCodexMaterialize, runEnrichmentPipeline, runPostConsolidationMaterialize, saveManifest, saveRegistry, saveTaxonomy, scanForBinaries, shareSpace, switchSpace, syncChanges, validateMarketplaceManifest, validateSlug, validateTaxonomy, watchForChanges, writeManifest, writeMarketplaceManifest };