modelstat 0.0.47 → 0.0.48
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/cli.mjs +11 -12
- package/dist/cli.mjs.map +1 -1
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -44932,11 +44932,7 @@ var init_ids2 = __esm({
|
|
|
44932
44932
|
});
|
|
44933
44933
|
|
|
44934
44934
|
// ../../packages/companion-core/src/queue/index.ts
|
|
44935
|
-
function
|
|
44936
|
-
const segmentByEvent = /* @__PURE__ */ new Map();
|
|
44937
|
-
for (const seg of segments) {
|
|
44938
|
-
for (const id of seg.source_event_ids) segmentByEvent.set(id, seg.segment_id);
|
|
44939
|
-
}
|
|
44935
|
+
function attachSegmentIdsByMap(calls, segmentByEvent) {
|
|
44940
44936
|
return calls.map((c) => ({
|
|
44941
44937
|
...c,
|
|
44942
44938
|
segment_id: segmentByEvent.get(c.source_event_id) ?? null
|
|
@@ -46327,16 +46323,19 @@ async function scanAll(cb = {}) {
|
|
|
46327
46323
|
} catch (e) {
|
|
46328
46324
|
console.warn("session titling failed \u2014 shipping batch untitled:", e.message);
|
|
46329
46325
|
}
|
|
46326
|
+
const callSegmentByEvent = /* @__PURE__ */ new Map();
|
|
46327
|
+
for (const sessionId of new Set(toolCallBuffer.map((c) => c.session_id))) {
|
|
46328
|
+
for (const seg of runSegmentsBySession.get(sessionId) ?? []) {
|
|
46329
|
+
for (const id of seg.source_event_ids) callSegmentByEvent.set(id, seg.segment_id);
|
|
46330
|
+
}
|
|
46331
|
+
}
|
|
46330
46332
|
const batch = {
|
|
46331
46333
|
batch_id: batchId(),
|
|
46332
46334
|
device_id: deviceId,
|
|
46333
46335
|
agent_version: AGENT_VERSION,
|
|
46334
46336
|
events,
|
|
46335
46337
|
segments,
|
|
46336
|
-
|
|
46337
|
-
// each call to the segment covering its source event (null when
|
|
46338
|
-
// no segment covers it — e.g. codex response_item anchors).
|
|
46339
|
-
tool_calls: attachSegmentIds(toolCallBuffer, segments),
|
|
46338
|
+
tool_calls: attachSegmentIdsByMap(toolCallBuffer, callSegmentByEvent),
|
|
46340
46339
|
...Object.keys(sessionTitles).length ? { session_titles: sessionTitles } : {}
|
|
46341
46340
|
};
|
|
46342
46341
|
cb.onUpload?.({ events: events.length, segments: segments.length });
|
|
@@ -46398,7 +46397,7 @@ var init_scan = __esm({
|
|
|
46398
46397
|
init_api();
|
|
46399
46398
|
init_config2();
|
|
46400
46399
|
init_pipeline2();
|
|
46401
|
-
AGENT_VERSION = true ? "agent-0.0.
|
|
46400
|
+
AGENT_VERSION = true ? "agent-0.0.48" : "agent-dev";
|
|
46402
46401
|
BATCH_MAX_EVENTS = 2e3;
|
|
46403
46402
|
BATCH_MAX_TOOL_CALLS = 2e4;
|
|
46404
46403
|
BATCH_BUFFER_HARD_CAP = BATCH_MAX_EVENTS * 2;
|
|
@@ -48658,7 +48657,7 @@ var init_daemon = __esm({
|
|
|
48658
48657
|
init_lock();
|
|
48659
48658
|
init_scan();
|
|
48660
48659
|
init_single_flight();
|
|
48661
|
-
AGENT_VERSION2 = true ? "agent-0.0.
|
|
48660
|
+
AGENT_VERSION2 = true ? "agent-0.0.48" : "agent-dev";
|
|
48662
48661
|
HEARTBEAT_INTERVAL_MS = 1e4;
|
|
48663
48662
|
SCAN_INTERVAL_MS = 5 * 60 * 1e3;
|
|
48664
48663
|
DISCOVERY_INTERVAL_MS = 6e4;
|
|
@@ -49223,7 +49222,7 @@ function tryOpenBrowser(url) {
|
|
|
49223
49222
|
return false;
|
|
49224
49223
|
}
|
|
49225
49224
|
}
|
|
49226
|
-
var AGENT_VERSION3 = true ? "agent-0.0.
|
|
49225
|
+
var AGENT_VERSION3 = true ? "agent-0.0.48" : "agent-dev";
|
|
49227
49226
|
function osFamily() {
|
|
49228
49227
|
const p = platform4();
|
|
49229
49228
|
if (p === "darwin") return "macos";
|