openshain 0.2.0 → 0.3.1
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.
- package/dist/bin.js +4 -33
- package/dist/commands/init.d.ts +1 -1
- package/dist/commands/init.js +4 -4
- package/dist/commands/tools.js +1 -2
- package/dist/commands/work.d.ts +1 -9
- package/dist/commands/work.js +3 -22
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/labels.d.ts +1 -2
- package/dist/labels.js +1 -0
- package/dist/report.d.ts +6 -0
- package/dist/{commands/run.js → report.js} +5 -37
- package/dist/tui/controller.d.ts +8 -5
- package/dist/tui/controller.js +100 -74
- package/dist/tui/index.js +1 -1
- package/dist/usage.d.ts +1 -1
- package/dist/usage.js +1 -1
- package/dist/workspace.js +1 -1
- package/package.json +5 -5
- package/src/bin.ts +4 -38
- package/src/commands/init.ts +4 -4
- package/src/commands/tools.ts +7 -2
- package/src/commands/work.ts +3 -34
- package/src/index.ts +1 -10
- package/src/labels.ts +2 -2
- package/src/{commands/run.ts → report.ts} +5 -58
- package/src/tui/controller.ts +112 -74
- package/src/tui/index.ts +3 -1
- package/src/usage.ts +1 -2
- package/src/workspace.ts +1 -1
- package/dist/commands/run.d.ts +0 -22
package/dist/commands/run.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { type AnyEvent, type Runtime, type RuntimeProviders, type Work, type WorkId } from "@openshain/core";
|
|
2
|
-
export interface DriveOptions {
|
|
3
|
-
write: (line: string) => void;
|
|
4
|
-
/** Answers the model's questions. Without it, a question leaves the work waiting and the run ends. */
|
|
5
|
-
ask?: (question: string) => Promise<string>;
|
|
6
|
-
/** Stops the run. The work stays where it is and can be resumed. */
|
|
7
|
-
signal?: AbortSignal;
|
|
8
|
-
}
|
|
9
|
-
export interface RunOptions extends DriveOptions {
|
|
10
|
-
workspaceRoot: string;
|
|
11
|
-
providers: RuntimeProviders;
|
|
12
|
-
objective: string;
|
|
13
|
-
}
|
|
14
|
-
/** Creates a work for the request and drives it. Exit code 0 when the work completed. */
|
|
15
|
-
export declare function run(options: RunOptions): Promise<number>;
|
|
16
|
-
/** Drives a work from its current state, printing one line per tool call, and closes with the report. */
|
|
17
|
-
export declare function drive(runtime: Runtime, workId: WorkId, options: DriveOptions): Promise<number>;
|
|
18
|
-
/** One line for a tool call, a rejection or a failure; nothing for the other events. `names` maps call ids to tool names. */
|
|
19
|
-
export declare function progressLine(event: AnyEvent, names: Map<string, string>): string | undefined;
|
|
20
|
-
/** The closing lines: what happened, what it cost, and who acts next. */
|
|
21
|
-
export declare function report(work: Work, events: AnyEvent[]): string[];
|
|
22
|
-
export declare function nextActor(work: Work): string;
|