@adhdev/daemon-core 0.8.39 → 0.8.41
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.d.ts +1 -1
- package/dist/index.js +1 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -10
- package/dist/index.mjs.map +1 -1
- package/dist/shared-types.d.ts +5 -0
- package/node_modules/@adhdev/session-host-core/package.json +1 -1
- package/package.json +1 -1
- package/src/commands/chat-commands.ts +3 -8
- package/src/config/chat-history.ts +4 -2
- package/src/index.ts +1 -0
- package/src/shared-types.ts +10 -0
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Core logic for daemon: CDP, Provider, IDE detection, CLI/ACP adapters and more.
|
|
5
5
|
*/
|
|
6
6
|
export type { ChatMessage, ExtensionInfo, CommandResult as CoreCommandResult, ProviderConfig, DaemonEvent, StatusResponse, SystemInfo, DetectedIde, ProviderInfo, AgentEntry, } from './types.js';
|
|
7
|
-
export type { SessionEntry, CompactSessionEntry, CompactDaemonEntry, CloudDaemonSummaryEntry, DashboardBootstrapDaemonEntry, CloudStatusReportPayload, DaemonStatusEventPayload, DashboardStatusEventPayload, SessionTransport, SessionKind, SessionCapability, AgentSessionStream, ReadChatCursor, ReadChatSyncMode, ReadChatSyncResult, TransportTopic, SessionChatTailSubscriptionParams, MachineRuntimeSubscriptionParams, SessionHostDiagnosticsSubscriptionParams, SessionModalSubscriptionParams, DaemonMetadataSubscriptionParams, SessionChatTailUpdate, MachineRuntimeUpdate, SessionHostDiagnosticsUpdate, SessionModalUpdate, DaemonMetadataUpdate, TopicUpdateEnvelope, SubscribeRequest, UnsubscribeRequest, StandaloneWsStatusPayload, AvailableProviderInfo, AcpConfigOption, AcpMode, ProviderControlSchema, StatusReportPayload, MachineInfo, SessionHostDiagnosticsSnapshot, SessionHostRecord, SessionHostWriteOwner, SessionHostAttachedClient, SessionHostLogEntry, SessionHostRequestTrace, SessionHostRuntimeTransition, DetectedIdeInfo, WorkspaceEntry, ProviderState, ProviderStatus, ProviderErrorReason, ActiveChatData, IdeProviderState, CliProviderState, AcpProviderState, ExtensionProviderState, } from './shared-types.js';
|
|
7
|
+
export type { SessionEntry, CompactSessionEntry, CompactDaemonEntry, CloudDaemonSummaryEntry, DashboardBootstrapDaemonEntry, VersionUpdateReason, CloudStatusReportPayload, DaemonStatusEventPayload, DashboardStatusEventPayload, SessionTransport, SessionKind, SessionCapability, AgentSessionStream, ReadChatCursor, ReadChatSyncMode, ReadChatSyncResult, TransportTopic, SessionChatTailSubscriptionParams, MachineRuntimeSubscriptionParams, SessionHostDiagnosticsSubscriptionParams, SessionModalSubscriptionParams, DaemonMetadataSubscriptionParams, SessionChatTailUpdate, MachineRuntimeUpdate, SessionHostDiagnosticsUpdate, SessionModalUpdate, DaemonMetadataUpdate, TopicUpdateEnvelope, SubscribeRequest, UnsubscribeRequest, StandaloneWsStatusPayload, AvailableProviderInfo, AcpConfigOption, AcpMode, ProviderControlSchema, StatusReportPayload, MachineInfo, SessionHostDiagnosticsSnapshot, SessionHostRecord, SessionHostWriteOwner, SessionHostAttachedClient, SessionHostLogEntry, SessionHostRequestTrace, SessionHostRuntimeTransition, DetectedIdeInfo, WorkspaceEntry, ProviderState, ProviderStatus, ProviderErrorReason, ActiveChatData, IdeProviderState, CliProviderState, AcpProviderState, ExtensionProviderState, } from './shared-types.js';
|
|
8
8
|
import type { RuntimeWriteOwner as _RuntimeWriteOwner } from './shared-types-extra.js';
|
|
9
9
|
import type { RuntimeAttachedClient as _RuntimeAttachedClient } from './shared-types-extra.js';
|
|
10
10
|
import type { RecentLaunchEntry as _RecentLaunchEntry } from './shared-types.js';
|
package/dist/index.js
CHANGED
|
@@ -5306,7 +5306,7 @@ var ChatHistoryWriter = class {
|
|
|
5306
5306
|
const lines = newMessages.map((m) => JSON.stringify(m)).join("\n") + "\n";
|
|
5307
5307
|
fs3.appendFileSync(filePath, lines, "utf-8");
|
|
5308
5308
|
const prevCount = this.lastSeenCounts.get(dedupKey) || 0;
|
|
5309
|
-
if (messages.length < prevCount * 0.5 && prevCount > 3) {
|
|
5309
|
+
if (!historySessionId && messages.length < prevCount * 0.5 && prevCount > 3) {
|
|
5310
5310
|
seenHashes.clear();
|
|
5311
5311
|
this.lastSeenSignatures.delete(dedupKey);
|
|
5312
5312
|
this.lastSeenTurnSignatures.delete(dedupKey);
|
|
@@ -7885,16 +7885,7 @@ async function handleSendChat(h, args) {
|
|
|
7885
7885
|
const provider = h.getProvider(args?.agentType);
|
|
7886
7886
|
const transport = getTargetTransport(h, provider);
|
|
7887
7887
|
const dedupeKey = buildRecentSendKey(h, args, provider, text);
|
|
7888
|
-
const historySessionId = getHistorySessionId(h, args);
|
|
7889
7888
|
const _logSendSuccess = (method, targetAgent) => {
|
|
7890
|
-
h.historyWriter.appendNewMessages(
|
|
7891
|
-
targetAgent || provider?.type || getCurrentProviderType(h, "unknown_agent"),
|
|
7892
|
-
[{ role: "user", content: text, receivedAt: Date.now() }],
|
|
7893
|
-
void 0,
|
|
7894
|
-
// title
|
|
7895
|
-
args?.targetSessionId,
|
|
7896
|
-
historySessionId
|
|
7897
|
-
);
|
|
7898
7889
|
return { success: true, sent: true, method, targetAgent };
|
|
7899
7890
|
};
|
|
7900
7891
|
if (isRecentDuplicateSend(dedupeKey)) {
|