Download packages/agent-core-v2/src/session/agentLifecycle/managedAgent.ts from SaylorTwift/kimi-code: direct link, hf CLI and curl.
- Browser
- Download file 684 Bytes
-
https://huggingface.co/SaylorTwift/kimi-code/resolve/main/packages/agent-core-v2/src/session/agentLifecycle/managedAgent.ts
- Command line
-
hf download hf://SaylorTwift/kimi-code/packages/agent-core-v2/src/session/agentLifecycle/managedAgent.ts
-
curl -L -o managedAgent.ts https://huggingface.co/SaylorTwift/kimi-code/resolve/main/packages/agent-core-v2/src/session/agentLifecycle/managedAgent.ts
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(); | |
| } | |
| } | |