botmux 2.105.0 → 2.106.0
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/adapters/cli/read-isolation.d.ts +2 -1
- package/dist/adapters/cli/read-isolation.d.ts.map +1 -1
- package/dist/adapters/cli/read-isolation.js +51 -4
- package/dist/adapters/cli/read-isolation.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +19 -0
- package/dist/cli.js.map +1 -1
- package/dist/core/command-handler.d.ts.map +1 -1
- package/dist/core/command-handler.js +2 -1
- package/dist/core/command-handler.js.map +1 -1
- package/dist/core/passthrough-commands.d.ts.map +1 -1
- package/dist/core/passthrough-commands.js +1 -1
- package/dist/core/passthrough-commands.js.map +1 -1
- package/dist/core/session-manager.d.ts +1 -1
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +22 -3
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/types.d.ts +3 -3
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/worker-pool.d.ts +4 -0
- package/dist/core/worker-pool.d.ts.map +1 -1
- package/dist/core/worker-pool.js +27 -9
- package/dist/core/worker-pool.js.map +1 -1
- package/dist/daemon.d.ts +31 -8
- package/dist/daemon.d.ts.map +1 -1
- package/dist/daemon.js +750 -67
- package/dist/daemon.js.map +1 -1
- package/dist/dashboard/settings-write-applier.d.ts +5 -0
- package/dist/dashboard/settings-write-applier.d.ts.map +1 -1
- package/dist/dashboard/settings-write-applier.js +2 -2
- package/dist/dashboard/settings-write-applier.js.map +1 -1
- package/dist/dashboard/web/settings-page.d.ts.map +1 -1
- package/dist/dashboard/web/settings-page.js +13 -4
- package/dist/dashboard/web/settings-page.js.map +1 -1
- package/dist/dashboard-web/app.js +1 -1
- package/dist/dashboard-web/chunks/settings-page-R23I3IZG.js +2 -0
- package/dist/dashboard-web/style.css +11 -0
- package/dist/dashboard.js +239 -62
- package/dist/dashboard.js.map +1 -1
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +1 -0
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/zh.d.ts.map +1 -1
- package/dist/i18n/zh.js +1 -0
- package/dist/i18n/zh.js.map +1 -1
- package/dist/im/lark/event-dispatcher.d.ts.map +1 -1
- package/dist/im/lark/event-dispatcher.js +11 -0
- package/dist/im/lark/event-dispatcher.js.map +1 -1
- package/dist/im/lark/message-parser.d.ts +6 -0
- package/dist/im/lark/message-parser.d.ts.map +1 -1
- package/dist/im/lark/message-parser.js +14 -0
- package/dist/im/lark/message-parser.js.map +1 -1
- package/dist/services/vc-meeting-runtime-store.d.ts +4 -0
- package/dist/services/vc-meeting-runtime-store.d.ts.map +1 -1
- package/dist/services/vc-meeting-runtime-store.js +26 -0
- package/dist/services/vc-meeting-runtime-store.js.map +1 -1
- package/dist/setup/open-platform-automation.d.ts +20 -0
- package/dist/setup/open-platform-automation.d.ts.map +1 -1
- package/dist/setup/open-platform-automation.js +78 -1
- package/dist/setup/open-platform-automation.js.map +1 -1
- package/dist/types.d.ts +5 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/vc-agent/cards.d.ts +2 -0
- package/dist/vc-agent/cards.d.ts.map +1 -1
- package/dist/vc-agent/cards.js +18 -2
- package/dist/vc-agent/cards.js.map +1 -1
- package/dist/vc-agent/normalizer.d.ts.map +1 -1
- package/dist/vc-agent/normalizer.js +59 -0
- package/dist/vc-agent/normalizer.js.map +1 -1
- package/dist/vc-agent/polling-source.d.ts +28 -0
- package/dist/vc-agent/polling-source.d.ts.map +1 -1
- package/dist/vc-agent/polling-source.js +57 -5
- package/dist/vc-agent/polling-source.js.map +1 -1
- package/dist/vc-agent/types.d.ts +1 -0
- package/dist/vc-agent/types.d.ts.map +1 -1
- package/dist/worker.js +48 -8
- package/dist/worker.js.map +1 -1
- package/dist/workflows/definition.d.ts +14 -14
- package/dist/workflows/events/payloads.d.ts +8 -8
- package/dist/workflows/events/schema.d.ts +452 -452
- package/package.json +1 -1
- package/dist/dashboard-web/chunks/settings-page-CRDIHRNE.js +0 -2
package/dist/worker.js
CHANGED
|
@@ -390,6 +390,10 @@ let readyFlushSettleTimer = null;
|
|
|
390
390
|
* holds (just like the gate) so a message arriving mid-settle can't type-ahead
|
|
391
391
|
* past the settle and re-trigger paste-burst. */
|
|
392
392
|
let isSettlingFirstFlush = false;
|
|
393
|
+
/** IdleDetector can fire during the post-ready settle. Do not mark the prompt
|
|
394
|
+
* ready yet, or flushPending will be blocked by isSettlingFirstFlush and a
|
|
395
|
+
* later markPromptReady call would return early with the first prompt stranded. */
|
|
396
|
+
let promptReadyDetectedDuringSettle = false;
|
|
393
397
|
/** Wait until the PTY has been quiet for READY_FLUSH_SETTLE_MS (Ink render
|
|
394
398
|
* drained), capped at READY_FLUSH_SETTLE_CAP_MS, then flush the held prompt.
|
|
395
399
|
* A real SessionStart/BOTMUX_READY_COMMAND signal is itself authoritative
|
|
@@ -401,8 +405,10 @@ function settleThenFlush(startedAtMs, promptReadyAfterSettle) {
|
|
|
401
405
|
const quietForMs = now - lastPtyOutputAtMs;
|
|
402
406
|
if (quietForMs >= READY_FLUSH_SETTLE_MS || now - startedAtMs >= READY_FLUSH_SETTLE_CAP_MS) {
|
|
403
407
|
isSettlingFirstFlush = false;
|
|
404
|
-
|
|
405
|
-
|
|
408
|
+
const shouldMarkPromptReady = promptReadyAfterSettle || promptReadyDetectedDuringSettle;
|
|
409
|
+
promptReadyDetectedDuringSettle = false;
|
|
410
|
+
log(`Ready-gate settle done (quiet ${quietForMs}ms); ${shouldMarkPromptReady ? 'marking prompt ready' : 'delivering held first prompt'}`);
|
|
411
|
+
if (shouldMarkPromptReady) {
|
|
406
412
|
markPromptReady();
|
|
407
413
|
return;
|
|
408
414
|
}
|
|
@@ -3309,6 +3315,11 @@ function markPromptReady() {
|
|
|
3309
3315
|
log('Idle detected but holding for SessionStart ready signal (startup selector guard)');
|
|
3310
3316
|
return;
|
|
3311
3317
|
}
|
|
3318
|
+
if (isSettlingFirstFlush) {
|
|
3319
|
+
promptReadyDetectedDuringSettle = true;
|
|
3320
|
+
log('Idle detected during ready-gate settle; deferring prompt-ready until settle completes');
|
|
3321
|
+
return;
|
|
3322
|
+
}
|
|
3312
3323
|
isPromptReady = true;
|
|
3313
3324
|
// CLI 实际启动成功(回到 prompt):复位连续重启计数。
|
|
3314
3325
|
// 任何能到这一步的 spawn 都算"成功"——后续即便再崩溃(不是 resume 目标不存在
|
|
@@ -5197,6 +5208,7 @@ function spawnCli(cfg) {
|
|
|
5197
5208
|
readyFlushSettleTimer = null;
|
|
5198
5209
|
}
|
|
5199
5210
|
isSettlingFirstFlush = false;
|
|
5211
|
+
promptReadyDetectedDuringSettle = false;
|
|
5200
5212
|
// Reset quiescence baseline so the settle measures silence from THIS spawn.
|
|
5201
5213
|
lastPtyOutputAtMs = Date.now();
|
|
5202
5214
|
if (shouldArmReadyGate({
|
|
@@ -5325,6 +5337,7 @@ function killCli() {
|
|
|
5325
5337
|
readyFlushSettleTimer = null;
|
|
5326
5338
|
}
|
|
5327
5339
|
isSettlingFirstFlush = false;
|
|
5340
|
+
promptReadyDetectedDuringSettle = false;
|
|
5328
5341
|
stopScreenAnalyzer();
|
|
5329
5342
|
stopScreenUpdates();
|
|
5330
5343
|
backend?.kill();
|
|
@@ -5862,12 +5875,35 @@ window.addEventListener('resize',onViewportResize);
|
|
|
5862
5875
|
// doesn't compound into a whole screen. px<0 = scroll up (toward history). The
|
|
5863
5876
|
// per-call cap stops a single huge delta (page tick / fling) from over-firing.
|
|
5864
5877
|
var _scrollAccum=0;var _SCROLL_STEP=33;
|
|
5865
|
-
|
|
5878
|
+
// Map a viewport pixel (clientX/Y) to a 1-based terminal cell "col;row", clamped to
|
|
5879
|
+
// the grid. The forwarded SGR wheel event MUST carry the cell UNDER THE POINTER, the
|
|
5880
|
+
// way a physical terminal reports it: zone-routed alt-screen TUIs — OpenCode (Bubble
|
|
5881
|
+
// Tea + bubblezone) — only scroll when the wheel lands inside the messages viewport's
|
|
5882
|
+
// mouse zone. A fixed (1,1) is the top-left border, outside that zone, so every
|
|
5883
|
+
// forwarded wheel was dropped and OpenCode wouldn't scroll at all. Coordinate-agnostic
|
|
5884
|
+
// CLIs (Claude Code etc.) scroll regardless of coords, which is why ONLY OpenCode broke.
|
|
5885
|
+
// Fall back to the grid CENTRE (never 1,1) when the screen geometry can't be read.
|
|
5886
|
+
function _cellAt(clientX,clientY){
|
|
5887
|
+
var col=(term.cols>>1)+1,row=(term.rows>>1)+1;
|
|
5888
|
+
try{
|
|
5889
|
+
var sc=term.element&&term.element.querySelector('.xterm-screen');
|
|
5890
|
+
var r=sc&&sc.getBoundingClientRect();
|
|
5891
|
+
if(r&&r.width>0&&r.height>0){
|
|
5892
|
+
col=Math.floor((clientX-r.left)/(r.width/term.cols))+1;
|
|
5893
|
+
row=Math.floor((clientY-r.top)/(r.height/term.rows))+1;
|
|
5894
|
+
}
|
|
5895
|
+
}catch(_e){}
|
|
5896
|
+
if(col<1)col=1;else if(col>term.cols)col=term.cols;
|
|
5897
|
+
if(row<1)row=1;else if(row>term.rows)row=term.rows;
|
|
5898
|
+
return col+';'+row;
|
|
5899
|
+
}
|
|
5900
|
+
function _fwdScroll(px,coord){
|
|
5866
5901
|
if(!ws_||ws_.readyState!==1)return;
|
|
5902
|
+
coord=coord||(((term.cols>>1)+1)+';'+((term.rows>>1)+1)); // never (1,1)
|
|
5867
5903
|
_scrollAccum+=px;var data='',n=0;
|
|
5868
5904
|
while(Math.abs(_scrollAccum)>=_SCROLL_STEP&&n<6){
|
|
5869
5905
|
var up=_scrollAccum<0; // px<0 → wheel-up (history)
|
|
5870
|
-
data+='\\x1b[<'+(up?64:65)+';
|
|
5906
|
+
data+='\\x1b[<'+(up?64:65)+';'+coord+'M';
|
|
5871
5907
|
_scrollAccum+=up?_SCROLL_STEP:-_SCROLL_STEP;n++;
|
|
5872
5908
|
}
|
|
5873
5909
|
if(data)ws_.send(JSON.stringify({type:'input',data:data}));
|
|
@@ -5883,7 +5919,7 @@ if(!${isTmuxMode && !isPipeMode}){
|
|
|
5883
5919
|
e.preventDefault();e.stopPropagation();
|
|
5884
5920
|
// Normalise deltaMode to px: line→~16px, page→~one screen.
|
|
5885
5921
|
var px=e.deltaMode===1?e.deltaY*16:e.deltaMode===2?e.deltaY*term.rows*16:e.deltaY;
|
|
5886
|
-
_fwdScroll(px);
|
|
5922
|
+
_fwdScroll(px,_cellAt(e.clientX,e.clientY)); // report the cell under the pointer
|
|
5887
5923
|
},{capture:true,passive:false});
|
|
5888
5924
|
}
|
|
5889
5925
|
|
|
@@ -5932,7 +5968,8 @@ if(!${isTmuxMode && !isPipeMode}){
|
|
|
5932
5968
|
if(term.buffer.active.type!=='alternate'||_tLastY===null||e.touches.length!==1)return;
|
|
5933
5969
|
e.preventDefault();e.stopPropagation();
|
|
5934
5970
|
var y=e.touches[0].clientY;
|
|
5935
|
-
|
|
5971
|
+
// finger drags down (y grows) → px<0 → scroll up (history); report the touched cell
|
|
5972
|
+
_fwdScroll(_tLastY-y,_cellAt(e.touches[0].clientX,y));
|
|
5936
5973
|
_tLastY=y;
|
|
5937
5974
|
},{capture:true,passive:false});
|
|
5938
5975
|
_tTerm.addEventListener('touchend',function(){_tLastY=null;},{capture:true,passive:true});
|
|
@@ -5943,10 +5980,13 @@ if(!${isTmuxMode && !isPipeMode}){
|
|
|
5943
5980
|
}
|
|
5944
5981
|
// ─── IPC Communication ───────────────────────────────────────────────────────
|
|
5945
5982
|
function send(msg) {
|
|
5946
|
-
|
|
5983
|
+
const payload = msg.type === 'final_output' && sessionId
|
|
5984
|
+
? { ...msg, sessionId }
|
|
5985
|
+
: msg;
|
|
5986
|
+
if (isWorkflowWorker() && payload.type === 'final_output') {
|
|
5947
5987
|
workflowFinalOutputSent = true;
|
|
5948
5988
|
}
|
|
5949
|
-
process.send?.(
|
|
5989
|
+
process.send?.(payload);
|
|
5950
5990
|
}
|
|
5951
5991
|
function log(msg) {
|
|
5952
5992
|
const ts = new Date().toISOString();
|