agentgui 1.0.991 → 1.0.992
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/lib/acp-sdk-manager.js
CHANGED
|
@@ -179,12 +179,6 @@ export function getPort(agentId) {
|
|
|
179
179
|
return acpMachine.isHealthy(agentId) ? (ACP_TOOLS.find(t => t.id === agentId)?.port || null) : null;
|
|
180
180
|
}
|
|
181
181
|
|
|
182
|
-
export function getRunningPorts() {
|
|
183
|
-
const ports = {};
|
|
184
|
-
for (const tool of ACP_TOOLS) { if (acpMachine.isHealthy(tool.id)) ports[tool.id] = tool.port; }
|
|
185
|
-
return ports;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
182
|
export async function restart(agentId) {
|
|
189
183
|
const tool = ACP_TOOLS.find(t => t.id === agentId);
|
|
190
184
|
if (!tool) return false;
|
|
@@ -160,10 +160,6 @@ export function getBackoffDelay(toolId) {
|
|
|
160
160
|
return calcBackoff(purgeOldRestarts(s.context.restarts));
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
export function getMachineActors() {
|
|
164
|
-
return actors;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
163
|
export function stopAll() {
|
|
168
164
|
for (const [, actor] of actors) actor.stop();
|
|
169
165
|
actors.clear();
|
package/lib/agent-descriptors.js
CHANGED
package/lib/asset-server.js
CHANGED
|
@@ -124,40 +124,3 @@ export function serveFile(filePath, res, req, { compressAndSend, acceptsEncoding
|
|
|
124
124
|
});
|
|
125
125
|
});
|
|
126
126
|
}
|
|
127
|
-
|
|
128
|
-
export function createChunkBatcher(queries, debugLog) {
|
|
129
|
-
const pending = [];
|
|
130
|
-
let timer = null;
|
|
131
|
-
const BATCH_SIZE = 10;
|
|
132
|
-
const BATCH_INTERVAL = 50;
|
|
133
|
-
|
|
134
|
-
function flush() {
|
|
135
|
-
if (pending.length === 0) return;
|
|
136
|
-
const batch = pending.splice(0);
|
|
137
|
-
try {
|
|
138
|
-
const tx = queries._db ? queries._db.transaction(() => {
|
|
139
|
-
for (const c of batch) queries.createChunk(c.sessionId, c.conversationId, c.sequence, c.type, c.data);
|
|
140
|
-
}) : null;
|
|
141
|
-
if (tx) { tx(); } else {
|
|
142
|
-
for (const c of batch) {
|
|
143
|
-
try { queries.createChunk(c.sessionId, c.conversationId, c.sequence, c.type, c.data); } catch (e) { debugLog(`[chunk] ${e.message}`); }
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
} catch (err) {
|
|
147
|
-
debugLog(`[chunk-batch] Batch write failed: ${err.message}`);
|
|
148
|
-
for (const c of batch) {
|
|
149
|
-
try { queries.createChunk(c.sessionId, c.conversationId, c.sequence, c.type, c.data); } catch (_) {}
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
function add(sessionId, conversationId, sequence, blockType, blockData) {
|
|
155
|
-
pending.push({ sessionId, conversationId, sequence, type: blockType, data: blockData });
|
|
156
|
-
if (pending.length >= BATCH_SIZE) { if (timer) { clearTimeout(timer); timer = null; } flush(); }
|
|
157
|
-
else if (!timer) { timer = setTimeout(() => { timer = null; flush(); }, BATCH_INTERVAL); }
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
function drain() { if (timer) { clearTimeout(timer); timer = null; } flush(); }
|
|
161
|
-
|
|
162
|
-
return { add, drain };
|
|
163
|
-
}
|
package/lib/claude-runner-run.js
CHANGED
|
@@ -43,6 +43,4 @@ export async function runClaudeWithStreaming(prompt, cwd, agentId = 'claude-code
|
|
|
43
43
|
return agent.run(prompt, cwd, enhancedConfig);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
export function getRegisteredAgents() { return registry.list(); }
|
|
47
|
-
export function isAgentRegistered(agentId) { return registry.has(agentId); }
|
|
48
46
|
export default runClaudeWithStreaming;
|
package/lib/execution-machine.js
CHANGED
|
@@ -140,17 +140,6 @@ export function snapshot(convId) {
|
|
|
140
140
|
return actor ? actor.getSnapshot() : null;
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
-
export function isStreaming(convId) {
|
|
144
|
-
const s = snapshot(convId);
|
|
145
|
-
return s ? s.value === 'streaming' || s.value === 'rate_limited' : false;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
export function isActive(convId) {
|
|
149
|
-
const s = snapshot(convId);
|
|
150
|
-
if (!s) return false;
|
|
151
|
-
return s.value === 'streaming' || s.value === 'rate_limited' || s.value === 'draining';
|
|
152
|
-
}
|
|
153
|
-
|
|
154
143
|
export function getContext(convId) {
|
|
155
144
|
const s = snapshot(convId);
|
|
156
145
|
return s ? s.context : null;
|
package/lib/gm-agent-configs.js
CHANGED
|
@@ -64,14 +64,3 @@ export async function installGMAgentConfigs() {
|
|
|
64
64
|
});
|
|
65
65
|
log('results: ' + summary.join(', '));
|
|
66
66
|
}
|
|
67
|
-
|
|
68
|
-
export async function forceReinstallGMAgentConfigs() {
|
|
69
|
-
log('force reinstalling all agent configs');
|
|
70
|
-
const results = await Promise.allSettled(GM_PACKAGES.map(p => runInstaller(p.pkg)));
|
|
71
|
-
const summary = GM_PACKAGES.map((p, i) => {
|
|
72
|
-
const r = results[i];
|
|
73
|
-
const ok = r.status === 'fulfilled' && r.value;
|
|
74
|
-
return p.pkg + ': ' + (ok ? 'ok' : 'failed');
|
|
75
|
-
});
|
|
76
|
-
log('results: ' + summary.join(', '));
|
|
77
|
-
}
|