@dreamlake/dreamlake-cli 0.97.0 → 0.97.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/dist/api/workspace.js
CHANGED
|
@@ -69,13 +69,13 @@ export function nodesApi(t) {
|
|
|
69
69
|
return {
|
|
70
70
|
list: (query = {}) => call(t, "GET", "/nodes", undefined, query),
|
|
71
71
|
children: (query) => call(t, "GET", "/nodes/children", undefined, query),
|
|
72
|
-
descendants: (id, query = {}) => call(t, "GET", `/nodes/${seg(id)}/descendants`, undefined, { includeArchived: false
|
|
72
|
+
descendants: (id, query = {}) => call(t, "GET", `/nodes/${seg(id)}/descendants`, undefined, { ...query, includeArchived: query.includeArchived ?? false }),
|
|
73
73
|
/** Only folder nodes are archivable; the server enforces kind and write access. */
|
|
74
74
|
archive: (id) => call(t, "PATCH", `/nodes/${seg(id)}`, { archived: true }),
|
|
75
75
|
unarchive: (id) => call(t, "PATCH", `/nodes/${seg(id)}`, { archived: false }),
|
|
76
76
|
lookup: (query) => call(t, "GET", "/nodes/lookup", undefined, query),
|
|
77
77
|
episodes: (id, query = {}) => call(t, "GET", `/nodes/${seg(id)}/episodes`, undefined, query),
|
|
78
|
-
contents: (id, query = {}) => call(t, "GET", `/nodes/${seg(id)}/contents`, undefined, query),
|
|
78
|
+
contents: (id, query = {}) => call(t, "GET", `/nodes/${seg(id)}/contents`, undefined, { ...query, includeArchived: query.includeArchived ?? false }),
|
|
79
79
|
update: (id, input) => call(t, "PATCH", `/nodes/${seg(id)}`, input),
|
|
80
80
|
delete: (id) => call(t, "DELETE", `/nodes/${seg(id)}`),
|
|
81
81
|
download: (id) => call(t, "GET", `/nodes/${seg(id)}/download`),
|
package/dist/cli/resources.js
CHANGED
|
@@ -124,7 +124,7 @@ export async function fetchAllContents(remote, token, nodeId, kind, options = {}
|
|
|
124
124
|
for (;;) {
|
|
125
125
|
const data = await requestJson(remote, `/nodes/${nodeId}/contents`, {
|
|
126
126
|
token,
|
|
127
|
-
query: { page, pageSize: 500, kind: kind ?? undefined, ...options },
|
|
127
|
+
query: { page, pageSize: 500, kind: kind ?? undefined, ...options, includeArchived: options.includeArchived ?? false },
|
|
128
128
|
});
|
|
129
129
|
const batch = data.files ?? [];
|
|
130
130
|
files.push(...batch);
|
|
@@ -97,6 +97,17 @@ export function transcriptFacts(provider, path, headBytes = 256 * 1024, tailByte
|
|
|
97
97
|
} });
|
|
98
98
|
const facts = { cwd: null, nativeSessionId: null, createdAt: null, lastRole: null, lastAt: stat.mtimeMs, messages: 0, title: null };
|
|
99
99
|
const stamp = (value) => typeof value === 'string' && Number.isFinite(Date.parse(value)) ? Date.parse(value) : null;
|
|
100
|
+
// Claude writes `{type:'ai-title',aiTitle}` (many, last wins) and `{type:'custom-title',customTitle}` on rename (always wins); `title` is kept as a fallback for older exports.
|
|
101
|
+
let renamed = false;
|
|
102
|
+
const title = (row) => { if (row.type === 'custom-title' && typeof row.customTitle === 'string') {
|
|
103
|
+
facts.title = row.customTitle;
|
|
104
|
+
renamed = true;
|
|
105
|
+
}
|
|
106
|
+
else if (row.type === 'ai-title' && !renamed) {
|
|
107
|
+
const t = typeof row.aiTitle === 'string' ? row.aiTitle : row.title;
|
|
108
|
+
if (typeof t === 'string')
|
|
109
|
+
facts.title = t;
|
|
110
|
+
} };
|
|
100
111
|
for (const row of rows(head)) {
|
|
101
112
|
if (provider === 'codex' && row.type === 'session_meta') {
|
|
102
113
|
facts.cwd ??= typeof row.payload?.cwd === 'string' ? row.payload.cwd : null;
|
|
@@ -109,8 +120,7 @@ export function transcriptFacts(provider, path, headBytes = 256 * 1024, tailByte
|
|
|
109
120
|
facts.createdAt ??= stamp(row.timestamp);
|
|
110
121
|
if (typeof row.sessionId === 'string')
|
|
111
122
|
facts.nativeSessionId ??= row.sessionId;
|
|
112
|
-
|
|
113
|
-
facts.title = row.title;
|
|
123
|
+
title(row);
|
|
114
124
|
}
|
|
115
125
|
}
|
|
116
126
|
// The tail may start mid-line; the first fragment is dropped by the JSON parse.
|
|
@@ -122,8 +132,8 @@ export function transcriptFacts(provider, path, headBytes = 256 * 1024, tailByte
|
|
|
122
132
|
facts.lastRole = role;
|
|
123
133
|
facts.messages++;
|
|
124
134
|
}
|
|
125
|
-
if (provider === 'claude'
|
|
126
|
-
|
|
135
|
+
if (provider === 'claude')
|
|
136
|
+
title(row);
|
|
127
137
|
}
|
|
128
138
|
return facts;
|
|
129
139
|
}
|
package/dist/cli/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "0.97.
|
|
1
|
+
export declare const VERSION = "0.97.2";
|
package/dist/cli/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dreamlake/dreamlake-cli",
|
|
3
|
-
"version": "0.97.
|
|
3
|
+
"version": "0.97.2",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/dreamlake-ai/dreamlake-cli.git"
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
"node": ">=18"
|
|
36
36
|
},
|
|
37
37
|
"optionalDependencies": {
|
|
38
|
-
"@dreamlake/dreamlake-cli-darwin-arm64": "0.97.
|
|
39
|
-
"@dreamlake/dreamlake-cli-darwin-x64": "0.97.
|
|
40
|
-
"@dreamlake/dreamlake-cli-linux-x64": "0.97.
|
|
41
|
-
"@dreamlake/dreamlake-cli-linux-arm64": "0.97.
|
|
42
|
-
"@dreamlake/dreamlake-cli-linux-x64-musl": "0.97.
|
|
43
|
-
"@dreamlake/dreamlake-cli-linux-arm64-musl": "0.97.
|
|
44
|
-
"@dreamlake/dreamlake-cli-win32-x64": "0.97.
|
|
45
|
-
"@dreamlake/dreamlake-cli-win32-arm64": "0.97.
|
|
38
|
+
"@dreamlake/dreamlake-cli-darwin-arm64": "0.97.2",
|
|
39
|
+
"@dreamlake/dreamlake-cli-darwin-x64": "0.97.2",
|
|
40
|
+
"@dreamlake/dreamlake-cli-linux-x64": "0.97.2",
|
|
41
|
+
"@dreamlake/dreamlake-cli-linux-arm64": "0.97.2",
|
|
42
|
+
"@dreamlake/dreamlake-cli-linux-x64-musl": "0.97.2",
|
|
43
|
+
"@dreamlake/dreamlake-cli-linux-arm64-musl": "0.97.2",
|
|
44
|
+
"@dreamlake/dreamlake-cli-win32-x64": "0.97.2",
|
|
45
|
+
"@dreamlake/dreamlake-cli-win32-arm64": "0.97.2"
|
|
46
46
|
}
|
|
47
47
|
}
|