mirror of
https://github.com/bulwarkmail/webmail.git
synced 2026-11-04 16:14:07 +00:00
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.
19 lines
675 B
TypeScript
19 lines
675 B
TypeScript
// Area c 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 { AreaHostFeaturesC } from './c.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(): AreaHostFeaturesC {
|
|
return {};
|
|
}
|