fix(exec): pass undefined instead of null for optional approval params

TypeBox Type.Optional(Type.String()) accepts string|undefined but NOT null.
Discord exec was failing with 'resolvedPath must be string' because callers
passed null explicitly. Web UI worked because it skipped the approval request.

Fixes exec approval validation error in Discord-triggered sessions.
This commit is contained in:
Lucas Czekaj
2026-01-21 18:14:51 -08:00
parent 47ebe29195
commit de898c423b
3 changed files with 50 additions and 6 deletions

View File

@@ -267,8 +267,8 @@ export function registerNodesInvokeCommands(nodes: Command) {
security: hostSecurity,
ask: hostAsk,
agentId,
resolvedPath: null,
sessionKey: null,
resolvedPath: undefined,
sessionKey: undefined,
timeoutMs: 120_000,
})) as { decision?: string } | null;
const decision =