pi-mega-compact 0.20.57 → 0.20.58

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.
@@ -0,0 +1,22 @@
1
+ /**
2
+ * config/vector-cortex-dash-0a.ts — DASH-0a dashboard consolidation tab-plan flag.
3
+ *
4
+ * Extracted to this sibling (per the vector-cortex-cosfp.ts precedent) so
5
+ * src/config/vector-cortex.ts stays under the 300-line soft limit. The flag is
6
+ * positive, defaults ON, and `MEGACOMPACT_DASH_0A=0` is byte-identical to the
7
+ * predecessor: the merge plan module is never imported by the shell, so all 13
8
+ * current tab/section top-level components render exactly as today. Registered
9
+ * as a visible VECTOR_CORTEX_SETTINGS boolDirect toggle, never EXCLUDED.
10
+ *
11
+ * Pi-agnostic, dependency-free (PREVENT-PI-004 / PREVENT-011).
12
+ */
13
+ import { sprintFlag } from "./vector-cortex-flag.js";
14
+ /**
15
+ * DASH-0a — dashboard tab-audit + merge plan. Default ON.
16
+ * `MEGACOMPACT_DASH_0A=0` disables and is byte-identical to the predecessor:
17
+ * the plan module (DASH_TAB_PLAN / DEEP_LINK_TARGETS / nav-map) is a static
18
+ * constant module that nothing imports at runtime, so the shell and all 13
19
+ * tab/section top-level files render exactly as today. This sprint records the
20
+ * plan only; DASH-0b/0c/0d consume it.
21
+ */
22
+ export const DASH_0A_ENABLED = () => sprintFlag("MEGACOMPACT_DASH_0A");
@@ -39,6 +39,8 @@ export { COSINE_FP_REAL_ENABLED } from "./vector-cortex-cosfp-real.js";
39
39
  // REPO-A cross-repo corpus prep flag extracted to repo-corpus.ts (no vector-cortex
40
40
  // prefix per spec); re-exported so root src/config.ts barrel resolves unchanged.
41
41
  export { REPO_CORPUS_ENABLED } from "./repo-corpus.js";
42
+ // DASH-0a dashboard consolidation tab-plan flag extracted to vector-cortex-dash-0a.ts.
43
+ export { DASH_0A_ENABLED } from "./vector-cortex-dash-0a.js";
42
44
  export { ENC_1A_ENABLED } from "./vector-cortex-enc1a.js";
43
45
  export { ENC_1B_ENABLED, ENC_1B_MAX_EMBEDDING_DIM, ENC_1B_EMBEDDING_DIM_ENV, ENC_1B_EMBEDDING_HEADERS_ENV, ENC_1B_ALLOW_REMOTE_EMBEDDER_ENV, ENC_1B_ENCODER_NATIVE_ENV, } from "./vector-cortex-enc1b.js";
44
46
  export { ENC_2BUDGET_ENABLED, ENC_2BUDGET_NATIVE_ORT_BUDGET_ENV, ENC_2BUDGET_MAX_MIB, ENC_2BUDGET_DEFAULT_MIB, } from "./vector-cortex-enc2budget.js";
package/dist/config.js CHANGED
@@ -114,4 +114,4 @@ export const NEW_UI = () => ragEnabled("MEGACOMPACT_NEW_UI");
114
114
  // default ON, `=0`/`_DISABLED` off. Re-exported from src/config/vector-cortex.ts
115
115
  // so root consumers share one source of truth.
116
116
  // ---------------------------------------------------------------------------
