@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,1143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CompressionPipeline — 上下文压缩统一编排器
|
|
3
|
+
*
|
|
4
|
+
* 本 Pipeline 仅处理"会话上下文"压缩。
|
|
5
|
+
*
|
|
6
|
+
* 不在此处理:
|
|
7
|
+
* - SoulCompressor:人格/历史记忆压缩,由 SessionManager 调用;
|
|
8
|
+
* - BlackboardCompressor:黑板快照压缩,由 LeaderBlackboard / ContextMemoryIndex 调用。
|
|
9
|
+
*
|
|
10
|
+
* 这是有意的边界,不要"再统一一次"。
|
|
11
|
+
*
|
|
12
|
+
* 流程:
|
|
13
|
+
* 1. 阈值判定(forceRun 跳过)
|
|
14
|
+
* 2. PRE_COMPACT Hook
|
|
15
|
+
* 3. 默认 LLM 分块/递归摘要
|
|
16
|
+
* 4. 文件快照注入 + 二次截断
|
|
17
|
+
* 5. POST_COMPACT Hook
|
|
18
|
+
*
|
|
19
|
+
* 设计原则:
|
|
20
|
+
* - 不持有消息状态,所有数据通过参数传递
|
|
21
|
+
* - 所有 token 计算统一通过 ContextTokenCalculator
|
|
22
|
+
* - 内部状态仅 _compressing 守卫(防 await 期间重入)
|
|
23
|
+
*/
|
|
24
|
+
import { mkdirSync, readdirSync, unlinkSync, promises as fsp } from 'fs';
|
|
25
|
+
import { join } from 'path';
|
|
26
|
+
import { contentToPlainText, } from '../../llm/types.js';
|
|
27
|
+
import { sanitizeOpenAIToolMessageSequence } from '../../llm/message_sanitizer.js';
|
|
28
|
+
import { getReasoningGenerateOptions } from '../../llm/reasoningSampling.js';
|
|
29
|
+
import { coreLogger } from '../Log.js';
|
|
30
|
+
import { SESSION_KEYS } from '../SessionStateKeys.js';
|
|
31
|
+
import { executePreCompact, executePostCompact } from '../hooks/executor.js';
|
|
32
|
+
import { calculateTokens, batchCalculateTokenCounts, calculateRequestBytes, calculateByteThreshold, } from './ContextTokenCalculator.js';
|
|
33
|
+
import { countTokens } from '../../llm/token_counter.js';
|
|
34
|
+
import { truncateOversizedMessages, createOversizedArchiveWriter, } from './MessageByteTruncator.js';
|
|
35
|
+
import * as D from '../../config/defaults.js';
|
|
36
|
+
const POST_COMPACT_MAX_FILES = 10;
|
|
37
|
+
const POST_COMPACT_TOKEN_BUDGET = D.CONTEXT.POST_COMPACT_TOKEN_BUDGET;
|
|
38
|
+
const POST_COMPACT_MAX_TOKENS_PER_FILE = 6_000;
|
|
39
|
+
const RECENT_WINDOW_TOKEN_BUDGET = D.CONTEXT.RECENT_WINDOW_TOKEN_BUDGET;
|
|
40
|
+
const MAX_RECENT_MESSAGE_COUNT = D.CONTEXT.MAX_RECENT_MESSAGE_COUNT;
|
|
41
|
+
const MAX_SUMMARY_DEPTH = 3;
|
|
42
|
+
const MAX_EVIDENCE_ITEMS = 12;
|
|
43
|
+
const DETERMINISTIC_SUMMARY_CHAR_BUDGET = 40_000;
|
|
44
|
+
const DETERMINISTIC_HEAD_RECORDS = 12;
|
|
45
|
+
const DETERMINISTIC_TAIL_RECORDS = 48;
|
|
46
|
+
// 历史上用三个中文 marker 文本(text.includes)判定 pinned 摘要,违反禁止启发式。
|
|
47
|
+
// 改为结构化字段:压缩器注入摘要消息时打 metadata.kind='context_summary',这里按字段判定。
|
|
48
|
+
// 结构化消息种类见 src/llm/types.ts ChatMessageKind。
|
|
49
|
+
/**
|
|
50
|
+
* 从文本行中确定性挑选保留行:head + tail 窗口(不再用关键词/扩展名正则挑行)。
|
|
51
|
+
* 旧实现用关键词+文件扩展名正则筛选,会漏掉无关键词的关键行(纯数字错误、配置 diff)
|
|
52
|
+
* 并误留含 'next'/'session' 等词的噪声行,违反"禁止启发式"原则。head/tail 窗口对日志、
|
|
53
|
+
* 堆栈、工具输出都是可预测、无损的覆盖。导出供测试与算法层复用。
|
|
54
|
+
*/
|
|
55
|
+
function pickImportantLines(lines, maxItems) {
|
|
56
|
+
if (lines.length <= maxItems)
|
|
57
|
+
return uniqueLines(lines);
|
|
58
|
+
const headCount = Math.max(1, Math.floor(maxItems / 2));
|
|
59
|
+
const head = lines.slice(0, headCount);
|
|
60
|
+
const tail = lines.slice(-(maxItems - headCount));
|
|
61
|
+
return uniqueLines([...head, ...tail]);
|
|
62
|
+
}
|
|
63
|
+
/** 去重保持顺序。 */
|
|
64
|
+
function uniqueLines(lines) {
|
|
65
|
+
const seen = new Set();
|
|
66
|
+
const result = [];
|
|
67
|
+
for (const line of lines) {
|
|
68
|
+
if (!line || seen.has(line))
|
|
69
|
+
continue;
|
|
70
|
+
seen.add(line);
|
|
71
|
+
result.push(line);
|
|
72
|
+
}
|
|
73
|
+
return result;
|
|
74
|
+
}
|
|
75
|
+
export class CompressionPipeline {
|
|
76
|
+
options;
|
|
77
|
+
/** 防止 await 期间被并发重入触发第二次压缩 */
|
|
78
|
+
_compressing = false;
|
|
79
|
+
constructor(options) {
|
|
80
|
+
this.options = options;
|
|
81
|
+
}
|
|
82
|
+
/** 同步刷新阈值 / 模型 / 上下文窗口(模型切换时调用) */
|
|
83
|
+
updateOptions(patch) {
|
|
84
|
+
Object.assign(this.options, patch);
|
|
85
|
+
}
|
|
86
|
+
get owner() {
|
|
87
|
+
return this.options.owner;
|
|
88
|
+
}
|
|
89
|
+
/** 从 options 或 config 读取的有效值,未配置时回退到模块常量默认值 */
|
|
90
|
+
effectiveMaxRecentMessageCount() {
|
|
91
|
+
return this.options.maxRecentMessageCount ?? MAX_RECENT_MESSAGE_COUNT;
|
|
92
|
+
}
|
|
93
|
+
effectiveRecentWindowTokenBudget() {
|
|
94
|
+
return this.options.recentWindowTokenBudget ?? RECENT_WINDOW_TOKEN_BUDGET;
|
|
95
|
+
}
|
|
96
|
+
effectivePostCompactTokenBudget() {
|
|
97
|
+
return this.options.postCompactTokenBudget ?? POST_COMPACT_TOKEN_BUDGET;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* 请求体字节触发阈值。未配置 maxRequestBytes 时返回 Infinity(关闭字节维度)。
|
|
101
|
+
*/
|
|
102
|
+
byteThreshold() {
|
|
103
|
+
return this.options.maxRequestBytes
|
|
104
|
+
? calculateByteThreshold(this.options.maxRequestBytes)
|
|
105
|
+
: Infinity;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* 标准压缩流程:只做阈值判定;触发后默认进入 LLM 压缩。
|
|
109
|
+
*/
|
|
110
|
+
async run(messages, ctx = {}) {
|
|
111
|
+
if (this._compressing) {
|
|
112
|
+
coreLogger.warn(`${this.options.sessionId} CompressionPipeline.run() 已在进行中,跳过重入`);
|
|
113
|
+
const tokens = await this.calc(messages);
|
|
114
|
+
return {
|
|
115
|
+
messages,
|
|
116
|
+
oldTokens: tokens,
|
|
117
|
+
newTokens: tokens,
|
|
118
|
+
compacted: false,
|
|
119
|
+
inProgress: true,
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
this._compressing = true;
|
|
123
|
+
try {
|
|
124
|
+
const oldTokens = await this.calc(messages);
|
|
125
|
+
const oldBytes = calculateRequestBytes(messages);
|
|
126
|
+
const byteThreshold = this.byteThreshold();
|
|
127
|
+
// 触发重压缩的条件:token 超阈值 **或** 请求体字节超阈值。
|
|
128
|
+
// 后者专治 HTTP 413(网关 body 字节上限):token 远未达阈值、但序列化字节
|
|
129
|
+
// 已超网关限制的场景(大量中文/JSON/base64),单看 token 永远不会压缩。
|
|
130
|
+
if (oldTokens <= this.options.threshold && oldBytes <= byteThreshold) {
|
|
131
|
+
return {
|
|
132
|
+
messages,
|
|
133
|
+
oldTokens,
|
|
134
|
+
newTokens: oldTokens,
|
|
135
|
+
oldBytes,
|
|
136
|
+
newBytes: oldBytes,
|
|
137
|
+
compacted: false,
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
coreLogger.info(`${this.options.sessionId} 上下文过长 (tokens=${oldTokens.toLocaleString()}/${this.options.threshold.toLocaleString()}, bytes=${oldBytes.toLocaleString()}/${Number.isFinite(byteThreshold) ? byteThreshold.toLocaleString() : '∞'}),执行 LLM 压缩...`);
|
|
141
|
+
// PRE_COMPACT Hook
|
|
142
|
+
await this.executePreCompactHook(ctx.compactType ?? 'auto');
|
|
143
|
+
const result = await this.compress(messages, oldTokens, oldBytes, ctx);
|
|
144
|
+
// POST_COMPACT Hook
|
|
145
|
+
const tokensSaved = Math.max(0, result.oldTokens - result.newTokens);
|
|
146
|
+
await this.executePostCompactHook(ctx.compactType ?? 'auto', tokensSaved, result.summary ?? '');
|
|
147
|
+
return result;
|
|
148
|
+
}
|
|
149
|
+
finally {
|
|
150
|
+
this._compressing = false;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* 强制压缩:跳过阈值检查,直接执行默认 LLM 压缩流程。
|
|
155
|
+
* 用于 /compact 命令、context_overflow 硬重置等场景。
|
|
156
|
+
*/
|
|
157
|
+
async forceRun(messages, ctx = {}) {
|
|
158
|
+
if (this._compressing) {
|
|
159
|
+
coreLogger.warn(`${this.options.sessionId} CompressionPipeline.forceRun() 已在进行中,跳过重入`);
|
|
160
|
+
const tokens = await this.calc(messages);
|
|
161
|
+
return {
|
|
162
|
+
messages,
|
|
163
|
+
oldTokens: tokens,
|
|
164
|
+
newTokens: tokens,
|
|
165
|
+
compacted: false,
|
|
166
|
+
inProgress: true,
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
this._compressing = true;
|
|
170
|
+
try {
|
|
171
|
+
const oldTokens = await this.calc(messages);
|
|
172
|
+
const oldBytes = calculateRequestBytes(messages);
|
|
173
|
+
// 保护:非用户手动触发时,如果 token 和字节都远低于阈值(<60%),跳过有损压缩。
|
|
174
|
+
// LlmGuard 对任意非可重试错误触发 compact 是“碰运气”策略,但当上下文实际很小时
|
|
175
|
+
// (如 78K/760K),压缩反而会破坏消息序列结构(删掉 tool_use 导致孤儿 tool_result)。
|
|
176
|
+
// 用户手动 COMPACT 指令(compactType='manual')始终尊重。
|
|
177
|
+
const isManual = ctx.compactType === 'manual';
|
|
178
|
+
const byteThreshold = this.byteThreshold();
|
|
179
|
+
const tokenRatio = this.options.threshold > 0 ? oldTokens / this.options.threshold : 0;
|
|
180
|
+
const byteRatio = Number.isFinite(byteThreshold) && byteThreshold > 0 ? oldBytes / byteThreshold : 0;
|
|
181
|
+
if (!isManual && tokenRatio < 0.6 && byteRatio < 0.6) {
|
|
182
|
+
coreLogger.info(`${this.options.sessionId} forceRun 跳过:token ${oldTokens}/${this.options.threshold} (${(tokenRatio * 100).toFixed(0)}%), bytes ${oldBytes}/${byteThreshold} (${(byteRatio * 100).toFixed(0)}%) 远低于阈值,不执行有损压缩`);
|
|
183
|
+
return {
|
|
184
|
+
messages,
|
|
185
|
+
oldTokens,
|
|
186
|
+
newTokens: oldTokens,
|
|
187
|
+
oldBytes,
|
|
188
|
+
newBytes: oldBytes,
|
|
189
|
+
compacted: false,
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
await this.executePreCompactHook(ctx.compactType ?? 'manual');
|
|
193
|
+
const result = await this.compress(messages, oldTokens, oldBytes, ctx);
|
|
194
|
+
await this.executePostCompactHook(ctx.compactType ?? 'manual', Math.max(0, result.oldTokens - result.newTokens), result.summary ?? '');
|
|
195
|
+
return result;
|
|
196
|
+
}
|
|
197
|
+
finally {
|
|
198
|
+
this._compressing = false;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
// ─── Hook 集成 ──────────────────────────────────────────────────────────
|
|
202
|
+
async executePreCompactHook(compactType) {
|
|
203
|
+
if (!this.options.sessionId)
|
|
204
|
+
return;
|
|
205
|
+
try {
|
|
206
|
+
await executePreCompact(this.options.sessionId, compactType);
|
|
207
|
+
}
|
|
208
|
+
catch (error) {
|
|
209
|
+
coreLogger.warn(`[CompressionPipeline] PRE_COMPACT hook failed: ${error instanceof Error ? error.message : error}`);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
async executePostCompactHook(compactType, tokensSaved, summary) {
|
|
213
|
+
if (!this.options.sessionId)
|
|
214
|
+
return;
|
|
215
|
+
try {
|
|
216
|
+
await executePostCompact(this.options.sessionId, compactType, tokensSaved, summary);
|
|
217
|
+
}
|
|
218
|
+
catch (error) {
|
|
219
|
+
coreLogger.warn(`[CompressionPipeline] POST_COMPACT hook failed: ${error instanceof Error ? error.message : error}`);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
// ─── 核心压缩流程 ─────────────────────────────────────────────────────────
|
|
223
|
+
async compress(messages, oldTokens, oldBytes, ctx) {
|
|
224
|
+
this.emitCompacting('start', 'llm_summary', {
|
|
225
|
+
percent: 2,
|
|
226
|
+
oldTokens,
|
|
227
|
+
threshold: this.options.threshold,
|
|
228
|
+
messageCount: messages.length,
|
|
229
|
+
label: 'Preparing LLM compression',
|
|
230
|
+
});
|
|
231
|
+
// Step 0:单条巨型消息「中段截断 + 全文归档」。
|
|
232
|
+
// 必须在 pinned/recent 划分之前、且不受 messages.length < 12 早返回影响 ——
|
|
233
|
+
// 单条几十万字节的消息(粘贴长文 / 巨大工具结果)无论落在 pinned 还是 recent,
|
|
234
|
+
// 现有按整条 pop 的逻辑都缩不掉它,是 413 死循环的核心。这里先把它就地裁短。
|
|
235
|
+
let oversizedTruncated = false;
|
|
236
|
+
if (this.options.maxSingleMessageBytes && this.options.maxSingleMessageBytes > 0) {
|
|
237
|
+
const archiveWriter = createOversizedArchiveWriter({
|
|
238
|
+
owner: this.options.owner,
|
|
239
|
+
sessionId: this.options.sessionId,
|
|
240
|
+
});
|
|
241
|
+
const truncResult = truncateOversizedMessages(messages, {
|
|
242
|
+
maxSingleMessageBytes: this.options.maxSingleMessageBytes,
|
|
243
|
+
archiveWriter,
|
|
244
|
+
});
|
|
245
|
+
if (truncResult.truncatedCount > 0) {
|
|
246
|
+
messages = truncResult.messages;
|
|
247
|
+
oversizedTruncated = true;
|
|
248
|
+
coreLogger.info(`${this.options.sessionId} 单条巨型消息截断:${truncResult.truncatedCount} 条,节省约 ${(truncResult.bytesSaved / 1024).toFixed(0)}KB`);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
// 消息太少无法做分层摘要;但若已做过单条截断,仍要返回截断后的结果(算压缩成功)。
|
|
252
|
+
if (messages.length < 12) {
|
|
253
|
+
return this.finishWithoutSummary(messages, oldTokens, oldBytes, oversizedTruncated);
|
|
254
|
+
}
|
|
255
|
+
const preservedIndexes = this.getPinnedIndexes(messages);
|
|
256
|
+
const recentIndexes = await this.getRecentIndexes(messages, preservedIndexes);
|
|
257
|
+
const middleMessages = messages.filter((_message, index) => !preservedIndexes.has(index) && !recentIndexes.has(index));
|
|
258
|
+
if (middleMessages.length === 0) {
|
|
259
|
+
return this.finishWithoutSummary(messages, oldTokens, oldBytes, oversizedTruncated);
|
|
260
|
+
}
|
|
261
|
+
const records = this.buildCompressionRecords(middleMessages);
|
|
262
|
+
if (records.length === 0) {
|
|
263
|
+
return this.finishWithoutSummary(messages, oldTokens, oldBytes, oversizedTruncated);
|
|
264
|
+
}
|
|
265
|
+
this.emitCompacting('progress', 'llm_summary', {
|
|
266
|
+
percent: 8,
|
|
267
|
+
oldTokens,
|
|
268
|
+
threshold: this.options.threshold,
|
|
269
|
+
messageCount: messages.length,
|
|
270
|
+
label: 'Building compression archive',
|
|
271
|
+
});
|
|
272
|
+
const deterministicSummary = this.buildDeterministicSummary(records, 'LLM 压缩归档索引');
|
|
273
|
+
const archivePath = await this.writeCompressionArchive(middleMessages, records, deterministicSummary);
|
|
274
|
+
// 归档写盘失败时,绝不能继续做有损替换:中段消息一旦从候选集中剔除且无归档兜底,
|
|
275
|
+
// 原始对话将永久丢失。此时放弃本次有损压缩,保留原始消息,
|
|
276
|
+
// 等待下次压缩或人工介入,宁可不压缩也不丢数据。
|
|
277
|
+
if (!archivePath) {
|
|
278
|
+
coreLogger.warn(`${this.options.sessionId} 压缩归档写盘失败,放弃本次有损压缩以避免中段对话永久丢失,保留原始消息`);
|
|
279
|
+
// 即便分层摘要放弃,单条巨型消息截断已生效,仍算压缩成功。
|
|
280
|
+
const result = await this.finishWithoutSummary(messages, oldTokens, oldBytes, oversizedTruncated);
|
|
281
|
+
return { ...result, llmFailed: false };
|
|
282
|
+
}
|
|
283
|
+
const preservedMessages = messages.filter((_message, index) => preservedIndexes.has(index));
|
|
284
|
+
const recentMessages = messages.filter((_message, index) => recentIndexes.has(index));
|
|
285
|
+
// 只用 LLM 压缩,不回退本地算法。
|
|
286
|
+
// LLM 不可用或失败时直接抛错,让调用方感知,不静默降级。
|
|
287
|
+
let llmFailed = false;
|
|
288
|
+
let summaryContent;
|
|
289
|
+
if (!this.options.llmClient) {
|
|
290
|
+
// 无 LLM 客户端时也要发 end 事件,否则 TUI 条幅永远卡住
|
|
291
|
+
this.emitCompacting('end', 'finalizing', {
|
|
292
|
+
percent: 100,
|
|
293
|
+
oldTokens,
|
|
294
|
+
threshold: this.options.threshold,
|
|
295
|
+
messageCount: messages.length,
|
|
296
|
+
label: 'Compression failed: no LLM client',
|
|
297
|
+
});
|
|
298
|
+
throw new Error('LLM 压缩失败:未配置 LLM 客户端(本地算法已禁用)');
|
|
299
|
+
}
|
|
300
|
+
this.emitCompacting('progress', 'llm_summary', {
|
|
301
|
+
percent: 14,
|
|
302
|
+
oldTokens,
|
|
303
|
+
threshold: this.options.threshold,
|
|
304
|
+
messageCount: messages.length,
|
|
305
|
+
label: 'Summarizing conversation',
|
|
306
|
+
});
|
|
307
|
+
try {
|
|
308
|
+
summaryContent = await this.buildHierarchicalSummary(records, archivePath);
|
|
309
|
+
}
|
|
310
|
+
catch (error) {
|
|
311
|
+
llmFailed = true;
|
|
312
|
+
coreLogger.warn(`[CompressionPipeline] ${this.options.sessionId} LLM 压缩失败,不回退本地算法: ${error instanceof Error ? error.message : error}`);
|
|
313
|
+
// 失败时必须发 end 事件,否则 TUI/Web 压缩条幅永远残留
|
|
314
|
+
this.emitCompacting('end', 'finalizing', {
|
|
315
|
+
percent: 100,
|
|
316
|
+
oldTokens,
|
|
317
|
+
threshold: this.options.threshold,
|
|
318
|
+
messageCount: messages.length,
|
|
319
|
+
label: 'Compression failed',
|
|
320
|
+
});
|
|
321
|
+
throw error;
|
|
322
|
+
}
|
|
323
|
+
let candidateMessages = [
|
|
324
|
+
...preservedMessages,
|
|
325
|
+
{
|
|
326
|
+
role: 'assistant',
|
|
327
|
+
content: `[上下文压缩摘要]\n${summaryContent}`,
|
|
328
|
+
// 结构化标记:下游(本类 getPinnedIndexes/truncateToThreshold)按此字段判定,不嗅探文本。
|
|
329
|
+
metadata: { kind: 'context_summary' },
|
|
330
|
+
},
|
|
331
|
+
...recentMessages,
|
|
332
|
+
];
|
|
333
|
+
const fileAttachments = this.buildFileAttachments(ctx.recentFiles);
|
|
334
|
+
if (fileAttachments) {
|
|
335
|
+
const insertion = Math.min(candidateMessages.length, preservedMessages.length + 1);
|
|
336
|
+
candidateMessages = [
|
|
337
|
+
...candidateMessages.slice(0, insertion),
|
|
338
|
+
{
|
|
339
|
+
role: 'assistant',
|
|
340
|
+
content: `[上下文文件快照]\n## 最近访问文件快照\n${fileAttachments}`,
|
|
341
|
+
// 结构化标记:truncateToThreshold 按字段识别并剔除文件快照,不嗅探文本前缀。
|
|
342
|
+
metadata: { kind: 'context_file_snapshot' },
|
|
343
|
+
},
|
|
344
|
+
...candidateMessages.slice(insertion),
|
|
345
|
+
];
|
|
346
|
+
}
|
|
347
|
+
this.emitCompacting('progress', 'finalizing', {
|
|
348
|
+
percent: 94,
|
|
349
|
+
oldTokens,
|
|
350
|
+
threshold: this.options.threshold,
|
|
351
|
+
messageCount: candidateMessages.length,
|
|
352
|
+
label: 'Finalizing compressed context',
|
|
353
|
+
});
|
|
354
|
+
candidateMessages = sanitizeOpenAIToolMessageSequence(candidateMessages);
|
|
355
|
+
let newTokens = await this.calc(candidateMessages);
|
|
356
|
+
let newBytes = calculateRequestBytes(candidateMessages);
|
|
357
|
+
const byteThreshold = this.byteThreshold();
|
|
358
|
+
let truncated = false;
|
|
359
|
+
let overflow = false;
|
|
360
|
+
// 二次截断触发条件:token 超阈值 **或** 字节超阈值。
|
|
361
|
+
if (newTokens > this.options.threshold || newBytes > byteThreshold) {
|
|
362
|
+
coreLogger.warn(`${this.options.sessionId} 压缩后仍超限 (tokens=${newTokens.toLocaleString()}/${this.options.threshold.toLocaleString()}, bytes=${newBytes.toLocaleString()}/${Number.isFinite(byteThreshold) ? byteThreshold.toLocaleString() : '∞'}),尝试截断recent消息`);
|
|
363
|
+
candidateMessages = this.truncateToThreshold(candidateMessages, preservedMessages.length);
|
|
364
|
+
candidateMessages = sanitizeOpenAIToolMessageSequence(candidateMessages);
|
|
365
|
+
truncated = true;
|
|
366
|
+
newTokens = await this.calc(candidateMessages);
|
|
367
|
+
newBytes = calculateRequestBytes(candidateMessages);
|
|
368
|
+
if (newTokens > this.options.threshold || newBytes > byteThreshold) {
|
|
369
|
+
overflow = true;
|
|
370
|
+
coreLogger.warn(`${this.options.sessionId} 二次截断后仍超限 (tokens=${newTokens.toLocaleString()}, bytes=${newBytes.toLocaleString()})`);
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
// 持久化 leader summary 给 worker 继承
|
|
374
|
+
if (!overflow &&
|
|
375
|
+
this.options.owner.kind === 'leader' &&
|
|
376
|
+
this.options.db &&
|
|
377
|
+
this.options.sessionId) {
|
|
378
|
+
const summaryTruncated = summaryContent.length > 8000
|
|
379
|
+
? summaryContent.slice(0, 8000) + '\n...(截断)'
|
|
380
|
+
: summaryContent;
|
|
381
|
+
this.options.db.setSessionState(this.options.sessionId, SESSION_KEYS.LEADER_CONTEXT_SUMMARY, summaryTruncated);
|
|
382
|
+
}
|
|
383
|
+
coreLogger.info(`${this.options.sessionId} 压缩完成:tokens ${oldTokens.toLocaleString()} → ${newTokens.toLocaleString()}, bytes ${oldBytes.toLocaleString()} → ${newBytes.toLocaleString()}`);
|
|
384
|
+
this.emitCompacting('end', 'finalizing', {
|
|
385
|
+
percent: 100,
|
|
386
|
+
oldTokens,
|
|
387
|
+
newTokens,
|
|
388
|
+
threshold: this.options.threshold,
|
|
389
|
+
messageCount: candidateMessages.length,
|
|
390
|
+
label: 'Compression complete',
|
|
391
|
+
});
|
|
392
|
+
const finalCompactType = this.joinCompactTypes(oversizedTruncated ? 'oversized_message' : '', ctx.compactType === 'manual' ? 'manual' : '', this.options.llmClient && !llmFailed ? 'llm_summary' : 'llm_fallback') || 'llm_summary';
|
|
393
|
+
if (!overflow) {
|
|
394
|
+
this.emitCompressed(oldTokens, newTokens, candidateMessages.length, finalCompactType, archivePath);
|
|
395
|
+
}
|
|
396
|
+
return {
|
|
397
|
+
messages: candidateMessages,
|
|
398
|
+
oldTokens,
|
|
399
|
+
newTokens,
|
|
400
|
+
oldBytes,
|
|
401
|
+
newBytes,
|
|
402
|
+
compacted: true,
|
|
403
|
+
compactType: finalCompactType,
|
|
404
|
+
archivePath,
|
|
405
|
+
summary: summaryContent,
|
|
406
|
+
llmFailed,
|
|
407
|
+
truncated,
|
|
408
|
+
overflow,
|
|
409
|
+
};
|
|
410
|
+
}
|
|
411
|
+
/** 发出「压缩进行中」事件,供 Web/TUI 显示进度(区别于终态 context:compressed)。 */
|
|
412
|
+
emitCompacting(phase, stage, progress) {
|
|
413
|
+
if (!this.options.emitter || !this.options.sessionId)
|
|
414
|
+
return;
|
|
415
|
+
this.options.emitter.emit('context:compacting', {
|
|
416
|
+
sessionId: this.options.sessionId,
|
|
417
|
+
owner: this.options.owner.kind,
|
|
418
|
+
ownerName: this.options.owner.agentName,
|
|
419
|
+
stage,
|
|
420
|
+
phase,
|
|
421
|
+
chunkIndex: progress?.index,
|
|
422
|
+
chunkTotal: progress?.total,
|
|
423
|
+
percent: progress?.percent,
|
|
424
|
+
oldTokens: progress?.oldTokens,
|
|
425
|
+
newTokens: progress?.newTokens,
|
|
426
|
+
threshold: progress?.threshold,
|
|
427
|
+
messageCount: progress?.messageCount,
|
|
428
|
+
label: progress?.label,
|
|
429
|
+
});
|
|
430
|
+
}
|
|
431
|
+
emitCompressed(oldTokens, newTokens, messageCount, compactType, archivePath) {
|
|
432
|
+
if (!this.options.emitter || !this.options.sessionId)
|
|
433
|
+
return;
|
|
434
|
+
this.options.emitter.emit('context:compressed', {
|
|
435
|
+
sessionId: this.options.sessionId,
|
|
436
|
+
oldTokens,
|
|
437
|
+
newTokens,
|
|
438
|
+
messageCount,
|
|
439
|
+
compactType,
|
|
440
|
+
archivePath,
|
|
441
|
+
owner: this.options.owner.kind,
|
|
442
|
+
ownerName: this.options.owner.agentName,
|
|
443
|
+
});
|
|
444
|
+
}
|
|
445
|
+
async finishWithoutSummary(messages, oldTokens, oldBytes, oversizedTruncated) {
|
|
446
|
+
const compactType = this.joinCompactTypes(oversizedTruncated ? 'oversized_message' : '');
|
|
447
|
+
const compacted = !!compactType;
|
|
448
|
+
const outputMessages = compacted ? sanitizeOpenAIToolMessageSequence(messages) : messages;
|
|
449
|
+
const newTokens = await this.calc(outputMessages);
|
|
450
|
+
const newBytes = calculateRequestBytes(outputMessages);
|
|
451
|
+
const overflow = newTokens > this.options.threshold || newBytes > this.byteThreshold();
|
|
452
|
+
this.emitCompacting('end', 'finalizing', {
|
|
453
|
+
percent: 100,
|
|
454
|
+
oldTokens,
|
|
455
|
+
newTokens,
|
|
456
|
+
threshold: this.options.threshold,
|
|
457
|
+
messageCount: outputMessages.length,
|
|
458
|
+
label: compacted ? 'Safety compaction complete' : 'No compressible context',
|
|
459
|
+
});
|
|
460
|
+
if (compacted && !overflow) {
|
|
461
|
+
this.emitCompressed(oldTokens, newTokens, outputMessages.length, compactType);
|
|
462
|
+
}
|
|
463
|
+
return {
|
|
464
|
+
messages: outputMessages,
|
|
465
|
+
oldTokens,
|
|
466
|
+
newTokens,
|
|
467
|
+
oldBytes,
|
|
468
|
+
newBytes,
|
|
469
|
+
compacted,
|
|
470
|
+
compactType,
|
|
471
|
+
overflow,
|
|
472
|
+
};
|
|
473
|
+
}
|
|
474
|
+
joinCompactTypes(...parts) {
|
|
475
|
+
const seen = new Set();
|
|
476
|
+
const result = [];
|
|
477
|
+
for (const part of parts) {
|
|
478
|
+
if (!part)
|
|
479
|
+
continue;
|
|
480
|
+
for (const piece of part.split('+')) {
|
|
481
|
+
const trimmed = piece.trim();
|
|
482
|
+
if (!trimmed || seen.has(trimmed))
|
|
483
|
+
continue;
|
|
484
|
+
seen.add(trimmed);
|
|
485
|
+
result.push(trimmed);
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
return result.length > 0 ? result.join('+') : undefined;
|
|
489
|
+
}
|
|
490
|
+
// ─── Token 计算(统一委托给 ContextTokenCalculator)──────────────────────
|
|
491
|
+
calc(messages) {
|
|
492
|
+
return calculateTokens(messages, this.options.model);
|
|
493
|
+
}
|
|
494
|
+
// ─── Pinned/recent 选择 ─────────────────────────────────────────────────
|
|
495
|
+
getPinnedIndexes(messages) {
|
|
496
|
+
const pinned = new Set();
|
|
497
|
+
if (messages.length > 0) {
|
|
498
|
+
pinned.add(0);
|
|
499
|
+
}
|
|
500
|
+
for (let i = 1; i < messages.length; i++) {
|
|
501
|
+
if (messages[i].role === 'user') {
|
|
502
|
+
pinned.add(i);
|
|
503
|
+
break;
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
// 只 pin 最近一条压缩摘要(而非全部):更早的摘要不再 pin → 进入 middleMessages 被下一次
|
|
507
|
+
// 分层摘要吸收。否则每次压缩都新增一条永久 pinned 摘要,context floor 单调膨胀,最终窗口被
|
|
508
|
+
// 累积摘要填满、压缩退化为反复 no-op 却每次都打 LLM(#3)。(归档原文已 writeCompressionArchive 写盘留存。)
|
|
509
|
+
// 判定走结构化字段 metadata.kind==='context_summary'(产出方注入),不再嗅探文本 marker(禁止启发式)。
|
|
510
|
+
let latestSummaryIndex = -1;
|
|
511
|
+
for (let i = 0; i < messages.length; i++) {
|
|
512
|
+
if (messages[i].metadata?.kind === 'context_summary') {
|
|
513
|
+
latestSummaryIndex = i;
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
if (latestSummaryIndex >= 0) {
|
|
517
|
+
pinned.add(latestSummaryIndex);
|
|
518
|
+
}
|
|
519
|
+
return pinned;
|
|
520
|
+
}
|
|
521
|
+
async getRecentIndexes(messages, pinned) {
|
|
522
|
+
const recent = new Set();
|
|
523
|
+
let tokenBudget = 0;
|
|
524
|
+
let count = 0;
|
|
525
|
+
const allTokenCounts = await batchCalculateTokenCounts(messages, this.options.model);
|
|
526
|
+
for (let i = messages.length - 1; i >= 0; i--) {
|
|
527
|
+
if (pinned.has(i))
|
|
528
|
+
continue;
|
|
529
|
+
recent.add(i);
|
|
530
|
+
tokenBudget += allTokenCounts[i];
|
|
531
|
+
count += 1;
|
|
532
|
+
if (count >= this.effectiveMaxRecentMessageCount() || tokenBudget >= this.effectiveRecentWindowTokenBudget()) {
|
|
533
|
+
break;
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
// P1 修复:边界做 tool_use ↔ tool_result 配对校正,避免压缩后留下孤立 tool 消息。
|
|
537
|
+
// 1) recent 内任何 role==='tool',必须把它配对的 assistant.tool_calls 也拉进 recent。
|
|
538
|
+
// 2) 反向:recent 内 assistant.tool_calls 的所有配对 role==='tool' 也要尽量拉进来
|
|
539
|
+
// (它们一般紧随其后,正常情况已被 token 累加吃进;防御一下被边界切断的情况)。
|
|
540
|
+
// 3) 如果某个 role==='tool' 的配对 assistant 不在 recent 也不在 pinned 范围内,
|
|
541
|
+
// 且无法整段拉入(例如已被 pinned 占位、或会形成跨度黑洞),则把这个孤立 tool 从 recent 剔除。
|
|
542
|
+
const toolCallIdToAssistantIdx = new Map();
|
|
543
|
+
for (let i = 0; i < messages.length; i++) {
|
|
544
|
+
const calls = messages[i].tool_calls;
|
|
545
|
+
if (!calls?.length)
|
|
546
|
+
continue;
|
|
547
|
+
for (const c of calls) {
|
|
548
|
+
if (c.id)
|
|
549
|
+
toolCallIdToAssistantIdx.set(c.id, i);
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
// 第 1 步:拉对应 assistant
|
|
553
|
+
let changed = true;
|
|
554
|
+
while (changed) {
|
|
555
|
+
changed = false;
|
|
556
|
+
for (const idx of Array.from(recent)) {
|
|
557
|
+
const m = messages[idx];
|
|
558
|
+
if (m.role === 'tool' && m.tool_call_id) {
|
|
559
|
+
const owner = toolCallIdToAssistantIdx.get(m.tool_call_id);
|
|
560
|
+
if (owner !== undefined && !recent.has(owner) && !pinned.has(owner)) {
|
|
561
|
+
recent.add(owner);
|
|
562
|
+
changed = true;
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
// 第 2 步:拉 assistant 的全部 tool_result
|
|
568
|
+
changed = true;
|
|
569
|
+
while (changed) {
|
|
570
|
+
changed = false;
|
|
571
|
+
for (const idx of Array.from(recent)) {
|
|
572
|
+
const m = messages[idx];
|
|
573
|
+
if (m.role !== 'assistant' || !m.tool_calls?.length)
|
|
574
|
+
continue;
|
|
575
|
+
const ids = new Set(m.tool_calls.map((c) => c.id).filter(Boolean));
|
|
576
|
+
for (let j = idx + 1; j < messages.length; j++) {
|
|
577
|
+
const cand = messages[j];
|
|
578
|
+
if (cand.role !== 'tool')
|
|
579
|
+
break;
|
|
580
|
+
if (cand.tool_call_id && ids.has(cand.tool_call_id) && !recent.has(j) && !pinned.has(j)) {
|
|
581
|
+
recent.add(j);
|
|
582
|
+
changed = true;
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
// 第 3 步:剔除真正孤立的 role==='tool'(owner 在 pinned 中或不存在)
|
|
588
|
+
for (const idx of Array.from(recent)) {
|
|
589
|
+
const m = messages[idx];
|
|
590
|
+
if (m.role !== 'tool')
|
|
591
|
+
continue;
|
|
592
|
+
const owner = m.tool_call_id ? toolCallIdToAssistantIdx.get(m.tool_call_id) : undefined;
|
|
593
|
+
if (owner === undefined || (!recent.has(owner) && !pinned.has(owner))) {
|
|
594
|
+
// owner 不可达:删掉,避免 LLM 报 orphan tool
|
|
595
|
+
recent.delete(idx);
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
return recent;
|
|
599
|
+
}
|
|
600
|
+
// ─── 算法层:CompressionRecord 抽取 ─────────────────────────────────────
|
|
601
|
+
buildCompressionRecords(messages) {
|
|
602
|
+
const records = [];
|
|
603
|
+
const seenNoiseFingerprints = new Set();
|
|
604
|
+
messages.forEach((message, index) => {
|
|
605
|
+
const rawText = this.stringifyMessage(message).trim();
|
|
606
|
+
if (!rawText)
|
|
607
|
+
return;
|
|
608
|
+
const condensed = this.condenseMessage(message, rawText);
|
|
609
|
+
if (!condensed?.text)
|
|
610
|
+
return;
|
|
611
|
+
const fingerprint = `${condensed.category}:${condensed.text}`;
|
|
612
|
+
if (condensed.dedup && seenNoiseFingerprints.has(fingerprint))
|
|
613
|
+
return;
|
|
614
|
+
if (condensed.dedup)
|
|
615
|
+
seenNoiseFingerprints.add(fingerprint);
|
|
616
|
+
records.push({
|
|
617
|
+
id: `R-${String(index + 1).padStart(3, '0')}`,
|
|
618
|
+
role: message.role,
|
|
619
|
+
category: condensed.category,
|
|
620
|
+
text: condensed.text,
|
|
621
|
+
tokenEstimate: countTokens(condensed.text),
|
|
622
|
+
});
|
|
623
|
+
});
|
|
624
|
+
return records;
|
|
625
|
+
}
|
|
626
|
+
stringifyMessage(message) {
|
|
627
|
+
const parts = [];
|
|
628
|
+
const text = contentToPlainText(message.content).trim();
|
|
629
|
+
if (text)
|
|
630
|
+
parts.push(text);
|
|
631
|
+
if (message.tool_calls?.length) {
|
|
632
|
+
const toolNames = message.tool_calls.map((call) => call.function.name).join(', ');
|
|
633
|
+
parts.push(`工具调用: ${toolNames}`);
|
|
634
|
+
}
|
|
635
|
+
return parts.join('\n');
|
|
636
|
+
}
|
|
637
|
+
condenseMessage(message, text) {
|
|
638
|
+
if (!text)
|
|
639
|
+
return null;
|
|
640
|
+
if (message.tool_calls?.length) {
|
|
641
|
+
const toolNames = message.tool_calls.map((call) => call.function.name).join(', ');
|
|
642
|
+
return {
|
|
643
|
+
category: 'tool_call',
|
|
644
|
+
text: `工具调用: ${toolNames}${text ? `\n${this.compactPlainText(text, 240)}` : ''}`,
|
|
645
|
+
dedup: false,
|
|
646
|
+
};
|
|
647
|
+
}
|
|
648
|
+
// 结构化分类:产出方注入 metadata.kind,这里按字段判定消息用途并路由到对应压缩器。
|
|
649
|
+
// 不再用 text.startsWith('任务统计:') / text.startsWith('收到 Agent 最新进展:') 嗅探内容(禁止启发式)。
|
|
650
|
+
const kind = message.metadata?.kind;
|
|
651
|
+
if (kind === 'task_board_snapshot') {
|
|
652
|
+
return {
|
|
653
|
+
category: 'task_board',
|
|
654
|
+
text: this.compactTaskBoardSnapshot(text),
|
|
655
|
+
dedup: true,
|
|
656
|
+
};
|
|
657
|
+
}
|
|
658
|
+
if (kind === 'agent_report') {
|
|
659
|
+
return {
|
|
660
|
+
category: 'agent_report',
|
|
661
|
+
text: this.compactAgentReport(text),
|
|
662
|
+
dedup: false,
|
|
663
|
+
};
|
|
664
|
+
}
|
|
665
|
+
if (message.role === 'tool') {
|
|
666
|
+
return {
|
|
667
|
+
category: 'tool',
|
|
668
|
+
text: this.compactToolOutput(text),
|
|
669
|
+
dedup: false,
|
|
670
|
+
};
|
|
671
|
+
}
|
|
672
|
+
return {
|
|
673
|
+
category: 'message',
|
|
674
|
+
text: this.compactPlainText(text, 640),
|
|
675
|
+
dedup: false,
|
|
676
|
+
};
|
|
677
|
+
}
|
|
678
|
+
compactTaskBoardSnapshot(text) {
|
|
679
|
+
// 确定性 head/tail 窗口:任务看板快照的结构(统计行 + 已完成 + 失败任务列表)天然头尾最重要
|
|
680
|
+
// ——头部是汇总统计、尾部是最近失败任务。不再用 9 个硬编码中文行首前缀挑行(禁止启发式)。
|
|
681
|
+
const lines = text.split('\n').map((l) => l.trim()).filter(Boolean);
|
|
682
|
+
if (lines.length === 0)
|
|
683
|
+
return this.limitText(text, 480);
|
|
684
|
+
const selected = this.pickImportantLines(lines, 18);
|
|
685
|
+
return this.limitText(selected.join('\n'), 480);
|
|
686
|
+
}
|
|
687
|
+
compactAgentReport(text) {
|
|
688
|
+
const lines = text.split('\n').map((l) => l.trim()).filter(Boolean);
|
|
689
|
+
const preferred = this.pickImportantLines(lines, 16);
|
|
690
|
+
const merged = preferred.length > 0 ? preferred : lines.slice(0, 12);
|
|
691
|
+
return this.limitText(merged.join('\n'), 900);
|
|
692
|
+
}
|
|
693
|
+
compactToolOutput(text) {
|
|
694
|
+
const lines = text.split('\n').map((l) => l.trim()).filter(Boolean);
|
|
695
|
+
const important = this.pickImportantLines(lines, 18);
|
|
696
|
+
const head = lines.slice(0, 4);
|
|
697
|
+
const tail = lines.slice(-3);
|
|
698
|
+
const merged = this.uniqueLines([...head, ...important, ...tail]);
|
|
699
|
+
return this.limitText(merged.join('\n'), this.recordCharBudget());
|
|
700
|
+
}
|
|
701
|
+
recordCharBudget() {
|
|
702
|
+
return Math.max(1, Math.floor(this.options.maxTokens / Math.max(1, this.effectiveMaxRecentMessageCount())));
|
|
703
|
+
}
|
|
704
|
+
compactPlainText(text, maxChars) {
|
|
705
|
+
if (text.length <= maxChars)
|
|
706
|
+
return text;
|
|
707
|
+
const lines = text.split('\n').map((l) => l.trim()).filter(Boolean);
|
|
708
|
+
const important = this.pickImportantLines(lines, 12);
|
|
709
|
+
const head = lines.slice(0, 4);
|
|
710
|
+
const tail = lines.slice(-2);
|
|
711
|
+
const merged = this.uniqueLines([...head, ...important, ...tail]).join('\n');
|
|
712
|
+
return this.limitText(merged || text, maxChars);
|
|
713
|
+
}
|
|
714
|
+
pickImportantLines(lines, maxItems) {
|
|
715
|
+
return pickImportantLines(lines, maxItems);
|
|
716
|
+
}
|
|
717
|
+
uniqueLines(lines) {
|
|
718
|
+
return uniqueLines(lines);
|
|
719
|
+
}
|
|
720
|
+
limitText(text, maxChars) {
|
|
721
|
+
if (text.length <= maxChars)
|
|
722
|
+
return text;
|
|
723
|
+
return `${text.slice(0, maxChars)}\n... [截断 ${text.length - maxChars} 字符]`;
|
|
724
|
+
}
|
|
725
|
+
// ─── 摘要构建 ───────────────────────────────────────────────────────────
|
|
726
|
+
buildDeterministicSummary(records, title = 'LLM 压缩回退摘要') {
|
|
727
|
+
const routeHistory = this.readRouteHistory();
|
|
728
|
+
const skillHistory = this.readSelectedSkillHistory();
|
|
729
|
+
const byCategory = records.reduce((acc, record) => {
|
|
730
|
+
acc[record.category] = (acc[record.category] || 0) + 1;
|
|
731
|
+
return acc;
|
|
732
|
+
}, {});
|
|
733
|
+
const highlights = this.buildDeterministicHighlights(records);
|
|
734
|
+
return [
|
|
735
|
+
'## 对话分层记忆',
|
|
736
|
+
'',
|
|
737
|
+
`- 模式: ${title}`,
|
|
738
|
+
`- 作用域: ${this.options.owner.kind}${this.options.owner.agentName ? `/${this.options.owner.agentName}` : ''}`,
|
|
739
|
+
this.options.sessionId ? `- 会话: ${this.options.sessionId}` : '',
|
|
740
|
+
`- 记录数: ${records.length}`,
|
|
741
|
+
`- 类别统计: ${Object.entries(byCategory).map(([key, value]) => `${key}=${value}`).join(', ')}`,
|
|
742
|
+
routeHistory ? `- Leader route history: ${routeHistory}` : '',
|
|
743
|
+
skillHistory ? `- Leader selected skills: ${skillHistory}` : '',
|
|
744
|
+
'',
|
|
745
|
+
'### 关键记录',
|
|
746
|
+
highlights || '- 无',
|
|
747
|
+
].filter(Boolean).join('\n');
|
|
748
|
+
}
|
|
749
|
+
buildDeterministicHighlights(records) {
|
|
750
|
+
const selected = new Map();
|
|
751
|
+
const add = (record) => selected.set(record.id, record);
|
|
752
|
+
records.slice(0, DETERMINISTIC_HEAD_RECORDS).forEach(add);
|
|
753
|
+
records.forEach((record) => {
|
|
754
|
+
// 结构化保留:user 消息 + 非 message 类别(tool/tool_call/task_board/agent_report)。
|
|
755
|
+
// 泛 message 中段仅靠 head/tail 窗口覆盖,不再用关键词/文件扩展名正则挑行(禁止启发式)。
|
|
756
|
+
if (record.role === 'user' || record.category !== 'message') {
|
|
757
|
+
add(record);
|
|
758
|
+
}
|
|
759
|
+
});
|
|
760
|
+
records.slice(-DETERMINISTIC_TAIL_RECORDS).forEach(add);
|
|
761
|
+
const ordered = Array.from(selected.values()).sort((a, b) => Number(a.id.slice(2)) - Number(b.id.slice(2)));
|
|
762
|
+
const lines = [];
|
|
763
|
+
let usedChars = 0;
|
|
764
|
+
let omitted = 0;
|
|
765
|
+
for (const record of ordered) {
|
|
766
|
+
const line = `- [${record.id}][${record.role}/${record.category}] ${record.text}`;
|
|
767
|
+
if (usedChars + line.length > DETERMINISTIC_SUMMARY_CHAR_BUDGET) {
|
|
768
|
+
omitted++;
|
|
769
|
+
continue;
|
|
770
|
+
}
|
|
771
|
+
lines.push(line);
|
|
772
|
+
usedChars += line.length;
|
|
773
|
+
}
|
|
774
|
+
if (omitted > 0) {
|
|
775
|
+
lines.push(`- [...][system] 因摘要预算限制省略 ${omitted} 条低优先级记录;完整原文已写入压缩归档。`);
|
|
776
|
+
}
|
|
777
|
+
return lines.join('\n');
|
|
778
|
+
}
|
|
779
|
+
async buildHierarchicalSummary(records, archivePath) {
|
|
780
|
+
if (!this.options.llmClient) {
|
|
781
|
+
return this.buildDeterministicSummary(records, 'LLM 不可用回退');
|
|
782
|
+
}
|
|
783
|
+
const singlePassSource = this.recordsToSummaryText(records);
|
|
784
|
+
const singlePassPrompt = this.buildSummaryPrompt(singlePassSource, 1, 1, 1, true);
|
|
785
|
+
if (this.canUseSinglePassSummary(singlePassPrompt)) {
|
|
786
|
+
this.emitCompacting('progress', 'llm_summary', {
|
|
787
|
+
index: 1,
|
|
788
|
+
total: 1,
|
|
789
|
+
percent: 40,
|
|
790
|
+
label: 'Summarizing conversation in one pass',
|
|
791
|
+
});
|
|
792
|
+
// 单次 LLM 压缩失败不回退分块递归,直接抛错让上层感知
|
|
793
|
+
const finalSummarySource = await this.callSummaryLlm(singlePassPrompt, singlePassSource, 1, 'SinglePass');
|
|
794
|
+
return this.wrapSummaryResult(records, finalSummarySource, archivePath, '单次 LLM 摘要');
|
|
795
|
+
}
|
|
796
|
+
return this.buildChunkedHierarchicalSummary(records, archivePath);
|
|
797
|
+
}
|
|
798
|
+
async buildChunkedHierarchicalSummary(records, archivePath) {
|
|
799
|
+
let layer = this.chunkRecordTexts(records).map((chunk) => chunk.join('\n\n'));
|
|
800
|
+
let depth = 1;
|
|
801
|
+
while (layer.length > 1 && depth <= MAX_SUMMARY_DEPTH) {
|
|
802
|
+
const next = [];
|
|
803
|
+
for (let i = 0; i < layer.length; i++) {
|
|
804
|
+
const layerSpan = 70 / MAX_SUMMARY_DEPTH;
|
|
805
|
+
const percent = Math.min(88, Math.round(16 + (depth - 1) * layerSpan + ((i + 1) / layer.length) * layerSpan));
|
|
806
|
+
this.emitCompacting('progress', 'llm_summary', {
|
|
807
|
+
index: i + 1,
|
|
808
|
+
total: layer.length,
|
|
809
|
+
percent,
|
|
810
|
+
label: `Summarizing chunk ${i + 1}/${layer.length}`,
|
|
811
|
+
});
|
|
812
|
+
next.push(await this.summarizeChunk(layer[i], depth, i + 1, layer.length));
|
|
813
|
+
}
|
|
814
|
+
layer = this.groupChunkTexts(next);
|
|
815
|
+
depth += 1;
|
|
816
|
+
}
|
|
817
|
+
const finalSummarySource = layer.length === 1
|
|
818
|
+
? await (async () => {
|
|
819
|
+
this.emitCompacting('progress', 'llm_summary', {
|
|
820
|
+
index: 1,
|
|
821
|
+
total: 1,
|
|
822
|
+
percent: 90,
|
|
823
|
+
label: 'Merging final summary',
|
|
824
|
+
});
|
|
825
|
+
return this.summarizeChunk(layer[0], depth, 1, 1, true);
|
|
826
|
+
})()
|
|
827
|
+
: (() => {
|
|
828
|
+
throw new Error('LLM 压缩失败:分块层级超过最大深度,无法合并最终摘要(本地算法已禁用)');
|
|
829
|
+
})();
|
|
830
|
+
return this.wrapSummaryResult(records, finalSummarySource, archivePath, '默认 LLM 分块/递归摘要');
|
|
831
|
+
}
|
|
832
|
+
recordsToSummaryText(records) {
|
|
833
|
+
return records.map((record) => `[${record.id}][${record.role}/${record.category}] ${record.text}`).join('\n\n');
|
|
834
|
+
}
|
|
835
|
+
canUseSinglePassSummary(prompt) {
|
|
836
|
+
if (countTokens(prompt) > this.options.maxTokens)
|
|
837
|
+
return false;
|
|
838
|
+
const byteThreshold = this.byteThreshold();
|
|
839
|
+
return !Number.isFinite(byteThreshold) || Buffer.byteLength(prompt, 'utf8') <= byteThreshold;
|
|
840
|
+
}
|
|
841
|
+
wrapSummaryResult(records, finalSummarySource, archivePath, mode) {
|
|
842
|
+
const evidence = records
|
|
843
|
+
.filter((record) => record.category !== 'message')
|
|
844
|
+
.slice(-MAX_EVIDENCE_ITEMS)
|
|
845
|
+
.map((record) => `- [${record.id}][${record.category}] ${this.limitText(record.text, 220)}`)
|
|
846
|
+
.join('\n') || '- 无额外证据';
|
|
847
|
+
return [
|
|
848
|
+
'## 对话分层摘要 (已压缩)',
|
|
849
|
+
'',
|
|
850
|
+
`- 压缩模式: ${mode}`,
|
|
851
|
+
`- 作用域: ${this.options.owner.kind}${this.options.owner.agentName ? `/${this.options.owner.agentName}` : ''}`,
|
|
852
|
+
this.options.sessionId ? `- 会话: ${this.options.sessionId}` : '',
|
|
853
|
+
archivePath ? `- 压缩归档: ${archivePath}` : '',
|
|
854
|
+
'',
|
|
855
|
+
finalSummarySource.trim(),
|
|
856
|
+
'',
|
|
857
|
+
'### 关键证据片段',
|
|
858
|
+
evidence,
|
|
859
|
+
].filter(Boolean).join('\n');
|
|
860
|
+
}
|
|
861
|
+
summaryChunkTokenBudget() {
|
|
862
|
+
return Math.max(1, this.options.maxTokens);
|
|
863
|
+
}
|
|
864
|
+
chunkRecordTexts(records) {
|
|
865
|
+
const chunks = [];
|
|
866
|
+
let currentChunk = [];
|
|
867
|
+
let currentTokens = 0;
|
|
868
|
+
const chunkTokenBudget = this.summaryChunkTokenBudget();
|
|
869
|
+
for (const record of records) {
|
|
870
|
+
const line = `[${record.id}][${record.role}/${record.category}] ${record.text}`;
|
|
871
|
+
const lineTokens = countTokens(line);
|
|
872
|
+
if (currentChunk.length > 0 && currentTokens + lineTokens > chunkTokenBudget) {
|
|
873
|
+
chunks.push(currentChunk);
|
|
874
|
+
currentChunk = [];
|
|
875
|
+
currentTokens = 0;
|
|
876
|
+
}
|
|
877
|
+
currentChunk.push(line);
|
|
878
|
+
currentTokens += lineTokens;
|
|
879
|
+
}
|
|
880
|
+
if (currentChunk.length > 0)
|
|
881
|
+
chunks.push(currentChunk);
|
|
882
|
+
return chunks;
|
|
883
|
+
}
|
|
884
|
+
groupChunkTexts(texts) {
|
|
885
|
+
const groups = [];
|
|
886
|
+
let current = '';
|
|
887
|
+
let currentTokens = 0;
|
|
888
|
+
const chunkTokenBudget = this.summaryChunkTokenBudget();
|
|
889
|
+
for (const text of texts) {
|
|
890
|
+
const nextText = `${current ? `${current}\n\n` : ''}${text}`;
|
|
891
|
+
const nextTokens = countTokens(text);
|
|
892
|
+
if (current && currentTokens + nextTokens > chunkTokenBudget) {
|
|
893
|
+
groups.push(current);
|
|
894
|
+
current = text;
|
|
895
|
+
currentTokens = nextTokens;
|
|
896
|
+
}
|
|
897
|
+
else {
|
|
898
|
+
current = nextText;
|
|
899
|
+
currentTokens += nextTokens;
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
if (current)
|
|
903
|
+
groups.push(current);
|
|
904
|
+
return groups;
|
|
905
|
+
}
|
|
906
|
+
buildSummaryPrompt(chunkText, depth, index, total, finalPass = false) {
|
|
907
|
+
return [
|
|
908
|
+
'你正在为一个 Agent Orchestration 压缩历史上下文。',
|
|
909
|
+
'请只根据给定记录生成 grounded summary,事实范围限定为记录中已出现的信息。',
|
|
910
|
+
'必须保留:用户目标、任务 ID、文件路径、命令/工具、错误、未完成事项、会话边界信息。',
|
|
911
|
+
'如果信息缺失,直接写"未知"。',
|
|
912
|
+
finalPass
|
|
913
|
+
? '这一步是最终汇总,请合并重复项并突出后续继续工作真正需要的事实。'
|
|
914
|
+
: `当前正在处理第 ${index}/${total} 个摘要分块,层级 ${depth}。`,
|
|
915
|
+
'',
|
|
916
|
+
'输出格式:',
|
|
917
|
+
'## 用户目标',
|
|
918
|
+
'## 已完成工作',
|
|
919
|
+
'## 关键文件/命令/错误',
|
|
920
|
+
'## 未解决事项',
|
|
921
|
+
'',
|
|
922
|
+
'记录如下:',
|
|
923
|
+
chunkText,
|
|
924
|
+
].join('\n');
|
|
925
|
+
}
|
|
926
|
+
async callSummaryLlm(prompt, fallbackText, depth, actorLabelSuffix) {
|
|
927
|
+
const owner = this.options.owner;
|
|
928
|
+
const actorLabelBase = owner.kind === 'agent'
|
|
929
|
+
? `Agent-${owner.agentName || owner.agentId || 'unknown'}-ContextSummary`
|
|
930
|
+
: 'Leader-ContextSummary';
|
|
931
|
+
const actorLabel = actorLabelSuffix ? `${actorLabelBase}-${actorLabelSuffix}` : actorLabelBase;
|
|
932
|
+
const guardFactory = this.options.llmGuardFactory;
|
|
933
|
+
if (!this.options.llmClient || !guardFactory) {
|
|
934
|
+
throw new Error('LLM 压缩失败:LLM 客户端或 Guard Factory 未配置(本地算法已禁用)');
|
|
935
|
+
}
|
|
936
|
+
const guard = guardFactory({
|
|
937
|
+
actorLabel,
|
|
938
|
+
maxRetries: 2,
|
|
939
|
+
cbScope: `context_summary::${owner.kind}::${owner.agentId || 'leader'}`,
|
|
940
|
+
});
|
|
941
|
+
const response = await guard.call(this.options.llmClient, [{ role: 'user', content: prompt }], this.options.model, undefined, false, undefined, undefined, {
|
|
942
|
+
actorType: owner.kind === 'agent' ? 'agent' : 'leader',
|
|
943
|
+
actorLabel,
|
|
944
|
+
purpose: 'summary',
|
|
945
|
+
sessionId: this.options.sessionId,
|
|
946
|
+
agentId: owner.agentId,
|
|
947
|
+
agentName: owner.agentName,
|
|
948
|
+
requestedModel: this.options.model,
|
|
949
|
+
},
|
|
950
|
+
// 防漂移:压缩摘要走确定性温度,减少上下文压缩本身引入的漂移源
|
|
951
|
+
getReasoningGenerateOptions());
|
|
952
|
+
const content = contentToPlainText(response.content);
|
|
953
|
+
if (!content) {
|
|
954
|
+
throw new Error('LLM 压缩失败:返回空内容(本地算法已禁用)');
|
|
955
|
+
}
|
|
956
|
+
return content;
|
|
957
|
+
}
|
|
958
|
+
async summarizeChunk(chunkText, depth, index, total, finalPass = false) {
|
|
959
|
+
if (!this.options.llmClient) {
|
|
960
|
+
throw new Error('LLM 压缩失败:LLM 客户端未配置(本地算法已禁用)');
|
|
961
|
+
}
|
|
962
|
+
const prompt = this.buildSummaryPrompt(chunkText, depth, index, total, finalPass);
|
|
963
|
+
// SDK 600s 总超时是唯一权威;不再叠加本地短 timeout(本地短超时只会在 LLM 真正成功前先触发降级)。
|
|
964
|
+
try {
|
|
965
|
+
return await this.callSummaryLlm(prompt, chunkText, depth);
|
|
966
|
+
}
|
|
967
|
+
catch (error) {
|
|
968
|
+
coreLogger.warn(`${this.options.sessionId} LLM 语义压缩失败 (depth=${depth}),不回退本地算法: ${error instanceof Error ? error.message : error}`);
|
|
969
|
+
throw error;
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
// ─── 归档 ───────────────────────────────────────────────────────────────
|
|
973
|
+
async writeCompressionArchive(middleMessages, records, summary) {
|
|
974
|
+
const owner = this.options.owner;
|
|
975
|
+
if (!owner.workspace || !this.options.sessionId)
|
|
976
|
+
return undefined;
|
|
977
|
+
try {
|
|
978
|
+
const scopeDir = owner.kind === 'agent'
|
|
979
|
+
? join(owner.workspace, '.lingxiao', 'sessions', this.options.sessionId, 'context', 'agents', owner.agentId || 'unknown')
|
|
980
|
+
: join(owner.workspace, '.lingxiao', 'sessions', this.options.sessionId, 'context', 'leader');
|
|
981
|
+
mkdirSync(scopeDir, { recursive: true });
|
|
982
|
+
const safeOwner = (owner.agentName || owner.agentId || owner.kind)
|
|
983
|
+
.replace(/[^a-zA-Z0-9_-]+/g, '_');
|
|
984
|
+
const filePath = join(scopeDir, `compact-${Date.now()}-${safeOwner}.md`);
|
|
985
|
+
const originalMessages = middleMessages
|
|
986
|
+
.map((message, index) => `### M-${index + 1} [${message.role}]\n${this.stringifyMessage(message) || '(empty)'}`)
|
|
987
|
+
.join('\n\n');
|
|
988
|
+
const recordText = records
|
|
989
|
+
.map((record) => `- [${record.id}][${record.role}/${record.category}] ${record.text}`)
|
|
990
|
+
.join('\n');
|
|
991
|
+
const content = [
|
|
992
|
+
'# Context Compression Archive',
|
|
993
|
+
'',
|
|
994
|
+
'<!-- lingxiao-context-archive',
|
|
995
|
+
JSON.stringify({
|
|
996
|
+
sessionId: this.options.sessionId,
|
|
997
|
+
owner: owner.kind,
|
|
998
|
+
agentId: owner.agentId,
|
|
999
|
+
agentName: owner.agentName,
|
|
1000
|
+
createdAt: new Date().toISOString(),
|
|
1001
|
+
recordCount: records.length,
|
|
1002
|
+
categories: records.reduce((acc, record) => {
|
|
1003
|
+
acc[record.category] = (acc[record.category] || 0) + 1;
|
|
1004
|
+
return acc;
|
|
1005
|
+
}, {}),
|
|
1006
|
+
}),
|
|
1007
|
+
'-->',
|
|
1008
|
+
'',
|
|
1009
|
+
`- session_id: ${this.options.sessionId}`,
|
|
1010
|
+
`- owner: ${owner.kind}${owner.agentName ? `/${owner.agentName}` : ''}`,
|
|
1011
|
+
`- created_at: ${new Date().toISOString()}`,
|
|
1012
|
+
owner.kind === 'leader' ? `- leader_route_history: ${this.readRouteHistory() || 'none'}` : '',
|
|
1013
|
+
owner.kind === 'leader' ? `- leader_selected_skills_history: ${this.readSelectedSkillHistory() || 'none'}` : '',
|
|
1014
|
+
'',
|
|
1015
|
+
'## Compression Records',
|
|
1016
|
+
recordText || '(empty)',
|
|
1017
|
+
'',
|
|
1018
|
+
'## Summary',
|
|
1019
|
+
summary,
|
|
1020
|
+
'',
|
|
1021
|
+
'## Original Messages',
|
|
1022
|
+
originalMessages || '(empty)',
|
|
1023
|
+
'',
|
|
1024
|
+
].join('\n');
|
|
1025
|
+
await fsp.writeFile(filePath, content, 'utf-8');
|
|
1026
|
+
this.purgeOldArchives(scopeDir);
|
|
1027
|
+
return filePath;
|
|
1028
|
+
}
|
|
1029
|
+
catch (error) {
|
|
1030
|
+
coreLogger.warn(`写入压缩归档失败: ${error instanceof Error ? error.message : error}`);
|
|
1031
|
+
return undefined;
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
purgeOldArchives(dir) {
|
|
1035
|
+
try {
|
|
1036
|
+
const files = readdirSync(dir).filter((f) => (f.startsWith('compact-') || f.startsWith('oversized-')) && f.endsWith('.md'));
|
|
1037
|
+
if (files.length <= POST_COMPACT_MAX_FILES)
|
|
1038
|
+
return;
|
|
1039
|
+
files.sort();
|
|
1040
|
+
const toDelete = files.slice(0, files.length - POST_COMPACT_MAX_FILES);
|
|
1041
|
+
for (const file of toDelete) {
|
|
1042
|
+
try {
|
|
1043
|
+
unlinkSync(join(dir, file));
|
|
1044
|
+
}
|
|
1045
|
+
catch (e) {
|
|
1046
|
+
coreLogger.warn(`[CompressionPipeline] 删除旧归档失败 ${file}: ${e}`);
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
catch (e) {
|
|
1051
|
+
coreLogger.warn(`[CompressionPipeline] 清理归档失败: ${e}`);
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1054
|
+
// ─── DB 元数据读取 ─────────────────────────────────────────────────────
|
|
1055
|
+
readRouteHistory() {
|
|
1056
|
+
if (!this.options.db || !this.options.sessionId || this.options.owner.kind !== 'leader')
|
|
1057
|
+
return '';
|
|
1058
|
+
const history = this.options.db.getSessionState(this.options.sessionId, SESSION_KEYS.LEADER_ROUTE_HISTORY);
|
|
1059
|
+
if (!Array.isArray(history) || history.length === 0)
|
|
1060
|
+
return '';
|
|
1061
|
+
return history
|
|
1062
|
+
.slice(-5)
|
|
1063
|
+
.map((item) => {
|
|
1064
|
+
const mode = typeof item?.mode === 'string' ? item.mode : 'unknown';
|
|
1065
|
+
const reason = typeof item?.reason === 'string' ? item.reason : '';
|
|
1066
|
+
return `${mode}: ${reason}`;
|
|
1067
|
+
})
|
|
1068
|
+
.join(' | ');
|
|
1069
|
+
}
|
|
1070
|
+
readSelectedSkillHistory() {
|
|
1071
|
+
if (!this.options.db || !this.options.sessionId || this.options.owner.kind !== 'leader')
|
|
1072
|
+
return '';
|
|
1073
|
+
const history = this.options.db.getSessionState(this.options.sessionId, SESSION_KEYS.LEADER_SELECTED_SKILLS_HISTORY);
|
|
1074
|
+
if (!Array.isArray(history) || history.length === 0)
|
|
1075
|
+
return '';
|
|
1076
|
+
return history
|
|
1077
|
+
.slice(-5)
|
|
1078
|
+
.map((item) => {
|
|
1079
|
+
const roleName = typeof item?.role_name === 'string' ? item.role_name : 'unknown-role';
|
|
1080
|
+
const skills = Array.isArray(item?.skills) ? item.skills.join(', ') : '';
|
|
1081
|
+
return `${roleName}: ${skills || '(none)'}`;
|
|
1082
|
+
})
|
|
1083
|
+
.join(' | ');
|
|
1084
|
+
}
|
|
1085
|
+
// ─── 文件快照注入 ─────────────────────────────────────────────────────
|
|
1086
|
+
buildFileAttachments(recentFiles) {
|
|
1087
|
+
if (!recentFiles || recentFiles.size === 0)
|
|
1088
|
+
return '';
|
|
1089
|
+
const sortedFiles = Array.from(recentFiles.entries())
|
|
1090
|
+
.sort((a, b) => b[1].timestamp - a[1].timestamp)
|
|
1091
|
+
.slice(0, POST_COMPACT_MAX_FILES);
|
|
1092
|
+
const result = [];
|
|
1093
|
+
let totalBudget = 0;
|
|
1094
|
+
for (const [path, data] of sortedFiles) {
|
|
1095
|
+
let content = data.content;
|
|
1096
|
+
if (content.length > POST_COMPACT_MAX_TOKENS_PER_FILE * 4) {
|
|
1097
|
+
content = content.slice(0, POST_COMPACT_MAX_TOKENS_PER_FILE * 4) + '\n... (truncated)';
|
|
1098
|
+
}
|
|
1099
|
+
totalBudget += countTokens(content);
|
|
1100
|
+
if (totalBudget > this.effectivePostCompactTokenBudget())
|
|
1101
|
+
break;
|
|
1102
|
+
result.push(`### ${path}\n\`\`\`\n${content}\n\`\`\``);
|
|
1103
|
+
}
|
|
1104
|
+
return result.join('\n\n');
|
|
1105
|
+
}
|
|
1106
|
+
// ─── 二次截断 ───────────────────────────────────────────────────────────
|
|
1107
|
+
truncateToThreshold(messages, pinnedCount) {
|
|
1108
|
+
const withoutFileSnapshots = messages.filter((msg) => msg.metadata?.kind !== 'context_file_snapshot');
|
|
1109
|
+
const minKeep = pinnedCount + 2;
|
|
1110
|
+
let result = withoutFileSnapshots;
|
|
1111
|
+
while (result.length > minKeep) {
|
|
1112
|
+
const summaryIdx = result.findIndex((msg) => msg.metadata?.kind === 'context_summary');
|
|
1113
|
+
const earliestRecentIdx = summaryIdx >= 0 ? summaryIdx + 1 : pinnedCount;
|
|
1114
|
+
if (earliestRecentIdx >= result.length)
|
|
1115
|
+
break;
|
|
1116
|
+
if (result[earliestRecentIdx].role === 'user')
|
|
1117
|
+
break;
|
|
1118
|
+
// P1 修复:保 tool_use ↔ tool_result 配对原子性。
|
|
1119
|
+
// 若被 pop 的 assistant 带 tool_calls,必须连同其所有 role==='tool' 配对一起移除;
|
|
1120
|
+
// 若被 pop 的本身就是孤立 role==='tool'(无前置 tool_calls),直接 pop 即可。
|
|
1121
|
+
const head = result[earliestRecentIdx];
|
|
1122
|
+
const removeIdx = new Set([earliestRecentIdx]);
|
|
1123
|
+
if (head.role === 'assistant' && head.tool_calls?.length) {
|
|
1124
|
+
const toolCallIds = new Set(head.tool_calls.map((c) => c.id));
|
|
1125
|
+
for (let j = earliestRecentIdx + 1; j < result.length; j++) {
|
|
1126
|
+
const m = result[j];
|
|
1127
|
+
if (m.role !== 'tool')
|
|
1128
|
+
break; // 工具结果一般紧随其后;遇到非 tool 即停
|
|
1129
|
+
if (m.tool_call_id && toolCallIds.has(m.tool_call_id)) {
|
|
1130
|
+
removeIdx.add(j);
|
|
1131
|
+
}
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1134
|
+
const next = result.filter((_m, i) => !removeIdx.has(i));
|
|
1135
|
+
// 防御:极端场景下没移除任何消息,跳出避免死循环
|
|
1136
|
+
if (next.length === result.length)
|
|
1137
|
+
break;
|
|
1138
|
+
result = next;
|
|
1139
|
+
}
|
|
1140
|
+
return result;
|
|
1141
|
+
}
|
|
1142
|
+
}
|
|
1143
|
+
//# sourceMappingURL=CompressionPipeline.js.map
|