-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpi-coding-agent.d.ts
More file actions
30 lines (29 loc) · 891 Bytes
/
Copy pathpi-coding-agent.d.ts
File metadata and controls
30 lines (29 loc) · 891 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Minimal stand-in for @earendil-works/pi-coding-agent's ExtensionAPI — covers
// exactly what index.ts uses so this zero-dependency repo type-checks anywhere.
declare module "@earendil-works/pi-coding-agent" {
// Fields are required here because every pi callback receives a fully
// populated context; individual values may still be empty.
interface ExtensionContext {
hasUI: boolean;
ui: {
setStatus(key: string, value: string): void;
notify(message: string, level?: string): void;
};
sessionManager: {
getSessionFile(): string | undefined;
};
}
export interface ExtensionAPI {
on(
event: string,
handler: (event: any, ctx: ExtensionContext) => void | Promise<void>,
): void;
registerCommand(
name: string,
options: {
description?: string;
handler: (args: string, ctx: ExtensionContext) => void | Promise<void>;
},
): void;
}
}