117
- export { VC0A_ENABLED, VC0B_ENABLED, VC1A_ENABLED, VC0C_ENABLED, VC1B_ENABLED, VC1C_ENABLED, VC2A_ENABLED, VC2B_ENABLED, VC2C_ENABLED, VC3A_ENABLED, VC3B_ENABLED, VC3C_ENABLED, VC4A_ENABLED, VC4B_ENABLED, VC4C_ENABLED, VC5A_ENABLED, VC5B_ENABLED, VC5C_ENABLED, VC6A_ENABLED, VC6B_ENABLED, VC6C_ENABLED, VC7A_ENABLED, VC7B_ENABLED, VC7C_ENABLED, VC8A_ENABLED, VC8B_ENABLED, VC8C_ENABLED, VC9A_ENABLED, VC9B_ENABLED, VC9C_ENABLED, VC9D_ENABLED, PCC_ENABLED, ML5A_ENABLED, ML5B_ENABLED, ML5C_ENABLED, ML5D_ENABLED, ML5E_ENABLED, DEDUP_ATTR_ENABLED, ENC_0A_ENABLED, ENC_0B_ENABLED, ENC_0C_ENABLED, ENC_0D_ENABLED, ENC_0E_ENABLED, ENC_0F_ENABLED, ENC_0G_ENABLED, ENC_1A_ENABLED, ENC_1B_ENABLED, ENC_2BUDGET_ENABLED, ENC_2BUDGET_NATIVE_ORT_BUDGET_ENV, ENC_2BUDGET_MAX_MIB, ENC_2BUDGET_DEFAULT_MIB, COSINE_FP_BENCH_ENABLED, COSINE_FP_REAL_ENABLED, REPO_CORPUS_ENABLED, BREAKER_WINDOW_MS, BREAKER_MIN_ATTEMPTS, BREAKER_PERF_FAILURES, BREAKER_PERF_FAILURE_RATE, BREAKER_CORRECTNESS_FAILURES, BREAKER_COOLDOWN_MS, BREAKER_PROBE_COUNT, BREAKER_RETRY_BASE_MS, BREAKER_RETRY_CAP_MS, BREAKER_RETRY_JITTER, BREAKER_HYSTERESIS_FAILURE_RATE, BREAKER_HYSTERESIS_BUDGET_P95_MS, BREAKER_MIN_HEALTHY_RESIDENCE_MS, } from "./config/vector-cortex.js";
117
+ export { VC0A_ENABLED, VC0B_ENABLED, VC1A_ENABLED, VC0C_ENABLED, VC1B_ENABLED, VC1C_ENABLED, VC2A_ENABLED, VC2B_ENABLED, VC2C_ENABLED, VC3A_ENABLED, VC3B_ENABLED, VC3C_ENABLED, VC4A_ENABLED, VC4B_ENABLED, VC4C_ENABLED, VC5A_ENABLED, VC5B_ENABLED, VC5C_ENABLED, VC6A_ENABLED, VC6B_ENABLED, VC6C_ENABLED, VC7A_ENABLED, VC7B_ENABLED, VC7C_ENABLED, VC8A_ENABLED, VC8B_ENABLED, VC8C_ENABLED, VC9A_ENABLED, VC9B_ENABLED, VC9C_ENABLED, VC9D_ENABLED, PCC_ENABLED, ML5A_ENABLED, ML5B_ENABLED, ML5C_ENABLED, ML5D_ENABLED, ML5E_ENABLED, DEDUP_ATTR_ENABLED, ENC_0A_ENABLED, ENC_0B_ENABLED, ENC_0C_ENABLED, ENC_0D_ENABLED, ENC_0E_ENABLED, ENC_0F_ENABLED, ENC_0G_ENABLED, ENC_1A_ENABLED, ENC_1B_ENABLED, ENC_2BUDGET_ENABLED, ENC_2BUDGET_NATIVE_ORT_BUDGET_ENV, ENC_2BUDGET_MAX_MIB, ENC_2BUDGET_DEFAULT_MIB, COSINE_FP_BENCH_ENABLED, COSINE_FP_REAL_ENABLED, REPO_CORPUS_ENABLED, DASH_0A_ENABLED, BREAKER_WINDOW_MS, BREAKER_MIN_ATTEMPTS, BREAKER_PERF_FAILURES, BREAKER_PERF_FAILURE_RATE, BREAKER_CORRECTNESS_FAILURES, BREAKER_COOLDOWN_MS, BREAKER_PROBE_COUNT, BREAKER_RETRY_BASE_MS, BREAKER_RETRY_CAP_MS, BREAKER_RETRY_JITTER, BREAKER_HYSTERESIS_FAILURE_RATE, BREAKER_HYSTERESIS_BUDGET_P95_MS, BREAKER_MIN_HEALTHY_RESIDENCE_MS, } from "./config/vector-cortex.js";
@@ -71,5 +71,6 @@ export const VECTOR_CORTEX_SETTINGS = {
71
71
  boolDirect("MEGACOMPACT_COSINE_FP_BENCH", "COS-FP-A Synthetic FP Bench", "Synthetic FP harness + L2 cosine threshold calibration (COS-FP-A): drives the deterministic synthetic-corpus grid sweep (scripts/cosine-fp/bench.mjs) that measures L2 cosine false-positive rates and emits a recommended default, and serves the reader-only GET /api/cosine-fp-report. Synthetic-corpus-only — never reads real session/ledger bytes. OFF = bench inert, endpoint 404s, no report write, L2_COSINE plain MEGACOMPACT_L2_THRESHOLD (byte-identical predecessor).", true),
72
72
  boolDirect("MEGACOMPACT_COSINE_FP_REAL", "COS-FP-R Real-Corpus Validation", "Real-corpus L2 cosine FP validation (COS-FP-R): runs the real-corpus grid sweep (scripts/cosine-fp/real-bench.mjs) against donated, consent-approved sessions only (SECURITY_PRIVACY Lifecycle/Consent), scoring FP/FN with Wilson intervals + session-grouped bootstrap, and appends CI-backed per-content-type recommendations to the cosine-threshold report. Runs only when a valid consented corpus exists; absent corpus = no_corpus (normative pre-donation state, nothing written). OFF = script inert, nothing executes, no writes (byte-identical predecessor).", true),
73
73
  boolDirect("MEGACOMPACT_REPO_CORPUS", "Cross-Repo Corpus (REPO-A)", "Cross-repo corpus preparation (REPO-A): the governed, consent-gated reader-only path that builds a pseudonymous corpus manifest from per-repo events.log slices and serves GET /api/repo-corpus answering which pseudonymous repos/sessions are in the corpus, what cross-repo overlap exists, and whether consent is active for each — counts + IDs + status only, never payload content. Consent is append-only (consent.mjs, CLI/ops-only); revocation freezes the builder + route. OFF = builder refuses to run, reader route 404s, single-repo recall untouched (byte-identical predecessor).", true),
74
+ boolDirect("MEGACOMPACT_DASH_0A", "Dashboard Consolidation — Tab Plan", "DASH-0a dashboard tab-audit + consolidation merge plan: records (as typed constants) the collapse of the 13 current TabIds onto the fixed 7 navigational surfaces (Overview, Sessions, Cache+Performance, Memory Graph, Diagnostics, Setup, Admin), plus the deep-link map, a11y nav-map, and responsive plan. Contract-planning only — no component moves, no route change. OFF = the plan module is inert (never imported by the shell); all 13 tab/section top-level files render exactly as today (byte-identical predecessor).", true),
74
75
  ],
