botmux 3.14.0 → 3.15.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/.runtime-build-id +1 -1
- package/dist/adapters/backend/tmux-pipe-backend.d.ts +30 -0
- package/dist/adapters/backend/tmux-pipe-backend.d.ts.map +1 -1
- package/dist/adapters/backend/tmux-pipe-backend.js +60 -0
- package/dist/adapters/backend/tmux-pipe-backend.js.map +1 -1
- package/dist/adapters/backend/types.d.ts +7 -0
- package/dist/adapters/backend/types.d.ts.map +1 -1
- package/dist/adapters/backend/types.js.map +1 -1
- package/dist/adapters/cli/cursor.d.ts.map +1 -1
- package/dist/adapters/cli/cursor.js +13 -1
- package/dist/adapters/cli/cursor.js.map +1 -1
- package/dist/adapters/cli/dsh.d.ts.map +1 -1
- package/dist/adapters/cli/dsh.js +5 -1
- package/dist/adapters/cli/dsh.js.map +1 -1
- package/dist/adapters/cli/pi.d.ts +14 -1
- package/dist/adapters/cli/pi.d.ts.map +1 -1
- package/dist/adapters/cli/pi.js +21 -1
- package/dist/adapters/cli/pi.js.map +1 -1
- package/dist/adapters/cli/shared-hints.d.ts.map +1 -1
- package/dist/adapters/cli/shared-hints.js +29 -24
- package/dist/adapters/cli/shared-hints.js.map +1 -1
- package/dist/adapters/cli/types.d.ts +4 -0
- package/dist/adapters/cli/types.d.ts.map +1 -1
- package/dist/bot-registry.d.ts +22 -0
- package/dist/bot-registry.d.ts.map +1 -1
- package/dist/bot-registry.js +24 -0
- package/dist/bot-registry.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +8 -3
- package/dist/cli.js.map +1 -1
- package/dist/core/command-discovery.d.ts.map +1 -1
- package/dist/core/command-discovery.js +4 -1
- package/dist/core/command-discovery.js.map +1 -1
- package/dist/core/dashboard-ipc-server.d.ts.map +1 -1
- package/dist/core/dashboard-ipc-server.js +42 -1
- package/dist/core/dashboard-ipc-server.js.map +1 -1
- package/dist/core/skills/frontmatter.d.ts.map +1 -1
- package/dist/core/skills/frontmatter.js +6 -1
- package/dist/core/skills/frontmatter.js.map +1 -1
- package/dist/core/worker-pool.d.ts.map +1 -1
- package/dist/core/worker-pool.js +21 -8
- package/dist/core/worker-pool.js.map +1 -1
- package/dist/daemon.d.ts.map +1 -1
- package/dist/daemon.js +4 -10
- package/dist/daemon.js.map +1 -1
- package/dist/dashboard/bot-payload.d.ts +4 -0
- package/dist/dashboard/bot-payload.d.ts.map +1 -1
- package/dist/dashboard/bot-payload.js +1 -0
- package/dist/dashboard/bot-payload.js.map +1 -1
- package/dist/dashboard/web/bot-defaults-page.d.ts +7 -0
- package/dist/dashboard/web/bot-defaults-page.d.ts.map +1 -1
- package/dist/dashboard/web/bot-defaults-page.js +96 -1
- package/dist/dashboard/web/bot-defaults-page.js.map +1 -1
- package/dist/dashboard/web/bot-defaults.d.ts +2 -0
- package/dist/dashboard/web/bot-defaults.d.ts.map +1 -1
- package/dist/dashboard/web/bot-defaults.js.map +1 -1
- package/dist/dashboard/web/i18n.d.ts.map +1 -1
- package/dist/dashboard/web/i18n.js +8 -0
- package/dist/dashboard/web/i18n.js.map +1 -1
- package/dist/dashboard/web/skills-page.d.ts.map +1 -1
- package/dist/dashboard/web/skills-page.js +4 -2
- package/dist/dashboard/web/skills-page.js.map +1 -1
- package/dist/dashboard-web/app.js +1 -1
- package/dist/dashboard-web/chunks/bot-defaults-page-65SMZ4QY.js +10 -0
- package/dist/dashboard-web/chunks/{chunk-2WQDS65D.js → chunk-IKN6WURK.js} +1 -1
- package/dist/dashboard-web/chunks/{chunk-Q2MT4VWH.js → chunk-VMWNR3SV.js} +4 -4
- package/dist/dashboard-web/chunks/{chunk-6O7KXFD2.js → chunk-Z7B3E3US.js} +1 -1
- package/dist/dashboard-web/chunks/{chunk-U3ZFSO7E.js → chunk-Z7DO42GJ.js} +1 -1
- package/dist/dashboard-web/chunks/{connectors-page-2KZO5KSJ.js → connectors-page-CPH6VVFY.js} +1 -1
- package/dist/dashboard-web/chunks/{feedback-page-CLVTOLLO.js → feedback-page-J2FKQ3LK.js} +1 -1
- package/dist/dashboard-web/chunks/{groups-page-HLASRTSY.js → groups-page-VDOOLS4M.js} +1 -1
- package/dist/dashboard-web/chunks/{insights-page-4RPU2CRU.js → insights-page-A2LWTKJD.js} +1 -1
- package/dist/dashboard-web/chunks/{monitor-room-OTKQ2CXK.js → monitor-room-2YR752E3.js} +1 -1
- package/dist/dashboard-web/chunks/{monitoring-page-IJPUB6JT.js → monitoring-page-BGYSKZGM.js} +1 -1
- package/dist/dashboard-web/chunks/{office-page-QSR3J44Y.js → office-page-ZZHTEAE4.js} +1 -1
- package/dist/dashboard-web/chunks/{overview-page-6OK63V4V.js → overview-page-7NYPKQSB.js} +1 -1
- package/dist/dashboard-web/chunks/{roles-page-6NWJMOB5.js → roles-page-YUC4YLJG.js} +1 -1
- package/dist/dashboard-web/chunks/{schedules-page-6I3LNXD4.js → schedules-page-2L2NKTDJ.js} +1 -1
- package/dist/dashboard-web/chunks/{sessions-page-B2TXGJDO.js → sessions-page-DYZZMKFL.js} +1 -1
- package/dist/dashboard-web/chunks/{settings-page-6KJADSC6.js → settings-page-LIULUSMH.js} +1 -1
- package/dist/dashboard-web/chunks/{skills-page-M2Q6L5CB.js → skills-page-DQPBBI3T.js} +2 -2
- package/dist/dashboard-web/chunks/{team-federation-page-7I7FDE3B.js → team-federation-page-LQKLDV4K.js} +1 -1
- package/dist/dashboard-web/chunks/{v3-page-HQXRL65L.js → v3-page-RVKQIMAP.js} +1 -1
- package/dist/dashboard-web/chunks/{whiteboards-page-LQKC4TAZ.js → whiteboards-page-S5K55HRZ.js} +1 -1
- package/dist/dashboard.js +11 -1
- package/dist/dashboard.js.map +1 -1
- package/dist/dsh-runner.js +8 -1
- package/dist/dsh-runner.js.map +1 -1
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +15 -26
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/zh.d.ts.map +1 -1
- package/dist/i18n/zh.js +15 -26
- 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 +5 -19
- package/dist/im/lark/event-dispatcher.js.map +1 -1
- package/dist/services/bridge-fallback-gate.d.ts +15 -7
- package/dist/services/bridge-fallback-gate.d.ts.map +1 -1
- package/dist/services/bridge-fallback-gate.js +43 -16
- package/dist/services/bridge-fallback-gate.js.map +1 -1
- package/dist/services/peer-cross-ref-store.d.ts +8 -0
- package/dist/services/peer-cross-ref-store.d.ts.map +1 -0
- package/dist/services/peer-cross-ref-store.js +95 -0
- package/dist/services/peer-cross-ref-store.js.map +1 -0
- package/dist/services/pi-transcript.d.ts.map +1 -1
- package/dist/services/pi-transcript.js +10 -6
- package/dist/services/pi-transcript.js.map +1 -1
- package/dist/services/structured-bridge-clis.d.ts +13 -4
- package/dist/services/structured-bridge-clis.d.ts.map +1 -1
- package/dist/services/structured-bridge-clis.js +13 -3
- package/dist/services/structured-bridge-clis.js.map +1 -1
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/bot-routing.d.ts +1 -1
- package/dist/utils/bot-routing.d.ts.map +1 -1
- package/dist/utils/bot-routing.js.map +1 -1
- package/dist/worker.js +233 -11
- package/dist/worker.js.map +1 -1
- package/package.json +5 -1
- package/dist/dashboard-web/chunks/bot-defaults-page-4RENHE7J.js +0 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bot-routing.js","sourceRoot":"","sources":["../../src/utils/bot-routing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,MAAM,iBAAiB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AI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC;YACxB,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YACb,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACf,CAAC;IACH,CAAC,CAAC;IACF,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAClB,KAAK,MAAM,EAAE,IAAI,IAAI,CAAC,UAAU,IAAI,EAAE;QAAE,IAAI,CAAC,EAAE,CAAC,CAAC;IACjD,KAAK,MAAM,EAAE,IAAI,IAAI,CAAC,EAAE,IAAI,EAAE;QAAE,IAAI,CAAC,EAAE,CAAC,CAAC;IACzC,OAAO,GAAG,CAAC;AACb,CAAC"}
|
package/dist/worker.js
CHANGED
|
@@ -29,7 +29,7 @@ import { readProcessStartIdentity } from './core/session-marker.js';
|
|
|
29
29
|
import { roleLibraryRoot, roleLibrarySubtree } from './core/role-library.js';
|
|
30
30
|
import { drainTranscript, joinAssistantText, trailingAssistantText, findJsonlContainingFingerprint, findJsonlsContainingExactContent, findLatestJsonl, extractLastAssistantTurn, extractTurnStartText, splitTranscriptEventsByCutoff, isTranscriptRateLimitEvent, apiErrorMessageText } from './services/claude-transcript.js';
|
|
31
31
|
import { BridgeTurnQueue, makeFingerprint, normaliseForFingerprint } from './services/bridge-turn-queue.js';
|
|
32
|
-
import { bridgePostText, isBridgeNothingToSendFinal, shouldSuppressBridgeEmit, structuredFallbackKind,
|
|
32
|
+
import { bridgePostText, isBridgeNothingToSendFinal, shouldSuppressBridgeEmit, structuredFallbackKind, stripTrailingOaiMemoryCitation } from './services/bridge-fallback-gate.js';
|
|
33
33
|
import { buildSubmitMessagePreview } from './services/submit-notification.js';
|
|
34
34
|
import { decideHardTimeoutAction, decidePostHookPromptEvidence, decideSettleMarkReady, shouldArmPostHookPromptEvidenceFallback, shouldReleaseFirstPromptTimeout, shouldWaitForPostSessionStartPromptEvidence, shouldWriteNow, POST_HOOK_EVIDENCE_FALLBACK_MS, POST_HOOK_EVIDENCE_RETRY_MS, } from './utils/input-gate.js';
|
|
35
35
|
import { decideCodexRunnerFreshness, CodexRunnerFreshnessInputQueue, shouldHoldCodexRunnerInput, } from './services/codex-runner-freshness.js';
|
|
@@ -1399,6 +1399,25 @@ let spawnArgvInitialPromptBusy = false;
|
|
|
1399
1399
|
* arm above; quiescence argv adapters seed working then idle at first ready.
|
|
1400
1400
|
*/
|
|
1401
1401
|
let spawnArgvNeedsWorkingSeed = false;
|
|
1402
|
+
/**
|
|
1403
|
+
* Startup-window evidence for an argv-baked first prompt: true once the turn
|
|
1404
|
+
* has VISIBLY started — busyPattern seen in the raw PTY stream since spawn, or
|
|
1405
|
+
* a live structured-transcript user/final event ingested. Pi's TUI renders its
|
|
1406
|
+
* input box seconds before it begins consuming the argv prompt (extension /
|
|
1407
|
+
* model loading), and during that gap the screen shows no busy marker and the
|
|
1408
|
+
* transcript has no user record — quiescence then reports a FALSE first idle
|
|
1409
|
+
* ("not started yet", not "turn complete"). Until this latches,
|
|
1410
|
+
* markPromptReady holds ready + re-arms instead of seeding working→idle.
|
|
1411
|
+
*/
|
|
1412
|
+
let spawnArgvTurnStartEvidenceSeen = false;
|
|
1413
|
+
/** Rolling ANSI-stripped PTY tail scanned for busyPattern while the argv
|
|
1414
|
+
* first-turn evidence gate is armed; dropped once evidence latches. */
|
|
1415
|
+
let spawnArgvTurnStartBusyScanTail = '';
|
|
1416
|
+
/** Fail-open deadline for the evidence gate: past this instant the gate stops
|
|
1417
|
+
* holding, so an argv prompt the CLI never consumed (e.g. dropped on a
|
|
1418
|
+
* restart) cannot park the card at 工作中 forever. */
|
|
1419
|
+
let spawnArgvTurnStartEvidenceDeadlineMs = 0;
|
|
1420
|
+
let spawnArgvTurnStartFailOpenTimer = null;
|
|
1402
1421
|
let idleDetector = null;
|
|
1403
1422
|
let isTmuxMode = false;
|
|
1404
1423
|
/** True once a crash diagnostic tmux shell (bmx-diag-<sid>) is live. */
|
|
@@ -3505,7 +3524,8 @@ function failedBridgeFallbackContent(errorCode, summary, partialText) {
|
|
|
3505
3524
|
? 'worker.empty_final_failed_connection'
|
|
3506
3525
|
: 'worker.empty_final_failed';
|
|
3507
3526
|
const failure = t(key, { cliName: cliName(), reason });
|
|
3508
|
-
|
|
3527
|
+
const visiblePartialText = stripTrailingOaiMemoryCitation(partialText ?? '').trim();
|
|
3528
|
+
return visiblePartialText ? `${visiblePartialText}\n\n${failure}` : failure;
|
|
3509
3529
|
}
|
|
3510
3530
|
// ─── Bridge fallback marker (non-adopt) ────────────────────────────────────
|
|
3511
3531
|
//
|
|
@@ -5625,6 +5645,9 @@ function codexBridgeIngest(opts = {}) {
|
|
|
5625
5645
|
if (result.events.length > 0)
|
|
5626
5646
|
lastStructuredBridgeActivityAtMs = Date.now();
|
|
5627
5647
|
codexBridgeQueue.ingest(result.events);
|
|
5648
|
+
// After ingest so the latch's delivery re-kick observes the started turn —
|
|
5649
|
+
// the flush's own bridge mark must queue behind it, not ahead of it.
|
|
5650
|
+
noteSpawnArgvTurnStartTranscriptEvidence(result.events);
|
|
5628
5651
|
pruneExpiredStructuredHeadsAndEmit('structured ingest');
|
|
5629
5652
|
// Transcript-driven idle: a normal `assistant_final` or no-output
|
|
5630
5653
|
// `turn_aborted` is Codex declaring end-of-turn, far more reliable than the screen-pattern heuristic
|
|
@@ -7942,12 +7965,12 @@ async function handleTrustedCodexAppMarker(kind, payload, control) {
|
|
|
7942
7965
|
log(`${cliName()} native turn ${nativeTurnId.substring(0, 12)} mapped to botmux turn ${turnId.substring(0, 12)}`);
|
|
7943
7966
|
}
|
|
7944
7967
|
let suppressDelivery = false;
|
|
7945
|
-
// What actually reaches Lark: strip
|
|
7946
|
-
//
|
|
7947
|
-
// validator asserts finalContent==='' and
|
|
7948
|
-
// If nothing remains
|
|
7949
|
-
//
|
|
7950
|
-
const deliverableContent =
|
|
7968
|
+
// What actually reaches Lark: strip internal memory attribution and a
|
|
7969
|
+
// trailing sentinel line. `finalContent` stays RAW above (the
|
|
7970
|
+
// steer_superseded validator asserts finalContent==='' and the fallback gate
|
|
7971
|
+
// must see the unstripped payload). If nothing remains, this was metadata or
|
|
7972
|
+
// a pure-silence final → persist the FIFO advance without delivering.
|
|
7973
|
+
const deliverableContent = bridgePostText(finalContent, false);
|
|
7951
7974
|
if (deliverableContent.trim().length === 0 && finalContent.trim().length > 0) {
|
|
7952
7975
|
suppressDelivery = true;
|
|
7953
7976
|
}
|
|
@@ -8361,6 +8384,20 @@ function onPtyData(data) {
|
|
|
8361
8384
|
maybeReportDeferredTopicMaterialization(data);
|
|
8362
8385
|
maybeCaptureKiroSessionId(data);
|
|
8363
8386
|
captureWorkflowTranscript(data);
|
|
8387
|
+
// Argv first-turn start evidence (Pi): latch the busy marker from the raw
|
|
8388
|
+
// PTY stream. The viewport-based defer cannot see a marker that has not
|
|
8389
|
+
// rendered yet, and a fast turn can paint and clear `Working...` between
|
|
8390
|
+
// screen samples — the stream sees every byte exactly once.
|
|
8391
|
+
if (spawnArgvNeedsWorkingSeed
|
|
8392
|
+
&& !spawnArgvTurnStartEvidenceSeen
|
|
8393
|
+
&& structuredBridgeIsPi()
|
|
8394
|
+
&& cliAdapter?.busyPattern) {
|
|
8395
|
+
spawnArgvTurnStartBusyScanTail = tailChars(spawnArgvTurnStartBusyScanTail + stripAnsiForLog(data), 500);
|
|
8396
|
+
if (cliAdapter.busyPattern.test(spawnArgvTurnStartBusyScanTail)) {
|
|
8397
|
+
spawnArgvTurnStartEvidenceSeen = true;
|
|
8398
|
+
spawnArgvTurnStartBusyScanTail = '';
|
|
8399
|
+
}
|
|
8400
|
+
}
|
|
8364
8401
|
renderer?.write(data);
|
|
8365
8402
|
// In tmux-attach mode, each web client has its own tmux attach PTY —
|
|
8366
8403
|
// no relay needed. In non-tmux mode AND in pipe mode (adopt-bridge),
|
|
@@ -8603,6 +8640,125 @@ function scheduleStructuredStartGraceRecheck(remainingMs) {
|
|
|
8603
8640
|
}, Math.max(1, remainingMs + 1));
|
|
8604
8641
|
structuredStartGraceRecheckTimer.unref?.();
|
|
8605
8642
|
}
|
|
8643
|
+
/** How long the argv first-turn evidence gate may hold ready with no start
|
|
8644
|
+
* evidence at all. Pi's startup gap (extension/model loading before it
|
|
8645
|
+
* consumes the argv prompt) is typically 3–9s; 90s covers slow hosts while
|
|
8646
|
+
* keeping a never-consumed argv prompt from parking the card at 工作中
|
|
8647
|
+
* forever. */
|
|
8648
|
+
const SPAWN_ARGV_TURN_START_EVIDENCE_GRACE_MS = 90_000;
|
|
8649
|
+
/** True while markPromptReady must hold the argv-baked first prompt's ready:
|
|
8650
|
+
* no "turn started" evidence yet and the bounded grace has not expired.
|
|
8651
|
+
* Scoped to Pi — the only quiescence-argv adapter with BOTH evidence channels
|
|
8652
|
+
* (busyPattern + always-on structured transcript); Gemini/OpenCode/MTR keep
|
|
8653
|
+
* their historical first-idle behavior. Never applies to the Grok-class busy
|
|
8654
|
+
* arm, whose first ready is handled by spawnArgvInitialPromptBusy. */
|
|
8655
|
+
function spawnArgvTurnStartGateHolds() {
|
|
8656
|
+
if (!spawnArgvNeedsWorkingSeed || spawnArgvInitialPromptBusy)
|
|
8657
|
+
return false;
|
|
8658
|
+
if (!structuredBridgeIsPi())
|
|
8659
|
+
return false;
|
|
8660
|
+
if (spawnArgvTurnStartEvidenceSeen)
|
|
8661
|
+
return false;
|
|
8662
|
+
return Date.now() < spawnArgvTurnStartEvidenceDeadlineMs;
|
|
8663
|
+
}
|
|
8664
|
+
/** Latch "the argv first turn actually began" from live structured-transcript
|
|
8665
|
+
* events. The latch must happen at INGEST time, not lazily at gate time: a
|
|
8666
|
+
* fast first turn can be started AND drained/emitted before markPromptReady
|
|
8667
|
+
* runs, leaving no started turn to observe in the queue. A user record is the
|
|
8668
|
+
* authoritative start signal; a final implies start too (covers a drain that
|
|
8669
|
+
* sees both lines at once).
|
|
8670
|
+
*
|
|
8671
|
+
* The latch is also a DELIVERY DRIVER, not just a boolean: when evidence
|
|
8672
|
+
* lands later than the 15s first-prompt timeout, every markPromptReady-based
|
|
8673
|
+
* driver has already fired rejected and stopped (probe one-shot, timeout
|
|
8674
|
+
* short-circuit) and the 90s fail-open stands down on evidenceSeen — with a
|
|
8675
|
+
* silent PTY nothing else would ever deliver a startup-queued message. The
|
|
8676
|
+
* user record hitting disk is itself the proof the TUI accepts input, so
|
|
8677
|
+
* re-kick immediately. (The PTY busyPattern latch needs no re-kick: busy
|
|
8678
|
+
* output implies a later quiescence edge that re-drives markPromptReady.) */
|
|
8679
|
+
function noteSpawnArgvTurnStartTranscriptEvidence(events) {
|
|
8680
|
+
// The whole evidence mechanism is Pi-scoped (matching the onPtyData busy
|
|
8681
|
+
// scan and spawnArgvTurnStartGateHolds); this generic ingest path also
|
|
8682
|
+
// serves Grok — another argv-baked + structured-bridge + type-ahead CLI —
|
|
8683
|
+
// so without this guard the flush side effect below would add a new
|
|
8684
|
+
// startup-window write for Grok (whose first ready is owned by the
|
|
8685
|
+
// SessionStart busy arm, not by this gate).
|
|
8686
|
+
if (!structuredBridgeIsPi())
|
|
8687
|
+
return;
|
|
8688
|
+
if (spawnArgvTurnStartEvidenceSeen || !spawnArgvNeedsWorkingSeed)
|
|
8689
|
+
return;
|
|
8690
|
+
if (!events.some(ev => ev.kind === 'user' || ev.kind === 'assistant_final'))
|
|
8691
|
+
return;
|
|
8692
|
+
spawnArgvTurnStartEvidenceSeen = true;
|
|
8693
|
+
spawnArgvTurnStartBusyScanTail = '';
|
|
8694
|
+
if (!isPromptReady && pendingMessages.length > 0) {
|
|
8695
|
+
log('Argv first-turn start evidence landed via transcript — releasing startup-queued input');
|
|
8696
|
+
flushQueuedInputAfterTurnStartEvidence();
|
|
8697
|
+
}
|
|
8698
|
+
}
|
|
8699
|
+
function stopSpawnArgvTurnStartFailOpen() {
|
|
8700
|
+
if (!spawnArgvTurnStartFailOpenTimer)
|
|
8701
|
+
return;
|
|
8702
|
+
clearTimeout(spawnArgvTurnStartFailOpenTimer);
|
|
8703
|
+
spawnArgvTurnStartFailOpenTimer = null;
|
|
8704
|
+
}
|
|
8705
|
+
/** Turn-start evidence in hand ⇒ startup-queued input becomes deliverable.
|
|
8706
|
+
*
|
|
8707
|
+
* Messages that arrive during startup (awaitingFirstPrompt) skip
|
|
8708
|
+
* handleMessage's type-ahead write (shouldWriteNow holds them, "no input box
|
|
8709
|
+
* yet") and historically relied on markPromptReady()'s tail flush for
|
|
8710
|
+
* delivery. When a Pi argv first turn never lands its terminal record
|
|
8711
|
+
* (terminate:true gap), every ready driver dies rejected: the structured
|
|
8712
|
+
* lifecycle block refuses quiescence idles, the queued-message busy probe
|
|
8713
|
+
* and the 15s first-prompt timeout both short-circuit through the same
|
|
8714
|
+
* rejected markPromptReady(), and the 90s fail-open stands down once
|
|
8715
|
+
* evidence is latched. Without an explicit re-kick the message sits in
|
|
8716
|
+
* pendingMessages forever (card pinned at 工作中, the next transcript user
|
|
8717
|
+
* event never appears, HOL-drop never fires).
|
|
8718
|
+
*
|
|
8719
|
+
* Two call sites, one safety argument — input may only be re-kicked once the
|
|
8720
|
+
* TUI provably booted far enough to accept it:
|
|
8721
|
+
* 1. markPromptReady()'s lifecycle-block rejection (a started turn /
|
|
8722
|
+
* confirmed submit exists);
|
|
8723
|
+
* 2. the transcript-evidence latch in codexBridgeIngest (the user record
|
|
8724
|
+
* just hit disk — the ONLY driver left when evidence lands later than
|
|
8725
|
+
* every probe/timeout and the PTY stays silent).
|
|
8726
|
+
* The argv turn-start evidence gate must NOT re-kick — before any evidence
|
|
8727
|
+
* the TUI may still be loading extensions/models and a type-ahead paste
|
|
8728
|
+
* could be dropped or land in a half-drawn screen (flushPending() has no
|
|
8729
|
+
* awaitingFirstPrompt gate of its own; shouldWriteNow()'s hold is the only
|
|
8730
|
+
* startup input protection).
|
|
8731
|
+
*
|
|
8732
|
+
* flushPending() still re-checks its own admission gates (type-ahead
|
|
8733
|
+
* allowance, durable HOL, injection serialization, restart fences,
|
|
8734
|
+
* ready-gate settle), so a non-type-ahead adapter keeps holding until a real
|
|
8735
|
+
* ready edge; this is a re-kick, never a bypass of those gates. */
|
|
8736
|
+
function flushQueuedInputAfterTurnStartEvidence() {
|
|
8737
|
+
if (pendingMessages.length === 0)
|
|
8738
|
+
return;
|
|
8739
|
+
flushPending();
|
|
8740
|
+
}
|
|
8741
|
+
/** Re-drive the held first idle if no start evidence ever appears. Without
|
|
8742
|
+
* this, a swallowed quiescence idle followed by a fully silent PTY (argv
|
|
8743
|
+
* prompt never consumed) would leave no later signal to re-check the gate.
|
|
8744
|
+
* The re-driven idle still passes deferPromptReadyWhileBusy, so a turn whose
|
|
8745
|
+
* evidence was merely missed keeps deferring on a busy viewport. */
|
|
8746
|
+
function scheduleSpawnArgvTurnStartFailOpen() {
|
|
8747
|
+
if (spawnArgvTurnStartFailOpenTimer)
|
|
8748
|
+
return;
|
|
8749
|
+
const backendAtSchedule = backend;
|
|
8750
|
+
const cliGenerationAtSchedule = cliSpawnGeneration;
|
|
8751
|
+
spawnArgvTurnStartFailOpenTimer = setTimeout(() => {
|
|
8752
|
+
spawnArgvTurnStartFailOpenTimer = null;
|
|
8753
|
+
if (backend !== backendAtSchedule || cliSpawnGeneration !== cliGenerationAtSchedule)
|
|
8754
|
+
return;
|
|
8755
|
+
if (isPromptReady || !spawnArgvNeedsWorkingSeed || spawnArgvTurnStartEvidenceSeen)
|
|
8756
|
+
return;
|
|
8757
|
+
log('Argv-baked first prompt showed no start evidence within grace — failing open to quiescence idle');
|
|
8758
|
+
idleDetector?.fireIdle();
|
|
8759
|
+
}, Math.max(1, spawnArgvTurnStartEvidenceDeadlineMs - Date.now()));
|
|
8760
|
+
spawnArgvTurnStartFailOpenTimer.unref?.();
|
|
8761
|
+
}
|
|
8606
8762
|
function markPromptReady() {
|
|
8607
8763
|
if (bareShellLaunchBlocked) {
|
|
8608
8764
|
log('Ignoring non-PTY prompt-ready while bare-shell launch block is active');
|
|
@@ -8678,6 +8834,29 @@ function markPromptReady() {
|
|
|
8678
8834
|
}
|
|
8679
8835
|
if (freshnessAction === 'ignore')
|
|
8680
8836
|
return;
|
|
8837
|
+
// Argv-baked first prompt start gate (Pi): the TUI paints its input box
|
|
8838
|
+
// seconds before the CLI begins consuming the argv prompt, and that startup
|
|
8839
|
+
// window has no busyPattern on screen and no transcript user record —
|
|
8840
|
+
// quiescence then produces a FALSE first idle ("not started yet", not "turn
|
|
8841
|
+
// complete"). Letting it through would set isPromptReady for the whole turn
|
|
8842
|
+
// and seed working→idle mid-turn (premature ✅ DONE + card flip to 等待输入).
|
|
8843
|
+
// Hold ready and re-arm until the turn visibly starts; bounded fail-open via
|
|
8844
|
+
// SPAWN_ARGV_TURN_START_EVIDENCE_GRACE_MS restores the historical quiescence
|
|
8845
|
+
// behavior if evidence never appears.
|
|
8846
|
+
// Deliberately NO flush re-kick here (unlike the lifecycle block below):
|
|
8847
|
+
// with zero turn-start evidence the TUI may still be booting, and a
|
|
8848
|
+
// type-ahead paste could be dropped or land in a half-drawn screen —
|
|
8849
|
+
// shouldWriteNow()'s awaitingFirstPrompt hold is the only startup input
|
|
8850
|
+
// protection and flushPending() does not re-check it. Queued messages are
|
|
8851
|
+
// delivered the moment evidence appears (the transcript latch re-kicks, a
|
|
8852
|
+
// busy-marker latch implies a later quiescence edge) or by the 90s
|
|
8853
|
+
// fail-open.
|
|
8854
|
+
if (spawnArgvTurnStartGateHolds()) {
|
|
8855
|
+
log('Argv-baked first prompt has not visibly started (no busy marker or transcript user event since spawn) — re-arming idle detector');
|
|
8856
|
+
idleDetector?.reset();
|
|
8857
|
+
scheduleSpawnArgvTurnStartFailOpen();
|
|
8858
|
+
return;
|
|
8859
|
+
}
|
|
8681
8860
|
// Screen prompt/quiescence is only a UI heuristic. Structured transcript
|
|
8682
8861
|
// bridges have the stronger lifecycle signal: a transcript-started turn
|
|
8683
8862
|
// without assistant_final is still running even if the TUI redraw exposes a
|
|
@@ -8694,6 +8873,7 @@ function markPromptReady() {
|
|
|
8694
8873
|
idleDetector?.reset();
|
|
8695
8874
|
if (remainingMs !== undefined)
|
|
8696
8875
|
scheduleStructuredStartGraceRecheck(remainingMs);
|
|
8876
|
+
flushQueuedInputAfterTurnStartEvidence();
|
|
8697
8877
|
return;
|
|
8698
8878
|
}
|
|
8699
8879
|
structuredRejectedReadyEvidenceGeneration = undefined;
|
|
@@ -11571,6 +11751,14 @@ async function spawnCli(cfg, opts = {}) {
|
|
|
11571
11751
|
injectsReadyHook: cliAdapter.injectsReadyHook === true,
|
|
11572
11752
|
reliableTurnTerminal: cliAdapter.reliableTurnTerminal === true,
|
|
11573
11753
|
});
|
|
11754
|
+
// Fresh evidence window for the argv first-turn start gate (Pi): the new
|
|
11755
|
+
// generation must not inherit a previous spawn's latch or fail-open timer.
|
|
11756
|
+
stopSpawnArgvTurnStartFailOpen();
|
|
11757
|
+
spawnArgvTurnStartEvidenceSeen = false;
|
|
11758
|
+
spawnArgvTurnStartBusyScanTail = '';
|
|
11759
|
+
spawnArgvTurnStartEvidenceDeadlineMs = spawnArgvNeedsWorkingSeed
|
|
11760
|
+
? Date.now() + SPAWN_ARGV_TURN_START_EVIDENCE_GRACE_MS
|
|
11761
|
+
: 0;
|
|
11574
11762
|
if (deferInitialPrompt && preparedDeferredInput) {
|
|
11575
11763
|
piInitialPromptAdditionalArgs = [...(preparedDeferredInput.additionalArgs ?? [])];
|
|
11576
11764
|
piInitialPromptEnv = { ...(preparedDeferredInput.env ?? {}) };
|
|
@@ -11624,6 +11812,8 @@ async function spawnCli(cfg, opts = {}) {
|
|
|
11624
11812
|
larkAppId: cfg.larkAppId,
|
|
11625
11813
|
locale: cfg.locale,
|
|
11626
11814
|
model: ttadkGateway ? undefined : cfg.model,
|
|
11815
|
+
// dsh runner only; other adapters ignore the field.
|
|
11816
|
+
turnTimeoutMs: cfg.turnTimeoutMs,
|
|
11627
11817
|
reasoningEffort: cfg.reasoningEffort,
|
|
11628
11818
|
disableCliBypass: cfg.disableCliBypass === true,
|
|
11629
11819
|
// Codex-family hook-trust bypass: global toggle (default ON) so a headless
|
|
@@ -13449,6 +13639,8 @@ function killCli(opts = {}) {
|
|
|
13449
13639
|
stopReattachIdleProbe();
|
|
13450
13640
|
stopBusyPatternIdleProbe();
|
|
13451
13641
|
stopStructuredStartGraceRecheck();
|
|
13642
|
+
stopSpawnArgvTurnStartFailOpen();
|
|
13643
|
+
spawnArgvTurnStartBusyScanTail = '';
|
|
13452
13644
|
structuredRejectedReadyEvidenceGeneration = undefined;
|
|
13453
13645
|
ptyOutputGeneration.reset();
|
|
13454
13646
|
// Cancel any pending ready-gate fallback / settle timers; spawnCli re-arms on respawn.
|
|
@@ -13996,8 +14188,17 @@ function startWebServer(host, preferredPort) {
|
|
|
13996
14188
|
scrollback,
|
|
13997
14189
|
onError: log,
|
|
13998
14190
|
});
|
|
13999
|
-
|
|
14000
|
-
|
|
14191
|
+
// A capture-pane seed carries screen cells but no DECSET state: a fresh
|
|
14192
|
+
// client xterm never learns the CLI enabled mouse tracking (grok build:
|
|
14193
|
+
// 1003+1006), so clicks/double-clicks are silently swallowed instead of
|
|
14194
|
+
// reported. Re-assert the pane's live input modes after the seed —
|
|
14195
|
+
// write clients only: a read-only viewer forwards no input anyway, and
|
|
14196
|
+
// mouse-mode xterm would break its plain select-to-copy. Raw-scrollback
|
|
14197
|
+
// seeds already contain the original DECSET bytes; backends that can't
|
|
14198
|
+
// be queried (herdr/zmx/pty) simply don't implement the hook.
|
|
14199
|
+
const modeSeed = hasWrite ? (backend?.capturePaneInputModes?.() ?? '') : '';
|
|
14200
|
+
if (seed.length > 0 || modeSeed.length > 0) {
|
|
14201
|
+
ws.send(seed + modeSeed + herdrWebCursorSequence());
|
|
14001
14202
|
}
|
|
14002
14203
|
ws.on('message', (raw) => {
|
|
14003
14204
|
try {
|
|
@@ -14398,13 +14599,34 @@ if(hasToken && !/[?&]imefix=0\\b/.test(location.search)){(function(){
|
|
|
14398
14599
|
|
|
14399
14600
|
// ── WebSocket ──
|
|
14400
14601
|
var ws_=null,el=document.getElementById('status');
|
|
14602
|
+
function _sendInput(d){if(ws_&&ws_.readyState===1)ws_.send(JSON.stringify({type:'input',data:d}))}
|
|
14603
|
+
// Pure pointer-motion reports (SGR button code 35 + shift/alt/ctrl modifier
|
|
14604
|
+
// bits). Emitted by xterm once the seed re-asserts DECSET 1003 (grok build) —
|
|
14605
|
+
// one per cell crossed. Each forwarded report costs a synchronous tmux
|
|
14606
|
+
// send-keys exec in the worker, so an unthrottled sweep across a 120-col pane
|
|
14607
|
+
// would stall the relay for every viewer. Clicks/drags/wheel stay immediate.
|
|
14608
|
+
var _MOTION_RE=/^(?:\\x1b\\[<(?:35|39|43|47|51|55|59|63);\\d+;\\d+[Mm])+$/;
|
|
14609
|
+
var _motionPend=null,_motionT=0;
|
|
14401
14610
|
term.onData(function(d){
|
|
14402
14611
|
if(!hasToken){
|
|
14403
14612
|
// Mouse escape sequences are input too: a TUI can bind clicks or wheel
|
|
14404
14613
|
// events to actions. View links never forward terminal bytes.
|
|
14405
14614
|
_showReadonlyToast();return;
|
|
14406
14615
|
}
|
|
14407
|
-
if(
|
|
14616
|
+
if(_MOTION_RE.test(d)){
|
|
14617
|
+
// Trailing throttle: keep only the LATEST motion, flush every 90ms. Hover
|
|
14618
|
+
// feedback survives; the send-keys exec rate is bounded (~11/s).
|
|
14619
|
+
_motionPend=d;
|
|
14620
|
+
if(!_motionT)_motionT=setTimeout(function(){
|
|
14621
|
+
_motionT=0;if(_motionPend){_sendInput(_motionPend);_motionPend=null}
|
|
14622
|
+
},90);
|
|
14623
|
+
return;
|
|
14624
|
+
}
|
|
14625
|
+
// A press/release/drag/key supersedes any pending motion (it carries its own
|
|
14626
|
+
// coordinates); dropping it preserves event ordering for the TUI.
|
|
14627
|
+
if(_motionT){clearTimeout(_motionT);_motionT=0}
|
|
14628
|
+
_motionPend=null;
|
|
14629
|
+
_sendInput(d);
|
|
14408
14630
|
});
|
|
14409
14631
|
var fixedSize=false,_lastC=0,_lastR=0,_rzT=0;
|
|
14410
14632
|
function sendResize(){
|