@adhdev/daemon-core 0.8.75 → 0.8.76
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/agent-stream/manager.d.ts +1 -1
- package/dist/cdp/manager.d.ts +9 -2
- package/dist/chat/async-batch.d.ts +4 -0
- package/dist/config/chat-history.d.ts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +621 -88
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +620 -88
- 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/agent-stream/manager.ts +47 -8
- package/src/agent-stream/poller.ts +1 -0
- package/src/cdp/manager.ts +65 -13
- package/src/chat/async-batch.ts +26 -0
- package/src/commands/stream-commands.ts +8 -5
- package/src/config/chat-history.ts +596 -63
- package/src/index.ts +2 -0
- package/src/status/builders.ts +28 -0
package/src/index.ts
CHANGED
|
@@ -205,6 +205,8 @@ export {
|
|
|
205
205
|
prepareSessionChatTailUpdate,
|
|
206
206
|
prepareSessionModalUpdate,
|
|
207
207
|
} from './chat/subscription-updates.js';
|
|
208
|
+
export { runAsyncBatch } from './chat/async-batch.js';
|
|
209
|
+
export type { AsyncBatchOptions } from './chat/async-batch.js';
|
|
208
210
|
export type {
|
|
209
211
|
ChatTailSubscriptionCursor,
|
|
210
212
|
PrepareSessionChatTailUpdateInput,
|
package/src/status/builders.ts
CHANGED
|
@@ -214,6 +214,33 @@ function buildExtensionAgentSession(
|
|
|
214
214
|
};
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
+
function shouldIncludeExtensionSession(ext: ExtensionProviderState): boolean {
|
|
218
|
+
const status = String(ext.status || '').trim().toLowerCase();
|
|
219
|
+
const hasActiveChat = !!ext.activeChat;
|
|
220
|
+
const hasMessages = Array.isArray(ext.activeChat?.messages) && ext.activeChat!.messages.length > 0;
|
|
221
|
+
const hasModal = !!ext.activeChat?.activeModal;
|
|
222
|
+
const hasStreams = Array.isArray((ext as any).agentStreams) && (ext as any).agentStreams.length > 0;
|
|
223
|
+
const hasProviderSessionId = typeof ext.providerSessionId === 'string' && ext.providerSessionId.trim().length > 0;
|
|
224
|
+
const hasControlValues = !!(ext.controlValues && Object.keys(ext.controlValues).length > 0);
|
|
225
|
+
const hasProviderControls = Array.isArray(ext.providerControls) && ext.providerControls.length > 0;
|
|
226
|
+
const hasOpenPanelCapability = Array.isArray(ext.sessionCapabilities) && ext.sessionCapabilities.includes('open_panel');
|
|
227
|
+
const hasSummaryMetadata = !!ext.summaryMetadata;
|
|
228
|
+
const hasError = typeof ext.errorMessage === 'string' && ext.errorMessage.trim().length > 0;
|
|
229
|
+
const hasInterestingStatus = !!status && !['idle', 'panel_hidden', 'disconnected', 'not_monitored'].includes(status);
|
|
230
|
+
|
|
231
|
+
return hasActiveChat
|
|
232
|
+
|| hasMessages
|
|
233
|
+
|| hasModal
|
|
234
|
+
|| hasStreams
|
|
235
|
+
|| hasProviderSessionId
|
|
236
|
+
|| hasControlValues
|
|
237
|
+
|| hasProviderControls
|
|
238
|
+
|| hasOpenPanelCapability
|
|
239
|
+
|| hasSummaryMetadata
|
|
240
|
+
|| hasError
|
|
241
|
+
|| hasInterestingStatus;
|
|
242
|
+
}
|
|
243
|
+
|
|
217
244
|
function buildCliSession(state: CliProviderState, options: SessionEntryBuildOptions): SessionEntry {
|
|
218
245
|
const profile = options.profile || 'full';
|
|
219
246
|
const activeChat = normalizeActiveChatData(state.activeChat, getActiveChatOptions(profile));
|
|
@@ -305,6 +332,7 @@ export function buildSessionEntries(
|
|
|
305
332
|
for (const state of ideStates) {
|
|
306
333
|
sessions.push(buildIdeWorkspaceSession(state, cdpManagers, options));
|
|
307
334
|
for (const ext of state.extensions as ExtensionProviderState[]) {
|
|
335
|
+
if (!shouldIncludeExtensionSession(ext)) continue;
|
|
308
336
|
sessions.push(buildExtensionAgentSession(state, ext, options));
|
|
309
337
|
}
|
|
310
338
|
}
|