@intentcomputing/koko-agent-sdk 1.0.1
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 +10 -0
- package/CODE_OF_CONDUCT.md +3 -0
- package/CONTRIBUTING.md +9 -0
- package/LICENSE +21 -0
- package/README.md +65 -0
- package/README.zh-CN.md +50 -0
- package/SECURITY.md +5 -0
- package/android/build.gradle +40 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/java/cn/intentcomputing/kokoagentsdk/KokoAgentSdkModule.java +1356 -0
- package/android/src/main/java/cn/intentcomputing/kokoagentsdk/KokoAgentSdkPackage.java +23 -0
- package/docs/INTEGRATION.md +168 -0
- package/docs/INTEGRATION.zh-CN.md +140 -0
- package/docs/PRIVACY.md +11 -0
- package/docs/PRIVACY.zh-CN.md +11 -0
- package/docs/PUBLISH.md +11 -0
- package/docs/PUBLISH.zh-CN.md +11 -0
- package/ios/KokoAgentSdk/KokoAgentSdk.h +5 -0
- package/ios/KokoAgentSdk/KokoAgentSdk.m +2464 -0
- package/ios/KokoAgentSdk/KokoOcrBounds.h +20 -0
- package/ios/KokoAgentSdk/KokoScrollBounds.h +21 -0
- package/koko-agent-sdk.podspec +23 -0
- package/lib/commonjs/KokoAgent.js +1427 -0
- package/lib/commonjs/KokoAgent.js.map +1 -0
- package/lib/commonjs/assist/OnDeviceAssist.js +94 -0
- package/lib/commonjs/assist/OnDeviceAssist.js.map +1 -0
- package/lib/commonjs/assist/intentClassify.js +100 -0
- package/lib/commonjs/assist/intentClassify.js.map +1 -0
- package/lib/commonjs/assist/nodeRank.js +120 -0
- package/lib/commonjs/assist/nodeRank.js.map +1 -0
- package/lib/commonjs/assist/ocrTarget.js +135 -0
- package/lib/commonjs/assist/ocrTarget.js.map +1 -0
- package/lib/commonjs/assist/webVisualChange.js +29 -0
- package/lib/commonjs/assist/webVisualChange.js.map +1 -0
- package/lib/commonjs/client/ActionOutcomeUnknownError.js +28 -0
- package/lib/commonjs/client/ActionOutcomeUnknownError.js.map +1 -0
- package/lib/commonjs/client/AgentSession.js +858 -0
- package/lib/commonjs/client/AgentSession.js.map +1 -0
- package/lib/commonjs/client/GatewayClient.js +302 -0
- package/lib/commonjs/client/GatewayClient.js.map +1 -0
- package/lib/commonjs/client/OperationReplayGuard.js +62 -0
- package/lib/commonjs/client/OperationReplayGuard.js.map +1 -0
- package/lib/commonjs/client/RunCheckpoint.js +139 -0
- package/lib/commonjs/client/RunCheckpoint.js.map +1 -0
- package/lib/commonjs/client/loopDetect.js +184 -0
- package/lib/commonjs/client/loopDetect.js.map +1 -0
- package/lib/commonjs/client/recentSearch.js +50 -0
- package/lib/commonjs/client/recentSearch.js.map +1 -0
- package/lib/commonjs/client/walletChoiceGuard.js +18 -0
- package/lib/commonjs/client/walletChoiceGuard.js.map +1 -0
- package/lib/commonjs/client/webResultCategory.js +38 -0
- package/lib/commonjs/client/webResultCategory.js.map +1 -0
- package/lib/commonjs/commercial/AccountStore.js +78 -0
- package/lib/commonjs/commercial/AccountStore.js.map +1 -0
- package/lib/commonjs/commercial/AgentDebug.js +104 -0
- package/lib/commonjs/commercial/AgentDebug.js.map +1 -0
- package/lib/commonjs/commercial/ExecutionGuard.js +53 -0
- package/lib/commonjs/commercial/ExecutionGuard.js.map +1 -0
- package/lib/commonjs/commercial/UsageBus.js +42 -0
- package/lib/commonjs/commercial/UsageBus.js.map +1 -0
- package/lib/commonjs/commercial/branding.js +69 -0
- package/lib/commonjs/commercial/branding.js.map +1 -0
- package/lib/commonjs/commercial/devMode.js +52 -0
- package/lib/commonjs/commercial/devMode.js.map +1 -0
- package/lib/commonjs/commercial/trust.js +69 -0
- package/lib/commonjs/commercial/trust.js.map +1 -0
- package/lib/commonjs/confirmation/gate.js +62 -0
- package/lib/commonjs/confirmation/gate.js.map +1 -0
- package/lib/commonjs/cursor/CursorOverlay.js +141 -0
- package/lib/commonjs/cursor/CursorOverlay.js.map +1 -0
- package/lib/commonjs/cursor/PointerHand.js +51 -0
- package/lib/commonjs/cursor/PointerHand.js.map +1 -0
- package/lib/commonjs/cursor/controller.js +91 -0
- package/lib/commonjs/cursor/controller.js.map +1 -0
- package/lib/commonjs/cursor/pointer.js +49 -0
- package/lib/commonjs/cursor/pointer.js.map +1 -0
- package/lib/commonjs/debug/KokoRemoteSmoke.js +611 -0
- package/lib/commonjs/debug/KokoRemoteSmoke.js.map +1 -0
- package/lib/commonjs/explore/ExplorationGraph.js +418 -0
- package/lib/commonjs/explore/ExplorationGraph.js.map +1 -0
- package/lib/commonjs/explore/bootstrapExplore.js +59 -0
- package/lib/commonjs/explore/bootstrapExplore.js.map +1 -0
- package/lib/commonjs/host/HostActions.js +266 -0
- package/lib/commonjs/host/HostActions.js.map +1 -0
- package/lib/commonjs/i18n/index.js +169 -0
- package/lib/commonjs/i18n/index.js.map +1 -0
- package/lib/commonjs/i18n/runtimeMessages.js +184 -0
- package/lib/commonjs/i18n/runtimeMessages.js.map +1 -0
- package/lib/commonjs/index.js +640 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/native/NativeBridge.js +132 -0
- package/lib/commonjs/native/NativeBridge.js.map +1 -0
- package/lib/commonjs/native/navigationLabel.js +16 -0
- package/lib/commonjs/native/navigationLabel.js.map +1 -0
- package/lib/commonjs/native/normalizeViewTree.js +28 -0
- package/lib/commonjs/native/normalizeViewTree.js.map +1 -0
- package/lib/commonjs/native/pruneOffscreen.js +76 -0
- package/lib/commonjs/native/pruneOffscreen.js.map +1 -0
- package/lib/commonjs/native/scrollViewport.js +69 -0
- package/lib/commonjs/native/scrollViewport.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/privacy/redact.js +108 -0
- package/lib/commonjs/privacy/redact.js.map +1 -0
- package/lib/commonjs/privacy/screenEvidence.js +59 -0
- package/lib/commonjs/privacy/screenEvidence.js.map +1 -0
- package/lib/commonjs/privacy/screenModel.js +404 -0
- package/lib/commonjs/privacy/screenModel.js.map +1 -0
- package/lib/commonjs/privacy/sensitiveScreen.js +58 -0
- package/lib/commonjs/privacy/sensitiveScreen.js.map +1 -0
- package/lib/commonjs/privacy/userGate.js +213 -0
- package/lib/commonjs/privacy/userGate.js.map +1 -0
- package/lib/commonjs/protocol/actions.js +112 -0
- package/lib/commonjs/protocol/actions.js.map +1 -0
- package/lib/commonjs/provider/HostAppearanceStore.js +111 -0
- package/lib/commonjs/provider/HostAppearanceStore.js.map +1 -0
- package/lib/commonjs/provider/KokoProvider.js +81 -0
- package/lib/commonjs/provider/KokoProvider.js.map +1 -0
- package/lib/commonjs/provider/KokoUiContext.js +102 -0
- package/lib/commonjs/provider/KokoUiContext.js.map +1 -0
- package/lib/commonjs/selector/match.js +378 -0
- package/lib/commonjs/selector/match.js.map +1 -0
- package/lib/commonjs/task/TaskStore.js +361 -0
- package/lib/commonjs/task/TaskStore.js.map +1 -0
- package/lib/commonjs/task/types.js +2 -0
- package/lib/commonjs/task/types.js.map +1 -0
- package/lib/commonjs/task/useTaskStore.js +14 -0
- package/lib/commonjs/task/useTaskStore.js.map +1 -0
- package/lib/commonjs/types.js +2 -0
- package/lib/commonjs/types.js.map +1 -0
- package/lib/commonjs/ui/KokoChatSheet.js +885 -0
- package/lib/commonjs/ui/KokoChatSheet.js.map +1 -0
- package/lib/commonjs/ui/KokoComposer.js +161 -0
- package/lib/commonjs/ui/KokoComposer.js.map +1 -0
- package/lib/commonjs/ui/KokoDialogHost.js +254 -0
- package/lib/commonjs/ui/KokoDialogHost.js.map +1 -0
- package/lib/commonjs/ui/KokoEntryButton.js +81 -0
- package/lib/commonjs/ui/KokoEntryButton.js.map +1 -0
- package/lib/commonjs/ui/KokoObserver.js +522 -0
- package/lib/commonjs/ui/KokoObserver.js.map +1 -0
- package/lib/commonjs/ui/KokoOverlayLayer.js +45 -0
- package/lib/commonjs/ui/KokoOverlayLayer.js.map +1 -0
- package/lib/commonjs/ui/KokoSubtitle.js +95 -0
- package/lib/commonjs/ui/KokoSubtitle.js.map +1 -0
- package/lib/commonjs/ui/KokoTaskPanel.js +322 -0
- package/lib/commonjs/ui/KokoTaskPanel.js.map +1 -0
- package/lib/commonjs/ui/hostOverlay.js +126 -0
- package/lib/commonjs/ui/hostOverlay.js.map +1 -0
- package/lib/commonjs/ui/icons.js +132 -0
- package/lib/commonjs/ui/icons.js.map +1 -0
- package/lib/commonjs/ui/progressChrome.js +66 -0
- package/lib/commonjs/ui/progressChrome.js.map +1 -0
- package/lib/commonjs/ui/safeArea.js +96 -0
- package/lib/commonjs/ui/safeArea.js.map +1 -0
- package/lib/commonjs/ui/useOverlayOrigin.js +40 -0
- package/lib/commonjs/ui/useOverlayOrigin.js.map +1 -0
- package/lib/module/KokoAgent.js +1418 -0
- package/lib/module/KokoAgent.js.map +1 -0
- package/lib/module/assist/OnDeviceAssist.js +89 -0
- package/lib/module/assist/OnDeviceAssist.js.map +1 -0
- package/lib/module/assist/intentClassify.js +95 -0
- package/lib/module/assist/intentClassify.js.map +1 -0
- package/lib/module/assist/nodeRank.js +115 -0
- package/lib/module/assist/nodeRank.js.map +1 -0
- package/lib/module/assist/ocrTarget.js +123 -0
- package/lib/module/assist/ocrTarget.js.map +1 -0
- package/lib/module/assist/webVisualChange.js +24 -0
- package/lib/module/assist/webVisualChange.js.map +1 -0
- package/lib/module/client/ActionOutcomeUnknownError.js +23 -0
- package/lib/module/client/ActionOutcomeUnknownError.js.map +1 -0
- package/lib/module/client/AgentSession.js +854 -0
- package/lib/module/client/AgentSession.js.map +1 -0
- package/lib/module/client/GatewayClient.js +293 -0
- package/lib/module/client/GatewayClient.js.map +1 -0
- package/lib/module/client/OperationReplayGuard.js +58 -0
- package/lib/module/client/OperationReplayGuard.js.map +1 -0
- package/lib/module/client/RunCheckpoint.js +135 -0
- package/lib/module/client/RunCheckpoint.js.map +1 -0
- package/lib/module/client/loopDetect.js +177 -0
- package/lib/module/client/loopDetect.js.map +1 -0
- package/lib/module/client/recentSearch.js +46 -0
- package/lib/module/client/recentSearch.js.map +1 -0
- package/lib/module/client/walletChoiceGuard.js +14 -0
- package/lib/module/client/walletChoiceGuard.js.map +1 -0
- package/lib/module/client/webResultCategory.js +34 -0
- package/lib/module/client/webResultCategory.js.map +1 -0
- package/lib/module/commercial/AccountStore.js +75 -0
- package/lib/module/commercial/AccountStore.js.map +1 -0
- package/lib/module/commercial/AgentDebug.js +99 -0
- package/lib/module/commercial/AgentDebug.js.map +1 -0
- package/lib/module/commercial/ExecutionGuard.js +49 -0
- package/lib/module/commercial/ExecutionGuard.js.map +1 -0
- package/lib/module/commercial/UsageBus.js +38 -0
- package/lib/module/commercial/UsageBus.js.map +1 -0
- package/lib/module/commercial/branding.js +63 -0
- package/lib/module/commercial/branding.js.map +1 -0
- package/lib/module/commercial/devMode.js +45 -0
- package/lib/module/commercial/devMode.js.map +1 -0
- package/lib/module/commercial/trust.js +62 -0
- package/lib/module/commercial/trust.js.map +1 -0
- package/lib/module/confirmation/gate.js +54 -0
- package/lib/module/confirmation/gate.js.map +1 -0
- package/lib/module/cursor/CursorOverlay.js +136 -0
- package/lib/module/cursor/CursorOverlay.js.map +1 -0
- package/lib/module/cursor/PointerHand.js +47 -0
- package/lib/module/cursor/PointerHand.js.map +1 -0
- package/lib/module/cursor/controller.js +87 -0
- package/lib/module/cursor/controller.js.map +1 -0
- package/lib/module/cursor/pointer.js +45 -0
- package/lib/module/cursor/pointer.js.map +1 -0
- package/lib/module/debug/KokoRemoteSmoke.js +608 -0
- package/lib/module/debug/KokoRemoteSmoke.js.map +1 -0
- package/lib/module/explore/ExplorationGraph.js +406 -0
- package/lib/module/explore/ExplorationGraph.js.map +1 -0
- package/lib/module/explore/bootstrapExplore.js +55 -0
- package/lib/module/explore/bootstrapExplore.js.map +1 -0
- package/lib/module/host/HostActions.js +255 -0
- package/lib/module/host/HostActions.js.map +1 -0
- package/lib/module/i18n/index.js +159 -0
- package/lib/module/i18n/index.js.map +1 -0
- package/lib/module/i18n/runtimeMessages.js +180 -0
- package/lib/module/i18n/runtimeMessages.js.map +1 -0
- package/lib/module/index.js +44 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/native/NativeBridge.js +128 -0
- package/lib/module/native/NativeBridge.js.map +1 -0
- package/lib/module/native/navigationLabel.js +12 -0
- package/lib/module/native/navigationLabel.js.map +1 -0
- package/lib/module/native/normalizeViewTree.js +25 -0
- package/lib/module/native/normalizeViewTree.js.map +1 -0
- package/lib/module/native/pruneOffscreen.js +72 -0
- package/lib/module/native/pruneOffscreen.js.map +1 -0
- package/lib/module/native/scrollViewport.js +63 -0
- package/lib/module/native/scrollViewport.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/privacy/redact.js +103 -0
- package/lib/module/privacy/redact.js.map +1 -0
- package/lib/module/privacy/screenEvidence.js +50 -0
- package/lib/module/privacy/screenEvidence.js.map +1 -0
- package/lib/module/privacy/screenModel.js +397 -0
- package/lib/module/privacy/screenModel.js.map +1 -0
- package/lib/module/privacy/sensitiveScreen.js +52 -0
- package/lib/module/privacy/sensitiveScreen.js.map +1 -0
- package/lib/module/privacy/userGate.js +202 -0
- package/lib/module/privacy/userGate.js.map +1 -0
- package/lib/module/protocol/actions.js +108 -0
- package/lib/module/protocol/actions.js.map +1 -0
- package/lib/module/provider/HostAppearanceStore.js +101 -0
- package/lib/module/provider/HostAppearanceStore.js.map +1 -0
- package/lib/module/provider/KokoProvider.js +74 -0
- package/lib/module/provider/KokoProvider.js.map +1 -0
- package/lib/module/provider/KokoUiContext.js +96 -0
- package/lib/module/provider/KokoUiContext.js.map +1 -0
- package/lib/module/selector/match.js +366 -0
- package/lib/module/selector/match.js.map +1 -0
- package/lib/module/task/TaskStore.js +356 -0
- package/lib/module/task/TaskStore.js.map +1 -0
- package/lib/module/task/types.js +2 -0
- package/lib/module/task/types.js.map +1 -0
- package/lib/module/task/useTaskStore.js +10 -0
- package/lib/module/task/useTaskStore.js.map +1 -0
- package/lib/module/types.js +2 -0
- package/lib/module/types.js.map +1 -0
- package/lib/module/ui/KokoChatSheet.js +879 -0
- package/lib/module/ui/KokoChatSheet.js.map +1 -0
- package/lib/module/ui/KokoComposer.js +155 -0
- package/lib/module/ui/KokoComposer.js.map +1 -0
- package/lib/module/ui/KokoDialogHost.js +247 -0
- package/lib/module/ui/KokoDialogHost.js.map +1 -0
- package/lib/module/ui/KokoEntryButton.js +74 -0
- package/lib/module/ui/KokoEntryButton.js.map +1 -0
- package/lib/module/ui/KokoObserver.js +516 -0
- package/lib/module/ui/KokoObserver.js.map +1 -0
- package/lib/module/ui/KokoOverlayLayer.js +39 -0
- package/lib/module/ui/KokoOverlayLayer.js.map +1 -0
- package/lib/module/ui/KokoSubtitle.js +90 -0
- package/lib/module/ui/KokoSubtitle.js.map +1 -0
- package/lib/module/ui/KokoTaskPanel.js +316 -0
- package/lib/module/ui/KokoTaskPanel.js.map +1 -0
- package/lib/module/ui/hostOverlay.js +120 -0
- package/lib/module/ui/hostOverlay.js.map +1 -0
- package/lib/module/ui/icons.js +124 -0
- package/lib/module/ui/icons.js.map +1 -0
- package/lib/module/ui/progressChrome.js +58 -0
- package/lib/module/ui/progressChrome.js.map +1 -0
- package/lib/module/ui/safeArea.js +92 -0
- package/lib/module/ui/safeArea.js.map +1 -0
- package/lib/module/ui/useOverlayOrigin.js +36 -0
- package/lib/module/ui/useOverlayOrigin.js.map +1 -0
- package/lib/typescript/commonjs/KokoAgent.d.ts +167 -0
- package/lib/typescript/commonjs/KokoAgent.d.ts.map +1 -0
- package/lib/typescript/commonjs/assist/OnDeviceAssist.d.ts +31 -0
- package/lib/typescript/commonjs/assist/OnDeviceAssist.d.ts.map +1 -0
- package/lib/typescript/commonjs/assist/intentClassify.d.ts +18 -0
- package/lib/typescript/commonjs/assist/intentClassify.d.ts.map +1 -0
- package/lib/typescript/commonjs/assist/nodeRank.d.ts +32 -0
- package/lib/typescript/commonjs/assist/nodeRank.d.ts.map +1 -0
- package/lib/typescript/commonjs/assist/ocrTarget.d.ts +25 -0
- package/lib/typescript/commonjs/assist/ocrTarget.d.ts.map +1 -0
- package/lib/typescript/commonjs/assist/webVisualChange.d.ts +6 -0
- package/lib/typescript/commonjs/assist/webVisualChange.d.ts.map +1 -0
- package/lib/typescript/commonjs/client/ActionOutcomeUnknownError.d.ts +13 -0
- package/lib/typescript/commonjs/client/ActionOutcomeUnknownError.d.ts.map +1 -0
- package/lib/typescript/commonjs/client/AgentSession.d.ts +56 -0
- package/lib/typescript/commonjs/client/AgentSession.d.ts.map +1 -0
- package/lib/typescript/commonjs/client/GatewayClient.d.ts +149 -0
- package/lib/typescript/commonjs/client/GatewayClient.d.ts.map +1 -0
- package/lib/typescript/commonjs/client/OperationReplayGuard.d.ts +13 -0
- package/lib/typescript/commonjs/client/OperationReplayGuard.d.ts.map +1 -0
- package/lib/typescript/commonjs/client/RunCheckpoint.d.ts +57 -0
- package/lib/typescript/commonjs/client/RunCheckpoint.d.ts.map +1 -0
- package/lib/typescript/commonjs/client/loopDetect.d.ts +15 -0
- package/lib/typescript/commonjs/client/loopDetect.d.ts.map +1 -0
- package/lib/typescript/commonjs/client/recentSearch.d.ts +5 -0
- package/lib/typescript/commonjs/client/recentSearch.d.ts.map +1 -0
- package/lib/typescript/commonjs/client/walletChoiceGuard.d.ts +4 -0
- package/lib/typescript/commonjs/client/walletChoiceGuard.d.ts.map +1 -0
- package/lib/typescript/commonjs/client/webResultCategory.d.ts +5 -0
- package/lib/typescript/commonjs/client/webResultCategory.d.ts.map +1 -0
- package/lib/typescript/commonjs/commercial/AccountStore.d.ts +17 -0
- package/lib/typescript/commonjs/commercial/AccountStore.d.ts.map +1 -0
- package/lib/typescript/commonjs/commercial/AgentDebug.d.ts +25 -0
- package/lib/typescript/commonjs/commercial/AgentDebug.d.ts.map +1 -0
- package/lib/typescript/commonjs/commercial/ExecutionGuard.d.ts +18 -0
- package/lib/typescript/commonjs/commercial/ExecutionGuard.d.ts.map +1 -0
- package/lib/typescript/commonjs/commercial/UsageBus.d.ts +18 -0
- package/lib/typescript/commonjs/commercial/UsageBus.d.ts.map +1 -0
- package/lib/typescript/commonjs/commercial/branding.d.ts +25 -0
- package/lib/typescript/commonjs/commercial/branding.d.ts.map +1 -0
- package/lib/typescript/commonjs/commercial/devMode.d.ts +26 -0
- package/lib/typescript/commonjs/commercial/devMode.d.ts.map +1 -0
- package/lib/typescript/commonjs/commercial/trust.d.ts +21 -0
- package/lib/typescript/commonjs/commercial/trust.d.ts.map +1 -0
- package/lib/typescript/commonjs/confirmation/gate.d.ts +18 -0
- package/lib/typescript/commonjs/confirmation/gate.d.ts.map +1 -0
- package/lib/typescript/commonjs/cursor/CursorOverlay.d.ts +13 -0
- package/lib/typescript/commonjs/cursor/CursorOverlay.d.ts.map +1 -0
- package/lib/typescript/commonjs/cursor/PointerHand.d.ts +16 -0
- package/lib/typescript/commonjs/cursor/PointerHand.d.ts.map +1 -0
- package/lib/typescript/commonjs/cursor/controller.d.ts +30 -0
- package/lib/typescript/commonjs/cursor/controller.d.ts.map +1 -0
- package/lib/typescript/commonjs/cursor/pointer.d.ts +23 -0
- package/lib/typescript/commonjs/cursor/pointer.d.ts.map +1 -0
- package/lib/typescript/commonjs/debug/KokoRemoteSmoke.d.ts +96 -0
- package/lib/typescript/commonjs/debug/KokoRemoteSmoke.d.ts.map +1 -0
- package/lib/typescript/commonjs/explore/ExplorationGraph.d.ts +96 -0
- package/lib/typescript/commonjs/explore/ExplorationGraph.d.ts.map +1 -0
- package/lib/typescript/commonjs/explore/bootstrapExplore.d.ts +40 -0
- package/lib/typescript/commonjs/explore/bootstrapExplore.d.ts.map +1 -0
- package/lib/typescript/commonjs/host/HostActions.d.ts +101 -0
- package/lib/typescript/commonjs/host/HostActions.d.ts.map +1 -0
- package/lib/typescript/commonjs/i18n/index.d.ts +20 -0
- package/lib/typescript/commonjs/i18n/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/i18n/runtimeMessages.d.ts +178 -0
- package/lib/typescript/commonjs/i18n/runtimeMessages.d.ts.map +1 -0
- package/lib/typescript/commonjs/index.d.ts +66 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/native/NativeBridge.d.ts +70 -0
- package/lib/typescript/commonjs/native/NativeBridge.d.ts.map +1 -0
- package/lib/typescript/commonjs/native/navigationLabel.d.ts +4 -0
- package/lib/typescript/commonjs/native/navigationLabel.d.ts.map +1 -0
- package/lib/typescript/commonjs/native/normalizeViewTree.d.ts +4 -0
- package/lib/typescript/commonjs/native/normalizeViewTree.d.ts.map +1 -0
- package/lib/typescript/commonjs/native/pruneOffscreen.d.ts +3 -0
- package/lib/typescript/commonjs/native/pruneOffscreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/native/scrollViewport.d.ts +13 -0
- package/lib/typescript/commonjs/native/scrollViewport.d.ts.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/privacy/redact.d.ts +9 -0
- package/lib/typescript/commonjs/privacy/redact.d.ts.map +1 -0
- package/lib/typescript/commonjs/privacy/screenEvidence.d.ts +14 -0
- package/lib/typescript/commonjs/privacy/screenEvidence.d.ts.map +1 -0
- package/lib/typescript/commonjs/privacy/screenModel.d.ts +26 -0
- package/lib/typescript/commonjs/privacy/screenModel.d.ts.map +1 -0
- package/lib/typescript/commonjs/privacy/sensitiveScreen.d.ts +8 -0
- package/lib/typescript/commonjs/privacy/sensitiveScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/privacy/userGate.d.ts +58 -0
- package/lib/typescript/commonjs/privacy/userGate.d.ts.map +1 -0
- package/lib/typescript/commonjs/protocol/actions.d.ts +7 -0
- package/lib/typescript/commonjs/protocol/actions.d.ts.map +1 -0
- package/lib/typescript/commonjs/provider/HostAppearanceStore.d.ts +64 -0
- package/lib/typescript/commonjs/provider/HostAppearanceStore.d.ts.map +1 -0
- package/lib/typescript/commonjs/provider/KokoProvider.d.ts +39 -0
- package/lib/typescript/commonjs/provider/KokoProvider.d.ts.map +1 -0
- package/lib/typescript/commonjs/provider/KokoUiContext.d.ts +22 -0
- package/lib/typescript/commonjs/provider/KokoUiContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/selector/match.d.ts +27 -0
- package/lib/typescript/commonjs/selector/match.d.ts.map +1 -0
- package/lib/typescript/commonjs/task/TaskStore.d.ts +65 -0
- package/lib/typescript/commonjs/task/TaskStore.d.ts.map +1 -0
- package/lib/typescript/commonjs/task/types.d.ts +66 -0
- package/lib/typescript/commonjs/task/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/task/useTaskStore.d.ts +3 -0
- package/lib/typescript/commonjs/task/useTaskStore.d.ts.map +1 -0
- package/lib/typescript/commonjs/types.d.ts +372 -0
- package/lib/typescript/commonjs/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/KokoChatSheet.d.ts +8 -0
- package/lib/typescript/commonjs/ui/KokoChatSheet.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/KokoComposer.d.ts +13 -0
- package/lib/typescript/commonjs/ui/KokoComposer.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/KokoDialogHost.d.ts +32 -0
- package/lib/typescript/commonjs/ui/KokoDialogHost.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/KokoEntryButton.d.ts +18 -0
- package/lib/typescript/commonjs/ui/KokoEntryButton.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/KokoObserver.d.ts +13 -0
- package/lib/typescript/commonjs/ui/KokoObserver.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/KokoOverlayLayer.d.ts +35 -0
- package/lib/typescript/commonjs/ui/KokoOverlayLayer.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/KokoSubtitle.d.ts +7 -0
- package/lib/typescript/commonjs/ui/KokoSubtitle.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/KokoTaskPanel.d.ts +7 -0
- package/lib/typescript/commonjs/ui/KokoTaskPanel.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/hostOverlay.d.ts +28 -0
- package/lib/typescript/commonjs/ui/hostOverlay.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/icons.d.ts +26 -0
- package/lib/typescript/commonjs/ui/icons.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/progressChrome.d.ts +21 -0
- package/lib/typescript/commonjs/ui/progressChrome.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/safeArea.d.ts +12 -0
- package/lib/typescript/commonjs/ui/safeArea.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/useOverlayOrigin.d.ts +22 -0
- package/lib/typescript/commonjs/ui/useOverlayOrigin.d.ts.map +1 -0
- package/lib/typescript/module/KokoAgent.d.ts +167 -0
- package/lib/typescript/module/KokoAgent.d.ts.map +1 -0
- package/lib/typescript/module/assist/OnDeviceAssist.d.ts +31 -0
- package/lib/typescript/module/assist/OnDeviceAssist.d.ts.map +1 -0
- package/lib/typescript/module/assist/intentClassify.d.ts +18 -0
- package/lib/typescript/module/assist/intentClassify.d.ts.map +1 -0
- package/lib/typescript/module/assist/nodeRank.d.ts +32 -0
- package/lib/typescript/module/assist/nodeRank.d.ts.map +1 -0
- package/lib/typescript/module/assist/ocrTarget.d.ts +25 -0
- package/lib/typescript/module/assist/ocrTarget.d.ts.map +1 -0
- package/lib/typescript/module/assist/webVisualChange.d.ts +6 -0
- package/lib/typescript/module/assist/webVisualChange.d.ts.map +1 -0
- package/lib/typescript/module/client/ActionOutcomeUnknownError.d.ts +13 -0
- package/lib/typescript/module/client/ActionOutcomeUnknownError.d.ts.map +1 -0
- package/lib/typescript/module/client/AgentSession.d.ts +56 -0
- package/lib/typescript/module/client/AgentSession.d.ts.map +1 -0
- package/lib/typescript/module/client/GatewayClient.d.ts +149 -0
- package/lib/typescript/module/client/GatewayClient.d.ts.map +1 -0
- package/lib/typescript/module/client/OperationReplayGuard.d.ts +13 -0
- package/lib/typescript/module/client/OperationReplayGuard.d.ts.map +1 -0
- package/lib/typescript/module/client/RunCheckpoint.d.ts +57 -0
- package/lib/typescript/module/client/RunCheckpoint.d.ts.map +1 -0
- package/lib/typescript/module/client/loopDetect.d.ts +15 -0
- package/lib/typescript/module/client/loopDetect.d.ts.map +1 -0
- package/lib/typescript/module/client/recentSearch.d.ts +5 -0
- package/lib/typescript/module/client/recentSearch.d.ts.map +1 -0
- package/lib/typescript/module/client/walletChoiceGuard.d.ts +4 -0
- package/lib/typescript/module/client/walletChoiceGuard.d.ts.map +1 -0
- package/lib/typescript/module/client/webResultCategory.d.ts +5 -0
- package/lib/typescript/module/client/webResultCategory.d.ts.map +1 -0
- package/lib/typescript/module/commercial/AccountStore.d.ts +17 -0
- package/lib/typescript/module/commercial/AccountStore.d.ts.map +1 -0
- package/lib/typescript/module/commercial/AgentDebug.d.ts +25 -0
- package/lib/typescript/module/commercial/AgentDebug.d.ts.map +1 -0
- package/lib/typescript/module/commercial/ExecutionGuard.d.ts +18 -0
- package/lib/typescript/module/commercial/ExecutionGuard.d.ts.map +1 -0
- package/lib/typescript/module/commercial/UsageBus.d.ts +18 -0
- package/lib/typescript/module/commercial/UsageBus.d.ts.map +1 -0
- package/lib/typescript/module/commercial/branding.d.ts +25 -0
- package/lib/typescript/module/commercial/branding.d.ts.map +1 -0
- package/lib/typescript/module/commercial/devMode.d.ts +26 -0
- package/lib/typescript/module/commercial/devMode.d.ts.map +1 -0
- package/lib/typescript/module/commercial/trust.d.ts +21 -0
- package/lib/typescript/module/commercial/trust.d.ts.map +1 -0
- package/lib/typescript/module/confirmation/gate.d.ts +18 -0
- package/lib/typescript/module/confirmation/gate.d.ts.map +1 -0
- package/lib/typescript/module/cursor/CursorOverlay.d.ts +13 -0
- package/lib/typescript/module/cursor/CursorOverlay.d.ts.map +1 -0
- package/lib/typescript/module/cursor/PointerHand.d.ts +16 -0
- package/lib/typescript/module/cursor/PointerHand.d.ts.map +1 -0
- package/lib/typescript/module/cursor/controller.d.ts +30 -0
- package/lib/typescript/module/cursor/controller.d.ts.map +1 -0
- package/lib/typescript/module/cursor/pointer.d.ts +23 -0
- package/lib/typescript/module/cursor/pointer.d.ts.map +1 -0
- package/lib/typescript/module/debug/KokoRemoteSmoke.d.ts +96 -0
- package/lib/typescript/module/debug/KokoRemoteSmoke.d.ts.map +1 -0
- package/lib/typescript/module/explore/ExplorationGraph.d.ts +96 -0
- package/lib/typescript/module/explore/ExplorationGraph.d.ts.map +1 -0
- package/lib/typescript/module/explore/bootstrapExplore.d.ts +40 -0
- package/lib/typescript/module/explore/bootstrapExplore.d.ts.map +1 -0
- package/lib/typescript/module/host/HostActions.d.ts +101 -0
- package/lib/typescript/module/host/HostActions.d.ts.map +1 -0
- package/lib/typescript/module/i18n/index.d.ts +20 -0
- package/lib/typescript/module/i18n/index.d.ts.map +1 -0
- package/lib/typescript/module/i18n/runtimeMessages.d.ts +178 -0
- package/lib/typescript/module/i18n/runtimeMessages.d.ts.map +1 -0
- package/lib/typescript/module/index.d.ts +66 -0
- package/lib/typescript/module/index.d.ts.map +1 -0
- package/lib/typescript/module/native/NativeBridge.d.ts +70 -0
- package/lib/typescript/module/native/NativeBridge.d.ts.map +1 -0
- package/lib/typescript/module/native/navigationLabel.d.ts +4 -0
- package/lib/typescript/module/native/navigationLabel.d.ts.map +1 -0
- package/lib/typescript/module/native/normalizeViewTree.d.ts +4 -0
- package/lib/typescript/module/native/normalizeViewTree.d.ts.map +1 -0
- package/lib/typescript/module/native/pruneOffscreen.d.ts +3 -0
- package/lib/typescript/module/native/pruneOffscreen.d.ts.map +1 -0
- package/lib/typescript/module/native/scrollViewport.d.ts +13 -0
- package/lib/typescript/module/native/scrollViewport.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/privacy/redact.d.ts +9 -0
- package/lib/typescript/module/privacy/redact.d.ts.map +1 -0
- package/lib/typescript/module/privacy/screenEvidence.d.ts +14 -0
- package/lib/typescript/module/privacy/screenEvidence.d.ts.map +1 -0
- package/lib/typescript/module/privacy/screenModel.d.ts +26 -0
- package/lib/typescript/module/privacy/screenModel.d.ts.map +1 -0
- package/lib/typescript/module/privacy/sensitiveScreen.d.ts +8 -0
- package/lib/typescript/module/privacy/sensitiveScreen.d.ts.map +1 -0
- package/lib/typescript/module/privacy/userGate.d.ts +58 -0
- package/lib/typescript/module/privacy/userGate.d.ts.map +1 -0
- package/lib/typescript/module/protocol/actions.d.ts +7 -0
- package/lib/typescript/module/protocol/actions.d.ts.map +1 -0
- package/lib/typescript/module/provider/HostAppearanceStore.d.ts +64 -0
- package/lib/typescript/module/provider/HostAppearanceStore.d.ts.map +1 -0
- package/lib/typescript/module/provider/KokoProvider.d.ts +39 -0
- package/lib/typescript/module/provider/KokoProvider.d.ts.map +1 -0
- package/lib/typescript/module/provider/KokoUiContext.d.ts +22 -0
- package/lib/typescript/module/provider/KokoUiContext.d.ts.map +1 -0
- package/lib/typescript/module/selector/match.d.ts +27 -0
- package/lib/typescript/module/selector/match.d.ts.map +1 -0
- package/lib/typescript/module/task/TaskStore.d.ts +65 -0
- package/lib/typescript/module/task/TaskStore.d.ts.map +1 -0
- package/lib/typescript/module/task/types.d.ts +66 -0
- package/lib/typescript/module/task/types.d.ts.map +1 -0
- package/lib/typescript/module/task/useTaskStore.d.ts +3 -0
- package/lib/typescript/module/task/useTaskStore.d.ts.map +1 -0
- package/lib/typescript/module/types.d.ts +372 -0
- package/lib/typescript/module/types.d.ts.map +1 -0
- package/lib/typescript/module/ui/KokoChatSheet.d.ts +8 -0
- package/lib/typescript/module/ui/KokoChatSheet.d.ts.map +1 -0
- package/lib/typescript/module/ui/KokoComposer.d.ts +13 -0
- package/lib/typescript/module/ui/KokoComposer.d.ts.map +1 -0
- package/lib/typescript/module/ui/KokoDialogHost.d.ts +32 -0
- package/lib/typescript/module/ui/KokoDialogHost.d.ts.map +1 -0
- package/lib/typescript/module/ui/KokoEntryButton.d.ts +18 -0
- package/lib/typescript/module/ui/KokoEntryButton.d.ts.map +1 -0
- package/lib/typescript/module/ui/KokoObserver.d.ts +13 -0
- package/lib/typescript/module/ui/KokoObserver.d.ts.map +1 -0
- package/lib/typescript/module/ui/KokoOverlayLayer.d.ts +35 -0
- package/lib/typescript/module/ui/KokoOverlayLayer.d.ts.map +1 -0
- package/lib/typescript/module/ui/KokoSubtitle.d.ts +7 -0
- package/lib/typescript/module/ui/KokoSubtitle.d.ts.map +1 -0
- package/lib/typescript/module/ui/KokoTaskPanel.d.ts +7 -0
- package/lib/typescript/module/ui/KokoTaskPanel.d.ts.map +1 -0
- package/lib/typescript/module/ui/hostOverlay.d.ts +28 -0
- package/lib/typescript/module/ui/hostOverlay.d.ts.map +1 -0
- package/lib/typescript/module/ui/icons.d.ts +26 -0
- package/lib/typescript/module/ui/icons.d.ts.map +1 -0
- package/lib/typescript/module/ui/progressChrome.d.ts +21 -0
- package/lib/typescript/module/ui/progressChrome.d.ts.map +1 -0
- package/lib/typescript/module/ui/safeArea.d.ts +12 -0
- package/lib/typescript/module/ui/safeArea.d.ts.map +1 -0
- package/lib/typescript/module/ui/useOverlayOrigin.d.ts +22 -0
- package/lib/typescript/module/ui/useOverlayOrigin.d.ts.map +1 -0
- package/package.json +153 -0
- package/react-native.config.js +12 -0
- package/src/KokoAgent.ts +1415 -0
- package/src/assist/OnDeviceAssist.ts +133 -0
- package/src/assist/intentClassify.ts +122 -0
- package/src/assist/nodeRank.ts +167 -0
- package/src/assist/ocrTarget.ts +146 -0
- package/src/assist/webVisualChange.ts +24 -0
- package/src/client/ActionOutcomeUnknownError.ts +18 -0
- package/src/client/AgentSession.ts +952 -0
- package/src/client/GatewayClient.ts +439 -0
- package/src/client/OperationReplayGuard.ts +61 -0
- package/src/client/RunCheckpoint.ts +154 -0
- package/src/client/loopDetect.ts +213 -0
- package/src/client/recentSearch.ts +47 -0
- package/src/client/walletChoiceGuard.ts +15 -0
- package/src/client/webResultCategory.ts +28 -0
- package/src/commercial/AccountStore.ts +85 -0
- package/src/commercial/AgentDebug.ts +142 -0
- package/src/commercial/ExecutionGuard.ts +67 -0
- package/src/commercial/UsageBus.ts +44 -0
- package/src/commercial/branding.ts +97 -0
- package/src/commercial/devMode.ts +48 -0
- package/src/commercial/trust.ts +67 -0
- package/src/confirmation/gate.ts +82 -0
- package/src/cursor/CursorOverlay.tsx +138 -0
- package/src/cursor/PointerHand.tsx +49 -0
- package/src/cursor/controller.ts +98 -0
- package/src/cursor/pointer.ts +40 -0
- package/src/debug/KokoRemoteSmoke.tsx +561 -0
- package/src/explore/ExplorationGraph.ts +518 -0
- package/src/explore/bootstrapExplore.ts +89 -0
- package/src/host/HostActions.ts +349 -0
- package/src/i18n/index.ts +229 -0
- package/src/i18n/runtimeMessages.ts +180 -0
- package/src/index.ts +203 -0
- package/src/native/NativeBridge.ts +207 -0
- package/src/native/navigationLabel.ts +11 -0
- package/src/native/normalizeViewTree.ts +16 -0
- package/src/native/pruneOffscreen.ts +72 -0
- package/src/native/scrollViewport.ts +51 -0
- package/src/privacy/redact.ts +115 -0
- package/src/privacy/screenEvidence.ts +55 -0
- package/src/privacy/screenModel.ts +504 -0
- package/src/privacy/sensitiveScreen.ts +55 -0
- package/src/privacy/userGate.ts +233 -0
- package/src/protocol/actions.ts +66 -0
- package/src/provider/HostAppearanceStore.ts +148 -0
- package/src/provider/KokoProvider.tsx +118 -0
- package/src/provider/KokoUiContext.tsx +162 -0
- package/src/selector/match.ts +417 -0
- package/src/task/TaskStore.ts +387 -0
- package/src/task/types.ts +82 -0
- package/src/task/useTaskStore.ts +9 -0
- package/src/types.ts +318 -0
- package/src/ui/KokoChatSheet.tsx +930 -0
- package/src/ui/KokoComposer.tsx +174 -0
- package/src/ui/KokoDialogHost.tsx +249 -0
- package/src/ui/KokoEntryButton.tsx +74 -0
- package/src/ui/KokoObserver.tsx +587 -0
- package/src/ui/KokoOverlayLayer.tsx +53 -0
- package/src/ui/KokoSubtitle.tsx +80 -0
- package/src/ui/KokoTaskPanel.tsx +299 -0
- package/src/ui/hostOverlay.tsx +148 -0
- package/src/ui/icons.tsx +145 -0
- package/src/ui/progressChrome.ts +73 -0
- package/src/ui/safeArea.ts +95 -0
- package/src/ui/useOverlayOrigin.ts +29 -0
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TaskStoreImpl = exports.TaskStore = void 0;
|
|
7
|
+
var _UsageBus = require("../commercial/UsageBus.js");
|
|
8
|
+
var _HostAppearanceStore = require("../provider/HostAppearanceStore.js");
|
|
9
|
+
var _index = require("../i18n/index.js");
|
|
10
|
+
function uid(prefix) {
|
|
11
|
+
return `${prefix}_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 8)}`;
|
|
12
|
+
}
|
|
13
|
+
const MAX_TASKS = 40;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* In-memory task + node history for the observer UI.
|
|
17
|
+
*/
|
|
18
|
+
class TaskStoreImpl {
|
|
19
|
+
tasks = [];
|
|
20
|
+
activeTaskId = null;
|
|
21
|
+
resultFlash = null;
|
|
22
|
+
userGateWaiting = null;
|
|
23
|
+
localizedTitles = new Map();
|
|
24
|
+
localizedTaskTitles = new Map();
|
|
25
|
+
localizedResult = null;
|
|
26
|
+
unsubscribeAppearance = null;
|
|
27
|
+
appearanceChanged = false;
|
|
28
|
+
lastChromeLiftAt = 0;
|
|
29
|
+
ui = {
|
|
30
|
+
sheetOpen: false,
|
|
31
|
+
selectedTaskId: null,
|
|
32
|
+
chromeSuppressed: false,
|
|
33
|
+
chromeEpoch: 0
|
|
34
|
+
};
|
|
35
|
+
listeners = new Set();
|
|
36
|
+
subscribe(listener) {
|
|
37
|
+
this.listeners.add(listener);
|
|
38
|
+
if (!this.unsubscribeAppearance) {
|
|
39
|
+
let locale = _HostAppearanceStore.HostAppearanceStore.get().locale;
|
|
40
|
+
this.unsubscribeAppearance = _HostAppearanceStore.HostAppearanceStore.subscribe(() => {
|
|
41
|
+
const next = _HostAppearanceStore.HostAppearanceStore.get().locale;
|
|
42
|
+
if (next !== locale && this.activeTaskId) this.appearanceChanged = true;
|
|
43
|
+
locale = next;
|
|
44
|
+
this.emit();
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
listener(this.snapshot());
|
|
48
|
+
return () => {
|
|
49
|
+
this.listeners.delete(listener);
|
|
50
|
+
if (!this.listeners.size) {
|
|
51
|
+
this.unsubscribeAppearance?.();
|
|
52
|
+
this.unsubscribeAppearance = null;
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
snapshot() {
|
|
57
|
+
const tasks = this.tasks.map(task => ({
|
|
58
|
+
...task,
|
|
59
|
+
title: this.localizedTaskTitles.has(task.id) ? (0, _index.resolveText)(this.localizedTaskTitles.get(task.id)) : task.title,
|
|
60
|
+
nodes: task.nodes.map(node => {
|
|
61
|
+
const copy = this.localizedTitles.get(node.id);
|
|
62
|
+
return copy ? {
|
|
63
|
+
...node,
|
|
64
|
+
title: (0, _index.resolveText)(copy)
|
|
65
|
+
} : node;
|
|
66
|
+
})
|
|
67
|
+
}));
|
|
68
|
+
return {
|
|
69
|
+
tasks,
|
|
70
|
+
activeTaskId: this.activeTaskId,
|
|
71
|
+
subtitle: this.computeSubtitle(tasks),
|
|
72
|
+
resultFlash: this.resultFlash && this.localizedResult ? {
|
|
73
|
+
...this.resultFlash,
|
|
74
|
+
message: (0, _index.resolveText)(this.localizedResult).slice(0, 80)
|
|
75
|
+
} : this.resultFlash,
|
|
76
|
+
userGateWaiting: this.userGateWaiting ? (0, _index.resolveText)(this.userGateWaiting) : null,
|
|
77
|
+
ui: {
|
|
78
|
+
...this.ui
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
emit() {
|
|
83
|
+
const snap = this.snapshot();
|
|
84
|
+
for (const l of this.listeners) l(snap);
|
|
85
|
+
}
|
|
86
|
+
computeSubtitle(tasks) {
|
|
87
|
+
if (this.userGateWaiting) return (0, _index.resolveText)(this.userGateWaiting);
|
|
88
|
+
const active = tasks.find(t => t.id === this.activeTaskId);
|
|
89
|
+
if (!active || active.status !== 'running') return null;
|
|
90
|
+
const running = [...active.nodes].reverse().find(n => n.status === 'running' && n.kind !== 'dump');
|
|
91
|
+
if (running) return this.appearanceChanged && !this.localizedTitles.has(running.id) ? (0, _index.runtimeText)('progress.running') : running.title;
|
|
92
|
+
const last = [...active.nodes].reverse().find(n => n.kind !== 'dump');
|
|
93
|
+
if (last) return this.appearanceChanged && !this.localizedTitles.has(last.id) ? (0, _index.runtimeText)('progress.running') : last.title;
|
|
94
|
+
return active.title;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/** Pause chrome copy while waiting for App password/PIN/OTP. */
|
|
98
|
+
setUserGateWaiting(message) {
|
|
99
|
+
this.userGateWaiting = message;
|
|
100
|
+
this.appearanceChanged = false;
|
|
101
|
+
this.emit();
|
|
102
|
+
}
|
|
103
|
+
setUi(patch) {
|
|
104
|
+
this.ui = {
|
|
105
|
+
...this.ui,
|
|
106
|
+
...patch
|
|
107
|
+
};
|
|
108
|
+
this.emit();
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/** Open chat sheet (history + input). */
|
|
112
|
+
openSheet(taskId) {
|
|
113
|
+
const selected = taskId !== undefined ? taskId : this.activeTaskId ?? this.tasks[0]?.id ?? null;
|
|
114
|
+
const wasOpen = this.ui.sheetOpen;
|
|
115
|
+
this.setUi({
|
|
116
|
+
sheetOpen: true,
|
|
117
|
+
selectedTaskId: selected
|
|
118
|
+
});
|
|
119
|
+
if (!wasOpen) {
|
|
120
|
+
_UsageBus.UsageBus.emit({
|
|
121
|
+
type: 'sheet_opened',
|
|
122
|
+
at: Date.now()
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
closeSheet() {
|
|
127
|
+
const wasOpen = this.ui.sheetOpen;
|
|
128
|
+
this.setUi({
|
|
129
|
+
sheetOpen: false
|
|
130
|
+
});
|
|
131
|
+
if (wasOpen) {
|
|
132
|
+
_UsageBus.UsageBus.emit({
|
|
133
|
+
type: 'sheet_closed',
|
|
134
|
+
at: Date.now()
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
toggleSheet() {
|
|
139
|
+
if (this.ui.sheetOpen) this.closeSheet();else this.openSheet();
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/** Hide progress chrome for one agent gesture that would hit it. */
|
|
143
|
+
suppressChrome() {
|
|
144
|
+
if (this.ui.chromeSuppressed) return;
|
|
145
|
+
this.setUi({
|
|
146
|
+
chromeSuppressed: true
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
restoreChrome() {
|
|
150
|
+
if (!this.ui.chromeSuppressed) return;
|
|
151
|
+
this.setUi({
|
|
152
|
+
chromeSuppressed: false
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Remount progress Modal so it stacks above a host Settings/sheet Modal.
|
|
158
|
+
* Throttled to avoid flicker during rapid taps.
|
|
159
|
+
*/
|
|
160
|
+
liftChrome() {
|
|
161
|
+
const now = Date.now();
|
|
162
|
+
if (now - this.lastChromeLiftAt < 450) return;
|
|
163
|
+
this.lastChromeLiftAt = now;
|
|
164
|
+
this.setUi({
|
|
165
|
+
chromeEpoch: (this.ui.chromeEpoch ?? 0) + 1
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/** @deprecated use closeSheet */
|
|
170
|
+
hide() {
|
|
171
|
+
this.closeSheet();
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/** @deprecated use openSheet */
|
|
175
|
+
show() {
|
|
176
|
+
this.openSheet();
|
|
177
|
+
}
|
|
178
|
+
selectTask(taskId) {
|
|
179
|
+
this.setUi({
|
|
180
|
+
selectedTaskId: taskId,
|
|
181
|
+
sheetOpen: true
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/** Remove a task from recent history (and clear selection if needed). */
|
|
186
|
+
removeTask(taskId) {
|
|
187
|
+
const existed = this.tasks.some(t => t.id === taskId);
|
|
188
|
+
if (!existed) return;
|
|
189
|
+
this.tasks = this.tasks.filter(t => t.id !== taskId);
|
|
190
|
+
if (this.activeTaskId === taskId) {
|
|
191
|
+
this.activeTaskId = this.tasks[0]?.id ?? null;
|
|
192
|
+
}
|
|
193
|
+
if (this.ui.selectedTaskId === taskId) {
|
|
194
|
+
this.ui = {
|
|
195
|
+
...this.ui,
|
|
196
|
+
selectedTaskId: this.activeTaskId ?? this.tasks[0]?.id ?? null
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
if (this.resultFlash?.taskId === taskId) {
|
|
200
|
+
this.resultFlash = null;
|
|
201
|
+
}
|
|
202
|
+
this.emit();
|
|
203
|
+
}
|
|
204
|
+
startTask(title) {
|
|
205
|
+
this.appearanceChanged = false;
|
|
206
|
+
const task = {
|
|
207
|
+
id: uid('task'),
|
|
208
|
+
title,
|
|
209
|
+
status: 'running',
|
|
210
|
+
createdAt: Date.now(),
|
|
211
|
+
updatedAt: Date.now(),
|
|
212
|
+
nodes: [{
|
|
213
|
+
id: uid('node'),
|
|
214
|
+
kind: 'user',
|
|
215
|
+
title,
|
|
216
|
+
status: 'done',
|
|
217
|
+
createdAt: Date.now(),
|
|
218
|
+
finishedAt: Date.now()
|
|
219
|
+
}]
|
|
220
|
+
};
|
|
221
|
+
this.tasks = [task, ...this.tasks].slice(0, MAX_TASKS);
|
|
222
|
+
this.activeTaskId = task.id;
|
|
223
|
+
this.resultFlash = null;
|
|
224
|
+
this.localizedResult = null;
|
|
225
|
+
// Progress pill only — do not auto-open sheet
|
|
226
|
+
this.ui = {
|
|
227
|
+
...this.ui,
|
|
228
|
+
selectedTaskId: task.id
|
|
229
|
+
};
|
|
230
|
+
this.emit();
|
|
231
|
+
return task;
|
|
232
|
+
}
|
|
233
|
+
ensureActiveTask(fallbackTitle) {
|
|
234
|
+
if (this.activeTaskId && this.tasks.some(t => t.id === this.activeTaskId && t.status === 'running')) {
|
|
235
|
+
return this.activeTaskId;
|
|
236
|
+
}
|
|
237
|
+
const task = this.startTask(fallbackTitle ?? (0, _index.runtimeText)('runtime.defaultTask'));
|
|
238
|
+
if (fallbackTitle === undefined) {
|
|
239
|
+
const copy = (0, _index.message)('runtime.defaultTask');
|
|
240
|
+
this.localizedTaskTitles.set(task.id, copy);
|
|
241
|
+
this.localizedTitles.set(task.nodes[0].id, copy);
|
|
242
|
+
}
|
|
243
|
+
return task.id;
|
|
244
|
+
}
|
|
245
|
+
appendNode(input) {
|
|
246
|
+
this.appearanceChanged = false;
|
|
247
|
+
const taskId = input.taskId ?? this.ensureActiveTask((0, _index.resolveText)(input.title));
|
|
248
|
+
const node = {
|
|
249
|
+
id: uid('node'),
|
|
250
|
+
kind: input.kind,
|
|
251
|
+
title: (0, _index.resolveText)(input.title),
|
|
252
|
+
detail: input.detail,
|
|
253
|
+
status: input.status ?? 'running',
|
|
254
|
+
createdAt: Date.now(),
|
|
255
|
+
finishedAt: input.status === 'done' || input.status === 'failed' ? Date.now() : undefined
|
|
256
|
+
};
|
|
257
|
+
if (typeof input.title !== 'string') this.localizedTitles.set(node.id, input.title);
|
|
258
|
+
this.tasks = this.tasks.map(t => {
|
|
259
|
+
if (t.id !== taskId) return t;
|
|
260
|
+
return {
|
|
261
|
+
...t,
|
|
262
|
+
updatedAt: Date.now(),
|
|
263
|
+
nodes: [...t.nodes, node]
|
|
264
|
+
};
|
|
265
|
+
});
|
|
266
|
+
this.activeTaskId = taskId;
|
|
267
|
+
this.emit();
|
|
268
|
+
return node;
|
|
269
|
+
}
|
|
270
|
+
updateNode(nodeId, patch) {
|
|
271
|
+
if (patch.title !== undefined) {
|
|
272
|
+
this.appearanceChanged = false;
|
|
273
|
+
if (typeof patch.title === 'string') this.localizedTitles.delete(nodeId);else this.localizedTitles.set(nodeId, patch.title);
|
|
274
|
+
}
|
|
275
|
+
const resolvedPatch = {
|
|
276
|
+
...patch,
|
|
277
|
+
...(patch.title !== undefined ? {
|
|
278
|
+
title: (0, _index.resolveText)(patch.title)
|
|
279
|
+
} : {})
|
|
280
|
+
};
|
|
281
|
+
this.tasks = this.tasks.map(t => ({
|
|
282
|
+
...t,
|
|
283
|
+
nodes: t.nodes.map(n => {
|
|
284
|
+
if (n.id !== nodeId) return n;
|
|
285
|
+
const status = patch.status ?? n.status;
|
|
286
|
+
return {
|
|
287
|
+
...n,
|
|
288
|
+
...resolvedPatch,
|
|
289
|
+
status,
|
|
290
|
+
finishedAt: status === 'done' || status === 'failed' || status === 'skipped' ? Date.now() : n.finishedAt
|
|
291
|
+
};
|
|
292
|
+
}),
|
|
293
|
+
updatedAt: Date.now()
|
|
294
|
+
}));
|
|
295
|
+
this.emit();
|
|
296
|
+
}
|
|
297
|
+
finishTask(status, taskId, summary) {
|
|
298
|
+
const id = taskId ?? this.activeTaskId;
|
|
299
|
+
if (!id) return;
|
|
300
|
+
const task = this.tasks.find(t => t.id === id);
|
|
301
|
+
this.tasks = this.tasks.map(t => {
|
|
302
|
+
if (t.id !== id) return t;
|
|
303
|
+
return {
|
|
304
|
+
...t,
|
|
305
|
+
status,
|
|
306
|
+
updatedAt: Date.now(),
|
|
307
|
+
finishedAt: Date.now(),
|
|
308
|
+
nodes: t.nodes.map(n => n.status === 'running' ? {
|
|
309
|
+
...n,
|
|
310
|
+
status: status === 'success' ? 'done' : 'failed',
|
|
311
|
+
finishedAt: Date.now()
|
|
312
|
+
} : n)
|
|
313
|
+
};
|
|
314
|
+
});
|
|
315
|
+
const message = summary && (0, _index.resolveText)(summary).trim() || task?.title || (0, _index.runtimeText)(`status.${status}`);
|
|
316
|
+
this.localizedResult = summary && typeof summary !== 'string' ? summary : null;
|
|
317
|
+
this.resultFlash = {
|
|
318
|
+
status,
|
|
319
|
+
message: message.slice(0, 80),
|
|
320
|
+
taskId: id,
|
|
321
|
+
at: Date.now()
|
|
322
|
+
};
|
|
323
|
+
this.userGateWaiting = null;
|
|
324
|
+
// Show result pill even if chrome was suppressed for a gesture.
|
|
325
|
+
if (this.ui.chromeSuppressed) {
|
|
326
|
+
this.ui = {
|
|
327
|
+
...this.ui,
|
|
328
|
+
chromeSuppressed: false
|
|
329
|
+
};
|
|
330
|
+
}
|
|
331
|
+
if (this.activeTaskId === id) this.activeTaskId = null;
|
|
332
|
+
this.emit();
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
/** Clear the post-run result pill (after auto-dismiss). */
|
|
336
|
+
clearResultFlash() {
|
|
337
|
+
if (!this.resultFlash) return;
|
|
338
|
+
this.resultFlash = null;
|
|
339
|
+
this.emit();
|
|
340
|
+
}
|
|
341
|
+
clear() {
|
|
342
|
+
this.tasks = [];
|
|
343
|
+
this.activeTaskId = null;
|
|
344
|
+
this.resultFlash = null;
|
|
345
|
+
this.userGateWaiting = null;
|
|
346
|
+
this.localizedTitles.clear();
|
|
347
|
+
this.localizedTaskTitles.clear();
|
|
348
|
+
this.localizedResult = null;
|
|
349
|
+
this.appearanceChanged = false;
|
|
350
|
+
this.ui = {
|
|
351
|
+
sheetOpen: false,
|
|
352
|
+
selectedTaskId: null,
|
|
353
|
+
chromeSuppressed: false,
|
|
354
|
+
chromeEpoch: 0
|
|
355
|
+
};
|
|
356
|
+
this.emit();
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
exports.TaskStoreImpl = TaskStoreImpl;
|
|
360
|
+
const TaskStore = exports.TaskStore = new TaskStoreImpl();
|
|
361
|
+
//# sourceMappingURL=TaskStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_UsageBus","require","_HostAppearanceStore","_index","uid","prefix","Date","now","toString","Math","random","slice","MAX_TASKS","TaskStoreImpl","tasks","activeTaskId","resultFlash","userGateWaiting","localizedTitles","Map","localizedTaskTitles","localizedResult","unsubscribeAppearance","appearanceChanged","lastChromeLiftAt","ui","sheetOpen","selectedTaskId","chromeSuppressed","chromeEpoch","listeners","Set","subscribe","listener","add","locale","HostAppearanceStore","get","next","emit","snapshot","delete","size","map","task","title","has","id","resolveText","nodes","node","copy","subtitle","computeSubtitle","message","snap","l","active","find","t","status","running","reverse","n","kind","runtimeText","last","setUserGateWaiting","setUi","patch","openSheet","taskId","selected","undefined","wasOpen","UsageBus","type","at","closeSheet","toggleSheet","suppressChrome","restoreChrome","liftChrome","hide","show","selectTask","removeTask","existed","some","filter","startTask","createdAt","updatedAt","finishedAt","ensureActiveTask","fallbackTitle","set","appendNode","input","detail","updateNode","nodeId","resolvedPatch","finishTask","summary","trim","clearResultFlash","clear","exports","TaskStore"],"sourceRoot":"../../../src","sources":["task/TaskStore.ts"],"mappings":";;;;;;AAUA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,oBAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAIA,SAASG,GAAGA,CAACC,MAAc,EAAU;EACnC,OAAO,GAAGA,MAAM,IAAIC,IAAI,CAACC,GAAG,CAAC,CAAC,CAACC,QAAQ,CAAC,EAAE,CAAC,IAAIC,IAAI,CAACC,MAAM,CAAC,CAAC,CAACF,QAAQ,CAAC,EAAE,CAAC,CAACG,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE;AACzF;AAEA,MAAMC,SAAS,GAAG,EAAE;;AAEpB;AACA;AACA;AACO,MAAMC,aAAa,CAAC;EACjBC,KAAK,GAAW,EAAE;EAClBC,YAAY,GAAkB,IAAI;EAClCC,WAAW,GAA+B,IAAI;EAC9CC,eAAe,GAAyB,IAAI;EAC5CC,eAAe,GAAG,IAAIC,GAAG,CAA2B,CAAC;EACrDC,mBAAmB,GAAG,IAAID,GAAG,CAA2B,CAAC;EACzDE,eAAe,GAA4B,IAAI;EAC/CC,qBAAqB,GAAwB,IAAI;EACjDC,iBAAiB,GAAG,KAAK;EACzBC,gBAAgB,GAAG,CAAC;EACpBC,EAAE,GAAoB;IAC5BC,SAAS,EAAE,KAAK;IAChBC,cAAc,EAAE,IAAI;IACpBC,gBAAgB,EAAE,KAAK;IACvBC,WAAW,EAAE;EACf,CAAC;EACOC,SA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AAG;IACjB,IAAI,CAAC,IAAI,CAAC1F,WAAW,EAAE;IACvB,IAAI,CAACA,WAAW,GAAG,IAAI;IACvB,IAAI,CAACuB,IAAI,CAAC,CAAC;EACb;EAEAoE,KAAKA,CAAA,EAAG;IACN,IAAI,CAAC7F,KAAK,GAAG,EAAE;IACf,IAAI,CAACC,YAAY,GAAG,IAAI;IACxB,IAAI,CAACC,WAAW,GAAG,IAAI;IACvB,IAAI,CAACC,eAAe,GAAG,IAAI;IAC3B,IAAI,CAACC,eAAe,CAACyF,KAAK,CAAC,CAAC;IAC5B,IAAI,CAACvF,mBAAmB,CAACuF,KAAK,CAAC,CAAC;IAChC,IAAI,CAACtF,eAAe,GAAG,IAAI;IAC3B,IAAI,CAACE,iBAAiB,GAAG,KAAK;IAC9B,IAAI,CAACE,EAAE,GAAG;MACRC,SAAS,EAAE,KAAK;MAChBC,cAAc,EAAE,IAAI;MACpBC,gBAAgB,EAAE,KAAK;MACvBC,WAAW,EAAE;IACf,CAAC;IACD,IAAI,CAACU,IAAI,CAAC,CAAC;EACb;AACF;AAACqE,OAAA,CAAA/F,aAAA,GAAAA,aAAA;AAEM,MAAMgG,SAAS,GAAAD,OAAA,CAAAC,SAAA,GAAG,IAAIhG,aAAa,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["task/types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useTaskStore = useTaskStore;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _TaskStore = require("./TaskStore.js");
|
|
9
|
+
function useTaskStore() {
|
|
10
|
+
const [snap, setSnap] = (0, _react.useState)(() => _TaskStore.TaskStore.snapshot());
|
|
11
|
+
(0, _react.useEffect)(() => _TaskStore.TaskStore.subscribe(setSnap), []);
|
|
12
|
+
return snap;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=useTaskStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_TaskStore","useTaskStore","snap","setSnap","useState","TaskStore","snapshot","useEffect","subscribe"],"sourceRoot":"../../../src","sources":["task/useTaskStore.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAGO,SAASE,YAAYA,CAAA,EAAsB;EAChD,MAAM,CAACC,IAAI,EAAEC,OAAO,CAAC,GAAG,IAAAC,eAAQ,EAAoB,MAAMC,oBAAS,CAACC,QAAQ,CAAC,CAAC,CAAC;EAC/E,IAAAC,gBAAS,EAAC,MAAMF,oBAAS,CAACG,SAAS,CAACL,OAAO,CAAC,EAAE,EAAE,CAAC;EACjD,OAAOD,IAAI;AACb","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../src","sources":["types.ts"],"mappings":"","ignoreList":[]}
|