@adhdev/daemon-core 0.9.13 → 0.9.15
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 +11 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -2
- 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 +8 -1
- package/src/commands/router.ts +7 -1
package/package.json
CHANGED
|
@@ -111,6 +111,12 @@ function normalizeComparableTranscriptText(value: unknown): string {
|
|
|
111
111
|
.trim();
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
+
function hasVisibleInterruptPrompt(text: string): boolean {
|
|
115
|
+
return /\bEnter\s+to\s+interrupt\b(?:\s*,?\s*Ctrl\s*(?:\+|-)?\s*C\s+to\s+cancel)?/i.test(
|
|
116
|
+
sanitizeTerminalText(text || ''),
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
|
|
114
120
|
function parsedTranscriptIsRicherThanCommitted(
|
|
115
121
|
parsedMessages: Array<{ role?: string; content?: unknown; id?: string; index?: number }> | null | undefined,
|
|
116
122
|
committedMessages: Array<{ role?: string; content?: unknown; id?: string; index?: number }> | null | undefined,
|
|
@@ -1660,7 +1666,8 @@ export class ProviderCliAdapter implements CliAdapter {
|
|
|
1660
1666
|
&& this.currentStatus === 'idle'
|
|
1661
1667
|
&& !this.currentTurnScope
|
|
1662
1668
|
&& !result?.activeModal
|
|
1663
|
-
&& hasVisibleAssistantMessage
|
|
1669
|
+
&& hasVisibleAssistantMessage
|
|
1670
|
+
&& !hasVisibleInterruptPrompt(screenText);
|
|
1664
1671
|
if (shouldClampStaleGeneratingToIdle) {
|
|
1665
1672
|
result = {
|
|
1666
1673
|
...result,
|
package/src/commands/router.ts
CHANGED
|
@@ -818,10 +818,16 @@ export class DaemonCommandRouter {
|
|
|
818
818
|
// ignore ls failures; upgrade can still proceed
|
|
819
819
|
}
|
|
820
820
|
|
|
821
|
-
|
|
821
|
+
const runningVersion = typeof this.deps.statusVersion === 'string'
|
|
822
|
+
? this.deps.statusVersion.trim().replace(/^v/, '')
|
|
823
|
+
: null;
|
|
824
|
+
if (currentInstalled === latest && runningVersion === latest) {
|
|
822
825
|
LOG.info('Upgrade', `Already on latest version v${latest}; skipping install`);
|
|
823
826
|
return { success: true, upgraded: false, alreadyLatest: true, version: latest };
|
|
824
827
|
}
|
|
828
|
+
if (currentInstalled === latest && runningVersion && runningVersion !== latest) {
|
|
829
|
+
LOG.info('Upgrade', `Installed package is v${latest}, but running daemon is v${runningVersion}; scheduling restart`);
|
|
830
|
+
}
|
|
825
831
|
|
|
826
832
|
spawnDetachedDaemonUpgradeHelper({
|
|
827
833
|
packageName: pkgName,
|