@lingxiao-office/sdk 1.0.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/dist/agents/AgentCompletionNoteWriter.d.ts +20 -0
- package/dist/agents/AgentCompletionNoteWriter.d.ts.map +1 -0
- package/dist/agents/AgentCompletionNoteWriter.js +26 -0
- package/dist/agents/AgentCompletionNoteWriter.js.map +1 -0
- package/dist/agents/AgentContextController.d.ts +14 -0
- package/dist/agents/AgentContextController.d.ts.map +1 -0
- package/dist/agents/AgentContextController.js +50 -0
- package/dist/agents/AgentContextController.js.map +1 -0
- package/dist/agents/AgentDefinitionService.d.ts +79 -0
- package/dist/agents/AgentDefinitionService.d.ts.map +1 -0
- package/dist/agents/AgentDefinitionService.js +295 -0
- package/dist/agents/AgentDefinitionService.js.map +1 -0
- package/dist/agents/AgentExecutionResult.d.ts +68 -0
- package/dist/agents/AgentExecutionResult.d.ts.map +1 -0
- package/dist/agents/AgentExecutionResult.js +81 -0
- package/dist/agents/AgentExecutionResult.js.map +1 -0
- package/dist/agents/AgentInterventionHandler.d.ts +33 -0
- package/dist/agents/AgentInterventionHandler.d.ts.map +1 -0
- package/dist/agents/AgentInterventionHandler.js +58 -0
- package/dist/agents/AgentInterventionHandler.js.map +1 -0
- package/dist/agents/AgentMessageHistory.d.ts +27 -0
- package/dist/agents/AgentMessageHistory.d.ts.map +1 -0
- package/dist/agents/AgentMessageHistory.js +43 -0
- package/dist/agents/AgentMessageHistory.js.map +1 -0
- package/dist/agents/AgentPoolRuntime.d.ts +647 -0
- package/dist/agents/AgentPoolRuntime.d.ts.map +1 -0
- package/dist/agents/AgentPoolRuntime.js +1713 -0
- package/dist/agents/AgentPoolRuntime.js.map +1 -0
- package/dist/agents/AgentRoundExecutor.d.ts +56 -0
- package/dist/agents/AgentRoundExecutor.d.ts.map +1 -0
- package/dist/agents/AgentRoundExecutor.js +116 -0
- package/dist/agents/AgentRoundExecutor.js.map +1 -0
- package/dist/agents/AgentRuntimeUtilities.d.ts +14 -0
- package/dist/agents/AgentRuntimeUtilities.d.ts.map +1 -0
- package/dist/agents/AgentRuntimeUtilities.js +169 -0
- package/dist/agents/AgentRuntimeUtilities.js.map +1 -0
- package/dist/agents/AutonomyDecisionEngine.d.ts +20 -0
- package/dist/agents/AutonomyDecisionEngine.d.ts.map +1 -0
- package/dist/agents/AutonomyDecisionEngine.js +150 -0
- package/dist/agents/AutonomyDecisionEngine.js.map +1 -0
- package/dist/agents/BaseAgentRuntime.d.ts +509 -0
- package/dist/agents/BaseAgentRuntime.d.ts.map +1 -0
- package/dist/agents/BaseAgentRuntime.js +3280 -0
- package/dist/agents/BaseAgentRuntime.js.map +1 -0
- package/dist/agents/BlockedAgingPolicy.d.ts +3 -0
- package/dist/agents/BlockedAgingPolicy.d.ts.map +1 -0
- package/dist/agents/BlockedAgingPolicy.js +3 -0
- package/dist/agents/BlockedAgingPolicy.js.map +1 -0
- package/dist/agents/DispatchDecisionCoordinator.d.ts +98 -0
- package/dist/agents/DispatchDecisionCoordinator.d.ts.map +1 -0
- package/dist/agents/DispatchDecisionCoordinator.js +388 -0
- package/dist/agents/DispatchDecisionCoordinator.js.map +1 -0
- package/dist/agents/IntentClassifier.d.ts +19 -0
- package/dist/agents/IntentClassifier.d.ts.map +1 -0
- package/dist/agents/IntentClassifier.js +176 -0
- package/dist/agents/IntentClassifier.js.map +1 -0
- package/dist/agents/LeaderAgent.d.ts +752 -0
- package/dist/agents/LeaderAgent.d.ts.map +1 -0
- package/dist/agents/LeaderAgent.js +3511 -0
- package/dist/agents/LeaderAgent.js.map +1 -0
- package/dist/agents/LeaderBlackboard.d.ts +177 -0
- package/dist/agents/LeaderBlackboard.d.ts.map +1 -0
- package/dist/agents/LeaderBlackboard.js +800 -0
- package/dist/agents/LeaderBlackboard.js.map +1 -0
- package/dist/agents/LeaderDirectTools.d.ts +66 -0
- package/dist/agents/LeaderDirectTools.d.ts.map +1 -0
- package/dist/agents/LeaderDirectTools.js +124 -0
- package/dist/agents/LeaderDirectTools.js.map +1 -0
- package/dist/agents/LeaderExecutionController.d.ts +102 -0
- package/dist/agents/LeaderExecutionController.d.ts.map +1 -0
- package/dist/agents/LeaderExecutionController.js +260 -0
- package/dist/agents/LeaderExecutionController.js.map +1 -0
- package/dist/agents/LeaderPermissionManager.d.ts +117 -0
- package/dist/agents/LeaderPermissionManager.d.ts.map +1 -0
- package/dist/agents/LeaderPermissionManager.js +455 -0
- package/dist/agents/LeaderPermissionManager.js.map +1 -0
- package/dist/agents/LeaderProgressInvariant.d.ts +174 -0
- package/dist/agents/LeaderProgressInvariant.d.ts.map +1 -0
- package/dist/agents/LeaderProgressInvariant.js +479 -0
- package/dist/agents/LeaderProgressInvariant.js.map +1 -0
- package/dist/agents/LeaderSupervisionCoordinator.d.ts +109 -0
- package/dist/agents/LeaderSupervisionCoordinator.d.ts.map +1 -0
- package/dist/agents/LeaderSupervisionCoordinator.js +492 -0
- package/dist/agents/LeaderSupervisionCoordinator.js.map +1 -0
- package/dist/agents/LeaderSupervisionPolicy.d.ts +52 -0
- package/dist/agents/LeaderSupervisionPolicy.d.ts.map +1 -0
- package/dist/agents/LeaderSupervisionPolicy.js +130 -0
- package/dist/agents/LeaderSupervisionPolicy.js.map +1 -0
- package/dist/agents/LeaderTools.d.ts +169 -0
- package/dist/agents/LeaderTools.d.ts.map +1 -0
- package/dist/agents/LeaderTools.js +1693 -0
- package/dist/agents/LeaderTools.js.map +1 -0
- package/dist/agents/LeaderWorkOrchestrator.d.ts +187 -0
- package/dist/agents/LeaderWorkOrchestrator.d.ts.map +1 -0
- package/dist/agents/LeaderWorkOrchestrator.js +554 -0
- package/dist/agents/LeaderWorkOrchestrator.js.map +1 -0
- package/dist/agents/LlmGuard.d.ts +160 -0
- package/dist/agents/LlmGuard.d.ts.map +1 -0
- package/dist/agents/LlmGuard.js +727 -0
- package/dist/agents/LlmGuard.js.map +1 -0
- package/dist/agents/OrchestrationRuntime.d.ts +50 -0
- package/dist/agents/OrchestrationRuntime.d.ts.map +1 -0
- package/dist/agents/OrchestrationRuntime.js +436 -0
- package/dist/agents/OrchestrationRuntime.js.map +1 -0
- package/dist/agents/ProjectControlService.d.ts +18 -0
- package/dist/agents/ProjectControlService.d.ts.map +1 -0
- package/dist/agents/ProjectControlService.js +99 -0
- package/dist/agents/ProjectControlService.js.map +1 -0
- package/dist/agents/RoleCapabilityModel.d.ts +125 -0
- package/dist/agents/RoleCapabilityModel.d.ts.map +1 -0
- package/dist/agents/RoleCapabilityModel.js +303 -0
- package/dist/agents/RoleCapabilityModel.js.map +1 -0
- package/dist/agents/RoleRegistry.d.ts +92 -0
- package/dist/agents/RoleRegistry.d.ts.map +1 -0
- package/dist/agents/RoleRegistry.js +209 -0
- package/dist/agents/RoleRegistry.js.map +1 -0
- package/dist/agents/TaskClassifier.d.ts +34 -0
- package/dist/agents/TaskClassifier.d.ts.map +1 -0
- package/dist/agents/TaskClassifier.js +132 -0
- package/dist/agents/TaskClassifier.js.map +1 -0
- package/dist/agents/TeamSynchronizer.d.ts +113 -0
- package/dist/agents/TeamSynchronizer.d.ts.map +1 -0
- package/dist/agents/TeamSynchronizer.js +250 -0
- package/dist/agents/TeamSynchronizer.js.map +1 -0
- package/dist/agents/UnifiedScheduler.d.ts +111 -0
- package/dist/agents/UnifiedScheduler.d.ts.map +1 -0
- package/dist/agents/UnifiedScheduler.js +246 -0
- package/dist/agents/UnifiedScheduler.js.map +1 -0
- package/dist/agents/WorkerDbClosedClassification.d.ts +51 -0
- package/dist/agents/WorkerDbClosedClassification.d.ts.map +1 -0
- package/dist/agents/WorkerDbClosedClassification.js +59 -0
- package/dist/agents/WorkerDbClosedClassification.js.map +1 -0
- package/dist/agents/WorkerFlushRegistry.d.ts +15 -0
- package/dist/agents/WorkerFlushRegistry.d.ts.map +1 -0
- package/dist/agents/WorkerFlushRegistry.js +33 -0
- package/dist/agents/WorkerFlushRegistry.js.map +1 -0
- package/dist/agents/WorkerProcessEntry.d.ts +12 -0
- package/dist/agents/WorkerProcessEntry.d.ts.map +1 -0
- package/dist/agents/WorkerProcessEntry.js +565 -0
- package/dist/agents/WorkerProcessEntry.js.map +1 -0
- package/dist/agents/WorkerTaskAgent.d.ts +46 -0
- package/dist/agents/WorkerTaskAgent.d.ts.map +1 -0
- package/dist/agents/WorkerTaskAgent.js +114 -0
- package/dist/agents/WorkerTaskAgent.js.map +1 -0
- package/dist/agents/agentP0Message.d.ts +42 -0
- package/dist/agents/agentP0Message.d.ts.map +1 -0
- package/dist/agents/agentP0Message.js +48 -0
- package/dist/agents/agentP0Message.js.map +1 -0
- package/dist/agents/errors/TimeoutError.d.ts +12 -0
- package/dist/agents/errors/TimeoutError.d.ts.map +1 -0
- package/dist/agents/errors/TimeoutError.js +20 -0
- package/dist/agents/errors/TimeoutError.js.map +1 -0
- package/dist/agents/external/ExternalAgentOrphans.d.ts +16 -0
- package/dist/agents/external/ExternalAgentOrphans.d.ts.map +1 -0
- package/dist/agents/external/ExternalAgentOrphans.js +95 -0
- package/dist/agents/external/ExternalAgentOrphans.js.map +1 -0
- package/dist/agents/external/ExternalAgentRunner.d.ts +78 -0
- package/dist/agents/external/ExternalAgentRunner.d.ts.map +1 -0
- package/dist/agents/external/ExternalAgentRunner.js +671 -0
- package/dist/agents/external/ExternalAgentRunner.js.map +1 -0
- package/dist/agents/external/availability.d.ts +16 -0
- package/dist/agents/external/availability.d.ts.map +1 -0
- package/dist/agents/external/availability.js +43 -0
- package/dist/agents/external/availability.js.map +1 -0
- package/dist/agents/external/completionReport.d.ts +17 -0
- package/dist/agents/external/completionReport.d.ts.map +1 -0
- package/dist/agents/external/completionReport.js +167 -0
- package/dist/agents/external/completionReport.js.map +1 -0
- package/dist/agents/external/drivers/ClaudeCodeDriver.d.ts +9 -0
- package/dist/agents/external/drivers/ClaudeCodeDriver.d.ts.map +1 -0
- package/dist/agents/external/drivers/ClaudeCodeDriver.js +210 -0
- package/dist/agents/external/drivers/ClaudeCodeDriver.js.map +1 -0
- package/dist/agents/external/drivers/CodexDriver.d.ts +9 -0
- package/dist/agents/external/drivers/CodexDriver.d.ts.map +1 -0
- package/dist/agents/external/drivers/CodexDriver.js +184 -0
- package/dist/agents/external/drivers/CodexDriver.js.map +1 -0
- package/dist/agents/external/lineReader.d.ts +10 -0
- package/dist/agents/external/lineReader.d.ts.map +1 -0
- package/dist/agents/external/lineReader.js +30 -0
- package/dist/agents/external/lineReader.js.map +1 -0
- package/dist/agents/external/modelResolver.d.ts +5 -0
- package/dist/agents/external/modelResolver.d.ts.map +1 -0
- package/dist/agents/external/modelResolver.js +87 -0
- package/dist/agents/external/modelResolver.js.map +1 -0
- package/dist/agents/external/promptBuilder.d.ts +3 -0
- package/dist/agents/external/promptBuilder.d.ts.map +1 -0
- package/dist/agents/external/promptBuilder.js +39 -0
- package/dist/agents/external/promptBuilder.js.map +1 -0
- package/dist/agents/external/types.d.ts +131 -0
- package/dist/agents/external/types.d.ts.map +1 -0
- package/dist/agents/external/types.js +2 -0
- package/dist/agents/external/types.js.map +1 -0
- package/dist/agents/leader/LeaderContextBuilder.d.ts +155 -0
- package/dist/agents/leader/LeaderContextBuilder.d.ts.map +1 -0
- package/dist/agents/leader/LeaderContextBuilder.js +629 -0
- package/dist/agents/leader/LeaderContextBuilder.js.map +1 -0
- package/dist/agents/leader/LeaderLlmSession.d.ts +11 -0
- package/dist/agents/leader/LeaderLlmSession.d.ts.map +1 -0
- package/dist/agents/leader/LeaderLlmSession.js +17 -0
- package/dist/agents/leader/LeaderLlmSession.js.map +1 -0
- package/dist/agents/leader/LeaderMetaToolRegistry.d.ts +15 -0
- package/dist/agents/leader/LeaderMetaToolRegistry.d.ts.map +1 -0
- package/dist/agents/leader/LeaderMetaToolRegistry.js +73 -0
- package/dist/agents/leader/LeaderMetaToolRegistry.js.map +1 -0
- package/dist/agents/leader/LeaderStreamBuffer.d.ts +15 -0
- package/dist/agents/leader/LeaderStreamBuffer.d.ts.map +1 -0
- package/dist/agents/leader/LeaderStreamBuffer.js +19 -0
- package/dist/agents/leader/LeaderStreamBuffer.js.map +1 -0
- package/dist/agents/leader/LeaderThinkingLoop.d.ts +239 -0
- package/dist/agents/leader/LeaderThinkingLoop.d.ts.map +1 -0
- package/dist/agents/leader/LeaderThinkingLoop.js +950 -0
- package/dist/agents/leader/LeaderThinkingLoop.js.map +1 -0
- package/dist/agents/leader/LeaderToolDispatch.d.ts +48 -0
- package/dist/agents/leader/LeaderToolDispatch.d.ts.map +1 -0
- package/dist/agents/leader/LeaderToolDispatch.js +337 -0
- package/dist/agents/leader/LeaderToolDispatch.js.map +1 -0
- package/dist/agents/leader/LeaderToolFailure.d.ts +22 -0
- package/dist/agents/leader/LeaderToolFailure.d.ts.map +1 -0
- package/dist/agents/leader/LeaderToolFailure.js +25 -0
- package/dist/agents/leader/LeaderToolFailure.js.map +1 -0
- package/dist/agents/leader/LeaderToolGates.d.ts +131 -0
- package/dist/agents/leader/LeaderToolGates.d.ts.map +1 -0
- package/dist/agents/leader/LeaderToolGates.js +290 -0
- package/dist/agents/leader/LeaderToolGates.js.map +1 -0
- package/dist/agents/leader/artifactContent.d.ts +38 -0
- package/dist/agents/leader/artifactContent.d.ts.map +1 -0
- package/dist/agents/leader/artifactContent.js +101 -0
- package/dist/agents/leader/artifactContent.js.map +1 -0
- package/dist/agents/leader/builtinRoles.d.ts +36 -0
- package/dist/agents/leader/builtinRoles.d.ts.map +1 -0
- package/dist/agents/leader/builtinRoles.js +41 -0
- package/dist/agents/leader/builtinRoles.js.map +1 -0
- package/dist/agents/leader/contextLimit.d.ts +25 -0
- package/dist/agents/leader/contextLimit.d.ts.map +1 -0
- package/dist/agents/leader/contextLimit.js +24 -0
- package/dist/agents/leader/contextLimit.js.map +1 -0
- package/dist/agents/leader/contextMemory.d.ts +19 -0
- package/dist/agents/leader/contextMemory.d.ts.map +1 -0
- package/dist/agents/leader/contextMemory.js +18 -0
- package/dist/agents/leader/contextMemory.js.map +1 -0
- package/dist/agents/leader/conversationBuffer.d.ts +23 -0
- package/dist/agents/leader/conversationBuffer.d.ts.map +1 -0
- package/dist/agents/leader/conversationBuffer.js +42 -0
- package/dist/agents/leader/conversationBuffer.js.map +1 -0
- package/dist/agents/leader/dynamicContext.d.ts +23 -0
- package/dist/agents/leader/dynamicContext.d.ts.map +1 -0
- package/dist/agents/leader/dynamicContext.js +51 -0
- package/dist/agents/leader/dynamicContext.js.map +1 -0
- package/dist/agents/leader/p0Message.d.ts +154 -0
- package/dist/agents/leader/p0Message.d.ts.map +1 -0
- package/dist/agents/leader/p0Message.js +229 -0
- package/dist/agents/leader/p0Message.js.map +1 -0
- package/dist/agents/leader/progressReport.d.ts +33 -0
- package/dist/agents/leader/progressReport.d.ts.map +1 -0
- package/dist/agents/leader/progressReport.js +59 -0
- package/dist/agents/leader/progressReport.js.map +1 -0
- package/dist/agents/leader/systemPrompt.d.ts +32 -0
- package/dist/agents/leader/systemPrompt.d.ts.map +1 -0
- package/dist/agents/leader/systemPrompt.js +32 -0
- package/dist/agents/leader/systemPrompt.js.map +1 -0
- package/dist/agents/leader/tools/LeaderAgentControlTools.d.ts +62 -0
- package/dist/agents/leader/tools/LeaderAgentControlTools.d.ts.map +1 -0
- package/dist/agents/leader/tools/LeaderAgentControlTools.js +619 -0
- package/dist/agents/leader/tools/LeaderAgentControlTools.js.map +1 -0
- package/dist/agents/leader/tools/LeaderTaskPlanningTools.d.ts +54 -0
- package/dist/agents/leader/tools/LeaderTaskPlanningTools.d.ts.map +1 -0
- package/dist/agents/leader/tools/LeaderTaskPlanningTools.js +1353 -0
- package/dist/agents/leader/tools/LeaderTaskPlanningTools.js.map +1 -0
- package/dist/agents/leader/userContent.d.ts +15 -0
- package/dist/agents/leader/userContent.d.ts.map +1 -0
- package/dist/agents/leader/userContent.js +50 -0
- package/dist/agents/leader/userContent.js.map +1 -0
- package/dist/agents/leader/workerCompletionFormatter.d.ts +48 -0
- package/dist/agents/leader/workerCompletionFormatter.d.ts.map +1 -0
- package/dist/agents/leader/workerCompletionFormatter.js +53 -0
- package/dist/agents/leader/workerCompletionFormatter.js.map +1 -0
- package/dist/agents/messageMemoryBudget.d.ts +41 -0
- package/dist/agents/messageMemoryBudget.d.ts.map +1 -0
- package/dist/agents/messageMemoryBudget.js +91 -0
- package/dist/agents/messageMemoryBudget.js.map +1 -0
- package/dist/agents/office/OfficeModeProtocol.d.ts +3 -0
- package/dist/agents/office/OfficeModeProtocol.d.ts.map +1 -0
- package/dist/agents/office/OfficeModeProtocol.js +111 -0
- package/dist/agents/office/OfficeModeProtocol.js.map +1 -0
- package/dist/agents/pool/AgentPoolBroadcast.d.ts +25 -0
- package/dist/agents/pool/AgentPoolBroadcast.d.ts.map +1 -0
- package/dist/agents/pool/AgentPoolBroadcast.js +88 -0
- package/dist/agents/pool/AgentPoolBroadcast.js.map +1 -0
- package/dist/agents/pool/AgentPoolCompletionPayload.d.ts +17 -0
- package/dist/agents/pool/AgentPoolCompletionPayload.d.ts.map +1 -0
- package/dist/agents/pool/AgentPoolCompletionPayload.js +2 -0
- package/dist/agents/pool/AgentPoolCompletionPayload.js.map +1 -0
- package/dist/agents/pool/AgentPoolEvents.d.ts +20 -0
- package/dist/agents/pool/AgentPoolEvents.d.ts.map +1 -0
- package/dist/agents/pool/AgentPoolEvents.js +35 -0
- package/dist/agents/pool/AgentPoolEvents.js.map +1 -0
- package/dist/agents/pool/FaultRecovery.d.ts +106 -0
- package/dist/agents/pool/FaultRecovery.d.ts.map +1 -0
- package/dist/agents/pool/FaultRecovery.js +290 -0
- package/dist/agents/pool/FaultRecovery.js.map +1 -0
- package/dist/agents/pool/RemoteDispatchCoordinator.d.ts +63 -0
- package/dist/agents/pool/RemoteDispatchCoordinator.d.ts.map +1 -0
- package/dist/agents/pool/RemoteDispatchCoordinator.js +127 -0
- package/dist/agents/pool/RemoteDispatchCoordinator.js.map +1 -0
- package/dist/agents/pool/SlotScheduler.d.ts +83 -0
- package/dist/agents/pool/SlotScheduler.d.ts.map +1 -0
- package/dist/agents/pool/SlotScheduler.js +292 -0
- package/dist/agents/pool/SlotScheduler.js.map +1 -0
- package/dist/agents/pool/WorkerEventHandlerBinder.d.ts +133 -0
- package/dist/agents/pool/WorkerEventHandlerBinder.d.ts.map +1 -0
- package/dist/agents/pool/WorkerEventHandlerBinder.js +668 -0
- package/dist/agents/pool/WorkerEventHandlerBinder.js.map +1 -0
- package/dist/agents/pool/WorkerLifecycle.d.ts +68 -0
- package/dist/agents/pool/WorkerLifecycle.d.ts.map +1 -0
- package/dist/agents/pool/WorkerLifecycle.js +99 -0
- package/dist/agents/pool/WorkerLifecycle.js.map +1 -0
- package/dist/agents/pool/WorkerPayloadBuilder.d.ts +46 -0
- package/dist/agents/pool/WorkerPayloadBuilder.d.ts.map +1 -0
- package/dist/agents/pool/WorkerPayloadBuilder.js +294 -0
- package/dist/agents/pool/WorkerPayloadBuilder.js.map +1 -0
- package/dist/agents/prompts/PromptTemplates.d.ts +59 -0
- package/dist/agents/prompts/PromptTemplates.d.ts.map +1 -0
- package/dist/agents/prompts/PromptTemplates.js +223 -0
- package/dist/agents/prompts/PromptTemplates.js.map +1 -0
- package/dist/agents/prompts/architect_system.d.ts +30 -0
- package/dist/agents/prompts/architect_system.d.ts.map +1 -0
- package/dist/agents/prompts/architect_system.js +95 -0
- package/dist/agents/prompts/architect_system.js.map +1 -0
- package/dist/agents/prompts/backend_system.d.ts +5 -0
- package/dist/agents/prompts/backend_system.d.ts.map +1 -0
- package/dist/agents/prompts/backend_system.js +64 -0
- package/dist/agents/prompts/backend_system.js.map +1 -0
- package/dist/agents/prompts/evaluator_system.d.ts +5 -0
- package/dist/agents/prompts/evaluator_system.d.ts.map +1 -0
- package/dist/agents/prompts/evaluator_system.js +67 -0
- package/dist/agents/prompts/evaluator_system.js.map +1 -0
- package/dist/agents/prompts/frontend_system.d.ts +5 -0
- package/dist/agents/prompts/frontend_system.d.ts.map +1 -0
- package/dist/agents/prompts/frontend_system.js +66 -0
- package/dist/agents/prompts/frontend_system.js.map +1 -0
- package/dist/agents/prompts/fullstack_system.d.ts +5 -0
- package/dist/agents/prompts/fullstack_system.d.ts.map +1 -0
- package/dist/agents/prompts/fullstack_system.js +64 -0
- package/dist/agents/prompts/fullstack_system.js.map +1 -0
- package/dist/agents/prompts/i18n/catalog.d.ts +172 -0
- package/dist/agents/prompts/i18n/catalog.d.ts.map +1 -0
- package/dist/agents/prompts/i18n/catalog.js +498 -0
- package/dist/agents/prompts/i18n/catalog.js.map +1 -0
- package/dist/agents/prompts/i18n/leader_system_prompt.d.ts +6 -0
- package/dist/agents/prompts/i18n/leader_system_prompt.d.ts.map +1 -0
- package/dist/agents/prompts/i18n/leader_system_prompt.js +909 -0
- package/dist/agents/prompts/i18n/leader_system_prompt.js.map +1 -0
- package/dist/agents/prompts/i18n/userIntentLabels.d.ts +10 -0
- package/dist/agents/prompts/i18n/userIntentLabels.d.ts.map +1 -0
- package/dist/agents/prompts/i18n/userIntentLabels.js +21 -0
- package/dist/agents/prompts/i18n/userIntentLabels.js.map +1 -0
- package/dist/agents/prompts/leader/system_prompt.d.ts +6 -0
- package/dist/agents/prompts/leader/system_prompt.d.ts.map +1 -0
- package/dist/agents/prompts/leader/system_prompt.js +8 -0
- package/dist/agents/prompts/leader/system_prompt.js.map +1 -0
- package/dist/agents/prompts/planner_system.d.ts +5 -0
- package/dist/agents/prompts/planner_system.d.ts.map +1 -0
- package/dist/agents/prompts/planner_system.js +69 -0
- package/dist/agents/prompts/planner_system.js.map +1 -0
- package/dist/agents/prompts/qa_system.d.ts +5 -0
- package/dist/agents/prompts/qa_system.d.ts.map +1 -0
- package/dist/agents/prompts/qa_system.js +57 -0
- package/dist/agents/prompts/qa_system.js.map +1 -0
- package/dist/agents/prompts/shared/fragments.d.ts +54 -0
- package/dist/agents/prompts/shared/fragments.d.ts.map +1 -0
- package/dist/agents/prompts/shared/fragments.js +222 -0
- package/dist/agents/prompts/shared/fragments.js.map +1 -0
- package/dist/agents/prompts/shared/prompt_builder.d.ts +6 -0
- package/dist/agents/prompts/shared/prompt_builder.d.ts.map +1 -0
- package/dist/agents/prompts/shared/prompt_builder.js +17 -0
- package/dist/agents/prompts/shared/prompt_builder.js.map +1 -0
- package/dist/agents/prompts/task-runtime/thinking_instruction.d.ts +2 -0
- package/dist/agents/prompts/task-runtime/thinking_instruction.d.ts.map +1 -0
- package/dist/agents/prompts/task-runtime/thinking_instruction.js +37 -0
- package/dist/agents/prompts/task-runtime/thinking_instruction.js.map +1 -0
- package/dist/agents/prompts/task-runtime/worker_task_prompt.d.ts +42 -0
- package/dist/agents/prompts/task-runtime/worker_task_prompt.d.ts.map +1 -0
- package/dist/agents/prompts/task-runtime/worker_task_prompt.js +181 -0
- package/dist/agents/prompts/task-runtime/worker_task_prompt.js.map +1 -0
- package/dist/agents/prompts/ux_designer_system.d.ts +5 -0
- package/dist/agents/prompts/ux_designer_system.d.ts.map +1 -0
- package/dist/agents/prompts/ux_designer_system.js +60 -0
- package/dist/agents/prompts/ux_designer_system.js.map +1 -0
- package/dist/agents/prompts/worker/system_prompts.d.ts +22 -0
- package/dist/agents/prompts/worker/system_prompts.d.ts.map +1 -0
- package/dist/agents/prompts/worker/system_prompts.js +313 -0
- package/dist/agents/prompts/worker/system_prompts.js.map +1 -0
- package/dist/agents/raw_tool_calls.d.ts +15 -0
- package/dist/agents/raw_tool_calls.d.ts.map +1 -0
- package/dist/agents/raw_tool_calls.js +273 -0
- package/dist/agents/raw_tool_calls.js.map +1 -0
- package/dist/agents/runtime/AgentCore.d.ts +13 -0
- package/dist/agents/runtime/AgentCore.d.ts.map +1 -0
- package/dist/agents/runtime/AgentCore.js +19 -0
- package/dist/agents/runtime/AgentCore.js.map +1 -0
- package/dist/agents/runtime/AgentInboxParsers.d.ts +46 -0
- package/dist/agents/runtime/AgentInboxParsers.d.ts.map +1 -0
- package/dist/agents/runtime/AgentInboxParsers.js +152 -0
- package/dist/agents/runtime/AgentInboxParsers.js.map +1 -0
- package/dist/agents/runtime/AgentRuntimeState.d.ts +36 -0
- package/dist/agents/runtime/AgentRuntimeState.d.ts.map +1 -0
- package/dist/agents/runtime/AgentRuntimeState.js +68 -0
- package/dist/agents/runtime/AgentRuntimeState.js.map +1 -0
- package/dist/agents/runtime/CompletionTerminationPolicy.d.ts +15 -0
- package/dist/agents/runtime/CompletionTerminationPolicy.d.ts.map +1 -0
- package/dist/agents/runtime/CompletionTerminationPolicy.js +18 -0
- package/dist/agents/runtime/CompletionTerminationPolicy.js.map +1 -0
- package/dist/agents/runtime/EternalPatrolJudge.d.ts +23 -0
- package/dist/agents/runtime/EternalPatrolJudge.d.ts.map +1 -0
- package/dist/agents/runtime/EternalPatrolJudge.js +114 -0
- package/dist/agents/runtime/EternalPatrolJudge.js.map +1 -0
- package/dist/agents/runtime/LlmRoundExecutor.d.ts +55 -0
- package/dist/agents/runtime/LlmRoundExecutor.d.ts.map +1 -0
- package/dist/agents/runtime/LlmRoundExecutor.js +382 -0
- package/dist/agents/runtime/LlmRoundExecutor.js.map +1 -0
- package/dist/agents/runtime/LlmStreamHooks.d.ts +59 -0
- package/dist/agents/runtime/LlmStreamHooks.d.ts.map +1 -0
- package/dist/agents/runtime/LlmStreamHooks.js +140 -0
- package/dist/agents/runtime/LlmStreamHooks.js.map +1 -0
- package/dist/agents/runtime/MandatoryVerification.d.ts +23 -0
- package/dist/agents/runtime/MandatoryVerification.d.ts.map +1 -0
- package/dist/agents/runtime/MandatoryVerification.js +108 -0
- package/dist/agents/runtime/MandatoryVerification.js.map +1 -0
- package/dist/agents/runtime/NextSpeakerPolicy.d.ts +53 -0
- package/dist/agents/runtime/NextSpeakerPolicy.d.ts.map +1 -0
- package/dist/agents/runtime/NextSpeakerPolicy.js +162 -0
- package/dist/agents/runtime/NextSpeakerPolicy.js.map +1 -0
- package/dist/agents/runtime/ReasoningLoopDriver.d.ts +32 -0
- package/dist/agents/runtime/ReasoningLoopDriver.d.ts.map +1 -0
- package/dist/agents/runtime/ReasoningLoopDriver.js +58 -0
- package/dist/agents/runtime/ReasoningLoopDriver.js.map +1 -0
- package/dist/agents/runtime/StreamChunkBuffer.d.ts +45 -0
- package/dist/agents/runtime/StreamChunkBuffer.d.ts.map +1 -0
- package/dist/agents/runtime/StreamChunkBuffer.js +57 -0
- package/dist/agents/runtime/StreamChunkBuffer.js.map +1 -0
- package/dist/agents/runtime/ToolCallSafety.d.ts +42 -0
- package/dist/agents/runtime/ToolCallSafety.d.ts.map +1 -0
- package/dist/agents/runtime/ToolCallSafety.js +319 -0
- package/dist/agents/runtime/ToolCallSafety.js.map +1 -0
- package/dist/agents/runtime/ToolFailureLoopGuard.d.ts +163 -0
- package/dist/agents/runtime/ToolFailureLoopGuard.d.ts.map +1 -0
- package/dist/agents/runtime/ToolFailureLoopGuard.js +368 -0
- package/dist/agents/runtime/ToolFailureLoopGuard.js.map +1 -0
- package/dist/agents/runtime/ToolLoopDetector.d.ts +47 -0
- package/dist/agents/runtime/ToolLoopDetector.d.ts.map +1 -0
- package/dist/agents/runtime/ToolLoopDetector.js +108 -0
- package/dist/agents/runtime/ToolLoopDetector.js.map +1 -0
- package/dist/agents/runtime/ToolProgressHeartbeat.d.ts +73 -0
- package/dist/agents/runtime/ToolProgressHeartbeat.d.ts.map +1 -0
- package/dist/agents/runtime/ToolProgressHeartbeat.js +152 -0
- package/dist/agents/runtime/ToolProgressHeartbeat.js.map +1 -0
- package/dist/agents/runtime/ToolResponseProcessor.d.ts +57 -0
- package/dist/agents/runtime/ToolResponseProcessor.d.ts.map +1 -0
- package/dist/agents/runtime/ToolResponseProcessor.js +87 -0
- package/dist/agents/runtime/ToolResponseProcessor.js.map +1 -0
- package/dist/agents/runtime/ToolScheduler.d.ts +31 -0
- package/dist/agents/runtime/ToolScheduler.d.ts.map +1 -0
- package/dist/agents/runtime/ToolScheduler.js +63 -0
- package/dist/agents/runtime/ToolScheduler.js.map +1 -0
- package/dist/agents/runtime/WorkerCompletionPolicy.d.ts +47 -0
- package/dist/agents/runtime/WorkerCompletionPolicy.d.ts.map +1 -0
- package/dist/agents/runtime/WorkerCompletionPolicy.js +304 -0
- package/dist/agents/runtime/WorkerCompletionPolicy.js.map +1 -0
- package/dist/agents/runtime/WorkerInteractiveRuntime.d.ts +87 -0
- package/dist/agents/runtime/WorkerInteractiveRuntime.d.ts.map +1 -0
- package/dist/agents/runtime/WorkerInteractiveRuntime.js +122 -0
- package/dist/agents/runtime/WorkerInteractiveRuntime.js.map +1 -0
- package/dist/agents/runtime/messageSummary.d.ts +7 -0
- package/dist/agents/runtime/messageSummary.d.ts.map +1 -0
- package/dist/agents/runtime/messageSummary.js +21 -0
- package/dist/agents/runtime/messageSummary.js.map +1 -0
- package/dist/agents/runtime/parallelToolBatch.d.ts +39 -0
- package/dist/agents/runtime/parallelToolBatch.d.ts.map +1 -0
- package/dist/agents/runtime/parallelToolBatch.js +64 -0
- package/dist/agents/runtime/parallelToolBatch.js.map +1 -0
- package/dist/config/ModelManager.d.ts +59 -0
- package/dist/config/ModelManager.d.ts.map +1 -0
- package/dist/config/ModelManager.js +256 -0
- package/dist/config/ModelManager.js.map +1 -0
- package/dist/config/defaults.d.ts +468 -0
- package/dist/config/defaults.d.ts.map +1 -0
- package/dist/config/defaults.js +520 -0
- package/dist/config/defaults.js.map +1 -0
- package/dist/config.d.ts +1225 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +1580 -0
- package/dist/config.js.map +1 -0
- package/dist/contracts/adapters/BlockedAgingPolicy.d.ts +22 -0
- package/dist/contracts/adapters/BlockedAgingPolicy.d.ts.map +1 -0
- package/dist/contracts/adapters/BlockedAgingPolicy.js +29 -0
- package/dist/contracts/adapters/BlockedAgingPolicy.js.map +1 -0
- package/dist/contracts/adapters/EternalPatrolPolicy.d.ts +49 -0
- package/dist/contracts/adapters/EternalPatrolPolicy.d.ts.map +1 -0
- package/dist/contracts/adapters/EternalPatrolPolicy.js +78 -0
- package/dist/contracts/adapters/EternalPatrolPolicy.js.map +1 -0
- package/dist/contracts/adapters/EternalRuntimeProjection.d.ts +39 -0
- package/dist/contracts/adapters/EternalRuntimeProjection.d.ts.map +1 -0
- package/dist/contracts/adapters/EternalRuntimeProjection.js +114 -0
- package/dist/contracts/adapters/EternalRuntimeProjection.js.map +1 -0
- package/dist/contracts/adapters/EventAdapter.d.ts +89 -0
- package/dist/contracts/adapters/EventAdapter.d.ts.map +1 -0
- package/dist/contracts/adapters/EventAdapter.js +535 -0
- package/dist/contracts/adapters/EventAdapter.js.map +1 -0
- package/dist/contracts/adapters/SessionScope.d.ts +12 -0
- package/dist/contracts/adapters/SessionScope.d.ts.map +1 -0
- package/dist/contracts/adapters/SessionScope.js +33 -0
- package/dist/contracts/adapters/SessionScope.js.map +1 -0
- package/dist/contracts/adapters/StatusAdapter.d.ts +238 -0
- package/dist/contracts/adapters/StatusAdapter.d.ts.map +1 -0
- package/dist/contracts/adapters/StatusAdapter.js +719 -0
- package/dist/contracts/adapters/StatusAdapter.js.map +1 -0
- package/dist/contracts/adapters/ThinkContent.d.ts +19 -0
- package/dist/contracts/adapters/ThinkContent.d.ts.map +1 -0
- package/dist/contracts/adapters/ThinkContent.js +99 -0
- package/dist/contracts/adapters/ThinkContent.js.map +1 -0
- package/dist/contracts/constants/eventTypes.d.ts +3 -0
- package/dist/contracts/constants/eventTypes.d.ts.map +1 -0
- package/dist/contracts/constants/eventTypes.js +2 -0
- package/dist/contracts/constants/eventTypes.js.map +1 -0
- package/dist/contracts/constants/leaderToolDefinitions.d.ts +18 -0
- package/dist/contracts/constants/leaderToolDefinitions.d.ts.map +1 -0
- package/dist/contracts/constants/leaderToolDefinitions.js +1070 -0
- package/dist/contracts/constants/leaderToolDefinitions.js.map +1 -0
- package/dist/contracts/constants/statusValues.d.ts +7 -0
- package/dist/contracts/constants/statusValues.d.ts.map +1 -0
- package/dist/contracts/constants/statusValues.js +6 -0
- package/dist/contracts/constants/statusValues.js.map +1 -0
- package/dist/contracts/constants/toolNames.d.ts +8 -0
- package/dist/contracts/constants/toolNames.d.ts.map +1 -0
- package/dist/contracts/constants/toolNames.js +25 -0
- package/dist/contracts/constants/toolNames.js.map +1 -0
- package/dist/contracts/index.d.ts +13 -0
- package/dist/contracts/index.d.ts.map +1 -0
- package/dist/contracts/index.js +13 -0
- package/dist/contracts/index.js.map +1 -0
- package/dist/contracts/modes.d.ts +93 -0
- package/dist/contracts/modes.d.ts.map +1 -0
- package/dist/contracts/modes.js +104 -0
- package/dist/contracts/modes.js.map +1 -0
- package/dist/contracts/types/Agent.d.ts +164 -0
- package/dist/contracts/types/Agent.d.ts.map +1 -0
- package/dist/contracts/types/Agent.js +156 -0
- package/dist/contracts/types/Agent.js.map +1 -0
- package/dist/contracts/types/Autonomy.d.ts +88 -0
- package/dist/contracts/types/Autonomy.d.ts.map +1 -0
- package/dist/contracts/types/Autonomy.js +126 -0
- package/dist/contracts/types/Autonomy.js.map +1 -0
- package/dist/contracts/types/AutonomyDecision.d.ts +48 -0
- package/dist/contracts/types/AutonomyDecision.d.ts.map +1 -0
- package/dist/contracts/types/AutonomyDecision.js +27 -0
- package/dist/contracts/types/AutonomyDecision.js.map +1 -0
- package/dist/contracts/types/Canvas.d.ts +163 -0
- package/dist/contracts/types/Canvas.d.ts.map +1 -0
- package/dist/contracts/types/Canvas.js +22 -0
- package/dist/contracts/types/Canvas.js.map +1 -0
- package/dist/contracts/types/Event.d.ts +510 -0
- package/dist/contracts/types/Event.d.ts.map +1 -0
- package/dist/contracts/types/Event.js +197 -0
- package/dist/contracts/types/Event.js.map +1 -0
- package/dist/contracts/types/Message.d.ts +94 -0
- package/dist/contracts/types/Message.d.ts.map +1 -0
- package/dist/contracts/types/Message.js +151 -0
- package/dist/contracts/types/Message.js.map +1 -0
- package/dist/contracts/types/Session.d.ts +9 -0
- package/dist/contracts/types/Session.d.ts.map +1 -0
- package/dist/contracts/types/Session.js +2 -0
- package/dist/contracts/types/Session.js.map +1 -0
- package/dist/contracts/types/Status.d.ts +12 -0
- package/dist/contracts/types/Status.d.ts.map +1 -0
- package/dist/contracts/types/Status.js +30 -0
- package/dist/contracts/types/Status.js.map +1 -0
- package/dist/contracts/types/TokenUsage.d.ts +46 -0
- package/dist/contracts/types/TokenUsage.d.ts.map +1 -0
- package/dist/contracts/types/TokenUsage.js +41 -0
- package/dist/contracts/types/TokenUsage.js.map +1 -0
- package/dist/contracts/types/Tool.d.ts +66 -0
- package/dist/contracts/types/Tool.d.ts.map +1 -0
- package/dist/contracts/types/Tool.js +10 -0
- package/dist/contracts/types/Tool.js.map +1 -0
- package/dist/contracts/types/ToolMetadata.d.ts +35 -0
- package/dist/contracts/types/ToolMetadata.d.ts.map +1 -0
- package/dist/contracts/types/ToolMetadata.js +131 -0
- package/dist/contracts/types/ToolMetadata.js.map +1 -0
- package/dist/contracts/types/Workflow.d.ts +278 -0
- package/dist/contracts/types/Workflow.d.ts.map +1 -0
- package/dist/contracts/types/Workflow.js +752 -0
- package/dist/contracts/types/Workflow.js.map +1 -0
- package/dist/core/ActiveSessionCoordinator.d.ts +23 -0
- package/dist/core/ActiveSessionCoordinator.d.ts.map +1 -0
- package/dist/core/ActiveSessionCoordinator.js +34 -0
- package/dist/core/ActiveSessionCoordinator.js.map +1 -0
- package/dist/core/AgentHealthMonitor.d.ts +162 -0
- package/dist/core/AgentHealthMonitor.d.ts.map +1 -0
- package/dist/core/AgentHealthMonitor.js +442 -0
- package/dist/core/AgentHealthMonitor.js.map +1 -0
- package/dist/core/AgentProtocol.d.ts +187 -0
- package/dist/core/AgentProtocol.d.ts.map +1 -0
- package/dist/core/AgentProtocol.js +213 -0
- package/dist/core/AgentProtocol.js.map +1 -0
- package/dist/core/AlertManager.d.ts +66 -0
- package/dist/core/AlertManager.d.ts.map +1 -0
- package/dist/core/AlertManager.js +126 -0
- package/dist/core/AlertManager.js.map +1 -0
- package/dist/core/ArtifactAwareness.d.ts +37 -0
- package/dist/core/ArtifactAwareness.d.ts.map +1 -0
- package/dist/core/ArtifactAwareness.js +212 -0
- package/dist/core/ArtifactAwareness.js.map +1 -0
- package/dist/core/AssumptionTracker.d.ts +88 -0
- package/dist/core/AssumptionTracker.d.ts.map +1 -0
- package/dist/core/AssumptionTracker.js +316 -0
- package/dist/core/AssumptionTracker.js.map +1 -0
- package/dist/core/AstStructuralEngine.d.ts +91 -0
- package/dist/core/AstStructuralEngine.d.ts.map +1 -0
- package/dist/core/AstStructuralEngine.js +436 -0
- package/dist/core/AstStructuralEngine.js.map +1 -0
- package/dist/core/AutonomousFaultPolicy.d.ts +17 -0
- package/dist/core/AutonomousFaultPolicy.d.ts.map +1 -0
- package/dist/core/AutonomousFaultPolicy.js +108 -0
- package/dist/core/AutonomousFaultPolicy.js.map +1 -0
- package/dist/core/BaselineAlertMonitor.d.ts +25 -0
- package/dist/core/BaselineAlertMonitor.d.ts.map +1 -0
- package/dist/core/BaselineAlertMonitor.js +66 -0
- package/dist/core/BaselineAlertMonitor.js.map +1 -0
- package/dist/core/BootstrapDoctor.d.ts +36 -0
- package/dist/core/BootstrapDoctor.d.ts.map +1 -0
- package/dist/core/BootstrapDoctor.js +288 -0
- package/dist/core/BootstrapDoctor.js.map +1 -0
- package/dist/core/BrowserProvider.d.ts +59 -0
- package/dist/core/BrowserProvider.d.ts.map +1 -0
- package/dist/core/BrowserProvider.js +533 -0
- package/dist/core/BrowserProvider.js.map +1 -0
- package/dist/core/BrowserRuntime.d.ts +178 -0
- package/dist/core/BrowserRuntime.d.ts.map +1 -0
- package/dist/core/BrowserRuntime.js +487 -0
- package/dist/core/BrowserRuntime.js.map +1 -0
- package/dist/core/BrowserStealth.d.ts +31 -0
- package/dist/core/BrowserStealth.d.ts.map +1 -0
- package/dist/core/BrowserStealth.js +111 -0
- package/dist/core/BrowserStealth.js.map +1 -0
- package/dist/core/BughuntDagScheduler.d.ts +19 -0
- package/dist/core/BughuntDagScheduler.d.ts.map +1 -0
- package/dist/core/BughuntDagScheduler.js +82 -0
- package/dist/core/BughuntDagScheduler.js.map +1 -0
- package/dist/core/BughuntEvidenceCapture.d.ts +9 -0
- package/dist/core/BughuntEvidenceCapture.d.ts.map +1 -0
- package/dist/core/BughuntEvidenceCapture.js +27 -0
- package/dist/core/BughuntEvidenceCapture.js.map +1 -0
- package/dist/core/BughuntEvidenceExtractor.d.ts +10 -0
- package/dist/core/BughuntEvidenceExtractor.d.ts.map +1 -0
- package/dist/core/BughuntEvidenceExtractor.js +82 -0
- package/dist/core/BughuntEvidenceExtractor.js.map +1 -0
- package/dist/core/BughuntEvidencePack.d.ts +11 -0
- package/dist/core/BughuntEvidencePack.d.ts.map +1 -0
- package/dist/core/BughuntEvidencePack.js +47 -0
- package/dist/core/BughuntEvidencePack.js.map +1 -0
- package/dist/core/BughuntLedger.d.ts +125 -0
- package/dist/core/BughuntLedger.d.ts.map +1 -0
- package/dist/core/BughuntLedger.js +432 -0
- package/dist/core/BughuntLedger.js.map +1 -0
- package/dist/core/BughuntPolicy.d.ts +23 -0
- package/dist/core/BughuntPolicy.d.ts.map +1 -0
- package/dist/core/BughuntPolicy.js +37 -0
- package/dist/core/BughuntPolicy.js.map +1 -0
- package/dist/core/BuildDiagnosticsCollector.d.ts +97 -0
- package/dist/core/BuildDiagnosticsCollector.d.ts.map +1 -0
- package/dist/core/BuildDiagnosticsCollector.js +200 -0
- package/dist/core/BuildDiagnosticsCollector.js.map +1 -0
- package/dist/core/BundledSkillRegistry.d.ts +25 -0
- package/dist/core/BundledSkillRegistry.d.ts.map +1 -0
- package/dist/core/BundledSkillRegistry.js +86 -0
- package/dist/core/BundledSkillRegistry.js.map +1 -0
- package/dist/core/BusMessageTypes.d.ts +109 -0
- package/dist/core/BusMessageTypes.d.ts.map +1 -0
- package/dist/core/BusMessageTypes.js +49 -0
- package/dist/core/BusMessageTypes.js.map +1 -0
- package/dist/core/ChangeImpactResolver.d.ts +71 -0
- package/dist/core/ChangeImpactResolver.d.ts.map +1 -0
- package/dist/core/ChangeImpactResolver.js +130 -0
- package/dist/core/ChangeImpactResolver.js.map +1 -0
- package/dist/core/CleanupRegistry.d.ts +39 -0
- package/dist/core/CleanupRegistry.d.ts.map +1 -0
- package/dist/core/CleanupRegistry.js +91 -0
- package/dist/core/CleanupRegistry.js.map +1 -0
- package/dist/core/ContextManager.d.ts +135 -0
- package/dist/core/ContextManager.d.ts.map +1 -0
- package/dist/core/ContextManager.js +755 -0
- package/dist/core/ContextManager.js.map +1 -0
- package/dist/core/ContextManifest.d.ts +125 -0
- package/dist/core/ContextManifest.d.ts.map +1 -0
- package/dist/core/ContextManifest.js +265 -0
- package/dist/core/ContextManifest.js.map +1 -0
- package/dist/core/ContextMemoryIndex.d.ts +74 -0
- package/dist/core/ContextMemoryIndex.d.ts.map +1 -0
- package/dist/core/ContextMemoryIndex.js +431 -0
- package/dist/core/ContextMemoryIndex.js.map +1 -0
- package/dist/core/ContextRuntimeState.d.ts +43 -0
- package/dist/core/ContextRuntimeState.d.ts.map +1 -0
- package/dist/core/ContextRuntimeState.js +79 -0
- package/dist/core/ContextRuntimeState.js.map +1 -0
- package/dist/core/ContractAllowedScope.d.ts +67 -0
- package/dist/core/ContractAllowedScope.d.ts.map +1 -0
- package/dist/core/ContractAllowedScope.js +109 -0
- package/dist/core/ContractAllowedScope.js.map +1 -0
- package/dist/core/ContractDriftAudit.d.ts +28 -0
- package/dist/core/ContractDriftAudit.d.ts.map +1 -0
- package/dist/core/ContractDriftAudit.js +31 -0
- package/dist/core/ContractDriftAudit.js.map +1 -0
- package/dist/core/ContractHotSync.d.ts +88 -0
- package/dist/core/ContractHotSync.d.ts.map +1 -0
- package/dist/core/ContractHotSync.js +142 -0
- package/dist/core/ContractHotSync.js.map +1 -0
- package/dist/core/ContractPack.d.ts +67 -0
- package/dist/core/ContractPack.d.ts.map +1 -0
- package/dist/core/ContractPack.js +397 -0
- package/dist/core/ContractPack.js.map +1 -0
- package/dist/core/ContractProvenance.d.ts +6 -0
- package/dist/core/ContractProvenance.d.ts.map +1 -0
- package/dist/core/ContractProvenance.js +39 -0
- package/dist/core/ContractProvenance.js.map +1 -0
- package/dist/core/CrashReporter.d.ts +51 -0
- package/dist/core/CrashReporter.d.ts.map +1 -0
- package/dist/core/CrashReporter.js +179 -0
- package/dist/core/CrashReporter.js.map +1 -0
- package/dist/core/DaemonManager.d.ts +100 -0
- package/dist/core/DaemonManager.d.ts.map +1 -0
- package/dist/core/DaemonManager.js +429 -0
- package/dist/core/DaemonManager.js.map +1 -0
- package/dist/core/DagScheduler.d.ts +73 -0
- package/dist/core/DagScheduler.d.ts.map +1 -0
- package/dist/core/DagScheduler.js +111 -0
- package/dist/core/DagScheduler.js.map +1 -0
- package/dist/core/Database.d.ts +545 -0
- package/dist/core/Database.d.ts.map +1 -0
- package/dist/core/Database.js +2158 -0
- package/dist/core/Database.js.map +1 -0
- package/dist/core/DatabaseLockRecovery.d.ts +50 -0
- package/dist/core/DatabaseLockRecovery.d.ts.map +1 -0
- package/dist/core/DatabaseLockRecovery.js +167 -0
- package/dist/core/DatabaseLockRecovery.js.map +1 -0
- package/dist/core/DatabaseRepositories.d.ts +298 -0
- package/dist/core/DatabaseRepositories.d.ts.map +1 -0
- package/dist/core/DatabaseRepositories.js +292 -0
- package/dist/core/DatabaseRepositories.js.map +1 -0
- package/dist/core/DesignAssetCatalog.d.ts +180 -0
- package/dist/core/DesignAssetCatalog.d.ts.map +1 -0
- package/dist/core/DesignAssetCatalog.js +691 -0
- package/dist/core/DesignAssetCatalog.js.map +1 -0
- package/dist/core/DeterministicAcceptance.d.ts +96 -0
- package/dist/core/DeterministicAcceptance.d.ts.map +1 -0
- package/dist/core/DeterministicAcceptance.js +218 -0
- package/dist/core/DeterministicAcceptance.js.map +1 -0
- package/dist/core/Diagnostics.d.ts +49 -0
- package/dist/core/Diagnostics.d.ts.map +1 -0
- package/dist/core/Diagnostics.js +308 -0
- package/dist/core/Diagnostics.js.map +1 -0
- package/dist/core/EternalGoal.d.ts +15 -0
- package/dist/core/EternalGoal.d.ts.map +1 -0
- package/dist/core/EternalGoal.js +67 -0
- package/dist/core/EternalGoal.js.map +1 -0
- package/dist/core/EternalLoop.d.ts +206 -0
- package/dist/core/EternalLoop.d.ts.map +1 -0
- package/dist/core/EternalLoop.js +595 -0
- package/dist/core/EternalLoop.js.map +1 -0
- package/dist/core/EternalRuntimeProjection.d.ts +39 -0
- package/dist/core/EternalRuntimeProjection.d.ts.map +1 -0
- package/dist/core/EternalRuntimeProjection.js +114 -0
- package/dist/core/EternalRuntimeProjection.js.map +1 -0
- package/dist/core/EternalRuntimeTelemetry.d.ts +63 -0
- package/dist/core/EternalRuntimeTelemetry.d.ts.map +1 -0
- package/dist/core/EternalRuntimeTelemetry.js +153 -0
- package/dist/core/EternalRuntimeTelemetry.js.map +1 -0
- package/dist/core/EternalSupervisor.d.ts +108 -0
- package/dist/core/EternalSupervisor.d.ts.map +1 -0
- package/dist/core/EternalSupervisor.js +259 -0
- package/dist/core/EternalSupervisor.js.map +1 -0
- package/dist/core/EventEmitter.d.ts +1325 -0
- package/dist/core/EventEmitter.d.ts.map +1 -0
- package/dist/core/EventEmitter.js +76 -0
- package/dist/core/EventEmitter.js.map +1 -0
- package/dist/core/ExecutionLease.d.ts +46 -0
- package/dist/core/ExecutionLease.d.ts.map +1 -0
- package/dist/core/ExecutionLease.js +123 -0
- package/dist/core/ExecutionLease.js.map +1 -0
- package/dist/core/ExecutionTraceMemory.d.ts +96 -0
- package/dist/core/ExecutionTraceMemory.d.ts.map +1 -0
- package/dist/core/ExecutionTraceMemory.js +243 -0
- package/dist/core/ExecutionTraceMemory.js.map +1 -0
- package/dist/core/FileLock.d.ts +108 -0
- package/dist/core/FileLock.d.ts.map +1 -0
- package/dist/core/FileLock.js +431 -0
- package/dist/core/FileLock.js.map +1 -0
- package/dist/core/HardeningPolicy.d.ts +85 -0
- package/dist/core/HardeningPolicy.d.ts.map +1 -0
- package/dist/core/HardeningPolicy.js +191 -0
- package/dist/core/HardeningPolicy.js.map +1 -0
- package/dist/core/HierarchicalContextManager.d.ts +83 -0
- package/dist/core/HierarchicalContextManager.d.ts.map +1 -0
- package/dist/core/HierarchicalContextManager.js +324 -0
- package/dist/core/HierarchicalContextManager.js.map +1 -0
- package/dist/core/ImportGraphEngine.d.ts +84 -0
- package/dist/core/ImportGraphEngine.d.ts.map +1 -0
- package/dist/core/ImportGraphEngine.js +253 -0
- package/dist/core/ImportGraphEngine.js.map +1 -0
- package/dist/core/IntegrationVerifyInjector.d.ts +76 -0
- package/dist/core/IntegrationVerifyInjector.d.ts.map +1 -0
- package/dist/core/IntegrationVerifyInjector.js +164 -0
- package/dist/core/IntegrationVerifyInjector.js.map +1 -0
- package/dist/core/IntuitionRuntime.d.ts +12 -0
- package/dist/core/IntuitionRuntime.d.ts.map +1 -0
- package/dist/core/IntuitionRuntime.js +137 -0
- package/dist/core/IntuitionRuntime.js.map +1 -0
- package/dist/core/JudgmentService.d.ts +45 -0
- package/dist/core/JudgmentService.d.ts.map +1 -0
- package/dist/core/JudgmentService.js +77 -0
- package/dist/core/JudgmentService.js.map +1 -0
- package/dist/core/LangfuseIntegration.d.ts +208 -0
- package/dist/core/LangfuseIntegration.d.ts.map +1 -0
- package/dist/core/LangfuseIntegration.js +611 -0
- package/dist/core/LangfuseIntegration.js.map +1 -0
- package/dist/core/LlmInputManifest.d.ts +40 -0
- package/dist/core/LlmInputManifest.d.ts.map +1 -0
- package/dist/core/LlmInputManifest.js +94 -0
- package/dist/core/LlmInputManifest.js.map +1 -0
- package/dist/core/LocalLlmGateway.d.ts +75 -0
- package/dist/core/LocalLlmGateway.d.ts.map +1 -0
- package/dist/core/LocalLlmGateway.js +389 -0
- package/dist/core/LocalLlmGateway.js.map +1 -0
- package/dist/core/LocalLlmGatewayServer.d.ts +38 -0
- package/dist/core/LocalLlmGatewayServer.d.ts.map +1 -0
- package/dist/core/LocalLlmGatewayServer.js +85 -0
- package/dist/core/LocalLlmGatewayServer.js.map +1 -0
- package/dist/core/Log.d.ts +97 -0
- package/dist/core/Log.d.ts.map +1 -0
- package/dist/core/Log.js +249 -0
- package/dist/core/Log.js.map +1 -0
- package/dist/core/LogMaintenance.d.ts +38 -0
- package/dist/core/LogMaintenance.d.ts.map +1 -0
- package/dist/core/LogMaintenance.js +239 -0
- package/dist/core/LogMaintenance.js.map +1 -0
- package/dist/core/MarketplaceService.d.ts +57 -0
- package/dist/core/MarketplaceService.d.ts.map +1 -0
- package/dist/core/MarketplaceService.js +982 -0
- package/dist/core/MarketplaceService.js.map +1 -0
- package/dist/core/McpClient.d.ts +93 -0
- package/dist/core/McpClient.d.ts.map +1 -0
- package/dist/core/McpClient.js +277 -0
- package/dist/core/McpClient.js.map +1 -0
- package/dist/core/MessageBus.d.ts +247 -0
- package/dist/core/MessageBus.d.ts.map +1 -0
- package/dist/core/MessageBus.js +852 -0
- package/dist/core/MessageBus.js.map +1 -0
- package/dist/core/Metrics.d.ts +50 -0
- package/dist/core/Metrics.d.ts.map +1 -0
- package/dist/core/Metrics.js +171 -0
- package/dist/core/Metrics.js.map +1 -0
- package/dist/core/MetricsRegistry.d.ts +47 -0
- package/dist/core/MetricsRegistry.d.ts.map +1 -0
- package/dist/core/MetricsRegistry.js +119 -0
- package/dist/core/MetricsRegistry.js.map +1 -0
- package/dist/core/ModeAudit.d.ts +87 -0
- package/dist/core/ModeAudit.d.ts.map +1 -0
- package/dist/core/ModeAudit.js +113 -0
- package/dist/core/ModeAudit.js.map +1 -0
- package/dist/core/ModeRuntimeProjection.d.ts +96 -0
- package/dist/core/ModeRuntimeProjection.d.ts.map +1 -0
- package/dist/core/ModeRuntimeProjection.js +216 -0
- package/dist/core/ModeRuntimeProjection.js.map +1 -0
- package/dist/core/ModeStore.d.ts +62 -0
- package/dist/core/ModeStore.d.ts.map +1 -0
- package/dist/core/ModeStore.js +77 -0
- package/dist/core/ModeStore.js.map +1 -0
- package/dist/core/ModeToolPolicy.d.ts +62 -0
- package/dist/core/ModeToolPolicy.d.ts.map +1 -0
- package/dist/core/ModeToolPolicy.js +145 -0
- package/dist/core/ModeToolPolicy.js.map +1 -0
- package/dist/core/ModeWorktreeService.d.ts +31 -0
- package/dist/core/ModeWorktreeService.d.ts.map +1 -0
- package/dist/core/ModeWorktreeService.js +116 -0
- package/dist/core/ModeWorktreeService.js.map +1 -0
- package/dist/core/OrchestrationTypes.d.ts +114 -0
- package/dist/core/OrchestrationTypes.d.ts.map +1 -0
- package/dist/core/OrchestrationTypes.js +2 -0
- package/dist/core/OrchestrationTypes.js.map +1 -0
- package/dist/core/PatternRecognitionEngine.d.ts +33 -0
- package/dist/core/PatternRecognitionEngine.d.ts.map +1 -0
- package/dist/core/PatternRecognitionEngine.js +82 -0
- package/dist/core/PatternRecognitionEngine.js.map +1 -0
- package/dist/core/PerformanceBaselineTracker.d.ts +28 -0
- package/dist/core/PerformanceBaselineTracker.d.ts.map +1 -0
- package/dist/core/PerformanceBaselineTracker.js +48 -0
- package/dist/core/PerformanceBaselineTracker.js.map +1 -0
- package/dist/core/PermissionStore.d.ts +14 -0
- package/dist/core/PermissionStore.d.ts.map +1 -0
- package/dist/core/PermissionStore.js +318 -0
- package/dist/core/PermissionStore.js.map +1 -0
- package/dist/core/PermissionSystem.d.ts +79 -0
- package/dist/core/PermissionSystem.d.ts.map +1 -0
- package/dist/core/PermissionSystem.js +380 -0
- package/dist/core/PermissionSystem.js.map +1 -0
- package/dist/core/PhasePolicy.d.ts +10 -0
- package/dist/core/PhasePolicy.d.ts.map +1 -0
- package/dist/core/PhasePolicy.js +15 -0
- package/dist/core/PhasePolicy.js.map +1 -0
- package/dist/core/PidRegistry.d.ts +58 -0
- package/dist/core/PidRegistry.d.ts.map +1 -0
- package/dist/core/PidRegistry.js +152 -0
- package/dist/core/PidRegistry.js.map +1 -0
- package/dist/core/ProcessIdleGuard.d.ts +76 -0
- package/dist/core/ProcessIdleGuard.d.ts.map +1 -0
- package/dist/core/ProcessIdleGuard.js +201 -0
- package/dist/core/ProcessIdleGuard.js.map +1 -0
- package/dist/core/ProcessOrphanCleaner.d.ts +37 -0
- package/dist/core/ProcessOrphanCleaner.d.ts.map +1 -0
- package/dist/core/ProcessOrphanCleaner.js +106 -0
- package/dist/core/ProcessOrphanCleaner.js.map +1 -0
- package/dist/core/ProcessSelfProtection.d.ts +45 -0
- package/dist/core/ProcessSelfProtection.d.ts.map +1 -0
- package/dist/core/ProcessSelfProtection.js +234 -0
- package/dist/core/ProcessSelfProtection.js.map +1 -0
- package/dist/core/ProjectBlueprint.d.ts +176 -0
- package/dist/core/ProjectBlueprint.d.ts.map +1 -0
- package/dist/core/ProjectBlueprint.js +542 -0
- package/dist/core/ProjectBlueprint.js.map +1 -0
- package/dist/core/ProjectContracts.d.ts +22 -0
- package/dist/core/ProjectContracts.d.ts.map +1 -0
- package/dist/core/ProjectContracts.js +97 -0
- package/dist/core/ProjectContracts.js.map +1 -0
- package/dist/core/ProjectRetentionPolicy.d.ts +31 -0
- package/dist/core/ProjectRetentionPolicy.d.ts.map +1 -0
- package/dist/core/ProjectRetentionPolicy.js +68 -0
- package/dist/core/ProjectRetentionPolicy.js.map +1 -0
- package/dist/core/ProjectRuntimeManager.d.ts +91 -0
- package/dist/core/ProjectRuntimeManager.d.ts.map +1 -0
- package/dist/core/ProjectRuntimeManager.js +458 -0
- package/dist/core/ProjectRuntimeManager.js.map +1 -0
- package/dist/core/ProjectRuntimeState.d.ts +122 -0
- package/dist/core/ProjectRuntimeState.d.ts.map +1 -0
- package/dist/core/ProjectRuntimeState.js +27 -0
- package/dist/core/ProjectRuntimeState.js.map +1 -0
- package/dist/core/ProxyConfig.d.ts +26 -0
- package/dist/core/ProxyConfig.d.ts.map +1 -0
- package/dist/core/ProxyConfig.js +121 -0
- package/dist/core/ProxyConfig.js.map +1 -0
- package/dist/core/RecoveryRecords.d.ts +29 -0
- package/dist/core/RecoveryRecords.d.ts.map +1 -0
- package/dist/core/RecoveryRecords.js +122 -0
- package/dist/core/RecoveryRecords.js.map +1 -0
- package/dist/core/RepairStrategyEngine.d.ts +94 -0
- package/dist/core/RepairStrategyEngine.d.ts.map +1 -0
- package/dist/core/RepairStrategyEngine.js +268 -0
- package/dist/core/RepairStrategyEngine.js.map +1 -0
- package/dist/core/ResourceBudgetService.d.ts +61 -0
- package/dist/core/ResourceBudgetService.d.ts.map +1 -0
- package/dist/core/ResourceBudgetService.js +257 -0
- package/dist/core/ResourceBudgetService.js.map +1 -0
- package/dist/core/ResumeManager.d.ts +18 -0
- package/dist/core/ResumeManager.d.ts.map +1 -0
- package/dist/core/ResumeManager.js +139 -0
- package/dist/core/ResumeManager.js.map +1 -0
- package/dist/core/RuntimeDiagnostics.d.ts +126 -0
- package/dist/core/RuntimeDiagnostics.d.ts.map +1 -0
- package/dist/core/RuntimeDiagnostics.js +367 -0
- package/dist/core/RuntimeDiagnostics.js.map +1 -0
- package/dist/core/RuntimeGuards.d.ts +16 -0
- package/dist/core/RuntimeGuards.d.ts.map +1 -0
- package/dist/core/RuntimeGuards.js +222 -0
- package/dist/core/RuntimeGuards.js.map +1 -0
- package/dist/core/RuntimeRecoveryController.d.ts +52 -0
- package/dist/core/RuntimeRecoveryController.d.ts.map +1 -0
- package/dist/core/RuntimeRecoveryController.js +156 -0
- package/dist/core/RuntimeRecoveryController.js.map +1 -0
- package/dist/core/ScheduledTaskManager.d.ts +110 -0
- package/dist/core/ScheduledTaskManager.d.ts.map +1 -0
- package/dist/core/ScheduledTaskManager.js +532 -0
- package/dist/core/ScheduledTaskManager.js.map +1 -0
- package/dist/core/ScratchpadReview.d.ts +22 -0
- package/dist/core/ScratchpadReview.d.ts.map +1 -0
- package/dist/core/ScratchpadReview.js +162 -0
- package/dist/core/ScratchpadReview.js.map +1 -0
- package/dist/core/SessionManager.d.ts +3 -0
- package/dist/core/SessionManager.d.ts.map +1 -0
- package/dist/core/SessionManager.js +2 -0
- package/dist/core/SessionManager.js.map +1 -0
- package/dist/core/SessionManagerRuntime.d.ts +3 -0
- package/dist/core/SessionManagerRuntime.d.ts.map +1 -0
- package/dist/core/SessionManagerRuntime.js +3 -0
- package/dist/core/SessionManagerRuntime.js.map +1 -0
- package/dist/core/SessionRuntime.d.ts +2 -0
- package/dist/core/SessionRuntime.d.ts.map +1 -0
- package/dist/core/SessionRuntime.js +2 -0
- package/dist/core/SessionRuntime.js.map +1 -0
- package/dist/core/SessionRuntimeState.d.ts +112 -0
- package/dist/core/SessionRuntimeState.d.ts.map +1 -0
- package/dist/core/SessionRuntimeState.js +250 -0
- package/dist/core/SessionRuntimeState.js.map +1 -0
- package/dist/core/SessionStateKeys.d.ts +138 -0
- package/dist/core/SessionStateKeys.d.ts.map +1 -0
- package/dist/core/SessionStateKeys.js +168 -0
- package/dist/core/SessionStateKeys.js.map +1 -0
- package/dist/core/SharedLedger.d.ts +98 -0
- package/dist/core/SharedLedger.d.ts.map +1 -0
- package/dist/core/SharedLedger.js +145 -0
- package/dist/core/SharedLedger.js.map +1 -0
- package/dist/core/SkillCatalog.d.ts +79 -0
- package/dist/core/SkillCatalog.d.ts.map +1 -0
- package/dist/core/SkillCatalog.js +473 -0
- package/dist/core/SkillCatalog.js.map +1 -0
- package/dist/core/SkillDefinitionService.d.ts +56 -0
- package/dist/core/SkillDefinitionService.d.ts.map +1 -0
- package/dist/core/SkillDefinitionService.js +144 -0
- package/dist/core/SkillDefinitionService.js.map +1 -0
- package/dist/core/SkillPhaseLoader.d.ts +21 -0
- package/dist/core/SkillPhaseLoader.d.ts.map +1 -0
- package/dist/core/SkillPhaseLoader.js +85 -0
- package/dist/core/SkillPhaseLoader.js.map +1 -0
- package/dist/core/SkillSelectionPolicy.d.ts +7 -0
- package/dist/core/SkillSelectionPolicy.d.ts.map +1 -0
- package/dist/core/SkillSelectionPolicy.js +10 -0
- package/dist/core/SkillSelectionPolicy.js.map +1 -0
- package/dist/core/SlidevServerManager.d.ts +51 -0
- package/dist/core/SlidevServerManager.d.ts.map +1 -0
- package/dist/core/SlidevServerManager.js +200 -0
- package/dist/core/SlidevServerManager.js.map +1 -0
- package/dist/core/SoulExtractor.d.ts +34 -0
- package/dist/core/SoulExtractor.d.ts.map +1 -0
- package/dist/core/SoulExtractor.js +100 -0
- package/dist/core/SoulExtractor.js.map +1 -0
- package/dist/core/SpecFirstPipeline.d.ts +77 -0
- package/dist/core/SpecFirstPipeline.d.ts.map +1 -0
- package/dist/core/SpecFirstPipeline.js +95 -0
- package/dist/core/SpecFirstPipeline.js.map +1 -0
- package/dist/core/SpeculativeExecutionController.d.ts +64 -0
- package/dist/core/SpeculativeExecutionController.d.ts.map +1 -0
- package/dist/core/SpeculativeExecutionController.js +263 -0
- package/dist/core/SpeculativeExecutionController.js.map +1 -0
- package/dist/core/SpeculativeOrchestrationPlanner.d.ts +40 -0
- package/dist/core/SpeculativeOrchestrationPlanner.d.ts.map +1 -0
- package/dist/core/SpeculativeOrchestrationPlanner.js +186 -0
- package/dist/core/SpeculativeOrchestrationPlanner.js.map +1 -0
- package/dist/core/StateSemantics.d.ts +238 -0
- package/dist/core/StateSemantics.d.ts.map +1 -0
- package/dist/core/StateSemantics.js +729 -0
- package/dist/core/StateSemantics.js.map +1 -0
- package/dist/core/SystemBrowserOpener.d.ts +25 -0
- package/dist/core/SystemBrowserOpener.d.ts.map +1 -0
- package/dist/core/SystemBrowserOpener.js +154 -0
- package/dist/core/SystemBrowserOpener.js.map +1 -0
- package/dist/core/SystemMessageSlot.d.ts +48 -0
- package/dist/core/SystemMessageSlot.d.ts.map +1 -0
- package/dist/core/SystemMessageSlot.js +130 -0
- package/dist/core/SystemMessageSlot.js.map +1 -0
- package/dist/core/TaintFlowEngine.d.ts +37 -0
- package/dist/core/TaintFlowEngine.d.ts.map +1 -0
- package/dist/core/TaintFlowEngine.js +200 -0
- package/dist/core/TaintFlowEngine.js.map +1 -0
- package/dist/core/TaskBoard.d.ts +243 -0
- package/dist/core/TaskBoard.d.ts.map +1 -0
- package/dist/core/TaskBoard.js +955 -0
- package/dist/core/TaskBoard.js.map +1 -0
- package/dist/core/TaskContextEnricher.d.ts +37 -0
- package/dist/core/TaskContextEnricher.d.ts.map +1 -0
- package/dist/core/TaskContextEnricher.js +147 -0
- package/dist/core/TaskContextEnricher.js.map +1 -0
- package/dist/core/TaskDisplayState.d.ts +21 -0
- package/dist/core/TaskDisplayState.d.ts.map +1 -0
- package/dist/core/TaskDisplayState.js +29 -0
- package/dist/core/TaskDisplayState.js.map +1 -0
- package/dist/core/TaskPriorityEngine.d.ts +31 -0
- package/dist/core/TaskPriorityEngine.d.ts.map +1 -0
- package/dist/core/TaskPriorityEngine.js +122 -0
- package/dist/core/TaskPriorityEngine.js.map +1 -0
- package/dist/core/TeamCommunicationGuard.d.ts +83 -0
- package/dist/core/TeamCommunicationGuard.d.ts.map +1 -0
- package/dist/core/TeamCommunicationGuard.js +221 -0
- package/dist/core/TeamCommunicationGuard.js.map +1 -0
- package/dist/core/TeamCommunicationService.d.ts +55 -0
- package/dist/core/TeamCommunicationService.d.ts.map +1 -0
- package/dist/core/TeamCommunicationService.js +178 -0
- package/dist/core/TeamCommunicationService.js.map +1 -0
- package/dist/core/TeamMailbox.d.ts +203 -0
- package/dist/core/TeamMailbox.d.ts.map +1 -0
- package/dist/core/TeamMailbox.js +729 -0
- package/dist/core/TeamMailbox.js.map +1 -0
- package/dist/core/TeamProtocol.d.ts +70 -0
- package/dist/core/TeamProtocol.d.ts.map +1 -0
- package/dist/core/TeamProtocol.js +75 -0
- package/dist/core/TeamProtocol.js.map +1 -0
- package/dist/core/TeamRequestTracker.d.ts +59 -0
- package/dist/core/TeamRequestTracker.d.ts.map +1 -0
- package/dist/core/TeamRequestTracker.js +212 -0
- package/dist/core/TeamRequestTracker.js.map +1 -0
- package/dist/core/TeamView.d.ts +34 -0
- package/dist/core/TeamView.d.ts.map +1 -0
- package/dist/core/TeamView.js +109 -0
- package/dist/core/TeamView.js.map +1 -0
- package/dist/core/TempDownloadRegistry.d.ts +44 -0
- package/dist/core/TempDownloadRegistry.d.ts.map +1 -0
- package/dist/core/TempDownloadRegistry.js +150 -0
- package/dist/core/TempDownloadRegistry.js.map +1 -0
- package/dist/core/TestRunnerAdapter.d.ts +31 -0
- package/dist/core/TestRunnerAdapter.d.ts.map +1 -0
- package/dist/core/TestRunnerAdapter.js +203 -0
- package/dist/core/TestRunnerAdapter.js.map +1 -0
- package/dist/core/ThinkContent.d.ts +19 -0
- package/dist/core/ThinkContent.d.ts.map +1 -0
- package/dist/core/ThinkContent.js +99 -0
- package/dist/core/ThinkContent.js.map +1 -0
- package/dist/core/TiktokenCache.d.ts +32 -0
- package/dist/core/TiktokenCache.d.ts.map +1 -0
- package/dist/core/TiktokenCache.js +188 -0
- package/dist/core/TiktokenCache.js.map +1 -0
- package/dist/core/TokenTracker.d.ts +64 -0
- package/dist/core/TokenTracker.d.ts.map +1 -0
- package/dist/core/TokenTracker.js +146 -0
- package/dist/core/TokenTracker.js.map +1 -0
- package/dist/core/ToolPruner.d.ts +73 -0
- package/dist/core/ToolPruner.d.ts.map +1 -0
- package/dist/core/ToolPruner.js +297 -0
- package/dist/core/ToolPruner.js.map +1 -0
- package/dist/core/Tracing.d.ts +74 -0
- package/dist/core/Tracing.d.ts.map +1 -0
- package/dist/core/Tracing.js +171 -0
- package/dist/core/Tracing.js.map +1 -0
- package/dist/core/TurnCoordinator.d.ts +12 -0
- package/dist/core/TurnCoordinator.d.ts.map +1 -0
- package/dist/core/TurnCoordinator.js +112 -0
- package/dist/core/TurnCoordinator.js.map +1 -0
- package/dist/core/UpdateChecker.d.ts +32 -0
- package/dist/core/UpdateChecker.d.ts.map +1 -0
- package/dist/core/UpdateChecker.js +129 -0
- package/dist/core/UpdateChecker.js.map +1 -0
- package/dist/core/UserAgent.d.ts +5 -0
- package/dist/core/UserAgent.d.ts.map +1 -0
- package/dist/core/UserAgent.js +34 -0
- package/dist/core/UserAgent.js.map +1 -0
- package/dist/core/VerificationPipeline.d.ts +47 -0
- package/dist/core/VerificationPipeline.d.ts.map +1 -0
- package/dist/core/VerificationPipeline.js +144 -0
- package/dist/core/VerificationPipeline.js.map +1 -0
- package/dist/core/WorkNoteManager.d.ts +94 -0
- package/dist/core/WorkNoteManager.d.ts.map +1 -0
- package/dist/core/WorkNoteManager.js +273 -0
- package/dist/core/WorkNoteManager.js.map +1 -0
- package/dist/core/WorkerProcessRunner.d.ts +330 -0
- package/dist/core/WorkerProcessRunner.d.ts.map +1 -0
- package/dist/core/WorkerProcessRunner.js +903 -0
- package/dist/core/WorkerProcessRunner.js.map +1 -0
- package/dist/core/Workspace.d.ts +85 -0
- package/dist/core/Workspace.d.ts.map +1 -0
- package/dist/core/Workspace.js +151 -0
- package/dist/core/Workspace.js.map +1 -0
- package/dist/core/WorktreeManager.d.ts +63 -0
- package/dist/core/WorktreeManager.d.ts.map +1 -0
- package/dist/core/WorktreeManager.js +147 -0
- package/dist/core/WorktreeManager.js.map +1 -0
- package/dist/core/WorktreeService.d.ts +104 -0
- package/dist/core/WorktreeService.d.ts.map +1 -0
- package/dist/core/WorktreeService.js +335 -0
- package/dist/core/WorktreeService.js.map +1 -0
- package/dist/core/blackboard/BlackboardGraph.d.ts +146 -0
- package/dist/core/blackboard/BlackboardGraph.d.ts.map +1 -0
- package/dist/core/blackboard/BlackboardGraph.js +793 -0
- package/dist/core/blackboard/BlackboardGraph.js.map +1 -0
- package/dist/core/blackboard/CompletionChecker.d.ts +39 -0
- package/dist/core/blackboard/CompletionChecker.d.ts.map +1 -0
- package/dist/core/blackboard/CompletionChecker.js +179 -0
- package/dist/core/blackboard/CompletionChecker.js.map +1 -0
- package/dist/core/blackboard/ContractFormatParser.d.ts +67 -0
- package/dist/core/blackboard/ContractFormatParser.d.ts.map +1 -0
- package/dist/core/blackboard/ContractFormatParser.js +212 -0
- package/dist/core/blackboard/ContractFormatParser.js.map +1 -0
- package/dist/core/blackboard/DispatcherEngine.d.ts +33 -0
- package/dist/core/blackboard/DispatcherEngine.d.ts.map +1 -0
- package/dist/core/blackboard/DispatcherEngine.js +135 -0
- package/dist/core/blackboard/DispatcherEngine.js.map +1 -0
- package/dist/core/blackboard/GraphBridge.d.ts +52 -0
- package/dist/core/blackboard/GraphBridge.d.ts.map +1 -0
- package/dist/core/blackboard/GraphBridge.js +166 -0
- package/dist/core/blackboard/GraphBridge.js.map +1 -0
- package/dist/core/blackboard/GraphStore.d.ts +46 -0
- package/dist/core/blackboard/GraphStore.d.ts.map +1 -0
- package/dist/core/blackboard/GraphStore.js +237 -0
- package/dist/core/blackboard/GraphStore.js.map +1 -0
- package/dist/core/blackboard/WorkerOutputParser.d.ts +25 -0
- package/dist/core/blackboard/WorkerOutputParser.d.ts.map +1 -0
- package/dist/core/blackboard/WorkerOutputParser.js +191 -0
- package/dist/core/blackboard/WorkerOutputParser.js.map +1 -0
- package/dist/core/blackboard/schemas.d.ts +137 -0
- package/dist/core/blackboard/schemas.d.ts.map +1 -0
- package/dist/core/blackboard/schemas.js +102 -0
- package/dist/core/blackboard/schemas.js.map +1 -0
- package/dist/core/blackboard/types.d.ts +115 -0
- package/dist/core/blackboard/types.d.ts.map +1 -0
- package/dist/core/blackboard/types.js +31 -0
- package/dist/core/blackboard/types.js.map +1 -0
- package/dist/core/canvas/CanvasStore.d.ts +64 -0
- package/dist/core/canvas/CanvasStore.d.ts.map +1 -0
- package/dist/core/canvas/CanvasStore.js +193 -0
- package/dist/core/canvas/CanvasStore.js.map +1 -0
- package/dist/core/checkpoint/CheckpointBoundary.d.ts +36 -0
- package/dist/core/checkpoint/CheckpointBoundary.d.ts.map +1 -0
- package/dist/core/checkpoint/CheckpointBoundary.js +147 -0
- package/dist/core/checkpoint/CheckpointBoundary.js.map +1 -0
- package/dist/core/checkpoint/CheckpointPrompt.d.ts +15 -0
- package/dist/core/checkpoint/CheckpointPrompt.d.ts.map +1 -0
- package/dist/core/checkpoint/CheckpointPrompt.js +76 -0
- package/dist/core/checkpoint/CheckpointPrompt.js.map +1 -0
- package/dist/core/checkpoint/CheckpointService.d.ts +55 -0
- package/dist/core/checkpoint/CheckpointService.d.ts.map +1 -0
- package/dist/core/checkpoint/CheckpointService.js +168 -0
- package/dist/core/checkpoint/CheckpointService.js.map +1 -0
- package/dist/core/checkpoint/CheckpointWriter.d.ts +38 -0
- package/dist/core/checkpoint/CheckpointWriter.d.ts.map +1 -0
- package/dist/core/checkpoint/CheckpointWriter.js +193 -0
- package/dist/core/checkpoint/CheckpointWriter.js.map +1 -0
- package/dist/core/checkpoint/ContextRebuild.d.ts +52 -0
- package/dist/core/checkpoint/ContextRebuild.d.ts.map +1 -0
- package/dist/core/checkpoint/ContextRebuild.js +213 -0
- package/dist/core/checkpoint/ContextRebuild.js.map +1 -0
- package/dist/core/checkpoint/MicroCompact.d.ts +32 -0
- package/dist/core/checkpoint/MicroCompact.d.ts.map +1 -0
- package/dist/core/checkpoint/MicroCompact.js +109 -0
- package/dist/core/checkpoint/MicroCompact.js.map +1 -0
- package/dist/core/checkpoint/index.d.ts +11 -0
- package/dist/core/checkpoint/index.d.ts.map +1 -0
- package/dist/core/checkpoint/index.js +11 -0
- package/dist/core/checkpoint/index.js.map +1 -0
- package/dist/core/checkpoint/types.d.ts +47 -0
- package/dist/core/checkpoint/types.d.ts.map +1 -0
- package/dist/core/checkpoint/types.js +24 -0
- package/dist/core/checkpoint/types.js.map +1 -0
- package/dist/core/compress/BlackboardCompressor.d.ts +54 -0
- package/dist/core/compress/BlackboardCompressor.d.ts.map +1 -0
- package/dist/core/compress/BlackboardCompressor.js +342 -0
- package/dist/core/compress/BlackboardCompressor.js.map +1 -0
- package/dist/core/compress/CompressionPipeline.d.ts +93 -0
- package/dist/core/compress/CompressionPipeline.d.ts.map +1 -0
- package/dist/core/compress/CompressionPipeline.js +1143 -0
- package/dist/core/compress/CompressionPipeline.js.map +1 -0
- package/dist/core/compress/CompressionTypes.d.ts +103 -0
- package/dist/core/compress/CompressionTypes.d.ts.map +1 -0
- package/dist/core/compress/CompressionTypes.js +5 -0
- package/dist/core/compress/CompressionTypes.js.map +1 -0
- package/dist/core/compress/ContextDAG.d.ts +149 -0
- package/dist/core/compress/ContextDAG.d.ts.map +1 -0
- package/dist/core/compress/ContextDAG.js +323 -0
- package/dist/core/compress/ContextDAG.js.map +1 -0
- package/dist/core/compress/ContextTokenCalculator.d.ts +46 -0
- package/dist/core/compress/ContextTokenCalculator.d.ts.map +1 -0
- package/dist/core/compress/ContextTokenCalculator.js +216 -0
- package/dist/core/compress/ContextTokenCalculator.js.map +1 -0
- package/dist/core/compress/MessageByteTruncator.d.ts +65 -0
- package/dist/core/compress/MessageByteTruncator.d.ts.map +1 -0
- package/dist/core/compress/MessageByteTruncator.js +178 -0
- package/dist/core/compress/MessageByteTruncator.js.map +1 -0
- package/dist/core/constants.d.ts +67 -0
- package/dist/core/constants.d.ts.map +1 -0
- package/dist/core/constants.js +67 -0
- package/dist/core/constants.js.map +1 -0
- package/dist/core/errors.d.ts +9 -0
- package/dist/core/errors.d.ts.map +1 -0
- package/dist/core/errors.js +20 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/git/GitEnv.d.ts +10 -0
- package/dist/core/git/GitEnv.d.ts.map +1 -0
- package/dist/core/git/GitEnv.js +47 -0
- package/dist/core/git/GitEnv.js.map +1 -0
- package/dist/core/git/GitPlatformApi.d.ts +90 -0
- package/dist/core/git/GitPlatformApi.d.ts.map +1 -0
- package/dist/core/git/GitPlatformApi.js +552 -0
- package/dist/core/git/GitPlatformApi.js.map +1 -0
- package/dist/core/git/RealGitService.d.ts +184 -0
- package/dist/core/git/RealGitService.d.ts.map +1 -0
- package/dist/core/git/RealGitService.js +430 -0
- package/dist/core/git/RealGitService.js.map +1 -0
- package/dist/core/hooks/executor.d.ts +51 -0
- package/dist/core/hooks/executor.d.ts.map +1 -0
- package/dist/core/hooks/executor.js +317 -0
- package/dist/core/hooks/executor.js.map +1 -0
- package/dist/core/hooks/index.d.ts +9 -0
- package/dist/core/hooks/index.d.ts.map +1 -0
- package/dist/core/hooks/index.js +12 -0
- package/dist/core/hooks/index.js.map +1 -0
- package/dist/core/hooks/registry.d.ts +71 -0
- package/dist/core/hooks/registry.d.ts.map +1 -0
- package/dist/core/hooks/registry.js +231 -0
- package/dist/core/hooks/registry.js.map +1 -0
- package/dist/core/hooks/session_hooks.d.ts +54 -0
- package/dist/core/hooks/session_hooks.d.ts.map +1 -0
- package/dist/core/hooks/session_hooks.js +104 -0
- package/dist/core/hooks/session_hooks.js.map +1 -0
- package/dist/core/hooks/types.d.ts +136 -0
- package/dist/core/hooks/types.d.ts.map +1 -0
- package/dist/core/hooks/types.js +49 -0
- package/dist/core/hooks/types.js.map +1 -0
- package/dist/core/index.d.ts +23 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +22 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/ipc/IPCDrainQueue.d.ts +58 -0
- package/dist/core/ipc/IPCDrainQueue.d.ts.map +1 -0
- package/dist/core/ipc/IPCDrainQueue.js +166 -0
- package/dist/core/ipc/IPCDrainQueue.js.map +1 -0
- package/dist/core/mcp-share/McpBundle.d.ts +43 -0
- package/dist/core/mcp-share/McpBundle.d.ts.map +1 -0
- package/dist/core/mcp-share/McpBundle.js +100 -0
- package/dist/core/mcp-share/McpBundle.js.map +1 -0
- package/dist/core/mcp-share/McpShare.d.ts +110 -0
- package/dist/core/mcp-share/McpShare.d.ts.map +1 -0
- package/dist/core/mcp-share/McpShare.js +311 -0
- package/dist/core/mcp-share/McpShare.js.map +1 -0
- package/dist/core/plugins/PluginManifest.d.ts +128 -0
- package/dist/core/plugins/PluginManifest.d.ts.map +1 -0
- package/dist/core/plugins/PluginManifest.js +166 -0
- package/dist/core/plugins/PluginManifest.js.map +1 -0
- package/dist/core/plugins/PluginStore.d.ts +76 -0
- package/dist/core/plugins/PluginStore.d.ts.map +1 -0
- package/dist/core/plugins/PluginStore.js +511 -0
- package/dist/core/plugins/PluginStore.js.map +1 -0
- package/dist/core/session/SessionCleanup.d.ts +15 -0
- package/dist/core/session/SessionCleanup.d.ts.map +1 -0
- package/dist/core/session/SessionCleanup.js +24 -0
- package/dist/core/session/SessionCleanup.js.map +1 -0
- package/dist/core/session/SessionFactory.d.ts +14 -0
- package/dist/core/session/SessionFactory.d.ts.map +1 -0
- package/dist/core/session/SessionFactory.js +15 -0
- package/dist/core/session/SessionFactory.js.map +1 -0
- package/dist/core/session/SessionFork.d.ts +31 -0
- package/dist/core/session/SessionFork.d.ts.map +1 -0
- package/dist/core/session/SessionFork.js +78 -0
- package/dist/core/session/SessionFork.js.map +1 -0
- package/dist/core/session/SessionInitialization.d.ts +23 -0
- package/dist/core/session/SessionInitialization.d.ts.map +1 -0
- package/dist/core/session/SessionInitialization.js +55 -0
- package/dist/core/session/SessionInitialization.js.map +1 -0
- package/dist/core/session/SessionStateSync.d.ts +14 -0
- package/dist/core/session/SessionStateSync.d.ts.map +1 -0
- package/dist/core/session/SessionStateSync.js +23 -0
- package/dist/core/session/SessionStateSync.js.map +1 -0
- package/dist/core/session/TurnCoordinator.d.ts +3 -0
- package/dist/core/session/TurnCoordinator.d.ts.map +1 -0
- package/dist/core/session/TurnCoordinator.js +2 -0
- package/dist/core/session/TurnCoordinator.js.map +1 -0
- package/dist/core/terminalRestore.d.ts +36 -0
- package/dist/core/terminalRestore.d.ts.map +1 -0
- package/dist/core/terminalRestore.js +52 -0
- package/dist/core/terminalRestore.js.map +1 -0
- package/dist/core/transport/LocalTransport.d.ts +11 -0
- package/dist/core/transport/LocalTransport.d.ts.map +1 -0
- package/dist/core/transport/LocalTransport.js +20 -0
- package/dist/core/transport/LocalTransport.js.map +1 -0
- package/dist/core/transport/RemoteWorkerRegistry.d.ts +25 -0
- package/dist/core/transport/RemoteWorkerRegistry.d.ts.map +1 -0
- package/dist/core/transport/RemoteWorkerRegistry.js +77 -0
- package/dist/core/transport/RemoteWorkerRegistry.js.map +1 -0
- package/dist/core/transport/Transport.d.ts +18 -0
- package/dist/core/transport/Transport.d.ts.map +1 -0
- package/dist/core/transport/Transport.js +17 -0
- package/dist/core/transport/Transport.js.map +1 -0
- package/dist/core/transport/WebSocketTransport.d.ts +41 -0
- package/dist/core/transport/WebSocketTransport.d.ts.map +1 -0
- package/dist/core/transport/WebSocketTransport.js +124 -0
- package/dist/core/transport/WebSocketTransport.js.map +1 -0
- package/dist/core/verify/BughuntVerificationRunner.d.ts +45 -0
- package/dist/core/verify/BughuntVerificationRunner.d.ts.map +1 -0
- package/dist/core/verify/BughuntVerificationRunner.js +109 -0
- package/dist/core/verify/BughuntVerificationRunner.js.map +1 -0
- package/dist/core/verify/TargetServiceManager.d.ts +24 -0
- package/dist/core/verify/TargetServiceManager.d.ts.map +1 -0
- package/dist/core/verify/TargetServiceManager.js +115 -0
- package/dist/core/verify/TargetServiceManager.js.map +1 -0
- package/dist/core/workflow/ExecutionGraph.d.ts +83 -0
- package/dist/core/workflow/ExecutionGraph.d.ts.map +1 -0
- package/dist/core/workflow/ExecutionGraph.js +275 -0
- package/dist/core/workflow/ExecutionGraph.js.map +1 -0
- package/dist/core/workflow/ScheduleTriggerSync.d.ts +22 -0
- package/dist/core/workflow/ScheduleTriggerSync.d.ts.map +1 -0
- package/dist/core/workflow/ScheduleTriggerSync.js +141 -0
- package/dist/core/workflow/ScheduleTriggerSync.js.map +1 -0
- package/dist/core/workflow/VariableResolver.d.ts +83 -0
- package/dist/core/workflow/VariableResolver.d.ts.map +1 -0
- package/dist/core/workflow/VariableResolver.js +277 -0
- package/dist/core/workflow/VariableResolver.js.map +1 -0
- package/dist/core/workflow/WorkflowAnalyzer.d.ts +40 -0
- package/dist/core/workflow/WorkflowAnalyzer.d.ts.map +1 -0
- package/dist/core/workflow/WorkflowAnalyzer.js +381 -0
- package/dist/core/workflow/WorkflowAnalyzer.js.map +1 -0
- package/dist/core/workflow/WorkflowEngine.d.ts +158 -0
- package/dist/core/workflow/WorkflowEngine.d.ts.map +1 -0
- package/dist/core/workflow/WorkflowEngine.js +1249 -0
- package/dist/core/workflow/WorkflowEngine.js.map +1 -0
- package/dist/core/workflow/WorkflowManager.d.ts +129 -0
- package/dist/core/workflow/WorkflowManager.d.ts.map +1 -0
- package/dist/core/workflow/WorkflowManager.js +525 -0
- package/dist/core/workflow/WorkflowManager.js.map +1 -0
- package/dist/core/workflow/executors/AgentNodeExecutor.d.ts +21 -0
- package/dist/core/workflow/executors/AgentNodeExecutor.d.ts.map +1 -0
- package/dist/core/workflow/executors/AgentNodeExecutor.js +44 -0
- package/dist/core/workflow/executors/AgentNodeExecutor.js.map +1 -0
- package/dist/core/workflow/executors/BaseNodeExecutor.d.ts +24 -0
- package/dist/core/workflow/executors/BaseNodeExecutor.d.ts.map +1 -0
- package/dist/core/workflow/executors/BaseNodeExecutor.js +30 -0
- package/dist/core/workflow/executors/BaseNodeExecutor.js.map +1 -0
- package/dist/core/workflow/executors/ConditionNodeExecutor.d.ts +25 -0
- package/dist/core/workflow/executors/ConditionNodeExecutor.d.ts.map +1 -0
- package/dist/core/workflow/executors/ConditionNodeExecutor.js +118 -0
- package/dist/core/workflow/executors/ConditionNodeExecutor.js.map +1 -0
- package/dist/core/workflow/executors/DataNodeExecutor.d.ts +26 -0
- package/dist/core/workflow/executors/DataNodeExecutor.d.ts.map +1 -0
- package/dist/core/workflow/executors/DataNodeExecutor.js +315 -0
- package/dist/core/workflow/executors/DataNodeExecutor.js.map +1 -0
- package/dist/core/workflow/executors/ParallelNodeExecutor.d.ts +17 -0
- package/dist/core/workflow/executors/ParallelNodeExecutor.d.ts.map +1 -0
- package/dist/core/workflow/executors/ParallelNodeExecutor.js +58 -0
- package/dist/core/workflow/executors/ParallelNodeExecutor.js.map +1 -0
- package/dist/core/workflow/executors/ToolNodeExecutor.d.ts +16 -0
- package/dist/core/workflow/executors/ToolNodeExecutor.d.ts.map +1 -0
- package/dist/core/workflow/executors/ToolNodeExecutor.js +83 -0
- package/dist/core/workflow/executors/ToolNodeExecutor.js.map +1 -0
- package/dist/core/workflow/expressionEvaluator.d.ts +27 -0
- package/dist/core/workflow/expressionEvaluator.d.ts.map +1 -0
- package/dist/core/workflow/expressionEvaluator.js +35 -0
- package/dist/core/workflow/expressionEvaluator.js.map +1 -0
- package/dist/core/workflow/safeExpressionEvaluator.d.ts +28 -0
- package/dist/core/workflow/safeExpressionEvaluator.d.ts.map +1 -0
- package/dist/core/workflow/safeExpressionEvaluator.js +298 -0
- package/dist/core/workflow/safeExpressionEvaluator.js.map +1 -0
- package/dist/core/workflow/types.d.ts +258 -0
- package/dist/core/workflow/types.d.ts.map +1 -0
- package/dist/core/workflow/types.js +7 -0
- package/dist/core/workflow/types.js.map +1 -0
- package/dist/core/workflow/variableScope.d.ts +20 -0
- package/dist/core/workflow/variableScope.d.ts.map +1 -0
- package/dist/core/workflow/variableScope.js +42 -0
- package/dist/core/workflow/variableScope.js.map +1 -0
- package/dist/facade/AgentLoop.d.ts +91 -0
- package/dist/facade/AgentLoop.d.ts.map +1 -0
- package/dist/facade/AgentLoop.js +140 -0
- package/dist/facade/AgentLoop.js.map +1 -0
- package/dist/i18n.d.ts +871 -0
- package/dist/i18n.d.ts.map +1 -0
- package/dist/i18n.js +1912 -0
- package/dist/i18n.js.map +1 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +29 -0
- package/dist/index.js.map +1 -0
- package/dist/llm/AnthropicContentGenerator.d.ts +66 -0
- package/dist/llm/AnthropicContentGenerator.d.ts.map +1 -0
- package/dist/llm/AnthropicContentGenerator.js +973 -0
- package/dist/llm/AnthropicContentGenerator.js.map +1 -0
- package/dist/llm/AnthropicToolSchema.d.ts +4 -0
- package/dist/llm/AnthropicToolSchema.d.ts.map +1 -0
- package/dist/llm/AnthropicToolSchema.js +179 -0
- package/dist/llm/AnthropicToolSchema.js.map +1 -0
- package/dist/llm/CircuitBreaker.d.ts +77 -0
- package/dist/llm/CircuitBreaker.d.ts.map +1 -0
- package/dist/llm/CircuitBreaker.js +185 -0
- package/dist/llm/CircuitBreaker.js.map +1 -0
- package/dist/llm/Client.d.ts +59 -0
- package/dist/llm/Client.d.ts.map +1 -0
- package/dist/llm/Client.js +174 -0
- package/dist/llm/Client.js.map +1 -0
- package/dist/llm/ContentGenerationPipeline.d.ts +104 -0
- package/dist/llm/ContentGenerationPipeline.d.ts.map +1 -0
- package/dist/llm/ContentGenerationPipeline.js +85 -0
- package/dist/llm/ContentGenerationPipeline.js.map +1 -0
- package/dist/llm/ContentGenerator.d.ts +137 -0
- package/dist/llm/ContentGenerator.d.ts.map +1 -0
- package/dist/llm/ContentGenerator.js +49 -0
- package/dist/llm/ContentGenerator.js.map +1 -0
- package/dist/llm/CostService.d.ts +121 -0
- package/dist/llm/CostService.d.ts.map +1 -0
- package/dist/llm/CostService.js +287 -0
- package/dist/llm/CostService.js.map +1 -0
- package/dist/llm/LoggingContentGenerator.d.ts +25 -0
- package/dist/llm/LoggingContentGenerator.d.ts.map +1 -0
- package/dist/llm/LoggingContentGenerator.js +82 -0
- package/dist/llm/LoggingContentGenerator.js.map +1 -0
- package/dist/llm/ModelGateway.d.ts +88 -0
- package/dist/llm/ModelGateway.d.ts.map +1 -0
- package/dist/llm/ModelGateway.js +261 -0
- package/dist/llm/ModelGateway.js.map +1 -0
- package/dist/llm/ModelsDevRegistry.d.ts +159 -0
- package/dist/llm/ModelsDevRegistry.d.ts.map +1 -0
- package/dist/llm/ModelsDevRegistry.js +301 -0
- package/dist/llm/ModelsDevRegistry.js.map +1 -0
- package/dist/llm/OpenAIContentGenerator.d.ts +57 -0
- package/dist/llm/OpenAIContentGenerator.d.ts.map +1 -0
- package/dist/llm/OpenAIContentGenerator.js +644 -0
- package/dist/llm/OpenAIContentGenerator.js.map +1 -0
- package/dist/llm/RetryEngine.d.ts +89 -0
- package/dist/llm/RetryEngine.d.ts.map +1 -0
- package/dist/llm/RetryEngine.js +121 -0
- package/dist/llm/RetryEngine.js.map +1 -0
- package/dist/llm/StreamingToolCallParser.d.ts +113 -0
- package/dist/llm/StreamingToolCallParser.d.ts.map +1 -0
- package/dist/llm/StreamingToolCallParser.js +294 -0
- package/dist/llm/StreamingToolCallParser.js.map +1 -0
- package/dist/llm/VercelAIContentGenerator.d.ts +71 -0
- package/dist/llm/VercelAIContentGenerator.d.ts.map +1 -0
- package/dist/llm/VercelAIContentGenerator.js +471 -0
- package/dist/llm/VercelAIContentGenerator.js.map +1 -0
- package/dist/llm/errors.d.ts +44 -0
- package/dist/llm/errors.d.ts.map +1 -0
- package/dist/llm/errors.js +713 -0
- package/dist/llm/errors.js.map +1 -0
- package/dist/llm/http_dispatcher.d.ts +51 -0
- package/dist/llm/http_dispatcher.d.ts.map +1 -0
- package/dist/llm/http_dispatcher.js +151 -0
- package/dist/llm/http_dispatcher.js.map +1 -0
- package/dist/llm/image_blob_store.d.ts +8 -0
- package/dist/llm/image_blob_store.d.ts.map +1 -0
- package/dist/llm/image_blob_store.js +135 -0
- package/dist/llm/image_blob_store.js.map +1 -0
- package/dist/llm/local_vision_fallback.d.ts +37 -0
- package/dist/llm/local_vision_fallback.d.ts.map +1 -0
- package/dist/llm/local_vision_fallback.js +296 -0
- package/dist/llm/local_vision_fallback.js.map +1 -0
- package/dist/llm/message_sanitizer.d.ts +109 -0
- package/dist/llm/message_sanitizer.d.ts.map +1 -0
- package/dist/llm/message_sanitizer.js +536 -0
- package/dist/llm/message_sanitizer.js.map +1 -0
- package/dist/llm/model_capabilities.d.ts +131 -0
- package/dist/llm/model_capabilities.d.ts.map +1 -0
- package/dist/llm/model_capabilities.js +484 -0
- package/dist/llm/model_capabilities.js.map +1 -0
- package/dist/llm/model_capability_config.d.ts +19 -0
- package/dist/llm/model_capability_config.d.ts.map +1 -0
- package/dist/llm/model_capability_config.js +16 -0
- package/dist/llm/model_capability_config.js.map +1 -0
- package/dist/llm/promptCacheKey.d.ts +27 -0
- package/dist/llm/promptCacheKey.d.ts.map +1 -0
- package/dist/llm/promptCacheKey.js +53 -0
- package/dist/llm/promptCacheKey.js.map +1 -0
- package/dist/llm/provider_runtime.d.ts +64 -0
- package/dist/llm/provider_runtime.d.ts.map +1 -0
- package/dist/llm/provider_runtime.js +181 -0
- package/dist/llm/provider_runtime.js.map +1 -0
- package/dist/llm/providers/anthropic.d.ts +7 -0
- package/dist/llm/providers/anthropic.d.ts.map +1 -0
- package/dist/llm/providers/anthropic.js +12 -0
- package/dist/llm/providers/anthropic.js.map +1 -0
- package/dist/llm/providers/bedrock.d.ts +7 -0
- package/dist/llm/providers/bedrock.d.ts.map +1 -0
- package/dist/llm/providers/bedrock.js +14 -0
- package/dist/llm/providers/bedrock.js.map +1 -0
- package/dist/llm/providers/custom.d.ts +10 -0
- package/dist/llm/providers/custom.d.ts.map +1 -0
- package/dist/llm/providers/custom.js +16 -0
- package/dist/llm/providers/custom.js.map +1 -0
- package/dist/llm/providers/google.d.ts +7 -0
- package/dist/llm/providers/google.d.ts.map +1 -0
- package/dist/llm/providers/google.js +12 -0
- package/dist/llm/providers/google.js.map +1 -0
- package/dist/llm/providers/index.d.ts +31 -0
- package/dist/llm/providers/index.d.ts.map +1 -0
- package/dist/llm/providers/index.js +36 -0
- package/dist/llm/providers/index.js.map +1 -0
- package/dist/llm/providers/openai.d.ts +7 -0
- package/dist/llm/providers/openai.d.ts.map +1 -0
- package/dist/llm/providers/openai.js +12 -0
- package/dist/llm/providers/openai.js.map +1 -0
- package/dist/llm/reasoningSampling.d.ts +55 -0
- package/dist/llm/reasoningSampling.d.ts.map +1 -0
- package/dist/llm/reasoningSampling.js +72 -0
- package/dist/llm/reasoningSampling.js.map +1 -0
- package/dist/llm/tesseractResolver.d.ts +41 -0
- package/dist/llm/tesseractResolver.d.ts.map +1 -0
- package/dist/llm/tesseractResolver.js +103 -0
- package/dist/llm/tesseractResolver.js.map +1 -0
- package/dist/llm/tokenLimits.d.ts +32 -0
- package/dist/llm/tokenLimits.d.ts.map +1 -0
- package/dist/llm/tokenLimits.js +91 -0
- package/dist/llm/tokenLimits.js.map +1 -0
- package/dist/llm/token_counter.d.ts +82 -0
- package/dist/llm/token_counter.d.ts.map +1 -0
- package/dist/llm/token_counter.js +184 -0
- package/dist/llm/token_counter.js.map +1 -0
- package/dist/llm/types.d.ts +192 -0
- package/dist/llm/types.d.ts.map +1 -0
- package/dist/llm/types.js +10 -0
- package/dist/llm/types.js.map +1 -0
- package/dist/llm/usageExtractor.d.ts +36 -0
- package/dist/llm/usageExtractor.d.ts.map +1 -0
- package/dist/llm/usageExtractor.js +156 -0
- package/dist/llm/usageExtractor.js.map +1 -0
- package/dist/mcp-servers/browser-server.d.ts +12 -0
- package/dist/mcp-servers/browser-server.d.ts.map +1 -0
- package/dist/mcp-servers/browser-server.js +264 -0
- package/dist/mcp-servers/browser-server.js.map +1 -0
- package/dist/mcp-servers/code-intelligence-server.d.ts +8 -0
- package/dist/mcp-servers/code-intelligence-server.d.ts.map +1 -0
- package/dist/mcp-servers/code-intelligence-server.js +218 -0
- package/dist/mcp-servers/code-intelligence-server.js.map +1 -0
- package/dist/mcp-servers/memory-server.d.ts +9 -0
- package/dist/mcp-servers/memory-server.d.ts.map +1 -0
- package/dist/mcp-servers/memory-server.js +142 -0
- package/dist/mcp-servers/memory-server.js.map +1 -0
- package/dist/mcp-servers/session-server.d.ts +8 -0
- package/dist/mcp-servers/session-server.d.ts.map +1 -0
- package/dist/mcp-servers/session-server.js +113 -0
- package/dist/mcp-servers/session-server.js.map +1 -0
- package/dist/mcp-servers/shared.d.ts +41 -0
- package/dist/mcp-servers/shared.d.ts.map +1 -0
- package/dist/mcp-servers/shared.js +34 -0
- package/dist/mcp-servers/shared.js.map +1 -0
- package/dist/memory/AssetUsageStore.d.ts +63 -0
- package/dist/memory/AssetUsageStore.d.ts.map +1 -0
- package/dist/memory/AssetUsageStore.js +117 -0
- package/dist/memory/AssetUsageStore.js.map +1 -0
- package/dist/memory/AutoDreamTrigger.d.ts +37 -0
- package/dist/memory/AutoDreamTrigger.d.ts.map +1 -0
- package/dist/memory/AutoDreamTrigger.js +79 -0
- package/dist/memory/AutoDreamTrigger.js.map +1 -0
- package/dist/memory/DistillCommand.d.ts +89 -0
- package/dist/memory/DistillCommand.d.ts.map +1 -0
- package/dist/memory/DistillCommand.js +418 -0
- package/dist/memory/DistillCommand.js.map +1 -0
- package/dist/memory/DreamCommand.d.ts +54 -0
- package/dist/memory/DreamCommand.d.ts.map +1 -0
- package/dist/memory/DreamCommand.js +289 -0
- package/dist/memory/DreamCommand.js.map +1 -0
- package/dist/memory/MemoryDeduplicator.d.ts +38 -0
- package/dist/memory/MemoryDeduplicator.d.ts.map +1 -0
- package/dist/memory/MemoryDeduplicator.js +125 -0
- package/dist/memory/MemoryDeduplicator.js.map +1 -0
- package/dist/memory/MemoryEmbedding.d.ts +25 -0
- package/dist/memory/MemoryEmbedding.d.ts.map +1 -0
- package/dist/memory/MemoryEmbedding.js +104 -0
- package/dist/memory/MemoryEmbedding.js.map +1 -0
- package/dist/memory/MemoryFTS.d.ts +55 -0
- package/dist/memory/MemoryFTS.d.ts.map +1 -0
- package/dist/memory/MemoryFTS.js +333 -0
- package/dist/memory/MemoryFTS.js.map +1 -0
- package/dist/memory/MemoryGC.d.ts +40 -0
- package/dist/memory/MemoryGC.d.ts.map +1 -0
- package/dist/memory/MemoryGC.js +146 -0
- package/dist/memory/MemoryGC.js.map +1 -0
- package/dist/memory/MemoryMaintenance.d.ts +31 -0
- package/dist/memory/MemoryMaintenance.d.ts.map +1 -0
- package/dist/memory/MemoryMaintenance.js +111 -0
- package/dist/memory/MemoryMaintenance.js.map +1 -0
- package/dist/memory/MemoryMaintenanceEvents.d.ts +24 -0
- package/dist/memory/MemoryMaintenanceEvents.d.ts.map +1 -0
- package/dist/memory/MemoryMaintenanceEvents.js +47 -0
- package/dist/memory/MemoryMaintenanceEvents.js.map +1 -0
- package/dist/memory/MemoryMaintenanceStatus.d.ts +61 -0
- package/dist/memory/MemoryMaintenanceStatus.d.ts.map +1 -0
- package/dist/memory/MemoryMaintenanceStatus.js +165 -0
- package/dist/memory/MemoryMaintenanceStatus.js.map +1 -0
- package/dist/memory/MemoryManager.d.ts +80 -0
- package/dist/memory/MemoryManager.d.ts.map +1 -0
- package/dist/memory/MemoryManager.js +310 -0
- package/dist/memory/MemoryManager.js.map +1 -0
- package/dist/memory/MemoryReconciler.d.ts +27 -0
- package/dist/memory/MemoryReconciler.d.ts.map +1 -0
- package/dist/memory/MemoryReconciler.js +163 -0
- package/dist/memory/MemoryReconciler.js.map +1 -0
- package/dist/memory/MemoryService.d.ts +82 -0
- package/dist/memory/MemoryService.d.ts.map +1 -0
- package/dist/memory/MemoryService.js +114 -0
- package/dist/memory/MemoryService.js.map +1 -0
- package/dist/memory/TrajectoryReader.d.ts +39 -0
- package/dist/memory/TrajectoryReader.d.ts.map +1 -0
- package/dist/memory/TrajectoryReader.js +150 -0
- package/dist/memory/TrajectoryReader.js.map +1 -0
- package/dist/memory/types.d.ts +122 -0
- package/dist/memory/types.d.ts.map +1 -0
- package/dist/memory/types.js +10 -0
- package/dist/memory/types.js.map +1 -0
- package/dist/plugins/hooks/ChatTransformHook.d.ts +57 -0
- package/dist/plugins/hooks/ChatTransformHook.d.ts.map +1 -0
- package/dist/plugins/hooks/ChatTransformHook.js +59 -0
- package/dist/plugins/hooks/ChatTransformHook.js.map +1 -0
- package/dist/plugins/hooks/ToolHooks.d.ts +125 -0
- package/dist/plugins/hooks/ToolHooks.d.ts.map +1 -0
- package/dist/plugins/hooks/ToolHooks.js +106 -0
- package/dist/plugins/hooks/ToolHooks.js.map +1 -0
- package/dist/plugins/hooks/index.d.ts +8 -0
- package/dist/plugins/hooks/index.d.ts.map +1 -0
- package/dist/plugins/hooks/index.js +6 -0
- package/dist/plugins/hooks/index.js.map +1 -0
- package/dist/runtime/LoggingRuntime.d.ts +35 -0
- package/dist/runtime/LoggingRuntime.d.ts.map +1 -0
- package/dist/runtime/LoggingRuntime.js +87 -0
- package/dist/runtime/LoggingRuntime.js.map +1 -0
- package/dist/runtime/SessionManagerRuntime.d.ts +475 -0
- package/dist/runtime/SessionManagerRuntime.d.ts.map +1 -0
- package/dist/runtime/SessionManagerRuntime.js +2299 -0
- package/dist/runtime/SessionManagerRuntime.js.map +1 -0
- package/dist/runtime/SessionRuntime.d.ts +62 -0
- package/dist/runtime/SessionRuntime.d.ts.map +1 -0
- package/dist/runtime/SessionRuntime.js +241 -0
- package/dist/runtime/SessionRuntime.js.map +1 -0
- package/dist/tools/LazyToolProxy.d.ts +33 -0
- package/dist/tools/LazyToolProxy.d.ts.map +1 -0
- package/dist/tools/LazyToolProxy.js +59 -0
- package/dist/tools/LazyToolProxy.js.map +1 -0
- package/dist/tools/LspClient.d.ts +94 -0
- package/dist/tools/LspClient.d.ts.map +1 -0
- package/dist/tools/LspClient.js +429 -0
- package/dist/tools/LspClient.js.map +1 -0
- package/dist/tools/MetaTool.d.ts +22 -0
- package/dist/tools/MetaTool.d.ts.map +1 -0
- package/dist/tools/MetaTool.js +21 -0
- package/dist/tools/MetaTool.js.map +1 -0
- package/dist/tools/Registry.d.ts +156 -0
- package/dist/tools/Registry.d.ts.map +1 -0
- package/dist/tools/Registry.js +1484 -0
- package/dist/tools/Registry.js.map +1 -0
- package/dist/tools/SchemaUtils.d.ts +5 -0
- package/dist/tools/SchemaUtils.d.ts.map +1 -0
- package/dist/tools/SchemaUtils.js +215 -0
- package/dist/tools/SchemaUtils.js.map +1 -0
- package/dist/tools/Tool.d.ts +90 -0
- package/dist/tools/Tool.d.ts.map +1 -0
- package/dist/tools/Tool.js +128 -0
- package/dist/tools/Tool.js.map +1 -0
- package/dist/tools/ToolMetadata.d.ts +35 -0
- package/dist/tools/ToolMetadata.d.ts.map +1 -0
- package/dist/tools/ToolMetadata.js +139 -0
- package/dist/tools/ToolMetadata.js.map +1 -0
- package/dist/tools/UserToolFactory.d.ts +34 -0
- package/dist/tools/UserToolFactory.d.ts.map +1 -0
- package/dist/tools/UserToolFactory.js +249 -0
- package/dist/tools/UserToolFactory.js.map +1 -0
- package/dist/tools/implementations/AddEdgeTool.d.ts +22 -0
- package/dist/tools/implementations/AddEdgeTool.d.ts.map +1 -0
- package/dist/tools/implementations/AddEdgeTool.js +43 -0
- package/dist/tools/implementations/AddEdgeTool.js.map +1 -0
- package/dist/tools/implementations/AstQueryTool.d.ts +40 -0
- package/dist/tools/implementations/AstQueryTool.d.ts.map +1 -0
- package/dist/tools/implementations/AstQueryTool.js +142 -0
- package/dist/tools/implementations/AstQueryTool.js.map +1 -0
- package/dist/tools/implementations/AttemptCompletionTool.d.ts +178 -0
- package/dist/tools/implementations/AttemptCompletionTool.d.ts.map +1 -0
- package/dist/tools/implementations/AttemptCompletionTool.js +384 -0
- package/dist/tools/implementations/AttemptCompletionTool.js.map +1 -0
- package/dist/tools/implementations/BlackboardTool.d.ts +80 -0
- package/dist/tools/implementations/BlackboardTool.d.ts.map +1 -0
- package/dist/tools/implementations/BlackboardTool.js +87 -0
- package/dist/tools/implementations/BlackboardTool.js.map +1 -0
- package/dist/tools/implementations/BrowserActionTool.d.ts +109 -0
- package/dist/tools/implementations/BrowserActionTool.d.ts.map +1 -0
- package/dist/tools/implementations/BrowserActionTool.js +265 -0
- package/dist/tools/implementations/BrowserActionTool.js.map +1 -0
- package/dist/tools/implementations/BrowserManager.d.ts +191 -0
- package/dist/tools/implementations/BrowserManager.d.ts.map +1 -0
- package/dist/tools/implementations/BrowserManager.js +619 -0
- package/dist/tools/implementations/BrowserManager.js.map +1 -0
- package/dist/tools/implementations/BrowserVisualVerifyTool.d.ts +56 -0
- package/dist/tools/implementations/BrowserVisualVerifyTool.d.ts.map +1 -0
- package/dist/tools/implementations/BrowserVisualVerifyTool.js +269 -0
- package/dist/tools/implementations/BrowserVisualVerifyTool.js.map +1 -0
- package/dist/tools/implementations/BughuntScanToolWrappers.d.ts +28 -0
- package/dist/tools/implementations/BughuntScanToolWrappers.d.ts.map +1 -0
- package/dist/tools/implementations/BughuntScanToolWrappers.js +183 -0
- package/dist/tools/implementations/BughuntScanToolWrappers.js.map +1 -0
- package/dist/tools/implementations/BughuntScanTools.d.ts +48 -0
- package/dist/tools/implementations/BughuntScanTools.d.ts.map +1 -0
- package/dist/tools/implementations/BughuntScanTools.js +502 -0
- package/dist/tools/implementations/BughuntScanTools.js.map +1 -0
- package/dist/tools/implementations/BughuntTaintScanner.d.ts +11 -0
- package/dist/tools/implementations/BughuntTaintScanner.d.ts.map +1 -0
- package/dist/tools/implementations/BughuntTaintScanner.js +82 -0
- package/dist/tools/implementations/BughuntTaintScanner.js.map +1 -0
- package/dist/tools/implementations/CodeSearch.d.ts +55 -0
- package/dist/tools/implementations/CodeSearch.d.ts.map +1 -0
- package/dist/tools/implementations/CodeSearch.js +564 -0
- package/dist/tools/implementations/CodeSearch.js.map +1 -0
- package/dist/tools/implementations/CodeSearchTool.d.ts +17 -0
- package/dist/tools/implementations/CodeSearchTool.d.ts.map +1 -0
- package/dist/tools/implementations/CodeSearchTool.js +35 -0
- package/dist/tools/implementations/CodeSearchTool.js.map +1 -0
- package/dist/tools/implementations/DeclareAssumptionTool.d.ts +21 -0
- package/dist/tools/implementations/DeclareAssumptionTool.d.ts.map +1 -0
- package/dist/tools/implementations/DeclareAssumptionTool.js +60 -0
- package/dist/tools/implementations/DeclareAssumptionTool.js.map +1 -0
- package/dist/tools/implementations/DeclareIntentTool.d.ts +14 -0
- package/dist/tools/implementations/DeclareIntentTool.d.ts.map +1 -0
- package/dist/tools/implementations/DeclareIntentTool.js +41 -0
- package/dist/tools/implementations/DeclareIntentTool.js.map +1 -0
- package/dist/tools/implementations/DesignAssetTool.d.ts +25 -0
- package/dist/tools/implementations/DesignAssetTool.d.ts.map +1 -0
- package/dist/tools/implementations/DesignAssetTool.js +197 -0
- package/dist/tools/implementations/DesignAssetTool.js.map +1 -0
- package/dist/tools/implementations/EditDocxTool.d.ts +60 -0
- package/dist/tools/implementations/EditDocxTool.d.ts.map +1 -0
- package/dist/tools/implementations/EditDocxTool.js +344 -0
- package/dist/tools/implementations/EditDocxTool.js.map +1 -0
- package/dist/tools/implementations/EditPptxTool.d.ts +100 -0
- package/dist/tools/implementations/EditPptxTool.d.ts.map +1 -0
- package/dist/tools/implementations/EditPptxTool.js +447 -0
- package/dist/tools/implementations/EditPptxTool.js.map +1 -0
- package/dist/tools/implementations/EditXlsxTool.d.ts +58 -0
- package/dist/tools/implementations/EditXlsxTool.d.ts.map +1 -0
- package/dist/tools/implementations/EditXlsxTool.js +210 -0
- package/dist/tools/implementations/EditXlsxTool.js.map +1 -0
- package/dist/tools/implementations/ExecutionSandbox.d.ts +51 -0
- package/dist/tools/implementations/ExecutionSandbox.d.ts.map +1 -0
- package/dist/tools/implementations/ExecutionSandbox.js +415 -0
- package/dist/tools/implementations/ExecutionSandbox.js.map +1 -0
- package/dist/tools/implementations/FileCreate.d.ts +15 -0
- package/dist/tools/implementations/FileCreate.d.ts.map +1 -0
- package/dist/tools/implementations/FileCreate.js +68 -0
- package/dist/tools/implementations/FileCreate.js.map +1 -0
- package/dist/tools/implementations/FileParser.d.ts +41 -0
- package/dist/tools/implementations/FileParser.d.ts.map +1 -0
- package/dist/tools/implementations/FileParser.js +524 -0
- package/dist/tools/implementations/FileParser.js.map +1 -0
- package/dist/tools/implementations/FileRead.d.ts +14 -0
- package/dist/tools/implementations/FileRead.d.ts.map +1 -0
- package/dist/tools/implementations/FileRead.js +311 -0
- package/dist/tools/implementations/FileRead.js.map +1 -0
- package/dist/tools/implementations/GenerateCanvasTool.d.ts +109 -0
- package/dist/tools/implementations/GenerateCanvasTool.d.ts.map +1 -0
- package/dist/tools/implementations/GenerateCanvasTool.js +364 -0
- package/dist/tools/implementations/GenerateCanvasTool.js.map +1 -0
- package/dist/tools/implementations/GenerateDocxTool.d.ts +36 -0
- package/dist/tools/implementations/GenerateDocxTool.d.ts.map +1 -0
- package/dist/tools/implementations/GenerateDocxTool.js +327 -0
- package/dist/tools/implementations/GenerateDocxTool.js.map +1 -0
- package/dist/tools/implementations/GenerateHtmlDocumentTool.d.ts +149 -0
- package/dist/tools/implementations/GenerateHtmlDocumentTool.d.ts.map +1 -0
- package/dist/tools/implementations/GenerateHtmlDocumentTool.js +111 -0
- package/dist/tools/implementations/GenerateHtmlDocumentTool.js.map +1 -0
- package/dist/tools/implementations/GenerateHtmlPresentationTool.d.ts +20 -0
- package/dist/tools/implementations/GenerateHtmlPresentationTool.d.ts.map +1 -0
- package/dist/tools/implementations/GenerateHtmlPresentationTool.js +77 -0
- package/dist/tools/implementations/GenerateHtmlPresentationTool.js.map +1 -0
- package/dist/tools/implementations/GeneratePdfTool.d.ts +48 -0
- package/dist/tools/implementations/GeneratePdfTool.d.ts.map +1 -0
- package/dist/tools/implementations/GeneratePdfTool.js +301 -0
- package/dist/tools/implementations/GeneratePdfTool.js.map +1 -0
- package/dist/tools/implementations/GeneratePptxTool.d.ts +91 -0
- package/dist/tools/implementations/GeneratePptxTool.d.ts.map +1 -0
- package/dist/tools/implementations/GeneratePptxTool.js +570 -0
- package/dist/tools/implementations/GeneratePptxTool.js.map +1 -0
- package/dist/tools/implementations/GenerateSlidevTool.d.ts +26 -0
- package/dist/tools/implementations/GenerateSlidevTool.d.ts.map +1 -0
- package/dist/tools/implementations/GenerateSlidevTool.js +128 -0
- package/dist/tools/implementations/GenerateSlidevTool.js.map +1 -0
- package/dist/tools/implementations/GenerateXlsxTool.d.ts +63 -0
- package/dist/tools/implementations/GenerateXlsxTool.d.ts.map +1 -0
- package/dist/tools/implementations/GenerateXlsxTool.js +202 -0
- package/dist/tools/implementations/GenerateXlsxTool.js.map +1 -0
- package/dist/tools/implementations/GetTerminalOutput.d.ts +15 -0
- package/dist/tools/implementations/GetTerminalOutput.d.ts.map +1 -0
- package/dist/tools/implementations/GetTerminalOutput.js +97 -0
- package/dist/tools/implementations/GetTerminalOutput.js.map +1 -0
- package/dist/tools/implementations/GitTool.d.ts +70 -0
- package/dist/tools/implementations/GitTool.d.ts.map +1 -0
- package/dist/tools/implementations/GitTool.js +321 -0
- package/dist/tools/implementations/GitTool.js.map +1 -0
- package/dist/tools/implementations/GlobTool.d.ts +16 -0
- package/dist/tools/implementations/GlobTool.d.ts.map +1 -0
- package/dist/tools/implementations/GlobTool.js +85 -0
- package/dist/tools/implementations/GlobTool.js.map +1 -0
- package/dist/tools/implementations/HttpRequestTool.d.ts +33 -0
- package/dist/tools/implementations/HttpRequestTool.d.ts.map +1 -0
- package/dist/tools/implementations/HttpRequestTool.js +197 -0
- package/dist/tools/implementations/HttpRequestTool.js.map +1 -0
- package/dist/tools/implementations/InspectDocxTool.d.ts +14 -0
- package/dist/tools/implementations/InspectDocxTool.d.ts.map +1 -0
- package/dist/tools/implementations/InspectDocxTool.js +78 -0
- package/dist/tools/implementations/InspectDocxTool.js.map +1 -0
- package/dist/tools/implementations/InspectPptxTool.d.ts +14 -0
- package/dist/tools/implementations/InspectPptxTool.d.ts.map +1 -0
- package/dist/tools/implementations/InspectPptxTool.js +81 -0
- package/dist/tools/implementations/InspectPptxTool.js.map +1 -0
- package/dist/tools/implementations/ListDir.d.ts +15 -0
- package/dist/tools/implementations/ListDir.d.ts.map +1 -0
- package/dist/tools/implementations/ListDir.js +156 -0
- package/dist/tools/implementations/ListDir.js.map +1 -0
- package/dist/tools/implementations/LspTool.d.ts +27 -0
- package/dist/tools/implementations/LspTool.d.ts.map +1 -0
- package/dist/tools/implementations/LspTool.js +111 -0
- package/dist/tools/implementations/LspTool.js.map +1 -0
- package/dist/tools/implementations/McpTool.d.ts +41 -0
- package/dist/tools/implementations/McpTool.d.ts.map +1 -0
- package/dist/tools/implementations/McpTool.js +103 -0
- package/dist/tools/implementations/McpTool.js.map +1 -0
- package/dist/tools/implementations/MemoryTool.d.ts +90 -0
- package/dist/tools/implementations/MemoryTool.d.ts.map +1 -0
- package/dist/tools/implementations/MemoryTool.js +167 -0
- package/dist/tools/implementations/MemoryTool.js.map +1 -0
- package/dist/tools/implementations/NodeReplTool.d.ts +20 -0
- package/dist/tools/implementations/NodeReplTool.d.ts.map +1 -0
- package/dist/tools/implementations/NodeReplTool.js +109 -0
- package/dist/tools/implementations/NodeReplTool.js.map +1 -0
- package/dist/tools/implementations/OCRTool.d.ts +33 -0
- package/dist/tools/implementations/OCRTool.d.ts.map +1 -0
- package/dist/tools/implementations/OCRTool.js +253 -0
- package/dist/tools/implementations/OCRTool.js.map +1 -0
- package/dist/tools/implementations/OfficeAssetTool.d.ts +42 -0
- package/dist/tools/implementations/OfficeAssetTool.d.ts.map +1 -0
- package/dist/tools/implementations/OfficeAssetTool.js +210 -0
- package/dist/tools/implementations/OfficeAssetTool.js.map +1 -0
- package/dist/tools/implementations/OfficeOpsTool.d.ts +33 -0
- package/dist/tools/implementations/OfficeOpsTool.d.ts.map +1 -0
- package/dist/tools/implementations/OfficeOpsTool.js +221 -0
- package/dist/tools/implementations/OfficeOpsTool.js.map +1 -0
- package/dist/tools/implementations/OfficeReviewTool.d.ts +75 -0
- package/dist/tools/implementations/OfficeReviewTool.d.ts.map +1 -0
- package/dist/tools/implementations/OfficeReviewTool.js +125 -0
- package/dist/tools/implementations/OfficeReviewTool.js.map +1 -0
- package/dist/tools/implementations/OfficeRuntimeTool.d.ts +40 -0
- package/dist/tools/implementations/OfficeRuntimeTool.d.ts.map +1 -0
- package/dist/tools/implementations/OfficeRuntimeTool.js +266 -0
- package/dist/tools/implementations/OfficeRuntimeTool.js.map +1 -0
- package/dist/tools/implementations/OfficeXmlBuilder.d.ts +226 -0
- package/dist/tools/implementations/OfficeXmlBuilder.d.ts.map +1 -0
- package/dist/tools/implementations/OfficeXmlBuilder.js +560 -0
- package/dist/tools/implementations/OfficeXmlBuilder.js.map +1 -0
- package/dist/tools/implementations/ParallelReadBatchTool.d.ts +21 -0
- package/dist/tools/implementations/ParallelReadBatchTool.d.ts.map +1 -0
- package/dist/tools/implementations/ParallelReadBatchTool.js +90 -0
- package/dist/tools/implementations/ParallelReadBatchTool.js.map +1 -0
- package/dist/tools/implementations/ParseFileTool.d.ts +20 -0
- package/dist/tools/implementations/ParseFileTool.d.ts.map +1 -0
- package/dist/tools/implementations/ParseFileTool.js +59 -0
- package/dist/tools/implementations/ParseFileTool.js.map +1 -0
- package/dist/tools/implementations/PythonExec.d.ts +38 -0
- package/dist/tools/implementations/PythonExec.d.ts.map +1 -0
- package/dist/tools/implementations/PythonExec.js +204 -0
- package/dist/tools/implementations/PythonExec.js.map +1 -0
- package/dist/tools/implementations/PythonExecTool.d.ts +15 -0
- package/dist/tools/implementations/PythonExecTool.d.ts.map +1 -0
- package/dist/tools/implementations/PythonExecTool.js +54 -0
- package/dist/tools/implementations/PythonExecTool.js.map +1 -0
- package/dist/tools/implementations/ReadGraphTool.d.ts +31 -0
- package/dist/tools/implementations/ReadGraphTool.d.ts.map +1 -0
- package/dist/tools/implementations/ReadGraphTool.js +259 -0
- package/dist/tools/implementations/ReadGraphTool.js.map +1 -0
- package/dist/tools/implementations/ScreenshotTool.d.ts +27 -0
- package/dist/tools/implementations/ScreenshotTool.d.ts.map +1 -0
- package/dist/tools/implementations/ScreenshotTool.js +124 -0
- package/dist/tools/implementations/ScreenshotTool.js.map +1 -0
- package/dist/tools/implementations/SendMessageTool.d.ts +21 -0
- package/dist/tools/implementations/SendMessageTool.d.ts.map +1 -0
- package/dist/tools/implementations/SendMessageTool.js +75 -0
- package/dist/tools/implementations/SendMessageTool.js.map +1 -0
- package/dist/tools/implementations/SessionArtifacts.d.ts +22 -0
- package/dist/tools/implementations/SessionArtifacts.d.ts.map +1 -0
- package/dist/tools/implementations/SessionArtifacts.js +141 -0
- package/dist/tools/implementations/SessionArtifacts.js.map +1 -0
- package/dist/tools/implementations/SessionInfoTool.d.ts +10 -0
- package/dist/tools/implementations/SessionInfoTool.d.ts.map +1 -0
- package/dist/tools/implementations/SessionInfoTool.js +38 -0
- package/dist/tools/implementations/SessionInfoTool.js.map +1 -0
- package/dist/tools/implementations/Shell.d.ts +77 -0
- package/dist/tools/implementations/Shell.d.ts.map +1 -0
- package/dist/tools/implementations/Shell.js +772 -0
- package/dist/tools/implementations/Shell.js.map +1 -0
- package/dist/tools/implementations/StructuredPatchTool.d.ts +57 -0
- package/dist/tools/implementations/StructuredPatchTool.d.ts.map +1 -0
- package/dist/tools/implementations/StructuredPatchTool.js +970 -0
- package/dist/tools/implementations/StructuredPatchTool.js.map +1 -0
- package/dist/tools/implementations/SupersedeNodeTool.d.ts +19 -0
- package/dist/tools/implementations/SupersedeNodeTool.d.ts.map +1 -0
- package/dist/tools/implementations/SupersedeNodeTool.js +50 -0
- package/dist/tools/implementations/SupersedeNodeTool.js.map +1 -0
- package/dist/tools/implementations/TeamCreate.d.ts +20 -0
- package/dist/tools/implementations/TeamCreate.d.ts.map +1 -0
- package/dist/tools/implementations/TeamCreate.js +99 -0
- package/dist/tools/implementations/TeamCreate.js.map +1 -0
- package/dist/tools/implementations/TeamDelete.d.ts +11 -0
- package/dist/tools/implementations/TeamDelete.d.ts.map +1 -0
- package/dist/tools/implementations/TeamDelete.js +55 -0
- package/dist/tools/implementations/TeamDelete.js.map +1 -0
- package/dist/tools/implementations/TeamEdit.d.ts +35 -0
- package/dist/tools/implementations/TeamEdit.d.ts.map +1 -0
- package/dist/tools/implementations/TeamEdit.js +254 -0
- package/dist/tools/implementations/TeamEdit.js.map +1 -0
- package/dist/tools/implementations/TeamInboxCheck.d.ts +22 -0
- package/dist/tools/implementations/TeamInboxCheck.d.ts.map +1 -0
- package/dist/tools/implementations/TeamInboxCheck.js +111 -0
- package/dist/tools/implementations/TeamInboxCheck.js.map +1 -0
- package/dist/tools/implementations/TeamInboxTool.d.ts +13 -0
- package/dist/tools/implementations/TeamInboxTool.d.ts.map +1 -0
- package/dist/tools/implementations/TeamInboxTool.js +17 -0
- package/dist/tools/implementations/TeamInboxTool.js.map +1 -0
- package/dist/tools/implementations/TeamListMembers.d.ts +16 -0
- package/dist/tools/implementations/TeamListMembers.d.ts.map +1 -0
- package/dist/tools/implementations/TeamListMembers.js +34 -0
- package/dist/tools/implementations/TeamListMembers.js.map +1 -0
- package/dist/tools/implementations/TeamManageTool.d.ts +33 -0
- package/dist/tools/implementations/TeamManageTool.d.ts.map +1 -0
- package/dist/tools/implementations/TeamManageTool.js +68 -0
- package/dist/tools/implementations/TeamManageTool.js.map +1 -0
- package/dist/tools/implementations/TeamMessageTool.d.ts +94 -0
- package/dist/tools/implementations/TeamMessageTool.d.ts.map +1 -0
- package/dist/tools/implementations/TeamMessageTool.js +89 -0
- package/dist/tools/implementations/TeamMessageTool.js.map +1 -0
- package/dist/tools/implementations/TeamSendMessage.d.ts +57 -0
- package/dist/tools/implementations/TeamSendMessage.d.ts.map +1 -0
- package/dist/tools/implementations/TeamSendMessage.js +290 -0
- package/dist/tools/implementations/TeamSendMessage.js.map +1 -0
- package/dist/tools/implementations/TeamStatus.d.ts +18 -0
- package/dist/tools/implementations/TeamStatus.d.ts.map +1 -0
- package/dist/tools/implementations/TeamStatus.js +106 -0
- package/dist/tools/implementations/TeamStatus.js.map +1 -0
- package/dist/tools/implementations/TeamTaskBoard.d.ts +22 -0
- package/dist/tools/implementations/TeamTaskBoard.d.ts.map +1 -0
- package/dist/tools/implementations/TeamTaskBoard.js +119 -0
- package/dist/tools/implementations/TeamTaskBoard.js.map +1 -0
- package/dist/tools/implementations/TerminalControl.d.ts +27 -0
- package/dist/tools/implementations/TerminalControl.d.ts.map +1 -0
- package/dist/tools/implementations/TerminalControl.js +198 -0
- package/dist/tools/implementations/TerminalControl.js.map +1 -0
- package/dist/tools/implementations/TerminalSessionManager.d.ts +196 -0
- package/dist/tools/implementations/TerminalSessionManager.d.ts.map +1 -0
- package/dist/tools/implementations/TerminalSessionManager.js +525 -0
- package/dist/tools/implementations/TerminalSessionManager.js.map +1 -0
- package/dist/tools/implementations/ToolDiscoveryTool.d.ts +24 -0
- package/dist/tools/implementations/ToolDiscoveryTool.d.ts.map +1 -0
- package/dist/tools/implementations/ToolDiscoveryTool.js +138 -0
- package/dist/tools/implementations/ToolDiscoveryTool.js.map +1 -0
- package/dist/tools/implementations/ToolPreflightTool.d.ts +17 -0
- package/dist/tools/implementations/ToolPreflightTool.d.ts.map +1 -0
- package/dist/tools/implementations/ToolPreflightTool.js +27 -0
- package/dist/tools/implementations/ToolPreflightTool.js.map +1 -0
- package/dist/tools/implementations/TreeSitterSecurityEngine.d.ts +67 -0
- package/dist/tools/implementations/TreeSitterSecurityEngine.d.ts.map +1 -0
- package/dist/tools/implementations/TreeSitterSecurityEngine.js +355 -0
- package/dist/tools/implementations/TreeSitterSecurityEngine.js.map +1 -0
- package/dist/tools/implementations/ValidateOfficeTool.d.ts +33 -0
- package/dist/tools/implementations/ValidateOfficeTool.d.ts.map +1 -0
- package/dist/tools/implementations/ValidateOfficeTool.js +50 -0
- package/dist/tools/implementations/ValidateOfficeTool.js.map +1 -0
- package/dist/tools/implementations/VisualContactSheetTool.d.ts +32 -0
- package/dist/tools/implementations/VisualContactSheetTool.d.ts.map +1 -0
- package/dist/tools/implementations/VisualContactSheetTool.js +234 -0
- package/dist/tools/implementations/VisualContactSheetTool.js.map +1 -0
- package/dist/tools/implementations/WebCommon.d.ts +12 -0
- package/dist/tools/implementations/WebCommon.d.ts.map +1 -0
- package/dist/tools/implementations/WebCommon.js +286 -0
- package/dist/tools/implementations/WebCommon.js.map +1 -0
- package/dist/tools/implementations/WebFetch.d.ts +38 -0
- package/dist/tools/implementations/WebFetch.d.ts.map +1 -0
- package/dist/tools/implementations/WebFetch.js +294 -0
- package/dist/tools/implementations/WebFetch.js.map +1 -0
- package/dist/tools/implementations/WebSearch.d.ts +45 -0
- package/dist/tools/implementations/WebSearch.d.ts.map +1 -0
- package/dist/tools/implementations/WebSearch.js +432 -0
- package/dist/tools/implementations/WebSearch.js.map +1 -0
- package/dist/tools/implementations/WorkNoteTool.d.ts +71 -0
- package/dist/tools/implementations/WorkNoteTool.d.ts.map +1 -0
- package/dist/tools/implementations/WorkNoteTool.js +238 -0
- package/dist/tools/implementations/WorkNoteTool.js.map +1 -0
- package/dist/tools/implementations/WriteFactTool.d.ts +34 -0
- package/dist/tools/implementations/WriteFactTool.d.ts.map +1 -0
- package/dist/tools/implementations/WriteFactTool.js +43 -0
- package/dist/tools/implementations/WriteFactTool.js.map +1 -0
- package/dist/tools/implementations/office/ConditionalFormattingBuilder.d.ts +149 -0
- package/dist/tools/implementations/office/ConditionalFormattingBuilder.d.ts.map +1 -0
- package/dist/tools/implementations/office/ConditionalFormattingBuilder.js +259 -0
- package/dist/tools/implementations/office/ConditionalFormattingBuilder.js.map +1 -0
- package/dist/tools/implementations/office/ExcelWorkbook.d.ts +21 -0
- package/dist/tools/implementations/office/ExcelWorkbook.d.ts.map +1 -0
- package/dist/tools/implementations/office/ExcelWorkbook.js +114 -0
- package/dist/tools/implementations/office/ExcelWorkbook.js.map +1 -0
- package/dist/tools/implementations/office/OfficeAuditLog.d.ts +28 -0
- package/dist/tools/implementations/office/OfficeAuditLog.d.ts.map +1 -0
- package/dist/tools/implementations/office/OfficeAuditLog.js +221 -0
- package/dist/tools/implementations/office/OfficeAuditLog.js.map +1 -0
- package/dist/tools/implementations/office/OfficePdfRenderer.d.ts +33 -0
- package/dist/tools/implementations/office/OfficePdfRenderer.d.ts.map +1 -0
- package/dist/tools/implementations/office/OfficePdfRenderer.js +194 -0
- package/dist/tools/implementations/office/OfficePdfRenderer.js.map +1 -0
- package/dist/tools/implementations/office/OfficePreviewExtractor.d.ts +6 -0
- package/dist/tools/implementations/office/OfficePreviewExtractor.d.ts.map +1 -0
- package/dist/tools/implementations/office/OfficePreviewExtractor.js +493 -0
- package/dist/tools/implementations/office/OfficePreviewExtractor.js.map +1 -0
- package/dist/tools/implementations/office/OfficePreviewModel.d.ts +96 -0
- package/dist/tools/implementations/office/OfficePreviewModel.d.ts.map +1 -0
- package/dist/tools/implementations/office/OfficePreviewModel.js +2 -0
- package/dist/tools/implementations/office/OfficePreviewModel.js.map +1 -0
- package/dist/tools/implementations/office/OfficeReview.d.ts +94 -0
- package/dist/tools/implementations/office/OfficeReview.d.ts.map +1 -0
- package/dist/tools/implementations/office/OfficeReview.js +496 -0
- package/dist/tools/implementations/office/OfficeReview.js.map +1 -0
- package/dist/tools/implementations/office/OfficeRuntime.d.ts +13 -0
- package/dist/tools/implementations/office/OfficeRuntime.d.ts.map +1 -0
- package/dist/tools/implementations/office/OfficeRuntime.js +22 -0
- package/dist/tools/implementations/office/OfficeRuntime.js.map +1 -0
- package/dist/tools/implementations/office/OfficeTemplateRegistry.d.ts +76 -0
- package/dist/tools/implementations/office/OfficeTemplateRegistry.d.ts.map +1 -0
- package/dist/tools/implementations/office/OfficeTemplateRegistry.js +624 -0
- package/dist/tools/implementations/office/OfficeTemplateRegistry.js.map +1 -0
- package/dist/tools/implementations/office/OfficeValidator.d.ts +33 -0
- package/dist/tools/implementations/office/OfficeValidator.d.ts.map +1 -0
- package/dist/tools/implementations/office/OfficeValidator.js +651 -0
- package/dist/tools/implementations/office/OfficeValidator.js.map +1 -0
- package/dist/tools/implementations/office/OoxmlTextReplace.d.ts +12 -0
- package/dist/tools/implementations/office/OoxmlTextReplace.d.ts.map +1 -0
- package/dist/tools/implementations/office/OoxmlTextReplace.js +107 -0
- package/dist/tools/implementations/office/OoxmlTextReplace.js.map +1 -0
- package/dist/tools/implementations/office/XlsxStyleBuilder.d.ts +85 -0
- package/dist/tools/implementations/office/XlsxStyleBuilder.d.ts.map +1 -0
- package/dist/tools/implementations/office/XlsxStyleBuilder.js +156 -0
- package/dist/tools/implementations/office/XlsxStyleBuilder.js.map +1 -0
- package/dist/tools/implementations/office/html/HtmlOfficeEngine.d.ts +53 -0
- package/dist/tools/implementations/office/html/HtmlOfficeEngine.d.ts.map +1 -0
- package/dist/tools/implementations/office/html/HtmlOfficeEngine.js +90 -0
- package/dist/tools/implementations/office/html/HtmlOfficeEngine.js.map +1 -0
- package/dist/tools/implementations/office/html/assemble.d.ts +52 -0
- package/dist/tools/implementations/office/html/assemble.d.ts.map +1 -0
- package/dist/tools/implementations/office/html/assemble.js +183 -0
- package/dist/tools/implementations/office/html/assemble.js.map +1 -0
- package/dist/tools/implementations/office/html/components.d.ts +132 -0
- package/dist/tools/implementations/office/html/components.d.ts.map +1 -0
- package/dist/tools/implementations/office/html/components.js +182 -0
- package/dist/tools/implementations/office/html/components.js.map +1 -0
- package/dist/tools/implementations/office/html/exporters/HtmlToDocx.d.ts +19 -0
- package/dist/tools/implementations/office/html/exporters/HtmlToDocx.d.ts.map +1 -0
- package/dist/tools/implementations/office/html/exporters/HtmlToDocx.js +180 -0
- package/dist/tools/implementations/office/html/exporters/HtmlToDocx.js.map +1 -0
- package/dist/tools/implementations/office/html/exporters/HtmlToPdf.d.ts +38 -0
- package/dist/tools/implementations/office/html/exporters/HtmlToPdf.d.ts.map +1 -0
- package/dist/tools/implementations/office/html/exporters/HtmlToPdf.js +118 -0
- package/dist/tools/implementations/office/html/exporters/HtmlToPdf.js.map +1 -0
- package/dist/tools/implementations/office/html/exporters/HtmlToPptx.d.ts +28 -0
- package/dist/tools/implementations/office/html/exporters/HtmlToPptx.d.ts.map +1 -0
- package/dist/tools/implementations/office/html/exporters/HtmlToPptx.js +79 -0
- package/dist/tools/implementations/office/html/exporters/HtmlToPptx.js.map +1 -0
- package/dist/tools/implementations/office/html/exporters/HtmlToXlsx.d.ts +20 -0
- package/dist/tools/implementations/office/html/exporters/HtmlToXlsx.d.ts.map +1 -0
- package/dist/tools/implementations/office/html/exporters/HtmlToXlsx.js +101 -0
- package/dist/tools/implementations/office/html/exporters/HtmlToXlsx.js.map +1 -0
- package/dist/tools/implementations/office/html/provenance.d.ts +25 -0
- package/dist/tools/implementations/office/html/provenance.d.ts.map +1 -0
- package/dist/tools/implementations/office/html/provenance.js +51 -0
- package/dist/tools/implementations/office/html/provenance.js.map +1 -0
- package/dist/tools/implementations/office/html/themes.d.ts +60 -0
- package/dist/tools/implementations/office/html/themes.d.ts.map +1 -0
- package/dist/tools/implementations/office/html/themes.js +183 -0
- package/dist/tools/implementations/office/html/themes.js.map +1 -0
- package/dist/tools/implementations/rules/RuleLoader.d.ts +27 -0
- package/dist/tools/implementations/rules/RuleLoader.d.ts.map +1 -0
- package/dist/tools/implementations/rules/RuleLoader.js +69 -0
- package/dist/tools/implementations/rules/RuleLoader.js.map +1 -0
- package/dist/tools/implementations/rules/schema.d.ts +236 -0
- package/dist/tools/implementations/rules/schema.d.ts.map +1 -0
- package/dist/tools/implementations/rules/schema.js +119 -0
- package/dist/tools/implementations/rules/schema.js.map +1 -0
- package/dist/tools/implementations/rules/seed.d.ts +18 -0
- package/dist/tools/implementations/rules/seed.d.ts.map +1 -0
- package/dist/tools/implementations/rules/seed.js +252 -0
- package/dist/tools/implementations/rules/seed.js.map +1 -0
- package/dist/tools/implementations/rules/taintFacts.d.ts +26 -0
- package/dist/tools/implementations/rules/taintFacts.d.ts.map +1 -0
- package/dist/tools/implementations/rules/taintFacts.js +48 -0
- package/dist/tools/implementations/rules/taintFacts.js.map +1 -0
- package/dist/tools/implementations/scanners/ScannerAdapter.d.ts +35 -0
- package/dist/tools/implementations/scanners/ScannerAdapter.d.ts.map +1 -0
- package/dist/tools/implementations/scanners/ScannerAdapter.js +2 -0
- package/dist/tools/implementations/scanners/ScannerAdapter.js.map +1 -0
- package/dist/tools/implementations/utils.d.ts +76 -0
- package/dist/tools/implementations/utils.d.ts.map +1 -0
- package/dist/tools/implementations/utils.js +468 -0
- package/dist/tools/implementations/utils.js.map +1 -0
- package/dist/tools/implementations/workflow/WorkflowAddNodeTool.d.ts +128 -0
- package/dist/tools/implementations/workflow/WorkflowAddNodeTool.d.ts.map +1 -0
- package/dist/tools/implementations/workflow/WorkflowAddNodeTool.js +399 -0
- package/dist/tools/implementations/workflow/WorkflowAddNodeTool.js.map +1 -0
- package/dist/tools/implementations/workflow/WorkflowApplyTool.d.ts +98 -0
- package/dist/tools/implementations/workflow/WorkflowApplyTool.d.ts.map +1 -0
- package/dist/tools/implementations/workflow/WorkflowApplyTool.js +329 -0
- package/dist/tools/implementations/workflow/WorkflowApplyTool.js.map +1 -0
- package/dist/tools/implementations/workflow/WorkflowAuditTool.d.ts +12 -0
- package/dist/tools/implementations/workflow/WorkflowAuditTool.d.ts.map +1 -0
- package/dist/tools/implementations/workflow/WorkflowAuditTool.js +51 -0
- package/dist/tools/implementations/workflow/WorkflowAuditTool.js.map +1 -0
- package/dist/tools/implementations/workflow/WorkflowConnectTool.d.ts +21 -0
- package/dist/tools/implementations/workflow/WorkflowConnectTool.d.ts.map +1 -0
- package/dist/tools/implementations/workflow/WorkflowConnectTool.js +175 -0
- package/dist/tools/implementations/workflow/WorkflowConnectTool.js.map +1 -0
- package/dist/tools/implementations/workflow/WorkflowCreateTool.d.ts +17 -0
- package/dist/tools/implementations/workflow/WorkflowCreateTool.d.ts.map +1 -0
- package/dist/tools/implementations/workflow/WorkflowCreateTool.js +78 -0
- package/dist/tools/implementations/workflow/WorkflowCreateTool.js.map +1 -0
- package/dist/tools/implementations/workflow/WorkflowExecuteTool.d.ts +20 -0
- package/dist/tools/implementations/workflow/WorkflowExecuteTool.d.ts.map +1 -0
- package/dist/tools/implementations/workflow/WorkflowExecuteTool.js +178 -0
- package/dist/tools/implementations/workflow/WorkflowExecuteTool.js.map +1 -0
- package/dist/tools/implementations/workflow/WorkflowGetStatusTool.d.ts +12 -0
- package/dist/tools/implementations/workflow/WorkflowGetStatusTool.d.ts.map +1 -0
- package/dist/tools/implementations/workflow/WorkflowGetStatusTool.js +87 -0
- package/dist/tools/implementations/workflow/WorkflowGetStatusTool.js.map +1 -0
- package/dist/tools/implementations/workflow/WorkflowInspectTool.d.ts +11 -0
- package/dist/tools/implementations/workflow/WorkflowInspectTool.d.ts.map +1 -0
- package/dist/tools/implementations/workflow/WorkflowInspectTool.js +186 -0
- package/dist/tools/implementations/workflow/WorkflowInspectTool.js.map +1 -0
- package/dist/tools/implementations/workflow/WorkflowSchemaUtils.d.ts +49 -0
- package/dist/tools/implementations/workflow/WorkflowSchemaUtils.d.ts.map +1 -0
- package/dist/tools/implementations/workflow/WorkflowSchemaUtils.js +186 -0
- package/dist/tools/implementations/workflow/WorkflowSchemaUtils.js.map +1 -0
- package/dist/tools/implementations/workflow/WorkflowTool.d.ts +129 -0
- package/dist/tools/implementations/workflow/WorkflowTool.d.ts.map +1 -0
- package/dist/tools/implementations/workflow/WorkflowTool.js +141 -0
- package/dist/tools/implementations/workflow/WorkflowTool.js.map +1 -0
- package/dist/tools/implementations/workflow/WorkflowValidateTool.d.ts +11 -0
- package/dist/tools/implementations/workflow/WorkflowValidateTool.d.ts.map +1 -0
- package/dist/tools/implementations/workflow/WorkflowValidateTool.js +238 -0
- package/dist/tools/implementations/workflow/WorkflowValidateTool.js.map +1 -0
- package/dist/tools/index.d.ts +49 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +364 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/officeToolContract.d.ts +2 -0
- package/dist/tools/officeToolContract.d.ts.map +1 -0
- package/dist/tools/officeToolContract.js +2 -0
- package/dist/tools/officeToolContract.js.map +1 -0
- package/dist/tools/slidev/SlidevExporter.d.ts +15 -0
- package/dist/tools/slidev/SlidevExporter.d.ts.map +1 -0
- package/dist/tools/slidev/SlidevExporter.js +112 -0
- package/dist/tools/slidev/SlidevExporter.js.map +1 -0
- package/dist/tools/slidev/SlidevProjectBuilder.d.ts +22 -0
- package/dist/tools/slidev/SlidevProjectBuilder.d.ts.map +1 -0
- package/dist/tools/slidev/SlidevProjectBuilder.js +139 -0
- package/dist/tools/slidev/SlidevProjectBuilder.js.map +1 -0
- package/dist/types/canonical.d.ts +124 -0
- package/dist/types/canonical.d.ts.map +1 -0
- package/dist/types/canonical.js +8 -0
- package/dist/types/canonical.js.map +1 -0
- package/dist/utils/SmartTruncator.d.ts +22 -0
- package/dist/utils/SmartTruncator.d.ts.map +1 -0
- package/dist/utils/SmartTruncator.js +88 -0
- package/dist/utils/SmartTruncator.js.map +1 -0
- package/dist/utils/getPty.d.ts +42 -0
- package/dist/utils/getPty.d.ts.map +1 -0
- package/dist/utils/getPty.js +57 -0
- package/dist/utils/getPty.js.map +1 -0
- package/dist/utils/platform.d.ts +137 -0
- package/dist/utils/platform.d.ts.map +1 -0
- package/dist/utils/platform.js +374 -0
- package/dist/utils/platform.js.map +1 -0
- package/dist/utils/sleep.d.ts +8 -0
- package/dist/utils/sleep.d.ts.map +1 -0
- package/dist/utils/sleep.js +10 -0
- package/dist/utils/sleep.js.map +1 -0
- package/dist/utils/textTable.d.ts +27 -0
- package/dist/utils/textTable.d.ts.map +1 -0
- package/dist/utils/textTable.js +55 -0
- package/dist/utils/textTable.js.map +1 -0
- package/dist/version.d.ts +12 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +42 -0
- package/dist/version.js.map +1 -0
- package/dist/web-server/FileChangesApi.d.ts +131 -0
- package/dist/web-server/FileChangesApi.d.ts.map +1 -0
- package/dist/web-server/FileChangesApi.js +552 -0
- package/dist/web-server/FileChangesApi.js.map +1 -0
- package/dist/web-server/GitEnv.d.ts +6 -0
- package/dist/web-server/GitEnv.d.ts.map +1 -0
- package/dist/web-server/GitEnv.js +6 -0
- package/dist/web-server/GitEnv.js.map +1 -0
- package/dist/web-server/GitService.d.ts +151 -0
- package/dist/web-server/GitService.d.ts.map +1 -0
- package/dist/web-server/GitService.js +1172 -0
- package/dist/web-server/GitService.js.map +1 -0
- package/dist/web-server/LocalLlmGatewayRoutes.d.ts +45 -0
- package/dist/web-server/LocalLlmGatewayRoutes.d.ts.map +1 -0
- package/dist/web-server/LocalLlmGatewayRoutes.js +812 -0
- package/dist/web-server/LocalLlmGatewayRoutes.js.map +1 -0
- package/package.json +114 -0
|
@@ -0,0 +1,1249 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WorkflowEngine - Workflow 执行引擎
|
|
3
|
+
*
|
|
4
|
+
* 职责:
|
|
5
|
+
* - 执行 workflow
|
|
6
|
+
* - 管理执行状态
|
|
7
|
+
* - 调度节点执行
|
|
8
|
+
* - 处理错误和重试
|
|
9
|
+
*/
|
|
10
|
+
import { randomUUID } from 'crypto';
|
|
11
|
+
import { ExecutionGraph } from './ExecutionGraph.js';
|
|
12
|
+
import { coreLogger } from '../Log.js';
|
|
13
|
+
import { VariableResolver } from './VariableResolver.js';
|
|
14
|
+
import { buildVariableScope } from './variableScope.js';
|
|
15
|
+
import { evaluateExpression } from './expressionEvaluator.js';
|
|
16
|
+
import { auditModeEvent } from '../ModeAudit.js';
|
|
17
|
+
import { AgentNodeExecutor } from './executors/AgentNodeExecutor.js';
|
|
18
|
+
import { ToolNodeExecutor } from './executors/ToolNodeExecutor.js';
|
|
19
|
+
import { ConditionNodeExecutor } from './executors/ConditionNodeExecutor.js';
|
|
20
|
+
import { DataNodeExecutor } from './executors/DataNodeExecutor.js';
|
|
21
|
+
import { ParallelNodeExecutor } from './executors/ParallelNodeExecutor.js';
|
|
22
|
+
const MAX_EXECUTION_HISTORY = 100;
|
|
23
|
+
function normalizeSessionId(sessionId) {
|
|
24
|
+
const trimmed = sessionId?.trim();
|
|
25
|
+
return trimmed ? trimmed : undefined;
|
|
26
|
+
}
|
|
27
|
+
export class WorkflowEngine {
|
|
28
|
+
db;
|
|
29
|
+
toolRegistry;
|
|
30
|
+
eventEmitter;
|
|
31
|
+
variableResolver;
|
|
32
|
+
executors;
|
|
33
|
+
activeExecutions;
|
|
34
|
+
executionHistory;
|
|
35
|
+
workflowManager;
|
|
36
|
+
agentExecutor;
|
|
37
|
+
blackboardGraphProvider;
|
|
38
|
+
maxExecutionHistory;
|
|
39
|
+
workflowCache;
|
|
40
|
+
constructor(deps) {
|
|
41
|
+
this.db = deps.db;
|
|
42
|
+
this.toolRegistry = deps.toolRegistry;
|
|
43
|
+
this.eventEmitter = deps.eventEmitter;
|
|
44
|
+
this.variableResolver = new VariableResolver();
|
|
45
|
+
this.executors = new Map();
|
|
46
|
+
this.activeExecutions = new Map();
|
|
47
|
+
this.executionHistory = new Map();
|
|
48
|
+
this.workflowManager = deps.workflowManager || null;
|
|
49
|
+
this.agentExecutor = deps.agentExecutor;
|
|
50
|
+
this.blackboardGraphProvider = deps.blackboardGraph;
|
|
51
|
+
this.workflowCache = new Map();
|
|
52
|
+
this.maxExecutionHistory = deps.maxExecutionHistory ?? MAX_EXECUTION_HISTORY;
|
|
53
|
+
this.initializeExecutors();
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* 设置 WorkflowManager(延迟注入)
|
|
57
|
+
*/
|
|
58
|
+
setWorkflowManager(manager) {
|
|
59
|
+
this.workflowManager = manager;
|
|
60
|
+
}
|
|
61
|
+
setBlackboardGraphProvider(provider) {
|
|
62
|
+
this.blackboardGraphProvider = provider;
|
|
63
|
+
}
|
|
64
|
+
getBlackboardGraph() {
|
|
65
|
+
const provider = this.blackboardGraphProvider;
|
|
66
|
+
if (!provider)
|
|
67
|
+
return undefined;
|
|
68
|
+
return typeof provider === 'function' ? provider() ?? undefined : provider;
|
|
69
|
+
}
|
|
70
|
+
attachRuntimeServices(context) {
|
|
71
|
+
context.db = this.db;
|
|
72
|
+
context.emitter = this.eventEmitter;
|
|
73
|
+
context.workflowManager = this.workflowManager ?? undefined;
|
|
74
|
+
context.workflowEngine = this;
|
|
75
|
+
context.blackboardGraph = this.getBlackboardGraph();
|
|
76
|
+
return context;
|
|
77
|
+
}
|
|
78
|
+
setAgentExecutor(executor) {
|
|
79
|
+
this.agentExecutor = executor;
|
|
80
|
+
this.initializeExecutors();
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* 返回 WorkflowEngine 使用的 ToolRegistry(用于 web UI/工具列举)。
|
|
84
|
+
*/
|
|
85
|
+
getToolRegistry() {
|
|
86
|
+
return this.toolRegistry;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* 初始化节点执行器
|
|
90
|
+
*/
|
|
91
|
+
initializeExecutors() {
|
|
92
|
+
this.executors.set('agent', new AgentNodeExecutor(this.agentExecutor));
|
|
93
|
+
this.executors.set('tool', new ToolNodeExecutor(this.toolRegistry));
|
|
94
|
+
const dataExecutor = new DataNodeExecutor(this.toolRegistry);
|
|
95
|
+
for (const type of ['template', 'variable_assigner', 'variable_aggregator', 'list_operator', 'http_request', 'json_extractor']) {
|
|
96
|
+
this.executors.set(type, dataExecutor);
|
|
97
|
+
}
|
|
98
|
+
this.executors.set('condition', new ConditionNodeExecutor(this.agentExecutor));
|
|
99
|
+
this.executors.set('parallel', new ParallelNodeExecutor({
|
|
100
|
+
getWorkflow: (context) => {
|
|
101
|
+
const workflow = this.workflowCache.get(context.workflowId);
|
|
102
|
+
if (!workflow)
|
|
103
|
+
throw new Error(`Workflow not found in execution cache: ${context.workflowId}`);
|
|
104
|
+
return workflow;
|
|
105
|
+
},
|
|
106
|
+
executeNode: (workflow, context, nodeId) => this.executeNode(workflow, context, nodeId),
|
|
107
|
+
collectParallelBodyNodeIds: (workflow, parallelNodeId) => this.collectParallelBodyNodeIds(workflow, parallelNodeId),
|
|
108
|
+
shouldStopExecution: (context) => this.shouldStopExecution(context),
|
|
109
|
+
selectConditionEdges: (edges, result) => this.selectConditionEdges(edges, result),
|
|
110
|
+
dependenciesSatisfiedWithin: (nodeId, workflow, completed, allowedNodes) => this.dependenciesSatisfiedWithin(nodeId, workflow, completed, allowedNodes),
|
|
111
|
+
}));
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* 执行单个节点(Canvas 右键 Run 的后端入口)。
|
|
115
|
+
*
|
|
116
|
+
* 与完整 workflow 执行不同:
|
|
117
|
+
* - 不从 DB 加载 workflow,接收已有的 node 定义与 sessionId
|
|
118
|
+
* - 不触发前驱/后继节点,只跑当前节点
|
|
119
|
+
* - 失败抛出错误(调用方负责标记节点 UI 状态)
|
|
120
|
+
*
|
|
121
|
+
* 支持 input/output/tool/condition/parallel/loop/agent/leader/start
|
|
122
|
+
* 其中 parallel/loop 对单节点运行意义有限,此处按节点自身 input 直跑单次。
|
|
123
|
+
*/
|
|
124
|
+
async executeSingleNode(params) {
|
|
125
|
+
const { node, sessionId, input, variables } = params;
|
|
126
|
+
const workflowId = params.workflowId?.trim() || `__single_node__${node.id}`;
|
|
127
|
+
const context = this.attachRuntimeServices({
|
|
128
|
+
workflowId,
|
|
129
|
+
executionId: randomUUID(),
|
|
130
|
+
sessionId,
|
|
131
|
+
status: 'running',
|
|
132
|
+
startTime: Date.now(),
|
|
133
|
+
variables: new Map(Object.entries(variables ?? {})),
|
|
134
|
+
nodeExecutions: new Map(),
|
|
135
|
+
logs: [],
|
|
136
|
+
});
|
|
137
|
+
const effectiveInput = input ?? {};
|
|
138
|
+
const nodeType = node.data.type;
|
|
139
|
+
const baseEvent = {
|
|
140
|
+
workflowId: context.workflowId,
|
|
141
|
+
executionId: context.executionId,
|
|
142
|
+
sessionId: context.sessionId,
|
|
143
|
+
reason: 'single_node',
|
|
144
|
+
};
|
|
145
|
+
this.emitEvent('workflow:execution_started', {
|
|
146
|
+
...baseEvent,
|
|
147
|
+
startTime: context.startTime,
|
|
148
|
+
nodeCount: 1,
|
|
149
|
+
});
|
|
150
|
+
this.emitEvent('workflow:node_started', {
|
|
151
|
+
...baseEvent,
|
|
152
|
+
nodeId: node.id,
|
|
153
|
+
startTime: context.startTime,
|
|
154
|
+
});
|
|
155
|
+
try {
|
|
156
|
+
let result;
|
|
157
|
+
switch (nodeType) {
|
|
158
|
+
case 'start':
|
|
159
|
+
case 'schedule_trigger':
|
|
160
|
+
case 'input':
|
|
161
|
+
result = effectiveInput;
|
|
162
|
+
break;
|
|
163
|
+
case 'output':
|
|
164
|
+
context.variables.set('__output__', effectiveInput);
|
|
165
|
+
result = effectiveInput;
|
|
166
|
+
break;
|
|
167
|
+
case 'leader':
|
|
168
|
+
case 'agent': {
|
|
169
|
+
const executor = this.executors.get('agent');
|
|
170
|
+
if (!executor)
|
|
171
|
+
throw new Error('agent executor not initialized');
|
|
172
|
+
result = await executor.execute(node, effectiveInput, context);
|
|
173
|
+
break;
|
|
174
|
+
}
|
|
175
|
+
case 'tool':
|
|
176
|
+
case 'condition':
|
|
177
|
+
case 'template':
|
|
178
|
+
case 'variable_assigner':
|
|
179
|
+
case 'variable_aggregator':
|
|
180
|
+
case 'list_operator':
|
|
181
|
+
case 'http_request':
|
|
182
|
+
case 'json_extractor': {
|
|
183
|
+
const executor = this.executors.get(nodeType);
|
|
184
|
+
if (!executor)
|
|
185
|
+
throw new Error(`No executor for node type: ${nodeType}`);
|
|
186
|
+
result = await executor.execute(node, effectiveInput, context);
|
|
187
|
+
break;
|
|
188
|
+
}
|
|
189
|
+
case 'parallel':
|
|
190
|
+
case 'loop':
|
|
191
|
+
// 单节点模式下无法遍历 workflow 结构;上层应传完整 workflow 走 execute()。
|
|
192
|
+
throw new Error(`Node type ${nodeType} cannot be executed in isolation; use execute() with full workflow`);
|
|
193
|
+
default:
|
|
194
|
+
throw new Error(`Unknown node type: ${nodeType}`);
|
|
195
|
+
}
|
|
196
|
+
context.status = 'completed';
|
|
197
|
+
context.endTime = Date.now();
|
|
198
|
+
this.emitEvent('workflow:node_completed', {
|
|
199
|
+
...baseEvent,
|
|
200
|
+
nodeId: node.id,
|
|
201
|
+
result,
|
|
202
|
+
startTime: context.startTime,
|
|
203
|
+
endTime: context.endTime,
|
|
204
|
+
duration: context.endTime - context.startTime,
|
|
205
|
+
});
|
|
206
|
+
this.emitEvent('workflow:execution_completed', {
|
|
207
|
+
...baseEvent,
|
|
208
|
+
output: result,
|
|
209
|
+
startTime: context.startTime,
|
|
210
|
+
endTime: context.endTime,
|
|
211
|
+
duration: context.endTime - context.startTime,
|
|
212
|
+
});
|
|
213
|
+
return result;
|
|
214
|
+
}
|
|
215
|
+
catch (error) {
|
|
216
|
+
context.status = 'failed';
|
|
217
|
+
context.error = error instanceof Error ? error.message : String(error);
|
|
218
|
+
context.endTime = Date.now();
|
|
219
|
+
this.emitEvent('workflow:node_failed', {
|
|
220
|
+
...baseEvent,
|
|
221
|
+
nodeId: node.id,
|
|
222
|
+
error: context.error,
|
|
223
|
+
startTime: context.startTime,
|
|
224
|
+
endTime: context.endTime,
|
|
225
|
+
duration: context.endTime - context.startTime,
|
|
226
|
+
reason: 'single_node_error',
|
|
227
|
+
});
|
|
228
|
+
this.emitEvent('workflow:execution_failed', {
|
|
229
|
+
...baseEvent,
|
|
230
|
+
error: context.error,
|
|
231
|
+
startTime: context.startTime,
|
|
232
|
+
endTime: context.endTime,
|
|
233
|
+
duration: context.endTime - context.startTime,
|
|
234
|
+
reason: 'single_node_error',
|
|
235
|
+
});
|
|
236
|
+
throw error;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* 执行 workflow
|
|
241
|
+
*/
|
|
242
|
+
async execute(workflowId, input, options) {
|
|
243
|
+
// 加载 workflow 定义
|
|
244
|
+
const workflow = await this.loadWorkflow(workflowId);
|
|
245
|
+
if (!workflow) {
|
|
246
|
+
throw new Error(`Workflow not found: ${workflowId}`);
|
|
247
|
+
}
|
|
248
|
+
const sessionId = normalizeSessionId(options?.sessionId) ?? normalizeSessionId(workflow.config.sessionId);
|
|
249
|
+
if (!sessionId) {
|
|
250
|
+
throw new Error(`sessionId is required to execute workflow: ${workflowId}`);
|
|
251
|
+
}
|
|
252
|
+
// 创建执行上下文
|
|
253
|
+
const executionId = randomUUID();
|
|
254
|
+
const context = this.attachRuntimeServices({
|
|
255
|
+
workflowId,
|
|
256
|
+
executionId,
|
|
257
|
+
sessionId,
|
|
258
|
+
status: 'running',
|
|
259
|
+
startTime: Date.now(),
|
|
260
|
+
variables: new Map(),
|
|
261
|
+
nodeExecutions: new Map(),
|
|
262
|
+
logs: []
|
|
263
|
+
});
|
|
264
|
+
// 初始化变量
|
|
265
|
+
this.initializeVariables(context, workflow, input, options);
|
|
266
|
+
// 保存到活动执行列表
|
|
267
|
+
this.activeExecutions.set(executionId, context);
|
|
268
|
+
this.workflowCache.set(workflowId, workflow);
|
|
269
|
+
// 发送开始事件
|
|
270
|
+
this.emitEvent('workflow:execution_started', {
|
|
271
|
+
executionId,
|
|
272
|
+
workflowId,
|
|
273
|
+
sessionId: context.sessionId,
|
|
274
|
+
startTime: context.startTime,
|
|
275
|
+
nodeCount: workflow.nodes.length,
|
|
276
|
+
});
|
|
277
|
+
// 应用超时:优先使用 options.timeout(毫秒),否则 workflow.config.maxExecutionTime(秒)
|
|
278
|
+
// maxExecutionTime 为 0 表示不限时,仅在显式 >0 时才强制
|
|
279
|
+
const timeoutMs = options?.timeout
|
|
280
|
+
?? (workflow.config.maxExecutionTime && workflow.config.maxExecutionTime > 0
|
|
281
|
+
? workflow.config.maxExecutionTime * 1000
|
|
282
|
+
: undefined);
|
|
283
|
+
let timeoutHandle;
|
|
284
|
+
if (timeoutMs && timeoutMs > 0) {
|
|
285
|
+
timeoutHandle = setTimeout(() => {
|
|
286
|
+
if (context.status === 'running' || context.status === 'paused') {
|
|
287
|
+
context.status = 'failed';
|
|
288
|
+
context.error = `Execution timeout after ${timeoutMs}ms`;
|
|
289
|
+
context.endTime = Date.now();
|
|
290
|
+
this.emitEvent('workflow:execution_failed', {
|
|
291
|
+
executionId,
|
|
292
|
+
workflowId,
|
|
293
|
+
sessionId: context.sessionId,
|
|
294
|
+
timeoutMs,
|
|
295
|
+
error: context.error,
|
|
296
|
+
startTime: context.startTime,
|
|
297
|
+
endTime: context.endTime,
|
|
298
|
+
duration: context.endTime - context.startTime,
|
|
299
|
+
reason: 'timeout',
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
}, timeoutMs);
|
|
303
|
+
}
|
|
304
|
+
// 异步执行
|
|
305
|
+
this.runWorkflow(workflow, context)
|
|
306
|
+
.then(() => {
|
|
307
|
+
if (context.status === 'failed') {
|
|
308
|
+
// runWorkflow 提前被超时/取消终止,不要再覆盖状态
|
|
309
|
+
if (this.isExecutionTimeout(context)) {
|
|
310
|
+
return;
|
|
311
|
+
}
|
|
312
|
+
this.emitEvent('workflow:execution_failed', {
|
|
313
|
+
executionId,
|
|
314
|
+
workflowId,
|
|
315
|
+
sessionId: context.sessionId,
|
|
316
|
+
error: context.error,
|
|
317
|
+
endTime: context.endTime,
|
|
318
|
+
reason: 'execution_failed',
|
|
319
|
+
});
|
|
320
|
+
return;
|
|
321
|
+
}
|
|
322
|
+
if (context.status !== 'running') {
|
|
323
|
+
return;
|
|
324
|
+
}
|
|
325
|
+
context.status = 'completed';
|
|
326
|
+
context.endTime = Date.now();
|
|
327
|
+
this.emitEvent('workflow:execution_completed', {
|
|
328
|
+
executionId,
|
|
329
|
+
workflowId,
|
|
330
|
+
sessionId: context.sessionId,
|
|
331
|
+
output: context.variables.get('__output__'),
|
|
332
|
+
startTime: context.startTime,
|
|
333
|
+
endTime: context.endTime,
|
|
334
|
+
duration: context.endTime - context.startTime,
|
|
335
|
+
});
|
|
336
|
+
})
|
|
337
|
+
.catch((error) => {
|
|
338
|
+
if (this.isExecutionTimeout(context)) {
|
|
339
|
+
return;
|
|
340
|
+
}
|
|
341
|
+
this.handleExecutionError(context, error);
|
|
342
|
+
})
|
|
343
|
+
.finally(() => {
|
|
344
|
+
if (timeoutHandle)
|
|
345
|
+
clearTimeout(timeoutHandle);
|
|
346
|
+
this.storeExecutionHistory(executionId, context);
|
|
347
|
+
// paused 的执行保留在 activeExecutions 中,以便 resume() 可以找到并恢复
|
|
348
|
+
if (context.status !== 'paused') {
|
|
349
|
+
this.activeExecutions.delete(executionId);
|
|
350
|
+
this.workflowCache.delete(workflowId);
|
|
351
|
+
}
|
|
352
|
+
this.saveExecution(context).catch(err => {
|
|
353
|
+
coreLogger.error('Failed to save execution:', err);
|
|
354
|
+
});
|
|
355
|
+
});
|
|
356
|
+
return executionId;
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* 初始化变量
|
|
360
|
+
*/
|
|
361
|
+
initializeVariables(context, workflow, input, options) {
|
|
362
|
+
// 全局变量
|
|
363
|
+
if (workflow.config.variables) {
|
|
364
|
+
for (const [key, value] of Object.entries(workflow.config.variables)) {
|
|
365
|
+
context.variables.set(key, value);
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
// 选项覆盖
|
|
369
|
+
if (options?.variables) {
|
|
370
|
+
for (const [key, value] of Object.entries(options.variables)) {
|
|
371
|
+
context.variables.set(key, value);
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
if (options?.maxIterations !== undefined) {
|
|
375
|
+
context.variables.set('__maxIterations__', options.maxIterations);
|
|
376
|
+
}
|
|
377
|
+
// 输入数据
|
|
378
|
+
if (input) {
|
|
379
|
+
context.variables.set('__input__', input);
|
|
380
|
+
}
|
|
381
|
+
// 上下文信息
|
|
382
|
+
context.variables.set('__context__', {
|
|
383
|
+
workflowId: context.workflowId,
|
|
384
|
+
executionId: context.executionId,
|
|
385
|
+
sessionId: context.sessionId,
|
|
386
|
+
startTime: context.startTime
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
/**
|
|
390
|
+
* 运行 workflow
|
|
391
|
+
*/
|
|
392
|
+
async runWorkflow(workflow, context) {
|
|
393
|
+
// 构建执行图
|
|
394
|
+
const graph = new ExecutionGraph(workflow);
|
|
395
|
+
// 验证图
|
|
396
|
+
const validation = graph.validate();
|
|
397
|
+
if (!validation.valid) {
|
|
398
|
+
throw new Error(`Invalid workflow: ${validation.errors.join(', ')}`);
|
|
399
|
+
}
|
|
400
|
+
const startNodes = graph.getStartNodes();
|
|
401
|
+
const completed = new Set();
|
|
402
|
+
const skipped = new Set();
|
|
403
|
+
const queued = new Set(startNodes);
|
|
404
|
+
const queue = [...startNodes];
|
|
405
|
+
this.log(context, 'info', '', `Executing workflow from ${startNodes.length} start nodes`);
|
|
406
|
+
while (queue.length > 0) {
|
|
407
|
+
const nodeId = queue.shift();
|
|
408
|
+
queued.delete(nodeId);
|
|
409
|
+
if (completed.has(nodeId) || skipped.has(nodeId)) {
|
|
410
|
+
continue;
|
|
411
|
+
}
|
|
412
|
+
if (this.shouldStopExecution(context)) {
|
|
413
|
+
break;
|
|
414
|
+
}
|
|
415
|
+
await this.executeNode(workflow, context, nodeId);
|
|
416
|
+
completed.add(nodeId);
|
|
417
|
+
// 超时/取消:executeNode 完成后再次检查,防止节点内新触发的中止状态被下一轮循环吞掉
|
|
418
|
+
// (context.status 可能被 timeout 回调异步改为 'failed')
|
|
419
|
+
if (this.shouldStopExecution(context)) {
|
|
420
|
+
break;
|
|
421
|
+
}
|
|
422
|
+
const node = workflow.nodes.find(n => n.id === nodeId);
|
|
423
|
+
if (node?.data.type === 'loop') {
|
|
424
|
+
for (const bodyNodeId of this.collectLoopBodyNodeIds(workflow, nodeId)) {
|
|
425
|
+
completed.add(bodyNodeId);
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
if (node?.data.type === 'parallel') {
|
|
429
|
+
for (const bodyNodeId of this.collectParallelBodyNodeIds(workflow, nodeId)) {
|
|
430
|
+
completed.add(bodyNodeId);
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
const result = context.nodeExecutions.get(nodeId)?.result;
|
|
434
|
+
const outgoingEdges = workflow.edges.filter(edge => edge.source === nodeId);
|
|
435
|
+
const activeEdges = node?.data.type === 'condition'
|
|
436
|
+
? this.selectConditionEdges(outgoingEdges, result)
|
|
437
|
+
: outgoingEdges.filter(edge => edge.data?.type !== 'data' && edge.data?.type !== 'loop' && !(node?.data.type === 'parallel' && this.isParallelBodyEntryEdge(workflow, edge)));
|
|
438
|
+
const activeTargets = new Set(activeEdges.map(edge => edge.target));
|
|
439
|
+
if (node?.data.type === 'condition') {
|
|
440
|
+
for (const edge of outgoingEdges) {
|
|
441
|
+
if (!activeTargets.has(edge.target)) {
|
|
442
|
+
this.skipInactiveBranch(workflow, context, edge.target, skipped, activeTargets, completed, true);
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
for (const edge of activeEdges) {
|
|
447
|
+
if (!queued.has(edge.target) && !completed.has(edge.target) && !skipped.has(edge.target) && this.dependenciesSatisfied(workflow, edge.target, completed, skipped)) {
|
|
448
|
+
queue.push(edge.target);
|
|
449
|
+
queued.add(edge.target);
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
for (const candidate of workflow.nodes) {
|
|
453
|
+
if (!queued.has(candidate.id) && !completed.has(candidate.id) && !skipped.has(candidate.id) && this.dependenciesSatisfied(workflow, candidate.id, completed, skipped)) {
|
|
454
|
+
queue.push(candidate.id);
|
|
455
|
+
queued.add(candidate.id);
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
// 设置输出
|
|
460
|
+
const outputNodes = workflow.nodes.filter(n => n.data.type === 'output');
|
|
461
|
+
if (outputNodes.length > 0) {
|
|
462
|
+
const outputNode = outputNodes[0];
|
|
463
|
+
const execution = context.nodeExecutions.get(outputNode.id);
|
|
464
|
+
if (execution) {
|
|
465
|
+
context.variables.set('__output__', execution.result);
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
selectConditionEdges(edges, result) {
|
|
470
|
+
const conditionResult = Boolean(result);
|
|
471
|
+
const conditionEdges = edges.filter(edge => edge.data?.type === 'condition');
|
|
472
|
+
if (conditionEdges.length === 0) {
|
|
473
|
+
return edges.filter(edge => edge.data?.type !== 'data');
|
|
474
|
+
}
|
|
475
|
+
return conditionEdges.filter(edge => edge.data?.conditionValue === conditionResult);
|
|
476
|
+
}
|
|
477
|
+
dependenciesSatisfied(workflow, nodeId, completed, skipped) {
|
|
478
|
+
const inputEdges = workflow.edges.filter(edge => edge.target === nodeId && edge.data?.type !== 'data');
|
|
479
|
+
if (inputEdges.length === 0) {
|
|
480
|
+
return true;
|
|
481
|
+
}
|
|
482
|
+
return inputEdges.every(edge => completed.has(edge.source) || skipped.has(edge.source));
|
|
483
|
+
}
|
|
484
|
+
skipInactiveBranch(workflow, context, nodeId, skipped, activeTargets, completed, force = false) {
|
|
485
|
+
if (skipped.has(nodeId) || context.nodeExecutions.has(nodeId) || activeTargets.has(nodeId)) {
|
|
486
|
+
return;
|
|
487
|
+
}
|
|
488
|
+
const incomingControlEdges = workflow.edges.filter(edge => edge.target === nodeId && edge.data?.type !== 'data');
|
|
489
|
+
if (!force && incomingControlEdges.some(edge => activeTargets.has(edge.source) || completed.has(edge.source))) {
|
|
490
|
+
return;
|
|
491
|
+
}
|
|
492
|
+
skipped.add(nodeId);
|
|
493
|
+
context.nodeExecutions.set(nodeId, {
|
|
494
|
+
nodeId,
|
|
495
|
+
status: 'skipped',
|
|
496
|
+
startTime: Date.now(),
|
|
497
|
+
endTime: Date.now(),
|
|
498
|
+
retryCount: 0,
|
|
499
|
+
logs: []
|
|
500
|
+
});
|
|
501
|
+
const skippedExecution = context.nodeExecutions.get(nodeId);
|
|
502
|
+
this.emitEvent('workflow:node_skipped', {
|
|
503
|
+
nodeId,
|
|
504
|
+
workflowId: context.workflowId,
|
|
505
|
+
executionId: context.executionId,
|
|
506
|
+
sessionId: context.sessionId,
|
|
507
|
+
startTime: skippedExecution?.startTime,
|
|
508
|
+
endTime: skippedExecution?.endTime,
|
|
509
|
+
reason: 'condition_branch_skipped',
|
|
510
|
+
});
|
|
511
|
+
for (const edge of workflow.edges.filter(edge => edge.source === nodeId && edge.data?.type !== 'data')) {
|
|
512
|
+
this.skipInactiveBranch(workflow, context, edge.target, skipped, activeTargets, completed);
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
collectSubgraphNodeIds(workflow, sourceNodeId, bodyEdgeType) {
|
|
516
|
+
const body = new Set();
|
|
517
|
+
const exits = new Set(workflow.edges
|
|
518
|
+
.filter(edge => edge.source === sourceNodeId && edge.data?.type !== bodyEdgeType && edge.data?.type !== 'data')
|
|
519
|
+
.map(edge => edge.target));
|
|
520
|
+
const queue = workflow.edges
|
|
521
|
+
.filter(edge => edge.source === sourceNodeId && edge.data?.type === bodyEdgeType)
|
|
522
|
+
.map(edge => edge.target);
|
|
523
|
+
while (queue.length > 0) {
|
|
524
|
+
const nodeId = queue.shift();
|
|
525
|
+
if (nodeId === sourceNodeId || exits.has(nodeId) || body.has(nodeId)) {
|
|
526
|
+
continue;
|
|
527
|
+
}
|
|
528
|
+
body.add(nodeId);
|
|
529
|
+
for (const edge of workflow.edges.filter(edge => edge.source === nodeId && edge.data?.type !== 'data')) {
|
|
530
|
+
queue.push(edge.target);
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
return body;
|
|
534
|
+
}
|
|
535
|
+
collectLoopBodyNodeIds(workflow, loopNodeId) {
|
|
536
|
+
return this.collectSubgraphNodeIds(workflow, loopNodeId, 'loop');
|
|
537
|
+
}
|
|
538
|
+
collectParallelBodyNodeIds(workflow, parallelNodeId) {
|
|
539
|
+
return this.collectSubgraphNodeIds(workflow, parallelNodeId, 'sequence');
|
|
540
|
+
}
|
|
541
|
+
isParallelBodyEntryEdge(workflow, edge) {
|
|
542
|
+
if (edge.data?.type !== 'sequence') {
|
|
543
|
+
return false;
|
|
544
|
+
}
|
|
545
|
+
const source = workflow.nodes.find(node => node.id === edge.source);
|
|
546
|
+
if (source?.data.type !== 'parallel') {
|
|
547
|
+
return false;
|
|
548
|
+
}
|
|
549
|
+
return this.collectParallelBodyNodeIds(workflow, edge.source).has(edge.target);
|
|
550
|
+
}
|
|
551
|
+
shouldStopExecution(context) {
|
|
552
|
+
return context.status === 'paused' || context.status === 'failed' || context.status === 'cancelled';
|
|
553
|
+
}
|
|
554
|
+
isExecutionTimeout(context) {
|
|
555
|
+
return context.status === 'failed' && context.error?.startsWith('Execution timeout after ') === true;
|
|
556
|
+
}
|
|
557
|
+
async executeLoopNode(workflow, context, nodeId, input) {
|
|
558
|
+
const node = workflow.nodes.find(n => n.id === nodeId);
|
|
559
|
+
if (!node) {
|
|
560
|
+
throw new Error(`Node not found: ${nodeId}`);
|
|
561
|
+
}
|
|
562
|
+
const bodyEntryEdges = workflow.edges.filter(edge => edge.source === nodeId && edge.data?.type === 'loop');
|
|
563
|
+
if (bodyEntryEdges.length === 0) {
|
|
564
|
+
throw new Error(`Loop node ${nodeId} has no loop body edge`);
|
|
565
|
+
}
|
|
566
|
+
const bodyNodeIds = this.collectLoopBodyNodeIds(workflow, nodeId);
|
|
567
|
+
if (bodyNodeIds.size === 0) {
|
|
568
|
+
throw new Error(`Loop node ${nodeId} has no executable body`);
|
|
569
|
+
}
|
|
570
|
+
const config = node.data.config;
|
|
571
|
+
const iterations = config.loopType === 'while' ? undefined : this.resolveLoopIterations(node, input, context);
|
|
572
|
+
const maxWhileIterations = config.maxIterations ?? context.variables.get('__maxIterations__') ?? 1000;
|
|
573
|
+
const results = [];
|
|
574
|
+
const loopVariableKeys = [`${nodeId}.index`, 'loop.index', 'loop.item', 'loop.length', 'loop'];
|
|
575
|
+
const previousLoopVariables = new Map(loopVariableKeys.map(key => [key, context.variables.get(key)]));
|
|
576
|
+
const hadLoopVariables = new Set(loopVariableKeys.filter(key => context.variables.has(key)));
|
|
577
|
+
try {
|
|
578
|
+
for (let i = 0;; i++) {
|
|
579
|
+
if (config.loopType === 'while' && i >= maxWhileIterations) {
|
|
580
|
+
throw new Error(`Loop iteration limit exceeded: ${maxWhileIterations}`);
|
|
581
|
+
}
|
|
582
|
+
if (iterations && i >= iterations.length) {
|
|
583
|
+
break;
|
|
584
|
+
}
|
|
585
|
+
const item = iterations ? iterations[i] : i;
|
|
586
|
+
const length = iterations ? iterations.length : maxWhileIterations;
|
|
587
|
+
context.variables.set(`${nodeId}.index`, i);
|
|
588
|
+
context.variables.set('loop.index', i);
|
|
589
|
+
context.variables.set('loop.item', item);
|
|
590
|
+
context.variables.set('loop.length', length);
|
|
591
|
+
context.variables.set('loop', { index: i, item, length });
|
|
592
|
+
if (config.loopType === 'while') {
|
|
593
|
+
if (!config.loopCondition) {
|
|
594
|
+
throw new Error(`Loop condition is required for while loop node ${nodeId}`);
|
|
595
|
+
}
|
|
596
|
+
if (!this.evaluateLoopCondition(config.loopCondition, input, context)) {
|
|
597
|
+
break;
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
const iterationResults = {};
|
|
601
|
+
const completedBody = new Set([nodeId]);
|
|
602
|
+
const queue = bodyEntryEdges.map(edge => edge.target);
|
|
603
|
+
const queued = new Set(queue);
|
|
604
|
+
while (queue.length > 0) {
|
|
605
|
+
if (this.shouldStopExecution(context)) {
|
|
606
|
+
break;
|
|
607
|
+
}
|
|
608
|
+
const bodyNodeId = queue.shift();
|
|
609
|
+
queued.delete(bodyNodeId);
|
|
610
|
+
if (!bodyNodeIds.has(bodyNodeId) || completedBody.has(bodyNodeId)) {
|
|
611
|
+
continue;
|
|
612
|
+
}
|
|
613
|
+
await this.executeNode(workflow, context, bodyNodeId);
|
|
614
|
+
if (this.shouldStopExecution(context)) {
|
|
615
|
+
break;
|
|
616
|
+
}
|
|
617
|
+
completedBody.add(bodyNodeId);
|
|
618
|
+
iterationResults[bodyNodeId] = context.nodeExecutions.get(bodyNodeId)?.result;
|
|
619
|
+
const bodyNode = workflow.nodes.find(n => n.id === bodyNodeId);
|
|
620
|
+
const bodyResult = context.nodeExecutions.get(bodyNodeId)?.result;
|
|
621
|
+
const outgoingEdges = workflow.edges.filter(edge => edge.source === bodyNodeId && edge.data?.type !== 'data');
|
|
622
|
+
const activeEdges = bodyNode?.data.type === 'condition'
|
|
623
|
+
? this.selectConditionEdges(outgoingEdges, bodyResult)
|
|
624
|
+
: outgoingEdges;
|
|
625
|
+
for (const edge of activeEdges) {
|
|
626
|
+
if (bodyNodeIds.has(edge.target) && !queued.has(edge.target) && !completedBody.has(edge.target) && this.dependenciesSatisfiedWithin(edge.target, workflow, completedBody, bodyNodeIds)) {
|
|
627
|
+
queue.push(edge.target);
|
|
628
|
+
queued.add(edge.target);
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
results.push(iterationResults);
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
finally {
|
|
636
|
+
for (const key of loopVariableKeys) {
|
|
637
|
+
if (hadLoopVariables.has(key)) {
|
|
638
|
+
context.variables.set(key, previousLoopVariables.get(key));
|
|
639
|
+
}
|
|
640
|
+
else {
|
|
641
|
+
context.variables.delete(key);
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
return results;
|
|
646
|
+
}
|
|
647
|
+
dependenciesSatisfiedWithin(nodeId, workflow, completed, allowedNodes) {
|
|
648
|
+
const inputEdges = workflow.edges.filter(edge => edge.target === nodeId && edge.data?.type !== 'data' && (allowedNodes.has(edge.source) || completed.has(edge.source)));
|
|
649
|
+
return inputEdges.every(edge => completed.has(edge.source));
|
|
650
|
+
}
|
|
651
|
+
resolveLoopIterations(node, input, context) {
|
|
652
|
+
const config = node.data.config;
|
|
653
|
+
if (config.loopType === 'count') {
|
|
654
|
+
const count = config.loopCount ?? 1;
|
|
655
|
+
if (!Number.isInteger(count) || count < 0) {
|
|
656
|
+
throw new Error(`Loop count must be a non-negative integer for node ${node.id}`);
|
|
657
|
+
}
|
|
658
|
+
return Array.from({ length: count }, (_, index) => index);
|
|
659
|
+
}
|
|
660
|
+
if (config.loopType === 'foreach') {
|
|
661
|
+
if (!config.loopItems) {
|
|
662
|
+
throw new Error(`Loop items is required for foreach loop node ${node.id}`);
|
|
663
|
+
}
|
|
664
|
+
const items = this.resolveLoopItems(config.loopItems, input, context);
|
|
665
|
+
if (!Array.isArray(items)) {
|
|
666
|
+
throw new Error(`Loop items must resolve to an array for node ${node.id}`);
|
|
667
|
+
}
|
|
668
|
+
return items;
|
|
669
|
+
}
|
|
670
|
+
if (config.loopType === 'while') {
|
|
671
|
+
if (!config.loopCondition) {
|
|
672
|
+
throw new Error(`Loop condition is required for while loop node ${node.id}`);
|
|
673
|
+
}
|
|
674
|
+
return [];
|
|
675
|
+
}
|
|
676
|
+
throw new Error(`Unknown loop type: ${config.loopType}`);
|
|
677
|
+
}
|
|
678
|
+
resolveLoopItems(reference, input, context) {
|
|
679
|
+
const expressionMatch = reference.match(/^\$\{(.+)\}$/);
|
|
680
|
+
const path = expressionMatch ? expressionMatch[1] : reference;
|
|
681
|
+
if (path === 'input')
|
|
682
|
+
return input;
|
|
683
|
+
if (path.startsWith('input.'))
|
|
684
|
+
return this.getPathValue(input, path.slice('input.'.length));
|
|
685
|
+
if (path === 'variables')
|
|
686
|
+
return Object.fromEntries(context.variables);
|
|
687
|
+
if (path.startsWith('variables.'))
|
|
688
|
+
return context.variables.get(path.slice('variables.'.length));
|
|
689
|
+
return context.variables.get(path) ?? reference;
|
|
690
|
+
}
|
|
691
|
+
evaluateLoopCondition(condition, input, context) {
|
|
692
|
+
const variables = Object.fromEntries(context.variables);
|
|
693
|
+
// 安全说明见 `src/core/workflow/expressionEvaluator.ts` 模块级注释。
|
|
694
|
+
return evaluateExpression(condition, { input, variables, Math, Date, JSON });
|
|
695
|
+
}
|
|
696
|
+
/**
|
|
697
|
+
* 执行单个节点
|
|
698
|
+
*/
|
|
699
|
+
async executeNode(workflow, context, nodeId) {
|
|
700
|
+
const node = workflow.nodes.find(n => n.id === nodeId);
|
|
701
|
+
if (!node) {
|
|
702
|
+
throw new Error(`Node not found: ${nodeId}`);
|
|
703
|
+
}
|
|
704
|
+
const nodeData = node.data;
|
|
705
|
+
const execution = {
|
|
706
|
+
nodeId,
|
|
707
|
+
status: 'running',
|
|
708
|
+
startTime: Date.now(),
|
|
709
|
+
retryCount: 0,
|
|
710
|
+
logs: []
|
|
711
|
+
};
|
|
712
|
+
context.nodeExecutions.set(nodeId, execution);
|
|
713
|
+
this.emitEvent('workflow:node_started', {
|
|
714
|
+
nodeId,
|
|
715
|
+
workflowId: context.workflowId,
|
|
716
|
+
executionId: context.executionId,
|
|
717
|
+
sessionId: context.sessionId,
|
|
718
|
+
startTime: execution.startTime,
|
|
719
|
+
});
|
|
720
|
+
const maxRetries = nodeData.config.retryCount ?? 0;
|
|
721
|
+
const retryDelay = nodeData.config.retryDelay ?? 1000;
|
|
722
|
+
// 重试循环:失败后重试 maxRetries 次,总共最多执行 maxRetries + 1 次
|
|
723
|
+
// 之前的版本用递归调用 executeNode 实现重试,递归会重置 retryCount=0
|
|
724
|
+
// 造成只要持续失败就会无限重试,这里改成显式循环。
|
|
725
|
+
for (let attempt = 0; attempt <= maxRetries; attempt++) {
|
|
726
|
+
execution.retryCount = attempt;
|
|
727
|
+
if (attempt > 0) {
|
|
728
|
+
execution.status = 'running';
|
|
729
|
+
execution.startTime = Date.now();
|
|
730
|
+
execution.endTime = undefined;
|
|
731
|
+
execution.error = undefined;
|
|
732
|
+
this.log(context, 'info', nodeId, `Retrying in ${retryDelay}ms (attempt ${attempt}/${maxRetries})`);
|
|
733
|
+
await this.delay(retryDelay);
|
|
734
|
+
if (this.shouldStopExecution(context)) {
|
|
735
|
+
return;
|
|
736
|
+
}
|
|
737
|
+
this.emitEvent('workflow:node_retrying', {
|
|
738
|
+
nodeId,
|
|
739
|
+
workflowId: context.workflowId,
|
|
740
|
+
attempt,
|
|
741
|
+
executionId: context.executionId,
|
|
742
|
+
sessionId: context.sessionId,
|
|
743
|
+
startTime: execution.startTime,
|
|
744
|
+
});
|
|
745
|
+
}
|
|
746
|
+
if (this.shouldStopExecution(context)) {
|
|
747
|
+
return;
|
|
748
|
+
}
|
|
749
|
+
try {
|
|
750
|
+
// 准备输入
|
|
751
|
+
const input = await this.prepareNodeInput(workflow, context, nodeId);
|
|
752
|
+
// 执行节点
|
|
753
|
+
let result;
|
|
754
|
+
switch (nodeData.type) {
|
|
755
|
+
case 'start':
|
|
756
|
+
result = context.variables.get('__input__') || {};
|
|
757
|
+
break;
|
|
758
|
+
case 'schedule_trigger':
|
|
759
|
+
result = context.variables.get('__input__') || input || {};
|
|
760
|
+
if (result && typeof result === 'object' && '__schedule' in result) {
|
|
761
|
+
context.variables.set('schedule', result.__schedule);
|
|
762
|
+
}
|
|
763
|
+
break;
|
|
764
|
+
case 'input':
|
|
765
|
+
result = input;
|
|
766
|
+
break;
|
|
767
|
+
case 'output':
|
|
768
|
+
result = input;
|
|
769
|
+
context.variables.set('__output__', input);
|
|
770
|
+
break;
|
|
771
|
+
case 'leader':
|
|
772
|
+
result = await this.executors.get('agent').execute(node, input, context);
|
|
773
|
+
break;
|
|
774
|
+
case 'parallel':
|
|
775
|
+
result = await this.executors.get('parallel').execute(node, input, context);
|
|
776
|
+
break;
|
|
777
|
+
case 'loop':
|
|
778
|
+
result = await this.executeLoopNode(workflow, context, nodeId, input);
|
|
779
|
+
break;
|
|
780
|
+
case 'agent':
|
|
781
|
+
case 'tool':
|
|
782
|
+
case 'template':
|
|
783
|
+
case 'variable_assigner':
|
|
784
|
+
case 'variable_aggregator':
|
|
785
|
+
case 'list_operator':
|
|
786
|
+
case 'http_request':
|
|
787
|
+
case 'json_extractor':
|
|
788
|
+
case 'condition': {
|
|
789
|
+
const executor = this.executors.get(nodeData.type);
|
|
790
|
+
if (!executor) {
|
|
791
|
+
throw new Error(`No executor found for node type: ${nodeData.type}`);
|
|
792
|
+
}
|
|
793
|
+
result = await executor.execute(node, input, context);
|
|
794
|
+
break;
|
|
795
|
+
}
|
|
796
|
+
default:
|
|
797
|
+
throw new Error(`Unknown node type: ${nodeData.type}`);
|
|
798
|
+
}
|
|
799
|
+
if (this.shouldStopExecution(context)) {
|
|
800
|
+
execution.endTime = Date.now();
|
|
801
|
+
return;
|
|
802
|
+
}
|
|
803
|
+
// 保存结果
|
|
804
|
+
execution.result = result;
|
|
805
|
+
execution.status = 'completed';
|
|
806
|
+
execution.endTime = Date.now();
|
|
807
|
+
// 更新输出到上下文
|
|
808
|
+
this.updateOutputs(nodeId, nodeData.outputs, result, context);
|
|
809
|
+
this.emitEvent('workflow:node_completed', {
|
|
810
|
+
nodeId,
|
|
811
|
+
workflowId: context.workflowId,
|
|
812
|
+
executionId: context.executionId,
|
|
813
|
+
sessionId: context.sessionId,
|
|
814
|
+
result,
|
|
815
|
+
startTime: execution.startTime,
|
|
816
|
+
endTime: execution.endTime,
|
|
817
|
+
duration: execution.endTime - execution.startTime,
|
|
818
|
+
});
|
|
819
|
+
return;
|
|
820
|
+
}
|
|
821
|
+
catch (error) {
|
|
822
|
+
execution.status = 'failed';
|
|
823
|
+
execution.error = error instanceof Error ? error.message : String(error);
|
|
824
|
+
execution.endTime = Date.now();
|
|
825
|
+
this.log(context, 'error', nodeId, `Node execution failed (attempt ${attempt + 1}/${maxRetries + 1}): ${execution.error}`);
|
|
826
|
+
this.emitEvent('workflow:node_failed', {
|
|
827
|
+
nodeId,
|
|
828
|
+
workflowId: context.workflowId,
|
|
829
|
+
executionId: context.executionId,
|
|
830
|
+
sessionId: context.sessionId,
|
|
831
|
+
error: execution.error,
|
|
832
|
+
attempt: attempt + 1,
|
|
833
|
+
startTime: execution.startTime,
|
|
834
|
+
endTime: execution.endTime,
|
|
835
|
+
duration: execution.endTime - execution.startTime,
|
|
836
|
+
reason: 'node_error',
|
|
837
|
+
});
|
|
838
|
+
if (attempt >= maxRetries) {
|
|
839
|
+
throw error;
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
/**
|
|
845
|
+
* 准备节点输入
|
|
846
|
+
*/
|
|
847
|
+
async prepareNodeInput(workflow, context, nodeId) {
|
|
848
|
+
const node = workflow.nodes.find(n => n.id === nodeId);
|
|
849
|
+
if (!node) {
|
|
850
|
+
throw new Error(`Node not found: ${nodeId}`);
|
|
851
|
+
}
|
|
852
|
+
const inputs = node.data.inputs || {};
|
|
853
|
+
const resolved = {};
|
|
854
|
+
// 构建变量作用域
|
|
855
|
+
const scope = buildVariableScope(context, { config: workflow.config, extractOutputs: false });
|
|
856
|
+
for (const [key, input] of Object.entries(inputs)) {
|
|
857
|
+
if (input.source) {
|
|
858
|
+
// 解析变量引用
|
|
859
|
+
const value = this.variableResolver.resolve(input.source, scope);
|
|
860
|
+
resolved[key] = value;
|
|
861
|
+
}
|
|
862
|
+
else if (input.defaultValue !== undefined) {
|
|
863
|
+
resolved[key] = input.defaultValue;
|
|
864
|
+
}
|
|
865
|
+
else if (input.required) {
|
|
866
|
+
throw new Error(`Required input missing: ${key} for node ${nodeId}`);
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
const dataEdges = workflow.edges.filter(e => e.target === nodeId && e.data?.type === 'data');
|
|
870
|
+
for (const edge of dataEdges) {
|
|
871
|
+
const sourceExecution = context.nodeExecutions.get(edge.source);
|
|
872
|
+
if (!sourceExecution)
|
|
873
|
+
continue;
|
|
874
|
+
const mapping = edge.data?.dataMapping;
|
|
875
|
+
if (mapping && Object.keys(mapping).length > 0) {
|
|
876
|
+
for (const [sourcePath, targetPath] of Object.entries(mapping)) {
|
|
877
|
+
const value = this.getPathValue(sourceExecution.result, sourcePath);
|
|
878
|
+
if (value === undefined) {
|
|
879
|
+
const actual = sourceExecution.result;
|
|
880
|
+
const shape = actual === null || actual === undefined
|
|
881
|
+
? String(actual)
|
|
882
|
+
: typeof actual === 'object'
|
|
883
|
+
? Array.isArray(actual)
|
|
884
|
+
? `array[${actual.length}]`
|
|
885
|
+
: `object{${Object.keys(actual).join(',')}}`
|
|
886
|
+
: `${typeof actual}(${JSON.stringify(actual).slice(0, 80)})`;
|
|
887
|
+
throw new Error(`Data mapping failed: source path "${sourcePath}" not found from node "${edge.source}". ` +
|
|
888
|
+
`Actual result shape: ${shape}. ` +
|
|
889
|
+
`Tip: for tools that return a bare value (string/number), use "." or "result" as the source path to map the whole value. "content"/"text" also read plain string results.`);
|
|
890
|
+
}
|
|
891
|
+
this.setPathValue(resolved, targetPath, value);
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
else if (Object.keys(resolved).length === 0) {
|
|
895
|
+
resolved.input = sourceExecution.result;
|
|
896
|
+
}
|
|
897
|
+
}
|
|
898
|
+
// 如果没有定义输入,从前置节点获取
|
|
899
|
+
if (Object.keys(resolved).length === 0) {
|
|
900
|
+
const inputEdges = workflow.edges.filter(e => e.target === nodeId && e.data?.type !== 'loop');
|
|
901
|
+
if (inputEdges.length === 1) {
|
|
902
|
+
const sourceId = inputEdges[0].source;
|
|
903
|
+
const sourceExecution = context.nodeExecutions.get(sourceId);
|
|
904
|
+
if (sourceExecution) {
|
|
905
|
+
return { input: sourceExecution.result };
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
else if (inputEdges.length > 1) {
|
|
909
|
+
// 多输入,合并
|
|
910
|
+
for (const edge of inputEdges) {
|
|
911
|
+
const sourceExecution = context.nodeExecutions.get(edge.source);
|
|
912
|
+
if (sourceExecution) {
|
|
913
|
+
resolved[edge.source] = sourceExecution.result;
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
return resolved;
|
|
919
|
+
}
|
|
920
|
+
getPathValue(source, path) {
|
|
921
|
+
if (path === '' || path === 'result' || path === '.') {
|
|
922
|
+
return source;
|
|
923
|
+
}
|
|
924
|
+
// Bare-value fields: map "content"/"text"/"value"/"output" to the whole
|
|
925
|
+
// non-object result (common pattern for tools that return a plain string/number).
|
|
926
|
+
if ((path === 'content' || path === 'text' || path === 'value' || path === 'output') &&
|
|
927
|
+
(typeof source === 'string' || typeof source === 'number' || typeof source === 'boolean')) {
|
|
928
|
+
return source;
|
|
929
|
+
}
|
|
930
|
+
let current = source;
|
|
931
|
+
for (const part of path.split('.')) {
|
|
932
|
+
if (current === undefined || current === null)
|
|
933
|
+
return undefined;
|
|
934
|
+
const arrayMatch = part.match(/^(\w+)\[(\d+)\]$/);
|
|
935
|
+
if (arrayMatch) {
|
|
936
|
+
current = current[arrayMatch[1]];
|
|
937
|
+
current = Array.isArray(current) ? current[Number(arrayMatch[2])] : undefined;
|
|
938
|
+
}
|
|
939
|
+
else {
|
|
940
|
+
current = current[part];
|
|
941
|
+
}
|
|
942
|
+
}
|
|
943
|
+
return current;
|
|
944
|
+
}
|
|
945
|
+
setPathValue(target, path, value) {
|
|
946
|
+
const parts = path.split('.').filter(Boolean);
|
|
947
|
+
if (parts.length === 0)
|
|
948
|
+
return;
|
|
949
|
+
let current = target;
|
|
950
|
+
for (let i = 0; i < parts.length - 1; i++) {
|
|
951
|
+
const part = parts[i];
|
|
952
|
+
if (!current[part] || typeof current[part] !== 'object' || Array.isArray(current[part])) {
|
|
953
|
+
current[part] = {};
|
|
954
|
+
}
|
|
955
|
+
current = current[part];
|
|
956
|
+
}
|
|
957
|
+
current[parts[parts.length - 1]] = value;
|
|
958
|
+
}
|
|
959
|
+
/**
|
|
960
|
+
* 更新节点输出到上下文
|
|
961
|
+
*/
|
|
962
|
+
updateOutputs(nodeId, outputs, result, context) {
|
|
963
|
+
// 保存节点结果
|
|
964
|
+
context.variables.set(`${nodeId}.result`, result);
|
|
965
|
+
// 保存定义的输出
|
|
966
|
+
if (outputs) {
|
|
967
|
+
for (const [key, output] of Object.entries(outputs)) {
|
|
968
|
+
if (result && typeof result === 'object' && key in result) {
|
|
969
|
+
context.variables.set(`${nodeId}.outputs.${key}`, result[key]);
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
/**
|
|
975
|
+
* 获取执行状态
|
|
976
|
+
*/
|
|
977
|
+
getStatus(executionId) {
|
|
978
|
+
return this.activeExecutions.get(executionId) ?? this.executionHistory.get(executionId);
|
|
979
|
+
}
|
|
980
|
+
storeExecutionHistory(executionId, context) {
|
|
981
|
+
this.executionHistory.set(executionId, context);
|
|
982
|
+
while (this.executionHistory.size > this.maxExecutionHistory) {
|
|
983
|
+
const oldestExecutionId = this.executionHistory.keys().next().value;
|
|
984
|
+
if (!oldestExecutionId)
|
|
985
|
+
break;
|
|
986
|
+
this.executionHistory.delete(oldestExecutionId);
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
/**
|
|
990
|
+
* 取消执行
|
|
991
|
+
*/
|
|
992
|
+
async cancel(executionId) {
|
|
993
|
+
const context = this.activeExecutions.get(executionId);
|
|
994
|
+
if (!context) {
|
|
995
|
+
throw new Error(`Execution not found: ${executionId}`);
|
|
996
|
+
}
|
|
997
|
+
context.status = 'failed';
|
|
998
|
+
context.error = 'Cancelled by user';
|
|
999
|
+
context.endTime = Date.now();
|
|
1000
|
+
this.storeExecutionHistory(executionId, context);
|
|
1001
|
+
this.activeExecutions.delete(executionId);
|
|
1002
|
+
this.emitEvent('workflow:execution_cancelled', {
|
|
1003
|
+
executionId,
|
|
1004
|
+
workflowId: context.workflowId,
|
|
1005
|
+
sessionId: context.sessionId,
|
|
1006
|
+
error: context.error,
|
|
1007
|
+
endTime: context.endTime,
|
|
1008
|
+
reason: 'cancelled_by_user',
|
|
1009
|
+
});
|
|
1010
|
+
await this.saveExecution(context);
|
|
1011
|
+
}
|
|
1012
|
+
/**
|
|
1013
|
+
* 暂停执行 — 正在运行的节点会完成,后续节点在下一次 shouldStopExecution 检查前停止。
|
|
1014
|
+
*/
|
|
1015
|
+
pause(executionId) {
|
|
1016
|
+
const context = this.activeExecutions.get(executionId);
|
|
1017
|
+
if (!context) {
|
|
1018
|
+
throw new Error(`Execution not found: ${executionId}`);
|
|
1019
|
+
}
|
|
1020
|
+
if (context.status !== 'running') {
|
|
1021
|
+
throw new Error(`Execution is not running: ${executionId} (status=${context.status})`);
|
|
1022
|
+
}
|
|
1023
|
+
context.status = 'paused';
|
|
1024
|
+
this.emitEvent('workflow:execution_paused', {
|
|
1025
|
+
executionId,
|
|
1026
|
+
workflowId: context.workflowId,
|
|
1027
|
+
sessionId: context.sessionId,
|
|
1028
|
+
});
|
|
1029
|
+
}
|
|
1030
|
+
/**
|
|
1031
|
+
* 恢复已暂停的执行。
|
|
1032
|
+
* 将状态改为 running 并重新启动 runWorkflow 循环 — 已完成的节点会被跳过。
|
|
1033
|
+
*/
|
|
1034
|
+
async resume(executionId) {
|
|
1035
|
+
const context = this.activeExecutions.get(executionId);
|
|
1036
|
+
if (!context) {
|
|
1037
|
+
throw new Error(`Execution not found: ${executionId}`);
|
|
1038
|
+
}
|
|
1039
|
+
if (context.status !== 'paused') {
|
|
1040
|
+
throw new Error(`Execution is not paused: ${executionId} (status=${context.status})`);
|
|
1041
|
+
}
|
|
1042
|
+
context.status = 'running';
|
|
1043
|
+
this.emitEvent('workflow:execution_resumed', {
|
|
1044
|
+
executionId,
|
|
1045
|
+
workflowId: context.workflowId,
|
|
1046
|
+
sessionId: context.sessionId,
|
|
1047
|
+
});
|
|
1048
|
+
// 重新启动执行循环 — runWorkflow 内部会跳过已 completed/skipped 的节点
|
|
1049
|
+
const workflow = this.workflowCache.get(context.workflowId);
|
|
1050
|
+
if (!workflow) {
|
|
1051
|
+
context.status = 'failed';
|
|
1052
|
+
context.error = 'Cannot resume: workflow definition no longer cached';
|
|
1053
|
+
this.activeExecutions.delete(executionId);
|
|
1054
|
+
this.emitEvent('workflow:execution_failed', {
|
|
1055
|
+
executionId,
|
|
1056
|
+
workflowId: context.workflowId,
|
|
1057
|
+
sessionId: context.sessionId,
|
|
1058
|
+
error: context.error,
|
|
1059
|
+
endTime: context.endTime,
|
|
1060
|
+
reason: 'resume_workflow_missing',
|
|
1061
|
+
});
|
|
1062
|
+
return;
|
|
1063
|
+
}
|
|
1064
|
+
this.runWorkflow(workflow, context)
|
|
1065
|
+
.then(() => {
|
|
1066
|
+
if (context.status === 'failed') {
|
|
1067
|
+
if (this.isExecutionTimeout(context)) {
|
|
1068
|
+
return;
|
|
1069
|
+
}
|
|
1070
|
+
this.emitEvent('workflow:execution_failed', {
|
|
1071
|
+
executionId,
|
|
1072
|
+
workflowId: context.workflowId,
|
|
1073
|
+
sessionId: context.sessionId,
|
|
1074
|
+
error: context.error,
|
|
1075
|
+
endTime: context.endTime,
|
|
1076
|
+
reason: 'execution_failed',
|
|
1077
|
+
});
|
|
1078
|
+
return;
|
|
1079
|
+
}
|
|
1080
|
+
if (context.status !== 'running') {
|
|
1081
|
+
return;
|
|
1082
|
+
}
|
|
1083
|
+
context.status = 'completed';
|
|
1084
|
+
context.endTime = Date.now();
|
|
1085
|
+
this.emitEvent('workflow:execution_completed', {
|
|
1086
|
+
executionId,
|
|
1087
|
+
workflowId: context.workflowId,
|
|
1088
|
+
sessionId: context.sessionId,
|
|
1089
|
+
output: context.variables.get('__output__'),
|
|
1090
|
+
startTime: context.startTime,
|
|
1091
|
+
endTime: context.endTime,
|
|
1092
|
+
duration: context.endTime - context.startTime,
|
|
1093
|
+
});
|
|
1094
|
+
})
|
|
1095
|
+
.catch((error) => {
|
|
1096
|
+
if (this.isExecutionTimeout(context)) {
|
|
1097
|
+
return;
|
|
1098
|
+
}
|
|
1099
|
+
this.handleExecutionError(context, error);
|
|
1100
|
+
})
|
|
1101
|
+
.finally(() => {
|
|
1102
|
+
this.storeExecutionHistory(executionId, context);
|
|
1103
|
+
if (context.status !== 'paused') {
|
|
1104
|
+
this.activeExecutions.delete(executionId);
|
|
1105
|
+
this.workflowCache.delete(context.workflowId);
|
|
1106
|
+
}
|
|
1107
|
+
this.saveExecution(context).catch(err => {
|
|
1108
|
+
coreLogger.error('Failed to save execution after resume:', err);
|
|
1109
|
+
});
|
|
1110
|
+
});
|
|
1111
|
+
}
|
|
1112
|
+
/**
|
|
1113
|
+
* 加载 workflow 定义
|
|
1114
|
+
*/
|
|
1115
|
+
async loadWorkflow(workflowId) {
|
|
1116
|
+
return this.workflowManager ? this.workflowManager.get(workflowId) : null;
|
|
1117
|
+
}
|
|
1118
|
+
/**
|
|
1119
|
+
* 保存执行记录
|
|
1120
|
+
*/
|
|
1121
|
+
async saveExecution(context) {
|
|
1122
|
+
try {
|
|
1123
|
+
const existing = this.db.getWorkflowExecution(context.executionId);
|
|
1124
|
+
const serializable = {
|
|
1125
|
+
workflowId: context.workflowId,
|
|
1126
|
+
executionId: context.executionId,
|
|
1127
|
+
sessionId: context.sessionId,
|
|
1128
|
+
status: context.status,
|
|
1129
|
+
startTime: context.startTime,
|
|
1130
|
+
endTime: context.endTime,
|
|
1131
|
+
variables: Object.fromEntries(context.variables),
|
|
1132
|
+
nodeExecutions: Object.fromEntries([...context.nodeExecutions.entries()].map(([id, state]) => [id, { ...state, logs: undefined }])),
|
|
1133
|
+
error: context.error,
|
|
1134
|
+
};
|
|
1135
|
+
if (existing) {
|
|
1136
|
+
this.db.updateWorkflowExecution(context.executionId, {
|
|
1137
|
+
status: context.status,
|
|
1138
|
+
end_time: context.endTime,
|
|
1139
|
+
context: serializable,
|
|
1140
|
+
error: context.error,
|
|
1141
|
+
});
|
|
1142
|
+
}
|
|
1143
|
+
else {
|
|
1144
|
+
this.db.createWorkflowExecution({
|
|
1145
|
+
id: context.executionId,
|
|
1146
|
+
workflow_id: context.workflowId,
|
|
1147
|
+
session_id: context.sessionId,
|
|
1148
|
+
status: context.status,
|
|
1149
|
+
start_time: context.startTime,
|
|
1150
|
+
end_time: context.endTime,
|
|
1151
|
+
context: serializable,
|
|
1152
|
+
error: context.error,
|
|
1153
|
+
});
|
|
1154
|
+
}
|
|
1155
|
+
// 保存日志
|
|
1156
|
+
for (const log of context.logs) {
|
|
1157
|
+
this.db.createWorkflowExecutionLog({
|
|
1158
|
+
execution_id: context.executionId,
|
|
1159
|
+
timestamp: log.timestamp,
|
|
1160
|
+
level: log.level,
|
|
1161
|
+
node_id: log.nodeId || undefined,
|
|
1162
|
+
message: log.message,
|
|
1163
|
+
data: log.data,
|
|
1164
|
+
});
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
catch (err) {
|
|
1168
|
+
coreLogger.error('[WorkflowEngine] Failed to save execution:', err);
|
|
1169
|
+
}
|
|
1170
|
+
}
|
|
1171
|
+
/**
|
|
1172
|
+
* 处理执行错误
|
|
1173
|
+
*/
|
|
1174
|
+
handleExecutionError(context, error) {
|
|
1175
|
+
context.status = 'failed';
|
|
1176
|
+
context.error = error instanceof Error ? error.message : String(error);
|
|
1177
|
+
context.endTime = Date.now();
|
|
1178
|
+
this.log(context, 'error', '', `Execution failed: ${context.error}`);
|
|
1179
|
+
this.emitEvent('workflow:execution_failed', {
|
|
1180
|
+
executionId: context.executionId,
|
|
1181
|
+
workflowId: context.workflowId,
|
|
1182
|
+
sessionId: context.sessionId,
|
|
1183
|
+
error: context.error,
|
|
1184
|
+
endTime: context.endTime,
|
|
1185
|
+
reason: 'execution_error',
|
|
1186
|
+
});
|
|
1187
|
+
}
|
|
1188
|
+
/**
|
|
1189
|
+
* 记录日志
|
|
1190
|
+
*/
|
|
1191
|
+
log(context, level, nodeId, message, data) {
|
|
1192
|
+
const logEntry = {
|
|
1193
|
+
timestamp: Date.now(),
|
|
1194
|
+
level,
|
|
1195
|
+
nodeId,
|
|
1196
|
+
message,
|
|
1197
|
+
data
|
|
1198
|
+
};
|
|
1199
|
+
context.logs.push(logEntry);
|
|
1200
|
+
// 同步把日志通过 SSE 推给前端,驱动 CanvasView 的 execution_progress 监听
|
|
1201
|
+
this.emitEvent('workflow:execution_progress', {
|
|
1202
|
+
executionId: context.executionId,
|
|
1203
|
+
workflowId: context.workflowId,
|
|
1204
|
+
sessionId: context.sessionId,
|
|
1205
|
+
nodeId,
|
|
1206
|
+
log: logEntry
|
|
1207
|
+
});
|
|
1208
|
+
}
|
|
1209
|
+
/**
|
|
1210
|
+
* 发送事件
|
|
1211
|
+
*/
|
|
1212
|
+
emitEvent(event, data) {
|
|
1213
|
+
this.eventEmitter.emit(event, data);
|
|
1214
|
+
// 统一 per-mode 可观测出口:把执行生命周期事件桥接到 ModeAudit metrics。
|
|
1215
|
+
this.recordWorkflowAuditEvent(event, data);
|
|
1216
|
+
}
|
|
1217
|
+
recordWorkflowAuditEvent(event, data) {
|
|
1218
|
+
try {
|
|
1219
|
+
switch (event) {
|
|
1220
|
+
case 'workflow:execution_completed':
|
|
1221
|
+
case 'workflow:execution_failed':
|
|
1222
|
+
case 'workflow:execution_cancelled':
|
|
1223
|
+
case 'workflow:execution_paused':
|
|
1224
|
+
case 'workflow:execution_resumed': {
|
|
1225
|
+
const outcome = String(event).split(':').pop()?.replace('execution_', '') ?? 'unknown';
|
|
1226
|
+
auditModeEvent('workflow', {
|
|
1227
|
+
kind: 'workflow_execution',
|
|
1228
|
+
outcome,
|
|
1229
|
+
executionId: String(data.executionId ?? ''),
|
|
1230
|
+
durationMs: typeof data.duration === 'number' ? data.duration : undefined,
|
|
1231
|
+
});
|
|
1232
|
+
break;
|
|
1233
|
+
}
|
|
1234
|
+
default:
|
|
1235
|
+
break;
|
|
1236
|
+
}
|
|
1237
|
+
}
|
|
1238
|
+
catch {
|
|
1239
|
+
// 审计/metrics 失败绝不影响 workflow 主路径。
|
|
1240
|
+
}
|
|
1241
|
+
}
|
|
1242
|
+
/**
|
|
1243
|
+
* 延迟
|
|
1244
|
+
*/
|
|
1245
|
+
delay(ms) {
|
|
1246
|
+
return new Promise(resolve => setTimeout(resolve, ms));
|
|
1247
|
+
}
|
|
1248
|
+
}
|
|
1249
|
+
//# sourceMappingURL=WorkflowEngine.js.map
|