@gkorepanov/ccodex 0.5.0-rc.1 → 0.5.0-rc.2
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gkorepanov/ccodex",
|
|
3
|
-
"version": "0.5.0-rc.
|
|
3
|
+
"version": "0.5.0-rc.2",
|
|
4
4
|
"description": "Unofficial Codex App compatibility bridge for Codex CLI and Claude Code runtimes.",
|
|
5
5
|
"homepage": "https://github.com/gkorepanov/ccodex#readme",
|
|
6
6
|
"repository": {
|
|
@@ -65,9 +65,9 @@
|
|
|
65
65
|
"ws": "8.21.0"
|
|
66
66
|
},
|
|
67
67
|
"optionalDependencies": {
|
|
68
|
-
"@gkorepanov/ccodex-relay-darwin-arm64": "0.5.0-rc.
|
|
69
|
-
"@gkorepanov/ccodex-relay-linux-arm64-gnu": "0.5.0-rc.
|
|
70
|
-
"@gkorepanov/ccodex-relay-linux-x64-gnu": "0.5.0-rc.
|
|
68
|
+
"@gkorepanov/ccodex-relay-darwin-arm64": "0.5.0-rc.2",
|
|
69
|
+
"@gkorepanov/ccodex-relay-linux-arm64-gnu": "0.5.0-rc.2",
|
|
70
|
+
"@gkorepanov/ccodex-relay-linux-x64-gnu": "0.5.0-rc.2"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
73
|
"@openai/codex": "0.156.0",
|
|
@@ -35,7 +35,8 @@ const stock = new DatabaseSync(join(codexHome(), stockDb), { readOnly: true });
|
|
|
35
35
|
|
|
36
36
|
// Claude transcripts by session id.
|
|
37
37
|
const transcripts = new Map();
|
|
38
|
-
|
|
38
|
+
// Only directories: Finder leaves a `.DS_Store` among them.
|
|
39
|
+
for (const { name: directory } of existsSync(claudeProjects) ? readdirSync(claudeProjects, { withFileTypes: true }).filter((entry) => entry.isDirectory()) : []) {
|
|
39
40
|
for (const file of readdirSync(join(claudeProjects, directory))) {
|
|
40
41
|
if (file.endsWith(".jsonl")) transcripts.set(file.slice(0, -6), join(claudeProjects, directory, file));
|
|
41
42
|
}
|
|
@@ -205,8 +206,10 @@ function rowId(id) {
|
|
|
205
206
|
if (segments) return (segments.find((segment) => segment.threadId === id) ?? segments[0]).threadId;
|
|
206
207
|
return claudeThreads.get(id)?.claude_session_id ?? id;
|
|
207
208
|
}
|
|
208
|
-
|
|
209
|
-
|
|
209
|
+
// Older 0.4 states predate section orders.
|
|
210
|
+
const sectionOrders = state.prepare("select 1 from sqlite_master where type = 'table' and name = 'section_orders'").get()
|
|
211
|
+
? state.prepare("select section_id, order_json from section_orders").all() : [];
|
|
212
|
+
const sectionOrder = Object.fromEntries(sectionOrders.map((row) => [row.section_id, JSON.parse(row.order_json).map(rowId)]));
|
|
210
213
|
|
|
211
214
|
const existing = existsSync(metaPath) ? JSON.parse(readFileSync(metaPath, "utf8")) : {};
|
|
212
215
|
const meta = {
|