opencode-rag-plugin 2.10.1 → 2.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ReadMe.md +40 -28
- package/dist/api.js +1 -0
- package/dist/cli/commands/clickhouse.d.ts +61 -0
- package/dist/cli/commands/clickhouse.js +335 -0
- package/dist/cli/commands/eval-tuner.js +1 -1
- package/dist/cli/commands/eval.js +1 -1
- package/dist/cli/commands/index-command.js +2 -1
- package/dist/cli/commands/index.d.ts +1 -0
- package/dist/cli/commands/index.js +1 -0
- package/dist/cli/commands/init-helpers.js +2 -2
- package/dist/cli/commands/init.js +49 -11
- package/dist/cli/commands/quirk.js +6 -6
- package/dist/cli/commands/status.js +70 -6
- package/dist/cli/commands/ui.js +2 -2
- package/dist/cli/index.js +2 -1
- package/dist/cli/types.d.ts +14 -0
- package/dist/core/bootstrap.d.ts +7 -0
- package/dist/core/bootstrap.js +40 -9
- package/dist/core/config.d.ts +128 -5
- package/dist/core/config.js +205 -8
- package/dist/core/interfaces.d.ts +54 -0
- package/dist/core/runtime-overrides.d.ts +9 -0
- package/dist/core/runtime-overrides.js +44 -0
- package/dist/core/state-sync.d.ts +91 -0
- package/dist/core/state-sync.js +273 -0
- package/dist/eval/fast-index.js +2 -2
- package/dist/eval/rerank-eval.js +2 -2
- package/dist/eval/run-branch-compare.js +2 -2
- package/dist/eval/run-token-test.js +2 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +2 -1
- package/dist/indexer/pipeline.d.ts +6 -0
- package/dist/indexer/pipeline.js +173 -56
- package/dist/indexer/progress.d.ts +75 -0
- package/dist/indexer/progress.js +114 -0
- package/dist/indexer/stats.d.ts +14 -0
- package/dist/plugin.d.ts +6 -3
- package/dist/plugin.js +39 -20
- package/dist/quirks/quirk-store.d.ts +10 -0
- package/dist/quirks/quirk-store.js +110 -15
- package/dist/quirks/types.d.ts +7 -0
- package/dist/tui.js +128 -111
- package/dist/vectorstore/clickhouse.d.ts +150 -0
- package/dist/vectorstore/clickhouse.js +931 -0
- package/dist/vectorstore/dimension.d.ts +19 -0
- package/dist/vectorstore/dimension.js +36 -0
- package/dist/vectorstore/factory.d.ts +9 -3
- package/dist/vectorstore/factory.js +11 -2
- package/dist/vectorstore/lancedb.d.ts +2 -2
- package/dist/watcher.d.ts +29 -0
- package/dist/watcher.js +76 -2
- package/dist/web/api.d.ts +3 -4
- package/dist/web/api.js +18 -3
- package/dist/web/server.js +28 -2
- package/dist/web/ui/assets/index-B-RH6fko.css +2 -0
- package/dist/web/ui/index.html +2 -2
- package/package.json +2 -1
- package/dist/web/ui/assets/index-CWcp0jNf.css +0 -2
- /package/dist/web/ui/assets/{index-DbXFrn53.js → index-ChGi2bSp.js} +0 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Backend-neutral dimension probe.
|
|
3
|
+
*
|
|
4
|
+
* The pipeline needs the dimension of an existing store before it can decide
|
|
5
|
+
* whether to rebuild. LanceDB keeps it in the table schema; ClickHouse keeps
|
|
6
|
+
* it in the project's `_meta` state row. Both probes are read-only.
|
|
7
|
+
*/
|
|
8
|
+
import type { RagConfig } from "../core/config.js";
|
|
9
|
+
/**
|
|
10
|
+
* Read the embedding dimension of the configured store.
|
|
11
|
+
*
|
|
12
|
+
* @param config - Resolved RAG configuration.
|
|
13
|
+
* @param storePath - Local store directory (LanceDB only).
|
|
14
|
+
* @param workspaceDir - Workspace root (used to derive the ClickHouse namespace).
|
|
15
|
+
* @returns The stored dimension, or undefined when the store does not exist yet.
|
|
16
|
+
*/
|
|
17
|
+
export declare function readConfiguredStoreDimension(config: RagConfig, storePath: string, workspaceDir: string): Promise<number | undefined>;
|
|
18
|
+
/** Read the dimension from a ClickHouse store without creating any schema. */
|
|
19
|
+
export declare function readClickHouseDimension(config: RagConfig, workspaceDir: string): Promise<number | undefined>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { readStoreDimension } from "./lancedb.js";
|
|
2
|
+
import { ClickHouseStore, resolveClickHouseOptions } from "./clickhouse.js";
|
|
3
|
+
/**
|
|
4
|
+
* Read the embedding dimension of the configured store.
|
|
5
|
+
*
|
|
6
|
+
* @param config - Resolved RAG configuration.
|
|
7
|
+
* @param storePath - Local store directory (LanceDB only).
|
|
8
|
+
* @param workspaceDir - Workspace root (used to derive the ClickHouse namespace).
|
|
9
|
+
* @returns The stored dimension, or undefined when the store does not exist yet.
|
|
10
|
+
*/
|
|
11
|
+
export async function readConfiguredStoreDimension(config, storePath, workspaceDir) {
|
|
12
|
+
const provider = config.vectorStore.provider ?? "lancedb";
|
|
13
|
+
if (provider === "lancedb") {
|
|
14
|
+
return readStoreDimension(storePath);
|
|
15
|
+
}
|
|
16
|
+
if (provider === "clickhouse") {
|
|
17
|
+
return readClickHouseDimension(config, workspaceDir);
|
|
18
|
+
}
|
|
19
|
+
return undefined;
|
|
20
|
+
}
|
|
21
|
+
/** Read the dimension from a ClickHouse store without creating any schema. */
|
|
22
|
+
export async function readClickHouseDimension(config, workspaceDir) {
|
|
23
|
+
const options = resolveClickHouseOptions(config, workspaceDir);
|
|
24
|
+
const store = new ClickHouseStore(options, config.embedding.vectorDimension ?? 384);
|
|
25
|
+
try {
|
|
26
|
+
return await store.peekDimension();
|
|
27
|
+
}
|
|
28
|
+
catch (err) {
|
|
29
|
+
console.warn(`[bootstrap] Could not read ClickHouse store dimension: ${err.message}`);
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
32
|
+
finally {
|
|
33
|
+
await store.close().catch(() => { });
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=dimension.js.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @fileoverview Factory function to create the configured VectorStore instance
|
|
2
|
+
* @fileoverview Factory function to create the configured VectorStore instance
|
|
3
|
+
* (LanceDB, in-memory, or ClickHouse).
|
|
3
4
|
*/
|
|
4
5
|
import type { VectorStore } from "../core/interfaces.js";
|
|
5
6
|
import type { RagConfig } from "../core/config.js";
|
|
@@ -9,11 +10,16 @@ import type { RagConfig } from "../core/config.js";
|
|
|
9
10
|
* Supported providers:
|
|
10
11
|
* - `"lancedb"`: Persistent LanceDB-backed store (default).
|
|
11
12
|
* - `"memory"`: Ephemeral in-memory store.
|
|
13
|
+
* - `"clickhouse"`: Central ClickHouse-backed store; `storePath` is only a
|
|
14
|
+
* local cache directory for workspace state.
|
|
12
15
|
*
|
|
13
16
|
* @param config - The RAG configuration containing the vector store provider setting.
|
|
14
|
-
* @param storePath - The filesystem path for persistent stores (LanceDB)
|
|
17
|
+
* @param storePath - The filesystem path for persistent local stores (LanceDB)
|
|
18
|
+
* and for the disposable state cache when ClickHouse is active.
|
|
15
19
|
* @param dimension - The embedding vector dimension.
|
|
20
|
+
* @param workspaceDir - Workspace root, used to derive the default ClickHouse
|
|
21
|
+
* namespace. Defaults to `process.cwd()`.
|
|
16
22
|
* @returns A VectorStore instance matching the configured provider.
|
|
17
23
|
* @throws If the provider name is unknown.
|
|
18
24
|
*/
|
|
19
|
-
export declare function createVectorStore(config: RagConfig, storePath: string, dimension: number): VectorStore;
|
|
25
|
+
export declare function createVectorStore(config: RagConfig, storePath: string, dimension: number, workspaceDir?: string): VectorStore;
|
|
@@ -1,19 +1,25 @@
|
|
|
1
1
|
import { LanceDbStore } from "./lancedb.js";
|
|
2
2
|
import { InMemoryVectorStore } from "./memory.js";
|
|
3
|
+
import { ClickHouseStore, resolveClickHouseOptions } from "./clickhouse.js";
|
|
3
4
|
/**
|
|
4
5
|
* Create a VectorStore instance based on the configured provider.
|
|
5
6
|
*
|
|
6
7
|
* Supported providers:
|
|
7
8
|
* - `"lancedb"`: Persistent LanceDB-backed store (default).
|
|
8
9
|
* - `"memory"`: Ephemeral in-memory store.
|
|
10
|
+
* - `"clickhouse"`: Central ClickHouse-backed store; `storePath` is only a
|
|
11
|
+
* local cache directory for workspace state.
|
|
9
12
|
*
|
|
10
13
|
* @param config - The RAG configuration containing the vector store provider setting.
|
|
11
|
-
* @param storePath - The filesystem path for persistent stores (LanceDB)
|
|
14
|
+
* @param storePath - The filesystem path for persistent local stores (LanceDB)
|
|
15
|
+
* and for the disposable state cache when ClickHouse is active.
|
|
12
16
|
* @param dimension - The embedding vector dimension.
|
|
17
|
+
* @param workspaceDir - Workspace root, used to derive the default ClickHouse
|
|
18
|
+
* namespace. Defaults to `process.cwd()`.
|
|
13
19
|
* @returns A VectorStore instance matching the configured provider.
|
|
14
20
|
* @throws If the provider name is unknown.
|
|
15
21
|
*/
|
|
16
|
-
export function createVectorStore(config, storePath, dimension) {
|
|
22
|
+
export function createVectorStore(config, storePath, dimension, workspaceDir = process.cwd()) {
|
|
17
23
|
const provider = config.vectorStore.provider ?? "lancedb";
|
|
18
24
|
if (provider === "lancedb") {
|
|
19
25
|
return new LanceDbStore(storePath, dimension);
|
|
@@ -21,6 +27,9 @@ export function createVectorStore(config, storePath, dimension) {
|
|
|
21
27
|
if (provider === "memory") {
|
|
22
28
|
return new InMemoryVectorStore();
|
|
23
29
|
}
|
|
30
|
+
if (provider === "clickhouse") {
|
|
31
|
+
return new ClickHouseStore(resolveClickHouseOptions(config, workspaceDir), dimension);
|
|
32
|
+
}
|
|
24
33
|
throw new Error(`Unknown vector store provider: ${provider}`);
|
|
25
34
|
}
|
|
26
35
|
//# sourceMappingURL=factory.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Chunk, ChunkSummary, SearchResult, MetadataFilter, ChunkBrowseStore } from "../core/interfaces.js";
|
|
2
2
|
/** Minimal warning sink for store diagnostics (defaults to console.warn). */
|
|
3
3
|
export type StoreWarn = (message: string) => void;
|
|
4
4
|
/**
|
|
@@ -112,7 +112,7 @@ export interface BulkChunkWrite {
|
|
|
112
112
|
* and chunk metadata queries. Supports automatic corruption recovery by falling
|
|
113
113
|
* back to prior table versions or dropping and rebuilding the table.
|
|
114
114
|
*/
|
|
115
|
-
export declare class LanceDbStore implements
|
|
115
|
+
export declare class LanceDbStore implements ChunkBrowseStore {
|
|
116
116
|
private dbPath;
|
|
117
117
|
private readonly vectorDimension;
|
|
118
118
|
private db;
|
package/dist/watcher.d.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import type { RagConfig } from "./core/config.js";
|
|
7
7
|
import type { DescriptionProvider, EmbeddingProvider, KeywordIndex, VectorStore } from "./core/interfaces.js";
|
|
8
|
+
import type { StateSync } from "./core/state-sync.js";
|
|
8
9
|
/** A background indexer that can be shut down gracefully. */
|
|
9
10
|
export interface BackgroundIndexer {
|
|
10
11
|
/** Stop the watcher, cancel pending index passes, and clean up status files. */
|
|
@@ -32,6 +33,8 @@ export interface CreateBackgroundIndexerOptions {
|
|
|
32
33
|
descriptionProvider?: DescriptionProvider;
|
|
33
34
|
/** Embedding vector dimension — enables atomic rebuilds instead of destructive clear. */
|
|
34
35
|
dimension?: number;
|
|
36
|
+
/** Durable-state synchronizer (ClickHouse); flushed at the end of each pass. */
|
|
37
|
+
stateSync?: StateSync;
|
|
35
38
|
}
|
|
36
39
|
/** The current operational status of the background indexer watcher. */
|
|
37
40
|
export type WatcherStatus = {
|
|
@@ -73,6 +76,32 @@ export declare function deriveWatcherHealth(status: WatcherStatus): {
|
|
|
73
76
|
export declare function tryAcquireWatcherLock(storePath: string): boolean;
|
|
74
77
|
/** Release the watcher lock — only if this process owns it. */
|
|
75
78
|
export declare function releaseWatcherLock(storePath: string): void;
|
|
79
|
+
/** A watcher observed on disk: its lock, its persisted status, and liveness. */
|
|
80
|
+
export interface ObservedWatcher {
|
|
81
|
+
/** Store directory holding `watcher.lock` / `watcher-status.json`. */
|
|
82
|
+
storePath: string;
|
|
83
|
+
/** Contents of `watcher.lock`, when present and parseable. */
|
|
84
|
+
lock?: {
|
|
85
|
+
pid: number;
|
|
86
|
+
startedAt: number;
|
|
87
|
+
};
|
|
88
|
+
/** PID in the lock is alive — the watcher process is currently running. */
|
|
89
|
+
alive: boolean;
|
|
90
|
+
/** Parsed `watcher-status.json`, when present and parseable. */
|
|
91
|
+
status?: WatcherStatus;
|
|
92
|
+
}
|
|
93
|
+
/** Read one store directory's watcher lock + status. Returns undefined when the dir holds neither. */
|
|
94
|
+
export declare function readWatcherState(storePath: string): ObservedWatcher | undefined;
|
|
95
|
+
/**
|
|
96
|
+
* Find every watcher observable for a workspace — including one running in a
|
|
97
|
+
* DIFFERENT store dir than the configured `vectorStore.path` (the classic
|
|
98
|
+
* symptom of a config change the already-running plugin never picked up).
|
|
99
|
+
*
|
|
100
|
+
* Scans the configured store dir, its sibling directories, and every child of
|
|
101
|
+
* `<workspaceRoot>/.opencode/` for `watcher.lock` / `watcher-status.json`.
|
|
102
|
+
* Results are sorted live-first, then by most recent activity.
|
|
103
|
+
*/
|
|
104
|
+
export declare function discoverWatcherStates(configuredStorePath: string, workspaceRoot: string): ObservedWatcher[];
|
|
76
105
|
/**
|
|
77
106
|
* Create a background file watcher that automatically re-indexes the
|
|
78
107
|
* workspace when files change. Uses chokidar for file system events and
|
package/dist/watcher.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import chokidar from "chokidar";
|
|
7
7
|
import path from "node:path";
|
|
8
|
-
import { writeFileSync, unlinkSync, existsSync, readFileSync, openSync, closeSync } from "node:fs";
|
|
8
|
+
import { writeFileSync, unlinkSync, existsSync, readFileSync, openSync, closeSync, readdirSync } from "node:fs";
|
|
9
9
|
import { appendDebugLog } from "./core/fileLogger.js";
|
|
10
10
|
import { isCorruptionError } from "./vectorstore/lancedb.js";
|
|
11
11
|
import { createWatchPassScheduler, createWatchIgnore, runIndexPass, } from "./indexer.js";
|
|
@@ -113,6 +113,79 @@ export function releaseWatcherLock(storePath) {
|
|
|
113
113
|
catch { /* ignore */ }
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
|
+
/** Read one store directory's watcher lock + status. Returns undefined when the dir holds neither. */
|
|
117
|
+
export function readWatcherState(storePath) {
|
|
118
|
+
let lock;
|
|
119
|
+
try {
|
|
120
|
+
lock = readWatcherLock(storePath);
|
|
121
|
+
}
|
|
122
|
+
catch {
|
|
123
|
+
/* unreadable dir */
|
|
124
|
+
}
|
|
125
|
+
let status;
|
|
126
|
+
try {
|
|
127
|
+
const statusPath = path.join(storePath, "watcher-status.json");
|
|
128
|
+
if (existsSync(statusPath)) {
|
|
129
|
+
status = JSON.parse(readFileSync(statusPath, "utf-8"));
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
catch {
|
|
133
|
+
/* corrupt status file — ignore */
|
|
134
|
+
}
|
|
135
|
+
if (!lock && !status)
|
|
136
|
+
return undefined;
|
|
137
|
+
return {
|
|
138
|
+
storePath,
|
|
139
|
+
lock,
|
|
140
|
+
alive: lock ? isPidAlive(lock.pid) : false,
|
|
141
|
+
status,
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Find every watcher observable for a workspace — including one running in a
|
|
146
|
+
* DIFFERENT store dir than the configured `vectorStore.path` (the classic
|
|
147
|
+
* symptom of a config change the already-running plugin never picked up).
|
|
148
|
+
*
|
|
149
|
+
* Scans the configured store dir, its sibling directories, and every child of
|
|
150
|
+
* `<workspaceRoot>/.opencode/` for `watcher.lock` / `watcher-status.json`.
|
|
151
|
+
* Results are sorted live-first, then by most recent activity.
|
|
152
|
+
*/
|
|
153
|
+
export function discoverWatcherStates(configuredStorePath, workspaceRoot) {
|
|
154
|
+
const candidates = new Set();
|
|
155
|
+
const add = (dir) => {
|
|
156
|
+
try {
|
|
157
|
+
if (existsSync(dir))
|
|
158
|
+
candidates.add(path.resolve(dir));
|
|
159
|
+
}
|
|
160
|
+
catch {
|
|
161
|
+
/* skip unreadable candidate */
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
add(configuredStorePath);
|
|
165
|
+
add(path.dirname(configuredStorePath));
|
|
166
|
+
const dotDir = path.join(workspaceRoot, ".opencode");
|
|
167
|
+
add(dotDir);
|
|
168
|
+
try {
|
|
169
|
+
if (existsSync(dotDir)) {
|
|
170
|
+
for (const entry of readdirSync(dotDir, { withFileTypes: true })) {
|
|
171
|
+
if (entry.isDirectory())
|
|
172
|
+
add(path.join(dotDir, entry.name));
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
catch {
|
|
177
|
+
/* unreadable .opencode dir */
|
|
178
|
+
}
|
|
179
|
+
const found = [];
|
|
180
|
+
for (const dir of candidates) {
|
|
181
|
+
const state = readWatcherState(dir);
|
|
182
|
+
if (state)
|
|
183
|
+
found.push(state);
|
|
184
|
+
}
|
|
185
|
+
const lastActivity = (w) => Math.max(w.status?.lastSuccessAt ?? 0, w.status?.lastRunAt ?? 0, w.status?.lastChangeAt ?? 0, w.lock?.startedAt ?? 0);
|
|
186
|
+
found.sort((a, b) => (b.alive ? 1 : 0) - (a.alive ? 1 : 0) || lastActivity(b) - lastActivity(a));
|
|
187
|
+
return found;
|
|
188
|
+
}
|
|
116
189
|
/**
|
|
117
190
|
* Create a background file watcher that automatically re-indexes the
|
|
118
191
|
* workspace when files change. Uses chokidar for file system events and
|
|
@@ -123,7 +196,7 @@ export function releaseWatcherLock(storePath) {
|
|
|
123
196
|
* @returns A BackgroundIndexer handle with a close() method for shutdown.
|
|
124
197
|
*/
|
|
125
198
|
export function createBackgroundIndexer(options) {
|
|
126
|
-
const { cwd, storePath, config, store, embedder, logFilePath, logLevel, keywordIndex, descriptionProvider, dimension } = options;
|
|
199
|
+
const { cwd, storePath, config, store, embedder, logFilePath, logLevel, keywordIndex, descriptionProvider, dimension, stateSync } = options;
|
|
127
200
|
const autoIndexCfg = config.openCode.autoIndex ?? { enabled: false, debounceMs: 5000, intervalMs: 300000 };
|
|
128
201
|
let active = false;
|
|
129
202
|
let recheckTimer;
|
|
@@ -159,6 +232,7 @@ export function createBackgroundIndexer(options) {
|
|
|
159
232
|
embedder,
|
|
160
233
|
keywordIndex,
|
|
161
234
|
descriptionProvider,
|
|
235
|
+
stateSync,
|
|
162
236
|
dimension,
|
|
163
237
|
abortSignal: ac.signal,
|
|
164
238
|
logger: {
|
package/dist/web/api.d.ts
CHANGED
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
* @fileoverview REST API handler for the OpenCodeRAG Web UI with search, file, chunk, eval, and token analysis endpoints.
|
|
3
3
|
*/
|
|
4
4
|
import type { IncomingMessage, ServerResponse } from "node:http";
|
|
5
|
-
import { LanceDbStore } from "../vectorstore/lancedb.js";
|
|
6
5
|
import { KeywordIndex } from "../retriever/keyword-index.js";
|
|
7
6
|
import { type RagConfig } from "../core/config.js";
|
|
8
|
-
import { type EmbeddingProvider } from "../core/interfaces.js";
|
|
7
|
+
import { type ChunkBrowseStore, type EmbeddingProvider } from "../core/interfaces.js";
|
|
9
8
|
/** Internal shape for a JSON API response: an HTTP status code and a serialisable body. */
|
|
10
9
|
interface ApiResponse {
|
|
11
10
|
status: number;
|
|
@@ -21,7 +20,7 @@ interface ApiResponse {
|
|
|
21
20
|
* - `/api/eval/sessions`, `/api/eval/sessions/:id`, `/api/eval/compare`
|
|
22
21
|
* - `/api/eval/sessions/:id/analysis`, `/api/eval/token-compare`, `/api/eval/project-savings`
|
|
23
22
|
*
|
|
24
|
-
* @param store - The
|
|
23
|
+
* @param store - The vector store instance (LanceDB or ClickHouse).
|
|
25
24
|
* @param keywordIndex - The keyword-index instance for text search.
|
|
26
25
|
* @param storePath - Filesystem path to the store directory (used by eval endpoints).
|
|
27
26
|
* @param cwd - Optional workspace root for resolving file paths.
|
|
@@ -31,7 +30,7 @@ interface ApiResponse {
|
|
|
31
30
|
* @param configPath - Path to the opencode-rag.json config file, used by PUT /api/config.
|
|
32
31
|
* @returns An async handler that returns `true` when a route matched or `false` otherwise.
|
|
33
32
|
*/
|
|
34
|
-
export declare function createApiHandler(store:
|
|
33
|
+
export declare function createApiHandler(store: ChunkBrowseStore, keywordIndex: KeywordIndex, storePath: string, cwd?: string, cfg?: RagConfig, getEmbedder?: () => Promise<EmbeddingProvider>, token?: string, configPath?: string): (req: IncomingMessage, res: ServerResponse) => Promise<boolean>;
|
|
35
34
|
/**
|
|
36
35
|
* Apply a validated config patch (`{ indexing: { includeDirs: [...] } }`)
|
|
37
36
|
* to the on-disk config file and refresh the in-memory config used by
|
package/dist/web/api.js
CHANGED
|
@@ -6,7 +6,7 @@ import { analyzeTokenUsage, compareTokenAnalyses, projectTokenSavings } from "..
|
|
|
6
6
|
import { listQuirks, lintQuirks, removeQuirk } from "../quirks/quirk-store.js";
|
|
7
7
|
import { retrieve } from "../retriever/retriever.js";
|
|
8
8
|
import { getRerankerFor } from "../reranker/factory.js";
|
|
9
|
-
import { updateConfigValue } from "../core/config.js";
|
|
9
|
+
import { updateConfigValue, ensureConfigFile } from "../core/config.js";
|
|
10
10
|
import { createExcludeMatcher } from "../core/exclude.js";
|
|
11
11
|
import { CODE_SEARCH_FILTER } from "../core/interfaces.js";
|
|
12
12
|
const FILE_MIME_TYPES = {
|
|
@@ -92,7 +92,7 @@ function sendJson(res, response, origin) {
|
|
|
92
92
|
* - `/api/eval/sessions`, `/api/eval/sessions/:id`, `/api/eval/compare`
|
|
93
93
|
* - `/api/eval/sessions/:id/analysis`, `/api/eval/token-compare`, `/api/eval/project-savings`
|
|
94
94
|
*
|
|
95
|
-
* @param store - The
|
|
95
|
+
* @param store - The vector store instance (LanceDB or ClickHouse).
|
|
96
96
|
* @param keywordIndex - The keyword-index instance for text search.
|
|
97
97
|
* @param storePath - Filesystem path to the store directory (used by eval endpoints).
|
|
98
98
|
* @param cwd - Optional workspace root for resolving file paths.
|
|
@@ -629,10 +629,17 @@ async function handleReindex(cwd, cfg, storePath, store, getEmbedder) {
|
|
|
629
629
|
}
|
|
630
630
|
reindexInFlight = true;
|
|
631
631
|
runIndexPass({ cwd, storePath, config: cfg, store, embedder })
|
|
632
|
-
.then(() => {
|
|
632
|
+
.then(async () => {
|
|
633
633
|
reindexInFlight = false;
|
|
634
634
|
statusCache = null; // invalidate the status cache after a pass
|
|
635
635
|
projectionCache = null;
|
|
636
|
+
try {
|
|
637
|
+
const { StateSync } = await import("../core/state-sync.js");
|
|
638
|
+
await new StateSync({ store, storePath, config: cfg }).flush(["manifest", "keyword-index", "quirks", "runtime-overrides", "doc-progress", ".desc-cache"]);
|
|
639
|
+
}
|
|
640
|
+
catch {
|
|
641
|
+
// durable-state upload is best effort; the pass itself succeeded
|
|
642
|
+
}
|
|
636
643
|
})
|
|
637
644
|
.catch((err) => {
|
|
638
645
|
reindexInFlight = false;
|
|
@@ -745,6 +752,14 @@ export function handleConfigUpdate(configPath, configRef, body) {
|
|
|
745
752
|
}
|
|
746
753
|
}
|
|
747
754
|
}
|
|
755
|
+
// Writers target the canonical `.opencode/opencode-rag.json`; a workspace
|
|
756
|
+
// without any config file yet gets one created on the first write.
|
|
757
|
+
try {
|
|
758
|
+
ensureConfigFile(configPath);
|
|
759
|
+
}
|
|
760
|
+
catch {
|
|
761
|
+
// fall through — updateConfigValue below reports the failure as 500
|
|
762
|
+
}
|
|
748
763
|
if (indexingPatch) {
|
|
749
764
|
for (const [key, value] of Object.entries(indexingPatch)) {
|
|
750
765
|
const ok = updateConfigValue(configPath, ["indexing", key], value);
|
package/dist/web/server.js
CHANGED
|
@@ -6,7 +6,9 @@ import { existsSync, readFileSync } from "node:fs";
|
|
|
6
6
|
import { dirname, extname, join, sep } from "node:path";
|
|
7
7
|
import { randomBytes } from "node:crypto";
|
|
8
8
|
import { fileURLToPath } from "node:url";
|
|
9
|
+
import { createVectorStore } from "../vectorstore/factory.js";
|
|
9
10
|
import { LanceDbStore } from "../vectorstore/lancedb.js";
|
|
11
|
+
import { StateSync } from "../core/state-sync.js";
|
|
10
12
|
import { KeywordIndex } from "../retriever/keyword-index.js";
|
|
11
13
|
import { createApiHandler } from "./api.js";
|
|
12
14
|
import { getStaticHtml, resolveDistAsset } from "./static.js";
|
|
@@ -25,6 +27,17 @@ const MIME_TYPES = {
|
|
|
25
27
|
".webp": "image/webp",
|
|
26
28
|
".bmp": "image/bmp",
|
|
27
29
|
};
|
|
30
|
+
/**
|
|
31
|
+
* Narrow a store to the browse-capable interface used by the Web UI.
|
|
32
|
+
* The in-memory store does not implement pagination/count queries.
|
|
33
|
+
*/
|
|
34
|
+
function asBrowseStore(store) {
|
|
35
|
+
const candidate = store;
|
|
36
|
+
if (typeof candidate.getChunksFiltered !== "function") {
|
|
37
|
+
throw new Error("The Web UI requires a vector store with browse support (lancedb or clickhouse).");
|
|
38
|
+
}
|
|
39
|
+
return store;
|
|
40
|
+
}
|
|
28
41
|
/** Serve an HTML string as the HTTP response with UTF-8 content type. */
|
|
29
42
|
function serveStatic(res, html) {
|
|
30
43
|
res.writeHead(200, {
|
|
@@ -70,8 +83,21 @@ function serveUiAsset(res, filePath) {
|
|
|
70
83
|
* @returns A {@link WebUiServer} handle for the running server.
|
|
71
84
|
*/
|
|
72
85
|
export async function startWebUi(storePath, port, cwd, vectorDimension = 384, cfg, configPath) {
|
|
73
|
-
const store =
|
|
86
|
+
const store = cfg
|
|
87
|
+
? createVectorStore(cfg, storePath, vectorDimension, cwd ?? process.cwd())
|
|
88
|
+
: new LanceDbStore(storePath, vectorDimension);
|
|
89
|
+
if (cfg) {
|
|
90
|
+
// ClickHouse: pull the durable manifest/keyword-index/quirks into the
|
|
91
|
+
// local cache before loading the keyword index below.
|
|
92
|
+
try {
|
|
93
|
+
await new StateSync({ store, storePath, config: cfg }).hydrate();
|
|
94
|
+
}
|
|
95
|
+
catch (err) {
|
|
96
|
+
console.warn(`[web] State hydration failed: ${err.message}`);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
74
99
|
const keywordIndex = await KeywordIndex.load(storePath);
|
|
100
|
+
const browseStore = asBrowseStore(store);
|
|
75
101
|
// Lazy embedder for /api/retrieve — initialized on first use
|
|
76
102
|
let embedderPromise = null;
|
|
77
103
|
async function getEmbedder() {
|
|
@@ -83,7 +109,7 @@ export async function startWebUi(storePath, port, cwd, vectorDimension = 384, cf
|
|
|
83
109
|
}
|
|
84
110
|
const html = getStaticHtml();
|
|
85
111
|
const token = randomBytes(24).toString("hex");
|
|
86
|
-
const apiHandler = createApiHandler(
|
|
112
|
+
const apiHandler = createApiHandler(browseStore, keywordIndex, storePath, cwd, cfg, getEmbedder, token, configPath);
|
|
87
113
|
const server = createServer(async (req, res) => {
|
|
88
114
|
try {
|
|
89
115
|
// Strip the query string before routing — the auth token arrives as
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
|
|
2
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-900:oklch(39.6% .141 25.723);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-400:oklch(75% .183 55.934);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-900:oklch(41.4% .112 45.904);--color-yellow-300:oklch(90.5% .182 98.111);--color-yellow-400:oklch(85.2% .199 91.936);--color-green-300:oklch(87.1% .15 154.449);--color-green-400:oklch(79.2% .209 151.711);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-green-900:oklch(39.3% .095 152.535);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-900:oklch(37.8% .077 168.94);--color-cyan-300:oklch(86.5% .127 207.078);--color-cyan-400:oklch(78.9% .154 211.53);--color-cyan-500:oklch(71.5% .143 215.221);--color-sky-400:oklch(74.6% .16 232.661);--color-sky-900:oklch(39.1% .09 240.876);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:oklch(70.7% .165 254.624);--color-indigo-400:oklch(67.3% .182 276.935);--color-purple-300:oklch(82.7% .119 306.383);--color-purple-400:oklch(71.4% .203 305.504);--color-pink-400:oklch(71.8% .202 349.761);--color-rose-400:oklch(71.2% .194 13.428);--color-rose-900:oklch(41% .159 10.272);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-slate-950:oklch(12.9% .042 264.695);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25 / 1.875);--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--text-5xl:3rem;--text-5xl--line-height:1;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wide:.025em;--radius-sm:.25rem;--radius-lg:.5rem;--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-brand-400:#22d3ee;--color-brand-500:#06b6d4;--color-brand-600:#0891b2}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components{.chunk-row.selected{background:var(--accent)}@supports (color:color-mix(in lab, red, red)){.chunk-row.selected{background:color-mix(in srgb, var(--accent) 10%, transparent)}}.chunk-row.selected{border-left:2px solid var(--accent)}.chunk-row:hover{background:var(--bg-tertiary)}.file-item.active{background:var(--accent)}@supports (color:color-mix(in lab, red, red)){.file-item.active{background:color-mix(in srgb, var(--accent) 20%, transparent)}}.file-item.active{color:var(--text-primary)}.file-item:hover{background:var(--bg-tertiary)}.sidebar-resizer{cursor:col-resize;touch-action:none;background:0 0;width:7px;transition:background-color .15s;position:absolute;top:0;bottom:0;right:-3px}.sidebar-resizer:hover,.sidebar-resizer.dragging,.sidebar-resizer:focus-visible{background:var(--accent)}@supports (color:color-mix(in lab, red, red)){.sidebar-resizer:hover,.sidebar-resizer.dragging,.sidebar-resizer:focus-visible{background:color-mix(in srgb, var(--accent) 55%, transparent)}}.kpi-card{background:var(--bg-card);border:1px solid var(--border);border-radius:.75rem}.nav-btn{color:var(--text-muted);border-radius:.25rem;padding:.375rem .75rem;font-size:.875rem;transition:color .15s,background-color .15s}.nav-btn:hover{background:var(--bg-tertiary);color:var(--text-primary)}.nav-btn.active{background:var(--accent)}@supports (color:color-mix(in lab, red, red)){.nav-btn.active{background:color-mix(in srgb, var(--accent) 20%, transparent)}}.nav-btn.active{color:var(--accent)}pre,code{background:var(--bg-code)}table thead{background:var(--bg-secondary)}table tbody tr{border-top:1px solid var(--border)}table tbody tr:hover{background:var(--bg-tertiary)}input,select,textarea{background:var(--bg-secondary);border-color:var(--border);color:var(--text-primary)}input::-moz-placeholder{color:var(--text-muted)}textarea::-moz-placeholder{color:var(--text-muted)}input::placeholder,textarea::placeholder{color:var(--text-muted)}.chart-svg rect{transition:opacity .15s}.chart-svg rect:hover{opacity:.85}.chart-svg circle:hover{r:5}}@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:0}.inset-y-0{inset-block:0}.top-1{top:var(--spacing)}.top-3{top:calc(var(--spacing) * 3)}.top-4{top:calc(var(--spacing) * 4)}.top-5{top:calc(var(--spacing) * 5)}.top-full{top:100%}.right-0{right:0}.right-3{right:calc(var(--spacing) * 3)}.right-4{right:calc(var(--spacing) * 4)}.right-6{right:calc(var(--spacing) * 6)}.bottom-3{bottom:calc(var(--spacing) * 3)}.bottom-6{bottom:calc(var(--spacing) * 6)}.left-0{left:0}.isolate{isolation:isolate}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\[9999\]{z-index:9999}.col-span-2{grid-column:span 2/span 2}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.mt-1{margin-top:var(--spacing)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mt-auto{margin-top:auto}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-1{margin-bottom:var(--spacing)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.ml-0\.5{margin-left:calc(var(--spacing) * .5)}.ml-1{margin-left:var(--spacing)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-4{margin-left:calc(var(--spacing) * 4)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-2{height:calc(var(--spacing) * 2)}.h-3{height:calc(var(--spacing) * 3)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-8{height:calc(var(--spacing) * 8)}.h-10{height:calc(var(--spacing) * 10)}.h-24{height:calc(var(--spacing) * 24)}.h-32{height:calc(var(--spacing) * 32)}.h-64{height:calc(var(--spacing) * 64)}.h-full{height:100%}.h-screen{height:100vh}.max-h-32{max-height:calc(var(--spacing) * 32)}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-64{max-height:calc(var(--spacing) * 64)}.max-h-80{max-height:calc(var(--spacing) * 80)}.max-h-\[60vh\]{max-height:60vh}.max-h-\[70vh\]{max-height:70vh}.max-h-\[calc\(100vh-220px\)\]{max-height:calc(100vh - 220px)}.min-h-0{min-height:0}.w-1\/2{width:50%}.w-2{width:calc(var(--spacing) * 2)}.w-3{width:calc(var(--spacing) * 3)}.w-5{width:calc(var(--spacing) * 5)}.w-8{width:calc(var(--spacing) * 8)}.w-10{width:calc(var(--spacing) * 10)}.w-12{width:calc(var(--spacing) * 12)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-24{width:calc(var(--spacing) * 24)}.w-28{width:calc(var(--spacing) * 28)}.w-32{width:calc(var(--spacing) * 32)}.w-48{width:calc(var(--spacing) * 48)}.w-56{width:calc(var(--spacing) * 56)}.w-64{width:calc(var(--spacing) * 64)}.w-96{width:calc(var(--spacing) * 96)}.w-full{width:100%}.max-w-\[85vw\]{max-width:85vw}.max-w-full{max-width:100%}.max-w-sm{max-width:var(--container-sm)}.min-w-0{min-width:0}.flex-1{flex:1}.flex-shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-grab{cursor:grab}.cursor-pointer{cursor:pointer}.resize{resize:both}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}.self-end{align-self:flex-end}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:2147483647px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-sm{border-radius:var(--radius-sm)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-amber-700{border-color:var(--color-amber-700)}.border-green-700{border-color:var(--color-green-700)}.border-red-700{border-color:var(--color-red-700)}.border-slate-600{border-color:var(--color-slate-600)}.border-slate-700{border-color:var(--color-slate-700)}.border-slate-700\/50{border-color:#31415880}@supports (color:color-mix(in lab, red, red)){.border-slate-700\/50{border-color:color-mix(in oklab, var(--color-slate-700) 50%, transparent)}}.border-slate-800{border-color:var(--color-slate-800)}.bg-\[var\(--bg-primary\)\]{background-color:var(--bg-primary)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\/20{background-color:#f99c0033}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\/20{background-color:color-mix(in oklab, var(--color-amber-500) 20%, transparent)}}.bg-amber-900\/20{background-color:#7b330633}@supports (color:color-mix(in lab, red, red)){.bg-amber-900\/20{background-color:color-mix(in oklab, var(--color-amber-900) 20%, transparent)}}.bg-amber-900\/30{background-color:#7b33064d}@supports (color:color-mix(in lab, red, red)){.bg-amber-900\/30{background-color:color-mix(in oklab, var(--color-amber-900) 30%, transparent)}}.bg-amber-900\/50{background-color:#7b330680}@supports (color:color-mix(in lab, red, red)){.bg-amber-900\/50{background-color:color-mix(in oklab, var(--color-amber-900) 50%, transparent)}}.bg-brand-500{background-color:var(--color-brand-500)}.bg-brand-600{background-color:var(--color-brand-600)}.bg-cyan-500{background-color:var(--color-cyan-500)}.bg-emerald-900\/20{background-color:#004e3b33}@supports (color:color-mix(in lab, red, red)){.bg-emerald-900\/20{background-color:color-mix(in oklab, var(--color-emerald-900) 20%, transparent)}}.bg-green-600{background-color:var(--color-green-600)}.bg-green-900\/30{background-color:#0d542b4d}@supports (color:color-mix(in lab, red, red)){.bg-green-900\/30{background-color:color-mix(in oklab, var(--color-green-900) 30%, transparent)}}.bg-green-900\/50{background-color:#0d542b80}@supports (color:color-mix(in lab, red, red)){.bg-green-900\/50{background-color:color-mix(in oklab, var(--color-green-900) 50%, transparent)}}.bg-red-600{background-color:var(--color-red-600)}.bg-red-900\/30{background-color:#82181a4d}@supports (color:color-mix(in lab, red, red)){.bg-red-900\/30{background-color:color-mix(in oklab, var(--color-red-900) 30%, transparent)}}.bg-rose-900\/20{background-color:#8b083633}@supports (color:color-mix(in lab, red, red)){.bg-rose-900\/20{background-color:color-mix(in oklab, var(--color-rose-900) 20%, transparent)}}.bg-sky-900\/20{background-color:#024a7033}@supports (color:color-mix(in lab, red, red)){.bg-sky-900\/20{background-color:color-mix(in oklab, var(--color-sky-900) 20%, transparent)}}.bg-slate-600{background-color:var(--color-slate-600)}.bg-slate-700{background-color:var(--color-slate-700)}.bg-slate-800{background-color:var(--color-slate-800)}.bg-slate-800\/80{background-color:#1d293dcc}@supports (color:color-mix(in lab, red, red)){.bg-slate-800\/80{background-color:color-mix(in oklab, var(--color-slate-800) 80%, transparent)}}.bg-slate-900{background-color:var(--color-slate-900)}.bg-slate-900\/50{background-color:#0f172b80}@supports (color:color-mix(in lab, red, red)){.bg-slate-900\/50{background-color:color-mix(in oklab, var(--color-slate-900) 50%, transparent)}}.bg-slate-950{background-color:var(--color-slate-950)}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-slate-700{--tw-gradient-from:var(--color-slate-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-slate-600{--tw-gradient-via:var(--color-slate-600);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-slate-700{--tw-gradient-to:var(--color-slate-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.bg-\[length\:200\%_100\%\]{background-size:200% 100%}.mask-repeat{-webkit-mask-repeat:repeat;mask-repeat:repeat}.object-contain{-o-object-fit:contain;object-fit:contain}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0{padding-block:0}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-10{padding-block:calc(var(--spacing) * 10)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-16{padding-block:calc(var(--spacing) * 16)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pl-2{padding-left:calc(var(--spacing) * 2)}.text-center{text-align:center}.text-justify{text-align:justify}.text-left{text-align:left}.text-right{text-align:right}.align-top{vertical-align:top}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-5xl{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.break-all{word-break:break-all}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}.text-\[var\(--text-primary\)\]{color:var(--text-primary)}.text-amber-300{color:var(--color-amber-300)}.text-amber-400{color:var(--color-amber-400)}.text-blue-300{color:var(--color-blue-300)}.text-blue-400{color:var(--color-blue-400)}.text-brand-400{color:var(--color-brand-400)}.text-cyan-300{color:var(--color-cyan-300)}.text-cyan-400{color:var(--color-cyan-400)}.text-emerald-400{color:var(--color-emerald-400)}.text-gray-300{color:var(--color-gray-300)}.text-gray-400{color:var(--color-gray-400)}.text-green-300{color:var(--color-green-300)}.text-green-400{color:var(--color-green-400)}.text-indigo-400{color:var(--color-indigo-400)}.text-orange-300{color:var(--color-orange-300)}.text-orange-400{color:var(--color-orange-400)}.text-pink-400{color:var(--color-pink-400)}.text-purple-300{color:var(--color-purple-300)}.text-purple-400{color:var(--color-purple-400)}.text-red-300{color:var(--color-red-300)}.text-red-400{color:var(--color-red-400)}.text-rose-400{color:var(--color-rose-400)}.text-sky-400{color:var(--color-sky-400)}.text-slate-200{color:var(--color-slate-200)}.text-slate-300{color:var(--color-slate-300)}.text-slate-400{color:var(--color-slate-400)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-white{color:var(--color-white)}.text-yellow-300{color:var(--color-yellow-300)}.text-yellow-400{color:var(--color-yellow-400)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.underline{text-decoration-line:underline}.placeholder-slate-500::placeholder{color:var(--color-slate-500)}.accent-brand-500{accent-color:var(--color-brand-500)}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.select-none{-webkit-user-select:none;user-select:none}.last\:border-0:last-child{border-style:var(--tw-border-style);border-width:0}@media (hover:hover){.hover\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\:border-brand-500\/50:hover{border-color:#06b6d480}@supports (color:color-mix(in lab, red, red)){.hover\:border-brand-500\/50:hover{border-color:color-mix(in oklab, var(--color-brand-500) 50%, transparent)}}.hover\:bg-brand-500:hover{background-color:var(--color-brand-500)}.hover\:bg-slate-600:hover{background-color:var(--color-slate-600)}.hover\:bg-slate-700:hover{background-color:var(--color-slate-700)}.hover\:bg-slate-800:hover{background-color:var(--color-slate-800)}.hover\:text-brand-400:hover{color:var(--color-brand-400)}.hover\:text-red-400:hover{color:var(--color-red-400)}.hover\:text-slate-200:hover{color:var(--color-slate-200)}.hover\:text-white:hover{color:var(--color-white)}}.focus\:border-brand-400:focus{border-color:var(--color-brand-400)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.active\:cursor-grabbing:active{cursor:grabbing}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}@media (width>=64rem){.lg\:relative{position:relative}.lg\:block{display:block}.lg\:hidden{display:none}.lg\:max-w-none{max-width:none}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}}}:root{--bg-primary:#fff;--bg-secondary:#f8fafc;--bg-tertiary:#f1f5f9;--bg-card:#fff;--bg-code:#f8fafc;--bg-surface:#fff;--text-primary:#0f172a;--text-secondary:#475569;--text-muted:#94a3b8;--border:#e2e8f0;--border-hover:#cbd5e1;--accent:#0891b2;--accent-hover:#0e7490;--chart-grid:#e2e8f0;--skeleton-from:#e2e8f0;--skeleton-to:#cbd5e1;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}.dark{--bg-primary:#0f172a;--bg-secondary:#1e293b;--bg-tertiary:#334155;--bg-card:#1e293b;--bg-code:#0f172a;--bg-surface:#0f172a;--text-primary:#e2e8f0;--text-secondary:#94a3b8;--text-muted:#64748b;--border:#334155;--border-hover:#475569;--accent:#06b6d4;--accent-hover:#22d3ee;--chart-grid:#334155;--skeleton-from:#334155;--skeleton-to:#475569;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}body{background:var(--bg-primary);color:var(--text-primary);transition:background-color .2s,color .2s}.scrollbar-thin::-webkit-scrollbar{width:6px}.scrollbar-thin::-webkit-scrollbar-track{background:0 0}.scrollbar-thin::-webkit-scrollbar-thumb{background:var(--text-muted);border-radius:3px}.scrollbar-thin::-webkit-scrollbar-thumb:hover{background:var(--text-secondary)}:focus-visible,button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{outline:2px solid var(--accent);outline-offset:2px}@keyframes slide-in{0%{opacity:0;transform:translate(100%)}to{opacity:1;transform:translate(0)}}.animate-slide-in{animation:.2s ease-out slide-in}@keyframes shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.animate-shimmer{background-size:200% 100%;background-image:linear-gradient(to right, var(--skeleton-from), var(--skeleton-to), var(--skeleton-from));animation:1.5s ease-in-out infinite shimmer}@media (width<=768px){.kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.sidebar-overlay{z-index:40;background:#00000080;position:fixed;inset:0}}@media (width<=640px){.kpi-grid{grid-template-columns:repeat(1,minmax(0,1fr))}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}
|
package/dist/web/ui/index.html
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>OpenCodeRAG</title>
|
|
7
7
|
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>🔎</text></svg>">
|
|
8
|
-
<script type="module" crossorigin src="/ui/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/ui/assets/index-ChGi2bSp.js"></script>
|
|
9
9
|
<link rel="modulepreload" crossorigin href="/ui/assets/vendor-Dg8wMT7C.js">
|
|
10
|
-
<link rel="stylesheet" crossorigin href="/ui/assets/index-
|
|
10
|
+
<link rel="stylesheet" crossorigin href="/ui/assets/index-B-RH6fko.css">
|
|
11
11
|
</head>
|
|
12
12
|
<body class="h-screen flex flex-col overflow-hidden bg-slate-900 text-slate-200">
|
|
13
13
|
<div id="app"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-rag-plugin",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.11.0",
|
|
4
4
|
"description": "OpenCode plugin for local-first RAG-based semantic code search",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/plugin-entry.js",
|
|
@@ -102,6 +102,7 @@
|
|
|
102
102
|
}
|
|
103
103
|
},
|
|
104
104
|
"dependencies": {
|
|
105
|
+
"@clickhouse/client": "^1.24.1",
|
|
105
106
|
"@e965/xlsx": "^0.20.3",
|
|
106
107
|
"@lancedb/lancedb": "^0.29.0",
|
|
107
108
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
|
|
2
|
-
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-900:oklch(39.6% .141 25.723);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-400:oklch(75% .183 55.934);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-900:oklch(41.4% .112 45.904);--color-yellow-300:oklch(90.5% .182 98.111);--color-yellow-400:oklch(85.2% .199 91.936);--color-green-300:oklch(87.1% .15 154.449);--color-green-400:oklch(79.2% .209 151.711);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-green-900:oklch(39.3% .095 152.535);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-900:oklch(37.8% .077 168.94);--color-cyan-300:oklch(86.5% .127 207.078);--color-cyan-400:oklch(78.9% .154 211.53);--color-cyan-500:oklch(71.5% .143 215.221);--color-sky-400:oklch(74.6% .16 232.661);--color-sky-900:oklch(39.1% .09 240.876);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:oklch(70.7% .165 254.624);--color-indigo-400:oklch(67.3% .182 276.935);--color-purple-300:oklch(82.7% .119 306.383);--color-purple-400:oklch(71.4% .203 305.504);--color-pink-400:oklch(71.8% .202 349.761);--color-rose-400:oklch(71.2% .194 13.428);--color-rose-900:oklch(41% .159 10.272);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-slate-950:oklch(12.9% .042 264.695);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25 / 1.875);--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--text-5xl:3rem;--text-5xl--line-height:1;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wide:.025em;--radius-sm:.25rem;--radius-lg:.5rem;--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-brand-400:#22d3ee;--color-brand-500:#06b6d4;--color-brand-600:#0891b2}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components{.chunk-row.selected{background:var(--accent)}@supports (color:color-mix(in lab, red, red)){.chunk-row.selected{background:color-mix(in srgb, var(--accent) 10%, transparent)}}.chunk-row.selected{border-left:2px solid var(--accent)}.chunk-row:hover{background:var(--bg-tertiary)}.file-item.active{background:var(--accent)}@supports (color:color-mix(in lab, red, red)){.file-item.active{background:color-mix(in srgb, var(--accent) 20%, transparent)}}.file-item.active{color:var(--text-primary)}.file-item:hover{background:var(--bg-tertiary)}.sidebar-resizer{cursor:col-resize;touch-action:none;background:0 0;width:7px;transition:background-color .15s;position:absolute;top:0;bottom:0;right:-3px}.sidebar-resizer:hover,.sidebar-resizer.dragging,.sidebar-resizer:focus-visible{background:var(--accent)}@supports (color:color-mix(in lab, red, red)){.sidebar-resizer:hover,.sidebar-resizer.dragging,.sidebar-resizer:focus-visible{background:color-mix(in srgb, var(--accent) 55%, transparent)}}.kpi-card{background:var(--bg-card);border:1px solid var(--border);border-radius:.75rem}.nav-btn{color:var(--text-muted);border-radius:.25rem;padding:.375rem .75rem;font-size:.875rem;transition:color .15s,background-color .15s}.nav-btn:hover{background:var(--bg-tertiary);color:var(--text-primary)}.nav-btn.active{background:var(--accent)}@supports (color:color-mix(in lab, red, red)){.nav-btn.active{background:color-mix(in srgb, var(--accent) 20%, transparent)}}.nav-btn.active{color:var(--accent)}pre,code{background:var(--bg-code)}table thead{background:var(--bg-secondary)}table tbody tr{border-top:1px solid var(--border)}table tbody tr:hover{background:var(--bg-tertiary)}input,select,textarea{background:var(--bg-secondary);border-color:var(--border);color:var(--text-primary)}input::-moz-placeholder{color:var(--text-muted)}textarea::-moz-placeholder{color:var(--text-muted)}input::placeholder,textarea::placeholder{color:var(--text-muted)}.chart-svg rect{transition:opacity .15s}.chart-svg rect:hover{opacity:.85}.chart-svg circle:hover{r:5}}@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:0}.inset-y-0{inset-block:0}.top-1{top:var(--spacing)}.top-3{top:calc(var(--spacing) * 3)}.top-4{top:calc(var(--spacing) * 4)}.top-5{top:calc(var(--spacing) * 5)}.top-full{top:100%}.right-0{right:0}.right-3{right:calc(var(--spacing) * 3)}.right-4{right:calc(var(--spacing) * 4)}.right-6{right:calc(var(--spacing) * 6)}.bottom-3{bottom:calc(var(--spacing) * 3)}.bottom-6{bottom:calc(var(--spacing) * 6)}.left-0{left:0}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\[9999\]{z-index:9999}.col-span-2{grid-column:span 2/span 2}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.mt-1{margin-top:var(--spacing)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mt-auto{margin-top:auto}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-1{margin-bottom:var(--spacing)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.ml-0\.5{margin-left:calc(var(--spacing) * .5)}.ml-1{margin-left:var(--spacing)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-4{margin-left:calc(var(--spacing) * 4)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-2{height:calc(var(--spacing) * 2)}.h-3{height:calc(var(--spacing) * 3)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-8{height:calc(var(--spacing) * 8)}.h-10{height:calc(var(--spacing) * 10)}.h-24{height:calc(var(--spacing) * 24)}.h-32{height:calc(var(--spacing) * 32)}.h-64{height:calc(var(--spacing) * 64)}.h-full{height:100%}.h-screen{height:100vh}.max-h-32{max-height:calc(var(--spacing) * 32)}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-64{max-height:calc(var(--spacing) * 64)}.max-h-80{max-height:calc(var(--spacing) * 80)}.max-h-\[60vh\]{max-height:60vh}.max-h-\[70vh\]{max-height:70vh}.max-h-\[calc\(100vh-220px\)\]{max-height:calc(100vh - 220px)}.min-h-0{min-height:0}.w-1\/2{width:50%}.w-2{width:calc(var(--spacing) * 2)}.w-3{width:calc(var(--spacing) * 3)}.w-5{width:calc(var(--spacing) * 5)}.w-8{width:calc(var(--spacing) * 8)}.w-10{width:calc(var(--spacing) * 10)}.w-12{width:calc(var(--spacing) * 12)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-24{width:calc(var(--spacing) * 24)}.w-28{width:calc(var(--spacing) * 28)}.w-32{width:calc(var(--spacing) * 32)}.w-48{width:calc(var(--spacing) * 48)}.w-56{width:calc(var(--spacing) * 56)}.w-64{width:calc(var(--spacing) * 64)}.w-96{width:calc(var(--spacing) * 96)}.w-full{width:100%}.max-w-\[85vw\]{max-width:85vw}.max-w-full{max-width:100%}.max-w-sm{max-width:var(--container-sm)}.min-w-0{min-width:0}.flex-1{flex:1}.flex-shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-grab{cursor:grab}.cursor-pointer{cursor:pointer}.resize{resize:both}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}.self-end{align-self:flex-end}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:2147483647px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-sm{border-radius:var(--radius-sm)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-amber-700{border-color:var(--color-amber-700)}.border-green-700{border-color:var(--color-green-700)}.border-red-700{border-color:var(--color-red-700)}.border-slate-600{border-color:var(--color-slate-600)}.border-slate-700{border-color:var(--color-slate-700)}.border-slate-700\/50{border-color:#31415880}@supports (color:color-mix(in lab, red, red)){.border-slate-700\/50{border-color:color-mix(in oklab, var(--color-slate-700) 50%, transparent)}}.border-slate-800{border-color:var(--color-slate-800)}.bg-\[var\(--bg-primary\)\]{background-color:var(--bg-primary)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\/20{background-color:#f99c0033}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\/20{background-color:color-mix(in oklab, var(--color-amber-500) 20%, transparent)}}.bg-amber-900\/20{background-color:#7b330633}@supports (color:color-mix(in lab, red, red)){.bg-amber-900\/20{background-color:color-mix(in oklab, var(--color-amber-900) 20%, transparent)}}.bg-amber-900\/30{background-color:#7b33064d}@supports (color:color-mix(in lab, red, red)){.bg-amber-900\/30{background-color:color-mix(in oklab, var(--color-amber-900) 30%, transparent)}}.bg-amber-900\/50{background-color:#7b330680}@supports (color:color-mix(in lab, red, red)){.bg-amber-900\/50{background-color:color-mix(in oklab, var(--color-amber-900) 50%, transparent)}}.bg-brand-500{background-color:var(--color-brand-500)}.bg-brand-600{background-color:var(--color-brand-600)}.bg-cyan-500{background-color:var(--color-cyan-500)}.bg-emerald-900\/20{background-color:#004e3b33}@supports (color:color-mix(in lab, red, red)){.bg-emerald-900\/20{background-color:color-mix(in oklab, var(--color-emerald-900) 20%, transparent)}}.bg-green-600{background-color:var(--color-green-600)}.bg-green-900\/30{background-color:#0d542b4d}@supports (color:color-mix(in lab, red, red)){.bg-green-900\/30{background-color:color-mix(in oklab, var(--color-green-900) 30%, transparent)}}.bg-green-900\/50{background-color:#0d542b80}@supports (color:color-mix(in lab, red, red)){.bg-green-900\/50{background-color:color-mix(in oklab, var(--color-green-900) 50%, transparent)}}.bg-red-600{background-color:var(--color-red-600)}.bg-red-900\/30{background-color:#82181a4d}@supports (color:color-mix(in lab, red, red)){.bg-red-900\/30{background-color:color-mix(in oklab, var(--color-red-900) 30%, transparent)}}.bg-rose-900\/20{background-color:#8b083633}@supports (color:color-mix(in lab, red, red)){.bg-rose-900\/20{background-color:color-mix(in oklab, var(--color-rose-900) 20%, transparent)}}.bg-sky-900\/20{background-color:#024a7033}@supports (color:color-mix(in lab, red, red)){.bg-sky-900\/20{background-color:color-mix(in oklab, var(--color-sky-900) 20%, transparent)}}.bg-slate-600{background-color:var(--color-slate-600)}.bg-slate-700{background-color:var(--color-slate-700)}.bg-slate-800{background-color:var(--color-slate-800)}.bg-slate-800\/80{background-color:#1d293dcc}@supports (color:color-mix(in lab, red, red)){.bg-slate-800\/80{background-color:color-mix(in oklab, var(--color-slate-800) 80%, transparent)}}.bg-slate-900{background-color:var(--color-slate-900)}.bg-slate-900\/50{background-color:#0f172b80}@supports (color:color-mix(in lab, red, red)){.bg-slate-900\/50{background-color:color-mix(in oklab, var(--color-slate-900) 50%, transparent)}}.bg-slate-950{background-color:var(--color-slate-950)}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-slate-700{--tw-gradient-from:var(--color-slate-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-slate-600{--tw-gradient-via:var(--color-slate-600);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-slate-700{--tw-gradient-to:var(--color-slate-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.bg-\[length\:200\%_100\%\]{background-size:200% 100%}.mask-repeat{-webkit-mask-repeat:repeat;mask-repeat:repeat}.object-contain{-o-object-fit:contain;object-fit:contain}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0{padding-block:0}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-10{padding-block:calc(var(--spacing) * 10)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-16{padding-block:calc(var(--spacing) * 16)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pl-2{padding-left:calc(var(--spacing) * 2)}.text-center{text-align:center}.text-justify{text-align:justify}.text-left{text-align:left}.text-right{text-align:right}.align-top{vertical-align:top}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-5xl{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.break-all{word-break:break-all}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}.text-\[var\(--text-primary\)\]{color:var(--text-primary)}.text-amber-300{color:var(--color-amber-300)}.text-amber-400{color:var(--color-amber-400)}.text-blue-300{color:var(--color-blue-300)}.text-blue-400{color:var(--color-blue-400)}.text-brand-400{color:var(--color-brand-400)}.text-cyan-300{color:var(--color-cyan-300)}.text-cyan-400{color:var(--color-cyan-400)}.text-emerald-400{color:var(--color-emerald-400)}.text-gray-300{color:var(--color-gray-300)}.text-gray-400{color:var(--color-gray-400)}.text-green-300{color:var(--color-green-300)}.text-green-400{color:var(--color-green-400)}.text-indigo-400{color:var(--color-indigo-400)}.text-orange-300{color:var(--color-orange-300)}.text-orange-400{color:var(--color-orange-400)}.text-pink-400{color:var(--color-pink-400)}.text-purple-300{color:var(--color-purple-300)}.text-purple-400{color:var(--color-purple-400)}.text-red-300{color:var(--color-red-300)}.text-red-400{color:var(--color-red-400)}.text-rose-400{color:var(--color-rose-400)}.text-sky-400{color:var(--color-sky-400)}.text-slate-200{color:var(--color-slate-200)}.text-slate-300{color:var(--color-slate-300)}.text-slate-400{color:var(--color-slate-400)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-white{color:var(--color-white)}.text-yellow-300{color:var(--color-yellow-300)}.text-yellow-400{color:var(--color-yellow-400)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.underline{text-decoration-line:underline}.placeholder-slate-500::placeholder{color:var(--color-slate-500)}.accent-brand-500{accent-color:var(--color-brand-500)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.select-none{-webkit-user-select:none;user-select:none}.last\:border-0:last-child{border-style:var(--tw-border-style);border-width:0}@media (hover:hover){.hover\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\:border-brand-500\/50:hover{border-color:#06b6d480}@supports (color:color-mix(in lab, red, red)){.hover\:border-brand-500\/50:hover{border-color:color-mix(in oklab, var(--color-brand-500) 50%, transparent)}}.hover\:bg-brand-500:hover{background-color:var(--color-brand-500)}.hover\:bg-slate-600:hover{background-color:var(--color-slate-600)}.hover\:bg-slate-700:hover{background-color:var(--color-slate-700)}.hover\:bg-slate-800:hover{background-color:var(--color-slate-800)}.hover\:text-brand-400:hover{color:var(--color-brand-400)}.hover\:text-red-400:hover{color:var(--color-red-400)}.hover\:text-slate-200:hover{color:var(--color-slate-200)}.hover\:text-white:hover{color:var(--color-white)}}.focus\:border-brand-400:focus{border-color:var(--color-brand-400)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.active\:cursor-grabbing:active{cursor:grabbing}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}@media (width>=64rem){.lg\:relative{position:relative}.lg\:block{display:block}.lg\:hidden{display:none}.lg\:max-w-none{max-width:none}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}}}:root{--bg-primary:#fff;--bg-secondary:#f8fafc;--bg-tertiary:#f1f5f9;--bg-card:#fff;--bg-code:#f8fafc;--bg-surface:#fff;--text-primary:#0f172a;--text-secondary:#475569;--text-muted:#94a3b8;--border:#e2e8f0;--border-hover:#cbd5e1;--accent:#0891b2;--accent-hover:#0e7490;--chart-grid:#e2e8f0;--skeleton-from:#e2e8f0;--skeleton-to:#cbd5e1;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}.dark{--bg-primary:#0f172a;--bg-secondary:#1e293b;--bg-tertiary:#334155;--bg-card:#1e293b;--bg-code:#0f172a;--bg-surface:#0f172a;--text-primary:#e2e8f0;--text-secondary:#94a3b8;--text-muted:#64748b;--border:#334155;--border-hover:#475569;--accent:#06b6d4;--accent-hover:#22d3ee;--chart-grid:#334155;--skeleton-from:#334155;--skeleton-to:#475569;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}body{background:var(--bg-primary);color:var(--text-primary);transition:background-color .2s,color .2s}.scrollbar-thin::-webkit-scrollbar{width:6px}.scrollbar-thin::-webkit-scrollbar-track{background:0 0}.scrollbar-thin::-webkit-scrollbar-thumb{background:var(--text-muted);border-radius:3px}.scrollbar-thin::-webkit-scrollbar-thumb:hover{background:var(--text-secondary)}:focus-visible,button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{outline:2px solid var(--accent);outline-offset:2px}@keyframes slide-in{0%{opacity:0;transform:translate(100%)}to{opacity:1;transform:translate(0)}}.animate-slide-in{animation:.2s ease-out slide-in}@keyframes shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.animate-shimmer{background-size:200% 100%;background-image:linear-gradient(to right, var(--skeleton-from), var(--skeleton-to), var(--skeleton-from));animation:1.5s ease-in-out infinite shimmer}@media (width<=768px){.kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.sidebar-overlay{z-index:40;background:#00000080;position:fixed;inset:0}}@media (width<=640px){.kpi-grid{grid-template-columns:repeat(1,minmax(0,1fr))}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}
|