75
76
  };
@@ -0,0 +1,22 @@
1
+ /**
2
+ * config/vector-cortex-dash-0a.ts — DASH-0a dashboard consolidation tab-plan flag.
3
+ *
4
+ * Extracted to this sibling (per the vector-cortex-cosfp.ts precedent) so
5
+ * src/config/vector-cortex.ts stays under the 300-line soft limit. The flag is
6
+ * positive, defaults ON, and `MEGACOMPACT_DASH_0A=0` is byte-identical to the
7
+ * predecessor: the merge plan module is never imported by the shell, so all 13
8
+ * current tab/section top-level components render exactly as today. Registered
9
+ * as a visible VECTOR_CORTEX_SETTINGS boolDirect toggle, never EXCLUDED.
10
+ *
11
+ * Pi-agnostic, dependency-free (PREVENT-PI-004 / PREVENT-011).
12
+ */
13
+ import { sprintFlag } from "./vector-cortex-flag.js";
14
+ /**
15
+ * DASH-0a — dashboard tab-audit + merge plan. Default ON.
16
+ * `MEGACOMPACT_DASH_0A=0` disables and is byte-identical to the predecessor:
17
+ * the plan module (DASH_TAB_PLAN / DEEP_LINK_TARGETS / nav-map) is a static
18
+ * constant module that nothing imports at runtime, so the shell and all 13
19
+ * tab/section top-level files render exactly as today. This sprint records the
20
+ * plan only; DASH-0b/0c/0d consume it.
21
+ */
22
+ export const DASH_0A_ENABLED = () => sprintFlag("MEGACOMPACT_DASH_0A");
@@ -39,6 +39,8 @@ export { COSINE_FP_REAL_ENABLED } from "./vector-cortex-cosfp-real.js";
39
39
  // REPO-A cross-repo corpus prep flag extracted to repo-corpus.ts (no vector-cortex
