pi-mega-compact 0.20.46 → 0.20.48

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