@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.
Files changed (622) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/CODE_OF_CONDUCT.md +3 -0
  3. package/CONTRIBUTING.md +9 -0
  4. package/LICENSE +21 -0
  5. package/README.md +65 -0
  6. package/README.zh-CN.md +50 -0
  7. package/SECURITY.md +5 -0
  8. package/android/build.gradle +40 -0
  9. package/android/src/main/AndroidManifest.xml +2 -0
  10. package/android/src/main/java/cn/intentcomputing/kokoagentsdk/KokoAgentSdkModule.java +1356 -0
  11. package/android/src/main/java/cn/intentcomputing/kokoagentsdk/KokoAgentSdkPackage.java +23 -0
  12. package/docs/INTEGRATION.md +168 -0
  13. package/docs/INTEGRATION.zh-CN.md +140 -0
  14. package/docs/PRIVACY.md +11 -0
  15. package/docs/PRIVACY.zh-CN.md +11 -0
  16. package/docs/PUBLISH.md +11 -0
  17. package/docs/PUBLISH.zh-CN.md +11 -0
  18. package/ios/KokoAgentSdk/KokoAgentSdk.h +5 -0
  19. package/ios/KokoAgentSdk/KokoAgentSdk.m +2464 -0
  20. package/ios/KokoAgentSdk/KokoOcrBounds.h +20 -0
  21. package/ios/KokoAgentSdk/KokoScrollBounds.h +21 -0
  22. package/koko-agent-sdk.podspec +23 -0
  23. package/lib/commonjs/KokoAgent.js +1427 -0
  24. package/lib/commonjs/KokoAgent.js.map +1 -0
  25. package/lib/commonjs/assist/OnDeviceAssist.js +94 -0
  26. package/lib/commonjs/assist/OnDeviceAssist.js.map +1 -0
  27. package/lib/commonjs/assist/intentClassify.js +100 -0
  28. package/lib/commonjs/assist/intentClassify.js.map +1 -0
  29. package/lib/commonjs/assist/nodeRank.js +120 -0
  30. package/lib/commonjs/assist/nodeRank.js.map +1 -0
  31. package/lib/commonjs/assist/ocrTarget.js +135 -0
  32. package/lib/commonjs/assist/ocrTarget.js.map +1 -0
  33. package/lib/commonjs/assist/webVisualChange.js +29 -0
  34. package/lib/commonjs/assist/webVisualChange.js.map +1 -0
  35. package/lib/commonjs/client/ActionOutcomeUnknownError.js +28 -0
  36. package/lib/commonjs/client/ActionOutcomeUnknownError.js.map +1 -0
  37. package/lib/commonjs/client/AgentSession.js +858 -0
  38. package/lib/commonjs/client/AgentSession.js.map +1 -0
  39. package/lib/commonjs/client/GatewayClient.js +302 -0
  40. package/lib/commonjs/client/GatewayClient.js.map +1 -0
  41. package/lib/commonjs/client/OperationReplayGuard.js +62 -0
  42. package/lib/commonjs/client/OperationReplayGuard.js.map +1 -0
  43. package/lib/commonjs/client/RunCheckpoint.js +139 -0
  44. package/lib/commonjs/client/RunCheckpoint.js.map +1 -0
  45. package/lib/commonjs/client/loopDetect.js +184 -0
  46. package/lib/commonjs/client/loopDetect.js.map +1 -0
  47. package/lib/commonjs/client/recentSearch.js +50 -0
  48. package/lib/commonjs/client/recentSearch.js.map +1 -0
  49. package/lib/commonjs/client/walletChoiceGuard.js +18 -0
  50. package/lib/commonjs/client/walletChoiceGuard.js.map +1 -0
  51. package/lib/commonjs/client/webResultCategory.js +38 -0
  52. package/lib/commonjs/client/webResultCategory.js.map +1 -0
  53. package/lib/commonjs/commercial/AccountStore.js +78 -0
  54. package/lib/commonjs/commercial/AccountStore.js.map +1 -0
  55. package/lib/commonjs/commercial/AgentDebug.js +104 -0
  56. package/lib/commonjs/commercial/AgentDebug.js.map +1 -0
  57. package/lib/commonjs/commercial/ExecutionGuard.js +53 -0
  58. package/lib/commonjs/commercial/ExecutionGuard.js.map +1 -0
  59. package/lib/commonjs/commercial/UsageBus.js +42 -0
  60. package/lib/commonjs/commercial/UsageBus.js.map +1 -0
  61. package/lib/commonjs/commercial/branding.js +69 -0
  62. package/lib/commonjs/commercial/branding.js.map +1 -0
  63. package/lib/commonjs/commercial/devMode.js +52 -0
  64. package/lib/commonjs/commercial/devMode.js.map +1 -0
  65. package/lib/commonjs/commercial/trust.js +69 -0
  66. package/lib/commonjs/commercial/trust.js.map +1 -0
  67. package/lib/commonjs/confirmation/gate.js +62 -0
  68. package/lib/commonjs/confirmation/gate.js.map +1 -0
  69. package/lib/commonjs/cursor/CursorOverlay.js +141 -0
  70. package/lib/commonjs/cursor/CursorOverlay.js.map +1 -0
  71. package/lib/commonjs/cursor/PointerHand.js +51 -0
  72. package/lib/commonjs/cursor/PointerHand.js.map +1 -0
  73. package/lib/commonjs/cursor/controller.js +91 -0
  74. package/lib/commonjs/cursor/controller.js.map +1 -0
  75. package/lib/commonjs/cursor/pointer.js +49 -0
  76. package/lib/commonjs/cursor/pointer.js.map +1 -0
  77. package/lib/commonjs/debug/KokoRemoteSmoke.js +611 -0
  78. package/lib/commonjs/debug/KokoRemoteSmoke.js.map +1 -0
  79. package/lib/commonjs/explore/ExplorationGraph.js +418 -0
  80. package/lib/commonjs/explore/ExplorationGraph.js.map +1 -0
  81. package/lib/commonjs/explore/bootstrapExplore.js +59 -0
  82. package/lib/commonjs/explore/bootstrapExplore.js.map +1 -0
  83. package/lib/commonjs/host/HostActions.js +266 -0
  84. package/lib/commonjs/host/HostActions.js.map +1 -0
  85. package/lib/commonjs/i18n/index.js +169 -0
  86. package/lib/commonjs/i18n/index.js.map +1 -0
  87. package/lib/commonjs/i18n/runtimeMessages.js +184 -0
  88. package/lib/commonjs/i18n/runtimeMessages.js.map +1 -0
  89. package/lib/commonjs/index.js +640 -0
  90. package/lib/commonjs/index.js.map +1 -0
  91. package/lib/commonjs/native/NativeBridge.js +132 -0
  92. package/lib/commonjs/native/NativeBridge.js.map +1 -0
  93. package/lib/commonjs/native/navigationLabel.js +16 -0
  94. package/lib/commonjs/native/navigationLabel.js.map +1 -0
  95. package/lib/commonjs/native/normalizeViewTree.js +28 -0
  96. package/lib/commonjs/native/normalizeViewTree.js.map +1 -0
  97. package/lib/commonjs/native/pruneOffscreen.js +76 -0
  98. package/lib/commonjs/native/pruneOffscreen.js.map +1 -0
  99. package/lib/commonjs/native/scrollViewport.js +69 -0
  100. package/lib/commonjs/native/scrollViewport.js.map +1 -0
  101. package/lib/commonjs/package.json +1 -0
  102. package/lib/commonjs/privacy/redact.js +108 -0
  103. package/lib/commonjs/privacy/redact.js.map +1 -0
  104. package/lib/commonjs/privacy/screenEvidence.js +59 -0
  105. package/lib/commonjs/privacy/screenEvidence.js.map +1 -0
  106. package/lib/commonjs/privacy/screenModel.js +404 -0
  107. package/lib/commonjs/privacy/screenModel.js.map +1 -0
  108. package/lib/commonjs/privacy/sensitiveScreen.js +58 -0
  109. package/lib/commonjs/privacy/sensitiveScreen.js.map +1 -0
  110. package/lib/commonjs/privacy/userGate.js +213 -0
  111. package/lib/commonjs/privacy/userGate.js.map +1 -0
  112. package/lib/commonjs/protocol/actions.js +112 -0
  113. package/lib/commonjs/protocol/actions.js.map +1 -0
  114. package/lib/commonjs/provider/HostAppearanceStore.js +111 -0
  115. package/lib/commonjs/provider/HostAppearanceStore.js.map +1 -0
  116. package/lib/commonjs/provider/KokoProvider.js +81 -0
  117. package/lib/commonjs/provider/KokoProvider.js.map +1 -0
  118. package/lib/commonjs/provider/KokoUiContext.js +102 -0
  119. package/lib/commonjs/provider/KokoUiContext.js.map +1 -0
  120. package/lib/commonjs/selector/match.js +378 -0
  121. package/lib/commonjs/selector/match.js.map +1 -0
  122. package/lib/commonjs/task/TaskStore.js +361 -0
  123. package/lib/commonjs/task/TaskStore.js.map +1 -0
  124. package/lib/commonjs/task/types.js +2 -0
  125. package/lib/commonjs/task/types.js.map +1 -0
  126. package/lib/commonjs/task/useTaskStore.js +14 -0
  127. package/lib/commonjs/task/useTaskStore.js.map +1 -0
  128. package/lib/commonjs/types.js +2 -0
  129. package/lib/commonjs/types.js.map +1 -0
  130. package/lib/commonjs/ui/KokoChatSheet.js +885 -0
  131. package/lib/commonjs/ui/KokoChatSheet.js.map +1 -0
  132. package/lib/commonjs/ui/KokoComposer.js +161 -0
  133. package/lib/commonjs/ui/KokoComposer.js.map +1 -0
  134. package/lib/commonjs/ui/KokoDialogHost.js +254 -0
  135. package/lib/commonjs/ui/KokoDialogHost.js.map +1 -0
  136. package/lib/commonjs/ui/KokoEntryButton.js +81 -0
  137. package/lib/commonjs/ui/KokoEntryButton.js.map +1 -0
  138. package/lib/commonjs/ui/KokoObserver.js +522 -0
  139. package/lib/commonjs/ui/KokoObserver.js.map +1 -0
  140. package/lib/commonjs/ui/KokoOverlayLayer.js +45 -0
  141. package/lib/commonjs/ui/KokoOverlayLayer.js.map +1 -0
  142. package/lib/commonjs/ui/KokoSubtitle.js +95 -0
  143. package/lib/commonjs/ui/KokoSubtitle.js.map +1 -0
  144. package/lib/commonjs/ui/KokoTaskPanel.js +322 -0
  145. package/lib/commonjs/ui/KokoTaskPanel.js.map +1 -0
  146. package/lib/commonjs/ui/hostOverlay.js +126 -0
  147. package/lib/commonjs/ui/hostOverlay.js.map +1 -0
  148. package/lib/commonjs/ui/icons.js +132 -0
  149. package/lib/commonjs/ui/icons.js.map +1 -0
  150. package/lib/commonjs/ui/progressChrome.js +66 -0
  151. package/lib/commonjs/ui/progressChrome.js.map +1 -0
  152. package/lib/commonjs/ui/safeArea.js +96 -0
  153. package/lib/commonjs/ui/safeArea.js.map +1 -0
  154. package/lib/commonjs/ui/useOverlayOrigin.js +40 -0
  155. package/lib/commonjs/ui/useOverlayOrigin.js.map +1 -0
  156. package/lib/module/KokoAgent.js +1418 -0
  157. package/lib/module/KokoAgent.js.map +1 -0
  158. package/lib/module/assist/OnDeviceAssist.js +89 -0
  159. package/lib/module/assist/OnDeviceAssist.js.map +1 -0
  160. package/lib/module/assist/intentClassify.js +95 -0
  161. package/lib/module/assist/intentClassify.js.map +1 -0
  162. package/lib/module/assist/nodeRank.js +115 -0
  163. package/lib/module/assist/nodeRank.js.map +1 -0
  164. package/lib/module/assist/ocrTarget.js +123 -0
  165. package/lib/module/assist/ocrTarget.js.map +1 -0
  166. package/lib/module/assist/webVisualChange.js +24 -0
  167. package/lib/module/assist/webVisualChange.js.map +1 -0
  168. package/lib/module/client/ActionOutcomeUnknownError.js +23 -0
  169. package/lib/module/client/ActionOutcomeUnknownError.js.map +1 -0
  170. package/lib/module/client/AgentSession.js +854 -0
  171. package/lib/module/client/AgentSession.js.map +1 -0
  172. package/lib/module/client/GatewayClient.js +293 -0
  173. package/lib/module/client/GatewayClient.js.map +1 -0
  174. package/lib/module/client/OperationReplayGuard.js +58 -0
  175. package/lib/module/client/OperationReplayGuard.js.map +1 -0
  176. package/lib/module/client/RunCheckpoint.js +135 -0
  177. package/lib/module/client/RunCheckpoint.js.map +1 -0
  178. package/lib/module/client/loopDetect.js +177 -0
  179. package/lib/module/client/loopDetect.js.map +1 -0
  180. package/lib/module/client/recentSearch.js +46 -0
  181. package/lib/module/client/recentSearch.js.map +1 -0
  182. package/lib/module/client/walletChoiceGuard.js +14 -0
  183. package/lib/module/client/walletChoiceGuard.js.map +1 -0
  184. package/lib/module/client/webResultCategory.js +34 -0
  185. package/lib/module/client/webResultCategory.js.map +1 -0
  186. package/lib/module/commercial/AccountStore.js +75 -0
  187. package/lib/module/commercial/AccountStore.js.map +1 -0
  188. package/lib/module/commercial/AgentDebug.js +99 -0
  189. package/lib/module/commercial/AgentDebug.js.map +1 -0
  190. package/lib/module/commercial/ExecutionGuard.js +49 -0
  191. package/lib/module/commercial/ExecutionGuard.js.map +1 -0
  192. package/lib/module/commercial/UsageBus.js +38 -0
  193. package/lib/module/commercial/UsageBus.js.map +1 -0
  194. package/lib/module/commercial/branding.js +63 -0
  195. package/lib/module/commercial/branding.js.map +1 -0
  196. package/lib/module/commercial/devMode.js +45 -0
  197. package/lib/module/commercial/devMode.js.map +1 -0
  198. package/lib/module/commercial/trust.js +62 -0
  199. package/lib/module/commercial/trust.js.map +1 -0
  200. package/lib/module/confirmation/gate.js +54 -0
  201. package/lib/module/confirmation/gate.js.map +1 -0
  202. package/lib/module/cursor/CursorOverlay.js +136 -0
  203. package/lib/module/cursor/CursorOverlay.js.map +1 -0
  204. package/lib/module/cursor/PointerHand.js +47 -0
  205. package/lib/module/cursor/PointerHand.js.map +1 -0
  206. package/lib/module/cursor/controller.js +87 -0
  207. package/lib/module/cursor/controller.js.map +1 -0
  208. package/lib/module/cursor/pointer.js +45 -0
  209. package/lib/module/cursor/pointer.js.map +1 -0
  210. package/lib/module/debug/KokoRemoteSmoke.js +608 -0
  211. package/lib/module/debug/KokoRemoteSmoke.js.map +1 -0
  212. package/lib/module/explore/ExplorationGraph.js +406 -0
  213. package/lib/module/explore/ExplorationGraph.js.map +1 -0
  214. package/lib/module/explore/bootstrapExplore.js +55 -0
  215. package/lib/module/explore/bootstrapExplore.js.map +1 -0
  216. package/lib/module/host/HostActions.js +255 -0
  217. package/lib/module/host/HostActions.js.map +1 -0
  218. package/lib/module/i18n/index.js +159 -0
  219. package/lib/module/i18n/index.js.map +1 -0
  220. package/lib/module/i18n/runtimeMessages.js +180 -0
  221. package/lib/module/i18n/runtimeMessages.js.map +1 -0
  222. package/lib/module/index.js +44 -0
  223. package/lib/module/index.js.map +1 -0
  224. package/lib/module/native/NativeBridge.js +128 -0
  225. package/lib/module/native/NativeBridge.js.map +1 -0
  226. package/lib/module/native/navigationLabel.js +12 -0
  227. package/lib/module/native/navigationLabel.js.map +1 -0
  228. package/lib/module/native/normalizeViewTree.js +25 -0
  229. package/lib/module/native/normalizeViewTree.js.map +1 -0
  230. package/lib/module/native/pruneOffscreen.js +72 -0
  231. package/lib/module/native/pruneOffscreen.js.map +1 -0
  232. package/lib/module/native/scrollViewport.js +63 -0
  233. package/lib/module/native/scrollViewport.js.map +1 -0
  234. package/lib/module/package.json +1 -0
  235. package/lib/module/privacy/redact.js +103 -0
  236. package/lib/module/privacy/redact.js.map +1 -0
  237. package/lib/module/privacy/screenEvidence.js +50 -0
  238. package/lib/module/privacy/screenEvidence.js.map +1 -0
  239. package/lib/module/privacy/screenModel.js +397 -0
  240. package/lib/module/privacy/screenModel.js.map +1 -0
  241. package/lib/module/privacy/sensitiveScreen.js +52 -0
  242. package/lib/module/privacy/sensitiveScreen.js.map +1 -0
  243. package/lib/module/privacy/userGate.js +202 -0
  244. package/lib/module/privacy/userGate.js.map +1 -0
  245. package/lib/module/protocol/actions.js +108 -0
  246. package/lib/module/protocol/actions.js.map +1 -0
  247. package/lib/module/provider/HostAppearanceStore.js +101 -0
  248. package/lib/module/provider/HostAppearanceStore.js.map +1 -0
  249. package/lib/module/provider/KokoProvider.js +74 -0
  250. package/lib/module/provider/KokoProvider.js.map +1 -0
  251. package/lib/module/provider/KokoUiContext.js +96 -0
  252. package/lib/module/provider/KokoUiContext.js.map +1 -0
  253. package/lib/module/selector/match.js +366 -0
  254. package/lib/module/selector/match.js.map +1 -0
  255. package/lib/module/task/TaskStore.js +356 -0
  256. package/lib/module/task/TaskStore.js.map +1 -0
  257. package/lib/module/task/types.js +2 -0
  258. package/lib/module/task/types.js.map +1 -0
  259. package/lib/module/task/useTaskStore.js +10 -0
  260. package/lib/module/task/useTaskStore.js.map +1 -0
  261. package/lib/module/types.js +2 -0
  262. package/lib/module/types.js.map +1 -0
  263. package/lib/module/ui/KokoChatSheet.js +879 -0
  264. package/lib/module/ui/KokoChatSheet.js.map +1 -0
  265. package/lib/module/ui/KokoComposer.js +155 -0
  266. package/lib/module/ui/KokoComposer.js.map +1 -0
  267. package/lib/module/ui/KokoDialogHost.js +247 -0
  268. package/lib/module/ui/KokoDialogHost.js.map +1 -0
  269. package/lib/module/ui/KokoEntryButton.js +74 -0
  270. package/lib/module/ui/KokoEntryButton.js.map +1 -0
  271. package/lib/module/ui/KokoObserver.js +516 -0
  272. package/lib/module/ui/KokoObserver.js.map +1 -0
  273. package/lib/module/ui/KokoOverlayLayer.js +39 -0
  274. package/lib/module/ui/KokoOverlayLayer.js.map +1 -0
  275. package/lib/module/ui/KokoSubtitle.js +90 -0
  276. package/lib/module/ui/KokoSubtitle.js.map +1 -0
  277. package/lib/module/ui/KokoTaskPanel.js +316 -0
  278. package/lib/module/ui/KokoTaskPanel.js.map +1 -0
  279. package/lib/module/ui/hostOverlay.js +120 -0
  280. package/lib/module/ui/hostOverlay.js.map +1 -0
  281. package/lib/module/ui/icons.js +124 -0
  282. package/lib/module/ui/icons.js.map +1 -0
  283. package/lib/module/ui/progressChrome.js +58 -0
  284. package/lib/module/ui/progressChrome.js.map +1 -0
  285. package/lib/module/ui/safeArea.js +92 -0
  286. package/lib/module/ui/safeArea.js.map +1 -0
  287. package/lib/module/ui/useOverlayOrigin.js +36 -0
  288. package/lib/module/ui/useOverlayOrigin.js.map +1 -0
  289. package/lib/typescript/commonjs/KokoAgent.d.ts +167 -0
  290. package/lib/typescript/commonjs/KokoAgent.d.ts.map +1 -0
  291. package/lib/typescript/commonjs/assist/OnDeviceAssist.d.ts +31 -0
  292. package/lib/typescript/commonjs/assist/OnDeviceAssist.d.ts.map +1 -0
  293. package/lib/typescript/commonjs/assist/intentClassify.d.ts +18 -0
  294. package/lib/typescript/commonjs/assist/intentClassify.d.ts.map +1 -0
  295. package/lib/typescript/commonjs/assist/nodeRank.d.ts +32 -0
  296. package/lib/typescript/commonjs/assist/nodeRank.d.ts.map +1 -0
  297. package/lib/typescript/commonjs/assist/ocrTarget.d.ts +25 -0
  298. package/lib/typescript/commonjs/assist/ocrTarget.d.ts.map +1 -0
  299. package/lib/typescript/commonjs/assist/webVisualChange.d.ts +6 -0
  300. package/lib/typescript/commonjs/assist/webVisualChange.d.ts.map +1 -0
  301. package/lib/typescript/commonjs/client/ActionOutcomeUnknownError.d.ts +13 -0
  302. package/lib/typescript/commonjs/client/ActionOutcomeUnknownError.d.ts.map +1 -0
  303. package/lib/typescript/commonjs/client/AgentSession.d.ts +56 -0
  304. package/lib/typescript/commonjs/client/AgentSession.d.ts.map +1 -0
  305. package/lib/typescript/commonjs/client/GatewayClient.d.ts +149 -0
  306. package/lib/typescript/commonjs/client/GatewayClient.d.ts.map +1 -0
  307. package/lib/typescript/commonjs/client/OperationReplayGuard.d.ts +13 -0
  308. package/lib/typescript/commonjs/client/OperationReplayGuard.d.ts.map +1 -0
  309. package/lib/typescript/commonjs/client/RunCheckpoint.d.ts +57 -0
  310. package/lib/typescript/commonjs/client/RunCheckpoint.d.ts.map +1 -0
  311. package/lib/typescript/commonjs/client/loopDetect.d.ts +15 -0
  312. package/lib/typescript/commonjs/client/loopDetect.d.ts.map +1 -0
  313. package/lib/typescript/commonjs/client/recentSearch.d.ts +5 -0
  314. package/lib/typescript/commonjs/client/recentSearch.d.ts.map +1 -0
  315. package/lib/typescript/commonjs/client/walletChoiceGuard.d.ts +4 -0
  316. package/lib/typescript/commonjs/client/walletChoiceGuard.d.ts.map +1 -0
  317. package/lib/typescript/commonjs/client/webResultCategory.d.ts +5 -0
  318. package/lib/typescript/commonjs/client/webResultCategory.d.ts.map +1 -0
  319. package/lib/typescript/commonjs/commercial/AccountStore.d.ts +17 -0
  320. package/lib/typescript/commonjs/commercial/AccountStore.d.ts.map +1 -0
  321. package/lib/typescript/commonjs/commercial/AgentDebug.d.ts +25 -0
  322. package/lib/typescript/commonjs/commercial/AgentDebug.d.ts.map +1 -0
  323. package/lib/typescript/commonjs/commercial/ExecutionGuard.d.ts +18 -0
  324. package/lib/typescript/commonjs/commercial/ExecutionGuard.d.ts.map +1 -0
  325. package/lib/typescript/commonjs/commercial/UsageBus.d.ts +18 -0
  326. package/lib/typescript/commonjs/commercial/UsageBus.d.ts.map +1 -0
  327. package/lib/typescript/commonjs/commercial/branding.d.ts +25 -0
  328. package/lib/typescript/commonjs/commercial/branding.d.ts.map +1 -0
  329. package/lib/typescript/commonjs/commercial/devMode.d.ts +26 -0
  330. package/lib/typescript/commonjs/commercial/devMode.d.ts.map +1 -0
  331. package/lib/typescript/commonjs/commercial/trust.d.ts +21 -0
  332. package/lib/typescript/commonjs/commercial/trust.d.ts.map +1 -0
  333. package/lib/typescript/commonjs/confirmation/gate.d.ts +18 -0
  334. package/lib/typescript/commonjs/confirmation/gate.d.ts.map +1 -0
  335. package/lib/typescript/commonjs/cursor/CursorOverlay.d.ts +13 -0
  336. package/lib/typescript/commonjs/cursor/CursorOverlay.d.ts.map +1 -0
  337. package/lib/typescript/commonjs/cursor/PointerHand.d.ts +16 -0
  338. package/lib/typescript/commonjs/cursor/PointerHand.d.ts.map +1 -0
  339. package/lib/typescript/commonjs/cursor/controller.d.ts +30 -0
  340. package/lib/typescript/commonjs/cursor/controller.d.ts.map +1 -0
  341. package/lib/typescript/commonjs/cursor/pointer.d.ts +23 -0
  342. package/lib/typescript/commonjs/cursor/pointer.d.ts.map +1 -0
  343. package/lib/typescript/commonjs/debug/KokoRemoteSmoke.d.ts +96 -0
  344. package/lib/typescript/commonjs/debug/KokoRemoteSmoke.d.ts.map +1 -0
  345. package/lib/typescript/commonjs/explore/ExplorationGraph.d.ts +96 -0
  346. package/lib/typescript/commonjs/explore/ExplorationGraph.d.ts.map +1 -0
  347. package/lib/typescript/commonjs/explore/bootstrapExplore.d.ts +40 -0
  348. package/lib/typescript/commonjs/explore/bootstrapExplore.d.ts.map +1 -0
  349. package/lib/typescript/commonjs/host/HostActions.d.ts +101 -0
  350. package/lib/typescript/commonjs/host/HostActions.d.ts.map +1 -0
  351. package/lib/typescript/commonjs/i18n/index.d.ts +20 -0
  352. package/lib/typescript/commonjs/i18n/index.d.ts.map +1 -0
  353. package/lib/typescript/commonjs/i18n/runtimeMessages.d.ts +178 -0
  354. package/lib/typescript/commonjs/i18n/runtimeMessages.d.ts.map +1 -0
  355. package/lib/typescript/commonjs/index.d.ts +66 -0
  356. package/lib/typescript/commonjs/index.d.ts.map +1 -0
  357. package/lib/typescript/commonjs/native/NativeBridge.d.ts +70 -0
  358. package/lib/typescript/commonjs/native/NativeBridge.d.ts.map +1 -0
  359. package/lib/typescript/commonjs/native/navigationLabel.d.ts +4 -0
  360. package/lib/typescript/commonjs/native/navigationLabel.d.ts.map +1 -0
  361. package/lib/typescript/commonjs/native/normalizeViewTree.d.ts +4 -0
  362. package/lib/typescript/commonjs/native/normalizeViewTree.d.ts.map +1 -0
  363. package/lib/typescript/commonjs/native/pruneOffscreen.d.ts +3 -0
  364. package/lib/typescript/commonjs/native/pruneOffscreen.d.ts.map +1 -0
  365. package/lib/typescript/commonjs/native/scrollViewport.d.ts +13 -0
  366. package/lib/typescript/commonjs/native/scrollViewport.d.ts.map +1 -0
  367. package/lib/typescript/commonjs/package.json +1 -0
  368. package/lib/typescript/commonjs/privacy/redact.d.ts +9 -0
  369. package/lib/typescript/commonjs/privacy/redact.d.ts.map +1 -0
  370. package/lib/typescript/commonjs/privacy/screenEvidence.d.ts +14 -0
  371. package/lib/typescript/commonjs/privacy/screenEvidence.d.ts.map +1 -0
  372. package/lib/typescript/commonjs/privacy/screenModel.d.ts +26 -0
  373. package/lib/typescript/commonjs/privacy/screenModel.d.ts.map +1 -0
  374. package/lib/typescript/commonjs/privacy/sensitiveScreen.d.ts +8 -0
  375. package/lib/typescript/commonjs/privacy/sensitiveScreen.d.ts.map +1 -0
  376. package/lib/typescript/commonjs/privacy/userGate.d.ts +58 -0
  377. package/lib/typescript/commonjs/privacy/userGate.d.ts.map +1 -0
  378. package/lib/typescript/commonjs/protocol/actions.d.ts +7 -0
  379. package/lib/typescript/commonjs/protocol/actions.d.ts.map +1 -0
  380. package/lib/typescript/commonjs/provider/HostAppearanceStore.d.ts +64 -0
  381. package/lib/typescript/commonjs/provider/HostAppearanceStore.d.ts.map +1 -0
  382. package/lib/typescript/commonjs/provider/KokoProvider.d.ts +39 -0
  383. package/lib/typescript/commonjs/provider/KokoProvider.d.ts.map +1 -0
  384. package/lib/typescript/commonjs/provider/KokoUiContext.d.ts +22 -0
  385. package/lib/typescript/commonjs/provider/KokoUiContext.d.ts.map +1 -0
  386. package/lib/typescript/commonjs/selector/match.d.ts +27 -0
  387. package/lib/typescript/commonjs/selector/match.d.ts.map +1 -0
  388. package/lib/typescript/commonjs/task/TaskStore.d.ts +65 -0
  389. package/lib/typescript/commonjs/task/TaskStore.d.ts.map +1 -0
  390. package/lib/typescript/commonjs/task/types.d.ts +66 -0
  391. package/lib/typescript/commonjs/task/types.d.ts.map +1 -0
  392. package/lib/typescript/commonjs/task/useTaskStore.d.ts +3 -0
  393. package/lib/typescript/commonjs/task/useTaskStore.d.ts.map +1 -0
  394. package/lib/typescript/commonjs/types.d.ts +372 -0
  395. package/lib/typescript/commonjs/types.d.ts.map +1 -0
  396. package/lib/typescript/commonjs/ui/KokoChatSheet.d.ts +8 -0
  397. package/lib/typescript/commonjs/ui/KokoChatSheet.d.ts.map +1 -0
  398. package/lib/typescript/commonjs/ui/KokoComposer.d.ts +13 -0
  399. package/lib/typescript/commonjs/ui/KokoComposer.d.ts.map +1 -0
  400. package/lib/typescript/commonjs/ui/KokoDialogHost.d.ts +32 -0
  401. package/lib/typescript/commonjs/ui/KokoDialogHost.d.ts.map +1 -0
  402. package/lib/typescript/commonjs/ui/KokoEntryButton.d.ts +18 -0
  403. package/lib/typescript/commonjs/ui/KokoEntryButton.d.ts.map +1 -0
  404. package/lib/typescript/commonjs/ui/KokoObserver.d.ts +13 -0
  405. package/lib/typescript/commonjs/ui/KokoObserver.d.ts.map +1 -0
  406. package/lib/typescript/commonjs/ui/KokoOverlayLayer.d.ts +35 -0
  407. package/lib/typescript/commonjs/ui/KokoOverlayLayer.d.ts.map +1 -0
  408. package/lib/typescript/commonjs/ui/KokoSubtitle.d.ts +7 -0
  409. package/lib/typescript/commonjs/ui/KokoSubtitle.d.ts.map +1 -0
  410. package/lib/typescript/commonjs/ui/KokoTaskPanel.d.ts +7 -0
  411. package/lib/typescript/commonjs/ui/KokoTaskPanel.d.ts.map +1 -0
  412. package/lib/typescript/commonjs/ui/hostOverlay.d.ts +28 -0
  413. package/lib/typescript/commonjs/ui/hostOverlay.d.ts.map +1 -0
  414. package/lib/typescript/commonjs/ui/icons.d.ts +26 -0
  415. package/lib/typescript/commonjs/ui/icons.d.ts.map +1 -0
  416. package/lib/typescript/commonjs/ui/progressChrome.d.ts +21 -0
  417. package/lib/typescript/commonjs/ui/progressChrome.d.ts.map +1 -0
  418. package/lib/typescript/commonjs/ui/safeArea.d.ts +12 -0
  419. package/lib/typescript/commonjs/ui/safeArea.d.ts.map +1 -0
  420. package/lib/typescript/commonjs/ui/useOverlayOrigin.d.ts +22 -0
  421. package/lib/typescript/commonjs/ui/useOverlayOrigin.d.ts.map +1 -0
  422. package/lib/typescript/module/KokoAgent.d.ts +167 -0
  423. package/lib/typescript/module/KokoAgent.d.ts.map +1 -0
  424. package/lib/typescript/module/assist/OnDeviceAssist.d.ts +31 -0
  425. package/lib/typescript/module/assist/OnDeviceAssist.d.ts.map +1 -0
  426. package/lib/typescript/module/assist/intentClassify.d.ts +18 -0
  427. package/lib/typescript/module/assist/intentClassify.d.ts.map +1 -0
  428. package/lib/typescript/module/assist/nodeRank.d.ts +32 -0
  429. package/lib/typescript/module/assist/nodeRank.d.ts.map +1 -0
  430. package/lib/typescript/module/assist/ocrTarget.d.ts +25 -0
  431. package/lib/typescript/module/assist/ocrTarget.d.ts.map +1 -0
  432. package/lib/typescript/module/assist/webVisualChange.d.ts +6 -0
  433. package/lib/typescript/module/assist/webVisualChange.d.ts.map +1 -0
  434. package/lib/typescript/module/client/ActionOutcomeUnknownError.d.ts +13 -0
  435. package/lib/typescript/module/client/ActionOutcomeUnknownError.d.ts.map +1 -0
  436. package/lib/typescript/module/client/AgentSession.d.ts +56 -0
  437. package/lib/typescript/module/client/AgentSession.d.ts.map +1 -0
  438. package/lib/typescript/module/client/GatewayClient.d.ts +149 -0
  439. package/lib/typescript/module/client/GatewayClient.d.ts.map +1 -0
  440. package/lib/typescript/module/client/OperationReplayGuard.d.ts +13 -0
  441. package/lib/typescript/module/client/OperationReplayGuard.d.ts.map +1 -0
  442. package/lib/typescript/module/client/RunCheckpoint.d.ts +57 -0
  443. package/lib/typescript/module/client/RunCheckpoint.d.ts.map +1 -0
  444. package/lib/typescript/module/client/loopDetect.d.ts +15 -0
  445. package/lib/typescript/module/client/loopDetect.d.ts.map +1 -0
  446. package/lib/typescript/module/client/recentSearch.d.ts +5 -0
  447. package/lib/typescript/module/client/recentSearch.d.ts.map +1 -0
  448. package/lib/typescript/module/client/walletChoiceGuard.d.ts +4 -0
  449. package/lib/typescript/module/client/walletChoiceGuard.d.ts.map +1 -0
  450. package/lib/typescript/module/client/webResultCategory.d.ts +5 -0
  451. package/lib/typescript/module/client/webResultCategory.d.ts.map +1 -0
  452. package/lib/typescript/module/commercial/AccountStore.d.ts +17 -0
  453. package/lib/typescript/module/commercial/AccountStore.d.ts.map +1 -0
  454. package/lib/typescript/module/commercial/AgentDebug.d.ts +25 -0
  455. package/lib/typescript/module/commercial/AgentDebug.d.ts.map +1 -0
  456. package/lib/typescript/module/commercial/ExecutionGuard.d.ts +18 -0
  457. package/lib/typescript/module/commercial/ExecutionGuard.d.ts.map +1 -0
  458. package/lib/typescript/module/commercial/UsageBus.d.ts +18 -0
  459. package/lib/typescript/module/commercial/UsageBus.d.ts.map +1 -0
  460. package/lib/typescript/module/commercial/branding.d.ts +25 -0
  461. package/lib/typescript/module/commercial/branding.d.ts.map +1 -0
  462. package/lib/typescript/module/commercial/devMode.d.ts +26 -0
  463. package/lib/typescript/module/commercial/devMode.d.ts.map +1 -0
  464. package/lib/typescript/module/commercial/trust.d.ts +21 -0
  465. package/lib/typescript/module/commercial/trust.d.ts.map +1 -0
  466. package/lib/typescript/module/confirmation/gate.d.ts +18 -0
  467. package/lib/typescript/module/confirmation/gate.d.ts.map +1 -0
  468. package/lib/typescript/module/cursor/CursorOverlay.d.ts +13 -0
  469. package/lib/typescript/module/cursor/CursorOverlay.d.ts.map +1 -0
  470. package/lib/typescript/module/cursor/PointerHand.d.ts +16 -0
  471. package/lib/typescript/module/cursor/PointerHand.d.ts.map +1 -0
  472. package/lib/typescript/module/cursor/controller.d.ts +30 -0
  473. package/lib/typescript/module/cursor/controller.d.ts.map +1 -0
  474. package/lib/typescript/module/cursor/pointer.d.ts +23 -0
  475. package/lib/typescript/module/cursor/pointer.d.ts.map +1 -0
  476. package/lib/typescript/module/debug/KokoRemoteSmoke.d.ts +96 -0
  477. package/lib/typescript/module/debug/KokoRemoteSmoke.d.ts.map +1 -0
  478. package/lib/typescript/module/explore/ExplorationGraph.d.ts +96 -0
  479. package/lib/typescript/module/explore/ExplorationGraph.d.ts.map +1 -0
  480. package/lib/typescript/module/explore/bootstrapExplore.d.ts +40 -0
  481. package/lib/typescript/module/explore/bootstrapExplore.d.ts.map +1 -0
  482. package/lib/typescript/module/host/HostActions.d.ts +101 -0
  483. package/lib/typescript/module/host/HostActions.d.ts.map +1 -0
  484. package/lib/typescript/module/i18n/index.d.ts +20 -0
  485. package/lib/typescript/module/i18n/index.d.ts.map +1 -0
  486. package/lib/typescript/module/i18n/runtimeMessages.d.ts +178 -0
  487. package/lib/typescript/module/i18n/runtimeMessages.d.ts.map +1 -0
  488. package/lib/typescript/module/index.d.ts +66 -0
  489. package/lib/typescript/module/index.d.ts.map +1 -0
  490. package/lib/typescript/module/native/NativeBridge.d.ts +70 -0
  491. package/lib/typescript/module/native/NativeBridge.d.ts.map +1 -0
  492. package/lib/typescript/module/native/navigationLabel.d.ts +4 -0
  493. package/lib/typescript/module/native/navigationLabel.d.ts.map +1 -0
  494. package/lib/typescript/module/native/normalizeViewTree.d.ts +4 -0
  495. package/lib/typescript/module/native/normalizeViewTree.d.ts.map +1 -0
  496. package/lib/typescript/module/native/pruneOffscreen.d.ts +3 -0
  497. package/lib/typescript/module/native/pruneOffscreen.d.ts.map +1 -0
  498. package/lib/typescript/module/native/scrollViewport.d.ts +13 -0
  499. package/lib/typescript/module/native/scrollViewport.d.ts.map +1 -0
  500. package/lib/typescript/module/package.json +1 -0
  501. package/lib/typescript/module/privacy/redact.d.ts +9 -0
  502. package/lib/typescript/module/privacy/redact.d.ts.map +1 -0
  503. package/lib/typescript/module/privacy/screenEvidence.d.ts +14 -0
  504. package/lib/typescript/module/privacy/screenEvidence.d.ts.map +1 -0
  505. package/lib/typescript/module/privacy/screenModel.d.ts +26 -0
  506. package/lib/typescript/module/privacy/screenModel.d.ts.map +1 -0
  507. package/lib/typescript/module/privacy/sensitiveScreen.d.ts +8 -0
  508. package/lib/typescript/module/privacy/sensitiveScreen.d.ts.map +1 -0
  509. package/lib/typescript/module/privacy/userGate.d.ts +58 -0
  510. package/lib/typescript/module/privacy/userGate.d.ts.map +1 -0
  511. package/lib/typescript/module/protocol/actions.d.ts +7 -0
  512. package/lib/typescript/module/protocol/actions.d.ts.map +1 -0
  513. package/lib/typescript/module/provider/HostAppearanceStore.d.ts +64 -0
  514. package/lib/typescript/module/provider/HostAppearanceStore.d.ts.map +1 -0
  515. package/lib/typescript/module/provider/KokoProvider.d.ts +39 -0
  516. package/lib/typescript/module/provider/KokoProvider.d.ts.map +1 -0
  517. package/lib/typescript/module/provider/KokoUiContext.d.ts +22 -0
  518. package/lib/typescript/module/provider/KokoUiContext.d.ts.map +1 -0
  519. package/lib/typescript/module/selector/match.d.ts +27 -0
  520. package/lib/typescript/module/selector/match.d.ts.map +1 -0
  521. package/lib/typescript/module/task/TaskStore.d.ts +65 -0
  522. package/lib/typescript/module/task/TaskStore.d.ts.map +1 -0
  523. package/lib/typescript/module/task/types.d.ts +66 -0
  524. package/lib/typescript/module/task/types.d.ts.map +1 -0
  525. package/lib/typescript/module/task/useTaskStore.d.ts +3 -0
  526. package/lib/typescript/module/task/useTaskStore.d.ts.map +1 -0
  527. package/lib/typescript/module/types.d.ts +372 -0
  528. package/lib/typescript/module/types.d.ts.map +1 -0
  529. package/lib/typescript/module/ui/KokoChatSheet.d.ts +8 -0
  530. package/lib/typescript/module/ui/KokoChatSheet.d.ts.map +1 -0
  531. package/lib/typescript/module/ui/KokoComposer.d.ts +13 -0
  532. package/lib/typescript/module/ui/KokoComposer.d.ts.map +1 -0
  533. package/lib/typescript/module/ui/KokoDialogHost.d.ts +32 -0
  534. package/lib/typescript/module/ui/KokoDialogHost.d.ts.map +1 -0
  535. package/lib/typescript/module/ui/KokoEntryButton.d.ts +18 -0
  536. package/lib/typescript/module/ui/KokoEntryButton.d.ts.map +1 -0
  537. package/lib/typescript/module/ui/KokoObserver.d.ts +13 -0
  538. package/lib/typescript/module/ui/KokoObserver.d.ts.map +1 -0
  539. package/lib/typescript/module/ui/KokoOverlayLayer.d.ts +35 -0
  540. package/lib/typescript/module/ui/KokoOverlayLayer.d.ts.map +1 -0
  541. package/lib/typescript/module/ui/KokoSubtitle.d.ts +7 -0
  542. package/lib/typescript/module/ui/KokoSubtitle.d.ts.map +1 -0
  543. package/lib/typescript/module/ui/KokoTaskPanel.d.ts +7 -0
  544. package/lib/typescript/module/ui/KokoTaskPanel.d.ts.map +1 -0
  545. package/lib/typescript/module/ui/hostOverlay.d.ts +28 -0
  546. package/lib/typescript/module/ui/hostOverlay.d.ts.map +1 -0
  547. package/lib/typescript/module/ui/icons.d.ts +26 -0
  548. package/lib/typescript/module/ui/icons.d.ts.map +1 -0
  549. package/lib/typescript/module/ui/progressChrome.d.ts +21 -0
  550. package/lib/typescript/module/ui/progressChrome.d.ts.map +1 -0
  551. package/lib/typescript/module/ui/safeArea.d.ts +12 -0
  552. package/lib/typescript/module/ui/safeArea.d.ts.map +1 -0
  553. package/lib/typescript/module/ui/useOverlayOrigin.d.ts +22 -0
  554. package/lib/typescript/module/ui/useOverlayOrigin.d.ts.map +1 -0
  555. package/package.json +153 -0
  556. package/react-native.config.js +12 -0
  557. package/src/KokoAgent.ts +1415 -0
  558. package/src/assist/OnDeviceAssist.ts +133 -0
  559. package/src/assist/intentClassify.ts +122 -0
  560. package/src/assist/nodeRank.ts +167 -0
  561. package/src/assist/ocrTarget.ts +146 -0
  562. package/src/assist/webVisualChange.ts +24 -0
  563. package/src/client/ActionOutcomeUnknownError.ts +18 -0
  564. package/src/client/AgentSession.ts +952 -0
  565. package/src/client/GatewayClient.ts +439 -0
  566. package/src/client/OperationReplayGuard.ts +61 -0
  567. package/src/client/RunCheckpoint.ts +154 -0
  568. package/src/client/loopDetect.ts +213 -0
  569. package/src/client/recentSearch.ts +47 -0
  570. package/src/client/walletChoiceGuard.ts +15 -0
  571. package/src/client/webResultCategory.ts +28 -0
  572. package/src/commercial/AccountStore.ts +85 -0
  573. package/src/commercial/AgentDebug.ts +142 -0
  574. package/src/commercial/ExecutionGuard.ts +67 -0
  575. package/src/commercial/UsageBus.ts +44 -0
  576. package/src/commercial/branding.ts +97 -0
  577. package/src/commercial/devMode.ts +48 -0
  578. package/src/commercial/trust.ts +67 -0
  579. package/src/confirmation/gate.ts +82 -0
  580. package/src/cursor/CursorOverlay.tsx +138 -0
  581. package/src/cursor/PointerHand.tsx +49 -0
  582. package/src/cursor/controller.ts +98 -0
  583. package/src/cursor/pointer.ts +40 -0
  584. package/src/debug/KokoRemoteSmoke.tsx +561 -0
  585. package/src/explore/ExplorationGraph.ts +518 -0
  586. package/src/explore/bootstrapExplore.ts +89 -0
  587. package/src/host/HostActions.ts +349 -0
  588. package/src/i18n/index.ts +229 -0
  589. package/src/i18n/runtimeMessages.ts +180 -0
  590. package/src/index.ts +203 -0
  591. package/src/native/NativeBridge.ts +207 -0
  592. package/src/native/navigationLabel.ts +11 -0
  593. package/src/native/normalizeViewTree.ts +16 -0
  594. package/src/native/pruneOffscreen.ts +72 -0
  595. package/src/native/scrollViewport.ts +51 -0
  596. package/src/privacy/redact.ts +115 -0
  597. package/src/privacy/screenEvidence.ts +55 -0
  598. package/src/privacy/screenModel.ts +504 -0
  599. package/src/privacy/sensitiveScreen.ts +55 -0
  600. package/src/privacy/userGate.ts +233 -0
  601. package/src/protocol/actions.ts +66 -0
  602. package/src/provider/HostAppearanceStore.ts +148 -0
  603. package/src/provider/KokoProvider.tsx +118 -0
  604. package/src/provider/KokoUiContext.tsx +162 -0
  605. package/src/selector/match.ts +417 -0
  606. package/src/task/TaskStore.ts +387 -0
  607. package/src/task/types.ts +82 -0
  608. package/src/task/useTaskStore.ts +9 -0
  609. package/src/types.ts +318 -0
  610. package/src/ui/KokoChatSheet.tsx +930 -0
  611. package/src/ui/KokoComposer.tsx +174 -0
  612. package/src/ui/KokoDialogHost.tsx +249 -0
  613. package/src/ui/KokoEntryButton.tsx +74 -0
  614. package/src/ui/KokoObserver.tsx +587 -0
  615. package/src/ui/KokoOverlayLayer.tsx +53 -0
  616. package/src/ui/KokoSubtitle.tsx +80 -0
  617. package/src/ui/KokoTaskPanel.tsx +299 -0
  618. package/src/ui/hostOverlay.tsx +148 -0
  619. package/src/ui/icons.tsx +145 -0
  620. package/src/ui/progressChrome.ts +73 -0
  621. package/src/ui/safeArea.ts +95 -0
  622. package/src/ui/useOverlayOrigin.ts +29 -0
