@agentsky/sky 2.20.2 → 2.21.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/dist/{chunk-HB7SPKQ5.js → chunk-6JMFB3CV.js} +1 -1
- package/dist/{chunk-WTFBVTMI.js → chunk-ZZ6UF7QA.js} +1 -1
- package/dist/index.js +24 -13
- package/dist/{trace-HTWXINXI.js → trace-NMBMU4GS.js} +1 -1
- package/dist/{trace-library-QR54Q4Z3.js → trace-library-OWYB75AR.js} +96 -10
- package/package.json +3 -2
- package/vendor/trace-collect/SOURCE.json +6 -0
- package/vendor/trace-collect/collect.mjs +75 -0
- package/vendor/trace-collect/identity.d.ts +8 -0
- package/vendor/trace-collect/identity.mjs +23 -0
- package/vendor/trace-collect/muse.mjs +87 -0
- package/vendor/trace-collect/normalize.d.ts +6 -0
- package/vendor/trace-collect/normalize.mjs +312 -0
- package/vendor/trace-collect/scrub.d.ts +2 -0
- package/vendor/trace-collect/scrub.mjs +186 -0
- package/vendor/trace-collect/sinks/agentsky.mjs +156 -0
- package/vendor/trace-collect/sources/_cline-family.mjs +182 -0
- package/vendor/trace-collect/sources/_project-root.mjs +40 -0
- package/vendor/trace-collect/sources/amp.mjs +18 -0
- package/vendor/trace-collect/sources/chatgpt.mjs +203 -0
- package/vendor/trace-collect/sources/claude-ai.mjs +94 -0
- package/vendor/trace-collect/sources/claude-code.mjs +4 -0
- package/vendor/trace-collect/sources/claude-desktop.mjs +87 -0
- package/vendor/trace-collect/sources/cline.mjs +14 -0
- package/vendor/trace-collect/sources/codex.mjs +4 -0
- package/vendor/trace-collect/sources/continue.mjs +117 -0
- package/vendor/trace-collect/sources/copilot-chat.mjs +145 -0
- package/vendor/trace-collect/sources/cursor-chat.mjs +274 -0
- package/vendor/trace-collect/sources/cursor.mjs +4 -0
- package/vendor/trace-collect/sources/deepseek.mjs +172 -0
- package/vendor/trace-collect/sources/dsh.mjs +145 -0
- package/vendor/trace-collect/sources/gemini-cli.mjs +113 -0
- package/vendor/trace-collect/sources/gemini.mjs +150 -0
- package/vendor/trace-collect/sources/goose.mjs +93 -0
- package/vendor/trace-collect/sources/grok-cli.mjs +110 -0
- package/vendor/trace-collect/sources/grok.mjs +83 -0
- package/vendor/trace-collect/sources/hermes.mjs +4 -0
- package/vendor/trace-collect/sources/index.mjs +119 -0
- package/vendor/trace-collect/sources/jan.mjs +134 -0
- package/vendor/trace-collect/sources/kilo-code.mjs +14 -0
- package/vendor/trace-collect/sources/kiro.mjs +77 -0
- package/vendor/trace-collect/sources/lm-studio.mjs +84 -0
- package/vendor/trace-collect/sources/muse.mjs +11 -0
- package/vendor/trace-collect/sources/opencode.mjs +109 -0
- package/vendor/trace-collect/sources/qwen-code.mjs +95 -0
- package/vendor/trace-collect/sources/roo-code.mjs +14 -0
- package/vendor/trace-collect/sources/zed.mjs +70 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
// Zed editor AI assistant conversation history.
|
|
2
|
+
// Conversations are stored as JSON files in:
|
|
3
|
+
// macOS: ~/Library/Application Support/Zed/conversations/*.json
|
|
4
|
+
// Linux: ~/.local/share/zed/conversations/*.json
|
|
5
|
+
//
|
|
6
|
+
// Each file is one conversation:
|
|
7
|
+
// { id, zed_version?, title?, timestamp (ISO string), model?,
|
|
8
|
+
// messages: [{ id, role:"user"|"assistant", content (string), metadata? }] }
|
|
9
|
+
//
|
|
10
|
+
// Reference: https://github.com/zed-industries/zed – crates/ai/src/conversation.rs
|
|
11
|
+
// and community-documented ~/.config/zed conversation exports.
|
|
12
|
+
|
|
13
|
+
import fs from "node:fs";
|
|
14
|
+
import path from "node:path";
|
|
15
|
+
import { createHash } from "node:crypto";
|
|
16
|
+
import { FORMAT } from "../normalize.mjs";
|
|
17
|
+
|
|
18
|
+
const ROOTS = [
|
|
19
|
+
path.join("Library", "Application Support", "Zed", "conversations"), // macOS
|
|
20
|
+
path.join(".local", "share", "zed", "conversations"), // Linux
|
|
21
|
+
];
|
|
22
|
+
|
|
23
|
+
function readJson(p) {
|
|
24
|
+
try { return JSON.parse(fs.readFileSync(p, "utf8")); } catch { return null; }
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export default {
|
|
28
|
+
id: "zed",
|
|
29
|
+
name: "Zed AI Assistant",
|
|
30
|
+
kind: "local",
|
|
31
|
+
roots: (home) => ROOTS.map((r) => path.join(home, r)),
|
|
32
|
+
|
|
33
|
+
*collect(root) {
|
|
34
|
+
let entries;
|
|
35
|
+
try { entries = fs.readdirSync(root); } catch { return; }
|
|
36
|
+
|
|
37
|
+
for (const f of entries) {
|
|
38
|
+
if (!f.endsWith(".json")) continue;
|
|
39
|
+
const filePath = path.join(root, f);
|
|
40
|
+
const data = readJson(filePath);
|
|
41
|
+
if (!data || !Array.isArray(data.messages)) continue;
|
|
42
|
+
|
|
43
|
+
const messages = [];
|
|
44
|
+
for (const msg of data.messages) {
|
|
45
|
+
const role = msg.role;
|
|
46
|
+
if (role !== "user" && role !== "assistant") continue;
|
|
47
|
+
const text = typeof msg.content === "string" ? msg.content : "";
|
|
48
|
+
if (text) messages.push({ role, text });
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (!messages.some((m) => m.role === "user")) continue;
|
|
52
|
+
|
|
53
|
+
const convId = data.id || f.slice(0, -5);
|
|
54
|
+
const sid = createHash("sha256").update(`zed:${convId}`).digest("hex").slice(0, 16);
|
|
55
|
+
const started = data.timestamp ? new Date(data.timestamp).toISOString() : null;
|
|
56
|
+
|
|
57
|
+
yield {
|
|
58
|
+
format: FORMAT,
|
|
59
|
+
harness: "zed",
|
|
60
|
+
session_id: sid,
|
|
61
|
+
model: data.model || "",
|
|
62
|
+
title: data.title || "",
|
|
63
|
+
started_at: started,
|
|
64
|
+
ended_at: started,
|
|
65
|
+
cwd: "",
|
|
66
|
+
messages,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
};
|