plugin: lvmh-agent extension — mirror, replay, steer prompts; smoke 25/25, e2e 13/13 vs real pi

This commit is contained in:
Raphael Westphal
2026-08-18 13:50:05 +02:00
parent c62900e613
commit 6c5dd50130
8 changed files with 1550 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
/**
* pi-types.d.ts exists only as a fallback when the tsconfig `paths` /
* `typeRoots` entries cannot be resolved (pi installed elsewhere, offline
* machine). With the bundled tsconfig, real types are used:
*
* - `@earendil-works/pi-coding-agent` -> pi's dist/index.d.ts (paths)
* - node globals (fs/os/path/process/Buffer/http/...) -> @types/node
* from pi's nested node_modules (typeRoots)
* - global `WebSocket` is the undici one (Node >= 22) and accepts an
* options object with `headers` for the Authorization bearer upgrade.
*
* If those cannot resolve, uncomment the declaration below: lvmh-agent.ts
* only relies on `pi.on(...)` and `pi.sendUserMessage(...)`.
*/
// declare module "@earendil-works/pi-coding-agent" {
// export interface ExtensionContext {
// cwd: string;
// model: { id?: unknown; provider?: unknown } | undefined;
// sessionManager: any;
// abort(): void;
// }
// export interface ExtensionAPI {
// on(event: string, handler: (event: any, ctx: ExtensionContext) => any): void;
// sendUserMessage(content: string, options?: { deliverAs?: "steer" | "followUp" }): void;
// }
// }