mirror of
https://github.com/obra/episodic-memory.git
synced 2026-09-14 13:43:14 +08:00
f156416c49
Claude-Session: https://claude.ai/code/session_0112vdwZphiWzfCYfaXMes4C
43 lines
1.0 KiB
TypeScript
43 lines
1.0 KiB
TypeScript
type ShellPromise = Promise<{
|
|
exitCode: number;
|
|
stdout?: Buffer;
|
|
stderr?: Buffer;
|
|
}> & {
|
|
quiet(): ShellPromise;
|
|
nothrow(): ShellPromise;
|
|
};
|
|
type Shell = (strings: TemplateStringsArray, ...expressions: unknown[]) => ShellPromise;
|
|
interface PluginInput {
|
|
$: Shell;
|
|
client?: {
|
|
app?: {
|
|
log?: (input: {
|
|
body: {
|
|
service: string;
|
|
level: 'debug' | 'info' | 'warn' | 'error';
|
|
message: string;
|
|
extra?: Record<string, unknown>;
|
|
};
|
|
}) => Promise<unknown>;
|
|
};
|
|
};
|
|
}
|
|
interface PluginOptions {
|
|
command?: unknown;
|
|
summaryLimit?: unknown;
|
|
}
|
|
interface OpencodeEvent {
|
|
type?: string;
|
|
}
|
|
interface Hooks {
|
|
event?: (input: {
|
|
event: OpencodeEvent;
|
|
}) => Promise<void>;
|
|
}
|
|
export declare function server(input: PluginInput, options?: PluginOptions): Promise<Hooks>;
|
|
declare const _default: {
|
|
id: string;
|
|
server: typeof server;
|
|
};
|
|
export default _default;
|