agentel 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/LICENSE +21 -0
- package/README.md +452 -0
- package/agentlog-spec.md +551 -0
- package/bin/agentlog-recall.js +8 -0
- package/bin/agentlog.js +14 -0
- package/docs/code-reference.md +1108 -0
- package/docs/history-source-handling.md +837 -0
- package/docs/release.md +69 -0
- package/package.json +57 -0
- package/src/archive.js +1130 -0
- package/src/autostart.js +182 -0
- package/src/canonical-events.js +575 -0
- package/src/cli.js +7928 -0
- package/src/collector.js +113 -0
- package/src/commands/logs.js +51 -0
- package/src/commands/server.js +11 -0
- package/src/config.js +240 -0
- package/src/doctor.js +102 -0
- package/src/importers/aider.js +553 -0
- package/src/importers/claude.js +349 -0
- package/src/importers/cline.js +471 -0
- package/src/importers/gemini.js +795 -0
- package/src/importers/providers.js +149 -0
- package/src/importers/shared.js +15 -0
- package/src/importers.js +7063 -0
- package/src/mcp.js +148 -0
- package/src/parser-versions.js +62 -0
- package/src/paths.js +61 -0
- package/src/redaction.js +228 -0
- package/src/repo.js +106 -0
- package/src/search.js +619 -0
- package/src/sources.js +86 -0
- package/src/supervisor.js +217 -0
- package/src/sync.js +677 -0
- package/src/version.js +7 -0
- package/src/web-accounts.js +122 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const PROVIDER_ADAPTERS = [
|
|
4
|
+
{
|
|
5
|
+
source: "codex",
|
|
6
|
+
provider: "codex",
|
|
7
|
+
label: "Codex",
|
|
8
|
+
run: ({ helpers, since, options, env }) => helpers.importCodexProvider("codex", since, options, env)
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
source: "codex-cli",
|
|
12
|
+
provider: "codex",
|
|
13
|
+
sourceType: "codex-cli-history",
|
|
14
|
+
label: "Codex CLI",
|
|
15
|
+
run: ({ helpers, since, options, env }) =>
|
|
16
|
+
helpers.importCodexProvider("codex", since, { ...options, codexSource: "cli" }, env)
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
source: "codex-desktop",
|
|
20
|
+
provider: "codex",
|
|
21
|
+
sourceType: "codex-desktop-history",
|
|
22
|
+
label: "Codex Desktop",
|
|
23
|
+
run: ({ helpers, since, options, env }) =>
|
|
24
|
+
helpers.importCodexProvider("codex", since, { ...options, codexSource: "vscode" }, env)
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
source: "claude",
|
|
28
|
+
provider: "claude_code",
|
|
29
|
+
sourceType: "cli-history",
|
|
30
|
+
label: "Claude Code CLI",
|
|
31
|
+
run: ({ helpers, since, options, env }) => helpers.importJsonlProvider("claude_code", helpers.claudeRoots(env), since, options, env)
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
source: "claude-sdk",
|
|
35
|
+
provider: "claude_sdk",
|
|
36
|
+
sourceType: "claude-sdk-history",
|
|
37
|
+
label: "Claude SDK",
|
|
38
|
+
run: ({ helpers, since, options, env }) => helpers.importJsonlProvider("claude_sdk", helpers.claudeRoots(env), since, options, env)
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
source: "claude-desktop",
|
|
42
|
+
provider: "claude_desktop",
|
|
43
|
+
label: "Claude Desktop",
|
|
44
|
+
run: ({ helpers, since, options, env }) => helpers.importClaudeDesktopProvider("claude_desktop", since, options, env)
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
source: "claude-code-desktop",
|
|
48
|
+
provider: "claude_desktop",
|
|
49
|
+
sourceType: "claude-code-desktop-metadata",
|
|
50
|
+
label: "Claude Code Desktop",
|
|
51
|
+
run: ({ helpers, since, options, env }) =>
|
|
52
|
+
helpers.importClaudeDesktopProvider("claude_desktop", since, { ...options, claudeDesktopKind: "claude-code-desktop-metadata" }, env)
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
source: "claude-workspace",
|
|
56
|
+
provider: "claude_desktop",
|
|
57
|
+
sourceType: "claude-workspace-desktop",
|
|
58
|
+
label: "Claude Workspace",
|
|
59
|
+
run: ({ helpers, since, options, env }) =>
|
|
60
|
+
helpers.importClaudeDesktopProvider("claude_desktop", since, { ...options, claudeDesktopKind: "claude-workspace-desktop" }, env)
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
source: "cursor",
|
|
64
|
+
provider: "cursor",
|
|
65
|
+
label: "Cursor",
|
|
66
|
+
run: ({ helpers, since, options, env }) => helpers.importCursorProvider("cursor", since, options, env)
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
source: "cline",
|
|
70
|
+
provider: "cline",
|
|
71
|
+
sourceType: "cline-task-history",
|
|
72
|
+
label: "Cline",
|
|
73
|
+
run: ({ helpers, since, options, env }) =>
|
|
74
|
+
helpers.importStructuredProvider("cline", helpers.readClineSessions(env, options), since, options, env)
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
source: "opencode",
|
|
78
|
+
provider: "opencode",
|
|
79
|
+
sourceType: "opencode-history",
|
|
80
|
+
label: "OpenCode",
|
|
81
|
+
run: ({ helpers, since, options, env }) =>
|
|
82
|
+
helpers.importStructuredProvider("opencode", helpers.readOpenCodeSessions(env, options), since, options, env)
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
source: "aider",
|
|
86
|
+
provider: "aider",
|
|
87
|
+
sourceType: "aider-chat-history",
|
|
88
|
+
label: "Aider",
|
|
89
|
+
run: ({ helpers, since, options, env }) =>
|
|
90
|
+
helpers.importStructuredProvider("aider", helpers.readAiderSessions(env, options), since, options, env)
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
source: "gemini-cli",
|
|
94
|
+
provider: "gemini_cli",
|
|
95
|
+
sourceType: "gemini-cli-history",
|
|
96
|
+
label: "Gemini CLI",
|
|
97
|
+
run: ({ helpers, since, options, env }) =>
|
|
98
|
+
helpers.importStructuredProvider("gemini_cli", helpers.readGeminiCliSessions(options, env), since, options, env)
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
source: "windsurf",
|
|
102
|
+
provider: "windsurf",
|
|
103
|
+
label: "Windsurf",
|
|
104
|
+
disabled: true,
|
|
105
|
+
run: ({ helpers }) => helpers.disabledImportResult("windsurf")
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
source: "antigravity",
|
|
109
|
+
provider: "antigravity",
|
|
110
|
+
sourceType: "antigravity-history",
|
|
111
|
+
label: "Antigravity",
|
|
112
|
+
run: ({ helpers, since, options, env }) =>
|
|
113
|
+
helpers.importStructuredProvider("antigravity", helpers.readAntigravitySessions(options, env), since, options, env)
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
source: "devin-cli",
|
|
117
|
+
provider: "devin",
|
|
118
|
+
sourceType: "devin-cli-history",
|
|
119
|
+
label: "Devin CLI",
|
|
120
|
+
run: ({ helpers, since, options, env }) =>
|
|
121
|
+
helpers.importStructuredProvider("devin", helpers.readDevinSessions(env, options), since, options, env)
|
|
122
|
+
}
|
|
123
|
+
];
|
|
124
|
+
|
|
125
|
+
function providerAdapterForSource(source) {
|
|
126
|
+
const key = String(source || "").trim();
|
|
127
|
+
return PROVIDER_ADAPTERS.find((adapter) => adapter.source === key) || null;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
function importSourceWithAdapter(source, context, helpers) {
|
|
131
|
+
const adapter = providerAdapterForSource(source);
|
|
132
|
+
if (!adapter) throw new Error(`unknown import source: ${source}`);
|
|
133
|
+
return adapter.run({
|
|
134
|
+
...context,
|
|
135
|
+
options: { ...(context.options || {}), progressProvider: adapter.provider },
|
|
136
|
+
helpers
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
function providerAdapterSources() {
|
|
141
|
+
return PROVIDER_ADAPTERS.map((adapter) => adapter.source);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
module.exports = {
|
|
145
|
+
PROVIDER_ADAPTERS,
|
|
146
|
+
importSourceWithAdapter,
|
|
147
|
+
providerAdapterForSource,
|
|
148
|
+
providerAdapterSources
|
|
149
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function parseSince(value) {
|
|
4
|
+
if (!value || value === "all") return null;
|
|
5
|
+
const match = String(value).match(/^(\d+)([dhm])$/);
|
|
6
|
+
if (!match) throw new Error(`invalid --since value: ${value}; expected 30d, 12h, 60m, or all`);
|
|
7
|
+
const amount = Number(match[1]);
|
|
8
|
+
const unit = match[2];
|
|
9
|
+
const ms = unit === "d" ? amount * 86400000 : unit === "h" ? amount * 3600000 : amount * 60000;
|
|
10
|
+
return new Date(Date.now() - ms);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
module.exports = {
|
|
14
|
+
parseSince
|
|
15
|
+
};
|