fix: stabilize acp streams and tests

This commit is contained in:
Peter Steinberger
2026-01-18 08:53:03 +00:00
parent c5e19f5c67
commit b739a3897f
3 changed files with 17 additions and 2 deletions

View File

@@ -101,8 +101,9 @@ export async function createAcpClient(opts: AcpClientOptions = {}): Promise<AcpC
},
requestPermission: async (params: RequestPermissionRequest) => {
console.log("\n[permission requested]", params.toolCall?.title ?? "tool");
const allowOnce = params.options.find((option) => option.kind === "allow_once");
const fallback = params.options[0];
const options = params.options ?? [];
const allowOnce = options.find((option) => option.kind === "allow_once");
const fallback = options[0];
return {
outcome: {
outcome: "selected",

View File

@@ -13,6 +13,8 @@ export const createTestRegistry = (
): PluginRegistry => ({
plugins: [],
tools: [],
hooks: [],
typedHooks: [],
channels,
providers: [],
gatewayHandlers: {},