feat(server): expose secure harness API

This commit is contained in:
Wenxin Duan
2026-09-07 16:37:51 +08:00
parent 64ca126047
commit 5e28e74ca1
16 changed files with 654 additions and 1 deletions
@@ -59,6 +59,10 @@ export class HarnessSession {
this.#runTimeoutMs = options.runTimeoutMs ?? 120_000;
}
public get isBusy(): boolean {
return this.#active !== undefined;
}
public async startRun(input: MessageInput): Promise<{ runId: string }> {
if (this.#disposed) throw new HarnessError("SESSION_DISPOSED", "Session has been disposed");
if (this.#active !== undefined) throw new HarnessError("SESSION_BUSY", "Session already has an active run");