40
40
  // prefix per spec); re-exported so root src/config.ts barrel resolves unchanged.
41
41
  export { REPO_CORPUS_ENABLED } from "./repo-corpus.js";
42
+ // DASH-0a dashboard consolidation tab-plan flag extracted to vector-cortex-dash-0a.ts.
43
+ export { DASH_0A_ENABLED } from "./vector-cortex-dash-0a.js";
42
44
  export { ENC_1A_ENABLED } from "./vector-cortex-enc1a.js";
43
45
  export { ENC_1B_ENABLED, ENC_1B_MAX_EMBEDDING_DIM, ENC_1B_EMBEDDING_DIM_ENV, ENC_1B_EMBEDDING_HEADERS_ENV, ENC_1B_ALLOW_REMOTE_EMBEDDER_ENV, ENC_1B_ENCODER_NATIVE_ENV, } from "./vector-cortex-enc1b.js";
44
46
  export { ENC_2BUDGET_ENABLED, ENC_2BUDGET_NATIVE_ORT_BUDGET_ENV, ENC_2BUDGET_MAX_MIB, ENC_2BUDGET_DEFAULT_MIB, } from "./vector-cortex-enc2budget.js";
@@ -114,4 +114,4 @@ export const NEW_UI = () => ragEnabled("MEGACOMPACT_NEW_UI");
114
114
  // default ON, `=0`/`_DISABLED` off. Re-exported from src/config/vector-cortex.ts
115
115
  // so root consumers share one source of truth.
116
116
  // ---------------------------------------------------------------------------
