Move secrets between users and computers without the model seeing them
A new personal env scope (paradigm user: one user's secret for one bot) beats every other scope, reaches only that user's runs of that bot, and is redacted like any secret. Bots take secrets in with request_secret, which puts a [secret-request:ID] card in the chat: the user types the value into a masked input there, never into a message, and the bot is told only the key. Bots show secrets with capture_secret (a task's computer tool that saves a file or a command's output straight to a personal env, then redacts it from the rest of the run) and show_secret (an env by key): both give a [secret:ID] chip whose Reveal and Copy fetch the value on click, for its own user (personal) or a super admin (anything else), logged by key. Values never go into messages, page props, history, Copy chat or logs. Users manage their own secrets on Settings > Secrets; the Environment page lists everyone's, remove only. Deleting a bot or user removes its personal secrets, and SecretsNote tells bots never to ask for or print secrets in chat. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -109,6 +109,9 @@ export const JobStepToolLabels: Record<string, string> = {
|
||||
delegate_task: "Handing work to the crew",
|
||||
hand_over_schedule: "Handing a routine to the crew",
|
||||
propose_hook: "Proposing a hook",
|
||||
request_secret: "Asking for a secret",
|
||||
capture_secret: "Saving a secret",
|
||||
show_secret: "Showing a secret",
|
||||
pause_hook: "Pausing a hook",
|
||||
delete_hook: "Deleting a hook",
|
||||
assign_computer: "Changing computer access",
|
||||
|
||||
@@ -60,6 +60,7 @@ export const ReservedToolNames = [
|
||||
"add_bot_to_workspace",
|
||||
"ask_user_to_take_over",
|
||||
"assign_computer",
|
||||
"capture_secret",
|
||||
"create_bot",
|
||||
"create_schedule",
|
||||
"create_workspace",
|
||||
@@ -77,12 +78,14 @@ export const ReservedToolNames = [
|
||||
"propose_mcp_server",
|
||||
"propose_skill",
|
||||
"report_run_failed",
|
||||
"request_secret",
|
||||
"search_computers",
|
||||
"send_message",
|
||||
"set_bot_workspace_instructions",
|
||||
"set_extension_access",
|
||||
"set_picture",
|
||||
"set_workspace_computer",
|
||||
"show_secret",
|
||||
"start_task",
|
||||
"update_custom_tool",
|
||||
"update_instructions",
|
||||
|
||||
+15
-2
@@ -1,8 +1,9 @@
|
||||
import { HarnessProviderKinds } from "./harness-provider-dict";
|
||||
|
||||
/**
|
||||
* Where an env applies. A bot's own env beats the computer it runs on,
|
||||
* which beats the workspace it works in, which beats a general one.
|
||||
* Where an env applies. A user's personal one (for one bot, set from the
|
||||
* chat) beats the bot's own, which beats the computer it runs on, which
|
||||
* beats the workspace it works in, which beats a general one.
|
||||
*/
|
||||
export const EnvParadigms = [
|
||||
{
|
||||
@@ -21,6 +22,10 @@ export const EnvParadigms = [
|
||||
title: "Bot",
|
||||
value: "bot",
|
||||
},
|
||||
{
|
||||
title: "Personal",
|
||||
value: "user",
|
||||
},
|
||||
] as const;
|
||||
|
||||
export type EnvParadigm = (typeof EnvParadigms)[number]["value"];
|
||||
@@ -109,3 +114,11 @@ export const ProcessOnlyEnvKeys = [
|
||||
* What an env key may look like: a shell variable name.
|
||||
*/
|
||||
export const EnvKeyRegex = /^[A-Za-z_][A-Za-z0-9_]{0,127}$/;
|
||||
|
||||
/**
|
||||
* Where a secret a bot asked a user for stands (`secret_requests.status`):
|
||||
* `pending` until the user saves a value (`saved`) or declines it.
|
||||
*/
|
||||
export const SecretRequestStatuses = ["pending", "saved", "declined"] as const;
|
||||
|
||||
export type SecretRequestStatus = (typeof SecretRequestStatuses)[number];
|
||||
|
||||
@@ -6,6 +6,7 @@ import {
|
||||
DatabaseBackup,
|
||||
KeyRound,
|
||||
Layers,
|
||||
LockKeyhole,
|
||||
Monitor,
|
||||
Plug,
|
||||
Users,
|
||||
@@ -53,6 +54,7 @@ export const SettingsPages: SettingsPage[] = [
|
||||
url: "/admin/settings/change-password",
|
||||
Icon: KeyRound,
|
||||
},
|
||||
{ title: "Secrets", url: "/admin/settings/secrets", Icon: LockKeyhole },
|
||||
{ title: "Bots", url: "/admin/settings/bots", Icon: Bot, can_view: canManageCrew },
|
||||
{ title: "Workspaces", url: "/admin/settings/workspaces", Icon: Layers, can_view: canManageCrew },
|
||||
{ title: "Computers", url: SettingsComputersPath, Icon: Monitor, can_view: canManageCrew },
|
||||
|
||||
Reference in New Issue
Block a user