@@ -0,0 +1,149 @@
1
+ import type { AgentAction, Point, Selector } from '../types';
2
+ import type { KokoAccountSnapshot, KokoPlanId } from '../types';
3
+ import type { ViewNode } from '../types';
4
+ export type GatewayConfig = {
5
+ /**
6
+ * Official gateway origin. Defaults to https://sdk.intentcomputing.net
7
+ * Localhost only in Metro debug clients (lab dogfood), not customer self-host.
8
+ */
9
+ baseUrl?: string;
10
+ /**
11
+ * App / member token from your product backend or dashboard.
12
+ * Never an LLM API key — users never see model keys.
13
+ */
14
+ token: string;
15
+ /**
16
+ * Host App ID (iOS bundle id / Android package name).
17
+ * Defaults to the native module's hostAppId. Must match the App ID bound to the token.
18
+ */
19
+ appId?: string;
20
+ };
21
+ export declare function resolveGatewayBaseUrl(cfg: GatewayConfig): string;
22
+ export type AgentHistoryItem = {
23
+ tool: string;
24
+ args?: Record<string, unknown>;
25
+ result: string;
26
+ ok?: boolean;
27
+ };
28
+ export type GatewayNextRequest = {
29
+ session_id?: string;
30
+ goal: string;
31
+ ui_tree?: unknown;
32
+ ui_outline?: string;
33
+ ui_screen_model?: string;
34
+ /** Local-only evidence; gateway serializes only labels derived from goal. */
35
+ local_ocr_goal_labels?: string[];
36
+ local_ocr_wallet_choices?: string[];
37
+ local_web_wallet_aliases?: string[];
38
+ history: AgentHistoryItem[];
39
+ locale?: string;
40
+ user_reply?: string;
41
+ platform?: 'ios' | 'android' | 'unknown';
42
+ };
43
+ /** Build hints from the same redacted tree that crosses the upload boundary. */
44
+ export declare function safePlannerModel(tree: ViewNode, goal: string, localOcrGoalLabels?: string[], localWalletChoices?: string[], hostWalletAliases?: string[]): string;
45
+ export type GatewayAction = {
46
+ tool: 'dump';
47
+ args?: {
48
+ reason?: string;
49
+ };
50
+ } | {
51
+ tool: 'find';
52
+ args: {
53
+ match: Array<Record<string, unknown>>;
54
+ index?: number;
55
+ };
56
+ } | {
57
+ tool: 'tap';
58
+ args: {
59
+ selector?: Selector;
60
+ nodeId?: string;
61
+ /** Last-resort window point when the control is visible but not in the tree. */
62
+ point?: Point;
63
+ label?: string;
64
+ };
65
+ } | {
66
+ tool: 'swipe';
67
+ args: {
68
+ from: Point;
69
+ to: Point;
70
+ label?: string;
71
+ };
72
+ } | {
73
+ tool: 'pinch';
74
+ args: {
75
+ center: Point;
76
+ scale: number;
77
+ label?: string;
78
+ };
79
+ } | {
80
+ tool: 'type';
81
+ args: {
82
+ text: string;
83
+ selector?: Selector;
84
+ nodeId?: string;
85
+ clear?: boolean;
86
+ label?: string;
87
+ };
88
+ } | {
89
+ tool: 'ask_user';
90
+ args: {
91
+ question: string;
92
+ };
93
+ } | {
94
+ tool: 'done';
95
+ args: {
96
+ success: boolean;
97
+ summary: string;
98
+ };
99
+ };
100
+ export type GatewayNextResponse = {
101
+ ok: true;
102
+ session_id: string;
103
+ narration: string | null;
104
+ action: GatewayAction;
105
+ provider: string;
106
+ model: string;
107
+ step: number;
108
+ region: string;
109
+ execution_permit: string;
110
+ };
111
+ export type GatewaySessionResponse = {
112
+ ok: true;
113
+ session_id: string;
114
+ execution_permit: string;
115
+ };
116
+ export declare class GatewayError extends Error {
117
+ readonly code: string;
118
+ readonly status: number;
119
+ readonly quota?: KokoAccountSnapshot['quota'];
120
+ readonly plan?: KokoPlanId;
121
+ constructor(message: string, opts: {
122
+ code: string;
123
+ status: number;
124
+ quota?: KokoAccountSnapshot['quota'];
125
+ plan?: KokoPlanId;
126
+ });
127
+ }
128
+ export declare class GatewayClient {
129
+ private readonly baseUrl;
130
+ private readonly token;
131
+ private readonly appId;
132
+ constructor(cfg: GatewayConfig);
133
+ getBaseUrl(): string;
134
+ getAppId(): string;
135
+ private authHeaders;
136
+ private parseError;
137
+ health(): Promise<Record<string, unknown>>;
138
+ /** Open session + initial execution permit (before first dump). */
139
+ beginSession(sessionId?: string): Promise<GatewaySessionResponse>;
140
+ me(): Promise<KokoAccountSnapshot>;
141
+ usage(limit?: number): Promise<{
142
+ quota: KokoAccountSnapshot['quota'];
143
+ plan: KokoPlanId;
144
+ events: unknown[];
145
+ }>;
146
+ next(body: GatewayNextRequest): Promise<GatewayNextResponse>;
147
+ }
148
+ export declare function toLocalAgentAction(action: GatewayAction): AgentAction | null;
149
+ //# sourceMappingURL=GatewayClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GatewayClient.d.ts","sourceRoot":"","sources":["../../../../src/client/GatewayClient.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,13 @@
1
+ import type { GatewayAction } from './GatewayClient';
2
+ import type { ViewNode } from '../types';
3
+ /** Keep only hashes of prior public operation entries across privacy purges. */
4
+ export declare class OperationReplayGuard {
5
+ private attempts;
6
+ hasHandoff: boolean;
7
+ reset(): void;
8
+ markHandoff(): void;
9
+ private key;
10
+ record(action: GatewayAction, tree: ViewNode | null): void;
11
+ blocks(action: GatewayAction, tree: ViewNode | null): boolean;
12
+ }
13
+ //# sourceMappingURL=OperationReplayGuard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OperationReplayGuard.d.ts","sourceRoot":"","sources":["../../../../src/client/OperationReplayGuard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAazC,gFAAgF;AAChF,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAqB;IACrC,UAAU,UAAS;IAEnB,KAAK;IACL,WAAW;IAEX,OAAO,CAAC,GAAG;IA6BX,MAAM,CAAC,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,QAAQ,GAAG,IAAI;IAKnD,MAAM,CAAC,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,QAAQ,GAAG,IAAI,GAAG,OAAO;CAI9D"}
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Survive a JS-context restart mid-run.
3
+ *
4
+ * Some actions destroy the runtime that is performing them: changing locale or
5
+ * theme, toggling RTL, flipping a feature flag, anything the host answers with
6
+ * a root remount or `reloadAsync`. The tap succeeds, the App comes back — but
7
+ * the `runGoal` promise, its session and the whole TaskStore died with the old
8
+ * context, so the caller can never learn the outcome.
9
+ *
10
+ * So checkpoint the goal to disk while it runs. On the next SDK init a fresh
11
+ * checkpoint means "we were interrupted", and the run can be picked up again
12
+ * from whatever screen the App came back on.
13
+ *
14
+ * Storage is best-effort: without AsyncStorage this degrades to memory, which
15
+ * cannot survive a reload. That is the same tradeoff ExplorationGraph makes —
16
+ * a missing optional peer must not break a run, only reduce it.
17
+ */
18
+ /**
19
+ * A reload takes a second or two. Anything older than this was not an
20
+ * interruption — it is a run that died for some other reason (force quit,
21
+ * crash, the user walking away), and silently driving the UI on next launch
22
+ * would be surprising rather than helpful.
23
+ */
24
+ export declare const RESUME_MAX_AGE_MS = 90000;
25
+ /**
26
+ * One resume per goal. If the goal itself is what reloads the App, resuming it
27
+ * reloads again; without a cap that is an infinite loop across launches.
28
+ */
29
+ export declare const RESUME_MAX_ATTEMPTS = 1;
30
+ export type RunCheckpointData = {
31
+ goal: string;
32
+ startedAt: number;
33
+ /** Bumped per step, so age reflects liveness rather than run length. */
34
+ updatedAt: number;
35
+ /** Resumes already spent on this goal. */
36
+ resumes: number;
37
+ };
38
+ export declare const RunCheckpoint: {
39
+ /** Mark a goal as in flight. `resumes` carries over when resuming. */
40
+ begin(goal: string, resumes?: number): Promise<void>;
41
+ /** Keep the checkpoint fresh while the loop makes progress. */
42
+ touch(): Promise<void>;
43
+ /** The run reached a verdict — nothing left to resume. */
44
+ clear(): Promise<void>;
45
+ /**
46
+ * Claim an interrupted run, if there is one worth resuming.
47
+ *
48
+ * Clears before returning: a resume that dies the same way must not be
49
+ * claimed again on the next launch.
50
+ */
51
+ claimResumable(opts?: {
52
+ maxAgeMs?: number;
53
+ maxAttempts?: number;
54
+ now?: number;
55
+ }): Promise<RunCheckpointData | null>;
56
+ };
57
+ //# sourceMappingURL=RunCheckpoint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RunCheckpoint.d.ts","sourceRoot":"","sources":["../../../../src/client/RunCheckpoint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAuBH;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,QAAS,CAAC;AAExC;;;GAGG;AACH,eAAO,MAAM,mBAAmB,IAAI,CAAC;AAErC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,wEAAwE;IACxE,SAAS,EAAE,MAAM,CAAC;IAClB,0CAA0C;IAC1C,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AA2CF,eAAO,MAAM,aAAa;IACxB,sEAAsE;gBAC1D,MAAM;IAOlB,+DAA+D;;IAQ/D,0DAA0D;;IAQ1D;;;;;OAKG;0BACyB;QAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,GAAG,CAAC,EAAE,MAAM,CAAC;KACd,GAAG,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC;CAetC,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Idle / dead-loop detection (mirrors SDK client + KokoAgent explore/escape).
3
+ * Stop on no-progress loops only — not because a goal needs many steps.
4
+ */
5
+ export type HistoryLike = {
6
+ tool: string;
7
+ args?: Record<string, unknown>;
8
+ result: string;
9
+ ok?: boolean;
10
+ };
11
+ export declare function actionFingerprint(item: HistoryLike): string;
12
+ export declare function isLooping(history: HistoryLike[]): boolean;
13
+ export declare function isNearLoop(history: HistoryLike[]): boolean;
14
+ export declare const LOOP_ESCAPE_HINT = "\u3010\u6062\u590D\u8BC4\u4F30 \u2014 \u8FD1\u671F\u89C2\u5BDF\u6216\u52A8\u4F5C\u91CD\u590D\uFF0C\u5148\u6838\u9A8C\u5F53\u524D\u72B6\u6001\u3011\n- \u5BF9\u7167\u7528\u6237\u76EE\u6807\u548C\u6700\u65B0\u8BC1\u636E\uFF1A\u5DF2\u9A8C\u8BC1\u5168\u90E8\u7ED3\u679C\u624D done(true)\uFF1B\u91CD\u590D\u6216\u7A7A\u8F6C\u672C\u8EAB\u4E0D\u4EE3\u8868\u6210\u529F\n- \u52A0\u8F7D\u3001\u8F6C\u573A\u6216\u5DF2\u63D0\u4EA4\u64CD\u4F5C\u4ECD\u5F85\u7ED3\u679C\u65F6\uFF0C\u53EF\u4EE5\u5728\u5BA2\u6237\u7AEF\u9884\u7B97\u5185\u7528 dump \u53EA\u8BFB\u6838\u9A8C\uFF1B\u6301\u7EED\u4E0D\u53D8\u5219\u5982\u5B9E done(false)\u8BF4\u660E\u672A\u786E\u8BA4\uFF0C\u4E0D\u91CD\u63D0\u8BF7\u6C42\u6216\u91CD\u8D70\u5DF2\u5B8C\u6210\u6D41\u7A0B\n- tap_noop / tap_failed \u540E\u5148\u6838\u5BF9\u5F53\u524D\u63A7\u4EF6\u4E0E\u72B6\u6001\uFF1B\u53EA\u6709\u5B58\u5728\u6709\u8BC1\u636E\u4E14\u5B89\u5168\u7684\u66FF\u4EE3\u52A8\u4F5C\u624D\u8C03\u6574 selector\u3001\u76EE\u6807\u6216\u8DEF\u5F84\uFF0C\u4E0D\u80FD\u4E3A\u4E86\u9003\u9038\u800C\u731C\u70B9\n- \u4E0E\u5F53\u524D\u5B50\u76EE\u6807\u76F8\u5173\u7684\u6807\u9898\u3001\u6B63\u6587\u3001\u9875\u7801\u6216\u72B6\u6001\u6301\u7EED\u53D8\u5316\u65F6\uFF0C\u540C\u540D\u6216\u4EA4\u66FF\u6309\u94AE\u4ECD\u53EF\u80FD\u662F\u6B63\u5E38\u8FDB\u5C55\uFF1B\u4E0D\u8981\u6309\u56FA\u5B9A\u70B9\u51FB\u6B21\u6570\u6216\u52A8\u4F5C\u5E8F\u5217\u8BA4\u5B9A\u5FAA\u73AF\n- \u4E0B\u4E00\u6B65\u63A7\u4EF6\u786E\u5B9E\u53EF\u89C1\u3001\u53EF\u64CD\u4F5C\u4E14\u5C5E\u4E8E\u5F53\u524D\u76EE\u6807\u65F6\u518D tap/type\uFF1B\u5DF2\u6EE1\u8DB3\u7684\u9009\u4E2D\u72B6\u6001\u4E0D\u91CD\u590D\u5207\u6362\n- \u4EC5\u76EE\u6807\u5C5E\u4E8E\u5F53\u524D\u5217\u8868\u4E14\u6709\u6EDA\u52A8\u533A\u57DF\u8FB9\u754C\u65F6\u624D swipe \u67E5\u627E\uFF1B\u624B\u52BF\u8D77\u7EC8\u70B9\u5728\u533A\u57DF\u5185\uFF0C\u4E0D\u80FD\u7528\u6ED1\u52A8\u731C\u6D4B\u5BFC\u822A\n- \u6570\u503C\u63A7\u4EF6\u6309\u5B9E\u9645\u7C7B\u578B\u3001\u5F53\u524D\u503C\u3001\u8303\u56F4\u548C\u7528\u6237\u7CBE\u5EA6\u8981\u6C42\u8C03\u6574\uFF0C\u4E0D\u9884\u8BBE\u624B\u52BF\u65B9\u5411\uFF1B\u65E0\u6548\u679C\u3001\u5230\u8FB9\u754C\u6216\u7F3A\u5C11\u8BC1\u636E\u65F6\u8BF4\u660E\u53D7\u963B\n- find/tap \u4F7F\u7528\u6700\u65B0\u80FD\u529B\u91CC\u7684\u6587\u6848\u6216 id\uFF1B\u7F3A\u5C11\u5B89\u5168\u4E0B\u4E00\u6B65\u65F6\u5141\u8BB8\u53EA\u8BFB\u89C2\u5BDF\u6216\u5982\u5B9E\u7ED3\u675F\uFF0C\u4E0D\u5F3A\u5236\u5207\u6362\u8DEF\u5F84";
15
+ //# sourceMappingURL=loopDetect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loopDetect.d.ts","sourceRoot":"","sources":["../../../../src/client/loopDetect.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,CAAC,EAAE,OAAO,CAAC;CACd,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,CAkC3D;AA8DD,wBAAgB,SAAS,CAAC,OAAO,EAAE,WAAW,EAAE,GAAG,OAAO,CAyEzD;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,WAAW,EAAE,GAAG,OAAO,CAmB1D;AAED,eAAO,MAAM,gBAAgB,u5EAQyB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { ViewNode } from '../types';
2
+ import type { GatewayAction } from './GatewayClient';
3
+ /** Only replace a search query with a uniquely identified visible recent item. */
4
+ export declare function recentSearchAction(action: GatewayAction, root: ViewNode | null, goal: string): GatewayAction | null;
5
+ //# sourceMappingURL=recentSearch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recentSearch.d.ts","sourceRoot":"","sources":["../../../../src/client/recentSearch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAQrD,kFAAkF;AAClF,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,QAAQ,GAAG,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,aAAa,GAAG,IAAI,CAoCnH"}
@@ -0,0 +1,4 @@
1
+ import type { GatewayAction } from './GatewayClient';
2
+ /** Protect a host-wallet request from accidentally selecting an unrelated provider. */
3
+ export declare function wrongHostWalletChoice(goal: string, action: GatewayAction, choices: string[], aliases: string[], observedLabel?: string): boolean;
4
+ //# sourceMappingURL=walletChoiceGuard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"walletChoiceGuard.d.ts","sourceRoot":"","sources":["../../../../src/client/walletChoiceGuard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,uFAAuF;AACvF,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,OAAO,CAWhJ"}
@@ -0,0 +1,5 @@
1
+ import type { ViewNode } from '../types';
2
+ import type { GatewayAction, AgentHistoryItem } from './GatewayClient';
3
+ /** Select a visible app-results category only when the user's query is on this page. */
4
+ export declare function webResultCategory(action: GatewayAction, root: ViewNode | null, goal: string, history: AgentHistoryItem[]): GatewayAction | null;
5
+ //# sourceMappingURL=webResultCategory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webResultCategory.d.ts","sourceRoot":"","sources":["../../../../src/client/webResultCategory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEvE,wFAAwF;AACxF,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,QAAQ,GAAG,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,EAAE,GAAG,aAAa,GAAG,IAAI,CAuB/I"}
@@ -0,0 +1,17 @@
1
+ import { type GatewayConfig } from '../client/GatewayClient';
2
+ import type { KokoAccountSnapshot, KokoEntitlements, KokoPlanId } from '../types';
3
+ type Listener = (account: KokoAccountSnapshot | null) => void;
4
+ declare class AccountStoreImpl {
5
+ private account;
6
+ private listeners;
7
+ private inflight;
8
+ get(): KokoAccountSnapshot | null;
9
+ subscribe(listener: Listener): () => void;
10
+ private emit;
11
+ refresh(gateway: GatewayConfig): Promise<KokoAccountSnapshot | null>;
12
+ entitlements(): KokoEntitlements;
13
+ plan(): KokoPlanId;
14
+ }
15
+ export declare const AccountStore: AccountStoreImpl;
16
+ export {};
17
+ //# sourceMappingURL=AccountStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AccountStore.d.ts","sourceRoot":"","sources":["../../../../src/commercial/AccountStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAKlF,KAAK,QAAQ,GAAG,CAAC,OAAO,EAAE,mBAAmB,GAAG,IAAI,KAAK,IAAI,CAAC;AAgB9D,cAAM,gBAAgB;IACpB,OAAO,CAAC,OAAO,CAAoC;IACnD,OAAO,CAAC,SAAS,CAAuB;IACxC,OAAO,CAAC,QAAQ,CAAoD;IAEpE,GAAG,IAAI,mBAAmB,GAAG,IAAI;IAIjC,SAAS,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,IAAI;IAQzC,OAAO,CAAC,IAAI;IAIN,OAAO,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC;IAgC1E,YAAY,IAAI,gBAAgB;IAIhC,IAAI,IAAI,UAAU;CAGnB;AAED,eAAO,MAAM,YAAY,kBAAyB,CAAC"}
@@ -0,0 +1,25 @@
1
+ import type { KokoAgentConfig } from '../types';
2
+ import type { ViewNode } from '../types';
3
+ type Cfg = Pick<KokoAgentConfig, 'debug' | 'devMode'> | undefined;
4
+ /**
5
+ * Developer-facing logs: what the SDK observed in the host App
6
+ * (controls / fields / actions). Never logs security policy internals.
7
+ */
8
+ export declare const AgentDebug: {
9
+ enabled(config?: Cfg): boolean;
10
+ /** High-level run lifecycle (goal only, no policy). */
11
+ runStart(config: Cfg, goal: string): void;
12
+ runEnd(config: Cfg, summary: string, ok: boolean): void;
13
+ /** The dump stopped at its depth cap, so the page body never reached us. */
14
+ dumpTruncated(config: Cfg, cap: number): void;
15
+ /** Capabilities discovered on the current screen. */
16
+ screenCapabilities(config: Cfg, tree: ViewNode | null | undefined): void;
17
+ /** What the agent is about to do in the App (user-visible action). */
18
+ appAction(config: Cfg, step: number, tool: string, detail?: string): void;
19
+ /** Soft failure for developers — generic, no rule leakage. */
20
+ runIssue(config: Cfg, message: string): void;
21
+ };
22
+ /** Strip security/policy jargon from messages shown in debug console. */
23
+ export declare function sanitizeDevMessage(message: string): string;
24
+ export {};
25
+ //# sourceMappingURL=AgentDebug.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AgentDebug.d.ts","sourceRoot":"","sources":["../../../../src/commercial/AgentDebug.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAIhD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC,KAAK,GAAG,GAAG,IAAI,CAAC,eAAe,EAAE,OAAO,GAAG,SAAS,CAAC,GAAG,SAAS,CAAC;AAElE;;;GAGG;AACH,eAAO,MAAM,UAAU;qBACJ,GAAG,GAAG,OAAO;IAI9B,uDAAuD;qBACtC,GAAG,QAAQ,MAAM;mBAMnB,GAAG,WAAW,MAAM,MAAM,OAAO;IAMhD,4EAA4E;0BACtD,GAAG,OAAO,MAAM;IAStC,qDAAqD;+BAC1B,GAAG,QAAQ,QAAQ,GAAG,IAAI,GAAG,SAAS;IAmBjE,sEAAsE;sBAE5D,GAAG,QACL,MAAM,QACN,MAAM,WACH,MAAM;IAQjB,8DAA8D;qBAC7C,GAAG,WAAW,MAAM;CAMtC,CAAC;AA+CF,yEAAyE;AACzE,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAY1D"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Soft client gate: local dump/tap/swipe/type require a short-lived
3
+ * execution_permit from the official (or local-lab) gateway session.
4
+ * Always enforced — debug logging does not bypass this.
5
+ */
6
+ export type GuardedAction = 'dump' | 'find' | 'tap' | 'swipe' | 'pinch' | 'type' | 'screenshot';
7
+ declare class ExecutionGuardImpl {
8
+ private permit;
9
+ private sessionId;
10
+ setPermit(permit: string | null, sessionId?: string | null): void;
11
+ getPermit(): string | null;
12
+ getSessionId(): string | null;
13
+ clear(): void;
14
+ assert(action: GuardedAction): void;
15
+ }
16
+ export declare const ExecutionGuard: ExecutionGuardImpl;
17
+ export {};
18
+ //# sourceMappingURL=ExecutionGuard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExecutionGuard.d.ts","sourceRoot":"","sources":["../../../../src/commercial/ExecutionGuard.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,YAAY,CAAC;AAuBhG,cAAM,kBAAkB;IACtB,OAAO,CAAC,MAAM,CAAuB;IACrC,OAAO,CAAC,SAAS,CAAuB;IAExC,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI;IAK1D,SAAS;IAIT,YAAY;IAIZ,KAAK;IAKL,MAAM,CAAC,MAAM,EAAE,aAAa;CAa7B;AAED,eAAO,MAAM,cAAc,oBAA2B,CAAC"}
@@ -0,0 +1,18 @@
1
+ import type { KokoUsageEvent } from '../types';
2
+ type Listener = (event: KokoUsageEvent) => void;
3
+ /**
4
+ * Fan-out for usage / lifecycle events. Host `onUsageEvent` is wired here.
5
+ * Never used to gate execution.
6
+ */
7
+ declare class UsageBusImpl {
8
+ private listeners;
9
+ private recent;
10
+ private readonly maxRecent;
11
+ subscribe(listener: Listener): () => void;
12
+ emit(event: KokoUsageEvent): void;
13
+ getRecent(): KokoUsageEvent[];
14
+ clear(): void;
15
+ }
16
+ export declare const UsageBus: UsageBusImpl;
17
+ export {};
18
+ //# sourceMappingURL=UsageBus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UsageBus.d.ts","sourceRoot":"","sources":["../../../../src/commercial/UsageBus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C,KAAK,QAAQ,GAAG,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;AAEhD;;;GAGG;AACH,cAAM,YAAY;IAChB,OAAO,CAAC,SAAS,CAAuB;IACxC,OAAO,CAAC,MAAM,CAAwB;IACtC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAO;IAEjC,SAAS,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,IAAI;IAOzC,IAAI,CAAC,KAAK,EAAE,cAAc;IAc1B,SAAS,IAAI,cAAc,EAAE;IAI7B,KAAK;CAGN;AAED,eAAO,MAAM,QAAQ,cAAqB,CAAC"}
@@ -0,0 +1,25 @@
1
+ import type { KokoAccountSnapshot, KokoBrandingConfig, KokoEntitlements, KokoLocale } from '../types';
2
+ export declare const DEFAULT_ENTITLEMENTS: KokoEntitlements;
3
+ export type ResolvedBranding = {
4
+ name: string;
5
+ /** Letter shown when no image icon. */
6
+ mark: string;
7
+ /** Image source when host provided a require()/uri icon and entitlement allows. */
8
+ iconSource: number | {
9
+ uri: string;
10
+ } | null;
11
+ tagline: string;
12
+ placeholder: string;
13
+ primaryColor: string;
14
+ /** True when host asked for custom branding but plan denied it. */
15
+ downgraded: boolean;
16
+ };
17
+ /**
18
+ * Resolve what the **built-in** chat UI may show.
19
+ * This is a soft client gate for honest hosts + official gateway.
20
+ * Forked SDKs / custom chrome can always draw their own brand — that is outside
21
+ * this product surface. Usage metering remains server-authoritative.
22
+ */
23
+ export declare function resolveBranding(locale: KokoLocale, branding: KokoBrandingConfig | undefined, entitlements: KokoEntitlements | undefined): ResolvedBranding;
24
+ export declare function emptyAccount(): KokoAccountSnapshot;
25
+ //# sourceMappingURL=branding.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"branding.d.ts","sourceRoot":"","sources":["../../../../src/commercial/branding.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,UAAU,EAEX,MAAM,UAAU,CAAC;AAGlB,eAAO,MAAM,oBAAoB,EAAE,gBAGlC,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,mFAAmF;IACnF,UAAU,EAAE,MAAM,GAAG;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAC5C,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,mEAAmE;IACnE,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC;AAeF;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,UAAU,EAClB,QAAQ,EAAE,kBAAkB,GAAG,SAAS,EACxC,YAAY,EAAE,gBAAgB,GAAG,SAAS,GACzC,gBAAgB,CAsClB;AAED,wBAAgB,YAAY,IAAI,mBAAmB,CAMlD"}
@@ -0,0 +1,26 @@
1
+ import type { KokoAgentConfig } from '../types';
2
+ /** True only in Metro debug clients (never in store release binaries). */
3
+ export declare function isMetroDevBuild(): boolean;
4
+ /**
5
+ * Verbose SDK / agent execution logs for developers.
6
+ * Does NOT relax security (permits, gateway allowlist).
7
+ *
8
+ * On when:
9
+ * - `config.debug === true`, or
10
+ * - Metro `__DEV__` and `config.debug !== false`
11
+ *
12
+ * Release builds: only if host explicitly sets `debug: true`
13
+ * (logs only — still cannot use localhost gateway or skip permits).
14
+ */
15
+ export declare function resolveDebugLogging(config?: Pick<KokoAgentConfig, 'debug' | 'devMode'>): boolean;
16
+ /**
17
+ * @deprecated Use resolveDebugLogging. Kept for call-site migration.
18
+ * Previously also meant "relax security" — that behavior is removed.
19
+ */
20
+ export declare function resolveDevMode(config?: Pick<KokoAgentConfig, 'debug' | 'devMode'>): boolean;
21
+ /**
22
+ * Localhost / LAN gateway is only for Intent Computing debugging the
23
+ * in-repo gateway against a Metro debug app — not a customer "self-host" mode.
24
+ */
25
+ export declare function allowLocalGatewayForDebugClient(): boolean;
26
+ //# sourceMappingURL=devMode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"devMode.d.ts","sourceRoot":"","sources":["../../../../src/commercial/devMode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,0EAA0E;AAC1E,wBAAgB,eAAe,IAAI,OAAO,CAOzC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,OAAO,GAAG,SAAS,CAAC,GAClD,OAAO,CAIT;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,OAAO,GAAG,SAAS,CAAC,GAClD,OAAO,CAET;AAED;;;GAGG;AACH,wBAAgB,+BAA+B,IAAI,OAAO,CAEzD"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Gateway host policy + entitlement trust.
3
+ *
4
+ * Customers always use official Intent Computing hosts in release apps.
5
+ * Localhost is allowed only in Metro debug clients (so we can dogfood the
6
+ * in-repo gateway) — that is NOT a supported "self-host your own AI" mode.
7
+ */
8
+ export declare function isLocalDevHost(hostname: string): boolean;
9
+ export declare function isOfficialGatewayHost(hostname: string): boolean;
10
+ /** Hosts whose /v1/me branding claims we trust. */
11
+ export declare function isTrustedEntitlementHost(baseUrl: string): boolean;
12
+ /**
13
+ * @param allowLocalLab when true (Metro debug client only), localhost/LAN OK.
14
+ */
15
+ export declare function isAllowedGatewayUrl(baseUrl: string, allowLocalLab: boolean): {
16
+ ok: true;
17
+ } | {
18
+ ok: false;
19
+ reason: string;
20
+ };
21
+ //# sourceMappingURL=trust.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trust.d.ts","sourceRoot":"","sources":["../../../../src/commercial/trust.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AASH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAQxD;AAED,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAK/D;AAED,mDAAmD;AACnD,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAOjE;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,OAAO,GACrB;IAAE,EAAE,EAAE,IAAI,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAkB9C"}
@@ -0,0 +1,18 @@
1
+ import type { ConfirmationPolicy, SensitiveConfirmContext } from '../types';
2
+ /**
3
+ * Irreversible / high-risk intents — confirmed once **before** the agent run.
4
+ * Ordinary list deletes are NOT sensitive.
5
+ */
6
+ export declare const DEFAULT_SENSITIVE_PATTERNS: RegExp[];
7
+ export declare function isSensitiveLabel(label: string | undefined, policy?: ConfirmationPolicy): boolean;
8
+ /** Goal looks like a high-risk operation → preflight confirm. */
9
+ export declare function isSensitiveGoal(goal: string, policy?: ConfirmationPolicy): boolean;
10
+ /**
11
+ * Mid-step gate (legacy). Prefer preflight; during unattended runs this should no-op.
12
+ */
13
+ export declare function runConfirmationGate(ctx: SensitiveConfirmContext, policy: ConfirmationPolicy | undefined, onConfirm?: (ctx: SensitiveConfirmContext) => Promise<boolean>): Promise<boolean>;
14
+ /**
15
+ * Ask once before the agent loop. Returns false if user declines.
16
+ */
17
+ export declare function runPreflightConfirm(goal: string, policy: ConfirmationPolicy | undefined, onConfirm?: (ctx: SensitiveConfirmContext) => Promise<boolean>): Promise<boolean>;
18
+ //# sourceMappingURL=gate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gate.d.ts","sourceRoot":"","sources":["../../../../src/confirmation/gate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAE5E;;;GAGG;AACH,eAAO,MAAM,0BAA0B,EAAE,MAAM,EAM9C,CAAC;AAEF,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,MAAM,CAAC,EAAE,kBAAkB,GAC1B,OAAO,CAMT;AAED,iEAAiE;AACjE,wBAAgB,eAAe,CAC7B,IAAI,EAAE,MAAM,EACZ,MAAM,CAAC,EAAE,kBAAkB,GAC1B,OAAO,CAET;AAED;;GAEG;AACH,wBAAsB,mBAAmB,CACvC,GAAG,EAAE,uBAAuB,EAC5B,MAAM,EAAE,kBAAkB,GAAG,SAAS,EACtC,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,uBAAuB,KAAK,OAAO,CAAC,OAAO,CAAC,GAC7D,OAAO,CAAC,OAAO,CAAC,CAiBlB;AAED;;GAEG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,kBAAkB,GAAG,SAAS,EACtC,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,uBAAuB,KAAK,OAAO,CAAC,OAAO,CAAC,GAC7D,OAAO,CAAC,OAAO,CAAC,CAelB"}
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ /**
3
+ * Native-looking mouse pointer while the agent acts.
4
+ *
5
+ * Uses KokoHostOverlay (FullWindowOverlay on iOS when available) so the
6
+ * cursor stays above react-native-screens Settings / stack modals.
7
+ *
8
+ * Only mount while the cursor is actually visible — an empty FullWindowOverlay
9
+ * stacked under KokoObserver can steal the top presentation and hide the
10
+ * progress pill during host.run-only assist paths.
11
+ */
12
+ export declare function CursorOverlay(): React.JSX.Element | null;
13
+ //# sourceMappingURL=CursorOverlay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CursorOverlay.d.ts","sourceRoot":"","sources":["../../../../src/cursor/CursorOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAW3D;;;;;;;;;GASG;AACH,wBAAgB,aAAa,6BAsG5B"}
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ /**
3
+ * The agent's pointer: a hand with the index finger extended.
4
+ *
5
+ * Drawn from views rather than an image. The SDK's assets sit outside the
6
+ * host's Metro project root, and a host that rewrites asset paths (monorepos
7
+ * commonly do) can leave the request unresolvable — the pointer then silently
8
+ * does not render, which is the one thing the user watches to know the agent
9
+ * is acting. Views cannot fail that way, and they stay sharp at any density.
10
+ *
11
+ * Two passes: dark shapes inflated to form the outline, then the white fill
12
+ * over them. Overlaps within a pass are invisible, so the union reads as one
13
+ * silhouette with no internal seams.
14
+ */
15
+ export declare function PointerHand(): React.JSX.Element;
16
+ //# sourceMappingURL=PointerHand.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PointerHand.d.ts","sourceRoot":"","sources":["../../../../src/cursor/PointerHand.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,sBAO1B"}
@@ -0,0 +1,30 @@
1
+ type CursorListener = (state: CursorState) => void;
2
+ export type CursorState = {
3
+ visible: boolean;
4
+ x: number;
5
+ y: number;
6
+ pressing: boolean;
7
+ /** How long the overlay should animate to (x, y). 0 = snap. */
8
+ moveDurationMs: number;
9
+ };
10
+ /**
11
+ * Imperative cursor controller used by KokoAgent; CursorOverlay subscribes.
12
+ */
13
+ declare class CursorControllerImpl {
14
+ private state;
15
+ private listeners;
16
+ subscribe(listener: CursorListener): () => void;
17
+ getState(): CursorState;
18
+ private emit;
19
+ showAt(x: number, y: number, moveDurationMs?: number): void;
20
+ hide(): void;
21
+ setPressing(pressing: boolean): void;
22
+ /**
23
+ * Start moving toward the target immediately, then resolve when the
24
+ * visual move should have finished — so tap happens after the cursor arrives.
25
+ */
26
+ moveTo(x: number, y: number, durationMs: number): Promise<void>;
27
+ }
28
+ export declare const CursorController: CursorControllerImpl;
29
+ export {};
30
+ //# sourceMappingURL=controller.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../../../src/cursor/controller.ts"],"names":[],"mappings":"AAAA,KAAK,cAAc,GAAG,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;AAEnD,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,OAAO,CAAC;IAClB,+DAA+D;IAC/D,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAUF;;GAEG;AACH,cAAM,oBAAoB;IACxB,OAAO,CAAC,KAAK,CAA+B;IAC5C,OAAO,CAAC,SAAS,CAA6B;IAE9C,SAAS,CAAC,QAAQ,EAAE,cAAc,GAAG,MAAM,IAAI;IAM/C,QAAQ,IAAI,WAAW;IAIvB,OAAO,CAAC,IAAI;IAIZ,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,cAAc,SAAI;IAW/C,IAAI;IAKJ,WAAW,CAAC,QAAQ,EAAE,OAAO;IAK7B;;;OAGG;IACG,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CA0BtE;AAMD,eAAO,MAAM,gBAAgB,sBAA6B,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Geometry for the agent's on-screen pointer.
3
+ *
4
+ * Two overlays draw it (KokoObserver when the progress chrome is mounted,
5
+ * CursorOverlay otherwise), so this lives in one place: a hotspot that
6
+ * disagreed between them would put the pointer somewhere the tap did not go.
7
+ */
8
+ /** Keep the grid ratio so the drawing is not squashed. */
9
+ export declare const CURSOR_W = 26;
10
+ export declare const CURSOR_H: number;
11
+ /** Points per grid unit. */
12
+ export declare const HAND_UNIT: number;
13
+ /** Outline weight, in grid units. */
14
+ export declare const HAND_STROKE = 1.6;
15
+ /**
16
+ * The hand as a union of rounded bars: `[x, y, width, height, radius]` in grid
17
+ * units. Order is back to front, though within a layer it does not matter.
18
+ */
19
+ export declare const HAND_SHAPES: ReadonlyArray<readonly [number, number, number, number, number]>;
20
+ /** The index fingertip — this is what lands on the tap coordinate. */
21
+ export declare const CURSOR_TIP_X: number;
22
+ export declare const CURSOR_TIP_Y: number;
23
+ //# sourceMappingURL=pointer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pointer.d.ts","sourceRoot":"","sources":["../../../../src/cursor/pointer.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,0DAA0D;AAC1D,eAAO,MAAM,QAAQ,KAAK,CAAC;AAC3B,eAAO,MAAM,QAAQ,QAA2C,CAAC;AAEjE,4BAA4B;AAC5B,eAAO,MAAM,SAAS,QAAoB,CAAC;AAE3C,qCAAqC;AACrC,eAAO,MAAM,WAAW,MAAM,CAAC;AAE/B;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,aAAa,CACrC,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAQlD,CAAC;AAEF,sEAAsE;AACtE,eAAO,MAAM,YAAY,QAAmB,CAAC;AAC7C,eAAO,MAAM,YAAY,QAAkB,CAAC"}