From 1787523f97bf6f0b0bea5c477b6b88ed9c2a4f6d Mon Sep 17 00:00:00 2001 From: Dotta Date: Fri, 6 Nov 2026 00:46:35 -0600 Subject: [PATCH] Use the human-input action confirmation parameter in denial guidance Co-Authored-By: Paperclip --- server/src/__tests__/secrets-routes.test.ts | 3 ++- server/src/routes/secrets.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/server/src/__tests__/secrets-routes.test.ts b/server/src/__tests__/secrets-routes.test.ts index 475157964f0..98cb7f591a3 100644 --- a/server/src/__tests__/secrets-routes.test.ts +++ b/server/src/__tests__/secrets-routes.test.ts @@ -180,7 +180,8 @@ describe("secret routes", () => { expect(res.body.error).toContain("without claiming that credential setup is complete"); expect(res.body.error).toContain("first create a non-governing secure-save acknowledgment"); expect(res.body.error).toContain("request_human_input"); - expect(res.body.error).toContain("request_confirmation"); + expect(res.body.error).toContain('interactionKind="confirmation"'); + expect(res.body.error).not.toContain("using request_confirmation"); expect(res.body.error).toContain("never ask for the secret value in that card"); expect(res.body.error).toContain("Wait only on the actual saved request"); expect(JSON.stringify(res.body)).not.toContain(value); diff --git a/server/src/routes/secrets.ts b/server/src/routes/secrets.ts index ede5d464091..45a12bb96e3 100644 --- a/server/src/routes/secrets.ts +++ b/server/src/routes/secrets.ts @@ -888,7 +888,7 @@ export function secretRoutes(db: Db, deps: SecretRoutesDeps = {}) { const companyId = req.params.companyId as string; if (req.actor.type === "agent") { assertCompanyAccess(req, companyId); - throw forbidden("Company secret creation requires a human board operator. Ask the human to enter the value in Settings → Secrets for this company. Do not send secret values in chat or tool calls. You can finish the current conversation response with these secure-entry instructions without claiming that credential setup is complete. If you need a resumable wait, first create a non-governing secure-save acknowledgment with request_human_input using request_confirmation; ask only whether secure entry is complete, never ask for the secret value in that card. Wait only on the actual saved request."); + throw forbidden("Company secret creation requires a human board operator. Ask the human to enter the value in Settings → Secrets for this company. Do not send secret values in chat or tool calls. You can finish the current conversation response with these secure-entry instructions without claiming that credential setup is complete. If you need a resumable wait, first create a non-governing secure-save acknowledgment with request_human_input with interactionKind=\"confirmation\"; ask only whether secure entry is complete, never ask for the secret value in that card. Wait only on the actual saved request."); } assertCompanySecretWrite(req, companyId); next();