@cleocode/core 2026.6.5 → 2026.6.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dispatch/contracts/output-contracts.d.ts +36 -0
- package/dist/dispatch/contracts/output-contracts.d.ts.map +1 -0
- package/dist/dispatch/contracts/output-contracts.js +38 -0
- package/dist/dispatch/contracts/output-contracts.js.map +1 -0
- package/dist/dispatch/describe-operation.d.ts +98 -0
- package/dist/dispatch/describe-operation.d.ts.map +1 -0
- package/dist/dispatch/describe-operation.js +101 -0
- package/dist/dispatch/describe-operation.js.map +1 -0
- package/dist/docs/export-document.js +933 -489
- package/dist/docs/export-document.js.map +3 -3
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/internal.d.ts +2 -0
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +6 -0
- package/dist/internal.js.map +1 -1
- package/dist/llm/api-mode.d.ts +64 -0
- package/dist/llm/api-mode.d.ts.map +1 -0
- package/dist/llm/api-mode.js +72 -0
- package/dist/llm/api-mode.js.map +1 -0
- package/dist/llm/api.d.ts.map +1 -1
- package/dist/llm/api.js +6 -37
- package/dist/llm/api.js.map +1 -1
- package/dist/llm/auxiliary-fallback.d.ts.map +1 -1
- package/dist/llm/auxiliary-fallback.js +24 -38
- package/dist/llm/auxiliary-fallback.js.map +1 -1
- package/dist/llm/index.d.ts +1 -3
- package/dist/llm/index.d.ts.map +1 -1
- package/dist/llm/index.js +1 -2
- package/dist/llm/index.js.map +1 -1
- package/dist/llm/model-metadata.d.ts +14 -0
- package/dist/llm/model-metadata.d.ts.map +1 -1
- package/dist/llm/model-metadata.js +23 -0
- package/dist/llm/model-metadata.js.map +1 -1
- package/dist/llm/model-runner.d.ts +127 -0
- package/dist/llm/model-runner.d.ts.map +1 -0
- package/dist/llm/model-runner.js +312 -0
- package/dist/llm/model-runner.js.map +1 -0
- package/dist/llm/plugin-facade.js +30084 -1748
- package/dist/llm/plugin-facade.js.map +3 -3
- package/dist/llm/provider-registry/builtin/anthropic.d.ts.map +1 -1
- package/dist/llm/provider-registry/builtin/anthropic.js +4 -0
- package/dist/llm/provider-registry/builtin/anthropic.js.map +1 -1
- package/dist/llm/provider-registry/builtin/gemini.d.ts.map +1 -1
- package/dist/llm/provider-registry/builtin/gemini.js +4 -0
- package/dist/llm/provider-registry/builtin/gemini.js.map +1 -1
- package/dist/llm/provider-registry/builtin/ollama.d.ts.map +1 -1
- package/dist/llm/provider-registry/builtin/ollama.js +4 -0
- package/dist/llm/provider-registry/builtin/ollama.js.map +1 -1
- package/dist/llm/provider-registry/builtin/openai.d.ts.map +1 -1
- package/dist/llm/provider-registry/builtin/openai.js +6 -0
- package/dist/llm/provider-registry/builtin/openai.js.map +1 -1
- package/dist/llm/role-executor.d.ts +6 -5
- package/dist/llm/role-executor.d.ts.map +1 -1
- package/dist/llm/role-executor.js +40 -86
- package/dist/llm/role-executor.js.map +1 -1
- package/dist/llm/role-resolver.d.ts +28 -1
- package/dist/llm/role-resolver.d.ts.map +1 -1
- package/dist/llm/role-resolver.js +10 -0
- package/dist/llm/role-resolver.js.map +1 -1
- package/dist/llm/session-factory.d.ts +4 -6
- package/dist/llm/session-factory.d.ts.map +1 -1
- package/dist/llm/session-factory.js +6 -72
- package/dist/llm/session-factory.js.map +1 -1
- package/dist/llm/system-resolver.d.ts.map +1 -1
- package/dist/llm/system-resolver.js +6 -0
- package/dist/llm/system-resolver.js.map +1 -1
- package/dist/llm/tool-loop.d.ts.map +1 -1
- package/dist/llm/tool-loop.js +9 -32
- package/dist/llm/tool-loop.js.map +1 -1
- package/dist/llm/transports/index.d.ts +5 -3
- package/dist/llm/transports/index.d.ts.map +1 -1
- package/dist/llm/transports/index.js +5 -2
- package/dist/llm/transports/index.js.map +1 -1
- package/dist/reconciliation/reconciliation-engine.d.ts.map +1 -1
- package/dist/reconciliation/reconciliation-engine.js +3 -0
- package/dist/reconciliation/reconciliation-engine.js.map +1 -1
- package/dist/release/plan.d.ts +27 -0
- package/dist/release/plan.d.ts.map +1 -1
- package/dist/release/plan.js +36 -2
- package/dist/release/plan.js.map +1 -1
- package/dist/release/provenance-fk.d.ts +74 -0
- package/dist/release/provenance-fk.d.ts.map +1 -0
- package/dist/release/provenance-fk.js +122 -0
- package/dist/release/provenance-fk.js.map +1 -0
- package/dist/release/reconcile.d.ts +10 -0
- package/dist/release/reconcile.d.ts.map +1 -1
- package/dist/release/reconcile.js +107 -2
- package/dist/release/reconcile.js.map +1 -1
- package/dist/sticky/convert.d.ts.map +1 -1
- package/dist/sticky/convert.js +3 -0
- package/dist/sticky/convert.js.map +1 -1
- package/dist/store/exodus/column-transforms.d.ts +275 -0
- package/dist/store/exodus/column-transforms.d.ts.map +1 -0
- package/dist/store/exodus/column-transforms.js +478 -0
- package/dist/store/exodus/column-transforms.js.map +1 -0
- package/dist/store/exodus/count-parity.d.ts +71 -0
- package/dist/store/exodus/count-parity.d.ts.map +1 -0
- package/dist/store/exodus/count-parity.js +124 -0
- package/dist/store/exodus/count-parity.js.map +1 -0
- package/dist/store/exodus/health.d.ts +70 -0
- package/dist/store/exodus/health.d.ts.map +1 -0
- package/dist/store/exodus/health.js +130 -0
- package/dist/store/exodus/health.js.map +1 -0
- package/dist/store/exodus/index.d.ts +3 -0
- package/dist/store/exodus/index.d.ts.map +1 -1
- package/dist/store/exodus/index.js +3 -0
- package/dist/store/exodus/index.js.map +1 -1
- package/dist/store/exodus/migrate.d.ts.map +1 -1
- package/dist/store/exodus/migrate.js +103 -298
- package/dist/store/exodus/migrate.js.map +1 -1
- package/dist/store/exodus/plan.d.ts +48 -4
- package/dist/store/exodus/plan.d.ts.map +1 -1
- package/dist/store/exodus/plan.js +67 -9
- package/dist/store/exodus/plan.js.map +1 -1
- package/dist/store/exodus/seal.d.ts +69 -0
- package/dist/store/exodus/seal.d.ts.map +1 -0
- package/dist/store/exodus/seal.js +73 -0
- package/dist/store/exodus/seal.js.map +1 -0
- package/dist/store/exodus/types.d.ts +24 -1
- package/dist/store/exodus/types.d.ts.map +1 -1
- package/dist/store/exodus/types.js.map +1 -1
- package/dist/store/exodus/verify-migration.d.ts.map +1 -1
- package/dist/store/exodus/verify-migration.js +109 -24
- package/dist/store/exodus/verify-migration.js.map +1 -1
- package/dist/tasks/add.d.ts +13 -0
- package/dist/tasks/add.d.ts.map +1 -1
- package/dist/tasks/add.js +50 -18
- package/dist/tasks/add.js.map +1 -1
- package/dist/tasks/archive.d.ts.map +1 -1
- package/dist/tasks/archive.js +12 -7
- package/dist/tasks/archive.js.map +1 -1
- package/dist/tasks/child-disposition.d.ts +66 -0
- package/dist/tasks/child-disposition.d.ts.map +1 -0
- package/dist/tasks/child-disposition.js +80 -0
- package/dist/tasks/child-disposition.js.map +1 -0
- package/dist/tasks/delete-preview.js +1 -1
- package/dist/tasks/delete-preview.js.map +1 -1
- package/dist/tasks/deletion-strategy.d.ts +21 -3
- package/dist/tasks/deletion-strategy.d.ts.map +1 -1
- package/dist/tasks/deletion-strategy.js +61 -15
- package/dist/tasks/deletion-strategy.js.map +1 -1
- package/dist/tasks/engine-wrap.d.ts +8 -0
- package/dist/tasks/engine-wrap.d.ts.map +1 -1
- package/dist/tasks/engine-wrap.js +22 -9
- package/dist/tasks/engine-wrap.js.map +1 -1
- package/dist/tasks/update.d.ts.map +1 -1
- package/dist/tasks/update.js +12 -0
- package/dist/tasks/update.js.map +1 -1
- package/package.json +12 -12
- package/dist/llm/transports/openai.d.ts +0 -181
- package/dist/llm/transports/openai.d.ts.map +0 -1
- package/dist/llm/transports/openai.js +0 -645
- package/dist/llm/transports/openai.js.map +0 -1
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Memory-safe COUNT(*)-only exodus parity — the deficit gate WITHOUT the content
|
|
3
|
+
* digest (T11837).
|
|
4
|
+
*
|
|
5
|
+
* `verifyMigration` is the full parity guard (row counts + content digest + FK +
|
|
6
|
+
* enum drift), but its content digest streams every row of every table. For the
|
|
7
|
+
* fleet-flow surface — `cleo exodus seal` (certify an already-migrated install)
|
|
8
|
+
* and `cleo doctor exodus` (health report) — we only need the DEFICIT gate that
|
|
9
|
+
* `isDataContinuityOk` actually enforces: per-table `target COUNT(*) >= source
|
|
10
|
+
* COUNT(*)`. That is a set-based query SQLite answers without materialising a
|
|
11
|
+
* single row, so it is safe to run against a 1.7 GB-class legacy `brain.db`
|
|
12
|
+
* (where the digest would be expensive). A SURPLUS (target > source — the live
|
|
13
|
+
* consolidated DB has moved ahead of the frozen legacy snapshot) is NOT loss and
|
|
14
|
+
* is tolerated, exactly as in `isDataContinuityOk`.
|
|
15
|
+
*
|
|
16
|
+
* This is intentionally a SEPARATE primitive from `verifyMigration` — sealing an
|
|
17
|
+
* already-migrated install must never re-run the heavy digest that this whole
|
|
18
|
+
* fleet-hardening epic (T11833) exists to avoid.
|
|
19
|
+
*
|
|
20
|
+
* @task T11837 (fleet-flow surface — count-only parity for seal + health)
|
|
21
|
+
* @epic T11833 (EP-EXODUS-FLEET-HARDENING)
|
|
22
|
+
* @saga T11242 (SG-DB-SUBSTRATE-V2)
|
|
23
|
+
*/
|
|
24
|
+
import { existsSync } from 'node:fs';
|
|
25
|
+
import { getLogger } from '../../logger.js';
|
|
26
|
+
import { openCleoDbSnapshot } from '../open-cleo-db.js';
|
|
27
|
+
import { resolveConsolidatedTableName, resolveTableTargetScope } from './table-name-map.js';
|
|
28
|
+
const log = getLogger('exodus-count-parity');
|
|
29
|
+
/** List user tables (excluding SQLite internals + Drizzle journal). */
|
|
30
|
+
function listTables(db) {
|
|
31
|
+
return db
|
|
32
|
+
.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name NOT LIKE 'sqlite_%' AND name NOT LIKE '__drizzle_%' ORDER BY name")
|
|
33
|
+
.all().map((r) => r.name);
|
|
34
|
+
}
|
|
35
|
+
/** `true` if `tableName` exists in `db`. */
|
|
36
|
+
function tableExists(db, tableName) {
|
|
37
|
+
const escaped = tableName.replace(/'/g, "''");
|
|
38
|
+
return (db.prepare(`SELECT 1 FROM sqlite_master WHERE type='table' AND name='${escaped}'`).get() !==
|
|
39
|
+
undefined);
|
|
40
|
+
}
|
|
41
|
+
/** Memory-safe `COUNT(*)`. Returns `null` for a virtual/FTS table that cannot be counted. */
|
|
42
|
+
function rowCount(db, tableName) {
|
|
43
|
+
try {
|
|
44
|
+
const row = db.prepare(`SELECT COUNT(*) AS c FROM "${tableName}"`).get();
|
|
45
|
+
return Number(row?.c ?? 0);
|
|
46
|
+
}
|
|
47
|
+
catch {
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Compute COUNT(*)-only parity for every legacy source table against the
|
|
53
|
+
* consolidated dual-scope target — the deficit gate, never the heavy digest.
|
|
54
|
+
*
|
|
55
|
+
* Opens all DBs read-only. A table whose consolidated counterpart is ABSENT with
|
|
56
|
+
* source rows is a deficit (`targetCount: 0`). Derived/FTS/internal tables that
|
|
57
|
+
* map to `skip`, and virtual tables that cannot be counted, are skipped.
|
|
58
|
+
*
|
|
59
|
+
* @param sources - Legacy source descriptors (from `buildExodusPlan()`).
|
|
60
|
+
* @param projectDbPath - Absolute path to the consolidated project `cleo.db`.
|
|
61
|
+
* @param globalDbPath - Absolute path to the consolidated global `cleo.db`.
|
|
62
|
+
* @returns A {@link CountParityResult}; `ok === false` when any table has a deficit.
|
|
63
|
+
*
|
|
64
|
+
* @task T11837
|
|
65
|
+
*/
|
|
66
|
+
export function computeCountParity(sources, projectDbPath, globalDbPath) {
|
|
67
|
+
const entries = [];
|
|
68
|
+
let skipped = 0;
|
|
69
|
+
if (!existsSync(projectDbPath) || !existsSync(globalDbPath)) {
|
|
70
|
+
return { ok: false, entries: [], deficits: [], checked: 0, skipped: 0 };
|
|
71
|
+
}
|
|
72
|
+
const projectSnap = openCleoDbSnapshot(projectDbPath, { readOnly: true });
|
|
73
|
+
const globalSnap = openCleoDbSnapshot(globalDbPath, { readOnly: true });
|
|
74
|
+
try {
|
|
75
|
+
for (const src of sources) {
|
|
76
|
+
if (!existsSync(src.path))
|
|
77
|
+
continue;
|
|
78
|
+
const srcSnap = openCleoDbSnapshot(src.path, { readOnly: true });
|
|
79
|
+
try {
|
|
80
|
+
for (const legacyTable of listTables(srcSnap.db)) {
|
|
81
|
+
const resolution = resolveConsolidatedTableName(src.name, legacyTable);
|
|
82
|
+
if (resolution.kind === 'skip') {
|
|
83
|
+
skipped++;
|
|
84
|
+
continue;
|
|
85
|
+
}
|
|
86
|
+
const targetTable = resolution.targetName;
|
|
87
|
+
const scope = resolveTableTargetScope(src.name, legacyTable, src.targetScope);
|
|
88
|
+
const targetSnap = scope === 'project' ? projectSnap : globalSnap;
|
|
89
|
+
const sourceCount = rowCount(srcSnap.db, legacyTable);
|
|
90
|
+
if (sourceCount === null) {
|
|
91
|
+
skipped++;
|
|
92
|
+
continue;
|
|
93
|
+
}
|
|
94
|
+
const targetCount = tableExists(targetSnap.db, targetTable)
|
|
95
|
+
? (rowCount(targetSnap.db, targetTable) ?? 0)
|
|
96
|
+
: 0;
|
|
97
|
+
const deficit = targetCount < sourceCount ? sourceCount - targetCount : 0;
|
|
98
|
+
entries.push({
|
|
99
|
+
sourceDb: src.name,
|
|
100
|
+
sourceTable: legacyTable,
|
|
101
|
+
targetTable,
|
|
102
|
+
scope,
|
|
103
|
+
sourceCount,
|
|
104
|
+
targetCount,
|
|
105
|
+
deficit,
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
finally {
|
|
110
|
+
srcSnap.close();
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
finally {
|
|
115
|
+
projectSnap.close();
|
|
116
|
+
globalSnap.close();
|
|
117
|
+
}
|
|
118
|
+
const deficits = entries.filter((e) => e.deficit > 0);
|
|
119
|
+
if (deficits.length > 0) {
|
|
120
|
+
log.warn({ deficitCount: deficits.length, sample: deficits.slice(0, 5) }, `exodus count-parity: ${deficits.length} table(s) have FEWER rows in the consolidated target than the legacy source`);
|
|
121
|
+
}
|
|
122
|
+
return { ok: deficits.length === 0, entries, deficits, checked: entries.length, skipped };
|
|
123
|
+
}
|
|
124
|
+
//# sourceMappingURL=count-parity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"count-parity.js","sourceRoot":"","sources":["../../../src/store/exodus/count-parity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,4BAA4B,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAG5F,MAAM,GAAG,GAAG,SAAS,CAAC,qBAAqB,CAAC,CAAC;AAkC7C,uEAAuE;AACvE,SAAS,UAAU,CAAC,EAAgB;IAClC,OACE,EAAE;SACC,OAAO,CACN,8HAA8H,CAC/H;SACA,GAAG,EACP,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AACvB,CAAC;AAED,4CAA4C;AAC5C,SAAS,WAAW,CAAC,EAAgB,EAAE,SAAiB;IACtD,MAAM,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9C,OAAO,CACL,EAAE,CAAC,OAAO,CAAC,4DAA4D,OAAO,GAAG,CAAC,CAAC,GAAG,EAAE;QACxF,SAAS,CACV,CAAC;AACJ,CAAC;AAED,6FAA6F;AAC7F,SAAS,QAAQ,CAAC,EAAgB,EAAE,SAAiB;IACnD,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,EAAE,CAAC,OAAO,CAAC,8BAA8B,SAAS,GAAG,CAAC,CAAC,GAAG,EAE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,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC;IACtD,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACxB,GAAG,CAAC,IAAI,CACN,EAAE,YAAY,EAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAC/D,wBAAwB,QAAQ,CAAC,MAAM,6EAA6E,CACrH,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,EAAE,EAAE,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC;AAC5F,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `cleo doctor exodus` core — read-only exodus health report (T11837).
|
|
3
|
+
*
|
|
4
|
+
* The fleet pre-check the owner flow opens with: a single, read-only snapshot of
|
|
5
|
+
* where each scope stands so an operator (or the rollout automation) can route
|
|
6
|
+
* the next step — already-sealed, migrated-but-unsealed (→ `cleo exodus seal`),
|
|
7
|
+
* fresh-needs-migration, or no-cleo-data — and so any LARGE legacy DB is flagged
|
|
8
|
+
* for individual attention before the streamed-verify build touches it.
|
|
9
|
+
*
|
|
10
|
+
* Pure assembly over existing primitives (`buildExodusPlan`, `runExodusStatus`,
|
|
11
|
+
* `hasExodusCompleteMarker`, `detectStrandedResidue`, {@link computeCountParity}).
|
|
12
|
+
* Never writes; never runs the heavy digest.
|
|
13
|
+
*
|
|
14
|
+
* @task T11837 (fleet-flow surface — exodus health-check)
|
|
15
|
+
* @epic T11833 (EP-EXODUS-FLEET-HARDENING)
|
|
16
|
+
* @saga T11242 (SG-DB-SUBSTRATE-V2)
|
|
17
|
+
*/
|
|
18
|
+
import type { ExodusScope } from './types.js';
|
|
19
|
+
/** Per-scope migration state. */
|
|
20
|
+
export type ExodusScopeState = 'sealed' | 'migrated-unsealed' | 'needs-migration' | 'no-cleo-data';
|
|
21
|
+
/** One legacy source DB's presence + size. */
|
|
22
|
+
export interface ExodusSourceHealth {
|
|
23
|
+
readonly name: string;
|
|
24
|
+
readonly path: string;
|
|
25
|
+
readonly present: boolean;
|
|
26
|
+
readonly bytes: number;
|
|
27
|
+
/** `true` when `bytes >= LARGE_DB_BYTES` (route through streamed-verify build). */
|
|
28
|
+
readonly large: boolean;
|
|
29
|
+
}
|
|
30
|
+
/** Health of one scope (project | global). */
|
|
31
|
+
export interface ExodusScopeHealth {
|
|
32
|
+
readonly scope: ExodusScope;
|
|
33
|
+
readonly state: ExodusScopeState;
|
|
34
|
+
readonly consolidatedExists: boolean;
|
|
35
|
+
readonly markerPresent: boolean;
|
|
36
|
+
readonly legacySources: readonly ExodusSourceHealth[];
|
|
37
|
+
readonly strandedResidue: readonly string[];
|
|
38
|
+
}
|
|
39
|
+
/** Full read-only exodus health report. */
|
|
40
|
+
export interface ExodusHealth {
|
|
41
|
+
readonly project: ExodusScopeHealth;
|
|
42
|
+
readonly global: ExodusScopeHealth;
|
|
43
|
+
/** Disk pre-flight (current 3×-of-sum policy). */
|
|
44
|
+
readonly diskHeadroomOk: boolean;
|
|
45
|
+
readonly availableBytes: number;
|
|
46
|
+
readonly requiredBytes: number;
|
|
47
|
+
/** Whether `CLEO_DISABLE_EXODUS_ON_OPEN` is set (the fleet brake). */
|
|
48
|
+
readonly killSwitchSet: boolean;
|
|
49
|
+
/** COUNT(*)-only data-continuity across present sources (no digest). */
|
|
50
|
+
readonly dataParityOk: boolean;
|
|
51
|
+
readonly dataDeficits: number;
|
|
52
|
+
/** Legacy DBs ≥ 500 MB across both scopes (need individual attention). */
|
|
53
|
+
readonly largeLegacyDbs: ReadonlyArray<{
|
|
54
|
+
name: string;
|
|
55
|
+
scope: ExodusScope;
|
|
56
|
+
bytes: number;
|
|
57
|
+
}>;
|
|
58
|
+
/** Actionable next-step recommendations. */
|
|
59
|
+
readonly recommendations: readonly string[];
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Build a read-only exodus health report for the current project + global scope.
|
|
63
|
+
*
|
|
64
|
+
* @param cwd - Working directory used to resolve the project `.cleo/` dir.
|
|
65
|
+
* @returns The assembled {@link ExodusHealth}.
|
|
66
|
+
*
|
|
67
|
+
* @task T11837
|
|
68
|
+
*/
|
|
69
|
+
export declare function buildExodusHealth(cwd: string | undefined): ExodusHealth;
|
|
70
|
+
//# sourceMappingURL=health.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"health.d.ts","sourceRoot":"","sources":["../../../src/store/exodus/health.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAMH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAK9C,iCAAiC;AACjC,MAAM,MAAM,gBAAgB,GACxB,QAAQ,GACR,mBAAmB,GACnB,iBAAiB,GACjB,cAAc,CAAC;AAEnB,8CAA8C;AAC9C,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,mFAAmF;IACnF,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;CACzB;AAED,8CAA8C;AAC9C,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,gBAAgB,CAAC;IACjC,QAAQ,CAAC,kBAAkB,EAAE,OAAO,CAAC;IACrC,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,aAAa,EAAE,SAAS,kBAAkB,EAAE,CAAC;IACtD,QAAQ,CAAC,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;CAC7C;AAED,2CAA2C;AAC3C,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,OAAO,EAAE,iBAAiB,CAAC;IACpC,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;IACnC,kDAAkD;IAClD,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;IACjC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,sEAAsE;IACtE,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,wEAAwE;IACxE,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,0EAA0E;IAC1E,QAAQ,CAAC,cAAc,EAAE,aAAa,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,WAAW,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC5F,4CAA4C;IAC5C,QAAQ,CAAC,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;CAC7C;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,YAAY,CA+GvE"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `cleo doctor exodus` core — read-only exodus health report (T11837).
|
|
3
|
+
*
|
|
4
|
+
* The fleet pre-check the owner flow opens with: a single, read-only snapshot of
|
|
5
|
+
* where each scope stands so an operator (or the rollout automation) can route
|
|
6
|
+
* the next step — already-sealed, migrated-but-unsealed (→ `cleo exodus seal`),
|
|
7
|
+
* fresh-needs-migration, or no-cleo-data — and so any LARGE legacy DB is flagged
|
|
8
|
+
* for individual attention before the streamed-verify build touches it.
|
|
9
|
+
*
|
|
10
|
+
* Pure assembly over existing primitives (`buildExodusPlan`, `runExodusStatus`,
|
|
11
|
+
* `hasExodusCompleteMarker`, `detectStrandedResidue`, {@link computeCountParity}).
|
|
12
|
+
* Never writes; never runs the heavy digest.
|
|
13
|
+
*
|
|
14
|
+
* @task T11837 (fleet-flow surface — exodus health-check)
|
|
15
|
+
* @epic T11833 (EP-EXODUS-FLEET-HARDENING)
|
|
16
|
+
* @saga T11242 (SG-DB-SUBSTRATE-V2)
|
|
17
|
+
*/
|
|
18
|
+
import { existsSync, statSync } from 'node:fs';
|
|
19
|
+
import { hasExodusCompleteMarker } from './archive.js';
|
|
20
|
+
import { computeCountParity } from './count-parity.js';
|
|
21
|
+
import { buildExodusPlan } from './plan.js';
|
|
22
|
+
/** Legacy DBs at or above this size are flagged for individual rollout attention. */
|
|
23
|
+
const LARGE_DB_BYTES = 500 * 1024 * 1024;
|
|
24
|
+
/**
|
|
25
|
+
* Build a read-only exodus health report for the current project + global scope.
|
|
26
|
+
*
|
|
27
|
+
* @param cwd - Working directory used to resolve the project `.cleo/` dir.
|
|
28
|
+
* @returns The assembled {@link ExodusHealth}.
|
|
29
|
+
*
|
|
30
|
+
* @task T11837
|
|
31
|
+
*/
|
|
32
|
+
export function buildExodusHealth(cwd) {
|
|
33
|
+
const plan = buildExodusPlan(cwd);
|
|
34
|
+
const anyLegacyPresent = plan.sources.some((s) => existsSync(s.path));
|
|
35
|
+
// COUNT(*)-only parity (no digest). Trivially ok when no legacy sources remain.
|
|
36
|
+
const parity = anyLegacyPresent
|
|
37
|
+
? computeCountParity(plan.sources, plan.projectDbPath, plan.globalDbPath)
|
|
38
|
+
: { ok: true, entries: [], deficits: [], checked: 0, skipped: 0 };
|
|
39
|
+
const consolidatedExistsByScope = {
|
|
40
|
+
project: existsSync(plan.projectDbPath),
|
|
41
|
+
global: existsSync(plan.globalDbPath),
|
|
42
|
+
};
|
|
43
|
+
const buildScope = (scope) => {
|
|
44
|
+
const sources = plan.sources
|
|
45
|
+
.filter((s) => s.targetScope === scope)
|
|
46
|
+
.map((s) => {
|
|
47
|
+
const present = existsSync(s.path);
|
|
48
|
+
let bytes = 0;
|
|
49
|
+
if (present) {
|
|
50
|
+
try {
|
|
51
|
+
bytes = statSync(s.path).size;
|
|
52
|
+
}
|
|
53
|
+
catch {
|
|
54
|
+
bytes = 0;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return { name: s.name, path: s.path, present, bytes, large: bytes >= LARGE_DB_BYTES };
|
|
58
|
+
});
|
|
59
|
+
const markerPresent = hasExodusCompleteMarker(scope, cwd);
|
|
60
|
+
const legacyPresent = sources.some((s) => s.present);
|
|
61
|
+
const consolidatedExists = consolidatedExistsByScope[scope];
|
|
62
|
+
const scopeEntries = parity.entries.filter((e) => e.scope === scope);
|
|
63
|
+
const scopeHasDeficit = scopeEntries.some((e) => e.deficit > 0);
|
|
64
|
+
const scopeHasData = scopeEntries.some((e) => e.targetCount > 0);
|
|
65
|
+
let state;
|
|
66
|
+
if (markerPresent) {
|
|
67
|
+
state = 'sealed';
|
|
68
|
+
}
|
|
69
|
+
else if (legacyPresent && consolidatedExists && scopeHasData && !scopeHasDeficit) {
|
|
70
|
+
state = 'migrated-unsealed';
|
|
71
|
+
}
|
|
72
|
+
else if (legacyPresent) {
|
|
73
|
+
state = 'needs-migration';
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
state = 'no-cleo-data';
|
|
77
|
+
}
|
|
78
|
+
// Stranded residue is only meaningful once a marker exists for the scope.
|
|
79
|
+
const stranded = sources.filter((s) => s.present && markerPresent).map((s) => s.name);
|
|
80
|
+
return {
|
|
81
|
+
scope,
|
|
82
|
+
state,
|
|
83
|
+
consolidatedExists,
|
|
84
|
+
markerPresent,
|
|
85
|
+
legacySources: sources,
|
|
86
|
+
strandedResidue: stranded,
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
const project = buildScope('project');
|
|
90
|
+
const global = buildScope('global');
|
|
91
|
+
const largeLegacyDbs = [
|
|
92
|
+
...project.legacySources
|
|
93
|
+
.filter((s) => s.large)
|
|
94
|
+
.map((s) => ({ name: s.name, scope: 'project', bytes: s.bytes })),
|
|
95
|
+
...global.legacySources
|
|
96
|
+
.filter((s) => s.large)
|
|
97
|
+
.map((s) => ({ name: s.name, scope: 'global', bytes: s.bytes })),
|
|
98
|
+
];
|
|
99
|
+
const recommendations = [];
|
|
100
|
+
for (const sc of [project, global]) {
|
|
101
|
+
if (sc.state === 'migrated-unsealed') {
|
|
102
|
+
recommendations.push(`${sc.scope}: data is consolidated but unsealed — run \`cleo exodus seal --scope ${sc.scope}\` to archive legacy DBs + stop on-open re-firing.`);
|
|
103
|
+
}
|
|
104
|
+
else if (sc.state === 'needs-migration') {
|
|
105
|
+
recommendations.push(`${sc.scope}: legacy data not yet consolidated — run \`cleo exodus migrate --scope ${sc.scope}\`.`);
|
|
106
|
+
}
|
|
107
|
+
else if (sc.strandedResidue.length > 0) {
|
|
108
|
+
recommendations.push(`${sc.scope}: ${sc.strandedResidue.length} stranded legacy DB(s) after a sealed cutover — run \`cleo doctor exodus-residue --fix\`.`);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
if (largeLegacyDbs.length > 0) {
|
|
112
|
+
recommendations.push(`${largeLegacyDbs.length} large legacy DB(s) (≥500 MB) — migrate these only with the streamed-verify build (T11834) to avoid the verify OOM.`);
|
|
113
|
+
}
|
|
114
|
+
if (!parity.ok) {
|
|
115
|
+
recommendations.push(`${parity.deficits.length} table(s) show a row deficit in cleo.db — DO NOT seal; run \`cleo exodus migrate\` first.`);
|
|
116
|
+
}
|
|
117
|
+
return {
|
|
118
|
+
project,
|
|
119
|
+
global,
|
|
120
|
+
diskHeadroomOk: plan.diskPreflight,
|
|
121
|
+
availableBytes: plan.availableBytes,
|
|
122
|
+
requiredBytes: 3 * plan.totalSourceBytes,
|
|
123
|
+
killSwitchSet: process.env.CLEO_DISABLE_EXODUS_ON_OPEN === '1',
|
|
124
|
+
dataParityOk: parity.ok,
|
|
125
|
+
dataDeficits: parity.deficits.length,
|
|
126
|
+
largeLegacyDbs,
|
|
127
|
+
recommendations,
|
|
128
|
+
};
|
|
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ACnC,aAAa,EAAE,CAAC,GAAG,IAAI,CAAC,gBAAgB;QACxC,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC,2BAA2B,KAAK,GAAG;QAC9D,YAAY,EAAE,MAAM,CAAC,EAAE;QACvB,YAAY,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM;QACpC,cAAc;QACd,eAAe;KAChB,CAAC;AACJ,CAAC"}
|
|
@@ -9,8 +9,11 @@
|
|
|
9
9
|
* @saga T11242
|
|
10
10
|
*/
|
|
11
11
|
export { type ArchivedSourceResult, type ArchiveMigratedSourcesResult, archiveMigratedSources, archiveSourceDb, archiveStrandedResidue, detectStrandedResidue, type ExodusCompleteMarker, exodusArchiveDir, exodusMarkerPath, hasExodusCompleteMarker, type StrandedResidueEntry, writeExodusCompleteMarker, } from './archive.js';
|
|
12
|
+
export { type CountParityEntry, type CountParityResult, computeCountParity, } from './count-parity.js';
|
|
13
|
+
export { buildExodusHealth, type ExodusHealth, type ExodusScopeHealth, type ExodusScopeState, type ExodusSourceHealth, } from './health.js';
|
|
12
14
|
export { clearExodusJournal, runExodusMigrate } from './migrate.js';
|
|
13
15
|
export { buildExodusPlan, deriveStagingDirName, sourcesPresent } from './plan.js';
|
|
16
|
+
export { type SealResult, type SealScopeArg, type SealScopeOutcome, sealExodus, } from './seal.js';
|
|
14
17
|
export { runExodusStatus } from './status.js';
|
|
15
18
|
export { isDerivedOrInternalTable, resolveConsolidatedTableName, reverseLookup, type TableNameResolution, } from './table-name-map.js';
|
|
16
19
|
export { EXODUS_TARGET_SCHEMA_VERSION, type ExodusJournal, type ExodusMigrateResult, type ExodusPlan, type ExodusScope, type ExodusStatusResult, type ExodusVerifyResult, type JournalTableEntry, type LegacyDbDescriptor, type TableCopyResult, type TableMigrationStatus, type VerifyTableResult, } from './types.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/store/exodus/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,4BAA4B,EACjC,sBAAsB,EACtB,eAAe,EACf,sBAAsB,EACtB,qBAAqB,EACrB,KAAK,oBAAoB,EACzB,gBAAgB,EAChB,gBAAgB,EAChB,uBAAuB,EACvB,KAAK,oBAAoB,EACzB,yBAAyB,GAC1B,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EACL,wBAAwB,EACxB,4BAA4B,EAC5B,aAAa,EACb,KAAK,mBAAmB,GACzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,4BAA4B,EAC5B,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,GACvB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/store/exodus/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,4BAA4B,EACjC,sBAAsB,EACtB,eAAe,EACf,sBAAsB,EACtB,qBAAqB,EACrB,KAAK,oBAAoB,EACzB,gBAAgB,EAChB,gBAAgB,EAChB,uBAAuB,EACvB,KAAK,oBAAoB,EACzB,yBAAyB,GAC1B,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,iBAAiB,EACjB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,GACxB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAClF,OAAO,EACL,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,UAAU,GACX,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EACL,wBAAwB,EACxB,4BAA4B,EAC5B,aAAa,EACb,KAAK,mBAAmB,GACzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,4BAA4B,EAC5B,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,GACvB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -9,8 +9,11 @@
|
|
|
9
9
|
* @saga T11242
|
|
10
10
|
*/
|
|
11
11
|
export { archiveMigratedSources, archiveSourceDb, archiveStrandedResidue, detectStrandedResidue, exodusArchiveDir, exodusMarkerPath, hasExodusCompleteMarker, writeExodusCompleteMarker, } from './archive.js';
|
|
12
|
+
export { computeCountParity, } from './count-parity.js';
|
|
13
|
+
export { buildExodusHealth, } from './health.js';
|
|
12
14
|
export { clearExodusJournal, runExodusMigrate } from './migrate.js';
|
|
13
15
|
export { buildExodusPlan, deriveStagingDirName, sourcesPresent } from './plan.js';
|
|
16
|
+
export { sealExodus, } from './seal.js';
|
|
14
17
|
export { runExodusStatus } from './status.js';
|
|
15
18
|
export { isDerivedOrInternalTable, resolveConsolidatedTableName, reverseLookup, } from './table-name-map.js';
|
|
16
19
|
export { EXODUS_TARGET_SCHEMA_VERSION, } from './types.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/store/exodus/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAGL,sBAAsB,EACtB,eAAe,EACf,sBAAsB,EACtB,qBAAqB,EAErB,gBAAgB,EAChB,gBAAgB,EAChB,uBAAuB,EAEvB,yBAAyB,GAC1B,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EACL,wBAAwB,EACxB,4BAA4B,EAC5B,aAAa,GAEd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,4BAA4B,GAY7B,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/store/exodus/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAGL,sBAAsB,EACtB,eAAe,EACf,sBAAsB,EACtB,qBAAqB,EAErB,gBAAgB,EAChB,gBAAgB,EAChB,uBAAuB,EAEvB,yBAAyB,GAC1B,MAAM,cAAc,CAAC;AACtB,OAAO,EAGL,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,iBAAiB,GAKlB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAClF,OAAO,EAIL,UAAU,GACX,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EACL,wBAAwB,EACxB,4BAA4B,EAC5B,aAAa,GAEd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,4BAA4B,GAY7B,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../../../src/store/exodus/migrate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgHG;
|
|
1
|
+
{"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../../../src/store/exodus/migrate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgHG;AA8BH,OAAO,KAAK,EAEV,mBAAmB,EACnB,UAAU,EAMX,MAAM,YAAY,CAAC;AAiEpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAiB9D;AAknBD;;;;;;;;;;;GAWG;AACH,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,UAAU,EAChB,iBAAiB,UAAQ,EACzB,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,GACjC,OAAO,CAAC,mBAAmB,CAAC,CA6L9B"}
|