@planckspace/cli 0.1.0 → 0.2.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 +24 -1
- package/dist/anomaly/constants.d.ts +13 -0
- package/dist/anomaly/constants.d.ts.map +1 -0
- package/dist/anomaly/constants.js +13 -0
- package/dist/anomaly/constants.js.map +1 -0
- package/dist/anomaly/detector.d.ts +12 -0
- package/dist/anomaly/detector.d.ts.map +1 -0
- package/dist/anomaly/detector.js +98 -0
- package/dist/anomaly/detector.js.map +1 -0
- package/dist/anomaly/types.d.ts +19 -0
- package/dist/anomaly/types.d.ts.map +1 -0
- package/dist/anomaly/types.js +2 -0
- package/dist/anomaly/types.js.map +1 -0
- package/dist/commands/budget.d.ts +26 -0
- package/dist/commands/budget.d.ts.map +1 -0
- package/dist/commands/budget.js +91 -0
- package/dist/commands/budget.js.map +1 -0
- package/dist/commands/config.d.ts +4 -0
- package/dist/commands/config.d.ts.map +1 -0
- package/dist/commands/config.js +45 -0
- package/dist/commands/config.js.map +1 -0
- package/dist/commands/connect.d.ts +17 -0
- package/dist/commands/connect.d.ts.map +1 -0
- package/dist/commands/connect.js +191 -0
- package/dist/commands/connect.js.map +1 -0
- package/dist/commands/daemon.d.ts +8 -0
- package/dist/commands/daemon.d.ts.map +1 -0
- package/dist/commands/daemon.js +310 -0
- package/dist/commands/daemon.js.map +1 -0
- package/dist/commands/diagnose.d.ts +2 -0
- package/dist/commands/diagnose.d.ts.map +1 -0
- package/dist/commands/diagnose.js +81 -0
- package/dist/commands/diagnose.js.map +1 -0
- package/dist/commands/doctor.d.ts +2 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +67 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/export.d.ts +40 -0
- package/dist/commands/export.d.ts.map +1 -0
- package/dist/commands/export.js +184 -0
- package/dist/commands/export.js.map +1 -0
- package/dist/commands/init.d.ts +3 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +14 -1
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/insights.d.ts +2 -0
- package/dist/commands/insights.d.ts.map +1 -0
- package/dist/commands/insights.js +71 -0
- package/dist/commands/insights.js.map +1 -0
- package/dist/commands/inspect.d.ts +2 -0
- package/dist/commands/inspect.d.ts.map +1 -0
- package/dist/commands/inspect.js +81 -0
- package/dist/commands/inspect.js.map +1 -0
- package/dist/commands/integrations.d.ts +2 -0
- package/dist/commands/integrations.d.ts.map +1 -0
- package/dist/commands/integrations.js +46 -0
- package/dist/commands/integrations.js.map +1 -0
- package/dist/commands/login.d.ts +1 -1
- package/dist/commands/login.d.ts.map +1 -1
- package/dist/commands/login.js +45 -6
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/metrics.d.ts +6 -0
- package/dist/commands/metrics.d.ts.map +1 -0
- package/dist/commands/metrics.js +85 -0
- package/dist/commands/metrics.js.map +1 -0
- package/dist/commands/reconcile.d.ts +2 -0
- package/dist/commands/reconcile.d.ts.map +1 -0
- package/dist/commands/reconcile.js +63 -0
- package/dist/commands/reconcile.js.map +1 -0
- package/dist/commands/scan.d.ts.map +1 -1
- package/dist/commands/scan.js +53 -10
- package/dist/commands/scan.js.map +1 -1
- package/dist/commands/status.d.ts +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +84 -14
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/subscription.d.ts +15 -0
- package/dist/commands/subscription.d.ts.map +1 -0
- package/dist/commands/subscription.js +62 -0
- package/dist/commands/subscription.js.map +1 -0
- package/dist/commands/sync.d.ts +1 -1
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +77 -10
- package/dist/commands/sync.js.map +1 -1
- package/dist/commands/value.d.ts +5 -0
- package/dist/commands/value.d.ts.map +1 -0
- package/dist/commands/value.js +95 -0
- package/dist/commands/value.js.map +1 -0
- package/dist/config.d.ts +28 -3
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +9 -1
- package/dist/config.js.map +1 -1
- package/dist/correlate.d.ts +7 -0
- package/dist/correlate.d.ts.map +1 -1
- package/dist/correlate.js +102 -15
- package/dist/correlate.js.map +1 -1
- package/dist/daemon/daemon.d.ts +2 -0
- package/dist/daemon/daemon.d.ts.map +1 -0
- package/dist/daemon/daemon.js +188 -0
- package/dist/daemon/daemon.js.map +1 -0
- package/dist/daemon/daemonState.d.ts +25 -0
- package/dist/daemon/daemonState.d.ts.map +1 -0
- package/dist/daemon/daemonState.js +82 -0
- package/dist/daemon/daemonState.js.map +1 -0
- package/dist/daemon/logger.d.ts +7 -0
- package/dist/daemon/logger.d.ts.map +1 -0
- package/dist/daemon/logger.js +61 -0
- package/dist/daemon/logger.js.map +1 -0
- package/dist/daemon/syncLoop.d.ts +38 -0
- package/dist/daemon/syncLoop.d.ts.map +1 -0
- package/dist/daemon/syncLoop.js +119 -0
- package/dist/daemon/syncLoop.js.map +1 -0
- package/dist/daemon/watcher.d.ts +26 -0
- package/dist/daemon/watcher.d.ts.map +1 -0
- package/dist/daemon/watcher.js +187 -0
- package/dist/daemon/watcher.js.map +1 -0
- package/dist/db/store.d.ts +123 -2
- package/dist/db/store.d.ts.map +1 -1
- package/dist/db/store.js +397 -11
- package/dist/db/store.js.map +1 -1
- package/dist/detectors/cache-gap.d.ts +3 -0
- package/dist/detectors/cache-gap.d.ts.map +1 -0
- package/dist/detectors/cache-gap.js +70 -0
- package/dist/detectors/cache-gap.js.map +1 -0
- package/dist/detectors/context-bloat.d.ts +3 -0
- package/dist/detectors/context-bloat.d.ts.map +1 -0
- package/dist/detectors/context-bloat.js +68 -0
- package/dist/detectors/context-bloat.js.map +1 -0
- package/dist/detectors/fileTokens.d.ts +3 -0
- package/dist/detectors/fileTokens.d.ts.map +1 -0
- package/dist/detectors/fileTokens.js +12 -0
- package/dist/detectors/fileTokens.js.map +1 -0
- package/dist/detectors/index.d.ts +20 -0
- package/dist/detectors/index.d.ts.map +1 -0
- package/dist/detectors/index.js +41 -0
- package/dist/detectors/index.js.map +1 -0
- package/dist/detectors/model-routing.d.ts +3 -0
- package/dist/detectors/model-routing.d.ts.map +1 -0
- package/dist/detectors/model-routing.js +71 -0
- package/dist/detectors/model-routing.js.map +1 -0
- package/dist/detectors/repeat-read.d.ts +3 -0
- package/dist/detectors/repeat-read.d.ts.map +1 -0
- package/dist/detectors/repeat-read.js +69 -0
- package/dist/detectors/repeat-read.js.map +1 -0
- package/dist/detectors/seat-efficiency.d.ts +4 -0
- package/dist/detectors/seat-efficiency.d.ts.map +1 -0
- package/dist/detectors/seat-efficiency.js +86 -0
- package/dist/detectors/seat-efficiency.js.map +1 -0
- package/dist/detectors/types.d.ts +46 -0
- package/dist/detectors/types.d.ts.map +1 -0
- package/dist/detectors/types.js +2 -0
- package/dist/detectors/types.js.map +1 -0
- package/dist/health.d.ts +59 -0
- package/dist/health.d.ts.map +1 -0
- package/dist/health.js +106 -0
- package/dist/health.js.map +1 -0
- package/dist/index.js +389 -5
- package/dist/index.js.map +1 -1
- package/dist/metrics.d.ts +29 -0
- package/dist/metrics.d.ts.map +1 -0
- package/dist/metrics.js +205 -0
- package/dist/metrics.js.map +1 -0
- package/dist/scrapers/claudeCode.d.ts +1 -0
- package/dist/scrapers/claudeCode.d.ts.map +1 -1
- package/dist/scrapers/claudeCode.js +43 -13
- package/dist/scrapers/claudeCode.js.map +1 -1
- package/dist/scrapers/cursor.d.ts +3 -2
- package/dist/scrapers/cursor.d.ts.map +1 -1
- package/dist/scrapers/cursor.js +56 -16
- package/dist/scrapers/cursor.js.map +1 -1
- package/dist/scrapers/jetbrains.d.ts +15 -0
- package/dist/scrapers/jetbrains.d.ts.map +1 -0
- package/dist/scrapers/jetbrains.js +232 -0
- package/dist/scrapers/jetbrains.js.map +1 -0
- package/dist/scrapers/types.d.ts +4 -1
- package/dist/scrapers/types.d.ts.map +1 -1
- package/dist/scrapers/windsurf.d.ts +3 -2
- package/dist/scrapers/windsurf.d.ts.map +1 -1
- package/dist/scrapers/windsurf.js +25 -9
- package/dist/scrapers/windsurf.js.map +1 -1
- package/dist/sync/payload.d.ts +4 -5
- package/dist/sync/payload.d.ts.map +1 -1
- package/dist/sync/payload.js +88 -7
- package/dist/sync/payload.js.map +1 -1
- package/dist/sync/syncEngine.d.ts +19 -3
- package/dist/sync/syncEngine.d.ts.map +1 -1
- package/dist/sync/syncEngine.js +116 -10
- package/dist/sync/syncEngine.js.map +1 -1
- package/install.sh +27 -10
- package/package.json +43 -42
- package/dist/__tests__/correlate.test.d.ts +0 -2
- package/dist/__tests__/correlate.test.d.ts.map +0 -1
- package/dist/__tests__/correlate.test.js +0 -204
- package/dist/__tests__/correlate.test.js.map +0 -1
- package/dist/scrapers/__tests__/claudeCode.test.d.ts +0 -2
- package/dist/scrapers/__tests__/claudeCode.test.d.ts.map +0 -1
- package/dist/scrapers/__tests__/claudeCode.test.js +0 -115
- package/dist/scrapers/__tests__/claudeCode.test.js.map +0 -1
- package/dist/scrapers/__tests__/cursor.test.d.ts +0 -2
- package/dist/scrapers/__tests__/cursor.test.d.ts.map +0 -1
- package/dist/scrapers/__tests__/cursor.test.js +0 -173
- package/dist/scrapers/__tests__/cursor.test.js.map +0 -1
- package/dist/scrapers/__tests__/windsurf.test.d.ts +0 -2
- package/dist/scrapers/__tests__/windsurf.test.d.ts.map +0 -1
- package/dist/scrapers/__tests__/windsurf.test.js +0 -87
- package/dist/scrapers/__tests__/windsurf.test.js.map +0 -1
- package/dist/scripts/scanTest.d.ts +0 -3
- package/dist/scripts/scanTest.d.ts.map +0 -1
- package/dist/scripts/scanTest.js +0 -146
- package/dist/scripts/scanTest.js.map +0 -1
- package/dist/sync/__tests__/payload.privacy.test.d.ts +0 -2
- package/dist/sync/__tests__/payload.privacy.test.d.ts.map +0 -1
- package/dist/sync/__tests__/payload.privacy.test.js +0 -100
- package/dist/sync/__tests__/payload.privacy.test.js.map +0 -1
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import fs from "fs";
|
|
2
|
+
import path from "path";
|
|
3
|
+
import os from "os";
|
|
4
|
+
import { watch } from "chokidar";
|
|
5
|
+
import { parseClaudeCodeFile } from "../scrapers/claudeCode.js";
|
|
6
|
+
import { upsertSessions, getFileOffset, setFileOffset, getSessionsForCorrelation } from "../db/store.js";
|
|
7
|
+
import { correlateSessions } from "../correlate.js";
|
|
8
|
+
import { writeLog } from "./logger.js";
|
|
9
|
+
// Coalesce rapid writes to the same file — one scrape after burst settles.
|
|
10
|
+
const DEBOUNCE_MS = 250;
|
|
11
|
+
/** Returns directories the watcher should monitor. Only existing paths are included. */
|
|
12
|
+
export function watchPaths(overrideClaudeDir) {
|
|
13
|
+
const home = os.homedir();
|
|
14
|
+
const candidates = [
|
|
15
|
+
overrideClaudeDir ?? path.join(home, ".claude", "projects"),
|
|
16
|
+
];
|
|
17
|
+
return candidates.filter((p) => {
|
|
18
|
+
try {
|
|
19
|
+
fs.statSync(p);
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
catch {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Start the chokidar file watcher over Claude Code JSONL directories.
|
|
29
|
+
* Cursor and Windsurf use SQLite DBs — they are not JSONL and are covered by
|
|
30
|
+
* the 60s periodic poll instead.
|
|
31
|
+
*/
|
|
32
|
+
export function startWatcher(callbacks = {}, overrideClaudeDir) {
|
|
33
|
+
const dirs = watchPaths(overrideClaudeDir);
|
|
34
|
+
const timers = new Map();
|
|
35
|
+
async function scrapeFile(filePath) {
|
|
36
|
+
if (!filePath.endsWith(".jsonl"))
|
|
37
|
+
return;
|
|
38
|
+
let currentSize = 0;
|
|
39
|
+
try {
|
|
40
|
+
currentSize = fs.statSync(filePath).size;
|
|
41
|
+
}
|
|
42
|
+
catch {
|
|
43
|
+
return; // file was deleted between event and handler
|
|
44
|
+
}
|
|
45
|
+
// Skip if we've already processed this version of the file.
|
|
46
|
+
if (currentSize <= getFileOffset(filePath))
|
|
47
|
+
return;
|
|
48
|
+
const sessionId = path.basename(filePath, ".jsonl");
|
|
49
|
+
try {
|
|
50
|
+
const session = parseClaudeCodeFile(filePath, sessionId);
|
|
51
|
+
if (session) {
|
|
52
|
+
upsertSessions([session]);
|
|
53
|
+
setFileOffset(filePath, currentSize);
|
|
54
|
+
// Fire-and-forget git correlation — errors are non-fatal.
|
|
55
|
+
correlateSessions().catch(() => { });
|
|
56
|
+
writeLog({ event: "watch_scrape", file: path.basename(filePath) });
|
|
57
|
+
callbacks.onScrape?.(filePath, 1);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
catch (err) {
|
|
61
|
+
writeLog({ event: "watch_error", file: filePath, error: String(err) });
|
|
62
|
+
callbacks.onError?.(filePath, err);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
function schedule(filePath) {
|
|
66
|
+
const prev = timers.get(filePath);
|
|
67
|
+
if (prev)
|
|
68
|
+
clearTimeout(prev);
|
|
69
|
+
timers.set(filePath, setTimeout(() => {
|
|
70
|
+
timers.delete(filePath);
|
|
71
|
+
scrapeFile(filePath).catch(() => { });
|
|
72
|
+
}, DEBOUNCE_MS));
|
|
73
|
+
}
|
|
74
|
+
const watcher = watch(dirs, {
|
|
75
|
+
persistent: true,
|
|
76
|
+
ignoreInitial: true, // don't fire for files that already existed at startup
|
|
77
|
+
depth: 3, // projects/<dir>/<session>.jsonl → 2 levels deep is enough
|
|
78
|
+
awaitWriteFinish: { stabilityThreshold: 150, pollInterval: 50 },
|
|
79
|
+
});
|
|
80
|
+
watcher.on("add", schedule);
|
|
81
|
+
watcher.on("change", schedule);
|
|
82
|
+
writeLog({ event: "watcher_start", paths: dirs });
|
|
83
|
+
return watcher;
|
|
84
|
+
}
|
|
85
|
+
// ── Git ref watcher (Layer 4) ─────────────────────────────────────────────────
|
|
86
|
+
// Watches .git/refs/remotes/ and .git/packed-refs across all repos with active
|
|
87
|
+
// sessions. When `git push` completes, git writes the updated remote-tracking ref
|
|
88
|
+
// locally — that file change triggers immediate re-correlation so session outcomes
|
|
89
|
+
// flip from "unknown" → "shipped" without waiting for the 60s periodic scan.
|
|
90
|
+
const GIT_DEBOUNCE_MS = 500;
|
|
91
|
+
/**
|
|
92
|
+
* Returns the git ref paths to watch for a working directory.
|
|
93
|
+
* Handles both normal repos (.git/ is a dir) and git worktrees (.git is a file).
|
|
94
|
+
*/
|
|
95
|
+
function buildGitRefPaths(workingDir) {
|
|
96
|
+
try {
|
|
97
|
+
const gitEntry = path.join(workingDir, ".git");
|
|
98
|
+
const stat = fs.statSync(gitEntry);
|
|
99
|
+
let gitDir;
|
|
100
|
+
if (stat.isFile()) {
|
|
101
|
+
// Worktree: .git is a pointer like "gitdir: ../.git/worktrees/foo"
|
|
102
|
+
const content = fs.readFileSync(gitEntry, "utf-8").trim();
|
|
103
|
+
const m = content.match(/^gitdir:\s*(.+)$/);
|
|
104
|
+
if (!m)
|
|
105
|
+
return [];
|
|
106
|
+
// The actual remotes live two levels up from .git/worktrees/<name>
|
|
107
|
+
gitDir = path.resolve(workingDir, m[1], "..", "..");
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
gitDir = gitEntry;
|
|
111
|
+
}
|
|
112
|
+
const paths = [];
|
|
113
|
+
const remotes = path.join(gitDir, "refs", "remotes");
|
|
114
|
+
const packedRefs = path.join(gitDir, "packed-refs");
|
|
115
|
+
try {
|
|
116
|
+
fs.statSync(remotes);
|
|
117
|
+
paths.push(remotes);
|
|
118
|
+
}
|
|
119
|
+
catch { /* not present yet */ }
|
|
120
|
+
try {
|
|
121
|
+
fs.statSync(packedRefs);
|
|
122
|
+
paths.push(packedRefs);
|
|
123
|
+
}
|
|
124
|
+
catch { /* not present yet */ }
|
|
125
|
+
return paths;
|
|
126
|
+
}
|
|
127
|
+
catch {
|
|
128
|
+
return [];
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Start the git remote-ref watcher.
|
|
133
|
+
* `onPush` is called (after re-correlation completes) whenever a push is detected.
|
|
134
|
+
*/
|
|
135
|
+
export function startGitRefWatcher(onPush) {
|
|
136
|
+
// Track individual watched paths (not just dirs) so that refs/remotes can be
|
|
137
|
+
// added on a later refreshFromDb call if it didn't exist at initial addRepo time.
|
|
138
|
+
const watchedPaths = new Set();
|
|
139
|
+
let debounceTimer = null;
|
|
140
|
+
const fsWatcher = watch([], {
|
|
141
|
+
persistent: true,
|
|
142
|
+
ignoreInitial: true,
|
|
143
|
+
depth: 3,
|
|
144
|
+
});
|
|
145
|
+
function schedule() {
|
|
146
|
+
if (debounceTimer)
|
|
147
|
+
clearTimeout(debounceTimer);
|
|
148
|
+
debounceTimer = setTimeout(() => {
|
|
149
|
+
debounceTimer = null;
|
|
150
|
+
writeLog({ event: "git_push_detected" });
|
|
151
|
+
correlateSessions()
|
|
152
|
+
.then(() => onPush())
|
|
153
|
+
.catch(() => { });
|
|
154
|
+
}, GIT_DEBOUNCE_MS);
|
|
155
|
+
}
|
|
156
|
+
fsWatcher.on("change", schedule);
|
|
157
|
+
fsWatcher.on("add", schedule);
|
|
158
|
+
function addRepo(workingDir) {
|
|
159
|
+
if (!workingDir)
|
|
160
|
+
return;
|
|
161
|
+
if (!fs.existsSync(workingDir))
|
|
162
|
+
return;
|
|
163
|
+
const paths = buildGitRefPaths(workingDir);
|
|
164
|
+
const newPaths = paths.filter((p) => !watchedPaths.has(p));
|
|
165
|
+
if (newPaths.length === 0)
|
|
166
|
+
return;
|
|
167
|
+
for (const p of newPaths) {
|
|
168
|
+
watchedPaths.add(p);
|
|
169
|
+
fsWatcher.add(p);
|
|
170
|
+
}
|
|
171
|
+
writeLog({ event: "git_ref_watch_added", dir: path.basename(workingDir), paths: newPaths });
|
|
172
|
+
}
|
|
173
|
+
function refreshFromDb() {
|
|
174
|
+
try {
|
|
175
|
+
const sessions = getSessionsForCorrelation();
|
|
176
|
+
for (const s of sessions) {
|
|
177
|
+
if (s.workingDir)
|
|
178
|
+
addRepo(s.workingDir);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
catch { /* non-fatal */ }
|
|
182
|
+
}
|
|
183
|
+
// Seed from sessions already in the DB at startup.
|
|
184
|
+
refreshFromDb();
|
|
185
|
+
return { addRepo, refreshFromDb, close: () => fsWatcher.close() };
|
|
186
|
+
}
|
|
187
|
+
//# sourceMappingURL=watcher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"watcher.js","sourceRoot":"","sources":["../../src/daemon/watcher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,KAAK,EAAkB,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,aAAa,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AACzG,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,2EAA2E;AAC3E,MAAM,WAAW,GAAG,GAAG,CAAC;AAExB,wFAAwF;AACxF,MAAM,UAAU,UAAU,CAAC,iBAA0B;IACnD,MAAM,IAAI,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;IAC1B,MAAM,UAAU,GAAa;QAC3B,iBAAiB,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,UAAU,CAAC;KAC5D,CAAC;IACF,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE;QAC7B,IAAI,CAAC;YAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YAAC,OAAO,IAAI,CAAC;QAAC,CAAC;QAAC,MAAM,CAAC;YAAC,OAAO,KAAK,CAAC;QA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AAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAC3D,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO;QAClC,KAAK,MAAM,CAAC,IAAI,QAAQ,EAAE,CAAC;YACzB,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YACpB,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QACnB,CAAC;QACD,QAAQ,CAAC,EAAE,KAAK,EAAE,qBAAqB,EAAE,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC9F,CAAC;IAED,SAAS,aAAa;QACpB,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,yBAAyB,EAAE,CAAC;YAC7C,KAAK,MAAM,CAAC,IAAI,QAAQ,EAAE,CAAC;gBACzB,IAAI,CAAC,CAAC,UAAU;oBAAE,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;YAC1C,CAAC;QACH,CAAC;QAAC,MAAM,CAAC,CAAC,eAAe,CAAC,CAAC;IAC7B,CAAC;IAED,mDAAmD;IACnD,aAAa,EAAE,CAAC;IAEhB,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,EAAE,CAAC;AACpE,CAAC"}
|
package/dist/db/store.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { ParsedSession } from "../scrapers/claudeCode.js";
|
|
2
|
+
import type { Insight } from "../detectors/types.js";
|
|
3
|
+
import type { AnomalyEvent } from "../anomaly/types.js";
|
|
2
4
|
export declare const PLANCKSPACE_DIR: string;
|
|
3
5
|
export declare const DB_PATH: string;
|
|
4
6
|
export type SessionRow = {
|
|
@@ -12,6 +14,9 @@ export type SessionRow = {
|
|
|
12
14
|
cacheReadTokens: number;
|
|
13
15
|
cacheWriteTokens: number;
|
|
14
16
|
costUsd: number;
|
|
17
|
+
costType: string;
|
|
18
|
+
subscriptionPlan: string | null;
|
|
19
|
+
unmatchedTurns: number;
|
|
15
20
|
repoName: string | null;
|
|
16
21
|
gitBranch: string | null;
|
|
17
22
|
gitAuthorEmail: string | null;
|
|
@@ -21,9 +26,12 @@ export type SessionRow = {
|
|
|
21
26
|
outcome: string;
|
|
22
27
|
turnsJson: string;
|
|
23
28
|
scrapedAt: string;
|
|
29
|
+
mergedPrNumber: number | null;
|
|
30
|
+
mergedAt: string | null;
|
|
31
|
+
timeToMergeMs: number | null;
|
|
24
32
|
};
|
|
25
33
|
/** The subset of a session needed to correlate it against its git repo. */
|
|
26
|
-
export type CorrelationSessionRow = Pick<SessionRow, "id" | "repoName" | "gitBranch" | "workingDir" | "startedAt" | "endedAt" | "outcome">;
|
|
34
|
+
export type CorrelationSessionRow = Pick<SessionRow, "id" | "repoName" | "gitBranch" | "workingDir" | "startedAt" | "endedAt" | "outcome" | "gitAuthorEmail">;
|
|
27
35
|
export declare function initDb(dbPath?: string): void;
|
|
28
36
|
/** Close the database handle (mainly for tests; releases the file lock on Windows). */
|
|
29
37
|
export declare function closeDb(): void;
|
|
@@ -32,15 +40,128 @@ export declare function upsertSessions(sessions: ParsedSession[]): {
|
|
|
32
40
|
updated: number;
|
|
33
41
|
};
|
|
34
42
|
export declare function getSessions(): SessionRow[];
|
|
35
|
-
|
|
43
|
+
/**
|
|
44
|
+
* Sessions that have not yet been synced, including turnsJson and merge metadata.
|
|
45
|
+
* turnsJson is included so buildTelemetryPayload can extract per-turn metadata;
|
|
46
|
+
* the privacy invariant is enforced there (explicit field mapping, never forwarded raw).
|
|
47
|
+
*/
|
|
48
|
+
export declare function getUnsyncedSessions(): SessionRow[];
|
|
49
|
+
/** Full session row by ID — used by `planck inspect`. Returns null if not found. */
|
|
50
|
+
export declare function getSessionById(id: string): SessionRow | null;
|
|
51
|
+
/** Sessions for the value report: tool filter + 30-day window. */
|
|
52
|
+
export type ValueSessionRow = Pick<SessionRow, "costUsd" | "costType" | "gitAuthorEmail" | "tool">;
|
|
53
|
+
export declare function getSessionsForValue(tool: string, sinceIso: string): ValueSessionRow[];
|
|
36
54
|
/** Sessions to feed the git correlator — only the fields it needs to classify outcomes. */
|
|
37
55
|
export declare function getSessionsForCorrelation(): CorrelationSessionRow[];
|
|
38
56
|
/** Persist a session's correlated outcome and the git author email it was attributed to. */
|
|
39
57
|
export declare function setSessionCorrelation(id: string, outcome: string, gitAuthorEmail: string | null): void;
|
|
58
|
+
/**
|
|
59
|
+
* Persist merge metadata for a shipped session.
|
|
60
|
+
* Called after correlation determines outcome = "shipped".
|
|
61
|
+
* Clears these fields for non-shipped sessions when called with nulls.
|
|
62
|
+
*/
|
|
63
|
+
export declare function setSessionMergeInfo(id: string, mergedPrNumber: number | null, mergedAt: string | null, timeToMergeMs: number | null): void;
|
|
64
|
+
/** Sessions needed for productivity metrics computation. */
|
|
65
|
+
export type MetricsSessionRow = {
|
|
66
|
+
id: string;
|
|
67
|
+
costUsd: number;
|
|
68
|
+
outcome: string;
|
|
69
|
+
gitBranch: string | null;
|
|
70
|
+
repoName: string | null;
|
|
71
|
+
workingDir: string;
|
|
72
|
+
startedAt: string;
|
|
73
|
+
gitAuthorEmail: string | null;
|
|
74
|
+
mergedPrNumber: number | null;
|
|
75
|
+
mergedAt: string | null;
|
|
76
|
+
timeToMergeMs: number | null;
|
|
77
|
+
};
|
|
78
|
+
export declare function getSessionsForMetrics(sinceIso?: string): MetricsSessionRow[];
|
|
40
79
|
/** Mark sessions as successfully synced (sets syncedAt, clears lastError). */
|
|
41
80
|
export declare function markSessionsSynced(ids: string[]): void;
|
|
81
|
+
/**
|
|
82
|
+
* Reset sync state for all sessions, forcing a full re-sync on next run.
|
|
83
|
+
* Called when switching to a different workspace so previous sessions are
|
|
84
|
+
* sent to the new workspace rather than silently skipped as already-synced.
|
|
85
|
+
*/
|
|
86
|
+
export declare function resetSyncState(): void;
|
|
42
87
|
/** Record a sync failure; leaves syncedAt NULL so the rows retry next run. */
|
|
43
88
|
export declare function recordSyncError(ids: string[], error: string): void;
|
|
44
89
|
export declare function setMeta(key: string, value: string): void;
|
|
45
90
|
export declare function getMeta(key: string): string | null;
|
|
91
|
+
export declare function getConnectionState(key: string): string | null;
|
|
92
|
+
export declare function setConnectionState(key: string, value: string): void;
|
|
93
|
+
/** Session IDs that have been successfully synced (syncedAt IS NOT NULL). */
|
|
94
|
+
export declare function getSyncedSessionIds(): string[];
|
|
95
|
+
/**
|
|
96
|
+
* Reset sync state for specific sessions so they are re-sent on the next sync.
|
|
97
|
+
* Used by reconcileWithManifest when sessions are missing from the backend.
|
|
98
|
+
*/
|
|
99
|
+
export declare function resetSyncStateForIds(ids: string[], reason: string): void;
|
|
100
|
+
/** Total number of sessions in the local DB (cheap COUNT, no row loading). */
|
|
101
|
+
export declare function getSessionCount(): number;
|
|
102
|
+
export type InsightRow = {
|
|
103
|
+
id: string;
|
|
104
|
+
detectorId: string;
|
|
105
|
+
repoName: string | null;
|
|
106
|
+
workspaceScope: string;
|
|
107
|
+
titleShort: string;
|
|
108
|
+
estimatedMonthlySavingsUsd: number;
|
|
109
|
+
confidence: string;
|
|
110
|
+
evidenceJson: string;
|
|
111
|
+
manualFix: string;
|
|
112
|
+
createdAt: string;
|
|
113
|
+
syncedAt: string | null;
|
|
114
|
+
};
|
|
115
|
+
/** Upsert a batch of insights; resets syncedAt so updated findings re-sync. */
|
|
116
|
+
export declare function upsertInsights(insights: Insight[]): void;
|
|
117
|
+
export declare function getUnsyncedInsights(): InsightRow[];
|
|
118
|
+
export declare function markInsightsSynced(ids: string[]): void;
|
|
119
|
+
/** Returns the last processed byte offset for a file path, or 0 if unseen. */
|
|
120
|
+
export declare function getFileOffset(filePath: string): number;
|
|
121
|
+
/** Record that a file has been fully processed up to the given byte offset. */
|
|
122
|
+
export declare function setFileOffset(filePath: string, byteOffset: number): void;
|
|
123
|
+
/** Return all file paths whose stored offset is less than the given current size map. */
|
|
124
|
+
export declare function getFilesNeedingScrape(currentSizes: Map<string, number>): string[];
|
|
125
|
+
export type AnomalyRow = {
|
|
126
|
+
id: string;
|
|
127
|
+
type: string;
|
|
128
|
+
repoName: string | null;
|
|
129
|
+
sessionId: string | null;
|
|
130
|
+
costUsd: number;
|
|
131
|
+
baselineUsd: number;
|
|
132
|
+
ratio: number;
|
|
133
|
+
detectedAt: string;
|
|
134
|
+
syncedAt: string | null;
|
|
135
|
+
};
|
|
136
|
+
/**
|
|
137
|
+
* Insert anomaly events that don't already exist (deduplication by stable id).
|
|
138
|
+
* Returns only the newly inserted events so callers can report them to the user.
|
|
139
|
+
*/
|
|
140
|
+
export declare function upsertAnomalies(events: AnomalyEvent[]): AnomalyEvent[];
|
|
141
|
+
export declare function getUnsyncedAnomalies(): AnomalyRow[];
|
|
142
|
+
export declare function markAnomaliesSynced(ids: string[]): void;
|
|
143
|
+
/** Daily cost totals per repo for the given time window; ordered by repoName, day ASC. */
|
|
144
|
+
export declare function getDailySessionCosts(since: string): {
|
|
145
|
+
repoName: string | null;
|
|
146
|
+
day: string;
|
|
147
|
+
dailyCost: number;
|
|
148
|
+
}[];
|
|
149
|
+
/** Sessions with a known developer email; ordered by gitAuthorEmail, costUsd ASC. */
|
|
150
|
+
export declare function getSessionsForAnomalyDetection(since: string): {
|
|
151
|
+
id: string;
|
|
152
|
+
gitAuthorEmail: string;
|
|
153
|
+
costUsd: number;
|
|
154
|
+
repoName: string | null;
|
|
155
|
+
}[];
|
|
156
|
+
/** All session fields except turnsJson, filtered by a [monthStart, monthEnd) window. */
|
|
157
|
+
export type ExportSessionRow = Omit<SessionRow, "turnsJson">;
|
|
158
|
+
export declare function getSessionsForExport(monthStart: string, monthEnd: string): ExportSessionRow[];
|
|
159
|
+
/**
|
|
160
|
+
* Total session cost since `monthStart`, broken down by repoName.
|
|
161
|
+
* Used to compute burn-rate for configured budgets.
|
|
162
|
+
*/
|
|
163
|
+
export declare function getMonthlyCosts(monthStart: string): {
|
|
164
|
+
byRepo: Map<string, number>;
|
|
165
|
+
total: number;
|
|
166
|
+
};
|
|
46
167
|
//# sourceMappingURL=store.d.ts.map
|
package/dist/db/store.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/db/store.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/db/store.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,eAAO,MAAM,eAAe,QAA0C,CAAC;AACvE,eAAO,MAAM,OAAO,QAAyC,CAAC;AAE9D,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,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