pi-mega-compact 0.20.45 → 0.20.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/dist/config/vector-cortex-enc0d.js +39 -0
  2. package/dist/config/vector-cortex-enc0e.js +40 -0
  3. package/dist/config/vector-cortex-vc3to8.js +239 -0
  4. package/dist/config/vector-cortex.js +5 -227
  5. package/dist/config.js +1 -1
  6. package/dist/extensions/dashboard-server/routes-rag-settings-vector-cortex.js +2 -0
  7. package/dist/extensions/dashboard-server/routes-setup-cortex.js +30 -1
  8. package/dist/extensions/dashboard-server/setup-cortex-blockers.js +2 -1
  9. package/dist/src/config/vector-cortex-enc0d.js +39 -0
  10. package/dist/src/config/vector-cortex-enc0e.js +40 -0
  11. package/dist/src/config/vector-cortex-vc3to8.js +239 -0
  12. package/dist/src/config/vector-cortex.js +5 -227
  13. package/dist/src/config.js +1 -1
  14. package/dist/src/vector-cortex/encoder/decision.js +17 -0
  15. package/dist/src/vector-cortex/encoder/promotion-emit.js +40 -0
  16. package/dist/src/vector-cortex/encoder/promotion.js +64 -0
  17. package/dist/src/vector-cortex/encoder/runtime-emit.js +8 -2
  18. package/dist/src/vector-cortex/encoder/runtime-select.js +35 -1
  19. package/dist/vector-cortex/encoder/decision.js +17 -0
  20. package/dist/vector-cortex/encoder/promotion-emit.js +40 -0
  21. package/dist/vector-cortex/encoder/promotion.js +64 -0
  22. package/dist/vector-cortex/encoder/runtime-emit.js +8 -2
  23. package/dist/vector-cortex/encoder/runtime-select.js +35 -1
  24. package/extensions/dashboard-client/dist/assets/{AreaChart-Cn6X7epL.js → AreaChart-COnj8FHi.js} +2 -2
  25. package/extensions/dashboard-client/dist/assets/{AreaChart-Cn6X7epL.js.map → AreaChart-COnj8FHi.js.map} +1 -1
  26. package/extensions/dashboard-client/dist/assets/{BarChart-APy1Wc7z.js → BarChart-BYqt8c5-.js} +2 -2
  27. package/extensions/dashboard-client/dist/assets/{BarChart-APy1Wc7z.js.map → BarChart-BYqt8c5-.js.map} +1 -1
  28. package/extensions/dashboard-client/dist/assets/{CacheTab-CEv_Ss9O.js → CacheTab-PLRjMrZV.js} +2 -2
  29. package/extensions/dashboard-client/dist/assets/{CacheTab-CEv_Ss9O.js.map → CacheTab-PLRjMrZV.js.map} +1 -1
  30. package/extensions/dashboard-client/dist/assets/{EventsTab-8jV1Pr0C.js → EventsTab-DXKSft6w.js} +2 -2
  31. package/extensions/dashboard-client/dist/assets/{EventsTab-8jV1Pr0C.js.map → EventsTab-DXKSft6w.js.map} +1 -1
  32. package/extensions/dashboard-client/dist/assets/{HealthTab-B2VgEz1j.js → HealthTab-BgVIsrde.js} +2 -2
  33. package/extensions/dashboard-client/dist/assets/{HealthTab-B2VgEz1j.js.map → HealthTab-BgVIsrde.js.map} +1 -1
  34. package/extensions/dashboard-client/dist/assets/{MaintenanceTab-m37AlTbg.js → MaintenanceTab-DNgFC8KZ.js} +2 -2
  35. package/extensions/dashboard-client/dist/assets/{MaintenanceTab-m37AlTbg.js.map → MaintenanceTab-DNgFC8KZ.js.map} +1 -1
  36. package/extensions/dashboard-client/dist/assets/{MemoryMapTab-Co2jbqdT.js → MemoryMapTab-B6yY47sz.js} +2 -2
  37. package/extensions/dashboard-client/dist/assets/{MemoryMapTab-Co2jbqdT.js.map → MemoryMapTab-B6yY47sz.js.map} +1 -1
  38. package/extensions/dashboard-client/dist/assets/{MetricsTab-D0yV9X6D.js → MetricsTab-BrhJ6rkx.js} +2 -2
  39. package/extensions/dashboard-client/dist/assets/{MetricsTab-D0yV9X6D.js.map → MetricsTab-BrhJ6rkx.js.map} +1 -1
  40. package/extensions/dashboard-client/dist/assets/{OverviewTab-J5TjXB14.js → OverviewTab-RFHU9L4x.js} +2 -2
  41. package/extensions/dashboard-client/dist/assets/{OverviewTab-J5TjXB14.js.map → OverviewTab-RFHU9L4x.js.map} +1 -1
  42. package/extensions/dashboard-client/dist/assets/{ReposTab-BadNIkWu.js → ReposTab-UFIWKkJM.js} +2 -2
  43. package/extensions/dashboard-client/dist/assets/{ReposTab-BadNIkWu.js.map → ReposTab-UFIWKkJM.js.map} +1 -1
  44. package/extensions/dashboard-client/dist/assets/{SessionsTab-CdKShJuR.js → SessionsTab-BHFYsmK8.js} +2 -2
  45. package/extensions/dashboard-client/dist/assets/{SessionsTab-CdKShJuR.js.map → SessionsTab-BHFYsmK8.js.map} +1 -1
  46. package/extensions/dashboard-client/dist/assets/{SetupTab-CPemizDx.js → SetupTab-C3dnKa8y.js} +3 -3
  47. package/extensions/dashboard-client/dist/assets/{SetupTab-CPemizDx.js.map → SetupTab-C3dnKa8y.js.map} +1 -1
  48. package/extensions/dashboard-client/dist/assets/{TimeSavedCard-TvULibwW.js → TimeSavedCard-aPG5Knqn.js} +2 -2
  49. package/extensions/dashboard-client/dist/assets/{TimeSavedCard-TvULibwW.js.map → TimeSavedCard-aPG5Knqn.js.map} +1 -1
  50. package/extensions/dashboard-client/dist/assets/{TurnsTab-CglFIcYy.js → TurnsTab-fGm9n-Tk.js} +2 -2
  51. package/extensions/dashboard-client/dist/assets/{TurnsTab-CglFIcYy.js.map → TurnsTab-fGm9n-Tk.js.map} +1 -1
  52. package/extensions/dashboard-client/dist/assets/{VcStatusBadge-H2bBNhrR.js → VcStatusBadge-BtmSNH8X.js} +2 -2
  53. package/extensions/dashboard-client/dist/assets/{VcStatusBadge-H2bBNhrR.js.map → VcStatusBadge-BtmSNH8X.js.map} +1 -1
  54. package/extensions/dashboard-client/dist/assets/{VectorCortexTab-CXPv3sYQ.js → VectorCortexTab-meALMMOZ.js} +2 -2
  55. package/extensions/dashboard-client/dist/assets/{VectorCortexTab-CXPv3sYQ.js.map → VectorCortexTab-meALMMOZ.js.map} +1 -1
  56. package/extensions/dashboard-client/dist/assets/{WikiTab-BNfN175_.js → WikiTab-0TK6q6g1.js} +2 -2
  57. package/extensions/dashboard-client/dist/assets/{WikiTab-BNfN175_.js.map → WikiTab-0TK6q6g1.js.map} +1 -1
  58. package/extensions/dashboard-client/dist/assets/{button-DjN7aqD2.js → button-CKEnMZ98.js} +2 -2
  59. package/extensions/dashboard-client/dist/assets/{button-DjN7aqD2.js.map → button-CKEnMZ98.js.map} +1 -1
  60. package/extensions/dashboard-client/dist/assets/{card-DLHA5XP8.js → card-BVVhm3sL.js} +2 -2
  61. package/extensions/dashboard-client/dist/assets/{card-DLHA5XP8.js.map → card-BVVhm3sL.js.map} +1 -1
  62. package/extensions/dashboard-client/dist/assets/{client-extra-ZT6mIQZS.js → client-extra-BvGxKZpm.js} +2 -2
  63. package/extensions/dashboard-client/dist/assets/{client-extra-ZT6mIQZS.js.map → client-extra-BvGxKZpm.js.map} +1 -1
  64. package/extensions/dashboard-client/dist/assets/{generateCategoricalChart-DAl4dRVG.js → generateCategoricalChart-B1PeCct1.js} +2 -2
  65. package/extensions/dashboard-client/dist/assets/{generateCategoricalChart-DAl4dRVG.js.map → generateCategoricalChart-B1PeCct1.js.map} +1 -1
  66. package/extensions/dashboard-client/dist/assets/{index-H-sfROoW.js → index-DuThOA-d.js} +3 -3
  67. package/extensions/dashboard-client/dist/assets/{index-H-sfROoW.js.map → index-DuThOA-d.js.map} +1 -1
  68. package/extensions/dashboard-client/dist/assets/{switch-BCxvJYon.js → switch-7qLS7ajc.js} +2 -2
  69. package/extensions/dashboard-client/dist/assets/{switch-BCxvJYon.js.map → switch-7qLS7ajc.js.map} +1 -1
  70. package/extensions/dashboard-client/dist/assets/{toggle-DviUMYeg.js → toggle-D7mgOVxz.js} +2 -2
  71. package/extensions/dashboard-client/dist/assets/{toggle-DviUMYeg.js.map → toggle-D7mgOVxz.js.map} +1 -1
  72. package/extensions/dashboard-client/dist/assets/{useSSE-DP2O8vHY.js → useSSE-ChpyZVeX.js} +2 -2
  73. package/extensions/dashboard-client/dist/assets/{useSSE-DP2O8vHY.js.map → useSSE-ChpyZVeX.js.map} +1 -1
  74. package/extensions/dashboard-client/dist/index.html +1 -1
  75. package/extensions/dashboard-client/src/tabs/SetupTab/CortexBlockersCard.tsx +17 -1
  76. package/extensions/dashboard-client/src/tabs/SetupTab/CortexSetup.tsx +1 -0
  77. package/extensions/dashboard-client/src/types/setup-cortex.ts +10 -0
  78. package/extensions/dashboard-server/api-contracts/setup-cortex.ts +11 -0
  79. package/extensions/dashboard-server/routes-rag-settings-vector-cortex.ts +12 -0
  80. package/extensions/dashboard-server/routes-setup-cortex.ts +35 -1
  81. package/extensions/dashboard-server/setup-cortex-blockers.ts +2 -1
  82. package/package.json +1 -1
  83. package/src/config/vector-cortex-enc0d.ts +41 -0
  84. package/src/config/vector-cortex-enc0e.ts +42 -0
  85. package/src/config/vector-cortex-vc3to8.ts +256 -0
  86. package/src/config/vector-cortex.ts +23 -245
  87. package/src/config.ts +2 -0
  88. package/src/vector-cortex/encoder/decision.ts +28 -1
  89. package/src/vector-cortex/encoder/promotion-emit.ts +63 -0
  90. package/src/vector-cortex/encoder/promotion.ts +95 -0
  91. package/src/vector-cortex/encoder/runtime-emit.ts +21 -4
  92. package/src/vector-cortex/encoder/runtime-select.ts +46 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-mega-compact",