117
- export { VC0A_ENABLED, VC0B_ENABLED, VC1A_ENABLED, VC0C_ENABLED, VC1B_ENABLED, VC1C_ENABLED, VC2A_ENABLED, VC2B_ENABLED, VC2C_ENABLED, VC3A_ENABLED, VC3B_ENABLED, VC3C_ENABLED, VC4A_ENABLED, VC4B_ENABLED, VC4C_ENABLED, VC5A_ENABLED, VC5B_ENABLED, VC5C_ENABLED, VC6A_ENABLED, VC6B_ENABLED, VC6C_ENABLED, VC7A_ENABLED, VC7B_ENABLED, VC7C_ENABLED, VC8A_ENABLED, VC8B_ENABLED, VC8C_ENABLED, VC9A_ENABLED, VC9B_ENABLED, VC9C_ENABLED, VC9D_ENABLED, PCC_ENABLED, ML5A_ENABLED, ML5B_ENABLED, ML5C_ENABLED, ML5D_ENABLED, ML5E_ENABLED, DEDUP_ATTR_ENABLED, ENC_0A_ENABLED, ENC_0B_ENABLED, ENC_0C_ENABLED, ENC_0D_ENABLED, ENC_0E_ENABLED, ENC_0F_ENABLED, ENC_0G_ENABLED, ENC_1A_ENABLED, ENC_1B_ENABLED, ENC_2BUDGET_ENABLED, ENC_2BUDGET_NATIVE_ORT_BUDGET_ENV, ENC_2BUDGET_MAX_MIB, ENC_2BUDGET_DEFAULT_MIB, COSINE_FP_BENCH_ENABLED, COSINE_FP_REAL_ENABLED, REPO_CORPUS_ENABLED, BREAKER_WINDOW_MS, BREAKER_MIN_ATTEMPTS, BREAKER_PERF_FAILURES, BREAKER_PERF_FAILURE_RATE, BREAKER_CORRECTNESS_FAILURES, BREAKER_COOLDOWN_MS, BREAKER_PROBE_COUNT, BREAKER_RETRY_BASE_MS, BREAKER_RETRY_CAP_MS, BREAKER_RETRY_JITTER, BREAKER_HYSTERESIS_FAILURE_RATE, BREAKER_HYSTERESIS_BUDGET_P95_MS, BREAKER_MIN_HEALTHY_RESIDENCE_MS, } from "./config/vector-cortex.js";
117
+ export { VC0A_ENABLED, VC0B_ENABLED, VC1A_ENABLED, VC0C_ENABLED, VC1B_ENABLED, VC1C_ENABLED, VC2A_ENABLED, VC2B_ENABLED, VC2C_ENABLED, VC3A_ENABLED, VC3B_ENABLED, VC3C_ENABLED, VC4A_ENABLED, VC4B_ENABLED, VC4C_ENABLED, VC5A_ENABLED, VC5B_ENABLED, VC5C_ENABLED, VC6A_ENABLED, VC6B_ENABLED, VC6C_ENABLED, VC7A_ENABLED, VC7B_ENABLED, VC7C_ENABLED, VC8A_ENABLED, VC8B_ENABLED, VC8C_ENABLED, VC9A_ENABLED, VC9B_ENABLED, VC9C_ENABLED, VC9D_ENABLED, PCC_ENABLED, ML5A_ENABLED, ML5B_ENABLED, ML5C_ENABLED, ML5D_ENABLED, ML5E_ENABLED, DEDUP_ATTR_ENABLED, ENC_0A_ENABLED, ENC_0B_ENABLED, ENC_0C_ENABLED, ENC_0D_ENABLED, ENC_0E_ENABLED, ENC_0F_ENABLED, ENC_0G_ENABLED, ENC_1A_ENABLED, ENC_1B_ENABLED, ENC_2BUDGET_ENABLED, ENC_2BUDGET_NATIVE_ORT_BUDGET_ENV, ENC_2BUDGET_MAX_MIB, ENC_2BUDGET_DEFAULT_MIB, COSINE_FP_BENCH_ENABLED, COSINE_FP_REAL_ENABLED, REPO_CORPUS_ENABLED, DASH_0A_ENABLED, BREAKER_WINDOW_MS, BREAKER_MIN_ATTEMPTS, BREAKER_PERF_FAILURES, BREAKER_PERF_FAILURE_RATE, BREAKER_CORRECTNESS_FAILURES, BREAKER_COOLDOWN_MS, BREAKER_PROBE_COUNT, BREAKER_RETRY_BASE_MS, BREAKER_RETRY_CAP_MS, BREAKER_RETRY_JITTER, BREAKER_HYSTERESIS_FAILURE_RATE, BREAKER_HYSTERESIS_BUDGET_P95_MS, BREAKER_MIN_HEALTHY_RESIDENCE_MS, } from "./config/vector-cortex.js";
@@ -0,0 +1,200 @@
1
+ /**
2
+ * dash-consolidation/plan.ts — DASH-0a typed merge plan for the dashboard.
3
+ *
4
+ * Contract-planning only: this module records, as concrete data structures, the
5
+ * collapse of the 13 current dashboard TabIds onto the fixed 7 navigational
6
+ * surfaces (Overview, Sessions, Cache+Performance, Memory Graph, Diagnostics,
7
+ * Setup, Admin). The shell (App.tsx), the lazy list, and every tab/section
8
+ * component are untouched by this sprint — DASH-0b/0c consume this plan to
9
+ * move components, DASH-0d wires deep links + a11y hooks against it.
10
+ *
11
+ * All constants are `readonly`; no `any`. Imports only the TabId union (never
12
+ * redefined locally) so the plan can never drift from the live registry.
13
+ */
14
+ import type { TabId } from "../tabs/registry";
15
+
16
+ /** The fixed 7 dashboard navigation surfaces. */
17
+ export type DASHSurface =
18
+ | "overview"
19
+ | "sessions"
20
+ | "cache-perf"
21
+ | "memory-graph"
22
+ | "diagnostics"
23
+ | "setup"
24
+ | "admin";
25
+
26
+ /** A source TabId the plan records as kept-but-not-a-surface (legacy section). */
27
+ export interface LegacySection {
28
+ id: TabId | "topics" | "achievements" | "game";
29
+ disposition: "keep_but_listed_under";
30
+ keep_but_listed_under: DASHSurface;
31
+ }
32
+
33
+ /** One row of the per-surface merge plan. */
34
+ export interface DashSurfacePlan {
35
+ surface: DASHSurface;
36
+ label: string;
37
+ /** Current top-level TabIds folded into this surface. */
38
+ sources: readonly TabId[];
39
+ /** Delegate component/card ids that land on this surface. */
40
+ mergedCardIds: readonly string[];
41
+ /** Setup-only: the existent SetupTab SUB_TABS member ids (under setup, NOT admin). */
42
+ setup_subtabs?: readonly string[];
43
+ }
44
+
45
+ /** The 7-surface merge plan keyed by surface id. */
46
+ export const DASH_TAB_PLAN: readonly DashSurfacePlan[] = [
47
+ {
48
+ surface: "overview",
49
+ label: "Overview",
50
+ sources: ["overview"],
51
+ mergedCardIds: [],
52
+ },
53
+ {
54
+ surface: "sessions",
55
+ label: "Sessions",
56
+ sources: ["sessions", "turns"],
57
+ mergedCardIds: [],
58
+ },
59
+ {
60
+ surface: "cache-perf",
61
+ label: "Cache + Performance",
62
+ sources: ["cache", "metrics"],
63
+ mergedCardIds: [],
64
+ },
65
+ {
66
+ surface: "memory-graph",
67
+ label: "Memory Graph",
68
+ sources: ["memory-map", "repos", "wiki"],
69
+ mergedCardIds: [
70
+ "MemoryMapView",
71
+ "RaptorTreeView",
72
+ "WikiPage",
73
+ "WikiPageControls",
74
+ "TopicTimeline",
75
+ "TopicEvolutionView",
76
+ "TopicEvolutionGraph",
77
+ ],
78
+ },
79
+ {
80
+ surface: "diagnostics",
81
+ label: "Diagnostics",
82
+ sources: ["vector-cortex", "events", "health"],
83
+ mergedCardIds: [
84
+ "VectorCortexDiagnosticsCard",
85
+ "VectorCortexClosureCard",
86
+ "VectorCortexCrystalsCard",
87
+ "VectorCortexEconomicsCard",
88
+ "VectorCortexLedgerCard",
89
+ "VectorCortexOutcomesCard",
90
+ "VectorCortexPlansCard",
91
+ "VectorCortexPlatformCard",
92
+ "VectorCortexPolicyCard",
93
+ "VectorCortexRenderCard",
94
+ "VectorCortexRepairCard",
95
+ "VectorCortexRestoreCard",
96
+ "VectorCortexRolloutCard",
97
+ "VectorCortexShardsCard",
98
+ "VectorCortexTopologyCard",
99
+ ],
100
+ },
101
+ {
102
+ surface: "setup",
103
+ label: "Setup",
104
+ sources: ["setup"],
105
+ mergedCardIds: [
106
+ "SettingsPanel",
107
+ "SettingsSection",
108
+ "ThresholdsPanel",
109
+ "CortexSetup",
110
+ "EmbedderSetup",
111
+ "CortexActionsCard",
112
+ "CortexBlockersCard",
113
+ "CortexEncoderCard",
114
+ "CortexRuntimeCard",
115
+ "EmbedderHealthCard",
116
+ "RagHealthCard",
117
+ "CustomEndpointSection",
118
+ "VectorCortexCosineFpCard",
119
+ "VectorCortexRepoCorpusCard",
120
+ ],
121
+ // The existent SetupTab SUB_TABS member — recorded under Setup, NOT admin.
122
+ setup_subtabs: ["config"],
123
+ },
124
+ {
125
+ surface: "admin",
126
+ label: "Admin",
127
+ sources: ["maintenance"],
128
+ mergedCardIds: [
129
+ "ActionsCard",
130
+ "DbStatsCard",
131
+ "DebugBundleCard",
132
+ "HealthMitigationCard",
133
+ "SchemaHealthCard",
134
+ ],
135
+ },
136
+ ];
137
+
138
+ /** Exactly 7 fixed surfaces. */
139
+ export const DASH_TAB_COUNT = 7;
140
+
141
+ /**
142
+ * Legacy sections rendered today that are kept-but-folded under a surface.
143
+ * One explicit bucket per non-surface tab/section so the audit stays total.
144
+ */
145
+ export const DASH_LEGACY_SECTIONS: readonly LegacySection[] = [
146
+ { id: "topics", disposition: "keep_but_listed_under", keep_but_listed_under: "admin" },
147
+ { id: "achievements", disposition: "keep_but_listed_under", keep_but_listed_under: "admin" },
148
+ { id: "game", disposition: "keep_but_listed_under", keep_but_listed_under: "admin" },
149
+ ];
150
+
151
+ /** Old route -> new { surface, sub-tab hint } map, one entry per current TabId.
152
+ * Feeds the DASH-0d hash router; does not change App.tsx routing this sprint. */
153
+ export const DEEP_LINK_TARGETS: Readonly<Record<TabId, { surface: DASHSurface; subTabHint: string }>> = {
154
+ overview: { surface: "overview", subTabHint: "overview" },
155
+ sessions: { surface: "sessions", subTabHint: "session-list" },
156
+ turns: { surface: "sessions", subTabHint: "turn-list" },
157
+ cache: { surface: "cache-perf", subTabHint: "cache-cards" },
158
+ metrics: { surface: "cache-perf", subTabHint: "perf-cards" },
159
+ "memory-map": { surface: "memory-graph", subTabHint: "memory-map" },
160
+ repos: { surface: "memory-graph", subTabHint: "repo-list" },
161
+ wiki: { surface: "memory-graph", subTabHint: "wiki" },
162
+ "vector-cortex": { surface: "diagnostics", subTabHint: "cortex" },
163
+ events: { surface: "diagnostics", subTabHint: "event-log" },
164
+ health: { surface: "diagnostics", subTabHint: "health" },
165
+ setup: { surface: "setup", subTabHint: "settings" },
166
+ maintenance: { surface: "admin", subTabHint: "maintenance" },
167
+ };
168
+
169
+ /** One a11y landmark row per fixed surface (DASH-0d axe-hook contract).
170
+ * No ARIA markup is emitted this sprint — this constant IS the contract. */
171
+ export interface NavMapRow {
172
+ surface: DASHSurface;
173
+ navLabel: string;
174
+ subNavLabel: string | null;
175
+ }
176
+
177
+ export const DASH_NAV_MAP: readonly NavMapRow[] = [
178
+ { surface: "overview", navLabel: "Overview", subNavLabel: null },
179
+ { surface: "sessions", navLabel: "Session windows", subNavLabel: "Session turns" },
180
+ { surface: "cache-perf", navLabel: "Performance cards", subNavLabel: "Cache status" },
181
+ { surface: "memory-graph", navLabel: "Memory graph", subNavLabel: "Wiki + repos" },
182
+ { surface: "diagnostics", navLabel: "Diagnostics groups", subNavLabel: "Event + health" },
183
+ { surface: "setup", navLabel: "Setup", subNavLabel: "Sub-tabs" },
184
+ { surface: "admin", navLabel: "Admin", subNavLabel: "Maintenance" },
185
+ ];
186
+
187
+ /** Per-surface responsive plan: column strategy + sub-tab toggle collapse.
188
+ * All grids stay `grid-cols-1 md:grid-cols-3`, matching existent card grids;
189
+ * below `sm` sub-tab toggles collapse to a horizontal scroll region. */
190
+ export interface ResponsivePlan {
191
+ surface: DASHSurface;
192
+ grid: "grid-cols-1 md:grid-cols-3";
193
+ subTabCollapseBelow: "sm";
194
+ }
195
+
196
+ export const DASH_RESPONSIVE: readonly ResponsivePlan[] = DASH_TAB_PLAN.map((p) => ({
197
+ surface: p.surface,
198
+ grid: "grid-cols-1 md:grid-cols-3",
199
+ subTabCollapseBelow: "sm",
200
+ }));
@@ -330,5 +330,11 @@ export const VECTOR_CORTEX_SETTINGS: SettingGroup = {
330
330
  "Cross-repo corpus preparation (REPO-A): the governed, consent-gated reader-only path that builds a pseudonymous corpus manifest from per-repo events.log slices and serves GET /api/repo-corpus answering which pseudonymous repos/sessions are in the corpus, what cross-repo overlap exists, and whether consent is active for each — counts + IDs + status only, never payload content. Consent is append-only (consent.mjs, CLI/ops-only); revocation freezes the builder + route. OFF = builder refuses to run, reader route 404s, single-repo recall untouched (byte-identical predecessor).",
331
331
  true,
332
332
  ),
