/** * [WHO]: Team command parser - /team:* subcommands including harness/preset/dashboard/status helpers * [FROM]: No external deps * [TO]: Consumed by index.ts * [HERE]: extensions/builtin/team/team-parser.ts * * Parses /team series commands per Phase B spec: * /team - List teammates * /team:spawn [--name ] [--harness] - Create teammate * /team:send - Send message to teammate * /team:status [] - Show status * /team:preset - Create preset team * /team:progress [] - Show harness progress * /team:psyche [] - Show psyche weights * /team:dashboard - Toggle dashboard widget * /team:task ... - Manage shared task list * /team:mail - Route a teammate-to-teammate mailbox message * /team:allow-path - Grant teammate write access to a path prefix * /team:stop - Stop teammate turn * /team:terminate - Destroy teammate * /team:approve - Approve permission request * /team:mode - Switch mode */ import type { PresetName, TeammateMode, TeammateRole } from "./team-types.js"; export type TeamSubcommand = "list" | "spawn" | "send" | "status" | "stop" | "terminate" | "approve" | "mode" | "preset" | "auto" | "dashboard" | "progress" | "psyche" | "task" | "mail" | "allow-path" | "help"; export interface ParsedTeamCommand { command: TeamSubcommand; /** For spawn: role name */ role?: TeammateRole; /** For spawn: optional name override */ name?: string; /** For send/status/stop/terminate/approve/mode: target teammate name or request id */ target?: string; /** For send: message content */ message?: string; /** For mode: target mode */ mode?: TeammateMode; /** For approve: request id */ requestId?: string; /** For spawn: enable harness protocol */ harnessEnabled?: boolean; /** For preset: preset name */ presetName?: PresetName; /** For preset: task description */ taskDescription?: string; /** For task: task subcommand */ taskAction?: "add" | "claim" | "done" | "block" | "cancel" | "list"; /** For task: task id */ taskId?: string; /** For task add: title */ taskTitle?: string; /** For mail: source teammate */ from?: string; /** For mail: target teammate */ to?: string; /** For allow-path: path prefix */ path?: string; } export declare const TEAM_ROOT_COMPLETIONS: readonly ["help", "spawn", "send", "status", "stop", "terminate", "approve", "mode", "preset", "dashboard", "progress", "psyche", "task", "mail", "allow-path"]; export declare const VALID_ROLES: TeammateRole[]; export declare const VALID_MODES: TeammateMode[]; export declare const VALID_PRESETS: PresetName[]; export declare const VALID_TASK_ACTIONS: readonly ["add", "claim", "done", "block", "cancel", "list"]; type TeamArgumentCompletionContext = { commandName: string; argumentText: string; argumentPrefix: string; tokenIndex: number; previousTokens: string[]; }; export declare function getTeamArgumentCompletions(commandName: string, argumentPrefix: string, context?: TeamArgumentCompletionContext): Array<{ value: string; label: string; description?: string; }> | null; /** * Parse a /team command invocation. */ export declare function parseTeamCommand(commandName: string, args?: string): ParsedTeamCommand | null; /** * Build help text for /team commands. */ export declare function buildTeamHelp(): string; export {};