Files
webmail/lib/plugin-sandbox/assistant/b.ts
T
Linus Rath f7ff8212a3 refactor: give the AI assistant's host APIs one set of files per area
The assistant's new host calls come in four areas (context, actions,
Files, the panel in every view), built side by side. Each area gets its
own files under lib/plugin-sandbox/assistant for its permissions, method
table, dispatcher, host feature flags and sandbox methods; the shared
files only read the merged result. No area adds anything yet. The host
features test now compares against the core flags plus the areas' flags.
2026-11-02 21:21:06 +01:00

19 lines
675 B
TypeScript

// Area b of the assistant's host APIs, host side (see README.md).
import type { InstalledPlugin, Permission } from '../../plugin-types';
import { NOT_MINE } from './not-mine';
import type { AreaHostFeaturesB } from './b.types';
/** Method → permission, joined into PERM_PER_METHOD. */
export const PERMS: Readonly<Record<string, Permission | null>> = {};
/** Runs a method of this area; NOT_MINE for any other. */
export async function dispatch(_plugin: InstalledPlugin, _method: string, _args: unknown[]): Promise<unknown> {
return NOT_MINE;
}
/** This area's flags in api.host.features, right now. */
export function features(): AreaHostFeaturesB {
return {};
}