@lightcone-ai/daemon 0.14.9 → 0.14.10
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
|
@@ -109,13 +109,20 @@ async function internalApi({ serverUrl, machineApiKey, agentId, method, endpoint
|
|
|
109
109
|
return res.json();
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
function workspacePathFromMediaPath(filePath, workspaceId) {
|
|
112
|
+
export function workspacePathFromMediaPath(filePath, workspaceId) {
|
|
113
113
|
if (!filePath) return null;
|
|
114
114
|
|
|
115
115
|
const normalized = filePath.replaceAll('\\', '/');
|
|
116
116
|
const virtualMatch = normalized.match(/^\/agent-workspace\/([^/]+)\/workspace\/(.+)$/);
|
|
117
117
|
if (virtualMatch) return { workspaceId: virtualMatch[1], relPath: virtualMatch[2] };
|
|
118
118
|
|
|
119
|
+
const hostMatch = normalized.match(
|
|
120
|
+
/\/workspace\/([0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})\/((?:artifacts|notes|tmp)\/.+)$/i
|
|
121
|
+
);
|
|
122
|
+
if (hostMatch) {
|
|
123
|
+
return { workspaceId: hostMatch[1], relPath: hostMatch[2] };
|
|
124
|
+
}
|
|
125
|
+
|
|
119
126
|
const workspaceSegmentMatch = normalized.match(/\/workspace\/((?:artifacts|notes|tmp)\/.+)$/);
|
|
120
127
|
if (workspaceSegmentMatch) {
|
|
121
128
|
return { workspaceId, relPath: workspaceSegmentMatch[1] };
|