|
|
|
@@ -1,5 +1,5 @@
|
|
|
|
import { constants } from 'node:fs';
|
|
|
|
import { constants } from 'node:fs';
|
|
|
|
import { access, chmod, copyFile, mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
|
|
import { access, copyFile, mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
|
|
import { homedir, hostname } from 'node:os';
|
|
|
|
import { homedir, hostname } from 'node:os';
|
|
|
|
import { dirname, join, resolve } from 'node:path';
|
|
|
|
import { dirname, join, resolve } from 'node:path';
|
|
|
|
import { fileURLToPath } from 'node:url';
|
|
|
|
import { fileURLToPath } from 'node:url';
|
|
|
|
@@ -478,19 +478,18 @@ async function installFleet(cmd: Command, frameworkRoot: string): Promise<void>
|
|
|
|
await mkdir(activePaths.systemdUserDir, { recursive: true });
|
|
|
|
await mkdir(activePaths.systemdUserDir, { recursive: true });
|
|
|
|
await mkdir(activePaths.agentEnvDir, { recursive: true });
|
|
|
|
await mkdir(activePaths.agentEnvDir, { recursive: true });
|
|
|
|
|
|
|
|
|
|
|
|
const startAgentSessionPath = join(activePaths.fleetToolsDir, 'start-agent-session.sh');
|
|
|
|
|
|
|
|
const sendMessagePath = join(activePaths.tmuxToolsDir, 'send-message.sh');
|
|
|
|
|
|
|
|
const agentSendPath = join(activePaths.tmuxToolsDir, 'agent-send.sh');
|
|
|
|
|
|
|
|
const executableToolPaths = [startAgentSessionPath, sendMessagePath, agentSendPath];
|
|
|
|
|
|
|
|
await copyFile(
|
|
|
|
await copyFile(
|
|
|
|
join(frameworkRoot, 'tools', 'fleet', 'start-agent-session.sh'),
|
|
|
|
join(frameworkRoot, 'tools', 'fleet', 'start-agent-session.sh'),
|
|
|
|
startAgentSessionPath,
|
|
|
|
join(activePaths.fleetToolsDir, 'start-agent-session.sh'),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
await copyFile(
|
|
|
|
|
|
|
|
join(frameworkRoot, 'tools', 'tmux', 'send-message.sh'),
|
|
|
|
|
|
|
|
join(activePaths.tmuxToolsDir, 'send-message.sh'),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
await copyFile(
|
|
|
|
|
|
|
|
join(frameworkRoot, 'tools', 'tmux', 'agent-send.sh'),
|
|
|
|
|
|
|
|
join(activePaths.tmuxToolsDir, 'agent-send.sh'),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
await copyFile(join(frameworkRoot, 'tools', 'tmux', 'send-message.sh'), sendMessagePath);
|
|
|
|
|
|
|
|
await copyFile(join(frameworkRoot, 'tools', 'tmux', 'agent-send.sh'), agentSendPath);
|
|
|
|
|
|
|
|
for (const toolPath of executableToolPaths) {
|
|
|
|
|
|
|
|
await chmod(toolPath, 0o755);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
await copyFile(
|
|
|
|
await copyFile(
|
|
|
|
join(frameworkRoot, 'systemd', 'user', 'mosaic-tmux-holder.service'),
|
|
|
|
join(frameworkRoot, 'systemd', 'user', 'mosaic-tmux-holder.service'),
|
|
|
|
join(activePaths.systemdUserDir, 'mosaic-tmux-holder.service'),
|
|
|
|
join(activePaths.systemdUserDir, 'mosaic-tmux-holder.service'),
|
|
|
|
|