@adhdev/daemon-core 0.9.76-rc.42 → 0.9.76-rc.44
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 +19 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +19 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/cli-adapters/provider-cli-adapter.ts +15 -1
- package/src/commands/chat-commands.ts +18 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adhdev/daemon-core",
|
|
3
|
-
"version": "0.9.76-rc.
|
|
3
|
+
"version": "0.9.76-rc.44",
|
|
4
4
|
"description": "ADHDev daemon core — CDP, IDE detection, providers, command execution",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@agentclientprotocol/sdk": "^0.16.1",
|
|
51
51
|
"@xterm/xterm": "^6.0.0",
|
|
52
52
|
"chalk": "^5.3.0",
|
|
53
|
-
"chokidar": "^
|
|
53
|
+
"chokidar": "^4.0.3",
|
|
54
54
|
"conf": "^13.0.0",
|
|
55
55
|
"js-yaml": "^4.1.1",
|
|
56
56
|
"node-pty": "^1.2.0-beta.12",
|
|
@@ -1918,7 +1918,21 @@ export class ProviderCliAdapter implements CliAdapter {
|
|
|
1918
1918
|
? String(parsedStatusBeforeSend.status)
|
|
1919
1919
|
: '';
|
|
1920
1920
|
if (!allowInputDuringGeneration && (parsedSessionStatus === 'generating' || parsedSessionStatus === 'long_generating')) {
|
|
1921
|
-
|
|
1921
|
+
const parsedModal = parsedStatusBeforeSend?.activeModal ?? parsedStatusBeforeSend?.modal ?? null;
|
|
1922
|
+
const parsedHasActionableModal = Boolean(
|
|
1923
|
+
parsedModal
|
|
1924
|
+
&& Array.isArray(parsedModal.buttons)
|
|
1925
|
+
&& parsedModal.buttons.some((candidate: unknown) => typeof candidate === 'string' && candidate.trim()),
|
|
1926
|
+
);
|
|
1927
|
+
const terminalLooksIdle = this.currentStatus === 'idle'
|
|
1928
|
+
&& this.runDetectStatus(this.recentOutputBuffer) === 'idle'
|
|
1929
|
+
&& !this.isWaitingForResponse
|
|
1930
|
+
&& !this.currentTurnScope
|
|
1931
|
+
&& !this.hasActionableApproval()
|
|
1932
|
+
&& !parsedHasActionableModal;
|
|
1933
|
+
if (!terminalLooksIdle) {
|
|
1934
|
+
throw new Error(`${this.cliName} is still processing the previous prompt`);
|
|
1935
|
+
}
|
|
1922
1936
|
}
|
|
1923
1937
|
if (this.isWaitingForResponse && !allowInputDuringGeneration) {
|
|
1924
1938
|
if (!this.clearStaleIdleResponseGuard('send_message_guard')) {
|
|
@@ -1642,11 +1642,26 @@ export async function handleResolveAction(h: CommandHelpers, args: any): Promise
|
|
|
1642
1642
|
&& status.activeModal.buttons.some((candidate) => typeof candidate === 'string' && candidate.trim())
|
|
1643
1643
|
? status.activeModal
|
|
1644
1644
|
: null;
|
|
1645
|
-
const
|
|
1646
|
-
|
|
1645
|
+
const parsedStatus = !statusModal && !surfacedModal && typeof adapter.getScriptParsedStatus === 'function'
|
|
1646
|
+
? (() => {
|
|
1647
|
+
try {
|
|
1648
|
+
return parseMaybeJson(adapter.getScriptParsedStatus());
|
|
1649
|
+
} catch {
|
|
1650
|
+
return null;
|
|
1651
|
+
}
|
|
1652
|
+
})()
|
|
1653
|
+
: null;
|
|
1654
|
+
const parsedModal = parsedStatus?.status === 'waiting_approval'
|
|
1655
|
+
&& parsedStatus?.activeModal
|
|
1656
|
+
&& Array.isArray(parsedStatus.activeModal.buttons)
|
|
1657
|
+
&& parsedStatus.activeModal.buttons.some((candidate: unknown) => typeof candidate === 'string' && candidate.trim())
|
|
1658
|
+
? parsedStatus.activeModal
|
|
1659
|
+
: null;
|
|
1660
|
+
const effectiveModal = statusModal || surfacedModal || parsedModal;
|
|
1661
|
+
const effectiveStatus = status?.status === 'waiting_approval' || targetState?.activeChat?.status === 'waiting_approval' || parsedStatus?.status === 'waiting_approval'
|
|
1647
1662
|
? 'waiting_approval'
|
|
1648
1663
|
: status?.status;
|
|
1649
|
-
LOG.info('Command', `[resolveAction] CLI PTY gate target=${String(args?.targetSessionId || '')} rawStatus=${String(status?.status || '')} effectiveStatus=${String(effectiveStatus || '')} statusModal=${statusModal ? 'yes' : 'no'} surfacedModal=${surfacedModal ? 'yes' : 'no'} instance=${targetInstance ? 'yes' : 'no'}`);
|
|
1664
|
+
LOG.info('Command', `[resolveAction] CLI PTY gate target=${String(args?.targetSessionId || '')} rawStatus=${String(status?.status || '')} effectiveStatus=${String(effectiveStatus || '')} statusModal=${statusModal ? 'yes' : 'no'} surfacedModal=${surfacedModal ? 'yes' : 'no'} parsedModal=${parsedModal ? 'yes' : 'no'} instance=${targetInstance ? 'yes' : 'no'}`);
|
|
1650
1665
|
if (!effectiveModal) {
|
|
1651
1666
|
return { success: false, error: 'Not in approval state' };
|
|
1652
1667
|
}
|