@adhdev/daemon-core 0.9.82-rc.170 → 0.9.82-rc.172
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/index.js +24 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +24 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/commands/router.ts +15 -0
- package/src/providers/cli-provider-instance.ts +15 -11
package/package.json
CHANGED
package/src/commands/router.ts
CHANGED
|
@@ -69,6 +69,7 @@ import { homedir, hostname as osHostname } from 'os';
|
|
|
69
69
|
import { basename as pathBasename, join as pathJoin, resolve as pathResolve } from 'path';
|
|
70
70
|
import * as fs from 'fs';
|
|
71
71
|
import { execFileSync } from 'node:child_process';
|
|
72
|
+
import { normalizeInteractivePromptResponse } from '../providers/types/interactive-prompt.js';
|
|
72
73
|
|
|
73
74
|
type ReleaseChannel = 'stable' | 'preview';
|
|
74
75
|
const CHANNEL_NPM_TAG: Record<ReleaseChannel, 'latest' | 'next'> = { stable: 'latest', preview: 'next' };
|
|
@@ -3656,6 +3657,20 @@ export class DaemonCommandRouter {
|
|
|
3656
3657
|
return { success: true, events };
|
|
3657
3658
|
}
|
|
3658
3659
|
|
|
3660
|
+
case 'interactive_prompt_response': {
|
|
3661
|
+
const sessionId = typeof args?.targetSessionId === 'string' && args.targetSessionId.trim()
|
|
3662
|
+
? args.targetSessionId.trim()
|
|
3663
|
+
: typeof args?.sessionId === 'string' && args.sessionId.trim()
|
|
3664
|
+
? args.sessionId.trim()
|
|
3665
|
+
: '';
|
|
3666
|
+
if (!sessionId) return { success: false, error: 'targetSessionId required' };
|
|
3667
|
+
const response = normalizeInteractivePromptResponse(args?.response ?? args);
|
|
3668
|
+
const instance = this.deps.instanceManager.getInstance(sessionId);
|
|
3669
|
+
if (!instance) return { success: false, error: `No running instance for session ${sessionId}` };
|
|
3670
|
+
this.deps.instanceManager.sendEvent(sessionId, 'interactive_prompt_response', response);
|
|
3671
|
+
return { success: true };
|
|
3672
|
+
}
|
|
3673
|
+
|
|
3659
3674
|
case 'launch_cli':
|
|
3660
3675
|
case 'stop_cli':
|
|
3661
3676
|
case 'set_cli_view_mode':
|
|
@@ -1256,17 +1256,21 @@ export class CliProviderInstance implements ProviderInstance {
|
|
|
1256
1256
|
// started/completed pair is suppressed (too short for visible UI update).
|
|
1257
1257
|
let shortFinalSummary: string | undefined;
|
|
1258
1258
|
try { shortFinalSummary = extractFinalSummaryFromMessages(this.adapter?.getScriptParsedStatus()?.messages); } catch { /* best-effort */ }
|
|
1259
|
-
this.
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1259
|
+
if ((this.provider as any).requiresFinalAssistantBeforeIdle === true && !shortFinalSummary) {
|
|
1260
|
+
LOG.info('CLI', `[${this.type}] suppressed short completion without final assistant evidence`);
|
|
1261
|
+
} else {
|
|
1262
|
+
this.pushEvent({
|
|
1263
|
+
event: 'agent:generating_completed',
|
|
1264
|
+
chatTitle,
|
|
1265
|
+
duration: 0,
|
|
1266
|
+
timestamp: now,
|
|
1267
|
+
finalSummary: shortFinalSummary,
|
|
1268
|
+
completionDiagnostic: {
|
|
1269
|
+
reason: 'short_generating_suppressed',
|
|
1270
|
+
shortDurationMs,
|
|
1271
|
+
},
|
|
1272
|
+
});
|
|
1273
|
+
}
|
|
1270
1274
|
} else {
|
|
1271
1275
|
// Debounce completed, then require the rich transcript path that read_chat
|
|
1272
1276
|
// uses to show an idle turn whose last user-facing message is assistant.
|