@anytowork/cli 0.12.51 → 0.12.52
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 +1 -1
- package/src/mt/dsh.js +5 -2
- package/src/mt/inrun.js +5 -1
package/package.json
CHANGED
package/src/mt/dsh.js
CHANGED
|
@@ -114,8 +114,11 @@ function applyEvent(st, o) {
|
|
|
114
114
|
if (!o || typeof o !== 'object') return;
|
|
115
115
|
const d = o.data && typeof o.data === 'object' ? o.data : {};
|
|
116
116
|
if (o.type === 'session') {
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
// v0.38.33: the real log keeps id and cwd at the top level of the session line (not under `data`); both read.
|
|
118
|
+
const sid = o.id || d.id;
|
|
119
|
+
const cwd = typeof o.cwd === 'string' ? o.cwd : d.cwd;
|
|
120
|
+
if (sid) st.sid = String(sid);
|
|
121
|
+
if (typeof cwd === 'string') st.cwd = cwd;
|
|
119
122
|
return;
|
|
120
123
|
}
|
|
121
124
|
if (o.type !== 'assistant/message') return;
|
package/src/mt/inrun.js
CHANGED
|
@@ -248,7 +248,11 @@ export class RunUsageTracker {
|
|
|
248
248
|
try {
|
|
249
249
|
for (const c of src.read().calls) {
|
|
250
250
|
if (c.seenMs < since || c.seenMs > until || c.seenMs > now - settleMs) continue;
|
|
251
|
-
if (!c.cwd
|
|
251
|
+
if (!c.cwd) continue;
|
|
252
|
+
// v0.38.33: DSH records the folder it was started from (the home folder), not the Agent's work folder. A run that
|
|
253
|
+
// the start command names as dsh takes the dsh calls made from the home folder inside its own time window.
|
|
254
|
+
const harnessHome = src.program === 'dsh' && r.prog === 'dsh' && norm(c.cwd) === norm(home);
|
|
255
|
+
if (!harnessHome && !dirMatches(c.cwd, r.dirs, home)) continue;
|
|
252
256
|
rows.push(callRow(c, { program: src.program, reader: src.reader, attribution: attributionOfCalls, taskRef: r.taskRef, workdirId: workdirOf(c.cwd) }));
|
|
253
257
|
}
|
|
254
258
|
} catch { /* one unreadable log never blocks the others */ }
|