@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,1353 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Leader 的任务规划族工具实现。
|
|
3
|
+
*
|
|
4
|
+
* 把 LeaderToolsExecutor 中的下面这些方法抽成模块级函数:
|
|
5
|
+
* - create_task / update_task / delete_task / update_task_status
|
|
6
|
+
* - define_agent_role / materializeRoleDefinition(define_agent_role + create_task 内联使用)
|
|
7
|
+
* - list_available_roles
|
|
8
|
+
*
|
|
9
|
+
* dispatchAgent 状态副作用最重(scheduler / setDelegateMode / capability 重写),
|
|
10
|
+
* 仍留在 LeaderToolsExecutor 内部。
|
|
11
|
+
*/
|
|
12
|
+
import { SESSION_KEYS } from '../../../core/SessionStateKeys.js';
|
|
13
|
+
import { leaderLogger } from '../../../core/Log.js';
|
|
14
|
+
import { isAgentRuntimeActiveStatus, normalizeTaskStatusUpdateTarget } from '../../../contracts/adapters/StatusAdapter.js';
|
|
15
|
+
import { WorktreeService } from '../../../core/WorktreeService.js';
|
|
16
|
+
import { resolveModeRuntimeProjection } from '../../../core/ModeRuntimeProjection.js';
|
|
17
|
+
import { DatabaseRepositoryAdapter } from '../../../core/DatabaseRepositories.js';
|
|
18
|
+
import { existsSync, realpathSync } from 'node:fs';
|
|
19
|
+
import { basename, dirname, isAbsolute, join, relative, resolve } from 'node:path';
|
|
20
|
+
import { fail } from '../LeaderToolFailure.js';
|
|
21
|
+
import { resolveRoleFromName, ROLE_FALLBACK_DEFAULT } from '../../RoleRegistry.js';
|
|
22
|
+
import { PRESET_ROLE_PROFILES } from '../../RoleCapabilityModel.js';
|
|
23
|
+
import { normalizeBlueprint, serializeBlueprint, parseBlueprint, computeBlueprintCoverage, registerTaskId, unregisterTaskId, buildSubsystemContractSeeds, addSubsystem, updateSubsystem, deleteSubsystem, } from '../../../core/ProjectBlueprint.js';
|
|
24
|
+
function normalizeOptionalString(value) {
|
|
25
|
+
if (typeof value !== 'string')
|
|
26
|
+
return undefined;
|
|
27
|
+
const trimmed = value.trim();
|
|
28
|
+
return trimmed.length > 0 ? trimmed : undefined;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* 解析任务 ID 依赖列表,容忍 LLM/schema-coerce 产生的多种畸形输入:
|
|
32
|
+
* - 正常数组 ["T-1","T-2"]
|
|
33
|
+
* - 字符串化 JSON 数组 "[\"T-1\"]":schema array-coerce 会把它当 primitive 包成
|
|
34
|
+
* ["[\"T-1\"]"],或直接作为字符串传入 —— 两种都解嵌套展开为叶子 ID
|
|
35
|
+
* - 单个标量 "T-1"
|
|
36
|
+
* 单一事实源,供 create_task / update_task 共用,避免两处解析逻辑漂移。
|
|
37
|
+
*/
|
|
38
|
+
function normalizeTaskIdList(value) {
|
|
39
|
+
const out = [];
|
|
40
|
+
const visit = (item) => {
|
|
41
|
+
if (item === null || item === undefined)
|
|
42
|
+
return;
|
|
43
|
+
if (Array.isArray(item)) {
|
|
44
|
+
for (const el of item)
|
|
45
|
+
visit(el);
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
if (typeof item !== 'string')
|
|
49
|
+
return;
|
|
50
|
+
const trimmed = item.trim();
|
|
51
|
+
if (!trimmed)
|
|
52
|
+
return;
|
|
53
|
+
// 元素本身是 JSON 数组字符串(如 "[\"T-17\"]")→ 解析并逐元素展开。
|
|
54
|
+
if (trimmed.startsWith('[') && trimmed.endsWith(']')) {
|
|
55
|
+
try {
|
|
56
|
+
const parsed = JSON.parse(trimmed);
|
|
57
|
+
if (Array.isArray(parsed)) {
|
|
58
|
+
for (const el of parsed)
|
|
59
|
+
visit(el);
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
catch {
|
|
64
|
+
// 非合法 JSON:落到下方按普通字符串处理(task id 本身不含方括号)
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
out.push(trimmed);
|
|
68
|
+
};
|
|
69
|
+
visit(value);
|
|
70
|
+
return Array.from(new Set(out));
|
|
71
|
+
}
|
|
72
|
+
function parseBooleanFlag(value) {
|
|
73
|
+
if (typeof value === 'boolean')
|
|
74
|
+
return value;
|
|
75
|
+
if (typeof value === 'string') {
|
|
76
|
+
const normalized = value.trim().toLowerCase();
|
|
77
|
+
return normalized === 'true' || normalized === '1' || normalized === 'yes';
|
|
78
|
+
}
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
function persistCustomRolesSnapshot(ctx) {
|
|
82
|
+
ctx.leader.db.setSessionState(ctx.leader.sessionId, SESSION_KEYS.CUSTOM_ROLES, JSON.stringify(ctx.leader.getRoleRegistry().toDict()));
|
|
83
|
+
}
|
|
84
|
+
function normalizeOptionalNumber(value) {
|
|
85
|
+
if (typeof value === 'number' && Number.isFinite(value))
|
|
86
|
+
return value;
|
|
87
|
+
if (typeof value === 'string' && value.trim()) {
|
|
88
|
+
const parsed = Number(value.trim());
|
|
89
|
+
if (Number.isFinite(parsed))
|
|
90
|
+
return parsed;
|
|
91
|
+
}
|
|
92
|
+
return undefined;
|
|
93
|
+
}
|
|
94
|
+
function isPathInside(parent, child) {
|
|
95
|
+
const rel = relative(parent, child);
|
|
96
|
+
return rel === '' || (!!rel && !rel.startsWith('..') && !isAbsolute(rel));
|
|
97
|
+
}
|
|
98
|
+
function assertLeaderTaskScopeAllowed(ctx, scope) {
|
|
99
|
+
const workspaceRoot = resolve(ctx.leader.workspace);
|
|
100
|
+
const sessionsRoot = resolve(workspaceRoot, '.lingxiao', 'sessions');
|
|
101
|
+
const currentSessionRoot = resolve(sessionsRoot, ctx.leader.sessionId);
|
|
102
|
+
const entries = [scope.working_directory, ...(scope.write_scope ?? [])]
|
|
103
|
+
.filter((value) => typeof value === 'string' && value.trim().length > 0);
|
|
104
|
+
for (const entry of entries) {
|
|
105
|
+
const resolved = resolve(workspaceRoot, entry);
|
|
106
|
+
if (!isPathInside(workspaceRoot, resolved)) {
|
|
107
|
+
throw fail(`任务 scope 超出当前 workspace: ${entry}`);
|
|
108
|
+
}
|
|
109
|
+
if (isPathInside(sessionsRoot, resolved) && !isPathInside(currentSessionRoot, resolved)) {
|
|
110
|
+
throw fail(`任务 scope 不能指向其他 session: ${entry}`);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
function pickContractSurface(contract, fallback) {
|
|
115
|
+
const candidates = [
|
|
116
|
+
contract?.surface,
|
|
117
|
+
contract?.contract_surface,
|
|
118
|
+
contract?.id,
|
|
119
|
+
contract?.name,
|
|
120
|
+
contract?.title,
|
|
121
|
+
];
|
|
122
|
+
for (const candidate of candidates) {
|
|
123
|
+
const normalized = normalizeOptionalString(candidate);
|
|
124
|
+
if (normalized)
|
|
125
|
+
return normalized;
|
|
126
|
+
}
|
|
127
|
+
return fallback;
|
|
128
|
+
}
|
|
129
|
+
function normalizeContractContent(contract, evaluationPolicy) {
|
|
130
|
+
if (contract && typeof contract.content === 'string' && !evaluationPolicy) {
|
|
131
|
+
return contract.content;
|
|
132
|
+
}
|
|
133
|
+
return JSON.stringify({
|
|
134
|
+
contract: contract ?? null,
|
|
135
|
+
evaluation_policy: evaluationPolicy ?? null,
|
|
136
|
+
}, null, 2);
|
|
137
|
+
}
|
|
138
|
+
function writeContractNodeToBlackboard(ctx, input) {
|
|
139
|
+
// evaluation_policy 只是验收策略,不能伪装成 contract:<surface> 活跃契约。
|
|
140
|
+
// 只有显式 contract 模板才物化为黑板 contract 节点。
|
|
141
|
+
if (!input.contract) {
|
|
142
|
+
return { status: 'skipped', reason: 'no explicit contract template' };
|
|
143
|
+
}
|
|
144
|
+
try {
|
|
145
|
+
const blackboard = ctx.leader.leaderBlackboard;
|
|
146
|
+
const graph = blackboard?.blackboardGraph;
|
|
147
|
+
if (!graph?.addContract) {
|
|
148
|
+
return { status: 'skipped', reason: 'blackboard contract graph unavailable' };
|
|
149
|
+
}
|
|
150
|
+
const contractTitle = normalizeOptionalString(input.contract?.title) ?? input.subject;
|
|
151
|
+
const contractContent = normalizeContractContent(input.contract, input.evaluationPolicy);
|
|
152
|
+
const surface = input.surface ?? normalizeOptionalString(input.contract.surface) ?? input.taskId;
|
|
153
|
+
const tag = `contract:${surface}`;
|
|
154
|
+
graph.addContract({
|
|
155
|
+
sessionId: ctx.leader.sessionId,
|
|
156
|
+
title: `Contract: ${contractTitle}`,
|
|
157
|
+
content: contractContent,
|
|
158
|
+
tags: [tag, `contract:${input.taskId}`, `task:${input.taskId}`, `agent:${input.agentType}`, 'provenance:template'],
|
|
159
|
+
createdBy: input.taskId,
|
|
160
|
+
});
|
|
161
|
+
return { status: 'written', tag };
|
|
162
|
+
}
|
|
163
|
+
catch (err) {
|
|
164
|
+
const reason = err instanceof Error ? err.message : String(err);
|
|
165
|
+
leaderLogger.warn(`[LeaderTools] contract 节点写入失败 (task=${input.taskId}): ${reason}`);
|
|
166
|
+
return { status: 'failed', reason };
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
function formatTaskReadiness(ctx, task) {
|
|
170
|
+
const readiness = ctx.leader.board.getTaskReadiness(task);
|
|
171
|
+
if (task.status === 'dispatchable') {
|
|
172
|
+
return readiness === 'ready' ? 'ready' : `${readiness} · raw=dispatchable`;
|
|
173
|
+
}
|
|
174
|
+
return readiness === task.status ? task.status : `${readiness} · raw=${task.status}`;
|
|
175
|
+
}
|
|
176
|
+
function formatBlockedReason(ctx, task) {
|
|
177
|
+
const reason = ctx.leader.board.getBlockedReason(task);
|
|
178
|
+
return reason ? ` · blocked_reason=${reason}` : '';
|
|
179
|
+
}
|
|
180
|
+
function formatContractToolStatus(template, writeResult) {
|
|
181
|
+
const parts = [];
|
|
182
|
+
if (template.binding?.surface) {
|
|
183
|
+
parts.push(`contractBinding=contract:${template.binding.surface}[requireContract=${template.binding.requireContract === true},requireAck=${template.binding.requireAck === true}]`);
|
|
184
|
+
}
|
|
185
|
+
if (template.contract) {
|
|
186
|
+
const writeLabel = writeResult.status === 'written'
|
|
187
|
+
? `blackboardWrite=written(${writeResult.tag ?? `contract:${template.binding?.surface ?? template.surface ?? '?'}`})`
|
|
188
|
+
: `blackboardWrite=${writeResult.status}${writeResult.reason ? `(${writeResult.reason})` : ''}`;
|
|
189
|
+
parts.push(writeLabel);
|
|
190
|
+
}
|
|
191
|
+
if (template.evaluationPolicy) {
|
|
192
|
+
parts.push('evaluation_policy=attached');
|
|
193
|
+
}
|
|
194
|
+
return parts.length > 0 ? ` · ${parts.join(' · ')}` : '';
|
|
195
|
+
}
|
|
196
|
+
function hasOwn(input, key) {
|
|
197
|
+
return Object.prototype.hasOwnProperty.call(input, key);
|
|
198
|
+
}
|
|
199
|
+
function normalizeOptionalObject(value) {
|
|
200
|
+
return value && typeof value === 'object' && !Array.isArray(value)
|
|
201
|
+
? value
|
|
202
|
+
: undefined;
|
|
203
|
+
}
|
|
204
|
+
function normalizeStringArray(value) {
|
|
205
|
+
if (!Array.isArray(value))
|
|
206
|
+
return undefined;
|
|
207
|
+
const items = value
|
|
208
|
+
.filter((item) => typeof item === 'string')
|
|
209
|
+
.map(item => item.trim())
|
|
210
|
+
.filter(Boolean);
|
|
211
|
+
return items.length > 0 ? Array.from(new Set(items)) : undefined;
|
|
212
|
+
}
|
|
213
|
+
function validateContractTemplate(contract) {
|
|
214
|
+
if (!contract)
|
|
215
|
+
return [];
|
|
216
|
+
const errors = [];
|
|
217
|
+
const surface = normalizeOptionalString(contract.surface ?? contract.contract_surface);
|
|
218
|
+
const title = normalizeOptionalString(contract.title);
|
|
219
|
+
const content = normalizeOptionalString(contract.content);
|
|
220
|
+
if (!surface)
|
|
221
|
+
errors.push('contract.surface 必填且不能为空');
|
|
222
|
+
if (!title)
|
|
223
|
+
errors.push('contract.title 必填且不能为空');
|
|
224
|
+
if (!content)
|
|
225
|
+
errors.push('contract.content 必填且不能为空');
|
|
226
|
+
if (contract.version !== undefined) {
|
|
227
|
+
const version = normalizeOptionalNumber(contract.version);
|
|
228
|
+
if (!version || version < 1 || !Number.isInteger(version)) {
|
|
229
|
+
errors.push('contract.version 必须是正整数');
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
return errors;
|
|
233
|
+
}
|
|
234
|
+
function validateEvaluationPolicy(policy) {
|
|
235
|
+
if (!policy)
|
|
236
|
+
return [];
|
|
237
|
+
const errors = [];
|
|
238
|
+
const requiredEvidence = normalizeStringArray(policy.required_evidence);
|
|
239
|
+
const criticalGates = normalizeStringArray(policy.critical_gates ?? policy.critical_gate);
|
|
240
|
+
if (policy.required_evidence !== undefined && !requiredEvidence) {
|
|
241
|
+
errors.push('evaluation_policy.required_evidence 必须是非空字符串数组');
|
|
242
|
+
}
|
|
243
|
+
if ((policy.critical_gates ?? policy.critical_gate) !== undefined && !criticalGates) {
|
|
244
|
+
errors.push('evaluation_policy.critical_gates 必须是非空字符串数组');
|
|
245
|
+
}
|
|
246
|
+
if (policy.max_repair !== undefined) {
|
|
247
|
+
const maxRepair = normalizeOptionalNumber(policy.max_repair);
|
|
248
|
+
if (maxRepair === undefined || maxRepair < 0 || !Number.isInteger(maxRepair)) {
|
|
249
|
+
errors.push('evaluation_policy.max_repair 必须是非负整数');
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
// v1.0.4: adaptive/speculation/adversarial 字段已移除,仅保留基础验收字段验证
|
|
253
|
+
return errors;
|
|
254
|
+
}
|
|
255
|
+
function buildContractTemplate(input) {
|
|
256
|
+
const contract = normalizeOptionalObject(input.args.contract);
|
|
257
|
+
const evaluationPolicy = normalizeOptionalObject(input.args.evaluation_policy);
|
|
258
|
+
const contractErrors = [
|
|
259
|
+
...(hasOwn(input.args, 'contract') && !contract ? ['contract 必须是对象'] : []),
|
|
260
|
+
...validateContractTemplate(contract),
|
|
261
|
+
];
|
|
262
|
+
const policyErrors = [
|
|
263
|
+
...(hasOwn(input.args, 'evaluation_policy') && !evaluationPolicy ? ['evaluation_policy 必须是对象'] : []),
|
|
264
|
+
...validateEvaluationPolicy(evaluationPolicy),
|
|
265
|
+
];
|
|
266
|
+
if (contractErrors.length > 0 || policyErrors.length > 0) {
|
|
267
|
+
return {
|
|
268
|
+
ok: false,
|
|
269
|
+
message: [
|
|
270
|
+
'契约模板校验失败:',
|
|
271
|
+
...contractErrors,
|
|
272
|
+
...policyErrors,
|
|
273
|
+
'contract 模板至少需要 surface/title/content;version 如提供必须为正整数。',
|
|
274
|
+
].join('\n- '),
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
const hasExplicitContractSurfaceArg = hasOwn(input.args, 'contract_surface');
|
|
278
|
+
const explicitContractSurface = normalizeOptionalString(input.args.contract_surface);
|
|
279
|
+
const contractSurface = normalizeOptionalString(contract?.surface ?? contract?.contract_surface);
|
|
280
|
+
const inheritedSurface = hasExplicitContractSurfaceArg ? undefined : input.existing?.contractBinding?.surface;
|
|
281
|
+
const surface = explicitContractSurface
|
|
282
|
+
?? contractSurface
|
|
283
|
+
?? inheritedSurface
|
|
284
|
+
?? (contract ? pickContractSurface(contract, input.subject) : undefined);
|
|
285
|
+
const version = normalizeOptionalNumber(input.args.contract_version ?? contract?.version ?? input.existing?.contractBinding?.version);
|
|
286
|
+
if (version !== undefined && (version < 1 || !Number.isInteger(version))) {
|
|
287
|
+
return { ok: false, message: 'contract_version 必须是正整数。' };
|
|
288
|
+
}
|
|
289
|
+
const requestId = normalizeOptionalString(input.args.contract_request_id)
|
|
290
|
+
?? (surface ? `${surface}@v${version ?? 1}` : undefined);
|
|
291
|
+
const isContractProducer = input.nodeKind === 'contract' || input.agentType === 'architect';
|
|
292
|
+
const isImplementationConsumer = !input.nodeKind || input.nodeKind === 'implement' || input.nodeKind === 'repair';
|
|
293
|
+
const hasExternalContractSurface = Boolean(explicitContractSurface || inheritedSurface);
|
|
294
|
+
const onlyPolicyOrAckTouched = !hasOwn(input.args, 'contract')
|
|
295
|
+
&& !hasExplicitContractSurfaceArg
|
|
296
|
+
&& !hasOwn(input.args, 'node_kind')
|
|
297
|
+
&& !hasOwn(input.args, 'require_contract');
|
|
298
|
+
const defaultRequireContract = Boolean(surface
|
|
299
|
+
&& hasExternalContractSurface
|
|
300
|
+
&& isImplementationConsumer
|
|
301
|
+
&& !isContractProducer);
|
|
302
|
+
const requireContract = hasOwn(input.args, 'require_contract')
|
|
303
|
+
? input.args.require_contract !== false
|
|
304
|
+
: (onlyPolicyOrAckTouched ? input.existing?.contractBinding?.requireContract : undefined) ?? defaultRequireContract;
|
|
305
|
+
const requireAck = hasOwn(input.args, 'require_ack')
|
|
306
|
+
? input.args.require_ack === true
|
|
307
|
+
: input.existing?.contractBinding?.requireAck ?? false;
|
|
308
|
+
const acceptanceCriteria = normalizeStringArray(contract?.criteria)
|
|
309
|
+
?? normalizeStringArray(evaluationPolicy?.criteria)
|
|
310
|
+
?? input.existing?.acceptance?.criteria;
|
|
311
|
+
return {
|
|
312
|
+
ok: true,
|
|
313
|
+
contract: contract ?? input.existing?.contract,
|
|
314
|
+
evaluationPolicy: evaluationPolicy ?? input.existing?.evaluationPolicy,
|
|
315
|
+
surface,
|
|
316
|
+
version,
|
|
317
|
+
requestId,
|
|
318
|
+
binding: surface ? {
|
|
319
|
+
surface,
|
|
320
|
+
version,
|
|
321
|
+
tag: `contract:${surface}`,
|
|
322
|
+
requestId,
|
|
323
|
+
requireContract,
|
|
324
|
+
requireAck,
|
|
325
|
+
} : undefined,
|
|
326
|
+
acceptanceCriteria,
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
function deriveSubject(description) {
|
|
330
|
+
const firstLine = description
|
|
331
|
+
.split(/\r?\n/)
|
|
332
|
+
.map(line => line.trim())
|
|
333
|
+
.find(Boolean) ?? description;
|
|
334
|
+
return firstLine.length > 80 ? `${firstLine.slice(0, 77)}...` : firstLine;
|
|
335
|
+
}
|
|
336
|
+
function normalizeWorktreePolicy(value) {
|
|
337
|
+
return value === 'task' || value === 'session' || value === 'none' || value === 'auto' ? value : 'none';
|
|
338
|
+
}
|
|
339
|
+
function shouldIsolateTask(input) {
|
|
340
|
+
// Solo 模式下 ephemeral worker 不需要 git worktree 隔离——
|
|
341
|
+
// write_scope 正交已防止写冲突,worktree 只会制造分支垃圾。
|
|
342
|
+
if (input.collaborationMode === 'solo')
|
|
343
|
+
return false;
|
|
344
|
+
if (input.scope.working_directory)
|
|
345
|
+
return false;
|
|
346
|
+
const implementationRoles = new Set(['coding', 'frontend', 'backend', 'fullstack']);
|
|
347
|
+
const role = input.agentType.toLowerCase();
|
|
348
|
+
const baseRole = input.baseRole?.toLowerCase();
|
|
349
|
+
return implementationRoles.has(role) || (baseRole ? implementationRoles.has(baseRole) : false);
|
|
350
|
+
}
|
|
351
|
+
function safeWorktreeName(sessionId, taskId, subject) {
|
|
352
|
+
const session = sessionId.toLowerCase().replace(/[^a-z0-9._-]+/g, '-').slice(-18);
|
|
353
|
+
const prefix = [session, taskId.toLowerCase().replace(/[^a-z0-9._-]+/g, '-')].filter(Boolean).join('-');
|
|
354
|
+
const suffix = subject
|
|
355
|
+
.toLowerCase()
|
|
356
|
+
.replace(/[^a-z0-9._-]+/g, '-')
|
|
357
|
+
.replace(/^-+|-+$/g, '')
|
|
358
|
+
.slice(0, 36);
|
|
359
|
+
return [prefix, suffix].filter(Boolean).join('-').slice(0, 70) || prefix || `task-${Date.now()}`;
|
|
360
|
+
}
|
|
361
|
+
function isInside(root, target) {
|
|
362
|
+
const rel = relative(root, target);
|
|
363
|
+
return rel === '' || (!!rel && !rel.startsWith('..') && !isAbsolute(rel));
|
|
364
|
+
}
|
|
365
|
+
function realpathPreservingMissingSuffix(path) {
|
|
366
|
+
const resolved = resolve(path);
|
|
367
|
+
let cursor = resolved;
|
|
368
|
+
const suffix = [];
|
|
369
|
+
while (!existsSync(cursor)) {
|
|
370
|
+
const parent = dirname(cursor);
|
|
371
|
+
if (parent === cursor)
|
|
372
|
+
return resolved;
|
|
373
|
+
suffix.unshift(basename(cursor));
|
|
374
|
+
cursor = parent;
|
|
375
|
+
}
|
|
376
|
+
const canonicalBase = realpathSync.native(cursor);
|
|
377
|
+
return suffix.length > 0 ? join(canonicalBase, ...suffix) : canonicalBase;
|
|
378
|
+
}
|
|
379
|
+
function mapPathIntoWorktree(inputPath, workspace, repoRoot, worktreePath) {
|
|
380
|
+
const source = resolve(workspace, inputPath || '.');
|
|
381
|
+
const canonicalRepoRoot = realpathPreservingMissingSuffix(repoRoot);
|
|
382
|
+
const canonicalSource = realpathPreservingMissingSuffix(source);
|
|
383
|
+
if (!isInside(canonicalRepoRoot, canonicalSource))
|
|
384
|
+
return worktreePath;
|
|
385
|
+
return join(worktreePath, relative(canonicalRepoRoot, canonicalSource));
|
|
386
|
+
}
|
|
387
|
+
async function applyWorktreePolicy(input) {
|
|
388
|
+
if (input.policy === 'none') {
|
|
389
|
+
return { scope: input.scope };
|
|
390
|
+
}
|
|
391
|
+
if (input.policy === 'session') {
|
|
392
|
+
return {
|
|
393
|
+
scope: {
|
|
394
|
+
...input.scope,
|
|
395
|
+
working_directory: input.scope.working_directory || input.ctx.leader.workspace,
|
|
396
|
+
},
|
|
397
|
+
contextNote: `[Worktree] policy=session,任务使用当前会话工作目录:${input.scope.working_directory || input.ctx.leader.workspace}`,
|
|
398
|
+
};
|
|
399
|
+
}
|
|
400
|
+
const repos = new DatabaseRepositoryAdapter(input.ctx.leader.db);
|
|
401
|
+
const service = new WorktreeService(repos.worktrees);
|
|
402
|
+
const repoRoot = await service.repoRoot(input.ctx.leader.workspace);
|
|
403
|
+
const worktree = await service.create({
|
|
404
|
+
repoRoot,
|
|
405
|
+
name: safeWorktreeName(input.ctx.leader.sessionId, input.taskId, input.subject),
|
|
406
|
+
sessionId: input.ctx.leader.sessionId,
|
|
407
|
+
taskId: input.taskId,
|
|
408
|
+
});
|
|
409
|
+
const nextScope = {
|
|
410
|
+
working_directory: mapPathIntoWorktree(input.scope.working_directory, input.ctx.leader.workspace, repoRoot, worktree.path),
|
|
411
|
+
write_scope: input.scope.write_scope && input.scope.write_scope.length > 0
|
|
412
|
+
? input.scope.write_scope.map((entry) => mapPathIntoWorktree(entry, input.ctx.leader.workspace, repoRoot, worktree.path))
|
|
413
|
+
: [worktree.path],
|
|
414
|
+
};
|
|
415
|
+
return {
|
|
416
|
+
scope: nextScope,
|
|
417
|
+
worktree,
|
|
418
|
+
contextNote: [
|
|
419
|
+
'[Worktree] policy=task,系统已为该任务创建独立 git worktree。',
|
|
420
|
+
`path=${worktree.path}`,
|
|
421
|
+
`branch=${worktree.branch}`,
|
|
422
|
+
`base=${worktree.base_branch}`,
|
|
423
|
+
'任务内所有写入应限制在该 worktree/write_scope 内;合并前必须提交或清理未提交变更。',
|
|
424
|
+
].join('\n'),
|
|
425
|
+
};
|
|
426
|
+
}
|
|
427
|
+
function createTaskArgumentHelp(availableRoles) {
|
|
428
|
+
return [
|
|
429
|
+
'create_task 参数不足:至少需要提供 subject、description 和显式 agent_type。',
|
|
430
|
+
'示例:{"subject":"修复模型切换不生效","description":"检查 web ui chat 模型切换是否写入设置并影响后续请求","agent_type":"frontend"}',
|
|
431
|
+
`可用角色: ${availableRoles.join(', ') || '无'}`,
|
|
432
|
+
].join('\n');
|
|
433
|
+
}
|
|
434
|
+
function createTaskAgentTypeHelp(availableRoles) {
|
|
435
|
+
return [
|
|
436
|
+
'agent_type 必须显式提供;由 Leader 根据任务契约选择并写入角色。',
|
|
437
|
+
'请选择已有预设/自定义角色,或通过 role_definition.role_name 一次性创建并绑定新角色。',
|
|
438
|
+
`可用角色: ${availableRoles.join(', ') || '无'}`,
|
|
439
|
+
].join('\n');
|
|
440
|
+
}
|
|
441
|
+
/** create_task 实现 */
|
|
442
|
+
export async function createTask(ctx, args = {}) {
|
|
443
|
+
args = args && typeof args === 'object' ? args : {};
|
|
444
|
+
const availableRoles = ctx.leader.getRoleRegistry().listRoleNames();
|
|
445
|
+
const roleDefinition = (args.role_definition && typeof args.role_definition === 'object')
|
|
446
|
+
? args.role_definition
|
|
447
|
+
: undefined;
|
|
448
|
+
const subjectInput = normalizeOptionalString(args.subject);
|
|
449
|
+
const descriptionInput = normalizeOptionalString(args.description);
|
|
450
|
+
if (!subjectInput && !descriptionInput) {
|
|
451
|
+
throw fail(createTaskArgumentHelp(availableRoles));
|
|
452
|
+
}
|
|
453
|
+
const subject = subjectInput ?? deriveSubject(descriptionInput);
|
|
454
|
+
const description = descriptionInput ?? subject;
|
|
455
|
+
const context = normalizeOptionalString(args.context);
|
|
456
|
+
// agent_type 现在做多层回落,不因缺省/变体名/笔误就中断建图:
|
|
457
|
+
// - 完全省略 → 优先取 role_definition.role_name,否则回落默认规范角色(fullstack)。
|
|
458
|
+
// - 提供了但不是已注册角色、且未带 role_definition → 按名字推断复用已有规范角色(见下方)。
|
|
459
|
+
let agentType = normalizeOptionalString(args.agent_type);
|
|
460
|
+
let agentTypeNote;
|
|
461
|
+
if (!agentType) {
|
|
462
|
+
const roleDefinitionName0 = normalizeOptionalString(roleDefinition?.role_name);
|
|
463
|
+
agentType = roleDefinitionName0
|
|
464
|
+
?? (ctx.leader.getRoleRegistry().exists(ROLE_FALLBACK_DEFAULT) ? ROLE_FALLBACK_DEFAULT : availableRoles[0]);
|
|
465
|
+
if (!agentType) {
|
|
466
|
+
throw fail(createTaskAgentTypeHelp(availableRoles));
|
|
467
|
+
}
|
|
468
|
+
if (!roleDefinitionName0) {
|
|
469
|
+
agentTypeNote = `(省略→${agentType})`;
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
const roleDefinitionName = normalizeOptionalString(roleDefinition?.role_name);
|
|
473
|
+
if (roleDefinitionName && roleDefinitionName !== agentType) {
|
|
474
|
+
throw fail(`role_definition.role_name (${roleDefinitionName}) 必须与 agent_type (${agentType}) 一致,避免任务绑定角色与新建角色分叉。`);
|
|
475
|
+
}
|
|
476
|
+
// 角色存在性回落:用户没带 role_definition 时,按名字确定性推断复用已有规范角色
|
|
477
|
+
// (resolveRoleFromName:精确/别名/分词/子串),推断不到再回落 fullstack。
|
|
478
|
+
// 带 role_definition 的路径走下方 materialize 新建角色,不在此改写。
|
|
479
|
+
if (!roleDefinition && !ctx.leader.getRoleRegistry().exists(agentType)) {
|
|
480
|
+
const registry = ctx.leader.getRoleRegistry();
|
|
481
|
+
const resolved = resolveRoleFromName(agentType, registry.listRoleNames())
|
|
482
|
+
?? (registry.exists(ROLE_FALLBACK_DEFAULT) ? ROLE_FALLBACK_DEFAULT : undefined);
|
|
483
|
+
if (!resolved) {
|
|
484
|
+
throw fail(`角色 '${agentType}' 不存在,且无可用规范角色可回落。可用角色: ${registry.listRoleNames().join(', ')}`);
|
|
485
|
+
}
|
|
486
|
+
if (resolved !== agentType) {
|
|
487
|
+
leaderLogger.warn(`[LeaderTools] create_task role inferred '${agentType}' -> '${resolved}' (no role_definition)`);
|
|
488
|
+
agentTypeNote = `'${agentType}'→${resolved}`;
|
|
489
|
+
}
|
|
490
|
+
agentType = resolved;
|
|
491
|
+
}
|
|
492
|
+
const blockedBy = normalizeTaskIdList(args.blocked_by);
|
|
493
|
+
const scope = {
|
|
494
|
+
working_directory: typeof args.working_directory === 'string' ? args.working_directory : undefined,
|
|
495
|
+
write_scope: Array.isArray(args.write_scope)
|
|
496
|
+
? args.write_scope.filter((value) => typeof value === 'string')
|
|
497
|
+
: undefined,
|
|
498
|
+
};
|
|
499
|
+
assertLeaderTaskScopeAllowed(ctx, scope);
|
|
500
|
+
const requestedWorktreePolicy = normalizeWorktreePolicy(args.worktree_policy);
|
|
501
|
+
const collaborationMode = resolveModeRuntimeProjection({
|
|
502
|
+
sessionId: ctx.leader.sessionId,
|
|
503
|
+
db: ctx.leader.db,
|
|
504
|
+
blackboardAvailable: ctx.leader.isBlackboardEnabled(),
|
|
505
|
+
permissionSummary: ctx.leader.getInteractionSnapshot().permissionSummary,
|
|
506
|
+
}).collaboration.mode;
|
|
507
|
+
const worktreePolicy = requestedWorktreePolicy === 'auto'
|
|
508
|
+
? shouldIsolateTask({ agentType, baseRole: normalizeOptionalString(roleDefinition?.base_role), scope, collaborationMode }) ? 'task' : 'none'
|
|
509
|
+
: requestedWorktreePolicy;
|
|
510
|
+
const nodeKind = typeof args.node_kind === 'string' ? args.node_kind : undefined;
|
|
511
|
+
// 蓝图实现任务自动绑 contract_surface(=subsystemId),触发 requireContract gate。
|
|
512
|
+
// 治"派发跳过契约":Leader 只传 subsystem 建实现任务时,自动等待对应 surface 的黑板契约;
|
|
513
|
+
// 契约由 define_project_blueprint 自动生成的 contract 任务(architect)产出后才解锁派发。
|
|
514
|
+
// 只注入 surface 不传 contract 模板 → 不预写黑板契约节点(真契约由 architect 经 graph_contract 物化)。
|
|
515
|
+
if (nodeKind !== 'contract' && agentType !== 'architect'
|
|
516
|
+
&& !hasOwn(args, 'contract_surface')
|
|
517
|
+
&& !normalizeOptionalObject(args.contract)?.surface) {
|
|
518
|
+
const subsystemId = normalizeOptionalString(args.subsystem);
|
|
519
|
+
if (subsystemId) {
|
|
520
|
+
const blueprint = parseBlueprint(ctx.leader.db.getSessionState(ctx.leader.sessionId, SESSION_KEYS.PROJECT_BLUEPRINT));
|
|
521
|
+
const entry = blueprint?.subsystems.find((e) => e.subsystemId === subsystemId);
|
|
522
|
+
if (entry?.status === 'implement') {
|
|
523
|
+
args = { ...args, contract_surface: subsystemId };
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
const contractTemplate = buildContractTemplate({ args, subject, agentType, nodeKind });
|
|
528
|
+
if (!contractTemplate.ok) {
|
|
529
|
+
throw fail(contractTemplate.message);
|
|
530
|
+
}
|
|
531
|
+
const orchestrationRunId = typeof args.orchestration_run_id === 'string' && args.orchestration_run_id.trim()
|
|
532
|
+
? args.orchestration_run_id.trim()
|
|
533
|
+
: `run-${ctx.leader.sessionId}`;
|
|
534
|
+
const generation = typeof args.generation === 'number' && Number.isFinite(args.generation) ? args.generation : 0;
|
|
535
|
+
const orchestration = (contractTemplate.contract || contractTemplate.evaluationPolicy || contractTemplate.binding || nodeKind || args.orchestration_run_id || args.generation !== undefined)
|
|
536
|
+
? {
|
|
537
|
+
orchestrationRunId,
|
|
538
|
+
nodeKind: nodeKind ?? (contractTemplate.binding ? 'implement' : 'generic'),
|
|
539
|
+
generation,
|
|
540
|
+
verdict: 'UNKNOWN',
|
|
541
|
+
contract: contractTemplate.contract,
|
|
542
|
+
contractBinding: contractTemplate.binding,
|
|
543
|
+
evaluationPolicy: contractTemplate.evaluationPolicy,
|
|
544
|
+
acceptance: {
|
|
545
|
+
status: contractTemplate.evaluationPolicy ? 'pending' : 'skipped',
|
|
546
|
+
criteria: contractTemplate.acceptanceCriteria,
|
|
547
|
+
},
|
|
548
|
+
}
|
|
549
|
+
: undefined;
|
|
550
|
+
// 重复任务防御
|
|
551
|
+
if (orchestration) {
|
|
552
|
+
const normalizedSubject = subject.trim();
|
|
553
|
+
const dup = ctx.leader.board.getAllTasks().find((t) => {
|
|
554
|
+
if (!t.orchestration)
|
|
555
|
+
return false;
|
|
556
|
+
if (t.orchestration.orchestrationRunId !== orchestration.orchestrationRunId)
|
|
557
|
+
return false;
|
|
558
|
+
if ((t.orchestration.nodeKind ?? 'generic') !== (orchestration.nodeKind ?? 'generic'))
|
|
559
|
+
return false;
|
|
560
|
+
if ((t.orchestration.generation ?? 0) !== (orchestration.generation ?? 0))
|
|
561
|
+
return false;
|
|
562
|
+
if (t.subject.trim() !== normalizedSubject)
|
|
563
|
+
return false;
|
|
564
|
+
return t.status !== 'terminal';
|
|
565
|
+
});
|
|
566
|
+
if (dup) {
|
|
567
|
+
leaderLogger.warn(`[LeaderTools] create_task duplicate suppressed: existing=${dup.id} subject="${normalizedSubject}" runId=${orchestration.orchestrationRunId} nodeKind=${orchestration.nodeKind ?? 'generic'} gen=${orchestration.generation ?? 0}`);
|
|
568
|
+
return `已存在等效任务 ${dup.id}: ${dup.subject} [${dup.status}] · 复用现有节点(runId=${orchestration.orchestrationRunId}, nodeKind=${orchestration.nodeKind ?? 'generic'}, generation=${orchestration.generation ?? 0})`;
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
if (!ctx.leader.getRoleRegistry().exists(agentType)) {
|
|
572
|
+
if (!roleDefinition) {
|
|
573
|
+
throw fail(`角色 '${agentType}' 不存在。请在 create_task 中附带 role_definition 一次性创建,或使用 define_agent_role 预先定义。可用角色: ${ctx.leader.getRoleRegistry().listRoleNames().join(', ')}`);
|
|
574
|
+
}
|
|
575
|
+
const materialized = materializeRoleDefinition(ctx, {
|
|
576
|
+
role_name: agentType,
|
|
577
|
+
base_role: roleDefinition.base_role,
|
|
578
|
+
role_description: roleDefinition.role_description,
|
|
579
|
+
system_prompt: roleDefinition.system_prompt,
|
|
580
|
+
tools: roleDefinition.tools,
|
|
581
|
+
skill_names: Array.isArray(roleDefinition.skill_names)
|
|
582
|
+
? roleDefinition.skill_names
|
|
583
|
+
: undefined,
|
|
584
|
+
});
|
|
585
|
+
if (!materialized.ok) {
|
|
586
|
+
throw fail(materialized.message);
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
const taskId = ctx.leader.board.nextTaskId();
|
|
590
|
+
let effectiveScope = scope;
|
|
591
|
+
let effectiveContext = context;
|
|
592
|
+
let worktree;
|
|
593
|
+
try {
|
|
594
|
+
const applied = await applyWorktreePolicy({
|
|
595
|
+
ctx,
|
|
596
|
+
taskId,
|
|
597
|
+
subject,
|
|
598
|
+
scope,
|
|
599
|
+
policy: worktreePolicy,
|
|
600
|
+
});
|
|
601
|
+
effectiveScope = applied.scope;
|
|
602
|
+
worktree = applied.worktree;
|
|
603
|
+
if (applied.contextNote) {
|
|
604
|
+
effectiveContext = [context, applied.contextNote].filter(Boolean).join('\n\n');
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
catch (error) {
|
|
608
|
+
throw fail(`创建任务失败:worktree_policy=${requestedWorktreePolicy} 初始化失败:${error instanceof Error ? error.message : String(error)}`);
|
|
609
|
+
}
|
|
610
|
+
let task;
|
|
611
|
+
let contractWriteResult = { status: 'skipped', reason: 'not attempted' };
|
|
612
|
+
try {
|
|
613
|
+
// contract / evaluation_policy 不再拼到 description 末尾。
|
|
614
|
+
// 只有显式 contract 模板物化为 BlackboardGraph contract;evaluation_policy 仅保留在 orchestration 元数据中。
|
|
615
|
+
task = ctx.leader.board.createTask(taskId, subject, description, agentType, blockedBy, [], effectiveScope, effectiveContext, {
|
|
616
|
+
orchestration,
|
|
617
|
+
preferred_agent_name: typeof args.preferred_agent_name === 'string' ? args.preferred_agent_name : undefined,
|
|
618
|
+
});
|
|
619
|
+
contractWriteResult = writeContractNodeToBlackboard(ctx, {
|
|
620
|
+
taskId: task.id,
|
|
621
|
+
subject,
|
|
622
|
+
agentType,
|
|
623
|
+
contract: contractTemplate.contract,
|
|
624
|
+
evaluationPolicy: contractTemplate.evaluationPolicy,
|
|
625
|
+
surface: contractTemplate.surface,
|
|
626
|
+
});
|
|
627
|
+
}
|
|
628
|
+
catch (error) {
|
|
629
|
+
throw fail(`创建任务失败:${error instanceof Error ? error.message : String(error)}`);
|
|
630
|
+
}
|
|
631
|
+
const subsystemWarning = registerTaskSubsystem(ctx, task.id, args);
|
|
632
|
+
const readinessLabel = formatTaskReadiness(ctx, task);
|
|
633
|
+
// 0→1: IntegrationVerifyInjector —— 检测是否需要插入集成验证节点
|
|
634
|
+
let integrationHint = '';
|
|
635
|
+
try {
|
|
636
|
+
const allTasks = ctx.leader.board.getAllTasks().map(t => ({
|
|
637
|
+
id: t.id,
|
|
638
|
+
nodeKind: t.orchestration?.nodeKind,
|
|
639
|
+
agentType: t.agent_type,
|
|
640
|
+
writeScope: t.write_scope,
|
|
641
|
+
blockedBy: t.blocked_by,
|
|
642
|
+
status: t.status,
|
|
643
|
+
contractSurface: t.orchestration?.contractBinding?.surface,
|
|
644
|
+
}));
|
|
645
|
+
const injection = ctx.leader.getIntegrationInjector().analyze(allTasks, ctx.leader.getSharedLedger());
|
|
646
|
+
if (injection.needed && injection.verifyNode) {
|
|
647
|
+
integrationHint = `\nℹ IntegrationVerifyInjector: 建议插入集成验证节点 (${injection.reason}),blocked_by=[${injection.verifyNode.blockedBy.join(',')}]`;
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
catch { /* non-critical */ }
|
|
651
|
+
return `已创建任务 ${task.id}: ${task.subject} [${readinessLabel}]${formatBlockedReason(ctx, task)}${worktree ? ` · worktree:${worktree.branch}` : requestedWorktreePolicy !== 'none' ? ` · worktree_policy:${requestedWorktreePolicy}->${worktreePolicy}` : ''}${orchestration ? ` · orchestration:${orchestration.nodeKind ?? 'generic'} gen=${orchestration.generation ?? 0}` : ''}${formatContractToolStatus(contractTemplate, contractWriteResult)}${agentTypeNote ? ` · 角色:${agentTypeNote}` : ''}${subsystemWarning ? ` · ${subsystemWarning}` : ''}${integrationHint}`;
|
|
652
|
+
}
|
|
653
|
+
/** update_task 实现 */
|
|
654
|
+
export async function updateTask(ctx, args) {
|
|
655
|
+
const taskId = String(args.task_id || '').trim();
|
|
656
|
+
if (!taskId) {
|
|
657
|
+
throw fail('task_id 不能为空');
|
|
658
|
+
}
|
|
659
|
+
const task = ctx.leader.board.getTask(taskId);
|
|
660
|
+
if (!task) {
|
|
661
|
+
throw fail(`任务 ${taskId} 不存在`);
|
|
662
|
+
}
|
|
663
|
+
// 放宽:assigned_agent 不为空但 worker 实际未 running,仍允许编辑(修正 DAG 错误)
|
|
664
|
+
if (task.status === 'running') {
|
|
665
|
+
throw fail(`任务 ${taskId} 正在运行中,无法编辑。请先 cancel 或等待终态。`);
|
|
666
|
+
}
|
|
667
|
+
if (task.status === 'terminal') {
|
|
668
|
+
throw fail(`任务 ${taskId} 已是终态 (${task.exitReason ?? 'completed'}), 不能编辑。`);
|
|
669
|
+
}
|
|
670
|
+
if (task.assigned_agent) {
|
|
671
|
+
const handle = ctx.leader.pool.getByName(task.assigned_agent);
|
|
672
|
+
if (handle && isAgentRuntimeActiveStatus(handle)) {
|
|
673
|
+
throw fail(`任务 ${taskId} 已派发给 @${task.assigned_agent} (${handle.status}), 不能编辑。`);
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
const updates = {};
|
|
677
|
+
if (typeof args.subject === 'string')
|
|
678
|
+
updates.subject = args.subject;
|
|
679
|
+
if (typeof args.description === 'string')
|
|
680
|
+
updates.description = args.description;
|
|
681
|
+
if (typeof args.context === 'string')
|
|
682
|
+
updates.context = args.context;
|
|
683
|
+
if (typeof args.agent_type === 'string') {
|
|
684
|
+
// 同 create_task 的多层回落:未注册的变体名/缩写按名字推断复用规范角色,再回落 fullstack。
|
|
685
|
+
const registry = ctx.leader.getRoleRegistry();
|
|
686
|
+
let nextAgentType = args.agent_type.trim();
|
|
687
|
+
if (nextAgentType && !registry.exists(nextAgentType)) {
|
|
688
|
+
const resolved = resolveRoleFromName(nextAgentType, registry.listRoleNames())
|
|
689
|
+
?? (registry.exists(ROLE_FALLBACK_DEFAULT) ? ROLE_FALLBACK_DEFAULT : undefined);
|
|
690
|
+
if (!resolved) {
|
|
691
|
+
throw fail(`角色 '${args.agent_type}' 不存在,且无可用规范角色可回落。可用角色: ${registry.listRoleNames().join(', ')}`);
|
|
692
|
+
}
|
|
693
|
+
nextAgentType = resolved;
|
|
694
|
+
}
|
|
695
|
+
updates.agent_type = nextAgentType;
|
|
696
|
+
}
|
|
697
|
+
if (args.blocked_by !== undefined) {
|
|
698
|
+
updates.blocked_by = normalizeTaskIdList(args.blocked_by);
|
|
699
|
+
}
|
|
700
|
+
if (typeof args.working_directory === 'string')
|
|
701
|
+
updates.working_directory = args.working_directory;
|
|
702
|
+
if (Array.isArray(args.write_scope)) {
|
|
703
|
+
updates.write_scope = args.write_scope.filter((value) => typeof value === 'string');
|
|
704
|
+
}
|
|
705
|
+
// 预绑定成员:允许改绑到另一个 team 成员,或传空字符串清除预绑定回到 Leader 决策。
|
|
706
|
+
if (typeof args.preferred_agent_name === 'string') {
|
|
707
|
+
updates.preferred_agent_name = args.preferred_agent_name.trim();
|
|
708
|
+
}
|
|
709
|
+
if (updates.working_directory !== undefined || updates.write_scope !== undefined) {
|
|
710
|
+
assertLeaderTaskScopeAllowed(ctx, {
|
|
711
|
+
working_directory: updates.working_directory ?? task.working_directory,
|
|
712
|
+
write_scope: updates.write_scope ?? task.write_scope,
|
|
713
|
+
});
|
|
714
|
+
}
|
|
715
|
+
const hasContractBindingUpdate = [
|
|
716
|
+
'contract',
|
|
717
|
+
'contract_surface',
|
|
718
|
+
'contract_version',
|
|
719
|
+
'contract_request_id',
|
|
720
|
+
'require_contract',
|
|
721
|
+
'require_ack',
|
|
722
|
+
'evaluation_policy',
|
|
723
|
+
'node_kind',
|
|
724
|
+
'orchestration_run_id',
|
|
725
|
+
'generation',
|
|
726
|
+
].some((key) => hasOwn(args, key));
|
|
727
|
+
let nextContractTemplate;
|
|
728
|
+
if (hasContractBindingUpdate) {
|
|
729
|
+
const nextAgentType = typeof updates.agent_type === 'string' ? updates.agent_type : task.agent_type;
|
|
730
|
+
const nextSubject = typeof updates.subject === 'string' ? updates.subject : task.subject;
|
|
731
|
+
const nextNodeKind = typeof args.node_kind === 'string'
|
|
732
|
+
? args.node_kind
|
|
733
|
+
: task.orchestration?.nodeKind;
|
|
734
|
+
const contractTemplate = buildContractTemplate({
|
|
735
|
+
args,
|
|
736
|
+
subject: nextSubject,
|
|
737
|
+
agentType: nextAgentType,
|
|
738
|
+
nodeKind: nextNodeKind,
|
|
739
|
+
existing: task.orchestration,
|
|
740
|
+
});
|
|
741
|
+
if (!contractTemplate.ok) {
|
|
742
|
+
throw fail(contractTemplate.message);
|
|
743
|
+
}
|
|
744
|
+
nextContractTemplate = contractTemplate;
|
|
745
|
+
const orchestrationRunId = typeof args.orchestration_run_id === 'string' && args.orchestration_run_id.trim()
|
|
746
|
+
? args.orchestration_run_id.trim()
|
|
747
|
+
: task.orchestration?.orchestrationRunId ?? `run-${ctx.leader.sessionId}`;
|
|
748
|
+
const generation = typeof args.generation === 'number' && Number.isFinite(args.generation)
|
|
749
|
+
? args.generation
|
|
750
|
+
: task.orchestration?.generation ?? 0;
|
|
751
|
+
updates.orchestration = {
|
|
752
|
+
...(task.orchestration ?? {}),
|
|
753
|
+
orchestrationRunId,
|
|
754
|
+
nodeKind: nextNodeKind ?? (contractTemplate.binding ? 'implement' : task.orchestration?.nodeKind ?? 'generic'),
|
|
755
|
+
generation,
|
|
756
|
+
verdict: task.orchestration?.verdict ?? 'UNKNOWN',
|
|
757
|
+
contract: contractTemplate.contract,
|
|
758
|
+
contractBinding: contractTemplate.binding,
|
|
759
|
+
evaluationPolicy: contractTemplate.evaluationPolicy,
|
|
760
|
+
acceptance: {
|
|
761
|
+
...(task.orchestration?.acceptance ?? {}),
|
|
762
|
+
status: contractTemplate.evaluationPolicy
|
|
763
|
+
? (task.orchestration?.acceptance?.status === 'passed' ? 'passed' : 'pending')
|
|
764
|
+
: (task.orchestration?.acceptance?.status ?? 'skipped'),
|
|
765
|
+
criteria: contractTemplate.acceptanceCriteria,
|
|
766
|
+
},
|
|
767
|
+
};
|
|
768
|
+
}
|
|
769
|
+
if (Object.keys(updates).length === 0) {
|
|
770
|
+
throw fail('没有提供可更新字段');
|
|
771
|
+
}
|
|
772
|
+
try {
|
|
773
|
+
const updated = ctx.leader.board.updateTask(taskId, updates);
|
|
774
|
+
let contractWriteResult = { status: 'skipped', reason: 'not attempted' };
|
|
775
|
+
if (nextContractTemplate) {
|
|
776
|
+
contractWriteResult = writeContractNodeToBlackboard(ctx, {
|
|
777
|
+
taskId: updated.id,
|
|
778
|
+
subject: updated.subject,
|
|
779
|
+
agentType: updated.agent_type,
|
|
780
|
+
contract: nextContractTemplate.contract,
|
|
781
|
+
evaluationPolicy: nextContractTemplate.evaluationPolicy,
|
|
782
|
+
surface: nextContractTemplate.surface,
|
|
783
|
+
});
|
|
784
|
+
}
|
|
785
|
+
const bindingLabel = updated.preferred_agent_name ? `预绑定=@${updated.preferred_agent_name}` : '预绑定=无';
|
|
786
|
+
const contractLabel = nextContractTemplate
|
|
787
|
+
? formatContractToolStatus(nextContractTemplate, contractWriteResult)
|
|
788
|
+
: updated.orchestration?.contractBinding?.surface
|
|
789
|
+
? ` · contractBinding=contract:${updated.orchestration.contractBinding.surface}`
|
|
790
|
+
: '';
|
|
791
|
+
return `已更新任务 ${updated.id}: ${updated.subject} [${formatTaskReadiness(ctx, updated)}]${formatBlockedReason(ctx, updated)} · blocked_by=${updated.blocked_by.join(', ') || '无'} · ${bindingLabel}${contractLabel}`;
|
|
792
|
+
}
|
|
793
|
+
catch (error) {
|
|
794
|
+
throw fail(`更新任务失败:${error instanceof Error ? error.message : String(error)}`);
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
/** delete_task 实现 */
|
|
798
|
+
export async function deleteTask(ctx, args) {
|
|
799
|
+
const taskId = String(args.task_id || '').trim();
|
|
800
|
+
const reason = typeof args.reason === 'string' ? args.reason.trim() : '';
|
|
801
|
+
if (!taskId) {
|
|
802
|
+
throw fail('task_id 不能为空');
|
|
803
|
+
}
|
|
804
|
+
const task = ctx.leader.board.getTask(taskId);
|
|
805
|
+
if (!task) {
|
|
806
|
+
throw fail(`任务 ${taskId} 不存在`);
|
|
807
|
+
}
|
|
808
|
+
if (task.status === 'running') {
|
|
809
|
+
throw fail(`任务 ${taskId} 正在运行中,无法删除。请先 cancel 或等待终态。`);
|
|
810
|
+
}
|
|
811
|
+
if (task.status === 'terminal') {
|
|
812
|
+
throw fail(`任务 ${taskId} 已是终态 (${task.exitReason ?? 'completed'}), 不能删除。`);
|
|
813
|
+
}
|
|
814
|
+
if (task.assigned_agent) {
|
|
815
|
+
const handle = ctx.leader.pool.getByName(task.assigned_agent);
|
|
816
|
+
if (handle && isAgentRuntimeActiveStatus(handle)) {
|
|
817
|
+
throw fail(`任务 ${taskId} 已派发给 @${task.assigned_agent} (${handle.status}), 不能删除。`);
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
try {
|
|
821
|
+
const result = ctx.leader.board.deleteTask(taskId);
|
|
822
|
+
unregisterTaskSubsystem(ctx, taskId);
|
|
823
|
+
const affected = result.affectedTasks.map(t => t.id);
|
|
824
|
+
return `已删除任务 ${taskId}${reason ? `(原因:${reason}` : ''}${affected.length > 0 ? `;已从下游依赖中移除并更新: ${affected.join(', ')}` : ''}`;
|
|
825
|
+
}
|
|
826
|
+
catch (error) {
|
|
827
|
+
throw fail(`删除任务失败:${error instanceof Error ? error.message : String(error)}`);
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
/** define_agent_role 实现 */
|
|
831
|
+
export async function defineAgentRole(ctx, args) {
|
|
832
|
+
const result = materializeRoleDefinition(ctx, {
|
|
833
|
+
role_name: args.role_name,
|
|
834
|
+
base_role: args.base_role,
|
|
835
|
+
role_description: args.role_description,
|
|
836
|
+
system_prompt: args.system_prompt,
|
|
837
|
+
tools: args.tools,
|
|
838
|
+
skill_names: Array.isArray(args.skill_names)
|
|
839
|
+
? args.skill_names
|
|
840
|
+
: undefined,
|
|
841
|
+
});
|
|
842
|
+
return result.message;
|
|
843
|
+
}
|
|
844
|
+
/** define_project_blueprint 实现:由 Leader 自主列出子系统清单,存入 session state,并自动为 implement 子系统建 contract 前置任务。 */
|
|
845
|
+
export async function defineProjectBlueprint(ctx, args = {}) {
|
|
846
|
+
args = args && typeof args === 'object' ? args : {};
|
|
847
|
+
let result = null;
|
|
848
|
+
ctx.leader.db.updateSessionState(ctx.leader.sessionId, SESSION_KEYS.PROJECT_BLUEPRINT, (current) => {
|
|
849
|
+
const existing = parseBlueprint(current);
|
|
850
|
+
const normalized = normalizeBlueprint({
|
|
851
|
+
subsystems: args.subsystems,
|
|
852
|
+
notes: args.notes,
|
|
853
|
+
existing,
|
|
854
|
+
});
|
|
855
|
+
if ('error' in normalized) {
|
|
856
|
+
throw fail(normalized.error);
|
|
857
|
+
}
|
|
858
|
+
result = normalized;
|
|
859
|
+
return serializeBlueprint(normalized);
|
|
860
|
+
});
|
|
861
|
+
if (!result) {
|
|
862
|
+
throw fail('define_project_blueprint 写入失败: 未生成有效蓝图。');
|
|
863
|
+
}
|
|
864
|
+
const blueprint = result;
|
|
865
|
+
const coverage = computeBlueprintCoverage(blueprint);
|
|
866
|
+
try {
|
|
867
|
+
ctx.leader.emitter.emit('leader:blueprint_updated', { sessionId: ctx.leader.sessionId, blueprint, coverage });
|
|
868
|
+
}
|
|
869
|
+
catch (err) {
|
|
870
|
+
leaderLogger.warn(`[LeaderTools] blueprint_updated 事件发送失败: ${err instanceof Error ? err.message : String(err)}`);
|
|
871
|
+
}
|
|
872
|
+
const implementCount = coverage.implemented.length + coverage.uncovered.length;
|
|
873
|
+
const header = `已定义项目蓝图 · ${blueprint.subsystems.length} 子系统(implement ${implementCount} · defer ${coverage.deferred.length} · na ${coverage.notApplicable.length})。`;
|
|
874
|
+
// v1.0.4: 自动 contract seed 默认关闭——Leader 可用 write_contract 直接写契约(更高效)
|
|
875
|
+
// 仅当显式传 auto_contract_tasks: true 时才恢复旧行为
|
|
876
|
+
const autoContractTasks = parseBooleanFlag(args.auto_contract_tasks);
|
|
877
|
+
let contractSummary = '';
|
|
878
|
+
if (autoContractTasks) {
|
|
879
|
+
const seeds = buildSubsystemContractSeeds(blueprint);
|
|
880
|
+
const contractTaskNotes = [];
|
|
881
|
+
for (const seed of seeds) {
|
|
882
|
+
const dup = ctx.leader.board.getAllTasks().find((t) => t.orchestration?.nodeKind === 'contract'
|
|
883
|
+
&& t.orchestration?.contractBinding?.surface === seed.surface
|
|
884
|
+
&& t.status !== 'terminal');
|
|
885
|
+
if (dup) {
|
|
886
|
+
contractTaskNotes.push(`${seed.surface}:复用 ${dup.id}`);
|
|
887
|
+
continue;
|
|
888
|
+
}
|
|
889
|
+
try {
|
|
890
|
+
const id = await createContractSeedTask(ctx, seed);
|
|
891
|
+
contractTaskNotes.push(`${seed.surface}:${id}`);
|
|
892
|
+
}
|
|
893
|
+
catch (err) {
|
|
894
|
+
leaderLogger.warn(`[LeaderTools] contract seed 任务创建失败 (surface=${seed.surface}): ${err instanceof Error ? err.message : String(err)}`);
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
if (contractTaskNotes.length > 0) {
|
|
898
|
+
contractSummary = `\n已生成 ${contractTaskNotes.length} 个 contract 任务: ${contractTaskNotes.join('; ')}`;
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
else {
|
|
902
|
+
const surfaces = blueprint.subsystems
|
|
903
|
+
.filter(s => s.status === 'implement')
|
|
904
|
+
.map(s => s.subsystemId);
|
|
905
|
+
contractSummary = surfaces.length > 0
|
|
906
|
+
? `\n下一步: 用 write_contract(surface="<subsystem_id>", content="...") 为每个子系统写入契约,或 create_task(node_kind="contract") 建单个 architect 任务。\n待写契约: ${surfaces.join(', ')}`
|
|
907
|
+
: '';
|
|
908
|
+
}
|
|
909
|
+
// 0→1: 蓝图完整性自动审查——创建并强制派发 planner 补全蓝图
|
|
910
|
+
let auditHint = '';
|
|
911
|
+
try {
|
|
912
|
+
const userRequest = ctx.leader.db.getSession(ctx.leader.sessionId)?.user_request || '';
|
|
913
|
+
const blueprintJson = JSON.stringify(blueprint.subsystems.map(s => ({ id: s.subsystemId, name: s.name, status: s.status })));
|
|
914
|
+
const auditTaskId = ctx.leader.board.nextTaskId();
|
|
915
|
+
ctx.leader.board.createTask(auditTaskId, `蓝图完整性审查`, [
|
|
916
|
+
`你是蓝图审查员。审查以下蓝图是否覆盖了”完整可用产品”所需的全部子系统。`,
|
|
917
|
+
``,
|
|
918
|
+
`用户原始需求: ${userRequest}`,
|
|
919
|
+
``,
|
|
920
|
+
`当前蓝图: ${blueprintJson}`,
|
|
921
|
+
``,
|
|
922
|
+
`审查维度(不限于):`,
|
|
923
|
+
`- 用户怎么进来?(认证、登录、注册、OAuth)`,
|
|
924
|
+
`- 用户怎么管理自己?(个人中心、设置、安全)`,
|
|
925
|
+
`- 管理员怎么管?(后台、权限、审计)`,
|
|
926
|
+
`- 出错了怎么办?(错误页、重试、降级)`,
|
|
927
|
+
`- 数据多了怎么办?(分页、搜索、筛选、导出)`,
|
|
928
|
+
`- 界面怎么组织?(导航、布局、响应式、空状态)`,
|
|
929
|
+
`- 操作有反馈吗?(加载态、Toast、进度)`,
|
|
930
|
+
``,
|
|
931
|
+
`输出格式:`,
|
|
932
|
+
`1. 缺失的子系统列表(subsystem_id + name + 为什么必须有)`,
|
|
933
|
+
`2. 现有子系统的补充建议`,
|
|
934
|
+
`3. 优先级排序`,
|
|
935
|
+
``,
|
|
936
|
+
`完成审查后,用 add_subsystem 工具直接补充缺失的子系统到蓝图中。`,
|
|
937
|
+
`注意: 根据项目类型灵活判断。内部工具不需要注册、CLI 不需要导航、API only 不需要 UI 组件。不要无脑补充,只补真正缺失的。`,
|
|
938
|
+
].join('\n'), 'planner', [], // blocked_by: 不阻塞任何人
|
|
939
|
+
[], // deps
|
|
940
|
+
{}, // scope
|
|
941
|
+
undefined, // context
|
|
942
|
+
{ orchestration: { nodeKind: 'plan' } });
|
|
943
|
+
// 强制派发审查任务——让 planner 立即审查并补全蓝图
|
|
944
|
+
const auditAgentName = `blueprint-audit-${ctx.leader.sessionId.slice(0, 8)}-${Date.now()}`;
|
|
945
|
+
try {
|
|
946
|
+
const dispatchResult = await ctx.dispatchAgent({ task_id: auditTaskId, agent_name: auditAgentName });
|
|
947
|
+
auditHint = `\n✓ 已自动派发蓝图完整性审查任务 ${auditTaskId} → @${auditAgentName}(planner 角色)。Planner 将审查蓝图并自动补全缺失的子系统。${dispatchResult}`;
|
|
948
|
+
}
|
|
949
|
+
catch (dispatchErr) {
|
|
950
|
+
// 派发失败时降级为提示手动派发
|
|
951
|
+
leaderLogger.warn(`[LeaderTools] 蓝图审查任务派发失败: ${dispatchErr instanceof Error ? dispatchErr.message : String(dispatchErr)}`);
|
|
952
|
+
auditHint = `\n已创建蓝图完整性审查任务 ${auditTaskId}(planner 角色),但自动派发失败。请手动 dispatch_agent(task_id=”${auditTaskId}”, agent_name=”blueprint-auditor”) 派发它。`;
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
catch (err) {
|
|
956
|
+
leaderLogger.warn(`[LeaderTools] 蓝图审查任务创建失败: ${err instanceof Error ? err.message : String(err)}`);
|
|
957
|
+
}
|
|
958
|
+
return [header, contractSummary, auditHint].filter(Boolean).join('\n');
|
|
959
|
+
}
|
|
960
|
+
/** 建单个 contract 前置任务(architect 产真契约)。复用 createTask,保留其重复防御/角色校验/持久化/事件路径。
|
|
961
|
+
* 陷阱A:不传 contract 模板——writeContractNodeToBlackboard 守卫不预写黑板节点,
|
|
962
|
+
* 真契约由 architect 经 graph_contract 块物化(addContract)后才"就绪",seed.content 仅进 description 当上下文;
|
|
963
|
+
* contract 任务也登记 subsystem(使覆盖判定完整);A4 跳过 contract(isContractProducer)避免被依赖链阻塞。
|
|
964
|
+
* node_kind=contract → isContractProducer → requireContract 自动 false,contract 任务自身不被契约 gate 拦,可先派。 */
|
|
965
|
+
async function createContractSeedTask(ctx, seed) {
|
|
966
|
+
return createTask(ctx, {
|
|
967
|
+
node_kind: 'contract',
|
|
968
|
+
agent_type: 'architect',
|
|
969
|
+
contract_surface: seed.surface,
|
|
970
|
+
subsystem: seed.surface,
|
|
971
|
+
subject: `契约:${seed.title} (surface=${seed.surface})`,
|
|
972
|
+
description: [
|
|
973
|
+
seed.content,
|
|
974
|
+
'',
|
|
975
|
+
`产出 graph_contract 代码块(surface=${seed.surface},含 endpoints/schema/errors/status/关键状态转换),`,
|
|
976
|
+
`由 worker 解析器物化到黑板 contract:${seed.surface} 节点。`,
|
|
977
|
+
`实现本子系统的任务已自动绑定 contract_surface=${seed.surface},会等待本契约就绪后才解锁派发。`,
|
|
978
|
+
].join('\n'),
|
|
979
|
+
});
|
|
980
|
+
}
|
|
981
|
+
/** 把任务登记到蓝图对应子系统(覆盖 gate 据此判定;无蓝图时静默——subsystem 仅在已定义蓝图时有效)。
|
|
982
|
+
* 联动:A3 自动绑定 contract_surface=subsystemId(任务无显式 surface 时);
|
|
983
|
+
* A4 子系统 dependsOn 自动传递为任务 blocked_by(任务无显式 blocked_by 时)。 */
|
|
984
|
+
function registerTaskSubsystem(ctx, taskId, args) {
|
|
985
|
+
const subsystemId = normalizeOptionalString(args.subsystem);
|
|
986
|
+
if (!subsystemId)
|
|
987
|
+
return null;
|
|
988
|
+
try {
|
|
989
|
+
let warning = null;
|
|
990
|
+
let next = null;
|
|
991
|
+
ctx.leader.db.updateSessionState(ctx.leader.sessionId, SESSION_KEYS.PROJECT_BLUEPRINT, (current) => {
|
|
992
|
+
const existing = parseBlueprint(current);
|
|
993
|
+
if (!existing)
|
|
994
|
+
return current;
|
|
995
|
+
// 检查 subsystemId 是否存在于蓝图中,不存在时返回明确 warning 给 Leader
|
|
996
|
+
const subsystemExists = existing.subsystems.some((e) => e.subsystemId === subsystemId);
|
|
997
|
+
if (!subsystemExists) {
|
|
998
|
+
const validIds = existing.subsystems.map((e) => e.subsystemId).join(', ');
|
|
999
|
+
warning = `⚠ 子系统 "${subsystemId}" 不在当前蓝图中,任务 ${taskId} 未绑定到任何 subsystem。蓝图不会显示覆盖。合法 subsystem id: ${validIds}`;
|
|
1000
|
+
return current;
|
|
1001
|
+
}
|
|
1002
|
+
next = registerTaskId(existing, subsystemId, taskId);
|
|
1003
|
+
return serializeBlueprint(next);
|
|
1004
|
+
});
|
|
1005
|
+
if (warning)
|
|
1006
|
+
return warning;
|
|
1007
|
+
if (!next)
|
|
1008
|
+
return null;
|
|
1009
|
+
const blueprint = next;
|
|
1010
|
+
ctx.leader.emitter.emit('leader:blueprint_updated', { sessionId: ctx.leader.sessionId, blueprint, coverage: computeBlueprintCoverage(blueprint) });
|
|
1011
|
+
// A3: 自动绑定 contract_surface=subsystemId。
|
|
1012
|
+
// 任务无显式 contract_surface 且非 architect/contract 产出者时,把 subsystem id 作为 contract surface,
|
|
1013
|
+
// requireContract=true 让 DAG 契约门激活——实现任务须等对应子系统契约就绪才可派发。
|
|
1014
|
+
// 不覆盖 Leader 显式指定的 contract_surface(尊重显式意图)。
|
|
1015
|
+
const task = ctx.leader.board.getTask(taskId);
|
|
1016
|
+
if (task) {
|
|
1017
|
+
const hasExplicitSurface = Boolean(task.orchestration?.contractBinding?.surface);
|
|
1018
|
+
const isContractProducer = task.orchestration?.nodeKind === 'contract' || task.agent_type === 'architect';
|
|
1019
|
+
if (!hasExplicitSurface && !isContractProducer) {
|
|
1020
|
+
const orchestration = {
|
|
1021
|
+
...(task.orchestration ?? {}),
|
|
1022
|
+
contractBinding: {
|
|
1023
|
+
surface: subsystemId,
|
|
1024
|
+
tag: `contract:${subsystemId}`,
|
|
1025
|
+
requireContract: true,
|
|
1026
|
+
},
|
|
1027
|
+
};
|
|
1028
|
+
try {
|
|
1029
|
+
ctx.leader.board.updateTask(taskId, { orchestration });
|
|
1030
|
+
}
|
|
1031
|
+
catch (err) {
|
|
1032
|
+
leaderLogger.warn(`[LeaderTools] subsystem→contract_surface 自动绑定失败 (task=${taskId}, subsystem=${subsystemId}): ${err instanceof Error ? err.message : String(err)}`);
|
|
1033
|
+
}
|
|
1034
|
+
}
|
|
1035
|
+
// A4: 子系统 dependsOn 自动传递为任务 blocked_by。
|
|
1036
|
+
// 任务无显式 blocked_by 且蓝图子系统有 dependsOn 时,把已登记的依赖子系统任务自动加为 blocked_by。
|
|
1037
|
+
// 不覆盖 Leader 显式指定的 blocked_by(尊重显式意图)。
|
|
1038
|
+
// contract 任务跳过:契约收敛是第一步,不应被依赖链阻塞。
|
|
1039
|
+
const entry = blueprint.subsystems.find((e) => e.subsystemId === subsystemId);
|
|
1040
|
+
const depSubsystemIds = entry?.dependsOn ?? [];
|
|
1041
|
+
if (!isContractProducer && depSubsystemIds.length > 0 && (!task.blocked_by || task.blocked_by.length === 0)) {
|
|
1042
|
+
const depTaskIds = depSubsystemIds
|
|
1043
|
+
.flatMap((depId) => blueprint.subsystems.find((e) => e.subsystemId === depId)?.taskIds ?? [])
|
|
1044
|
+
.filter((id) => id && id !== taskId);
|
|
1045
|
+
if (depTaskIds.length > 0) {
|
|
1046
|
+
try {
|
|
1047
|
+
ctx.leader.board.updateTask(taskId, { blocked_by: depTaskIds });
|
|
1048
|
+
}
|
|
1049
|
+
catch (err) {
|
|
1050
|
+
leaderLogger.warn(`[LeaderTools] subsystem dependsOn→blocked_by 自动传递失败 (task=${taskId}, subsystem=${subsystemId}): ${err instanceof Error ? err.message : String(err)}`);
|
|
1051
|
+
}
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
return null;
|
|
1056
|
+
}
|
|
1057
|
+
catch (err) {
|
|
1058
|
+
leaderLogger.warn(`[LeaderTools] subsystem 登记失败 (task=${taskId}, subsystem=${subsystemId}): ${err instanceof Error ? err.message : String(err)}`);
|
|
1059
|
+
return null;
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1062
|
+
/** 删任务时从蓝图登记中移除,保持覆盖判定一致。 */
|
|
1063
|
+
function unregisterTaskSubsystem(ctx, taskId) {
|
|
1064
|
+
try {
|
|
1065
|
+
let next = null;
|
|
1066
|
+
ctx.leader.db.updateSessionState(ctx.leader.sessionId, SESSION_KEYS.PROJECT_BLUEPRINT, (current) => {
|
|
1067
|
+
const existing = parseBlueprint(current);
|
|
1068
|
+
if (!existing)
|
|
1069
|
+
return current;
|
|
1070
|
+
next = unregisterTaskId(existing, taskId);
|
|
1071
|
+
return serializeBlueprint(next);
|
|
1072
|
+
});
|
|
1073
|
+
if (!next)
|
|
1074
|
+
return;
|
|
1075
|
+
const blueprint = next;
|
|
1076
|
+
ctx.leader.emitter.emit('leader:blueprint_updated', { sessionId: ctx.leader.sessionId, blueprint, coverage: computeBlueprintCoverage(blueprint) });
|
|
1077
|
+
}
|
|
1078
|
+
catch (err) {
|
|
1079
|
+
leaderLogger.warn(`[LeaderTools] subsystem 反注册失败 (task=${taskId}): ${err instanceof Error ? err.message : String(err)}`);
|
|
1080
|
+
}
|
|
1081
|
+
}
|
|
1082
|
+
/** materializeRoleDefinition:define_agent_role / create_task 公用 */
|
|
1083
|
+
export function materializeRoleDefinition(ctx, args) {
|
|
1084
|
+
// base_role 同样按名字确定性归约到某个 preset(fe→frontend/be→backend 等),
|
|
1085
|
+
// 命中不到则原样透传(resolveDynamicRoleCapability 对未知 base_role 安全地忽略)。
|
|
1086
|
+
const presetNames = Object.keys(PRESET_ROLE_PROFILES);
|
|
1087
|
+
const resolvedBaseRole = normalizeOptionalString(args.base_role)
|
|
1088
|
+
? (resolveRoleFromName(args.base_role, presetNames) ?? args.base_role)
|
|
1089
|
+
: args.base_role;
|
|
1090
|
+
const capability = ctx.leader.resolveRoleCapability({
|
|
1091
|
+
roleName: args.role_name,
|
|
1092
|
+
baseRoleName: resolvedBaseRole,
|
|
1093
|
+
roleDescription: args.role_description,
|
|
1094
|
+
systemPrompt: args.system_prompt,
|
|
1095
|
+
tools: args.tools,
|
|
1096
|
+
requestedSkillNames: args.skill_names,
|
|
1097
|
+
});
|
|
1098
|
+
const role = ctx.leader.getRoleRegistry().register({
|
|
1099
|
+
name: args.role_name,
|
|
1100
|
+
description: args.role_description,
|
|
1101
|
+
systemPrompt: args.system_prompt,
|
|
1102
|
+
tools: capability.tools,
|
|
1103
|
+
droppedTools: capability.droppedTools,
|
|
1104
|
+
skillNames: capability.skillNames,
|
|
1105
|
+
capabilityProfile: capability.capabilityProfile,
|
|
1106
|
+
createdBy: 'llm',
|
|
1107
|
+
});
|
|
1108
|
+
ctx.leader.db.setSessionState(ctx.leader.sessionId, SESSION_KEYS.CUSTOM_ROLES, JSON.stringify(ctx.leader.getRoleRegistry().toDict()));
|
|
1109
|
+
const existingSkillHistory = ctx.leader.db.getSessionState(ctx.leader.sessionId, SESSION_KEYS.LEADER_SELECTED_SKILLS_HISTORY);
|
|
1110
|
+
const skillHistory = Array.isArray(existingSkillHistory)
|
|
1111
|
+
? existingSkillHistory
|
|
1112
|
+
: [];
|
|
1113
|
+
skillHistory.push({
|
|
1114
|
+
timestamp: Date.now() / 1000,
|
|
1115
|
+
role_name: role.name,
|
|
1116
|
+
skills: capability.skillNames,
|
|
1117
|
+
skill_sources: capability.skillSources,
|
|
1118
|
+
baseline_role: capability.capabilityProfile.baselineRole,
|
|
1119
|
+
});
|
|
1120
|
+
ctx.leader.db.setSessionState(ctx.leader.sessionId, SESSION_KEYS.LEADER_SELECTED_SKILLS_HISTORY, skillHistory.slice(-25));
|
|
1121
|
+
const notes = [];
|
|
1122
|
+
if (capability.capabilityProfile.baselineRole) {
|
|
1123
|
+
notes.push(`baseline=${capability.capabilityProfile.baselineRole}`);
|
|
1124
|
+
}
|
|
1125
|
+
if (capability.droppedTools.length > 0) {
|
|
1126
|
+
notes.push(`dropped_tools=${capability.droppedTools.join(', ')}`);
|
|
1127
|
+
}
|
|
1128
|
+
return {
|
|
1129
|
+
ok: true,
|
|
1130
|
+
message: `已创建新角色 '${role.name}'${capability.skillNames.length > 0 ? `,附带 skills: ${capability.skillNames.join(', ')}` : ''}${notes.length > 0 ? ` (${notes.join(' · ')})` : ''}`,
|
|
1131
|
+
};
|
|
1132
|
+
}
|
|
1133
|
+
/** list_available_roles 实现 */
|
|
1134
|
+
export function listAvailableRoles(ctx) {
|
|
1135
|
+
return ctx.leader.getRoleRegistry().toLLMContext();
|
|
1136
|
+
}
|
|
1137
|
+
/** delete_agent_role 实现:删除 define_agent_role/create_task(role_definition) 产生的 runtime 自定义角色 */
|
|
1138
|
+
export function deleteAgentRole(ctx, args) {
|
|
1139
|
+
const roleName = normalizeOptionalString(args.role_name ?? args.name);
|
|
1140
|
+
if (!roleName) {
|
|
1141
|
+
throw fail('role_name 不能为空');
|
|
1142
|
+
}
|
|
1143
|
+
const role = ctx.leader.getRoleRegistry().get(roleName);
|
|
1144
|
+
if (!role) {
|
|
1145
|
+
return `角色 '${roleName}' 不存在,无需删除。`;
|
|
1146
|
+
}
|
|
1147
|
+
if (role.createdBy === 'system') {
|
|
1148
|
+
throw fail(`不能删除系统预设角色 '${roleName}'。如需调整工具,请使用角色 override/reset。`);
|
|
1149
|
+
}
|
|
1150
|
+
if (role.createdBy === 'user') {
|
|
1151
|
+
throw fail(`角色 '${roleName}' 来自持久化 custom agent 文件。请在 Settings → Roles 删除该 agent 文件,或删除 .lingxiao/agents/${roleName}.md。`);
|
|
1152
|
+
}
|
|
1153
|
+
const force = parseBooleanFlag(args.force);
|
|
1154
|
+
const activeRefs = ctx.leader.board.getAllTasks()
|
|
1155
|
+
.filter((task) => task.agent_type === roleName && task.status !== 'terminal')
|
|
1156
|
+
.map((task) => `${task.id}:${task.status}`);
|
|
1157
|
+
if (activeRefs.length > 0 && !force) {
|
|
1158
|
+
throw fail(`角色 '${roleName}' 仍被未终态任务引用:${activeRefs.join(', ')}。如确认只删除角色定义并保留任务记录,请传 force=true。`);
|
|
1159
|
+
}
|
|
1160
|
+
const removed = ctx.leader.getRoleRegistry().unregister(roleName);
|
|
1161
|
+
if (!removed) {
|
|
1162
|
+
throw fail(`角色 '${roleName}' 删除失败。`);
|
|
1163
|
+
}
|
|
1164
|
+
persistCustomRolesSnapshot(ctx);
|
|
1165
|
+
return `已删除 runtime 自定义角色 '${roleName}'。`;
|
|
1166
|
+
}
|
|
1167
|
+
/** update_task_status 实现:UI 状态语义 → TaskBoard 状态机 */
|
|
1168
|
+
export async function updateTaskStatus(ctx, args) {
|
|
1169
|
+
const taskId = args.task_id;
|
|
1170
|
+
const status = args.status;
|
|
1171
|
+
const result = typeof args.result === 'string' ? args.result : undefined;
|
|
1172
|
+
const task = ctx.leader.board.getTask(taskId);
|
|
1173
|
+
if (!task) {
|
|
1174
|
+
throw fail(`任务 ${taskId} 不存在`);
|
|
1175
|
+
}
|
|
1176
|
+
// schema enum 收敛为 ['cancelled','failed']:
|
|
1177
|
+
// - completed:worker 自己 emit task:completed,Leader 不应直接标
|
|
1178
|
+
// - 其它运行/重置态:走 cancel + 重建 task 路径,避免 STATUS_MAP 暴露 LLM 看不到的内部值
|
|
1179
|
+
const normalized = normalizeTaskStatusUpdateTarget(status);
|
|
1180
|
+
if (!normalized) {
|
|
1181
|
+
throw fail(`无效状态 '${status}'。允许: cancelled, failed`);
|
|
1182
|
+
}
|
|
1183
|
+
const isTerminalTarget = normalized.status === 'terminal';
|
|
1184
|
+
const runningHandle = task.assigned_agent
|
|
1185
|
+
? ctx.leader.pool.getByName(task.assigned_agent)
|
|
1186
|
+
: undefined;
|
|
1187
|
+
if (isTerminalTarget && runningHandle && isAgentRuntimeActiveStatus(runningHandle)) {
|
|
1188
|
+
throw fail(`任务 ${taskId} 当前仍由 @${task.assigned_agent} 执行中,Leader 不能在队友运行时直接标记为 ${status}。`);
|
|
1189
|
+
}
|
|
1190
|
+
if (task.status === 'terminal' && isTerminalTarget && task.exitReason === normalized.exitReason) {
|
|
1191
|
+
return `任务 ${taskId} 已经是 ${status},无需重复操作`;
|
|
1192
|
+
}
|
|
1193
|
+
if (task.status === 'terminal' && !isTerminalTarget) {
|
|
1194
|
+
throw fail(`任务 ${taskId} 已处于终态 '${task.exitReason}',不能降级为 '${status}'`);
|
|
1195
|
+
}
|
|
1196
|
+
if (task.status === normalized.status && !isTerminalTarget) {
|
|
1197
|
+
return `任务 ${taskId} 已经是 ${status},无需重复操作`;
|
|
1198
|
+
}
|
|
1199
|
+
try {
|
|
1200
|
+
if (isTerminalTarget && task.status === 'dispatchable' && !task.assigned_agent) {
|
|
1201
|
+
ctx.leader.board.updateTaskStatus(taskId, 'running');
|
|
1202
|
+
}
|
|
1203
|
+
ctx.leader.board.updateTaskStatus(taskId, normalized.status, normalized.exitReason, result);
|
|
1204
|
+
return `已更新任务 ${taskId} 状态为 ${status}`;
|
|
1205
|
+
}
|
|
1206
|
+
catch (error) {
|
|
1207
|
+
throw fail(`更新任务状态失败:${error instanceof Error ? error.message : String(error)}`);
|
|
1208
|
+
}
|
|
1209
|
+
}
|
|
1210
|
+
// ─── 蓝图增删改工具 ──────────────────────────────────────────────────────
|
|
1211
|
+
/** add_subsystem 实现:添加单个子系统到现有蓝图。 */
|
|
1212
|
+
export function addBlueprintSubsystem(ctx, args = {}) {
|
|
1213
|
+
const subsystemId = normalizeOptionalString(args.subsystem_id);
|
|
1214
|
+
if (!subsystemId) {
|
|
1215
|
+
throw fail('add_subsystem 必须提供 subsystem_id。');
|
|
1216
|
+
}
|
|
1217
|
+
const name = normalizeOptionalString(args.name);
|
|
1218
|
+
if (!name) {
|
|
1219
|
+
throw fail('add_subsystem 必须提供 name。');
|
|
1220
|
+
}
|
|
1221
|
+
const description = normalizeOptionalString(args.description);
|
|
1222
|
+
if (!description) {
|
|
1223
|
+
throw fail('add_subsystem 必须提供 description。');
|
|
1224
|
+
}
|
|
1225
|
+
const statusRaw = normalizeOptionalString(args.status);
|
|
1226
|
+
const status = statusRaw;
|
|
1227
|
+
const input = {
|
|
1228
|
+
subsystemId,
|
|
1229
|
+
name,
|
|
1230
|
+
description,
|
|
1231
|
+
...(status ? { status } : {}),
|
|
1232
|
+
...(args.rationale ? { rationale: String(args.rationale) } : {}),
|
|
1233
|
+
...(args.agent_type ? { agentType: String(args.agent_type) } : {}),
|
|
1234
|
+
...(Array.isArray(args.depends_on) ? { dependsOn: args.depends_on.filter((d) => typeof d === 'string') } : {}),
|
|
1235
|
+
};
|
|
1236
|
+
let result = null;
|
|
1237
|
+
ctx.leader.db.updateSessionState(ctx.leader.sessionId, SESSION_KEYS.PROJECT_BLUEPRINT, (current) => {
|
|
1238
|
+
const existing = parseBlueprint(current);
|
|
1239
|
+
if (!existing) {
|
|
1240
|
+
throw fail('当前会话没有蓝图。请先用 define_project_blueprint 创建蓝图。');
|
|
1241
|
+
}
|
|
1242
|
+
const updated = addSubsystem(existing, input);
|
|
1243
|
+
if ('error' in updated) {
|
|
1244
|
+
throw fail(updated.error);
|
|
1245
|
+
}
|
|
1246
|
+
result = updated;
|
|
1247
|
+
return serializeBlueprint(updated);
|
|
1248
|
+
});
|
|
1249
|
+
if (!result) {
|
|
1250
|
+
throw fail('add_subsystem 写入失败。');
|
|
1251
|
+
}
|
|
1252
|
+
const blueprint = result;
|
|
1253
|
+
const coverage = computeBlueprintCoverage(blueprint);
|
|
1254
|
+
try {
|
|
1255
|
+
ctx.leader.emitter.emit('leader:blueprint_updated', { sessionId: ctx.leader.sessionId, blueprint, coverage });
|
|
1256
|
+
}
|
|
1257
|
+
catch (err) {
|
|
1258
|
+
leaderLogger.warn(`[LeaderTools] blueprint_updated 事件发送失败: ${err instanceof Error ? err.message : String(err)}`);
|
|
1259
|
+
}
|
|
1260
|
+
return `已添加子系统 ${subsystemId} (${name}) · status=${input.status ?? 'implement'}。蓝图现有 ${blueprint.subsystems.length} 个子系统。`;
|
|
1261
|
+
}
|
|
1262
|
+
/** update_subsystem 实现:更新子系统属性。 */
|
|
1263
|
+
export function updateBlueprintSubsystem(ctx, args = {}) {
|
|
1264
|
+
const subsystemId = normalizeOptionalString(args.subsystem_id);
|
|
1265
|
+
if (!subsystemId) {
|
|
1266
|
+
throw fail('update_subsystem 必须提供 subsystem_id。');
|
|
1267
|
+
}
|
|
1268
|
+
const statusRaw = normalizeOptionalString(args.status);
|
|
1269
|
+
const status = statusRaw;
|
|
1270
|
+
const input = {
|
|
1271
|
+
subsystemId,
|
|
1272
|
+
...(args.name !== undefined ? { name: String(args.name) } : {}),
|
|
1273
|
+
...(args.description !== undefined ? { description: String(args.description) } : {}),
|
|
1274
|
+
...(status ? { status } : {}),
|
|
1275
|
+
...(args.rationale !== undefined ? { rationale: args.rationale ? String(args.rationale) : undefined } : {}),
|
|
1276
|
+
...(args.agent_type !== undefined ? { agentType: args.agent_type ? String(args.agent_type) : undefined } : {}),
|
|
1277
|
+
...(args.depends_on !== undefined ? { dependsOn: Array.isArray(args.depends_on) ? args.depends_on.filter((d) => typeof d === 'string') : [] } : {}),
|
|
1278
|
+
};
|
|
1279
|
+
let result = null;
|
|
1280
|
+
ctx.leader.db.updateSessionState(ctx.leader.sessionId, SESSION_KEYS.PROJECT_BLUEPRINT, (current) => {
|
|
1281
|
+
const existing = parseBlueprint(current);
|
|
1282
|
+
if (!existing) {
|
|
1283
|
+
throw fail('当前会话没有蓝图。请先用 define_project_blueprint 创建蓝图。');
|
|
1284
|
+
}
|
|
1285
|
+
const updated = updateSubsystem(existing, input);
|
|
1286
|
+
if ('error' in updated) {
|
|
1287
|
+
throw fail(updated.error);
|
|
1288
|
+
}
|
|
1289
|
+
result = updated;
|
|
1290
|
+
return serializeBlueprint(updated);
|
|
1291
|
+
});
|
|
1292
|
+
if (!result) {
|
|
1293
|
+
throw fail('update_subsystem 写入失败。');
|
|
1294
|
+
}
|
|
1295
|
+
const blueprint = result;
|
|
1296
|
+
const coverage = computeBlueprintCoverage(blueprint);
|
|
1297
|
+
try {
|
|
1298
|
+
ctx.leader.emitter.emit('leader:blueprint_updated', { sessionId: ctx.leader.sessionId, blueprint, coverage });
|
|
1299
|
+
}
|
|
1300
|
+
catch (err) {
|
|
1301
|
+
leaderLogger.warn(`[LeaderTools] blueprint_updated 事件发送失败: ${err instanceof Error ? err.message : String(err)}`);
|
|
1302
|
+
}
|
|
1303
|
+
const updatedFields = Object.keys(input).filter((k) => k !== 'subsystemId').join(', ');
|
|
1304
|
+
return `已更新子系统 ${subsystemId}。更新字段: ${updatedFields}。`;
|
|
1305
|
+
}
|
|
1306
|
+
/** delete_subsystem 实现:删除子系统。 */
|
|
1307
|
+
export function deleteBlueprintSubsystem(ctx, args = {}) {
|
|
1308
|
+
const subsystemId = normalizeOptionalString(args.subsystem_id);
|
|
1309
|
+
if (!subsystemId) {
|
|
1310
|
+
throw fail('delete_subsystem 必须提供 subsystem_id。');
|
|
1311
|
+
}
|
|
1312
|
+
let result = null;
|
|
1313
|
+
let deletedName = null;
|
|
1314
|
+
let deletedTaskIds = [];
|
|
1315
|
+
ctx.leader.db.updateSessionState(ctx.leader.sessionId, SESSION_KEYS.PROJECT_BLUEPRINT, (current) => {
|
|
1316
|
+
const existing = parseBlueprint(current);
|
|
1317
|
+
if (!existing) {
|
|
1318
|
+
throw fail('当前会话没有蓝图。请先用 define_project_blueprint 创建蓝图。');
|
|
1319
|
+
}
|
|
1320
|
+
const entry = existing.subsystems.find((e) => e.subsystemId === subsystemId);
|
|
1321
|
+
if (entry) {
|
|
1322
|
+
deletedName = entry.name;
|
|
1323
|
+
deletedTaskIds = [...entry.taskIds];
|
|
1324
|
+
}
|
|
1325
|
+
const updated = deleteSubsystem(existing, subsystemId);
|
|
1326
|
+
if ('error' in updated) {
|
|
1327
|
+
throw fail(updated.error);
|
|
1328
|
+
}
|
|
1329
|
+
result = updated;
|
|
1330
|
+
return serializeBlueprint(updated);
|
|
1331
|
+
});
|
|
1332
|
+
if (!result) {
|
|
1333
|
+
throw fail('delete_subsystem 写入失败。');
|
|
1334
|
+
}
|
|
1335
|
+
const blueprint = result;
|
|
1336
|
+
const coverage = computeBlueprintCoverage(blueprint);
|
|
1337
|
+
try {
|
|
1338
|
+
ctx.leader.emitter.emit('leader:blueprint_updated', { sessionId: ctx.leader.sessionId, blueprint, coverage });
|
|
1339
|
+
}
|
|
1340
|
+
catch (err) {
|
|
1341
|
+
leaderLogger.warn(`[LeaderTools] blueprint_updated 事件发送失败: ${err instanceof Error ? err.message : String(err)}`);
|
|
1342
|
+
}
|
|
1343
|
+
let message = `已删除子系统 ${subsystemId}`;
|
|
1344
|
+
if (deletedName) {
|
|
1345
|
+
message += ` (${deletedName})`;
|
|
1346
|
+
if (deletedTaskIds.length > 0) {
|
|
1347
|
+
message += `。警告: 该子系统有 ${deletedTaskIds.length} 个关联任务: ${deletedTaskIds.join(', ')}。这些任务的 subsystem 绑定已失效。`;
|
|
1348
|
+
}
|
|
1349
|
+
}
|
|
1350
|
+
message += `。蓝图剩余 ${blueprint.subsystems.length} 个子系统。`;
|
|
1351
|
+
return message;
|
|
1352
|
+
}
|
|
1353
|
+
//# sourceMappingURL=LeaderTaskPlanningTools.js.map
|