@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,1484 @@
|
|
|
1
|
+
import Ajv from 'ajv';
|
|
2
|
+
import { existsSync } from 'fs';
|
|
3
|
+
import { resolve, isAbsolute } from 'path';
|
|
4
|
+
import { Tool, createToolError, normalizeJsonSchemaForOpenAI } from './Tool.js';
|
|
5
|
+
import { getToolMetadata, requiresReadFirst } from './ToolMetadata.js';
|
|
6
|
+
import { auditOfficeToolExecution } from './implementations/office/OfficeAuditLog.js';
|
|
7
|
+
import { auditModeEvent } from '../core/ModeAudit.js';
|
|
8
|
+
import { isOfficeToolName } from './officeToolContract.js';
|
|
9
|
+
import { config as runtimeConfig } from '../config.js';
|
|
10
|
+
import { getToolFailureLoopGuard } from '../agents/runtime/ToolFailureLoopGuard.js';
|
|
11
|
+
import { coreLogger } from '../core/Log.js';
|
|
12
|
+
import { evaluateToolPermission, getToolPermissionContextFromToolContext, } from '../core/PermissionSystem.js';
|
|
13
|
+
import { resolveModeRuntimeProjection } from '../core/ModeRuntimeProjection.js';
|
|
14
|
+
import { resolveModeToolDecision, } from '../core/ModeToolPolicy.js';
|
|
15
|
+
import { getTeamMemberRegistry } from '../core/TeamMailbox.js';
|
|
16
|
+
import { normalizeToolResult } from '../contracts/types/Tool.js';
|
|
17
|
+
import { getPromptCatalog } from '../agents/prompts/i18n/catalog.js';
|
|
18
|
+
const jsonSchemaValidator = new Ajv({
|
|
19
|
+
allErrors: true,
|
|
20
|
+
strict: false,
|
|
21
|
+
allowUnionTypes: true,
|
|
22
|
+
});
|
|
23
|
+
const DEFAULT_TOOL_EXECUTION_TIMEOUT_MS = 60_000;
|
|
24
|
+
function normalizeExecutionTimeoutMs(value) {
|
|
25
|
+
return typeof value === 'number' && Number.isFinite(value) && value > 0
|
|
26
|
+
? Math.max(1, Math.floor(value))
|
|
27
|
+
: undefined;
|
|
28
|
+
}
|
|
29
|
+
function resolveToolExecutionTimeoutMs(tool, parsedArgs, context) {
|
|
30
|
+
const toolSpecificTimeout = normalizeExecutionTimeoutMs(tool.getExecutionTimeoutMs?.(parsedArgs, context));
|
|
31
|
+
if (toolSpecificTimeout !== undefined) {
|
|
32
|
+
return toolSpecificTimeout;
|
|
33
|
+
}
|
|
34
|
+
const contextTimeout = typeof context?.toolExecutionTimeoutMs === 'number'
|
|
35
|
+
? context.toolExecutionTimeoutMs
|
|
36
|
+
: typeof context?.executionTimeoutMs === 'number'
|
|
37
|
+
? context.executionTimeoutMs
|
|
38
|
+
: undefined;
|
|
39
|
+
const configured = contextTimeout ?? runtimeConfig.tools?.execution_timeout_ms ?? DEFAULT_TOOL_EXECUTION_TIMEOUT_MS;
|
|
40
|
+
return typeof configured === 'number' && Number.isFinite(configured) && configured > 0
|
|
41
|
+
? Math.min(600_000, Math.floor(configured))
|
|
42
|
+
: DEFAULT_TOOL_EXECUTION_TIMEOUT_MS;
|
|
43
|
+
}
|
|
44
|
+
function isAbortError(error) {
|
|
45
|
+
return error instanceof Error && error.name === 'AbortError';
|
|
46
|
+
}
|
|
47
|
+
function formatToolTimeoutError(name, timeoutMs) {
|
|
48
|
+
return `TOOL_TIMEOUT: 工具 "${name}" 执行 watchdog 超过 ${timeoutMs}ms,已中止本次调用。请缩小输入范围、降低并发,或为该工具设置更合适的 timeout 后重试。`;
|
|
49
|
+
}
|
|
50
|
+
function formatToolAbortedError(name) {
|
|
51
|
+
return `TOOL_ABORTED: 工具 "${name}" 已被中止。`;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* 从 ToolResult.error 中提取 LLM_RECOVERY.code,与 createToolError 的输出对齐。
|
|
55
|
+
* 格式: `${message}\n\nLLM_RECOVERY=${JSON.stringify({code, message, ...})}`
|
|
56
|
+
*/
|
|
57
|
+
function extractErrorCodeFromText(errorText) {
|
|
58
|
+
if (!errorText)
|
|
59
|
+
return '';
|
|
60
|
+
const marker = 'LLM_RECOVERY=';
|
|
61
|
+
const idx = errorText.lastIndexOf(marker);
|
|
62
|
+
if (idx < 0) {
|
|
63
|
+
const firstLine = errorText.split('\n')[0] || '';
|
|
64
|
+
const colonIdx = firstLine.indexOf(':');
|
|
65
|
+
return colonIdx > 0 ? firstLine.slice(0, colonIdx).trim() : firstLine.trim();
|
|
66
|
+
}
|
|
67
|
+
const jsonText = errorText.slice(idx + marker.length).trim();
|
|
68
|
+
try {
|
|
69
|
+
const parsed = JSON.parse(jsonText);
|
|
70
|
+
return typeof parsed?.code === 'string' ? parsed.code : '';
|
|
71
|
+
}
|
|
72
|
+
catch {
|
|
73
|
+
return '';
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
async function executeToolWithTimeout(name, tool, parsedArgs, context) {
|
|
77
|
+
const timeoutMs = resolveToolExecutionTimeoutMs(tool, parsedArgs, context);
|
|
78
|
+
const timeoutController = new AbortController();
|
|
79
|
+
const upstreamSignal = context?.abortSignal;
|
|
80
|
+
const signal = upstreamSignal
|
|
81
|
+
? AbortSignal.any([upstreamSignal, timeoutController.signal])
|
|
82
|
+
: timeoutController.signal;
|
|
83
|
+
let timedOut = false;
|
|
84
|
+
let timer;
|
|
85
|
+
let abortCleanup;
|
|
86
|
+
const toolContext = { ...(context || {}), abortSignal: signal };
|
|
87
|
+
try {
|
|
88
|
+
if (signal.aborted) {
|
|
89
|
+
return { success: false, data: null, error: formatToolAbortedError(name) };
|
|
90
|
+
}
|
|
91
|
+
const timeoutPromise = new Promise((_, reject) => {
|
|
92
|
+
timer = setTimeout(() => {
|
|
93
|
+
timedOut = true;
|
|
94
|
+
timeoutController.abort(formatToolTimeoutError(name, timeoutMs));
|
|
95
|
+
reject(new Error(formatToolTimeoutError(name, timeoutMs)));
|
|
96
|
+
}, timeoutMs);
|
|
97
|
+
});
|
|
98
|
+
const abortPromise = new Promise((_, reject) => {
|
|
99
|
+
const onAbort = () => reject(new Error(formatToolAbortedError(name)));
|
|
100
|
+
signal.addEventListener('abort', onAbort, { once: true });
|
|
101
|
+
abortCleanup = () => signal.removeEventListener('abort', onAbort);
|
|
102
|
+
});
|
|
103
|
+
const result = await Promise.race([
|
|
104
|
+
Promise.resolve(tool.execute(parsedArgs, toolContext)),
|
|
105
|
+
timeoutPromise,
|
|
106
|
+
abortPromise,
|
|
107
|
+
]);
|
|
108
|
+
return normalizeToolResult(result);
|
|
109
|
+
}
|
|
110
|
+
catch (error) {
|
|
111
|
+
return {
|
|
112
|
+
success: false,
|
|
113
|
+
data: null,
|
|
114
|
+
error: timedOut
|
|
115
|
+
? formatToolTimeoutError(name, timeoutMs)
|
|
116
|
+
: isAbortError(error)
|
|
117
|
+
? formatToolAbortedError(name)
|
|
118
|
+
: error instanceof Error ? error.message : String(error),
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
finally {
|
|
122
|
+
abortCleanup?.();
|
|
123
|
+
if (timer)
|
|
124
|
+
clearTimeout(timer);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
function isRecord(value) {
|
|
128
|
+
return Boolean(value) && typeof value === 'object' && !Array.isArray(value);
|
|
129
|
+
}
|
|
130
|
+
function stringArray(value) {
|
|
131
|
+
return Array.isArray(value) && value.every((item) => typeof item === 'string')
|
|
132
|
+
? value
|
|
133
|
+
: undefined;
|
|
134
|
+
}
|
|
135
|
+
function recordValue(value) {
|
|
136
|
+
return isRecord(value) ? value : undefined;
|
|
137
|
+
}
|
|
138
|
+
function extractLlmRecovery(data) {
|
|
139
|
+
const recovery = isRecord(data) ? data.llm_recovery : undefined;
|
|
140
|
+
if (!isRecord(recovery))
|
|
141
|
+
return undefined;
|
|
142
|
+
const nextTool = isRecord(recovery.next_tool) && typeof recovery.next_tool.name === 'string'
|
|
143
|
+
? {
|
|
144
|
+
name: recovery.next_tool.name,
|
|
145
|
+
...(isRecord(recovery.next_tool.args) ? { args: recovery.next_tool.args } : {}),
|
|
146
|
+
}
|
|
147
|
+
: undefined;
|
|
148
|
+
const candidates = stringArray(recovery.candidates);
|
|
149
|
+
const exampleArgs = recordValue(recovery.example_args);
|
|
150
|
+
const retryArgs = recordValue(recovery.retry_args);
|
|
151
|
+
const dto = {
|
|
152
|
+
...(typeof recovery.code === 'string' ? { code: recovery.code } : {}),
|
|
153
|
+
...(typeof recovery.message === 'string' ? { message: recovery.message } : {}),
|
|
154
|
+
...(typeof recovery.fix === 'string' ? { fix: recovery.fix } : {}),
|
|
155
|
+
...('hints' in recovery ? { hints: recovery.hints } : {}),
|
|
156
|
+
...(candidates ? { candidates } : {}),
|
|
157
|
+
...(nextTool ? { next_tool: nextTool } : {}),
|
|
158
|
+
...(exampleArgs ? { example_args: exampleArgs } : {}),
|
|
159
|
+
...(retryArgs ? { retry_args: retryArgs } : {}),
|
|
160
|
+
};
|
|
161
|
+
return Object.keys(dto).length > 0 ? dto : undefined;
|
|
162
|
+
}
|
|
163
|
+
// 把单条 issue 格式化为可自我纠正的人类可读描述。
|
|
164
|
+
// 关键改进:z.union(如 structured_patch 的 hunk)失败时,zod 顶层只给一句无信息量的
|
|
165
|
+
// "Invalid input"。这里展开候选 variant,挑差异最小的那个,明确指出多/缺哪些字段,
|
|
166
|
+
// 让调用方(含 LLM)能据此自我纠正,而不是反复瞎试。
|
|
167
|
+
function formatZodIssue(issue, depth = 0) {
|
|
168
|
+
const path = issue.path && issue.path.length > 0 ? issue.path.join('.') : '(root)';
|
|
169
|
+
if (issue.code === 'invalid_union' && Array.isArray(issue.errors) && issue.errors.length > 0 && depth < 3) {
|
|
170
|
+
// 子 issue 最少的 variant = 最接近匹配的形态
|
|
171
|
+
const best = issue.errors
|
|
172
|
+
.map((variantIssues) => ({ issues: variantIssues, score: variantIssues.length }))
|
|
173
|
+
.sort((a, b) => a.score - b.score)[0];
|
|
174
|
+
if (best && best.issues.length > 0) {
|
|
175
|
+
const detail = best.issues.slice(0, 4).map((sub) => formatZodIssue(sub, depth + 1)).join('; ');
|
|
176
|
+
return `${path}: 不匹配任一允许形态,最接近的形态还差 → ${detail}`;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
if (issue.code === 'unrecognized_keys' && Array.isArray(issue.keys) && issue.keys.length > 0) {
|
|
180
|
+
return `${path}: 含该形态不允许的字段 ${issue.keys.map((k) => `"${k}"`).join(', ')}(同一项不要混用多种形态的字段)`;
|
|
181
|
+
}
|
|
182
|
+
return `${path}: ${issue.message ?? 'invalid'}`;
|
|
183
|
+
}
|
|
184
|
+
function formatZodError(error) {
|
|
185
|
+
return error.issues
|
|
186
|
+
.slice(0, 8)
|
|
187
|
+
.map((issue) => formatZodIssue(issue))
|
|
188
|
+
.join('; ');
|
|
189
|
+
}
|
|
190
|
+
// 与 formatZodError 同源的结构化 hints:union 失败时也展开为可读描述,
|
|
191
|
+
// 避免 hints 里仍是塌缩的 "Invalid input"。
|
|
192
|
+
function zodErrorHints(error) {
|
|
193
|
+
return error.issues
|
|
194
|
+
.slice(0, 8)
|
|
195
|
+
.map((issue) => {
|
|
196
|
+
const path = issue.path && issue.path.length > 0 ? issue.path.join('.') : '(root)';
|
|
197
|
+
const formatted = formatZodIssue(issue);
|
|
198
|
+
// formatZodIssue 返回 "path: detail",hints 只取 detail 部分
|
|
199
|
+
const sep = formatted.indexOf(': ');
|
|
200
|
+
return { path, message: sep >= 0 ? formatted.slice(sep + 2) : formatted };
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
function levenshtein(a, b) {
|
|
204
|
+
const dp = Array.from({ length: a.length + 1 }, (_, i) => [i]);
|
|
205
|
+
for (let j = 1; j <= b.length; j++)
|
|
206
|
+
dp[0][j] = j;
|
|
207
|
+
for (let i = 1; i <= a.length; i++) {
|
|
208
|
+
for (let j = 1; j <= b.length; j++) {
|
|
209
|
+
dp[i][j] = Math.min(dp[i - 1][j] + 1, dp[i][j - 1] + 1, dp[i - 1][j - 1] + (a[i - 1] === b[j - 1] ? 0 : 1));
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
return dp[a.length][b.length];
|
|
213
|
+
}
|
|
214
|
+
function parseArgsText(args) {
|
|
215
|
+
if (typeof args !== 'string')
|
|
216
|
+
return { ok: true, value: args };
|
|
217
|
+
return {
|
|
218
|
+
ok: false,
|
|
219
|
+
message: '工具参数必须直接传结构化 JSON 值,不接受 JSON 字符串容器。',
|
|
220
|
+
cause: 'top-level string tool arguments are not accepted',
|
|
221
|
+
rawPreview: `${args.slice(0, 200)}${args.length > 200 ? '...' : ''}`,
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
function exampleValueForSchema(schema, key) {
|
|
225
|
+
if (!schema || typeof schema !== 'object' || Array.isArray(schema))
|
|
226
|
+
return 'value';
|
|
227
|
+
const s = schema;
|
|
228
|
+
if ('default' in s)
|
|
229
|
+
return s.default;
|
|
230
|
+
if (Array.isArray(s.examples) && s.examples.length > 0)
|
|
231
|
+
return s.examples[0];
|
|
232
|
+
if (Array.isArray(s.enum) && s.enum.length > 0)
|
|
233
|
+
return s.enum[0];
|
|
234
|
+
if ('const' in s)
|
|
235
|
+
return s.const;
|
|
236
|
+
const lowerKey = (key || '').toLowerCase();
|
|
237
|
+
const type = Array.isArray(s.type) ? s.type[0] : s.type;
|
|
238
|
+
if (type === 'boolean')
|
|
239
|
+
return false;
|
|
240
|
+
if (type === 'number' || type === 'integer')
|
|
241
|
+
return 1;
|
|
242
|
+
if (type === 'array')
|
|
243
|
+
return [exampleValueForSchema(s.items)];
|
|
244
|
+
if (type === 'object' || Array.isArray(s.oneOf) || Array.isArray(s.anyOf) || Array.isArray(s.allOf)) {
|
|
245
|
+
return exampleArgsFromSchema(s);
|
|
246
|
+
}
|
|
247
|
+
if (lowerKey === 'request_id' || lowerKey.endsWith('_request_id'))
|
|
248
|
+
return '<request-id>';
|
|
249
|
+
if (lowerKey === 'worker_name')
|
|
250
|
+
return '<worker-name>';
|
|
251
|
+
if (lowerKey === 'agent_name' || lowerKey.endsWith('_agent_name'))
|
|
252
|
+
return 'Sam';
|
|
253
|
+
if (lowerKey === 'task_id' || lowerKey.endsWith('_task_id'))
|
|
254
|
+
return 'T-1';
|
|
255
|
+
if (lowerKey === 'team_name')
|
|
256
|
+
return '<team-name>';
|
|
257
|
+
if (lowerKey === 'tool_name')
|
|
258
|
+
return 'shell';
|
|
259
|
+
if (lowerKey === 'reason')
|
|
260
|
+
return '需要完成当前任务的必要操作';
|
|
261
|
+
if (lowerKey === 'summary')
|
|
262
|
+
return '已完成本轮目标';
|
|
263
|
+
if (lowerKey.includes('path'))
|
|
264
|
+
return 'src/index.ts';
|
|
265
|
+
if (lowerKey.includes('url'))
|
|
266
|
+
return 'https://example.com';
|
|
267
|
+
if (lowerKey.includes('query'))
|
|
268
|
+
return 'search terms';
|
|
269
|
+
if (lowerKey.includes('command'))
|
|
270
|
+
return 'pwd';
|
|
271
|
+
if (lowerKey.includes('selector'))
|
|
272
|
+
return 'body';
|
|
273
|
+
if (lowerKey.includes('content') || lowerKey.includes('text') || lowerKey.includes('message'))
|
|
274
|
+
return 'text';
|
|
275
|
+
return 'value';
|
|
276
|
+
}
|
|
277
|
+
function schemaVariants(schema) {
|
|
278
|
+
const variants = Array.isArray(schema.oneOf)
|
|
279
|
+
? schema.oneOf
|
|
280
|
+
: Array.isArray(schema.anyOf)
|
|
281
|
+
? schema.anyOf
|
|
282
|
+
: undefined;
|
|
283
|
+
return variants?.filter(isRecord) ?? [];
|
|
284
|
+
}
|
|
285
|
+
function selectSchemaForArgs(schema, args) {
|
|
286
|
+
const variants = schemaVariants(schema);
|
|
287
|
+
if (variants.length === 0)
|
|
288
|
+
return schema;
|
|
289
|
+
const objectVariants = variants.filter((variant) => isRecord(variant.properties));
|
|
290
|
+
if (objectVariants.length === 0)
|
|
291
|
+
return schema;
|
|
292
|
+
if (isRecord(args)) {
|
|
293
|
+
for (const variant of objectVariants) {
|
|
294
|
+
const properties = isRecord(variant.properties) ? variant.properties : {};
|
|
295
|
+
const matches = Object.entries(properties).some(([key, prop]) => isRecord(prop) &&
|
|
296
|
+
'const' in prop &&
|
|
297
|
+
args[key] === prop.const);
|
|
298
|
+
if (matches)
|
|
299
|
+
return variant;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
return objectVariants[0];
|
|
303
|
+
}
|
|
304
|
+
function schemaProperties(schema) {
|
|
305
|
+
return schema.properties && typeof schema.properties === 'object' && !Array.isArray(schema.properties)
|
|
306
|
+
? schema.properties
|
|
307
|
+
: {};
|
|
308
|
+
}
|
|
309
|
+
function requiredKeysForSchema(schema) {
|
|
310
|
+
return Array.isArray(schema.required)
|
|
311
|
+
? schema.required.filter((item) => typeof item === 'string')
|
|
312
|
+
: [];
|
|
313
|
+
}
|
|
314
|
+
function exampleArgsFromSchema(schema, args) {
|
|
315
|
+
const selected = selectSchemaForArgs(schema, args);
|
|
316
|
+
const properties = schemaProperties(selected);
|
|
317
|
+
const required = requiredKeysForSchema(selected);
|
|
318
|
+
const keys = required.length > 0 ? required : Object.keys(properties).slice(0, 3);
|
|
319
|
+
const out = {};
|
|
320
|
+
for (const key of keys) {
|
|
321
|
+
out[key] = exampleValueForSchema(properties[key], key);
|
|
322
|
+
}
|
|
323
|
+
return out;
|
|
324
|
+
}
|
|
325
|
+
function retryArgsFromSchema(schema, args) {
|
|
326
|
+
const selected = selectSchemaForArgs(schema, args);
|
|
327
|
+
const properties = schemaProperties(selected);
|
|
328
|
+
const out = exampleArgsFromSchema(selected, args);
|
|
329
|
+
if (!isRecord(args))
|
|
330
|
+
return out;
|
|
331
|
+
for (const key of Object.keys(properties)) {
|
|
332
|
+
const value = args[key];
|
|
333
|
+
const propSchema = properties[key];
|
|
334
|
+
if (value !== undefined && value !== '' && valueMatchesSchema(value, propSchema))
|
|
335
|
+
out[key] = value;
|
|
336
|
+
}
|
|
337
|
+
return out;
|
|
338
|
+
}
|
|
339
|
+
function valueMatchesSchema(value, schema) {
|
|
340
|
+
if (!isRecord(schema))
|
|
341
|
+
return true;
|
|
342
|
+
try {
|
|
343
|
+
const validate = jsonSchemaValidator.compile(schema);
|
|
344
|
+
return validate(value) === true;
|
|
345
|
+
}
|
|
346
|
+
catch {
|
|
347
|
+
return true;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
function findSiblingObjectPropertyForKey(properties, key) {
|
|
351
|
+
let match = null;
|
|
352
|
+
for (const [propName, propSchema] of Object.entries(properties)) {
|
|
353
|
+
if (!isRecord(propSchema))
|
|
354
|
+
continue;
|
|
355
|
+
const childProps = schemaProperties(propSchema);
|
|
356
|
+
if (Object.prototype.hasOwnProperty.call(childProps, key)) {
|
|
357
|
+
if (match)
|
|
358
|
+
return null; // ambiguous: multiple siblings declare this key
|
|
359
|
+
match = propName;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
return match;
|
|
363
|
+
}
|
|
364
|
+
function isStringLikeSchema(schema) {
|
|
365
|
+
if (!isRecord(schema))
|
|
366
|
+
return false;
|
|
367
|
+
const type = new Set(Array.isArray(schema.type) ? schema.type : [schema.type]);
|
|
368
|
+
if (type.has('string'))
|
|
369
|
+
return true;
|
|
370
|
+
if ('minLength' in schema || 'maxLength' in schema || 'pattern' in schema || 'format' in schema)
|
|
371
|
+
return true;
|
|
372
|
+
if (Array.isArray(schema.enum) && schema.enum.every((item) => typeof item === 'string'))
|
|
373
|
+
return true;
|
|
374
|
+
return typeof schema.const === 'string';
|
|
375
|
+
}
|
|
376
|
+
function coerceStringBoolean(value) {
|
|
377
|
+
const normalized = value.trim().toLowerCase();
|
|
378
|
+
if (!normalized)
|
|
379
|
+
return undefined;
|
|
380
|
+
if (['true', 'yes', 'y', '1', 'on', 'enabled', 'enable', 'pass', 'passed', 'success', 'succeeded', 'ok', '✅', '✓'].includes(normalized)) {
|
|
381
|
+
return true;
|
|
382
|
+
}
|
|
383
|
+
if (['false', 'no', 'n', '0', 'off', 'disabled', 'disable', 'fail', 'failed', 'failure', 'error', 'blocked', 'skipped', '❌', '✗'].includes(normalized)) {
|
|
384
|
+
return false;
|
|
385
|
+
}
|
|
386
|
+
return undefined;
|
|
387
|
+
}
|
|
388
|
+
function coerceBooleanForSchema(value) {
|
|
389
|
+
if (typeof value === 'boolean')
|
|
390
|
+
return value;
|
|
391
|
+
if (typeof value === 'number') {
|
|
392
|
+
if (value === 1)
|
|
393
|
+
return true;
|
|
394
|
+
if (value === 0)
|
|
395
|
+
return false;
|
|
396
|
+
}
|
|
397
|
+
if (typeof value === 'string') {
|
|
398
|
+
return coerceStringBoolean(value) ?? value;
|
|
399
|
+
}
|
|
400
|
+
return value;
|
|
401
|
+
}
|
|
402
|
+
function coerceNumberForSchema(value, integer) {
|
|
403
|
+
if (typeof value === 'number')
|
|
404
|
+
return value;
|
|
405
|
+
if (typeof value !== 'string')
|
|
406
|
+
return value;
|
|
407
|
+
const trimmed = value.trim();
|
|
408
|
+
if (!trimmed)
|
|
409
|
+
return value;
|
|
410
|
+
if (integer && !/^[+-]?\d+$/.test(trimmed))
|
|
411
|
+
return value;
|
|
412
|
+
if (!integer && !/^[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?$/i.test(trimmed))
|
|
413
|
+
return value;
|
|
414
|
+
const parsed = Number(trimmed);
|
|
415
|
+
return Number.isFinite(parsed) ? parsed : value;
|
|
416
|
+
}
|
|
417
|
+
function normalizedEnumKey(value) {
|
|
418
|
+
return value.trim().toLowerCase().replace(/[\s-]+/g, '_');
|
|
419
|
+
}
|
|
420
|
+
function coerceEnumForSchema(value, schema) {
|
|
421
|
+
if (!Array.isArray(schema.enum))
|
|
422
|
+
return value;
|
|
423
|
+
if (schema.enum.some((item) => Object.is(item, value)))
|
|
424
|
+
return value;
|
|
425
|
+
if (typeof value === 'string') {
|
|
426
|
+
const trimmed = value.trim();
|
|
427
|
+
const boolValue = coerceStringBoolean(trimmed);
|
|
428
|
+
for (const item of schema.enum) {
|
|
429
|
+
if (typeof item === 'string' && normalizedEnumKey(item) === normalizedEnumKey(trimmed))
|
|
430
|
+
return item;
|
|
431
|
+
if (typeof item === 'boolean' && boolValue !== undefined && item === boolValue)
|
|
432
|
+
return item;
|
|
433
|
+
if (typeof item === 'number') {
|
|
434
|
+
const parsed = coerceNumberForSchema(trimmed, Number.isInteger(item));
|
|
435
|
+
if (typeof parsed === 'number' && Object.is(parsed, item))
|
|
436
|
+
return item;
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
return value;
|
|
441
|
+
}
|
|
442
|
+
/**
|
|
443
|
+
* items schema 是否为 primitive(string/number/integer/boolean 或 primitive enum)。
|
|
444
|
+
* 仅对 primitive-items 数组做「对象/嵌套 → 叶子拍平」,避免对 object[] 做歧义猜测。
|
|
445
|
+
*/
|
|
446
|
+
function isPrimitiveItemsSchema(items) {
|
|
447
|
+
if (!isRecord(items))
|
|
448
|
+
return false;
|
|
449
|
+
const typeField = Array.isArray(items.type) ? items.type[0] : items.type;
|
|
450
|
+
if (typeField === 'string' || typeField === 'number' || typeField === 'integer' || typeField === 'boolean') {
|
|
451
|
+
return true;
|
|
452
|
+
}
|
|
453
|
+
if (Array.isArray(items.enum) && items.enum.every((v) => v === null || typeof v !== 'object')) {
|
|
454
|
+
return true;
|
|
455
|
+
}
|
|
456
|
+
return false;
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* 深度收集所有 primitive 叶子值(string/number/boolean),跳过对象 key 与 null。
|
|
460
|
+
* 用于把模型误写成嵌套对象(如 {"item":{...,"$text":"path"}} —— XML 语义泄进 JSON)
|
|
461
|
+
* 的 primitive 列表拍平回扁平数组。顺序 = 结构内文档序(深度优先)。
|
|
462
|
+
*/
|
|
463
|
+
export function collectPrimitiveLeaves(value, out) {
|
|
464
|
+
if (value === null || value === undefined)
|
|
465
|
+
return;
|
|
466
|
+
if (typeof value === 'object') {
|
|
467
|
+
const iterable = Array.isArray(value) ? value : Object.values(value);
|
|
468
|
+
for (const v of iterable)
|
|
469
|
+
collectPrimitiveLeaves(v, out);
|
|
470
|
+
return;
|
|
471
|
+
}
|
|
472
|
+
out.push(value);
|
|
473
|
+
}
|
|
474
|
+
/**
|
|
475
|
+
* 把单个「应进入数组的元素」按 items schema 规整为元素列表。
|
|
476
|
+
*
|
|
477
|
+
* - primitive 叶子 → `[item]`;
|
|
478
|
+
* - null/undefined → `[]`(丢弃,避免空槽);
|
|
479
|
+
* - object/嵌套 + primitive-items schema → 拍平成 primitive 叶子列表;
|
|
480
|
+
* - object/嵌套 + object-items schema → `[item]`(不拍平,交回递归规整/校验)。
|
|
481
|
+
*
|
|
482
|
+
* 判据全部来自声明的 schema,非启发式(不靠关键词/阈值/置信度)。
|
|
483
|
+
*/
|
|
484
|
+
function coerceToArrayElement(item, itemsSchema) {
|
|
485
|
+
if (item === null || item === undefined)
|
|
486
|
+
return [];
|
|
487
|
+
if (typeof item !== 'object')
|
|
488
|
+
return [item];
|
|
489
|
+
if (!isPrimitiveItemsSchema(itemsSchema))
|
|
490
|
+
return [item];
|
|
491
|
+
const leaves = [];
|
|
492
|
+
collectPrimitiveLeaves(item, leaves);
|
|
493
|
+
return leaves;
|
|
494
|
+
}
|
|
495
|
+
function normalizeArgsForSchema(args, schema) {
|
|
496
|
+
const normalized = normalizeToolArgs(args);
|
|
497
|
+
return normalizeValueForSchema(normalized, schema);
|
|
498
|
+
}
|
|
499
|
+
function normalizeValueForSchema(value, schema) {
|
|
500
|
+
if (!isRecord(schema))
|
|
501
|
+
return value;
|
|
502
|
+
const selected = selectSchemaForArgs(schema, value);
|
|
503
|
+
const variants = schemaVariants(selected);
|
|
504
|
+
if (variants.length > 0 && selected !== schema)
|
|
505
|
+
return normalizeValueForSchema(value, selected);
|
|
506
|
+
const type = Array.isArray(selected.type) ? selected.type[0] : selected.type;
|
|
507
|
+
const enumCoerced = coerceEnumForSchema(value, selected);
|
|
508
|
+
if (enumCoerced !== value)
|
|
509
|
+
return enumCoerced;
|
|
510
|
+
if (type === 'boolean')
|
|
511
|
+
return coerceBooleanForSchema(value);
|
|
512
|
+
if (type === 'integer')
|
|
513
|
+
return coerceNumberForSchema(value, true);
|
|
514
|
+
if (type === 'number')
|
|
515
|
+
return coerceNumberForSchema(value, false);
|
|
516
|
+
if (type === 'array') {
|
|
517
|
+
const itemsSchema = selected.items;
|
|
518
|
+
// value 已是数组:逐元素规整。对 primitive-items 数组,把「对象/嵌套」元素
|
|
519
|
+
// 确定性拍平为 primitive 叶子(模型常把 string[] 误写成嵌套对象,如
|
|
520
|
+
// {"item":{...,"$text":"path"}} —— XML 语义泄进 JSON)。
|
|
521
|
+
if (Array.isArray(value)) {
|
|
522
|
+
const out = [];
|
|
523
|
+
for (const item of value) {
|
|
524
|
+
for (const leaf of coerceToArrayElement(item, itemsSchema)) {
|
|
525
|
+
out.push(normalizeValueForSchema(leaf, itemsSchema));
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
return out;
|
|
529
|
+
}
|
|
530
|
+
// value 非数组但 schema 要数组:单 primitive 包成 [value];对象/嵌套拍平。
|
|
531
|
+
if (value !== null && value !== undefined) {
|
|
532
|
+
const leaves = coerceToArrayElement(value, itemsSchema);
|
|
533
|
+
if (leaves.length > 0) {
|
|
534
|
+
return leaves.map((leaf) => normalizeValueForSchema(leaf, itemsSchema));
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
return value;
|
|
538
|
+
}
|
|
539
|
+
if ((type === 'object' || selected.properties) && isRecord(value)) {
|
|
540
|
+
const properties = schemaProperties(selected);
|
|
541
|
+
const required = new Set(requiredKeysForSchema(selected));
|
|
542
|
+
const out = {};
|
|
543
|
+
const orphanKeys = [];
|
|
544
|
+
for (const [key, nestedValue] of Object.entries(value)) {
|
|
545
|
+
const propSchema = properties[key];
|
|
546
|
+
if (nestedValue === '' && propSchema && isStringLikeSchema(propSchema) && !required.has(key)) {
|
|
547
|
+
continue;
|
|
548
|
+
}
|
|
549
|
+
if (propSchema) {
|
|
550
|
+
out[key] = normalizeValueForSchema(nestedValue, propSchema);
|
|
551
|
+
}
|
|
552
|
+
else if (selected.additionalProperties === false) {
|
|
553
|
+
// Schema explicitly forbids extra props; ajv would hard-reject the whole
|
|
554
|
+
// call for one misplaced/extra key. Defer these orphan keys to a second
|
|
555
|
+
// pass so we can relocate them into a sibling object (already fully
|
|
556
|
+
// normalized by then) or drop them, instead of failing the whole call.
|
|
557
|
+
orphanKeys.push(key);
|
|
558
|
+
}
|
|
559
|
+
else {
|
|
560
|
+
out[key] = nestedValue;
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
// Second pass: relocate orphan keys into the sibling object property that
|
|
564
|
+
// declares them (e.g. a field mistakenly nested under the wrong object).
|
|
565
|
+
// Unrelocatable orphans are dropped, keeping required/type checks intact.
|
|
566
|
+
for (const key of orphanKeys) {
|
|
567
|
+
const target = findSiblingObjectPropertyForKey(properties, key);
|
|
568
|
+
if (!target)
|
|
569
|
+
continue;
|
|
570
|
+
const existing = isRecord(out[target]) ? out[target] : {};
|
|
571
|
+
if (existing[key] === undefined) {
|
|
572
|
+
const targetProps = schemaProperties(properties[target]);
|
|
573
|
+
existing[key] = normalizeValueForSchema(value[key], targetProps[key]);
|
|
574
|
+
}
|
|
575
|
+
out[target] = existing;
|
|
576
|
+
}
|
|
577
|
+
return out;
|
|
578
|
+
}
|
|
579
|
+
return value;
|
|
580
|
+
}
|
|
581
|
+
function ajvPath(error) {
|
|
582
|
+
const path = error.instancePath
|
|
583
|
+
? error.instancePath.replace(/^\//, '').replace(/\//g, '.')
|
|
584
|
+
: '';
|
|
585
|
+
if (error.keyword === 'required' && isRecord(error.params) && typeof error.params.missingProperty === 'string') {
|
|
586
|
+
return path ? `${path}.${error.params.missingProperty}` : error.params.missingProperty;
|
|
587
|
+
}
|
|
588
|
+
if (error.keyword === 'additionalProperties' && isRecord(error.params) && typeof error.params.additionalProperty === 'string') {
|
|
589
|
+
return path ? `${path}.${error.params.additionalProperty}` : error.params.additionalProperty;
|
|
590
|
+
}
|
|
591
|
+
return path || '(root)';
|
|
592
|
+
}
|
|
593
|
+
function toolCatalog() {
|
|
594
|
+
return getPromptCatalog().tools;
|
|
595
|
+
}
|
|
596
|
+
function formatJsonSchemaErrors(errors) {
|
|
597
|
+
const fallback = toolCatalog().registry.schemaValidationFailed;
|
|
598
|
+
return (errors ?? [])
|
|
599
|
+
.slice(0, 8)
|
|
600
|
+
.map((error) => `${ajvPath(error)}: ${error.message || fallback}`)
|
|
601
|
+
.join('; ');
|
|
602
|
+
}
|
|
603
|
+
function jsonSchemaHints(errors) {
|
|
604
|
+
const fallback = toolCatalog().registry.schemaValidationFailed;
|
|
605
|
+
return (errors ?? [])
|
|
606
|
+
.slice(0, 8)
|
|
607
|
+
.map((error) => ({ path: ajvPath(error), message: error.message || fallback }));
|
|
608
|
+
}
|
|
609
|
+
function validateJsonSchemaArgs(schema, args) {
|
|
610
|
+
try {
|
|
611
|
+
const validate = jsonSchemaValidator.compile(schema);
|
|
612
|
+
if (validate(args))
|
|
613
|
+
return { ok: true, value: args };
|
|
614
|
+
const formatted = formatJsonSchemaErrors(validate.errors);
|
|
615
|
+
return {
|
|
616
|
+
ok: false,
|
|
617
|
+
formatted: formatted || toolCatalog().registry.schemaValidationFailed,
|
|
618
|
+
hints: jsonSchemaHints(validate.errors),
|
|
619
|
+
};
|
|
620
|
+
}
|
|
621
|
+
catch {
|
|
622
|
+
return { ok: true, value: args };
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
function validateToolProtocolArgs(toolName, args) {
|
|
626
|
+
if (toolName !== 'request_permission_update' || !isRecord(args) || args.source !== 'worker') {
|
|
627
|
+
return { ok: true };
|
|
628
|
+
}
|
|
629
|
+
const missing = ['request_id', 'worker_name'].filter((key) => {
|
|
630
|
+
const value = args[key];
|
|
631
|
+
return typeof value !== 'string' || value.trim().length === 0;
|
|
632
|
+
});
|
|
633
|
+
if (missing.length === 0)
|
|
634
|
+
return { ok: true };
|
|
635
|
+
return {
|
|
636
|
+
ok: false,
|
|
637
|
+
formatted: missing.map((key) => `${key}: must be a non-empty string when source is "worker"`).join('; '),
|
|
638
|
+
hints: missing.map((key) => ({ path: key, message: 'must be a non-empty string when source is "worker"' })),
|
|
639
|
+
};
|
|
640
|
+
}
|
|
641
|
+
function truncateActivityText(value, max = 220) {
|
|
642
|
+
const normalized = value.replace(/\s+/g, ' ').trim();
|
|
643
|
+
return normalized.length > max ? `${normalized.slice(0, max - 1)}…` : normalized;
|
|
644
|
+
}
|
|
645
|
+
function firstStringField(args, fields) {
|
|
646
|
+
for (const field of fields) {
|
|
647
|
+
const value = args[field];
|
|
648
|
+
if (typeof value === 'string' && value.trim())
|
|
649
|
+
return value.trim();
|
|
650
|
+
}
|
|
651
|
+
return undefined;
|
|
652
|
+
}
|
|
653
|
+
function uniqueStrings(values, limit = 12) {
|
|
654
|
+
const out = [];
|
|
655
|
+
const seen = new Set();
|
|
656
|
+
for (const value of values) {
|
|
657
|
+
if (!value)
|
|
658
|
+
continue;
|
|
659
|
+
const trimmed = value.trim();
|
|
660
|
+
if (!trimmed || seen.has(trimmed))
|
|
661
|
+
continue;
|
|
662
|
+
seen.add(trimmed);
|
|
663
|
+
out.push(trimmed);
|
|
664
|
+
if (out.length >= limit)
|
|
665
|
+
break;
|
|
666
|
+
}
|
|
667
|
+
return out;
|
|
668
|
+
}
|
|
669
|
+
function extractActivityFiles(args) {
|
|
670
|
+
if (!isRecord(args))
|
|
671
|
+
return undefined;
|
|
672
|
+
const direct = uniqueStrings([
|
|
673
|
+
firstStringField(args, ['path', 'output_path', 'file', 'screenshot_path', 'cwd', 'directory']),
|
|
674
|
+
...((stringArray(args.files) ?? [])),
|
|
675
|
+
]);
|
|
676
|
+
return direct.length > 0 ? direct : undefined;
|
|
677
|
+
}
|
|
678
|
+
function extractActivityAction(toolName, args) {
|
|
679
|
+
if (!isRecord(args))
|
|
680
|
+
return toolName;
|
|
681
|
+
const action = args.action;
|
|
682
|
+
return typeof action === 'string' && action.trim() ? action.trim() : toolName;
|
|
683
|
+
}
|
|
684
|
+
function summarizeAgentActivity(toolName, args) {
|
|
685
|
+
const record = isRecord(args) ? args : {};
|
|
686
|
+
const action = extractActivityAction(toolName, args);
|
|
687
|
+
const files = extractActivityFiles(args);
|
|
688
|
+
const target = files?.[0]
|
|
689
|
+
?? firstStringField(record, ['url', 'branch', 'remote', 'tool', 'name', 'terminal_id', 'uri']);
|
|
690
|
+
if (toolName === 'shell') {
|
|
691
|
+
const command = firstStringField(record, ['command']);
|
|
692
|
+
return { summary: truncateActivityText(`shell: ${command ?? '(command)'}`), target, command, files };
|
|
693
|
+
}
|
|
694
|
+
if (toolName === 'python_exec') {
|
|
695
|
+
const command = firstStringField(record, ['code']);
|
|
696
|
+
return { summary: truncateActivityText('python_exec: code snippet'), target, command: command ? truncateActivityText(command, 160) : undefined, files };
|
|
697
|
+
}
|
|
698
|
+
if (toolName === 'file_create') {
|
|
699
|
+
return { summary: `file_create: ${target ?? '(path)'}`, target, files };
|
|
700
|
+
}
|
|
701
|
+
if (toolName === 'structured_patch') {
|
|
702
|
+
const hunkCount = Array.isArray(record.hunks) ? record.hunks.length : undefined;
|
|
703
|
+
return { summary: `structured_patch: ${target ?? '(path)'}${hunkCount ? ` (${hunkCount} hunks)` : ''}`, target, files };
|
|
704
|
+
}
|
|
705
|
+
if (toolName === 'git') {
|
|
706
|
+
const message = firstStringField(record, ['message', 'branch', 'remote', 'mr_title']);
|
|
707
|
+
return { summary: truncateActivityText(`git ${action ?? ''}${message ? `: ${message}` : ''}`), target, files };
|
|
708
|
+
}
|
|
709
|
+
if (toolName === 'mcp') {
|
|
710
|
+
const server = firstStringField(record, ['server']);
|
|
711
|
+
const mcpTool = firstStringField(record, ['tool']);
|
|
712
|
+
return { summary: truncateActivityText(`mcp ${action ?? ''}${server ? ` ${server}` : ''}${mcpTool ? `/${mcpTool}` : ''}`), target, files };
|
|
713
|
+
}
|
|
714
|
+
return { summary: truncateActivityText(`${toolName}${action && action !== toolName ? `: ${action}` : ''}${target ? ` → ${target}` : ''}`), target, files };
|
|
715
|
+
}
|
|
716
|
+
function shouldEmitAgentActivity(toolName, metadata) {
|
|
717
|
+
if (metadata.readOnly)
|
|
718
|
+
return false;
|
|
719
|
+
if (metadata.hidden)
|
|
720
|
+
return false;
|
|
721
|
+
return metadata.tier === 'write' || metadata.tier === 'execute' || metadata.modifiesWorkspace === true;
|
|
722
|
+
}
|
|
723
|
+
function emitAgentActivityEvent(toolName, args, result, context, metadata, fallbackSessionId) {
|
|
724
|
+
if (!shouldEmitAgentActivity(toolName, metadata))
|
|
725
|
+
return;
|
|
726
|
+
if (!context?.emitter)
|
|
727
|
+
return;
|
|
728
|
+
const sessionId = typeof context.sessionId === 'string' && context.sessionId.trim()
|
|
729
|
+
? context.sessionId.trim()
|
|
730
|
+
: fallbackSessionId ?? '';
|
|
731
|
+
if (!sessionId)
|
|
732
|
+
return;
|
|
733
|
+
const agentId = typeof context.agentId === 'string' && context.agentId.trim() ? context.agentId.trim() : 'leader';
|
|
734
|
+
const agentName = typeof context.agentName === 'string' && context.agentName.trim()
|
|
735
|
+
? context.agentName.trim()
|
|
736
|
+
: agentId;
|
|
737
|
+
const activity = summarizeAgentActivity(toolName, args);
|
|
738
|
+
context.emitter.emit('agent:activity', {
|
|
739
|
+
sessionId,
|
|
740
|
+
agentId,
|
|
741
|
+
agentName,
|
|
742
|
+
taskId: typeof context.taskId === 'string' ? context.taskId : undefined,
|
|
743
|
+
toolName,
|
|
744
|
+
toolCategory: typeof metadata.category === 'string' ? metadata.category : undefined,
|
|
745
|
+
toolTier: metadata.tier,
|
|
746
|
+
action: extractActivityAction(toolName, args),
|
|
747
|
+
success: result.success,
|
|
748
|
+
timestamp: Date.now(),
|
|
749
|
+
summary: activity.summary,
|
|
750
|
+
target: activity.target,
|
|
751
|
+
files: activity.files,
|
|
752
|
+
command: activity.command,
|
|
753
|
+
error: result.success ? undefined : truncateActivityText(result.error ?? 'tool failed', 300),
|
|
754
|
+
});
|
|
755
|
+
}
|
|
756
|
+
export function normalizeToolArgs(args) {
|
|
757
|
+
return args;
|
|
758
|
+
}
|
|
759
|
+
export class ToolRegistry {
|
|
760
|
+
tools = new Map();
|
|
761
|
+
deferredTools = new Map();
|
|
762
|
+
db = null;
|
|
763
|
+
sessionId = null;
|
|
764
|
+
/** Session 级已读文件集合(绝对路径) */
|
|
765
|
+
readFiles = new Set();
|
|
766
|
+
/** Tool 变更监听器 — register/unregister 时回调,便于上层广播事件或失效缓存 */
|
|
767
|
+
changeListener = null;
|
|
768
|
+
/** Attach a DatabaseManager for persistence support */
|
|
769
|
+
setDatabase(db, sessionId) {
|
|
770
|
+
this.db = db;
|
|
771
|
+
this.sessionId = sessionId;
|
|
772
|
+
}
|
|
773
|
+
/** 注册 tool 变更监听器;同一个 listener 实例覆盖之前的 */
|
|
774
|
+
setChangeListener(fn) {
|
|
775
|
+
this.changeListener = fn;
|
|
776
|
+
}
|
|
777
|
+
/** 工具是否已注册(含 deferred) */
|
|
778
|
+
has(name) {
|
|
779
|
+
return this.tools.has(name) || this.deferredTools.has(name);
|
|
780
|
+
}
|
|
781
|
+
/** 记录文件已被读取 */
|
|
782
|
+
recordFileRead(filePath, workspace) {
|
|
783
|
+
this.readFiles.add(this.resolveAbsPath(filePath, workspace));
|
|
784
|
+
}
|
|
785
|
+
/** 检查文件是否已被读取过 */
|
|
786
|
+
hasFileBeenRead(filePath, workspace) {
|
|
787
|
+
return this.readFiles.has(this.resolveAbsPath(filePath, workspace));
|
|
788
|
+
}
|
|
789
|
+
resolveAbsPath(filePath, workspace) {
|
|
790
|
+
if (isAbsolute(filePath))
|
|
791
|
+
return filePath;
|
|
792
|
+
return resolve(workspace || process.cwd(), filePath);
|
|
793
|
+
}
|
|
794
|
+
register(tool) {
|
|
795
|
+
const existed = this.tools.has(tool.name) || this.deferredTools.has(tool.name);
|
|
796
|
+
this.tools.set(tool.name, tool);
|
|
797
|
+
this.deferredTools.delete(tool.name);
|
|
798
|
+
this.saveTool(tool);
|
|
799
|
+
try {
|
|
800
|
+
this.changeListener?.({ action: existed ? 'replace' : 'register', name: tool.name });
|
|
801
|
+
}
|
|
802
|
+
catch {
|
|
803
|
+
// listener 异常独立于注册结果
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
/** Register a tool lazily — instantiated only on first access */
|
|
807
|
+
registerDeferred(name, factory) {
|
|
808
|
+
const existed = this.tools.has(name) || this.deferredTools.has(name);
|
|
809
|
+
this.deferredTools.set(name, factory);
|
|
810
|
+
try {
|
|
811
|
+
this.changeListener?.({ action: existed ? 'replace' : 'register', name });
|
|
812
|
+
}
|
|
813
|
+
catch {
|
|
814
|
+
// ignore
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
/** 注销工具(含 deferred)。返回是否实际移除 */
|
|
818
|
+
unregister(name) {
|
|
819
|
+
const had = this.tools.delete(name);
|
|
820
|
+
const hadDeferred = this.deferredTools.delete(name);
|
|
821
|
+
const removed = had || hadDeferred;
|
|
822
|
+
if (removed) {
|
|
823
|
+
try {
|
|
824
|
+
this.changeListener?.({ action: 'unregister', name });
|
|
825
|
+
}
|
|
826
|
+
catch {
|
|
827
|
+
// ignore
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
return removed;
|
|
831
|
+
}
|
|
832
|
+
get(name) {
|
|
833
|
+
let tool = this.tools.get(name);
|
|
834
|
+
if (!tool && this.deferredTools.has(name)) {
|
|
835
|
+
const factory = this.deferredTools.get(name);
|
|
836
|
+
tool = factory();
|
|
837
|
+
this.tools.set(name, tool);
|
|
838
|
+
this.deferredTools.delete(name);
|
|
839
|
+
this.saveTool(tool);
|
|
840
|
+
}
|
|
841
|
+
return tool;
|
|
842
|
+
}
|
|
843
|
+
getLoaded() {
|
|
844
|
+
return Array.from(this.tools.values());
|
|
845
|
+
}
|
|
846
|
+
getDeferredNames() {
|
|
847
|
+
return Array.from(this.deferredTools.keys());
|
|
848
|
+
}
|
|
849
|
+
getAll() {
|
|
850
|
+
// Materialize all deferred tools
|
|
851
|
+
for (const [name, factory] of this.deferredTools) {
|
|
852
|
+
if (!this.tools.has(name)) {
|
|
853
|
+
const tool = factory();
|
|
854
|
+
this.tools.set(name, tool);
|
|
855
|
+
this.saveTool(tool);
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
this.deferredTools.clear();
|
|
859
|
+
return Array.from(this.tools.values());
|
|
860
|
+
}
|
|
861
|
+
/**
|
|
862
|
+
* 收集用于生成 provider 定义所需的最小工具集。
|
|
863
|
+
*
|
|
864
|
+
* 关键:defer 真正按需加载 —— 不再无条件调用 getAll() 全量物化。
|
|
865
|
+
* - 指定 toolNames 时:只物化被显式请求的工具(按名 get,触发 lazy 实例化),
|
|
866
|
+
* 其余 deferred 工具保持惰性。
|
|
867
|
+
* - 未指定 toolNames("all" 语义)时:已加载工具全收;deferred 工具按 metadata
|
|
868
|
+
* 过滤,跳过 hidden(hidden 工具永不出现在 LLM 定义里,无需物化)。其余
|
|
869
|
+
* deferred 工具因 schema 仅存在于实例上,仍需物化,但仅限非 hidden 子集。
|
|
870
|
+
*/
|
|
871
|
+
resolveDefinitionsSource(toolNames) {
|
|
872
|
+
const requestedToolNames = toolNames ? new Set(toolNames) : null;
|
|
873
|
+
if (requestedToolNames) {
|
|
874
|
+
const resolved = [];
|
|
875
|
+
for (const name of requestedToolNames) {
|
|
876
|
+
const tool = this.get(name);
|
|
877
|
+
if (tool)
|
|
878
|
+
resolved.push(tool);
|
|
879
|
+
}
|
|
880
|
+
return resolved;
|
|
881
|
+
}
|
|
882
|
+
const collected = new Map();
|
|
883
|
+
for (const [name, tool] of this.tools) {
|
|
884
|
+
collected.set(name, tool);
|
|
885
|
+
}
|
|
886
|
+
for (const name of this.deferredTools.keys()) {
|
|
887
|
+
if (collected.has(name))
|
|
888
|
+
continue;
|
|
889
|
+
// 隐藏工具永不会出现在 LLM 定义里 —— 保持 deferred,不物化。
|
|
890
|
+
if (getToolMetadata(name).hidden)
|
|
891
|
+
continue;
|
|
892
|
+
const tool = this.get(name);
|
|
893
|
+
if (tool)
|
|
894
|
+
collected.set(name, tool);
|
|
895
|
+
}
|
|
896
|
+
return Array.from(collected.values());
|
|
897
|
+
}
|
|
898
|
+
getDefinitions(toolNames, options = {}) {
|
|
899
|
+
const requestedToolNames = toolNames ? new Set(toolNames) : null;
|
|
900
|
+
const sourceTools = this.resolveDefinitionsSource(toolNames);
|
|
901
|
+
const filtered = requestedToolNames
|
|
902
|
+
? sourceTools.filter(t => requestedToolNames.has(t.name))
|
|
903
|
+
: sourceTools.filter(t => !getToolMetadata(t.name).hidden);
|
|
904
|
+
return filtered
|
|
905
|
+
.filter((tool) => this.isVisibleForDefinitionScope(tool, options.scope))
|
|
906
|
+
.filter((tool) => this.isVisibleForModePolicy(tool.name, getToolMetadata(tool.name), options.modePolicy))
|
|
907
|
+
.map(tool => ({
|
|
908
|
+
type: 'function',
|
|
909
|
+
function: {
|
|
910
|
+
name: tool.name,
|
|
911
|
+
description: tool.description,
|
|
912
|
+
parameters: this.getSchema(tool)
|
|
913
|
+
}
|
|
914
|
+
}));
|
|
915
|
+
}
|
|
916
|
+
isVisibleForDefinitionScope(tool, scope) {
|
|
917
|
+
if (!scope || scope === 'all')
|
|
918
|
+
return true;
|
|
919
|
+
const toolScope = tool.scope ?? 'worker';
|
|
920
|
+
if (scope === 'both')
|
|
921
|
+
return toolScope === 'both';
|
|
922
|
+
return toolScope === scope || toolScope === 'both';
|
|
923
|
+
}
|
|
924
|
+
isLeaderToolContext(context) {
|
|
925
|
+
return context?.agentId === 'leader' || context?.agentName === 'leader' || Boolean(context?.leaderToolsExecutor);
|
|
926
|
+
}
|
|
927
|
+
isExecutableInContext(tool, context) {
|
|
928
|
+
return tool.scope !== 'leader' || this.isLeaderToolContext(context);
|
|
929
|
+
}
|
|
930
|
+
modeDecisionForOptions(name, metadata, options) {
|
|
931
|
+
if (!options)
|
|
932
|
+
return null;
|
|
933
|
+
const modes = options.modes;
|
|
934
|
+
return resolveModeToolDecision({
|
|
935
|
+
actor: options.actor ?? 'worker',
|
|
936
|
+
controlMode: modes.controlMode,
|
|
937
|
+
routeMode: modes.route.mode,
|
|
938
|
+
collaborationMode: modes.collaboration.mode,
|
|
939
|
+
activeModes: modes.modePlugins,
|
|
940
|
+
blackboardMode: modes.blackboard.mode,
|
|
941
|
+
permissionMode: modes.permission.mode,
|
|
942
|
+
activeTeamName: modes.collaboration.activeTeamName ?? null,
|
|
943
|
+
callerInTeamRoster: options.callerInTeamRoster,
|
|
944
|
+
callerIsTeamLeader: options.callerIsTeamLeader,
|
|
945
|
+
allowSoloEphemeralDispatch: options.allowSoloEphemeralDispatch,
|
|
946
|
+
toolName: name,
|
|
947
|
+
toolMetadata: metadata,
|
|
948
|
+
});
|
|
949
|
+
}
|
|
950
|
+
isVisibleForModePolicy(name, metadata, options) {
|
|
951
|
+
const decision = this.modeDecisionForOptions(name, metadata, options);
|
|
952
|
+
return !decision || decision.visibility === 'visible';
|
|
953
|
+
}
|
|
954
|
+
getModeRuntimeProjectionFromContext(context) {
|
|
955
|
+
const explicit = context?.modes ?? context?.modeRuntimeProjection;
|
|
956
|
+
if (explicit && typeof explicit === 'object' && !Array.isArray(explicit)) {
|
|
957
|
+
return explicit;
|
|
958
|
+
}
|
|
959
|
+
if (!context?.db || !context.sessionId)
|
|
960
|
+
return null;
|
|
961
|
+
try {
|
|
962
|
+
return resolveModeRuntimeProjection({
|
|
963
|
+
sessionId: context.sessionId,
|
|
964
|
+
db: context.db,
|
|
965
|
+
permissionContext: getToolPermissionContextFromToolContext(context),
|
|
966
|
+
blackboardAvailable: Boolean(context.blackboardGraph),
|
|
967
|
+
});
|
|
968
|
+
}
|
|
969
|
+
catch {
|
|
970
|
+
return null;
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
modeDecisionForExecution(name, metadata, context) {
|
|
974
|
+
const modes = this.getModeRuntimeProjectionFromContext(context);
|
|
975
|
+
if (!modes)
|
|
976
|
+
return null;
|
|
977
|
+
const isLeader = this.isLeaderToolContext(context);
|
|
978
|
+
const agentName = typeof context?.agentName === 'string' ? context.agentName : undefined;
|
|
979
|
+
let callerInTeamRoster = isLeader;
|
|
980
|
+
let callerIsTeamLeader = isLeader;
|
|
981
|
+
if (!isLeader && agentName && context?.sessionId && modes.collaboration.teamEnabled) {
|
|
982
|
+
try {
|
|
983
|
+
const member = getTeamMemberRegistry().getByName(agentName, context.sessionId);
|
|
984
|
+
callerInTeamRoster = Boolean(member);
|
|
985
|
+
callerIsTeamLeader = member?.role === 'leader';
|
|
986
|
+
}
|
|
987
|
+
catch {
|
|
988
|
+
callerInTeamRoster = false;
|
|
989
|
+
callerIsTeamLeader = false;
|
|
990
|
+
}
|
|
991
|
+
}
|
|
992
|
+
return resolveModeToolDecision({
|
|
993
|
+
actor: isLeader ? 'leader' : callerInTeamRoster ? 'team_member' : 'worker',
|
|
994
|
+
controlMode: modes.controlMode,
|
|
995
|
+
routeMode: modes.route.mode,
|
|
996
|
+
collaborationMode: modes.collaboration.mode,
|
|
997
|
+
activeModes: modes.modePlugins,
|
|
998
|
+
blackboardMode: modes.blackboard.mode,
|
|
999
|
+
permissionMode: modes.permission.mode,
|
|
1000
|
+
activeTeamName: modes.collaboration.activeTeamName ?? null,
|
|
1001
|
+
callerInTeamRoster,
|
|
1002
|
+
callerIsTeamLeader,
|
|
1003
|
+
toolName: name,
|
|
1004
|
+
toolMetadata: metadata,
|
|
1005
|
+
});
|
|
1006
|
+
}
|
|
1007
|
+
getSchema(tool) {
|
|
1008
|
+
const schema = (() => {
|
|
1009
|
+
if (typeof tool.getSchema === 'function') {
|
|
1010
|
+
return tool.getSchema();
|
|
1011
|
+
}
|
|
1012
|
+
if (tool.schema) {
|
|
1013
|
+
return tool.schema;
|
|
1014
|
+
}
|
|
1015
|
+
if (tool.input_schema) {
|
|
1016
|
+
return tool.input_schema;
|
|
1017
|
+
}
|
|
1018
|
+
return { type: 'object', properties: {} };
|
|
1019
|
+
})();
|
|
1020
|
+
return normalizeJsonSchemaForOpenAI(schema);
|
|
1021
|
+
}
|
|
1022
|
+
getToolSchema(name) {
|
|
1023
|
+
const tool = this.get(name);
|
|
1024
|
+
return tool ? this.getSchema(tool) : null;
|
|
1025
|
+
}
|
|
1026
|
+
getToolInspection(name, options) {
|
|
1027
|
+
const loadedTool = this.tools.get(name);
|
|
1028
|
+
const deferred = this.deferredTools.has(name);
|
|
1029
|
+
const tool = loadedTool ?? (options?.includeSchema || !deferred ? this.get(name) : undefined);
|
|
1030
|
+
if (!tool && !deferred)
|
|
1031
|
+
return null;
|
|
1032
|
+
if (tool && !this.isVisibleForDefinitionScope(tool, options?.scope))
|
|
1033
|
+
return null;
|
|
1034
|
+
if (!this.isVisibleForModePolicy(name, getToolMetadata(name), options?.modePolicy))
|
|
1035
|
+
return null;
|
|
1036
|
+
const schema = tool ? this.getSchema(tool) : undefined;
|
|
1037
|
+
return {
|
|
1038
|
+
name,
|
|
1039
|
+
description: tool?.description ?? toolCatalog().registry.deferredToolDescription(name),
|
|
1040
|
+
loaded: Boolean(loadedTool || tool),
|
|
1041
|
+
deferred,
|
|
1042
|
+
metadata: getToolMetadata(name),
|
|
1043
|
+
...(options?.includeSchema && schema ? { schema, example_args: exampleArgsFromSchema(schema) } : {}),
|
|
1044
|
+
};
|
|
1045
|
+
}
|
|
1046
|
+
listToolInspections(options) {
|
|
1047
|
+
const names = Array.from(new Set([...this.tools.keys(), ...this.deferredTools.keys()])).sort((a, b) => a.localeCompare(b));
|
|
1048
|
+
return names
|
|
1049
|
+
.map((name) => this.getToolInspection(name, options))
|
|
1050
|
+
.filter((item) => Boolean(item))
|
|
1051
|
+
.filter((item) => options?.includeHidden || !item.metadata.hidden);
|
|
1052
|
+
}
|
|
1053
|
+
validateArgs(tool, args, schema) {
|
|
1054
|
+
const normalizedArgs = normalizeArgsForSchema(args, schema);
|
|
1055
|
+
const registryText = toolCatalog().registry;
|
|
1056
|
+
if (tool instanceof Tool) {
|
|
1057
|
+
const parsed = tool.parameters.safeParse(normalizedArgs);
|
|
1058
|
+
if (!parsed.success) {
|
|
1059
|
+
const formatted = formatZodError(parsed.error);
|
|
1060
|
+
return {
|
|
1061
|
+
ok: false,
|
|
1062
|
+
result: createToolError({
|
|
1063
|
+
code: 'TOOL_ARGUMENT_VALIDATION_FAILED',
|
|
1064
|
+
message: registryText.argumentValidationMessage(formatted),
|
|
1065
|
+
retryable: true,
|
|
1066
|
+
cause: formatted,
|
|
1067
|
+
fix: registryText.argumentValidationFix,
|
|
1068
|
+
hints: zodErrorHints(parsed.error),
|
|
1069
|
+
example_args: exampleArgsFromSchema(schema, normalizedArgs),
|
|
1070
|
+
retry_args: retryArgsFromSchema(schema, normalizedArgs),
|
|
1071
|
+
}),
|
|
1072
|
+
};
|
|
1073
|
+
}
|
|
1074
|
+
const protocolValidation = validateToolProtocolArgs(tool.name, parsed.data);
|
|
1075
|
+
if (!protocolValidation.ok) {
|
|
1076
|
+
return {
|
|
1077
|
+
ok: false,
|
|
1078
|
+
result: createToolError({
|
|
1079
|
+
code: 'TOOL_ARGUMENT_VALIDATION_FAILED',
|
|
1080
|
+
message: registryText.argumentValidationMessage(protocolValidation.formatted),
|
|
1081
|
+
retryable: true,
|
|
1082
|
+
cause: protocolValidation.formatted,
|
|
1083
|
+
fix: registryText.argumentValidationFix,
|
|
1084
|
+
hints: protocolValidation.hints,
|
|
1085
|
+
example_args: exampleArgsFromSchema(schema, normalizedArgs),
|
|
1086
|
+
retry_args: retryArgsFromSchema(schema, normalizedArgs),
|
|
1087
|
+
}),
|
|
1088
|
+
};
|
|
1089
|
+
}
|
|
1090
|
+
return { ok: true, value: parsed.data };
|
|
1091
|
+
}
|
|
1092
|
+
const jsonValidation = validateJsonSchemaArgs(schema, normalizedArgs);
|
|
1093
|
+
if (!jsonValidation.ok) {
|
|
1094
|
+
const formatted = jsonValidation.formatted;
|
|
1095
|
+
return {
|
|
1096
|
+
ok: false,
|
|
1097
|
+
result: createToolError({
|
|
1098
|
+
code: 'TOOL_ARGUMENT_VALIDATION_FAILED',
|
|
1099
|
+
message: registryText.argumentValidationMessage(formatted),
|
|
1100
|
+
retryable: true,
|
|
1101
|
+
cause: formatted,
|
|
1102
|
+
fix: registryText.argumentValidationFix,
|
|
1103
|
+
hints: jsonValidation.hints,
|
|
1104
|
+
example_args: exampleArgsFromSchema(schema, normalizedArgs),
|
|
1105
|
+
retry_args: retryArgsFromSchema(schema, normalizedArgs),
|
|
1106
|
+
}),
|
|
1107
|
+
};
|
|
1108
|
+
}
|
|
1109
|
+
const protocolValidation = validateToolProtocolArgs(tool.name, jsonValidation.value);
|
|
1110
|
+
if (!protocolValidation.ok) {
|
|
1111
|
+
return {
|
|
1112
|
+
ok: false,
|
|
1113
|
+
result: createToolError({
|
|
1114
|
+
code: 'TOOL_ARGUMENT_VALIDATION_FAILED',
|
|
1115
|
+
message: registryText.argumentValidationMessage(protocolValidation.formatted),
|
|
1116
|
+
retryable: true,
|
|
1117
|
+
cause: protocolValidation.formatted,
|
|
1118
|
+
fix: registryText.argumentValidationFix,
|
|
1119
|
+
hints: protocolValidation.hints,
|
|
1120
|
+
example_args: exampleArgsFromSchema(schema, normalizedArgs),
|
|
1121
|
+
retry_args: retryArgsFromSchema(schema, normalizedArgs),
|
|
1122
|
+
}),
|
|
1123
|
+
};
|
|
1124
|
+
}
|
|
1125
|
+
return { ok: true, value: jsonValidation.value };
|
|
1126
|
+
}
|
|
1127
|
+
suggestToolNames(name) {
|
|
1128
|
+
const names = Array.from(new Set([...this.tools.keys(), ...this.deferredTools.keys()]));
|
|
1129
|
+
return names
|
|
1130
|
+
.map((candidate) => ({ candidate, score: candidate.includes(name) || name.includes(candidate) ? 0 : levenshtein(name, candidate) }))
|
|
1131
|
+
.sort((a, b) => a.score - b.score || a.candidate.localeCompare(b.candidate))
|
|
1132
|
+
.slice(0, 5)
|
|
1133
|
+
.map((x) => x.candidate);
|
|
1134
|
+
}
|
|
1135
|
+
/**
|
|
1136
|
+
* Shared resolution pipeline: lookup tool, parse args, validate, check read-first.
|
|
1137
|
+
* Returns a discriminated union so callers can branch on the error stage.
|
|
1138
|
+
*/
|
|
1139
|
+
resolveToolAndValidateArgs(name, args, context) {
|
|
1140
|
+
const tool = this.get(name);
|
|
1141
|
+
const metadata = getToolMetadata(name);
|
|
1142
|
+
if (!tool) {
|
|
1143
|
+
return { stage: 'not_found', candidates: this.suggestToolNames(name), metadata };
|
|
1144
|
+
}
|
|
1145
|
+
const schema = this.getSchema(tool);
|
|
1146
|
+
if (!this.isExecutableInContext(tool, context)) {
|
|
1147
|
+
return { stage: 'scope_forbidden', tool, schema, metadata };
|
|
1148
|
+
}
|
|
1149
|
+
const modeDecision = this.modeDecisionForExecution(name, metadata, context);
|
|
1150
|
+
if (modeDecision?.visibility === 'hidden') {
|
|
1151
|
+
return { stage: 'mode_forbidden', tool, schema, metadata, decision: modeDecision };
|
|
1152
|
+
}
|
|
1153
|
+
const parsed = parseArgsText(args ?? {});
|
|
1154
|
+
if (!parsed.ok) {
|
|
1155
|
+
return { stage: 'parse_failed', tool, schema, metadata, parseError: { message: parsed.message, cause: parsed.cause, rawPreview: parsed.rawPreview } };
|
|
1156
|
+
}
|
|
1157
|
+
const validation = this.validateArgs(tool, parsed.value, schema);
|
|
1158
|
+
if (!validation.ok) {
|
|
1159
|
+
return { stage: 'validation_failed', tool, schema, metadata, validationResult: validation.result };
|
|
1160
|
+
}
|
|
1161
|
+
if (requiresReadFirst(name)) {
|
|
1162
|
+
const filePath = validation.value?.path;
|
|
1163
|
+
if (filePath) {
|
|
1164
|
+
const absPath = this.resolveAbsPath(filePath, context?.workspace);
|
|
1165
|
+
const shouldCheck = name === 'file_create' ? existsSync(absPath) : true;
|
|
1166
|
+
if (shouldCheck && !this.readFiles.has(absPath)) {
|
|
1167
|
+
return { stage: 'read_first', tool, schema, metadata, parsedArgs: validation.value, filePath };
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1170
|
+
}
|
|
1171
|
+
return { stage: 'ok', tool, schema, metadata, parsedArgs: validation.value };
|
|
1172
|
+
}
|
|
1173
|
+
preflight(name, args, context) {
|
|
1174
|
+
const resolution = this.resolveToolAndValidateArgs(name, args, context);
|
|
1175
|
+
const registryText = toolCatalog().registry;
|
|
1176
|
+
switch (resolution.stage) {
|
|
1177
|
+
case 'not_found':
|
|
1178
|
+
return {
|
|
1179
|
+
ok: false,
|
|
1180
|
+
tool: name,
|
|
1181
|
+
found: false,
|
|
1182
|
+
metadata: resolution.metadata,
|
|
1183
|
+
repair: {
|
|
1184
|
+
code: 'TOOL_NOT_FOUND',
|
|
1185
|
+
message: registryText.toolNotFoundCause(name),
|
|
1186
|
+
fix: registryText.toolNotFoundFix(resolution.candidates),
|
|
1187
|
+
candidates: resolution.candidates,
|
|
1188
|
+
},
|
|
1189
|
+
};
|
|
1190
|
+
case 'parse_failed':
|
|
1191
|
+
return {
|
|
1192
|
+
ok: false,
|
|
1193
|
+
tool: name,
|
|
1194
|
+
found: true,
|
|
1195
|
+
schema: resolution.schema,
|
|
1196
|
+
metadata: resolution.metadata,
|
|
1197
|
+
repair: {
|
|
1198
|
+
code: 'TOOL_ARGUMENT_PARSE_FAILED',
|
|
1199
|
+
message: resolution.parseError.message,
|
|
1200
|
+
fix: registryText.argumentParseFix,
|
|
1201
|
+
hints: { raw_preview: resolution.parseError.rawPreview, cause: resolution.parseError.cause },
|
|
1202
|
+
example_args: exampleArgsFromSchema(resolution.schema),
|
|
1203
|
+
},
|
|
1204
|
+
};
|
|
1205
|
+
case 'scope_forbidden':
|
|
1206
|
+
return {
|
|
1207
|
+
ok: false,
|
|
1208
|
+
tool: name,
|
|
1209
|
+
found: true,
|
|
1210
|
+
schema: resolution.schema,
|
|
1211
|
+
metadata: resolution.metadata,
|
|
1212
|
+
repair: {
|
|
1213
|
+
code: 'TOOL_SCOPE_FORBIDDEN',
|
|
1214
|
+
message: registryText.scopeForbiddenCause(name),
|
|
1215
|
+
fix: registryText.scopeForbiddenFix,
|
|
1216
|
+
},
|
|
1217
|
+
};
|
|
1218
|
+
case 'mode_forbidden':
|
|
1219
|
+
return {
|
|
1220
|
+
ok: false,
|
|
1221
|
+
tool: name,
|
|
1222
|
+
found: true,
|
|
1223
|
+
schema: resolution.schema,
|
|
1224
|
+
metadata: resolution.metadata,
|
|
1225
|
+
repair: {
|
|
1226
|
+
code: resolution.decision.reason,
|
|
1227
|
+
message: `Tool "${name}" is hidden in the current session mode (${resolution.decision.reason}).`,
|
|
1228
|
+
fix: 'Use an available tool for the current mode, or explicitly switch the relevant session mode before retrying.',
|
|
1229
|
+
},
|
|
1230
|
+
};
|
|
1231
|
+
case 'validation_failed': {
|
|
1232
|
+
const recovery = extractLlmRecovery(resolution.validationResult.data);
|
|
1233
|
+
return {
|
|
1234
|
+
ok: false,
|
|
1235
|
+
tool: name,
|
|
1236
|
+
found: true,
|
|
1237
|
+
schema: resolution.schema,
|
|
1238
|
+
metadata: resolution.metadata,
|
|
1239
|
+
repair: {
|
|
1240
|
+
code: recovery?.code || 'TOOL_ARGUMENT_VALIDATION_FAILED',
|
|
1241
|
+
message: recovery?.message || registryText.validationFailedMessage,
|
|
1242
|
+
fix: recovery?.fix || registryText.validationFailedFix,
|
|
1243
|
+
hints: recovery?.hints,
|
|
1244
|
+
candidates: recovery?.candidates,
|
|
1245
|
+
next_tool: recovery?.next_tool,
|
|
1246
|
+
example_args: recovery?.example_args || exampleArgsFromSchema(resolution.schema),
|
|
1247
|
+
retry_args: recovery?.retry_args || retryArgsFromSchema(resolution.schema),
|
|
1248
|
+
},
|
|
1249
|
+
};
|
|
1250
|
+
}
|
|
1251
|
+
case 'read_first':
|
|
1252
|
+
return {
|
|
1253
|
+
ok: false,
|
|
1254
|
+
tool: name,
|
|
1255
|
+
found: true,
|
|
1256
|
+
schema: resolution.schema,
|
|
1257
|
+
metadata: resolution.metadata,
|
|
1258
|
+
normalizedArgs: resolution.parsedArgs,
|
|
1259
|
+
repair: {
|
|
1260
|
+
code: 'FILE_MUST_BE_READ_FIRST',
|
|
1261
|
+
message: registryText.fileMustReadFirstMessage(resolution.filePath),
|
|
1262
|
+
fix: registryText.fileMustReadFirstFix,
|
|
1263
|
+
next_tool: { name: 'file_read', args: { path: resolution.filePath } },
|
|
1264
|
+
},
|
|
1265
|
+
};
|
|
1266
|
+
case 'ok':
|
|
1267
|
+
return {
|
|
1268
|
+
ok: true,
|
|
1269
|
+
tool: name,
|
|
1270
|
+
found: true,
|
|
1271
|
+
schema: resolution.schema,
|
|
1272
|
+
metadata: resolution.metadata,
|
|
1273
|
+
normalizedArgs: resolution.parsedArgs,
|
|
1274
|
+
};
|
|
1275
|
+
}
|
|
1276
|
+
}
|
|
1277
|
+
async execute(name, args, context) {
|
|
1278
|
+
const resolution = this.resolveToolAndValidateArgs(name, args, context);
|
|
1279
|
+
const registryText = toolCatalog().registry;
|
|
1280
|
+
if (resolution.stage === 'not_found') {
|
|
1281
|
+
return createToolError({
|
|
1282
|
+
code: 'TOOL_NOT_FOUND',
|
|
1283
|
+
message: registryText.toolNotFoundMessage(name),
|
|
1284
|
+
retryable: true,
|
|
1285
|
+
cause: registryText.toolNotFoundCause(name),
|
|
1286
|
+
fix: registryText.toolNotFoundFix(resolution.candidates),
|
|
1287
|
+
candidates: resolution.candidates,
|
|
1288
|
+
});
|
|
1289
|
+
}
|
|
1290
|
+
if (resolution.stage === 'parse_failed') {
|
|
1291
|
+
return createToolError({
|
|
1292
|
+
code: 'TOOL_ARGUMENT_PARSE_FAILED',
|
|
1293
|
+
message: resolution.parseError.message,
|
|
1294
|
+
retryable: true,
|
|
1295
|
+
cause: resolution.parseError.cause,
|
|
1296
|
+
fix: registryText.argumentParseFix,
|
|
1297
|
+
hints: { raw_preview: resolution.parseError.rawPreview },
|
|
1298
|
+
});
|
|
1299
|
+
}
|
|
1300
|
+
if (resolution.stage === 'scope_forbidden') {
|
|
1301
|
+
return createToolError({
|
|
1302
|
+
code: 'TOOL_SCOPE_FORBIDDEN',
|
|
1303
|
+
message: registryText.scopeForbiddenMessage(name),
|
|
1304
|
+
retryable: false,
|
|
1305
|
+
cause: registryText.scopeForbiddenCause(name),
|
|
1306
|
+
fix: registryText.scopeForbiddenFix,
|
|
1307
|
+
});
|
|
1308
|
+
}
|
|
1309
|
+
if (resolution.stage === 'mode_forbidden') {
|
|
1310
|
+
return createToolError({
|
|
1311
|
+
code: resolution.decision.reason,
|
|
1312
|
+
message: `MODE_TOOL_FORBIDDEN: ${resolution.decision.reason}`,
|
|
1313
|
+
retryable: true,
|
|
1314
|
+
cause: `Tool "${name}" is hidden in the current session mode.`,
|
|
1315
|
+
fix: 'Use an available tool for the current mode, or explicitly switch the relevant session mode before retrying.',
|
|
1316
|
+
});
|
|
1317
|
+
}
|
|
1318
|
+
if (resolution.stage === 'validation_failed') {
|
|
1319
|
+
return resolution.validationResult;
|
|
1320
|
+
}
|
|
1321
|
+
if (resolution.stage === 'read_first') {
|
|
1322
|
+
return createToolError({
|
|
1323
|
+
code: 'FILE_MUST_BE_READ_FIRST',
|
|
1324
|
+
message: registryText.fileMustReadFirstMessage(resolution.filePath),
|
|
1325
|
+
retryable: true,
|
|
1326
|
+
cause: registryText.fileMustReadFirstCause,
|
|
1327
|
+
fix: registryText.fileMustReadFirstFix,
|
|
1328
|
+
next_tool: { name: 'file_read', args: { path: resolution.filePath } },
|
|
1329
|
+
});
|
|
1330
|
+
}
|
|
1331
|
+
// stage === 'ok'
|
|
1332
|
+
const { tool } = resolution;
|
|
1333
|
+
const parsedArgs = resolution.parsedArgs;
|
|
1334
|
+
// Office 模式的 fail-closed 由上方 resolveToolAndValidateArgs 的 mode_forbidden
|
|
1335
|
+
// 统一挡(ModeToolPolicy → findModeOfTool),此处不再旁路复检。审计仍按工具归属执行。
|
|
1336
|
+
const isOfficeTool = isOfficeToolName(name);
|
|
1337
|
+
// ── Permission check ──
|
|
1338
|
+
const permissionDecision = evaluateToolPermission(name, parsedArgs, getToolPermissionContextFromToolContext(context));
|
|
1339
|
+
if (!permissionDecision.allowed) {
|
|
1340
|
+
return createToolError({
|
|
1341
|
+
code: 'PERMISSION_REQUIRED',
|
|
1342
|
+
message: `PERMISSION_REQUIRED: ${permissionDecision.reason}`,
|
|
1343
|
+
retryable: true,
|
|
1344
|
+
cause: permissionDecision.reason,
|
|
1345
|
+
fix: registryText.permissionRequiredFix,
|
|
1346
|
+
});
|
|
1347
|
+
}
|
|
1348
|
+
// ── Execute tool ──
|
|
1349
|
+
const toolResult = await executeToolWithTimeout(name, tool, parsedArgs, context);
|
|
1350
|
+
emitAgentActivityEvent(name, parsedArgs, toolResult, context, resolution.metadata, this.sessionId);
|
|
1351
|
+
if (isOfficeTool) {
|
|
1352
|
+
await auditOfficeToolExecution({
|
|
1353
|
+
tool: name,
|
|
1354
|
+
args: parsedArgs,
|
|
1355
|
+
result: toolResult,
|
|
1356
|
+
context: {
|
|
1357
|
+
...context,
|
|
1358
|
+
sessionId: context?.sessionId || this.sessionId || context?.sessionId,
|
|
1359
|
+
db: context?.db || this.db || context?.db,
|
|
1360
|
+
},
|
|
1361
|
+
});
|
|
1362
|
+
// 统一 per-mode metrics 出口(jsonl 仍由上面写入,这里只补可观测计数)。
|
|
1363
|
+
auditModeEvent('office', {
|
|
1364
|
+
kind: 'office_tool_call',
|
|
1365
|
+
tool: name,
|
|
1366
|
+
success: toolResult.success,
|
|
1367
|
+
argsSummary: parsedArgs,
|
|
1368
|
+
});
|
|
1369
|
+
}
|
|
1370
|
+
// ── ToolFailureLoopGuard:失败侧集中上报 ──
|
|
1371
|
+
// Registry 是失败事实的唯一权威出口(mode_forbidden / scope_forbidden / 工具执行异常
|
|
1372
|
+
// 全部走这里返回),由 Registry 集中上报可保证:所有走 resolveToolAndValidateArgs
|
|
1373
|
+
// 早期失败的分支也都被记入熔断器,避免 BaseAgentRuntime 入口被旁路。
|
|
1374
|
+
if (!toolResult.success) {
|
|
1375
|
+
const errorText = typeof toolResult.error === 'string' ? toolResult.error : '';
|
|
1376
|
+
if (errorText) {
|
|
1377
|
+
try {
|
|
1378
|
+
getToolFailureLoopGuard(undefined).record({
|
|
1379
|
+
sessionId: context?.sessionId || this.sessionId || '<unknown>',
|
|
1380
|
+
agentId: String(context?.agentId || ''),
|
|
1381
|
+
agentName: String(context?.agentName || ''),
|
|
1382
|
+
taskId: typeof context?.taskId === 'string' ? context.taskId : undefined,
|
|
1383
|
+
toolName: name,
|
|
1384
|
+
args: parsedArgs,
|
|
1385
|
+
errorCode: extractErrorCodeFromText(errorText),
|
|
1386
|
+
errorMessage: errorText.split('\n\nLLM_RECOVERY=')[0] || errorText,
|
|
1387
|
+
});
|
|
1388
|
+
}
|
|
1389
|
+
catch {
|
|
1390
|
+
// 上报失败不应影响主路径
|
|
1391
|
+
}
|
|
1392
|
+
}
|
|
1393
|
+
}
|
|
1394
|
+
// ── 记录文件内容已知的工具 ──
|
|
1395
|
+
if (toolResult.success && (name === 'file_read' ||
|
|
1396
|
+
name === 'file_create' ||
|
|
1397
|
+
name === 'structured_patch')) {
|
|
1398
|
+
const filePath = parsedArgs?.path;
|
|
1399
|
+
if (filePath) {
|
|
1400
|
+
this.recordFileRead(filePath, context?.workspace);
|
|
1401
|
+
}
|
|
1402
|
+
}
|
|
1403
|
+
if (toolResult.success && (name === 'file_create' || name === 'structured_patch')) {
|
|
1404
|
+
const filePath = parsedArgs?.path;
|
|
1405
|
+
if (filePath && context?.assumptionTracker) {
|
|
1406
|
+
try {
|
|
1407
|
+
const batch = await context.assumptionTracker.onFilesChanged([filePath]);
|
|
1408
|
+
if (batch.falsified.length > 0) {
|
|
1409
|
+
await context.assumptionFeedback?.(batch);
|
|
1410
|
+
}
|
|
1411
|
+
}
|
|
1412
|
+
catch (error) {
|
|
1413
|
+
coreLogger.warn(`[ToolRegistry] assumption verification skipped after ${name}: ${error instanceof Error ? error.message : String(error)}`);
|
|
1414
|
+
}
|
|
1415
|
+
}
|
|
1416
|
+
}
|
|
1417
|
+
return toolResult;
|
|
1418
|
+
}
|
|
1419
|
+
// === Persistence ===
|
|
1420
|
+
saveTool(tool) {
|
|
1421
|
+
if (!this.db || !this.sessionId)
|
|
1422
|
+
return;
|
|
1423
|
+
try {
|
|
1424
|
+
const toolType = tool instanceof Tool ? 'class' : 'custom';
|
|
1425
|
+
const schema = this.getSchema(tool);
|
|
1426
|
+
this.db.saveToolRegistration(this.sessionId, tool.name, {
|
|
1427
|
+
type: toolType,
|
|
1428
|
+
description: tool.description,
|
|
1429
|
+
schema: JSON.stringify(schema),
|
|
1430
|
+
});
|
|
1431
|
+
}
|
|
1432
|
+
catch {
|
|
1433
|
+
// Persistence failure should not break registration
|
|
1434
|
+
}
|
|
1435
|
+
}
|
|
1436
|
+
/** Load tool registration metadata from DB. Returns metadata for caller to reconstruct tools. */
|
|
1437
|
+
loadTools() {
|
|
1438
|
+
if (!this.db || !this.sessionId)
|
|
1439
|
+
return [];
|
|
1440
|
+
const rows = this.db.loadToolRegistrations(this.sessionId);
|
|
1441
|
+
return rows.map((r) => ({
|
|
1442
|
+
tool_name: r.tool_name,
|
|
1443
|
+
tool_type: r.tool_type,
|
|
1444
|
+
tool_description: r.tool_description,
|
|
1445
|
+
tool_schema: (() => {
|
|
1446
|
+
try {
|
|
1447
|
+
return JSON.parse(r.tool_schema);
|
|
1448
|
+
}
|
|
1449
|
+
catch { /* expected: malformed schema JSON */
|
|
1450
|
+
return {};
|
|
1451
|
+
}
|
|
1452
|
+
})(),
|
|
1453
|
+
}));
|
|
1454
|
+
}
|
|
1455
|
+
/** Save all currently registered tools to DB */
|
|
1456
|
+
persistAll() {
|
|
1457
|
+
for (const tool of this.getAll()) {
|
|
1458
|
+
this.saveTool(tool);
|
|
1459
|
+
}
|
|
1460
|
+
}
|
|
1461
|
+
/** Save already-loaded tools without instantiating deferred tools. */
|
|
1462
|
+
persistLoaded() {
|
|
1463
|
+
for (const tool of this.tools.values()) {
|
|
1464
|
+
this.saveTool(tool);
|
|
1465
|
+
}
|
|
1466
|
+
}
|
|
1467
|
+
/** Clear persisted tool registrations for this session */
|
|
1468
|
+
clearPersistedTools() {
|
|
1469
|
+
if (!this.db || !this.sessionId)
|
|
1470
|
+
return;
|
|
1471
|
+
try {
|
|
1472
|
+
this.db.clearToolRegistrations(this.sessionId);
|
|
1473
|
+
}
|
|
1474
|
+
catch {
|
|
1475
|
+
// Ignore
|
|
1476
|
+
}
|
|
1477
|
+
}
|
|
1478
|
+
}
|
|
1479
|
+
let defaultToolRegistry;
|
|
1480
|
+
export function getToolRegistry() {
|
|
1481
|
+
defaultToolRegistry ??= new ToolRegistry();
|
|
1482
|
+
return defaultToolRegistry;
|
|
1483
|
+
}
|
|
1484
|
+
//# sourceMappingURL=Registry.js.map
|