Skip to content

Commit d3b7c3a

Browse files
committed
test list tasks and setup tasks apis
1 parent 1abb3bc commit d3b7c3a

File tree

2 files changed

+23
-3
lines changed

2 files changed

+23
-3
lines changed

src/PintClient/index.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,16 @@ import { Emitter, EmitterSubscription, Event } from "../utils/event";
55
import { Disposable } from "../utils/disposable";
66
import { Client, createClient, createConfig } from "../api-clients/pint/client";
77
import { PintClientTasks, PintClientSetup } from "./tasks";
8+
import { PintClientSystem } from "./system";
89
import {
910
IAgentClient,
1011
IAgentClientPorts,
1112
IAgentClientShells,
1213
IAgentClientState,
1314
IAgentClientFS,
15+
IAgentClientSetup,
16+
IAgentClientTasks,
17+
IAgentClientSystem,
1418
PickRawFsResult,
1519
} from "../agent-client-interface";
1620
import {
@@ -726,9 +730,9 @@ export class PintClient implements IAgentClient {
726730
ports: IAgentClientPorts;
727731
shells: IAgentClientShells;
728732
fs: IAgentClientFS;
729-
setup: any = null; // TODO: Implement
730-
tasks: any = null; // TODO: Implement
731-
system: any = null; // TODO: Implement
733+
setup: IAgentClientSetup;
734+
tasks: IAgentClientTasks;
735+
system: IAgentClientSystem;
732736

733737
constructor(session: SandboxSession) {
734738
this.sandboxId = session.sandboxId;
@@ -749,6 +753,7 @@ export class PintClient implements IAgentClient {
749753
this.fs = new PintFsClient(apiClient);
750754
this.tasks = new PintClientTasks(apiClient);
751755
this.setup = new PintClientSetup(apiClient);
756+
this.system = new PintClientSystem(apiClient);
752757
}
753758

754759
ping(): void {}

src/PintClient/system.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { IAgentClientSystem } from "../agent-client-interface";
2+
import { Client } from "../api-clients/pint/client";
3+
import { system } from "../pitcher-protocol";
4+
import { Emitter } from "../utils/event";
5+
6+
export class PintClientSystem implements IAgentClientSystem {
7+
private onInitStatusUpdateEmitter = new Emitter<system.InitStatus>();
8+
onInitStatusUpdate = this.onInitStatusUpdateEmitter.event;
9+
10+
constructor(private apiClient: Client) {}
11+
12+
async update(): Promise<Record<string, undefined>> {
13+
return {};
14+
}
15+
}

0 commit comments

Comments
 (0)