effectify Command service (#18568)

This commit is contained in:
Kit Langton
2026-03-21 20:21:41 -04:00
committed by GitHub
parent 10a3d6c54e
commit 0e0e7a4a4b
4 changed files with 131 additions and 100 deletions

View File

@@ -1782,6 +1782,9 @@ NOTE: At any point in time through this workflow you should feel free to ask the
export async function command(input: CommandInput) {
log.info("command", input)
const command = await Command.get(input.command)
if (!command) {
throw new NamedError.Unknown({ message: `Command not found: "${input.command}"` })
}
const agentName = command.agent ?? input.agent ?? (await Agent.defaultAgent())
const raw = input.arguments.match(argsRegex) ?? []