@ramarivera/coding-agent-langfuse 0.1.3 → 0.1.4

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.
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { pathToFileURL } from "node:url";
3
3
 
4
- const moduleUrl = pathToFileURL(new URL("../src/backfill.ts", import.meta.url).pathname);
4
+ const moduleUrl = pathToFileURL(new URL("../dist/backfill.js", import.meta.url).pathname);
5
5
  const { main } = await import(moduleUrl.href);
6
6
 
7
7
  await main(process.argv.slice(2));
@@ -0,0 +1,64 @@
1
+ #!/usr/bin/env node
2
+ type AgentName = "claude" | "codex" | "grok" | "opencode" | "pi";
3
+ type Usage = {
4
+ input?: number;
5
+ output?: number;
6
+ reasoning?: number;
7
+ cacheRead?: number;
8
+ cacheWrite?: number;
9
+ total?: number;
10
+ cost?: number;
11
+ };
12
+ type BackfillEvent = {
13
+ agent: AgentName;
14
+ sourcePath: string;
15
+ sessionId: string;
16
+ recordId: string;
17
+ name: string;
18
+ role?: string;
19
+ model?: string;
20
+ provider?: string;
21
+ cwd?: string;
22
+ startMs: number;
23
+ endMs?: number;
24
+ input?: unknown;
25
+ output?: unknown;
26
+ usage?: Usage;
27
+ metadata?: Record<string, unknown>;
28
+ parentRecordId?: string;
29
+ };
30
+ type BackfillOptions = {
31
+ agents: Set<AgentName>;
32
+ endpoint: string;
33
+ statePath: string;
34
+ homeDir: string;
35
+ dryRun: boolean;
36
+ limit?: number;
37
+ sinceMs?: number;
38
+ untilMs?: number;
39
+ batchSize: number;
40
+ };
41
+ type RunSummary = {
42
+ discovered: Record<string, number>;
43
+ sent: number;
44
+ skipped: number;
45
+ failed: number;
46
+ notAttempted: number;
47
+ aborted: boolean;
48
+ error?: string;
49
+ dryRun: boolean;
50
+ endpoint: string;
51
+ statePath: string;
52
+ };
53
+ declare function parseArgs(argv: string[]): BackfillOptions;
54
+ declare function codexEvents(homeDir: string): BackfillEvent[];
55
+ declare function claudeEvents(homeDir: string): BackfillEvent[];
56
+ declare function piEvents(homeDir: string): BackfillEvent[];
57
+ declare function grokEvents(homeDir: string): BackfillEvent[];
58
+ declare function opencodeEvents(homeDir: string, rowLimit?: number): BackfillEvent[];
59
+ declare function fingerprint(event: BackfillEvent): string;
60
+ declare function toOtlp(events: BackfillEvent[]): Record<string, unknown>;
61
+ declare function discoverEvents(options: BackfillOptions): BackfillEvent[];
62
+ declare function run(options: BackfillOptions): Promise<RunSummary>;
63
+ declare function main(argv?: string[]): Promise<RunSummary>;
64
+ export { type BackfillEvent, type BackfillOptions, claudeEvents, codexEvents, discoverEvents, fingerprint, grokEvents, main, opencodeEvents, parseArgs, piEvents, run, toOtlp, };