SaylorTwift's picture
SaylorTwift HF Staff
Add files using upload-large-folder tool
68d7816 verified
Raw History Blame Contribute Delete
684 Bytes
import type { IAgentScopeHandle } from '#/_base/di/scope';
import type { AgentContext } from '#/agent/agentContext/agentContext';
import { AgentSpaceImpl } from '#/agent/agentContext/agentSpace';
import type { MachineEngineAttachBundle } from '#/agent/loop/machine/engine';
import type { AgentActorRef } from '#human/session/machine';
export class ManagedAgent {
active = false;
closing = false;
ref?: AgentActorRef;
bundle?: MachineEngineAttachBundle;
constructor(
readonly context: AgentContext,
readonly handle: IAgentScopeHandle,
) {}
killSpace(): void {
const space = this.context.space;
if (space instanceof AgentSpaceImpl) space._kill();
}
}