actoviq-agent-sdk 0.4.8 → 0.4.9
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/CHANGELOG.md +35 -0
- package/README-zh.md +2 -7
- package/README.md +2 -7
- package/SECURITY.md +1 -1
- package/bin/actoviq-app-server.js +5 -0
- package/dist/src/app-server/appServer.d.ts +14 -0
- package/dist/src/app-server/appServer.d.ts.map +1 -0
- package/dist/src/app-server/appServer.js +228 -0
- package/dist/src/app-server/appServer.js.map +1 -0
- package/dist/src/app-server/cli.d.ts +3 -0
- package/dist/src/app-server/cli.d.ts.map +1 -0
- package/dist/src/app-server/cli.js +29 -0
- package/dist/src/app-server/cli.js.map +1 -0
- package/dist/src/app-server/index.d.ts +5 -0
- package/dist/src/app-server/index.d.ts.map +1 -0
- package/dist/src/app-server/index.js +5 -0
- package/dist/src/app-server/index.js.map +1 -0
- package/dist/src/app-server/protocol.d.ts +24 -0
- package/dist/src/app-server/protocol.d.ts.map +1 -0
- package/dist/src/app-server/protocol.js +14 -0
- package/dist/src/app-server/protocol.js.map +1 -0
- package/dist/src/app-server/transports/stdioTransport.d.ts +11 -0
- package/dist/src/app-server/transports/stdioTransport.d.ts.map +1 -0
- package/dist/src/app-server/transports/stdioTransport.js +37 -0
- package/dist/src/app-server/transports/stdioTransport.js.map +1 -0
- package/dist/src/app-server/transports/webSocketTransport.d.ts +13 -0
- package/dist/src/app-server/transports/webSocketTransport.d.ts.map +1 -0
- package/dist/src/app-server/transports/webSocketTransport.js +43 -0
- package/dist/src/app-server/transports/webSocketTransport.js.map +1 -0
- package/dist/src/checkpoint/checkpointTools.d.ts +8 -0
- package/dist/src/checkpoint/checkpointTools.d.ts.map +1 -0
- package/dist/src/checkpoint/checkpointTools.js +36 -0
- package/dist/src/checkpoint/checkpointTools.js.map +1 -0
- package/dist/src/checkpoint/fileChangeJournal.d.ts +15 -0
- package/dist/src/checkpoint/fileChangeJournal.d.ts.map +1 -0
- package/dist/src/checkpoint/fileChangeJournal.js +16 -0
- package/dist/src/checkpoint/fileChangeJournal.js.map +1 -0
- package/dist/src/checkpoint/fileCheckpointService.d.ts +46 -0
- package/dist/src/checkpoint/fileCheckpointService.d.ts.map +1 -0
- package/dist/src/checkpoint/fileCheckpointService.js +318 -0
- package/dist/src/checkpoint/fileCheckpointService.js.map +1 -0
- package/dist/src/checkpoint/index.d.ts +5 -0
- package/dist/src/checkpoint/index.d.ts.map +1 -0
- package/dist/src/checkpoint/index.js +5 -0
- package/dist/src/checkpoint/index.js.map +1 -0
- package/dist/src/checkpoint/types.d.ts +64 -0
- package/dist/src/checkpoint/types.d.ts.map +1 -0
- package/dist/src/checkpoint/types.js +2 -0
- package/dist/src/checkpoint/types.js.map +1 -0
- package/dist/src/cli/actoviq-react.js +613 -18
- package/dist/src/cli/actoviq-react.js.map +1 -1
- package/dist/src/codeIntel/codeIntelligenceService.d.ts +26 -0
- package/dist/src/codeIntel/codeIntelligenceService.d.ts.map +1 -0
- package/dist/src/codeIntel/codeIntelligenceService.js +195 -0
- package/dist/src/codeIntel/codeIntelligenceService.js.map +1 -0
- package/dist/src/codeIntel/codeIntelligenceTools.d.ts +4 -0
- package/dist/src/codeIntel/codeIntelligenceTools.d.ts.map +1 -0
- package/dist/src/codeIntel/codeIntelligenceTools.js +36 -0
- package/dist/src/codeIntel/codeIntelligenceTools.js.map +1 -0
- package/dist/src/codeIntel/index.d.ts +6 -0
- package/dist/src/codeIntel/index.d.ts.map +1 -0
- package/dist/src/codeIntel/index.js +6 -0
- package/dist/src/codeIntel/index.js.map +1 -0
- package/dist/src/codeIntel/languageServerRegistry.d.ts +9 -0
- package/dist/src/codeIntel/languageServerRegistry.d.ts.map +1 -0
- package/dist/src/codeIntel/languageServerRegistry.js +49 -0
- package/dist/src/codeIntel/languageServerRegistry.js.map +1 -0
- package/dist/src/codeIntel/lspProcess.d.ts +26 -0
- package/dist/src/codeIntel/lspProcess.d.ts.map +1 -0
- package/dist/src/codeIntel/lspProcess.js +141 -0
- package/dist/src/codeIntel/lspProcess.js.map +1 -0
- package/dist/src/codeIntel/types.d.ts +36 -0
- package/dist/src/codeIntel/types.d.ts.map +1 -0
- package/dist/src/codeIntel/types.js +2 -0
- package/dist/src/codeIntel/types.js.map +1 -0
- package/dist/src/config/resolveRuntimeConfig.d.ts.map +1 -1
- package/dist/src/config/resolveRuntimeConfig.js +65 -2
- package/dist/src/config/resolveRuntimeConfig.js.map +1 -1
- package/dist/src/context/ruleCommandService.d.ts +14 -0
- package/dist/src/context/ruleCommandService.d.ts.map +1 -0
- package/dist/src/context/ruleCommandService.js +54 -0
- package/dist/src/context/ruleCommandService.js.map +1 -0
- package/dist/src/context/ruleResolver.d.ts +3 -0
- package/dist/src/context/ruleResolver.d.ts.map +1 -0
- package/dist/src/context/ruleResolver.js +27 -0
- package/dist/src/context/ruleResolver.js.map +1 -0
- package/dist/src/context/ruleStore.d.ts +11 -0
- package/dist/src/context/ruleStore.d.ts.map +1 -0
- package/dist/src/context/ruleStore.js +76 -0
- package/dist/src/context/ruleStore.js.map +1 -0
- package/dist/src/context/ruleTypes.d.ts +16 -0
- package/dist/src/context/ruleTypes.d.ts.map +1 -0
- package/dist/src/context/ruleTypes.js +2 -0
- package/dist/src/context/ruleTypes.js.map +1 -0
- package/dist/src/goal/goalPrompt.d.ts +16 -0
- package/dist/src/goal/goalPrompt.d.ts.map +1 -0
- package/dist/src/goal/goalPrompt.js +51 -0
- package/dist/src/goal/goalPrompt.js.map +1 -0
- package/dist/src/goal/goalService.d.ts +92 -0
- package/dist/src/goal/goalService.d.ts.map +1 -0
- package/dist/src/goal/goalService.js +291 -0
- package/dist/src/goal/goalService.js.map +1 -0
- package/dist/src/goal/goalStore.d.ts +82 -0
- package/dist/src/goal/goalStore.d.ts.map +1 -0
- package/dist/src/goal/goalStore.js +231 -0
- package/dist/src/goal/goalStore.js.map +1 -0
- package/dist/src/goal/goalTools.d.ts +12 -0
- package/dist/src/goal/goalTools.d.ts.map +1 -0
- package/dist/src/goal/goalTools.js +131 -0
- package/dist/src/goal/goalTools.js.map +1 -0
- package/dist/src/goal/index.d.ts +15 -0
- package/dist/src/goal/index.d.ts.map +1 -0
- package/dist/src/goal/index.js +6 -0
- package/dist/src/goal/index.js.map +1 -0
- package/dist/src/goal/types.d.ts +89 -0
- package/dist/src/goal/types.d.ts.map +1 -0
- package/dist/src/goal/types.js +16 -0
- package/dist/src/goal/types.js.map +1 -0
- package/dist/src/gui/actoviqGui.d.ts +3 -0
- package/dist/src/gui/actoviqGui.d.ts.map +1 -1
- package/dist/src/gui/actoviqGui.js +3893 -1025
- package/dist/src/gui/actoviqGui.js.map +1 -1
- package/dist/src/gui/electronMain.js +34 -1
- package/dist/src/gui/electronMain.js.map +1 -1
- package/dist/src/gui/workspaceRegistry.d.ts +14 -0
- package/dist/src/gui/workspaceRegistry.d.ts.map +1 -1
- package/dist/src/gui/workspaceRegistry.js +138 -11
- package/dist/src/gui/workspaceRegistry.js.map +1 -1
- package/dist/src/hooks/handlers/commandHook.d.ts +3 -0
- package/dist/src/hooks/handlers/commandHook.d.ts.map +1 -0
- package/dist/src/hooks/handlers/commandHook.js +28 -0
- package/dist/src/hooks/handlers/commandHook.js.map +1 -0
- package/dist/src/hooks/handlers/httpHook.d.ts +3 -0
- package/dist/src/hooks/handlers/httpHook.d.ts.map +1 -0
- package/dist/src/hooks/handlers/httpHook.js +29 -0
- package/dist/src/hooks/handlers/httpHook.js.map +1 -0
- package/dist/src/hooks/handlers/promptHook.d.ts +8 -0
- package/dist/src/hooks/handlers/promptHook.d.ts.map +1 -0
- package/dist/src/hooks/handlers/promptHook.js +13 -0
- package/dist/src/hooks/handlers/promptHook.js.map +1 -0
- package/dist/src/hooks/hookConfig.d.ts +6 -0
- package/dist/src/hooks/hookConfig.d.ts.map +1 -0
- package/dist/src/hooks/hookConfig.js +78 -0
- package/dist/src/hooks/hookConfig.js.map +1 -0
- package/dist/src/hooks/hookRunner.d.ts +14 -0
- package/dist/src/hooks/hookRunner.d.ts.map +1 -0
- package/dist/src/hooks/hookRunner.js +77 -0
- package/dist/src/hooks/hookRunner.js.map +1 -0
- package/dist/src/hooks/hookTypes.d.ts +48 -0
- package/dist/src/hooks/hookTypes.d.ts.map +1 -0
- package/dist/src/hooks/hookTypes.js +2 -0
- package/dist/src/hooks/hookTypes.js.map +1 -0
- package/dist/src/index.d.ts +45 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +41 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/manager/assistantGlobalTools.d.ts +56 -0
- package/dist/src/manager/assistantGlobalTools.d.ts.map +1 -0
- package/dist/src/manager/assistantGlobalTools.js +657 -0
- package/dist/src/manager/assistantGlobalTools.js.map +1 -0
- package/dist/src/manager/projectManager.d.ts +5 -1
- package/dist/src/manager/projectManager.d.ts.map +1 -1
- package/dist/src/manager/projectManager.js +21 -14
- package/dist/src/manager/projectManager.js.map +1 -1
- package/dist/src/memory/memoryProposalCommandService.d.ts +13 -0
- package/dist/src/memory/memoryProposalCommandService.d.ts.map +1 -0
- package/dist/src/memory/memoryProposalCommandService.js +36 -0
- package/dist/src/memory/memoryProposalCommandService.js.map +1 -0
- package/dist/src/memory/memoryProposalService.d.ts +33 -0
- package/dist/src/memory/memoryProposalService.d.ts.map +1 -0
- package/dist/src/memory/memoryProposalService.js +121 -0
- package/dist/src/memory/memoryProposalService.js.map +1 -0
- package/dist/src/memory/memoryProposalTools.d.ts +8 -0
- package/dist/src/memory/memoryProposalTools.d.ts.map +1 -0
- package/dist/src/memory/memoryProposalTools.js +35 -0
- package/dist/src/memory/memoryProposalTools.js.map +1 -0
- package/dist/src/plugins/imageGenPlugin.d.ts +30 -0
- package/dist/src/plugins/imageGenPlugin.d.ts.map +1 -0
- package/dist/src/plugins/imageGenPlugin.js +225 -0
- package/dist/src/plugins/imageGenPlugin.js.map +1 -0
- package/dist/src/plugins/managedPluginCatalog.d.ts +5 -2
- package/dist/src/plugins/managedPluginCatalog.d.ts.map +1 -1
- package/dist/src/plugins/managedPluginCatalog.js +86 -6
- package/dist/src/plugins/managedPluginCatalog.js.map +1 -1
- package/dist/src/plugins/managedPluginHealth.d.ts.map +1 -1
- package/dist/src/plugins/managedPluginHealth.js +23 -0
- package/dist/src/plugins/managedPluginHealth.js.map +1 -1
- package/dist/src/plugins/managedPluginRuntime.d.ts.map +1 -1
- package/dist/src/plugins/managedPluginRuntime.js +31 -0
- package/dist/src/plugins/managedPluginRuntime.js.map +1 -1
- package/dist/src/plugins/mediaGenProfiles.d.ts +74 -0
- package/dist/src/plugins/mediaGenProfiles.d.ts.map +1 -0
- package/dist/src/plugins/mediaGenProfiles.js +305 -0
- package/dist/src/plugins/mediaGenProfiles.js.map +1 -0
- package/dist/src/plugins/mediaGenPromptGuidance.d.ts +17 -0
- package/dist/src/plugins/mediaGenPromptGuidance.d.ts.map +1 -0
- package/dist/src/plugins/mediaGenPromptGuidance.js +53 -0
- package/dist/src/plugins/mediaGenPromptGuidance.js.map +1 -0
- package/dist/src/plugins/meshGenPlugin.d.ts +28 -0
- package/dist/src/plugins/meshGenPlugin.d.ts.map +1 -0
- package/dist/src/plugins/meshGenPlugin.js +267 -0
- package/dist/src/plugins/meshGenPlugin.js.map +1 -0
- package/dist/src/plugins/packageManifest.d.ts +16 -0
- package/dist/src/plugins/packageManifest.d.ts.map +1 -0
- package/dist/src/plugins/packageManifest.js +53 -0
- package/dist/src/plugins/packageManifest.js.map +1 -0
- package/dist/src/plugins/pluginLoader.d.ts +9 -0
- package/dist/src/plugins/pluginLoader.d.ts.map +1 -0
- package/dist/src/plugins/pluginLoader.js +32 -0
- package/dist/src/plugins/pluginLoader.js.map +1 -0
- package/dist/src/plugins/pluginManager.d.ts +21 -0
- package/dist/src/plugins/pluginManager.d.ts.map +1 -0
- package/dist/src/plugins/pluginManager.js +119 -0
- package/dist/src/plugins/pluginManager.js.map +1 -0
- package/dist/src/plugins/pluginPackageStore.d.ts +24 -0
- package/dist/src/plugins/pluginPackageStore.d.ts.map +1 -0
- package/dist/src/plugins/pluginPackageStore.js +191 -0
- package/dist/src/plugins/pluginPackageStore.js.map +1 -0
- package/dist/src/plugins/pluginRegistryClient.d.ts +12 -0
- package/dist/src/plugins/pluginRegistryClient.d.ts.map +1 -0
- package/dist/src/plugins/pluginRegistryClient.js +34 -0
- package/dist/src/plugins/pluginRegistryClient.js.map +1 -0
- package/dist/src/plugins/pluginResolver.d.ts +7 -0
- package/dist/src/plugins/pluginResolver.d.ts.map +1 -0
- package/dist/src/plugins/pluginResolver.js +18 -0
- package/dist/src/plugins/pluginResolver.js.map +1 -0
- package/dist/src/plugins/pluginTrustStore.d.ts +16 -0
- package/dist/src/plugins/pluginTrustStore.d.ts.map +1 -0
- package/dist/src/plugins/pluginTrustStore.js +47 -0
- package/dist/src/plugins/pluginTrustStore.js.map +1 -0
- package/dist/src/plugins/videoGenPlugin.d.ts +33 -0
- package/dist/src/plugins/videoGenPlugin.d.ts.map +1 -0
- package/dist/src/plugins/videoGenPlugin.js +299 -0
- package/dist/src/plugins/videoGenPlugin.js.map +1 -0
- package/dist/src/policy/approvalPolicy.d.ts +16 -0
- package/dist/src/policy/approvalPolicy.d.ts.map +1 -0
- package/dist/src/policy/approvalPolicy.js +38 -0
- package/dist/src/policy/approvalPolicy.js.map +1 -0
- package/dist/src/policy/auditLog.d.ts +14 -0
- package/dist/src/policy/auditLog.d.ts.map +1 -0
- package/dist/src/policy/auditLog.js +39 -0
- package/dist/src/policy/auditLog.js.map +1 -0
- package/dist/src/policy/index.d.ts +8 -0
- package/dist/src/policy/index.d.ts.map +1 -0
- package/dist/src/policy/index.js +8 -0
- package/dist/src/policy/index.js.map +1 -0
- package/dist/src/policy/policyLoader.d.ts +7 -0
- package/dist/src/policy/policyLoader.d.ts.map +1 -0
- package/dist/src/policy/policyLoader.js +70 -0
- package/dist/src/policy/policyLoader.js.map +1 -0
- package/dist/src/policy/policyResolver.d.ts +4 -0
- package/dist/src/policy/policyResolver.d.ts.map +1 -0
- package/dist/src/policy/policyResolver.js +67 -0
- package/dist/src/policy/policyResolver.js.map +1 -0
- package/dist/src/policy/policyStore.d.ts +13 -0
- package/dist/src/policy/policyStore.d.ts.map +1 -0
- package/dist/src/policy/policyStore.js +79 -0
- package/dist/src/policy/policyStore.js.map +1 -0
- package/dist/src/policy/runtimePolicy.d.ts +6 -0
- package/dist/src/policy/runtimePolicy.d.ts.map +1 -0
- package/dist/src/policy/runtimePolicy.js +30 -0
- package/dist/src/policy/runtimePolicy.js.map +1 -0
- package/dist/src/policy/types.d.ts +24 -0
- package/dist/src/policy/types.d.ts.map +1 -0
- package/dist/src/policy/types.js +2 -0
- package/dist/src/policy/types.js.map +1 -0
- package/dist/src/remote/artifactTransfer.d.ts +17 -0
- package/dist/src/remote/artifactTransfer.d.ts.map +1 -0
- package/dist/src/remote/artifactTransfer.js +52 -0
- package/dist/src/remote/artifactTransfer.js.map +1 -0
- package/dist/src/remote/index.d.ts +6 -0
- package/dist/src/remote/index.d.ts.map +1 -0
- package/dist/src/remote/index.js +6 -0
- package/dist/src/remote/index.js.map +1 -0
- package/dist/src/remote/localWorkerServer.d.ts +15 -0
- package/dist/src/remote/localWorkerServer.d.ts.map +1 -0
- package/dist/src/remote/localWorkerServer.js +33 -0
- package/dist/src/remote/localWorkerServer.js.map +1 -0
- package/dist/src/remote/protocol.d.ts +63 -0
- package/dist/src/remote/protocol.d.ts.map +1 -0
- package/dist/src/remote/protocol.js +46 -0
- package/dist/src/remote/protocol.js.map +1 -0
- package/dist/src/remote/remoteJobStore.d.ts +21 -0
- package/dist/src/remote/remoteJobStore.d.ts.map +1 -0
- package/dist/src/remote/remoteJobStore.js +175 -0
- package/dist/src/remote/remoteJobStore.js.map +1 -0
- package/dist/src/remote/remoteWorkerClient.d.ts +15 -0
- package/dist/src/remote/remoteWorkerClient.d.ts.map +1 -0
- package/dist/src/remote/remoteWorkerClient.js +34 -0
- package/dist/src/remote/remoteWorkerClient.js.map +1 -0
- package/dist/src/review/index.d.ts +4 -0
- package/dist/src/review/index.d.ts.map +1 -0
- package/dist/src/review/index.js +4 -0
- package/dist/src/review/index.js.map +1 -0
- package/dist/src/review/reviewStore.d.ts +12 -0
- package/dist/src/review/reviewStore.d.ts.map +1 -0
- package/dist/src/review/reviewStore.js +74 -0
- package/dist/src/review/reviewStore.js.map +1 -0
- package/dist/src/review/threadDiffService.d.ts +16 -0
- package/dist/src/review/threadDiffService.d.ts.map +1 -0
- package/dist/src/review/threadDiffService.js +118 -0
- package/dist/src/review/threadDiffService.js.map +1 -0
- package/dist/src/review/types.d.ts +42 -0
- package/dist/src/review/types.d.ts.map +1 -0
- package/dist/src/review/types.js +2 -0
- package/dist/src/review/types.js.map +1 -0
- package/dist/src/router/modelRouter.d.ts +1 -7
- package/dist/src/router/modelRouter.d.ts.map +1 -1
- package/dist/src/router/modelRouter.js +0 -30
- package/dist/src/router/modelRouter.js.map +1 -1
- package/dist/src/runtime/agentClient.d.ts +38 -0
- package/dist/src/runtime/agentClient.d.ts.map +1 -1
- package/dist/src/runtime/agentClient.js +369 -21
- package/dist/src/runtime/agentClient.js.map +1 -1
- package/dist/src/runtime/agentSession.d.ts +7 -0
- package/dist/src/runtime/agentSession.d.ts.map +1 -1
- package/dist/src/runtime/agentSession.js +14 -5
- package/dist/src/runtime/agentSession.js.map +1 -1
- package/dist/src/runtime/conversationEngine.d.ts +11 -1
- package/dist/src/runtime/conversationEngine.d.ts.map +1 -1
- package/dist/src/runtime/conversationEngine.js +166 -3
- package/dist/src/runtime/conversationEngine.js.map +1 -1
- package/dist/src/sandbox/index.d.ts +8 -0
- package/dist/src/sandbox/index.d.ts.map +1 -0
- package/dist/src/sandbox/index.js +8 -0
- package/dist/src/sandbox/index.js.map +1 -0
- package/dist/src/sandbox/linuxSandbox.d.ts +3 -0
- package/dist/src/sandbox/linuxSandbox.d.ts.map +1 -0
- package/dist/src/sandbox/linuxSandbox.js +17 -0
- package/dist/src/sandbox/linuxSandbox.js.map +1 -0
- package/dist/src/sandbox/macosSandbox.d.ts +3 -0
- package/dist/src/sandbox/macosSandbox.d.ts.map +1 -0
- package/dist/src/sandbox/macosSandbox.js +16 -0
- package/dist/src/sandbox/macosSandbox.js.map +1 -0
- package/dist/src/sandbox/networkPolicy.d.ts +4 -0
- package/dist/src/sandbox/networkPolicy.d.ts.map +1 -0
- package/dist/src/sandbox/networkPolicy.js +18 -0
- package/dist/src/sandbox/networkPolicy.js.map +1 -0
- package/dist/src/sandbox/policyResolver.d.ts +11 -0
- package/dist/src/sandbox/policyResolver.d.ts.map +1 -0
- package/dist/src/sandbox/policyResolver.js +95 -0
- package/dist/src/sandbox/policyResolver.js.map +1 -0
- package/dist/src/sandbox/sandboxExecutor.d.ts +12 -0
- package/dist/src/sandbox/sandboxExecutor.d.ts.map +1 -0
- package/dist/src/sandbox/sandboxExecutor.js +294 -0
- package/dist/src/sandbox/sandboxExecutor.js.map +1 -0
- package/dist/src/sandbox/types.d.ts +54 -0
- package/dist/src/sandbox/types.d.ts.map +1 -0
- package/dist/src/sandbox/types.js +2 -0
- package/dist/src/sandbox/types.js.map +1 -0
- package/dist/src/sandbox/windowsSandbox.d.ts +3 -0
- package/dist/src/sandbox/windowsSandbox.d.ts.map +1 -0
- package/dist/src/sandbox/windowsSandbox.js +12 -0
- package/dist/src/sandbox/windowsSandbox.js.map +1 -0
- package/dist/src/storage/sessionBranchSummary.d.ts +13 -0
- package/dist/src/storage/sessionBranchSummary.d.ts.map +1 -0
- package/dist/src/storage/sessionBranchSummary.js +15 -0
- package/dist/src/storage/sessionBranchSummary.js.map +1 -0
- package/dist/src/storage/sessionCatalog.d.ts +94 -0
- package/dist/src/storage/sessionCatalog.d.ts.map +1 -0
- package/dist/src/storage/sessionCatalog.js +359 -0
- package/dist/src/storage/sessionCatalog.js.map +1 -0
- package/dist/src/storage/sessionForkService.d.ts +16 -0
- package/dist/src/storage/sessionForkService.d.ts.map +1 -0
- package/dist/src/storage/sessionForkService.js +98 -0
- package/dist/src/storage/sessionForkService.js.map +1 -0
- package/dist/src/storage/sessionGraph.d.ts +22 -0
- package/dist/src/storage/sessionGraph.d.ts.map +1 -0
- package/dist/src/storage/sessionGraph.js +69 -0
- package/dist/src/storage/sessionGraph.js.map +1 -0
- package/dist/src/storage/sessionStore.d.ts +3 -1
- package/dist/src/storage/sessionStore.d.ts.map +1 -1
- package/dist/src/storage/sessionStore.js +12 -2
- package/dist/src/storage/sessionStore.js.map +1 -1
- package/dist/src/team/assistantTeamTools.d.ts +14 -0
- package/dist/src/team/assistantTeamTools.d.ts.map +1 -0
- package/dist/src/team/assistantTeamTools.js +122 -0
- package/dist/src/team/assistantTeamTools.js.map +1 -0
- package/dist/src/team/teamDefinitions.d.ts.map +1 -1
- package/dist/src/team/teamDefinitions.js +2 -3
- package/dist/src/team/teamDefinitions.js.map +1 -1
- package/dist/src/team/teamGraphLayout.d.ts +31 -0
- package/dist/src/team/teamGraphLayout.d.ts.map +1 -1
- package/dist/src/team/teamGraphLayout.js +156 -27
- package/dist/src/team/teamGraphLayout.js.map +1 -1
- package/dist/src/team/teamProposalService.d.ts +58 -0
- package/dist/src/team/teamProposalService.d.ts.map +1 -0
- package/dist/src/team/teamProposalService.js +282 -0
- package/dist/src/team/teamProposalService.js.map +1 -0
- package/dist/src/tools/actoviqFileTools.d.ts.map +1 -1
- package/dist/src/tools/actoviqFileTools.js +33 -8
- package/dist/src/tools/actoviqFileTools.js.map +1 -1
- package/dist/src/tools/actoviqNotebookEdit.d.ts.map +1 -1
- package/dist/src/tools/actoviqNotebookEdit.js +16 -1
- package/dist/src/tools/actoviqNotebookEdit.js.map +1 -1
- package/dist/src/tools/actoviqShellTools.d.ts.map +1 -1
- package/dist/src/tools/actoviqShellTools.js +18 -0
- package/dist/src/tools/actoviqShellTools.js.map +1 -1
- package/dist/src/tools/bash/BashTool.d.ts.map +1 -1
- package/dist/src/tools/bash/BashTool.js +44 -10
- package/dist/src/tools/bash/BashTool.js.map +1 -1
- package/dist/src/tools/exaSearch.d.ts +2 -2
- package/dist/src/tools/planMode/PlanModeTools.d.ts +1 -1
- package/dist/src/tools/planMode/PlanModeTools.d.ts.map +1 -1
- package/dist/src/tools/planMode/PlanModeTools.js +14 -10
- package/dist/src/tools/planMode/PlanModeTools.js.map +1 -1
- package/dist/src/tui/actoviqTui.d.ts.map +1 -1
- package/dist/src/tui/actoviqTui.js +626 -65
- package/dist/src/tui/actoviqTui.js.map +1 -1
- package/dist/src/types.d.ts +68 -0
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js.map +1 -1
- package/dist/src/ui/commandSurface.d.ts.map +1 -1
- package/dist/src/ui/commandSurface.js +60 -2
- package/dist/src/ui/commandSurface.js.map +1 -1
- package/dist/src/update/appUpdateService.d.ts +58 -0
- package/dist/src/update/appUpdateService.d.ts.map +1 -0
- package/dist/src/update/appUpdateService.js +190 -0
- package/dist/src/update/appUpdateService.js.map +1 -0
- package/dist/src/worktree/taskWorktreeCoordinator.d.ts +34 -0
- package/dist/src/worktree/taskWorktreeCoordinator.d.ts.map +1 -0
- package/dist/src/worktree/taskWorktreeCoordinator.js +120 -0
- package/dist/src/worktree/taskWorktreeCoordinator.js.map +1 -0
- package/package.json +11 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,41 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format is based on Keep a Changelog, with automated updates from GitHub Releases.
|
|
6
6
|
|
|
7
|
+
## Unreleased
|
|
8
|
+
|
|
9
|
+
## v0.4.9 - 2026-07-30
|
|
10
|
+
|
|
11
|
+
### Platform
|
|
12
|
+
|
|
13
|
+
- **Policy / sandbox / hooks** — host/user/project policy resolution, OS sandbox adapters (Linux bubblewrap / macOS sandbox-exec / Windows degraded), and typed lifecycle hooks.
|
|
14
|
+
- **Checkpoints / goals / session graph** — durable file+conversation checkpoints, goal contracts, and session fork/tree/catalog primitives.
|
|
15
|
+
- **App-server / remote / VS Code** — stdio/WebSocket JSON app-server, file-backed remote job leases, and a VS Code extension client.
|
|
16
|
+
- **Plugin packages** — versioned installable plugins with integrity-required trust grants.
|
|
17
|
+
- **Code intel / updates / worktrees / proposals** — LSP tools, app update service, task worktree coordination, context rules, review/diff stores, memory and team proposals.
|
|
18
|
+
|
|
19
|
+
### GUI
|
|
20
|
+
|
|
21
|
+
- Upgrade the bottom-right FAB to a global **Assistant**: always visible, chat icon, Global/Project scope. Global mode lists project briefs and can change settings/plugins/bridge/automation/MCP (no source Write/Edit/Bash); Project mode keeps Manager update/plan/issues.
|
|
22
|
+
- Remove the redundant sidebar **New chat** button; start chats from project detail **+ New conversation**.
|
|
23
|
+
- Fix opening local workspace paths: strip quotes / `file://`, require directories, surface API errors in the Open workspace dialog, roll back on failure, and allow credentialless opens (External CLI).
|
|
24
|
+
- Remove Settings → **Automation** / **Browser** / **Computer control**. Configure schedules in the main **Automation** region; configure Playwright and Computer Use under **Customize → Plugins**.
|
|
25
|
+
|
|
26
|
+
### Managed plugins
|
|
27
|
+
|
|
28
|
+
- Add **Image Generation**, **Video Generation**, and **3D Generation** managed plugins with multi-profile / multi-key configuration (Gemini Nano Banana, GPT Image 2, Qwen-Image; Seedance, Hailuo, HappyHorse; Meshy, Tripo, Rodin).
|
|
29
|
+
- Agent tools `generate_image` / `generate_video` / `generate_mesh` inject Qwen-style professional prompt-rewrite guidance and let the model choose among configured profiles.
|
|
30
|
+
- Customize → Plugins includes a profile list editor with **Get API Key** links to each provider console.
|
|
31
|
+
|
|
32
|
+
### Bridge / tests / CI
|
|
33
|
+
|
|
34
|
+
- Add regression coverage for consecutive `ActoviqBridgeSession.stream()` calls so the second turn uses `--resume` (GitHub #8).
|
|
35
|
+
- Harden GUI publish update-metadata validation (`workflow_dispatch` may rebuild an existing tag with the current builder).
|
|
36
|
+
|
|
37
|
+
### Notes
|
|
38
|
+
|
|
39
|
+
- This release stays on the **0.4.x** line. **1.0.0 is not published yet.**
|
|
40
|
+
- Windows shell sandbox remains best-effort/degraded; `enforcement: required` fails closed when OS isolation is unavailable.
|
|
41
|
+
|
|
7
42
|
## v0.4.8 - 2026-07-27
|
|
8
43
|
|
|
9
44
|
### Runtime / prompt cache
|
package/README-zh.md
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
- **Model Router / Leader-Dispatch** — 每轮由 leader 分派到最佳 specialist(任意模型/提供商),执行者自身也可召集 team。Profile 位于 `~/.actoviq/routers/`。
|
|
28
28
|
- **Dynamic Workflows** — 显式信任等级的 JS 编排:trusted 兼容执行、隔离 local-process,或由 host 提供的远程/container 强 sandbox;local process 不宣传为对抗性多租户沙箱。
|
|
29
29
|
- **Bridge(命名运行时配置)** — 可选 `Direct API` 做 provider/API 级复用,也可选 `External CLI` 直接启动已安装的 Claude Code、Codex、Pi、CodeWhale、Reasonix 或 Crush,继承各 CLI 的原生登录和配置、流式显示规范化后的工具与回答事件、终止后台任务,并浏览/恢复受支持的原生会话。单独填写的 key 只注入子进程,不写入 CLI 的凭据库;Pi、CodeWhale、Reasonix 与 Crush 会使用按配置隔离的持久会话目录,因此 key 模式重启后仍可读取历史,同时不会读取原生登录凭据。
|
|
30
|
-
- **桌面 GUI (`actoviq-gui`)** — Electron 聊天 UI:流式 transcript
|
|
30
|
+
- **桌面 GUI (`actoviq-gui`)** — Electron 聊天 UI:流式 transcript、对话历史、命令面板、设置、每工具权限提示。安全增强。全局 **Assistant** FAB(Global/Project 作用域)。可视化 **Agent graph** 编排 UI 仍在迭代中,暂勿当作稳定产品面。
|
|
31
31
|
- **TUI (`actoviq-tui`)** — 终端 UI,25+ 斜杠命令,Claude Code 风格 UX:`/team`、`/bridge`、`/plan`、`/hooks`、`/mcp`、`/review`、`/context`、`/cost`、`/doctor` 等。实时状态旋转器、滚动 transcript、todo 面板、项目/用户级权限对话框、子命令自动补全。
|
|
32
32
|
- **计划模式 + hooks** — `EnterPlanMode`/`ExitPlanMode` 工具 + 计划文件;`settings.json` 中的 `PreToolUse`/`PostToolUse`/`SessionStart` hooks。
|
|
33
33
|
- **Worktree 工具** — `EnterWorktree`/`ExitWorktree`,栈式 cwd,`.worktreeinclude`,PR checkout。
|
|
@@ -95,7 +95,7 @@ try {
|
|
|
95
95
|
}
|
|
96
96
|
```
|
|
97
97
|
|
|
98
|
-
0.x 应用可继续从 package root 或 `/compat` 导入 `createAgentSdk
|
|
98
|
+
0.x 应用可继续从 package root 或 `/compat` 导入 `createAgentSdk`;新应用应使用上述职责 subpath。
|
|
99
99
|
|
|
100
100
|
运行仓库示例:
|
|
101
101
|
|
|
@@ -165,11 +165,6 @@ npx actoviq-gui [工作目录] [选项]
|
|
|
165
165
|
|
|
166
166
|
架构与运维文档:
|
|
167
167
|
|
|
168
|
-
- [架构审计与实施规划](./docs/zh/08-sdk-architecture-audit-and-optimization-plan.md)
|
|
169
|
-
- [1.0 迁移指南](./docs/zh/09-sdk-v2-migration-guide.md)
|
|
170
|
-
- [支持、安全、SemVer 与 failure model](./docs/zh/10-support-security-semver-and-failure-model.md)
|
|
171
|
-
- [JSON v1 → SQLite 迁移 Runbook](./docs/zh/11-json-v1-to-sqlite-migration-runbook.md)
|
|
172
|
-
- [1.0 实施与端到端验收报告](./docs/zh/12-sdk-1.0-implementation-and-verification-report.md)
|
|
173
168
|
- [安全报告政策](./SECURITY.md)
|
|
174
169
|
|
|
175
170
|
## 参与贡献
|
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ Inspired by Claude Code, Codex, Deepagents, and the broader agent ecosystem. Act
|
|
|
27
27
|
- **Model Router / Leader-Dispatch** — a leader classifies each turn and dispatches it to the best specialist route (any model/provider), runs normally, and the executor may itself convene a team. Profiles in `~/.actoviq/routers/`.
|
|
28
28
|
- **Dynamic Workflows** — JS script-based orchestration with explicit trust levels: trusted compatibility execution, isolated local-process execution, or a host-supplied remote/container sandbox for adversarial inputs.
|
|
29
29
|
- **Bridge (named runtime configs)** — choose `Direct API` for provider-level reuse, or `External CLI` to launch installed Claude Code, Codex, Pi, CodeWhale, Reasonix, or Crush; reuse each CLI's native login/config, stream normalized tool and assistant events, stop background work, and browse/resume supported native conversations. An explicit key override is injected only into the child and is not written to the CLI's credential store; Pi, CodeWhale, Reasonix, and Crush keep isolated per-config session profiles so that key-mode history survives restarts without reading the native login store.
|
|
30
|
-
- **Desktop GUI (`actoviq-gui`)** — Electron chat UI: streamed transcript, conversation history, command palette, settings, per-tool permission prompts. Security-hardened. The visual **Agent graph** orchestration UI is shipping in-progress and continues to be iterated (not a stable product surface yet).
|
|
30
|
+
- **Desktop GUI (`actoviq-gui`)** — Electron chat UI: streamed transcript, conversation history, command palette, settings, per-tool permission prompts. Security-hardened. Global **Assistant** FAB (Global/Project scope). The visual **Agent graph** orchestration UI is shipping in-progress and continues to be iterated (not a stable product surface yet).
|
|
31
31
|
- **TUI (`actoviq-tui`)** — Terminal UI with 25+ slash commands, Claude Code-style UX: `/team`, `/bridge`, `/plan`, `/hooks`, `/mcp`, `/review`, `/context`, `/cost`, `/doctor`, and more. Live status spinner, scrollback transcript, todo panel, permission dialogs with project/user scope, sub-command autocomplete.
|
|
32
32
|
- **Plan mode + hooks** — `EnterPlanMode`/`ExitPlanMode` tools with plan file; user-configurable `PreToolUse`/`PostToolUse`/`SessionStart` hooks from `settings.json`.
|
|
33
33
|
- **Worktree Tools** — `EnterWorktree`/`ExitWorktree` with stack-based cwd, `.worktreeinclude`, PR checkout.
|
|
@@ -96,7 +96,7 @@ try {
|
|
|
96
96
|
}
|
|
97
97
|
```
|
|
98
98
|
|
|
99
|
-
Existing 0.x applications may keep importing `createAgentSdk` from the package root or `/compat
|
|
99
|
+
Existing 0.x applications may keep importing `createAgentSdk` from the package root or `/compat`; new applications should use the responsibility subpaths above.
|
|
100
100
|
|
|
101
101
|
Run the repository examples with:
|
|
102
102
|
|
|
@@ -218,11 +218,6 @@ Start with these examples:
|
|
|
218
218
|
|
|
219
219
|
Architecture and operations:
|
|
220
220
|
|
|
221
|
-
- [Architecture audit and implementation plan](./docs/zh/08-sdk-architecture-audit-and-optimization-plan.md)
|
|
222
|
-
- [1.0 migration guide](./docs/zh/09-sdk-v2-migration-guide.md)
|
|
223
|
-
- [Support, security, SemVer, and failure model](./docs/zh/10-support-security-semver-and-failure-model.md)
|
|
224
|
-
- [JSON v1 to SQLite migration runbook](./docs/zh/11-json-v1-to-sqlite-migration-runbook.md)
|
|
225
|
-
- [1.0 implementation and verification report](./docs/zh/12-sdk-1.0-implementation-and-verification-report.md)
|
|
226
221
|
- [Security policy](./SECURITY.md)
|
|
227
222
|
|
|
228
223
|
## Contributing
|
package/SECURITY.md
CHANGED
|
@@ -16,7 +16,7 @@ Do not open a public issue for a suspected vulnerability. Use the repository's [
|
|
|
16
16
|
|
|
17
17
|
Avoid including real credentials or private user data. If private reporting is unavailable, open a public issue containing no exploit details and ask a maintainer to establish a private channel.
|
|
18
18
|
|
|
19
|
-
The maintainers will acknowledge receipt, validate severity, coordinate remediation and disclosure, and publish an advisory when appropriate.
|
|
19
|
+
The maintainers will acknowledge receipt, validate severity, coordinate remediation and disclosure, and publish an advisory when appropriate.
|
|
20
20
|
|
|
21
21
|
## Security boundaries
|
|
22
22
|
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ActoviqAgentClient } from '../runtime/agentClient.js';
|
|
2
|
+
import { type AppServerNotification, type AppServerRequest, type AppServerResponse } from './protocol.js';
|
|
3
|
+
export type AppServerEmit = (notification: AppServerNotification) => void;
|
|
4
|
+
export declare class AppServer {
|
|
5
|
+
private readonly sdk;
|
|
6
|
+
private readonly liveSessions;
|
|
7
|
+
constructor(sdk: ActoviqAgentClient);
|
|
8
|
+
handle(request: AppServerRequest, emit?: AppServerEmit): Promise<AppServerResponse>;
|
|
9
|
+
private dispatch;
|
|
10
|
+
private openSession;
|
|
11
|
+
private rememberSession;
|
|
12
|
+
private goalService;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=appServer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appServer.d.ts","sourceRoot":"","sources":["../../../src/app-server/appServer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAIpE,OAAO,EAA+B,KAAK,qBAAqB,EAAE,KAAK,gBAAgB,EAAE,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEvI,MAAM,MAAM,aAAa,GAAG,CAAC,YAAY,EAAE,qBAAqB,KAAK,IAAI,CAAC;AAI1E,qBAAa,SAAS;IAGR,OAAO,CAAC,QAAQ,CAAC,GAAG;IAFhC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAmC;gBAEnC,GAAG,EAAE,kBAAkB;IAE9C,MAAM,CAAC,OAAO,EAAE,gBAAgB,EAAE,IAAI,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,iBAAiB,CAAC;YAmB3E,QAAQ;YAiHR,WAAW;IAMzB,OAAO,CAAC,eAAe;IAWvB,OAAO,CAAC,WAAW;CAGpB"}
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import { GoalService } from '../goal/goalService.js';
|
|
2
|
+
import { APP_SERVER_PROTOCOL_VERSION } from './protocol.js';
|
|
3
|
+
const MAX_LIVE_SESSIONS = 32;
|
|
4
|
+
export class AppServer {
|
|
5
|
+
sdk;
|
|
6
|
+
liveSessions = new Map();
|
|
7
|
+
constructor(sdk) {
|
|
8
|
+
this.sdk = sdk;
|
|
9
|
+
}
|
|
10
|
+
async handle(request, emit) {
|
|
11
|
+
try {
|
|
12
|
+
return {
|
|
13
|
+
version: APP_SERVER_PROTOCOL_VERSION,
|
|
14
|
+
id: request.id,
|
|
15
|
+
result: await this.dispatch(request.method, request.params ?? {}, emit),
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
catch (error) {
|
|
19
|
+
return {
|
|
20
|
+
version: APP_SERVER_PROTOCOL_VERSION,
|
|
21
|
+
id: request.id,
|
|
22
|
+
error: {
|
|
23
|
+
code: 'APP_SERVER_ERROR',
|
|
24
|
+
message: error instanceof Error ? error.message : String(error),
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
async dispatch(method, params, emit) {
|
|
30
|
+
if (method === 'initialize') {
|
|
31
|
+
return {
|
|
32
|
+
protocolVersion: APP_SERVER_PROTOCOL_VERSION,
|
|
33
|
+
capabilities: APP_SERVER_CAPABILITIES,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
if (method === 'capability/list')
|
|
37
|
+
return APP_SERVER_CAPABILITIES;
|
|
38
|
+
if (method === 'session/list')
|
|
39
|
+
return this.sdk.sessions.list();
|
|
40
|
+
if (method === 'session/tree')
|
|
41
|
+
return this.sdk.sessionGraph.roots();
|
|
42
|
+
if (method === 'session/create') {
|
|
43
|
+
const session = await this.sdk.createSession({
|
|
44
|
+
title: stringParam(params, 'title', false),
|
|
45
|
+
model: stringParam(params, 'model', false),
|
|
46
|
+
});
|
|
47
|
+
this.rememberSession(session);
|
|
48
|
+
return session.snapshot();
|
|
49
|
+
}
|
|
50
|
+
if (method === 'session/open') {
|
|
51
|
+
const session = await this.openSession(stringParam(params, 'sessionId'));
|
|
52
|
+
return session.snapshot();
|
|
53
|
+
}
|
|
54
|
+
if (method === 'session/close') {
|
|
55
|
+
const sessionId = stringParam(params, 'sessionId');
|
|
56
|
+
this.liveSessions.delete(sessionId);
|
|
57
|
+
return { closed: true };
|
|
58
|
+
}
|
|
59
|
+
if (method === 'session/send') {
|
|
60
|
+
const sessionId = stringParam(params, 'sessionId');
|
|
61
|
+
const session = await this.openSession(sessionId);
|
|
62
|
+
const stream = session.stream(stringParam(params, 'input'));
|
|
63
|
+
if (emit) {
|
|
64
|
+
// Consume the event stream to completion before returning so response
|
|
65
|
+
// ordering stays behind session/event notifications on stdio/WS.
|
|
66
|
+
for await (const event of stream) {
|
|
67
|
+
emit({
|
|
68
|
+
version: APP_SERVER_PROTOCOL_VERSION,
|
|
69
|
+
type: 'event',
|
|
70
|
+
method: 'session/event',
|
|
71
|
+
params: { sessionId, event },
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return stream.result;
|
|
76
|
+
}
|
|
77
|
+
if (method === 'diff/get') {
|
|
78
|
+
return this.sdk.getSessionDiff(stringParam(params, 'sessionId'));
|
|
79
|
+
}
|
|
80
|
+
if (method === 'diff/apply') {
|
|
81
|
+
if (params.confirm !== true)
|
|
82
|
+
throw new Error('diff/apply requires confirm:true.');
|
|
83
|
+
return this.sdk.applySessionDiff(stringParam(params, 'sessionId'), stringParam(params, 'targetDir', false));
|
|
84
|
+
}
|
|
85
|
+
if (method === 'checkpoint/list') {
|
|
86
|
+
return this.sdk.checkpoints.list(stringParam(params, 'sessionId'));
|
|
87
|
+
}
|
|
88
|
+
if (method === 'checkpoint/preview') {
|
|
89
|
+
return this.sdk.checkpoints.preview(stringParam(params, 'sessionId'), stringParam(params, 'checkpointId'));
|
|
90
|
+
}
|
|
91
|
+
if (method === 'checkpoint/restore') {
|
|
92
|
+
if (params.confirm !== true)
|
|
93
|
+
throw new Error('checkpoint/restore requires confirm:true.');
|
|
94
|
+
const mode = checkpointMode(params.mode);
|
|
95
|
+
return this.sdk.checkpoints.restore({
|
|
96
|
+
sessionId: stringParam(params, 'sessionId'),
|
|
97
|
+
checkpointId: stringParam(params, 'checkpointId'),
|
|
98
|
+
mode,
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
if (method === 'goal/get') {
|
|
102
|
+
return this.goalService(await this.openSession(stringParam(params, 'sessionId'))).read();
|
|
103
|
+
}
|
|
104
|
+
if (method === 'goal/create') {
|
|
105
|
+
return this.goalService(await this.openSession(stringParam(params, 'sessionId'))).create({
|
|
106
|
+
objective: stringParam(params, 'objective'),
|
|
107
|
+
completionCriteria: stringParam(params, 'completionCriteria', false),
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
if (method === 'goal/transition') {
|
|
111
|
+
const status = stringParam(params, 'status');
|
|
112
|
+
if (status !== 'active' && status !== 'paused') {
|
|
113
|
+
throw new Error('status must be active or paused.');
|
|
114
|
+
}
|
|
115
|
+
return this.goalService(await this.openSession(stringParam(params, 'sessionId')))
|
|
116
|
+
.transition(status);
|
|
117
|
+
}
|
|
118
|
+
if (method === 'goal/revise') {
|
|
119
|
+
return this.goalService(await this.openSession(stringParam(params, 'sessionId'))).revise({
|
|
120
|
+
objective: stringParam(params, 'objective', false),
|
|
121
|
+
completionCriteria: stringParam(params, 'completionCriteria', false),
|
|
122
|
+
expectedRevision: numberParam(params, 'expectedRevision', false),
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
if (method === 'approval/list')
|
|
126
|
+
return this.sdk.approvalPolicy.list();
|
|
127
|
+
if (method === 'approval/remember') {
|
|
128
|
+
if (params.confirm !== true) {
|
|
129
|
+
throw new Error('approval/remember requires confirm:true.');
|
|
130
|
+
}
|
|
131
|
+
const approval = parseStoredApproval(params.approval);
|
|
132
|
+
await this.sdk.approvalPolicy.remember(approval);
|
|
133
|
+
return { saved: true };
|
|
134
|
+
}
|
|
135
|
+
throw new Error(`Unknown app-server method: ${method}`);
|
|
136
|
+
}
|
|
137
|
+
async openSession(sessionId) {
|
|
138
|
+
const session = this.liveSessions.get(sessionId) ?? await this.sdk.resumeSession(sessionId);
|
|
139
|
+
this.rememberSession(session);
|
|
140
|
+
return session;
|
|
141
|
+
}
|
|
142
|
+
rememberSession(session) {
|
|
143
|
+
// Refresh insertion order so LRU eviction drops the oldest idle handle.
|
|
144
|
+
this.liveSessions.delete(session.id);
|
|
145
|
+
this.liveSessions.set(session.id, session);
|
|
146
|
+
while (this.liveSessions.size > MAX_LIVE_SESSIONS) {
|
|
147
|
+
const oldest = this.liveSessions.keys().next().value;
|
|
148
|
+
if (!oldest)
|
|
149
|
+
break;
|
|
150
|
+
this.liveSessions.delete(oldest);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
goalService(session) {
|
|
154
|
+
return GoalService.forSession(session);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
const APP_SERVER_CAPABILITIES = [
|
|
158
|
+
'sessions',
|
|
159
|
+
'streaming',
|
|
160
|
+
'session-tree',
|
|
161
|
+
'diff',
|
|
162
|
+
'checkpoints',
|
|
163
|
+
'goals',
|
|
164
|
+
'approvals',
|
|
165
|
+
];
|
|
166
|
+
function stringParam(params, name, required = true) {
|
|
167
|
+
const value = params[name];
|
|
168
|
+
if (typeof value === 'string' && value.trim())
|
|
169
|
+
return value.trim();
|
|
170
|
+
if (required)
|
|
171
|
+
throw new Error(`${name} is required.`);
|
|
172
|
+
return undefined;
|
|
173
|
+
}
|
|
174
|
+
function numberParam(params, name, required) {
|
|
175
|
+
const value = params[name];
|
|
176
|
+
if (typeof value === 'number' && Number.isFinite(value))
|
|
177
|
+
return value;
|
|
178
|
+
if (required)
|
|
179
|
+
throw new Error(`${name} is required.`);
|
|
180
|
+
return undefined;
|
|
181
|
+
}
|
|
182
|
+
function checkpointMode(value) {
|
|
183
|
+
if (value === undefined)
|
|
184
|
+
return 'both';
|
|
185
|
+
if (value === 'files' || value === 'conversation' || value === 'both')
|
|
186
|
+
return value;
|
|
187
|
+
throw new Error('mode must be files, conversation, or both.');
|
|
188
|
+
}
|
|
189
|
+
function parseStoredApproval(value) {
|
|
190
|
+
if (!value || typeof value !== 'object' || Array.isArray(value)) {
|
|
191
|
+
throw new Error('approval/remember requires an approval object.');
|
|
192
|
+
}
|
|
193
|
+
const record = value;
|
|
194
|
+
const id = typeof record.id === 'string' ? record.id.trim() : '';
|
|
195
|
+
const tool = typeof record.tool === 'string' ? record.tool.trim() : '';
|
|
196
|
+
if (!id)
|
|
197
|
+
throw new Error('approval.id is required.');
|
|
198
|
+
if (!tool)
|
|
199
|
+
throw new Error('approval.tool is required.');
|
|
200
|
+
if (record.behavior !== 'allow' && record.behavior !== 'deny') {
|
|
201
|
+
throw new Error('approval.behavior must be allow or deny.');
|
|
202
|
+
}
|
|
203
|
+
if (record.pathPrefix !== undefined && typeof record.pathPrefix !== 'string') {
|
|
204
|
+
throw new Error('approval.pathPrefix must be a string when provided.');
|
|
205
|
+
}
|
|
206
|
+
if (record.expiresAt !== undefined
|
|
207
|
+
&& (typeof record.expiresAt !== 'string' || Number.isNaN(Date.parse(record.expiresAt)))) {
|
|
208
|
+
throw new Error('approval.expiresAt must be an ISO timestamp when provided.');
|
|
209
|
+
}
|
|
210
|
+
if (record.behavior === 'allow' && tool !== 'Read' && tool !== 'Glob' && tool !== 'Grep') {
|
|
211
|
+
if (typeof record.pathPrefix !== 'string' || !record.pathPrefix.trim()) {
|
|
212
|
+
throw new Error('approval/remember allow rules for mutating tools require a pathPrefix scope.');
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
return {
|
|
216
|
+
id,
|
|
217
|
+
tool,
|
|
218
|
+
behavior: record.behavior,
|
|
219
|
+
...(typeof record.pathPrefix === 'string' && record.pathPrefix.trim()
|
|
220
|
+
? { pathPrefix: record.pathPrefix.trim() }
|
|
221
|
+
: {}),
|
|
222
|
+
...(typeof record.expiresAt === 'string' ? { expiresAt: record.expiresAt } : {}),
|
|
223
|
+
createdAt: typeof record.createdAt === 'string' && record.createdAt.trim()
|
|
224
|
+
? record.createdAt
|
|
225
|
+
: new Date().toISOString(),
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
//# sourceMappingURL=appServer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appServer.js","sourceRoot":"","sources":["../../../src/app-server/appServer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD,OAAO,EAAE,2BAA2B,EAA6E,MAAM,eAAe,CAAC;AAIvI,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAE7B,MAAM,OAAO,SAAS;IAGS;IAFZ,YAAY,GAAG,IAAI,GAAG,EAAwB,CAAC;IAEhE,YAA6B,GAAuB;QAAvB,QAAG,GAAH,GAAG,CAAoB;IAAG,CAAC;IAExD,KAAK,CAAC,MAAM,CAAC,OAAyB,EAAE,IAA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AAC,CAAC,EACvF,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;IAChF,CAAC;IACD,IAAI,MAAM,CAAC,QAAQ,KAAK,OAAO,IAAI,IAAI,KAAK,MAAM,IAAI,IAAI,KAAK,MAAM,IAAI,IAAI,KAAK,MAAM,EAAE,CAAC;QACzF,IAAI,OAAO,MAAM,CAAC,UAAU,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,EAAE,CAAC;YACvE,MAAM,IAAI,KAAK,CACb,8EAA8E,CAC/E,CAAC;QACJ,CAAC;IACH,CAAC;IACD,OAAO;QACL,EAAE;QACF,IAAI;QACJ,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,GAAG,CAAC,OAAO,MAAM,CAAC,UAAU,KAAK,QAAQ,IAAI,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE;YACnE,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,EAAE;YAC1C,CAAC,CAAC,EAAE,CAAC;QACP,GAAG,CAAC,OAAO,MAAM,CAAC,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAChF,SAAS,EAAE,OAAO,MAAM,CAAC,SAAS,KAAK,QAAQ,IAAI,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE;YACxE,CAAC,CAAC,MAAM,CAAC,SAAS;YAClB,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;KAC7B,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../../src/app-server/cli.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createActoviqCoreTools, createAgentSdk, loadDefaultActoviqSettings, } from '../index.js';
|
|
3
|
+
import { AppServer } from './appServer.js';
|
|
4
|
+
import { StdioAppServerTransport } from './transports/stdioTransport.js';
|
|
5
|
+
async function main() {
|
|
6
|
+
await loadDefaultActoviqSettings();
|
|
7
|
+
const workDir = process.argv[2] ? process.argv[2] : process.cwd();
|
|
8
|
+
const sdk = await createAgentSdk({
|
|
9
|
+
workDir,
|
|
10
|
+
tools: createActoviqCoreTools({ cwd: workDir }),
|
|
11
|
+
permissionMode: 'default',
|
|
12
|
+
});
|
|
13
|
+
const close = async () => {
|
|
14
|
+
await sdk.close();
|
|
15
|
+
};
|
|
16
|
+
process.once('SIGINT', () => { void close().finally(() => process.exit(130)); });
|
|
17
|
+
process.once('SIGTERM', () => { void close().finally(() => process.exit(143)); });
|
|
18
|
+
try {
|
|
19
|
+
await new StdioAppServerTransport(new AppServer(sdk)).start();
|
|
20
|
+
}
|
|
21
|
+
finally {
|
|
22
|
+
await close();
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
main().catch(error => {
|
|
26
|
+
process.stderr.write(`actoviq-app-server: ${error instanceof Error ? error.message : String(error)}\n`);
|
|
27
|
+
process.exitCode = 1;
|
|
28
|
+
});
|
|
29
|
+
//# sourceMappingURL=cli.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../../src/app-server/cli.ts"],"names":[],"mappings":";AACA,OAAO,EACL,sBAAsB,EACtB,cAAc,EACd,0BAA0B,GAC3B,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAEzE,KAAK,UAAU,IAAI;IACjB,MAAM,0BAA0B,EAAE,CAAC;IACnC,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,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":"","sources":["../../../src/app-server/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/app-server/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const APP_SERVER_PROTOCOL_VERSION: 1;
|
|
2
|
+
export interface AppServerRequest {
|
|
3
|
+
version: 1;
|
|
4
|
+
id: string;
|
|
5
|
+
method: string;
|
|
6
|
+
params?: Record<string, unknown>;
|
|
7
|
+
}
|
|
8
|
+
export interface AppServerResponse {
|
|
9
|
+
version: 1;
|
|
10
|
+
id: string;
|
|
11
|
+
result?: unknown;
|
|
12
|
+
error?: {
|
|
13
|
+
code: string;
|
|
14
|
+
message: string;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export interface AppServerNotification {
|
|
18
|
+
version: 1;
|
|
19
|
+
type: 'event';
|
|
20
|
+
method: string;
|
|
21
|
+
params: Record<string, unknown>;
|
|
22
|
+
}
|
|
23
|
+
export declare function parseAppServerRequest(value: unknown): AppServerRequest;
|
|
24
|
+
//# sourceMappingURL=protocol.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../../src/app-server/protocol.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,2BAA2B,EAAG,CAAU,CAAC;AAEtD,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,CAAC,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,CAAC,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CAC3C;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,CAAC,CAAC;IACX,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,gBAAgB,CAWtE"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export const APP_SERVER_PROTOCOL_VERSION = 1;
|
|
2
|
+
export function parseAppServerRequest(value) {
|
|
3
|
+
if (!value || typeof value !== 'object')
|
|
4
|
+
throw new Error('Invalid app-server request.');
|
|
5
|
+
const request = value;
|
|
6
|
+
if (request.version !== APP_SERVER_PROTOCOL_VERSION
|
|
7
|
+
|| typeof request.id !== 'string'
|
|
8
|
+
|| typeof request.method !== 'string'
|
|
9
|
+
|| (request.params !== undefined
|
|
10
|
+
&& (typeof request.params !== 'object' || request.params === null || Array.isArray(request.params))))
|
|
11
|
+
throw new Error('Invalid app-server request.');
|
|
12
|
+
return request;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=protocol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../../src/app-server/protocol.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAU,CAAC;AAuBtD,MAAM,UAAU,qBAAqB,CAAC,KAAc;IAClD,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;IACxF,MAAM,OAAO,GAAG,KAAkC,CAAC;IACnD,IACE,OAAO,CAAC,OAAO,KAAK,2BAA2B;WAC5C,OAAO,OAAO,CAAC,EAAE,KAAK,QAAQ;WAC9B,OAAO,OAAO,CAAC,MAAM,KAAK,QAAQ;WAClC,CAAC,OAAO,CAAC,MAAM,KAAK,SAAS;eAC3B,CAAC,OAAO,OAAO,CAAC,MAAM,KAAK,QAAQ,IAAI,OAAO,CAAC,MAAM,KAAK,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;QACtG,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;IACjD,OAAO,OAA2B,CAAC;AACrC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Readable, Writable } from 'node:stream';
|
|
2
|
+
import type { AppServer } from '../appServer.js';
|
|
3
|
+
export declare class StdioAppServerTransport {
|
|
4
|
+
private readonly server;
|
|
5
|
+
private readonly input;
|
|
6
|
+
private readonly output;
|
|
7
|
+
constructor(server: AppServer, input?: Readable, output?: Writable);
|
|
8
|
+
start(): Promise<void>;
|
|
9
|
+
private write;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=stdioTransport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stdioTransport.d.ts","sourceRoot":"","sources":["../../../../src/app-server/transports/stdioTransport.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAGjD,qBAAa,uBAAuB;IAEhC,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAFN,MAAM,EAAE,SAAS,EACjB,KAAK,GAAE,QAAwB,EAC/B,MAAM,GAAE,QAAyB;IAG9C,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAuB5B,OAAO,CAAC,KAAK;CAGd"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { createInterface } from 'node:readline';
|
|
2
|
+
import { parseAppServerRequest } from '../protocol.js';
|
|
3
|
+
export class StdioAppServerTransport {
|
|
4
|
+
server;
|
|
5
|
+
input;
|
|
6
|
+
output;
|
|
7
|
+
constructor(server, input = process.stdin, output = process.stdout) {
|
|
8
|
+
this.server = server;
|
|
9
|
+
this.input = input;
|
|
10
|
+
this.output = output;
|
|
11
|
+
}
|
|
12
|
+
async start() {
|
|
13
|
+
const lines = createInterface({ input: this.input, crlfDelay: Infinity });
|
|
14
|
+
for await (const line of lines) {
|
|
15
|
+
if (!line.trim())
|
|
16
|
+
continue;
|
|
17
|
+
try {
|
|
18
|
+
const response = await this.server.handle(parseAppServerRequest(JSON.parse(line)), notification => this.write(notification));
|
|
19
|
+
this.write(response);
|
|
20
|
+
}
|
|
21
|
+
catch (error) {
|
|
22
|
+
this.write({
|
|
23
|
+
version: 1,
|
|
24
|
+
id: '',
|
|
25
|
+
error: {
|
|
26
|
+
code: 'INVALID_REQUEST',
|
|
27
|
+
message: error instanceof Error ? error.message : String(error),
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
write(value) {
|
|
34
|
+
this.output.write(`${JSON.stringify(value)}\n`);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=stdioTransport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stdioTransport.js","sourceRoot":"","sources":["../../../../src/app-server/transports/stdioTransport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAIhD,OAAO,EAAE,qBAAqB,E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AC,IAAI,CAAC,CAAC;IAClD,CAAC;CACF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { AppServer } from '../appServer.js';
|
|
2
|
+
export interface AppServerWebSocket {
|
|
3
|
+
send(data: string): void;
|
|
4
|
+
on(event: 'message', listener: (data: unknown) => void): void;
|
|
5
|
+
}
|
|
6
|
+
export declare class WebSocketAppServerTransport {
|
|
7
|
+
private readonly server;
|
|
8
|
+
private chain;
|
|
9
|
+
constructor(server: AppServer);
|
|
10
|
+
attach(socket: AppServerWebSocket): void;
|
|
11
|
+
private receive;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=webSocketTransport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webSocketTransport.d.ts","sourceRoot":"","sources":["../../../../src/app-server/transports/webSocketTransport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAGjD,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,GAAG,IAAI,CAAC;CAC/D;AAED,qBAAa,2BAA2B;IAG1B,OAAO,CAAC,QAAQ,CAAC,MAAM;IAFnC,OAAO,CAAC,KAAK,CAAoC;gBAEpB,MAAM,EAAE,SAAS;IAE9C,MAAM,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI;YAU1B,OAAO;CA0BtB"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { APP_SERVER_PROTOCOL_VERSION, parseAppServerRequest } from '../protocol.js';
|
|
2
|
+
export class WebSocketAppServerTransport {
|
|
3
|
+
server;
|
|
4
|
+
chain = Promise.resolve();
|
|
5
|
+
constructor(server) {
|
|
6
|
+
this.server = server;
|
|
7
|
+
}
|
|
8
|
+
attach(socket) {
|
|
9
|
+
socket.on('message', data => {
|
|
10
|
+
// Serialize handlers per connection so responses/events cannot interleave
|
|
11
|
+
// across concurrent requests on the same socket.
|
|
12
|
+
this.chain = this.chain
|
|
13
|
+
.then(() => this.receive(socket, data))
|
|
14
|
+
.catch(() => this.receive(socket, data));
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
async receive(socket, data) {
|
|
18
|
+
let requestId = '';
|
|
19
|
+
try {
|
|
20
|
+
const text = typeof data === 'string'
|
|
21
|
+
? data
|
|
22
|
+
: Buffer.isBuffer(data)
|
|
23
|
+
? data.toString('utf8')
|
|
24
|
+
: String(data);
|
|
25
|
+
const parsed = JSON.parse(text);
|
|
26
|
+
if (typeof parsed.id === 'string')
|
|
27
|
+
requestId = parsed.id;
|
|
28
|
+
const response = await this.server.handle(parseAppServerRequest(JSON.parse(text)), notification => socket.send(JSON.stringify(notification)));
|
|
29
|
+
socket.send(JSON.stringify(response));
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
socket.send(JSON.stringify({
|
|
33
|
+
version: APP_SERVER_PROTOCOL_VERSION,
|
|
34
|
+
id: requestId,
|
|
35
|
+
error: {
|
|
36
|
+
code: 'INVALID_REQUEST',
|
|
37
|
+
message: error instanceof Error ? error.message : String(error),
|
|
38
|
+
},
|
|
39
|
+
}));
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=webSocketTransport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webSocketTransport.js","sourceRoot":"","sources":["../../../../src/app-server/transports/webSocketTransport.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,2BAA2B,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAOpF,MAAM,OAAO,2BAA2B;IAGT;IAFrB,KAAK,GAAkB,OAAO,CAAC,OAAO,EAAE,CAAC;IAEjD,YAA6B,MAAiB;QAAjB,WAAM,GAAN,MAAM,CAAW;IAA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