@remnic/core 9.3.665 → 9.3.666
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.js +2 -2
- package/dist/access-cli.js +41 -40
- package/dist/access-cli.js.map +1 -1
- package/dist/access-http.d.ts +3 -2
- package/dist/access-http.js +25 -25
- package/dist/access-mcp.d.ts +3 -2
- package/dist/access-mcp.js +22 -22
- package/dist/access-schema.d.ts +36 -36
- package/dist/access-schema.js +3 -3
- package/dist/{access-service-D0SLB4MH.d.ts → access-service-DsS-TatL.d.ts} +1 -1
- package/dist/access-service.d.ts +3 -2
- package/dist/access-service.js +21 -21
- package/dist/adapters/index.js +4 -4
- package/dist/adapters/registry.js +2 -2
- package/dist/bootstrap.d.ts +2 -1
- package/dist/briefing.js +4 -3
- package/dist/capabilities.d.ts +73 -0
- package/dist/capabilities.js +8 -0
- package/dist/capabilities.js.map +1 -0
- package/dist/causal-behavior.js +2 -2
- package/dist/causal-chain.js +2 -2
- package/dist/causal-consolidation.js +7 -6
- package/dist/causal-consolidation.js.map +1 -1
- package/dist/causal-retrieval.js +2 -2
- package/dist/causal-trajectory.js +1 -1
- package/dist/{chunk-ROHLEUTH.js → chunk-23EBQ27U.js} +5 -5
- package/dist/{chunk-YW52BQSU.js → chunk-2TCHDANJ.js} +2 -2
- package/dist/{chunk-IROWLAWG.js → chunk-46WUVFOD.js} +4 -4
- package/dist/{chunk-7C4MPEPE.js → chunk-4T7P2HLJ.js} +3 -3
- package/dist/{chunk-7XH7VJN4.js → chunk-6T4LTI2F.js} +4 -4
- package/dist/{chunk-TVVEYCNW.js → chunk-7K5Q6COX.js} +4 -4
- package/dist/{chunk-BZG2CWOQ.js → chunk-A5TEHAR4.js} +3 -3
- package/dist/{chunk-C7AF236A.js → chunk-AARDBQTA.js} +2 -2
- package/dist/{chunk-IHG6CC7T.js → chunk-BQJUPECT.js} +2 -2
- package/dist/{chunk-7OGJQP7T.js → chunk-CRO4LCQ6.js} +5 -5
- package/dist/{chunk-YNDLCWXS.js → chunk-EZ25VE3G.js} +4 -4
- package/dist/{chunk-WH4SKYPX.js → chunk-GZ6QAYSH.js} +94 -74
- package/dist/chunk-GZ6QAYSH.js.map +1 -0
- package/dist/{chunk-UXA5L2DZ.js → chunk-HQCGRSRU.js} +2 -2
- package/dist/{chunk-RKNJBZ55.js → chunk-JBPKEARU.js} +4 -4
- package/dist/{chunk-XW3W4PV4.js → chunk-JTPXSXHC.js} +2 -2
- package/dist/{chunk-OHJFJ4HI.js → chunk-KOXGLQS7.js} +2 -2
- package/dist/{chunk-2OPARZ4B.js → chunk-MPXYHC35.js} +26 -26
- package/dist/{chunk-6JBKHTQD.js → chunk-MR4PJ277.js} +2 -2
- package/dist/{chunk-EXXBA5OM.js → chunk-OI4BXFSB.js} +4 -4
- package/dist/{chunk-SQZ42MKH.js → chunk-OQH5XUH3.js} +6 -3
- package/dist/chunk-OQH5XUH3.js.map +1 -0
- package/dist/{chunk-2HEZXPYU.js → chunk-Q2LQZYQ7.js} +3 -3
- package/dist/{chunk-XRSIGVTS.js → chunk-QHWJG5C5.js} +8 -8
- package/dist/{chunk-T2AN3BSP.js → chunk-QZ7ODIVL.js} +2 -2
- package/dist/chunk-RI5XBIZ6.js +23 -0
- package/dist/chunk-RI5XBIZ6.js.map +1 -0
- package/dist/{chunk-D7IXTY5E.js → chunk-TJ7HH5LB.js} +2 -2
- package/dist/{chunk-V25ZAOSB.js → chunk-UOBLE67F.js} +4 -4
- package/dist/{chunk-JIX3ZL2J.js → chunk-UVUTV7CM.js} +15 -15
- package/dist/{chunk-VH6EIKVS.js → chunk-WKMCC4NQ.js} +35 -16
- package/dist/chunk-WKMCC4NQ.js.map +1 -0
- package/dist/{chunk-SSOMTUCA.js → chunk-WXGTC424.js} +1 -1
- package/dist/{chunk-KHGE6PMF.js → chunk-WXXLSZHA.js} +2 -2
- package/dist/{chunk-DSLUOQDY.js → chunk-XMWF6AU3.js} +2 -2
- package/dist/{chunk-DQY7NJ5L.js → chunk-XS2CWEHZ.js} +2 -2
- package/dist/{cli-BQRqR9N-.d.ts → cli-BypxcNqq.d.ts} +2 -2
- package/dist/cli.d.ts +4 -3
- package/dist/cli.js +42 -42
- package/dist/compounding/engine.js +4 -3
- package/dist/connectors/codex-materialize-runner.js +4 -3
- package/dist/connectors/index.js +4 -3
- package/dist/consolidation-provenance-check.js +2 -2
- package/dist/conversation-index/backend.js +2 -2
- package/dist/dashboard-runtime.js +2 -2
- package/dist/direct-answer-wiring.d.ts +13 -3
- package/dist/direct-answer-wiring.js +1 -1
- package/dist/entity-retrieval.js +4 -3
- package/dist/explicit-capture.d.ts +2 -1
- package/dist/index.d.ts +5 -4
- package/dist/index.js +66 -65
- package/dist/index.js.map +1 -1
- package/dist/lcm/engine.js +2 -2
- package/dist/lcm/index.js +4 -4
- package/dist/maintenance/memory-governance.js +4 -4
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +4 -3
- package/dist/maintenance/rebuild-memory-projection.js +5 -5
- package/dist/mcp-memory-inspector-app.d.ts +3 -2
- package/dist/namespaces/migrate.js +11 -11
- package/dist/namespaces/search.js +7 -7
- package/dist/namespaces/storage.js +4 -3
- package/dist/operator-toolkit.js +15 -15
- package/dist/{orchestrator-Cg1UkvmO.d.ts → orchestrator-DZqPVoMI.d.ts} +8 -0
- package/dist/orchestrator.d.ts +2 -1
- package/dist/orchestrator.js +32 -31
- package/dist/recall-planner-llm.d.ts +2 -1
- package/dist/recall-planner-llm.js +3 -2
- package/dist/recall-planner-llm.js.map +1 -1
- package/dist/schemas.d.ts +42 -42
- package/dist/search/factory.js +6 -6
- package/dist/search/index.js +10 -10
- package/dist/search/lancedb-backend.js +1 -1
- package/dist/search/meilisearch-backend.js +1 -1
- package/dist/search/orama-backend.js +1 -1
- package/dist/semantic-consolidation.js +5 -4
- package/dist/semantic-rule-promotion.js +4 -3
- package/dist/semantic-rule-verifier.js +4 -3
- package/dist/shared-context/manager.d.ts +2 -2
- package/dist/storage.js +3 -2
- package/dist/transfer/backup.js +2 -2
- package/dist/transfer/capsule-export.js +2 -2
- package/dist/transfer/capsule-import.js +1 -1
- package/dist/verified-recall.js +4 -3
- package/package.json +1 -1
- package/src/capabilities.test.ts +97 -0
- package/src/capabilities.ts +86 -0
- package/src/direct-answer-wiring.test.ts +53 -2
- package/src/direct-answer-wiring.ts +18 -5
- package/src/orchestrator.ts +69 -19
- package/src/recall-planner-llm.test.ts +12 -11
- package/src/recall-planner-llm.ts +7 -1
- package/src/storage-fallback-category-dirs.test.ts +150 -1
- package/src/storage.ts +51 -14
- package/dist/chunk-SQZ42MKH.js.map +0 -1
- package/dist/chunk-VH6EIKVS.js.map +0 -1
- package/dist/chunk-WH4SKYPX.js.map +0 -1
- /package/dist/{chunk-ROHLEUTH.js.map → chunk-23EBQ27U.js.map} +0 -0
- /package/dist/{chunk-YW52BQSU.js.map → chunk-2TCHDANJ.js.map} +0 -0
- /package/dist/{chunk-IROWLAWG.js.map → chunk-46WUVFOD.js.map} +0 -0
- /package/dist/{chunk-7C4MPEPE.js.map → chunk-4T7P2HLJ.js.map} +0 -0
- /package/dist/{chunk-7XH7VJN4.js.map → chunk-6T4LTI2F.js.map} +0 -0
- /package/dist/{chunk-TVVEYCNW.js.map → chunk-7K5Q6COX.js.map} +0 -0
- /package/dist/{chunk-BZG2CWOQ.js.map → chunk-A5TEHAR4.js.map} +0 -0
- /package/dist/{chunk-C7AF236A.js.map → chunk-AARDBQTA.js.map} +0 -0
- /package/dist/{chunk-IHG6CC7T.js.map → chunk-BQJUPECT.js.map} +0 -0
- /package/dist/{chunk-7OGJQP7T.js.map → chunk-CRO4LCQ6.js.map} +0 -0
- /package/dist/{chunk-YNDLCWXS.js.map → chunk-EZ25VE3G.js.map} +0 -0
- /package/dist/{chunk-UXA5L2DZ.js.map → chunk-HQCGRSRU.js.map} +0 -0
- /package/dist/{chunk-RKNJBZ55.js.map → chunk-JBPKEARU.js.map} +0 -0
- /package/dist/{chunk-XW3W4PV4.js.map → chunk-JTPXSXHC.js.map} +0 -0
- /package/dist/{chunk-OHJFJ4HI.js.map → chunk-KOXGLQS7.js.map} +0 -0
- /package/dist/{chunk-2OPARZ4B.js.map → chunk-MPXYHC35.js.map} +0 -0
- /package/dist/{chunk-6JBKHTQD.js.map → chunk-MR4PJ277.js.map} +0 -0
- /package/dist/{chunk-EXXBA5OM.js.map → chunk-OI4BXFSB.js.map} +0 -0
- /package/dist/{chunk-2HEZXPYU.js.map → chunk-Q2LQZYQ7.js.map} +0 -0
- /package/dist/{chunk-XRSIGVTS.js.map → chunk-QHWJG5C5.js.map} +0 -0
- /package/dist/{chunk-T2AN3BSP.js.map → chunk-QZ7ODIVL.js.map} +0 -0
- /package/dist/{chunk-D7IXTY5E.js.map → chunk-TJ7HH5LB.js.map} +0 -0
- /package/dist/{chunk-V25ZAOSB.js.map → chunk-UOBLE67F.js.map} +0 -0
- /package/dist/{chunk-JIX3ZL2J.js.map → chunk-UVUTV7CM.js.map} +0 -0
- /package/dist/{chunk-SSOMTUCA.js.map → chunk-WXGTC424.js.map} +0 -0
- /package/dist/{chunk-KHGE6PMF.js.map → chunk-WXXLSZHA.js.map} +0 -0
- /package/dist/{chunk-DSLUOQDY.js.map → chunk-XMWF6AU3.js.map} +0 -0
- /package/dist/{chunk-DQY7NJ5L.js.map → chunk-XS2CWEHZ.js.map} +0 -0
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-HQ6NIBL6.js";
|
|
4
4
|
import {
|
|
5
5
|
resolveCausalTrajectoryStoreDir
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-WXGTC424.js";
|
|
7
7
|
import {
|
|
8
8
|
normalizeRecallTokens
|
|
9
9
|
} from "./chunk-ZBJMUXZH.js";
|
|
@@ -339,4 +339,4 @@ export {
|
|
|
339
339
|
scoreStitchCandidate,
|
|
340
340
|
stitchCausalChain
|
|
341
341
|
};
|
|
342
|
-
//# sourceMappingURL=chunk-
|
|
342
|
+
//# sourceMappingURL=chunk-HQCGRSRU.js.map
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ReplitAdapter
|
|
3
|
+
} from "./chunk-TMSXWOBZ.js";
|
|
1
4
|
import {
|
|
2
5
|
ClaudeCodeAdapter
|
|
3
6
|
} from "./chunk-J64TK33U.js";
|
|
@@ -7,9 +10,6 @@ import {
|
|
|
7
10
|
import {
|
|
8
11
|
HermesAdapter
|
|
9
12
|
} from "./chunk-42NQ7AVG.js";
|
|
10
|
-
import {
|
|
11
|
-
ReplitAdapter
|
|
12
|
-
} from "./chunk-TMSXWOBZ.js";
|
|
13
13
|
|
|
14
14
|
// src/adapters/registry.ts
|
|
15
15
|
var AdapterRegistry = class {
|
|
@@ -53,4 +53,4 @@ var AdapterRegistry = class {
|
|
|
53
53
|
export {
|
|
54
54
|
AdapterRegistry
|
|
55
55
|
};
|
|
56
|
-
//# sourceMappingURL=chunk-
|
|
56
|
+
//# sourceMappingURL=chunk-JBPKEARU.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runPostConsolidationMaterialize
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-AARDBQTA.js";
|
|
4
4
|
import {
|
|
5
5
|
discoverMemoryExtensions,
|
|
6
6
|
renderExtensionsBlock,
|
|
@@ -217,4 +217,4 @@ export {
|
|
|
217
217
|
buildExtensionsBlockForConsolidation,
|
|
218
218
|
materializeAfterSemanticConsolidation
|
|
219
219
|
};
|
|
220
|
-
//# sourceMappingURL=chunk-
|
|
220
|
+
//# sourceMappingURL=chunk-JTPXSXHC.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-DRD2Q7HQ.js";
|
|
5
5
|
import {
|
|
6
6
|
StorageManager
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WKMCC4NQ.js";
|
|
8
8
|
import {
|
|
9
9
|
parseContinuityImprovementLoops
|
|
10
10
|
} from "./chunk-LDXUBPMO.js";
|
|
@@ -1261,4 +1261,4 @@ export {
|
|
|
1261
1261
|
defaultTierMigrationCycleBudget,
|
|
1262
1262
|
CompoundingEngine
|
|
1263
1263
|
};
|
|
1264
|
-
//# sourceMappingURL=chunk-
|
|
1264
|
+
//# sourceMappingURL=chunk-KOXGLQS7.js.map
|
|
@@ -25,12 +25,12 @@ import {
|
|
|
25
25
|
import {
|
|
26
26
|
backupMemoryDir
|
|
27
27
|
} from "./chunk-2NLLXCJG.js";
|
|
28
|
-
import {
|
|
29
|
-
exportJsonBundle
|
|
30
|
-
} from "./chunk-UP6MOYCB.js";
|
|
31
28
|
import {
|
|
32
29
|
exportMarkdownBundle
|
|
33
30
|
} from "./chunk-765K3SAT.js";
|
|
31
|
+
import {
|
|
32
|
+
exportJsonBundle
|
|
33
|
+
} from "./chunk-UP6MOYCB.js";
|
|
34
34
|
import {
|
|
35
35
|
TailscaleHelper
|
|
36
36
|
} from "./chunk-EEC4PCG5.js";
|
|
@@ -42,23 +42,23 @@ import {
|
|
|
42
42
|
clampBatchSize,
|
|
43
43
|
runReplay
|
|
44
44
|
} from "./chunk-HOJZMQ4J.js";
|
|
45
|
+
import {
|
|
46
|
+
migrateObservations
|
|
47
|
+
} from "./chunk-D6RIFG4O.js";
|
|
45
48
|
import {
|
|
46
49
|
rebuildMemoryLifecycleLedger
|
|
47
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-MR4PJ277.js";
|
|
48
51
|
import {
|
|
49
52
|
rebuildMemoryProjection,
|
|
50
53
|
repairMemoryProjection,
|
|
51
54
|
verifyMemoryProjection
|
|
52
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-A5TEHAR4.js";
|
|
53
56
|
import {
|
|
54
57
|
rebuildObservations
|
|
55
58
|
} from "./chunk-LZZNTPLR.js";
|
|
56
59
|
import {
|
|
57
60
|
archiveObservations
|
|
58
61
|
} from "./chunk-WMWVO45V.js";
|
|
59
|
-
import {
|
|
60
|
-
migrateObservations
|
|
61
|
-
} from "./chunk-D6RIFG4O.js";
|
|
62
62
|
import {
|
|
63
63
|
getBulkImportSource,
|
|
64
64
|
listBulkImportSources,
|
|
@@ -74,7 +74,7 @@ import {
|
|
|
74
74
|
} from "./chunk-EVWIEEKZ.js";
|
|
75
75
|
import {
|
|
76
76
|
promoteSemanticRuleFromMemory
|
|
77
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-BQJUPECT.js";
|
|
78
78
|
import {
|
|
79
79
|
resolveAgentAccessAuthToken
|
|
80
80
|
} from "./chunk-TGQ2NTWH.js";
|
|
@@ -93,12 +93,12 @@ import {
|
|
|
93
93
|
runOperatorInventory,
|
|
94
94
|
runOperatorRepair,
|
|
95
95
|
runOperatorSetup
|
|
96
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-QHWJG5C5.js";
|
|
97
97
|
import {
|
|
98
98
|
listNamespaces,
|
|
99
99
|
runNamespaceMigration,
|
|
100
100
|
verifyNamespaces
|
|
101
|
-
} from "./chunk-
|
|
101
|
+
} from "./chunk-4T7P2HLJ.js";
|
|
102
102
|
import {
|
|
103
103
|
collectPatternMemories,
|
|
104
104
|
explainPatternMemory,
|
|
@@ -110,14 +110,14 @@ import {
|
|
|
110
110
|
} from "./chunk-3T74IZB3.js";
|
|
111
111
|
import {
|
|
112
112
|
GraphDashboardServer
|
|
113
|
-
} from "./chunk-
|
|
113
|
+
} from "./chunk-EZ25VE3G.js";
|
|
114
|
+
import {
|
|
115
|
+
RoutingRulesStore
|
|
116
|
+
} from "./chunk-X6IRLNOO.js";
|
|
114
117
|
import {
|
|
115
118
|
isReplaySource,
|
|
116
119
|
normalizeReplaySessionKey
|
|
117
120
|
} from "./chunk-2PRQG7PV.js";
|
|
118
|
-
import {
|
|
119
|
-
RoutingRulesStore
|
|
120
|
-
} from "./chunk-X6IRLNOO.js";
|
|
121
121
|
import {
|
|
122
122
|
getUtilityLearningStatus,
|
|
123
123
|
learnUtilityPromotionWeights
|
|
@@ -128,13 +128,13 @@ import {
|
|
|
128
128
|
} from "./chunk-TERNBNJB.js";
|
|
129
129
|
import {
|
|
130
130
|
searchVerifiedEpisodes
|
|
131
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-2TCHDANJ.js";
|
|
132
132
|
import {
|
|
133
133
|
ThreadingManager
|
|
134
134
|
} from "./chunk-W4RVMTHR.js";
|
|
135
135
|
import {
|
|
136
136
|
searchVerifiedSemanticRules
|
|
137
|
-
} from "./chunk-
|
|
137
|
+
} from "./chunk-XMWF6AU3.js";
|
|
138
138
|
import {
|
|
139
139
|
getWorkProductLedgerStatus,
|
|
140
140
|
recordWorkProductLedgerEntry,
|
|
@@ -216,16 +216,16 @@ import {
|
|
|
216
216
|
} from "./chunk-OADWQ5CR.js";
|
|
217
217
|
import {
|
|
218
218
|
EngramAccessHttpServer
|
|
219
|
-
} from "./chunk-
|
|
219
|
+
} from "./chunk-46WUVFOD.js";
|
|
220
220
|
import {
|
|
221
221
|
WearablesInputError
|
|
222
222
|
} from "./chunk-7WV3F5DQ.js";
|
|
223
223
|
import {
|
|
224
224
|
EngramMcpServer
|
|
225
|
-
} from "./chunk-
|
|
225
|
+
} from "./chunk-Q2LQZYQ7.js";
|
|
226
226
|
import {
|
|
227
227
|
EngramAccessService
|
|
228
|
-
} from "./chunk-
|
|
228
|
+
} from "./chunk-UVUTV7CM.js";
|
|
229
229
|
import {
|
|
230
230
|
WorkStorage
|
|
231
231
|
} from "./chunk-GDB4J2H3.js";
|
|
@@ -239,28 +239,28 @@ import {
|
|
|
239
239
|
readMemoryGovernanceRunArtifact,
|
|
240
240
|
restoreMemoryGovernanceRun,
|
|
241
241
|
runMemoryGovernance
|
|
242
|
-
} from "./chunk-
|
|
242
|
+
} from "./chunk-OI4BXFSB.js";
|
|
243
243
|
import {
|
|
244
244
|
getTrustZoneStoreStatus,
|
|
245
245
|
promoteTrustZoneRecord,
|
|
246
246
|
seedTrustZoneDemoDataset
|
|
247
247
|
} from "./chunk-JGSKJHF7.js";
|
|
248
|
-
import {
|
|
249
|
-
assertPathInsideRoot
|
|
250
|
-
} from "./chunk-5GPPACXK.js";
|
|
251
248
|
import {
|
|
252
249
|
getObjectiveStateStoreStatus
|
|
253
250
|
} from "./chunk-6HMYUWXR.js";
|
|
254
251
|
import {
|
|
255
252
|
analyzeGraphHealth
|
|
256
253
|
} from "./chunk-Y56J7CXW.js";
|
|
254
|
+
import {
|
|
255
|
+
assertPathInsideRoot
|
|
256
|
+
} from "./chunk-5GPPACXK.js";
|
|
257
257
|
import {
|
|
258
258
|
RECALL_DISCLOSURE_LEVELS,
|
|
259
259
|
isRecallDisclosure
|
|
260
260
|
} from "./chunk-AZBV4RRY.js";
|
|
261
261
|
import {
|
|
262
262
|
getCausalTrajectoryStoreStatus
|
|
263
|
-
} from "./chunk-
|
|
263
|
+
} from "./chunk-WXGTC424.js";
|
|
264
264
|
import {
|
|
265
265
|
selectRouteRule,
|
|
266
266
|
validateRouteTarget
|
|
@@ -7311,4 +7311,4 @@ export {
|
|
|
7311
7311
|
listMemoryMarkdownFilePaths,
|
|
7312
7312
|
registerCli
|
|
7313
7313
|
};
|
|
7314
|
-
//# sourceMappingURL=chunk-
|
|
7314
|
+
//# sourceMappingURL=chunk-MPXYHC35.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-SFQ6QNL7.js";
|
|
7
7
|
import {
|
|
8
8
|
StorageManager
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-WKMCC4NQ.js";
|
|
10
10
|
import {
|
|
11
11
|
buildLifecycleEventsForMemory,
|
|
12
12
|
sortMemoryLifecycleEvents
|
|
@@ -74,4 +74,4 @@ export {
|
|
|
74
74
|
backupExistingLedger,
|
|
75
75
|
rebuildMemoryLifecycleLedger
|
|
76
76
|
};
|
|
77
|
-
//# sourceMappingURL=chunk-
|
|
77
|
+
//# sourceMappingURL=chunk-MR4PJ277.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import {
|
|
2
|
+
StorageManager
|
|
3
|
+
} from "./chunk-WKMCC4NQ.js";
|
|
1
4
|
import {
|
|
2
5
|
assertPathInsideRoot
|
|
3
6
|
} from "./chunk-5GPPACXK.js";
|
|
4
|
-
import {
|
|
5
|
-
StorageManager
|
|
6
|
-
} from "./chunk-VH6EIKVS.js";
|
|
7
7
|
import {
|
|
8
8
|
decideLifecycleTransition
|
|
9
9
|
} from "./chunk-TBBDFYXW.js";
|
|
@@ -751,4 +751,4 @@ export {
|
|
|
751
751
|
listMemoryGovernanceRuns,
|
|
752
752
|
readMemoryGovernanceRunArtifact
|
|
753
753
|
};
|
|
754
|
-
//# sourceMappingURL=chunk-
|
|
754
|
+
//# sourceMappingURL=chunk-OI4BXFSB.js.map
|
|
@@ -116,9 +116,12 @@ var TAXONOMY_KEYWORD_STOPWORDS = /* @__PURE__ */ new Set([
|
|
|
116
116
|
|
|
117
117
|
// src/direct-answer-wiring.ts
|
|
118
118
|
async function tryDirectAnswer(input) {
|
|
119
|
-
const { query, namespace, config, sources, queryEntityRefs, abortSignal } = input;
|
|
119
|
+
const { query, namespace, config, enabled, sources, queryEntityRefs, abortSignal } = input;
|
|
120
120
|
const eligibilityConfig = {
|
|
121
|
-
|
|
121
|
+
// Prefer the resolved capability when supplied; fall back to the config
|
|
122
|
+
// flag so callers on the old input shape (config-only, no `enabled`) get
|
|
123
|
+
// identical gating (issue #1523 backward-compat).
|
|
124
|
+
enabled: enabled ?? config.recallDirectAnswerEnabled,
|
|
122
125
|
tokenOverlapFloor: config.recallDirectAnswerTokenOverlapFloor,
|
|
123
126
|
importanceFloor: config.recallDirectAnswerImportanceFloor,
|
|
124
127
|
ambiguityMargin: config.recallDirectAnswerAmbiguityMargin,
|
|
@@ -177,4 +180,4 @@ export {
|
|
|
177
180
|
resolveCategory,
|
|
178
181
|
tryDirectAnswer
|
|
179
182
|
};
|
|
180
|
-
//# sourceMappingURL=chunk-
|
|
183
|
+
//# sourceMappingURL=chunk-OQH5XUH3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/taxonomy/resolver.ts","../src/direct-answer-wiring.ts"],"sourcesContent":["/**\n * Resolver decision tree for the MECE taxonomy.\n *\n * Given extracted content and its MemoryCategory, determines which\n * taxonomy category the knowledge should be filed under.\n */\n\nimport type { MemoryCategory } from \"../types.js\";\nimport type { ResolverDecision, Taxonomy, TaxonomyCategory } from \"./types.js\";\n\nconst DEFAULT_CATEGORY_ID = \"facts\";\n\n/**\n * Resolve a piece of content to a taxonomy category.\n *\n * Algorithm:\n * 1. Find all taxonomy categories whose `memoryCategories` include\n * the given `memoryCategory`.\n * 2. If exactly one match, return it with confidence 1.0.\n * 3. If multiple matches, prefer the strongest exact-token keyword\n * overlap from filing rules. Use priority only as a tie-breaker.\n * If no filing rules match, choose the explicit/default fallback\n * category instead of letting low-priority generic terms win.\n * 4. If no match, fall back to the \"facts\" category (or first\n * category if \"facts\" is absent) with low confidence.\n * 5. Always populate `alternatives` with other plausible categories.\n */\nexport function resolveCategory(\n content: string,\n memoryCategory: MemoryCategory,\n taxonomy: Taxonomy,\n): ResolverDecision {\n const contentTokens = tokenizeKeywordText(content);\n\n // Step 1: find matching categories\n const matches = taxonomy.categories.filter((cat) =>\n cat.memoryCategories.includes(memoryCategory),\n );\n\n if (matches.length === 0) {\n // No taxonomy category accepts this MemoryCategory — fall back\n const fallback =\n taxonomy.categories.find((c) => c.id === DEFAULT_CATEGORY_ID) ??\n taxonomy.categories[0];\n if (!fallback) {\n return {\n categoryId: DEFAULT_CATEGORY_ID,\n confidence: 0,\n reason: \"Taxonomy is empty; using default category\",\n alternatives: [],\n };\n }\n const alternatives = taxonomy.categories\n .filter((c) => c.id !== fallback.id)\n .map((c) => ({\n categoryId: c.id,\n reason: c.description,\n }));\n return {\n categoryId: fallback.id,\n confidence: 0.3,\n reason: `No taxonomy category maps to MemoryCategory \"${memoryCategory}\"; falling back to \"${fallback.name}\"`,\n alternatives,\n };\n }\n\n if (matches.length === 1) {\n const match = matches[0]!;\n const alternatives = taxonomy.categories\n .filter((c) => c.id !== match.id)\n .map((c) => ({\n categoryId: c.id,\n reason: c.description,\n }));\n return {\n categoryId: match.id,\n confidence: 1.0,\n reason: `Unique match: MemoryCategory \"${memoryCategory}\" maps to \"${match.name}\"`,\n alternatives,\n };\n }\n\n // Multiple matches — use filing rule keyword heuristics + priority\n const scored = matches.map((cat) => ({\n cat,\n keywordScore: computeKeywordScoreForTokens(contentTokens, cat),\n }));\n\n // Sort by keyword score descending, then priority ascending (lower wins)\n scored.sort((a, b) => {\n if (b.keywordScore !== a.keywordScore) return b.keywordScore - a.keywordScore;\n return a.cat.priority - b.cat.priority;\n });\n\n const topScored = scored[0]!;\n const best = topScored.keywordScore > 0\n ? topScored\n : {\n cat: selectFallbackCategory(matches) ?? topScored.cat,\n keywordScore: 0,\n };\n const runnerUp = scored[1];\n\n // Confidence is higher when keyword match clearly differentiates\n const confidence =\n best.keywordScore > 0 && (!runnerUp || best.keywordScore > runnerUp.keywordScore)\n ? 0.9\n : 0.7;\n\n const alternatives = taxonomy.categories\n .filter((c) => c.id !== best.cat.id)\n .map((c) => ({\n categoryId: c.id,\n reason: c.description,\n }));\n\n const reason =\n best.keywordScore > 0\n ? `Filing rules for \"${best.cat.name}\" matched content keywords (priority ${best.cat.priority})`\n : `No filing rules matched content keywords; using fallback category \"${best.cat.name}\"`;\n\n return {\n categoryId: best.cat.id,\n confidence,\n reason,\n alternatives,\n };\n}\n\n/**\n * Compute a simple keyword overlap score between content and\n * a category's filing rules + description.\n */\nfunction computeKeywordScoreForTokens(contentTokens: Set<string>, cat: TaxonomyCategory): number {\n let score = 0;\n const ruleText = [...cat.filingRules, cat.description]\n .join(\" \")\n .toLowerCase();\n\n const keywords = tokenizeKeywordText(ruleText);\n\n for (const kw of keywords) {\n if (contentTokens.has(kw)) {\n score += 1;\n }\n }\n return score;\n}\n\nfunction tokenizeKeywordText(value: string): Set<string> {\n return new Set(\n value\n .toLowerCase()\n .split(/[^a-z0-9]+/)\n .map((word) => word.trim())\n .filter((word) => word.length >= 3 && !TAXONOMY_KEYWORD_STOPWORDS.has(word)),\n );\n}\n\nfunction selectFallbackCategory(\n categories: readonly TaxonomyCategory[],\n): TaxonomyCategory | undefined {\n return categories.find((cat) => cat.id === DEFAULT_CATEGORY_ID) ??\n categories.find((cat) => {\n const text = `${cat.id} ${cat.name} ${cat.description} ${cat.filingRules.join(\" \")}`.toLowerCase();\n return /\\b(general|fallback)\\b/.test(text);\n });\n}\n\nconst TAXONOMY_KEYWORD_STOPWORDS = new Set([\n \"about\",\n \"all\",\n \"and\",\n \"are\",\n \"for\",\n \"from\",\n \"has\",\n \"into\",\n \"not\",\n \"the\",\n \"this\",\n \"was\",\n \"with\",\n]);\n","/**\n * Direct-answer wiring (issue #518 slice 3).\n *\n * Binds the pure eligibility decision (`direct-answer.ts`) to the data\n * sources needed to build candidates: storage, trust-zones, taxonomy,\n * and importance scoring. Kept as a separate module so that:\n *\n * - The eligibility layer stays pure and unit-testable without stores.\n * - Each caller injects its own source accessors. The orchestrator\n * binding is a follow-on slice; tests here use mock sources.\n * - The wiring is safe to ship alone — nothing calls `tryDirectAnswer`\n * yet, so enabling this module's presence does not change recall\n * behavior. The next slice adds exactly one call site before QMD.\n *\n * Short-circuit contract:\n *\n * - When the resolved gate (`input.enabled` if supplied, else\n * `config.recallDirectAnswerEnabled`) is `false`, the function returns the\n * eligibility verdict with reason `\"disabled\"` without touching any source\n * accessor. This is the documented default.\n * - When enabled, the wiring cheaply drops non-trusted-zone memories\n * and ineligible taxonomy buckets before computing importance, so\n * the eligibility module sees a pre-filtered candidate set. The\n * eligibility module still performs the same checks itself — this\n * module is purely an I/O and prefiltering layer.\n */\n\nimport type { MemoryFile, PluginConfig } from \"./types.js\";\nimport type { TrustZoneName } from \"./trust-zones.js\";\nimport type { Taxonomy } from \"./taxonomy/types.js\";\nimport { resolveCategory } from \"./taxonomy/resolver.js\";\nimport { normalizeRecallTokens } from \"./recall-tokenization.js\";\nimport { throwIfAborted } from \"./abort-error.js\";\nimport {\n isDirectAnswerEligible,\n type DirectAnswerCandidate,\n type DirectAnswerConfig,\n type DirectAnswerResult,\n} from \"./direct-answer.js\";\n\n/**\n * Caller-provided accessors for candidate sourcing. Decouples the\n * wiring from any specific storage / trust-zone / importance backend.\n */\nexport interface DirectAnswerSources {\n /**\n * List memories eligible to be considered for direct-answer.\n * Callers are expected to return only active, non-superseded memories\n * in the requested namespace; the wiring will cheaply re-filter on\n * trust zone and taxonomy bucket and hand the rest to the eligibility\n * module, which applies the full gate ladder.\n */\n listCandidateMemories(options: {\n namespace: string;\n abortSignal?: AbortSignal;\n }): Promise<MemoryFile[]>;\n /**\n * Resolve the trust-zone record for a memory. Returns `null` when\n * the memory has no trust-zone record (treated as not trusted).\n */\n trustZoneFor(memoryId: string): Promise<TrustZoneName | null>;\n /**\n * Resolve a calibrated importance score in [0, 1] for a memory.\n */\n importanceFor(memory: MemoryFile): number;\n /**\n * Taxonomy used to classify memories into direct-answer buckets.\n */\n taxonomy: Taxonomy;\n}\n\nexport interface DirectAnswerWiringInput {\n query: string;\n namespace: string;\n config: Pick<\n PluginConfig,\n | \"recallDirectAnswerEnabled\"\n | \"recallDirectAnswerTokenOverlapFloor\"\n | \"recallDirectAnswerImportanceFloor\"\n | \"recallDirectAnswerAmbiguityMargin\"\n | \"recallDirectAnswerEligibleTaxonomyBuckets\"\n >;\n /**\n * Direct-answer capability gate, resolved once at the recall-operation entry\n * (issue #1523: `caps.recallDirectAnswer`). OPTIONAL and additive: when the\n * caller supplies it, this module and the orchestrator agree on a single\n * resolved gate value for the whole operation. When omitted, we fall back to\n * `config.recallDirectAnswerEnabled` so existing callers on the old input\n * shape keep identical behavior.\n */\n enabled?: boolean;\n sources: DirectAnswerSources;\n queryEntityRefs?: string[];\n abortSignal?: AbortSignal;\n}\n\n/**\n * Attempt direct-answer resolution. Returns the eligibility verdict\n * produced by `isDirectAnswerEligible` with candidates materialized\n * from the caller-supplied sources.\n */\nexport async function tryDirectAnswer(\n input: DirectAnswerWiringInput,\n): Promise<DirectAnswerResult> {\n const { query, namespace, config, enabled, sources, queryEntityRefs, abortSignal } = input;\n\n const eligibilityConfig: DirectAnswerConfig = {\n // Prefer the resolved capability when supplied; fall back to the config\n // flag so callers on the old input shape (config-only, no `enabled`) get\n // identical gating (issue #1523 backward-compat).\n enabled: enabled ?? config.recallDirectAnswerEnabled,\n tokenOverlapFloor: config.recallDirectAnswerTokenOverlapFloor,\n importanceFloor: config.recallDirectAnswerImportanceFloor,\n ambiguityMargin: config.recallDirectAnswerAmbiguityMargin,\n eligibleTaxonomyBuckets: config.recallDirectAnswerEligibleTaxonomyBuckets,\n };\n\n // Short-circuit disabled case before touching any I/O.\n if (!eligibilityConfig.enabled) {\n return isDirectAnswerEligible({\n query,\n candidates: [],\n config: eligibilityConfig,\n queryEntityRefs,\n });\n }\n\n // Short-circuit empty-query case before any I/O. isDirectAnswerEligible\n // deterministically returns reason \"empty-query\" when the query\n // normalizes to zero searchable tokens; there's no point materializing\n // candidates just to reach the same verdict, and doing so would\n // surface avoidable upstream errors for requests that should exit\n // immediately.\n if (normalizeRecallTokens(query).length === 0) {\n return isDirectAnswerEligible({\n query,\n candidates: [],\n config: eligibilityConfig,\n queryEntityRefs,\n });\n }\n\n throwIfAborted(abortSignal, \"direct-answer wiring aborted\");\n const memories = await sources.listCandidateMemories({ namespace, abortSignal });\n throwIfAborted(abortSignal, \"direct-answer wiring aborted\");\n const candidates: DirectAnswerCandidate[] = [];\n\n for (const memory of memories) {\n // Throw rather than returning a partial verdict — a mid-loop abort\n // that left competing candidates unprocessed could otherwise surface\n // a spurious \"eligible\" result that the ambiguity gate never got a\n // chance to reject. The check repeats after every await so an\n // abort that lands during the in-flight I/O on the final memory\n // (after which no further iteration would exist) still stops us.\n throwIfAborted(abortSignal, \"direct-answer wiring aborted\");\n\n const trustZone = await sources.trustZoneFor(memory.frontmatter.id);\n throwIfAborted(abortSignal, \"direct-answer wiring aborted\");\n\n // Cheap pre-filter: non-trusted memories can't qualify, so skip\n // taxonomy and importance resolution for them.\n if (trustZone !== \"trusted\") continue;\n\n const decision = resolveCategory(\n memory.content,\n memory.frontmatter.category,\n sources.taxonomy,\n );\n const taxonomyBucket = decision.categoryId;\n if (!eligibilityConfig.eligibleTaxonomyBuckets.includes(taxonomyBucket)) continue;\n\n const importanceScore = sources.importanceFor(memory);\n\n candidates.push({\n memory,\n trustZone,\n taxonomyBucket,\n importanceScore,\n });\n }\n\n // Final check — if abort landed during the trust-zone await for the\n // last memory, the loop condition no longer fires. Guard before we\n // hand candidates to the eligibility gate.\n throwIfAborted(abortSignal, \"direct-answer wiring aborted\");\n\n return isDirectAnswerEligible({\n query,\n candidates,\n config: eligibilityConfig,\n queryEntityRefs,\n });\n}\n"],"mappings":";;;;;;;;;;;AAUA,IAAM,sBAAsB;AAiBrB,SAAS,gBACd,SACA,gBACA,UACkB;AAClB,QAAM,gBAAgB,oBAAoB,OAAO;AAGjD,QAAM,UAAU,SAAS,WAAW;AAAA,IAAO,CAAC,QAC1C,IAAI,iBAAiB,SAAS,cAAc;AAAA,EAC9C;AAEA,MAAI,QAAQ,WAAW,GAAG;AAExB,UAAM,WACJ,SAAS,WAAW,KAAK,CAAC,MAAM,EAAE,OAAO,mBAAmB,KAC5D,SAAS,WAAW,CAAC;AACvB,QAAI,CAAC,UAAU;AACb,aAAO;AAAA,QACL,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ,QAAQ;AAAA,QACR,cAAc,CAAC;AAAA,MACjB;AAAA,IACF;AACA,UAAMA,gBAAe,SAAS,WAC3B,OAAO,CAAC,MAAM,EAAE,OAAO,SAAS,EAAE,EAClC,IAAI,CAAC,OAAO;AAAA,MACX,YAAY,EAAE;AAAA,MACd,QAAQ,EAAE;AAAA,IACZ,EAAE;AACJ,WAAO;AAAA,MACL,YAAY,SAAS;AAAA,MACrB,YAAY;AAAA,MACZ,QAAQ,gDAAgD,cAAc,uBAAuB,SA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|
|
11
11
|
} from "./chunk-D24OXEPB.js";
|
|
12
12
|
import {
|
|
13
13
|
EngramAccessInputError
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-UVUTV7CM.js";
|
|
15
15
|
import {
|
|
16
16
|
projectTagProjectId
|
|
17
17
|
} from "./chunk-GYSYLGNE.js";
|
|
18
18
|
import {
|
|
19
19
|
validateBriefingFormat
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-WXXLSZHA.js";
|
|
21
21
|
import {
|
|
22
22
|
resolvePrincipal
|
|
23
23
|
} from "./chunk-UZYLX7M6.js";
|
|
@@ -3117,4 +3117,4 @@ ${body}`;
|
|
|
3117
3117
|
export {
|
|
3118
3118
|
EngramMcpServer
|
|
3119
3119
|
};
|
|
3120
|
-
//# sourceMappingURL=chunk-
|
|
3120
|
+
//# sourceMappingURL=chunk-Q2LQZYQ7.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
listNamespaces
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4T7P2HLJ.js";
|
|
4
4
|
import {
|
|
5
5
|
runConsolidationProvenanceCheck
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6T4LTI2F.js";
|
|
7
7
|
import {
|
|
8
8
|
reportBufferSurpriseDistribution
|
|
9
9
|
} from "./chunk-YBPYIAA5.js";
|
|
@@ -15,6 +15,9 @@ import {
|
|
|
15
15
|
import {
|
|
16
16
|
resolvePluginEntry
|
|
17
17
|
} from "./chunk-CMTINOFS.js";
|
|
18
|
+
import {
|
|
19
|
+
readJudgeVerdictStats
|
|
20
|
+
} from "./chunk-AJU4PJGY.js";
|
|
18
21
|
import {
|
|
19
22
|
resolveCuratedIncludeFilesStatePath,
|
|
20
23
|
resolveNativeKnowledgeStatePath,
|
|
@@ -27,22 +30,19 @@ import {
|
|
|
27
30
|
runEvalBenchmarkCiGate,
|
|
28
31
|
validateEvalBenchmarkPack
|
|
29
32
|
} from "./chunk-3PY7VHV7.js";
|
|
30
|
-
import {
|
|
31
|
-
readJudgeVerdictStats
|
|
32
|
-
} from "./chunk-AJU4PJGY.js";
|
|
33
33
|
import {
|
|
34
34
|
parseConfig
|
|
35
35
|
} from "./chunk-CTAV55JM.js";
|
|
36
36
|
import {
|
|
37
37
|
listMemoryGovernanceRuns,
|
|
38
38
|
readMemoryGovernanceRunArtifact
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-OI4BXFSB.js";
|
|
40
40
|
import {
|
|
41
41
|
analyzeGraphHealth
|
|
42
42
|
} from "./chunk-Y56J7CXW.js";
|
|
43
43
|
import {
|
|
44
44
|
StorageManager
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-WKMCC4NQ.js";
|
|
46
46
|
import {
|
|
47
47
|
lintWorkspaceFiles
|
|
48
48
|
} from "./chunk-DM2T26WE.js";
|
|
@@ -1336,4 +1336,4 @@ export {
|
|
|
1336
1336
|
runBenchmarkRecall,
|
|
1337
1337
|
runOperatorRepair
|
|
1338
1338
|
};
|
|
1339
|
-
//# sourceMappingURL=chunk-
|
|
1339
|
+
//# sourceMappingURL=chunk-QHWJG5C5.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
compareEntityTimestamps,
|
|
6
6
|
normalizeEntityName
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WKMCC4NQ.js";
|
|
8
8
|
import {
|
|
9
9
|
sanitizeMemoryContent
|
|
10
10
|
} from "./chunk-FVQJYWH7.js";
|
|
@@ -679,4 +679,4 @@ export {
|
|
|
679
679
|
entityIndexVersion,
|
|
680
680
|
entityRecentTranscriptLookbackHours
|
|
681
681
|
};
|
|
682
|
-
//# sourceMappingURL=chunk-
|
|
682
|
+
//# sourceMappingURL=chunk-QZ7ODIVL.js.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// src/capabilities.ts
|
|
2
|
+
function resolveCapabilities(config) {
|
|
3
|
+
return Object.freeze({
|
|
4
|
+
rerankCache: config.rerankCacheEnabled,
|
|
5
|
+
recallDirectAnswer: config.recallDirectAnswerEnabled,
|
|
6
|
+
recallMemoryWorthFilter: config.recallMemoryWorthFilterEnabled,
|
|
7
|
+
recallMmr: config.recallMmrEnabled,
|
|
8
|
+
recallReasoningTraceBoost: config.recallReasoningTraceBoostEnabled,
|
|
9
|
+
recallPlannerLlm: config.recallPlannerLlmEnabled,
|
|
10
|
+
recallPlanner: config.recallPlannerEnabled,
|
|
11
|
+
recallConfidenceGate: config.recallConfidenceGateEnabled,
|
|
12
|
+
graphRecall: config.graphRecallEnabled,
|
|
13
|
+
// Optional flags: preserve the exact default-when-undefined semantics the
|
|
14
|
+
// migrated call sites used (`!== false` = default-on, `=== true` = default-off).
|
|
15
|
+
graphAssistInFullMode: config.graphAssistInFullModeEnabled !== false,
|
|
16
|
+
graphExpandedIntent: config.graphExpandedIntentEnabled === true
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export {
|
|
21
|
+
resolveCapabilities
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=chunk-RI5XBIZ6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/capabilities.ts"],"sourcesContent":["/**\n * CapabilitySet — recall-operation feature gates resolved once, then threaded.\n *\n * Issue #1523 (Phase 1 of epic #1520). Root cause this addresses: 161+\n * scattered `config.<flag>Enabled` reads mean each gate is re-derived at every\n * call site, and reviews keep finding parallel code paths where one branch\n * checks a gate the other forgot (CLAUDE.md rule 39 — the \"gate divergence\"\n * defect class). The fix is to resolve a frozen capability projection ONCE at\n * the top of the recall operation and pass it down explicitly.\n *\n * Scope of THIS module (first migration PR): only the recall-operation-scoped\n * flags below. Flags that are also read in graph construction, writes, CLI, or\n * the summarizer are deliberately deferred to a follow-up so we never leave a\n * single flag half-migrated (some sites on `caps.`, some on `config.`).\n *\n * Field naming: each field is the config flag name with the trailing `Enabled`\n * removed (`recallMmrEnabled` → `recallMmr`).\n *\n * This is plumbing, not a feature — there is deliberately NO `enabled` gate for\n * the CapabilitySet itself (rule 30 governs behavior changes; resolving and\n * threading a capability projection must stay behavior-preserving).\n */\n\nimport type { PluginConfig } from \"./types.js\";\n\n/**\n * Frozen projection of recall-operation feature gates.\n *\n * Every field is `readonly boolean`. The composition that maps a config flag to\n * a capability (including default-when-undefined semantics for optional flags)\n * lives ONLY in {@link resolveCapabilities} — call sites must read the\n * capability, never re-derive it from raw config.\n */\nexport interface CapabilitySet {\n /** `rerankCacheEnabled` — cache reranker scores across recall passes. */\n readonly rerankCache: boolean;\n /** `recallDirectAnswerEnabled` — observation-mode direct-answer tier. */\n readonly recallDirectAnswer: boolean;\n /** `recallMemoryWorthFilterEnabled` — Memory-Worth score reweighting. */\n readonly recallMemoryWorthFilter: boolean;\n /** `recallMmrEnabled` — maximal-marginal-relevance diversification. */\n readonly recallMmr: boolean;\n /** `recallReasoningTraceBoostEnabled` — boost reasoning-trace memories. */\n readonly recallReasoningTraceBoost: boolean;\n /** `recallPlannerLlmEnabled` — LLM-backed recall-mode planner. */\n readonly recallPlannerLlm: boolean;\n /** `recallPlannerEnabled` — recall-mode planner (heuristic + optional LLM). */\n readonly recallPlanner: boolean;\n /** `recallConfidenceGateEnabled` — Synapse-style confidence gate. */\n readonly recallConfidenceGate: boolean;\n /** `graphRecallEnabled` — graph-mode recall tier (gates planner graph mode). */\n readonly graphRecall: boolean;\n /** `graphAssistInFullModeEnabled` — graph-assist overlay in full mode. */\n readonly graphAssistInFullMode: boolean;\n /** `graphExpandedIntentEnabled` — promote broad-intent asks to graph mode. */\n readonly graphExpandedIntent: boolean;\n}\n\n/**\n * Resolve the recall-operation {@link CapabilitySet} from parsed config.\n *\n * Call this ONCE per recall operation (at the `recall()` / `recallInternal`\n * entry) and thread the result down. Composition lives here and only here.\n *\n * Session toggles are intentionally not a parameter yet: `session-toggles.ts`\n * is agent-scoped (per session/agent enable-disable of the whole plugin), not\n * flag-scoped — none of the flags projected here have a per-session override,\n * so there is nothing for a toggle argument to compose at this layer.\n */\nexport function resolveCapabilities(config: PluginConfig): CapabilitySet {\n return Object.freeze({\n rerankCache: config.rerankCacheEnabled,\n recallDirectAnswer: config.recallDirectAnswerEnabled,\n recallMemoryWorthFilter: config.recallMemoryWorthFilterEnabled,\n recallMmr: config.recallMmrEnabled,\n recallReasoningTraceBoost: config.recallReasoningTraceBoostEnabled,\n recallPlannerLlm: config.recallPlannerLlmEnabled,\n recallPlanner: config.recallPlannerEnabled,\n recallConfidenceGate: config.recallConfidenceGateEnabled,\n graphRecall: config.graphRecallEnabled,\n // Optional flags: preserve the exact default-when-undefined semantics the\n // migrated call sites used (`!== false` = default-on, `=== true` = default-off).\n graphAssistInFullMode: config.graphAssistInFullModeEnabled !== false,\n graphExpandedIntent: config.graphExpandedIntentEnabled === true,\n });\n}\n"],"mappings":";AAqEO,SAAS,oBAAoB,QAAqC;AACvE,SAAO,OAAO,OAAO;AAAA,IACnB,aAAa,OAAO;AAAA,IACpB,oBAAoB,OAAO;AAAA,IAC3B,yBAAyB,OAAO;AAAA,IAChC,WAAW,OAAO;AAAA,IAClB,2BAA2B,OAAO;AAAA,IAClC,kBAAkB,OAAO;AAAA,IACzB,eAAe,OAAO;AAAA,IACtB,sBAAsB,OAAO;AAAA,IAC7B,aAAa,OAAO;AAAA;AAAA;AAAA,IAGpB,uBAAuB,OAAO,iCAAiC;AAAA,IAC/D,qBAAqB,OAAO,+BAA+B;AAAA,EAC7D,CAAC;AACH;","names":[]}
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-ZFXCQPNO.js";
|
|
5
5
|
import {
|
|
6
6
|
StorageManager
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WKMCC4NQ.js";
|
|
8
8
|
import {
|
|
9
9
|
isSafeRouteNamespace
|
|
10
10
|
} from "./chunk-U3PN77QT.js";
|
|
@@ -236,4 +236,4 @@ export {
|
|
|
236
236
|
resolveNamespaceStorageRoot,
|
|
237
237
|
NamespaceStorageRouter
|
|
238
238
|
};
|
|
239
|
-
//# sourceMappingURL=chunk-
|
|
239
|
+
//# sourceMappingURL=chunk-TJ7HH5LB.js.map
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
assembleCompressedHistory
|
|
3
|
+
} from "./chunk-KCYE2MZM.js";
|
|
1
4
|
import {
|
|
2
5
|
ensureLcmStateDir,
|
|
3
6
|
openLcmDatabase
|
|
@@ -14,9 +17,6 @@ import {
|
|
|
14
17
|
import {
|
|
15
18
|
LcmWorkQueue
|
|
16
19
|
} from "./chunk-TPDBFYEG.js";
|
|
17
|
-
import {
|
|
18
|
-
assembleCompressedHistory
|
|
19
|
-
} from "./chunk-KCYE2MZM.js";
|
|
20
20
|
import {
|
|
21
21
|
log
|
|
22
22
|
} from "./chunk-2ODBA7MQ.js";
|
|
@@ -513,4 +513,4 @@ export {
|
|
|
513
513
|
extractLcmConfig,
|
|
514
514
|
LcmEngine
|
|
515
515
|
};
|
|
516
|
-
//# sourceMappingURL=chunk-
|
|
516
|
+
//# sourceMappingURL=chunk-UOBLE67F.js.map
|
|
@@ -9,17 +9,17 @@ import {
|
|
|
9
9
|
import {
|
|
10
10
|
importCapsule
|
|
11
11
|
} from "./chunk-ARV3AUOM.js";
|
|
12
|
+
import {
|
|
13
|
+
applyTagFilter,
|
|
14
|
+
normalizeTags,
|
|
15
|
+
parseTagMatch
|
|
16
|
+
} from "./chunk-BT7NVCML.js";
|
|
12
17
|
import {
|
|
13
18
|
decideDisclosureEscalation
|
|
14
19
|
} from "./chunk-H7XKCNR6.js";
|
|
15
20
|
import {
|
|
16
21
|
toRecallExplainJson
|
|
17
22
|
} from "./chunk-TIJYQXDI.js";
|
|
18
|
-
import {
|
|
19
|
-
applyTagFilter,
|
|
20
|
-
normalizeTags,
|
|
21
|
-
parseTagMatch
|
|
22
|
-
} from "./chunk-BT7NVCML.js";
|
|
23
23
|
import {
|
|
24
24
|
buildProposedActions,
|
|
25
25
|
buildQualityScore,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
listMemoryGovernanceRuns,
|
|
28
28
|
readMemoryGovernanceRunArtifact,
|
|
29
29
|
runMemoryGovernance
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-OI4BXFSB.js";
|
|
31
31
|
import {
|
|
32
32
|
clusterByKey,
|
|
33
33
|
combineNamespaces,
|
|
@@ -55,19 +55,19 @@ import {
|
|
|
55
55
|
} from "./chunk-2MXEVL75.js";
|
|
56
56
|
import {
|
|
57
57
|
namespaceCollectionName
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-XS2CWEHZ.js";
|
|
59
59
|
import {
|
|
60
60
|
namespaceIdentityFromToken
|
|
61
61
|
} from "./chunk-ZFXCQPNO.js";
|
|
62
|
+
import {
|
|
63
|
+
recordMemoryOutcome
|
|
64
|
+
} from "./chunk-EIR5VLIH.js";
|
|
62
65
|
import {
|
|
63
66
|
recordObjectiveStateSnapshotsFromObservedMessages
|
|
64
67
|
} from "./chunk-BMFZLLNI.js";
|
|
65
68
|
import {
|
|
66
69
|
objectiveStateStoreOverrideForNamespace
|
|
67
70
|
} from "./chunk-6HMYUWXR.js";
|
|
68
|
-
import {
|
|
69
|
-
recordMemoryOutcome
|
|
70
|
-
} from "./chunk-EIR5VLIH.js";
|
|
71
71
|
import {
|
|
72
72
|
buildGraphSnapshot
|
|
73
73
|
} from "./chunk-NE566K4E.js";
|
|
@@ -94,10 +94,10 @@ import {
|
|
|
94
94
|
buildBriefing,
|
|
95
95
|
parseBriefingFocus,
|
|
96
96
|
parseBriefingWindow
|
|
97
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-WXXLSZHA.js";
|
|
98
98
|
import {
|
|
99
99
|
parseEntityFile
|
|
100
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-WKMCC4NQ.js";
|
|
101
101
|
import {
|
|
102
102
|
DEFAULT_RECALL_DISCLOSURE,
|
|
103
103
|
isRecallDisclosure
|
|
@@ -122,7 +122,7 @@ import {
|
|
|
122
122
|
import {
|
|
123
123
|
filterTrajectoriesByLookbackDays,
|
|
124
124
|
readCausalTrajectoryRecords
|
|
125
|
-
} from "./chunk-
|
|
125
|
+
} from "./chunk-WXGTC424.js";
|
|
126
126
|
import {
|
|
127
127
|
canReadNamespace,
|
|
128
128
|
canWriteNamespace,
|
|
@@ -135,7 +135,7 @@ import {
|
|
|
135
135
|
} from "./chunk-2ODBA7MQ.js";
|
|
136
136
|
import {
|
|
137
137
|
AccessAuditAdapter
|
|
138
|
-
} from "./chunk-
|
|
138
|
+
} from "./chunk-7K5Q6COX.js";
|
|
139
139
|
import {
|
|
140
140
|
AccessIdempotencyStore,
|
|
141
141
|
hashAccessIdempotencyPayload
|
|
@@ -5579,4 +5579,4 @@ export {
|
|
|
5579
5579
|
shapeMemorySummary,
|
|
5580
5580
|
EngramAccessService
|
|
5581
5581
|
};
|
|
5582
|
-
//# sourceMappingURL=chunk-
|
|
5582
|
+
//# sourceMappingURL=chunk-UVUTV7CM.js.map
|