feat(fleet): add local canary CLI (#563)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/push/publish Pipeline was successful

This commit was merged in pull request #563.
This commit is contained in:
2026-06-20 17:49:01 +00:00
parent 45e2c2aad8
commit 6dfd78f643
15 changed files with 1835 additions and 3 deletions

View File

@@ -1,4 +1,5 @@
import type { Command } from 'commander';
import { registerFleetAgentCommands, type FleetCommandDeps } from './fleet.js';
import { withAuth } from './with-auth.js';
import { selectItem } from './select-dialog.js';
import {
@@ -30,11 +31,13 @@ function showAgentDetail(a: AgentConfigInfo) {
console.log(` Created: ${new Date(a.createdAt).toLocaleString()}`);
}
export function registerAgentCommand(program: Command) {
export function registerAgentCommand(program: Command, fleetDeps: FleetCommandDeps = {}) {
const cmd = program
.command('agent')
.description('Manage agent configurations')
.description('Manage agent configurations and local fleet agents')
.option('-g, --gateway <url>', 'Gateway URL', 'http://localhost:14242')
.option('--mosaic-home <path>', 'Mosaic home directory')
.option('--roster <path>', 'Local fleet roster path')
.option('--list', 'List all agents')
.option('--new', 'Create a new agent')
.option('--show <idOrName>', 'Show agent details')
@@ -72,6 +75,8 @@ export function registerAgentCommand(program: Command) {
},
);
registerFleetAgentCommands(cmd, fleetDeps);
return cmd;
}