@remnic/core 10.0.9 → 10.0.10
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-admin-ops-surface.js +14 -14
- package/dist/access-authorization-probe.js +15 -15
- package/dist/access-boundary.js +14 -14
- package/dist/access-cli.js +52 -52
- package/dist/access-extraction-force-flush.js +14 -14
- package/dist/access-http-briefing.js +15 -15
- package/dist/access-http-query.js +16 -16
- package/dist/access-http.js +30 -30
- package/dist/access-identity-continuity-surface.js +14 -14
- package/dist/access-lcm-surface.js +14 -14
- package/dist/access-mcp.js +23 -23
- package/dist/access-namespace-preflight.js +14 -14
- package/dist/access-observe-write-surface.js +14 -14
- package/dist/access-operations-batch.js +15 -15
- package/dist/access-operations.js +22 -22
- package/dist/access-recall-concurrency.js +14 -14
- package/dist/access-recall-response.js +14 -14
- package/dist/access-recall-surface.js +14 -14
- package/dist/access-service.js +14 -14
- package/dist/access-surface-catalog.js +16 -16
- package/dist/active-recall.js +1 -1
- package/dist/briefing.js +2 -2
- package/dist/causal-consolidation.js +3 -3
- package/dist/{chunk-ZQYAE2C5.js → chunk-2U4BM3TW.js} +2 -2
- package/dist/{chunk-QFIPSKPC.js → chunk-3ZCRHW7U.js} +2 -2
- package/dist/{chunk-76KHEHT2.js → chunk-4N2MFNTG.js} +2 -2
- package/dist/{chunk-FBVLTTVV.js → chunk-4TP3MJ3D.js} +5 -5
- package/dist/{chunk-JSIQSZXI.js → chunk-56GJLXBA.js} +3 -3
- package/dist/{chunk-MVRIW6MI.js → chunk-6OAXWYE3.js} +2 -2
- package/dist/{chunk-KDYQYMJZ.js → chunk-7SUWY37K.js} +2 -2
- package/dist/{chunk-KRIEQCKE.js → chunk-A2L3P2IY.js} +2 -2
- package/dist/{chunk-AMFCRZYB.js → chunk-AV2OQF2O.js} +2 -2
- package/dist/{chunk-WJLGUY27.js → chunk-BD5QEP3T.js} +2 -1
- package/dist/{chunk-C3WJNRGR.js → chunk-BH44JOLA.js} +2 -2
- package/dist/{chunk-NYVKLB2I.js → chunk-BX4WDBTE.js} +11 -11
- package/dist/{chunk-V4WSQYO6.js → chunk-CAUNCRLQ.js} +21 -21
- package/dist/{chunk-RH6QEGCT.js → chunk-D5UPBXZM.js} +2 -2
- package/dist/{chunk-77HNHT6S.js → chunk-E57LYSHI.js} +114 -4
- package/dist/chunk-E57LYSHI.js.map +1 -0
- package/dist/{chunk-IOM5QSNR.js → chunk-EKKAHJ4B.js} +2 -2
- package/dist/{chunk-JK3DYMOC.js → chunk-GKOML66M.js} +2 -2
- package/dist/{chunk-QW7G7PWN.js → chunk-I2M4ZVDD.js} +2 -2
- package/dist/{chunk-JTUKDLAD.js → chunk-J6FFBORM.js} +2 -2
- package/dist/{chunk-MAJ2OKE4.js → chunk-J7MDPTX7.js} +6 -6
- package/dist/{chunk-5FNVK7MW.js → chunk-JVNEXW6X.js} +2 -2
- package/dist/{chunk-IJWEXCWF.js → chunk-JXWTPOMJ.js} +2 -2
- package/dist/{chunk-3R6SLDTH.js → chunk-KJOGIRMF.js} +2 -2
- package/dist/{chunk-GDI64ITR.js → chunk-KWVI52ER.js} +2 -2
- package/dist/{chunk-AV46CT77.js → chunk-KX36OCGK.js} +2 -2
- package/dist/{chunk-2K7D6EFT.js → chunk-L3G5CGL5.js} +674 -126
- package/dist/chunk-L3G5CGL5.js.map +1 -0
- package/dist/{chunk-CSUAHUOH.js → chunk-MK552I5J.js} +2 -2
- package/dist/{chunk-BPY4RRTF.js → chunk-MO25AN7J.js} +10 -10
- package/dist/{chunk-NAHUBSUF.js → chunk-N75Q5ZSP.js} +2 -2
- package/dist/{chunk-HZVYDWUP.js → chunk-NQMG2W5L.js} +2 -2
- package/dist/{chunk-L3Z4NXDO.js → chunk-O52WWLKU.js} +3 -3
- package/dist/{chunk-OC6JYPZX.js → chunk-O5MW6CQL.js} +2 -2
- package/dist/{chunk-6PHB45IU.js → chunk-O6YDGTH4.js} +2 -2
- package/dist/{chunk-E5274WUC.js → chunk-OAIWPB2I.js} +19 -2
- package/dist/chunk-OAIWPB2I.js.map +1 -0
- package/dist/{chunk-5NOPZYNI.js → chunk-OFDIGTC2.js} +7 -7
- package/dist/{chunk-5EOV7ANU.js → chunk-OGWEWJRH.js} +2 -2
- package/dist/{chunk-3ENX2RB4.js → chunk-OM3RWZQK.js} +2 -2
- package/dist/{chunk-GSAZBZMA.js → chunk-PDVWGGX4.js} +2 -2
- package/dist/{chunk-N44GZ73R.js → chunk-SOJ3IQD3.js} +3 -3
- package/dist/{chunk-4OKPH6FG.js → chunk-SQA2MM2F.js} +2 -2
- package/dist/{chunk-7O252IE6.js → chunk-SSAXGPXY.js} +2 -2
- package/dist/{chunk-R2AWYR4Q.js → chunk-SVDU4OHO.js} +2 -2
- package/dist/{chunk-WPFSZZ35.js → chunk-UOA2VQ7C.js} +2 -2
- package/dist/{chunk-S4GUMZRB.js → chunk-VA2HNBGQ.js} +17 -17
- package/dist/{chunk-YAF3NRNC.js → chunk-VBJD4RSJ.js} +2 -2
- package/dist/{chunk-A6G7K273.js → chunk-VDXTXVFZ.js} +3 -3
- package/dist/{chunk-5Q4NQNW7.js → chunk-VJGDQA3D.js} +2 -2
- package/dist/{chunk-QN77HA6P.js → chunk-WCTL3PVM.js} +2 -2
- package/dist/{chunk-NXLQQ6WI.js → chunk-WH4QXVKU.js} +2 -2
- package/dist/{chunk-3VTNNO2B.js → chunk-WXFKXCOQ.js} +3 -3
- package/dist/{chunk-K3DZ3G5I.js → chunk-XQIHFXYP.js} +2 -2
- package/dist/{chunk-VSHRMIJH.js → chunk-YYNHJF3N.js} +2 -2
- package/dist/cli.js +40 -40
- package/dist/coding/export-okf-codegraph.js +1 -1
- package/dist/compounding/engine.d.ts +1 -5
- package/dist/compounding/engine.d.ts.map +1 -1
- package/dist/compounding/engine.js +5 -3
- package/dist/compounding/iso-week.d.ts +18 -0
- package/dist/compounding/iso-week.d.ts.map +1 -0
- package/dist/compounding/weekly-evidence.d.ts +123 -0
- package/dist/compounding/weekly-evidence.d.ts.map +1 -0
- package/dist/config.js +1 -1
- package/dist/connectors/codex-materialize-runner.js +2 -2
- package/dist/connectors/index.js +2 -2
- package/dist/convergence-refresh.js +4 -4
- package/dist/corpus-watermark.js +4 -4
- package/dist/entity-retrieval.js +2 -2
- package/dist/external-wiki-access.js +15 -15
- package/dist/extraction.js +2 -2
- package/dist/harmonic-retrieval.js +2 -2
- package/dist/index.js +52 -52
- package/dist/location/index.js +4 -4
- package/dist/maintenance/memory-governance.js +2 -2
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +2 -2
- package/dist/maintenance/rebuild-memory-projection-runner.js +4 -4
- package/dist/maintenance/rebuild-memory-projection.js +3 -3
- package/dist/memory-browse-operations.js +15 -15
- package/dist/memory-browse.js +2 -2
- package/dist/namespaces/migrate.js +3 -3
- package/dist/namespaces/storage.js +2 -2
- package/dist/operator-doctor-corpus.js +5 -5
- package/dist/operator-toolkit.js +10 -10
- package/dist/orchestration/generic-recall-paths.d.ts.map +1 -1
- package/dist/orchestration/maintenance.js +11 -11
- package/dist/orchestrator.js +52 -52
- package/dist/recall-navigation-operations.js +15 -15
- package/dist/recall-navigation.js +14 -14
- package/dist/recall-state-view-admission.js +2 -2
- package/dist/recall-why-service.js +2 -2
- package/dist/resume-bundles.js +1 -1
- package/dist/semantic-consolidation.js +3 -3
- package/dist/semantic-rule-promotion.js +2 -2
- package/dist/semantic-rule-verifier.js +2 -2
- package/dist/shared-context/manager.d.ts +18 -0
- package/dist/shared-context/manager.d.ts.map +1 -1
- package/dist/shared-context/manager.js +7 -1
- package/dist/source-agent-qualifier.js +2 -2
- package/dist/standup/build.js +2 -2
- package/dist/storage.js +1 -1
- package/dist/support-passport/index.js +17 -17
- package/dist/transfer/export-okf.js +2 -2
- package/dist/verified-recall.js +2 -2
- package/dist/who-knows-cli.js +3 -3
- package/dist/who-knows.js +2 -2
- package/package.json +2 -2
- package/src/compounding/engine.ts +135 -130
- package/src/compounding/iso-week.ts +60 -0
- package/src/compounding/weekly-evidence.ts +698 -0
- package/src/orchestration/generic-recall-paths.ts +27 -1
- package/src/shared-context/manager.ts +132 -3
- package/dist/chunk-2K7D6EFT.js.map +0 -1
- package/dist/chunk-77HNHT6S.js.map +0 -1
- package/dist/chunk-E5274WUC.js.map +0 -1
- /package/dist/{chunk-ZQYAE2C5.js.map → chunk-2U4BM3TW.js.map} +0 -0
- /package/dist/{chunk-QFIPSKPC.js.map → chunk-3ZCRHW7U.js.map} +0 -0
- /package/dist/{chunk-76KHEHT2.js.map → chunk-4N2MFNTG.js.map} +0 -0
- /package/dist/{chunk-FBVLTTVV.js.map → chunk-4TP3MJ3D.js.map} +0 -0
- /package/dist/{chunk-JSIQSZXI.js.map → chunk-56GJLXBA.js.map} +0 -0
- /package/dist/{chunk-MVRIW6MI.js.map → chunk-6OAXWYE3.js.map} +0 -0
- /package/dist/{chunk-KDYQYMJZ.js.map → chunk-7SUWY37K.js.map} +0 -0
- /package/dist/{chunk-KRIEQCKE.js.map → chunk-A2L3P2IY.js.map} +0 -0
- /package/dist/{chunk-AMFCRZYB.js.map → chunk-AV2OQF2O.js.map} +0 -0
- /package/dist/{chunk-WJLGUY27.js.map → chunk-BD5QEP3T.js.map} +0 -0
- /package/dist/{chunk-C3WJNRGR.js.map → chunk-BH44JOLA.js.map} +0 -0
- /package/dist/{chunk-NYVKLB2I.js.map → chunk-BX4WDBTE.js.map} +0 -0
- /package/dist/{chunk-V4WSQYO6.js.map → chunk-CAUNCRLQ.js.map} +0 -0
- /package/dist/{chunk-RH6QEGCT.js.map → chunk-D5UPBXZM.js.map} +0 -0
- /package/dist/{chunk-IOM5QSNR.js.map → chunk-EKKAHJ4B.js.map} +0 -0
- /package/dist/{chunk-JK3DYMOC.js.map → chunk-GKOML66M.js.map} +0 -0
- /package/dist/{chunk-QW7G7PWN.js.map → chunk-I2M4ZVDD.js.map} +0 -0
- /package/dist/{chunk-JTUKDLAD.js.map → chunk-J6FFBORM.js.map} +0 -0
- /package/dist/{chunk-MAJ2OKE4.js.map → chunk-J7MDPTX7.js.map} +0 -0
- /package/dist/{chunk-5FNVK7MW.js.map → chunk-JVNEXW6X.js.map} +0 -0
- /package/dist/{chunk-IJWEXCWF.js.map → chunk-JXWTPOMJ.js.map} +0 -0
- /package/dist/{chunk-3R6SLDTH.js.map → chunk-KJOGIRMF.js.map} +0 -0
- /package/dist/{chunk-GDI64ITR.js.map → chunk-KWVI52ER.js.map} +0 -0
- /package/dist/{chunk-AV46CT77.js.map → chunk-KX36OCGK.js.map} +0 -0
- /package/dist/{chunk-CSUAHUOH.js.map → chunk-MK552I5J.js.map} +0 -0
- /package/dist/{chunk-BPY4RRTF.js.map → chunk-MO25AN7J.js.map} +0 -0
- /package/dist/{chunk-NAHUBSUF.js.map → chunk-N75Q5ZSP.js.map} +0 -0
- /package/dist/{chunk-HZVYDWUP.js.map → chunk-NQMG2W5L.js.map} +0 -0
- /package/dist/{chunk-L3Z4NXDO.js.map → chunk-O52WWLKU.js.map} +0 -0
- /package/dist/{chunk-OC6JYPZX.js.map → chunk-O5MW6CQL.js.map} +0 -0
- /package/dist/{chunk-6PHB45IU.js.map → chunk-O6YDGTH4.js.map} +0 -0
- /package/dist/{chunk-5NOPZYNI.js.map → chunk-OFDIGTC2.js.map} +0 -0
- /package/dist/{chunk-5EOV7ANU.js.map → chunk-OGWEWJRH.js.map} +0 -0
- /package/dist/{chunk-3ENX2RB4.js.map → chunk-OM3RWZQK.js.map} +0 -0
- /package/dist/{chunk-GSAZBZMA.js.map → chunk-PDVWGGX4.js.map} +0 -0
- /package/dist/{chunk-N44GZ73R.js.map → chunk-SOJ3IQD3.js.map} +0 -0
- /package/dist/{chunk-4OKPH6FG.js.map → chunk-SQA2MM2F.js.map} +0 -0
- /package/dist/{chunk-7O252IE6.js.map → chunk-SSAXGPXY.js.map} +0 -0
- /package/dist/{chunk-R2AWYR4Q.js.map → chunk-SVDU4OHO.js.map} +0 -0
- /package/dist/{chunk-WPFSZZ35.js.map → chunk-UOA2VQ7C.js.map} +0 -0
- /package/dist/{chunk-S4GUMZRB.js.map → chunk-VA2HNBGQ.js.map} +0 -0
- /package/dist/{chunk-YAF3NRNC.js.map → chunk-VBJD4RSJ.js.map} +0 -0
- /package/dist/{chunk-A6G7K273.js.map → chunk-VDXTXVFZ.js.map} +0 -0
- /package/dist/{chunk-5Q4NQNW7.js.map → chunk-VJGDQA3D.js.map} +0 -0
- /package/dist/{chunk-QN77HA6P.js.map → chunk-WCTL3PVM.js.map} +0 -0
- /package/dist/{chunk-NXLQQ6WI.js.map → chunk-WH4QXVKU.js.map} +0 -0
- /package/dist/{chunk-3VTNNO2B.js.map → chunk-WXFKXCOQ.js.map} +0 -0
- /package/dist/{chunk-K3DZ3G5I.js.map → chunk-XQIHFXYP.js.map} +0 -0
- /package/dist/{chunk-VSHRMIJH.js.map → chunk-YYNHJF3N.js.map} +0 -0
package/dist/standup/build.js
CHANGED
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
parseStandupDate,
|
|
4
4
|
previousActiveDate,
|
|
5
5
|
standupHelp
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import "../chunk-
|
|
6
|
+
} from "../chunk-NQMG2W5L.js";
|
|
7
|
+
import "../chunk-BD5QEP3T.js";
|
|
8
8
|
import "../chunk-UHVXE24Y.js";
|
|
9
9
|
import "../chunk-LZKOVXMX.js";
|
|
10
10
|
import "../chunk-V4JZCTMK.js";
|
package/dist/storage.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
SUPPORT_PASSPORT_MODEL_RESULT_PATH,
|
|
5
5
|
SupportPassportModelBridge,
|
|
6
6
|
parseSupportPassportModelJob
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-6OAXWYE3.js";
|
|
8
8
|
import {
|
|
9
9
|
DEFAULT_SUPPORT_PASSPORT_CONFIG,
|
|
10
10
|
parseSupportPassportConfig
|
|
@@ -14,8 +14,8 @@ import {
|
|
|
14
14
|
buildSupportPassportPublicRequestHandler,
|
|
15
15
|
composeSupportPassportExternalRequestHandlers,
|
|
16
16
|
normalizeSupportPassportNetworkAddress
|
|
17
|
-
} from "../chunk-
|
|
18
|
-
import "../chunk-
|
|
17
|
+
} from "../chunk-UOA2VQ7C.js";
|
|
18
|
+
import "../chunk-XQIHFXYP.js";
|
|
19
19
|
import {
|
|
20
20
|
SUPPORT_PASSPORT_DRAFT_MAX_CONTENT_CHARACTERS,
|
|
21
21
|
SUPPORT_PASSPORT_DRAFT_MAX_MEMORIES,
|
|
@@ -56,7 +56,7 @@ import {
|
|
|
56
56
|
notifySupportPassportCommitted,
|
|
57
57
|
resolveSupportPassportModelRoutePlan,
|
|
58
58
|
syncDirectoryForDurability
|
|
59
|
-
} from "../chunk-
|
|
59
|
+
} from "../chunk-BX4WDBTE.js";
|
|
60
60
|
import "../chunk-W4F3C7N7.js";
|
|
61
61
|
import "../chunk-MPC7TYTZ.js";
|
|
62
62
|
import "../chunk-2CXQZXWM.js";
|
|
@@ -64,7 +64,7 @@ import "../chunk-IFBSZGW3.js";
|
|
|
64
64
|
import "../chunk-OGXXGHW6.js";
|
|
65
65
|
import "../chunk-KYY4EACB.js";
|
|
66
66
|
import "../chunk-VQ7B2Q6M.js";
|
|
67
|
-
import "../chunk-
|
|
67
|
+
import "../chunk-OM3RWZQK.js";
|
|
68
68
|
import "../chunk-BANSBRNX.js";
|
|
69
69
|
import "../chunk-GNVZQ5JN.js";
|
|
70
70
|
import "../chunk-YN2UN7N3.js";
|
|
@@ -74,7 +74,7 @@ import "../chunk-2KRNPFPK.js";
|
|
|
74
74
|
import "../chunk-WWDO7ZWM.js";
|
|
75
75
|
import "../chunk-ZSJGYC3C.js";
|
|
76
76
|
import "../chunk-5Y43VGYB.js";
|
|
77
|
-
import "../chunk-
|
|
77
|
+
import "../chunk-GKOML66M.js";
|
|
78
78
|
import "../chunk-AL6EHLB5.js";
|
|
79
79
|
import "../chunk-5HFVWYHL.js";
|
|
80
80
|
import "../chunk-KIW3OOZE.js";
|
|
@@ -87,7 +87,7 @@ import "../chunk-H7XKCNR6.js";
|
|
|
87
87
|
import "../chunk-OFEHITAZ.js";
|
|
88
88
|
import "../chunk-SOBJ6NEY.js";
|
|
89
89
|
import "../chunk-CYEK6Z3P.js";
|
|
90
|
-
import "../chunk-
|
|
90
|
+
import "../chunk-VJGDQA3D.js";
|
|
91
91
|
import "../chunk-DXHVD4DS.js";
|
|
92
92
|
import "../chunk-E6UNM67F.js";
|
|
93
93
|
import "../chunk-6WHJ2EAB.js";
|
|
@@ -95,10 +95,10 @@ import "../chunk-AQEJKOKI.js";
|
|
|
95
95
|
import "../chunk-HM7RHKS4.js";
|
|
96
96
|
import "../chunk-UD7UNYRD.js";
|
|
97
97
|
import "../chunk-IISBCCWR.js";
|
|
98
|
-
import "../chunk-
|
|
99
|
-
import "../chunk-
|
|
98
|
+
import "../chunk-AV2OQF2O.js";
|
|
99
|
+
import "../chunk-OAIWPB2I.js";
|
|
100
100
|
import "../chunk-2YA5N2BY.js";
|
|
101
|
-
import "../chunk-
|
|
101
|
+
import "../chunk-O5MW6CQL.js";
|
|
102
102
|
import "../chunk-5VC7J76U.js";
|
|
103
103
|
import "../chunk-AZEZSQ5R.js";
|
|
104
104
|
import "../chunk-6VAHJ2F6.js";
|
|
@@ -121,12 +121,12 @@ import "../chunk-WTWQA7BB.js";
|
|
|
121
121
|
import "../chunk-VZIAVM72.js";
|
|
122
122
|
import "../chunk-UFGFMWAD.js";
|
|
123
123
|
import "../chunk-BMWN7B3Y.js";
|
|
124
|
-
import "../chunk-
|
|
125
|
-
import "../chunk-
|
|
126
|
-
import "../chunk-
|
|
127
|
-
import "../chunk-
|
|
124
|
+
import "../chunk-KX36OCGK.js";
|
|
125
|
+
import "../chunk-JVNEXW6X.js";
|
|
126
|
+
import "../chunk-KWVI52ER.js";
|
|
127
|
+
import "../chunk-D5UPBXZM.js";
|
|
128
128
|
import "../chunk-ZY2MNJR6.js";
|
|
129
|
-
import "../chunk-
|
|
129
|
+
import "../chunk-2U4BM3TW.js";
|
|
130
130
|
import "../chunk-3UXOZBHV.js";
|
|
131
131
|
import "../chunk-PIWFNPQT.js";
|
|
132
132
|
import "../chunk-BTJ6CAIA.js";
|
|
@@ -135,7 +135,7 @@ import "../chunk-ZQ3WU6JO.js";
|
|
|
135
135
|
import "../chunk-GKCXTSFF.js";
|
|
136
136
|
import "../chunk-2LSZVONP.js";
|
|
137
137
|
import "../chunk-DEUNUKTD.js";
|
|
138
|
-
import "../chunk-
|
|
138
|
+
import "../chunk-BH44JOLA.js";
|
|
139
139
|
import "../chunk-GZFKCLRC.js";
|
|
140
140
|
import "../chunk-6JMQR72P.js";
|
|
141
141
|
import "../chunk-LOFVW6JA.js";
|
|
@@ -166,7 +166,7 @@ import "../chunk-236PXYG7.js";
|
|
|
166
166
|
import "../chunk-ZCUTSMR2.js";
|
|
167
167
|
import "../chunk-QDW3E4RD.js";
|
|
168
168
|
import "../chunk-BOOFTFFE.js";
|
|
169
|
-
import "../chunk-
|
|
169
|
+
import "../chunk-BD5QEP3T.js";
|
|
170
170
|
import "../chunk-UHVXE24Y.js";
|
|
171
171
|
import "../chunk-LZKOVXMX.js";
|
|
172
172
|
import "../chunk-V4JZCTMK.js";
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
exportOkfBundle,
|
|
5
5
|
firstHeading,
|
|
6
6
|
parseIncludeStatus
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-YYNHJF3N.js";
|
|
8
8
|
import {
|
|
9
9
|
OKF_EXPORT_VERSION
|
|
10
10
|
} from "../chunk-4D2YH47Z.js";
|
|
11
11
|
import "../chunk-D24OXEPB.js";
|
|
12
12
|
import "../chunk-3UXOZBHV.js";
|
|
13
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-BD5QEP3T.js";
|
|
14
14
|
import "../chunk-UHVXE24Y.js";
|
|
15
15
|
import "../chunk-LZKOVXMX.js";
|
|
16
16
|
import "../chunk-V4JZCTMK.js";
|
package/dist/verified-recall.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compareVerifiedEpisodeResults,
|
|
3
3
|
searchVerifiedEpisodes
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-JXWTPOMJ.js";
|
|
5
5
|
import "./chunk-B7RWBZXW.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-BD5QEP3T.js";
|
|
7
7
|
import "./chunk-UHVXE24Y.js";
|
|
8
8
|
import "./chunk-LZKOVXMX.js";
|
|
9
9
|
import "./chunk-V4JZCTMK.js";
|
package/dist/who-knows-cli.js
CHANGED
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
renderWhoKnows,
|
|
5
5
|
renderWhoKnowsJson,
|
|
6
6
|
renderWhoKnowsText
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-A2L3P2IY.js";
|
|
8
|
+
import "./chunk-OM3RWZQK.js";
|
|
9
|
+
import "./chunk-BD5QEP3T.js";
|
|
10
10
|
import "./chunk-UHVXE24Y.js";
|
|
11
11
|
import "./chunk-LZKOVXMX.js";
|
|
12
12
|
import "./chunk-V4JZCTMK.js";
|
package/dist/who-knows.js
CHANGED
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
loadWhoKnowsEntities,
|
|
10
10
|
tokenizeTopic,
|
|
11
11
|
validateWhoKnowsInput
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-OM3RWZQK.js";
|
|
13
|
+
import "./chunk-BD5QEP3T.js";
|
|
14
14
|
import "./chunk-UHVXE24Y.js";
|
|
15
15
|
import "./chunk-LZKOVXMX.js";
|
|
16
16
|
import "./chunk-V4JZCTMK.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remnic/core",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.10",
|
|
4
4
|
"description": "Framework-agnostic Remnic memory engine — orchestrator, storage, extraction, search, trust zones",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -3327,7 +3327,7 @@
|
|
|
3327
3327
|
"core"
|
|
3328
3328
|
],
|
|
3329
3329
|
"peerDependencies": {
|
|
3330
|
-
"@remnic/coding-graph": "^10.0.
|
|
3330
|
+
"@remnic/coding-graph": "^10.0.10"
|
|
3331
3331
|
},
|
|
3332
3332
|
"peerDependenciesMeta": {
|
|
3333
3333
|
"@remnic/coding-graph": {
|
|
@@ -1,15 +1,29 @@
|
|
|
1
1
|
import { createHash } from "node:crypto";
|
|
2
2
|
import { mkdir, readFile, readdir, unlink, writeFile } from "node:fs/promises";
|
|
3
3
|
import path from "node:path";
|
|
4
|
+
import { isoWeekId } from "./iso-week.js";
|
|
4
5
|
import { log } from "../logger.js";
|
|
5
6
|
import { composeSalvagedEnvelope } from "../salvage-envelope.js";
|
|
6
7
|
import { sanitizeMemoryContent } from "../sanitize.js";
|
|
7
8
|
import { StorageManager } from "../storage.js";
|
|
8
9
|
import type { ContinuityIncidentRecord, PluginConfig } from "../types.js";
|
|
9
|
-
import {
|
|
10
|
+
import { migrateLegacyFeedbackInbox, resolveFeedbackInboxPath, type SharedFeedbackEntry } from "../shared-context/manager.js";
|
|
10
11
|
import { parseContinuityImprovementLoops } from "../identity-continuity.js";
|
|
11
12
|
import { resolveQmdCapabilities, type QmdConfigProjection, resolveConsolidationCapabilities } from "../capabilities.js";
|
|
12
13
|
import { resolveConversationContextCapabilities } from "../capabilities.js";
|
|
14
|
+
import {
|
|
15
|
+
actionEventsVisibleInStore, capWeeklyPatternDetails,
|
|
16
|
+
buildActionFailurePatterns,
|
|
17
|
+
defaultNamespaceRecallPrefix,
|
|
18
|
+
provenanceVisibleInStoreRecall,
|
|
19
|
+
visibleRubricEntries,
|
|
20
|
+
readFeedbackEntriesForWeekFile,
|
|
21
|
+
readWeeklyActionEvents,
|
|
22
|
+
forgottenCorrectionPatterns, readWeeklyCorrections,
|
|
23
|
+
type FeedbackEntryWithProvenance,
|
|
24
|
+
type WeeklyActionEvent,
|
|
25
|
+
type WeeklyCorrectionEvidence,
|
|
26
|
+
} from "./weekly-evidence.js";
|
|
13
27
|
|
|
14
28
|
type MistakesFile = {
|
|
15
29
|
version?: number;
|
|
@@ -18,13 +32,6 @@ type MistakesFile = {
|
|
|
18
32
|
registry?: MistakeRegistryEntry[];
|
|
19
33
|
};
|
|
20
34
|
|
|
21
|
-
type FeedbackEntryWithProvenance = {
|
|
22
|
-
entry: SharedFeedbackEntry;
|
|
23
|
-
sourceLine: number;
|
|
24
|
-
sourcePath: string;
|
|
25
|
-
entryId: string;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
35
|
type PatternWithProvenance = {
|
|
29
36
|
pattern: string;
|
|
30
37
|
provenance: string[];
|
|
@@ -68,7 +75,7 @@ type EvidenceWindow = {
|
|
|
68
75
|
type MistakeRegistryEntry = {
|
|
69
76
|
id: string;
|
|
70
77
|
pattern: string;
|
|
71
|
-
category: "feedback" | "action";
|
|
78
|
+
category: "feedback" | "action" | "correction";
|
|
72
79
|
status: "active" | "retired";
|
|
73
80
|
agent: string | null;
|
|
74
81
|
workflow: string | null;
|
|
@@ -170,15 +177,6 @@ export interface CompoundingPromotionReport {
|
|
|
170
177
|
}>;
|
|
171
178
|
}
|
|
172
179
|
|
|
173
|
-
type WeeklyActionEvent = {
|
|
174
|
-
line: number;
|
|
175
|
-
action: string;
|
|
176
|
-
outcome: "applied" | "skipped" | "failed";
|
|
177
|
-
policyDecision: "deny" | "defer" | null;
|
|
178
|
-
namespace: string;
|
|
179
|
-
reason: string | null;
|
|
180
|
-
};
|
|
181
|
-
|
|
182
180
|
const COMPOUNDING_VERSION = 2;
|
|
183
181
|
const RETIREMENT_WINDOW_WEEKS = 8;
|
|
184
182
|
|
|
@@ -248,7 +246,7 @@ function mergeEvidenceWindows(current: EvidenceWindow, next: EvidenceWindow): Ev
|
|
|
248
246
|
}
|
|
249
247
|
|
|
250
248
|
function stableMistakeId(
|
|
251
|
-
category: "feedback" | "action",
|
|
249
|
+
category: "feedback" | "action" | "correction",
|
|
252
250
|
pattern: string,
|
|
253
251
|
agent: string | null,
|
|
254
252
|
workflow: string | null,
|
|
@@ -298,7 +296,7 @@ function inferLegacyMistakeScope(pattern: string): { agent: string | null; workf
|
|
|
298
296
|
}
|
|
299
297
|
|
|
300
298
|
function inferLegacyMistakeMetadata(pattern: string): {
|
|
301
|
-
category: "feedback" | "action";
|
|
299
|
+
category: "feedback" | "action" | "correction";
|
|
302
300
|
agent: string | null;
|
|
303
301
|
workflow: string | null;
|
|
304
302
|
} {
|
|
@@ -309,6 +307,13 @@ function inferLegacyMistakeMetadata(pattern: string): {
|
|
|
309
307
|
workflow: "memory-actions",
|
|
310
308
|
};
|
|
311
309
|
}
|
|
310
|
+
if (pattern.startsWith("correction:")) {
|
|
311
|
+
return {
|
|
312
|
+
category: "correction",
|
|
313
|
+
agent: null,
|
|
314
|
+
workflow: "corrections",
|
|
315
|
+
};
|
|
316
|
+
}
|
|
312
317
|
const scope = inferLegacyMistakeScope(pattern);
|
|
313
318
|
return {
|
|
314
319
|
category: "feedback",
|
|
@@ -399,17 +404,6 @@ export function defaultTierMigrationCycleBudget(
|
|
|
399
404
|
};
|
|
400
405
|
}
|
|
401
406
|
|
|
402
|
-
function isoWeekId(d: Date): string {
|
|
403
|
-
// ISO week based on Thursday
|
|
404
|
-
const dt = new Date(Date.UTC(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate()));
|
|
405
|
-
const day = dt.getUTCDay() || 7;
|
|
406
|
-
dt.setUTCDate(dt.getUTCDate() + 4 - day);
|
|
407
|
-
const yearStart = new Date(Date.UTC(dt.getUTCFullYear(), 0, 1));
|
|
408
|
-
const week = Math.ceil((((dt.getTime() - yearStart.getTime()) / 86400000) + 1) / 7);
|
|
409
|
-
const yyyy = dt.getUTCFullYear();
|
|
410
|
-
return `${yyyy}-W${String(week).padStart(2, "0")}`;
|
|
411
|
-
}
|
|
412
|
-
|
|
413
407
|
function isoMonthId(d: Date): string {
|
|
414
408
|
return `${d.getUTCFullYear()}-${String(d.getUTCMonth() + 1).padStart(2, "0")}`;
|
|
415
409
|
}
|
|
@@ -454,7 +448,6 @@ export class CompoundingEngine {
|
|
|
454
448
|
private readonly feedbackInboxPath: string;
|
|
455
449
|
private readonly identityAuditWeeklyDir: string;
|
|
456
450
|
private readonly identityAuditMonthlyDir: string;
|
|
457
|
-
private readonly memoryActionEventsPath: string;
|
|
458
451
|
|
|
459
452
|
constructor(
|
|
460
453
|
private readonly config: PluginConfig,
|
|
@@ -467,10 +460,9 @@ export class CompoundingEngine {
|
|
|
467
460
|
this.rubricsWorkflowsDir = path.join(this.rubricsDir, "workflows");
|
|
468
461
|
this.rubricsPath = path.join(config.memoryDir, "compounding", "rubrics.md");
|
|
469
462
|
this.mistakesPath = path.join(config.memoryDir, "compounding", "mistakes.json");
|
|
470
|
-
this.feedbackInboxPath =
|
|
463
|
+
this.feedbackInboxPath = resolveFeedbackInboxPath(config);
|
|
471
464
|
this.identityAuditWeeklyDir = path.join(config.memoryDir, "identity", "audits", "weekly");
|
|
472
465
|
this.identityAuditMonthlyDir = path.join(config.memoryDir, "identity", "audits", "monthly");
|
|
473
|
-
this.memoryActionEventsPath = path.join(config.memoryDir, "state", "memory-actions.jsonl");
|
|
474
466
|
}
|
|
475
467
|
|
|
476
468
|
async ensureDirs(): Promise<void> {
|
|
@@ -496,15 +488,33 @@ export class CompoundingEngine {
|
|
|
496
488
|
await this.ensureDirs();
|
|
497
489
|
const weekId = opts?.weekId ?? isoWeekId(new Date());
|
|
498
490
|
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
491
|
+
try {
|
|
492
|
+
await migrateLegacyFeedbackInbox(this.config);
|
|
493
|
+
} catch (error) {
|
|
494
|
+
log.warn(`[compounding] legacy feedback inbox migration failed (non-fatal): ${error instanceof Error ? error.message : String(error)}`);
|
|
495
|
+
}
|
|
496
|
+
const entries = await readFeedbackEntriesForWeekFile(this.feedbackInboxPath, weekId);
|
|
497
|
+
const actionEvents = await readWeeklyActionEvents({
|
|
498
|
+
storage: this.storage,
|
|
499
|
+
memoryDir: this.config.memoryDir,
|
|
500
|
+
weekId,
|
|
501
|
+
});
|
|
502
|
+
const defaultPrefix = await defaultNamespaceRecallPrefix(this.config);
|
|
503
|
+
const corrections = await readWeeklyCorrections({
|
|
504
|
+
storage: this.storage,
|
|
505
|
+
memoryDir: this.config.memoryDir,
|
|
506
|
+
weekId, defaultNamespacePrefix: defaultPrefix,
|
|
507
|
+
});
|
|
508
|
+
const actionPatterns = buildActionFailurePatterns(actionEvents);
|
|
502
509
|
const outcomeSummary = this.buildActionOutcomeSummary(actionEvents);
|
|
510
|
+
const storeOutcomeSummary = this.buildActionOutcomeSummary(actionEventsVisibleInStore(actionEvents, defaultPrefix));
|
|
503
511
|
const previousMistakes = await this.readMistakes();
|
|
504
|
-
const
|
|
505
|
-
const
|
|
512
|
+
const priorRegistry = previousMistakes?.registry ?? [];
|
|
513
|
+
const forgottenPatterns = await forgottenCorrectionPatterns(this.storage, this.config.memoryDir, priorRegistry, defaultPrefix);
|
|
514
|
+
const mistakes = this.buildMistakes(entries, actionPatterns, corrections, weekId, priorRegistry, defaultPrefix, forgottenPatterns);
|
|
515
|
+
const rubrics = this.buildRubricSnapshot(entries, storeOutcomeSummary, corrections);
|
|
506
516
|
let promotionCandidates = resolveConsolidationCapabilities(this.config).compoundingSemantic
|
|
507
|
-
? this.derivePromotionCandidates(
|
|
517
|
+
? this.derivePromotionCandidates(storeOutcomeSummary, mistakes.registry, rubrics, defaultPrefix)
|
|
508
518
|
: [];
|
|
509
519
|
if (resolveConversationContextCapabilities(this.config).cmcConsolidation) {
|
|
510
520
|
try {
|
|
@@ -607,7 +617,7 @@ export class CompoundingEngine {
|
|
|
607
617
|
await writeFile(reportJsonPath, JSON.stringify(weeklyArtifact, null, 2) + "\n", "utf-8");
|
|
608
618
|
|
|
609
619
|
// Write stable rubric artifact.
|
|
610
|
-
const rubricsMarkdown = this.formatRubrics(
|
|
620
|
+
const rubricsMarkdown = this.formatRubrics(storeOutcomeSummary, rubrics);
|
|
611
621
|
await writeFile(this.rubricsPath, rubricsMarkdown, "utf-8");
|
|
612
622
|
await writeFile(this.rubricsIndexPath, JSON.stringify(rubrics, null, 2) + "\n", "utf-8");
|
|
613
623
|
await this.syncRubricArtifacts(rubrics);
|
|
@@ -906,9 +916,10 @@ export class CompoundingEngine {
|
|
|
906
916
|
const maxPatterns = Math.max(0, Math.floor(opts?.maxPatterns ?? 40));
|
|
907
917
|
const maxRubrics = Math.max(0, Math.floor(opts?.maxRubrics ?? 4));
|
|
908
918
|
const queryTokens = tokenizeRecallQuery(query);
|
|
919
|
+
const defaultPrefix = await defaultNamespaceRecallPrefix(this.config);
|
|
909
920
|
|
|
910
921
|
const activePatterns = (mistakes?.registry ?? [])
|
|
911
|
-
.filter((entry) => entry.status === "active")
|
|
922
|
+
.filter((entry) => entry.status === "active" && provenanceVisibleInStoreRecall(entry.provenance, defaultPrefix))
|
|
912
923
|
.sort((a, b) =>
|
|
913
924
|
b.recurrenceCount - a.recurrenceCount ||
|
|
914
925
|
b.lastSeenAt.localeCompare(a.lastSeenAt) ||
|
|
@@ -916,10 +927,11 @@ export class CompoundingEngine {
|
|
|
916
927
|
);
|
|
917
928
|
const topPatterns = activePatterns.slice(0, maxPatterns);
|
|
918
929
|
|
|
919
|
-
const allRubrics =
|
|
920
|
-
...(rubrics?.workflows ?? []),
|
|
921
|
-
|
|
922
|
-
|
|
930
|
+
const allRubrics = visibleRubricEntries(
|
|
931
|
+
[...(rubrics?.workflows ?? []), ...(rubrics?.agents ?? [])],
|
|
932
|
+
(entry) => this.getRubricObservationEntries(entry),
|
|
933
|
+
defaultPrefix,
|
|
934
|
+
);
|
|
923
935
|
const scoredRubrics = allRubrics
|
|
924
936
|
.map((entry) => ({
|
|
925
937
|
entry,
|
|
@@ -968,76 +980,6 @@ export class CompoundingEngine {
|
|
|
968
980
|
return defaultTierMigrationCycleBudget(this.config, trigger);
|
|
969
981
|
}
|
|
970
982
|
|
|
971
|
-
private async readFeedbackEntriesForWeek(weekId: string): Promise<FeedbackEntryWithProvenance[]> {
|
|
972
|
-
// Minimal implementation: includes entries where date starts with any day in the ISO week.
|
|
973
|
-
// We approximate by taking all entries and filtering by computed isoWeekId(date).
|
|
974
|
-
const out: FeedbackEntryWithProvenance[] = [];
|
|
975
|
-
try {
|
|
976
|
-
const raw = await readFile(this.feedbackInboxPath, "utf-8");
|
|
977
|
-
const lines = raw.split("\n");
|
|
978
|
-
for (let idx = 0; idx < lines.length; idx += 1) {
|
|
979
|
-
const line = lines[idx];
|
|
980
|
-
if (!line.trim()) continue;
|
|
981
|
-
try {
|
|
982
|
-
const obj = JSON.parse(line);
|
|
983
|
-
const parsed = SharedFeedbackEntrySchema.safeParse(obj);
|
|
984
|
-
if (!parsed.success) continue;
|
|
985
|
-
const d = new Date(parsed.data.date);
|
|
986
|
-
if (!Number.isFinite(d.getTime())) continue;
|
|
987
|
-
if (isoWeekId(d) !== weekId) continue;
|
|
988
|
-
const sourceLine = idx + 1;
|
|
989
|
-
out.push({
|
|
990
|
-
entry: parsed.data,
|
|
991
|
-
sourceLine,
|
|
992
|
-
sourcePath: this.feedbackInboxPath,
|
|
993
|
-
entryId: `${parsed.data.agent}-${parsed.data.date}-${sourceLine}`.replace(/[^a-zA-Z0-9._:-]/g, "_"),
|
|
994
|
-
});
|
|
995
|
-
} catch {
|
|
996
|
-
// ignore
|
|
997
|
-
}
|
|
998
|
-
}
|
|
999
|
-
} catch {
|
|
1000
|
-
// missing feedback is normal
|
|
1001
|
-
}
|
|
1002
|
-
return out;
|
|
1003
|
-
}
|
|
1004
|
-
|
|
1005
|
-
private buildActionFailurePatterns(events: WeeklyActionEvent[]): string[] {
|
|
1006
|
-
const out: string[] = [];
|
|
1007
|
-
for (const event of events) {
|
|
1008
|
-
const failed = event.outcome === "failed" || event.outcome === "skipped";
|
|
1009
|
-
if (!failed && event.policyDecision === null) continue;
|
|
1010
|
-
const suffix = event.reason && event.reason.trim().length > 0
|
|
1011
|
-
? ` - ${event.reason.trim().slice(0, 140)}`
|
|
1012
|
-
: "";
|
|
1013
|
-
out.push(
|
|
1014
|
-
`memory-action/${event.namespace}: ${event.action} ${event.outcome}${event.policyDecision ? `/${event.policyDecision}` : ""}${suffix}`,
|
|
1015
|
-
);
|
|
1016
|
-
}
|
|
1017
|
-
return out;
|
|
1018
|
-
}
|
|
1019
|
-
|
|
1020
|
-
private async readActionEventsForWeek(weekId: string): Promise<WeeklyActionEvent[]> {
|
|
1021
|
-
const out: WeeklyActionEvent[] = [];
|
|
1022
|
-
const rows = await this.storage.readMemoryActionEventRows(Number.MAX_SAFE_INTEGER);
|
|
1023
|
-
for (const row of rows) {
|
|
1024
|
-
const event = row.event;
|
|
1025
|
-
const ts = new Date(event.timestamp);
|
|
1026
|
-
if (!Number.isFinite(ts.getTime()) || isoWeekId(ts) !== weekId) continue;
|
|
1027
|
-
out.push({
|
|
1028
|
-
line: row.line,
|
|
1029
|
-
action: event.action,
|
|
1030
|
-
outcome: event.outcome,
|
|
1031
|
-
policyDecision: event.policyDecision === "deny" || event.policyDecision === "defer"
|
|
1032
|
-
? event.policyDecision
|
|
1033
|
-
: null,
|
|
1034
|
-
namespace: typeof event.namespace === "string" && event.namespace.length > 0 ? event.namespace : "default",
|
|
1035
|
-
reason: typeof event.reason === "string" ? event.reason : null,
|
|
1036
|
-
});
|
|
1037
|
-
}
|
|
1038
|
-
return out;
|
|
1039
|
-
}
|
|
1040
|
-
|
|
1041
983
|
private buildActionOutcomeSummary(events: WeeklyActionEvent[]): ActionOutcomeSummary[] {
|
|
1042
984
|
const byAction = new Map<string, { counts: ActionOutcomeCounts; provenance: Set<string> }>();
|
|
1043
985
|
for (const event of events) {
|
|
@@ -1049,7 +991,7 @@ export class CompoundingEngine {
|
|
|
1049
991
|
if (event.outcome === "applied") acc.counts.applied += 1;
|
|
1050
992
|
else if (event.outcome === "skipped") acc.counts.skipped += 1;
|
|
1051
993
|
else acc.counts.failed += 1;
|
|
1052
|
-
acc.provenance.add(`${
|
|
994
|
+
acc.provenance.add(`${event.ledgerLabel}:L${event.line}`);
|
|
1053
995
|
byAction.set(key, acc);
|
|
1054
996
|
}
|
|
1055
997
|
|
|
@@ -1075,6 +1017,7 @@ export class CompoundingEngine {
|
|
|
1075
1017
|
summary: ActionOutcomeSummary[],
|
|
1076
1018
|
mistakes: MistakeRegistryEntry[],
|
|
1077
1019
|
rubrics: RubricSnapshot,
|
|
1020
|
+
defaultNamespacePrefix: string | null = null,
|
|
1078
1021
|
): PromotionCandidate[] {
|
|
1079
1022
|
const deduped = new Map<string, PromotionCandidate>();
|
|
1080
1023
|
const upsert = (candidate: PromotionCandidate) => {
|
|
@@ -1118,6 +1061,7 @@ export class CompoundingEngine {
|
|
|
1118
1061
|
|
|
1119
1062
|
for (const entry of mistakes) {
|
|
1120
1063
|
if (entry.status !== "active") continue;
|
|
1064
|
+
if (!provenanceVisibleInStoreRecall(entry.provenance, defaultNamespacePrefix)) continue;
|
|
1121
1065
|
if (entry.recurrenceCount < 2) continue;
|
|
1122
1066
|
const content = normalizePromotedGuidanceContent(lessonContentFromPattern(entry.pattern, entry.agent));
|
|
1123
1067
|
if (content.length === 0) continue;
|
|
@@ -1141,6 +1085,7 @@ export class CompoundingEngine {
|
|
|
1141
1085
|
for (const rubric of [...rubrics.workflows, ...rubrics.agents]) {
|
|
1142
1086
|
for (const observation of this.getRubricObservationEntries(rubric)) {
|
|
1143
1087
|
if (this.isSyntheticOutcomeRubricObservation(observation.note)) continue;
|
|
1088
|
+
if (!provenanceVisibleInStoreRecall(observation.provenance, defaultNamespacePrefix)) continue;
|
|
1144
1089
|
const evidenceCount = observation.provenance.length;
|
|
1145
1090
|
if (evidenceCount < 2) continue;
|
|
1146
1091
|
const content = normalizePromotedGuidanceContent(observation.note);
|
|
@@ -1169,13 +1114,14 @@ export class CompoundingEngine {
|
|
|
1169
1114
|
|
|
1170
1115
|
private buildMistakes(
|
|
1171
1116
|
entries: FeedbackEntryWithProvenance[],
|
|
1172
|
-
actionPatterns: string
|
|
1117
|
+
actionPatterns: Array<{ pattern: string; provenance: string }>,
|
|
1118
|
+
corrections: WeeklyCorrectionEvidence[],
|
|
1173
1119
|
weekId: string,
|
|
1174
|
-
previousRegistry: MistakeRegistryEntry[] = [],
|
|
1120
|
+
previousRegistry: MistakeRegistryEntry[] = [], defaultNamespacePrefix: string | null = null, forgottenPatterns: ReadonlySet<string> = new Set(),
|
|
1175
1121
|
): MistakesFile & { details: PatternWithProvenance[]; registry: MistakeRegistryEntry[] } {
|
|
1176
1122
|
const patterns: PatternWithProvenance[] = [];
|
|
1177
1123
|
const evidenceByPattern = new Map<string, {
|
|
1178
|
-
category: "feedback" | "action";
|
|
1124
|
+
category: "feedback" | "action" | "correction";
|
|
1179
1125
|
agent: string | null;
|
|
1180
1126
|
workflow: string | null;
|
|
1181
1127
|
tags: Set<string>;
|
|
@@ -1219,9 +1165,35 @@ export class CompoundingEngine {
|
|
|
1219
1165
|
evidenceByPattern.set(pattern, previous);
|
|
1220
1166
|
}
|
|
1221
1167
|
|
|
1222
|
-
for (const
|
|
1223
|
-
patterns.push({ pattern, provenance: [
|
|
1224
|
-
const
|
|
1168
|
+
for (const correction of corrections) {
|
|
1169
|
+
patterns.push({ pattern: correction.pattern, provenance: [correction.provenance] });
|
|
1170
|
+
const visible = provenanceVisibleInStoreRecall([correction.provenance], defaultNamespacePrefix);
|
|
1171
|
+
const prev = evidenceByPattern.get(correction.pattern) ?? {
|
|
1172
|
+
category: "correction" as const,
|
|
1173
|
+
agent: visible ? correction.source : null,
|
|
1174
|
+
workflow: visible ? (correction.entityRef ?? "corrections") : "corrections",
|
|
1175
|
+
tags: new Set<string>(),
|
|
1176
|
+
severity: null,
|
|
1177
|
+
confidence: visible ? correction.confidence : null,
|
|
1178
|
+
outcome: null,
|
|
1179
|
+
timestamps: [],
|
|
1180
|
+
evidenceWindow: { start: correction.created, end: correction.created },
|
|
1181
|
+
};
|
|
1182
|
+
if (visible) for (const tag of correction.tags) prev.tags.add(tag);
|
|
1183
|
+
prev.timestamps.push(correction.created);
|
|
1184
|
+
if (visible && prev.agent === null && correction.source) prev.agent = correction.source;
|
|
1185
|
+
if (visible && correction.entityRef && prev.workflow === "corrections") prev.workflow = correction.entityRef;
|
|
1186
|
+
if (visible && prev.confidence === null) prev.confidence = correction.confidence;
|
|
1187
|
+
prev.evidenceWindow = mergeEvidenceWindows(prev.evidenceWindow, {
|
|
1188
|
+
start: correction.created,
|
|
1189
|
+
end: correction.created,
|
|
1190
|
+
});
|
|
1191
|
+
evidenceByPattern.set(correction.pattern, prev);
|
|
1192
|
+
}
|
|
1193
|
+
|
|
1194
|
+
for (const item of actionPatterns) {
|
|
1195
|
+
patterns.push({ pattern: item.pattern, provenance: [item.provenance] });
|
|
1196
|
+
const previous = evidenceByPattern.get(item.pattern) ?? {
|
|
1225
1197
|
category: "action" as const,
|
|
1226
1198
|
agent: null,
|
|
1227
1199
|
workflow: "memory-actions",
|
|
@@ -1232,7 +1204,7 @@ export class CompoundingEngine {
|
|
|
1232
1204
|
timestamps: [],
|
|
1233
1205
|
evidenceWindow: { start: null, end: null },
|
|
1234
1206
|
};
|
|
1235
|
-
evidenceByPattern.set(pattern, previous);
|
|
1207
|
+
evidenceByPattern.set(item.pattern, previous);
|
|
1236
1208
|
}
|
|
1237
1209
|
|
|
1238
1210
|
const byPattern = new Map<string, Set<string>>();
|
|
@@ -1242,9 +1214,9 @@ export class CompoundingEngine {
|
|
|
1242
1214
|
byPattern.set(item.pattern, existing);
|
|
1243
1215
|
}
|
|
1244
1216
|
|
|
1245
|
-
const details =
|
|
1246
|
-
.map(([pattern, provenance]) => ({ pattern, provenance: [...provenance].sort() }))
|
|
1247
|
-
.
|
|
1217
|
+
const details = capWeeklyPatternDetails(
|
|
1218
|
+
[...byPattern.entries()].map(([pattern, provenance]) => ({ pattern, provenance: [...provenance].sort() })),
|
|
1219
|
+
(pattern) => evidenceByPattern.get(pattern)?.category, defaultNamespacePrefix);
|
|
1248
1220
|
const previousById = new Map(previousRegistry.map((entry) => [entry.id, entry]));
|
|
1249
1221
|
const previousByPattern = new Map(previousRegistry.map((entry) => [entry.pattern, entry]));
|
|
1250
1222
|
const registry: MistakeRegistryEntry[] = details.map((detail) => {
|
|
@@ -1287,8 +1259,8 @@ export class CompoundingEngine {
|
|
|
1287
1259
|
const staleWeeks = weekIdToIndex(weekId) - weekIdToIndex(previous.lastWeekId);
|
|
1288
1260
|
registry.push({
|
|
1289
1261
|
...previous,
|
|
1290
|
-
status: staleWeeks >= RETIREMENT_WINDOW_WEEKS ? "retired" : previous.status,
|
|
1291
|
-
retiredAt: staleWeeks >= RETIREMENT_WINDOW_WEEKS
|
|
1262
|
+
status: forgottenPatterns.has(previous.pattern) || staleWeeks >= RETIREMENT_WINDOW_WEEKS ? "retired" : previous.status,
|
|
1263
|
+
retiredAt: forgottenPatterns.has(previous.pattern) || staleWeeks >= RETIREMENT_WINDOW_WEEKS
|
|
1292
1264
|
? previous.retiredAt ?? new Date().toISOString()
|
|
1293
1265
|
: previous.retiredAt ?? null,
|
|
1294
1266
|
});
|
|
@@ -1427,6 +1399,7 @@ export class CompoundingEngine {
|
|
|
1427
1399
|
private buildRubricSnapshot(
|
|
1428
1400
|
entries: FeedbackEntryWithProvenance[],
|
|
1429
1401
|
outcomeSummary: ActionOutcomeSummary[],
|
|
1402
|
+
corrections: WeeklyCorrectionEvidence[] = [],
|
|
1430
1403
|
): RubricSnapshot {
|
|
1431
1404
|
const updatedAt = new Date().toISOString();
|
|
1432
1405
|
const byAgent = new Map<string, RubricSnapshotEntry>();
|
|
@@ -1471,6 +1444,38 @@ export class CompoundingEngine {
|
|
|
1471
1444
|
byWorkflow.set(workflow, workflowEntry);
|
|
1472
1445
|
}
|
|
1473
1446
|
|
|
1447
|
+
for (const correction of corrections) {
|
|
1448
|
+
if (correction.source) {
|
|
1449
|
+
const agentEntry = byAgent.get(correction.source) ?? {
|
|
1450
|
+
id: stableRubricId("agent", correction.source),
|
|
1451
|
+
kind: "agent" as const,
|
|
1452
|
+
subject: correction.source,
|
|
1453
|
+
observations: [],
|
|
1454
|
+
tags: [],
|
|
1455
|
+
provenance: [],
|
|
1456
|
+
observationEntries: [],
|
|
1457
|
+
updatedAt,
|
|
1458
|
+
};
|
|
1459
|
+
this.addRubricObservation(agentEntry, correction.note, correction.provenance);
|
|
1460
|
+
agentEntry.tags = normalizeTags([...agentEntry.tags, ...correction.tags]);
|
|
1461
|
+
byAgent.set(correction.source, agentEntry);
|
|
1462
|
+
}
|
|
1463
|
+
const workflow = correction.entityRef ?? "corrections";
|
|
1464
|
+
const workflowEntry = byWorkflow.get(workflow) ?? {
|
|
1465
|
+
id: stableRubricId("workflow", workflow),
|
|
1466
|
+
kind: "workflow" as const,
|
|
1467
|
+
subject: workflow,
|
|
1468
|
+
observations: [],
|
|
1469
|
+
tags: [],
|
|
1470
|
+
provenance: [],
|
|
1471
|
+
observationEntries: [],
|
|
1472
|
+
updatedAt,
|
|
1473
|
+
};
|
|
1474
|
+
this.addRubricObservation(workflowEntry, correction.note, correction.provenance);
|
|
1475
|
+
workflowEntry.tags = normalizeTags([...workflowEntry.tags, ...correction.tags]);
|
|
1476
|
+
byWorkflow.set(workflow, workflowEntry);
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1474
1479
|
for (const item of outcomeSummary) {
|
|
1475
1480
|
const workflowEntry = byWorkflow.get(item.action) ?? {
|
|
1476
1481
|
id: stableRubricId("workflow", item.action),
|
|
@@ -1503,7 +1508,7 @@ export class CompoundingEngine {
|
|
|
1503
1508
|
"",
|
|
1504
1509
|
`Generated: ${snapshot.updatedAt}`,
|
|
1505
1510
|
"",
|
|
1506
|
-
"Stable, deterministic rubric snapshot generated from weekly feedback
|
|
1511
|
+
"Stable, deterministic rubric snapshot generated from weekly feedback, correction memories, and action outcomes.",
|
|
1507
1512
|
"",
|
|
1508
1513
|
];
|
|
1509
1514
|
|