@dougbots/avenor-pi 0.3.6 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.d.ts +37 -2
  2. package/dist/index.js +1342 -597
  3. package/package.json +2 -2
package/dist/index.d.ts CHANGED
@@ -1,6 +1,41 @@
1
+ import { InspectResult, StatusResult, Supervisor, answerPermissionTool, dial, eventsTool, followUpTool, inspectTool, observeRun, shutdownTool, spawnTool, statusTool } from "@dougbots/avenor-core";
1
2
  import { ExtensionAPI } from "@earendil-works/pi-coding-agent";
2
3
 
4
+ //#region src/types.d.ts
5
+ interface RunStatusEntry {
6
+ runId: string;
7
+ label: string;
8
+ status: string;
9
+ phase?: string;
10
+ phaseLabel?: string;
11
+ agent: string;
12
+ pendingPermission?: boolean;
13
+ permissionDescription?: string;
14
+ }
15
+ //#endregion
3
16
  //#region src/index.d.ts
4
- declare function export_default(pi: ExtensionAPI): Promise<void>;
17
+ interface ExtensionDeps {
18
+ spawnTool: typeof spawnTool;
19
+ statusTool: typeof statusTool;
20
+ eventsTool: typeof eventsTool;
21
+ answerPermissionTool: typeof answerPermissionTool;
22
+ followUpTool: typeof followUpTool;
23
+ inspectTool: typeof inspectTool;
24
+ shutdownTool: typeof shutdownTool;
25
+ observeRun: typeof observeRun;
26
+ dial: typeof dial;
27
+ Supervisor: typeof Supervisor;
28
+ }
29
+ declare function statusSupervisorId(requestedSupervisorId: string | undefined, spawnedSupervisorId: string): string | undefined;
30
+ declare function buildCompletionText(run: {
31
+ runId: string;
32
+ label: string;
33
+ }, result: StatusResult, finalOutput?: string): string;
34
+ declare function isTerminalStatus(status: string | undefined): boolean;
35
+ declare function renderStatusLines(entries: RunStatusEntry[]): string[];
36
+ declare function compactWhitespace(text: string | undefined, limit?: number): string | undefined;
37
+ declare function buildInspectPayload(result: InspectResult): Record<string, unknown>;
38
+ declare function createExtension(deps?: ExtensionDeps): (pi: ExtensionAPI) => Promise<void>;
39
+ declare const _default: (pi: ExtensionAPI) => Promise<void>;
5
40
  //#endregion
6
- export { export_default as default };
41
+ export { ExtensionDeps, buildCompletionText, buildInspectPayload, compactWhitespace, createExtension, _default as default, isTerminalStatus, renderStatusLines, statusSupervisorId };