OpenPanel is an open-source web and product analytics platform, an open-source alternative to Mixpanel with optional self-hosting.
chore(tooling): remove one-off gates and scripts from the rewrite
Carl-Gerhard Lindesvärd329983b715bb
diff --git a/tooling/codemods/p11-codemod.ts b/tooling/codemods/p11-codemod.tsdeleted file mode 100644index f91bb6869..000000000--- a/tooling/codemods/p11-codemod.ts+++ /dev/null@@ -1,162 +0,0 @@-/**- * P11: repoint importers of the four dissolving packages —- * @openpanel/validation, @openpanel/constants, @openpanel/common,- * @openpanel/json — at the targets recorded in ./p11-map.json, the single- * source of truth. A row's `to` is the default target;- * `toByConsumer[<workspace>]` overrides it for one workspace.- *- * Three things it does that a sed cannot: - one import statement fans out to- * several targets (packages/db/src/types.ts splits eight ways), so statements- * are regrouped by target; - per-symbol `type` keywords are preserved exactly- * as written. A `type` keyword can sit on a runtime binding used only in- * `z.infer<typeof x>`; dropping it promotes an erased import into a real one- * and changes the bundle; - a named re-export (`export { X }- * from '@openpanel/validation'`) is rewritten the same way an import is — same- * clause grammar, same per-symbol targets.- *- * Idempotent: a rewritten specifier no longer matches DYING, so a second run- * over the same files changes nothing.- *- * Usage: bun tooling/codemods/p11-codemod.ts <file...>- */--import { existsSync, readFileSync, writeFileSync } from 'node:fs';-import { dirname, relative, resolve } from 'node:path';--interface MapRow {- from: string;- symbol: string;- kind: 'type' | 'schema' | 'value';- to: string;- keepTypeKeyword: boolean;- toByConsumer?: Record<string, string>;-}--const REPO_ROOT = resolve(import.meta.dir, '../..');-const MAP: MapRow[] = JSON.parse(- readFileSync(resolve(import.meta.dir, 'p11-map.json'), 'utf8')-);--const rows = new Map<string, MapRow>();-for (const row of MAP) {- rows.set(`${row.from}\t${row.symbol}`, row);-}--const DYING = ['validation', 'constants', 'common', 'json']- .map((name) => `@openpanel/${name}`)- .join('|');-// Matches both `import { … } from '…'` and the named re-export form-// `export { … } from '…'` — same clause grammar, same per-symbol targets.-const IMPORT_STATEMENT = new RegExp(- `(import|export)\\s+(type\\s+)?\\{([^}]*)\\}\\s*from\\s*'(${DYING})';`,- 'g'-);--/**- * `packages/core`, `apps/start`, `packages/sdks/express`, … — the key- * `toByConsumer` is written in. A fixed segment count breaks on the- * doubly-nested SDK packages, so this walks up to the nearest package.json.- */-function workspaceOf(file: string): string {- let dir = dirname(resolve(REPO_ROOT, file));- while (dir !== REPO_ROOT && !existsSync(resolve(dir, 'package.json'))) {- dir = dirname(dir);- }- return relative(REPO_ROOT, dir);-}--function targetSpecifier(target: string, file: string): string {- if (target.startsWith('@openpanel/')) {- // A core file reaches its siblings by relative path, never through its own- // package (core-no-self-barrel's reasoning applies to every self-import).- const selfPrefix = '@openpanel/core/modules/';- if (- workspaceOf(file) === 'packages/core' &&- target.startsWith(selfPrefix)- ) {- return relativeTo(- file,- `packages/core/src/modules/${target.slice(selfPrefix.length)}.ts`- );- }- return target;- }- return relativeTo(file, target);-}--function relativeTo(file: string, repoRelativeTarget: string): string {- const rel = relative(- dirname(file),- resolve(REPO_ROOT, repoRelativeTarget)- ).replace(/\.ts$/, '');- return rel.startsWith('.') ? rel : `./${rel}`;-}--interface Binding {- text: string;- isType: boolean;- symbol: string;-}--function parseBindings(clause: string, statementIsType: boolean): Binding[] {- return clause- .split(',')- .map((part) => part.trim())- .filter(Boolean)- .map((text) => {- const isType = statementIsType || /^type\s/.test(text);- const symbol = text- .replace(/^type\s+/, '')- .split(/\s+as\s+/)[0]!- .trim();- return { text: text.replace(/^type\s+/, ''), isType, symbol };- });-}--function render(- keyword: string,- bindings: Binding[],- specifier: string-): string {- const allType = bindings.every((b) => b.isType);- const list = bindings- .map((b) => (allType || !b.isType ? b.text : `type ${b.text}`))- .join(', ');- return `${keyword} ${allType ? 'type ' : ''}{ ${list} } from '${specifier}';`;-}--let changedFiles = 0;-const unmapped: string[] = [];--for (const file of process.argv.slice(2)) {- const source = readFileSync(file, 'utf8');- const next = source.replace(- IMPORT_STATEMENT,- (statement, keyword, typeKeyword, clause, from) => {- const byTarget = new Map<string, Binding[]>();- for (const binding of parseBindings(clause, Boolean(typeKeyword))) {- const row = rows.get(`${from}\t${binding.symbol}`);- if (!row || row.to === 'DELETE') {- unmapped.push(`${file}: ${from} → ${binding.symbol}`);- return statement;- }- const target = row.toByConsumer?.[workspaceOf(file)] ?? row.to;- const specifier = targetSpecifier(target, file);- byTarget.set(specifier, [...(byTarget.get(specifier) ?? []), binding]);- }- return [...byTarget.entries()]- .map(([specifier, bindings]) => render(keyword, bindings, specifier))- .join('\n');- }- );- if (next !== source) {- writeFileSync(file, next);- changedFiles++;- }-}--if (unmapped.length > 0) {- console.error(`UNMAPPED (left untouched):\n ${unmapped.join('\n ')}`);-}-console.log(`rewrote ${changedFiles} file(s)`);-process.exit(unmapped.length > 0 ? 1 : 0);diff --git a/tooling/codemods/p11-map.json b/tooling/codemods/p11-map.jsondeleted file mode 100644index c738e2c14..000000000--- a/tooling/codemods/p11-map.json+++ /dev/null@@ -1,2644 +0,0 @@-[- {- "from": "@openpanel/validation",- "symbol": "DEFAULT_ASPECT_RATIO",- "kind": "value",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "DEFAULT_ASPECT_RATIO",- "kind": "value",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "NOT_SET_VALUE",- "kind": "value",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "NOT_SET_VALUE",- "kind": "value",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "timeWindows",- "kind": "value",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "timeWindows",- "kind": "value",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "operators",- "kind": "value",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "operators",- "kind": "value",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "operatorsShort",- "kind": "value",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "operatorsShort",- "kind": "value",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "filterValueTypes",- "kind": "value",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "filterValueTypes",- "kind": "value",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "IFilterValueType",- "kind": "type",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/constants",- "symbol": "IFilterValueType",- "kind": "type",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "getOperatorsForType",- "kind": "value",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "getOperatorsForType",- "kind": "value",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "chartTypes",- "kind": "value",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "chartTypes",- "kind": "value",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "chartSegments",- "kind": "value",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "chartSegments",- "kind": "value",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "lineTypes",- "kind": "value",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "lineTypes",- "kind": "value",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "intervals",- "kind": "value",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "intervals",- "kind": "value",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "alphabetIds",- "kind": "value",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "alphabetIds",- "kind": "value",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "metrics",- "kind": "value",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "metrics",- "kind": "value",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "isMinuteIntervalEnabledByRange",- "kind": "value",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "isMinuteIntervalEnabledByRange",- "kind": "value",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "isHourIntervalEnabledByRange",- "kind": "value",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "isHourIntervalEnabledByRange",- "kind": "value",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "getDefaultIntervalByRange",- "kind": "value",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "getDefaultIntervalByRange",- "kind": "value",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "getDefaultIntervalByDates",- "kind": "value",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "getDefaultIntervalByDates",- "kind": "value",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "countries",- "kind": "value",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "countries",- "kind": "value",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "getCountry",- "kind": "value",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "getCountry",- "kind": "value",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "chartColors",- "kind": "value",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "chartColors",- "kind": "value",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zChartEventFilter",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "zChartEventFilter",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "getCohortIds",- "kind": "value",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "getCohortIds",- "kind": "value",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zChartEventSegment",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "zChartEventSegment",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zChartEvent",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "zChartEvent",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zChartFormula",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "zChartFormula",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zChartEventWithType",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "zChartEventWithType",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zChartEventItem",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "zChartEventItem",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zChartBreakdown",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "zChartBreakdown",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zChartSeries",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "zChartSeries",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zChartBreakdowns",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "zChartBreakdowns",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zChartType",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "zChartType",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zLineType",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "zLineType",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zTimeInterval",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "zTimeInterval",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zMetric",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "zMetric",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zRange",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "zRange",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zCriteria",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "zCriteria",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zFunnelOptions",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "zFunnelOptions",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zRetentionOptions",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "zRetentionOptions",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zSankeyOptions",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "zSankeyOptions",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zHistogramOptions",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "zHistogramOptions",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zReportOptions",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "zReportOptions",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "IReportOptions",- "kind": "type",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/constants",- "symbol": "IReportOptions",- "kind": "type",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "ISankeyOptions",- "kind": "type",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/constants",- "symbol": "ISankeyOptions",- "kind": "type",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "IHistogramOptions",- "kind": "type",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/constants",- "symbol": "IHistogramOptions",- "kind": "type",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zWidgetType",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "zWidgetType",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "IWidgetType",- "kind": "type",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/constants",- "symbol": "IWidgetType",- "kind": "type",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zRealtimeWidgetOptions",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "zRealtimeWidgetOptions",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zCounterWidgetOptions",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "zCounterWidgetOptions",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zWidgetOptions",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "zWidgetOptions",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "IWidgetOptions",- "kind": "type",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/constants",- "symbol": "IWidgetOptions",- "kind": "type",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "ICounterWidgetOptions",- "kind": "type",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/constants",- "symbol": "ICounterWidgetOptions",- "kind": "type",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "IRealtimeWidgetOptions",- "kind": "type",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/constants",- "symbol": "IRealtimeWidgetOptions",- "kind": "type",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zReportInput",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "zReportInput",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zReport",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "zReport",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zChartInput",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "zChartInput",- "kind": "schema",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zShareOverview",- "kind": "schema",- "to": "@openpanel/core/modules/share/share.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zShareDashboard",- "kind": "schema",- "to": "@openpanel/core/modules/share/share.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zShareReport",- "kind": "schema",- "to": "@openpanel/core/modules/share/share.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "ENCRYPTED_SECRET_PREFIX",- "kind": "value",- "to": "@openpanel/core/modules/integration/integration.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "looksEncrypted",- "kind": "value",- "to": "@openpanel/core/modules/integration/integration.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "IServiceAccountKey",- "kind": "type",- "to": "@openpanel/core/modules/integration/integration.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "IServiceAccountKeyResult",- "kind": "type",- "to": "@openpanel/core/modules/integration/integration.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "parseServiceAccountKey",- "kind": "value",- "to": "@openpanel/core/modules/integration/integration.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zSlackConfig",- "kind": "schema",- "to": "@openpanel/core/modules/integration/integration.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "ISlackConfig",- "kind": "type",- "to": "@openpanel/core/modules/integration/integration.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zWebhookConfig",- "kind": "schema",- "to": "@openpanel/core/modules/integration/integration.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "IWebhookConfig",- "kind": "type",- "to": "@openpanel/core/modules/integration/integration.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zDiscordConfig",- "kind": "schema",- "to": "@openpanel/core/modules/integration/integration.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "IDiscordConfig",- "kind": "type",- "to": "@openpanel/core/modules/integration/integration.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zAppConfig",- "kind": "schema",- "to": "@openpanel/core/modules/integration/integration.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "IAppConfig",- "kind": "type",- "to": "@openpanel/core/modules/integration/integration.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zEmailConfig",- "kind": "schema",- "to": "@openpanel/core/modules/integration/integration.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "IEmailConfig",- "kind": "type",- "to": "@openpanel/core/modules/integration/integration.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zS3ExportConfigIamRole",- "kind": "schema",- "to": "@openpanel/core/modules/integration/integration.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "IS3ExportConfigIamRole",- "kind": "type",- "to": "@openpanel/core/modules/integration/integration.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zS3ExportConfigAccessKey",- "kind": "schema",- "to": "@openpanel/core/modules/integration/integration.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "IS3ExportConfigAccessKey",- "kind": "type",- "to": "@openpanel/core/modules/integration/integration.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zS3ExportConfig",- "kind": "schema",- "to": "@openpanel/core/modules/integration/integration.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "IS3ExportConfig",- "kind": "type",- "to": "@openpanel/core/modules/integration/integration.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zGCSExportConfig",- "kind": "schema",- "to": "@openpanel/core/modules/integration/integration.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "IGCSExportConfig",- "kind": "type",- "to": "@openpanel/core/modules/integration/integration.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "IIntegrationConfig",- "kind": "type",- "to": "@openpanel/core/modules/integration/integration.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "IIntegrationType",- "kind": "type",- "to": "@openpanel/core/modules/integration/integration.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "IIntegrationKind",- "kind": "type",- "to": "@openpanel/core/modules/integration/integration.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "IIntegrationDescriptor",- "kind": "type",- "to": "@openpanel/core/modules/integration/integration.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "slackDescriptor",- "kind": "value",- "to": "@openpanel/core/modules/integration/integration.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "discordDescriptor",- "kind": "value",- "to": "@openpanel/core/modules/integration/integration.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "webhookDescriptor",- "kind": "value",- "to": "@openpanel/core/modules/integration/integration.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "appDescriptor",- "kind": "value",- "to": "@openpanel/core/modules/integration/integration.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "emailDescriptor",- "kind": "value",- "to": "@openpanel/core/modules/integration/integration.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "s3ExportDescriptor",- "kind": "value",- "to": "@openpanel/core/modules/integration/integration.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "gcsExportDescriptor",- "kind": "value",- "to": "@openpanel/core/modules/integration/integration.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "INTEGRATION_DESCRIPTORS",- "kind": "value",- "to": "@openpanel/core/modules/integration/integration.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "isKind",- "kind": "value",- "to": "@openpanel/core/modules/integration/integration.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zIntegrationConfig",- "kind": "schema",- "to": "@openpanel/core/modules/integration/integration.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zCreateSlackIntegration",- "kind": "schema",- "to": "@openpanel/core/modules/integration/integration.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zCreateWebhookIntegration",- "kind": "schema",- "to": "@openpanel/core/modules/integration/integration.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zCreateDiscordIntegration",- "kind": "schema",- "to": "@openpanel/core/modules/integration/integration.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zCreateS3ExportIntegration",- "kind": "schema",- "to": "@openpanel/core/modules/integration/integration.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zCreateGCSExportIntegration",- "kind": "schema",- "to": "@openpanel/core/modules/integration/integration.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "DISCORD_TEST_NOTIFICATION_MESSAGE",- "kind": "value",- "to": "@openpanel/core/modules/integration/integration.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zNotificationRuleEventConfig",- "kind": "schema",- "to": "@openpanel/core/modules/notification/notification.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "INotificationRuleEventConfig",- "kind": "type",- "to": "@openpanel/core/modules/notification/notification.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zNotificationRuleFunnelConfig",- "kind": "schema",- "to": "@openpanel/core/modules/notification/notification.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "INotificationRuleFunnelConfig",- "kind": "type",- "to": "@openpanel/core/modules/notification/notification.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zNotificationRuleConfig",- "kind": "schema",- "to": "@openpanel/core/modules/notification/notification.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "INotificationRuleConfig",- "kind": "type",- "to": "@openpanel/core/modules/notification/notification.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zCreateNotificationRule",- "kind": "schema",- "to": "@openpanel/core/modules/notification/notification.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "ICreateNotificationRule",- "kind": "type",- "to": "@openpanel/core/modules/notification/notification.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zOnboardingProject",- "kind": "schema",- "to": "@openpanel/core/modules/onboarding/onboarding.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "IOnboardingProject",- "kind": "type",- "to": "@openpanel/core/modules/onboarding/onboarding.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zProvider",- "kind": "schema",- "to": "@openpanel/core/modules/auth/auth.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zPassword",- "kind": "schema",- "to": "@openpanel/core/modules/auth/auth.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zSignInEmail",- "kind": "schema",- "to": "@openpanel/core/modules/auth/auth.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "ISignInEmail",- "kind": "type",- "to": "@openpanel/core/modules/auth/auth.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zSignUpEmail",- "kind": "schema",- "to": "@openpanel/core/modules/auth/auth.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "ISignUpEmail",- "kind": "type",- "to": "@openpanel/core/modules/auth/auth.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zResetPassword",- "kind": "schema",- "to": "@openpanel/core/modules/auth/auth.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "IResetPassword",- "kind": "type",- "to": "@openpanel/core/modules/auth/auth.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zRequestResetPassword",- "kind": "schema",- "to": "@openpanel/core/modules/auth/auth.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "IRequestResetPassword",- "kind": "type",- "to": "@openpanel/core/modules/auth/auth.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zTotpCode",- "kind": "schema",- "to": "@openpanel/core/modules/auth/auth.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "ITotpCode",- "kind": "type",- "to": "@openpanel/core/modules/auth/auth.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zTotpOrRecoveryCode",- "kind": "schema",- "to": "@openpanel/core/modules/auth/auth.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "ITotpOrRecoveryCode",- "kind": "type",- "to": "@openpanel/core/modules/auth/auth.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zSignInShare",- "kind": "schema",- "to": "@openpanel/core/modules/auth/auth.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "ISignInShare",- "kind": "type",- "to": "@openpanel/core/modules/auth/auth.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zGroupId",- "kind": "schema",- "to": "@openpanel/core/modules/group/group.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zCreateGroup",- "kind": "schema",- "to": "@openpanel/core/modules/group/group.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "ICreateGroup",- "kind": "type",- "to": "@openpanel/core/modules/group/group.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zUpdateGroup",- "kind": "schema",- "to": "@openpanel/core/modules/group/group.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "IUpdateGroup",- "kind": "type",- "to": "@openpanel/core/modules/group/group.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zCheckout",- "kind": "schema",- "to": "@openpanel/core/modules/subscription/subscription.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "ICheckout",- "kind": "type",- "to": "@openpanel/core/modules/subscription/subscription.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zCancellationReason",- "kind": "schema",- "to": "@openpanel/core/modules/subscription/subscription.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "ICancellationReason",- "kind": "type",- "to": "@openpanel/core/modules/subscription/subscription.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zCancelSubscription",- "kind": "schema",- "to": "@openpanel/core/modules/subscription/subscription.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "ICancelSubscription",- "kind": "type",- "to": "@openpanel/core/modules/subscription/subscription.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zPauseSubscription",- "kind": "schema",- "to": "@openpanel/core/modules/subscription/subscription.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "IPauseSubscription",- "kind": "type",- "to": "@openpanel/core/modules/subscription/subscription.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "pageContextPageSchema",- "kind": "schema",- "to": "@openpanel/core/modules/assistant/assistant.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "pageContextSchema",- "kind": "schema",- "to": "@openpanel/core/modules/assistant/assistant.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "PageContext",- "kind": "type",- "to": "@openpanel/core/modules/assistant/assistant.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "PageContextPage",- "kind": "type",- "to": "@openpanel/core/modules/assistant/assistant.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "chatContextSchema",- "kind": "schema",- "to": "@openpanel/core/modules/assistant/assistant.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "ChatAgentContext",- "kind": "type",- "to": "@openpanel/core/modules/assistant/assistant.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "ChatProvider",- "kind": "type",- "to": "@openpanel/core/modules/assistant/assistant.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "ChatModelEntry",- "kind": "type",- "to": "@openpanel/core/modules/assistant/assistant.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "CHAT_MODELS",- "kind": "value",- "to": "@openpanel/core/modules/assistant/assistant.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "ChatModelId",- "kind": "type",- "to": "@openpanel/core/modules/assistant/assistant.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "MODEL_STORAGE_KEY",- "kind": "value",- "to": "@openpanel/core/modules/assistant/assistant.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "PREFERRED_DEFAULT_MODEL_ID",- "kind": "value",- "to": "@openpanel/core/modules/assistant/assistant.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "isValidModelId",- "kind": "value",- "to": "@openpanel/core/modules/assistant/assistant.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "getModelLabel",- "kind": "value",- "to": "@openpanel/core/modules/assistant/assistant.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "getAvailableChatModels",- "kind": "value",- "to": "@openpanel/core/modules/assistant/assistant.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "applyFiltersSchema",- "kind": "schema",- "to": "@openpanel/core/modules/assistant/assistant.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "ApplyFiltersInput",- "kind": "type",- "to": "@openpanel/core/modules/assistant/assistant.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "setPropertyFiltersSchema",- "kind": "schema",- "to": "@openpanel/core/modules/assistant/assistant.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "SetPropertyFiltersInput",- "kind": "type",- "to": "@openpanel/core/modules/assistant/assistant.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "setEventNamesFilterSchema",- "kind": "schema",- "to": "@openpanel/core/modules/assistant/assistant.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "SetEventNamesFilterInput",- "kind": "type",- "to": "@openpanel/core/modules/assistant/assistant.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "ChatClientToolHandlers",- "kind": "type",- "to": "@openpanel/core/modules/assistant/assistant.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zRelativeTimeframe",- "kind": "schema",- "to": "@openpanel/core/modules/cohort/cohort.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zAbsoluteTimeframe",- "kind": "schema",- "to": "@openpanel/core/modules/cohort/cohort.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zTimeframe",- "kind": "schema",- "to": "@openpanel/core/modules/cohort/cohort.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "Timeframe",- "kind": "type",- "to": "@openpanel/core/modules/cohort/cohort.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zFrequency",- "kind": "schema",- "to": "@openpanel/core/modules/cohort/cohort.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "Frequency",- "kind": "type",- "to": "@openpanel/core/modules/cohort/cohort.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zEventCriteria",- "kind": "schema",- "to": "@openpanel/core/modules/cohort/cohort.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "EventCriteria",- "kind": "type",- "to": "@openpanel/core/modules/cohort/cohort.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zEventBasedCohortDefinition",- "kind": "schema",- "to": "@openpanel/core/modules/cohort/cohort.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "EventBasedCohortDefinition",- "kind": "type",- "to": "@openpanel/core/modules/cohort/cohort.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zPropertyBasedCohortDefinition",- "kind": "schema",- "to": "@openpanel/core/modules/cohort/cohort.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "PropertyBasedCohortDefinition",- "kind": "type",- "to": "@openpanel/core/modules/cohort/cohort.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zCohortDefinition",- "kind": "schema",- "to": "@openpanel/core/modules/cohort/cohort.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "CohortDefinition",- "kind": "type",- "to": "@openpanel/core/modules/cohort/cohort.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zCohortInput",- "kind": "schema",- "to": "@openpanel/core/modules/cohort/cohort.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "CohortInput",- "kind": "type",- "to": "@openpanel/core/modules/cohort/cohort.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zCohortUpdate",- "kind": "schema",- "to": "@openpanel/core/modules/cohort/cohort.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "CohortUpdate",- "kind": "type",- "to": "@openpanel/core/modules/cohort/cohort.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zCohortFilter",- "kind": "schema",- "to": "@openpanel/core/modules/cohort/cohort.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "CohortFilter",- "kind": "type",- "to": "@openpanel/core/modules/cohort/cohort.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "ImportProviderId",- "kind": "type",- "to": "@openpanel/core/modules/import/import.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "ImportProviderType",- "kind": "type",- "to": "@openpanel/core/modules/import/import.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "ImportProviderMeta",- "kind": "type",- "to": "@openpanel/core/modules/import/import.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "IMPORT_PROVIDERS",- "kind": "value",- "to": "@openpanel/core/modules/import/import.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zHttpUrl",- "kind": "schema",- "to": "@openpanel/core/modules/import/import.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zUmamiImportConfig",- "kind": "schema",- "to": "@openpanel/core/modules/import/import.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "IUmamiImportConfig",- "kind": "type",- "to": "@openpanel/core/modules/import/import.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zPlausibleImportConfig",- "kind": "schema",- "to": "@openpanel/core/modules/import/import.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "IPlausibleImportConfig",- "kind": "type",- "to": "@openpanel/core/modules/import/import.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zAmplitudeDataResidency",- "kind": "schema",- "to": "@openpanel/core/modules/import/import.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "IAmplitudeDataResidency",- "kind": "type",- "to": "@openpanel/core/modules/import/import.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zAmplitudeImportConfig",- "kind": "schema",- "to": "@openpanel/core/modules/import/import.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "IAmplitudeImportConfig",- "kind": "type",- "to": "@openpanel/core/modules/import/import.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zMixpanelDataResidency",- "kind": "schema",- "to": "@openpanel/core/modules/import/import.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "IMixpanelDataResidency",- "kind": "type",- "to": "@openpanel/core/modules/import/import.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zMixpanelImportConfig",- "kind": "schema",- "to": "@openpanel/core/modules/import/import.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "IMixpanelImportConfig",- "kind": "type",- "to": "@openpanel/core/modules/import/import.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "IImportConfig",- "kind": "type",- "to": "@openpanel/core/modules/import/import.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zCreateImport",- "kind": "schema",- "to": "@openpanel/core/modules/import/import.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "ICreateImport",- "kind": "type",- "to": "@openpanel/core/modules/import/import.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "RESERVED_EVENT_NAMES",- "kind": "value",- "to": "@openpanel/core/modules/ingest/ingest.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "isBlockedEventName",- "kind": "value",- "to": "@openpanel/core/modules/ingest/ingest.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "IProfileId",- "kind": "type",- "to": "@openpanel/core/modules/ingest/ingest.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "IGroupPayload",- "kind": "type",- "to": "@openpanel/core/modules/ingest/ingest.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "IAssignGroupPayload",- "kind": "type",- "to": "@openpanel/core/modules/ingest/ingest.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "ITrackPayload",- "kind": "type",- "to": "@openpanel/core/modules/ingest/ingest.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "IIdentifyPayload",- "kind": "type",- "to": "@openpanel/core/modules/ingest/ingest.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "IIncrementPayload",- "kind": "type",- "to": "@openpanel/core/modules/ingest/ingest.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "IDecrementPayload",- "kind": "type",- "to": "@openpanel/core/modules/ingest/ingest.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "IAliasPayload",- "kind": "type",- "to": "@openpanel/core/modules/ingest/ingest.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "IReplayPayload",- "kind": "type",- "to": "@openpanel/core/modules/ingest/ingest.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "ITrackHandlerPayload",- "kind": "type",- "to": "@openpanel/core/modules/ingest/ingest.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zProfileId",- "kind": "schema",- "to": "@openpanel/core/modules/ingest/ingest.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zGroupPayload",- "kind": "schema",- "to": "@openpanel/core/modules/ingest/ingest.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zAssignGroupPayload",- "kind": "schema",- "to": "@openpanel/core/modules/ingest/ingest.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zTrackPayload",- "kind": "schema",- "to": "@openpanel/core/modules/ingest/ingest.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zIdentifyPayload",- "kind": "schema",- "to": "@openpanel/core/modules/ingest/ingest.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zIncrementPayload",- "kind": "schema",- "to": "@openpanel/core/modules/ingest/ingest.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zDecrementPayload",- "kind": "schema",- "to": "@openpanel/core/modules/ingest/ingest.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zAliasPayload",- "kind": "schema",- "to": "@openpanel/core/modules/ingest/ingest.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zReplayPayload",- "kind": "schema",- "to": "@openpanel/core/modules/ingest/ingest.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zTrackHandlerPayload",- "kind": "schema",- "to": "@openpanel/core/modules/ingest/ingest.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "DeprecatedOpenpanelEventOptions",- "kind": "type",- "to": "@openpanel/core/modules/ingest/ingest.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "DeprecatedPostEventPayload",- "kind": "type",- "to": "@openpanel/core/modules/ingest/ingest.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "DeprecatedUpdateProfilePayload",- "kind": "type",- "to": "@openpanel/core/modules/ingest/ingest.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "DeprecatedIncrementProfilePayload",- "kind": "type",- "to": "@openpanel/core/modules/ingest/ingest.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "DeprecatedDecrementProfilePayload",- "kind": "type",- "to": "@openpanel/core/modules/ingest/ingest.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zProjectAccessGrant",- "kind": "schema",- "to": "@openpanel/core/modules/organization/organization.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "IProjectAccessGrant",- "kind": "type",- "to": "@openpanel/core/modules/organization/organization.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zInviteUser",- "kind": "schema",- "to": "@openpanel/core/modules/organization/organization.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zUpdateMemberAccess",- "kind": "schema",- "to": "@openpanel/core/modules/organization/organization.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zCreateReference",- "kind": "schema",- "to": "@openpanel/core/modules/reference/reference.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "zProjectFilterIp",- "kind": "schema",- "to": "@openpanel/core/modules/project/project.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "IProjectFilterIp",- "kind": "type",- "to": "@openpanel/core/modules/project/project.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zProjectFilterProfileId",- "kind": "schema",- "to": "@openpanel/core/modules/project/project.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "IProjectFilterProfileId",- "kind": "type",- "to": "@openpanel/core/modules/project/project.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zProjectFilterEvent",- "kind": "schema",- "to": "@openpanel/core/modules/project/project.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "IProjectFilterEvent",- "kind": "type",- "to": "@openpanel/core/modules/project/project.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zProjectFilters",- "kind": "schema",- "to": "@openpanel/core/modules/project/project.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "IProjectFilters",- "kind": "type",- "to": "@openpanel/core/modules/project/project.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zProject",- "kind": "schema",- "to": "@openpanel/core/modules/project/project.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "IProjectEdit",- "kind": "type",- "to": "@openpanel/core/modules/project/project.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zProjectUpdate",- "kind": "schema",- "to": "@openpanel/core/modules/project/project.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "IProjectUpdate",- "kind": "type",- "to": "@openpanel/core/modules/project/project.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "zEditOrganization",- "kind": "schema",- "to": "@openpanel/core/modules/organization/organization.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/validation",- "symbol": "InsightMetricKey",- "kind": "type",- "to": "@openpanel/core/modules/insight/insight.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "InsightMetricUnit",- "kind": "type",- "to": "@openpanel/core/modules/insight/insight.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "InsightMetricEntry",- "kind": "type",- "to": "@openpanel/core/modules/insight/insight.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "InsightDimension",- "kind": "type",- "to": "@openpanel/core/modules/insight/insight.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "InsightExtra",- "kind": "type",- "to": "@openpanel/core/modules/insight/insight.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "InsightPayload",- "kind": "type",- "to": "@openpanel/core/modules/insight/insight.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "UnionOmit",- "kind": "type",- "to": "apps/start/src/utils/union-omit.ts",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "IReport",- "kind": "type",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "IReportInput",- "kind": "type",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "IReportInputWithDates",- "kind": "type",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "IChartEvent",- "kind": "type",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "IChartFormula",- "kind": "type",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "IChartEventItem",- "kind": "type",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "IChartSeries",- "kind": "type",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "IChartEvents",- "kind": "type",- "to": "DELETE",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "IChartEventSegment",- "kind": "type",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "IChartEventFilter",- "kind": "type",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "IChartEventFilterValue",- "kind": "type",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "IChartEventFilterOperator",- "kind": "type",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "IChartFilterValueType",- "kind": "type",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "IChartBreakdown",- "kind": "type",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "IInterval",- "kind": "type",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "IChartType",- "kind": "type",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "IChartMetric",- "kind": "type",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "IChartLineType",- "kind": "type",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "IChartRange",- "kind": "type",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "IGetChartDataInput",- "kind": "type",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "ICriteria",- "kind": "type",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "PreviousValue",- "kind": "type",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "Metrics",- "kind": "type",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "IChartSerie",- "kind": "type",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "FinalChart",- "kind": "type",- "to": "@openpanel/core/modules/report/report.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/validation",- "symbol": "ISetCookie",- "kind": "type",- "to": "DELETE",- "keepTypeKeyword": true- },- {- "from": "@openpanel/constants",- "symbol": "emailCategories",- "kind": "value",- "to": "@openpanel/core/modules/email/email.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "EmailCategory",- "kind": "type",- "to": "@openpanel/core/modules/email/email.constants",- "keepTypeKeyword": true- },- {- "from": "@openpanel/constants",- "symbol": "RESERVED_EVENT_NAMES",- "kind": "value",- "to": "@openpanel/core/modules/ingest/ingest.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/constants",- "symbol": "ProjectTypeNames",- "kind": "value",- "to": "@openpanel/core/modules/project/project.constants",- "keepTypeKeyword": false- },- {- "from": "@openpanel/common",- "symbol": "DateTime",- "kind": "value",- "to": "packages/core/src/shared/date.ts",- "keepTypeKeyword": false- },- {- "from": "@openpanel/common",- "symbol": "getTime",- "kind": "value",- "to": "packages/core/src/shared/date.ts",- "keepTypeKeyword": false- },- {- "from": "@openpanel/common",- "symbol": "DEFAULT_IP_HEADER_ORDER",- "kind": "value",- "to": "packages/core/src/shared/get-client-ip.ts",- "keepTypeKeyword": false- },- {- "from": "@openpanel/common",- "symbol": "getClientIpFromHeaders",- "kind": "value",- "to": "packages/core/src/shared/get-client-ip.ts",- "keepTypeKeyword": false,- "toByConsumer": {- "packages/sdks/express": "packages/sdks/express/get-client-ip.ts"- }- },- {- "from": "@openpanel/common",- "symbol": "getPreviousMetric",- "kind": "value",- "to": "packages/core/src/shared/math.ts",- "keepTypeKeyword": false,- "toByConsumer": { "apps/start": "apps/start/src/utils/math.ts" }- },- {- "from": "@openpanel/common",- "symbol": "ISerieDataItem",- "kind": "type",- "to": "packages/core/src/shared/group-by-labels.ts",- "keepTypeKeyword": true- },- {- "from": "@openpanel/common",- "symbol": "groupByLabels",- "kind": "value",- "to": "packages/core/src/shared/group-by-labels.ts",- "keepTypeKeyword": false- },- {- "from": "@openpanel/common",- "symbol": "shortId",- "kind": "value",- "to": "packages/core/src/shared/id.ts",- "keepTypeKeyword": false,- "toByConsumer": { "apps/start": "apps/start/src/utils/math.ts" }- },- {- "from": "@openpanel/common",- "symbol": "generateId",- "kind": "value",- "to": "packages/core/src/shared/id.ts",- "keepTypeKeyword": false,- "toByConsumer": { "apps/api": "@openpanel/core" }- },- {- "from": "@openpanel/common",- "symbol": "round",- "kind": "value",- "to": "packages/core/src/shared/math.ts",- "keepTypeKeyword": false,- "toByConsumer": { "apps/start": "apps/start/src/utils/math.ts" }- },- {- "from": "@openpanel/common",- "symbol": "average",- "kind": "value",- "to": "packages/core/src/shared/math.ts",- "keepTypeKeyword": false,- "toByConsumer": { "apps/start": "apps/start/src/utils/math.ts" }- },- {- "from": "@openpanel/common",- "symbol": "sum",- "kind": "value",- "to": "packages/core/src/shared/math.ts",- "keepTypeKeyword": false,- "toByConsumer": { "apps/start": "apps/start/src/utils/math.ts" }- },- {- "from": "@openpanel/common",- "symbol": "min",- "kind": "value",- "to": "packages/core/src/shared/math.ts",- "keepTypeKeyword": false,- "toByConsumer": { "apps/start": "apps/start/src/utils/math.ts" }- },- {- "from": "@openpanel/common",- "symbol": "max",- "kind": "value",- "to": "packages/core/src/shared/math.ts",- "keepTypeKeyword": false,- "toByConsumer": { "apps/start": "apps/start/src/utils/math.ts" }- },- {- "from": "@openpanel/common",- "symbol": "isFloat",- "kind": "value",- "to": "DELETE",- "keepTypeKeyword": false- },- {- "from": "@openpanel/common",- "symbol": "ifNaN",- "kind": "value",- "to": "packages/core/src/shared/math.ts",- "keepTypeKeyword": false- },- {- "from": "@openpanel/common",- "symbol": "randomName",- "kind": "value",- "to": "DELETE",- "keepTypeKeyword": false- },- {- "from": "@openpanel/common",- "symbol": "randomSplitName",- "kind": "value",- "to": "DELETE",- "keepTypeKeyword": false- },- {- "from": "@openpanel/common",- "symbol": "toDots",- "kind": "value",- "to": "packages/core/src/shared/object.ts",- "keepTypeKeyword": false- },- {- "from": "@openpanel/common",- "symbol": "toObject",- "kind": "value",- "to": "packages/core/src/shared/object.ts",- "keepTypeKeyword": false- },- {- "from": "@openpanel/common",- "symbol": "strip",- "kind": "value",- "to": "packages/core/src/shared/object.ts",- "keepTypeKeyword": false- },- {- "from": "@openpanel/common",- "symbol": "deepMergeObjects",- "kind": "value",- "to": "packages/core/src/shared/object.ts",- "keepTypeKeyword": false- },- {- "from": "@openpanel/common",- "symbol": "slug",- "kind": "value",- "to": "packages/core/src/shared/slug.ts",- "keepTypeKeyword": false,- "toByConsumer": { "apps/start": "apps/start/src/utils/slug.ts" }- },- {- "from": "@openpanel/common",- "symbol": "stripTrailingSlash",- "kind": "value",- "to": "packages/core/src/shared/string.ts",- "keepTypeKeyword": false- },- {- "from": "@openpanel/common",- "symbol": "stripLeadingAndTrailingSlashes",- "kind": "value",- "to": "packages/core/src/shared/string.ts",- "keepTypeKeyword": false- },- {- "from": "@openpanel/common",- "symbol": "TIMEZONES",- "kind": "value",- "to": "DELETE",- "keepTypeKeyword": false- },- {- "from": "@openpanel/common",- "symbol": "TryCatchResult",- "kind": "type",- "to": "DELETE",- "keepTypeKeyword": true- },- {- "from": "@openpanel/common",- "symbol": "tryCatch",- "kind": "value",- "to": "DELETE",- "keepTypeKeyword": false- },- {- "from": "@openpanel/common",- "symbol": "parseSearchParams",- "kind": "value",- "to": "packages/core/src/shared/url.ts",- "keepTypeKeyword": false- },- {- "from": "@openpanel/common",- "symbol": "parsePath",- "kind": "value",- "to": "packages/core/src/shared/url.ts",- "keepTypeKeyword": false- },- {- "from": "@openpanel/common",- "symbol": "isSameDomain",- "kind": "value",- "to": "packages/core/src/shared/url.ts",- "keepTypeKeyword": false- },- {- "from": "@openpanel/json",- "symbol": "getSafeJson",- "kind": "value",- "to": "packages/core/src/shared/json.ts",- "keepTypeKeyword": false- },- {- "from": "@openpanel/json",- "symbol": "getSuperJson",- "kind": "value",- "to": "packages/core/src/shared/json.ts",- "keepTypeKeyword": false,- "toByConsumer": {- "apps/start": "apps/start/src/utils/super-json.ts",- "packages/redis": "packages/redis/json.ts"- }- },- {- "from": "@openpanel/json",- "symbol": "setSuperJson",- "kind": "value",- "to": "packages/core/src/shared/json.ts",- "keepTypeKeyword": false,- "toByConsumer": { "packages/redis": "packages/redis/json.ts" }- }-]diff --git a/tooling/gates/p12-grep-gates.sh b/tooling/gates/p12-grep-gates.shdeleted file mode 100755index b70143e7d..000000000--- a/tooling/gates/p12-grep-gates.sh+++ /dev/null@@ -1,195 +0,0 @@-#!/usr/bin/env bash-#-# P12 grep gates — ADR-013 decision 21: sqlstring = 0, clix = 0, no builder.-#-# --report per-file counts + a TOTAL line; always exits 0.-# --assert exits 1 while anything is left; exits 0 only when all three-# totals are 0 AND the three definer files are gone.-#-# Columns-# sqlstring every mention of the `sqlstring` identifier: `import`,-# `require`, `sqlstring.escape(...)` calls, and the-# `"sqlstring"` / `"@types/sqlstring"` package.json entries.-# clix `clix(`, `clix as`, `createCachedClix`, `clixCached`, and any-# import/require/export whose specifier ends in `query-builder`.-# sql-builder `createSqlBuilder`, and any import/require/export whose-# specifier ends in `sql-builder`.-#-# Scanned: packages/*/src/**, packages/*/index.ts, apps/*/src/**, and every-# workspace package.json — source and manifests only (.ts .tsx .mts .cts .js-# .jsx .mjs .cjs .json), which keeps generated binaries and the `*.proof.md`-# result-set records out of a count that is supposed to reach zero. Never-# node_modules/, dist/, .git/, or the three files that DEFINE what the gate is-# counting (they are the deletion target, not a violation) —-# packages/db/src/clickhouse/query-builder.ts, its .test.ts, and-# packages/db/src/sql-builder.ts.-#-# COMMENT-ONLY MENTIONS DO NOT COUNT. Each line is passed through a small lexer-# that removes `/* ... */` (across lines) and `// ...` to end of line before the-# patterns are applied, so `// clix is dead` or a JSDoc paragraph naming-# `createSqlBuilder` scores 0. Two deliberate limits, both stated so the number-# is not read as more than it is: `://` is never treated as a comment (URLs-# survive), and the lexer does not track string literals, so a `//` inside a-# string truncates the rest of that line. Neither can turn a comment into a hit;-# both could in principle hide one, which is why --assert also requires the-# three definer files to be absent rather than trusting the count alone. JSON-# has no comments, so package.json is never passed through the lexer — an-# exports-map entry like "./modules/*.constants" would otherwise open a block-# comment that swallows the dependency list.-#-# A count is matching LINES, not occurrences: one line with two-# `sqlstring.escape(...)` calls scores 1. The gate's target is 0, so the-# distinction only affects how big the number looks on the way down.-#-# Output is deterministic — no sha, no timestamp — so two runs diff cleanly.--set -uo pipefail--REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"-cd "$REPO_ROOT" || exit 1--readonly DEFINER_FILES=(- 'packages/db/src/clickhouse/query-builder.ts'- 'packages/db/src/clickhouse/query-builder.test.ts'- 'packages/db/src/sql-builder.ts'-)--readonly SCANNED_EXTENSIONS='\.(ts|tsx|mts|cts|js|jsx|mjs|cjs|json)$'--readonly COLUMN_WIDTH=12-readonly TABLE_RULE_WIDTH=76--usage() {- echo "usage: $(basename "$0") --report | --assert" >&2-}--# packages/*/src, packages/*/index.ts, apps/*/src, every workspace package.json.-collect_files() {- {- find packages apps -type d \( -name node_modules -o -name dist -o -name .git \) -prune \- -o -type f -path '*/src/*' -print || true- find packages -mindepth 2 -maxdepth 3 -type f -name index.ts -print || true- # docker/data holds the local Postgres/ClickHouse volumes and is unreadable.- find . -type d \( -name node_modules -o -name dist -o -name .git -o -path './docker/data' \) -prune \- -o -type f -name package.json -print || true- } 2>/dev/null |- sed 's|^\./||' |- grep -E "$SCANNED_EXTENSIONS" |- grep -v -e '/node_modules/' -e '^node_modules/' \- -e '/dist/' -e '^dist/' -e '/\.git/' -e '^\.git/' |- grep -v -x -F -e "${DEFINER_FILES[0]}" -e "${DEFINER_FILES[1]}" -e "${DEFINER_FILES[2]}" |- sort -u-}--# Emits "<file>\t<line-number>\t<column>\t<stripped line>" for every matching-# line, once per column it matches. One awk pass over every file.-scan() {- collect_files | tr '\n' '\0' | xargs -0 -r awk '- FNR == 1 { inblock = 0; is_json = (FILENAME ~ /\.json$/) }-- {- line = is_json ? $0 : strip($0)- if (line ~ /(^|[^A-Za-z0-9_$])sqlstring([^A-Za-z0-9_$]|$)/)- emit("sqlstring", line)- if (line ~ /(^|[^A-Za-z0-9_$])clix\(/ ||- line ~ /(^|[^A-Za-z0-9_$])clix[[:space:]]+as[[:space:]]/ ||- line ~ /createCachedClix/ ||- line ~ /clixCached/ ||- line ~ /(from|import|require)[[:space:]]*\(?[[:space:]]*["'"'"'][^"'"'"']*query-builder["'"'"']/)- emit("clix", line)- if (line ~ /createSqlBuilder/ ||- line ~ /(from|import|require)[[:space:]]*\(?[[:space:]]*["'"'"'][^"'"'"']*sql-builder["'"'"']/)- emit("sql-builder", line)- }-- function emit(column, text) {- sub(/^[[:space:]]+/, "", text)- sub(/[[:space:]]+$/, "", text)- printf "%s\t%d\t%s\t%s\n", FILENAME, FNR, column, text- }-- # Removes block and line comments. See the header for its two known limits.- function strip(line, out, i, n, one, two, prev) {- out = ""; i = 1; n = length(line)- while (i <= n) {- one = substr(line, i, 1); two = substr(line, i, 2)- if (inblock) {- if (two == "*/") { inblock = 0; i += 2 } else { i += 1 }- continue- }- if (two == "/*") { inblock = 1; i += 2; continue }- if (two == "//") {- prev = (i > 1) ? substr(line, i - 1, 1) : ""- if (prev != ":") break- out = out two; i += 2; continue- }- out = out one; i += 1- }- return out- }- '-}--print_report() {- scan | awk -v w="$COLUMN_WIDTH" -v rule="$TABLE_RULE_WIDTH" '- { count[$1 "\t" $3]++; files[$1] = 1; total[$3]++ }- END {- printf "%*s%*s%*s %s\n", w, "sqlstring", w, "clix", w, "sql-builder", "file"- for (i = 0; i < rule; i++) printf "-"- printf "\n"- n = 0- for (f in files) ordered[++n] = f- asort_paths(ordered, n)- for (i = 1; i <= n; i++) {- f = ordered[i]- printf "%*d%*d%*d %s\n", w, count[f "\tsqlstring"] + 0, \- w, count[f "\tclix"] + 0, w, count[f "\tsql-builder"] + 0, f- }- for (i = 0; i < rule; i++) printf "-"- printf "\n"- printf "%*d%*d%*d %s\n", w, total["sqlstring"] + 0, w, total["clix"] + 0, \- w, total["sql-builder"] + 0, "TOTAL"- }- function asort_paths(a, len, i, j, tmp) {- for (i = 2; i <= len; i++) {- tmp = a[i]; j = i - 1- while (j > 0 && a[j] > tmp) { a[j + 1] = a[j]; j-- }- a[j + 1] = tmp- }- }- '-}--assert_clean() {- local violations=0- local hits- hits="$(scan)"-- if [[ -n "$hits" ]]; then- echo "FAIL: builder / sqlstring references remain (ADR-013 decision 21 wants 0)."- echo "$hits" | sort | awk -F'\t' '{ printf " [%s] %s:%s: %s\n", $3, $1, $2, $4 }'- violations=1- fi-- for definer in "${DEFINER_FILES[@]}"; do- if [[ -e "$definer" ]]; then- echo "FAIL: definer file still exists: $definer"- violations=1- fi- done-- if [[ "$violations" -ne 0 ]]; then- echo- print_report- return 1- fi-- echo "OK: sqlstring = 0, clix = 0, sql-builder = 0; all three definer files are gone."- return 0-}--case "${1-}" in- --report) print_report ;;- --assert) assert_clean || exit 1 ;;- *) usage; exit 2 ;;-esacdiff --git a/tooling/gates/p13-drift.sh b/tooling/gates/p13-drift.shdeleted file mode 100755index 082968170..000000000--- a/tooling/gates/p13-drift.sh+++ /dev/null@@ -1,157 +0,0 @@-#!/usr/bin/env bash-#-# P13 drift gate (ADR-014) — does the INSTALLED tree still match what pnpm-# resolved?-#-# --report every drifted direct dependency, per workspace package, plus a-# TOTAL line. Always exits 0.-# --assert exits 1 if anything drifted, printing the offenders; exits 0-# when the installed tree matches the snapshot exactly.-#-# The reference is tooling/gates/p13-lock-snapshot.json, generated from-# pnpm-lock.yaml by tooling/scripts/write-p13-lock-snapshot.ts. It is a-# separate committed file because M13-002 deletes pnpm-lock.yaml: after that-# commit the snapshot is the only record of what pnpm had resolved, and it is-# what makes "the installer swap moved nothing" a checkable claim rather than-# an assertion. ADR-014's stop rule is exactly this question.-#-# The installed version of <dep> for workspace package <pkg> is read from-# <pkg>/node_modules/<dep>/package.json (the isolated layout pnpm and-# `bun install --linker=isolated`-# both produce)-# falling back to-# node_modules/<dep>/package.json (a hoisted layout, which-# ADR-014 amendment 1 allows only-# with a recorded reason)-# so the gate reads both layouts unchanged. A dependency present in neither is-# reported as `missing` and counts as drift — an undeclared/unlinked-# dependency is the phantom-dependency failure the isolated layout exists to-# surface.-#-# Workspace links are compared too, at the linked package's own version. A-# resolver silently preferring the REGISTRY copy of a workspace package over-# the local source is a documented hazard on this tree (apps/start depends on-# @openpanel/[email protected] from npm while packages/sdks/web is 1.4.1-local), and it-# shows up here as a version mismatch rather than as a mystery at runtime.-#-# Output is deterministic — no timestamps, no paths outside the repo — so two-# runs diff cleanly.--set -uo pipefail--REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"-cd "$REPO_ROOT" || exit 1--readonly SNAPSHOT='tooling/gates/p13-lock-snapshot.json'-readonly IMPORTER_COLUMN_WIDTH=26-readonly DEPENDENCY_COLUMN_WIDTH=34-readonly VERSION_COLUMN_WIDTH=16-readonly TABLE_RULE_WIDTH=92--usage() {- echo "usage: $(basename "$0") --report | --assert" >&2-}--# Emits "<importer>\t<dependency>\t<expected>\t<installed>" for every direct-# dependency whose installed version differs from the snapshot. `missing` in-# the installed column means the package is not present in either layout.-scan() {- bun -e '- import { readFileSync } from "node:fs";- import { join } from "node:path";-- const snapshot = JSON.parse(readFileSync(process.argv[1], "utf8"));-- const installedVersion = (importer, name) => {- const roots = importer === "." ? ["."] : [importer, "."];- for (const root of roots) {- try {- const manifest = JSON.parse(- readFileSync(join(root, "node_modules", name, "package.json"), "utf8")- );- if (manifest.version) return manifest.version;- } catch {}- }- return null;- };-- const rows = [];- for (const importer of Object.keys(snapshot).sort()) {- for (const name of Object.keys(snapshot[importer]).sort()) {- const expected = snapshot[importer][name];- const installed = installedVersion(importer, name);- if (installed !== expected) {- rows.push([importer, name, expected, installed ?? "missing"].join("\t"));- }- }- }- if (rows.length) process.stdout.write(rows.join("\n") + "\n");- ' "$SNAPSHOT"-}--# The number of (importer, dependency) pairs the snapshot covers — printed so-# a TOTAL of 0 is readable as "0 of N drifted" rather than "nothing ran".-snapshot_size() {- bun -e '- import { readFileSync } from "node:fs";- const snapshot = JSON.parse(readFileSync(process.argv[1], "utf8"));- let total = 0;- for (const deps of Object.values(snapshot)) total += Object.keys(deps).length;- console.log(`${Object.keys(snapshot).length} ${total}`);- ' "$SNAPSHOT"-}--table_rule() {- printf '%*s\n' "$TABLE_RULE_WIDTH" '' | tr ' ' '-'-}--print_report() {- local drift importers pairs drifted=0- drift="$(scan)"- read -r importers pairs <<<"$(snapshot_size)"- [[ -n "$drift" ]] && drifted=$(printf '%s\n' "$drift" | wc -l | tr -d ' ')-- printf '%-*s%-*s%-*s%s\n' \- "$IMPORTER_COLUMN_WIDTH" "workspace package" \- "$DEPENDENCY_COLUMN_WIDTH" "dependency" \- "$VERSION_COLUMN_WIDTH" "snapshot" "installed"- table_rule-- if [[ -n "$drift" ]]; then- printf '%s\n' "$drift" | awk -F'\t' \- -v i="$IMPORTER_COLUMN_WIDTH" -v d="$DEPENDENCY_COLUMN_WIDTH" -v v="$VERSION_COLUMN_WIDTH" \- '{ printf "%-*s%-*s%-*s%s\n", i, $1, d, $2, v, $3, $4 }'- fi-- table_rule- printf 'TOTAL: %s drifted of %s direct dependencies across %s workspace packages\n' \- "$drifted" "$pairs" "$importers"-}--assert_clean() {- local drift- drift="$(scan)"-- if [[ -n "$drift" ]]; then- echo "FAIL: the installed tree does not match $SNAPSHOT."- printf '%s\n' "$drift" |- awk -F'\t' '{ printf " %s: %s expected %s, installed %s\n", $1, $2, $3, $4 }'- echo- print_report- return 1- fi-- echo "OK: every direct dependency matches $SNAPSHOT."- return 0-}--[[ -f "$SNAPSHOT" ]] || {- echo "FAIL: $SNAPSHOT is missing — regenerate it with tooling/scripts/write-p13-lock-snapshot.ts" >&2- exit 1-}--case "${1-}" in- --report) print_report ;;- --assert) assert_clean || exit 1 ;;- *) usage; exit 2 ;;-esacdiff --git a/tooling/gates/p13-lock-snapshot.json b/tooling/gates/p13-lock-snapshot.jsondeleted file mode 100644index 14726e7e4..000000000--- a/tooling/gates/p13-lock-snapshot.json+++ /dev/null@@ -1,453 +0,0 @@-{- ".": {- "@biomejs/biome": "1.9.4",- "@hyperdx/node-opentelemetry": "0.10.3",- "depcheck": "1.4.7",- "dotenv-cli": "7.3.0",- "semver": "7.6.0",- "simple-git-hooks": "2.12.1",- "typescript": "5.9.3",- "ultracite": "7.2.0",- "vitest": "3.1.3"- },- "apps/api": {- "@faker-js/faker": "9.9.0",- "@openpanel/core": "0.0.1",- "@openpanel/db": "0.0.1",- "@openpanel/redis": "0.0.1",- "@openpanel/tsconfig": "0.1.0",- "@types/uuid": "10.0.0",- "bun-types": "1.4.0",- "elysia": "1.4.30",- "pino": "10.3.1",- "pino-pretty": "13.1.3",- "typescript": "5.9.3",- "uuid": "9.0.1",- "zod": "4.3.6"- },- "apps/public": {- "@nivo/funnel": "0.99.0",- "@number-flow/react": "0.5.10",- "@opennextjs/cloudflare": "1.17.1",- "@openpanel/nextjs": "1.2.0",- "@openpanel/payments": "0.0.1",- "@openpanel/sdk-info": "0.0.1",- "@openstatus/react": "0.0.3",- "@radix-ui/react-accordion": "1.2.12",- "@radix-ui/react-slider": "1.2.3",- "@radix-ui/react-slot": "1.2.3",- "@radix-ui/react-tooltip": "1.2.8",- "@tailwindcss/postcss": "4.1.17",- "@types/mdx": "2.0.13",- "@types/node": "24.10.1",- "@types/react": "19.2.7",- "@types/react-dom": "19.2.3",- "autoprefixer": "10.4.22",- "cheerio": "1.1.2",- "class-variance-authority": "0.7.1",- "clsx": "2.1.1",- "dotted-map": "2.2.3",- "framer-motion": "11.18.2",- "fumadocs-core": "16.7.11",- "fumadocs-mdx": "14.2.11",- "fumadocs-openapi": "10.6.7",- "fumadocs-ui": "16.7.11",- "geist": "1.5.1",- "lucide-react": "0.555.0",- "next": "16.0.7",- "next-themes": "0.4.6",- "postcss": "8.5.6",- "react": "19.2.3",- "react-dom": "19.2.3",- "react-markdown": "10.1.0",- "recharts": "2.15.4",- "rehype-external-links": "3.0.0",- "shiki": "4.0.2",- "tailwind-merge": "3.3.1",- "tailwindcss": "4.1.12",- "tailwindcss-animate": "1.0.7",- "typescript": "5.9.3",- "wrangler": "4.85.0",- "zod": "4.3.6"- },- "apps/start": {- "@better-agent/client": "0.1.0-beta.3",- "@biomejs/biome": "1.9.4",- "@cloudflare/vite-plugin": "1.33.2",- "@codemirror/commands": "6.10.1",- "@codemirror/lang-javascript": "6.2.4",- "@codemirror/lang-json": "6.0.2",- "@codemirror/state": "6.5.4",- "@codemirror/theme-one-dark": "6.1.3",- "@codemirror/view": "6.39.11",- "@dnd-kit/core": "6.3.1",- "@dnd-kit/sortable": "10.0.0",- "@dnd-kit/utilities": "3.2.2",- "@faker-js/faker": "9.9.0",- "@hookform/resolvers": "5.2.2",- "@nivo/sankey": "0.99.0",- "@number-flow/react": "0.5.10",- "@openpanel/core": "0.0.1",- "@openpanel/db": "0.0.1",- "@openpanel/payments": "0.0.1",- "@openpanel/sdk-info": "0.0.1",- "@openpanel/web": "1.0.5",- "@radix-ui/react-accordion": "1.2.12",- "@radix-ui/react-alert-dialog": "1.1.15",- "@radix-ui/react-aspect-ratio": "1.1.7",- "@radix-ui/react-avatar": "1.1.10",- "@radix-ui/react-checkbox": "1.3.3",- "@radix-ui/react-dialog": "1.1.15",- "@radix-ui/react-dropdown-menu": "2.1.16",- "@radix-ui/react-label": "2.1.7",- "@radix-ui/react-popover": "1.1.15",- "@radix-ui/react-portal": "1.1.9",- "@radix-ui/react-progress": "1.1.7",- "@radix-ui/react-radio-group": "1.3.8",- "@radix-ui/react-scroll-area": "1.2.10",- "@radix-ui/react-select": "2.2.6",- "@radix-ui/react-separator": "1.1.7",- "@radix-ui/react-slider": "1.2.3",- "@radix-ui/react-slot": "1.2.3",- "@radix-ui/react-switch": "1.2.6",- "@radix-ui/react-tabs": "1.1.13",- "@radix-ui/react-toast": "1.2.15",- "@radix-ui/react-toggle": "1.1.10",- "@radix-ui/react-toggle-group": "1.1.11",- "@radix-ui/react-tooltip": "1.2.8",- "@reduxjs/toolkit": "2.8.2",- "@sentry/tanstackstart-react": "9.46.0",- "@tailwindcss/container-queries": "0.1.1",- "@tailwindcss/typography": "0.5.15",- "@tailwindcss/vite": "4.1.12",- "@tanstack/devtools-event-client": "0.3.3",- "@tanstack/match-sorter-utils": "8.19.4",- "@tanstack/nitro-v2-vite-plugin": "1.133.19",- "@tanstack/react-devtools": "0.7.6",- "@tanstack/react-query": "5.90.2",- "@tanstack/react-query-devtools": "5.90.2",- "@tanstack/react-router": "1.132.47",- "@tanstack/react-router-devtools": "1.132.51",- "@tanstack/react-router-ssr-query": "1.132.47",- "@tanstack/react-start": "1.132.56",- "@tanstack/react-store": "0.8.0",- "@tanstack/react-table": "8.21.3",- "@tanstack/react-virtual": "3.13.12",- "@tanstack/router-plugin": "1.132.56",- "@tanstack/store": "0.8.0",- "@testing-library/dom": "10.4.1",- "@testing-library/react": "16.3.0",- "@trpc/client": "11.6.0",- "@trpc/react-query": "11.6.0",- "@trpc/server": "11.6.0",- "@trpc/tanstack-react-query": "11.6.0",- "@types/d3": "7.4.3",- "@types/d3-array": "3.2.2",- "@types/lodash.debounce": "4.0.9",- "@types/lodash.isequal": "4.5.8",- "@types/lodash.throttle": "4.1.9",- "@types/ramda": "0.31.0",- "@types/react": "19.2.7",- "@types/react-dom": "19.2.3",- "@types/react-grid-layout": "1.3.5",- "@types/react-simple-maps": "3.0.4",- "@types/react-syntax-highlighter": "15.5.11",- "@visx/curve": "4.0.1-alpha.0",- "@visx/event": "4.0.1-alpha.0",- "@visx/gradient": "4.0.1-alpha.0",- "@visx/grid": "4.0.1-alpha.0",- "@visx/pattern": "4.0.1-alpha.0",- "@visx/responsive": "4.0.1-alpha.0",- "@visx/scale": "4.0.1-alpha.0",- "@visx/shape": "4.0.1-alpha.0",- "@vitejs/plugin-react": "5.2.0",- "bind-event-listener": "3.0.0",- "class-variance-authority": "0.7.1",- "clsx": "2.1.1",- "cmdk": "0.2.1",- "codemirror": "6.0.2",- "d3": "7.8.5",- "d3-array": "3.2.4",- "date-fns": "3.3.1",- "debounce": "2.2.0",- "embla-carousel-autoplay": "8.6.0",- "embla-carousel-react": "8.0.0-rc22",- "flag-icons": "7.1.0",- "framer-motion": "11.18.2",- "hamburger-react": "2.5.0",- "input-otp": "1.2.4",- "javascript-time-ago": "2.5.9",- "jsdom": "26.1.0",- "katex": "0.16.21",- "lodash.debounce": "4.0.8",- "lodash.isequal": "4.5.0",- "lodash.throttle": "4.1.1",- "lottie-react": "2.4.0",- "lucide-react": "0.555.0",- "mathjs": "12.3.2",- "mitt": "3.0.1",- "motion": "12.40.0",- "nanoid": "5.1.6",- "nuqs": "2.5.2",- "prisma-error-enum": "0.1.3",- "pushmodal": "1.0.3",- "ramda": "0.29.1",- "random-animal-name": "0.1.1",- "rc-virtual-list": "3.14.5",- "react": "19.2.3",- "react-animate-height": "3.2.3",- "react-animated-numbers": "1.1.1",- "react-day-picker": "9.9.0",- "react-dom": "19.2.3",- "react-grid-layout": "1.5.2",- "react-hook-form": "7.50.1",- "react-in-viewport": "1.0.0-beta.8",- "react-markdown": "10.1.0",- "react-redux": "8.1.3",- "react-resizable": "3.0.5",- "react-responsive": "9.0.2",- "react-simple-maps": "3.0.0",- "react-svg-worldmap": "2.0.0-alpha.16",- "react-syntax-highlighter": "15.5.0",- "react-use-websocket": "4.7.0",- "react-virtualized-auto-sizer": "1.0.22",- "recharts": "2.15.4",- "rehype-katex": "7.0.1",- "remark-gfm": "4.0.1",- "remark-highlight": "0.1.1",- "remark-math": "6.0.0",- "remark-parse": "11.0.0",- "remark-rehype": "11.1.2",- "rrweb-player": "2.0.0-alpha.20",- "short-unique-id": "5.0.3",- "slugify": "1.6.6",- "sonner": "1.4.0",- "superjson": "2.2.2",- "tailwind-merge": "3.3.1",- "tailwindcss": "4.1.12",- "tailwindcss-animate": "1.0.7",- "tw-animate-css": "1.3.7",- "typescript": "5.9.3",- "use-stick-to-bottom": "1.1.3",- "usehooks-ts": "2.14.0",- "vite": "7.3.0",- "vite-tsconfig-paths": "5.1.4",- "vitest": "3.1.3",- "web-vitals": "4.2.4",- "wrangler": "4.85.0",- "zod": "4.3.6"- },- "apps/testbed": {- "@openpanel/web": "1.4.1-local",- "@types/react": "19.2.7",- "@types/react-dom": "19.2.3",- "@vitejs/plugin-react": "5.2.0",- "react": "19.2.3",- "react-dom": "19.2.3",- "react-router-dom": "7.13.1",- "typescript": "5.9.3",- "vite": "7.3.0"- },- "packages/core": {- "@aws-sdk/client-s3": "3.984.0",- "@aws-sdk/client-sts": "3.1117.0",- "@babel/parser": "7.29.7",- "@better-agent/core": "0.1.0-beta.3",- "@better-agent/providers": "0.1.0-beta.3",- "@bull-board/api": "9.6.0",- "@bull-board/elysia": "9.6.0",- "@clickhouse/client": "1.18.5",- "@elysiajs/cors": "1.4.2",- "@elysiajs/openapi": "1.4.15",- "@google-cloud/storage": "7.22.0",- "@hyperdx/node-opentelemetry": "0.10.3",- "@maxmind/geoip2-node": "6.1.0",- "@modelcontextprotocol/sdk": "1.27.1",- "@node-rs/argon2": "2.0.2",- "@openpanel/db": "0.0.1",- "@openpanel/email": "0.0.1",- "@openpanel/payments": "0.0.1",- "@openpanel/redis": "0.0.1",- "@openpanel/tsconfig": "0.1.0",- "@oslojs/crypto": "1.0.1",- "@oslojs/encoding": "1.1.0",- "@oslojs/otp": "1.1.0",- "@slack/bolt": "3.21.4",- "@slack/oauth": "3.0.1",- "@trpc/server": "11.6.0",- "@types/js-yaml": "4.0.9",- "@types/luxon": "3.7.1",- "@types/qrcode": "1.5.6",- "@types/ramda": "0.31.0",- "@types/unzipper": "0.10.11",- "@types/uuid": "10.0.0",- "arctic": "2.3.0",- "bullmq": "6.3.3",- "bun-types": "1.4.0",- "cheerio": "1.1.2",- "csv-parse": "6.1.0",- "date-fns": "3.3.1",- "elysia": "1.4.30",- "fast-deep-equal": "3.1.3",- "fast-json-stable-hash": "1.0.3",- "ipaddr.js": "2.5.0",- "js-yaml": "4.1.1",- "kafkajs": "2.2.4",- "lru-cache": "11.5.1",- "luxon": "3.7.2",- "mathjs": "12.3.2",- "nanoid": "5.1.6",- "pino": "10.3.1",- "pino-pretty": "13.1.3",- "prisma-error-enum": "0.1.3",- "prom-client": "15.1.3",- "qrcode": "1.5.4",- "ramda": "0.29.1",- "sharp": "0.33.5",- "short-unique-id": "5.0.3",- "slugify": "1.6.6",- "superjson": "2.2.2",- "tar": "7.4.3",- "typescript": "5.9.3",- "ua-parser-js": "2.0.6",- "undici": "8.10.0",- "unzipper": "0.12.5",- "url-metadata": "5.4.1",- "uuid": "9.0.1",- "zod": "4.3.6"- },- "packages/db": {- "@clickhouse/client": "1.18.5",- "@hyperdx/node-opentelemetry": "0.10.3",- "@openpanel/core": "0.0.1",- "@openpanel/payments": "0.0.1",- "@openpanel/redis": "0.0.1",- "@openpanel/tsconfig": "0.1.0",- "@prisma/client": "6.14.0",- "@types/node": "24.10.1",- "bun-types": "1.4.0",- "pino": "10.3.1",- "pino-pretty": "13.1.3",- "prisma": "6.14.0",- "prisma-json-types-generator": "3.1.1",- "typescript": "5.9.3",- "zod": "4.3.6"- },- "packages/email": {- "@openpanel/db": "0.0.1",- "@openpanel/tsconfig": "0.1.0",- "@react-email/components": "0.5.6",- "@react-email/render": "2.0.7",- "@types/node": "24.10.1",- "@types/nodemailer": "8.0.0",- "@types/react": "19.2.7",- "nodemailer": "8.0.5",- "react": "19.2.3",- "react-dom": "19.2.3",- "react-email": "3.0.4",- "resend": "4.0.1",- "typescript": "5.9.3",- "zod": "4.3.6"- },- "packages/payments": {- "@openpanel/db": "0.0.1",- "@openpanel/tsconfig": "0.1.0",- "@polar-sh/sdk": "0.49.0",- "@types/inquirer": "9.0.7",- "@types/inquirer-autocomplete-prompt": "3.0.3",- "@types/node": "24.10.1",- "@types/react": "19.2.7",- "date-fns": "3.3.1",- "inquirer": "9.3.6",- "inquirer-autocomplete-prompt": "3.0.1",- "typescript": "5.9.3"- },- "packages/redis": {- "@openpanel/core": "0.0.1",- "@openpanel/db": "0.0.1",- "@openpanel/tsconfig": "0.1.0",- "@types/node": "24.10.1",- "ioredis": "5.8.2",- "lru-cache": "11.5.1",- "superjson": "2.2.2",- "typescript": "5.9.3"- },- "packages/sdks/_info": {- "@openpanel/tsconfig": "0.1.0",- "@types/react": "19.2.7",- "react": "19.2.3",- "typescript": "5.9.3"- },- "packages/sdks/astro": {- "@openpanel/web": "1.4.1-local",- "astro": "6.4.2"- },- "packages/sdks/express": {- "@openpanel/sdk": "1.3.1-local",- "@openpanel/tsconfig": "0.1.0",- "@types/express": "5.0.3",- "@types/request-ip": "0.0.41",- "express": "4.19.2",- "tsup": "7.3.0",- "typescript": "5.9.3"- },- "packages/sdks/nextjs": {- "@openpanel/tsconfig": "0.1.0",- "@openpanel/web": "1.4.1-local",- "@types/react": "19.2.7",- "next": "15.0.3",- "react": "19.1.1",- "react-dom": "19.1.1",- "tsup": "7.3.0",- "typescript": "5.9.3"- },- "packages/sdks/nuxt": {- "@nuxt/kit": "3.20.2",- "@nuxt/module-builder": "1.0.2",- "@nuxt/types": "2.18.1",- "@openpanel/tsconfig": "0.1.0",- "@openpanel/web": "1.4.1-local",- "@types/node": "24.10.1",- "@vue/runtime-core": "3.5.25",- "h3": "1.15.4",- "nuxt": "4.2.2",- "typescript": "5.9.3",- "unbuild": "3.6.1"- },- "packages/sdks/react-native": {- "@openpanel/sdk": "1.3.1-local",- "@openpanel/tsconfig": "0.1.0",- "@types/node": "24.10.1",- "expo-application": "5.3.1",- "expo-constants": "15.4.5",- "react-native": "0.73.6",- "tsup": "7.3.0",- "typescript": "5.9.3"- },- "packages/sdks/sdk": {- "@openpanel/tsconfig": "0.1.0",- "@types/node": "24.10.1",- "tsup": "7.3.0",- "typescript": "5.9.3"- },- "packages/sdks/web": {- "@openpanel/sdk": "1.3.1-local",- "@openpanel/tsconfig": "0.1.0",- "@rrweb/types": "2.0.0-alpha.20",- "@types/node": "24.10.1",- "rrweb": "2.0.0-alpha.20",- "tsup": "7.3.0",- "typescript": "5.9.3"- },- "tooling/publish": {- "@openpanel/tsconfig": "0.1.0",- "@types/node": "24.10.1",- "@types/semver": "7.5.7",- "arg": "5.0.2",- "semver": "7.6.0",- "typescript": "5.9.3"- },- "tooling/typescript": {- "tsup": "7.3.0"- }-}diff --git a/tooling/gates/p13-ssr.sh b/tooling/gates/p13-ssr.shdeleted file mode 100755index 5620bacab..000000000--- a/tooling/gates/p13-ssr.sh+++ /dev/null@@ -1,316 +0,0 @@-#!/usr/bin/env bash-#-# P13 SSR gate (ADR-014) — does the dashboard still SERVER-RENDER after an-# install?-#-# ADR-014's gate is "apps/start builds AND SSR-renders /login plus one more-# route", and the reason is `.github/smoke/smoke.sh:6-11`: main-8e60 built-# green, pushed green, and every dashboard route returned 500 because a-# dependency re-resolve paired two incompatible copies of seroval. Nothing in-# CI ever started the image. A build that succeeds proves nothing here.-#-# This script is the baseline half of that gate: it is GREEN UNDER PNPM, and-# M13-002 runs it UNCHANGED after the swap. It is therefore deliberately-# installer-agnostic — the only installer-specific thing it does is pick which-# package-manager binary runs the workspace's own `build` script, detected the-# same way verification/full.sh does it (a committed bun.lock means bun-# installed the tree).-#-# What it does, in the Dockerfile's order (apps/start/Dockerfile):-# 1. builds apps/start with NITRO=1 SELF_HOSTED=1 through the package's own-# `build` script (which goes through `with-env`, i.e. the repo .env);-# 2. reproduces the runner stage's esm-env shim and its BROWSER/NODE/DEV-# assertion — the standalone Nitro output ships `esm-env-runtime` under-# the `esm-env` OVERRIDE, and without the shim @number-flow/react's-# `import "esm-env"` is a hard ERR_MODULE_NOT_FOUND at first render;-# 3. boots apps/api and then `.output/server/index.mjs`, each on a free-# port, with the `app_env` block from .github/smoke/docker-compose.yml-# pointed at this box's services and at the api it just started;-# 4. asserts exactly what smoke.sh's assert_ssr_route asserts — HTTP 200, an-# `<html` in the body, at least 1000 bytes — for /login and /onboarding;-# 5. greps the dashboard's log for the module/runtime resolution errors-# smoke.sh's assert_no_server_errors greps for, and fails on any hit.-#-# Why /onboarding is the second route: it is the create-an-account page and it-# renders WITHOUT a session by construction — its beforeLoad redirects only-# when a session EXISTS, and its loader is a no-op unless an `inviteId` search-# param is present, so an anonymous request needs no seeded row. It also sits-# under the `_public` layout rather than /login's `_login` one, so the two-# assertions cover two different server-rendered subtrees instead of the same-# layout twice.-#-# DATABASES: the isolated `openpanel_test` Postgres and ClickHouse, never the-# prod-copy `openpanel` ones. Both asserted routes issue exactly one tRPC call-# (auth.session) and read no analytics, so this costs a session lookup.-#-# The two servers it starts are always killed, on success, on failure and on-# an interrupt.-#-# bash tooling/gates/p13-ssr.sh--set -uo pipefail--REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"-cd "$REPO_ROOT" || exit 1--readonly RUN_DIR="${P13_SSR_RUN_DIR:-/tmp/openpanel-p13-ssr}"-readonly API_LOG="$RUN_DIR/api.log"-readonly DASHBOARD_LOG="$RUN_DIR/dashboard.log"-readonly BUILD_LOG="$RUN_DIR/build.log"-readonly BODY_FILE="$RUN_DIR/ssr-body.html"--readonly SERVER_OUTPUT='apps/start/.output/server'-readonly API_ENTRYPOINT='apps/api/src/main.ts'--# smoke.sh's own thresholds, reproduced rather than referenced.-readonly MIN_SSR_BODY_BYTES=1000-readonly SSR_REQUEST_TIMEOUT_SECONDS=30--readonly API_READY_TIMEOUT_SECONDS=120-readonly DASHBOARD_READY_TIMEOUT_SECONDS=90-readonly READY_POLL_INTERVAL_SECONDS=1-readonly STOP_WAIT_SECONDS=10--# The shapes a broken bundle or a missing dependency takes (smoke.sh:88-90).-readonly RESOLUTION_ERROR_PATTERN='is not a function|Cannot find (module|package)|ERR_MODULE_NOT_FOUND|ERR_PACKAGE_PATH_NOT_EXPORTED'--API_PID=''-DASHBOARD_PID=''-FAILED=0--# --- process lifecycle ---------------------------------------------------------# Both servers are started so that $! is the server process itself (`env`-# execs the runtime, and the dashboard's subshell uses an explicit `exec`), so-# the pid is the thing holding the port. Any child bash left in between is-# swept first, because a wrapper that outlives its parent keeps the port.-stop_server() {- local name="$1" pid="$2" child- [[ -n "$pid" ]] || return 0- kill -0 "$pid" 2>/dev/null || return 0-- for child in $(pgrep -P "$pid" 2>/dev/null); do- kill -TERM "$child" 2>/dev/null || true- done- kill -TERM "$pid" 2>/dev/null || true-- for _ in $(seq "$STOP_WAIT_SECONDS"); do- kill -0 "$pid" 2>/dev/null || break- sleep 1- done- kill -0 "$pid" 2>/dev/null && kill -KILL "$pid" 2>/dev/null- echo " stopped $name"-}--cleanup() {- stop_server dashboard "$DASHBOARD_PID"- stop_server api "$API_PID"-}-trap cleanup EXIT INT TERM--fail() {- echo "FAIL: $*" >&2- FAILED=1-}--die() {- fail "$@"- echo "--- api log (last 60) ---" >&2- tail -60 "$API_LOG" 2>/dev/null >&2- echo "--- dashboard log (last 60) ---" >&2- tail -60 "$DASHBOARD_LOG" 2>/dev/null >&2- exit 1-}--free_port() {- bun -e 'const s = Bun.listen({ hostname: "127.0.0.1", port: 0, socket: { data() {} } }); console.log(s.port); s.stop(true);'-}--wait_ready() {- local name="$1" url="$2" timeout="$3" waited=0 pid="$4"- until curl -fsS -o /dev/null --max-time 5 "$url" 2>/dev/null; do- if ! kill -0 "$pid" 2>/dev/null; then- die "$name exited before it became ready"- fi- sleep "$READY_POLL_INTERVAL_SECONDS"- waited=$((waited + READY_POLL_INTERVAL_SECONDS))- if ((waited >= timeout)); then- die "$name never became ready at $url within ${timeout}s"- fi- done- echo " $name ready at $url (${waited}s)"-}--# --- the assertions ------------------------------------------------------------# smoke.sh's assert_ssr_route, verbatim in intent: a 200, a real HTML document,-# and enough of it that a degraded-but-200 render still fails.-assert_ssr_route() {- local path="$1" status bytes- echo "asserting SSR route $path"-- status=$(curl -sS -o "$BODY_FILE" -w '%{http_code}' \- --max-time "$SSR_REQUEST_TIMEOUT_SECONDS" "$DASHBOARD_URL$path" || echo '000')- bytes=$(wc -c <"$BODY_FILE" 2>/dev/null | tr -d ' ')- bytes=${bytes:-0}-- if [[ "$status" != '200' ]]; then- { head -60 "$BODY_FILE" 2>/dev/null; echo; } >&2- fail "$path returned HTTP $status (expected 200)"- return 1- fi- if ! grep -q '<html' "$BODY_FILE"; then- { head -40 "$BODY_FILE"; echo; } >&2- fail "$path returned 200 but no <html> — SSR did not render"- return 1- fi- if ((bytes < MIN_SSR_BODY_BYTES)); then- { cat "$BODY_FILE"; echo; } >&2- fail "$path rendered only ${bytes} bytes — suspiciously empty for an SSR page"- return 1- fi-- echo " $path OK (HTTP 200, ${bytes} bytes)"-}--assert_no_server_errors() {- local name="$1" log="$2"- if grep -qE "$RESOLUTION_ERROR_PATTERN" "$log" 2>/dev/null; then- echo "--- matching lines ---" >&2- grep -nE "$RESOLUTION_ERROR_PATTERN" "$log" | head -20 >&2- fail "$name logged a module/runtime resolution error"- return 1- fi- echo " $name log clean"-}--# --- build ---------------------------------------------------------------------detect_package_manager() {- if [[ -f bun.lock ]]; then echo bun; else echo pnpm; fi-}--build_dashboard() {- local package_manager="$1"- echo "==> building apps/start (NITRO=1 SELF_HOSTED=1, via $package_manager)"- if ! (- cd apps/start &&- NITRO=1 SELF_HOSTED=1 "$package_manager" run build- ) >"$BUILD_LOG" 2>&1; then- tail -60 "$BUILD_LOG" >&2- die "apps/start build failed — see $BUILD_LOG"- fi- [[ -f "$SERVER_OUTPUT/index.mjs" ]] ||- die "the build produced no $SERVER_OUTPUT/index.mjs"- echo " built $SERVER_OUTPUT/index.mjs"-}--# apps/start/Dockerfile's runner stage, ported. The standalone Nitro output-# preserves the target package name for the esm-env -> esm-env-runtime-# override, so `esm-env` has to be made resolvable inside the SSR bundle.-apply_esm_env_shim() {- local modules="$SERVER_OUTPUT/node_modules"- [[ -d "$modules/esm-env-runtime" ]] ||- die "$modules/esm-env-runtime is missing — the esm-env override did not survive the build"-- if [[ ! -d "$modules/esm-env" ]]; then- mkdir -p "$modules/esm-env"- cp "$modules/esm-env-runtime/node.js" "$modules/esm-env/index.js"- printf '%s\n' \- '{' \- ' "name": "esm-env",' \- ' "version": "1.1.4",' \- ' "type": "module",' \- ' "exports": "./index.js"' \- '}' \- >"$modules/esm-env/package.json"- fi-- ( cd "$SERVER_OUTPUT" && node --input-type=module -e '- const assert = await import("node:assert/strict");- const env = await import("esm-env");- assert.equal(env.BROWSER, false, "esm-env BROWSER should be false in the Node SSR runtime");- assert.equal(env.NODE, true, "esm-env NODE should be true in the Node SSR runtime");- assert.equal(env.DEV, false, "esm-env DEV should be false in the production runtime");- ' ) || die 'the esm-env shim does not resolve to the Node runtime build'- echo " esm-env resolves (BROWSER=false, NODE=true, DEV=false)"-}--# --- environment ---------------------------------------------------------------# The `app_env` block from .github/smoke/docker-compose.yml, with the compose-# service names replaced by this box's already-running services and the two-# URLs pointed at the ports this script just picked. The DATABASE/CLICKHOUSE-# values are the ISOLATED test databases, never the prod-copy `openpanel` ones.-export_smoke_app_env() {- export NODE_ENV=production- export SELF_HOSTED=true- export BATCH_SIZE=5000- export BATCH_INTERVAL=10000- export ALLOW_REGISTRATION=true- export ALLOW_INVITATION=true- export REDIS_URL=redis://localhost:23379- export CLICKHOUSE_URL=http://localhost:23123/openpanel_test- export DATABASE_URL='postgresql://postgres:postgres@localhost:23432/openpanel_test?schema=public'- export DATABASE_URL_DIRECT="$DATABASE_URL"- export DASHBOARD_URL="http://localhost:$DASHBOARD_PORT"- export API_URL="http://localhost:$API_PORT"- export COOKIE_SECRET=p13-ssr-gate-cookie-secret-not-a-real-secret- export [email protected]- export RESEND_API_KEY=re_p13_ssr_gate_key- export KAFKA_BROKERS=127.0.0.1:19092- export KAFKA_EVENTS_TOPIC_PARTITIONS=24-}--# --- run -----------------------------------------------------------------------mkdir -p "$RUN_DIR"-: >"$API_LOG"-: >"$DASHBOARD_LOG"--PACKAGE_MANAGER="$(detect_package_manager)"-build_dashboard "$PACKAGE_MANAGER"-apply_esm_env_shim--# .env supplies the vars the smoke block does not name (LOG_LEVEL, secrets,-# feature flags). It is sourced FIRST so that the smoke block and the two-# freshly-picked ports both override it — .env pins API_PORT=3333, and a gate-# that quietly used the developer's own api port would pass against a stack it-# did not start.-set -a-# shellcheck disable=SC1091-[[ -f .env ]] && source .env-set +a--API_PORT="$(free_port)"-DASHBOARD_PORT="$(free_port)"-[[ -n "$API_PORT" && -n "$DASHBOARD_PORT" ]] || die 'could not pick free ports'-export_smoke_app_env--echo "==> starting apps/api (ROLE=api) on :$API_PORT"-env ROLE=api API_PORT="$API_PORT" bun run "$API_ENTRYPOINT" >"$API_LOG" 2>&1 &-API_PID=$!-wait_ready api "http://localhost:$API_PORT/healthz/ready" \- "$API_READY_TIMEOUT_SECONDS" "$API_PID"--echo "==> starting the dashboard SSR server on :$DASHBOARD_PORT"-# Nitro's node-server preset listens on PORT.-( cd apps/start && exec env PORT="$DASHBOARD_PORT" node .output/server/index.mjs ) \- >"$DASHBOARD_LOG" 2>&1 &-DASHBOARD_PID=$!-wait_ready dashboard "$DASHBOARD_URL/api/healthcheck" \- "$DASHBOARD_READY_TIMEOUT_SECONDS" "$DASHBOARD_PID"--echo "==> SSR rendering"-assert_ssr_route '/login'-assert_ssr_route '/onboarding'--echo "==> server logs"-assert_no_server_errors dashboard "$DASHBOARD_LOG"--if ((FAILED != 0)); then- echo "p13-ssr: FAILED (logs in $RUN_DIR)" >&2- exit 1-fi--echo "p13-ssr: PASSED (/login and /onboarding rendered; dashboard log clean)"diff --git a/tooling/scripts/pin-from-pnpm-lock.ts b/tooling/scripts/pin-from-pnpm-lock.tsdeleted file mode 100644index 634f97a15..000000000--- a/tooling/scripts/pin-from-pnpm-lock.ts+++ /dev/null@@ -1,496 +0,0 @@-#!/usr/bin/env bun-/**- * Pins every declared dependency range to the version `pnpm-lock.yaml`- * already resolved for it.- *- * Bun cannot read `pnpm-lock.yaml` — it re-resolves the whole graph from the- * declared ranges. A caret in a manifest is therefore an instruction to a- * resolver this repo no longer uses. Writing the resolved version into the- * manifest turns each range into a fact the next installer has to reproduce- * rather than a question it gets to answer.- *- * For every workspace importer in the lock this rewrites each `dependencies` /- * `devDependencies` / `optionalDependencies` range in that importer's- * package.json to the EXACT version the lock resolved FOR THAT IMPORTER, pins- * every `catalog:` entry in `pnpm-workspace.yaml` the same way, and carries the- * identical values into the lock's own `specifier:` fields so the tree stays- * installable with `--frozen-lockfile`.- *- * Left alone, deliberately: - `workspace:` / `catalog:` / `npm:` specifiers,- * which name a resolution strategy rather than a range; - `peerDependencies`,- * which are compatibility contracts (pnpm's `autoInstallPeers: true` lists them- * under an importer's `dependencies` in the lock even though the manifest- * declares them as peers); - the two stale `prisma: ^5.1.1` devDeps carved out- * by path (see ADR_017_RULE_2_FROZEN below); - every `version:` field in the- * lock. NOT ONE RESOLUTION MOVES.- *- * Why the lock's specifiers are rewritten here instead of by `pnpm install`: a- * non-frozen `pnpm install` re-resolves the whole graph and dedupes it — on- * this tree that pruned well over a hundred duplicate package versions in one- * pass, which is real resolution movement in a commit meant to prove nothing- * moved. Rewriting the specifier fields is the mechanical, resolution-- * preserving half of what that install would do; `pnpm install- * --frozen-lockfile` then verifies the result is consistent.- *- * Edits are surgical — only the value on a matched line is replaced — so key- * order, indentation and every comment survive byte-for-byte, and nothing is- * written when a file would be unchanged. That is what makes a second run a- * no-op.- *- * bun run tooling/scripts/pin-from-pnpm-lock.ts- * bun run tooling/scripts/pin-from-pnpm-lock.ts --check # exit 1 if stale- */--import { write, YAML } from 'bun';-import { readFileSync } from 'node:fs';-import { dirname, join, resolve } from 'node:path';-import { fileURLToPath } from 'node:url';--const REPO_ROOT = resolve(dirname(fileURLToPath(import.meta.url)), '../..');-const LOCKFILE = 'pnpm-lock.yaml';-const WORKSPACE_FILE = 'pnpm-workspace.yaml';--const DEPENDENCY_SECTIONS = [- 'dependencies',- 'devDependencies',- 'optionalDependencies',-] as const;--/** Specifiers that name a resolution strategy rather than a version range. */-const PROTOCOL_SPECIFIER = /^(workspace|catalog|npm|link|file|git|github):/;--/** A resolved version we are willing to write: plain semver, nothing exotic. */-const PLAIN_VERSION = /^\d+\.\d+\.\d+(?:[-+][0-9A-Za-z-.]+)?$/;--/**- * These two `prisma: ^5.1.1` devDeps are stale and slated for deletion, not- * for alignment to the version currently resolved. Pinning them to what the- * lock resolved would look like an intentional upgrade rather than the- * temporary state they're in, so the pinner leaves both the manifest entry- * and its `specifier:` in the lock alone.- */-const ADR_017_RULE_2_FROZEN: ReadonlySet<string> = new Set([- 'packages/redis\tdevDependencies\tprisma',- 'packages/sdks/_info\tdevDependencies\tprisma',-]);--function isFrozenByAdr017Rule2(- importerPath: string,- section: string,- name: string-): boolean {- return ADR_017_RULE_2_FROZEN.has(`${importerPath}\t${section}\t${name}`);-}--/** The default catalog's name in the lockfile's `catalogs:` map. */-const DEFAULT_CATALOG = 'default';--const EXIT_STALE = 1;--interface LockEntry {- specifier?: string;- version?: string;-}-type LockImporter = Partial<Record<string, Record<string, LockEntry>>>;-interface Lockfile {- importers?: Record<string, LockImporter>;- catalogs?: Record<string, Record<string, LockEntry>>;-}--/** Every pin the run decided on, keyed for the lockfile rewrite. */-interface Pin {- importer: string;- section: string;- name: string;- version: string;-}-interface CatalogPin {- catalog: string;- name: string;- version: string;-}--/**- * pnpm records the peer-resolution suffix inline:- * `1.4.30([email protected])`, `2.5.2(patch_hash=…)([email protected])`.- * The version is everything before the first `(`.- */-function exactVersion(lockVersion: string | undefined): string | null {- if (!lockVersion) {- return null;- }- const version = lockVersion.split('(')[0]?.trim() ?? '';- return PLAIN_VERSION.test(version) ? version : null;-}--function escapeForRegExp(value: string): string {- return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');-}--function readTextOrNull(relativePath: string): string | null {- try {- return readFileSync(join(REPO_ROOT, relativePath), 'utf8');- } catch {- return null;- }-}--/** The `{ … }` slice of `text` that follows `"<section>":`, braces balanced. */-function findSectionBody(- text: string,- section: string-): { start: number; end: number } | null {- const header = new RegExp(`"${section}"\\s*:\\s*\\{`).exec(text);- if (!header) {- return null;- }- const start = header.index + header[0].length;- let depth = 1;- for (let index = start; index < text.length; index++) {- const char = text[index];- if (char === '{') {- depth++;- } else if (char === '}') {- depth--;- if (depth === 0) {- return { start, end: index };- }- }- }- return null;-}--/** Replaces the quoted range of `"<name>": "<range>"` inside one section. */-function pinInSection(- text: string,- section: string,- name: string,- version: string-): string {- const body = findSectionBody(text, section);- if (!body) {- return text;- }- const entry = new RegExp(`("${escapeForRegExp(name)}"\\s*:\\s*")([^"]*)(")`);- const slice = text.slice(body.start, body.end);- return (- text.slice(0, body.start) +- slice.replace(entry, `$1${version}$3`) +- text.slice(body.end)- );-}--function manifestPathOf(importerPath: string): string {- return importerPath === '.' ? 'package.json' : `${importerPath}/package.json`;-}--function pinManifest(- importerPath: string,- importer: LockImporter-): { path: string; text: string; pins: number; targets: Pin[] } | null {- const relativePath = manifestPathOf(importerPath);- const original = readTextOrNull(relativePath);- if (original === null) {- console.warn(`skip ${relativePath}: no such file`);- return null;- }-- const manifest = JSON.parse(original) as Partial<- Record<string, Record<string, string>>- >;- let text = original;- let pins = 0;- const targets: Pin[] = [];-- for (const section of DEPENDENCY_SECTIONS) {- for (const [name, entry] of Object.entries(importer[section] ?? {})) {- const declared = manifest[section]?.[name];- if (declared === undefined || PROTOCOL_SPECIFIER.test(declared)) {- continue;- }- if (isFrozenByAdr017Rule2(importerPath, section, name)) {- continue;- }- const version = exactVersion(entry.version);- if (version === null) {- continue;- }- // Recorded whether or not the manifest needs the edit: the lockfile's- // own specifier has to reach the same value, and an already-pinned- // manifest beside an unpinned lock is exactly the half-done state- // `--frozen-lockfile` rejects.- targets.push({ importer: importerPath, section, name, version });- if (declared !== version) {- text = pinInSection(text, section, name, version);- pins++;- }- }- }-- return targets.length === 0- ? null- : { path: relativePath, text, pins, targets };-}--/**- * `pnpm-workspace.yaml` carries ~90 lines of comments recording the production- * failure behind each pin, so the catalog is edited line by line rather than- * re-serialized. Handles the default `catalog:` block and named `catalogs:`.- */-function pinWorkspaceCatalogs(- catalogs: Record<string, Record<string, LockEntry>>-): { path: string; text: string; pins: number; targets: CatalogPin[] } | null {- const original = readTextOrNull(WORKSPACE_FILE);- if (original === null) {- return null;- }-- const lines = original.split('\n');- const targets: CatalogPin[] = [];- let pins = 0;- let catalog: string | null = null;- let inNamedCatalogs = false;-- for (const [index, line] of lines.entries()) {- if (/^catalog:\s*$/.test(line)) {- catalog = DEFAULT_CATALOG;- inNamedCatalogs = false;- continue;- }- if (/^catalogs:\s*$/.test(line)) {- catalog = null;- inNamedCatalogs = true;- continue;- }- if (/^[^\s#]/.test(line)) {- catalog = null;- inNamedCatalogs = false;- continue;- }- if (inNamedCatalogs) {- const named = /^ {2}(?:'([^']+)'|"([^"]+)"|([^\s:]+)):\s*$/.exec(line);- if (named) {- catalog = named[1] ?? named[2] ?? named[3] ?? null;- }- continue;- }-- const entry =- /^(\s+(?:'[^']+'|"[^"]+"|[^\s:]+):[ \t]*)(\S.*?)([ \t]*)$/.exec(line);- if (catalog === null || !entry) {- continue;- }- const key = /^\s*(?:'([^']+)'|"([^"]+)"|([^\s:]+)):/.exec(line);- const name = key?.[1] ?? key?.[2] ?? key?.[3];- if (!name) {- continue;- }- const version = exactVersion(catalogs[catalog]?.[name]?.version);- if (version === null) {- continue;- }- targets.push({ catalog, name, version });- if (entry[2] !== version) {- lines[index] = `${entry[1]}${version}${entry[3]}`;- pins++;- }- }-- return targets.length === 0- ? null- : { path: WORKSPACE_FILE, text: lines.join('\n'), pins, targets };-}--/**- * Carries the manifest and catalog pins into the lock's `specifier:` fields.- * Every `version:` line is left exactly as it was — this is a relabelling, not- * a re-resolution. Walks the file as lines because the lock is ~1.4 MB of- * hand-diffable YAML and a round-trip through a serializer would rewrite all- * of it.- */-function pinLockSpecifiers(- pins: Pin[],- catalogPins: CatalogPin[]-): { path: string; text: string; pins: number } | null {- const original = readTextOrNull(LOCKFILE);- if (original === null) {- return null;- }-- const wanted = new Map<string, string>();- for (const pin of pins) {- wanted.set(`i\t${pin.importer}\t${pin.section}\t${pin.name}`, pin.version);- }- for (const pin of catalogPins) {- wanted.set(`c\t${pin.catalog}\t${pin.name}`, pin.version);- }-- const lines = original.split('\n');- let block: 'importers' | 'catalogs' | 'other' = 'other';- let scope: string | null = null;- let section: string | null = null;- let name: string | null = null;- const seen = { matched: 0, changed: 0 };-- const unquote = (raw: string) => raw.replace(/^['"]|['"]$/g, '');-- for (const [index, line] of lines.entries()) {- if (/^[^\s#]/.test(line)) {- block = line.startsWith('importers:')- ? 'importers'- : line.startsWith('catalogs:')- ? 'catalogs'- : 'other';- scope = null;- section = null;- name = null;- continue;- }- if (block === 'other' || line.trim() === '') {- continue;- }-- const indent = line.length - line.trimStart().length;- const key = /^\s*(.+?):\s*$/.exec(line);-- if (block === 'importers') {- if (indent === 2 && key) {- scope = unquote(key[1] as string);- section = null;- name = null;- continue;- }- if (indent === 4 && key) {- section = unquote(key[1] as string);- name = null;- continue;- }- if (indent === 6 && key) {- name = unquote(key[1] as string);- continue;- }- if (indent === 8 && scope && section && name) {- rewriteSpecifier(- lines,- index,- wanted.get(`i\t${scope}\t${section}\t${name}`),- seen- );- }- continue;- }-- if (indent === 2 && key) {- scope = unquote(key[1] as string);- name = null;- continue;- }- if (indent === 4 && key) {- name = unquote(key[1] as string);- continue;- }- if (indent === 6 && scope && name) {- rewriteSpecifier(lines, index, wanted.get(`c\t${scope}\t${name}`), seen);- }- }-- // Every pin must have been located, or the lock and the manifests would- // disagree and `--frozen-lockfile` would reject the tree.- if (seen.matched !== wanted.size) {- throw new Error(- `lockfile rewrite located ${seen.matched} of ${wanted.size} pins — refusing to write a half-updated ${LOCKFILE}`- );- }-- return seen.changed === 0- ? null- : { path: LOCKFILE, text: lines.join('\n'), pins: seen.changed };-}--/** Replaces `specifier: <range>` in place, counting what it saw and changed. */-function rewriteSpecifier(- lines: string[],- index: number,- version: string | undefined,- seen: { matched: number; changed: number }-): void {- if (version === undefined) {- return;- }- const specifier = /^(\s*specifier:\s*)(.*)$/.exec(lines[index] as string);- if (!specifier) {- return;- }- seen.matched++;- if (specifier[2] === version) {- return;- }- lines[index] = `${specifier[1]}${version}`;- seen.changed++;-}--async function main(): Promise<number> {- const checkOnly = process.argv.includes('--check');- const lockText = readTextOrNull(LOCKFILE);- if (lockText === null) {- console.error(`FAIL: ${LOCKFILE} not found under ${REPO_ROOT}`);- return EXIT_STALE;- }- const lock = YAML.parse(lockText) as Lockfile;-- const writes: Array<{ path: string; text: string; pins: number }> = [];- const targets: Pin[] = [];-- for (const [importerPath, importer] of Object.entries(- lock.importers ?? {}- ).sort(([a], [b]) => a.localeCompare(b))) {- const manifest = pinManifest(importerPath, importer);- if (!manifest) {- continue;- }- targets.push(...manifest.targets);- if (manifest.pins > 0) {- writes.push({- path: manifest.path,- text: manifest.text,- pins: manifest.pins,- });- }- }-- const workspace = pinWorkspaceCatalogs(lock.catalogs ?? {});- if (workspace && workspace.pins > 0) {- writes.push({- path: workspace.path,- text: workspace.text,- pins: workspace.pins,- });- }-- const lockWrite = pinLockSpecifiers(targets, workspace?.targets ?? []);- if (lockWrite) {- writes.push(lockWrite);- }-- if (writes.length === 0) {- console.log('OK: every direct dependency already names its exact version.');- return 0;- }-- for (const pending of writes) {- console.log(- `${checkOnly ? 'STALE' : 'pinned'} ${String(pending.pins).padStart(4)} ${pending.path}`- );- if (!checkOnly) {- await write(join(REPO_ROOT, pending.path), pending.text);- }- }-- const total = writes.reduce((sum, pending) => sum + pending.pins, 0);- console.log(- `${checkOnly ? 'STALE' : 'DONE'}: ${total} specifier(s) across ${writes.length} file(s).`- );- return checkOnly ? EXIT_STALE : 0;-}--process.exit(await main());diff --git a/tooling/scripts/write-p13-lock-snapshot.ts b/tooling/scripts/write-p13-lock-snapshot.tsdeleted file mode 100644index 0459d6d58..000000000--- a/tooling/scripts/write-p13-lock-snapshot.ts+++ /dev/null@@ -1,114 +0,0 @@-#!/usr/bin/env bun-/**- * Writes `tooling/gates/p13-lock-snapshot.json` from `pnpm-lock.yaml`.- *- * The snapshot is the reference `tooling/gates/p13-drift.sh` compares an- * installed tree against. It exists as a separate committed file because- * once the lock is gone there is nothing left to say what pnpm had- * resolved, and "did the installer swap move anything?" becomes- * unanswerable. This file outlives the lock.- *- * Shape: { "<importer path>": { "<dependency>": "<exact version>" } }- *- * Every direct dependency of every workspace importer — `dependencies`,- * `devDependencies` and `optionalDependencies` alike, registry copies and- * `workspace:` links alike. Links are recorded at the linked package's own- * `version`, which is what a correctly-linked `node_modules/<dep>/package.json`- * reports; that is deliberate, because a resolver silently preferring the- * REGISTRY copy of a workspace package over the local one is a real hazard here- * (`apps/start` depends on `@openpanel/[email protected]` from npm while the workspace- * source is 1.4.1-local) and the gate should see it.- *- * Bun run tooling/scripts/write-p13-lock-snapshot.ts- */--import { file, write, YAML } from 'bun';-import { readFileSync } from 'node:fs';-import { dirname, join, normalize, resolve } from 'node:path';-import { fileURLToPath } from 'node:url';--const REPO_ROOT = resolve(dirname(fileURLToPath(import.meta.url)), '../..');-const LOCKFILE = join(REPO_ROOT, 'pnpm-lock.yaml');-const SNAPSHOT = join(REPO_ROOT, 'tooling/gates/p13-lock-snapshot.json');--const DEPENDENCY_SECTIONS = [- 'dependencies',- 'devDependencies',- 'optionalDependencies',-] as const;--const LINK_PREFIX = 'link:';--interface LockEntry {- specifier?: string;- version?: string;-}-interface Lockfile {- importers?: Record<- string,- Partial<Record<string, Record<string, LockEntry>>>- >;-}--/** `1.4.30([email protected])` and `2.5.2(patch_hash=…)(…)` both mean `x.y.z`. */-function registryVersion(lockVersion: string): string {- return lockVersion.split('(')[0]?.trim() ?? '';-}--/** A `link:` target's version is the linked workspace package's own version. */-function linkedVersion(- importerPath: string,- lockVersion: string-): string | null {- const target = normalize(- join(- importerPath === '.' ? '.' : importerPath,- lockVersion.slice(LINK_PREFIX.length)- )- );- try {- const manifest = JSON.parse(- readFileSync(join(REPO_ROOT, target, 'package.json'), 'utf8')- ) as { version?: string };- return manifest.version ?? null;- } catch {- return null;- }-}--const lock = YAML.parse(await file(LOCKFILE).text()) as Lockfile;-const snapshot: Record<string, Record<string, string>> = {};--for (const importerPath of Object.keys(lock.importers ?? {}).sort()) {- const importer = lock.importers?.[importerPath] ?? {};- const direct: Record<string, string> = {};-- for (const section of DEPENDENCY_SECTIONS) {- for (const name of Object.keys(importer[section] ?? {}).sort()) {- const lockVersion = importer[section]?.[name]?.version;- if (!lockVersion) {- continue;- }- const version = lockVersion.startsWith(LINK_PREFIX)- ? linkedVersion(importerPath, lockVersion)- : registryVersion(lockVersion);- if (version) {- direct[name] = version;- }- }- }-- snapshot[importerPath] = Object.fromEntries(- Object.entries(direct).sort(([a], [b]) => (a < b ? -1 : 1))- );-}--await write(SNAPSHOT, `${JSON.stringify(snapshot, null, 2)}\n`);--const total = Object.values(snapshot).reduce(- (sum, deps) => sum + Object.keys(deps).length,- 0-);-console.log(- `wrote ${SNAPSHOT}: ${Object.keys(snapshot).length} importers, ${total} direct dependencies.`-);