fix(fleet): install executable tmux helpers
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@mosaicstack/mosaic",
|
"name": "@mosaicstack/mosaic",
|
||||||
"version": "0.0.33",
|
"version": "0.0.34",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.mosaicstack.dev/mosaicstack/stack.git",
|
"url": "https://git.mosaicstack.dev/mosaicstack/stack.git",
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { constants } from 'node:fs';
|
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 { 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,18 +478,19 @@ 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'),
|
||||||
join(activePaths.fleetToolsDir, 'start-agent-session.sh'),
|
startAgentSessionPath,
|
||||||
);
|
|
||||||
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'),
|
||||||
|
|||||||
Reference in New Issue
Block a user