agentgui 1.0.683 → 1.0.685

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.
@@ -1202,6 +1202,7 @@ registry.register({
1202
1202
  * Main export function - runs any registered agent
1203
1203
  */
1204
1204
  export async function runClaudeWithStreaming(prompt, cwd, agentId = 'claude-code', config = {}) {
1205
+ prompt = typeof prompt === 'string' ? prompt : (prompt ? JSON.stringify(prompt) : '');
1205
1206
  const agent = registry.get(agentId);
1206
1207
 
1207
1208
  if (!agent) {
@@ -152,10 +152,11 @@ export function register(router, deps) {
152
152
  const agentId = conv.agentType || conv.agentId || 'claude-code';
153
153
  const model = conv.model || null;
154
154
  const subAgent = conv.subAgent || null;
155
- const message = queries.createMessage(p.id, 'user', p.content);
155
+ const steerContent = typeof p.content === 'string' ? p.content : (p.content ? JSON.stringify(p.content) : '');
156
+ const message = queries.createMessage(p.id, 'user', steerContent);
156
157
  queries.createEvent('message.created', { role: 'user', messageId: message.id }, p.id);
157
158
  broadcastSync({ type: 'message_created', conversationId: p.id, message, timestamp: Date.now() });
158
- startExecution(p.id, message, agentId, model, p.content, subAgent);
159
+ startExecution(p.id, message, agentId, model, steerContent, subAgent);
159
160
 
160
161
  return { ok: true, steered: true, conversationId: p.id, messageId: message.id };
161
162
  });
@@ -197,6 +198,8 @@ export function register(router, deps) {
197
198
  const model = p.model || conv.model || null;
198
199
  const subAgent = p.subAgent || conv.subAgent || null;
199
200
  const idempotencyKey = p.idempotencyKey || null;
201
+ const rawContent = p.content;
202
+ p.content = typeof rawContent === 'string' ? rawContent : (rawContent ? JSON.stringify(rawContent) : '');
200
203
  const message = queries.createMessage(p.id, 'user', p.content, idempotencyKey);
201
204
  queries.createEvent('message.created', { role: 'user', messageId: message.id }, p.id);
202
205
 
@@ -221,7 +224,8 @@ export function register(router, deps) {
221
224
  router.handle('msg.stream', (p) => {
222
225
  const conv = queries.getConversation(p.id);
223
226
  if (!conv) notFound('Conversation not found');
224
- const prompt = p.content || p.message || '';
227
+ const rawContent = p.content || p.message;
228
+ const prompt = typeof rawContent === 'string' ? rawContent : (rawContent ? JSON.stringify(rawContent) : '');
225
229
  const agentId = p.agentId || conv.agentType || conv.agentId || 'claude-code';
226
230
  const model = p.model || conv.model || null;
227
231
  const subAgent = p.subAgent || conv.subAgent || null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentgui",
3
- "version": "1.0.683",
3
+ "version": "1.0.685",
4
4
  "description": "Multi-agent ACP client with real-time communication",
5
5
  "type": "module",
6
6
  "main": "server.js",
package/static/index.html CHANGED
@@ -3233,13 +3233,19 @@
3233
3233
  </button>
3234
3234
  </div>
3235
3235
  <button class="inject-btn" id="injectBtn" title="Steer or inject into running agent" aria-label="Steer/Inject">
3236
- <svg viewBox="0 0 24 24" fill="currentColor" width="18" height="18">
3237
- <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm3.5-9c.83 0 1.5-.67 1.5-1.5S16.33 8 15.5 8 14 8.67 14 9.5s.67 1.5 1.5 1.5zm-7 0c.83 0 1.5-.67 1.5-1.5S9.33 8 8.5 8 7 8.67 7 9.5 7.67 11 8.5 11zm3.5 6.5c2.33 0 4.31-1.46 5.11-3.5H6.89c.8 2.04 2.78 3.5 5.11 3.5z"/>
3236
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="18" height="18">
3237
+ <polyline points="23 4 23 10 17 10"></polyline>
3238
+ <path d="M20.49 15a9 9 0 1 1 .12-14.85"></path>
3238
3239
  </svg>
3239
3240
  </button>
3240
3241
  <button class="queue-btn" id="queueBtn" title="Queue message for running agent" aria-label="Queue message">
3241
- <svg viewBox="0 0 24 24" fill="currentColor" width="18" height="18">
3242
- <path d="M15 13H1v-2h14v2zm0-4H1V7h14v2zM1 19h14v-2H1v2z"/>
3242
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="18" height="18">
3243
+ <line x1="8" y1="6" x2="21" y2="6"></line>
3244
+ <line x1="8" y1="12" x2="21" y2="12"></line>
3245
+ <line x1="8" y1="18" x2="21" y2="18"></line>
3246
+ <line x1="3" y1="6" x2="3.01" y2="6"></line>
3247
+ <line x1="3" y1="12" x2="3.01" y2="12"></line>
3248
+ <line x1="3" y1="18" x2="3.01" y2="18"></line>
3243
3249
  </svg>
3244
3250
  </button>
3245
3251
  <button class="stop-btn" id="stopBtn" title="Stop running agent (emergency)" aria-label="Stop agent">
@@ -43,5 +43,5 @@ function decodeObj(obj) {
43
43
  return out;
44
44
  }
45
45
 
46
- export function encode(obj) { return msgpackr.pack(encodeObj(obj)); }
46
+ export function encode(obj) { return msgpackr.pack(obj); }
47
47
  export function decode(buf) { return decodeObj(msgpackr.unpack(new Uint8Array(buf instanceof ArrayBuffer ? buf : buf))); }