@adhdev/daemon-core 0.8.61 → 0.8.62
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-adapters/provider-cli-adapter.d.ts +1 -0
- package/dist/cli-adapters/provider-cli-parse.d.ts +1 -0
- package/dist/cli-adapters/provider-cli-shared.d.ts +2 -0
- package/dist/index.js +24 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +24 -1
- package/dist/index.mjs.map +1 -1
- package/node_modules/@adhdev/session-host-core/package.json +1 -1
- package/package.json +1 -1
- package/src/cli-adapters/provider-cli-adapter.ts +23 -1
- package/src/cli-adapters/provider-cli-parse.d.ts +1 -0
- package/src/cli-adapters/provider-cli-parse.ts +3 -0
- package/src/cli-adapters/provider-cli-shared.d.ts +2 -0
- package/src/cli-adapters/provider-cli-shared.ts +2 -0
package/dist/index.mjs
CHANGED
|
@@ -1164,6 +1164,7 @@ function buildCliParseInput(options) {
|
|
|
1164
1164
|
terminalScreenText,
|
|
1165
1165
|
baseMessages,
|
|
1166
1166
|
partialResponse,
|
|
1167
|
+
isWaitingForResponse,
|
|
1167
1168
|
scope,
|
|
1168
1169
|
runtimeSettings
|
|
1169
1170
|
} = options;
|
|
@@ -1181,6 +1182,7 @@ function buildCliParseInput(options) {
|
|
|
1181
1182
|
recentScreen: buildCliScreenSnapshot(recentBuffer),
|
|
1182
1183
|
messages: [...baseMessages],
|
|
1183
1184
|
partialResponse,
|
|
1185
|
+
isWaitingForResponse,
|
|
1184
1186
|
promptText: scope?.prompt || "",
|
|
1185
1187
|
settings: { ...runtimeSettings }
|
|
1186
1188
|
};
|
|
@@ -1918,6 +1920,18 @@ var init_provider_cli_adapter = __esm({
|
|
|
1918
1920
|
const holdMs = this.getStatusActivityHoldMs();
|
|
1919
1921
|
return quietForMs < holdMs || screenStableMs < holdMs;
|
|
1920
1922
|
}
|
|
1923
|
+
shouldDeferIdleTimeoutFinish() {
|
|
1924
|
+
if (!this.isWaitingForResponse || this.currentStatus === "waiting_approval") {
|
|
1925
|
+
return false;
|
|
1926
|
+
}
|
|
1927
|
+
const latestStatus = this.runDetectStatus(this.recentOutputBuffer) || this.currentStatus;
|
|
1928
|
+
if (latestStatus === "generating") {
|
|
1929
|
+
this.settledBuffer = this.recentOutputBuffer;
|
|
1930
|
+
this.evaluateSettled();
|
|
1931
|
+
return true;
|
|
1932
|
+
}
|
|
1933
|
+
return false;
|
|
1934
|
+
}
|
|
1921
1935
|
getStartupConfirmationModal(screenText) {
|
|
1922
1936
|
const text = sanitizeTerminalText(String(screenText || ""));
|
|
1923
1937
|
if (!text.trim()) return null;
|
|
@@ -2076,6 +2090,7 @@ var init_provider_cli_adapter = __esm({
|
|
|
2076
2090
|
if (this.idleTimeout) clearTimeout(this.idleTimeout);
|
|
2077
2091
|
this.idleTimeout = setTimeout(() => {
|
|
2078
2092
|
if (this.isWaitingForResponse && this.currentStatus !== "waiting_approval") {
|
|
2093
|
+
if (this.shouldDeferIdleTimeoutFinish()) return;
|
|
2079
2094
|
this.finishResponse();
|
|
2080
2095
|
}
|
|
2081
2096
|
}, this.timeouts.generatingIdle);
|
|
@@ -2111,6 +2126,7 @@ var init_provider_cli_adapter = __esm({
|
|
|
2111
2126
|
if (this.idleTimeout) clearTimeout(this.idleTimeout);
|
|
2112
2127
|
this.idleTimeout = setTimeout(() => {
|
|
2113
2128
|
if (this.isWaitingForResponse && this.currentStatus !== "waiting_approval") {
|
|
2129
|
+
if (this.shouldDeferIdleTimeoutFinish()) return;
|
|
2114
2130
|
this.finishResponse();
|
|
2115
2131
|
}
|
|
2116
2132
|
}, this.timeouts.generatingIdle);
|
|
@@ -2153,7 +2169,10 @@ var init_provider_cli_adapter = __esm({
|
|
|
2153
2169
|
this.setStatus("generating", "script_detect");
|
|
2154
2170
|
if (this.idleTimeout) clearTimeout(this.idleTimeout);
|
|
2155
2171
|
this.idleTimeout = setTimeout(() => {
|
|
2156
|
-
if (this.isWaitingForResponse)
|
|
2172
|
+
if (this.isWaitingForResponse) {
|
|
2173
|
+
if (this.shouldDeferIdleTimeoutFinish()) return;
|
|
2174
|
+
this.finishResponse();
|
|
2175
|
+
}
|
|
2157
2176
|
}, this.timeouts.generatingIdle);
|
|
2158
2177
|
this.onStatusChange?.();
|
|
2159
2178
|
return;
|
|
@@ -2221,6 +2240,7 @@ var init_provider_cli_adapter = __esm({
|
|
|
2221
2240
|
if (this.idleTimeout) clearTimeout(this.idleTimeout);
|
|
2222
2241
|
this.idleTimeout = setTimeout(() => {
|
|
2223
2242
|
if (this.isWaitingForResponse && this.currentStatus !== "waiting_approval") {
|
|
2243
|
+
if (this.shouldDeferIdleTimeoutFinish()) return;
|
|
2224
2244
|
this.clearIdleFinishCandidate("idle_timeout_finish");
|
|
2225
2245
|
this.finishResponse();
|
|
2226
2246
|
}
|
|
@@ -2359,6 +2379,7 @@ var init_provider_cli_adapter = __esm({
|
|
|
2359
2379
|
tail: text.slice(-500),
|
|
2360
2380
|
screenText,
|
|
2361
2381
|
rawBuffer: this.accumulatedRawBuffer,
|
|
2382
|
+
isWaitingForResponse: this.isWaitingForResponse,
|
|
2362
2383
|
screen: buildCliScreenSnapshot(screenText),
|
|
2363
2384
|
tailScreen: buildCliScreenSnapshot(text.slice(-500))
|
|
2364
2385
|
});
|
|
@@ -2468,6 +2489,7 @@ var init_provider_cli_adapter = __esm({
|
|
|
2468
2489
|
terminalScreenText: this.terminalScreen.getText(),
|
|
2469
2490
|
baseMessages: this.committedMessages,
|
|
2470
2491
|
partialResponse: this.responseBuffer,
|
|
2492
|
+
isWaitingForResponse: this.isWaitingForResponse,
|
|
2471
2493
|
scope: this.currentTurnScope,
|
|
2472
2494
|
runtimeSettings: this.runtimeSettings
|
|
2473
2495
|
});
|
|
@@ -2486,6 +2508,7 @@ var init_provider_cli_adapter = __esm({
|
|
|
2486
2508
|
terminalScreenText: this.terminalScreen.getText(),
|
|
2487
2509
|
baseMessages,
|
|
2488
2510
|
partialResponse,
|
|
2511
|
+
isWaitingForResponse: this.isWaitingForResponse,
|
|
2489
2512
|
scope,
|
|
2490
2513
|
runtimeSettings: this.runtimeSettings
|
|
2491
2514
|
});
|