/** * WorkspaceRuntimeRegistry — lazy per-workspace cache of agent execution runtimes. */ import type { Config } from '../../config/schema.js'; import { SkillManager } from '../skills/skill-manager.js'; import { SystemPromptBuilder } from '../prompt/service-prompt-builder.js'; export interface WorkspaceRuntime { skillManager: SkillManager; systemPromptBuilder: SystemPromptBuilder; } export interface WorkspaceRuntimeRegistryOptions { /** Effective config snapshot accessor (must always return a value when called). */ getConfig: () => Config; /** Absolute path to the bundled skills directory shared by every workspace. */ bundledSkillsDir: string | null; /** Called after a runtime is first created for a workspace. */ onRuntimeCreated?: (resolvedPath: string) => void; /** Dynamic project trust lookup used by workspace compatibility skills. */ isWorkspaceTrusted?: (resolvedPath: string) => boolean; } export declare class WorkspaceRuntimeRegistry { private readonly runtimes; private readonly notifiedWorkspacePaths; private readonly getConfig; private readonly bundledSkillsDir; private readonly onRuntimeCreated?; private readonly isWorkspaceTrusted?; constructor(opts: WorkspaceRuntimeRegistryOptions); /** Lazily construct and cache an agent-scoped runtime for a workspace. */ getOrCreate(resolvedPath: string, requestedAgentId?: string, projectId?: string): WorkspaceRuntime; /** Iterate every live workspace runtime (used by skill / config hot-reload). */ values(): IterableIterator; /** Forget cached runtimes on configuration reload or disposal. */ clearAll(): Promise; }