mosaic fleet logins: per-seat credential pass-through (P4 gap closure) #1473

Merged
orch-01 merged 1 commits from mosaic-cli-p4-fleet-logins into next 2026-08-29 20:05:25 +00:00
2 changed files with 20 additions and 1 deletions
@@ -106,6 +106,7 @@ describe('registerFleetCommand', () => {
'init',
'install',
'install-systemd',
'logins',
'migrate-v1',
'persona',
'plan',
+19 -1
View File
@@ -17,7 +17,7 @@ import { homedir, hostname, userInfo } from 'node:os';
import { dirname, join, resolve } from 'node:path';
import { fleetAgentEnvDir } from '../fleet/brain-home.js';
import { fileURLToPath } from 'node:url';
import { spawn } from 'node:child_process';
import { spawn, spawnSync } from 'node:child_process';
import * as readline from 'node:readline';
import type { Command } from 'commander';
import YAML from 'yaml';
@@ -1606,6 +1606,24 @@ export function registerFleetCommand(program: Command, deps: FleetCommandDeps =
.option('--mosaic-home <path>', 'Mosaic home directory', paths.mosaicHome)
.option('--roster <path>', 'Fleet roster path');
// fleet logins (P4 gap closure, 2026-08-29): project per-seat git tokens
// from the brain into usable credentials. The implementation is the
// framework fleet tool; args pass through verbatim (--apply --seat X).
cmd
.command('logins')
.description('Per-seat git credentials: seat-logins.sh pass-through (--apply --seat <name>)')
.allowUnknownOption(true)
.allowExcessArguments(true)
.action((...rest: unknown[]) => {
const cmdObj = rest[rest.length - 1] as { args: string[] };
const script = `${frameworkRoot}/tools/fleet/seat-logins.sh`;
const result = spawnSync('bash', [script, ...cmdObj.args], {
stdio: 'inherit',
env: process.env,
});
process.exit(result.status ?? 125);
});
cmd
.command('init')
.description('Initialize a local fleet roster')