docs(plugin-sdk): document public SDK surface

This commit is contained in:
Peter Steinberger
2026-03-22 08:50:43 -07:00
parent e1ff24903f
commit 05279539a8
34 changed files with 1260 additions and 16 deletions

View File

@@ -1,5 +1,6 @@
import type { LogLevel } from "../../logging/levels.js";
/** Structured logger surface injected into runtime-backed plugin helpers. */
export type RuntimeLogger = {
debug?: (message: string, meta?: Record<string, unknown>) => void;
info: (message: string, meta?: Record<string, unknown>) => void;
@@ -7,6 +8,7 @@ export type RuntimeLogger = {
error: (message: string, meta?: Record<string, unknown>) => void;
};
/** Core runtime helpers exposed to trusted native plugins. */
export type PluginRuntimeCore = {
version: string;
config: {

View File

@@ -50,6 +50,7 @@ export type SubagentDeleteSessionParams = {
deleteTranscript?: boolean;
};
/** Trusted in-process runtime surface injected into native plugins. */
export type PluginRuntime = PluginRuntimeCore & {
subagent: {
run: (params: SubagentRunParams) => Promise<SubagentRunResult>;