@adhdev/daemon-core 0.9.82-rc.489 → 0.9.82-rc.490
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.
|
@@ -64,6 +64,7 @@ export declare class ProviderCliAdapter implements CliAdapter {
|
|
|
64
64
|
private pendingOutboundFlushTimer;
|
|
65
65
|
private pendingOutboundFlushInFlight;
|
|
66
66
|
private submitRetryTimer;
|
|
67
|
+
private ptyWriteChain;
|
|
67
68
|
private resizeSuppressUntil;
|
|
68
69
|
private readonly runner;
|
|
69
70
|
/** @deprecated use runner.cliScripts for direct script access */
|
|
@@ -172,7 +173,14 @@ export declare class ProviderCliAdapter implements CliAdapter {
|
|
|
172
173
|
setInteractivePromptResponse(_response: InteractivePromptResponse): Promise<void>;
|
|
173
174
|
private isSubmitStuck;
|
|
174
175
|
private hasMeaningfulResponseBufferLocal;
|
|
176
|
+
/** Serialize `data` onto the per-session PTY write chain. Returns a promise
|
|
177
|
+
* that resolves (or rejects) with THIS write's own outcome, so callers keep
|
|
178
|
+
* their existing "await my write completion" semantics. The underlying chain
|
|
179
|
+
* link swallows its own error before releasing the next write, so a failed
|
|
180
|
+
* write surfaces to its caller but never wedges subsequent writes behind a
|
|
181
|
+
* permanently-rejected tail (FIFO order preserved). */
|
|
175
182
|
private writeToPty;
|
|
183
|
+
private doWriteToPty;
|
|
176
184
|
/** Write `data` to the PTY in bounded, surrogate-safe chunks with a short
|
|
177
185
|
* inter-chunk gap (win32 paced write). Awaits each chunk's write and the gap
|
|
178
186
|
* so the returned promise resolves only after the FINAL chunk (carrying any
|
package/dist/index.js
CHANGED
|
@@ -414,10 +414,10 @@ function readInjected(value) {
|
|
|
414
414
|
}
|
|
415
415
|
function getDaemonBuildInfo() {
|
|
416
416
|
if (cached) return cached;
|
|
417
|
-
const commit = readInjected(true ? "
|
|
418
|
-
const commitShort = readInjected(true ? "
|
|
419
|
-
const version = readInjected(true ? "0.9.82-rc.
|
|
420
|
-
const builtAt = readInjected(true ? "2026-07-
|
|
417
|
+
const commit = readInjected(true ? "cfa673de50d6ede347cf424b9cab1e94081eadb2" : void 0) ?? "unknown";
|
|
418
|
+
const commitShort = readInjected(true ? "cfa673de" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
|
|
419
|
+
const version = readInjected(true ? "0.9.82-rc.490" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
|
|
420
|
+
const builtAt = readInjected(true ? "2026-07-10T05:30:12.581Z" : void 0);
|
|
421
421
|
cached = builtAt ? { commit, commitShort, version, builtAt } : { commit, commitShort, version };
|
|
422
422
|
return cached;
|
|
423
423
|
}
|
|
@@ -25791,6 +25791,16 @@ var init_provider_cli_adapter = __esm({
|
|
|
25791
25791
|
pendingOutboundFlushInFlight = false;
|
|
25792
25792
|
// Submit retry timer — PTY-level, not state machine
|
|
25793
25793
|
submitRetryTimer = null;
|
|
25794
|
+
// PTY-WRITE-SERIALIZE: a single per-session tail promise that serializes every
|
|
25795
|
+
// PTY write. Each writeToPty() call chains its actual write after the previous
|
|
25796
|
+
// one and returns a promise that resolves only after ITS write completes, so
|
|
25797
|
+
// two consecutive sends (e.g. mesh force-dispatch burst → forceSendMessage, or
|
|
25798
|
+
// a retry-timer's bare CR interleaving a fresh body) can never write into the
|
|
25799
|
+
// same input line: message A's (body + sendKey/CR) is fully written to the PTY
|
|
25800
|
+
// before message B's body write starts. The chain is kept alive across errors
|
|
25801
|
+
// (each link swallows/logs its own failure) so one failed write never wedges
|
|
25802
|
+
// all later writes behind a permanently-rejected tail.
|
|
25803
|
+
ptyWriteChain = Promise.resolve();
|
|
25794
25804
|
// Resize redraw suppression
|
|
25795
25805
|
resizeSuppressUntil = 0;
|
|
25796
25806
|
// (A2.2) Native transcript anchor moved to CHAT_SOURCE_REGISTRY.
|
|
@@ -26526,7 +26536,19 @@ ${lastSnapshot}`;
|
|
|
26526
26536
|
}
|
|
26527
26537
|
return true;
|
|
26528
26538
|
}
|
|
26529
|
-
|
|
26539
|
+
/** Serialize `data` onto the per-session PTY write chain. Returns a promise
|
|
26540
|
+
* that resolves (or rejects) with THIS write's own outcome, so callers keep
|
|
26541
|
+
* their existing "await my write completion" semantics. The underlying chain
|
|
26542
|
+
* link swallows its own error before releasing the next write, so a failed
|
|
26543
|
+
* write surfaces to its caller but never wedges subsequent writes behind a
|
|
26544
|
+
* permanently-rejected tail (FIFO order preserved). */
|
|
26545
|
+
writeToPty(data) {
|
|
26546
|
+
const run = this.ptyWriteChain.then(() => this.doWriteToPty(data));
|
|
26547
|
+
this.ptyWriteChain = run.catch(() => {
|
|
26548
|
+
});
|
|
26549
|
+
return run;
|
|
26550
|
+
}
|
|
26551
|
+
async doWriteToPty(data) {
|
|
26530
26552
|
if (!this.ptyProcess) throw new Error(`${this.cliName} is not running`);
|
|
26531
26553
|
if (process.platform === "win32" && shouldChunkWin32Write(data.length)) {
|
|
26532
26554
|
await this.writeWin32Chunked(data);
|