Files
orca/src/cli/remote-selection-scope.ts
T
Neil 1963ac0ea8 cli: add orca plugin create, validate and inspect (#36280)
* cli: add orca plugin create, validate and inspect

* build: ship orca plugin validate's main checks as a CLI main entry
2026-10-30 01:00:15 -07:00

19 lines
897 B
TypeScript

/** Commands that act only on this machine: dispatch ignores --environment / --pairing-code for them, and help does not offer them. */
export function ignoresRemoteSelection(commandPath: readonly string[]): boolean {
return (
commandPath[0] === 'account' ||
commandPath[0] === 'artifacts' ||
commandPath[0] === 'environment' ||
// Paired servers come from the local store; routing SSH lookup would mix two machines in one list.
commandPath.join(' ') === 'host list' ||
commandPath[0] === 'serve' ||
(commandPath[0] === 'agent' && commandPath[1] !== 'launch') ||
commandPath[0] === 'vm' ||
commandPath[0] === 'agent-context' ||
commandPath[0] === 'profile' ||
// Authoring works on local files; the handler refuses explicit remote flags.
(commandPath[0] === 'plugin' &&
['create', 'validate', 'inspect'].includes(commandPath[1] ?? ''))
)
}