import { EventEmitter } from "eventemitter3"; import type { PluginContext, UserCommandContext } from "@garden-io/grow-sdk/plugins/plugin-context"; import { s } from "@garden-io/grow-sdk/schema"; import type { CloudApi } from "./cloud/api"; import type { GrowContext } from "./context"; import type { Issue } from "./issues"; import type { Log } from "./logger/log-entry"; import type { LogLevel } from "./logger/logger"; export declare function throwValidationError(issues: Issue[], path?: string): void; export declare const commandInfoSchema: import("zod").ZodObject<{ name: import("zod").ZodString; args: import("zod").ZodRecord; opts: import("zod").ZodRecord; }, "strip", import("zod").ZodTypeAny, { name: string; args: Record; opts: Record; }, { name: string; args: Record; opts: Record; }>; export type CommandInfo = s.infer; export type PluginEventLogContext = { /** entity that created the log message, e.g. tool that generated it */ origin?: string; /** which level to print the log at */ level: LogLevel; }; export type PluginEventLogMessage = PluginEventLogContext & { /** * ISO format date string */ timestamp: string; /** log message */ msg: string; }; type PluginEvents = { abort: (reason?: string) => void; done: () => void; failed: (error?: Error) => void; log: (msg: PluginEventLogMessage) => void; }; type PluginEventType = keyof PluginEvents; export declare class PluginEventBroker extends EventEmitter { private aborted; private done; private failed; private error; private grow; private abortHandler; constructor(grow: GrowContext); isAborted(): boolean; isDone(): boolean; isFailed(): boolean; getError(): Error | undefined; } export declare function createPluginContext({ log, growRoot, cloudApi, }: { log: Log; growRoot: string; cloudApi: CloudApi | undefined; }): PluginContext; export declare function createUserCommandContext({ grow, log, }: { grow: GrowContext; log: Log; }): Promise; export {};