codesesh 1.0.0 → 1.0.1
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 +27 -4
- package/dist/{chunk-BEF6LLRG.js → chunk-JHX5OLL4.js} +4010 -2248
- package/dist/chunk-JHX5OLL4.js.map +1 -0
- package/dist/{chunk-TIHF4T3K.js → chunk-OFTTM3UD.js} +80 -16
- package/dist/chunk-OFTTM3UD.js.map +1 -0
- package/dist/{dist-3F467V44.js → dist-N2PQATP2.js} +40 -4
- package/dist/index.js +1818 -454
- package/dist/index.js.map +1 -1
- package/dist/scan-refresh-worker.js +274 -95
- package/dist/scan-refresh-worker.js.map +1 -1
- package/dist/search-index-worker.js +112 -50
- package/dist/search-index-worker.js.map +1 -1
- package/dist/smart-tag-worker.js +5 -3
- package/dist/smart-tag-worker.js.map +1 -1
- package/dist/web/assets/ErrorBoundary-D11tWzfn.js +1 -0
- package/dist/web/assets/OverviewScreen-DriPmCam.js +1 -0
- package/dist/web/assets/Projects-BPDIcUBK.js +1 -0
- package/dist/web/assets/SearchFilterBar-Bx73B5e9.js +1 -0
- package/dist/web/assets/SearchResultsPanel-A6_3TPhW.js +1 -0
- package/dist/web/assets/SessionDetail-lQz99ARH.js +54 -0
- package/dist/web/assets/agents-BkRP_ww3.js +1 -0
- package/dist/web/assets/contract-V6QuD0UY.js +1 -0
- package/dist/web/assets/index-B2RqUgZ5.css +1 -0
- package/dist/web/assets/index-BgWoUD_4.js +1410 -0
- package/dist/web/assets/panel-C-gc79Gz.js +1 -0
- package/dist/web/assets/session-indexes-0oT5HSS5.js +4 -0
- package/dist/web/assets/utils-DgUgu15E.js +1 -0
- package/dist/web/index.html +10 -32
- package/dist/web/theme-bootstrap.js +19 -0
- package/package.json +10 -10
- package/dist/chunk-BEF6LLRG.js.map +0 -1
- package/dist/chunk-TIHF4T3K.js.map +0 -1
- package/dist/web/assets/ErrorBoundary-BY-N1QzJ.js +0 -1
- package/dist/web/assets/OverviewScreen-_ZaVjhxN.js +0 -1
- package/dist/web/assets/Projects-q6cEm2dc.js +0 -1
- package/dist/web/assets/SearchFilterBar-CrVBpo40.js +0 -1
- package/dist/web/assets/SearchResultsPanel-Cg5V8Ia6.js +0 -1
- package/dist/web/assets/SessionDetail-BSSuddsZ.js +0 -54
- package/dist/web/assets/chunk-62JRHF6Z-BWRsEBnL.js +0 -4
- package/dist/web/assets/index-C3KgxGwE.js +0 -1410
- package/dist/web/assets/index-DQX42cFQ.css +0 -1
- package/dist/web/assets/panel-B7kuE60V.js +0 -1
- package/dist/web/assets/session-indexes-DmnjZ_JL.js +0 -1
- package/dist/web/assets/utils-t2u9IbNT.js +0 -1
- /package/dist/{dist-3F467V44.js.map → dist-N2PQATP2.js.map} +0 -0
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
+
WORKER_LOG_MESSAGE_TYPE,
|
|
3
4
|
ensurePrivateDirectory,
|
|
5
|
+
isWorkerLogMessage,
|
|
4
6
|
restrictExistingPrivateFiles,
|
|
5
7
|
restrictPrivateFile,
|
|
6
8
|
setCoreDiagnostics
|
|
7
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-JHX5OLL4.js";
|
|
8
10
|
|
|
9
11
|
// src/logging.ts
|
|
10
12
|
import { appendFileSync, existsSync, readdirSync, renameSync, statSync, unlinkSync } from "fs";
|
|
@@ -64,16 +66,34 @@ var AppLogger = class {
|
|
|
64
66
|
currentPath;
|
|
65
67
|
rotationIndex = 0;
|
|
66
68
|
restrictedExistingLogs = false;
|
|
69
|
+
workerTarget = null;
|
|
70
|
+
writeFailureReported = false;
|
|
67
71
|
constructor(options = {}) {
|
|
68
72
|
this.logDir = options.logDir ?? process.env.CODESESH_LOG_DIR ?? getDefaultLogDir();
|
|
69
73
|
this.level = options.level ?? parseLevel(process.env.CODESESH_LOG_LEVEL);
|
|
70
74
|
this.maxBytes = options.maxBytes ?? parsePositiveInt(process.env.CODESESH_LOG_MAX_BYTES, 5e6);
|
|
71
75
|
this.maxFiles = options.maxFiles ?? parsePositiveInt(process.env.CODESESH_LOG_MAX_FILES, 5);
|
|
72
|
-
this.currentPath = join(this.logDir,
|
|
76
|
+
this.currentPath = join(this.logDir, `codesesh-${process.pid}.log`);
|
|
73
77
|
}
|
|
74
78
|
getLogPath() {
|
|
75
79
|
return this.currentPath;
|
|
76
80
|
}
|
|
81
|
+
forwardToParent(port, threadId2) {
|
|
82
|
+
this.workerTarget = { port, threadId: threadId2 };
|
|
83
|
+
}
|
|
84
|
+
consumeWorkerMessage(message) {
|
|
85
|
+
if (!isWorkerLogMessage(message)) return false;
|
|
86
|
+
if (LEVEL_WEIGHT[message.level] < LEVEL_WEIGHT[this.level]) return true;
|
|
87
|
+
this.appendRecord({
|
|
88
|
+
...message.data,
|
|
89
|
+
ts: message.ts,
|
|
90
|
+
level: message.level,
|
|
91
|
+
event: message.event,
|
|
92
|
+
pid: message.pid,
|
|
93
|
+
thread_id: message.threadId
|
|
94
|
+
});
|
|
95
|
+
return true;
|
|
96
|
+
}
|
|
77
97
|
debug(event, data = {}) {
|
|
78
98
|
this.write("debug", event, data);
|
|
79
99
|
}
|
|
@@ -88,20 +108,53 @@ var AppLogger = class {
|
|
|
88
108
|
}
|
|
89
109
|
write(level, event, data) {
|
|
90
110
|
if (LEVEL_WEIGHT[level] < LEVEL_WEIGHT[this.level]) return;
|
|
111
|
+
const ts = (/* @__PURE__ */ new Date()).toISOString();
|
|
112
|
+
const normalizedData = toLogValue(data);
|
|
113
|
+
if (this.workerTarget) {
|
|
114
|
+
try {
|
|
115
|
+
this.workerTarget.port.postMessage({
|
|
116
|
+
type: WORKER_LOG_MESSAGE_TYPE,
|
|
117
|
+
ts,
|
|
118
|
+
level,
|
|
119
|
+
event,
|
|
120
|
+
pid: process.pid,
|
|
121
|
+
threadId: this.workerTarget.threadId,
|
|
122
|
+
data: normalizedData
|
|
123
|
+
});
|
|
124
|
+
} catch (error) {
|
|
125
|
+
this.reportWriteFailure(error);
|
|
126
|
+
}
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
this.appendRecord({
|
|
130
|
+
...normalizedData,
|
|
131
|
+
ts,
|
|
132
|
+
level,
|
|
133
|
+
event,
|
|
134
|
+
pid: process.pid
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
appendRecord(record) {
|
|
91
138
|
try {
|
|
92
139
|
ensurePrivateDirectory(this.logDir);
|
|
93
140
|
this.restrictExistingLogs();
|
|
94
|
-
const line = `${JSON.stringify(
|
|
95
|
-
ts: (/* @__PURE__ */ new Date()).toISOString(),
|
|
96
|
-
level,
|
|
97
|
-
event,
|
|
98
|
-
pid: process.pid,
|
|
99
|
-
...toLogValue(data)
|
|
100
|
-
})}
|
|
141
|
+
const line = `${JSON.stringify(record)}
|
|
101
142
|
`;
|
|
102
|
-
this.rotateIfNeeded(Buffer.byteLength(line));
|
|
143
|
+
const restrictCurrentFile = this.rotateIfNeeded(Buffer.byteLength(line));
|
|
103
144
|
appendFileSync(this.currentPath, line, "utf8");
|
|
104
|
-
restrictPrivateFile(this.currentPath);
|
|
145
|
+
if (restrictCurrentFile) restrictPrivateFile(this.currentPath);
|
|
146
|
+
this.writeFailureReported = false;
|
|
147
|
+
} catch (error) {
|
|
148
|
+
this.reportWriteFailure(error);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
reportWriteFailure(error) {
|
|
152
|
+
if (this.writeFailureReported) return;
|
|
153
|
+
this.writeFailureReported = true;
|
|
154
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
155
|
+
try {
|
|
156
|
+
process.stderr.write(`[codesesh] Failed to write log ${this.currentPath}: ${message}
|
|
157
|
+
`);
|
|
105
158
|
} catch {
|
|
106
159
|
}
|
|
107
160
|
}
|
|
@@ -117,21 +170,23 @@ var AppLogger = class {
|
|
|
117
170
|
rotateIfNeeded(nextBytes) {
|
|
118
171
|
if (!existsSync(this.currentPath)) {
|
|
119
172
|
this.removeExpiredLogs();
|
|
120
|
-
return;
|
|
173
|
+
return true;
|
|
121
174
|
}
|
|
122
175
|
const currentSize = statSync(this.currentPath).size;
|
|
123
|
-
if (currentSize + nextBytes <= this.maxBytes) return;
|
|
176
|
+
if (currentSize + nextBytes <= this.maxBytes) return false;
|
|
124
177
|
this.rotationIndex += 1;
|
|
125
178
|
const rotatedPath = join(
|
|
126
179
|
this.logDir,
|
|
127
|
-
`codesesh-${timestampForFile()}-${
|
|
180
|
+
`codesesh-${process.pid}-${timestampForFile()}-${this.rotationIndex}.log`
|
|
128
181
|
);
|
|
129
182
|
renameSync(this.currentPath, rotatedPath);
|
|
130
183
|
restrictPrivateFile(rotatedPath);
|
|
131
184
|
this.removeExpiredLogs();
|
|
185
|
+
return true;
|
|
132
186
|
}
|
|
133
187
|
removeExpiredLogs() {
|
|
134
|
-
const
|
|
188
|
+
const ownedPrefix = `codesesh-${process.pid}-`;
|
|
189
|
+
const rotated = readdirSync(this.logDir).filter((name) => name.startsWith(ownedPrefix) && name.endsWith(".log")).map((name) => {
|
|
135
190
|
const path = join(this.logDir, name);
|
|
136
191
|
return { path, mtimeMs: statSync(path).mtimeMs };
|
|
137
192
|
}).toSorted((a, b) => b.mtimeMs - a.mtimeMs);
|
|
@@ -142,6 +197,13 @@ var AppLogger = class {
|
|
|
142
197
|
};
|
|
143
198
|
var appLogger = new AppLogger();
|
|
144
199
|
function logSearchIndexSync(context, result, data = {}) {
|
|
200
|
+
if (result?.failures?.length) {
|
|
201
|
+
appLogger.warn("search_index.sessions_skipped", {
|
|
202
|
+
context,
|
|
203
|
+
agent: result.agentName,
|
|
204
|
+
failures: result.failures
|
|
205
|
+
});
|
|
206
|
+
}
|
|
145
207
|
if (!result || result.mode !== "bulk" || result.rebuildDurationMs == null) {
|
|
146
208
|
return;
|
|
147
209
|
}
|
|
@@ -161,6 +223,8 @@ function logSearchIndexSync(context, result, data = {}) {
|
|
|
161
223
|
}
|
|
162
224
|
|
|
163
225
|
// src/diagnostics-bridge.ts
|
|
226
|
+
import { parentPort, threadId } from "worker_threads";
|
|
227
|
+
if (parentPort) appLogger.forwardToParent(parentPort, threadId);
|
|
164
228
|
setCoreDiagnostics({
|
|
165
229
|
info(event, detail) {
|
|
166
230
|
appLogger.info(event, detail);
|
|
@@ -174,4 +238,4 @@ export {
|
|
|
174
238
|
appLogger,
|
|
175
239
|
logSearchIndexSync
|
|
176
240
|
};
|
|
177
|
-
//# sourceMappingURL=chunk-
|
|
241
|
+
//# sourceMappingURL=chunk-OFTTM3UD.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/logging.ts","../src/diagnostics-bridge.ts"],"sourcesContent":["import { appendFileSync, existsSync, readdirSync, renameSync, statSync, unlinkSync } from \"node:fs\";\nimport { homedir } from \"node:os\";\nimport { join } from \"node:path\";\nimport {\n ensurePrivateDirectory,\n isWorkerLogMessage,\n restrictExistingPrivateFiles,\n restrictPrivateFile,\n WORKER_LOG_MESSAGE_TYPE,\n type WorkerLogLevel,\n type WorkerLogMessage,\n} from \"@codesesh/core\";\nimport type { SearchIndexSyncResult } from \"@codesesh/core\";\n\ntype LogLevel = WorkerLogLevel;\n\ninterface WorkerLogPort {\n postMessage(message: WorkerLogMessage): void;\n}\n\nconst LEVEL_WEIGHT: Record<LogLevel, number> = {\n debug: 10,\n info: 20,\n warn: 30,\n error: 40,\n};\n\nexport interface LoggerOptions {\n logDir?: string;\n level?: LogLevel;\n maxBytes?: number;\n maxFiles?: number;\n}\n\nfunction parseLevel(value: string | undefined): LogLevel {\n if (value === \"debug\" || value === \"info\" || value === \"warn\" || value === \"error\") {\n return value;\n }\n return \"info\";\n}\n\nfunction parsePositiveInt(value: string | undefined, fallback: number): number {\n const parsed = Number(value);\n return Number.isFinite(parsed) && parsed > 0 ? Math.floor(parsed) : fallback;\n}\n\nfunction getDefaultLogDir(): string {\n const base = process.env.XDG_CACHE_HOME ?? join(homedir(), \".cache\");\n return join(base, \"codesesh\", \"logs\");\n}\n\nfunction toLogValue(value: unknown, depth = 0): unknown {\n if (value == null || typeof value === \"string\" || typeof value === \"number\") return value;\n if (typeof value === \"boolean\") return value;\n if (typeof value === \"bigint\") return value.toString();\n if (value instanceof Error) {\n return {\n name: value.name,\n message: value.message,\n stack: value.stack,\n };\n }\n if (depth >= 4) return \"[truncated]\";\n if (Array.isArray(value)) return value.slice(0, 50).map((item) => toLogValue(item, depth + 1));\n if (typeof value === \"object\") {\n return Object.fromEntries(\n Object.entries(value as Record<string, unknown>).map(([key, item]) => [\n key,\n toLogValue(item, depth + 1),\n ]),\n );\n }\n return String(value);\n}\n\nfunction timestampForFile(date = new Date()): string {\n return date.toISOString().replace(/[:.]/g, \"-\");\n}\n\nexport class AppLogger {\n private readonly logDir: string;\n private readonly level: LogLevel;\n private readonly maxBytes: number;\n private readonly maxFiles: number;\n private readonly currentPath: string;\n private rotationIndex = 0;\n private restrictedExistingLogs = false;\n private workerTarget: { port: WorkerLogPort; threadId: number } | null = null;\n private writeFailureReported = false;\n\n constructor(options: LoggerOptions = {}) {\n this.logDir = options.logDir ?? process.env.CODESESH_LOG_DIR ?? getDefaultLogDir();\n this.level = options.level ?? parseLevel(process.env.CODESESH_LOG_LEVEL);\n this.maxBytes =\n options.maxBytes ?? parsePositiveInt(process.env.CODESESH_LOG_MAX_BYTES, 5_000_000);\n this.maxFiles = options.maxFiles ?? parsePositiveInt(process.env.CODESESH_LOG_MAX_FILES, 5);\n this.currentPath = join(this.logDir, `codesesh-${process.pid}.log`);\n }\n\n getLogPath(): string {\n return this.currentPath;\n }\n\n forwardToParent(port: WorkerLogPort, threadId: number): void {\n this.workerTarget = { port, threadId };\n }\n\n consumeWorkerMessage(message: unknown): boolean {\n if (!isWorkerLogMessage(message)) return false;\n if (LEVEL_WEIGHT[message.level] < LEVEL_WEIGHT[this.level]) return true;\n this.appendRecord({\n ...message.data,\n ts: message.ts,\n level: message.level,\n event: message.event,\n pid: message.pid,\n thread_id: message.threadId,\n });\n return true;\n }\n\n debug(event: string, data: Record<string, unknown> = {}): void {\n this.write(\"debug\", event, data);\n }\n\n info(event: string, data: Record<string, unknown> = {}): void {\n this.write(\"info\", event, data);\n }\n\n warn(event: string, data: Record<string, unknown> = {}): void {\n this.write(\"warn\", event, data);\n }\n\n error(event: string, data: Record<string, unknown> = {}): void {\n this.write(\"error\", event, data);\n }\n\n private write(level: LogLevel, event: string, data: Record<string, unknown>): void {\n if (LEVEL_WEIGHT[level] < LEVEL_WEIGHT[this.level]) return;\n\n const ts = new Date().toISOString();\n const normalizedData = toLogValue(data) as Record<string, unknown>;\n if (this.workerTarget) {\n try {\n this.workerTarget.port.postMessage({\n type: WORKER_LOG_MESSAGE_TYPE,\n ts,\n level,\n event,\n pid: process.pid,\n threadId: this.workerTarget.threadId,\n data: normalizedData,\n });\n } catch (error) {\n this.reportWriteFailure(error);\n }\n return;\n }\n\n this.appendRecord({\n ...normalizedData,\n ts,\n level,\n event,\n pid: process.pid,\n });\n }\n\n private appendRecord(record: Record<string, unknown>): void {\n try {\n ensurePrivateDirectory(this.logDir);\n this.restrictExistingLogs();\n const line = `${JSON.stringify(record)}\\n`;\n const restrictCurrentFile = this.rotateIfNeeded(Buffer.byteLength(line));\n appendFileSync(this.currentPath, line, \"utf8\");\n if (restrictCurrentFile) restrictPrivateFile(this.currentPath);\n this.writeFailureReported = false;\n } catch (error) {\n this.reportWriteFailure(error);\n }\n }\n\n private reportWriteFailure(error: unknown): void {\n if (this.writeFailureReported) return;\n this.writeFailureReported = true;\n const message = error instanceof Error ? error.message : String(error);\n try {\n process.stderr.write(`[codesesh] Failed to write log ${this.currentPath}: ${message}\\n`);\n } catch {}\n }\n\n /** Logs rotated by an earlier run predate the owner-only policy. */\n private restrictExistingLogs(): void {\n if (this.restrictedExistingLogs) return;\n this.restrictedExistingLogs = true;\n restrictExistingPrivateFiles(\n this.logDir,\n (name) => name.startsWith(\"codesesh\") && name.endsWith(\".log\"),\n );\n }\n\n private rotateIfNeeded(nextBytes: number): boolean {\n if (!existsSync(this.currentPath)) {\n this.removeExpiredLogs();\n return true;\n }\n\n const currentSize = statSync(this.currentPath).size;\n if (currentSize + nextBytes <= this.maxBytes) return false;\n\n this.rotationIndex += 1;\n const rotatedPath = join(\n this.logDir,\n `codesesh-${process.pid}-${timestampForFile()}-${this.rotationIndex}.log`,\n );\n renameSync(this.currentPath, rotatedPath);\n restrictPrivateFile(rotatedPath);\n this.removeExpiredLogs();\n return true;\n }\n\n private removeExpiredLogs(): void {\n const ownedPrefix = `codesesh-${process.pid}-`;\n const rotated = readdirSync(this.logDir)\n .filter((name) => name.startsWith(ownedPrefix) && name.endsWith(\".log\"))\n .map((name) => {\n const path = join(this.logDir, name);\n return { path, mtimeMs: statSync(path).mtimeMs };\n })\n .toSorted((a, b) => b.mtimeMs - a.mtimeMs);\n\n for (const item of rotated.slice(Math.max(0, this.maxFiles - 1))) {\n unlinkSync(item.path);\n }\n }\n}\n\nexport const appLogger = new AppLogger();\n\nexport function logSearchIndexSync(\n context: string,\n result: SearchIndexSyncResult | null,\n data: Record<string, unknown> = {},\n): void {\n if (result?.failures?.length) {\n appLogger.warn(\"search_index.sessions_skipped\", {\n context,\n agent: result.agentName,\n failures: result.failures,\n });\n }\n if (!result || result.mode !== \"bulk\" || result.rebuildDurationMs == null) {\n return;\n }\n\n appLogger.info(\"search_index.sync\", {\n context,\n agent: result.agentName,\n mode: result.mode,\n sessions: result.sessions,\n changed: result.changed,\n deleted: result.deleted,\n indexed: result.indexed,\n skipped: result.skipped,\n duration_ms: Math.round(result.durationMs),\n rebuild_duration_ms: Math.round(result.rebuildDurationMs),\n ...data,\n });\n}\n","import { setCoreDiagnostics } from \"@codesesh/core\";\nimport { parentPort, threadId } from \"node:worker_threads\";\nimport { appLogger } from \"./logging.js\";\n\n/**\n * Bridges core's diagnostics sink to appLogger. Import this once, for its\n * side effect, from every entry point that gets its own module graph — the\n * main CLI thread and each worker_threads script (scan-refresh-worker,\n * search-index-worker, smart-tag-worker) — since core's module-level\n * diagnostics singleton is per-thread, not shared across workers.\n */\nif (parentPort) appLogger.forwardToParent(parentPort, threadId);\n\nsetCoreDiagnostics({\n info(event, detail) {\n appLogger.info(event, detail);\n },\n warn(event, detail) {\n appLogger.warn(event, detail);\n },\n});\n"],"mappings":";;;;;;;;;;;AAAA,SAAS,gBAAgB,YAAY,aAAa,YAAY,UAAU,kBAAkB;AAC1F,SAAS,eAAe;AACxB,SAAS,YAAY;AAkBrB,IAAM,eAAyC;AAAA,EAC7C,OAAO;AAAA,EACP,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AACT;AASA,SAAS,WAAW,OAAqC;AACvD,MAAI,UAAU,WAAW,UAAU,UAAU,UAAU,UAAU,UAAU,SAAS;AAClF,WAAO;AAAA,EACT;AACA,SAAO;AACT;AAEA,SAAS,iBAAiB,OAA2B,UAA0B;AAC7E,QAAM,SAAS,OAAO,KAAK;AAC3B,SAAO,OAAO,SAAS,MAAM,KAAK,SAAS,IAAI,KAAK,MAAM,MAAM,IAAI;AACtE;AAEA,SAAS,mBAA2B;AAClC,QAAM,OAAO,QAAQ,IAAI,kBAAkB,KAAK,QAAQ,GAAG,QAAQ;AACnE,SAAO,KAAK,MAAM,YAAY,MAAM;AACtC;AAEA,SAAS,WAAW,OAAgB,QAAQ,GAAY;AACtD,MAAI,SAAS,QAAQ,OAAO,UAAU,YAAY,OAAO,UAAU,SAAU,QAAO;AACpF,MAAI,OAAO,UAAU,UAAW,QAAO;AACvC,MAAI,OAAO,UAAU,SAAU,QAAO,MAAM,SAAS;AACrD,MAAI,iBAAiB,OAAO;AAC1B,WAAO;AAAA,MACL,MAAM,MAAM;AAAA,MACZ,SAAS,MAAM;AAAA,MACf,OAAO,MAAM;AAAA,IACf;AAAA,EACF;AACA,MAAI,SAAS,EAAG,QAAO;AACvB,MAAI,MAAM,QAAQ,KAAK,EAAG,QAAO,MAAM,MAAM,GAAG,EAAE,EAAE,IAAI,CAAC,SAAS,WAAW,MAAM,QAAQ,CAAC,C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9B;AACF,CAAC;","names":["threadId"]}
|
|
@@ -2,17 +2,25 @@
|
|
|
2
2
|
import {
|
|
3
3
|
BaseAgent,
|
|
4
4
|
FileSystemSessionSource,
|
|
5
|
+
PRICING_CAPTURE_EPOCH,
|
|
6
|
+
SMART_TAG_CLASSIFIER_REVISION,
|
|
5
7
|
SessionAliasValidationError,
|
|
6
8
|
StateStorageUnavailableError,
|
|
9
|
+
WORKER_LOG_MESSAGE_TYPE,
|
|
7
10
|
attachMissingProjectIdentities,
|
|
8
11
|
attachProjectMetrics,
|
|
12
|
+
attachProjectMetricsFromTree,
|
|
9
13
|
buildAgentCacheMeta,
|
|
10
14
|
buildDashboard,
|
|
11
15
|
classifySessionTags,
|
|
12
16
|
clearCache,
|
|
17
|
+
closeCacheStorage,
|
|
18
|
+
commitDurableSessionPublication,
|
|
19
|
+
compareBookmarkViews,
|
|
13
20
|
computeSessionDiff,
|
|
14
21
|
createProjectScopeMatcher,
|
|
15
22
|
createRegisteredAgents,
|
|
23
|
+
createSessionSourceFailure,
|
|
16
24
|
deleteBookmark,
|
|
17
25
|
deleteSessionAlias,
|
|
18
26
|
diffSessionSources,
|
|
@@ -24,7 +32,7 @@ import {
|
|
|
24
32
|
getAgentFullSyncCursor,
|
|
25
33
|
getAgentInfoMap,
|
|
26
34
|
getAgentLastFullSyncAt,
|
|
27
|
-
|
|
35
|
+
getCachePath,
|
|
28
36
|
getPricingGeneration,
|
|
29
37
|
getRegisteredAgents,
|
|
30
38
|
getRootSessions,
|
|
@@ -35,11 +43,13 @@ import {
|
|
|
35
43
|
isAgentCacheInitialized,
|
|
36
44
|
isChildSession,
|
|
37
45
|
isProjectIdentityKind,
|
|
46
|
+
isWorkerLogMessage,
|
|
38
47
|
listBookmarks,
|
|
39
48
|
listCachedProjectGroups,
|
|
40
49
|
listFileActivity,
|
|
41
50
|
listModelCostDistribution,
|
|
42
51
|
listSessionAliases,
|
|
52
|
+
loadCachedSessionHeads,
|
|
43
53
|
loadCachedSessions,
|
|
44
54
|
markAgentCacheInitialized,
|
|
45
55
|
markAgentFullSyncCompleted,
|
|
@@ -47,41 +57,57 @@ import {
|
|
|
47
57
|
markAgentFullSyncStarted,
|
|
48
58
|
matchesProjectIdentity,
|
|
49
59
|
matchesProjectScope,
|
|
60
|
+
materializeBookmarkViews,
|
|
50
61
|
materializeSessionDetailResponse,
|
|
51
62
|
mergeSearchQueryOptions,
|
|
52
63
|
mergeSortedSessions,
|
|
53
64
|
perf,
|
|
54
65
|
publishPendingPricing,
|
|
66
|
+
readAgentCacheInitialization,
|
|
67
|
+
readAgentLastFullSyncAt,
|
|
68
|
+
readPendingSearchIndexMaintenance,
|
|
55
69
|
refreshPricingCache,
|
|
56
70
|
registerAgent,
|
|
71
|
+
reportSessionSourceOutcome,
|
|
57
72
|
restrictExistingPrivateFiles,
|
|
58
73
|
restrictPrivateFile,
|
|
59
74
|
saveCachedSessionChanges,
|
|
60
75
|
saveCachedSessions,
|
|
61
76
|
scanSessions,
|
|
77
|
+
sessionDetailVersion,
|
|
62
78
|
sessionSignature,
|
|
63
79
|
setCoreDiagnostics,
|
|
64
80
|
sortSessions,
|
|
65
81
|
syncSessionSearchIndex,
|
|
66
82
|
syncSessionSearchIndexChanges,
|
|
83
|
+
synchronizePricingGeneration,
|
|
84
|
+
synchronizeSessionSources,
|
|
67
85
|
upsertBookmark,
|
|
68
86
|
upsertSessionAlias
|
|
69
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-JHX5OLL4.js";
|
|
70
88
|
export {
|
|
71
89
|
BaseAgent,
|
|
72
90
|
StateStorageUnavailableError as BookmarkStorageUnavailableError,
|
|
73
91
|
FileSystemSessionSource,
|
|
92
|
+
PRICING_CAPTURE_EPOCH,
|
|
93
|
+
SMART_TAG_CLASSIFIER_REVISION,
|
|
74
94
|
SessionAliasValidationError,
|
|
75
95
|
StateStorageUnavailableError,
|
|
96
|
+
WORKER_LOG_MESSAGE_TYPE,
|
|
76
97
|
attachMissingProjectIdentities,
|
|
77
98
|
attachProjectMetrics,
|
|
99
|
+
attachProjectMetricsFromTree,
|
|
78
100
|
buildAgentCacheMeta,
|
|
79
101
|
buildDashboard,
|
|
80
102
|
classifySessionTags,
|
|
81
103
|
clearCache,
|
|
104
|
+
closeCacheStorage,
|
|
105
|
+
commitDurableSessionPublication,
|
|
106
|
+
compareBookmarkViews,
|
|
82
107
|
computeSessionDiff,
|
|
83
108
|
createProjectScopeMatcher,
|
|
84
109
|
createRegisteredAgents,
|
|
110
|
+
createSessionSourceFailure,
|
|
85
111
|
deleteBookmark,
|
|
86
112
|
deleteSessionAlias,
|
|
87
113
|
diffSessionSources,
|
|
@@ -93,7 +119,7 @@ export {
|
|
|
93
119
|
getAgentFullSyncCursor,
|
|
94
120
|
getAgentInfoMap,
|
|
95
121
|
getAgentLastFullSyncAt,
|
|
96
|
-
|
|
122
|
+
getCachePath,
|
|
97
123
|
getPricingGeneration,
|
|
98
124
|
getRegisteredAgents,
|
|
99
125
|
getRootSessions,
|
|
@@ -104,11 +130,13 @@ export {
|
|
|
104
130
|
isAgentCacheInitialized,
|
|
105
131
|
isChildSession,
|
|
106
132
|
isProjectIdentityKind,
|
|
133
|
+
isWorkerLogMessage,
|
|
107
134
|
listBookmarks,
|
|
108
135
|
listCachedProjectGroups,
|
|
109
136
|
listFileActivity,
|
|
110
137
|
listModelCostDistribution,
|
|
111
138
|
listSessionAliases,
|
|
139
|
+
loadCachedSessionHeads,
|
|
112
140
|
loadCachedSessions,
|
|
113
141
|
markAgentCacheInitialized,
|
|
114
142
|
markAgentFullSyncCompleted,
|
|
@@ -116,24 +144,32 @@ export {
|
|
|
116
144
|
markAgentFullSyncStarted,
|
|
117
145
|
matchesProjectIdentity,
|
|
118
146
|
matchesProjectScope,
|
|
147
|
+
materializeBookmarkViews,
|
|
119
148
|
materializeSessionDetailResponse,
|
|
120
149
|
mergeSearchQueryOptions,
|
|
121
150
|
mergeSortedSessions,
|
|
122
151
|
perf,
|
|
123
152
|
publishPendingPricing,
|
|
153
|
+
readAgentCacheInitialization,
|
|
154
|
+
readAgentLastFullSyncAt,
|
|
155
|
+
readPendingSearchIndexMaintenance,
|
|
124
156
|
refreshPricingCache,
|
|
125
157
|
registerAgent,
|
|
158
|
+
reportSessionSourceOutcome,
|
|
126
159
|
restrictExistingPrivateFiles,
|
|
127
160
|
restrictPrivateFile,
|
|
128
161
|
saveCachedSessionChanges,
|
|
129
162
|
saveCachedSessions,
|
|
130
163
|
scanSessions,
|
|
164
|
+
sessionDetailVersion,
|
|
131
165
|
sessionSignature,
|
|
132
166
|
setCoreDiagnostics,
|
|
133
167
|
sortSessions,
|
|
134
168
|
syncSessionSearchIndex,
|
|
135
169
|
syncSessionSearchIndexChanges,
|
|
170
|
+
synchronizePricingGeneration,
|
|
171
|
+
synchronizeSessionSources,
|
|
136
172
|
upsertBookmark,
|
|
137
173
|
upsertSessionAlias
|
|
138
174
|
};
|
|
139
|
-
//# sourceMappingURL=dist-
|
|
175
|
+
//# sourceMappingURL=dist-N2PQATP2.js.map
|