feat(core): add agent protocol UI types and experimental flag

Also fixes a minor type error in nonInteractiveCli and mock ToolRegistry in tests that the new protocol exposes.
This commit is contained in:
Michael Bleigh
2026-03-30 14:08:55 -07:00
parent 3b0906f319
commit 52f2479007
4 changed files with 46 additions and 1 deletions
@@ -1519,6 +1519,9 @@ describe('runNonInteractive', () => {
name: 'ShellTool',
description: 'A shell tool',
run: vi.fn(),
build: vi.fn().mockReturnValue({
getDescription: () => 'A shell tool',
}),
}),
getFunctionDeclarations: vi.fn().mockReturnValue([{ name: 'ShellTool' }]),
} as unknown as ToolRegistry);
+3 -1
View File
@@ -417,7 +417,9 @@ export async function runNonInteractive({
return errToThrow;
};
const runTerminalExitHandler = (handler: () => never): never => {
const runTerminalExitHandler = (
handler: () => void | never,
): void | never => {
terminalProcessExitHandled = true;
return handler();
};