3
- "version": "0.20.45",
3
+ "version": "0.20.47",
4
4
  "description": "Layered, local, vector-backed context compressor for pi — supersede/collapse/cluster compaction with deduped inline recall.",
5
5
  "type": "module",
6
6
  "license": "BSD-3-Clause",
@@ -0,0 +1,41 @@
1
+ /**
2
+ * config/vector-cortex-enc0d.ts — ENC-0d promotion gate over real trained assets.
3
+ *
4
+ * Extracted from vector-cortex.ts so that file stays under the 300-line soft
5
+ * limit (soft-as-hard gate), exactly as vector-cortex-enc0a.ts / enc0b.ts /
6
+ * enc0c.ts and the VC8C/VC9A-D/ML5A-E/DEDUP_ATTR siblings were. vector-cortex.ts
7
+ * re-exports the flag below and root src/config.ts re-exports it, so no
8
+ * consumer import path changes.
9
+ *
10
+ * ENC-0d turns the ML5-E promotion gate into the real-asset promotion path:
11
+ * it accepts a `{color}` real candidate manifest (the ENC-0c trained head
12
+ * weights + the ENC-0b trunk, staged under
13
+ * ~/.pi/mega-compact-encoder/candidates/), digest-verifies every staged byte
14
+ * before any swap, and performs an atomic asset swap with rollback-to-previous
15
+ * on qualification failure. The extension itself never stages candidate assets —
16
+ * only the operator trains them. When the flag is ON and a digest-verified
17
+ * green candidate exists, an atomic swap is performed and the runtime flips into
18
+ * qualified mode A; a red qualification (or any verification failure) keeps the
19
+ * prior asset live and emits a demotion.
20
+ *
21
+ * `MEGACOMPACT_ENC_0D=0` accepts no candidate, swaps nothing, emits nothing, and
22
+ * the shipped manifest stays at the ENC-0c survivor — byte-identical predecessor.
23
+ *
24
+ * The split is purely mechanical: ENC_0D_ENABLED follows ENC_0C_ENABLED in name,
25
+ * semantics, and default, and vector-cortex.ts re-exports it so every existing
26
+ * `from "./config/vector-cortex.js"` import keeps resolving unchanged.
27
+ *
28
+ * Pi-agnostic, dependency-free (PREVENT-PI-004 / PREVENT-011).
29
+ */
30
+
31
+ import { sprintFlag } from "./vector-cortex-flag.js";
32
+
33
+ /**
34
+ * ENC-0d — atomic real-asset promotion over trained candidates. Default ON.
35
+ * `MEGACOMPACT_ENC_0D=0` disables and is byte-identical to the predecessor
36
+ * (ENC-0c): no candidate is accepted, no swap is performed, no promote/
37
+ * demote/rollback events are emitted, and the shipped manifest stays at the
38
+ * ENC-0c survivor. This flag MUST also be a dashboard SETTINGS toggle (visible
39
+ * in config UI, never in EXCLUDED_SETTINGS), mirroring ENC_0A/ENC_0B/ENC_0C.
40
+ */
41
+ export const ENC_0D_ENABLED = (): boolean => sprintFlag("MEGACOMPACT_ENC_0D");
@@ -0,0 +1,42 @@
1
+ /**
2
+ * config/vector-cortex-enc0e.ts — ENC-0e darwin-x64 explicit demotion reason.
3
+ *
4
+ * Extracted from vector-cortex.ts so that file stays under the 300-line soft
5
+ * limit (soft-as-hard gate), exactly as vector-cortex-enc0a.ts / enc0b.ts /
6
+ * enc0c.ts / enc0d.ts and the VC8C/VC9A-D/ML5A-E/DEDUP_ATTR siblings were.
7
+ * vector-cortex.ts re-exports the flag below and root src/config.ts re-exports
8
+ * it, so no consumer import path changes.
9
+ *
10
+ * ENC-0e closes HG-4's operator-visibility gap on macOS Intel (darwin-x64): the
11
+ * platform has no native binary upstream (arm64-only; a darwin-x64
12
+ * transform-class package ships only WASM), so the runtime demotes to mode-B
13
+ * WASM per HG-4. That demotion already exists in the ML5-C decision rule —
14
+ * ENC-0e makes it EXPLICIT by surfacing a deterministic demotion reason on the
15
+ * runtime-selection event and on the Setup Cortex blockers card, so an
16
+ * Intel-Mac operator sees exactly why mode A is unreachable.
17
+ *
18
+ * `MEGACOMPACT_ENC_0E=0` strips ONLY the reason surface: no demotionReason on
19
+ * the runtime-selection event, no Setup card row. The ML5-C demotion itself
20
+ * (mode-B/WASM on Intel Mac) remains the default and is NOT gated off — so the
21
+ * flag-off path is byte-identical to the predecessor. The flag MUST also be a
22
+ * dashboard SETTINGS toggle (visible, never in EXCLUDED_SETTINGS).
23
+ *
24
+ * The split is purely mechanical: ENC_0E_ENABLED follows ENC_0D_ENABLED in
25
+ * name, semantics, and default, and vector-cortex.ts re-exports it so every
26
+ * existing `from "./config/vector-cortex.js"` import keeps resolving unchanged.
27
+ *
28
+ * Pi-agnostic, dependency-free (PREVENT-PI-004 / PREVENT-011).
29
+ */
30
+
31
+ import { sprintFlag } from "./vector-cortex-flag.js";
32
+
33
+ /**
34
+ * ENC-0e — darwin-x64 explicit demotion reason. Default ON.
35
+ * `MEGACOMPACT_ENC_0E=0` disables and is byte-identical to the predecessor
36
+ * (ENC-0d): the runtime-selection event carries no demotionReason and the Setup
37
+ * Cortex blockers card renders no demotion-reason row. The ML5-C darwin-x64
38
+ * WASM demotion itself is NOT gated off — only the explicit reason surface is.
39
+ * This flag MUST also be a dashboard SETTINGS toggle (visible in config UI,
40
+ * never in EXCLUDED_SETTINGS), mirroring ENC_0A/ENC_0B/ENC_0C/ENC_0D.
41
+ */
42
+ export const ENC_0E_ENABLED = (): boolean => sprintFlag("MEGACOMPACT_ENC_0E");
@@ -0,0 +1,256 @@
1
+ /**
2
+ * config/vector-cortex-vc3to8.ts — VC3A..VC8B flag siblings (extracted).
3
+ *
4
+ * Mechanical extract from vector-cortex.ts so that barrel stays under the
5
+ * 300-line soft-as-hard cap (each sprint adds one re-export line; the VC3A..VC8B
6
+ * inline definitions were the bulk). Mirrors the vector-cortex-early.ts precedent
7
+ * (VC0A..VC2C extracted there) and the VC8C+/ML5/ENC sibling-extract pattern.
8
+ * vector-cortex.ts re-exports every flag below, so no consumer import path changes.
9
+ *
10
+ * Pi-agnostic, dependency-free (PREVENT-PI-004 / PREVENT-011). Default ON;
11
+ * `=0` byte-identical to the predecessor for every flag.
12
+ */
13
+ import { sprintFlag } from "./vector-cortex-flag.js";
14
+
15
+ /**
16
+ * VC3A — capability-gated cortex store (CortexReader/Writer/Admin, CortexRecordV1).
17
+ * Default ON. `MEGACOMPACT_VC3A=0` disables and is byte-identical to the
18
+ * predecessor (mode C: the derived cortex store is absent, mode B in-memory is
19
+ * not consulted, zero `vector_cortex_record_append_failed` /
20
+ * `vector_cortex_generation_rebuilt` emissions; the predecessor derived pointer
21
+ * and goldens are unchanged). The real consumers are the cortex append seam, the
22
+ * cortex rebuild/admin seam and the reader-only topology summary seam.
23
+ */
24
+ export const VC3A_ENABLED = (): boolean => sprintFlag("MEGACOMPACT_VC3A");
25
+
26
+ /**
27
+ * VC3B — deterministic cortical topology (TopologyV1 / EdgeV1).
28
+ * Default ON. `MEGACOMPACT_VC3B=0` disables and is byte-identical to the
29
+ * predecessor (mode C: no topology graph is built or emitted, the dashboard
30
+ * topology view returns the VC3A-precise aggregation shape with no node/edge
31
+ * arrays, zero `vector_cortex_topology_*` emissions). The real consumers are
32
+ * the topology build seam (build.ts) and the dashboard topology node/edge view.
33
+ */
34
+ export const VC3B_ENABLED = (): boolean => sprintFlag("MEGACOMPACT_VC3B");
35
+
36
+ /**
37
+ * VC3C — topology query + router invalidation (TopologyQueryV1 / RouterKeyV2,
38
+ * M6 router-generation-v2 migration).
39
+ * Default ON. `MEGACOMPACT_VC3C=0` disables and is byte-identical to the
40
+ * predecessor (mode C: no length-delimited router key, no generation
41
+ * invalidation, zero `vector_cortex_router_generation_invalidated` /
42
+ * `vector_cortex_topology_query_demoted` emissions; the predecessor tiered
43
+ * router keying is unchanged). The real consumers are the topology query seam
44
+ * (query.ts), the M6 router-generation-v2 migration seam, and the reader-only
45
+ * dashboard topology query diagnostic view.
46
+ */
47
+ export const VC3C_ENABLED = (): boolean => sprintFlag("MEGACOMPACT_VC3C");
48
+
49
+ /**
50
+ * VC4A — dual-tier shard contract (SemanticShardV1 / ExactShardV1 /
51
+ * ShardManifestV1).
52
+ * Default ON. `MEGACOMPACT_VC4A=0` disables and is byte-identical to the
53
+ * predecessor (mode C: exact anchors/current transcript only, no semantic or
54
+ * exact shard manifest is assembled or emitted, zero
55
+ * `vector_cortex_shard_manifest_built` / `vector_cortex_protected_span_rejected`
56
+ * emissions; the predecessor derived pointer and goldens are unchanged). The
57
+ * real consumers are the shard assembly seam (manifest.ts) and the reader-only
58
+ * dashboard shards aggregate view.
59
+ */
60
+ export const VC4A_ENABLED = (): boolean => sprintFlag("MEGACOMPACT_VC4A");
61
+
62
+ /**
63
+ * VC4B — residual codec and numeric parity (ResidualCodecV1 / ParityShardV1).
64
+ * Default ON. `MEGACOMPACT_VC4B=0` disables and is byte-identical to the
65
+ * predecessor (mode C: no residual artifact is admitted, the exact compressed
66
+ * payload / ledger bytes remain the only representation, zero
67
+ * `vector_cortex_residual_admitted` / `vector_cortex_parity_recovery_failed`
68
+ * emissions; the VC4A shard manifest and its goldens are unchanged). The real
69
+ * consumers are the codec admission seam (codec.ts) and the reader-only
70
+ * dashboard residual aggregate view. The codec math itself is PURE — flag OFF
71
+ * gates the reporter/admission seam, never the arithmetic.
72
+ */
73
+ export const VC4B_ENABLED = (): boolean => sprintFlag("MEGACOMPACT_VC4B");
74
+
75
+ /**
76
+ * VC4C — reconstruction fidelity (closure + assemble + validate). Default ON.
77
+ * `MEGACOMPACT_VC4C=0` disables and is byte-identical to the predecessor
78
+ * (VC4B): no conservative closure is computed, the reconstruction validator's
79
+ * `vector_cortex_reconstruction_validated` / `vector_cortex_closure_rejected`
80
+ * events are never emitted, and the assembled reconstruction is never produced
81
+ * (the prompt continues to be built by the legacy VC4B exact/residual path and
82
+ * the VC4A shard goldens are unchanged). The closure/assemble/validate
83
+ * functions are PURE — flag OFF gates the reporter seam, never the arithmetic.
84
+ * This flag MUST also be a dashboard SETTINGS toggle (visible in config UI,
85
+ * never in EXCLUDED_SETTINGS), mirroring VC4A/VC4B.
86
+ */
87
+ export const VC4C_ENABLED = (): boolean => sprintFlag("MEGACOMPACT_VC4C");
88
+
89
+ /**
90
+ * VC5A — PromptDagV1 + budgeted portfolio planner. Default ON.
91
+ * `MEGACOMPACT_VC5A=0` disables and is byte-identical to the predecessor
92
+ * (VC4C): no prompt DAG is built or validated, no budgeted plan is selected,
93
+ * the `vector_cortex_plan_selected` / `vector_cortex_plan_mandatory_overflow`
94
+ * events are never emitted, and the prompt continues to be built by the
95
+ * predecessor VC4C closure/reconstruction path (its goldens are unchanged).
96
+ * The builder/validator/portfolio functions are PURE — flag OFF gates the
97
+ * reporter + dashboard seam, never the arithmetic. This flag MUST also be a
98
+ * dashboard SETTINGS toggle (visible in config UI, never in EXCLUDED_SETTINGS),
99
+ * mirroring VC4A/VC4B/VC4C.
100
+ */
101
+ export const VC5A_ENABLED = (): boolean => sprintFlag("MEGACOMPACT_VC5A");
102
+
103
+ /**
104
+ * VC5B — validated prompt renderer + provider profiles. Default ON.
105
+ * `MEGACOMPACT_VC5B=0` disables and is byte-identical to the predecessor
106
+ * (VC5A): no render manifest is produced, no canonical request is hashed, the
107
+ * `vector_cortex_render_validated` / `vector_cortex_provider_bypassed` events are
108
+ * never emitted, and the prompt continues to be built by the predecessor VC5A
109
+ * DAG/plan path (its goldens are unchanged). The render/validate functions are
110
+ * PURE — flag OFF gates the reporter + dashboard seam, never the arithmetic.
111
+ * This flag MUST also be a dashboard SETTINGS toggle (visible in config UI, never
112
+ * in EXCLUDED_SETTINGS), mirroring VC4A/VC4B/VC4C/VC5A.
113
+ */
114
+ export const VC5B_ENABLED = (): boolean => sprintFlag("MEGACOMPACT_VC5B");
115
+
116
+ /**
117
+ * VC5C — live graduated rollout. Default ON. `MEGACOMPACT_VC5C=0` disables and
118
+ * is byte-identical to the predecessor (VC5B): no session is assigned a stable
119
+ * 10k bucket, no gate-advance decision runs, the `vector_cortex_rollout_assigned`
120
+ * / `vector_cortex_rollout_promotion_blocked` events are never emitted, and the
121
+ * prompt continues to be built by the predecessor VC5B renderer path (its goldens
122
+ * are unchanged). The assign/gate/emit functions are PURE — flag OFF gates the
123
+ * reporter + dashboard seam, never the arithmetic. This flag MUST also be a
124
+ * dashboard SETTINGS toggle (visible in config UI, never in EXCLUDED_SETTINGS),
125
+ * mirroring VC4A/VC4B/VC4C/VC5A/VC5B.
126
+ */
127
+ export const VC5C_ENABLED = (): boolean => sprintFlag("MEGACOMPACT_VC5C");
128
+
129
+ /**
130
+ * VC6A — advanced closure optimization. Default ON. `MEGACOMPACT_VC6A=0`
131
+ * disables and is byte-identical to the predecessor (VC5C): the `optimizeClosure`
132
+ * transitive-reduction arithmetic STILL RUNS (it is PURE), but the
133
+ * `vector_cortex_closure_optimized` / `vector_cortex_closure_proof_rejected`
134
+ * events are never emitted and the dashboard closure diagnostics seam is
135
+ * suppressed. Flag OFF gates the reporter + dashboard seam, never the arithmetic,
136
+ * so flag-off outbound/predecessor golden bytes match exactly. This flag MUST
137
+ * also be a dashboard SETTINGS toggle (visible in config UI, never in
138
+ * EXCLUDED_SETTINGS), mirroring VC4A/VC4B/VC4C/VC5A/VC5B/VC5C.
139
+ */
140
+ export const VC6A_ENABLED = (): boolean => sprintFlag("MEGACOMPACT_VC6A");
141
+
142
+ /**
143
+ * VC6B — exact source restoration. Default ON. `MEGACOMPACT_VC6B=0` disables and
144
+ * is byte-identical to the predecessor (VC6A): the `restoreSources` /
145
+ * `verifyRestored` arithmetic STILL RUNS (it is PURE — an exact-source read plus
146
+ * a SHA-256 comparison, with no clock, storage, or network), but the
147
+ * `vector_cortex_source_restored` / `vector_cortex_restore_digest_rejected`
148
+ * events are never emitted and the dashboard restoration diagnostics seam is
149
+ * suppressed. Flag OFF gates the reporter + dashboard seam, never the
150
+ * restore/verify arithmetic, so flag-off outbound/predecessor golden bytes match
151
+ * exactly. This flag MUST also be a dashboard SETTINGS toggle (visible in config
152
+ * UI, never in EXCLUDED_SETTINGS), mirroring VC4A/VC4B/VC4C/VC5A/VC5B/VC5C/VC6A.
153
+ */
154
+ export const VC6B_ENABLED = (): boolean => sprintFlag("MEGACOMPACT_VC6B");
155
+
156
+ /**
157
+ * VC6C — self-healing derived controller. Default ON. `MEGACOMPACT_VC6C=0`
158
+ * disables and is byte-identical to the predecessor (VC6B): the `detectGaps` /
159
+ * `planRebuild` / `rebuildGeneration` / `switchPointer` arithmetic STILL RUNS (it
160
+ * is PURE — a high-water comparison plus a SHA-256 root-digest check, with an
161
+ * INJECTED clock and no storage or network), but the
162
+ * `vector_cortex_repair_planned` / `vector_cortex_repair_pointer_switched` /
163
+ * `vector_cortex_repair_backoff` events are never emitted and the dashboard
164
+ * repair diagnostics seam is suppressed. Flag OFF gates the reporter + dashboard
165
+ * seam, never the gap-detection/rebuild arithmetic (in particular, an unverified
166
+ * pointer switch stays refused with the flag off), so flag-off
167
+ * outbound/predecessor golden bytes match exactly. This flag MUST also be a
168
+ * dashboard SETTINGS toggle (visible in config UI, never in EXCLUDED_SETTINGS),
169
+ * mirroring VC4A/VC4B/VC4C/VC5A/VC5B/VC5C/VC6A/VC6B.
170
+ */
171
+ export const VC6C_ENABLED = (): boolean => sprintFlag("MEGACOMPACT_VC6C");
172
+
173
+ /**
174
+ * VC7A — frozen range crystals. Default ON. `MEGACOMPACT_VC7A=0` disables and is
175
+ * byte-identical to the predecessor (VC6C): the `encodeCrystalKey` /
176
+ * `CrystalStore` arithmetic STILL RUNS (it is PURE — a canonical length-prefixed
177
+ * encoding plus SHA-256, with no clock, storage, or network), so a crystal is
178
+ * keyed identically and a same-key/different-bytes write is still refused with
179
+ * the flag off. The flag gates ONLY the `vector_cortex_crystal_written` /
180
+ * `vector_cortex_crystal_collision` events and the cache-crystals dashboard seam,
181
+ * which reports `enabled:false` + mode C when off. Flag OFF never gates the
182
+ * crystal/store arithmetic, so flag-off outbound/predecessor golden bytes match
183
+ * exactly. This flag MUST also be a dashboard SETTINGS toggle (visible in config
184
+ * UI, never in EXCLUDED_SETTINGS), mirroring VC4A..VC6C.
185
+ */
186
+ export const VC7A_ENABLED = (): boolean => sprintFlag("MEGACOMPACT_VC7A");
187
+
188
+ /**
189
+ * VC7B — provider cache economics + crystal compiler. Default ON.
190
+ * `MEGACOMPACT_VC7B=0` disables and is byte-identical to the predecessor
191
+ * (VC7A): `computeEconomics`, `compileCrystalBoundaries` and `assignExperiment`
192
+ * STILL RUN (they are PURE — exact integer/rational arithmetic and a SHA-256
193
+ * session bucket, with no clock, storage, or network), so a session keeps its
194
+ * SAME experiment arm and the compiler keeps producing the SAME boundaries with
195
+ * the flag off. Crucially the compiler never changes request identity in either
196
+ * state, so the outbound canonical request — and therefore the VC7A crystal key
197
+ * and the predecessor golden bytes — are unaffected by this flag.
198
+ *
199
+ * The flag gates ONLY the `vector_cortex_cache_experiment_assigned` /
200
+ * `vector_cortex_cache_economics_estimated` events and the cache-economics
201
+ * dashboard seam, which reports `enabled:false` + mode C when off. This flag
202
+ * MUST also be a dashboard SETTINGS toggle (visible in config UI, never in
203
+ * EXCLUDED_SETTINGS), mirroring VC4A..VC7A.
204
+ */
205
+ export const VC7B_ENABLED = (): boolean => sprintFlag("MEGACOMPACT_VC7B");
206
+
207
+ /**
208
+ * VC7C — cache miss diagnostics, cache-level breakers and the completed M5
209
+ * request-hash-v2 switch. Default ON. `MEGACOMPACT_VC7C=0` disables and is
210
+ * byte-identical to the predecessor (VC7B): the miss `classify`, the breaker
211
+ * demotion decision and the M5 request-hash-v2 ARITHMETIC STILL RUN (they are
212
+ * PURE — an exclusive ordered comparison over already-computed digests plus a
213
+ * canonical length-prefixed SHA-256, with no clock, storage, or network), so a
214
+ * miss is classified into the SAME single class, a collision / stale generation
215
+ * / digest failure / profile mismatch still demotes BEFORE any cache serve, and
216
+ * the v2 hash of a given request is unchanged with the flag off. A cache is
217
+ * never allowed to serve a stale or colliding entry merely because reporting is
218
+ * off — that would be a correctness change, not a reporting change.
219
+ *
220
+ * The flag gates ONLY the `vector_cortex_cache_miss_classified` /
221
+ * `vector_cortex_cache_serve_blocked` events and the cache-diagnostics dashboard
222
+ * seam, which reports `enabled:false` + mode C when off. This flag MUST also be
223
+ * a dashboard SETTINGS toggle (visible in config UI, never in
224
+ * EXCLUDED_SETTINGS), mirroring VC4A..VC7B.
225
+ */
226
+ export const VC7C_ENABLED = (): boolean => sprintFlag("MEGACOMPACT_VC7C");
227
+
228
+ /**
229
+ * VC8A — consent-bound outcome ledger + offline learning dataset. Default ON.
230
+ * `MEGACOMPACT_VC8A=0` disables and is byte-identical to the predecessor
231
+ * (VC7C): the outcome ledger, consent records, and dataset manifest builder
232
+ * STILL RUN (they are PURE — append-only validation, consent evaluation, and
233
+ * SHA-256 digests, with no clock, storage, or network), so an outcome is still
234
+ * validated identically and a consent revocation still excludes a row. The
235
+ * flag gates ONLY the `vector_cortex_outcome_appended` /
236
+ * `vector_cortex_dataset_record_excluded` events and the outcomes dashboard
237
+ * seam, which reports `enabled:false` + mode C when off. This flag MUST also be
238
+ * a dashboard SETTINGS toggle (visible in config UI, never in
239
+ * EXCLUDED_SETTINGS), mirroring VC4A..VC7C.
240
+ */
241
+ export const VC8A_ENABLED = (): boolean => sprintFlag("MEGACOMPACT_VC8A");
242
+
243
+ /**
244
+ * VC8B — bounded shadow adaptive policy + M7 pressure-v2. Default ON.
245
+ * `MEGACOMPACT_VC8B=0` disables and is byte-identical to the predecessor
246
+ * (VC8A): the policy engine, shadow evaluator, and M7 migration STILL RUN
247
+ * (they are PURE — action validation, budget clamping, pressure canonicalization
248
+ * and copy/validate/switch, with no clock, storage, or network), so a budget is
249
+ * still clamped identically and an unknown pressure label is still rejected. The
250
+ * flag gates ONLY the `vector_cortex_shadow_decision_recorded` /
251
+ * `vector_cortex_policy_action_rejected` events and the policy dashboard seam,
252
+ * which reports `enabled:false` + mode C when off. This flag MUST also be a
253
+ * dashboard SETTINGS toggle (visible in config UI, never in EXCLUDED_SETTINGS),
254
+ * mirroring VC4A..VC8A.
255
+ */
256
+ export const VC8B_ENABLED = (): boolean => sprintFlag("MEGACOMPACT_VC8B");
@@ -7,9 +7,6 @@
7
7
  *
