@remnic/core 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/access-audit.d.ts +56 -0
- package/dist/access-audit.js +9 -0
- package/dist/access-cli.js +62 -45
- package/dist/access-cli.js.map +1 -1
- package/dist/access-http.d.ts +16 -9
- package/dist/access-http.js +25 -17
- package/dist/access-mcp.d.ts +16 -9
- package/dist/access-mcp.js +29 -7
- package/dist/access-schema.d.ts +124 -33
- package/dist/access-schema.js +5 -1
- package/dist/{access-service-HmO1Trrx.d.ts → access-service-Br8ZydTK.d.ts} +158 -63
- package/dist/access-service.d.ts +13 -6
- package/dist/access-service.js +22 -14
- package/dist/bootstrap.d.ts +6 -3
- package/dist/briefing.d.ts +1 -0
- package/dist/briefing.js +7 -6
- package/dist/buffer-surprise-report.d.ts +70 -0
- package/dist/buffer-surprise-report.js +7 -0
- package/dist/buffer-surprise-report.js.map +1 -0
- package/dist/buffer-surprise.d.ts +98 -0
- package/dist/buffer-surprise.js +11 -0
- package/dist/buffer-surprise.js.map +1 -0
- package/dist/buffer.d.ts +100 -2
- package/dist/buffer.js +1 -1
- package/dist/calibration.js +5 -5
- package/dist/causal-behavior.js +4 -4
- package/dist/causal-chain.js +2 -2
- package/dist/causal-consolidation.js +17 -16
- package/dist/causal-consolidation.js.map +1 -1
- package/dist/causal-retrieval.js +4 -4
- package/dist/causal-trajectory.js +1 -1
- package/dist/{chunk-QNJMBKFK.js → chunk-2LGMW3DJ.js} +3 -2
- package/dist/chunk-2LGMW3DJ.js.map +1 -0
- package/dist/{chunk-QDYXG4CS.js → chunk-3FPTCC3Z.js} +4 -3
- package/dist/chunk-3FPTCC3Z.js.map +1 -0
- package/dist/chunk-3GPTTA4J.js +57 -0
- package/dist/chunk-3GPTTA4J.js.map +1 -0
- package/dist/{chunk-44ICJRF3.js → chunk-3GXCSUXR.js} +4 -4
- package/dist/{chunk-ITRLGI2T.js → chunk-3OGMS3PE.js} +2 -2
- package/dist/chunk-54V4BZWP.js +139 -0
- package/dist/chunk-54V4BZWP.js.map +1 -0
- package/dist/chunk-5JRF2PZA.js +67 -0
- package/dist/chunk-5JRF2PZA.js.map +1 -0
- package/dist/chunk-64NJRYU2.js +332 -0
- package/dist/chunk-64NJRYU2.js.map +1 -0
- package/dist/{chunk-OIT5QGG4.js → chunk-6AUUAZEX.js} +72 -2
- package/dist/chunk-6AUUAZEX.js.map +1 -0
- package/dist/{chunk-ZVBB3T7V.js → chunk-7I7FKFZH.js} +24 -22
- package/dist/chunk-7I7FKFZH.js.map +1 -0
- package/dist/chunk-AJU4PJGY.js +126 -0
- package/dist/chunk-AJU4PJGY.js.map +1 -0
- package/dist/chunk-ASAITVLA.js +64 -0
- package/dist/chunk-ASAITVLA.js.map +1 -0
- package/dist/{chunk-3QHL5ABG.js → chunk-B5WXLVDY.js} +187 -6
- package/dist/chunk-B5WXLVDY.js.map +1 -0
- package/dist/{chunk-SYUK3VLY.js → chunk-BGJGXLZ7.js} +111 -2
- package/dist/{chunk-SYUK3VLY.js.map → chunk-BGJGXLZ7.js.map} +1 -1
- package/dist/{chunk-MBJHSA7F.js → chunk-BK2EFTE2.js} +258 -13
- package/dist/chunk-BK2EFTE2.js.map +1 -0
- package/dist/chunk-C4SQJZAF.js +486 -0
- package/dist/chunk-C4SQJZAF.js.map +1 -0
- package/dist/{chunk-6UJ47TVX.js → chunk-CUPFXL3J.js} +2 -2
- package/dist/chunk-DF3RVK3X.js +119 -0
- package/dist/chunk-DF3RVK3X.js.map +1 -0
- package/dist/{chunk-37UIFYWO.js → chunk-DFTTJYSO.js} +108 -9
- package/dist/chunk-DFTTJYSO.js.map +1 -0
- package/dist/chunk-DGVM5SFL.js +69 -0
- package/dist/chunk-DGVM5SFL.js.map +1 -0
- package/dist/chunk-EIR5VLIH.js +90 -0
- package/dist/chunk-EIR5VLIH.js.map +1 -0
- package/dist/{chunk-PAORGQRI.js → chunk-EPQJM2GC.js} +37 -23
- package/dist/chunk-EPQJM2GC.js.map +1 -0
- package/dist/{chunk-GV6NLQ4X.js → chunk-F5VP6YCB.js} +374 -16
- package/dist/chunk-F5VP6YCB.js.map +1 -0
- package/dist/{chunk-6ZH4TU6I.js → chunk-FAAFWE4G.js} +2 -1
- package/dist/chunk-FAAFWE4G.js.map +1 -0
- package/dist/{chunk-7WQ6SLIE.js → chunk-FVA6TGI3.js} +2 -2
- package/dist/chunk-GDFS42HT.js +206 -0
- package/dist/chunk-GDFS42HT.js.map +1 -0
- package/dist/{chunk-MVTHXUBX.js → chunk-GKFXUTJ2.js} +479 -20
- package/dist/chunk-GKFXUTJ2.js.map +1 -0
- package/dist/{chunk-NQEVYWX6.js → chunk-HK3FGIEW.js} +209 -5
- package/dist/chunk-HK3FGIEW.js.map +1 -0
- package/dist/chunk-IISBCCWR.js +52 -0
- package/dist/chunk-IISBCCWR.js.map +1 -0
- package/dist/{chunk-WBSAYXVI.js → chunk-INXV5JBT.js} +198 -42
- package/dist/chunk-INXV5JBT.js.map +1 -0
- package/dist/chunk-JBMSGZEQ.js +441 -0
- package/dist/chunk-JBMSGZEQ.js.map +1 -0
- package/dist/{chunk-J4IYOZZ5.js → chunk-JXS5PDQ7.js} +3 -1
- package/dist/chunk-JXS5PDQ7.js.map +1 -0
- package/dist/{chunk-6LX5ORAS.js → chunk-KUB6JU6H.js} +4 -4
- package/dist/chunk-KVBLZUKV.js +173 -0
- package/dist/chunk-KVBLZUKV.js.map +1 -0
- package/dist/chunk-LBLXEFWK.js +51 -0
- package/dist/chunk-LBLXEFWK.js.map +1 -0
- package/dist/{chunk-3WHVNEN7.js → chunk-LTCGGW2D.js} +1 -1
- package/dist/chunk-LTCGGW2D.js.map +1 -0
- package/dist/{chunk-UEYA6UC7.js → chunk-NZLQTHS5.js} +25 -2
- package/dist/chunk-NZLQTHS5.js.map +1 -0
- package/dist/chunk-PVPWZSSI.js +37 -0
- package/dist/chunk-PVPWZSSI.js.map +1 -0
- package/dist/{chunk-4NRAJUDS.js → chunk-RBBWYEFJ.js} +1 -1
- package/dist/chunk-RFYAYKTD.js +146 -0
- package/dist/chunk-RFYAYKTD.js.map +1 -0
- package/dist/{chunk-DHHP2Z4X.js → chunk-RGLL5SPU.js} +2 -2
- package/dist/{chunk-3SV6CQHO.js → chunk-S3EEFKNY.js} +101 -65
- package/dist/chunk-S3EEFKNY.js.map +1 -0
- package/dist/chunk-SOBJ6NEY.js +18 -0
- package/dist/chunk-SOBJ6NEY.js.map +1 -0
- package/dist/{chunk-JIU55F3X.js → chunk-SPI27QT6.js} +2 -2
- package/dist/chunk-TVVEYCNW.js +65 -0
- package/dist/chunk-TVVEYCNW.js.map +1 -0
- package/dist/chunk-ULYOGL6R.js +322 -0
- package/dist/chunk-ULYOGL6R.js.map +1 -0
- package/dist/{chunk-47UU5PU2.js → chunk-VBVG2M5G.js} +18 -3
- package/dist/chunk-VBVG2M5G.js.map +1 -0
- package/dist/{chunk-7ECD5ATE.js → chunk-VDX363PS.js} +2 -2
- package/dist/{chunk-DEPL3635.js → chunk-VYM3VWOF.js} +1432 -188
- package/dist/chunk-VYM3VWOF.js.map +1 -0
- package/dist/{chunk-MTLYEMJB.js → chunk-WCLICCGB.js} +18 -3
- package/dist/chunk-WCLICCGB.js.map +1 -0
- package/dist/{chunk-4LACOVZX.js → chunk-WVVA7F5A.js} +2 -2
- package/dist/chunk-X6GF3FX2.js +26 -0
- package/dist/chunk-X6GF3FX2.js.map +1 -0
- package/dist/{chunk-3QFQGRHO.js → chunk-XMHBH5H6.js} +4 -4
- package/dist/{chunk-BLKTA7MM.js → chunk-YNQKWQT4.js} +50 -17
- package/dist/chunk-YNQKWQT4.js.map +1 -0
- package/dist/chunk-ZAIM4TUE.js +488 -0
- package/dist/chunk-ZAIM4TUE.js.map +1 -0
- package/dist/{chunk-N42IWANG.js → chunk-ZEM3OK2K.js} +2 -2
- package/dist/chunk-ZZTOURJI.js +91 -0
- package/dist/chunk-ZZTOURJI.js.map +1 -0
- package/dist/{cli-BneVIEvh.d.ts → cli-BkeRaYfk.d.ts} +2 -2
- package/dist/cli.d.ts +13 -6
- package/dist/cli.js +40 -29
- package/dist/config.js +1 -1
- package/dist/consolidation-operator.d.ts +41 -0
- package/dist/consolidation-operator.js +11 -0
- package/dist/consolidation-operator.js.map +1 -0
- package/dist/consolidation-provenance-check.d.ts +68 -0
- package/dist/consolidation-provenance-check.js +9 -0
- package/dist/consolidation-provenance-check.js.map +1 -0
- package/dist/consolidation-undo.d.ts +123 -0
- package/dist/consolidation-undo.js +426 -0
- package/dist/consolidation-undo.js.map +1 -0
- package/dist/{contradiction-scan-GR33PONM.js → contradiction-scan-E3GJTI4F.js} +43 -7
- package/dist/contradiction-scan-E3GJTI4F.js.map +1 -0
- package/dist/cross-namespace-budget.d.ts +133 -0
- package/dist/cross-namespace-budget.js +9 -0
- package/dist/cross-namespace-budget.js.map +1 -0
- package/dist/direct-answer-wiring.js +5 -70
- package/dist/direct-answer-wiring.js.map +1 -1
- package/dist/{engine-5TIQBYZR.js → engine-F3GOXGE5.js} +8 -7
- package/dist/engine-F3GOXGE5.js.map +1 -0
- package/dist/entity-retrieval.d.ts +1 -0
- package/dist/entity-retrieval.js +7 -6
- package/dist/explicit-capture.d.ts +6 -3
- package/dist/explicit-capture.js +2 -2
- package/dist/extraction-judge-telemetry.d.ts +113 -0
- package/dist/extraction-judge-telemetry.js +14 -0
- package/dist/extraction-judge-telemetry.js.map +1 -0
- package/dist/extraction-judge-training.d.ts +85 -0
- package/dist/extraction-judge-training.js +16 -0
- package/dist/extraction-judge-training.js.map +1 -0
- package/dist/extraction-judge.d.ts +124 -2
- package/dist/extraction-judge.js +11 -1
- package/dist/extraction.js +6 -5
- package/dist/fallback-llm.js +2 -2
- package/dist/graph-recall.d.ts +100 -0
- package/dist/graph-recall.js +8 -0
- package/dist/graph-recall.js.map +1 -0
- package/dist/graph-retrieval.d.ts +271 -0
- package/dist/graph-retrieval.js +21 -0
- package/dist/graph-retrieval.js.map +1 -0
- package/dist/importance.js +1 -1
- package/dist/index.d.ts +585 -20
- package/dist/index.js +503 -312
- package/dist/index.js.map +1 -1
- package/dist/memory-worth-bench.d.ts +51 -0
- package/dist/memory-worth-bench.js +131 -0
- package/dist/memory-worth-bench.js.map +1 -0
- package/dist/memory-worth-filter.d.ts +128 -0
- package/dist/memory-worth-filter.js +10 -0
- package/dist/memory-worth-filter.js.map +1 -0
- package/dist/memory-worth-outcomes.d.ts +118 -0
- package/dist/memory-worth-outcomes.js +9 -0
- package/dist/memory-worth-outcomes.js.map +1 -0
- package/dist/memory-worth.d.ts +102 -0
- package/dist/memory-worth.js +7 -0
- package/dist/memory-worth.js.map +1 -0
- package/dist/operator-toolkit.d.ts +40 -1
- package/dist/operator-toolkit.js +23 -14
- package/dist/{orchestrator-DRYA6_lW.d.ts → orchestrator-CmJ-NTdJ.d.ts} +233 -8
- package/dist/orchestrator.d.ts +6 -3
- package/dist/orchestrator.js +49 -39
- package/dist/page-versioning.d.ts +12 -1
- package/dist/page-versioning.js +5 -3
- package/dist/{port-C1GZFv8h.d.ts → port-BADbLZU5.d.ts} +2 -2
- package/dist/qmd-recall-cache.d.ts +1 -1
- package/dist/qmd.d.ts +5 -3
- package/dist/qmd.js +1 -1
- package/dist/reasoning-trace-recall.d.ts +90 -0
- package/dist/reasoning-trace-recall.js +13 -0
- package/dist/reasoning-trace-recall.js.map +1 -0
- package/dist/reasoning-trace-types.d.ts +54 -0
- package/dist/reasoning-trace-types.js +17 -0
- package/dist/reasoning-trace-types.js.map +1 -0
- package/dist/recall-audit-anomaly.d.ts +112 -0
- package/dist/recall-audit-anomaly.js +11 -0
- package/dist/recall-audit-anomaly.js.map +1 -0
- package/dist/recall-audit.js +5 -44
- package/dist/recall-audit.js.map +1 -1
- package/dist/recall-explain-renderer.d.ts +49 -0
- package/dist/recall-explain-renderer.js +18 -0
- package/dist/recall-explain-renderer.js.map +1 -0
- package/dist/recall-state.d.ts +12 -1
- package/dist/recall-state.js +1 -1
- package/dist/recall-xray-cli.d.ts +40 -0
- package/dist/recall-xray-cli.js +11 -0
- package/dist/recall-xray-cli.js.map +1 -0
- package/dist/recall-xray-renderer.d.ts +44 -0
- package/dist/recall-xray-renderer.js +18 -0
- package/dist/recall-xray-renderer.js.map +1 -0
- package/dist/recall-xray.d.ts +179 -0
- package/dist/recall-xray.js +13 -0
- package/dist/recall-xray.js.map +1 -0
- package/dist/resume-bundles.js +5 -5
- package/dist/retrieval-agents.d.ts +1 -1
- package/dist/retrieval-tiers.d.ts +17 -0
- package/dist/retrieval-tiers.js +9 -0
- package/dist/retrieval-tiers.js.map +1 -0
- package/dist/schemas.d.ts +287 -31
- package/dist/schemas.js +1 -1
- package/dist/{semantic-consolidation-DrvSYRdB.d.ts → semantic-consolidation-CxJU6MJk.d.ts} +62 -1
- package/dist/semantic-consolidation.d.ts +2 -1
- package/dist/semantic-consolidation.js +21 -7
- package/dist/semantic-rule-promotion.js +7 -6
- package/dist/semantic-rule-verifier.js +7 -6
- package/dist/storage.d.ts +82 -1
- package/dist/storage.js +6 -5
- package/dist/summarizer.js +3 -3
- package/dist/temporal-supersession.d.ts +1 -0
- package/dist/tier-migration.d.ts +2 -1
- package/dist/types.d.ts +276 -2
- package/dist/types.js +1 -1
- package/dist/verified-recall.js +7 -6
- package/package.json +1 -1
- package/dist/chunk-37UIFYWO.js.map +0 -1
- package/dist/chunk-3QHL5ABG.js.map +0 -1
- package/dist/chunk-3SV6CQHO.js.map +0 -1
- package/dist/chunk-3WHVNEN7.js.map +0 -1
- package/dist/chunk-47UU5PU2.js.map +0 -1
- package/dist/chunk-6ZH4TU6I.js.map +0 -1
- package/dist/chunk-BLKTA7MM.js.map +0 -1
- package/dist/chunk-DEPL3635.js.map +0 -1
- package/dist/chunk-GV6NLQ4X.js.map +0 -1
- package/dist/chunk-J4IYOZZ5.js.map +0 -1
- package/dist/chunk-LAYN4LDC.js +0 -267
- package/dist/chunk-LAYN4LDC.js.map +0 -1
- package/dist/chunk-MBJHSA7F.js.map +0 -1
- package/dist/chunk-MTLYEMJB.js.map +0 -1
- package/dist/chunk-MVTHXUBX.js.map +0 -1
- package/dist/chunk-NQEVYWX6.js.map +0 -1
- package/dist/chunk-OIT5QGG4.js.map +0 -1
- package/dist/chunk-PAORGQRI.js.map +0 -1
- package/dist/chunk-QDYXG4CS.js.map +0 -1
- package/dist/chunk-QNJMBKFK.js.map +0 -1
- package/dist/chunk-UEYA6UC7.js.map +0 -1
- package/dist/chunk-UVJFDP7P.js +0 -202
- package/dist/chunk-UVJFDP7P.js.map +0 -1
- package/dist/chunk-WBSAYXVI.js.map +0 -1
- package/dist/chunk-ZVBB3T7V.js.map +0 -1
- package/dist/contradiction-scan-GR33PONM.js.map +0 -1
- /package/dist/{engine-5TIQBYZR.js.map → access-audit.js.map} +0 -0
- /package/dist/{chunk-44ICJRF3.js.map → chunk-3GXCSUXR.js.map} +0 -0
- /package/dist/{chunk-ITRLGI2T.js.map → chunk-3OGMS3PE.js.map} +0 -0
- /package/dist/{chunk-6UJ47TVX.js.map → chunk-CUPFXL3J.js.map} +0 -0
- /package/dist/{chunk-7WQ6SLIE.js.map → chunk-FVA6TGI3.js.map} +0 -0
- /package/dist/{chunk-6LX5ORAS.js.map → chunk-KUB6JU6H.js.map} +0 -0
- /package/dist/{chunk-4NRAJUDS.js.map → chunk-RBBWYEFJ.js.map} +0 -0
- /package/dist/{chunk-DHHP2Z4X.js.map → chunk-RGLL5SPU.js.map} +0 -0
- /package/dist/{chunk-JIU55F3X.js.map → chunk-SPI27QT6.js.map} +0 -0
- /package/dist/{chunk-7ECD5ATE.js.map → chunk-VDX363PS.js.map} +0 -0
- /package/dist/{chunk-4LACOVZX.js.map → chunk-WVVA7F5A.js.map} +0 -0
- /package/dist/{chunk-3QFQGRHO.js.map → chunk-XMHBH5H6.js.map} +0 -0
- /package/dist/{chunk-N42IWANG.js.map → chunk-ZEM3OK2K.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -11,12 +11,18 @@ import {
|
|
|
11
11
|
saveTokenStore
|
|
12
12
|
} from "./chunk-O5ETUNBT.js";
|
|
13
13
|
import {
|
|
14
|
-
|
|
15
|
-
} from "./chunk-
|
|
14
|
+
runGraphRecall
|
|
15
|
+
} from "./chunk-DGVM5SFL.js";
|
|
16
16
|
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
DEFAULT_PPR_DAMPING,
|
|
18
|
+
DEFAULT_PPR_ITERATIONS,
|
|
19
|
+
DEFAULT_PPR_TOLERANCE,
|
|
20
|
+
buildGraphFromMemories,
|
|
21
|
+
extractGraphEdges,
|
|
22
|
+
isEdgeType,
|
|
23
|
+
isNodeType,
|
|
24
|
+
queryGraph
|
|
25
|
+
} from "./chunk-64NJRYU2.js";
|
|
20
26
|
import {
|
|
21
27
|
clearBulkImportSources,
|
|
22
28
|
clearTrainingExportAdapters,
|
|
@@ -34,53 +40,92 @@ import {
|
|
|
34
40
|
runBulkImportCliCommand,
|
|
35
41
|
runBulkImportPipeline,
|
|
36
42
|
validateImportTurn
|
|
37
|
-
} from "./chunk-
|
|
38
|
-
import "./chunk-
|
|
39
|
-
import "./chunk-
|
|
40
|
-
import
|
|
43
|
+
} from "./chunk-INXV5JBT.js";
|
|
44
|
+
import "./chunk-VDX363PS.js";
|
|
45
|
+
import "./chunk-KUB6JU6H.js";
|
|
46
|
+
import {
|
|
47
|
+
parseXrayBudgetFlag,
|
|
48
|
+
parseXrayCliOptions
|
|
49
|
+
} from "./chunk-PVPWZSSI.js";
|
|
50
|
+
import "./chunk-B5WXLVDY.js";
|
|
41
51
|
import "./chunk-HL4DB7TO.js";
|
|
52
|
+
import "./chunk-ULYOGL6R.js";
|
|
42
53
|
import "./chunk-ZPKBYX2F.js";
|
|
43
54
|
import "./chunk-3SLRNYNG.js";
|
|
44
55
|
import "./chunk-LIRZNNUP.js";
|
|
45
56
|
import "./chunk-Y4Z4I6WK.js";
|
|
57
|
+
import {
|
|
58
|
+
reportBufferSurpriseDistribution
|
|
59
|
+
} from "./chunk-ASAITVLA.js";
|
|
60
|
+
import {
|
|
61
|
+
DEFAULT_SURPRISE_K,
|
|
62
|
+
computeSurprise
|
|
63
|
+
} from "./chunk-5JRF2PZA.js";
|
|
46
64
|
import {
|
|
47
65
|
getMemoryForActiveMemory,
|
|
48
66
|
recallForActiveMemory
|
|
49
67
|
} from "./chunk-G4SK7DSQ.js";
|
|
50
68
|
import "./chunk-6MKAMLQL.js";
|
|
51
69
|
import {
|
|
70
|
+
DEFAULT_TAXONOMY,
|
|
52
71
|
Orchestrator,
|
|
72
|
+
branchNamespaceName,
|
|
53
73
|
buildProcedureRecallSection,
|
|
54
74
|
decideSemanticDedup,
|
|
55
75
|
defaultWorkspaceDir,
|
|
76
|
+
describeCodingScope,
|
|
77
|
+
generateResolverDocument,
|
|
78
|
+
getTaxonomyDir,
|
|
79
|
+
getTaxonomyFilePath,
|
|
80
|
+
loadTaxonomy,
|
|
56
81
|
migrateFromEngram,
|
|
82
|
+
normalizeOriginUrl,
|
|
83
|
+
projectNamespaceName,
|
|
84
|
+
resolveCodingNamespaceOverlay,
|
|
85
|
+
resolveGitContext,
|
|
57
86
|
rollbackFromEngramMigration,
|
|
58
|
-
sanitizeSessionKeyForFilename
|
|
59
|
-
|
|
60
|
-
|
|
87
|
+
sanitizeSessionKeyForFilename,
|
|
88
|
+
saveTaxonomy,
|
|
89
|
+
stableHash,
|
|
90
|
+
validateSlug,
|
|
91
|
+
validateTaxonomy
|
|
92
|
+
} from "./chunk-VYM3VWOF.js";
|
|
93
|
+
import "./chunk-RGLL5SPU.js";
|
|
61
94
|
import "./chunk-UHGBNIOS.js";
|
|
62
95
|
import "./chunk-FSFEQI74.js";
|
|
63
|
-
import "./chunk-N42IWANG.js";
|
|
64
|
-
import "./chunk-ETOW6ACV.js";
|
|
65
96
|
import "./chunk-W6SL7OFG.js";
|
|
66
97
|
import "./chunk-Z5AAYHUC.js";
|
|
67
98
|
import "./chunk-S75M5ZRK.js";
|
|
68
99
|
import "./chunk-TPB3I2AC.js";
|
|
69
100
|
import "./chunk-JR4ZC3G4.js";
|
|
70
|
-
import "./chunk-
|
|
71
|
-
import "./chunk-
|
|
101
|
+
import "./chunk-ZEM3OK2K.js";
|
|
102
|
+
import "./chunk-ETOW6ACV.js";
|
|
72
103
|
import "./chunk-5NPGSAVB.js";
|
|
73
104
|
import "./chunk-C7VW7C3F.js";
|
|
74
105
|
import "./chunk-K4FLSOR5.js";
|
|
75
106
|
import "./chunk-V3RXWQIE.js";
|
|
76
107
|
import "./chunk-5IZL4DCV.js";
|
|
77
|
-
import "./chunk-
|
|
108
|
+
import "./chunk-VBVG2M5G.js";
|
|
109
|
+
import "./chunk-KVBLZUKV.js";
|
|
110
|
+
import "./chunk-X7XN6YU4.js";
|
|
111
|
+
import {
|
|
112
|
+
DEFAULT_REASONING_TRACE_BOOST,
|
|
113
|
+
applyReasoningTraceBoost,
|
|
114
|
+
isReasoningTracePath,
|
|
115
|
+
looksLikeProblemSolvingQuery
|
|
116
|
+
} from "./chunk-ZZTOURJI.js";
|
|
78
117
|
import "./chunk-YDBIWGNI.js";
|
|
79
118
|
import "./chunk-7DHTMOND.js";
|
|
80
|
-
import "./chunk-
|
|
119
|
+
import "./chunk-YCN4BVDK.js";
|
|
81
120
|
import "./chunk-D654IBA6.js";
|
|
82
121
|
import "./chunk-H63EDPFJ.js";
|
|
83
|
-
import
|
|
122
|
+
import {
|
|
123
|
+
applyMemoryWorthFilter,
|
|
124
|
+
buildMemoryWorthCounterMap
|
|
125
|
+
} from "./chunk-3GPTTA4J.js";
|
|
126
|
+
import {
|
|
127
|
+
computeMemoryWorth
|
|
128
|
+
} from "./chunk-IISBCCWR.js";
|
|
84
129
|
import {
|
|
85
130
|
hasBroadGraphIntent,
|
|
86
131
|
inferIntentFromText,
|
|
@@ -88,45 +133,62 @@ import {
|
|
|
88
133
|
isTaskInitiationIntent,
|
|
89
134
|
planRecallMode
|
|
90
135
|
} from "./chunk-GGD5W7TB.js";
|
|
136
|
+
import "./chunk-YAZNBMNF.js";
|
|
137
|
+
import "./chunk-AJU4PJGY.js";
|
|
138
|
+
import "./chunk-DF3RVK3X.js";
|
|
91
139
|
import {
|
|
92
140
|
clearVerdictCache,
|
|
93
141
|
createVerdictCache,
|
|
142
|
+
getVerdictKind,
|
|
143
|
+
isDurableVerdict,
|
|
144
|
+
isValidCachedVerdict,
|
|
94
145
|
judgeFactDurability,
|
|
146
|
+
normalizeCachedVerdict,
|
|
95
147
|
verdictCacheSize
|
|
96
|
-
} from "./chunk-
|
|
148
|
+
} from "./chunk-C4SQJZAF.js";
|
|
97
149
|
import {
|
|
98
150
|
ExtractionEngine
|
|
99
|
-
} from "./chunk-
|
|
100
|
-
import "./chunk-
|
|
151
|
+
} from "./chunk-S3EEFKNY.js";
|
|
152
|
+
import "./chunk-NZLQTHS5.js";
|
|
153
|
+
import "./chunk-54V4BZWP.js";
|
|
101
154
|
import "./chunk-NBNN5GOB.js";
|
|
102
155
|
import "./chunk-FEMOX5AD.js";
|
|
103
156
|
import "./chunk-JL2PU6AI.js";
|
|
157
|
+
import "./chunk-VEWZZM3H.js";
|
|
158
|
+
import {
|
|
159
|
+
resolveCategory
|
|
160
|
+
} from "./chunk-6AUUAZEX.js";
|
|
161
|
+
import {
|
|
162
|
+
FILTER_LABELS,
|
|
163
|
+
isDirectAnswerEligible
|
|
164
|
+
} from "./chunk-Y4FHOFJ2.js";
|
|
165
|
+
import "./chunk-ALXMCZEU.js";
|
|
166
|
+
import {
|
|
167
|
+
buildEntityRecallSection
|
|
168
|
+
} from "./chunk-FVA6TGI3.js";
|
|
104
169
|
import {
|
|
105
170
|
buildExtensionsFooterForSummary,
|
|
106
171
|
loadDaySummaryPrompt
|
|
107
172
|
} from "./chunk-GZCUW5IC.js";
|
|
108
|
-
import "./chunk-VEWZZM3H.js";
|
|
109
|
-
import "./chunk-ALXMCZEU.js";
|
|
110
173
|
import {
|
|
111
|
-
|
|
112
|
-
} from "./chunk-
|
|
113
|
-
import "./chunk-PAORGQRI.js";
|
|
114
|
-
import "./chunk-6UJ47TVX.js";
|
|
174
|
+
expandTildePath
|
|
175
|
+
} from "./chunk-EPQJM2GC.js";
|
|
115
176
|
import "./chunk-PYXS46O7.js";
|
|
116
177
|
import "./chunk-3QKK7QOS.js";
|
|
178
|
+
import "./chunk-CUPFXL3J.js";
|
|
117
179
|
import "./chunk-JRNQ3RNA.js";
|
|
118
|
-
import "./chunk-
|
|
180
|
+
import "./chunk-SPI27QT6.js";
|
|
119
181
|
import "./chunk-CULXMQJH.js";
|
|
120
182
|
import "./chunk-E6K4NIEU.js";
|
|
121
183
|
import {
|
|
122
184
|
LanceDbBackend,
|
|
123
185
|
MeilisearchBackend,
|
|
124
186
|
OramaBackend
|
|
125
|
-
} from "./chunk-
|
|
187
|
+
} from "./chunk-7I7FKFZH.js";
|
|
126
188
|
import "./chunk-YRMVARQP.js";
|
|
127
189
|
import {
|
|
128
190
|
QmdClient
|
|
129
|
-
} from "./chunk-
|
|
191
|
+
} from "./chunk-YNQKWQT4.js";
|
|
130
192
|
import {
|
|
131
193
|
LEGACY_PLUGIN_ID,
|
|
132
194
|
PLUGIN_ID,
|
|
@@ -135,21 +197,27 @@ import {
|
|
|
135
197
|
import "./chunk-EABGC2TL.js";
|
|
136
198
|
import "./chunk-LOBRX7VD.js";
|
|
137
199
|
import "./chunk-HMDCOMYU.js";
|
|
138
|
-
import "./chunk-
|
|
200
|
+
import "./chunk-JXS5PDQ7.js";
|
|
139
201
|
import "./chunk-LK6SGL53.js";
|
|
140
202
|
import "./chunk-7SEAZFFB.js";
|
|
141
203
|
import "./chunk-K6WK37A6.js";
|
|
204
|
+
import {
|
|
205
|
+
coerceInstallExtension,
|
|
206
|
+
parseConfig
|
|
207
|
+
} from "./chunk-BK2EFTE2.js";
|
|
208
|
+
import "./chunk-Z5LAYHGJ.js";
|
|
209
|
+
import "./chunk-C6QPK5GG.js";
|
|
210
|
+
import "./chunk-C2EFFULQ.js";
|
|
142
211
|
import {
|
|
143
212
|
CODEX_THREAD_KEY_PREFIX
|
|
144
213
|
} from "./chunk-3PG3H5TD.js";
|
|
145
214
|
import "./chunk-FYIYMQ5N.js";
|
|
146
215
|
import "./chunk-2NMMFZ5T.js";
|
|
216
|
+
import "./chunk-KVE7R4CG.js";
|
|
217
|
+
import "./chunk-4WMCPJWX.js";
|
|
147
218
|
import {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
} from "./chunk-MBJHSA7F.js";
|
|
151
|
-
import "./chunk-Z5LAYHGJ.js";
|
|
152
|
-
import "./chunk-C6QPK5GG.js";
|
|
219
|
+
SmartBuffer
|
|
220
|
+
} from "./chunk-JBMSGZEQ.js";
|
|
153
221
|
import {
|
|
154
222
|
MATERIALIZE_VERSION,
|
|
155
223
|
SENTINEL_FILE,
|
|
@@ -159,7 +227,7 @@ import {
|
|
|
159
227
|
materializeForNamespace,
|
|
160
228
|
runCodexMaterialize,
|
|
161
229
|
runPostConsolidationMaterialize
|
|
162
|
-
} from "./chunk-
|
|
230
|
+
} from "./chunk-BGJGXLZ7.js";
|
|
163
231
|
import {
|
|
164
232
|
REMNIC_EXTENSIONS_TOTAL_TOKEN_LIMIT,
|
|
165
233
|
discoverMemoryExtensions,
|
|
@@ -169,29 +237,26 @@ import {
|
|
|
169
237
|
} from "./chunk-EJI5XIBB.js";
|
|
170
238
|
import {
|
|
171
239
|
FallbackLlmClient
|
|
172
|
-
} from "./chunk-
|
|
240
|
+
} from "./chunk-3GXCSUXR.js";
|
|
173
241
|
import "./chunk-XZ2TIKGC.js";
|
|
174
|
-
import "./chunk-Y27UJK6V.js";
|
|
175
242
|
import "./chunk-ODWDQNRE.js";
|
|
243
|
+
import "./chunk-Y27UJK6V.js";
|
|
176
244
|
import "./chunk-UZB5KHKX.js";
|
|
177
|
-
import "./chunk-C2EFFULQ.js";
|
|
178
|
-
import "./chunk-4WMCPJWX.js";
|
|
179
245
|
import "./chunk-6HZ6AO2P.js";
|
|
180
246
|
import "./chunk-JWPLJLDU.js";
|
|
181
247
|
import {
|
|
182
248
|
BootstrapEngine
|
|
183
249
|
} from "./chunk-N53K2EXC.js";
|
|
184
|
-
import "./chunk-URB2WSKZ.js";
|
|
185
|
-
import "./chunk-UVJFDP7P.js";
|
|
186
250
|
import "./chunk-XYIK4LF6.js";
|
|
251
|
+
import "./chunk-URB2WSKZ.js";
|
|
187
252
|
import "./chunk-PVGDJXVK.js";
|
|
188
253
|
import "./chunk-NGAVDO7E.js";
|
|
189
254
|
import {
|
|
190
255
|
EngramAccessHttpServer
|
|
191
|
-
} from "./chunk-
|
|
256
|
+
} from "./chunk-DFTTJYSO.js";
|
|
192
257
|
import {
|
|
193
258
|
EngramMcpServer
|
|
194
|
-
} from "./chunk-
|
|
259
|
+
} from "./chunk-HK3FGIEW.js";
|
|
195
260
|
import {
|
|
196
261
|
buildCitationGuidance,
|
|
197
262
|
formatOaiMemCitation,
|
|
@@ -199,38 +264,46 @@ import {
|
|
|
199
264
|
sanitizeNoteForCitation
|
|
200
265
|
} from "./chunk-IQT3XTKW.js";
|
|
201
266
|
import "./chunk-MARWOCVP.js";
|
|
202
|
-
import {
|
|
203
|
-
formatZodError,
|
|
204
|
-
memoryStoreRequestSchema,
|
|
205
|
-
observeRequestSchema,
|
|
206
|
-
recallRequestSchema,
|
|
207
|
-
suggestionSubmitRequestSchema,
|
|
208
|
-
validateRequest
|
|
209
|
-
} from "./chunk-MTLYEMJB.js";
|
|
210
267
|
import {
|
|
211
268
|
EngramAccessInputError,
|
|
212
|
-
EngramAccessService
|
|
213
|
-
|
|
214
|
-
|
|
269
|
+
EngramAccessService,
|
|
270
|
+
computeProcedureStats,
|
|
271
|
+
formatProcedureStatsText
|
|
272
|
+
} from "./chunk-GKFXUTJ2.js";
|
|
273
|
+
import {
|
|
274
|
+
RECALL_XRAY_FORMATS,
|
|
275
|
+
parseXrayFormat,
|
|
276
|
+
renderXray,
|
|
277
|
+
renderXrayJson,
|
|
278
|
+
renderXrayMarkdown,
|
|
279
|
+
renderXrayText
|
|
280
|
+
} from "./chunk-ZAIM4TUE.js";
|
|
281
|
+
import "./chunk-SOBJ6NEY.js";
|
|
282
|
+
import "./chunk-3OGMS3PE.js";
|
|
215
283
|
import {
|
|
216
284
|
isTrustZoneName
|
|
217
285
|
} from "./chunk-EQINRHYR.js";
|
|
218
|
-
import
|
|
219
|
-
|
|
286
|
+
import {
|
|
287
|
+
memoryWorthOutcomeEligibleCategories,
|
|
288
|
+
recordMemoryOutcome
|
|
289
|
+
} from "./chunk-EIR5VLIH.js";
|
|
220
290
|
import "./chunk-EEQLFRUM.js";
|
|
221
291
|
import {
|
|
222
292
|
buildProcedureMarkdownBody,
|
|
223
293
|
parseProcedureStepsFromBody
|
|
224
294
|
} from "./chunk-QDW3E4RD.js";
|
|
225
|
-
import "./chunk-
|
|
295
|
+
import "./chunk-3FPTCC3Z.js";
|
|
296
|
+
import "./chunk-2LGMW3DJ.js";
|
|
297
|
+
import {
|
|
298
|
+
CrossNamespaceBudget,
|
|
299
|
+
DEFAULT_CROSS_NAMESPACE_BUDGET
|
|
300
|
+
} from "./chunk-GDFS42HT.js";
|
|
301
|
+
import "./chunk-RBBWYEFJ.js";
|
|
226
302
|
import "./chunk-DT5TVLJE.js";
|
|
227
303
|
import {
|
|
228
304
|
resolvePrincipal
|
|
229
305
|
} from "./chunk-N5AKDXAI.js";
|
|
230
306
|
import "./chunk-TBBDFYXW.js";
|
|
231
|
-
import "./chunk-DGXUHMOV.js";
|
|
232
|
-
import "./chunk-LPSF4OQH.js";
|
|
233
|
-
import "./chunk-XKECPATV.js";
|
|
234
307
|
import {
|
|
235
308
|
BRIEFING_FORMAT_ALLOWED,
|
|
236
309
|
FileCalendarSource,
|
|
@@ -243,11 +316,11 @@ import {
|
|
|
243
316
|
renderBriefingMarkdown,
|
|
244
317
|
resolveBriefingSaveDir,
|
|
245
318
|
validateBriefingFormat
|
|
246
|
-
} from "./chunk-
|
|
319
|
+
} from "./chunk-WVVA7F5A.js";
|
|
247
320
|
import {
|
|
248
321
|
StorageManager
|
|
249
|
-
} from "./chunk-
|
|
250
|
-
import "./chunk-
|
|
322
|
+
} from "./chunk-F5VP6YCB.js";
|
|
323
|
+
import "./chunk-LTCGGW2D.js";
|
|
251
324
|
import {
|
|
252
325
|
CITATION_UNKNOWN,
|
|
253
326
|
DEFAULT_CITATION_FORMAT,
|
|
@@ -259,25 +332,193 @@ import {
|
|
|
259
332
|
parseCitation,
|
|
260
333
|
stripCitation
|
|
261
334
|
} from "./chunk-4KAN3GZ3.js";
|
|
262
|
-
import {
|
|
263
|
-
createVersion,
|
|
264
|
-
diffVersions,
|
|
265
|
-
getVersion,
|
|
266
|
-
listVersions,
|
|
267
|
-
revertToVersion
|
|
268
|
-
} from "./chunk-6ZH4TU6I.js";
|
|
269
|
-
import "./chunk-SCU65EZI.js";
|
|
270
|
-
import "./chunk-BOUYNNYD.js";
|
|
271
335
|
import "./chunk-6PFRXT4K.js";
|
|
272
336
|
import "./chunk-TP4FZJIZ.js";
|
|
337
|
+
import "./chunk-SCU65EZI.js";
|
|
338
|
+
import "./chunk-BOUYNNYD.js";
|
|
273
339
|
import "./chunk-DM2T26WE.js";
|
|
274
340
|
import "./chunk-QSVPYQPG.js";
|
|
275
341
|
import "./chunk-M62O4P4T.js";
|
|
276
342
|
import "./chunk-4DJQYKMN.js";
|
|
343
|
+
import "./chunk-X6GF3FX2.js";
|
|
344
|
+
import {
|
|
345
|
+
createVersion,
|
|
346
|
+
diffVersions,
|
|
347
|
+
getVersion,
|
|
348
|
+
listVersions,
|
|
349
|
+
revertToVersion
|
|
350
|
+
} from "./chunk-FAAFWE4G.js";
|
|
277
351
|
import {
|
|
278
352
|
initLogger,
|
|
279
353
|
log
|
|
280
354
|
} from "./chunk-2ODBA7MQ.js";
|
|
355
|
+
import "./chunk-DGXUHMOV.js";
|
|
356
|
+
import "./chunk-LPSF4OQH.js";
|
|
357
|
+
import {
|
|
358
|
+
AccessAuditAdapter
|
|
359
|
+
} from "./chunk-TVVEYCNW.js";
|
|
360
|
+
import {
|
|
361
|
+
DEFAULT_ANOMALY_DETECTOR_CONFIG,
|
|
362
|
+
detectRecallAnomalies,
|
|
363
|
+
normalizeQueryText
|
|
364
|
+
} from "./chunk-RFYAYKTD.js";
|
|
365
|
+
import "./chunk-LBLXEFWK.js";
|
|
366
|
+
import "./chunk-XKECPATV.js";
|
|
367
|
+
import {
|
|
368
|
+
formatZodError,
|
|
369
|
+
memoryStoreRequestSchema,
|
|
370
|
+
observeRequestSchema,
|
|
371
|
+
recallRequestSchema,
|
|
372
|
+
suggestionSubmitRequestSchema,
|
|
373
|
+
validateRequest
|
|
374
|
+
} from "./chunk-WCLICCGB.js";
|
|
375
|
+
|
|
376
|
+
// src/coding/review-context.ts
|
|
377
|
+
var REVIEW_KEYWORD_PATTERNS = [
|
|
378
|
+
/\breview\b/i,
|
|
379
|
+
/\bdiff\b/i,
|
|
380
|
+
/\bwhat changed\b/i,
|
|
381
|
+
/\blook at this pr\b/i,
|
|
382
|
+
/\bwhat('?s|\s+is)\s+in\s+this\s+(pr|patch|diff|change)\b/i,
|
|
383
|
+
/\bcode review\b/i
|
|
384
|
+
];
|
|
385
|
+
function isReviewPrompt(prompt) {
|
|
386
|
+
if (typeof prompt !== "string") return false;
|
|
387
|
+
const trimmed = prompt.trim();
|
|
388
|
+
if (!trimmed) return false;
|
|
389
|
+
return REVIEW_KEYWORD_PATTERNS.some((re) => re.test(trimmed));
|
|
390
|
+
}
|
|
391
|
+
function parseTouchedFiles(diff) {
|
|
392
|
+
if (typeof diff !== "string" || !diff.trim()) return [];
|
|
393
|
+
const touched = /* @__PURE__ */ new Set();
|
|
394
|
+
const lines = diff.split(/\r?\n/);
|
|
395
|
+
for (const line of lines) {
|
|
396
|
+
const gitPrefix = line.match(/^diff --git\s+/);
|
|
397
|
+
if (gitPrefix) {
|
|
398
|
+
const rest = line.slice(gitPrefix[0].length);
|
|
399
|
+
const paths = splitDiffGitPaths(rest);
|
|
400
|
+
if (paths) {
|
|
401
|
+
for (const raw of paths) {
|
|
402
|
+
const stripped = stripDiffPathPrefix(raw);
|
|
403
|
+
if (stripped && stripped !== "/dev/null") touched.add(stripped);
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
continue;
|
|
407
|
+
}
|
|
408
|
+
const headerPrefix = line.match(/^(?:---|\+\+\+)[ \t]+/);
|
|
409
|
+
if (headerPrefix) {
|
|
410
|
+
const tail = line.slice(headerPrefix[0].length).replace(/[ \t]+$/, "");
|
|
411
|
+
const raw = extractSingleDiffPathToken(tail);
|
|
412
|
+
if (raw) {
|
|
413
|
+
const stripped = stripDiffPathPrefix(raw);
|
|
414
|
+
if (stripped && stripped !== "/dev/null") touched.add(stripped);
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
return Array.from(touched).sort();
|
|
419
|
+
}
|
|
420
|
+
function extractSingleDiffPathToken(tail) {
|
|
421
|
+
if (tail.length === 0) return null;
|
|
422
|
+
if (tail[0] === '"') {
|
|
423
|
+
let j2 = 1;
|
|
424
|
+
while (j2 < tail.length) {
|
|
425
|
+
if (tail[j2] === "\\" && j2 + 1 < tail.length) {
|
|
426
|
+
j2 += 2;
|
|
427
|
+
continue;
|
|
428
|
+
}
|
|
429
|
+
if (tail[j2] === '"') break;
|
|
430
|
+
j2 += 1;
|
|
431
|
+
}
|
|
432
|
+
if (j2 >= tail.length) return null;
|
|
433
|
+
return tail.slice(0, j2 + 1);
|
|
434
|
+
}
|
|
435
|
+
let j = 0;
|
|
436
|
+
while (j < tail.length && tail[j] !== " " && tail[j] !== " ") j += 1;
|
|
437
|
+
return tail.slice(0, j);
|
|
438
|
+
}
|
|
439
|
+
function splitDiffGitPaths(rest) {
|
|
440
|
+
const tokens = [];
|
|
441
|
+
let i = 0;
|
|
442
|
+
while (i < rest.length && tokens.length < 2) {
|
|
443
|
+
while (i < rest.length && (rest[i] === " " || rest[i] === " ")) i += 1;
|
|
444
|
+
if (i >= rest.length) break;
|
|
445
|
+
if (rest[i] === '"') {
|
|
446
|
+
let j = i + 1;
|
|
447
|
+
while (j < rest.length) {
|
|
448
|
+
if (rest[j] === "\\" && j + 1 < rest.length) {
|
|
449
|
+
j += 2;
|
|
450
|
+
continue;
|
|
451
|
+
}
|
|
452
|
+
if (rest[j] === '"') break;
|
|
453
|
+
j += 1;
|
|
454
|
+
}
|
|
455
|
+
if (j >= rest.length) return null;
|
|
456
|
+
tokens.push(rest.slice(i, j + 1));
|
|
457
|
+
i = j + 1;
|
|
458
|
+
} else {
|
|
459
|
+
let j = i;
|
|
460
|
+
while (j < rest.length && rest[j] !== " " && rest[j] !== " ") j += 1;
|
|
461
|
+
tokens.push(rest.slice(i, j));
|
|
462
|
+
i = j;
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
if (tokens.length !== 2) return null;
|
|
466
|
+
return [tokens[0], tokens[1]];
|
|
467
|
+
}
|
|
468
|
+
function stripDiffPathPrefix(raw) {
|
|
469
|
+
let s = raw;
|
|
470
|
+
if (s.length >= 2 && s[0] === '"' && s[s.length - 1] === '"') {
|
|
471
|
+
s = s.slice(1, -1);
|
|
472
|
+
s = s.replace(/\\(["\\])/g, "$1");
|
|
473
|
+
}
|
|
474
|
+
s = s.replace(/\\/g, "/");
|
|
475
|
+
if (s.startsWith("a/") || s.startsWith("b/")) s = s.slice(2);
|
|
476
|
+
return s;
|
|
477
|
+
}
|
|
478
|
+
var BOOST_PER_MATCH = 0.5;
|
|
479
|
+
var MAX_BOOST = 1;
|
|
480
|
+
function countPathHits(entityRefs, touchedFiles) {
|
|
481
|
+
if (!entityRefs || entityRefs.length === 0) return 0;
|
|
482
|
+
if (touchedFiles.length === 0) return 0;
|
|
483
|
+
let hits = 0;
|
|
484
|
+
for (const ref of entityRefs) {
|
|
485
|
+
if (typeof ref !== "string" || !ref) continue;
|
|
486
|
+
const lowered = ref.toLowerCase();
|
|
487
|
+
for (const file of touchedFiles) {
|
|
488
|
+
const flower = file.toLowerCase();
|
|
489
|
+
if (lowered === flower) {
|
|
490
|
+
hits += 1;
|
|
491
|
+
break;
|
|
492
|
+
}
|
|
493
|
+
if (lowered.includes(flower) || flower.includes(lowered)) {
|
|
494
|
+
hits += 1;
|
|
495
|
+
break;
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
return hits;
|
|
500
|
+
}
|
|
501
|
+
function rankReviewCandidates(candidates, touchedFiles) {
|
|
502
|
+
const annotated = candidates.map((c) => {
|
|
503
|
+
const hits = countPathHits(c.entityRefs, touchedFiles);
|
|
504
|
+
const boost = Math.min(MAX_BOOST, hits * BOOST_PER_MATCH);
|
|
505
|
+
return { ...c, boost };
|
|
506
|
+
});
|
|
507
|
+
annotated.sort((a, b) => {
|
|
508
|
+
const adjA = a.score + a.boost;
|
|
509
|
+
const adjB = b.score + b.boost;
|
|
510
|
+
if (adjA !== adjB) return adjB - adjA;
|
|
511
|
+
if (a.id < b.id) return -1;
|
|
512
|
+
if (a.id > b.id) return 1;
|
|
513
|
+
return 0;
|
|
514
|
+
});
|
|
515
|
+
return annotated;
|
|
516
|
+
}
|
|
517
|
+
function packReviewContext(input) {
|
|
518
|
+
const touchedFiles = parseTouchedFiles(input.diff);
|
|
519
|
+
const rankedRecall = rankReviewCandidates(input.candidates, touchedFiles);
|
|
520
|
+
return { touchedFiles, rankedRecall };
|
|
521
|
+
}
|
|
281
522
|
|
|
282
523
|
// src/binary-lifecycle/types.ts
|
|
283
524
|
var DEFAULT_SCAN_PATTERNS = [
|
|
@@ -690,7 +931,8 @@ var CATEGORY_DIR_MAP = {
|
|
|
690
931
|
rule: "rules",
|
|
691
932
|
skill: "skills",
|
|
692
933
|
relationship: "relationships",
|
|
693
|
-
procedure: "procedures"
|
|
934
|
+
procedure: "procedures",
|
|
935
|
+
reasoning_trace: "reasoning-traces"
|
|
694
936
|
};
|
|
695
937
|
var ALL_CATEGORY_DIRS = [
|
|
696
938
|
"facts",
|
|
@@ -4777,237 +5019,6 @@ function publisherForConnector(connectorId) {
|
|
|
4777
5019
|
return publisherFor(hostIdForConnector(connectorId));
|
|
4778
5020
|
}
|
|
4779
5021
|
|
|
4780
|
-
// src/taxonomy/default-taxonomy.ts
|
|
4781
|
-
var DEFAULT_TAXONOMY = {
|
|
4782
|
-
version: 1,
|
|
4783
|
-
categories: [
|
|
4784
|
-
{
|
|
4785
|
-
id: "corrections",
|
|
4786
|
-
name: "Corrections",
|
|
4787
|
-
description: "Corrections to previously stored information",
|
|
4788
|
-
filingRules: ["Any update that supersedes a prior fact"],
|
|
4789
|
-
priority: 10,
|
|
4790
|
-
memoryCategories: ["correction"]
|
|
4791
|
-
},
|
|
4792
|
-
{
|
|
4793
|
-
id: "principles",
|
|
4794
|
-
name: "Principles",
|
|
4795
|
-
description: "Rules, guidelines, and recurring patterns",
|
|
4796
|
-
filingRules: ["A guiding principle, rule, or skill"],
|
|
4797
|
-
priority: 20,
|
|
4798
|
-
memoryCategories: ["principle", "rule", "skill"]
|
|
4799
|
-
},
|
|
4800
|
-
{
|
|
4801
|
-
id: "procedures",
|
|
4802
|
-
name: "Procedures",
|
|
4803
|
-
description: "Ordered multi-step workflows the user repeats",
|
|
4804
|
-
filingRules: ["A repeatable sequence of steps or commands for a task"],
|
|
4805
|
-
priority: 25,
|
|
4806
|
-
memoryCategories: ["procedure"]
|
|
4807
|
-
},
|
|
4808
|
-
{
|
|
4809
|
-
id: "entities",
|
|
4810
|
-
name: "Entities",
|
|
4811
|
-
description: "People, organizations, places, projects",
|
|
4812
|
-
filingRules: ["Named entity with attributes"],
|
|
4813
|
-
priority: 30,
|
|
4814
|
-
memoryCategories: ["entity", "relationship"]
|
|
4815
|
-
},
|
|
4816
|
-
{
|
|
4817
|
-
id: "decisions",
|
|
4818
|
-
name: "Decisions",
|
|
4819
|
-
description: "Choices made and their rationale",
|
|
4820
|
-
filingRules: ["A decision or commitment with reasoning"],
|
|
4821
|
-
priority: 35,
|
|
4822
|
-
memoryCategories: ["decision", "commitment"]
|
|
4823
|
-
},
|
|
4824
|
-
{
|
|
4825
|
-
id: "preferences",
|
|
4826
|
-
name: "Preferences",
|
|
4827
|
-
description: "User likes, dislikes, and style choices",
|
|
4828
|
-
filingRules: ["Anything expressing a preference or taste"],
|
|
4829
|
-
priority: 40,
|
|
4830
|
-
memoryCategories: ["preference"]
|
|
4831
|
-
},
|
|
4832
|
-
{
|
|
4833
|
-
id: "facts",
|
|
4834
|
-
name: "Facts",
|
|
4835
|
-
description: "Objective statements about the world",
|
|
4836
|
-
filingRules: ["Any factual claim or piece of information"],
|
|
4837
|
-
priority: 50,
|
|
4838
|
-
memoryCategories: ["fact"]
|
|
4839
|
-
},
|
|
4840
|
-
{
|
|
4841
|
-
id: "moments",
|
|
4842
|
-
name: "Moments",
|
|
4843
|
-
description: "Significant events or experiences",
|
|
4844
|
-
filingRules: ["A specific event worth remembering"],
|
|
4845
|
-
priority: 60,
|
|
4846
|
-
memoryCategories: ["moment"]
|
|
4847
|
-
}
|
|
4848
|
-
]
|
|
4849
|
-
};
|
|
4850
|
-
|
|
4851
|
-
// src/taxonomy/resolver-doc-generator.ts
|
|
4852
|
-
function generateResolverDocument(taxonomy) {
|
|
4853
|
-
const sorted = [...taxonomy.categories].sort((a, b) => {
|
|
4854
|
-
if (a.priority !== b.priority) return a.priority - b.priority;
|
|
4855
|
-
return a.id.localeCompare(b.id);
|
|
4856
|
-
});
|
|
4857
|
-
const lines = [
|
|
4858
|
-
"# Memory Filing Resolver",
|
|
4859
|
-
"",
|
|
4860
|
-
"Given a new piece of knowledge, follow this tree to determine where it belongs.",
|
|
4861
|
-
""
|
|
4862
|
-
];
|
|
4863
|
-
let step = 1;
|
|
4864
|
-
for (const cat of sorted) {
|
|
4865
|
-
lines.push(`## Step ${step}: ${cat.description}?`);
|
|
4866
|
-
lines.push("");
|
|
4867
|
-
for (const rule of cat.filingRules) {
|
|
4868
|
-
lines.push(`- ${rule}`);
|
|
4869
|
-
}
|
|
4870
|
-
lines.push("");
|
|
4871
|
-
lines.push(
|
|
4872
|
-
`> YES: File under **${cat.id}/** (priority ${cat.priority})`
|
|
4873
|
-
);
|
|
4874
|
-
lines.push("");
|
|
4875
|
-
step++;
|
|
4876
|
-
}
|
|
4877
|
-
lines.push("## Tie-breaking");
|
|
4878
|
-
lines.push("");
|
|
4879
|
-
lines.push(
|
|
4880
|
-
"If a fact could go in multiple categories, file under the one with the **lowest priority number**."
|
|
4881
|
-
);
|
|
4882
|
-
lines.push("");
|
|
4883
|
-
lines.push(`---`);
|
|
4884
|
-
lines.push(`*Generated from taxonomy v${taxonomy.version}*`);
|
|
4885
|
-
lines.push("");
|
|
4886
|
-
return lines.join("\n");
|
|
4887
|
-
}
|
|
4888
|
-
|
|
4889
|
-
// src/taxonomy/taxonomy-loader.ts
|
|
4890
|
-
import { readFile, mkdir, writeFile } from "fs/promises";
|
|
4891
|
-
import path16 from "path";
|
|
4892
|
-
var TAXONOMY_DIR = ".taxonomy";
|
|
4893
|
-
var TAXONOMY_FILE = "taxonomy.json";
|
|
4894
|
-
var MAX_SLUG_LENGTH = 32;
|
|
4895
|
-
var SLUG_RE = /^[a-z][a-z0-9-]*$/;
|
|
4896
|
-
function validateSlug(slug) {
|
|
4897
|
-
if (slug.length === 0) {
|
|
4898
|
-
throw new Error("Taxonomy category ID must not be empty");
|
|
4899
|
-
}
|
|
4900
|
-
if (slug.length > MAX_SLUG_LENGTH) {
|
|
4901
|
-
throw new Error(
|
|
4902
|
-
`Taxonomy category ID "${slug}" exceeds ${MAX_SLUG_LENGTH} characters`
|
|
4903
|
-
);
|
|
4904
|
-
}
|
|
4905
|
-
if (!SLUG_RE.test(slug)) {
|
|
4906
|
-
throw new Error(
|
|
4907
|
-
`Taxonomy category ID "${slug}" is invalid: must be lowercase letters, digits, and hyphens, starting with a letter`
|
|
4908
|
-
);
|
|
4909
|
-
}
|
|
4910
|
-
}
|
|
4911
|
-
function validateTaxonomy(taxonomy) {
|
|
4912
|
-
if (typeof taxonomy.version !== "number" || taxonomy.version < 1) {
|
|
4913
|
-
throw new Error("Taxonomy version must be a positive integer");
|
|
4914
|
-
}
|
|
4915
|
-
if (!Array.isArray(taxonomy.categories)) {
|
|
4916
|
-
throw new Error("Taxonomy categories must be an array");
|
|
4917
|
-
}
|
|
4918
|
-
const seenIds = /* @__PURE__ */ new Set();
|
|
4919
|
-
for (const cat of taxonomy.categories) {
|
|
4920
|
-
validateSlug(cat.id);
|
|
4921
|
-
if (seenIds.has(cat.id)) {
|
|
4922
|
-
throw new Error(`Duplicate taxonomy category ID: "${cat.id}"`);
|
|
4923
|
-
}
|
|
4924
|
-
seenIds.add(cat.id);
|
|
4925
|
-
if (typeof cat.name !== "string" || cat.name.trim().length === 0) {
|
|
4926
|
-
throw new Error(`Taxonomy category "${cat.id}" must have a non-empty name`);
|
|
4927
|
-
}
|
|
4928
|
-
if (typeof cat.description !== "string" || cat.description.trim().length === 0) {
|
|
4929
|
-
throw new Error(`Taxonomy category "${cat.id}" must have a non-empty description`);
|
|
4930
|
-
}
|
|
4931
|
-
if (!Array.isArray(cat.filingRules)) {
|
|
4932
|
-
throw new Error(`Taxonomy category "${cat.id}" filingRules must be an array`);
|
|
4933
|
-
}
|
|
4934
|
-
if (typeof cat.priority !== "number" || !Number.isFinite(cat.priority)) {
|
|
4935
|
-
throw new Error(`Taxonomy category "${cat.id}" must have a finite numeric priority`);
|
|
4936
|
-
}
|
|
4937
|
-
if (!Array.isArray(cat.memoryCategories)) {
|
|
4938
|
-
throw new Error(`Taxonomy category "${cat.id}" memoryCategories must be an array`);
|
|
4939
|
-
}
|
|
4940
|
-
if (cat.parentId !== void 0) {
|
|
4941
|
-
if (typeof cat.parentId !== "string") {
|
|
4942
|
-
throw new Error(`Taxonomy category "${cat.id}" parentId must be a string if set`);
|
|
4943
|
-
}
|
|
4944
|
-
}
|
|
4945
|
-
}
|
|
4946
|
-
for (const cat of taxonomy.categories) {
|
|
4947
|
-
if (cat.parentId !== void 0 && !seenIds.has(cat.parentId)) {
|
|
4948
|
-
throw new Error(
|
|
4949
|
-
`Taxonomy category "${cat.id}" references unknown parentId "${cat.parentId}"`
|
|
4950
|
-
);
|
|
4951
|
-
}
|
|
4952
|
-
}
|
|
4953
|
-
}
|
|
4954
|
-
async function loadTaxonomy(memoryDir) {
|
|
4955
|
-
const taxonomyPath = path16.join(memoryDir, TAXONOMY_DIR, TAXONOMY_FILE);
|
|
4956
|
-
let raw;
|
|
4957
|
-
try {
|
|
4958
|
-
raw = await readFile(taxonomyPath, "utf-8");
|
|
4959
|
-
} catch (err) {
|
|
4960
|
-
if (err instanceof Error && err.code === "ENOENT") {
|
|
4961
|
-
return structuredClone(DEFAULT_TAXONOMY);
|
|
4962
|
-
}
|
|
4963
|
-
throw err;
|
|
4964
|
-
}
|
|
4965
|
-
const parsed = JSON.parse(raw);
|
|
4966
|
-
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
|
|
4967
|
-
throw new Error("taxonomy.json must be a JSON object");
|
|
4968
|
-
}
|
|
4969
|
-
const obj = parsed;
|
|
4970
|
-
const userVersion = typeof obj.version === "number" ? obj.version : DEFAULT_TAXONOMY.version;
|
|
4971
|
-
const userCategories = Array.isArray(obj.categories) ? obj.categories : [];
|
|
4972
|
-
const userIdCounts = /* @__PURE__ */ new Map();
|
|
4973
|
-
for (const cat of userCategories) {
|
|
4974
|
-
const id = typeof cat.id === "string" ? cat.id : String(cat.id);
|
|
4975
|
-
userIdCounts.set(id, (userIdCounts.get(id) ?? 0) + 1);
|
|
4976
|
-
}
|
|
4977
|
-
const duplicateIds = [...userIdCounts.entries()].filter(([, count]) => count > 1).map(([id]) => id);
|
|
4978
|
-
if (duplicateIds.length > 0) {
|
|
4979
|
-
throw new Error(
|
|
4980
|
-
`Duplicate category IDs in taxonomy.json: ${duplicateIds.map((id) => `"${id}"`).join(", ")}`
|
|
4981
|
-
);
|
|
4982
|
-
}
|
|
4983
|
-
const mergedMap = /* @__PURE__ */ new Map();
|
|
4984
|
-
for (const cat of DEFAULT_TAXONOMY.categories) {
|
|
4985
|
-
mergedMap.set(cat.id, { ...cat });
|
|
4986
|
-
}
|
|
4987
|
-
for (const cat of userCategories) {
|
|
4988
|
-
mergedMap.set(cat.id, cat);
|
|
4989
|
-
}
|
|
4990
|
-
const merged = {
|
|
4991
|
-
version: userVersion,
|
|
4992
|
-
categories: [...mergedMap.values()]
|
|
4993
|
-
};
|
|
4994
|
-
validateTaxonomy(merged);
|
|
4995
|
-
return merged;
|
|
4996
|
-
}
|
|
4997
|
-
async function saveTaxonomy(memoryDir, taxonomy) {
|
|
4998
|
-
validateTaxonomy(taxonomy);
|
|
4999
|
-
const dir = path16.join(memoryDir, TAXONOMY_DIR);
|
|
5000
|
-
await mkdir(dir, { recursive: true });
|
|
5001
|
-
const filePath = path16.join(dir, TAXONOMY_FILE);
|
|
5002
|
-
await writeFile(filePath, JSON.stringify(taxonomy, null, 2) + "\n", "utf-8");
|
|
5003
|
-
}
|
|
5004
|
-
function getTaxonomyDir(memoryDir) {
|
|
5005
|
-
return path16.join(memoryDir, TAXONOMY_DIR);
|
|
5006
|
-
}
|
|
5007
|
-
function getTaxonomyFilePath(memoryDir) {
|
|
5008
|
-
return path16.join(memoryDir, TAXONOMY_DIR, TAXONOMY_FILE);
|
|
5009
|
-
}
|
|
5010
|
-
|
|
5011
5022
|
// src/enrichment/types.ts
|
|
5012
5023
|
function defaultEnrichmentPipelineConfig() {
|
|
5013
5024
|
return {
|
|
@@ -5233,22 +5244,22 @@ async function runEnrichmentPipeline(entities, registry, config, log2) {
|
|
|
5233
5244
|
}
|
|
5234
5245
|
|
|
5235
5246
|
// src/enrichment/audit.ts
|
|
5236
|
-
import { mkdir
|
|
5247
|
+
import { mkdir, readFile, appendFile } from "fs/promises";
|
|
5237
5248
|
import { existsSync as existsSync2 } from "fs";
|
|
5238
|
-
import
|
|
5249
|
+
import path16 from "path";
|
|
5239
5250
|
var AUDIT_FILENAME = "enrichment-audit.jsonl";
|
|
5240
5251
|
function auditFilePath(auditDir) {
|
|
5241
|
-
return
|
|
5252
|
+
return path16.join(auditDir, AUDIT_FILENAME);
|
|
5242
5253
|
}
|
|
5243
5254
|
async function appendAuditEntry(auditDir, entry) {
|
|
5244
|
-
await
|
|
5255
|
+
await mkdir(auditDir, { recursive: true });
|
|
5245
5256
|
const line = JSON.stringify(entry) + "\n";
|
|
5246
5257
|
await appendFile(auditFilePath(auditDir), line, "utf-8");
|
|
5247
5258
|
}
|
|
5248
5259
|
async function readAuditLog(auditDir, since) {
|
|
5249
5260
|
const filePath = auditFilePath(auditDir);
|
|
5250
5261
|
if (!existsSync2(filePath)) return [];
|
|
5251
|
-
const raw = await
|
|
5262
|
+
const raw = await readFile(filePath, "utf-8");
|
|
5252
5263
|
const entries = [];
|
|
5253
5264
|
for (const line of raw.split("\n")) {
|
|
5254
5265
|
const trimmed = line.trim();
|
|
@@ -5265,17 +5276,147 @@ async function readAuditLog(auditDir, since) {
|
|
|
5265
5276
|
}
|
|
5266
5277
|
return entries;
|
|
5267
5278
|
}
|
|
5279
|
+
|
|
5280
|
+
// src/importers/base.ts
|
|
5281
|
+
var DEFAULT_IMPORT_BATCH_SIZE = 25;
|
|
5282
|
+
var MIN_IMPORT_BATCH_SIZE = 1;
|
|
5283
|
+
var MAX_IMPORT_BATCH_SIZE = 500;
|
|
5284
|
+
function validateImportBatchSize(value) {
|
|
5285
|
+
if (value === void 0) return DEFAULT_IMPORT_BATCH_SIZE;
|
|
5286
|
+
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
5287
|
+
throw new Error(
|
|
5288
|
+
`batchSize must be a finite number, received ${String(value)}`
|
|
5289
|
+
);
|
|
5290
|
+
}
|
|
5291
|
+
if (!Number.isInteger(value)) {
|
|
5292
|
+
throw new Error(`batchSize must be an integer, received ${value}`);
|
|
5293
|
+
}
|
|
5294
|
+
if (value < MIN_IMPORT_BATCH_SIZE || value > MAX_IMPORT_BATCH_SIZE) {
|
|
5295
|
+
throw new Error(
|
|
5296
|
+
`batchSize must be between ${MIN_IMPORT_BATCH_SIZE} and ${MAX_IMPORT_BATCH_SIZE}, received ${value}`
|
|
5297
|
+
);
|
|
5298
|
+
}
|
|
5299
|
+
return value;
|
|
5300
|
+
}
|
|
5301
|
+
function validateImportRateLimit(value) {
|
|
5302
|
+
if (value === void 0) return void 0;
|
|
5303
|
+
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
5304
|
+
throw new Error(
|
|
5305
|
+
`rateLimit must be a finite number (requests per second), received ${String(value)}`
|
|
5306
|
+
);
|
|
5307
|
+
}
|
|
5308
|
+
if (value <= 0) {
|
|
5309
|
+
throw new Error(
|
|
5310
|
+
`rateLimit must be greater than 0 (requests per second), received ${value}`
|
|
5311
|
+
);
|
|
5312
|
+
}
|
|
5313
|
+
return value;
|
|
5314
|
+
}
|
|
5315
|
+
function importedMemoryToTurn(memory) {
|
|
5316
|
+
const timestamp = typeof memory.sourceTimestamp === "string" && memory.sourceTimestamp.length > 0 ? memory.sourceTimestamp : memory.importedAt ?? (/* @__PURE__ */ new Date()).toISOString();
|
|
5317
|
+
return {
|
|
5318
|
+
role: "user",
|
|
5319
|
+
content: memory.content,
|
|
5320
|
+
timestamp,
|
|
5321
|
+
participantName: memory.sourceLabel,
|
|
5322
|
+
...memory.sourceId !== void 0 ? { participantId: memory.sourceId } : {}
|
|
5323
|
+
};
|
|
5324
|
+
}
|
|
5325
|
+
async function runImporter(adapter, input, target, options = {}) {
|
|
5326
|
+
const batchSize = validateImportBatchSize(options.batchSize);
|
|
5327
|
+
validateImportRateLimit(options.rateLimit);
|
|
5328
|
+
const importedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
5329
|
+
const dryRun = options.dryRun === true;
|
|
5330
|
+
const onProgress = options.onProgress;
|
|
5331
|
+
onProgress?.({ processed: 0, total: 0, phase: "parse" });
|
|
5332
|
+
const parseOptions = {
|
|
5333
|
+
...options.rateLimit !== void 0 ? { rateLimit: options.rateLimit } : {},
|
|
5334
|
+
...options.parseOptions ?? {}
|
|
5335
|
+
};
|
|
5336
|
+
const parsed = await adapter.parse(input, parseOptions);
|
|
5337
|
+
onProgress?.({ processed: 0, total: 0, phase: "transform" });
|
|
5338
|
+
const memoriesRaw = await adapter.transform(parsed, options.transformOptions);
|
|
5339
|
+
if (!Array.isArray(memoriesRaw)) {
|
|
5340
|
+
throw new Error(
|
|
5341
|
+
`Importer '${adapter.name}' transform() returned a non-array. Adapters must produce ImportedMemory[].`
|
|
5342
|
+
);
|
|
5343
|
+
}
|
|
5344
|
+
const memories = memoriesRaw.map((memory) => {
|
|
5345
|
+
const sourceLabel = typeof memory.sourceLabel === "string" && memory.sourceLabel.length > 0 ? memory.sourceLabel : adapter.sourceLabel;
|
|
5346
|
+
return {
|
|
5347
|
+
...memory,
|
|
5348
|
+
sourceLabel,
|
|
5349
|
+
importedAt: memory.importedAt ?? importedAt
|
|
5350
|
+
};
|
|
5351
|
+
});
|
|
5352
|
+
if (dryRun) {
|
|
5353
|
+
onProgress?.({
|
|
5354
|
+
processed: memories.length,
|
|
5355
|
+
total: memories.length,
|
|
5356
|
+
phase: "dry-run"
|
|
5357
|
+
});
|
|
5358
|
+
return {
|
|
5359
|
+
adapter: adapter.name,
|
|
5360
|
+
sourceLabel: adapter.sourceLabel,
|
|
5361
|
+
memoriesPlanned: memories.length,
|
|
5362
|
+
memoriesWritten: 0,
|
|
5363
|
+
batchesProcessed: 0,
|
|
5364
|
+
dryRun: true,
|
|
5365
|
+
importedAt
|
|
5366
|
+
};
|
|
5367
|
+
}
|
|
5368
|
+
let batchesProcessed = 0;
|
|
5369
|
+
let memoriesWritten = 0;
|
|
5370
|
+
for (let i = 0; i < memories.length; i += batchSize) {
|
|
5371
|
+
const batch = memories.slice(i, i + batchSize);
|
|
5372
|
+
const result = await adapter.writeTo(target, batch, options);
|
|
5373
|
+
memoriesWritten += result.memoriesIngested;
|
|
5374
|
+
batchesProcessed += 1;
|
|
5375
|
+
onProgress?.({
|
|
5376
|
+
processed: Math.min(i + batch.length, memories.length),
|
|
5377
|
+
total: memories.length,
|
|
5378
|
+
phase: "write"
|
|
5379
|
+
});
|
|
5380
|
+
}
|
|
5381
|
+
return {
|
|
5382
|
+
adapter: adapter.name,
|
|
5383
|
+
sourceLabel: adapter.sourceLabel,
|
|
5384
|
+
memoriesPlanned: memories.length,
|
|
5385
|
+
memoriesWritten,
|
|
5386
|
+
batchesProcessed,
|
|
5387
|
+
dryRun: false,
|
|
5388
|
+
importedAt
|
|
5389
|
+
};
|
|
5390
|
+
}
|
|
5391
|
+
async function defaultWriteMemoriesToOrchestrator(target, memories) {
|
|
5392
|
+
if (memories.length === 0) {
|
|
5393
|
+
return { memoriesIngested: 0 };
|
|
5394
|
+
}
|
|
5395
|
+
const turns = memories.map(importedMemoryToTurn);
|
|
5396
|
+
await target.ingestBulkImportBatch(turns);
|
|
5397
|
+
return { memoriesIngested: memories.length };
|
|
5398
|
+
}
|
|
5268
5399
|
export {
|
|
5400
|
+
AccessAuditAdapter,
|
|
5269
5401
|
BRIEFING_FORMAT_ALLOWED,
|
|
5270
5402
|
BootstrapEngine,
|
|
5271
5403
|
CITATION_UNKNOWN,
|
|
5272
5404
|
CODEX_THREAD_KEY_PREFIX,
|
|
5273
5405
|
ClaudeCodeMemoryExtensionPublisher,
|
|
5274
5406
|
CodexMemoryExtensionPublisher,
|
|
5407
|
+
CrossNamespaceBudget,
|
|
5408
|
+
DEFAULT_ANOMALY_DETECTOR_CONFIG,
|
|
5275
5409
|
DEFAULT_CITATION_FORMAT,
|
|
5410
|
+
DEFAULT_CROSS_NAMESPACE_BUDGET,
|
|
5276
5411
|
DEFAULT_GRACE_PERIOD_DAYS,
|
|
5412
|
+
DEFAULT_IMPORT_BATCH_SIZE,
|
|
5277
5413
|
DEFAULT_MAX_BINARY_SIZE_BYTES,
|
|
5414
|
+
DEFAULT_PPR_DAMPING,
|
|
5415
|
+
DEFAULT_PPR_ITERATIONS,
|
|
5416
|
+
DEFAULT_PPR_TOLERANCE,
|
|
5417
|
+
DEFAULT_REASONING_TRACE_BOOST,
|
|
5278
5418
|
DEFAULT_SCAN_PATTERNS,
|
|
5419
|
+
DEFAULT_SURPRISE_K,
|
|
5279
5420
|
DEFAULT_TAXONOMY,
|
|
5280
5421
|
FILTER_LABELS as DIRECT_ANSWER_FILTER_LABELS,
|
|
5281
5422
|
EngramAccessHttpServer,
|
|
@@ -5300,22 +5441,29 @@ export {
|
|
|
5300
5441
|
PLUGIN_ID,
|
|
5301
5442
|
PUBLISHERS,
|
|
5302
5443
|
QmdClient,
|
|
5444
|
+
RECALL_XRAY_FORMATS,
|
|
5303
5445
|
REMNIC_CITATION_FORMAT,
|
|
5304
5446
|
REMNIC_EXTENSIONS_TOTAL_TOKEN_LIMIT,
|
|
5305
5447
|
REMNIC_MCP_TOOL_INVENTORY,
|
|
5306
5448
|
REMNIC_RECALL_DECISION_RULES,
|
|
5307
5449
|
REMNIC_SEMANTIC_OVERVIEW,
|
|
5308
5450
|
SENTINEL_FILE,
|
|
5451
|
+
SmartBuffer,
|
|
5309
5452
|
StorageManager,
|
|
5310
5453
|
WebSearchProvider,
|
|
5311
5454
|
appendAuditEntry,
|
|
5455
|
+
applyMemoryWorthFilter,
|
|
5456
|
+
applyReasoningTraceBoost,
|
|
5312
5457
|
attachCitation,
|
|
5458
|
+
branchNamespaceName,
|
|
5313
5459
|
briefingFilename,
|
|
5314
5460
|
buildBriefing,
|
|
5315
5461
|
buildCitationGuidance,
|
|
5316
5462
|
buildEntityRecallSection,
|
|
5317
5463
|
buildExtensionsBlockForConsolidation,
|
|
5318
5464
|
buildExtensionsFooterForSummary,
|
|
5465
|
+
buildGraphFromMemories,
|
|
5466
|
+
buildMemoryWorthCounterMap,
|
|
5319
5467
|
buildProcedureMarkdownBody,
|
|
5320
5468
|
buildProcedureRecallSection,
|
|
5321
5469
|
checkMarketplaceManifest,
|
|
@@ -5323,6 +5471,9 @@ export {
|
|
|
5323
5471
|
clearTrainingExportAdapters,
|
|
5324
5472
|
clearVerdictCache,
|
|
5325
5473
|
coerceInstallExtension,
|
|
5474
|
+
computeMemoryWorth,
|
|
5475
|
+
computeProcedureStats,
|
|
5476
|
+
computeSurprise,
|
|
5326
5477
|
convertMemoriesToRecords,
|
|
5327
5478
|
createBackend,
|
|
5328
5479
|
createSpace,
|
|
@@ -5332,14 +5483,19 @@ export {
|
|
|
5332
5483
|
decideSemanticDedup,
|
|
5333
5484
|
defaultEnrichmentPipelineConfig,
|
|
5334
5485
|
defaultWorkspaceDir,
|
|
5486
|
+
defaultWriteMemoriesToOrchestrator,
|
|
5335
5487
|
deleteSpace,
|
|
5336
5488
|
deriveSessionId,
|
|
5489
|
+
describeCodingScope,
|
|
5337
5490
|
describeMemoriesDir,
|
|
5491
|
+
detectRecallAnomalies,
|
|
5338
5492
|
diffVersions,
|
|
5339
5493
|
discoverMemoryExtensions,
|
|
5340
5494
|
doctorConnector,
|
|
5341
5495
|
emptyManifest,
|
|
5342
5496
|
ensureSentinel,
|
|
5497
|
+
expandTildePath,
|
|
5498
|
+
extractGraphEdges,
|
|
5343
5499
|
findContradictions,
|
|
5344
5500
|
findDuplicates,
|
|
5345
5501
|
focusMatchesEntity,
|
|
@@ -5347,6 +5503,7 @@ export {
|
|
|
5347
5503
|
formatBatchTranscript,
|
|
5348
5504
|
formatCitation,
|
|
5349
5505
|
formatOaiMemCitation,
|
|
5506
|
+
formatProcedureStatsText,
|
|
5350
5507
|
formatZodError,
|
|
5351
5508
|
generateContextTree,
|
|
5352
5509
|
generateMarketplaceManifest,
|
|
@@ -5363,19 +5520,27 @@ export {
|
|
|
5363
5520
|
getTaxonomyDir,
|
|
5364
5521
|
getTaxonomyFilePath,
|
|
5365
5522
|
getTrainingExportAdapter,
|
|
5523
|
+
getVerdictKind,
|
|
5366
5524
|
getVersion,
|
|
5367
5525
|
hasBroadGraphIntent,
|
|
5368
5526
|
hasCitation,
|
|
5369
5527
|
hostIdForConnector,
|
|
5528
|
+
importedMemoryToTurn,
|
|
5370
5529
|
inferIntentFromText,
|
|
5371
5530
|
initLogger,
|
|
5372
5531
|
installConnector,
|
|
5373
5532
|
installFromMarketplace,
|
|
5374
5533
|
intentCompatibilityScore,
|
|
5375
5534
|
isDirectAnswerEligible,
|
|
5535
|
+
isDurableVerdict,
|
|
5536
|
+
isEdgeType,
|
|
5376
5537
|
isImportRole,
|
|
5538
|
+
isNodeType,
|
|
5539
|
+
isReasoningTracePath,
|
|
5540
|
+
isReviewPrompt,
|
|
5377
5541
|
isTaskInitiationIntent,
|
|
5378
5542
|
isTrustZoneName,
|
|
5543
|
+
isValidCachedVerdict,
|
|
5379
5544
|
judgeFactDurability,
|
|
5380
5545
|
listBulkImportSources,
|
|
5381
5546
|
listConnectors,
|
|
@@ -5390,15 +5555,21 @@ export {
|
|
|
5390
5555
|
loadTaxonomy,
|
|
5391
5556
|
loadTokenStore,
|
|
5392
5557
|
log,
|
|
5558
|
+
looksLikeProblemSolvingQuery,
|
|
5393
5559
|
manifestDir,
|
|
5394
5560
|
manifestPath,
|
|
5395
5561
|
matchesPatterns,
|
|
5396
5562
|
materializeForNamespace,
|
|
5397
5563
|
memoryStoreRequestSchema,
|
|
5564
|
+
memoryWorthOutcomeEligibleCategories,
|
|
5398
5565
|
mergeSpaces,
|
|
5399
5566
|
migrateFromEngram,
|
|
5567
|
+
normalizeCachedVerdict,
|
|
5568
|
+
normalizeOriginUrl,
|
|
5569
|
+
normalizeQueryText,
|
|
5400
5570
|
observeRequestSchema,
|
|
5401
5571
|
onboard,
|
|
5572
|
+
packReviewContext,
|
|
5402
5573
|
parseAllCitations,
|
|
5403
5574
|
parseBriefingFocus,
|
|
5404
5575
|
parseBriefingWindow,
|
|
@@ -5408,17 +5579,25 @@ export {
|
|
|
5408
5579
|
parseOaiMemCitation,
|
|
5409
5580
|
parseProcedureStepsFromBody,
|
|
5410
5581
|
parseStrictCliDate,
|
|
5582
|
+
parseTouchedFiles,
|
|
5583
|
+
parseXrayBudgetFlag,
|
|
5584
|
+
parseXrayCliOptions,
|
|
5585
|
+
parseXrayFormat,
|
|
5411
5586
|
performReview,
|
|
5412
5587
|
planRecallMode,
|
|
5588
|
+
projectNamespaceName,
|
|
5413
5589
|
promoteSpace,
|
|
5414
5590
|
publisherFor,
|
|
5415
5591
|
publisherForConnector,
|
|
5416
5592
|
pullFromSpace,
|
|
5417
5593
|
pushToSpace,
|
|
5594
|
+
queryGraph,
|
|
5595
|
+
rankReviewCandidates,
|
|
5418
5596
|
readAuditLog,
|
|
5419
5597
|
readManifest,
|
|
5420
5598
|
recallForActiveMemory,
|
|
5421
5599
|
recallRequestSchema,
|
|
5600
|
+
recordMemoryOutcome,
|
|
5422
5601
|
registerBulkImportSource,
|
|
5423
5602
|
registerPublisher,
|
|
5424
5603
|
registerTrainingExportAdapter,
|
|
@@ -5426,10 +5605,17 @@ export {
|
|
|
5426
5605
|
renderBriefingMarkdown,
|
|
5427
5606
|
renderExtensionsBlock,
|
|
5428
5607
|
renderExtensionsFooter,
|
|
5608
|
+
renderXray,
|
|
5609
|
+
renderXrayJson,
|
|
5610
|
+
renderXrayMarkdown,
|
|
5611
|
+
renderXrayText,
|
|
5612
|
+
reportBufferSurpriseDistribution,
|
|
5429
5613
|
resolveBriefingSaveDir,
|
|
5430
5614
|
resolveCategory,
|
|
5615
|
+
resolveCodingNamespaceOverlay,
|
|
5431
5616
|
resolveConnectorFromToken,
|
|
5432
5617
|
resolveExtensionsRoot,
|
|
5618
|
+
resolveGitContext,
|
|
5433
5619
|
resolvePrincipal,
|
|
5434
5620
|
resolveRemnicPluginEntry,
|
|
5435
5621
|
revertToVersion,
|
|
@@ -5440,6 +5626,8 @@ export {
|
|
|
5440
5626
|
runBulkImportPipeline,
|
|
5441
5627
|
runCodexMaterialize,
|
|
5442
5628
|
runEnrichmentPipeline,
|
|
5629
|
+
runGraphRecall,
|
|
5630
|
+
runImporter,
|
|
5443
5631
|
runPostConsolidationMaterialize,
|
|
5444
5632
|
sanitizeNoteForCitation,
|
|
5445
5633
|
sanitizeSessionKeyForFilename,
|
|
@@ -5449,11 +5637,14 @@ export {
|
|
|
5449
5637
|
saveTokenStore,
|
|
5450
5638
|
scanForBinaries,
|
|
5451
5639
|
shareSpace,
|
|
5640
|
+
stableHash,
|
|
5452
5641
|
stripCitation,
|
|
5453
5642
|
suggestionSubmitRequestSchema,
|
|
5454
5643
|
switchSpace,
|
|
5455
5644
|
syncChanges,
|
|
5456
5645
|
validateBriefingFormat,
|
|
5646
|
+
validateImportBatchSize,
|
|
5647
|
+
validateImportRateLimit,
|
|
5457
5648
|
validateImportTurn,
|
|
5458
5649
|
validateMarketplaceManifest,
|
|
5459
5650
|
validateRequest,
|