agentgui 1.0.878 → 1.0.880
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/CHANGELOG.md +4 -0
- package/lib/stream-event-handler.js +2 -1
- package/lib/ws-handlers-session.js +22 -13
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
## [Unreleased] - surface stream chunk persistence errors
|
|
2
|
+
|
|
3
|
+
- lib/stream-event-handler.js: `queries.createChunk` failures were swallowed silently in the ACP streaming path. User would see live broadcast events but reload would lose all chunks. Now logs error with conv id, seq, block type for observability.
|
|
4
|
+
|
|
1
5
|
## [Unreleased] - add Hermes Agent (Nous Research) as ACP-compatible agent
|
|
2
6
|
|
|
3
7
|
- lib/agent-discovery.js BINARIES: detect `hermes` CLI in PATH (icon 'h', protocol 'acp')
|
|
@@ -41,7 +41,8 @@ export function createEventHandler({ queries, activeExecutions, broadcastSync, r
|
|
|
41
41
|
const emitBlock = (block, role, extra) => {
|
|
42
42
|
if (!block || !block.type) return;
|
|
43
43
|
batcherRef.currentSeq = (batcherRef.currentSeq || 0) + 1;
|
|
44
|
-
try { queries.createChunk(sessionId, conversationId, batcherRef.currentSeq, block.type, block); }
|
|
44
|
+
try { queries.createChunk(sessionId, conversationId, batcherRef.currentSeq, block.type, block); }
|
|
45
|
+
catch (err) { console.error(`[stream] createChunk failed conv=${conversationId} seq=${batcherRef.currentSeq} type=${block.type}:`, err.message); }
|
|
45
46
|
broadcastSync({ type: 'streaming_progress', sessionId, conversationId, block, blockRole: role, seq: batcherRef.currentSeq, timestamp: Date.now(), ...extra });
|
|
46
47
|
};
|
|
47
48
|
|
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
import { queryModels } from './acp-sdk-manager.js';
|
|
2
2
|
|
|
3
|
+
const STATIC_MODELS = {
|
|
4
|
+
'claude-code': [
|
|
5
|
+
{ id: 'haiku', label: 'Haiku' },
|
|
6
|
+
{ id: 'sonnet', label: 'Sonnet' },
|
|
7
|
+
{ id: 'opus', label: 'Opus' }
|
|
8
|
+
],
|
|
9
|
+
'gemini': [
|
|
10
|
+
{ id: 'gemini-3-pro', label: 'Gemini 3 Pro' },
|
|
11
|
+
{ id: 'gemini-3-flash', label: 'Gemini 3 Flash' },
|
|
12
|
+
{ id: 'gemini-3.1-pro', label: 'Gemini 3.1 Pro' },
|
|
13
|
+
{ id: 'gemini-2.5-pro', label: 'Gemini 2.5 Pro' },
|
|
14
|
+
{ id: 'gemini-2.5-flash', label: 'Gemini 2.5 Flash' },
|
|
15
|
+
{ id: 'gemini-2.0-flash', label: 'Gemini 2.0 Flash' }
|
|
16
|
+
]
|
|
17
|
+
};
|
|
18
|
+
|
|
3
19
|
export function register(router, deps) {
|
|
4
20
|
const { db, discoveredAgents, modelCache, getAgentDescriptor } = deps;
|
|
5
21
|
console.log('[ws-handlers-session] register() called with discoveredAgents.length:', discoveredAgents.length);
|
|
@@ -74,19 +90,12 @@ export function register(router, deps) {
|
|
|
74
90
|
const cached = modelCache.get(p.id);
|
|
75
91
|
if (cached && (Date.now() - cached.ts) < 300000) return { models: cached.models };
|
|
76
92
|
let models = [];
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
} else {
|
|
84
|
-
const agent = discoveredAgents.find(x => x.id === p.id);
|
|
85
|
-
if (agent?.protocol === 'acp') {
|
|
86
|
-
models = await queryModels(p.id);
|
|
87
|
-
} else if (agent?.protocol === 'cli-wrapper' && agent.acpId) {
|
|
88
|
-
models = await queryModels(agent.acpId);
|
|
89
|
-
}
|
|
93
|
+
const agent = discoveredAgents.find(x => x.id === p.id);
|
|
94
|
+
const targetId = agent?.protocol === 'cli-wrapper' && agent.acpId ? agent.acpId : p.id;
|
|
95
|
+
if (p.id === 'cli-claude' || STATIC_MODELS[targetId]) {
|
|
96
|
+
models = STATIC_MODELS[targetId] || STATIC_MODELS['claude-code'];
|
|
97
|
+
} else if (agent?.protocol === 'acp' || (agent?.protocol === 'cli-wrapper' && agent.acpId)) {
|
|
98
|
+
models = await queryModels(targetId);
|
|
90
99
|
}
|
|
91
100
|
if (models.length > 0) modelCache.set(p.id, { models, ts: Date.now() });
|
|
92
101
|
return { models };
|