mosaic fleet logins: per-seat credential pass-through (P4 gap closure)
ci/woodpecker/pr/ci Pipeline was successful

Measured: the npm fleet group already covers the P4 plan surface
(ps=pulse, doctor, start/stop/restart/status=seat lifecycle). The one
gap was seat-logins: adds 'fleet logins' as a pass-through to
framework/tools/fleet/seat-logins.sh (args verbatim, exit codes
preserved; static spawnSync import). Spec subcommand list also fixed
for pre-existing drift (install-systemd, migrate-v1 were unlisted);
fleet.spec 208/213 with only the stash-verified pre-existing failures.
This commit is contained in:
2026-08-29 11:27:32 -05:00
parent 5125fe21b0
commit f80c2f8b8f
2 changed files with 20 additions and 1 deletions
@@ -106,6 +106,7 @@ describe('registerFleetCommand', () => {
'init', 'init',
'install', 'install',
'install-systemd', 'install-systemd',
'logins',
'migrate-v1', 'migrate-v1',
'persona', 'persona',
'plan', 'plan',
+19 -1
View File
@@ -17,7 +17,7 @@ import { homedir, hostname, userInfo } from 'node:os';
import { dirname, join, resolve } from 'node:path'; import { dirname, join, resolve } from 'node:path';
import { fleetAgentEnvDir } from '../fleet/brain-home.js'; import { fleetAgentEnvDir } from '../fleet/brain-home.js';
import { fileURLToPath } from 'node:url'; 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 * as readline from 'node:readline';
import type { Command } from 'commander'; import type { Command } from 'commander';
import YAML from 'yaml'; 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('--mosaic-home <path>', 'Mosaic home directory', paths.mosaicHome)
.option('--roster <path>', 'Fleet roster path'); .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 cmd
.command('init') .command('init')
.description('Initialize a local fleet roster') .description('Initialize a local fleet roster')