merge: feat/wf5-securestorage into the 0.0.50 integration line
Brings the per-agent harness-home work (FLEET_SEAT) onto the release line. Clean merge, no conflicts.
This commit is contained in:
@@ -38,6 +38,11 @@ import {
|
||||
registerFleetAgentCrudCommands,
|
||||
type FleetAgentCrudCommandDeps,
|
||||
} from './fleet-agent-crud-command.js';
|
||||
import {
|
||||
registerFleetAgentScaffoldCommand,
|
||||
type FleetAgentScaffoldCommandDeps,
|
||||
} from './fleet-agent-scaffold-command.js';
|
||||
import { registerFleetAdoptCommand } from './fleet-adopt-command.js';
|
||||
import {
|
||||
registerFleetMigrationCommand,
|
||||
type FleetMigrationCommandDeps,
|
||||
@@ -63,6 +68,7 @@ import { registerFleetBacklogCommand } from './fleet-backlog.js';
|
||||
import { registerFleetPersonaCommand } from './fleet-personas.js';
|
||||
import { registerFleetProfileCommand } from './fleet-profiles.js';
|
||||
import { registerFleetProvisionCommand } from './fleet-provision.js';
|
||||
import { registerFleetLaunchCommand, type FleetLaunchCommandDeps } from './fleet-launch-command.js';
|
||||
|
||||
/**
|
||||
* A function that spawns a command with inherited stdio (TTY passthrough).
|
||||
@@ -97,6 +103,10 @@ export interface FleetCommandDeps {
|
||||
*/
|
||||
sleepFn?: SleepFn;
|
||||
mosaicHome?: string;
|
||||
/** User-owned fleet/auth/config root. Defaults to ~/.mosaic. */
|
||||
mosaicUserHome?: string;
|
||||
/** Test/embedding seam for the final process-replacing fleet launch. */
|
||||
fleetLauncher?: FleetLaunchCommandDeps['launcher'];
|
||||
frameworkRoot?: string;
|
||||
/**
|
||||
* Injectable TTY check for `fleet init` wizard. Defaults to process.stdin.isTTY.
|
||||
@@ -104,6 +114,8 @@ export interface FleetCommandDeps {
|
||||
*/
|
||||
isStdinTTY?: boolean;
|
||||
projectionApplier?: FleetAgentCrudCommandDeps['projectionApplier'];
|
||||
/** Test-only user-data root for `fleet agent new` (production: ~/.mosaic). */
|
||||
fleetDataHome?: FleetAgentScaffoldCommandDeps['fleetDataHome'];
|
||||
reconcileDeps?: FleetReconcilerCommandDeps['reconcileDeps'];
|
||||
migrationDeps?: Omit<FleetMigrationCommandDeps, 'mosaicHome'>;
|
||||
}
|
||||
@@ -2042,6 +2054,14 @@ export function registerFleetCommand(program: Command, deps: FleetCommandDeps =
|
||||
// fleet/ directory as the roster and heartbeats.
|
||||
registerFleetBacklogCommand(cmd, () => cmd.opts<{ mosaicHome: string }>().mosaicHome);
|
||||
|
||||
// User-facing per-agent profile.json is the launch-composition SSOT. It is
|
||||
// intentionally independent of roster-v2, whose lifecycle/topology registry
|
||||
// does not model auth bundles, overlays, plugins, skills, or seat env.
|
||||
registerFleetLaunchCommand(cmd, () => cmd.opts<{ mosaicHome: string }>().mosaicHome, {
|
||||
...(deps.mosaicUserHome === undefined ? {} : { userHome: deps.mosaicUserHome }),
|
||||
...(deps.fleetLauncher === undefined ? {} : { launcher: deps.fleetLauncher }),
|
||||
});
|
||||
|
||||
// System-type profiles (H2): declarative persona roster + topology, resolved
|
||||
// from <mosaicHome>/fleet/profiles/*.yaml using the same --mosaic-home flag.
|
||||
registerFleetProfileCommand(cmd, () => cmd.opts<{ mosaicHome: string }>().mosaicHome);
|
||||
@@ -2055,6 +2075,18 @@ export function registerFleetCommand(program: Command, deps: FleetCommandDeps =
|
||||
// profile. DRY-RUN by default; --write persists under the same --mosaic-home.
|
||||
registerFleetProvisionCommand(cmd, () => cmd.opts<{ mosaicHome: string }>().mosaicHome);
|
||||
|
||||
// `fleet agent new` owns user-data harness homes under ~/.mosaic. The
|
||||
// existing roster-v2 CRUD remains direct fleet control-plane CRUD, so there
|
||||
// is one `agent` namespace but deliberately separate state authorities.
|
||||
registerFleetAgentScaffoldCommand(cmd, {
|
||||
...(deps.fleetDataHome === undefined ? {} : { fleetDataHome: deps.fleetDataHome }),
|
||||
mosaicHomeFor: () => cmd.opts<{ mosaicHome: string }>().mosaicHome,
|
||||
});
|
||||
// The counterpart to launch's refusals: launch will not delete a real directory sitting on
|
||||
// a managed path, and this is how one gets moved out of the way instead.
|
||||
registerFleetAdoptCommand(cmd, {
|
||||
...(deps.fleetDataHome === undefined ? {} : { fleetDataHome: deps.fleetDataHome }),
|
||||
});
|
||||
// Roster-v2 desired-state mutations belong directly to the fleet control
|
||||
// plane; they do not share the root `mosaic agent` gateway-backed surface.
|
||||
registerFleetAgentCrudCommands(cmd, deps);
|
||||
|
||||
Reference in New Issue
Block a user