mirror of
https://github.com/stablyai/orca.git
synced 2026-11-19 04:23:57 +00:00
- drop the duplicate 'cloud' launch root (cloud env already registers it) - keep cloud env on the runtime: only the cloud API commands ignore --environment - list cloud messages in root help - register the 'sender' launch root (parity test was red on integration)
23 lines
1.2 KiB
TypeScript
23 lines
1.2 KiB
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' ||
|
|
// Orca Cloud API commands call the cloud API directly; `cloud env` still goes through the runtime.
|
|
(commandPath[0] === 'cloud' && commandPath[1] !== 'env') ||
|
|
commandPath[0] === 'environment' ||
|
|
// Paired servers come from the local store; routing SSH lookup would mix two machines in one list.
|
|
commandPath.join(' ') === 'host list' ||
|
|
// Removes ids that `host list` printed from this runtime; an ambient selection must not retarget it.
|
|
commandPath.join(' ') === 'host rm' ||
|
|
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] ?? ''))
|
|
)
|
|
}
|