agentel 0.2.5 → 0.2.8
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 +77 -37
- package/docs/code-reference.md +26 -13
- package/docs/history-source-handling.md +247 -82
- package/docs/release.md +1 -1
- package/package.json +5 -2
- package/src/archive.js +200 -17
- package/src/canonical-events.js +74 -25
- package/src/cli.js +2561 -204
- package/src/config.js +11 -0
- package/src/doctor.js +2 -0
- package/src/importers/claude.js +309 -11
- package/src/importers/gemini.js +2 -1
- package/src/importers/providers.js +22 -0
- package/src/importers.js +2142 -212
- package/src/parser-versions.js +1 -0
- package/src/search.js +417 -176
- package/src/sources.js +1 -0
- package/src/web-export-instructions.js +79 -0
package/src/sources.js
CHANGED
|
@@ -6,6 +6,7 @@ const SOURCE_GROUPS = [
|
|
|
6
6
|
sources: [
|
|
7
7
|
{ source: "codex-cli", provider: "codex", sourceType: "codex-cli-history", label: "Codex CLI" },
|
|
8
8
|
{ source: "codex-desktop", provider: "codex", sourceType: "codex-desktop-history", label: "Codex Desktop" },
|
|
9
|
+
{ source: "codex-sdk", provider: "codex", sourceType: "codex-sdk-history", label: "Codex SDK jobs" },
|
|
9
10
|
{ source: "chatgpt", provider: "chatgpt", label: "ChatGPT" }
|
|
10
11
|
]
|
|
11
12
|
},
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const WEB_EXPORT_INSTRUCTIONS = {
|
|
4
|
+
chatgpt: {
|
|
5
|
+
source: "chatgpt",
|
|
6
|
+
provider: "chatgpt",
|
|
7
|
+
label: "ChatGPT",
|
|
8
|
+
requestUrl: "https://privacy.openai.com/policies/en/",
|
|
9
|
+
helpUrl: "https://help.openai.com/en/articles/7260999-how-do-i-export-my-chatgpt-history-and-data",
|
|
10
|
+
fileDescription: "official OpenAI export ZIP, then unzip it to the OpenAI-export/User Online Activity folder",
|
|
11
|
+
importCommand: "agentlog import chatgpt",
|
|
12
|
+
steps: [
|
|
13
|
+
"Open the OpenAI Privacy Portal, choose Make a Privacy Request, select I have a consumer ChatGPT account, then select Download my data.",
|
|
14
|
+
"Or in ChatGPT, open your profile menu, choose Settings, open Data Controls, then use Export Data.",
|
|
15
|
+
"Complete account verification and wait for the export email.",
|
|
16
|
+
"Download the ZIP before the email link expires.",
|
|
17
|
+
"For privacy-portal exports named OpenAI-export, unzip the outer download and pass the parent User Online Activity folder so split Conversations__...part-0001/0002 ZIPs or folders, manifests, and attached files are imported together."
|
|
18
|
+
],
|
|
19
|
+
notes: [
|
|
20
|
+
"OpenAI says ChatGPT Business and Enterprise chat exports are not available through the ChatGPT account export flow.",
|
|
21
|
+
"OpenAI export emails can take time to arrive, and the download link expires after 24 hours.",
|
|
22
|
+
"If your export has multiple Conversations__...chatgpt...part ZIPs or folders, import their parent folder rather than one part at a time."
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
"claude-web": {
|
|
26
|
+
source: "claude-web",
|
|
27
|
+
provider: "claude_web",
|
|
28
|
+
label: "Claude.ai",
|
|
29
|
+
requestUrl: "https://claude.ai/settings/privacy",
|
|
30
|
+
helpUrl: "https://support.claude.com/en/articles/9450526-how-can-i-export-my-claude-data",
|
|
31
|
+
fileDescription: "official Claude.ai data export ZIP or extracted folder",
|
|
32
|
+
importCommand: "agentlog import claude-web <path-to-export.zip> --username <email-or-name> --scope local",
|
|
33
|
+
steps: [
|
|
34
|
+
"Open Claude on the web or Claude Desktop and go to Settings > Privacy.",
|
|
35
|
+
"Click Export data.",
|
|
36
|
+
"Wait for Claude to email the download link to the address on the account.",
|
|
37
|
+
"Download the ZIP before the email link expires, then pass the ZIP or extracted folder to agentlog."
|
|
38
|
+
],
|
|
39
|
+
notes: [
|
|
40
|
+
"Claude's mobile apps cannot start a data export.",
|
|
41
|
+
"Claude requires you to be signed in when using the emailed download link, and the link expires after 24 hours."
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
function canonicalWebExportInstructionSource(source) {
|
|
47
|
+
const value = String(source || "").trim().toLowerCase().replace(/[_\s]+/g, "-");
|
|
48
|
+
if (value === "chatgpt" || value === "openai") return "chatgpt";
|
|
49
|
+
if (value === "claude-ai" || value === "claude-web") return "claude-web";
|
|
50
|
+
return "";
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function webExportInstructions(source) {
|
|
54
|
+
const key = canonicalWebExportInstructionSource(source);
|
|
55
|
+
return key ? WEB_EXPORT_INSTRUCTIONS[key] : null;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function manualImportInstructionResult(source) {
|
|
59
|
+
const instructions = webExportInstructions(source);
|
|
60
|
+
if (!instructions) throw new Error(`unknown web export instruction source: ${source}`);
|
|
61
|
+
return {
|
|
62
|
+
provider: instructions.provider,
|
|
63
|
+
source: instructions.source,
|
|
64
|
+
manual: true,
|
|
65
|
+
instructions,
|
|
66
|
+
discovered: 0,
|
|
67
|
+
candidates: 0,
|
|
68
|
+
imported: 0,
|
|
69
|
+
skipped: 0,
|
|
70
|
+
errors: []
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
module.exports = {
|
|
75
|
+
WEB_EXPORT_INSTRUCTIONS,
|
|
76
|
+
canonicalWebExportInstructionSource,
|
|
77
|
+
manualImportInstructionResult,
|
|
78
|
+
webExportInstructions
|
|
79
|
+
};
|