@framers/agentos 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +98 -0
- package/README.md +576 -0
- package/dist/api/AgentOS.d.ts +451 -0
- package/dist/api/AgentOS.d.ts.map +1 -0
- package/dist/api/AgentOS.js +1157 -0
- package/dist/api/AgentOS.js.map +1 -0
- package/dist/api/AgentOSOrchestrator.d.ts +157 -0
- package/dist/api/AgentOSOrchestrator.d.ts.map +1 -0
- package/dist/api/AgentOSOrchestrator.js +679 -0
- package/dist/api/AgentOSOrchestrator.js.map +1 -0
- package/dist/api/interfaces/IAgentOS.d.ts +138 -0
- package/dist/api/interfaces/IAgentOS.d.ts.map +1 -0
- package/dist/api/interfaces/IAgentOS.js +11 -0
- package/dist/api/interfaces/IAgentOS.js.map +1 -0
- package/dist/api/interfaces/IUnifiedAgent.d.ts +126 -0
- package/dist/api/interfaces/IUnifiedAgent.d.ts.map +1 -0
- package/dist/api/interfaces/IUnifiedAgent.js +3 -0
- package/dist/api/interfaces/IUnifiedAgent.js.map +1 -0
- package/dist/api/types/AgentOSInput.d.ts +114 -0
- package/dist/api/types/AgentOSInput.d.ts.map +1 -0
- package/dist/api/types/AgentOSInput.js +13 -0
- package/dist/api/types/AgentOSInput.js.map +1 -0
- package/dist/api/types/AgentOSResponse.d.ts +170 -0
- package/dist/api/types/AgentOSResponse.d.ts.map +1 -0
- package/dist/api/types/AgentOSResponse.js +25 -0
- package/dist/api/types/AgentOSResponse.js.map +1 -0
- package/dist/cognitive_substrate/GMI.d.ts +148 -0
- package/dist/cognitive_substrate/GMI.d.ts.map +1 -0
- package/dist/cognitive_substrate/GMI.js +1003 -0
- package/dist/cognitive_substrate/GMI.js.map +1 -0
- package/dist/cognitive_substrate/GMIManager.d.ts +98 -0
- package/dist/cognitive_substrate/GMIManager.d.ts.map +1 -0
- package/dist/cognitive_substrate/GMIManager.js +517 -0
- package/dist/cognitive_substrate/GMIManager.js.map +1 -0
- package/dist/cognitive_substrate/IGMI.d.ts +469 -0
- package/dist/cognitive_substrate/IGMI.d.ts.map +1 -0
- package/dist/cognitive_substrate/IGMI.js +111 -0
- package/dist/cognitive_substrate/IGMI.js.map +1 -0
- package/dist/cognitive_substrate/memory/IWorkingMemory.d.ts +139 -0
- package/dist/cognitive_substrate/memory/IWorkingMemory.d.ts.map +1 -0
- package/dist/cognitive_substrate/memory/IWorkingMemory.js +14 -0
- package/dist/cognitive_substrate/memory/IWorkingMemory.js.map +1 -0
- package/dist/cognitive_substrate/memory/InMemoryWorkingMemory.d.ts +143 -0
- package/dist/cognitive_substrate/memory/InMemoryWorkingMemory.d.ts.map +1 -0
- package/dist/cognitive_substrate/memory/InMemoryWorkingMemory.js +186 -0
- package/dist/cognitive_substrate/memory/InMemoryWorkingMemory.js.map +1 -0
- package/dist/cognitive_substrate/persona_overlays/PersonaOverlayManager.d.ts +33 -0
- package/dist/cognitive_substrate/persona_overlays/PersonaOverlayManager.d.ts.map +1 -0
- package/dist/cognitive_substrate/persona_overlays/PersonaOverlayManager.js +138 -0
- package/dist/cognitive_substrate/persona_overlays/PersonaOverlayManager.js.map +1 -0
- package/dist/cognitive_substrate/persona_overlays/PersonaOverlayTypes.d.ts +32 -0
- package/dist/cognitive_substrate/persona_overlays/PersonaOverlayTypes.d.ts.map +1 -0
- package/dist/cognitive_substrate/persona_overlays/PersonaOverlayTypes.js +2 -0
- package/dist/cognitive_substrate/persona_overlays/PersonaOverlayTypes.js.map +1 -0
- package/dist/cognitive_substrate/personas/IPersonaDefinition.d.ts +336 -0
- package/dist/cognitive_substrate/personas/IPersonaDefinition.d.ts.map +1 -0
- package/dist/cognitive_substrate/personas/IPersonaDefinition.js +8 -0
- package/dist/cognitive_substrate/personas/IPersonaDefinition.js.map +1 -0
- package/dist/cognitive_substrate/personas/IPersonaLoader.d.ts +78 -0
- package/dist/cognitive_substrate/personas/IPersonaLoader.d.ts.map +1 -0
- package/dist/cognitive_substrate/personas/IPersonaLoader.js +9 -0
- package/dist/cognitive_substrate/personas/IPersonaLoader.js.map +1 -0
- package/dist/cognitive_substrate/personas/PersonaLoader.d.ts +60 -0
- package/dist/cognitive_substrate/personas/PersonaLoader.d.ts.map +1 -0
- package/dist/cognitive_substrate/personas/PersonaLoader.js +138 -0
- package/dist/cognitive_substrate/personas/PersonaLoader.js.map +1 -0
- package/dist/cognitive_substrate/personas/PersonaValidation.d.ts +139 -0
- package/dist/cognitive_substrate/personas/PersonaValidation.d.ts.map +1 -0
- package/dist/cognitive_substrate/personas/PersonaValidation.js +277 -0
- package/dist/cognitive_substrate/personas/PersonaValidation.js.map +1 -0
- package/dist/cognitive_substrate/personas/definitions/atlas_systems_architect.json +29 -0
- package/dist/cognitive_substrate/personas/definitions/default_assistant_persona.json +346 -0
- package/dist/cognitive_substrate/personas/definitions/default_free_assistant.json +13 -0
- package/dist/cognitive_substrate/personas/definitions/index.d.ts +14 -0
- package/dist/cognitive_substrate/personas/definitions/index.d.ts.map +1 -0
- package/dist/cognitive_substrate/personas/definitions/index.js +35 -0
- package/dist/cognitive_substrate/personas/definitions/index.js.map +1 -0
- package/dist/cognitive_substrate/personas/definitions/nerf_generalist.json +11 -0
- package/dist/cognitive_substrate/personas/definitions/v_researcher.json +11 -0
- package/dist/config/AgentOSConfig.d.ts +74 -0
- package/dist/config/AgentOSConfig.d.ts.map +1 -0
- package/dist/config/AgentOSConfig.js +399 -0
- package/dist/config/AgentOSConfig.js.map +1 -0
- package/dist/config/EmbeddingManagerConfiguration.d.ts +190 -0
- package/dist/config/EmbeddingManagerConfiguration.d.ts.map +1 -0
- package/dist/config/EmbeddingManagerConfiguration.js +16 -0
- package/dist/config/EmbeddingManagerConfiguration.js.map +1 -0
- package/dist/config/MemoryLifecycleManagerConfiguration.d.ts +165 -0
- package/dist/config/MemoryLifecycleManagerConfiguration.d.ts.map +1 -0
- package/dist/config/MemoryLifecycleManagerConfiguration.js +69 -0
- package/dist/config/MemoryLifecycleManagerConfiguration.js.map +1 -0
- package/dist/config/RetrievalAugmentorConfiguration.d.ts +98 -0
- package/dist/config/RetrievalAugmentorConfiguration.d.ts.map +1 -0
- package/dist/config/RetrievalAugmentorConfiguration.js +47 -0
- package/dist/config/RetrievalAugmentorConfiguration.js.map +1 -0
- package/dist/config/ToolOrchestratorConfig.d.ts +69 -0
- package/dist/config/ToolOrchestratorConfig.d.ts.map +1 -0
- package/dist/config/ToolOrchestratorConfig.js +11 -0
- package/dist/config/ToolOrchestratorConfig.js.map +1 -0
- package/dist/config/VectorStoreConfiguration.d.ts +223 -0
- package/dist/config/VectorStoreConfiguration.d.ts.map +1 -0
- package/dist/config/VectorStoreConfiguration.js +59 -0
- package/dist/config/VectorStoreConfiguration.js.map +1 -0
- package/dist/config/extension-secrets.json +38 -0
- package/dist/config/extensionSecrets.d.ts +13 -0
- package/dist/config/extensionSecrets.d.ts.map +1 -0
- package/dist/config/extensionSecrets.js +24 -0
- package/dist/config/extensionSecrets.js.map +1 -0
- package/dist/core/agency/AgencyMemoryManager.d.ts +300 -0
- package/dist/core/agency/AgencyMemoryManager.d.ts.map +1 -0
- package/dist/core/agency/AgencyMemoryManager.js +657 -0
- package/dist/core/agency/AgencyMemoryManager.js.map +1 -0
- package/dist/core/agency/AgencyRegistry.d.ts +100 -0
- package/dist/core/agency/AgencyRegistry.d.ts.map +1 -0
- package/dist/core/agency/AgencyRegistry.js +209 -0
- package/dist/core/agency/AgencyRegistry.js.map +1 -0
- package/dist/core/agency/AgencyTypes.d.ts +200 -0
- package/dist/core/agency/AgencyTypes.d.ts.map +1 -0
- package/dist/core/agency/AgencyTypes.js +7 -0
- package/dist/core/agency/AgencyTypes.js.map +1 -0
- package/dist/core/agency/AgentCommunicationBus.d.ts +150 -0
- package/dist/core/agency/AgentCommunicationBus.d.ts.map +1 -0
- package/dist/core/agency/AgentCommunicationBus.js +568 -0
- package/dist/core/agency/AgentCommunicationBus.js.map +1 -0
- package/dist/core/agency/IAgentCommunicationBus.d.ts +469 -0
- package/dist/core/agency/IAgentCommunicationBus.d.ts.map +1 -0
- package/dist/core/agency/IAgentCommunicationBus.js +40 -0
- package/dist/core/agency/IAgentCommunicationBus.js.map +1 -0
- package/dist/core/agency/index.d.ts +18 -0
- package/dist/core/agency/index.d.ts.map +1 -0
- package/dist/core/agency/index.js +18 -0
- package/dist/core/agency/index.js.map +1 -0
- package/dist/core/agents/AgentCore.d.ts +385 -0
- package/dist/core/agents/AgentCore.d.ts.map +1 -0
- package/dist/core/agents/AgentCore.js +527 -0
- package/dist/core/agents/AgentCore.js.map +1 -0
- package/dist/core/agents/AgentFactory.d.ts +123 -0
- package/dist/core/agents/AgentFactory.d.ts.map +1 -0
- package/dist/core/agents/AgentFactory.js +232 -0
- package/dist/core/agents/AgentFactory.js.map +1 -0
- package/dist/core/agents/AgentPoolAgent.d.ts +244 -0
- package/dist/core/agents/AgentPoolAgent.d.ts.map +1 -0
- package/dist/core/agents/AgentPoolAgent.js +697 -0
- package/dist/core/agents/AgentPoolAgent.js.map +1 -0
- package/dist/core/agents/AgentPoolConfig.d.ts +191 -0
- package/dist/core/agents/AgentPoolConfig.d.ts.map +1 -0
- package/dist/core/agents/AgentPoolConfig.js +58 -0
- package/dist/core/agents/AgentPoolConfig.js.map +1 -0
- package/dist/core/agents/IAgent.d.ts +226 -0
- package/dist/core/agents/IAgent.d.ts.map +1 -0
- package/dist/core/agents/IAgent.js +14 -0
- package/dist/core/agents/IAgent.js.map +1 -0
- package/dist/core/agents/IAgentFactory.d.ts +137 -0
- package/dist/core/agents/IAgentFactory.d.ts.map +1 -0
- package/dist/core/agents/IAgentFactory.js +13 -0
- package/dist/core/agents/IAgentFactory.js.map +1 -0
- package/dist/core/agents/tools/Tool.d.ts +17 -0
- package/dist/core/agents/tools/Tool.d.ts.map +1 -0
- package/dist/core/agents/tools/Tool.js +8 -0
- package/dist/core/agents/tools/Tool.js.map +1 -0
- package/dist/core/ai_utilities/HybridUtilityAI.d.ts +1 -0
- package/dist/core/ai_utilities/HybridUtilityAI.d.ts.map +1 -0
- package/dist/core/ai_utilities/HybridUtilityAI.js +2 -0
- package/dist/core/ai_utilities/HybridUtilityAI.js.map +1 -0
- package/dist/core/ai_utilities/IUtilityAI.d.ts +212 -0
- package/dist/core/ai_utilities/IUtilityAI.d.ts.map +1 -0
- package/dist/core/ai_utilities/IUtilityAI.js +11 -0
- package/dist/core/ai_utilities/IUtilityAI.js.map +1 -0
- package/dist/core/ai_utilities/LLMUtilityAI.d.ts +94 -0
- package/dist/core/ai_utilities/LLMUtilityAI.d.ts.map +1 -0
- package/dist/core/ai_utilities/LLMUtilityAI.js +434 -0
- package/dist/core/ai_utilities/LLMUtilityAI.js.map +1 -0
- package/dist/core/ai_utilities/StatisticalUtilityAI.d.ts +102 -0
- package/dist/core/ai_utilities/StatisticalUtilityAI.d.ts.map +1 -0
- package/dist/core/ai_utilities/StatisticalUtilityAI.js +617 -0
- package/dist/core/ai_utilities/StatisticalUtilityAI.js.map +1 -0
- package/dist/core/conversation/ConversationContext.d.ts +259 -0
- package/dist/core/conversation/ConversationContext.d.ts.map +1 -0
- package/dist/core/conversation/ConversationContext.js +450 -0
- package/dist/core/conversation/ConversationContext.js.map +1 -0
- package/dist/core/conversation/ConversationManager.d.ts +223 -0
- package/dist/core/conversation/ConversationManager.d.ts.map +1 -0
- package/dist/core/conversation/ConversationManager.js +558 -0
- package/dist/core/conversation/ConversationManager.js.map +1 -0
- package/dist/core/conversation/ConversationMessage.d.ts +184 -0
- package/dist/core/conversation/ConversationMessage.d.ts.map +1 -0
- package/dist/core/conversation/ConversationMessage.js +66 -0
- package/dist/core/conversation/ConversationMessage.js.map +1 -0
- package/dist/core/evaluation/Evaluator.d.ts +28 -0
- package/dist/core/evaluation/Evaluator.d.ts.map +1 -0
- package/dist/core/evaluation/Evaluator.js +490 -0
- package/dist/core/evaluation/Evaluator.js.map +1 -0
- package/dist/core/evaluation/IEvaluator.d.ts +309 -0
- package/dist/core/evaluation/IEvaluator.d.ts.map +1 -0
- package/dist/core/evaluation/IEvaluator.js +12 -0
- package/dist/core/evaluation/IEvaluator.js.map +1 -0
- package/dist/core/evaluation/LLMJudge.d.ts +105 -0
- package/dist/core/evaluation/LLMJudge.d.ts.map +1 -0
- package/dist/core/evaluation/LLMJudge.js +229 -0
- package/dist/core/evaluation/LLMJudge.js.map +1 -0
- package/dist/core/evaluation/index.d.ts +9 -0
- package/dist/core/evaluation/index.d.ts.map +1 -0
- package/dist/core/evaluation/index.js +9 -0
- package/dist/core/evaluation/index.js.map +1 -0
- package/dist/core/guardrails/IGuardrailService.d.ts +142 -0
- package/dist/core/guardrails/IGuardrailService.d.ts.map +1 -0
- package/dist/core/guardrails/IGuardrailService.js +24 -0
- package/dist/core/guardrails/IGuardrailService.js.map +1 -0
- package/dist/core/guardrails/guardrailDispatcher.d.ts +36 -0
- package/dist/core/guardrails/guardrailDispatcher.d.ts.map +1 -0
- package/dist/core/guardrails/guardrailDispatcher.js +240 -0
- package/dist/core/guardrails/guardrailDispatcher.js.map +1 -0
- package/dist/core/hitl/HumanInteractionManager.d.ts +146 -0
- package/dist/core/hitl/HumanInteractionManager.d.ts.map +1 -0
- package/dist/core/hitl/HumanInteractionManager.js +491 -0
- package/dist/core/hitl/HumanInteractionManager.js.map +1 -0
- package/dist/core/hitl/IHumanInteractionManager.d.ts +521 -0
- package/dist/core/hitl/IHumanInteractionManager.d.ts.map +1 -0
- package/dist/core/hitl/IHumanInteractionManager.js +33 -0
- package/dist/core/hitl/IHumanInteractionManager.js.map +1 -0
- package/dist/core/hitl/index.d.ts +17 -0
- package/dist/core/hitl/index.d.ts.map +1 -0
- package/dist/core/hitl/index.js +17 -0
- package/dist/core/hitl/index.js.map +1 -0
- package/dist/core/knowledge/IKnowledgeGraph.d.ts +351 -0
- package/dist/core/knowledge/IKnowledgeGraph.d.ts.map +1 -0
- package/dist/core/knowledge/IKnowledgeGraph.js +10 -0
- package/dist/core/knowledge/IKnowledgeGraph.js.map +1 -0
- package/dist/core/knowledge/KnowledgeGraph.d.ts +93 -0
- package/dist/core/knowledge/KnowledgeGraph.d.ts.map +1 -0
- package/dist/core/knowledge/KnowledgeGraph.js +601 -0
- package/dist/core/knowledge/KnowledgeGraph.js.map +1 -0
- package/dist/core/knowledge/index.d.ts +8 -0
- package/dist/core/knowledge/index.d.ts.map +1 -0
- package/dist/core/knowledge/index.js +8 -0
- package/dist/core/knowledge/index.js.map +1 -0
- package/dist/core/language/LanguageService.d.ts +77 -0
- package/dist/core/language/LanguageService.d.ts.map +1 -0
- package/dist/core/language/LanguageService.js +305 -0
- package/dist/core/language/LanguageService.js.map +1 -0
- package/dist/core/language/index.d.ts +6 -0
- package/dist/core/language/index.d.ts.map +1 -0
- package/dist/core/language/index.js +6 -0
- package/dist/core/language/index.js.map +1 -0
- package/dist/core/language/interfaces.d.ts +168 -0
- package/dist/core/language/interfaces.d.ts.map +1 -0
- package/dist/core/language/interfaces.js +37 -0
- package/dist/core/language/interfaces.js.map +1 -0
- package/dist/core/language/providers/DeepLTranslationProvider.d.ts +16 -0
- package/dist/core/language/providers/DeepLTranslationProvider.d.ts.map +1 -0
- package/dist/core/language/providers/DeepLTranslationProvider.js +28 -0
- package/dist/core/language/providers/DeepLTranslationProvider.js.map +1 -0
- package/dist/core/language/providers/OpenAITranslationProvider.d.ts +17 -0
- package/dist/core/language/providers/OpenAITranslationProvider.d.ts.map +1 -0
- package/dist/core/language/providers/OpenAITranslationProvider.js +34 -0
- package/dist/core/language/providers/OpenAITranslationProvider.js.map +1 -0
- package/dist/core/language/providers/WhisperDetectionProvider.d.ts +16 -0
- package/dist/core/language/providers/WhisperDetectionProvider.d.ts.map +1 -0
- package/dist/core/language/providers/WhisperDetectionProvider.js +15 -0
- package/dist/core/language/providers/WhisperDetectionProvider.js.map +1 -0
- package/dist/core/llm/IPromptEngine.d.ts +627 -0
- package/dist/core/llm/IPromptEngine.d.ts.map +1 -0
- package/dist/core/llm/IPromptEngine.js +81 -0
- package/dist/core/llm/IPromptEngine.js.map +1 -0
- package/dist/core/llm/PromptEngine.d.ts +108 -0
- package/dist/core/llm/PromptEngine.d.ts.map +1 -0
- package/dist/core/llm/PromptEngine.js +872 -0
- package/dist/core/llm/PromptEngine.js.map +1 -0
- package/dist/core/llm/providers/AIModelProviderManager.d.ts +74 -0
- package/dist/core/llm/providers/AIModelProviderManager.d.ts.map +1 -0
- package/dist/core/llm/providers/AIModelProviderManager.js +263 -0
- package/dist/core/llm/providers/AIModelProviderManager.js.map +1 -0
- package/dist/core/llm/providers/IProvider.d.ts +327 -0
- package/dist/core/llm/providers/IProvider.d.ts.map +1 -0
- package/dist/core/llm/providers/IProvider.js +39 -0
- package/dist/core/llm/providers/IProvider.js.map +1 -0
- package/dist/core/llm/providers/errors/OllamaProviderError.d.ts +36 -0
- package/dist/core/llm/providers/errors/OllamaProviderError.d.ts.map +1 -0
- package/dist/core/llm/providers/errors/OllamaProviderError.js +40 -0
- package/dist/core/llm/providers/errors/OllamaProviderError.js.map +1 -0
- package/dist/core/llm/providers/errors/OpenAIProviderError.d.ts +42 -0
- package/dist/core/llm/providers/errors/OpenAIProviderError.d.ts.map +1 -0
- package/dist/core/llm/providers/errors/OpenAIProviderError.js +44 -0
- package/dist/core/llm/providers/errors/OpenAIProviderError.js.map +1 -0
- package/dist/core/llm/providers/errors/OpenRouterProviderError.d.ts +39 -0
- package/dist/core/llm/providers/errors/OpenRouterProviderError.d.ts.map +1 -0
- package/dist/core/llm/providers/errors/OpenRouterProviderError.js +42 -0
- package/dist/core/llm/providers/errors/OpenRouterProviderError.js.map +1 -0
- package/dist/core/llm/providers/errors/ProviderError.d.ts +37 -0
- package/dist/core/llm/providers/errors/ProviderError.d.ts.map +1 -0
- package/dist/core/llm/providers/errors/ProviderError.js +36 -0
- package/dist/core/llm/providers/errors/ProviderError.js.map +1 -0
- package/dist/core/llm/providers/implementations/OllamaProvider.d.ts +80 -0
- package/dist/core/llm/providers/implementations/OllamaProvider.d.ts.map +1 -0
- package/dist/core/llm/providers/implementations/OllamaProvider.js +473 -0
- package/dist/core/llm/providers/implementations/OllamaProvider.js.map +1 -0
- package/dist/core/llm/providers/implementations/OpenAIProvider.d.ts +160 -0
- package/dist/core/llm/providers/implementations/OpenAIProvider.d.ts.map +1 -0
- package/dist/core/llm/providers/implementations/OpenAIProvider.js +672 -0
- package/dist/core/llm/providers/implementations/OpenAIProvider.js.map +1 -0
- package/dist/core/llm/providers/implementations/OpenRouterProvider.d.ts +51 -0
- package/dist/core/llm/providers/implementations/OpenRouterProvider.d.ts.map +1 -0
- package/dist/core/llm/providers/implementations/OpenRouterProvider.js +499 -0
- package/dist/core/llm/providers/implementations/OpenRouterProvider.js.map +1 -0
- package/dist/core/llm/routing/IModelRouter.d.ts +129 -0
- package/dist/core/llm/routing/IModelRouter.d.ts.map +1 -0
- package/dist/core/llm/routing/IModelRouter.js +14 -0
- package/dist/core/llm/routing/IModelRouter.js.map +1 -0
- package/dist/core/llm/routing/ModelRouter.d.ts +157 -0
- package/dist/core/llm/routing/ModelRouter.d.ts.map +1 -0
- package/dist/core/llm/routing/ModelRouter.js +190 -0
- package/dist/core/llm/routing/ModelRouter.js.map +1 -0
- package/dist/core/llm/streaming/StreamingBatcher.d.ts +54 -0
- package/dist/core/llm/streaming/StreamingBatcher.d.ts.map +1 -0
- package/dist/core/llm/streaming/StreamingBatcher.js +173 -0
- package/dist/core/llm/streaming/StreamingBatcher.js.map +1 -0
- package/dist/core/llm/streaming/StreamingReconstructor.d.ts +69 -0
- package/dist/core/llm/streaming/StreamingReconstructor.d.ts.map +1 -0
- package/dist/core/llm/streaming/StreamingReconstructor.js +102 -0
- package/dist/core/llm/streaming/StreamingReconstructor.js.map +1 -0
- package/dist/core/marketplace/IMarketplace.d.ts +500 -0
- package/dist/core/marketplace/IMarketplace.d.ts.map +1 -0
- package/dist/core/marketplace/IMarketplace.js +10 -0
- package/dist/core/marketplace/IMarketplace.js.map +1 -0
- package/dist/core/marketplace/Marketplace.d.ts +122 -0
- package/dist/core/marketplace/Marketplace.d.ts.map +1 -0
- package/dist/core/marketplace/Marketplace.js +591 -0
- package/dist/core/marketplace/Marketplace.js.map +1 -0
- package/dist/core/marketplace/index.d.ts +8 -0
- package/dist/core/marketplace/index.d.ts.map +1 -0
- package/dist/core/marketplace/index.js +8 -0
- package/dist/core/marketplace/index.js.map +1 -0
- package/dist/core/observability/ITracer.d.ts +317 -0
- package/dist/core/observability/ITracer.d.ts.map +1 -0
- package/dist/core/observability/ITracer.js +55 -0
- package/dist/core/observability/ITracer.js.map +1 -0
- package/dist/core/observability/Tracer.d.ts +76 -0
- package/dist/core/observability/Tracer.d.ts.map +1 -0
- package/dist/core/observability/Tracer.js +360 -0
- package/dist/core/observability/Tracer.js.map +1 -0
- package/dist/core/observability/index.d.ts +9 -0
- package/dist/core/observability/index.d.ts.map +1 -0
- package/dist/core/observability/index.js +8 -0
- package/dist/core/observability/index.js.map +1 -0
- package/dist/core/orchestration/AgentOrchestrator.d.ts +243 -0
- package/dist/core/orchestration/AgentOrchestrator.d.ts.map +1 -0
- package/dist/core/orchestration/AgentOrchestrator.js +648 -0
- package/dist/core/orchestration/AgentOrchestrator.js.map +1 -0
- package/dist/core/orchestration/IAgentOrchestrator.d.ts +44 -0
- package/dist/core/orchestration/IAgentOrchestrator.d.ts.map +1 -0
- package/dist/core/orchestration/IAgentOrchestrator.js +4 -0
- package/dist/core/orchestration/IAgentOrchestrator.js.map +1 -0
- package/dist/core/orchestration/helpers.d.ts +12 -0
- package/dist/core/orchestration/helpers.d.ts.map +1 -0
- package/dist/core/orchestration/helpers.js +36 -0
- package/dist/core/orchestration/helpers.js.map +1 -0
- package/dist/core/planning/IPlanningEngine.d.ts +524 -0
- package/dist/core/planning/IPlanningEngine.d.ts.map +1 -0
- package/dist/core/planning/IPlanningEngine.js +32 -0
- package/dist/core/planning/IPlanningEngine.js.map +1 -0
- package/dist/core/planning/PlanningEngine.d.ts +161 -0
- package/dist/core/planning/PlanningEngine.d.ts.map +1 -0
- package/dist/core/planning/PlanningEngine.js +783 -0
- package/dist/core/planning/PlanningEngine.js.map +1 -0
- package/dist/core/planning/index.d.ts +25 -0
- package/dist/core/planning/index.d.ts.map +1 -0
- package/dist/core/planning/index.js +25 -0
- package/dist/core/planning/index.js.map +1 -0
- package/dist/core/sandbox/CodeSandbox.d.ts +86 -0
- package/dist/core/sandbox/CodeSandbox.d.ts.map +1 -0
- package/dist/core/sandbox/CodeSandbox.js +475 -0
- package/dist/core/sandbox/CodeSandbox.js.map +1 -0
- package/dist/core/sandbox/ICodeSandbox.d.ts +249 -0
- package/dist/core/sandbox/ICodeSandbox.d.ts.map +1 -0
- package/dist/core/sandbox/ICodeSandbox.js +24 -0
- package/dist/core/sandbox/ICodeSandbox.js.map +1 -0
- package/dist/core/sandbox/index.d.ts +9 -0
- package/dist/core/sandbox/index.d.ts.map +1 -0
- package/dist/core/sandbox/index.js +8 -0
- package/dist/core/sandbox/index.js.map +1 -0
- package/dist/core/storage/IStorageAdapter.d.ts +483 -0
- package/dist/core/storage/IStorageAdapter.d.ts.map +1 -0
- package/dist/core/storage/IStorageAdapter.js +19 -0
- package/dist/core/storage/IStorageAdapter.js.map +1 -0
- package/dist/core/storage/InMemoryStorageAdapter.d.ts +192 -0
- package/dist/core/storage/InMemoryStorageAdapter.d.ts.map +1 -0
- package/dist/core/storage/InMemoryStorageAdapter.js +343 -0
- package/dist/core/storage/InMemoryStorageAdapter.js.map +1 -0
- package/dist/core/storage/SqlStorageAdapter.d.ts +262 -0
- package/dist/core/storage/SqlStorageAdapter.d.ts.map +1 -0
- package/dist/core/storage/SqlStorageAdapter.js +485 -0
- package/dist/core/storage/SqlStorageAdapter.js.map +1 -0
- package/dist/core/storage/index.d.ts +14 -0
- package/dist/core/storage/index.d.ts.map +1 -0
- package/dist/core/storage/index.js +14 -0
- package/dist/core/storage/index.js.map +1 -0
- package/dist/core/streaming/IStreamClient.d.ts +72 -0
- package/dist/core/streaming/IStreamClient.d.ts.map +1 -0
- package/dist/core/streaming/IStreamClient.js +12 -0
- package/dist/core/streaming/IStreamClient.js.map +1 -0
- package/dist/core/streaming/StreamingManager.d.ts +242 -0
- package/dist/core/streaming/StreamingManager.d.ts.map +1 -0
- package/dist/core/streaming/StreamingManager.js +282 -0
- package/dist/core/streaming/StreamingManager.js.map +1 -0
- package/dist/core/structured/IStructuredOutputManager.d.ts +701 -0
- package/dist/core/structured/IStructuredOutputManager.d.ts.map +1 -0
- package/dist/core/structured/IStructuredOutputManager.js +74 -0
- package/dist/core/structured/IStructuredOutputManager.js.map +1 -0
- package/dist/core/structured/StructuredOutputManager.d.ts +140 -0
- package/dist/core/structured/StructuredOutputManager.d.ts.map +1 -0
- package/dist/core/structured/StructuredOutputManager.js +1015 -0
- package/dist/core/structured/StructuredOutputManager.js.map +1 -0
- package/dist/core/structured/index.d.ts +34 -0
- package/dist/core/structured/index.d.ts.map +1 -0
- package/dist/core/structured/index.js +34 -0
- package/dist/core/structured/index.js.map +1 -0
- package/dist/core/tools/ITool.d.ts +228 -0
- package/dist/core/tools/ITool.d.ts.map +1 -0
- package/dist/core/tools/ITool.js +11 -0
- package/dist/core/tools/ITool.js.map +1 -0
- package/dist/core/tools/IToolOrchestrator.d.ts +131 -0
- package/dist/core/tools/IToolOrchestrator.d.ts.map +1 -0
- package/dist/core/tools/IToolOrchestrator.js +14 -0
- package/dist/core/tools/IToolOrchestrator.js.map +1 -0
- package/dist/core/tools/ToolExecutor.d.ts +143 -0
- package/dist/core/tools/ToolExecutor.d.ts.map +1 -0
- package/dist/core/tools/ToolExecutor.js +364 -0
- package/dist/core/tools/ToolExecutor.js.map +1 -0
- package/dist/core/tools/ToolOrchestrator.d.ts +142 -0
- package/dist/core/tools/ToolOrchestrator.d.ts.map +1 -0
- package/dist/core/tools/ToolOrchestrator.js +373 -0
- package/dist/core/tools/ToolOrchestrator.js.map +1 -0
- package/dist/core/tools/permissions/IToolPermissionManager.d.ts +195 -0
- package/dist/core/tools/permissions/IToolPermissionManager.d.ts.map +1 -0
- package/dist/core/tools/permissions/IToolPermissionManager.js +14 -0
- package/dist/core/tools/permissions/IToolPermissionManager.js.map +1 -0
- package/dist/core/tools/permissions/ToolPermissionManager.d.ts +203 -0
- package/dist/core/tools/permissions/ToolPermissionManager.d.ts.map +1 -0
- package/dist/core/tools/permissions/ToolPermissionManager.js +298 -0
- package/dist/core/tools/permissions/ToolPermissionManager.js.map +1 -0
- package/dist/core/ui/IUIComponent.d.ts +11 -0
- package/dist/core/ui/IUIComponent.d.ts.map +1 -0
- package/dist/core/ui/IUIComponent.js +2 -0
- package/dist/core/ui/IUIComponent.js.map +1 -0
- package/dist/core/usage/UsageLedger.d.ts +81 -0
- package/dist/core/usage/UsageLedger.d.ts.map +1 -0
- package/dist/core/usage/UsageLedger.js +135 -0
- package/dist/core/usage/UsageLedger.js.map +1 -0
- package/dist/core/workflows/IWorkflowEngine.d.ts +42 -0
- package/dist/core/workflows/IWorkflowEngine.d.ts.map +1 -0
- package/dist/core/workflows/IWorkflowEngine.js +2 -0
- package/dist/core/workflows/IWorkflowEngine.js.map +1 -0
- package/dist/core/workflows/WorkflowEngine.d.ts +28 -0
- package/dist/core/workflows/WorkflowEngine.d.ts.map +1 -0
- package/dist/core/workflows/WorkflowEngine.js +309 -0
- package/dist/core/workflows/WorkflowEngine.js.map +1 -0
- package/dist/core/workflows/WorkflowTypes.d.ts +180 -0
- package/dist/core/workflows/WorkflowTypes.d.ts.map +1 -0
- package/dist/core/workflows/WorkflowTypes.js +26 -0
- package/dist/core/workflows/WorkflowTypes.js.map +1 -0
- package/dist/core/workflows/runtime/WorkflowRuntime.d.ts +70 -0
- package/dist/core/workflows/runtime/WorkflowRuntime.d.ts.map +1 -0
- package/dist/core/workflows/runtime/WorkflowRuntime.js +566 -0
- package/dist/core/workflows/runtime/WorkflowRuntime.js.map +1 -0
- package/dist/core/workflows/storage/IWorkflowStore.d.ts +75 -0
- package/dist/core/workflows/storage/IWorkflowStore.d.ts.map +1 -0
- package/dist/core/workflows/storage/IWorkflowStore.js +2 -0
- package/dist/core/workflows/storage/IWorkflowStore.js.map +1 -0
- package/dist/core/workflows/storage/InMemoryWorkflowStore.d.ts +14 -0
- package/dist/core/workflows/storage/InMemoryWorkflowStore.d.ts.map +1 -0
- package/dist/core/workflows/storage/InMemoryWorkflowStore.js +130 -0
- package/dist/core/workflows/storage/InMemoryWorkflowStore.js.map +1 -0
- package/dist/extensions/ExtensionLoader.d.ts +119 -0
- package/dist/extensions/ExtensionLoader.d.ts.map +1 -0
- package/dist/extensions/ExtensionLoader.js +297 -0
- package/dist/extensions/ExtensionLoader.js.map +1 -0
- package/dist/extensions/ExtensionManager.d.ts +49 -0
- package/dist/extensions/ExtensionManager.d.ts.map +1 -0
- package/dist/extensions/ExtensionManager.js +197 -0
- package/dist/extensions/ExtensionManager.js.map +1 -0
- package/dist/extensions/ExtensionRegistry.d.ts +39 -0
- package/dist/extensions/ExtensionRegistry.d.ts.map +1 -0
- package/dist/extensions/ExtensionRegistry.js +103 -0
- package/dist/extensions/ExtensionRegistry.js.map +1 -0
- package/dist/extensions/MultiRegistryLoader.d.ts +61 -0
- package/dist/extensions/MultiRegistryLoader.d.ts.map +1 -0
- package/dist/extensions/MultiRegistryLoader.js +169 -0
- package/dist/extensions/MultiRegistryLoader.js.map +1 -0
- package/dist/extensions/RegistryConfig.d.ts +86 -0
- package/dist/extensions/RegistryConfig.d.ts.map +1 -0
- package/dist/extensions/RegistryConfig.js +99 -0
- package/dist/extensions/RegistryConfig.js.map +1 -0
- package/dist/extensions/events.d.ts +19 -0
- package/dist/extensions/events.d.ts.map +1 -0
- package/dist/extensions/events.js +2 -0
- package/dist/extensions/events.js.map +1 -0
- package/dist/extensions/index.d.ts +9 -0
- package/dist/extensions/index.d.ts.map +1 -0
- package/dist/extensions/index.js +9 -0
- package/dist/extensions/index.js.map +1 -0
- package/dist/extensions/manifest.d.ts +52 -0
- package/dist/extensions/manifest.d.ts.map +1 -0
- package/dist/extensions/manifest.js +2 -0
- package/dist/extensions/manifest.js.map +1 -0
- package/dist/extensions/types.d.ts +294 -0
- package/dist/extensions/types.d.ts.map +1 -0
- package/dist/extensions/types.js +12 -0
- package/dist/extensions/types.js.map +1 -0
- package/dist/index.d.ts +49 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +59 -0
- package/dist/index.js.map +1 -0
- package/dist/logging/ILogger.d.ts +8 -0
- package/dist/logging/ILogger.d.ts.map +1 -0
- package/dist/logging/ILogger.js +2 -0
- package/dist/logging/ILogger.js.map +1 -0
- package/dist/logging/PinoLogger.d.ts +12 -0
- package/dist/logging/PinoLogger.d.ts.map +1 -0
- package/dist/logging/PinoLogger.js +22 -0
- package/dist/logging/PinoLogger.js.map +1 -0
- package/dist/logging/loggerFactory.d.ts +6 -0
- package/dist/logging/loggerFactory.d.ts.map +1 -0
- package/dist/logging/loggerFactory.js +14 -0
- package/dist/logging/loggerFactory.js.map +1 -0
- package/dist/rag/EmbeddingManager.d.ts +81 -0
- package/dist/rag/EmbeddingManager.d.ts.map +1 -0
- package/dist/rag/EmbeddingManager.js +412 -0
- package/dist/rag/EmbeddingManager.js.map +1 -0
- package/dist/rag/IEmbeddingManager.d.ts +277 -0
- package/dist/rag/IEmbeddingManager.d.ts.map +1 -0
- package/dist/rag/IEmbeddingManager.js +19 -0
- package/dist/rag/IEmbeddingManager.js.map +1 -0
- package/dist/rag/IRetrievalAugmentor.d.ts +208 -0
- package/dist/rag/IRetrievalAugmentor.d.ts.map +1 -0
- package/dist/rag/IRetrievalAugmentor.js +21 -0
- package/dist/rag/IRetrievalAugmentor.js.map +1 -0
- package/dist/rag/IVectorStore.d.ts +351 -0
- package/dist/rag/IVectorStore.d.ts.map +1 -0
- package/dist/rag/IVectorStore.js +15 -0
- package/dist/rag/IVectorStore.js.map +1 -0
- package/dist/rag/IVectorStoreManager.d.ts +121 -0
- package/dist/rag/IVectorStoreManager.d.ts.map +1 -0
- package/dist/rag/IVectorStoreManager.js +13 -0
- package/dist/rag/IVectorStoreManager.js.map +1 -0
- package/dist/rag/RetrievalAugmentor.d.ts +99 -0
- package/dist/rag/RetrievalAugmentor.d.ts.map +1 -0
- package/dist/rag/RetrievalAugmentor.js +674 -0
- package/dist/rag/RetrievalAugmentor.js.map +1 -0
- package/dist/rag/VectorStoreManager.d.ts +90 -0
- package/dist/rag/VectorStoreManager.d.ts.map +1 -0
- package/dist/rag/VectorStoreManager.js +283 -0
- package/dist/rag/VectorStoreManager.js.map +1 -0
- package/dist/rag/implementations/index.d.ts +9 -0
- package/dist/rag/implementations/index.d.ts.map +1 -0
- package/dist/rag/implementations/index.js +9 -0
- package/dist/rag/implementations/index.js.map +1 -0
- package/dist/rag/implementations/vector_stores/InMemoryVectorStore.d.ts +132 -0
- package/dist/rag/implementations/vector_stores/InMemoryVectorStore.d.ts.map +1 -0
- package/dist/rag/implementations/vector_stores/InMemoryVectorStore.js +539 -0
- package/dist/rag/implementations/vector_stores/InMemoryVectorStore.js.map +1 -0
- package/dist/rag/implementations/vector_stores/SqlVectorStore.d.ts +265 -0
- package/dist/rag/implementations/vector_stores/SqlVectorStore.d.ts.map +1 -0
- package/dist/rag/implementations/vector_stores/SqlVectorStore.js +755 -0
- package/dist/rag/implementations/vector_stores/SqlVectorStore.js.map +1 -0
- package/dist/rag/implementations/vector_stores/index.d.ts +10 -0
- package/dist/rag/implementations/vector_stores/index.d.ts.map +1 -0
- package/dist/rag/implementations/vector_stores/index.js +12 -0
- package/dist/rag/implementations/vector_stores/index.js.map +1 -0
- package/dist/rag/index.d.ts +95 -0
- package/dist/rag/index.d.ts.map +1 -0
- package/dist/rag/index.js +97 -0
- package/dist/rag/index.js.map +1 -0
- package/dist/services/user_auth/AuthService.d.ts +13 -0
- package/dist/services/user_auth/AuthService.d.ts.map +1 -0
- package/dist/services/user_auth/AuthService.js +24 -0
- package/dist/services/user_auth/AuthService.js.map +1 -0
- package/dist/services/user_auth/SubscriptionService.d.ts +14 -0
- package/dist/services/user_auth/SubscriptionService.d.ts.map +1 -0
- package/dist/services/user_auth/SubscriptionService.js +34 -0
- package/dist/services/user_auth/SubscriptionService.js.map +1 -0
- package/dist/services/user_auth/types.d.ts +30 -0
- package/dist/services/user_auth/types.d.ts.map +1 -0
- package/dist/services/user_auth/types.js +2 -0
- package/dist/services/user_auth/types.js.map +1 -0
- package/dist/stubs/prismaClient.d.ts +35 -0
- package/dist/stubs/prismaClient.d.ts.map +1 -0
- package/dist/stubs/prismaClient.js +47 -0
- package/dist/stubs/prismaClient.js.map +1 -0
- package/dist/types/rateLimitTypes.d.ts +70 -0
- package/dist/types/rateLimitTypes.d.ts.map +1 -0
- package/dist/types/rateLimitTypes.js +55 -0
- package/dist/types/rateLimitTypes.js.map +1 -0
- package/dist/utils/errors.d.ts +80 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +201 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/uuid.d.ts +11 -0
- package/dist/utils/uuid.d.ts.map +1 -0
- package/dist/utils/uuid.js +64 -0
- package/dist/utils/uuid.js.map +1 -0
- package/package.json +84 -0
|
@@ -0,0 +1,521 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file IHumanInteractionManager.ts
|
|
3
|
+
* @description Interface for Human-in-the-Loop (HITL) interactions in AgentOS.
|
|
4
|
+
* Enables agents to request human approval, input, and collaboration at key decision points.
|
|
5
|
+
*
|
|
6
|
+
* HITL is critical for:
|
|
7
|
+
* - High-stakes decisions requiring human judgment
|
|
8
|
+
* - Ambiguous situations needing clarification
|
|
9
|
+
* - Quality assurance and output review
|
|
10
|
+
* - Learning from human corrections
|
|
11
|
+
*
|
|
12
|
+
* @module AgentOS/HITL
|
|
13
|
+
* @version 1.0.0
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* const hitlManager = new HumanInteractionManager(config);
|
|
18
|
+
*
|
|
19
|
+
* // Request approval before critical action
|
|
20
|
+
* const approval = await hitlManager.requestApproval({
|
|
21
|
+
* actionId: 'delete-all-records',
|
|
22
|
+
* description: 'Delete all customer records from database',
|
|
23
|
+
* severity: 'critical',
|
|
24
|
+
* context: { recordCount: 50000 },
|
|
25
|
+
* });
|
|
26
|
+
*
|
|
27
|
+
* if (approval.approved) {
|
|
28
|
+
* await executeAction();
|
|
29
|
+
* }
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
/**
|
|
33
|
+
* Severity levels for actions requiring approval.
|
|
34
|
+
*/
|
|
35
|
+
export type ActionSeverity = 'low' | 'medium' | 'high' | 'critical';
|
|
36
|
+
/**
|
|
37
|
+
* A pending action awaiting human approval.
|
|
38
|
+
*/
|
|
39
|
+
export interface PendingAction {
|
|
40
|
+
/** Unique action identifier */
|
|
41
|
+
actionId: string;
|
|
42
|
+
/** Human-readable description of the action */
|
|
43
|
+
description: string;
|
|
44
|
+
/** Action severity/risk level */
|
|
45
|
+
severity: ActionSeverity;
|
|
46
|
+
/** Category of action */
|
|
47
|
+
category?: 'data_modification' | 'external_api' | 'financial' | 'communication' | 'system' | 'other';
|
|
48
|
+
/** Agent requesting approval */
|
|
49
|
+
agentId: string;
|
|
50
|
+
/** Context/parameters of the action */
|
|
51
|
+
context: Record<string, unknown>;
|
|
52
|
+
/** Potential consequences if approved */
|
|
53
|
+
potentialConsequences?: string[];
|
|
54
|
+
/** Reversibility of the action */
|
|
55
|
+
reversible: boolean;
|
|
56
|
+
/** Estimated cost (if applicable) */
|
|
57
|
+
estimatedCost?: {
|
|
58
|
+
amount: number;
|
|
59
|
+
currency: string;
|
|
60
|
+
};
|
|
61
|
+
/** Timestamp when request was made */
|
|
62
|
+
requestedAt: Date;
|
|
63
|
+
/** Timeout for approval (ms) */
|
|
64
|
+
timeoutMs?: number;
|
|
65
|
+
/** Alternative actions available */
|
|
66
|
+
alternatives?: AlternativeAction[];
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* An alternative action that could be taken.
|
|
70
|
+
*/
|
|
71
|
+
export interface AlternativeAction {
|
|
72
|
+
/** Alternative identifier */
|
|
73
|
+
alternativeId: string;
|
|
74
|
+
/** Description of alternative */
|
|
75
|
+
description: string;
|
|
76
|
+
/** Trade-offs of this alternative */
|
|
77
|
+
tradeoffs?: string;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Human's decision on a pending action.
|
|
81
|
+
*/
|
|
82
|
+
export interface ApprovalDecision {
|
|
83
|
+
/** Original action ID */
|
|
84
|
+
actionId: string;
|
|
85
|
+
/** Whether approved */
|
|
86
|
+
approved: boolean;
|
|
87
|
+
/** If rejected, the reason */
|
|
88
|
+
rejectionReason?: string;
|
|
89
|
+
/** If alternative selected, which one */
|
|
90
|
+
selectedAlternativeId?: string;
|
|
91
|
+
/** Human's additional instructions */
|
|
92
|
+
instructions?: string;
|
|
93
|
+
/** Who made the decision */
|
|
94
|
+
decidedBy: string;
|
|
95
|
+
/** Timestamp of decision */
|
|
96
|
+
decidedAt: Date;
|
|
97
|
+
/** Feedback for agent learning */
|
|
98
|
+
feedback?: string;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* A request for clarification from a human.
|
|
102
|
+
*/
|
|
103
|
+
export interface ClarificationRequest {
|
|
104
|
+
/** Unique request identifier */
|
|
105
|
+
requestId: string;
|
|
106
|
+
/** The question needing clarification */
|
|
107
|
+
question: string;
|
|
108
|
+
/** Context for the question */
|
|
109
|
+
context: string;
|
|
110
|
+
/** Agent requesting clarification */
|
|
111
|
+
agentId: string;
|
|
112
|
+
/** Type of clarification needed */
|
|
113
|
+
clarificationType: 'ambiguity' | 'missing_info' | 'preference' | 'verification' | 'guidance';
|
|
114
|
+
/** Suggested options (if multiple choice) */
|
|
115
|
+
options?: ClarificationOption[];
|
|
116
|
+
/** Whether free-form response is allowed */
|
|
117
|
+
allowFreeform: boolean;
|
|
118
|
+
/** Timestamp */
|
|
119
|
+
requestedAt: Date;
|
|
120
|
+
/** Timeout (ms) */
|
|
121
|
+
timeoutMs?: number;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* An option for clarification.
|
|
125
|
+
*/
|
|
126
|
+
export interface ClarificationOption {
|
|
127
|
+
/** Option identifier */
|
|
128
|
+
optionId: string;
|
|
129
|
+
/** Option label */
|
|
130
|
+
label: string;
|
|
131
|
+
/** Option description */
|
|
132
|
+
description?: string;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Human's response to a clarification request.
|
|
136
|
+
*/
|
|
137
|
+
export interface ClarificationResponse {
|
|
138
|
+
/** Original request ID */
|
|
139
|
+
requestId: string;
|
|
140
|
+
/** Selected option ID (if applicable) */
|
|
141
|
+
selectedOptionId?: string;
|
|
142
|
+
/** Free-form response */
|
|
143
|
+
freeformResponse?: string;
|
|
144
|
+
/** Who responded */
|
|
145
|
+
respondedBy: string;
|
|
146
|
+
/** Timestamp */
|
|
147
|
+
respondedAt: Date;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Draft output for human review/editing.
|
|
151
|
+
*/
|
|
152
|
+
export interface DraftOutput {
|
|
153
|
+
/** Draft identifier */
|
|
154
|
+
draftId: string;
|
|
155
|
+
/** Type of content */
|
|
156
|
+
contentType: 'text' | 'code' | 'json' | 'markdown' | 'html';
|
|
157
|
+
/** The draft content */
|
|
158
|
+
content: string;
|
|
159
|
+
/** Agent that generated it */
|
|
160
|
+
agentId: string;
|
|
161
|
+
/** Purpose/context of the output */
|
|
162
|
+
purpose: string;
|
|
163
|
+
/** Specific areas to review */
|
|
164
|
+
reviewFocus?: string[];
|
|
165
|
+
/** Agent's confidence in the output */
|
|
166
|
+
confidence: number;
|
|
167
|
+
/** Timestamp */
|
|
168
|
+
generatedAt: Date;
|
|
169
|
+
/** Timeout (ms) */
|
|
170
|
+
timeoutMs?: number;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Human's edited version of draft output.
|
|
174
|
+
*/
|
|
175
|
+
export interface EditedOutput {
|
|
176
|
+
/** Original draft ID */
|
|
177
|
+
draftId: string;
|
|
178
|
+
/** Edited content */
|
|
179
|
+
editedContent: string;
|
|
180
|
+
/** Whether significant changes were made */
|
|
181
|
+
hasSignificantChanges: boolean;
|
|
182
|
+
/** Summary of changes */
|
|
183
|
+
changeSummary?: string;
|
|
184
|
+
/** Who edited */
|
|
185
|
+
editedBy: string;
|
|
186
|
+
/** Timestamp */
|
|
187
|
+
editedAt: Date;
|
|
188
|
+
/** Feedback for agent improvement */
|
|
189
|
+
feedback?: string;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Context for escalating to human control.
|
|
193
|
+
*/
|
|
194
|
+
export interface EscalationContext {
|
|
195
|
+
/** Escalation identifier */
|
|
196
|
+
escalationId: string;
|
|
197
|
+
/** Reason for escalation */
|
|
198
|
+
reason: EscalationReason;
|
|
199
|
+
/** Detailed explanation */
|
|
200
|
+
explanation: string;
|
|
201
|
+
/** Agent requesting escalation */
|
|
202
|
+
agentId: string;
|
|
203
|
+
/** Current task/goal state */
|
|
204
|
+
currentState: Record<string, unknown>;
|
|
205
|
+
/** What agent has tried so far */
|
|
206
|
+
attemptedActions: string[];
|
|
207
|
+
/** Agent's assessment of the situation */
|
|
208
|
+
assessment: string;
|
|
209
|
+
/** Recommended human actions */
|
|
210
|
+
recommendations?: string[];
|
|
211
|
+
/** Urgency level */
|
|
212
|
+
urgency: 'low' | 'medium' | 'high' | 'critical';
|
|
213
|
+
/** Timestamp */
|
|
214
|
+
escalatedAt: Date;
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Reasons for escalation.
|
|
218
|
+
*/
|
|
219
|
+
export type EscalationReason = 'low_confidence' | 'repeated_failures' | 'ethical_concern' | 'out_of_scope' | 'resource_limit' | 'conflicting_instructions' | 'safety_concern' | 'user_requested' | 'policy_violation' | 'unknown_territory';
|
|
220
|
+
/**
|
|
221
|
+
* Human response to escalation.
|
|
222
|
+
*/
|
|
223
|
+
export type EscalationDecision = {
|
|
224
|
+
type: 'human_takeover';
|
|
225
|
+
instructions?: string;
|
|
226
|
+
} | {
|
|
227
|
+
type: 'agent_continue';
|
|
228
|
+
guidance: string;
|
|
229
|
+
adjustedParameters?: Record<string, unknown>;
|
|
230
|
+
} | {
|
|
231
|
+
type: 'abort';
|
|
232
|
+
reason: string;
|
|
233
|
+
} | {
|
|
234
|
+
type: 'delegate';
|
|
235
|
+
targetAgentId: string;
|
|
236
|
+
instructions: string;
|
|
237
|
+
};
|
|
238
|
+
/**
|
|
239
|
+
* Workflow state for checkpoint review.
|
|
240
|
+
*/
|
|
241
|
+
export interface WorkflowCheckpoint {
|
|
242
|
+
/** Checkpoint identifier */
|
|
243
|
+
checkpointId: string;
|
|
244
|
+
/** Workflow/plan identifier */
|
|
245
|
+
workflowId: string;
|
|
246
|
+
/** Current step/phase */
|
|
247
|
+
currentPhase: string;
|
|
248
|
+
/** Progress (0-1) */
|
|
249
|
+
progress: number;
|
|
250
|
+
/** Summary of work completed */
|
|
251
|
+
completedWork: string[];
|
|
252
|
+
/** Upcoming work */
|
|
253
|
+
upcomingWork: string[];
|
|
254
|
+
/** Any issues or concerns */
|
|
255
|
+
issues: string[];
|
|
256
|
+
/** Agent's notes */
|
|
257
|
+
notes?: string;
|
|
258
|
+
/** Timestamp */
|
|
259
|
+
checkpointAt: Date;
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Human's decision at a checkpoint.
|
|
263
|
+
*/
|
|
264
|
+
export interface CheckpointDecision {
|
|
265
|
+
/** Checkpoint ID */
|
|
266
|
+
checkpointId: string;
|
|
267
|
+
/** Decision */
|
|
268
|
+
decision: 'continue' | 'pause' | 'modify' | 'abort';
|
|
269
|
+
/** Modifications if any */
|
|
270
|
+
modifications?: {
|
|
271
|
+
adjustedGoal?: string;
|
|
272
|
+
skipSteps?: string[];
|
|
273
|
+
addSteps?: string[];
|
|
274
|
+
parameterChanges?: Record<string, unknown>;
|
|
275
|
+
};
|
|
276
|
+
/** Instructions for agent */
|
|
277
|
+
instructions?: string;
|
|
278
|
+
/** Who decided */
|
|
279
|
+
decidedBy: string;
|
|
280
|
+
/** Timestamp */
|
|
281
|
+
decidedAt: Date;
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Human feedback on agent performance.
|
|
285
|
+
*/
|
|
286
|
+
export interface HumanFeedback {
|
|
287
|
+
/** Feedback identifier */
|
|
288
|
+
feedbackId: string;
|
|
289
|
+
/** Agent receiving feedback */
|
|
290
|
+
agentId: string;
|
|
291
|
+
/** Type of feedback */
|
|
292
|
+
feedbackType: 'correction' | 'praise' | 'guidance' | 'preference' | 'complaint';
|
|
293
|
+
/** Specific aspect being addressed */
|
|
294
|
+
aspect: 'accuracy' | 'style' | 'speed' | 'judgment' | 'communication' | 'other';
|
|
295
|
+
/** Detailed feedback */
|
|
296
|
+
content: string;
|
|
297
|
+
/** Severity/importance (1-5) */
|
|
298
|
+
importance: number;
|
|
299
|
+
/** Context of the feedback */
|
|
300
|
+
context?: Record<string, unknown>;
|
|
301
|
+
/** Who provided feedback */
|
|
302
|
+
providedBy: string;
|
|
303
|
+
/** Timestamp */
|
|
304
|
+
providedAt: Date;
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* Statistics about HITL interactions.
|
|
308
|
+
*/
|
|
309
|
+
export interface HITLStatistics {
|
|
310
|
+
/** Total approval requests */
|
|
311
|
+
totalApprovalRequests: number;
|
|
312
|
+
/** Approval rate */
|
|
313
|
+
approvalRate: number;
|
|
314
|
+
/** Total clarifications requested */
|
|
315
|
+
totalClarifications: number;
|
|
316
|
+
/** Average response time (ms) */
|
|
317
|
+
avgResponseTimeMs: number;
|
|
318
|
+
/** Total escalations */
|
|
319
|
+
totalEscalations: number;
|
|
320
|
+
/** Escalations by reason */
|
|
321
|
+
escalationsByReason: Record<EscalationReason, number>;
|
|
322
|
+
/** Pending requests */
|
|
323
|
+
pendingRequests: number;
|
|
324
|
+
/** Timed out requests */
|
|
325
|
+
timedOutRequests: number;
|
|
326
|
+
}
|
|
327
|
+
/**
|
|
328
|
+
* Interface for the AgentOS Human-in-the-Loop Manager.
|
|
329
|
+
*
|
|
330
|
+
* The HITL Manager enables structured collaboration between AI agents
|
|
331
|
+
* and human operators, ensuring human oversight for critical decisions
|
|
332
|
+
* while maintaining efficient autonomous operation.
|
|
333
|
+
*
|
|
334
|
+
* Key capabilities:
|
|
335
|
+
* - **Approval Requests**: Seek human approval for high-risk actions
|
|
336
|
+
* - **Clarification**: Ask humans to resolve ambiguity
|
|
337
|
+
* - **Output Review**: Have humans review and edit agent outputs
|
|
338
|
+
* - **Escalation**: Transfer control when agents are uncertain
|
|
339
|
+
* - **Checkpoints**: Regular human review of ongoing work
|
|
340
|
+
* - **Feedback Loop**: Learn from human corrections
|
|
341
|
+
*
|
|
342
|
+
* @example
|
|
343
|
+
* ```typescript
|
|
344
|
+
* const hitl = new HumanInteractionManager({
|
|
345
|
+
* notificationHandler: async (req) => {
|
|
346
|
+
* // Send to UI/Slack/email
|
|
347
|
+
* await notifyHuman(req);
|
|
348
|
+
* },
|
|
349
|
+
* defaultTimeoutMs: 300000, // 5 minutes
|
|
350
|
+
* });
|
|
351
|
+
*
|
|
352
|
+
* // Register response handler
|
|
353
|
+
* hitl.onApprovalResponse((decision) => {
|
|
354
|
+
* console.log(`Action ${decision.actionId}: ${decision.approved ? 'Approved' : 'Rejected'}`);
|
|
355
|
+
* });
|
|
356
|
+
*
|
|
357
|
+
* // Request approval
|
|
358
|
+
* const decision = await hitl.requestApproval({
|
|
359
|
+
* actionId: 'send-mass-email',
|
|
360
|
+
* description: 'Send promotional email to 10,000 subscribers',
|
|
361
|
+
* severity: 'high',
|
|
362
|
+
* context: { recipientCount: 10000, template: 'promo-q4' },
|
|
363
|
+
* reversible: false,
|
|
364
|
+
* });
|
|
365
|
+
* ```
|
|
366
|
+
*/
|
|
367
|
+
export interface IHumanInteractionManager {
|
|
368
|
+
/**
|
|
369
|
+
* Requests human approval before executing an action.
|
|
370
|
+
*
|
|
371
|
+
* @param action - The action requiring approval
|
|
372
|
+
* @returns Human's approval decision
|
|
373
|
+
*
|
|
374
|
+
* @example
|
|
375
|
+
* ```typescript
|
|
376
|
+
* const decision = await hitl.requestApproval({
|
|
377
|
+
* actionId: 'delete-records',
|
|
378
|
+
* description: 'Delete inactive user accounts older than 2 years',
|
|
379
|
+
* severity: 'high',
|
|
380
|
+
* category: 'data_modification',
|
|
381
|
+
* agentId: 'cleanup-agent',
|
|
382
|
+
* context: { accountCount: 5000, criteria: 'inactive > 2y' },
|
|
383
|
+
* reversible: false,
|
|
384
|
+
* potentialConsequences: ['Data loss', 'User complaints'],
|
|
385
|
+
* });
|
|
386
|
+
* ```
|
|
387
|
+
*/
|
|
388
|
+
requestApproval(action: PendingAction): Promise<ApprovalDecision>;
|
|
389
|
+
/**
|
|
390
|
+
* Submits an approval decision (typically called by UI/webhook handler).
|
|
391
|
+
*
|
|
392
|
+
* @param decision - The approval decision
|
|
393
|
+
*/
|
|
394
|
+
submitApprovalDecision(decision: ApprovalDecision): Promise<void>;
|
|
395
|
+
/**
|
|
396
|
+
* Requests clarification from a human for ambiguous situations.
|
|
397
|
+
*
|
|
398
|
+
* @param request - The clarification request
|
|
399
|
+
* @returns Human's clarification response
|
|
400
|
+
*/
|
|
401
|
+
requestClarification(request: ClarificationRequest): Promise<ClarificationResponse>;
|
|
402
|
+
/**
|
|
403
|
+
* Submits a clarification response.
|
|
404
|
+
*
|
|
405
|
+
* @param response - The clarification response
|
|
406
|
+
*/
|
|
407
|
+
submitClarification(response: ClarificationResponse): Promise<void>;
|
|
408
|
+
/**
|
|
409
|
+
* Requests human review and potential editing of agent output.
|
|
410
|
+
*
|
|
411
|
+
* @param draft - The draft output to review
|
|
412
|
+
* @returns Edited output (may be unchanged)
|
|
413
|
+
*/
|
|
414
|
+
requestEdit(draft: DraftOutput): Promise<EditedOutput>;
|
|
415
|
+
/**
|
|
416
|
+
* Submits an edited output.
|
|
417
|
+
*
|
|
418
|
+
* @param edited - The edited output
|
|
419
|
+
*/
|
|
420
|
+
submitEdit(edited: EditedOutput): Promise<void>;
|
|
421
|
+
/**
|
|
422
|
+
* Escalates a situation to human control.
|
|
423
|
+
*
|
|
424
|
+
* @param context - Escalation context
|
|
425
|
+
* @returns Human's decision on how to proceed
|
|
426
|
+
*/
|
|
427
|
+
escalate(context: EscalationContext): Promise<EscalationDecision>;
|
|
428
|
+
/**
|
|
429
|
+
* Submits an escalation decision.
|
|
430
|
+
*
|
|
431
|
+
* @param escalationId - The escalation identifier
|
|
432
|
+
* @param decision - The human's decision
|
|
433
|
+
*/
|
|
434
|
+
submitEscalationDecision(escalationId: string, decision: EscalationDecision): Promise<void>;
|
|
435
|
+
/**
|
|
436
|
+
* Creates a checkpoint for human review during long-running tasks.
|
|
437
|
+
*
|
|
438
|
+
* @param checkpoint - The checkpoint state
|
|
439
|
+
* @returns Human's checkpoint decision
|
|
440
|
+
*/
|
|
441
|
+
checkpoint(checkpoint: WorkflowCheckpoint): Promise<CheckpointDecision>;
|
|
442
|
+
/**
|
|
443
|
+
* Submits a checkpoint decision.
|
|
444
|
+
*
|
|
445
|
+
* @param decision - The checkpoint decision
|
|
446
|
+
*/
|
|
447
|
+
submitCheckpointDecision(decision: CheckpointDecision): Promise<void>;
|
|
448
|
+
/**
|
|
449
|
+
* Records human feedback for agent improvement.
|
|
450
|
+
*
|
|
451
|
+
* @param feedback - The feedback to record
|
|
452
|
+
*/
|
|
453
|
+
recordFeedback(feedback: HumanFeedback): Promise<void>;
|
|
454
|
+
/**
|
|
455
|
+
* Gets feedback history for an agent.
|
|
456
|
+
*
|
|
457
|
+
* @param agentId - Agent identifier
|
|
458
|
+
* @param options - Query options
|
|
459
|
+
* @returns Feedback history
|
|
460
|
+
*/
|
|
461
|
+
getFeedbackHistory(agentId: string, options?: {
|
|
462
|
+
limit?: number;
|
|
463
|
+
since?: Date;
|
|
464
|
+
type?: HumanFeedback['feedbackType'];
|
|
465
|
+
}): Promise<HumanFeedback[]>;
|
|
466
|
+
/**
|
|
467
|
+
* Gets all pending requests awaiting human response.
|
|
468
|
+
*
|
|
469
|
+
* @returns Pending requests by type
|
|
470
|
+
*/
|
|
471
|
+
getPendingRequests(): Promise<{
|
|
472
|
+
approvals: PendingAction[];
|
|
473
|
+
clarifications: ClarificationRequest[];
|
|
474
|
+
edits: DraftOutput[];
|
|
475
|
+
escalations: EscalationContext[];
|
|
476
|
+
checkpoints: WorkflowCheckpoint[];
|
|
477
|
+
}>;
|
|
478
|
+
/**
|
|
479
|
+
* Cancels a pending request.
|
|
480
|
+
*
|
|
481
|
+
* @param requestId - Request identifier
|
|
482
|
+
* @param reason - Cancellation reason
|
|
483
|
+
*/
|
|
484
|
+
cancelRequest(requestId: string, reason: string): Promise<void>;
|
|
485
|
+
/**
|
|
486
|
+
* Gets HITL interaction statistics.
|
|
487
|
+
*
|
|
488
|
+
* @returns Current statistics
|
|
489
|
+
*/
|
|
490
|
+
getStatistics(): HITLStatistics;
|
|
491
|
+
/**
|
|
492
|
+
* Sets the notification handler for outgoing requests.
|
|
493
|
+
*
|
|
494
|
+
* @param handler - Handler function
|
|
495
|
+
*/
|
|
496
|
+
setNotificationHandler(handler: HITLNotificationHandler): void;
|
|
497
|
+
}
|
|
498
|
+
/**
|
|
499
|
+
* Handler for sending notifications to humans.
|
|
500
|
+
*/
|
|
501
|
+
export type HITLNotificationHandler = (notification: HITLNotification) => Promise<void>;
|
|
502
|
+
/**
|
|
503
|
+
* A notification sent to humans.
|
|
504
|
+
*/
|
|
505
|
+
export interface HITLNotification {
|
|
506
|
+
/** Notification type */
|
|
507
|
+
type: 'approval_required' | 'clarification_needed' | 'edit_requested' | 'escalation' | 'checkpoint';
|
|
508
|
+
/** Request ID */
|
|
509
|
+
requestId: string;
|
|
510
|
+
/** Agent ID */
|
|
511
|
+
agentId: string;
|
|
512
|
+
/** Summary */
|
|
513
|
+
summary: string;
|
|
514
|
+
/** Urgency */
|
|
515
|
+
urgency: 'low' | 'medium' | 'high' | 'critical';
|
|
516
|
+
/** Expiration time */
|
|
517
|
+
expiresAt?: Date;
|
|
518
|
+
/** Deep link to handle the request */
|
|
519
|
+
actionUrl?: string;
|
|
520
|
+
}
|
|
521
|
+
//# sourceMappingURL=IHumanInteractionManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IHumanInteractionManager.d.ts","sourceRoot":"","sources":["../../../src/core/hitl/IHumanInteractionManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAMH;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;AAEpE;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,+BAA+B;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,+CAA+C;IAC/C,WAAW,EAAE,MAAM,CAAC;IACpB,iCAAiC;IACjC,QAAQ,EAAE,cAAc,CAAC;IACzB,yBAAyB;IACzB,QAAQ,CAAC,EAAE,mBAAmB,GAAG,cAAc,GAAG,WAAW,GAAG,eAAe,GAAG,QAAQ,GAAG,OAAO,CAAC;IACrG,gCAAgC;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,uCAAuC;IACvC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,yCAAyC;IACzC,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAC;IACjC,kCAAkC;IAClC,UAAU,EAAE,OAAO,CAAC;IACpB,qCAAqC;IACrC,aAAa,CAAC,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IACrD,sCAAsC;IACtC,WAAW,EAAE,IAAI,CAAC;IAClB,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oCAAoC;IACpC,YAAY,CAAC,EAAE,iBAAiB,EAAE,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,6BAA6B;IAC7B,aAAa,EAAE,MAAM,C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AAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAMhE;;;;OAIG;IACH,aAAa,IAAI,cAAc,CAAC;IAEhC;;;;OAIG;IACH,sBAAsB,CAAC,OAAO,EAAE,uBAAuB,GAAG,IAAI,CAAC;CAChE;AAED;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,CACpC,YAAY,EAAE,gBAAgB,KAC3B,OAAO,CAAC,IAAI,CAAC,CAAC;AAEnB;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,wBAAwB;IACxB,IAAI,EAAE,mBAAmB,GAAG,sBAAsB,GAAG,gBAAgB,GAAG,YAAY,GAAG,YAAY,CAAC;IACpG,iBAAiB;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc;IACd,OAAO,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;IAChD,sBAAsB;IACtB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,sCAAsC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file IHumanInteractionManager.ts
|
|
3
|
+
* @description Interface for Human-in-the-Loop (HITL) interactions in AgentOS.
|
|
4
|
+
* Enables agents to request human approval, input, and collaboration at key decision points.
|
|
5
|
+
*
|
|
6
|
+
* HITL is critical for:
|
|
7
|
+
* - High-stakes decisions requiring human judgment
|
|
8
|
+
* - Ambiguous situations needing clarification
|
|
9
|
+
* - Quality assurance and output review
|
|
10
|
+
* - Learning from human corrections
|
|
11
|
+
*
|
|
12
|
+
* @module AgentOS/HITL
|
|
13
|
+
* @version 1.0.0
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* const hitlManager = new HumanInteractionManager(config);
|
|
18
|
+
*
|
|
19
|
+
* // Request approval before critical action
|
|
20
|
+
* const approval = await hitlManager.requestApproval({
|
|
21
|
+
* actionId: 'delete-all-records',
|
|
22
|
+
* description: 'Delete all customer records from database',
|
|
23
|
+
* severity: 'critical',
|
|
24
|
+
* context: { recordCount: 50000 },
|
|
25
|
+
* });
|
|
26
|
+
*
|
|
27
|
+
* if (approval.approved) {
|
|
28
|
+
* await executeAction();
|
|
29
|
+
* }
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=IHumanInteractionManager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IHumanInteractionManager.js","sourceRoot":"","sources":["../../../src/core/hitl/IHumanInteractionManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file HITL Module Index
|
|
3
|
+
* @description Human-in-the-Loop (HITL) module exports for AgentOS.
|
|
4
|
+
*
|
|
5
|
+
* The HITL module enables structured collaboration between AI agents
|
|
6
|
+
* and human operators for:
|
|
7
|
+
* - Approval of high-risk actions
|
|
8
|
+
* - Clarification of ambiguous situations
|
|
9
|
+
* - Review and editing of outputs
|
|
10
|
+
* - Escalation handling
|
|
11
|
+
* - Workflow checkpoints
|
|
12
|
+
*
|
|
13
|
+
* @module AgentOS/HITL
|
|
14
|
+
*/
|
|
15
|
+
export type { IHumanInteractionManager, PendingAction, ApprovalDecision, ActionSeverity, AlternativeAction, ClarificationRequest, ClarificationResponse, ClarificationOption, DraftOutput, EditedOutput, EscalationContext, EscalationDecision, EscalationReason, WorkflowCheckpoint, CheckpointDecision, HumanFeedback, HITLStatistics, HITLNotificationHandler, HITLNotification, } from './IHumanInteractionManager';
|
|
16
|
+
export { HumanInteractionManager, type HumanInteractionManagerConfig, } from './HumanInteractionManager';
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/hitl/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,YAAY,EACV,wBAAwB,EACxB,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,WAAW,EACX,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,EACb,cAAc,EACd,uBAAuB,EACvB,gBAAgB,GACjB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EACL,uBAAuB,EACvB,KAAK,6BAA6B,GACnC,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file HITL Module Index
|
|
3
|
+
* @description Human-in-the-Loop (HITL) module exports for AgentOS.
|
|
4
|
+
*
|
|
5
|
+
* The HITL module enables structured collaboration between AI agents
|
|
6
|
+
* and human operators for:
|
|
7
|
+
* - Approval of high-risk actions
|
|
8
|
+
* - Clarification of ambiguous situations
|
|
9
|
+
* - Review and editing of outputs
|
|
10
|
+
* - Escalation handling
|
|
11
|
+
* - Workflow checkpoints
|
|
12
|
+
*
|
|
13
|
+
* @module AgentOS/HITL
|
|
14
|
+
*/
|
|
15
|
+
// Implementation
|
|
16
|
+
export { HumanInteractionManager, } from './HumanInteractionManager.js';
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/hitl/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAyBH,iBAAiB;AACjB,OAAO,EACL,uBAAuB,GAExB,MAAM,2BAA2B,CAAC"}
|