agentel 0.2.8 → 0.3.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 +238 -68
- package/docs/code-reference.md +165 -37
- package/docs/history-source-handling.md +555 -124
- package/docs/release.md +35 -8
- package/npm-shrinkwrap.json +478 -0
- package/package.json +18 -5
- package/scripts/postinstall.js +156 -0
- package/src/archive.js +1176 -65
- package/src/canonical-events.js +346 -35
- package/src/cli.js +7801 -874
- package/src/collector.js +42 -4
- package/src/config.js +51 -4
- package/src/diffs.js +156 -0
- package/src/doctor.js +48 -5
- package/src/importers/claude.js +51 -4
- package/src/importers/copilot.js +385 -0
- package/src/importers/cursor-recovery.js +22 -0
- package/src/importers/factory.js +396 -0
- package/src/importers/gemini.js +39 -0
- package/src/importers/grok.js +367 -0
- package/src/importers/pi.js +422 -0
- package/src/importers/providers.js +64 -5
- package/src/importers.js +4524 -383
- package/src/mcp.js +1 -0
- package/src/memory-sources.js +671 -0
- package/src/memory-store.js +0 -0
- package/src/parser-versions.js +13 -0
- package/src/pricing.js +84 -0
- package/src/search.js +256 -70
- package/src/session-store.js +405 -0
- package/src/slack-notify.js +732 -0
- package/src/source-watch.js +293 -0
- package/src/sources.js +60 -11
- package/src/supervisor.js +231 -7
- package/src/sync.js +6 -0
- package/src/unavailable-sources.js +358 -0
package/src/parser-versions.js
CHANGED
|
@@ -20,6 +20,11 @@ const PARSER_VERSION_SUFFIXES = {
|
|
|
20
20
|
"cursor-raw-sqlite-salvage": 0,
|
|
21
21
|
"cursor-agent-transcripts": 0,
|
|
22
22
|
"devin-cli-history": 0,
|
|
23
|
+
"devin-desktop-acp-events": 0,
|
|
24
|
+
"copilot-cli-history": 0,
|
|
25
|
+
"factory-droid-history": 0,
|
|
26
|
+
"grok-build-history": 0,
|
|
27
|
+
"pi-cli-history": 0,
|
|
23
28
|
"gemini-cli-history": 0,
|
|
24
29
|
"cline-task-history": 0,
|
|
25
30
|
"opencode-cli-history": 0,
|
|
@@ -31,7 +36,15 @@ const PARSER_VERSION_SUFFIXES = {
|
|
|
31
36
|
"opencode-sqlite-history": 0,
|
|
32
37
|
"aider-chat-history": 0,
|
|
33
38
|
"antigravity-history": 0,
|
|
39
|
+
"antigravity-transcript-log": 0,
|
|
40
|
+
"antigravity-cli-transcript-log": 0,
|
|
41
|
+
"antigravity-cli-brain": 0,
|
|
42
|
+
"antigravity-ide-transcript-log": 0,
|
|
43
|
+
"antigravity-ide-brain": 0,
|
|
44
|
+
"antigravity-summary-proto": 0,
|
|
34
45
|
"antigravity-trajectory-summary": 0,
|
|
46
|
+
"windsurf-cascade-brain": 0,
|
|
47
|
+
"windsurf-cascade-protobuf": 0,
|
|
35
48
|
"windsurf-trajectory-export": 0,
|
|
36
49
|
"web-chat-export": 0,
|
|
37
50
|
"chatgpt-export": 0,
|
package/src/pricing.js
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const PRICING_VERSION = "2026-06-10-api-v1";
|
|
4
|
+
const PRICING_SOURCE = "agentlog-pricing-table";
|
|
5
|
+
|
|
6
|
+
function pricingForSession(provider, model) {
|
|
7
|
+
// ChatGPT web exports use dash-style slugs (gpt-5-2-thinking); normalize to
|
|
8
|
+
// the dot-style API ids the table is keyed on (gpt-5.2).
|
|
9
|
+
const text = String(model || "").toLowerCase().replace(/gpt-(\d)-(\d)/g, "gpt-$1.$2");
|
|
10
|
+
const providerKey = String(provider || "").toLowerCase();
|
|
11
|
+
if (!text || text === "__unknown_model__") return null;
|
|
12
|
+
if (/gpt-5(\.\d)?-pro/.test(text)) return price("OpenAI GPT-5 Pro", 15, 120, 1.875);
|
|
13
|
+
if (text.includes("gpt-5.5")) return price("OpenAI GPT-5.5", 2.5, 15, 0.25);
|
|
14
|
+
if (text.includes("gpt-5.4-mini")) return price("OpenAI GPT-5.4 Mini", 0.375, 2.25, 0.0375);
|
|
15
|
+
if (text.includes("gpt-5.4-nano")) return price("OpenAI GPT-5.4 Nano", 0.1, 0.625, 0.01);
|
|
16
|
+
if (text.includes("gpt-5.4")) return price("OpenAI GPT-5.4", 1.25, 7.5, 0.125);
|
|
17
|
+
if (text.includes("gpt-5.3-codex") || text.includes("gpt-5.2-codex") || (providerKey === "codex" && text.includes("gpt-5.2"))) {
|
|
18
|
+
return price("OpenAI Codex", 1.75, 14, 0.175);
|
|
19
|
+
}
|
|
20
|
+
if (providerKey === "codex" && text.includes("gpt-5.1-codex")) return price("OpenAI Codex", 1.75, 14, 0.175);
|
|
21
|
+
if (text.includes("gpt-5.3") || text.includes("gpt-5.2")) return price("OpenAI Codex", 1.75, 14, 0.175);
|
|
22
|
+
if (text.includes("gpt-5-mini") || text.includes("gpt-5-t-mini")) return price("OpenAI GPT-5 Mini", 0.25, 2, 0.025);
|
|
23
|
+
if (text.includes("gpt-5")) return price("OpenAI GPT-5/5.1", 1.25, 10, 0.125);
|
|
24
|
+
if (text.includes("chatgpt-4o-latest") || text.includes("chatgpt-chat-latest")) {
|
|
25
|
+
return price("OpenAI ChatGPT latest", 5, 30, 0.5);
|
|
26
|
+
}
|
|
27
|
+
if (text.includes("gpt-4o-mini")) return price("OpenAI GPT-4o Mini", 0.15, 0.6, 0.075);
|
|
28
|
+
if (text.includes("gpt-4o")) return price("OpenAI GPT-4o", 2.5, 10, 1.25);
|
|
29
|
+
if (text.includes("gpt-4.5")) return price("OpenAI GPT-4.5", 75, 150, 37.5);
|
|
30
|
+
if (text.includes("gpt-4.1-mini")) return price("OpenAI GPT-4.1 Mini", 0.4, 1.6, 0.1);
|
|
31
|
+
if (text.includes("gpt-4.1")) return price("OpenAI GPT-4.1", 2, 8, 0.5);
|
|
32
|
+
if (text.includes("gpt-4")) return price("OpenAI GPT-4 legacy", 30, 60, 30);
|
|
33
|
+
if (text.includes("o1-pro")) return price("OpenAI o1 Pro", 150, 600, 150);
|
|
34
|
+
if (text.includes("o3-pro")) return price("OpenAI o3 Pro", 20, 80, 20);
|
|
35
|
+
if (text.includes("o3-mini") || text.includes("o4-mini") || text.includes("o1-mini")) {
|
|
36
|
+
return price("OpenAI o-series Mini", 1.1, 4.4, 0.55);
|
|
37
|
+
}
|
|
38
|
+
if (/\bo1(-preview)?\b/.test(text)) return price("OpenAI o1", 15, 60, 7.5);
|
|
39
|
+
if (/\bo3\b/.test(text)) return price("OpenAI o3", 2, 8, 0.5);
|
|
40
|
+
if (text.includes("davinci")) return price("OpenAI GPT-3 Davinci", 20, 20, 20);
|
|
41
|
+
if (text.includes("gemini")) {
|
|
42
|
+
if (text.includes("flash") && (text.includes("3.5") || text.includes("3-5"))) {
|
|
43
|
+
return price("Google Gemini 3.5 Flash", 1.5, 9, 0.15);
|
|
44
|
+
}
|
|
45
|
+
if (text.includes("flash") && (text.includes("gemini-3") || text.includes("gemini 3"))) {
|
|
46
|
+
return price("Google Gemini 3 Flash", 0.5, 3, 0.05);
|
|
47
|
+
}
|
|
48
|
+
if (text.includes("pro") && (text.includes("gemini-3") || text.includes("gemini 3"))) {
|
|
49
|
+
return price("Google Gemini 3 Pro", 2, 12, 0.2);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
if (text.includes("fable")) return price("Anthropic Claude Fable 5", 10, 50, 1, 12.5);
|
|
53
|
+
if (text.includes("claude") || text.includes("opus") || text.includes("sonnet") || text.includes("haiku")) {
|
|
54
|
+
if (text.includes("opus") && (text.includes("4-8") || text.includes("4.8") || text.includes("4-7") || text.includes("4.7") || text.includes("4-6") || text.includes("4.6") || text.includes("4-5") || text.includes("4.5"))) {
|
|
55
|
+
return price("Anthropic Claude Opus 4.5+", 5, 25, 0.5, 6.25);
|
|
56
|
+
}
|
|
57
|
+
if (text.includes("opus")) return price("Anthropic Claude Opus 4/4.1", 15, 75, 1.5, 18.75);
|
|
58
|
+
if (text.includes("sonnet")) return price("Anthropic Claude Sonnet 4.x", 3, 15, 0.3, 3.75);
|
|
59
|
+
if (text.includes("haiku") && (text.includes("4-5") || text.includes("4.5"))) {
|
|
60
|
+
return price("Anthropic Claude Haiku 4.5", 1, 5, 0.1, 1.25);
|
|
61
|
+
}
|
|
62
|
+
if (text.includes("haiku")) return price("Anthropic Claude Haiku", 0.8, 4, 0.08, 1);
|
|
63
|
+
}
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function price(label, inputUsdPerMtok, outputUsdPerMtok, cacheReadUsdPerMtok, cacheWriteUsdPerMtok) {
|
|
68
|
+
return {
|
|
69
|
+
label,
|
|
70
|
+
source: PRICING_SOURCE,
|
|
71
|
+
version: PRICING_VERSION,
|
|
72
|
+
currency: "USD",
|
|
73
|
+
inputUsdPerMtok,
|
|
74
|
+
outputUsdPerMtok,
|
|
75
|
+
cacheReadUsdPerMtok,
|
|
76
|
+
cacheWriteUsdPerMtok
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
module.exports = {
|
|
81
|
+
PRICING_SOURCE,
|
|
82
|
+
PRICING_VERSION,
|
|
83
|
+
pricingForSession
|
|
84
|
+
};
|