Files
cobble/src/pages/admin/bots/[bot_id]/(partials)/proposal-reach-section.tsx
T
tbenandClaude Opus 5.5 fefc295d15 Let the coordinator manage skills, MCP servers and tools, behind a confirm card
- Coordinator tools in its own chat (super admin only): list_extensions,
  set_extension_access, delete_extension, and update_skill /
  update_mcp_server / update_custom_tool for what can't change where
  anything is sent (on/off, names, arguments, left-out tools)
- Adding a skill, MCP server or tool, or changing a skill's words, a
  server's URL or headers or a tool's kind or config, goes through
  propose_skill / propose_mcp_server / propose_custom_tool: stored in
  extension_proposals with the bot's background check, shown as a
  [proposal:ID] chip that opens a card with Confirm and Reject
- The card's facts are worked out by the app from what Confirm saves: the
  host, every {{env.KEY}} and whether it's saved, the config; for a skill
  its links, hosts, tool names, mentions of secrets and a diff against
  the saved runbook
- Confirming decides once and checks again; a server or tool missing a key
  is saved switched off, and the outcome is posted to the bot in chat
- Never from a bot: stdio servers, a URL whose host a template decides,
  envs in a prompt tool, a key's value

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 06:08:09 +01:00

44 lines
1.5 KiB
TypeScript

import Span from "@moduletrace/twui/layout/Span";
import type { ExtensionProposalView } from "@/src/types";
import MessageDetailsHeading from "./message-details-heading";
import ProposalEnvRow from "./proposal-env-row";
type Props = {
view: ExtensionProposalView;
/**
* Every key it sends, once each.
*/
keys: string[];
/**
* The keys that aren't saved yet.
*/
missing: string[];
};
/**
* Where a proposed server or tool sends from the app, and each key it
* sends with whether it's saved.
*/
export default function ProposalReachSection({ view, keys, missing }: Props) {
return (
<>
<MessageDetailsHeading>Where it sends</MessageDetailsHeading>
<Span className="text-[14px] leading-5 font-bold text-ink break-all">
{view.host || "Nothing from the app"}
</Span>
<MessageDetailsHeading>{`Keys it sends (${keys.length})`}</MessageDetailsHeading>
{view.envs.length ? (
view.envs.map((env) => <ProposalEnvRow key={`${env.key}-${env.where}`} env={env} />)
) : (
<Span className="text-[13px] leading-5 text-ink-secondary">None.</Span>
)}
{missing.length ? (
<Span className="mt-1 text-[12px] leading-4 text-ink-secondary">
{`Add missing keys in Settings, under Environment. Until then it's saved switched off.`}
</Span>
) : null}
</>
);
}