/** * ExecutionContext Entity * * Context shared between parent task and subagents * * @see REQ-SDD-003 - Context Sharing * @see DES-SDD-003 - ContextManager */ import type { Artifact } from './Artifact.js'; /** * Execution context entity */ export interface ExecutionContext { /** Task ID this context belongs to */ readonly taskId: string; /** Parent context (for hierarchical sharing) */ readonly parentContext?: ExecutionContext; /** Shared knowledge map */ readonly sharedKnowledge: ReadonlyMap; /** Produced artifacts */ readonly artifacts: readonly Artifact[]; /** Context creation timestamp */ readonly timestamp: Date; /** Context metadata */ readonly metadata: ContextMetadata; } /** * Context metadata */ export interface ContextMetadata { /** Source of this context */ readonly source: 'user' | 'agent' | 'system'; /** Project path */ readonly projectPath?: string; /** Related file paths */ readonly relatedFiles: readonly string[]; /** Tags for categorization */ readonly tags: readonly string[]; } /** * Context creation input */ export interface CreateExecutionContextInput { taskId: string; parentContext?: ExecutionContext; sharedKnowledge?: Map; artifacts?: Artifact[]; metadata?: Partial; } /** * Create an ExecutionContext entity * * @param input - Creation input * @returns ExecutionContext entity */ export declare function createExecutionContext(input: CreateExecutionContextInput): ExecutionContext; /** * Get value from context (including parent contexts) * * @param context - Execution context * @param key - Knowledge key * @returns Value or undefined */ export declare function getFromContext(context: ExecutionContext, key: string): T | undefined; /** * Get all artifacts from context (including parent contexts) * * @param context - Execution context * @returns All artifacts */ export declare function getAllArtifacts(context: ExecutionContext): Artifact[]; /** * Check if context has parent * * @param context - Execution context * @returns true if has parent */ export declare function hasParentContext(context: ExecutionContext): boolean; //# sourceMappingURL=ExecutionContext.d.ts.map