genbox-agent 0.0.2 → 1.0.1
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/dist/configure-hooks.d.ts +17 -0
- package/dist/configure-hooks.d.ts.map +1 -0
- package/dist/configure-hooks.js +235 -0
- package/dist/configure-hooks.js.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +41 -1
- package/dist/index.js.map +1 -1
- package/dist/providers/base-provider.d.ts +125 -0
- package/dist/providers/base-provider.d.ts.map +1 -0
- package/dist/providers/base-provider.js +217 -0
- package/dist/providers/base-provider.js.map +1 -0
- package/dist/providers/claude-provider.d.ts +35 -0
- package/dist/providers/claude-provider.d.ts.map +1 -0
- package/dist/providers/claude-provider.js +298 -0
- package/dist/providers/claude-provider.js.map +1 -0
- package/dist/providers/codex-provider.d.ts +73 -0
- package/dist/providers/codex-provider.d.ts.map +1 -0
- package/dist/providers/codex-provider.js +426 -0
- package/dist/providers/codex-provider.js.map +1 -0
- package/dist/providers/gemini-provider.d.ts +37 -0
- package/dist/providers/gemini-provider.d.ts.map +1 -0
- package/dist/providers/gemini-provider.js +352 -0
- package/dist/providers/gemini-provider.js.map +1 -0
- package/dist/providers/index.d.ts +128 -0
- package/dist/providers/index.d.ts.map +1 -0
- package/dist/providers/index.js +293 -0
- package/dist/providers/index.js.map +1 -0
- package/dist/types/index.d.ts +123 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +9 -0
- package/dist/types/index.js.map +1 -0
- package/dist/unified-daemon.d.ts +18 -0
- package/dist/unified-daemon.d.ts.map +1 -0
- package/dist/unified-daemon.js +309 -0
- package/dist/unified-daemon.js.map +1 -0
- package/dist/unified-hook.d.ts +24 -0
- package/dist/unified-hook.d.ts.map +1 -0
- package/dist/unified-hook.js +173 -0
- package/dist/unified-hook.js.map +1 -0
- package/package.json +34 -8
- package/src/daemon.ts +0 -329
- package/src/hook.ts +0 -200
- package/src/index.ts +0 -1
- package/src/session-manager.ts +0 -270
- package/tsconfig.json +0 -19
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Provider Registry
|
|
4
|
+
*
|
|
5
|
+
* Central registry for all AI CLI providers. Provides:
|
|
6
|
+
* - Provider registration and discovery
|
|
7
|
+
* - Auto-detection of installed providers
|
|
8
|
+
* - Unified interface for provider operations
|
|
9
|
+
*/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.HookConfigGenerator = exports.UnifiedSessionManager = exports.ProviderRegistry = exports.CodexProvider = exports.GeminiProvider = exports.ClaudeProvider = exports.BaseProvider = void 0;
|
|
12
|
+
const claude_provider_1 = require("./claude-provider");
|
|
13
|
+
const gemini_provider_1 = require("./gemini-provider");
|
|
14
|
+
const codex_provider_1 = require("./codex-provider");
|
|
15
|
+
// Re-export providers
|
|
16
|
+
var base_provider_1 = require("./base-provider");
|
|
17
|
+
Object.defineProperty(exports, "BaseProvider", { enumerable: true, get: function () { return base_provider_1.BaseProvider; } });
|
|
18
|
+
var claude_provider_2 = require("./claude-provider");
|
|
19
|
+
Object.defineProperty(exports, "ClaudeProvider", { enumerable: true, get: function () { return claude_provider_2.ClaudeProvider; } });
|
|
20
|
+
var gemini_provider_2 = require("./gemini-provider");
|
|
21
|
+
Object.defineProperty(exports, "GeminiProvider", { enumerable: true, get: function () { return gemini_provider_2.GeminiProvider; } });
|
|
22
|
+
var codex_provider_2 = require("./codex-provider");
|
|
23
|
+
Object.defineProperty(exports, "CodexProvider", { enumerable: true, get: function () { return codex_provider_2.CodexProvider; } });
|
|
24
|
+
/**
|
|
25
|
+
* Provider Registry
|
|
26
|
+
*
|
|
27
|
+
* Manages all registered AI CLI providers and provides a unified interface
|
|
28
|
+
* for creating and working with them.
|
|
29
|
+
*/
|
|
30
|
+
class ProviderRegistry {
|
|
31
|
+
static instance;
|
|
32
|
+
providers = new Map();
|
|
33
|
+
instances = new Map(); // genboxId:provider -> instance
|
|
34
|
+
constructor() {
|
|
35
|
+
// Register built-in providers
|
|
36
|
+
this.register('claude', (genboxId) => new claude_provider_1.ClaudeProvider(genboxId), 1);
|
|
37
|
+
this.register('gemini', (genboxId) => new gemini_provider_1.GeminiProvider(genboxId), 2);
|
|
38
|
+
this.register('codex', (genboxId) => new codex_provider_1.CodexProvider(genboxId), 3);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Get singleton instance
|
|
42
|
+
*/
|
|
43
|
+
static getInstance() {
|
|
44
|
+
if (!ProviderRegistry.instance) {
|
|
45
|
+
ProviderRegistry.instance = new ProviderRegistry();
|
|
46
|
+
}
|
|
47
|
+
return ProviderRegistry.instance;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Register a new provider
|
|
51
|
+
*/
|
|
52
|
+
register(provider, factory, priority = 100) {
|
|
53
|
+
this.providers.set(provider, { provider, factory, priority });
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Get a provider instance
|
|
57
|
+
*/
|
|
58
|
+
getProvider(provider, genboxId) {
|
|
59
|
+
const entry = this.providers.get(provider);
|
|
60
|
+
if (!entry)
|
|
61
|
+
return null;
|
|
62
|
+
const key = `${genboxId}:${provider}`;
|
|
63
|
+
if (!this.instances.has(key)) {
|
|
64
|
+
this.instances.set(key, entry.factory(genboxId));
|
|
65
|
+
}
|
|
66
|
+
return this.instances.get(key) || null;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Get all registered providers
|
|
70
|
+
*/
|
|
71
|
+
getRegisteredProviders() {
|
|
72
|
+
return Array.from(this.providers.keys());
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Detect all installed providers
|
|
76
|
+
*/
|
|
77
|
+
detectInstalledProviders(genboxId) {
|
|
78
|
+
const results = new Map();
|
|
79
|
+
for (const [name, entry] of this.providers) {
|
|
80
|
+
const provider = entry.factory(genboxId);
|
|
81
|
+
const detection = provider.detect();
|
|
82
|
+
results.set(name, detection);
|
|
83
|
+
}
|
|
84
|
+
return results;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Get the first available (installed) provider
|
|
88
|
+
*/
|
|
89
|
+
getDefaultProvider(genboxId) {
|
|
90
|
+
const sorted = Array.from(this.providers.values())
|
|
91
|
+
.sort((a, b) => a.priority - b.priority);
|
|
92
|
+
for (const entry of sorted) {
|
|
93
|
+
const provider = this.getProvider(entry.provider, genboxId);
|
|
94
|
+
if (provider && provider.detect().detected) {
|
|
95
|
+
return provider;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Get provider configuration
|
|
102
|
+
*/
|
|
103
|
+
getProviderConfig(provider, genboxId) {
|
|
104
|
+
const instance = this.getProvider(provider, genboxId);
|
|
105
|
+
return instance?.config || null;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
exports.ProviderRegistry = ProviderRegistry;
|
|
109
|
+
/**
|
|
110
|
+
* Unified Session Manager
|
|
111
|
+
*
|
|
112
|
+
* High-level interface for managing sessions across all providers
|
|
113
|
+
*/
|
|
114
|
+
class UnifiedSessionManager {
|
|
115
|
+
genboxId;
|
|
116
|
+
registry;
|
|
117
|
+
sessions = new Map();
|
|
118
|
+
constructor(genboxId) {
|
|
119
|
+
this.genboxId = genboxId;
|
|
120
|
+
this.registry = ProviderRegistry.getInstance();
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Create a new session with the specified or default provider
|
|
124
|
+
*/
|
|
125
|
+
createSession(projectPath = '/home/dev', provider) {
|
|
126
|
+
const providerInstance = provider
|
|
127
|
+
? this.registry.getProvider(provider, this.genboxId)
|
|
128
|
+
: this.registry.getDefaultProvider(this.genboxId);
|
|
129
|
+
if (!providerInstance) {
|
|
130
|
+
console.error('No provider available');
|
|
131
|
+
return null;
|
|
132
|
+
}
|
|
133
|
+
const session = providerInstance.createSession(projectPath);
|
|
134
|
+
if (session) {
|
|
135
|
+
this.sessions.set(session.sessionId, { session, provider: providerInstance });
|
|
136
|
+
}
|
|
137
|
+
return session;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Send a prompt to a session
|
|
141
|
+
*/
|
|
142
|
+
sendPrompt(sessionId, prompt) {
|
|
143
|
+
const entry = this.sessions.get(sessionId);
|
|
144
|
+
if (!entry) {
|
|
145
|
+
// Try to find the session across all providers
|
|
146
|
+
const found = this.findSession(sessionId);
|
|
147
|
+
if (!found)
|
|
148
|
+
return false;
|
|
149
|
+
return found.provider.sendPrompt(sessionId, prompt);
|
|
150
|
+
}
|
|
151
|
+
return entry.provider.sendPrompt(sessionId, prompt);
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Send a keystroke to a session
|
|
155
|
+
*/
|
|
156
|
+
sendKeystroke(sessionId, key) {
|
|
157
|
+
const entry = this.sessions.get(sessionId);
|
|
158
|
+
if (!entry) {
|
|
159
|
+
const found = this.findSession(sessionId);
|
|
160
|
+
if (!found)
|
|
161
|
+
return false;
|
|
162
|
+
return found.provider.sendKeystroke(sessionId, key);
|
|
163
|
+
}
|
|
164
|
+
return entry.provider.sendKeystroke(sessionId, key);
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Get terminal output from a session
|
|
168
|
+
*/
|
|
169
|
+
getOutput(sessionId, lines = 100) {
|
|
170
|
+
const entry = this.sessions.get(sessionId);
|
|
171
|
+
if (!entry) {
|
|
172
|
+
const found = this.findSession(sessionId);
|
|
173
|
+
if (!found)
|
|
174
|
+
return null;
|
|
175
|
+
return found.provider.getOutput(sessionId, lines);
|
|
176
|
+
}
|
|
177
|
+
return entry.provider.getOutput(sessionId, lines);
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Get session status
|
|
181
|
+
*/
|
|
182
|
+
getSessionStatus(sessionId) {
|
|
183
|
+
const entry = this.sessions.get(sessionId);
|
|
184
|
+
if (!entry) {
|
|
185
|
+
const found = this.findSession(sessionId);
|
|
186
|
+
if (!found)
|
|
187
|
+
return 'ended';
|
|
188
|
+
return found.provider.getSessionStatus(sessionId);
|
|
189
|
+
}
|
|
190
|
+
return entry.provider.getSessionStatus(sessionId);
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Kill a session
|
|
194
|
+
*/
|
|
195
|
+
killSession(sessionId) {
|
|
196
|
+
const entry = this.sessions.get(sessionId);
|
|
197
|
+
if (!entry) {
|
|
198
|
+
const found = this.findSession(sessionId);
|
|
199
|
+
if (!found)
|
|
200
|
+
return false;
|
|
201
|
+
return found.provider.killSession(sessionId);
|
|
202
|
+
}
|
|
203
|
+
const result = entry.provider.killSession(sessionId);
|
|
204
|
+
if (result) {
|
|
205
|
+
this.sessions.delete(sessionId);
|
|
206
|
+
}
|
|
207
|
+
return result;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* List all sessions across all providers
|
|
211
|
+
*/
|
|
212
|
+
listAllSessions() {
|
|
213
|
+
const allSessions = [];
|
|
214
|
+
for (const providerName of this.registry.getRegisteredProviders()) {
|
|
215
|
+
const provider = this.registry.getProvider(providerName, this.genboxId);
|
|
216
|
+
if (provider) {
|
|
217
|
+
const sessions = provider.listSessions();
|
|
218
|
+
allSessions.push(...sessions);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
return allSessions;
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Find a session across all providers
|
|
225
|
+
*/
|
|
226
|
+
findSession(sessionId) {
|
|
227
|
+
for (const providerName of this.registry.getRegisteredProviders()) {
|
|
228
|
+
const provider = this.registry.getProvider(providerName, this.genboxId);
|
|
229
|
+
if (!provider)
|
|
230
|
+
continue;
|
|
231
|
+
const sessions = provider.listSessions();
|
|
232
|
+
const session = sessions.find(s => s.sessionId === sessionId);
|
|
233
|
+
if (session) {
|
|
234
|
+
this.sessions.set(sessionId, { session, provider });
|
|
235
|
+
return { session, provider };
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
return null;
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Get detected providers
|
|
242
|
+
*/
|
|
243
|
+
getDetectedProviders() {
|
|
244
|
+
return this.registry.detectInstalledProviders(this.genboxId);
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Get a specific provider instance
|
|
248
|
+
*/
|
|
249
|
+
getProvider(provider) {
|
|
250
|
+
return this.registry.getProvider(provider, this.genboxId);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
exports.UnifiedSessionManager = UnifiedSessionManager;
|
|
254
|
+
/**
|
|
255
|
+
* Hook Configuration Generator
|
|
256
|
+
*
|
|
257
|
+
* Generates hook configurations for all providers
|
|
258
|
+
*/
|
|
259
|
+
class HookConfigGenerator {
|
|
260
|
+
genboxId;
|
|
261
|
+
registry;
|
|
262
|
+
constructor(genboxId) {
|
|
263
|
+
this.genboxId = genboxId;
|
|
264
|
+
this.registry = ProviderRegistry.getInstance();
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Generate hook configuration for a specific provider
|
|
268
|
+
*/
|
|
269
|
+
generateForProvider(provider, hookScriptPath) {
|
|
270
|
+
const providerInstance = this.registry.getProvider(provider, this.genboxId);
|
|
271
|
+
if (!providerInstance)
|
|
272
|
+
return null;
|
|
273
|
+
return providerInstance.generateHookConfig(hookScriptPath);
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* Generate hook configurations for all detected providers
|
|
277
|
+
*/
|
|
278
|
+
generateForAllDetected(hookScriptPath) {
|
|
279
|
+
const configs = new Map();
|
|
280
|
+
const detected = this.registry.detectInstalledProviders(this.genboxId);
|
|
281
|
+
for (const [provider, detection] of detected) {
|
|
282
|
+
if (detection.detected) {
|
|
283
|
+
const config = this.generateForProvider(provider, hookScriptPath);
|
|
284
|
+
if (config) {
|
|
285
|
+
configs.set(provider, config);
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
return configs;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
exports.HookConfigGenerator = HookConfigGenerator;
|
|
293
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/providers/index.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAWH,uDAAmD;AACnD,uDAAmD;AACnD,qDAAiD;AAEjD,sBAAsB;AACtB,iDAA4D;AAAnD,6GAAA,YAAY,OAAA;AACrB,qDAAmD;AAA1C,iHAAA,cAAc,OAAA;AACvB,qDAAmD;AAA1C,iHAAA,cAAc,OAAA;AACvB,mDAAiD;AAAxC,+GAAA,aAAa,OAAA;AAgBtB;;;;;GAKG;AACH,MAAa,gBAAgB;IACnB,MAAM,CAAC,QAAQ,CAAmB;IAClC,SAAS,GAAmC,IAAI,GAAG,EAAE,CAAC;IACtD,SAAS,GAA6B,IAAI,GAAG,EAAE,CAAC,CAAE,gCAAgC;IAE1F;QACE,8BAA8B;QAC9B,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,IAAI,gCAAc,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;QACvE,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,IAAI,gCAAc,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;QACvE,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,IAAI,8BAAa,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;IACvE,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,WAAW;QAChB,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC;YAC/B,gBAAgB,CAAC,QAAQ,GAAG,IAAI,gBAAgB,EAAE,CAAC;QACrD,CAAC;Q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AAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,wBAAwB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAEvE,KAAK,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,IAAI,QAAQ,EAAE,CAAC;YAC7C,IAAI,SAAS,CAAC,QAAQ,EAAE,CAAC;gBACvB,MAAM,MAAM,GAAG,IAAI,CAAC,mBAAmB,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;gBAClE,IAAI,MAAM,EAAE,CAAC;oBACX,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;gBAChC,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;CACF;AAnCD,kDAmCC"}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unified Types for Multi-AI CLI Support
|
|
3
|
+
*
|
|
4
|
+
* This module defines common types and interfaces that allow the genbox-agent
|
|
5
|
+
* to work with multiple AI CLI tools (Claude Code, Gemini CLI, OpenAI Codex, etc.)
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Supported AI CLI providers
|
|
9
|
+
*/
|
|
10
|
+
export type AIProvider = 'claude' | 'gemini' | 'codex';
|
|
11
|
+
/**
|
|
12
|
+
* Unified hook event types across all AI CLIs
|
|
13
|
+
* Maps to provider-specific events internally
|
|
14
|
+
*/
|
|
15
|
+
export type UnifiedEventType = 'session_start' | 'session_end' | 'before_prompt' | 'after_prompt' | 'before_tool' | 'after_tool' | 'before_model' | 'after_model' | 'notification' | 'error' | 'subagent_stop';
|
|
16
|
+
/**
|
|
17
|
+
* Unified session representation across all providers
|
|
18
|
+
*/
|
|
19
|
+
export interface AISession {
|
|
20
|
+
sessionId: string;
|
|
21
|
+
sessionName: string;
|
|
22
|
+
provider: AIProvider;
|
|
23
|
+
projectPath: string;
|
|
24
|
+
createdAt: number;
|
|
25
|
+
status: AISessionStatus;
|
|
26
|
+
metadata?: Record<string, any>;
|
|
27
|
+
}
|
|
28
|
+
export type AISessionStatus = 'starting' | 'active' | 'idle' | 'waiting_input' | 'error' | 'ended';
|
|
29
|
+
/**
|
|
30
|
+
* Unified hook event data
|
|
31
|
+
*/
|
|
32
|
+
export interface UnifiedHookEvent {
|
|
33
|
+
eventType: UnifiedEventType;
|
|
34
|
+
provider: AIProvider;
|
|
35
|
+
providerEventType: string;
|
|
36
|
+
sessionId: string;
|
|
37
|
+
genboxId: string;
|
|
38
|
+
timestamp: string;
|
|
39
|
+
projectPath: string;
|
|
40
|
+
tmuxSession?: string;
|
|
41
|
+
toolName?: string;
|
|
42
|
+
toolInput?: Record<string, any>;
|
|
43
|
+
toolResponse?: Record<string, any>;
|
|
44
|
+
toolSuccess?: boolean;
|
|
45
|
+
prompt?: string;
|
|
46
|
+
promptLength?: number;
|
|
47
|
+
modelName?: string;
|
|
48
|
+
modelRequest?: Record<string, any>;
|
|
49
|
+
modelResponse?: Record<string, any>;
|
|
50
|
+
tokenCount?: number;
|
|
51
|
+
notification?: string;
|
|
52
|
+
notificationType?: string;
|
|
53
|
+
error?: string;
|
|
54
|
+
errorCode?: string;
|
|
55
|
+
cliVersion?: string;
|
|
56
|
+
sessionDuration?: number;
|
|
57
|
+
stopReason?: string;
|
|
58
|
+
subagentType?: string;
|
|
59
|
+
rawData?: Record<string, any>;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Provider-specific hook input (what the CLI sends to the hook)
|
|
63
|
+
*/
|
|
64
|
+
export interface ProviderHookInput {
|
|
65
|
+
provider: AIProvider;
|
|
66
|
+
eventType: string;
|
|
67
|
+
data: Record<string, any>;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Configuration for an AI CLI provider
|
|
71
|
+
*/
|
|
72
|
+
export interface ProviderConfig {
|
|
73
|
+
provider: AIProvider;
|
|
74
|
+
displayName: string;
|
|
75
|
+
cliCommand: string;
|
|
76
|
+
settingsPath: string;
|
|
77
|
+
tmuxPrefix: string;
|
|
78
|
+
supportedEvents: string[];
|
|
79
|
+
eventMapping: Record<string, UnifiedEventType>;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Provider detection result
|
|
83
|
+
*/
|
|
84
|
+
export interface ProviderDetectionResult {
|
|
85
|
+
detected: boolean;
|
|
86
|
+
provider?: AIProvider;
|
|
87
|
+
version?: string;
|
|
88
|
+
configPath?: string;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Hook configuration for a provider
|
|
92
|
+
*/
|
|
93
|
+
export interface HookConfig {
|
|
94
|
+
provider: AIProvider;
|
|
95
|
+
settingsJson: Record<string, any>;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Remote command types supported by the daemon
|
|
99
|
+
*/
|
|
100
|
+
export type RemoteCommandType = 'send_prompt' | 'send_keystroke' | 'create_session' | 'get_output' | 'kill_session' | 'list_sessions' | 'get_status';
|
|
101
|
+
/**
|
|
102
|
+
* Remote command request
|
|
103
|
+
*/
|
|
104
|
+
export interface RemoteCommand {
|
|
105
|
+
type: RemoteCommandType;
|
|
106
|
+
provider?: AIProvider;
|
|
107
|
+
sessionId?: string;
|
|
108
|
+
prompt?: string;
|
|
109
|
+
key?: string;
|
|
110
|
+
projectPath?: string;
|
|
111
|
+
lines?: number;
|
|
112
|
+
requestId?: string;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Remote command response
|
|
116
|
+
*/
|
|
117
|
+
export interface RemoteCommandResponse {
|
|
118
|
+
success: boolean;
|
|
119
|
+
requestId?: string;
|
|
120
|
+
data?: any;
|
|
121
|
+
error?: string;
|
|
122
|
+
}
|
|
123
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,QAAQ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AAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,MAAM,iBAAiB,GACzB,aAAa,GACb,gBAAgB,GAChB,gBAAgB,GAChB,YAAY,GACZ,cAAc,GACd,eAAe,GACf,YAAY,CAAC;AAEjB;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,iBAAiB,CAAC;IACxB,QAAQ,CAAC,EAAE,UAAU,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Unified Types for Multi-AI CLI Support
|
|
4
|
+
*
|
|
5
|
+
* This module defines common types and interfaces that allow the genbox-agent
|
|
6
|
+
* to work with multiple AI CLI tools (Claude Code, Gemini CLI, OpenAI Codex, etc.)
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Unified Genbox Agent Daemon
|
|
4
|
+
*
|
|
5
|
+
* WebSocket client that runs on each genbox VM and supports multiple AI CLI tools:
|
|
6
|
+
* - Claude Code
|
|
7
|
+
* - Gemini CLI
|
|
8
|
+
* - OpenAI Codex CLI
|
|
9
|
+
*
|
|
10
|
+
* Features:
|
|
11
|
+
* 1. Connects to the backend monitoring service
|
|
12
|
+
* 2. Receives remote commands (send_prompt, send_keystroke, create_session)
|
|
13
|
+
* 3. Manages tmux sessions for all supported AI CLIs
|
|
14
|
+
* 4. Streams terminal output back to the dashboard
|
|
15
|
+
* 5. Auto-detects installed AI CLIs
|
|
16
|
+
*/
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=unified-daemon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unified-daemon.d.ts","sourceRoot":"","sources":["../src/unified-daemon.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;GAcG"}
|