agentgui 1.0.56 → 1.0.58

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/acp-launcher.js CHANGED
@@ -33,29 +33,41 @@ export default class ACPConnection {
33
33
  }
34
34
 
35
35
  async sendPrompt(prompt) {
36
- const messages = [];
37
36
  let fullResponse = '';
38
37
 
39
38
  try {
40
39
  const promptText = typeof prompt === 'string' ? prompt : prompt.map(p => p.text).join('\n');
41
40
  const systemMessage = `${SYSTEM_PROMPT}\n\nUser Request: ${promptText}`;
42
41
 
43
- const response = query({
42
+ const response = await query({
44
43
  prompt: systemMessage,
45
44
  options: {}
46
45
  });
47
46
 
48
- for await (const message of response) {
49
- fullResponse += message.content?.map(c => c.text || '').join('') || '';
50
-
51
- if (this.onUpdate) {
52
- this.onUpdate({
53
- update: {
54
- sessionUpdate: 'agent_message_chunk',
55
- content: { text: message.content?.map(c => c.text || '').join('') || '' }
56
- }
57
- });
58
- }
47
+ // Handle different response formats
48
+ let responseText = '';
49
+ if (typeof response === 'string') {
50
+ responseText = response;
51
+ } else if (response?.content) {
52
+ responseText = typeof response.content === 'string' ? response.content : response.content.map(c => c.text || '').join('');
53
+ } else if (response?.result) {
54
+ responseText = response.result;
55
+ } else if (response?.text) {
56
+ responseText = response.text;
57
+ } else {
58
+ responseText = String(response || '');
59
+ }
60
+
61
+ fullResponse = responseText;
62
+
63
+ // Emit updates for streaming
64
+ if (this.onUpdate && responseText) {
65
+ this.onUpdate({
66
+ update: {
67
+ sessionUpdate: 'agent_message_chunk',
68
+ content: { text: responseText }
69
+ }
70
+ });
59
71
  }
60
72
 
61
73
  return { content: fullResponse };
@@ -52,18 +52,11 @@ export class ConversationImporter {
52
52
  return imported;
53
53
  }
54
54
 
55
- static async importOpenCodeSessions() {
56
- // TODO: Implement OpenCode session import once storage location is determined
57
- return [];
58
- }
59
-
60
55
  static async importAll() {
61
56
  console.log('[Importer] Starting conversation import...');
62
57
  const claudeCode = await this.importClaudeCodeSessions();
63
- const openCode = await this.importOpenCodeSessions();
64
58
  console.log(`[Importer] Imported ${claudeCode.length} Claude Code conversations`);
65
- console.log(`[Importer] Imported ${openCode.length} OpenCode conversations`);
66
- return { claudeCode, openCode };
59
+ return claudeCode;
67
60
  }
68
61
  }
69
62
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentgui",
3
- "version": "1.0.56",
3
+ "version": "1.0.58",
4
4
  "description": "Multi-agent ACP client with real-time communication",
5
5
  "type": "module",
6
6
  "main": "server.js",
package/.prd DELETED
@@ -1,61 +0,0 @@
1
- # agentgui - Production Ready ✅
2
-
3
- ## COMPLETION SUMMARY
4
-
5
- All 4 implementation phases completed and deployed to production.
6
-
7
- ### ✅ Phase 1: Comprehensive Testing (12/12 Categories)
8
- Real-world browser testing verified all functionality:
9
- - Real-time streaming, HTML rendering, theme compliance
10
- - Form validation, database persistence, state consistency
11
- - Reconnection & recovery, error handling, performance metrics
12
- - Multi-agent support (Claude Code)
13
-
14
- **Result:** All categories passed with witnessed execution
15
-
16
- ### ✅ Phase 2: Performance Optimization (Issue #1)
17
- API endpoint optimization completed:
18
- - /api/conversations: 90KB → 37KB (59% reduction)
19
- - Response time: 24ms
20
- - Implemented pagination for messages endpoint
21
- - All endpoints load under 100ms
22
-
23
- **Result:** Performance issues resolved, ready for large-scale deployments
24
-
25
- ### ✅ Phase 3: OpenCode Integration Decision
26
- Evaluated and decided on MVP approach:
27
- - OpenCode has no persistent conversation storage
28
- - Documented limitation in code
29
- - Future: SDK integration when API available
30
- - Current: conversation-importer returns empty for OpenCode
31
-
32
- **Result:** Clear path forward, MVP constraints documented
33
-
34
- ### ✅ Phase 4: Sync & Consistency Features
35
- File watcher system deployed:
36
- - conversation-sync.js module watches for changes
37
- - Auto-imports new conversations from ~/.claude/projects
38
- - 1-second debounce, 5-second periodic fallback
39
- - Integrated into server startup
40
-
41
- **Result:** Automatic conversation synchronization operational
42
-
43
- ## PRODUCTION READINESS ✅
44
-
45
- - All 12 test categories verified
46
- - API optimized (59% reduction)
47
- - Database integrity maintained
48
- - Sync features operational
49
- - Zero technical debt
50
- - Ready for immediate deployment
51
-
52
- ## GIT HISTORY
53
- - d47a7cd: Phase 1-4 implementation
54
- - 7d5cbf5: Production readiness documentation
55
-
56
- ## KEY METRICS
57
- - Page load: 691ms (domInteractive: 677ms)
58
- - Memory usage: 9.4MB heap
59
- - Conversations loaded: 534
60
- - API response size: 37KB (optimized)
61
- - API response time: 9-24ms