imcodes 2026.4.1777-dev.1753 → 2026.4.1780-dev.1756
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/src/daemon/command-handler.d.ts.map +1 -1
- package/dist/src/daemon/command-handler.js +26 -0
- package/dist/src/daemon/command-handler.js.map +1 -1
- package/dist/src/daemon/lifecycle.d.ts.map +1 -1
- package/dist/src/daemon/lifecycle.js +14 -0
- package/dist/src/daemon/lifecycle.js.map +1 -1
- package/dist/src/daemon/server-link.d.ts.map +1 -1
- package/dist/src/daemon/server-link.js +12 -0
- package/dist/src/daemon/server-link.js.map +1 -1
- package/dist/src/daemon/supervision-automation.d.ts.map +1 -1
- package/dist/src/daemon/supervision-automation.js +26 -4
- package/dist/src/daemon/supervision-automation.js.map +1 -1
- package/dist/src/daemon/supervisor-defaults-cache.d.ts +13 -0
- package/dist/src/daemon/supervisor-defaults-cache.d.ts.map +1 -0
- package/dist/src/daemon/supervisor-defaults-cache.js +78 -0
- package/dist/src/daemon/supervisor-defaults-cache.js.map +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-handler.d.ts","sourceRoot":"","sources":["../../../src/daemon/command-handler.ts"],"names":[],"mappings":"AAOA,OAAO,EAA0D,KAAK,aAAa,EAAE,MAAM,2BAA2B,CAAC;AACvH,OAAO,EAAqC,KAAK,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEpG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAyBnD,OAAO,EAAsE,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AA8f3H,wBAAsB,yBAAyB,CAAC,UAAU,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAqBtF;AAoID,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,SAAS,E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BAA0B,IAAI,IAAI,CAcjD;AA0VD,KAAK,QAAQ,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAAE,CAAC;AAEzD,iFAAiF;AACjF,wBAAgB,0BAA0B,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,GAAG,MAAM,CAa3E;AAED,gEAAgE;AAChE,wBAAgB,2BAA2B,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,GAAG,MAAM,CAI5E;AAED,wCAAwC;AACxC,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,GAAG,MAAM,CAEtE;AAED,uDAAuD;AACvD,wBAAsB,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC,CAEhL"}
|
|
@@ -2807,11 +2807,19 @@ async function handleTimelineHistory(cmd, serverLink) {
|
|
|
2807
2807
|
logger.warn('timeline.history_request: missing sessionName');
|
|
2808
2808
|
return;
|
|
2809
2809
|
}
|
|
2810
|
+
// Instrumentation: measure disk-read + parse + synthesize + serialize so
|
|
2811
|
+
// we can watch p95/p99 of user-visible history-pull latency over time.
|
|
2812
|
+
// (Was previously unmeasured — see daemon.log grep for empty results.)
|
|
2813
|
+
const tStart = Date.now();
|
|
2814
|
+
let readMs = 0;
|
|
2815
|
+
let synthesizeMs = 0;
|
|
2810
2816
|
// Read generously from disk — session.state events are excluded from the limit budget
|
|
2811
2817
|
// so we need to read more to ensure enough substantive events.
|
|
2812
2818
|
// Do NOT filter by epoch — history should include events across daemon restarts.
|
|
2813
2819
|
const readLimit = Math.min(limit * 6, 10000);
|
|
2820
|
+
const tRead0 = Date.now();
|
|
2814
2821
|
const events = timelineStore.read(sessionName, { limit: readLimit, afterTs, beforeTs });
|
|
2822
|
+
readMs = Date.now() - tRead0;
|
|
2815
2823
|
// Content-aware limit: session.state events don't count toward the budget.
|
|
2816
2824
|
// This prevents idle↔running oscillation storms from crowding out user.message events.
|
|
2817
2825
|
const substantive = [];
|
|
@@ -2836,6 +2844,7 @@ async function handleTimelineHistory(cmd, serverLink) {
|
|
|
2836
2844
|
}
|
|
2837
2845
|
const record = await recoverOpenCodeSessionRecord(getSession(sessionName));
|
|
2838
2846
|
if (record?.agentType === 'opencode' && record.projectDir && record.opencodeSessionId) {
|
|
2847
|
+
const tSyn0 = Date.now();
|
|
2839
2848
|
try {
|
|
2840
2849
|
const { exportOpenCodeSession, buildTimelineEventsFromOpenCodeExport } = await import('./opencode-history.js');
|
|
2841
2850
|
const exportData = await exportOpenCodeSession(record.projectDir, record.opencodeSessionId);
|
|
@@ -2852,6 +2861,7 @@ async function handleTimelineHistory(cmd, serverLink) {
|
|
|
2852
2861
|
catch (err) {
|
|
2853
2862
|
logger.debug({ err, sessionName, opencodeSessionId: record.opencodeSessionId }, 'Failed to synthesize OpenCode timeline history');
|
|
2854
2863
|
}
|
|
2864
|
+
synthesizeMs = Date.now() - tSyn0;
|
|
2855
2865
|
}
|
|
2856
2866
|
try {
|
|
2857
2867
|
serverLink.send({
|
|
@@ -2863,6 +2873,22 @@ async function handleTimelineHistory(cmd, serverLink) {
|
|
|
2863
2873
|
});
|
|
2864
2874
|
}
|
|
2865
2875
|
catch { /* not connected */ }
|
|
2876
|
+
// One line per pull. Fields: server-side disk/parse time, opencode
|
|
2877
|
+
// synthesis time (0 for normal sessions), total handler time, counts.
|
|
2878
|
+
// Hot-enough path that info-level is appropriate — expect ~1 pull per
|
|
2879
|
+
// user session-open event, bounded by web-side cooldown.
|
|
2880
|
+
const totalMs = Date.now() - tStart;
|
|
2881
|
+
logger.info({
|
|
2882
|
+
sessionName,
|
|
2883
|
+
requestId,
|
|
2884
|
+
limit,
|
|
2885
|
+
afterTs,
|
|
2886
|
+
eventsReturned: trimmed.length,
|
|
2887
|
+
eventsRead: events.length,
|
|
2888
|
+
readMs,
|
|
2889
|
+
synthesizeMs,
|
|
2890
|
+
totalMs,
|
|
2891
|
+
}, 'timeline.history served');
|
|
2866
2892
|
}
|
|
2867
2893
|
// ── Sub-session handlers ──────────────────────────────────────────────────
|
|
2868
2894
|
async function handleSubSessionStart(cmd, serverLink) {
|