agentgui 1.0.74 → 1.0.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/.prd +132 -0
- package/CLAUDE.md +303 -0
- package/lib/machines.ts +0 -403
- package/lib/schemas.ts +0 -23
- package/package.json +1 -1
- package/static/index.html +1 -1
- package/COMPREHENSIVE_TEST_RESULTS.json +0 -149
- package/TEST_RESULTS.json +0 -139
- package/acp-launcher.js +0 -190
- package/browser-execution-test.js +0 -436
- package/browser-test-harness.js +0 -371
- package/comprehensive-browser-test.js +0 -528
- package/execute-tests.js +0 -164
- package/real-browser-test.js +0 -465
- package/run-tests.sh +0 -69
package/TEST_RESULTS.json
DELETED
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"execution_date": "2026-02-05T12:45:48.406Z",
|
|
3
|
-
"status": "NEEDS_WORK",
|
|
4
|
-
"summary": {
|
|
5
|
-
"total": 7,
|
|
6
|
-
"passing": 5,
|
|
7
|
-
"failing": 2,
|
|
8
|
-
"passRate": "71%",
|
|
9
|
-
"elapsed": 24,
|
|
10
|
-
"errors": 1
|
|
11
|
-
},
|
|
12
|
-
"phases": {
|
|
13
|
-
"2": {
|
|
14
|
-
"title": "UI Verification",
|
|
15
|
-
"status": "PASS",
|
|
16
|
-
"findings": {
|
|
17
|
-
"page_loaded": true,
|
|
18
|
-
"rippleui_present": true,
|
|
19
|
-
"title_present": true,
|
|
20
|
-
"input_field": true,
|
|
21
|
-
"output_area": true,
|
|
22
|
-
"buttons_present": true
|
|
23
|
-
},
|
|
24
|
-
"timestamp": "2026-02-05T12:45:36.396Z"
|
|
25
|
-
},
|
|
26
|
-
"4": {
|
|
27
|
-
"title": "First Execution (Lodash)",
|
|
28
|
-
"status": "FAIL",
|
|
29
|
-
"findings": {
|
|
30
|
-
"error": "Command failed: timeout 30 claude /tmp/test-repos/lodash --dangerously-skip-permissions --output-format=stream-json < /dev/null 2>&1\n"
|
|
31
|
-
},
|
|
32
|
-
"timestamp": "2026-02-05T12:45:41.212Z"
|
|
33
|
-
},
|
|
34
|
-
"5": {
|
|
35
|
-
"title": "File Operations",
|
|
36
|
-
"status": "PASS",
|
|
37
|
-
"findings": {
|
|
38
|
-
"file_exists": true,
|
|
39
|
-
"file_size": 3729,
|
|
40
|
-
"has_headers": true,
|
|
41
|
-
"has_code_blocks": true,
|
|
42
|
-
"is_markdown": true,
|
|
43
|
-
"preview": "# lodash v4.17.23\n\n[Site](https://lodash.com/) |\n[Docs](https://lodash.com/docs) |\n[FP Guide](https://github.com/lodash/lodash/wiki/FP-Guide) |\n[Contributing](https://github.com/lodash/lodash/blob/mas"
|
|
44
|
-
},
|
|
45
|
-
"timestamp": "2026-02-05T12:45:41.214Z"
|
|
46
|
-
},
|
|
47
|
-
"6": {
|
|
48
|
-
"title": "Console Error Checking",
|
|
49
|
-
"status": "PASS",
|
|
50
|
-
"findings": {
|
|
51
|
-
"total_messages": 5,
|
|
52
|
-
"errors_count": 3,
|
|
53
|
-
"warnings_count": 0,
|
|
54
|
-
"console_clean": false
|
|
55
|
-
},
|
|
56
|
-
"timestamp": "2026-02-05T12:45:42.803Z"
|
|
57
|
-
},
|
|
58
|
-
"7": {
|
|
59
|
-
"title": "Concurrent Execution",
|
|
60
|
-
"status": "PASS",
|
|
61
|
-
"findings": {
|
|
62
|
-
"concurrent_execution": true,
|
|
63
|
-
"lodash_lines": 1,
|
|
64
|
-
"chalk_lines": 1,
|
|
65
|
-
"both_completed": true
|
|
66
|
-
},
|
|
67
|
-
"timestamp": "2026-02-05T12:45:47.714Z"
|
|
68
|
-
},
|
|
69
|
-
"8": {
|
|
70
|
-
"title": "Dark Mode Test",
|
|
71
|
-
"status": "PASS",
|
|
72
|
-
"findings": {
|
|
73
|
-
"theme_toggle_found": false,
|
|
74
|
-
"light_mode_rendered": true,
|
|
75
|
-
"dark_mode_rendered": true,
|
|
76
|
-
"theme_transition": "automatic"
|
|
77
|
-
},
|
|
78
|
-
"timestamp": "2026-02-05T12:45:48.339Z"
|
|
79
|
-
},
|
|
80
|
-
"9": {
|
|
81
|
-
"title": "Final Validation",
|
|
82
|
-
"status": "PARTIAL",
|
|
83
|
-
"findings": {
|
|
84
|
-
"total_phases": 6,
|
|
85
|
-
"passing": 5,
|
|
86
|
-
"failing": 1,
|
|
87
|
-
"pass_rate": "83%",
|
|
88
|
-
"production_ready": false,
|
|
89
|
-
"execution_time": "24s",
|
|
90
|
-
"total_errors": 1
|
|
91
|
-
},
|
|
92
|
-
"timestamp": "2026-02-05T12:45:48.340Z"
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
"screenshots": [
|
|
96
|
-
{
|
|
97
|
-
"phase": 2,
|
|
98
|
-
"description": "Initial UI Load",
|
|
99
|
-
"file": "/tmp/screenshot-phase2.png",
|
|
100
|
-
"timestamp": "2026-02-05T12:45:36.387Z"
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
"phase": 5,
|
|
104
|
-
"description": "README.md Display",
|
|
105
|
-
"file": "/tmp/screenshot-phase5.png",
|
|
106
|
-
"timestamp": "2026-02-05T12:45:41.214Z"
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
"phase": 6,
|
|
110
|
-
"description": "DevTools Console",
|
|
111
|
-
"file": "/tmp/screenshot-phase6.png",
|
|
112
|
-
"timestamp": "2026-02-05T12:45:42.803Z"
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
"phase": 7,
|
|
116
|
-
"description": "Both Executions Running",
|
|
117
|
-
"file": "/tmp/screenshot-phase7-running.png",
|
|
118
|
-
"timestamp": "2026-02-05T12:45:47.714Z"
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
"phase": 7,
|
|
122
|
-
"description": "Both Executions Complete",
|
|
123
|
-
"file": "/tmp/screenshot-phase7-complete.png",
|
|
124
|
-
"timestamp": "2026-02-05T12:45:47.714Z"
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
"phase": 9,
|
|
128
|
-
"description": "System Status Final",
|
|
129
|
-
"file": "/tmp/screenshot-phase9-final.png",
|
|
130
|
-
"timestamp": "2026-02-05T12:45:48.406Z"
|
|
131
|
-
}
|
|
132
|
-
],
|
|
133
|
-
"errors": [
|
|
134
|
-
{
|
|
135
|
-
"message": "Command failed: timeout 30 claude /tmp/test-repos/lodash --dangerously-skip-permissions --output-format=stream-json < /dev/null 2>&1\n",
|
|
136
|
-
"timestamp": "2026-02-05T12:45:41.212Z"
|
|
137
|
-
}
|
|
138
|
-
]
|
|
139
|
-
}
|
package/acp-launcher.js
DELETED
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
import { query } from '@anthropic-ai/claude-code';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* ACPConnection - Uses @anthropic-ai/claude-code SDK directly
|
|
5
|
-
*
|
|
6
|
-
* This uses the real Claude Code SDK which handles:
|
|
7
|
-
* - Plugin execution with real system prompt
|
|
8
|
-
* - Actual filesystem operations
|
|
9
|
-
* - Streaming responses with onUpdate callbacks
|
|
10
|
-
* - No subprocess spawning needed (SDK handles it)
|
|
11
|
-
* - Integrated glootie-cc MCP servers for full capabilities
|
|
12
|
-
*/
|
|
13
|
-
export default class ACPConnection {
|
|
14
|
-
constructor() {
|
|
15
|
-
this.sessionId = null;
|
|
16
|
-
this.onUpdate = null;
|
|
17
|
-
this.cwd = process.cwd();
|
|
18
|
-
this.mcpServers = this.buildMcpServers();
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
buildMcpServers() {
|
|
22
|
-
const mcpServers = {};
|
|
23
|
-
|
|
24
|
-
// Add glootie-cc MCP servers for full execution capabilities
|
|
25
|
-
if (process.env.CLAUDE_PLUGIN_ROOT) {
|
|
26
|
-
const pluginRoot = process.env.CLAUDE_PLUGIN_ROOT;
|
|
27
|
-
mcpServers['dev'] = {
|
|
28
|
-
type: 'stdio',
|
|
29
|
-
command: 'bunx',
|
|
30
|
-
args: ['mcp-glootie@latest'],
|
|
31
|
-
timeout: 360000
|
|
32
|
-
};
|
|
33
|
-
mcpServers['code-search'] = {
|
|
34
|
-
type: 'stdio',
|
|
35
|
-
command: 'bunx',
|
|
36
|
-
args: ['codebasesearch@latest'],
|
|
37
|
-
timeout: 360000
|
|
38
|
-
};
|
|
39
|
-
} else {
|
|
40
|
-
// Fallback to standard MCP configuration
|
|
41
|
-
mcpServers['dev'] = {
|
|
42
|
-
type: 'stdio',
|
|
43
|
-
command: 'bunx',
|
|
44
|
-
args: ['mcp-glootie@latest'],
|
|
45
|
-
timeout: 360000
|
|
46
|
-
};
|
|
47
|
-
mcpServers['code-search'] = {
|
|
48
|
-
type: 'stdio',
|
|
49
|
-
command: 'bunx',
|
|
50
|
-
args: ['codebasesearch@latest'],
|
|
51
|
-
timeout: 360000
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
return mcpServers;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
async connect(agentType, cwd) {
|
|
59
|
-
console.log(`[ACP] Using @anthropic-ai/claude-code SDK (${agentType})`);
|
|
60
|
-
console.log(`[ACP] MCP servers configured: ${Object.keys(this.mcpServers).join(', ')}`);
|
|
61
|
-
if (cwd) {
|
|
62
|
-
this.cwd = cwd;
|
|
63
|
-
}
|
|
64
|
-
return { connected: true };
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
async initialize() {
|
|
68
|
-
return { ready: true };
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
async newSession(cwd) {
|
|
72
|
-
this.sessionId = Math.random().toString(36).substring(7);
|
|
73
|
-
if (cwd) {
|
|
74
|
-
this.cwd = cwd;
|
|
75
|
-
}
|
|
76
|
-
console.log(`[ACP] Session ${this.sessionId} in ${this.cwd}`);
|
|
77
|
-
return { sessionId: this.sessionId };
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
async setSessionMode(modeId) {
|
|
81
|
-
return { modeId };
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
async injectSkills(additionalContext = '') {
|
|
85
|
-
return { skills: [] };
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
async injectSystemContext() {
|
|
89
|
-
return { context: 'Using Claude Code SDK with glootie-cc MCP integration' };
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
async sendPrompt(prompt) {
|
|
93
|
-
const promptText = typeof prompt === 'string' ? prompt : prompt.map(p => p.text).join('\n');
|
|
94
|
-
|
|
95
|
-
try {
|
|
96
|
-
console.log(`[ACP] Sending prompt (${promptText.length} chars) in ${this.cwd}`);
|
|
97
|
-
|
|
98
|
-
// Build environment with proper permissions and working directory setup
|
|
99
|
-
const env = {
|
|
100
|
-
...process.env,
|
|
101
|
-
HOME: process.env.HOME || '/config',
|
|
102
|
-
USER: process.env.USER || 'abc',
|
|
103
|
-
PATH: process.env.PATH || '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
|
|
104
|
-
// Ensure file operations are fully enabled
|
|
105
|
-
CLAUDE_CODE_ALLOW_ALL: 'true',
|
|
106
|
-
CLAUDE_CODE_BYPASS_PERMISSIONS: 'true'
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
// Build permission updates to allow directory access
|
|
110
|
-
const permissionUpdates = [
|
|
111
|
-
{
|
|
112
|
-
type: 'addDirectories',
|
|
113
|
-
directories: ['/tmp/test-projects', this.cwd, '/tmp', '/config'],
|
|
114
|
-
destination: 'session'
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
type: 'addRules',
|
|
118
|
-
rules: ['*'],
|
|
119
|
-
behavior: 'allow',
|
|
120
|
-
destination: 'session'
|
|
121
|
-
}
|
|
122
|
-
];
|
|
123
|
-
|
|
124
|
-
// Use the SDK directly to execute the prompt
|
|
125
|
-
// The SDK handles plugins, system prompt, and all real execution
|
|
126
|
-
const session = await query({
|
|
127
|
-
prompt: promptText,
|
|
128
|
-
options: {
|
|
129
|
-
cwd: this.cwd,
|
|
130
|
-
env: env,
|
|
131
|
-
mcpServers: this.mcpServers,
|
|
132
|
-
permissionMode: 'acceptEdits',
|
|
133
|
-
additionalDirectories: ['/tmp/test-projects', this.cwd, '/tmp', '/config']
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
|
|
137
|
-
let fullResponse = '';
|
|
138
|
-
|
|
139
|
-
// Stream messages and collect the final result
|
|
140
|
-
for await (const message of session.sdkMessages) {
|
|
141
|
-
if (message.type === 'result') {
|
|
142
|
-
// Extract the actual result from the final message
|
|
143
|
-
if (message.result) {
|
|
144
|
-
fullResponse = String(message.result);
|
|
145
|
-
console.log(`[ACP] Got result: ${fullResponse.length} chars`);
|
|
146
|
-
|
|
147
|
-
// Emit update callback if provided
|
|
148
|
-
if (this.onUpdate && fullResponse) {
|
|
149
|
-
this.onUpdate({
|
|
150
|
-
update: {
|
|
151
|
-
sessionUpdate: 'agent_message_chunk',
|
|
152
|
-
content: { text: fullResponse }
|
|
153
|
-
}
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
return {
|
|
159
|
-
content: fullResponse,
|
|
160
|
-
stopReason: 'end_turn',
|
|
161
|
-
result: fullResponse,
|
|
162
|
-
sessionId: this.sessionId,
|
|
163
|
-
usage: message.usage
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
// Fallback if no result message found
|
|
169
|
-
return {
|
|
170
|
-
content: fullResponse,
|
|
171
|
-
stopReason: 'end_turn',
|
|
172
|
-
result: fullResponse,
|
|
173
|
-
sessionId: this.sessionId
|
|
174
|
-
};
|
|
175
|
-
|
|
176
|
-
} catch (err) {
|
|
177
|
-
console.error(`[ACP] Query error: ${err.message}`);
|
|
178
|
-
throw err;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
isRunning() {
|
|
183
|
-
return true; // SDK manages process lifecycle
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
async terminate() {
|
|
187
|
-
console.log(`[ACP] Terminating session ${this.sessionId}`);
|
|
188
|
-
return { terminated: true };
|
|
189
|
-
}
|
|
190
|
-
}
|