8
8
  * Breaker/triad constants (TRIAD_RESILIENCE.md) live here; pi-agnostic, dep-free.
9
9
  */
10
-
11
- import { sprintFlag } from "./vector-cortex-flag.js";
12
-
13
10
  // VC0/VC1/VC2 foundation-phase flags in vector-cortex-early.ts; re-exported
14
11
  // so every existing `from "./config/vector-cortex.js"` import resolves unchanged.
15
12
  export {
@@ -24,248 +21,27 @@ export {
24
21
  VC2C_ENABLED,
25
22
  } from "./vector-cortex-early.js";
26
23
 
27
- /**
28
- * VC3A capability-gated cortex store (CortexReader/Writer/Admin, CortexRecordV1).
29
- * Default ON. `MEGACOMPACT_VC3A=0` disables and is byte-identical to the
30
- * predecessor (mode C: the derived cortex store is absent, mode B in-memory is
31
- * not consulted, zero `vector_cortex_record_append_failed` /
32
- * `vector_cortex_generation_rebuilt` emissions; the predecessor derived pointer
33
- * and goldens are unchanged). The real consumers are the cortex append seam, the
34
- * cortex rebuild/admin seam and the reader-only topology summary seam.
35
- */
36
- export const VC3A_ENABLED = (): boolean => sprintFlag("MEGACOMPACT_VC3A");
37
-
38
- /**
39
- * VC3B — deterministic cortical topology (TopologyV1 / EdgeV1).
40
- * Default ON. `MEGACOMPACT_VC3B=0` disables and is byte-identical to the
41
- * predecessor (mode C: no topology graph is built or emitted, the dashboard
42
- * topology view returns the VC3A-precise aggregation shape with no node/edge
43
- * arrays, zero `vector_cortex_topology_*` emissions). The real consumers are
44
- * the topology build seam (build.ts) and the dashboard topology node/edge view.
45
- */
46
- export const VC3B_ENABLED = (): boolean => sprintFlag("MEGACOMPACT_VC3B");
47
-
48
- /**
49
- * VC3C — topology query + router invalidation (TopologyQueryV1 / RouterKeyV2,
50
- * M6 router-generation-v2 migration).
51
- * Default ON. `MEGACOMPACT_VC3C=0` disables and is byte-identical to the
52
- * predecessor (mode C: no length-delimited router key, no generation
53
- * invalidation, zero `vector_cortex_router_generation_invalidated` /
54
- * `vector_cortex_topology_query_demoted` emissions; the predecessor tiered
55
- * router keying is unchanged). The real consumers are the topology query seam
56
- * (query.ts), the M6 router-generation-v2 migration seam, and the reader-only
57
- * dashboard topology query diagnostic view.
58
- */
59
- export const VC3C_ENABLED = (): boolean => sprintFlag("MEGACOMPACT_VC3C");
60
-
61
- /**
62
- * VC4A — dual-tier shard contract (SemanticShardV1 / ExactShardV1 /
63
- * ShardManifestV1).
64
- * Default ON. `MEGACOMPACT_VC4A=0` disables and is byte-identical to the
65
- * predecessor (mode C: exact anchors/current transcript only, no semantic or
66
- * exact shard manifest is assembled or emitted, zero
67
- * `vector_cortex_shard_manifest_built` / `vector_cortex_protected_span_rejected`
68
- * emissions; the predecessor derived pointer and goldens are unchanged). The
69
- * real consumers are the shard assembly seam (manifest.ts) and the reader-only
70
- * dashboard shards aggregate view.
71
- */
72
- export const VC4A_ENABLED = (): boolean => sprintFlag("MEGACOMPACT_VC4A");
73
-
74
- /**
75
- * VC4B — residual codec and numeric parity (ResidualCodecV1 / ParityShardV1).
76
- * Default ON. `MEGACOMPACT_VC4B=0` disables and is byte-identical to the
77
- * predecessor (mode C: no residual artifact is admitted, the exact compressed
78
- * payload / ledger bytes remain the only representation, zero
79
- * `vector_cortex_residual_admitted` / `vector_cortex_parity_recovery_failed`
80
- * emissions; the VC4A shard manifest and its goldens are unchanged). The real
81
- * consumers are the codec admission seam (codec.ts) and the reader-only
82
- * dashboard residual aggregate view. The codec math itself is PURE — flag OFF
83
- * gates the reporter/admission seam, never the arithmetic.
84
- */
85
- export const VC4B_ENABLED = (): boolean => sprintFlag("MEGACOMPACT_VC4B");
86
-
87
- /**
88
- * VC4C — reconstruction fidelity (closure + assemble + validate). Default ON.
89
- * `MEGACOMPACT_VC4C=0` disables and is byte-identical to the predecessor
90
- * (VC4B): no conservative closure is computed, the reconstruction validator's
91
- * `vector_cortex_reconstruction_validated` / `vector_cortex_closure_rejected`
92
- * events are never emitted, and the assembled reconstruction is never produced
93
- * (the prompt continues to be built by the legacy VC4B exact/residual path and
94
- * the VC4A shard goldens are unchanged). The closure/assemble/validate
95
- * functions are PURE — flag OFF gates the reporter seam, never the arithmetic.
96
- * This flag MUST also be a dashboard SETTINGS toggle (visible in config UI,
97
- * never in EXCLUDED_SETTINGS), mirroring VC4A/VC4B.
98
- */
99
- export const VC4C_ENABLED = (): boolean => sprintFlag("MEGACOMPACT_VC4C");
100
-
101
- /**
102
- * VC5A — PromptDagV1 + budgeted portfolio planner. Default ON.
103
- * `MEGACOMPACT_VC5A=0` disables and is byte-identical to the predecessor
104
- * (VC4C): no prompt DAG is built or validated, no budgeted plan is selected,
105
- * the `vector_cortex_plan_selected` / `vector_cortex_plan_mandatory_overflow`
106
- * events are never emitted, and the prompt continues to be built by the
107
- * predecessor VC4C closure/reconstruction path (its goldens are unchanged).
108
- * The builder/validator/portfolio functions are PURE — flag OFF gates the
109
- * reporter + dashboard seam, never the arithmetic. This flag MUST also be a
110
- * dashboard SETTINGS toggle (visible in config UI, never in EXCLUDED_SETTINGS),
111
- * mirroring VC4A/VC4B/VC4C.
112
- */
113
- export const VC5A_ENABLED = (): boolean => sprintFlag("MEGACOMPACT_VC5A");
114
-
115
- /**
116
- * VC5B — validated prompt renderer + provider profiles. Default ON.
117
- * `MEGACOMPACT_VC5B=0` disables and is byte-identical to the predecessor
118
- * (VC5A): no render manifest is produced, no canonical request is hashed, the
119
- * `vector_cortex_render_validated` / `vector_cortex_provider_bypassed` events are
120
- * never emitted, and the prompt continues to be built by the predecessor VC5A
121
- * DAG/plan path (its goldens are unchanged). The render/validate functions are
122
- * PURE — flag OFF gates the reporter + dashboard seam, never the arithmetic.
123
- * This flag MUST also be a dashboard SETTINGS toggle (visible in config UI, never
124
- * in EXCLUDED_SETTINGS), mirroring VC4A/VC4B/VC4C/VC5A.
125
- */
126
- export const VC5B_ENABLED = (): boolean => sprintFlag("MEGACOMPACT_VC5B");
127
-
128
- /**
129
- * VC5C — live graduated rollout. Default ON. `MEGACOMPACT_VC5C=0` disables and
130
- * is byte-identical to the predecessor (VC5B): no session is assigned a stable
131
- * 10k bucket, no gate-advance decision runs, the `vector_cortex_rollout_assigned`
132
- * / `vector_cortex_rollout_promotion_blocked` events are never emitted, and the
133
- * prompt continues to be built by the predecessor VC5B renderer path (its goldens
134
- * are unchanged). The assign/gate/emit functions are PURE — flag OFF gates the
135
- * reporter + dashboard seam, never the arithmetic. This flag MUST also be a
136
- * dashboard SETTINGS toggle (visible in config UI, never in EXCLUDED_SETTINGS),
137
- * mirroring VC4A/VC4B/VC4C/VC5A/VC5B.
138
- */
139
- export const VC5C_ENABLED = (): boolean => sprintFlag("MEGACOMPACT_VC5C");
140
-
141
- /**
142
- * VC6A — advanced closure optimization. Default ON. `MEGACOMPACT_VC6A=0`
143
- * disables and is byte-identical to the predecessor (VC5C): the `optimizeClosure`
144
- * transitive-reduction arithmetic STILL RUNS (it is PURE), but the
145
- * `vector_cortex_closure_optimized` / `vector_cortex_closure_proof_rejected`
146
- * events are never emitted and the dashboard closure diagnostics seam is
147
- * suppressed. Flag OFF gates the reporter + dashboard seam, never the arithmetic,
148
- * so flag-off outbound/predecessor golden bytes match exactly. This flag MUST
149
- * also be a dashboard SETTINGS toggle (visible in config UI, never in
150
- * EXCLUDED_SETTINGS), mirroring VC4A/VC4B/VC4C/VC5A/VC5B/VC5C.
151
- */
152
- export const VC6A_ENABLED = (): boolean => sprintFlag("MEGACOMPACT_VC6A");
153
-
154
- /**
155
- * VC6B — exact source restoration. Default ON. `MEGACOMPACT_VC6B=0` disables and
156
- * is byte-identical to the predecessor (VC6A): the `restoreSources` /
157
- * `verifyRestored` arithmetic STILL RUNS (it is PURE — an exact-source read plus
158
- * a SHA-256 comparison, with no clock, storage, or network), but the
159
- * `vector_cortex_source_restored` / `vector_cortex_restore_digest_rejected`
160
- * events are never emitted and the dashboard restoration diagnostics seam is
161
- * suppressed. Flag OFF gates the reporter + dashboard seam, never the
162
- * restore/verify arithmetic, so flag-off outbound/predecessor golden bytes match
163
- * exactly. This flag MUST also be a dashboard SETTINGS toggle (visible in config
164
- * UI, never in EXCLUDED_SETTINGS), mirroring VC4A/VC4B/VC4C/VC5A/VC5B/VC5C/VC6A.
165
- */
166
- export const VC6B_ENABLED = (): boolean => sprintFlag("MEGACOMPACT_VC6B");
167
-
168
- /**
169
- * VC6C — self-healing derived controller. Default ON. `MEGACOMPACT_VC6C=0`
170
- * disables and is byte-identical to the predecessor (VC6B): the `detectGaps` /
171
- * `planRebuild` / `rebuildGeneration` / `switchPointer` arithmetic STILL RUNS (it
172
- * is PURE — a high-water comparison plus a SHA-256 root-digest check, with an
173
- * INJECTED clock and no storage or network), but the
174
- * `vector_cortex_repair_planned` / `vector_cortex_repair_pointer_switched` /
175
- * `vector_cortex_repair_backoff` events are never emitted and the dashboard
176
- * repair diagnostics seam is suppressed. Flag OFF gates the reporter + dashboard
177
- * seam, never the gap-detection/rebuild arithmetic (in particular, an unverified
178
- * pointer switch stays refused with the flag off), so flag-off
179
- * outbound/predecessor golden bytes match exactly. This flag MUST also be a
180
- * dashboard SETTINGS toggle (visible in config UI, never in EXCLUDED_SETTINGS),
181
- * mirroring VC4A/VC4B/VC4C/VC5A/VC5B/VC5C/VC6A/VC6B.
182
- */
183
- export const VC6C_ENABLED = (): boolean => sprintFlag("MEGACOMPACT_VC6C");
184
-
185
- /**
186
- * VC7A — frozen range crystals. Default ON. `MEGACOMPACT_VC7A=0` disables and is
187
- * byte-identical to the predecessor (VC6C): the `encodeCrystalKey` /
188
- * `CrystalStore` arithmetic STILL RUNS (it is PURE — a canonical length-prefixed
189
- * encoding plus SHA-256, with no clock, storage, or network), so a crystal is
190
- * keyed identically and a same-key/different-bytes write is still refused with
191
- * the flag off. The flag gates ONLY the `vector_cortex_crystal_written` /
192
- * `vector_cortex_crystal_collision` events and the cache-crystals dashboard seam,
193
- * which reports `enabled:false` + mode C when off. Flag OFF never gates the
194
- * crystal/store arithmetic, so flag-off outbound/predecessor golden bytes match
195
- * exactly. This flag MUST also be a dashboard SETTINGS toggle (visible in config
196
- * UI, never in EXCLUDED_SETTINGS), mirroring VC4A..VC6C.
197
- */
198
- export const VC7A_ENABLED = (): boolean => sprintFlag("MEGACOMPACT_VC7A");
199
-
200
- /**
201
- * VC7B — provider cache economics + crystal compiler. Default ON.
202
- * `MEGACOMPACT_VC7B=0` disables and is byte-identical to the predecessor
203
- * (VC7A): `computeEconomics`, `compileCrystalBoundaries` and `assignExperiment`
204
- * STILL RUN (they are PURE — exact integer/rational arithmetic and a SHA-256
205
- * session bucket, with no clock, storage, or network), so a session keeps its
206
- * SAME experiment arm and the compiler keeps producing the SAME boundaries with
207
- * the flag off. Crucially the compiler never changes request identity in either
208
- * state, so the outbound canonical request — and therefore the VC7A crystal key
209
- * and the predecessor golden bytes — are unaffected by this flag.
210
- *
211
- * The flag gates ONLY the `vector_cortex_cache_experiment_assigned` /
212
- * `vector_cortex_cache_economics_estimated` events and the cache-economics
213
- * dashboard seam, which reports `enabled:false` + mode C when off. This flag
214
- * MUST also be a dashboard SETTINGS toggle (visible in config UI, never in
215
- * EXCLUDED_SETTINGS), mirroring VC4A..VC7A.
216
- */
217
- export const VC7B_ENABLED = (): boolean => sprintFlag("MEGACOMPACT_VC7B");
218
-
219
- /**
220
- * VC7C — cache miss diagnostics, cache-level breakers and the completed M5
221
- * request-hash-v2 switch. Default ON. `MEGACOMPACT_VC7C=0` disables and is
222
- * byte-identical to the predecessor (VC7B): the miss `classify`, the breaker
223
- * demotion decision and the M5 request-hash-v2 ARITHMETIC STILL RUN (they are
224
- * PURE — an exclusive ordered comparison over already-computed digests plus a
225
- * canonical length-prefixed SHA-256, with no clock, storage, or network), so a
226
- * miss is classified into the SAME single class, a collision / stale generation
227
- * / digest failure / profile mismatch still demotes BEFORE any cache serve, and
228
- * the v2 hash of a given request is unchanged with the flag off. A cache is
229
- * never allowed to serve a stale or colliding entry merely because reporting is
230
- * off — that would be a correctness change, not a reporting change.
231
- *
232
- * The flag gates ONLY the `vector_cortex_cache_miss_classified` /
233
- * `vector_cortex_cache_serve_blocked` events and the cache-diagnostics dashboard
234
- * seam, which reports `enabled:false` + mode C when off. This flag MUST also be
235
- * a dashboard SETTINGS toggle (visible in config UI, never in
236
- * EXCLUDED_SETTINGS), mirroring VC4A..VC7B.
237
- */
238
- export const VC7C_ENABLED = (): boolean => sprintFlag("MEGACOMPACT_VC7C");
239
-
240
- /**
241
- * VC8A — consent-bound outcome ledger + offline learning dataset. Default ON.
242
- * `MEGACOMPACT_VC8A=0` disables and is byte-identical to the predecessor
243
- * (VC7C): the outcome ledger, consent records, and dataset manifest builder
244
- * STILL RUN (they are PURE — append-only validation, consent evaluation, and
245
- * SHA-256 digests, with no clock, storage, or network), so an outcome is still
246
- * validated identically and a consent revocation still excludes a row. The
247
- * flag gates ONLY the `vector_cortex_outcome_appended` /
248
- * `vector_cortex_dataset_record_excluded` events and the outcomes dashboard
249
- * seam, which reports `enabled:false` + mode C when off. This flag MUST also be
250
- * a dashboard SETTINGS toggle (visible in config UI, never in
251
- * EXCLUDED_SETTINGS), mirroring VC4A..VC7C.
252
- */
253
- export const VC8A_ENABLED = (): boolean => sprintFlag("MEGACOMPACT_VC8A");
254
-
255
- /**
256
- * VC8B — bounded shadow adaptive policy + M7 pressure-v2. Default ON.
257
- * `MEGACOMPACT_VC8B=0` disables and is byte-identical to the predecessor
258
- * (VC8A): the policy engine, shadow evaluator, and M7 migration STILL RUN
259
- * (they are PURE — action validation, budget clamping, pressure canonicalization
260
- * and copy/validate/switch, with no clock, storage, or network), so a budget is
261
- * still clamped identically and an unknown pressure label is still rejected. The
262
- * flag gates ONLY the `vector_cortex_shadow_decision_recorded` /
263
- * `vector_cortex_policy_action_rejected` events and the policy dashboard seam,
264
- * which reports `enabled:false` + mode C when off. This flag MUST also be a
265
- * dashboard SETTINGS toggle (visible in config UI, never in EXCLUDED_SETTINGS),
266
- * mirroring VC4A..VC8A.
267
- */
268
- export const VC8B_ENABLED = (): boolean => sprintFlag("MEGACOMPACT_VC8B");
24
+ // VC3A..VC8B flags extracted to vector-cortex-vc3to8.ts (mechanical move so
25
+ // this barrel stays under the 300-line soft cap); re-exported unchanged.
26
+ export {
27
+ VC3A_ENABLED,
28
+ VC3B_ENABLED,
29
+ VC3C_ENABLED,
30
+ VC4A_ENABLED,
31
+ VC4B_ENABLED,
32
+ VC4C_ENABLED,
33
+ VC5A_ENABLED,
34
+ VC5B_ENABLED,
35
+ VC5C_ENABLED,
36
+ VC6A_ENABLED,
37
+ VC6B_ENABLED,
38
+ VC6C_ENABLED,
39
+ VC7A_ENABLED,
40
+ VC7B_ENABLED,
41
+ VC7C_ENABLED,
42
+ VC8A_ENABLED,
43
+ VC8B_ENABLED,
44
+ } from "./vector-cortex-vc3to8.js";
269
45
 
270
46
  export { VC8C_ENABLED } from "./vector-cortex-vc8c.js";
271
47
  export { VC9A_ENABLED } from "./vector-cortex-vc9a.js";
@@ -282,6 +58,8 @@ export { DEDUP_ATTR_ENABLED } from "./vector-cortex-dedup-attr.js";
282
58
  export { ENC_0A_ENABLED } from "./vector-cortex-enc0a.js";
283
59
  export { ENC_0B_ENABLED } from "./vector-cortex-enc0b.js";
284
60
  export { ENC_0C_ENABLED } from "./vector-cortex-enc0c.js";
61
+ export { ENC_0D_ENABLED } from "./vector-cortex-enc0d.js";
62
+ export { ENC_0E_ENABLED } from "./vector-cortex-enc0e.js";
285
63
  // Breaker constants (TRIAD_RESILIENCE.md §breaker) extracted to vector-cortex-breakers.ts.
286
64
  export {
287
65
  BREAKER_WINDOW_MS,
package/src/config.ts CHANGED
@@ -192,6 +192,8 @@ export {
192
192
  ENC_0A_ENABLED,
193
193
  ENC_0B_ENABLED,
194
194
  ENC_0C_ENABLED,
195
+ ENC_0D_ENABLED,
196
+ ENC_0E_ENABLED,
195
197
  BREAKER_WINDOW_MS,
196
198
  BREAKER_MIN_ATTEMPTS,
197
199
  BREAKER_PERF_FAILURES,