fix(fleet): install executable tmux helpers #568

Merged
jason.woltje merged 1 commits from fix/fleet-install-script-perms into main 2026-06-20 22:27:46 +00:00
2 changed files with 12 additions and 11 deletions

View File

@@ -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",

View File

@@ -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'),