Download packages/agent-core-v2/src/runtime/standaloneRuntime.ts from SaylorTwift/kimi-code: direct link, hf CLI and curl.
- Browser
- Download file 1.6 kB
-
https://huggingface.co/SaylorTwift/kimi-code/resolve/main/packages/agent-core-v2/src/runtime/standaloneRuntime.ts
- Command line
-
hf download hf://SaylorTwift/kimi-code/packages/agent-core-v2/src/runtime/standaloneRuntime.ts
-
curl -L -o standaloneRuntime.ts https://huggingface.co/SaylorTwift/kimi-code/resolve/main/packages/agent-core-v2/src/runtime/standaloneRuntime.ts
1.6 kB
| import { createDecorator, type ServiceIdentifier } from '#/_base/di/instantiation'; | |
| import { ScopeActivation, registerScopedService } from '#/_base/di/scope'; | |
| import { LifecycleScope } from '#/app/scopes'; | |
| import { IHostEnvironment } from '#/os/interface/hostEnvironment'; | |
| import { IHostFileSystem } from '#/os/interface/hostFileSystem'; | |
| import { IHostProcessService } from '#/os/interface/hostProcess'; | |
| import { IHostTerminalService } from '#/os/interface/terminal'; | |
| import { LocalRuntime } from './localRuntime'; | |
| import type { Runtime } from './runtime'; | |
| export interface IStandaloneRuntimeFactory { | |
| readonly _serviceBrand: undefined; | |
| createLocalRuntime(workspaceId: string): Runtime; | |
| } | |
| export const IStandaloneRuntimeFactory: ServiceIdentifier<IStandaloneRuntimeFactory> = | |
| createDecorator<IStandaloneRuntimeFactory>('standaloneRuntimeFactory'); | |
| export class StandaloneRuntimeFactory implements IStandaloneRuntimeFactory { | |
| declare readonly _serviceBrand: undefined; | |
| constructor( | |
| private readonly environment: IHostEnvironment, | |
| private readonly fs: IHostFileSystem, | |
| private readonly process: IHostProcessService, | |
| private readonly terminal: IHostTerminalService, | |
| ) {} | |
| createLocalRuntime(workspaceId: string): Runtime { | |
| return new LocalRuntime(workspaceId, this.environment, this.fs, this.process, this.terminal); | |
| } | |
| } | |
| registerScopedService( | |
| LifecycleScope.App, | |
| IStandaloneRuntimeFactory, | |
| StandaloneRuntimeFactory, | |
| ScopeActivation.OnDemand, | |
| 'standaloneRuntimeFactory', | |
| ); | |