fix(fleet): install executable tmux helpers (#568)
This commit was merged in pull request #568.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@mosaicstack/mosaic",
|
||||
"version": "0.0.33",
|
||||
"version": "0.0.34",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://git.mosaicstack.dev/mosaicstack/stack.git",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { constants } from 'node:fs';
|
||||
import { access, copyFile, mkdir, readFile, writeFile } from 'node:fs/promises';
|
||||
import { access, chmod, copyFile, mkdir, readFile, writeFile } from 'node:fs/promises';
|
||||
import { homedir, hostname } from 'node:os';
|
||||
import { dirname, join, resolve } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
@@ -478,18 +478,19 @@ async function installFleet(cmd: Command, frameworkRoot: string): Promise<void>
|
||||
await mkdir(activePaths.systemdUserDir, { 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(
|
||||
join(frameworkRoot, 'tools', 'fleet', 'start-agent-session.sh'),
|
||||
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'),
|
||||
startAgentSessionPath,
|
||||
);
|
||||
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(
|
||||
join(frameworkRoot, 'systemd', 'user', 'mosaic-tmux-holder.service'),
|
||||
join(activePaths.systemdUserDir, 'mosaic-tmux-holder.service'),
|
||||
|
||||
Reference in New Issue
Block a user