Skip to content

Commit 234738d

Browse files
authored
Merge pull request #2388 from kesar/patch-3
feat: replace AgentRuntime to his interface to extend client
2 parents 2e757f9 + 7c0c4d5 commit 234738d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/client-direct/src/index.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ Response format should be formatted in a JSON block like this:
111111

112112
export class DirectClient {
113113
public app: express.Application;
114-
private agents: Map<string, AgentRuntime>; // container management
114+
private agents: Map<string, IAgentRuntime>; // container management
115115
private server: any; // Store server instance
116116
public startAgent: Function; // Store startAgent functor
117117
public loadCharacterTryPath: Function; // Store loadCharacterTryPath functor
@@ -979,13 +979,13 @@ export class DirectClient {
979979
}
980980

981981
// agent/src/index.ts:startAgent calls this
982-
public registerAgent(runtime: AgentRuntime) {
982+
public registerAgent(runtime: IAgentRuntime) {
983983
// register any plugin endpoints?
984984
// but once and only once
985985
this.agents.set(runtime.agentId, runtime);
986986
}
987987

988-
public unregisterAgent(runtime: AgentRuntime) {
988+
public unregisterAgent(runtime: IAgentRuntime) {
989989
this.agents.delete(runtime.agentId);
990990
}
991991

0 commit comments

Comments
 (0)