@adhdev/daemon-core 0.9.64 → 0.9.65
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/chat/chat-signatures.d.ts +0 -4
- package/dist/chat/chat-signatures.js +0 -4
- package/dist/chat/chat-signatures.js.map +1 -1
- package/dist/chat/chat-signatures.mjs +0 -4
- package/dist/chat/chat-signatures.mjs.map +1 -1
- package/dist/chat/subscription-updates.d.ts +0 -2
- package/dist/cli-adapters/provider-cli-adapter.d.ts +2 -30
- package/dist/cli-adapters/provider-cli-parse.d.ts +1 -8
- package/dist/cli-adapters/provider-cli-shared.d.ts +8 -3
- package/dist/commands/chat-commands.d.ts +0 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +646 -1712
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +646 -1712
- package/dist/index.mjs.map +1 -1
- package/dist/shared-types.d.ts +0 -7
- package/node_modules/@adhdev/session-host-core/package.json +1 -1
- package/package.json +1 -1
- package/src/chat/chat-signatures.ts +0 -8
- package/src/chat/subscription-updates.ts +7 -46
- package/src/cli-adapters/provider-cli-adapter.d.ts +2 -10
- package/src/cli-adapters/provider-cli-adapter.ts +66 -692
- package/src/cli-adapters/provider-cli-parse.d.ts +0 -7
- package/src/cli-adapters/provider-cli-parse.ts +2 -226
- package/src/cli-adapters/provider-cli-shared.d.ts +0 -1
- package/src/cli-adapters/provider-cli-shared.ts +8 -3
- package/src/commands/chat-commands.ts +54 -366
- package/src/daemon/dev-auto-implement.ts +3 -3
- package/src/daemon/dev-server.ts +3 -3
- package/src/index.d.ts +1 -1
- package/src/index.ts +0 -1
- package/src/launch.ts +10 -3
- package/src/providers/cli-provider-instance.ts +2 -39
- package/src/shared-types.d.ts +0 -7
- package/src/shared-types.ts +0 -8
|
@@ -378,9 +378,7 @@ export class CliProviderInstance implements ProviderInstance {
|
|
|
378
378
|
this.maybeAppendRuntimeRecoveryMessage(runtime);
|
|
379
379
|
let parsedMessages = Array.isArray(parsedStatus?.messages)
|
|
380
380
|
? parsedStatus.messages
|
|
381
|
-
:
|
|
382
|
-
? normalizeChatMessages(Array.isArray(adapterStatus.messages) ? adapterStatus.messages as any : [])
|
|
383
|
-
: []);
|
|
381
|
+
: [];
|
|
384
382
|
const historyMessageCount = Number.isFinite(parsedStatus?.historyMessageCount)
|
|
385
383
|
? Math.max(0, Number(parsedStatus.historyMessageCount))
|
|
386
384
|
: null;
|
|
@@ -389,25 +387,6 @@ export class CliProviderInstance implements ProviderInstance {
|
|
|
389
387
|
? parsedMessages.slice(-historyMessageCount)
|
|
390
388
|
: [];
|
|
391
389
|
}
|
|
392
|
-
// committedMessages (adapterStatus.messages) is the adapter's accumulated
|
|
393
|
-
// conversation history — use it as a floor to prevent history from disappearing.
|
|
394
|
-
//
|
|
395
|
-
// waiting_approval: always override — the approval dialog fills the terminal,
|
|
396
|
-
// pushing prior conversation out of view; parsedMessages will be partial or empty
|
|
397
|
-
// regardless of historyMessageCount.
|
|
398
|
-
//
|
|
399
|
-
// Other active states (generating, long_generating, error): apply floor only
|
|
400
|
-
// when the script has not explicitly windowed via historyMessageCount, so
|
|
401
|
-
// intentional windowing is preserved. Excludes idle — scripts may legitimately
|
|
402
|
-
// return messages:[] when the CLI exits or a new session begins.
|
|
403
|
-
const committedMessages = Array.isArray(adapterStatus.messages) ? adapterStatus.messages : [];
|
|
404
|
-
const isActiveNonIdle = adapterStatus.status !== 'idle';
|
|
405
|
-
const shouldApplyCommittedFloor = parsedMessages.length < committedMessages.length
|
|
406
|
-
&& (adapterStatus.status === 'waiting_approval'
|
|
407
|
-
|| (isActiveNonIdle && historyMessageCount === null));
|
|
408
|
-
if (shouldApplyCommittedFloor) {
|
|
409
|
-
parsedMessages = normalizeChatMessages(committedMessages as any);
|
|
410
|
-
}
|
|
411
390
|
const mergedMessages = this.mergeConversationMessages(parsedMessages);
|
|
412
391
|
const canonicalBackedHistory = this.syncCanonicalSavedHistoryIfNeeded();
|
|
413
392
|
|
|
@@ -516,13 +495,9 @@ export class CliProviderInstance implements ProviderInstance {
|
|
|
516
495
|
const autoApproveActive = adapterStatus.status === 'waiting_approval' && this.shouldAutoApprove();
|
|
517
496
|
const visibleStatus = autoApproveActive ? 'generating' : adapterStatus.status;
|
|
518
497
|
const runtime = this.adapter.getRuntimeMetadata();
|
|
519
|
-
const lastCommittedMessageActivityAt = typeof this.adapter.getLastCommittedMessageActivityAt === 'function'
|
|
520
|
-
? this.adapter.getLastCommittedMessageActivityAt()
|
|
521
|
-
: 0;
|
|
522
498
|
return {
|
|
523
499
|
id: this.instanceId,
|
|
524
500
|
status: visibleStatus,
|
|
525
|
-
lastMessageAt: lastCommittedMessageActivityAt || undefined,
|
|
526
501
|
runtimeLifecycle: runtime?.lifecycle ?? null,
|
|
527
502
|
runtimeSurfaceKind: runtime?.surfaceKind,
|
|
528
503
|
runtimeRestoredFromStorage: runtime?.restoredFromStorage === true,
|
|
@@ -643,7 +618,7 @@ export class CliProviderInstance implements ProviderInstance {
|
|
|
643
618
|
const chatTitle = `${this.provider.name} · ${dirName}`;
|
|
644
619
|
const partial = this.adapter.getPartialResponse();
|
|
645
620
|
const progressFingerprint = newStatus === 'generating'
|
|
646
|
-
? `${partial || ''}
|
|
621
|
+
? `${partial || ''}`.slice(-2000)
|
|
647
622
|
: undefined;
|
|
648
623
|
|
|
649
624
|
const previousStatus = this.lastStatus;
|
|
@@ -1136,18 +1111,6 @@ export class CliProviderInstance implements ProviderInstance {
|
|
|
1136
1111
|
receivedAt: message.receivedAt,
|
|
1137
1112
|
}));
|
|
1138
1113
|
this.suppressIdleHistoryReplay = restoredHistory.messages.length > 0;
|
|
1139
|
-
if (restoredHistory.messages.length > 0) {
|
|
1140
|
-
this.adapter.seedCommittedMessages(
|
|
1141
|
-
restoredHistory.messages.map((message) => ({
|
|
1142
|
-
role: message.role,
|
|
1143
|
-
content: message.content,
|
|
1144
|
-
timestamp: message.receivedAt,
|
|
1145
|
-
receivedAt: message.receivedAt,
|
|
1146
|
-
kind: message.kind,
|
|
1147
|
-
senderName: message.senderName,
|
|
1148
|
-
})),
|
|
1149
|
-
);
|
|
1150
|
-
}
|
|
1151
1114
|
}
|
|
1152
1115
|
|
|
1153
1116
|
|
package/src/shared-types.d.ts
CHANGED
|
@@ -36,10 +36,7 @@ export interface AgentSessionStream {
|
|
|
36
36
|
buttons: string[];
|
|
37
37
|
} | null;
|
|
38
38
|
}
|
|
39
|
-
export type ReadChatSyncMode = 'full' | 'append' | 'replace_tail' | 'noop';
|
|
40
39
|
export interface ReadChatCursor {
|
|
41
|
-
knownMessageCount?: number;
|
|
42
|
-
lastMessageSignature?: string;
|
|
43
40
|
tailLimit?: number;
|
|
44
41
|
}
|
|
45
42
|
export interface ReadChatSyncResult {
|
|
@@ -50,10 +47,6 @@ export interface ReadChatSyncResult {
|
|
|
50
47
|
message: string;
|
|
51
48
|
buttons: string[];
|
|
52
49
|
} | null;
|
|
53
|
-
syncMode: ReadChatSyncMode;
|
|
54
|
-
replaceFrom: number;
|
|
55
|
-
totalMessages: number;
|
|
56
|
-
lastMessageSignature: string;
|
|
57
50
|
}
|
|
58
51
|
export interface ProviderSummaryItem {
|
|
59
52
|
id: string;
|
package/src/shared-types.ts
CHANGED
|
@@ -101,11 +101,7 @@ export interface AgentSessionStream {
|
|
|
101
101
|
activeModal: { message: string; buttons: string[] } | null;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
export type ReadChatSyncMode = 'full' | 'append' | 'replace_tail' | 'noop';
|
|
105
|
-
|
|
106
104
|
export interface ReadChatCursor {
|
|
107
|
-
knownMessageCount?: number;
|
|
108
|
-
lastMessageSignature?: string;
|
|
109
105
|
tailLimit?: number;
|
|
110
106
|
}
|
|
111
107
|
|
|
@@ -114,10 +110,6 @@ export interface ReadChatSyncResult {
|
|
|
114
110
|
status: string;
|
|
115
111
|
title?: string;
|
|
116
112
|
activeModal?: { message: string; buttons: string[] } | null;
|
|
117
|
-
syncMode: ReadChatSyncMode;
|
|
118
|
-
replaceFrom: number;
|
|
119
|
-
totalMessages: number;
|
|
120
|
-
lastMessageSignature: string;
|
|
121
113
|
}
|
|
122
114
|
|
|
123
115
|
export interface ProviderSummaryItem {
|