333
+ boolDirect(
334
+ "MEGACOMPACT_DASH_0A",
335
+ "Dashboard Consolidation — Tab Plan",
336
+ "DASH-0a dashboard tab-audit + consolidation merge plan: records (as typed constants) the collapse of the 13 current TabIds onto the fixed 7 navigational surfaces (Overview, Sessions, Cache+Performance, Memory Graph, Diagnostics, Setup, Admin), plus the deep-link map, a11y nav-map, and responsive plan. Contract-planning only — no component moves, no route change. OFF = the plan module is inert (never imported by the shell); all 13 tab/section top-level files render exactly as today (byte-identical predecessor).",
337
+ true,
338
+ ),
333
339
  ],
334
340
  };
@@ -55,7 +55,8 @@ export interface WidgetData {
55
55
  /** TUI display mode: 'full' (default) = the full stats panel; 'minimal' = a
56
56
  * one-line `LVL n | cache NN%` view flanked by panel bars. */
57
57
  tuiMode?: "full" | "minimal";
58
- /** Player level (game-mode). Stub = 1 until S33 wires the real scoring. */
58
+ /** Player level (game-mode). S33 wired the real scoring: getTurnLevelImpl
59
+ * (runtime-helpers.ts) computes floor(log2(turns+1))+1 via turnLevel. */
59
60
  level?: number;
60
61
  /** Cache hit rate as a percent (0..100+, may exceed 100 → MEGA CACHE). */
61
62
  cachePct?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-mega-compact",
3
- "version": "0.20.57",
3
+ "version": "0.20.58",
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,24 @@
1
+ /**
2
+ * config/vector-cortex-dash-0a.ts — DASH-0a dashboard consolidation tab-plan flag.
3
+ *
4
+ * Extracted to this sibling (per the vector-cortex-cosfp.ts precedent) so
5
+ * src/config/vector-cortex.ts stays under the 300-line soft limit. The flag is
6
+ * positive, defaults ON, and `MEGACOMPACT_DASH_0A=0` is byte-identical to the
7
+ * predecessor: the merge plan module is never imported by the shell, so all 13
8
+ * current tab/section top-level components render exactly as today. Registered
9
+ * as a visible VECTOR_CORTEX_SETTINGS boolDirect toggle, never EXCLUDED.
10
+ *
11
+ * Pi-agnostic, dependency-free (PREVENT-PI-004 / PREVENT-011).
12
+ */
13
+
14
+ import { sprintFlag } from "./vector-cortex-flag.js";
15
+
16
+ /**
17
+ * DASH-0a — dashboard tab-audit + merge plan. Default ON.
18
+ * `MEGACOMPACT_DASH_0A=0` disables and is byte-identical to the predecessor:
19
+ * the plan module (DASH_TAB_PLAN / DEEP_LINK_TARGETS / nav-map) is a static
20
+ * constant module that nothing imports at runtime, so the shell and all 13
21
+ * tab/section top-level files render exactly as today. This sprint records the
22
+ * plan only; DASH-0b/0c/0d consume it.
23
+ */
24
+ export const DASH_0A_ENABLED = (): boolean => sprintFlag("MEGACOMPACT_DASH_0A");
@@ -69,6 +69,8 @@ export { COSINE_FP_REAL_ENABLED } from "./vector-cortex-cosfp-real.js";
69
69
  // REPO-A cross-repo corpus prep flag extracted to repo-corpus.ts (no vector-cortex
70
70
  // prefix per spec); re-exported so root src/config.ts barrel resolves unchanged.
71
71
  export { REPO_CORPUS_ENABLED } from "./repo-corpus.js";
72
+ // DASH-0a dashboard consolidation tab-plan flag extracted to vector-cortex-dash-0a.ts.
73
+ export { DASH_0A_ENABLED } from "./vector-cortex-dash-0a.js";
72
74
  export { ENC_1A_ENABLED } from "./vector-cortex-enc1a.js";
73
75
  export {
74
76
  ENC_1B_ENABLED,
package/src/config.ts CHANGED
@@ -205,6 +205,7 @@ export {
205
205
  COSINE_FP_BENCH_ENABLED,
206
206
  COSINE_FP_REAL_ENABLED,
207
207
  REPO_CORPUS_ENABLED,
208
+ DASH_0A_ENABLED,
208
209
  BREAKER_WINDOW_MS,
209
210
  BREAKER_MIN_ATTEMPTS,
210
211
  BREAKER_PERF_FAILURES,