@appoly/multiagent-chat 1.0.0
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/README.md +76 -0
- package/bin/multiagent-chat.js +14 -0
- package/config.yaml +158 -0
- package/index.html +211 -0
- package/main.js +1149 -0
- package/package.json +52 -0
- package/preload.js +71 -0
- package/renderer.js +1626 -0
- package/robot.png +0 -0
- package/styles.css +1626 -0
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@appoly/multiagent-chat",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Multi-agent chat for collaborative AI discussions",
|
|
5
|
+
"main": "main.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"multiagent-chat": "./bin/multiagent-chat.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"bin/",
|
|
11
|
+
"main.js",
|
|
12
|
+
"preload.js",
|
|
13
|
+
"renderer.js",
|
|
14
|
+
"index.html",
|
|
15
|
+
"styles.css",
|
|
16
|
+
"robot.png",
|
|
17
|
+
"config.yaml"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"start": "electron .",
|
|
21
|
+
"postinstall": "electron-rebuild"
|
|
22
|
+
},
|
|
23
|
+
"keywords": [
|
|
24
|
+
"ai",
|
|
25
|
+
"multi-agent",
|
|
26
|
+
"orchestrator",
|
|
27
|
+
"electron"
|
|
28
|
+
],
|
|
29
|
+
"author": "John Wedgbury",
|
|
30
|
+
"license": "MIT",
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": "git+https://github.com/appoly/multiagent-chat.git"
|
|
34
|
+
},
|
|
35
|
+
"homepage": "https://github.com/appoly/multiagent-chat#readme",
|
|
36
|
+
"bugs": {
|
|
37
|
+
"url": "https://github.com/appoly/multiagent-chat/issues"
|
|
38
|
+
},
|
|
39
|
+
"engines": {
|
|
40
|
+
"node": ">=18.0.0"
|
|
41
|
+
},
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"@xterm/addon-fit": "^0.10.0",
|
|
44
|
+
"@xterm/xterm": "^5.5.0",
|
|
45
|
+
"chokidar": "^3.5.3",
|
|
46
|
+
"electron": "^28.0.0",
|
|
47
|
+
"electron-rebuild": "^3.2.9",
|
|
48
|
+
"marked": "^17.0.1",
|
|
49
|
+
"node-pty": "^1.0.0",
|
|
50
|
+
"yaml": "^2.3.4"
|
|
51
|
+
}
|
|
52
|
+
}
|
package/preload.js
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
const { contextBridge, ipcRenderer } = require('electron');
|
|
2
|
+
|
|
3
|
+
console.log('Preload script loading...');
|
|
4
|
+
|
|
5
|
+
// Expose protected methods that allow the renderer process to use
|
|
6
|
+
// the ipcRenderer without exposing the entire object
|
|
7
|
+
contextBridge.exposeInMainWorld('electronAPI', {
|
|
8
|
+
// Load configuration
|
|
9
|
+
loadConfig: () => ipcRenderer.invoke('load-config'),
|
|
10
|
+
|
|
11
|
+
// Start a new session with a challenge and optional workspace
|
|
12
|
+
startSession: (options) => ipcRenderer.invoke('start-session', options),
|
|
13
|
+
|
|
14
|
+
// Send a user message to the chat
|
|
15
|
+
sendUserMessage: (message) => ipcRenderer.invoke('send-user-message', message),
|
|
16
|
+
|
|
17
|
+
// Get current chat content
|
|
18
|
+
getChatContent: () => ipcRenderer.invoke('get-chat-content'),
|
|
19
|
+
|
|
20
|
+
// Get final plan content
|
|
21
|
+
getPlanContent: () => ipcRenderer.invoke('get-plan-content'),
|
|
22
|
+
|
|
23
|
+
// Get git diff since session start
|
|
24
|
+
getGitDiff: () => ipcRenderer.invoke('get-git-diff'),
|
|
25
|
+
|
|
26
|
+
// Stop all agents
|
|
27
|
+
stopAgents: () => ipcRenderer.invoke('stop-agents'),
|
|
28
|
+
|
|
29
|
+
// Reset session (clear chat, plan, stop agents)
|
|
30
|
+
resetSession: () => ipcRenderer.invoke('reset-session'),
|
|
31
|
+
|
|
32
|
+
// Start implementation with selected agent
|
|
33
|
+
startImplementation: (selectedAgent, otherAgents) => ipcRenderer.invoke('start-implementation', selectedAgent, otherAgents),
|
|
34
|
+
|
|
35
|
+
// Send input to PTY (user typing into terminal)
|
|
36
|
+
sendPtyInput: (agentName, data) => ipcRenderer.send('pty-input', { agentName, data }),
|
|
37
|
+
|
|
38
|
+
// Workspace Management
|
|
39
|
+
getRecentWorkspaces: () => ipcRenderer.invoke('get-recent-workspaces'),
|
|
40
|
+
addRecentWorkspace: (path) => ipcRenderer.invoke('add-recent-workspace', path),
|
|
41
|
+
removeRecentWorkspace: (path) => ipcRenderer.invoke('remove-recent-workspace', path),
|
|
42
|
+
updateRecentWorkspacePath: (oldPath, newPath) => ipcRenderer.invoke('update-recent-workspace-path', oldPath, newPath),
|
|
43
|
+
validateWorkspacePath: (path) => ipcRenderer.invoke('validate-workspace-path', path),
|
|
44
|
+
getCurrentDirectory: () => ipcRenderer.invoke('get-current-directory'),
|
|
45
|
+
browseForWorkspace: () => ipcRenderer.invoke('browse-for-workspace'),
|
|
46
|
+
openConfigFolder: () => ipcRenderer.invoke('open-config-folder'),
|
|
47
|
+
getHomeConfigPath: () => ipcRenderer.invoke('get-home-config-path'),
|
|
48
|
+
getCliWorkspace: () => ipcRenderer.invoke('get-cli-workspace'),
|
|
49
|
+
|
|
50
|
+
// Listen for agent output
|
|
51
|
+
onAgentOutput: (callback) => {
|
|
52
|
+
ipcRenderer.on('agent-output', (event, data) => callback(data));
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
// Listen for agent status changes
|
|
56
|
+
onAgentStatus: (callback) => {
|
|
57
|
+
ipcRenderer.on('agent-status', (event, data) => callback(data));
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
// Listen for chat updates (full refresh - array of messages)
|
|
61
|
+
onChatUpdated: (callback) => {
|
|
62
|
+
ipcRenderer.on('chat-updated', (event, messages) => callback(messages));
|
|
63
|
+
},
|
|
64
|
+
|
|
65
|
+
// Listen for new chat messages (single message)
|
|
66
|
+
onChatMessage: (callback) => {
|
|
67
|
+
ipcRenderer.on('chat-message', (event, message) => callback(message));
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
console.log('Preload script loaded successfully');
|