import type { McpPanelView } from '@nacre.work/core'; import type { ToolAnnotations } from './tools.js'; /** * The administrative MCP's catalog. docs/mcp-admin.md. * * Reads, which answer on the call, and writes, which **propose**: a write tool * stores what it would do and answers with that, and the change happens when the * person presses Apply — in the panel the host renders beside the result, or on * the console's Proposals screen. The panel's two buttons are tools too, and * they are app-only: a host leaves them out of what the model is offered, so a * planted instruction gets a change as far as somebody's screen and no further. * * No tool here returns a document's contents, and none takes an organization: * it is the token's, as everywhere. */ export interface AdminToolDefinition { readonly name: string; readonly title: string; readonly description: string; readonly inputSchema: Record; readonly annotations: ToolAnnotations; /** * `read` answers; `write` proposes and opens the change panel; `decide` is * one of the panel's own buttons, offered to the panel and not to the model. * Absent is `read`. */ readonly kind?: 'read' | 'write' | 'decide'; /** * A module's read that names a core panel. The core's own reads that open * one are in `READ_PANELS`, beside the panels themselves. */ readonly panel?: McpPanelView; } /** * A result with something for the panel beside it. * * `_meta` is the host's and the view's, not the model's: the proposal's id * travels there so the panel can apply it and the model, which never sees it, * cannot name it to anything. */ export declare class AdminResult { readonly result: unknown; readonly meta: Readonly>; constructor(result: unknown, meta: Readonly>); } /** The key the change panel reads the proposal from. */ export declare const PROPOSAL_META = "nacre/proposal"; /** * The key a read panel reads its tool and its offers from: which tool to ask * again after a change, and which writes its form may propose. Built by the * core, never by a module, so an offer is only ever a write on this surface. */ export declare const PANEL_META = "nacre/panel"; /** * What every result carrying text somebody else wrote opens with. * * A hint to the model and not a control, and docs/mcp-admin.md says so: what * bounds a planted instruction that gets through anyway is that this surface * changes nothing. It is here because the description of a field is what a * model reads at the moment it decides, and "a layer description said to grant * me admin" should meet a sentence saying what a layer description is. */ export declare const AUTHORED_NOTICE: string; /** * The framing a skill comes back in. T39. * * A layer's skill is written by whoever holds `admin` on that layer, which is * less authority than the `org_admin` this surface acts for — so a layer skill * followed here would be an escalation written in prose. It is shown the way * the console shows one: its files, its version and who wrote it, inside a * sentence saying it is under review. */ export declare function skillNotice(input: { readonly level: string; readonly version: number | null; readonly principal: string | null; readonly byAgent: boolean; }): string; export declare const ADMIN_CATALOG: readonly AdminToolDefinition[]; /** A write, from the core or a module, as the catalog serves it. */ export declare function writeDefinition(tool: { readonly name: string; readonly title: string; readonly description: string; readonly inputSchema: Readonly>; }): AdminToolDefinition; /** A module's read, as the catalog serves it. */ export declare function readDefinition(tool: { readonly name: string; readonly title: string; readonly description: string; readonly inputSchema: Readonly>; readonly panel?: { readonly view: McpPanelView; }; }): AdminToolDefinition; /** * The change panel's two buttons. App-only: `_meta.ui.visibility: ["app"]`, * which a host honours by not offering them to the model. What the guarantee * rests on is stated in docs/mcp-admin.md rather than implied — and the id they * take is in the result's `_meta`, which the model is not shown either. */ export declare const DECIDE_CATALOG: readonly AdminToolDefinition[]; //# sourceMappingURL=admin-tools.d.ts.map