Round 2 regression fixes: - B10 (INV-2 outbox, CRITICAL): wiring.ts — switch durable events from eventBus.publish (live-only) to eventIngestor.ingest (persistent) for debug.record.created and memory.promoted. Add required RuntimeEvent fields (id, source, route). - B12 (Scheduler events, CRITICAL): Scheduler.ts — replace all 4 eventBus.publish calls with eventIngestor.ingest + registered event types (task.started/task.failed/agent.lost/agent.cancelled). Remove unregistered task.status.changed references. - B15 (duplicate ProjectionClient): remove orphan tui/src/ProjectionClient.ts (zero references, superseded by runtime/src/projection/ProjectionClient.ts re-exported via @aircoding/runtime barrel). - RuntimeApp: wire Scheduler→WorkerManager in constructor; document start() bootstrap→recover→hydrate→ready sequence (DD §22.2). - createRuntime: read project_id from .air/shared/project.json (DD §6.1 stable UUID), fallback to Date.now() only if not initialized. - B16 (api_key strict): ProviderManager.get_or_create_adapter now calls ModelConfigLoader.validate() before passing raw api_key to adapter. Also fix from R1 regression: - ArchitectureDesigner: replace broken additive-heuristic risk scoring (single runtime file→replan, large refactor→confirmation only) with change-scope classification (contracts→confirmation, breaking→escalate, large→replan, safe→silent_continue). Remove dead evaluate_risk(). - MainAgent test: update confirmation test from old state name AWAITING_CONFIRMATION to canonical CONFIRMING (B13 state machine fix). Test: 148/148 pass (regression + e2e + llm + toolchain-cpp). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
80 lines
3.6 KiB
TypeScript
Executable File
80 lines
3.6 KiB
TypeScript
Executable File
// AirCoding Runtime Package
|
|
// Main export barrel for @aircoding/runtime
|
|
|
|
// Storage layer
|
|
export { DatabaseManager, createDatabaseManager } from './storage/DatabaseManager.js'
|
|
export { MigrationRunner } from './storage/MigrationRunner.js'
|
|
export { Recovery, createRecovery } from './storage/Recovery.js'
|
|
export * from './storage/assertEnum.js'
|
|
|
|
// Project management
|
|
export { ProjectStore, createProjectStore } from './project/ProjectStore.js'
|
|
export { ProjectLocator, createProjectLocator } from './project/ProjectLocator.js'
|
|
export { ProjectInitializer, createProjectInitializer } from './project/ProjectInitializer.js'
|
|
|
|
// Session management
|
|
export { SessionManager, createSessionManager } from './sessions/SessionManager.js'
|
|
|
|
// Artifact and evidence management
|
|
export { ArtifactStore, createArtifactStore } from './artifacts/ArtifactStore.js'
|
|
export { EvidenceStore, createEvidenceStore } from './artifacts/EvidenceStore.js'
|
|
|
|
// Event system
|
|
export { EventIngestor, eventIngestor } from './events/EventIngestor.js'
|
|
|
|
// Security
|
|
export { PathClassifier, createPathClassifier } from './security/PathClassifier.js'
|
|
export { CommandRiskAnalyzer, createCommandRiskAnalyzer } from './security/CommandRiskAnalyzer.js'
|
|
export { SecretRedactor, createSecretRedactor, get_shared_redactor } from './security/SecretRedactor.js'
|
|
export { PermissionEngine, createPermissionEngine, DEFAULT_PROFILES } from './security/PermissionEngine.js'
|
|
|
|
// Tools
|
|
export { ToolRegistry, createToolRegistry } from './tools/ToolRegistry.js'
|
|
export { BuiltInToolRegistrar, register_builtin_tools } from './tools/BuiltInToolRegistrar.js'
|
|
|
|
// Capabilities
|
|
export { CapabilityManifestValidator, createCapabilityManifestValidator } from './capabilities/CapabilityManifestValidator.js'
|
|
export { CapabilityRegistry, createCapabilityRegistry } from './capabilities/CapabilityRegistry.js'
|
|
|
|
// Context
|
|
export { PromptLayerLoader, createPromptLayerLoader } from './context/PromptLayerLoader.js'
|
|
export { CompactionPolicy, createCompactionPolicy } from './context/CompactionPolicy.js'
|
|
export { ContextAssembler, createContextAssembler } from './context/ContextAssembler.js'
|
|
|
|
// Workers
|
|
export { WorkerProtocol } from './workers/WorkerProtocol.js'
|
|
export { WorkerProcess } from './workers/WorkerProcess.js'
|
|
export { WorkerManager } from './workers/WorkerManager.js'
|
|
|
|
// Scheduler
|
|
export { Scheduler } from './scheduler/Scheduler.js'
|
|
export { TaskGraph } from './scheduler/TaskGraph.js'
|
|
export { WavePlanner } from './scheduler/WavePlanner.js'
|
|
export { RetryPlanner } from './scheduler/RetryPlanner.js'
|
|
export { AgentMonitor } from './scheduler/AgentMonitor.js'
|
|
export { WorkspaceManager } from './scheduler/WorkspaceManager.js'
|
|
|
|
// Projection
|
|
export { ProjectionStore } from './projection/ProjectionStore.js'
|
|
export { ProjectionClient } from './projection/ProjectionClient.js'
|
|
export type { SessionProjection, TaskProjection, AgentProjection, ProjectionSubscriber } from './projection/ProjectionStore.js'
|
|
|
|
// Agents
|
|
export { MainAgent } from './agents/main/MainAgent.js'
|
|
export { ArchitectureDesigner } from './agents/architecture/ArchitectureDesigner.js'
|
|
|
|
// Knowledge
|
|
export { DebugKnowledgeStore } from './knowledge/DebugKnowledgeStore.js'
|
|
export { LearnedMemoryStore } from './knowledge/LearnedMemoryStore.js'
|
|
|
|
// Logging
|
|
export { Logger } from './logging/Logger.js'
|
|
export { DeveloperLogEncryptor } from './logging/DeveloperLogEncryptor.js'
|
|
|
|
// Doctor
|
|
export { DoctorService } from './doctor/DoctorService.js'
|
|
|
|
// App
|
|
export { RuntimeApp, createRuntimeApp } from './app/RuntimeApp.js'
|
|
export { ServiceRegistry } from './app/ServiceRegistry.js'
|
|
export type { ServiceGraph } from './app/ServiceRegistry.js' |