mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
feat(cli): add Agent Client Protocol (ACP) integration for external agent support
Implements comprehensive ACP backend enabling integration with ACP-compliant agents like Gemini. Includes stdio transport, message handling, permission flow, and registry for agent management. Adds new 'hapi gemini' command to launch ACP agent sessions.
This commit is contained in:
@@ -241,7 +241,7 @@ export async function startDaemon(): Promise<void> {
|
||||
extraEnv = {
|
||||
CODEX_HOME: codexHomeDir
|
||||
};
|
||||
} else { // Assuming claude
|
||||
} else if (options.agent === 'claude' || !options.agent) {
|
||||
extraEnv = {
|
||||
CLAUDE_CODE_OAUTH_TOKEN: options.token
|
||||
};
|
||||
@@ -249,8 +249,13 @@ export async function startDaemon(): Promise<void> {
|
||||
}
|
||||
|
||||
// Construct arguments for the CLI
|
||||
const agentCommand = options.agent === 'codex'
|
||||
? 'codex'
|
||||
: options.agent === 'gemini'
|
||||
? 'gemini'
|
||||
: 'claude';
|
||||
const args = [
|
||||
options.agent === 'claude' ? 'claude' : 'codex',
|
||||
agentCommand,
|
||||
'--hapi-starting-mode', 'remote',
|
||||
'--started-by', 'daemon'
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user