@xenosystem/agent-interface-host 0.1.3

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 (482) hide show
  1. package/LICENSE +67 -0
  2. package/dist/acp/AcpAgentRegistryService.d.ts +77 -0
  3. package/dist/acp/AcpAgentRegistryService.d.ts.map +1 -0
  4. package/dist/acp/AcpAgentRegistryService.js +754 -0
  5. package/dist/acp/AcpAgentRegistryService.js.map +1 -0
  6. package/dist/acp/AcpAgentTurnExecutionAdapter.d.ts +56 -0
  7. package/dist/acp/AcpAgentTurnExecutionAdapter.d.ts.map +1 -0
  8. package/dist/acp/AcpAgentTurnExecutionAdapter.js +323 -0
  9. package/dist/acp/AcpAgentTurnExecutionAdapter.js.map +1 -0
  10. package/dist/acp/AcpApprovalPortAdapter.d.ts +41 -0
  11. package/dist/acp/AcpApprovalPortAdapter.d.ts.map +1 -0
  12. package/dist/acp/AcpApprovalPortAdapter.js +82 -0
  13. package/dist/acp/AcpApprovalPortAdapter.js.map +1 -0
  14. package/dist/acp/AcpCoordinationBridge.d.ts +13 -0
  15. package/dist/acp/AcpCoordinationBridge.d.ts.map +1 -0
  16. package/dist/acp/AcpCoordinationBridge.js +13 -0
  17. package/dist/acp/AcpCoordinationBridge.js.map +1 -0
  18. package/dist/acp/AcpDiagnosticsService.d.ts +61 -0
  19. package/dist/acp/AcpDiagnosticsService.d.ts.map +1 -0
  20. package/dist/acp/AcpDiagnosticsService.js +203 -0
  21. package/dist/acp/AcpDiagnosticsService.js.map +1 -0
  22. package/dist/acp/AcpExternalCertificationHarness.d.ts +47 -0
  23. package/dist/acp/AcpExternalCertificationHarness.d.ts.map +1 -0
  24. package/dist/acp/AcpExternalCertificationHarness.js +176 -0
  25. package/dist/acp/AcpExternalCertificationHarness.js.map +1 -0
  26. package/dist/acp/AcpHostBridge.d.ts +81 -0
  27. package/dist/acp/AcpHostBridge.d.ts.map +1 -0
  28. package/dist/acp/AcpHostBridge.js +101 -0
  29. package/dist/acp/AcpHostBridge.js.map +1 -0
  30. package/dist/acp/AcpInteractivePermissionBridge.d.ts +77 -0
  31. package/dist/acp/AcpInteractivePermissionBridge.d.ts.map +1 -0
  32. package/dist/acp/AcpInteractivePermissionBridge.js +127 -0
  33. package/dist/acp/AcpInteractivePermissionBridge.js.map +1 -0
  34. package/dist/acp/AcpPermissionBridge.d.ts +19 -0
  35. package/dist/acp/AcpPermissionBridge.d.ts.map +1 -0
  36. package/dist/acp/AcpPermissionBridge.js +110 -0
  37. package/dist/acp/AcpPermissionBridge.js.map +1 -0
  38. package/dist/acp/AcpPermissionPolicy.d.ts +111 -0
  39. package/dist/acp/AcpPermissionPolicy.d.ts.map +1 -0
  40. package/dist/acp/AcpPermissionPolicy.js +167 -0
  41. package/dist/acp/AcpPermissionPolicy.js.map +1 -0
  42. package/dist/acp/AcpProcessSupervisor.d.ts +134 -0
  43. package/dist/acp/AcpProcessSupervisor.d.ts.map +1 -0
  44. package/dist/acp/AcpProcessSupervisor.js +674 -0
  45. package/dist/acp/AcpProcessSupervisor.js.map +1 -0
  46. package/dist/acp/AcpProviderApprovalService.d.ts +27 -0
  47. package/dist/acp/AcpProviderApprovalService.d.ts.map +1 -0
  48. package/dist/acp/AcpProviderApprovalService.js +128 -0
  49. package/dist/acp/AcpProviderApprovalService.js.map +1 -0
  50. package/dist/acp/AcpProviderCatalogService.d.ts +69 -0
  51. package/dist/acp/AcpProviderCatalogService.d.ts.map +1 -0
  52. package/dist/acp/AcpProviderCatalogService.js +707 -0
  53. package/dist/acp/AcpProviderCatalogService.js.map +1 -0
  54. package/dist/acp/AcpProviderModelService.d.ts +6 -0
  55. package/dist/acp/AcpProviderModelService.d.ts.map +1 -0
  56. package/dist/acp/AcpProviderModelService.js +274 -0
  57. package/dist/acp/AcpProviderModelService.js.map +1 -0
  58. package/dist/acp/AcpProviderVersionReadiness.d.ts +6 -0
  59. package/dist/acp/AcpProviderVersionReadiness.d.ts.map +1 -0
  60. package/dist/acp/AcpProviderVersionReadiness.js +100 -0
  61. package/dist/acp/AcpProviderVersionReadiness.js.map +1 -0
  62. package/dist/acp/AcpRuntimeEventMapper.d.ts +16 -0
  63. package/dist/acp/AcpRuntimeEventMapper.d.ts.map +1 -0
  64. package/dist/acp/AcpRuntimeEventMapper.js +326 -0
  65. package/dist/acp/AcpRuntimeEventMapper.js.map +1 -0
  66. package/dist/acp/AcpSessionService.d.ts +65 -0
  67. package/dist/acp/AcpSessionService.d.ts.map +1 -0
  68. package/dist/acp/AcpSessionService.js +931 -0
  69. package/dist/acp/AcpSessionService.js.map +1 -0
  70. package/dist/acp/DurableAcpPermissionPolicyStore.d.ts +25 -0
  71. package/dist/acp/DurableAcpPermissionPolicyStore.d.ts.map +1 -0
  72. package/dist/acp/DurableAcpPermissionPolicyStore.js +100 -0
  73. package/dist/acp/DurableAcpPermissionPolicyStore.js.map +1 -0
  74. package/dist/acp/acpCommandSafety.d.ts +63 -0
  75. package/dist/acp/acpCommandSafety.d.ts.map +1 -0
  76. package/dist/acp/acpCommandSafety.js +90 -0
  77. package/dist/acp/acpCommandSafety.js.map +1 -0
  78. package/dist/acp/acpErrors.d.ts +47 -0
  79. package/dist/acp/acpErrors.d.ts.map +1 -0
  80. package/dist/acp/acpErrors.js +93 -0
  81. package/dist/acp/acpErrors.js.map +1 -0
  82. package/dist/acp/acpRedaction.d.ts +9 -0
  83. package/dist/acp/acpRedaction.d.ts.map +1 -0
  84. package/dist/acp/acpRedaction.js +69 -0
  85. package/dist/acp/acpRedaction.js.map +1 -0
  86. package/dist/acp/acpSessionResume.d.ts +8 -0
  87. package/dist/acp/acpSessionResume.d.ts.map +1 -0
  88. package/dist/acp/acpSessionResume.js +31 -0
  89. package/dist/acp/acpSessionResume.js.map +1 -0
  90. package/dist/acp/acpTypes.d.ts +467 -0
  91. package/dist/acp/acpTypes.d.ts.map +1 -0
  92. package/dist/acp/acpTypes.js +2 -0
  93. package/dist/acp/acpTypes.js.map +1 -0
  94. package/dist/agent/chooseDirectoryBridge.d.ts +29 -0
  95. package/dist/agent/chooseDirectoryBridge.d.ts.map +1 -0
  96. package/dist/agent/chooseDirectoryBridge.js +116 -0
  97. package/dist/agent/chooseDirectoryBridge.js.map +1 -0
  98. package/dist/agent/permissionProfiles.d.ts +29 -0
  99. package/dist/agent/permissionProfiles.d.ts.map +1 -0
  100. package/dist/agent/permissionProfiles.js +107 -0
  101. package/dist/agent/permissionProfiles.js.map +1 -0
  102. package/dist/agent/runtimeAuthorityPrompt.d.ts +13 -0
  103. package/dist/agent/runtimeAuthorityPrompt.d.ts.map +1 -0
  104. package/dist/agent/runtimeAuthorityPrompt.js +45 -0
  105. package/dist/agent/runtimeAuthorityPrompt.js.map +1 -0
  106. package/dist/agent/runtimeModeOutputGuard.d.ts +6 -0
  107. package/dist/agent/runtimeModeOutputGuard.d.ts.map +1 -0
  108. package/dist/agent/runtimeModeOutputGuard.js +40 -0
  109. package/dist/agent/runtimeModeOutputGuard.js.map +1 -0
  110. package/dist/agent/workspacePlacementBridge.d.ts +29 -0
  111. package/dist/agent/workspacePlacementBridge.d.ts.map +1 -0
  112. package/dist/agent/workspacePlacementBridge.js +143 -0
  113. package/dist/agent/workspacePlacementBridge.js.map +1 -0
  114. package/dist/agentSearch/AgentSearchService.d.ts +81 -0
  115. package/dist/agentSearch/AgentSearchService.d.ts.map +1 -0
  116. package/dist/agentSearch/AgentSearchService.js +1038 -0
  117. package/dist/agentSearch/AgentSearchService.js.map +1 -0
  118. package/dist/agentSearch/JsonInvertedIndexAdapter.d.ts +44 -0
  119. package/dist/agentSearch/JsonInvertedIndexAdapter.d.ts.map +1 -0
  120. package/dist/agentSearch/JsonInvertedIndexAdapter.js +307 -0
  121. package/dist/agentSearch/JsonInvertedIndexAdapter.js.map +1 -0
  122. package/dist/agentSearch/SearchIndexAdapter.d.ts +33 -0
  123. package/dist/agentSearch/SearchIndexAdapter.d.ts.map +1 -0
  124. package/dist/agentSearch/SearchIndexAdapter.js +2 -0
  125. package/dist/agentSearch/SearchIndexAdapter.js.map +1 -0
  126. package/dist/agentSearch/SearchSourceWatcher.d.ts +29 -0
  127. package/dist/agentSearch/SearchSourceWatcher.d.ts.map +1 -0
  128. package/dist/agentSearch/SearchSourceWatcher.js +150 -0
  129. package/dist/agentSearch/SearchSourceWatcher.js.map +1 -0
  130. package/dist/agentSearch/SqliteFtsIndexAdapter.d.ts +58 -0
  131. package/dist/agentSearch/SqliteFtsIndexAdapter.d.ts.map +1 -0
  132. package/dist/agentSearch/SqliteFtsIndexAdapter.js +420 -0
  133. package/dist/agentSearch/SqliteFtsIndexAdapter.js.map +1 -0
  134. package/dist/agentSearch/conversationIndexer.d.ts +69 -0
  135. package/dist/agentSearch/conversationIndexer.d.ts.map +1 -0
  136. package/dist/agentSearch/conversationIndexer.js +313 -0
  137. package/dist/agentSearch/conversationIndexer.js.map +1 -0
  138. package/dist/agentSearch/searchTypes.d.ts +264 -0
  139. package/dist/agentSearch/searchTypes.d.ts.map +1 -0
  140. package/dist/agentSearch/searchTypes.js +2 -0
  141. package/dist/agentSearch/searchTypes.js.map +1 -0
  142. package/dist/agentSearch/searchUtils.d.ts +12 -0
  143. package/dist/agentSearch/searchUtils.d.ts.map +1 -0
  144. package/dist/agentSearch/searchUtils.js +125 -0
  145. package/dist/agentSearch/searchUtils.js.map +1 -0
  146. package/dist/agentSearch/workspaceMetadataIndexer.d.ts +3 -0
  147. package/dist/agentSearch/workspaceMetadataIndexer.d.ts.map +1 -0
  148. package/dist/agentSearch/workspaceMetadataIndexer.js +125 -0
  149. package/dist/agentSearch/workspaceMetadataIndexer.js.map +1 -0
  150. package/dist/cli/CliControlPlaneService.d.ts +269 -0
  151. package/dist/cli/CliControlPlaneService.d.ts.map +1 -0
  152. package/dist/cli/CliControlPlaneService.js +1874 -0
  153. package/dist/cli/CliControlPlaneService.js.map +1 -0
  154. package/dist/cloud/XenoCloudAgentTurnExecutionAdapter.d.ts +91 -0
  155. package/dist/cloud/XenoCloudAgentTurnExecutionAdapter.d.ts.map +1 -0
  156. package/dist/cloud/XenoCloudAgentTurnExecutionAdapter.js +379 -0
  157. package/dist/cloud/XenoCloudAgentTurnExecutionAdapter.js.map +1 -0
  158. package/dist/codebase/CodebaseIntelligenceService.d.ts +68 -0
  159. package/dist/codebase/CodebaseIntelligenceService.d.ts.map +1 -0
  160. package/dist/codebase/CodebaseIntelligenceService.js +1717 -0
  161. package/dist/codebase/CodebaseIntelligenceService.js.map +1 -0
  162. package/dist/codebase/LanguageServerProcessManager.d.ts +85 -0
  163. package/dist/codebase/LanguageServerProcessManager.d.ts.map +1 -0
  164. package/dist/codebase/LanguageServerProcessManager.js +607 -0
  165. package/dist/codebase/LanguageServerProcessManager.js.map +1 -0
  166. package/dist/codebase/codeTypes.d.ts +485 -0
  167. package/dist/codebase/codeTypes.d.ts.map +1 -0
  168. package/dist/codebase/codeTypes.js +2 -0
  169. package/dist/codebase/codeTypes.js.map +1 -0
  170. package/dist/codebase/codeUtils.d.ts +24 -0
  171. package/dist/codebase/codeUtils.d.ts.map +1 -0
  172. package/dist/codebase/codeUtils.js +177 -0
  173. package/dist/codebase/codeUtils.js.map +1 -0
  174. package/dist/codebase/contextPacks.d.ts +18 -0
  175. package/dist/codebase/contextPacks.d.ts.map +1 -0
  176. package/dist/codebase/contextPacks.js +180 -0
  177. package/dist/codebase/contextPacks.js.map +1 -0
  178. package/dist/codebase/dependencyGraph.d.ts +3 -0
  179. package/dist/codebase/dependencyGraph.d.ts.map +1 -0
  180. package/dist/codebase/dependencyGraph.js +209 -0
  181. package/dist/codebase/dependencyGraph.js.map +1 -0
  182. package/dist/codebase/fileIndexer.d.ts +27 -0
  183. package/dist/codebase/fileIndexer.d.ts.map +1 -0
  184. package/dist/codebase/fileIndexer.js +167 -0
  185. package/dist/codebase/fileIndexer.js.map +1 -0
  186. package/dist/codebase/symbolIndexer.d.ts +3 -0
  187. package/dist/codebase/symbolIndexer.d.ts.map +1 -0
  188. package/dist/codebase/symbolIndexer.js +184 -0
  189. package/dist/codebase/symbolIndexer.js.map +1 -0
  190. package/dist/codebase/whatChanged.d.ts +4 -0
  191. package/dist/codebase/whatChanged.d.ts.map +1 -0
  192. package/dist/codebase/whatChanged.js +138 -0
  193. package/dist/codebase/whatChanged.js.map +1 -0
  194. package/dist/coordination/CoordinationService.d.ts +166 -0
  195. package/dist/coordination/CoordinationService.d.ts.map +1 -0
  196. package/dist/coordination/CoordinationService.js +247 -0
  197. package/dist/coordination/CoordinationService.js.map +1 -0
  198. package/dist/coordination/claims.d.ts +122 -0
  199. package/dist/coordination/claims.d.ts.map +1 -0
  200. package/dist/coordination/claims.js +196 -0
  201. package/dist/coordination/claims.js.map +1 -0
  202. package/dist/coordination/coordinationTools.d.ts +40 -0
  203. package/dist/coordination/coordinationTools.d.ts.map +1 -0
  204. package/dist/coordination/coordinationTools.js +92 -0
  205. package/dist/coordination/coordinationTools.js.map +1 -0
  206. package/dist/coordination/laneBridge.d.ts +84 -0
  207. package/dist/coordination/laneBridge.d.ts.map +1 -0
  208. package/dist/coordination/laneBridge.js +86 -0
  209. package/dist/coordination/laneBridge.js.map +1 -0
  210. package/dist/coordination/messages.d.ts +225 -0
  211. package/dist/coordination/messages.d.ts.map +1 -0
  212. package/dist/coordination/messages.js +335 -0
  213. package/dist/coordination/messages.js.map +1 -0
  214. package/dist/coordination/permissionWaitRegistry.d.ts +32 -0
  215. package/dist/coordination/permissionWaitRegistry.d.ts.map +1 -0
  216. package/dist/coordination/permissionWaitRegistry.js +59 -0
  217. package/dist/coordination/permissionWaitRegistry.js.map +1 -0
  218. package/dist/coordination/query.d.ts +187 -0
  219. package/dist/coordination/query.d.ts.map +1 -0
  220. package/dist/coordination/query.js +138 -0
  221. package/dist/coordination/query.js.map +1 -0
  222. package/dist/coordination/renderInbox.d.ts +15 -0
  223. package/dist/coordination/renderInbox.d.ts.map +1 -0
  224. package/dist/coordination/renderInbox.js +19 -0
  225. package/dist/coordination/renderInbox.js.map +1 -0
  226. package/dist/coordination/runtimeEvents.d.ts +53 -0
  227. package/dist/coordination/runtimeEvents.d.ts.map +1 -0
  228. package/dist/coordination/runtimeEvents.js +112 -0
  229. package/dist/coordination/runtimeEvents.js.map +1 -0
  230. package/dist/detachedHostService.d.ts +77 -0
  231. package/dist/detachedHostService.d.ts.map +1 -0
  232. package/dist/detachedHostService.js +66 -0
  233. package/dist/detachedHostService.js.map +1 -0
  234. package/dist/detachedHostSupervisor.d.ts +102 -0
  235. package/dist/detachedHostSupervisor.d.ts.map +1 -0
  236. package/dist/detachedHostSupervisor.js +168 -0
  237. package/dist/detachedHostSupervisor.js.map +1 -0
  238. package/dist/durableRuntimeEventStore.d.ts +49 -0
  239. package/dist/durableRuntimeEventStore.d.ts.map +1 -0
  240. package/dist/durableRuntimeEventStore.js +364 -0
  241. package/dist/durableRuntimeEventStore.js.map +1 -0
  242. package/dist/engineering/EngineeringWorkbenchService.d.ts +142 -0
  243. package/dist/engineering/EngineeringWorkbenchService.d.ts.map +1 -0
  244. package/dist/engineering/EngineeringWorkbenchService.js +2301 -0
  245. package/dist/engineering/EngineeringWorkbenchService.js.map +1 -0
  246. package/dist/engineering/LandingService.d.ts +112 -0
  247. package/dist/engineering/LandingService.d.ts.map +1 -0
  248. package/dist/engineering/LandingService.js +239 -0
  249. package/dist/engineering/LandingService.js.map +1 -0
  250. package/dist/engineering/engineeringTypes.d.ts +2 -0
  251. package/dist/engineering/engineeringTypes.d.ts.map +1 -0
  252. package/dist/engineering/engineeringTypes.js +2 -0
  253. package/dist/engineering/engineeringTypes.js.map +1 -0
  254. package/dist/engineering/patchReview.d.ts +11 -0
  255. package/dist/engineering/patchReview.d.ts.map +1 -0
  256. package/dist/engineering/patchReview.js +174 -0
  257. package/dist/engineering/patchReview.js.map +1 -0
  258. package/dist/index.d.ts +834 -0
  259. package/dist/index.d.ts.map +1 -0
  260. package/dist/index.js +3242 -0
  261. package/dist/index.js.map +1 -0
  262. package/dist/intake/IntakeService.d.ts +84 -0
  263. package/dist/intake/IntakeService.d.ts.map +1 -0
  264. package/dist/intake/IntakeService.js +117 -0
  265. package/dist/intake/IntakeService.js.map +1 -0
  266. package/dist/intake/RepositoryTodoIntakeSource.d.ts +72 -0
  267. package/dist/intake/RepositoryTodoIntakeSource.d.ts.map +1 -0
  268. package/dist/intake/RepositoryTodoIntakeSource.js +168 -0
  269. package/dist/intake/RepositoryTodoIntakeSource.js.map +1 -0
  270. package/dist/intake/WorkspaceTodoIntakeSource.d.ts +53 -0
  271. package/dist/intake/WorkspaceTodoIntakeSource.d.ts.map +1 -0
  272. package/dist/intake/WorkspaceTodoIntakeSource.js +81 -0
  273. package/dist/intake/WorkspaceTodoIntakeSource.js.map +1 -0
  274. package/dist/isolation/CommandExecution.d.ts +132 -0
  275. package/dist/isolation/CommandExecution.d.ts.map +1 -0
  276. package/dist/isolation/CommandExecution.js +48 -0
  277. package/dist/isolation/CommandExecution.js.map +1 -0
  278. package/dist/isolation/LocalCommandExecutor.d.ts +27 -0
  279. package/dist/isolation/LocalCommandExecutor.d.ts.map +1 -0
  280. package/dist/isolation/LocalCommandExecutor.js +97 -0
  281. package/dist/isolation/LocalCommandExecutor.js.map +1 -0
  282. package/dist/isolation/RunExecutionEnvironment.d.ts +135 -0
  283. package/dist/isolation/RunExecutionEnvironment.d.ts.map +1 -0
  284. package/dist/isolation/RunExecutionEnvironment.js +206 -0
  285. package/dist/isolation/RunExecutionEnvironment.js.map +1 -0
  286. package/dist/isolation/RunIsolationService.d.ts +90 -0
  287. package/dist/isolation/RunIsolationService.d.ts.map +1 -0
  288. package/dist/isolation/RunIsolationService.js +86 -0
  289. package/dist/isolation/RunIsolationService.js.map +1 -0
  290. package/dist/isolation/SandboxCommandExecutor.d.ts +93 -0
  291. package/dist/isolation/SandboxCommandExecutor.d.ts.map +1 -0
  292. package/dist/isolation/SandboxCommandExecutor.js +189 -0
  293. package/dist/isolation/SandboxCommandExecutor.js.map +1 -0
  294. package/dist/knowledge/WorkspaceKnowledgeService.d.ts +71 -0
  295. package/dist/knowledge/WorkspaceKnowledgeService.d.ts.map +1 -0
  296. package/dist/knowledge/WorkspaceKnowledgeService.js +103 -0
  297. package/dist/knowledge/WorkspaceKnowledgeService.js.map +1 -0
  298. package/dist/localHostAuthority.d.ts +24 -0
  299. package/dist/localHostAuthority.d.ts.map +1 -0
  300. package/dist/localHostAuthority.js +87 -0
  301. package/dist/localHostAuthority.js.map +1 -0
  302. package/dist/localHostLease.d.ts +51 -0
  303. package/dist/localHostLease.d.ts.map +1 -0
  304. package/dist/localHostLease.js +167 -0
  305. package/dist/localHostLease.js.map +1 -0
  306. package/dist/localHostPaths.d.ts +30 -0
  307. package/dist/localHostPaths.d.ts.map +1 -0
  308. package/dist/localHostPaths.js +60 -0
  309. package/dist/localHostPaths.js.map +1 -0
  310. package/dist/localRpcTransport.d.ts +21 -0
  311. package/dist/localRpcTransport.d.ts.map +1 -0
  312. package/dist/localRpcTransport.js +423 -0
  313. package/dist/localRpcTransport.js.map +1 -0
  314. package/dist/node.d.ts +104 -0
  315. package/dist/node.d.ts.map +1 -0
  316. package/dist/node.js +103 -0
  317. package/dist/node.js.map +1 -0
  318. package/dist/observation/DirectoryBaselineScanner.d.ts +44 -0
  319. package/dist/observation/DirectoryBaselineScanner.d.ts.map +1 -0
  320. package/dist/observation/DirectoryBaselineScanner.js +112 -0
  321. package/dist/observation/DirectoryBaselineScanner.js.map +1 -0
  322. package/dist/observation/MountContentReader.d.ts +63 -0
  323. package/dist/observation/MountContentReader.d.ts.map +1 -0
  324. package/dist/observation/MountContentReader.js +158 -0
  325. package/dist/observation/MountContentReader.js.map +1 -0
  326. package/dist/observation/RunObservationService.d.ts +229 -0
  327. package/dist/observation/RunObservationService.d.ts.map +1 -0
  328. package/dist/observation/RunObservationService.js +248 -0
  329. package/dist/observation/RunObservationService.js.map +1 -0
  330. package/dist/observation/XenoUseObservationSource.d.ts +42 -0
  331. package/dist/observation/XenoUseObservationSource.d.ts.map +1 -0
  332. package/dist/observation/XenoUseObservationSource.js +104 -0
  333. package/dist/observation/XenoUseObservationSource.js.map +1 -0
  334. package/dist/observation/XenoUseRunObserver.d.ts +140 -0
  335. package/dist/observation/XenoUseRunObserver.d.ts.map +1 -0
  336. package/dist/observation/XenoUseRunObserver.js +256 -0
  337. package/dist/observation/XenoUseRunObserver.js.map +1 -0
  338. package/dist/pluginMcp/PluginMcpManagerService.d.ts +141 -0
  339. package/dist/pluginMcp/PluginMcpManagerService.d.ts.map +1 -0
  340. package/dist/pluginMcp/PluginMcpManagerService.js +1821 -0
  341. package/dist/pluginMcp/PluginMcpManagerService.js.map +1 -0
  342. package/dist/pluginMcp/pluginMcpTypes.d.ts +349 -0
  343. package/dist/pluginMcp/pluginMcpTypes.d.ts.map +1 -0
  344. package/dist/pluginMcp/pluginMcpTypes.js +2 -0
  345. package/dist/pluginMcp/pluginMcpTypes.js.map +1 -0
  346. package/dist/policy/WorkspacePolicyService.d.ts +83 -0
  347. package/dist/policy/WorkspacePolicyService.d.ts.map +1 -0
  348. package/dist/policy/WorkspacePolicyService.js +809 -0
  349. package/dist/policy/WorkspacePolicyService.js.map +1 -0
  350. package/dist/policy/policyGuard.d.ts +27 -0
  351. package/dist/policy/policyGuard.d.ts.map +1 -0
  352. package/dist/policy/policyGuard.js +143 -0
  353. package/dist/policy/policyGuard.js.map +1 -0
  354. package/dist/policy/policyTypes.d.ts +190 -0
  355. package/dist/policy/policyTypes.d.ts.map +1 -0
  356. package/dist/policy/policyTypes.js +2 -0
  357. package/dist/policy/policyTypes.js.map +1 -0
  358. package/dist/runtime/RuntimeEventStore.d.ts +42 -0
  359. package/dist/runtime/RuntimeEventStore.d.ts.map +1 -0
  360. package/dist/runtime/RuntimeEventStore.js +412 -0
  361. package/dist/runtime/RuntimeEventStore.js.map +1 -0
  362. package/dist/runtime/RuntimeEventStoreRepositoryAdapter.d.ts +21 -0
  363. package/dist/runtime/RuntimeEventStoreRepositoryAdapter.d.ts.map +1 -0
  364. package/dist/runtime/RuntimeEventStoreRepositoryAdapter.js +41 -0
  365. package/dist/runtime/RuntimeEventStoreRepositoryAdapter.js.map +1 -0
  366. package/dist/runtime/RuntimeTimelineProjection.d.ts +5 -0
  367. package/dist/runtime/RuntimeTimelineProjection.d.ts.map +1 -0
  368. package/dist/runtime/RuntimeTimelineProjection.js +705 -0
  369. package/dist/runtime/RuntimeTimelineProjection.js.map +1 -0
  370. package/dist/runtime/runtimeEventTypes.d.ts +73 -0
  371. package/dist/runtime/runtimeEventTypes.d.ts.map +1 -0
  372. package/dist/runtime/runtimeEventTypes.js +2 -0
  373. package/dist/runtime/runtimeEventTypes.js.map +1 -0
  374. package/dist/sdk/SdkNativeAgentTurnExecutionAdapter.d.ts +117 -0
  375. package/dist/sdk/SdkNativeAgentTurnExecutionAdapter.d.ts.map +1 -0
  376. package/dist/sdk/SdkNativeAgentTurnExecutionAdapter.js +214 -0
  377. package/dist/sdk/SdkNativeAgentTurnExecutionAdapter.js.map +1 -0
  378. package/dist/session/AgentSessionService.d.ts +285 -0
  379. package/dist/session/AgentSessionService.d.ts.map +1 -0
  380. package/dist/session/AgentSessionService.js +444 -0
  381. package/dist/session/AgentSessionService.js.map +1 -0
  382. package/dist/session/bufferedSessionPty.d.ts +27 -0
  383. package/dist/session/bufferedSessionPty.d.ts.map +1 -0
  384. package/dist/session/bufferedSessionPty.js +49 -0
  385. package/dist/session/bufferedSessionPty.js.map +1 -0
  386. package/dist/session/renderSupport.d.ts +53 -0
  387. package/dist/session/renderSupport.d.ts.map +1 -0
  388. package/dist/session/renderSupport.js +41 -0
  389. package/dist/session/renderSupport.js.map +1 -0
  390. package/dist/session/runtimeEventChannel.d.ts +56 -0
  391. package/dist/session/runtimeEventChannel.d.ts.map +1 -0
  392. package/dist/session/runtimeEventChannel.js +53 -0
  393. package/dist/session/runtimeEventChannel.js.map +1 -0
  394. package/dist/state/JsonAgentStateRepository.d.ts +29 -0
  395. package/dist/state/JsonAgentStateRepository.d.ts.map +1 -0
  396. package/dist/state/JsonAgentStateRepository.js +165 -0
  397. package/dist/state/JsonAgentStateRepository.js.map +1 -0
  398. package/dist/state/SqliteAgentStateRepository.d.ts +58 -0
  399. package/dist/state/SqliteAgentStateRepository.d.ts.map +1 -0
  400. package/dist/state/SqliteAgentStateRepository.js +777 -0
  401. package/dist/state/SqliteAgentStateRepository.js.map +1 -0
  402. package/dist/state/createAgentStateRepository.d.ts +4 -0
  403. package/dist/state/createAgentStateRepository.d.ts.map +1 -0
  404. package/dist/state/createAgentStateRepository.js +12 -0
  405. package/dist/state/createAgentStateRepository.js.map +1 -0
  406. package/dist/state/stateSanitizers.d.ts +7 -0
  407. package/dist/state/stateSanitizers.d.ts.map +1 -0
  408. package/dist/state/stateSanitizers.js +87 -0
  409. package/dist/state/stateSanitizers.js.map +1 -0
  410. package/dist/subagents/AcpSubagentExecutionAdapter.d.ts +12 -0
  411. package/dist/subagents/AcpSubagentExecutionAdapter.d.ts.map +1 -0
  412. package/dist/subagents/AcpSubagentExecutionAdapter.js +119 -0
  413. package/dist/subagents/AcpSubagentExecutionAdapter.js.map +1 -0
  414. package/dist/subagents/CliSubagentExecutionAdapter.d.ts +13 -0
  415. package/dist/subagents/CliSubagentExecutionAdapter.d.ts.map +1 -0
  416. package/dist/subagents/CliSubagentExecutionAdapter.js +217 -0
  417. package/dist/subagents/CliSubagentExecutionAdapter.js.map +1 -0
  418. package/dist/subagents/HostTurnSubagentExecutionAdapter.d.ts +78 -0
  419. package/dist/subagents/HostTurnSubagentExecutionAdapter.d.ts.map +1 -0
  420. package/dist/subagents/HostTurnSubagentExecutionAdapter.js +160 -0
  421. package/dist/subagents/HostTurnSubagentExecutionAdapter.js.map +1 -0
  422. package/dist/subagents/SubagentRunService.d.ts +103 -0
  423. package/dist/subagents/SubagentRunService.d.ts.map +1 -0
  424. package/dist/subagents/SubagentRunService.js +1183 -0
  425. package/dist/subagents/SubagentRunService.js.map +1 -0
  426. package/dist/subagents/SubagentScheduler.d.ts +167 -0
  427. package/dist/subagents/SubagentScheduler.d.ts.map +1 -0
  428. package/dist/subagents/SubagentScheduler.js +530 -0
  429. package/dist/subagents/SubagentScheduler.js.map +1 -0
  430. package/dist/subagents/TeamAgentRouter.d.ts +104 -0
  431. package/dist/subagents/TeamAgentRouter.d.ts.map +1 -0
  432. package/dist/subagents/TeamAgentRouter.js +435 -0
  433. package/dist/subagents/TeamAgentRouter.js.map +1 -0
  434. package/dist/subagents/capabilityMatcher.d.ts +3 -0
  435. package/dist/subagents/capabilityMatcher.d.ts.map +1 -0
  436. package/dist/subagents/capabilityMatcher.js +127 -0
  437. package/dist/subagents/capabilityMatcher.js.map +1 -0
  438. package/dist/subagents/subagentRunPort.d.ts +43 -0
  439. package/dist/subagents/subagentRunPort.d.ts.map +1 -0
  440. package/dist/subagents/subagentRunPort.js +24 -0
  441. package/dist/subagents/subagentRunPort.js.map +1 -0
  442. package/dist/subagents/subagentTypes.d.ts +330 -0
  443. package/dist/subagents/subagentTypes.d.ts.map +1 -0
  444. package/dist/subagents/subagentTypes.js +2 -0
  445. package/dist/subagents/subagentTypes.js.map +1 -0
  446. package/dist/subagents/subagentWorkspaceAuthority.d.ts +29 -0
  447. package/dist/subagents/subagentWorkspaceAuthority.d.ts.map +1 -0
  448. package/dist/subagents/subagentWorkspaceAuthority.js +173 -0
  449. package/dist/subagents/subagentWorkspaceAuthority.js.map +1 -0
  450. package/dist/support/SupportDiagnosticsService.d.ts +87 -0
  451. package/dist/support/SupportDiagnosticsService.d.ts.map +1 -0
  452. package/dist/support/SupportDiagnosticsService.js +1199 -0
  453. package/dist/support/SupportDiagnosticsService.js.map +1 -0
  454. package/dist/turns/DurableInterruptedTurnStore.d.ts +14 -0
  455. package/dist/turns/DurableInterruptedTurnStore.d.ts.map +1 -0
  456. package/dist/turns/DurableInterruptedTurnStore.js +63 -0
  457. package/dist/turns/DurableInterruptedTurnStore.js.map +1 -0
  458. package/dist/turns/interruptedTurns.d.ts +50 -0
  459. package/dist/turns/interruptedTurns.d.ts.map +1 -0
  460. package/dist/turns/interruptedTurns.js +54 -0
  461. package/dist/turns/interruptedTurns.js.map +1 -0
  462. package/dist/turns/turnAdmission.d.ts +113 -0
  463. package/dist/turns/turnAdmission.d.ts.map +1 -0
  464. package/dist/turns/turnAdmission.js +136 -0
  465. package/dist/turns/turnAdmission.js.map +1 -0
  466. package/dist/workspace/WorkspaceHostService.d.ts +126 -0
  467. package/dist/workspace/WorkspaceHostService.d.ts.map +1 -0
  468. package/dist/workspace/WorkspaceHostService.js +841 -0
  469. package/dist/workspace/WorkspaceHostService.js.map +1 -0
  470. package/dist/workspace/WorkspaceShellService.d.ts +71 -0
  471. package/dist/workspace/WorkspaceShellService.d.ts.map +1 -0
  472. package/dist/workspace/WorkspaceShellService.js +273 -0
  473. package/dist/workspace/WorkspaceShellService.js.map +1 -0
  474. package/dist/workspace/fileAssociations.d.ts +12 -0
  475. package/dist/workspace/fileAssociations.d.ts.map +1 -0
  476. package/dist/workspace/fileAssociations.js +202 -0
  477. package/dist/workspace/fileAssociations.js.map +1 -0
  478. package/dist/workspace/scrollbackBuffer.d.ts +48 -0
  479. package/dist/workspace/scrollbackBuffer.d.ts.map +1 -0
  480. package/dist/workspace/scrollbackBuffer.js +94 -0
  481. package/dist/workspace/scrollbackBuffer.js.map +1 -0
  482. package/package.json +42 -0
@@ -0,0 +1,834 @@
1
+ import { type AgentEngineeringHostMethod, type AgentHostEvent, type AgentHostEventListener, type AgentHostInput, type AgentHostMethod, type AgentHostOutput, type AgentHostTransport, type AgentHostUnsubscribe, type AgentRuntimeProviderDescriptor, type AgentRuntimeEventDraft, type AgentRuntimeEventEnvelope, type AgentRuntimeEventListResult, type AgentWorkspaceStateLoadResult, type AgentWorkspaceStateSaveRequest, type AgentWorkspaceStateSaveResult, type AgentConversationStateLoadResult, type AgentConversationStateSaveRequest, type AgentConversationStateSaveResult, type AgentConversationStateDeleteRequest, type AgentConversationStateDeleteResult, type AgentRuntimeSelection, type AgentTurnCancelRequest, type AgentTurnSteerRequest, type AgentAcpProviderApprovalResult, type AgentTurnStartRequest } from '@xenosystem/agent-interface-contract';
2
+ import { type InterruptedTurnStore } from './turns/interruptedTurns.js';
3
+ import { type TurnAdmissionPolicy } from './turns/turnAdmission.js';
4
+ import { type SubagentRunPort } from './subagents/subagentRunPort.js';
5
+ import { CoordinationService } from './coordination/CoordinationService.js';
6
+ import type { RunActivitySignal } from './coordination/query.js';
7
+ import { RunObservationService } from './observation/RunObservationService.js';
8
+ import { RunIsolationService } from './isolation/RunIsolationService.js';
9
+ import { IntakeService } from './intake/IntakeService.js';
10
+ import { WorkspaceKnowledgeService } from './knowledge/WorkspaceKnowledgeService.js';
11
+ import { AgentSessionService } from './session/AgentSessionService.js';
12
+ /**
13
+ * Performs ACP provider approval โ€” a PORT, not a direct call.
14
+ *
15
+ * `AcpProviderApprovalService` imports `@xenosystem/acp-core`, and pulling that
16
+ * into this module would make the whole coordinator unloadable wherever ACP is
17
+ * not installed. The composition supplies the implementation, exactly as it does
18
+ * for observation and sessions.
19
+ *
20
+ * It resolves the agent id to a config itself, because that mapping lives in the
21
+ * ACP registry and the coordinator has no business duplicating it.
22
+ */
23
+ export interface AgentAcpApprovalService {
24
+ approveProvider(input: {
25
+ agentId: string;
26
+ providerId?: string;
27
+ action: 'approve' | 'revoke';
28
+ }): Promise<AgentAcpProviderApprovalResult>;
29
+ }
30
+ export interface AgentRuntimeEventRepository {
31
+ appendGenerated(event: AgentRuntimeEventDraft): Promise<{
32
+ inserted: boolean;
33
+ event: AgentRuntimeEventEnvelope;
34
+ }>;
35
+ append(event: AgentRuntimeEventEnvelope): Promise<{
36
+ inserted: boolean;
37
+ event: AgentRuntimeEventEnvelope;
38
+ }>;
39
+ list(input: AgentHostInput<'runtime.events.list'>): Promise<AgentRuntimeEventListResult>;
40
+ }
41
+ export interface AgentStateRepository {
42
+ loadWorkspaces(): Promise<AgentWorkspaceStateLoadResult>;
43
+ saveWorkspaces(input: AgentWorkspaceStateSaveRequest): Promise<AgentWorkspaceStateSaveResult>;
44
+ loadConversations(): Promise<AgentConversationStateLoadResult>;
45
+ saveConversation(input: AgentConversationStateSaveRequest): Promise<AgentConversationStateSaveResult>;
46
+ deleteConversation(input: AgentConversationStateDeleteRequest): Promise<AgentConversationStateDeleteResult>;
47
+ close?(): Promise<void> | void;
48
+ }
49
+ export interface AgentWorkspaceService {
50
+ setEventSink(sink: (type: AgentHostEvent['type'], payload: Record<string, unknown>) => void): void;
51
+ grantDirectory(input: AgentHostInput<'workspace.access.grant'>): AgentHostOutput<'workspace.access.grant'> | Promise<AgentHostOutput<'workspace.access.grant'>>;
52
+ grantApplication(input: AgentHostInput<'workspace.application.grant'>): AgentHostOutput<'workspace.application.grant'> | Promise<AgentHostOutput<'workspace.application.grant'>>;
53
+ listDirectory(input: AgentHostInput<'workspace.directory.list'>): AgentHostOutput<'workspace.directory.list'> | Promise<AgentHostOutput<'workspace.directory.list'>>;
54
+ readFile(input: AgentHostInput<'workspace.file.read'>): AgentHostOutput<'workspace.file.read'> | Promise<AgentHostOutput<'workspace.file.read'>>;
55
+ writeFile(input: AgentHostInput<'workspace.file.write'>): AgentHostOutput<'workspace.file.write'> | Promise<AgentHostOutput<'workspace.file.write'>>;
56
+ runCommand(input: AgentHostInput<'workspace.command.run'>): AgentHostOutput<'workspace.command.run'> | Promise<AgentHostOutput<'workspace.command.run'>>;
57
+ startTerminal(input: AgentHostInput<'workspace.terminal.start'>): AgentHostOutput<'workspace.terminal.start'> | Promise<AgentHostOutput<'workspace.terminal.start'>>;
58
+ stopTerminal(input: AgentHostInput<'workspace.terminal.stop'>): AgentHostOutput<'workspace.terminal.stop'> | Promise<AgentHostOutput<'workspace.terminal.stop'>>;
59
+ startPty(input: AgentHostInput<'workspace.pty.start'>): AgentHostOutput<'workspace.pty.start'> | Promise<AgentHostOutput<'workspace.pty.start'>>;
60
+ snapshotPty(input: AgentHostInput<'workspace.pty.snapshot'>): AgentHostOutput<'workspace.pty.snapshot'> | Promise<AgentHostOutput<'workspace.pty.snapshot'>>;
61
+ inputPty(input: AgentHostInput<'workspace.pty.input'>): AgentHostOutput<'workspace.pty.input'> | Promise<AgentHostOutput<'workspace.pty.input'>>;
62
+ resizePty(input: AgentHostInput<'workspace.pty.resize'>): AgentHostOutput<'workspace.pty.resize'> | Promise<AgentHostOutput<'workspace.pty.resize'>>;
63
+ clearPty(input: AgentHostInput<'workspace.pty.clear'>): AgentHostOutput<'workspace.pty.clear'> | Promise<AgentHostOutput<'workspace.pty.clear'>>;
64
+ stopPty(input: AgentHostInput<'workspace.pty.stop'>): AgentHostOutput<'workspace.pty.stop'> | Promise<AgentHostOutput<'workspace.pty.stop'>>;
65
+ close?(): Promise<void> | void;
66
+ }
67
+ export interface AgentInteractionService {
68
+ answerPermission(input: AgentHostInput<'elicitation.permission.answer'>): AgentHostOutput<'elicitation.permission.answer'> | Promise<AgentHostOutput<'elicitation.permission.answer'>>;
69
+ answerAskUser(input: AgentHostInput<'elicitation.ask-user.answer'>): AgentHostOutput<'elicitation.ask-user.answer'> | Promise<AgentHostOutput<'elicitation.ask-user.answer'>>;
70
+ }
71
+ /**
72
+ * Host-owned permission POLICY administration (ADE spec ยง7 "one authority").
73
+ *
74
+ * Separate from `AgentInteractionService`, which answers a single live prompt.
75
+ * This is the standing policy behind those prompts: what a user chose to
76
+ * remember, and their ability to take it back. Rules persist and accumulate, so
77
+ * a surface that can create them and not revoke them is a one-way door.
78
+ */
79
+ export interface AgentPermissionPolicyService {
80
+ listRules(): AgentHostOutput<'permissions.rules.list'> | Promise<AgentHostOutput<'permissions.rules.list'>>;
81
+ revokeRule(input: AgentHostInput<'permissions.rules.revoke'>): AgentHostOutput<'permissions.rules.revoke'> | Promise<AgentHostOutput<'permissions.rules.revoke'>>;
82
+ }
83
+ export interface AgentSdkControlService {
84
+ listSessions(input: AgentHostInput<'sdk.sessions.list'>): AgentHostOutput<'sdk.sessions.list'> | Promise<AgentHostOutput<'sdk.sessions.list'>>;
85
+ showSession(input: AgentHostInput<'sdk.sessions.show'>): AgentHostOutput<'sdk.sessions.show'> | Promise<AgentHostOutput<'sdk.sessions.show'>>;
86
+ attachSession(input: AgentHostInput<'sdk.sessions.attach'>): AgentHostOutput<'sdk.sessions.attach'> | Promise<AgentHostOutput<'sdk.sessions.attach'>>;
87
+ detachSession(input: AgentHostInput<'sdk.sessions.detach'>): AgentHostOutput<'sdk.sessions.detach'> | Promise<AgentHostOutput<'sdk.sessions.detach'>>;
88
+ deleteSession(input: AgentHostInput<'sdk.sessions.delete'>): AgentHostOutput<'sdk.sessions.delete'> | Promise<AgentHostOutput<'sdk.sessions.delete'>>;
89
+ cleanSessions(input: AgentHostInput<'sdk.sessions.clean'>): AgentHostOutput<'sdk.sessions.clean'> | Promise<AgentHostOutput<'sdk.sessions.clean'>>;
90
+ listCheckpoints(input: AgentHostInput<'sdk.checkpoints.list'>): AgentHostOutput<'sdk.checkpoints.list'> | Promise<AgentHostOutput<'sdk.checkpoints.list'>>;
91
+ restoreCheckpoint(input: AgentHostInput<'sdk.checkpoints.restore'>): AgentHostOutput<'sdk.checkpoints.restore'> | Promise<AgentHostOutput<'sdk.checkpoints.restore'>>;
92
+ deleteCheckpoint(input: AgentHostInput<'sdk.checkpoints.delete'>): AgentHostOutput<'sdk.checkpoints.delete'> | Promise<AgentHostOutput<'sdk.checkpoints.delete'>>;
93
+ readTaskOutput(input: AgentHostInput<'sdk.tasks.output'>): AgentHostOutput<'sdk.tasks.output'> | Promise<AgentHostOutput<'sdk.tasks.output'>>;
94
+ stopTask(input: AgentHostInput<'sdk.tasks.stop'>): AgentHostOutput<'sdk.tasks.stop'> | Promise<AgentHostOutput<'sdk.tasks.stop'>>;
95
+ close?(): Promise<void> | void;
96
+ }
97
+ export interface AgentEngineeringControlService {
98
+ request<M extends AgentEngineeringHostMethod>(method: M, input: AgentHostInput<M>): AgentHostOutput<M> | Promise<AgentHostOutput<M>>;
99
+ close?(): void | Promise<void>;
100
+ }
101
+ export interface AgentTurnExecutionContext {
102
+ signal: AbortSignal;
103
+ /**
104
+ * Announces an event that the adapter has already committed to the host-owned runtime journal.
105
+ */
106
+ publishPersistedRuntimeEvent(event: AgentRuntimeEventEnvelope): void;
107
+ }
108
+ export interface AgentTurnExecutionAdapter {
109
+ id: string;
110
+ supports(provider: AgentRuntimeProviderDescriptor): boolean;
111
+ execute(request: AgentTurnStartRequest, provider: AgentRuntimeProviderDescriptor, selection: Readonly<AgentRuntimeSelection>, context: AgentTurnExecutionContext): Promise<void>;
112
+ cancel?(request: AgentTurnCancelRequest): Promise<void> | void;
113
+ /**
114
+ * Deliver a correction to a turn that is already running.
115
+ *
116
+ * Optional because it is a tier-3 capability (ADE spec ร‚ยง2.9): it needs a
117
+ * protocol the agent listens on mid-turn. An adapter that cannot do this must
118
+ * NOT stub it รขโ‚ฌโ€ the host reports `steer_unsupported` with a named reason,
119
+ * which ร‚ยง6.3 requires, and the user can move the session to a mode that
120
+ * supports it. A silent no-op would be the worst outcome: the user believes
121
+ * they corrected the agent and nothing happened.
122
+ */
123
+ steer?(request: AgentTurnSteerRequest): Promise<void> | void;
124
+ close?(): Promise<void> | void;
125
+ }
126
+ export interface AgentHostCoordinatorOptions {
127
+ hostVersion: string;
128
+ hostInstanceId: string;
129
+ processBoundary: 'in-process' | 'per-user-service';
130
+ storageSchemaVersion: number;
131
+ eventSchemaVersion: number;
132
+ providers?: AgentRuntimeProviderDescriptor[];
133
+ providerCatalogLoader?: () => AgentRuntimeProviderDescriptor[] | Promise<AgentRuntimeProviderDescriptor[]>;
134
+ runtimeEvents?: AgentRuntimeEventEnvelope[];
135
+ runtimeEventRepository?: AgentRuntimeEventRepository;
136
+ stateRepository?: AgentStateRepository;
137
+ workspaceService?: AgentWorkspaceService;
138
+ interactionService?: AgentInteractionService;
139
+ permissionPolicyService?: AgentPermissionPolicyService;
140
+ /**
141
+ * Durable record of in-flight turns, so a turn killed by process exit is
142
+ * NAMEABLE afterwards instead of silently absent (ยง5.5). Defaults to
143
+ * in-memory, which records nothing across a restart โ€” correct as a default,
144
+ * and the composition supplies a durable one.
145
+ */
146
+ interruptedTurnStore?: InterruptedTurnStore;
147
+ /**
148
+ * How many turns may run at once, across EVERY surface. Defaults to the environment-resolved
149
+ * policy. Injectable so a test can drive the host to capacity without mutating process env,
150
+ * which is global and would race other tests.
151
+ */
152
+ turnAdmissionPolicy?: TurnAdmissionPolicy;
153
+ /**
154
+ * How long the host waits for an adapter to notice an abort before it STOPS COUNTING the turn.
155
+ * Defaults to `DEFAULT_TURN_ABANDON_GRACE_MS`. Injectable so a test need not wait seconds.
156
+ */
157
+ turnAbandonGraceMs?: number;
158
+ sdkControlService?: AgentSdkControlService;
159
+ engineeringControlService?: AgentEngineeringControlService;
160
+ turnExecutionAdapters?: AgentTurnExecutionAdapter[];
161
+ /**
162
+ * Coordination between runs (`XENO_AGENT_COORDINATION_SPEC.md`).
163
+ *
164
+ * Optional, and absent means the host runs exactly as it did before: no
165
+ * coordination events, no claims, `coordination` reports undefined. A fleet
166
+ * of one does not need the primitives, and a host that silently invented a
167
+ * coordination surface would make "is this host coordinating?" unanswerable
168
+ * from its options.
169
+ */
170
+ coordinationService?: CoordinationService;
171
+ /**
172
+ * Tier-1 run observation (`XENO_AGENT_ADE_SPEC.md` ยง2.9).
173
+ *
174
+ * Optional for the same reason coordination is: a host with no isolation
175
+ * substrate wired has nothing to observe, and inventing an empty diff would
176
+ * be the false-clean output ยง2.9's sensors exist to prevent.
177
+ */
178
+ runObservationService?: RunObservationService;
179
+ /**
180
+ * Answers whether a run is CONTAINED (ADE ยง5.3).
181
+ *
182
+ * Optional, and its ABSENCE is meaningful rather than merely permitted: with
183
+ * no service the host still answers, and answers `none`, because nothing
184
+ * confining a run is a fact the user is entitled to be told.
185
+ */
186
+ runIsolationService?: RunIsolationService;
187
+ /**
188
+ * Told when a run begins, so something can attach a sandbox to it.
189
+ *
190
+ * The service folds a stream it is GIVEN; it never acquires one. Without this
191
+ * hook the only way a run becomes observed is a caller who already knows the
192
+ * run id, which is nobody โ€” so the service would be mounted and permanently
193
+ * empty. That is the "built, tested, unreachable" shape this ecosystem has
194
+ * shipped four times, and this is the call that closes it.
195
+ *
196
+ * Deliberately NOT awaited: attaching means spawning a container, and a turn
197
+ * must not wait on a review capability. A binder that fails leaves the run
198
+ * unobserved, which every consumer already reports honestly.
199
+ */
200
+ runObservationBinder?: AgentRunObservationBinder;
201
+ /**
202
+ * The session substrate (ยง2.8) โ€” every session's PTY, its optional protocol
203
+ * channel, and its render mode as one object.
204
+ *
205
+ * Optional like its siblings: a host with no substrate mounted has no
206
+ * sessions, which is honest, rather than sessions that render nothing.
207
+ */
208
+ sessionService?: AgentSessionService;
209
+ /**
210
+ * Intake (ยง5.1). Optional like its siblings: a host with no sources wired has
211
+ * no inbox, which is honest โ€” an empty inbox invented for a host that cannot
212
+ * read one would say "no work" when the truth is "nobody looked".
213
+ */
214
+ intakeService?: IntakeService;
215
+ /**
216
+ * Workspace knowledge (ยง5.8). Optional: a host without it reports knowledge
217
+ * unavailable, which is honest. Inventing an empty knowledge base would say
218
+ * "this workspace has learned nothing" when the truth is "nobody is keeping
219
+ * track".
220
+ */
221
+ knowledgeService?: WorkspaceKnowledgeService;
222
+ /**
223
+ * ACP provider approval (ยง10b). Optional: a host without it reports
224
+ * `unavailable` by name rather than pretending the action succeeded.
225
+ */
226
+ acpApprovalService?: AgentAcpApprovalService;
227
+ /**
228
+ * Subagent runs โ€” ADE ยง5.2. Absent means this host declines `subagent.run.*` with a named
229
+ * reason rather than queueing work nothing will execute.
230
+ */
231
+ subagentRuns?: SubagentRunPort;
232
+ /**
233
+ * Which run a turn belongs to, for gate-8 cause attribution.
234
+ *
235
+ * ๐Ÿ”ด A TURN IS NOT A RUN, and conflating them breaks claims. A run outlives
236
+ * its turns โ€” the coordination spec ยง6 has a message to an idle run *begin* a
237
+ * new turn, so the run demonstrably exists between them โ€” while
238
+ * `endRun` RELEASES EVERY CLAIM THE RUN HOLDS. Deriving `endRun` from turn
239
+ * completion would drop another agent's lock the moment a turn finished,
240
+ * defeating the one primitive that exists to stop two runs colliding.
241
+ *
242
+ * So only `endTurn` is wired here (it clears the message cause, which is
243
+ * genuinely turn-scoped) and `endRun` is deliberately left to whoever created
244
+ * the run. This resolver only has to answer "which run is this turn part of";
245
+ * the default reads the request's own identifiers and never guesses.
246
+ */
247
+ resolveRunId?: (request: AgentTurnStartRequest) => string | undefined;
248
+ }
249
+ /**
250
+ * Attaches an isolation substrate to a run as it begins.
251
+ *
252
+ * A port, so the host stays free of any knowledge of `xeno-use` โ€” including its
253
+ * licence. The composition supplies the implementation; the host only knows that
254
+ * a run started and what workspace it belongs to.
255
+ */
256
+ export interface AgentRunObservationBinder {
257
+ begin(context: {
258
+ runId: string;
259
+ conversationId: string;
260
+ /**
261
+ * The run's working directory, when the request named one.
262
+ *
263
+ * This is what an observer actually needs โ€” the sensor watches a directory,
264
+ * not an id โ€” so it is passed rather than a `workspaceId` the binder would
265
+ * have to resolve through a service it should not need.
266
+ */
267
+ primaryDirectory?: string;
268
+ workspaceId?: string;
269
+ agentId?: string;
270
+ }): void;
271
+ }
272
+ /**
273
+ * How long the host waits for an adapter to notice an abort before it stops counting the turn.
274
+ *
275
+ * ๐Ÿ”ด This exists because the host used to wait FOREVER. `activeTurns` is cleared in the
276
+ * `.finally()` of the adapter's execute promise, so an adapter that ignores `signal` โ€” or simply
277
+ * hangs โ€” kept its entry indefinitely. Measured 2026-08-17: `turn.cancel` returned
278
+ * `success: true` while the turn stayed active and stayed counted, and with turn admission in
279
+ * place the slot never came back. Sixteen such turns wedge a default host, recoverable only by
280
+ * restarting it.
281
+ *
282
+ * Generous, because a slow-but-honest adapter finishing its cleanup is the common case and
283
+ * abandoning it early would be worse than waiting. Bounded, because "wait for cooperation that
284
+ * may never come" is not a policy.
285
+ */
286
+ export declare const DEFAULT_TURN_ABANDON_GRACE_MS = 5000;
287
+ export declare class AgentHostCoordinator implements AgentHostTransport {
288
+ private readonly options;
289
+ private readonly listeners;
290
+ private readonly providers;
291
+ private readonly providerCatalogLoader;
292
+ private readonly runtimeEvents;
293
+ private readonly runtimeEventRepository;
294
+ private readonly stateRepository;
295
+ private readonly workspaceService;
296
+ private readonly interactionService;
297
+ private readonly permissionPolicyService;
298
+ private readonly interruptedTurnStore;
299
+ private readonly sdkControlService;
300
+ private readonly engineeringControlService;
301
+ private readonly coordinationService;
302
+ /**
303
+ * Run id -> the conversation that run belongs to.
304
+ *
305
+ * Gate 8 needs coordination on the RUN TIMELINE, and a timeline entry is
306
+ * addressed by conversation and request. Only the host knows that mapping;
307
+ * the coordination service deals in run ids alone, which is what keeps it
308
+ * testable without a store.
309
+ */
310
+ private readonly runContexts;
311
+ private coordinationEventSequence;
312
+ /** Collisions seen since this host started โ€” see the sink above for why this
313
+ * is the only place they exist. */
314
+ private readonly fleetCollisions;
315
+ private readonly runObservationService;
316
+ private readonly runIsolationService;
317
+ private readonly runObservationBinder;
318
+ private readonly sessionService;
319
+ private readonly intakeService;
320
+ private readonly knowledgeService;
321
+ private readonly acpApprovalService;
322
+ /**
323
+ * Subagent runs โ€” ADE ยง5.2. A PORT spanning `SubagentRunService` (create/list) and
324
+ * `SubagentScheduler` (cancel), because cancelling a launched run must reach the adapter.
325
+ */
326
+ private readonly subagentRuns;
327
+ private readonly resolveRunId;
328
+ private readonly connectedClients;
329
+ /** What each connected client declared it can do, keyed the same way. */
330
+ private readonly clientCapabilities;
331
+ private readonly turnExecutionAdapters;
332
+ private readonly turnAdmissionPolicy;
333
+ private readonly turnAbandonGraceMs;
334
+ /**
335
+ * Timers owned by a live turn: its deadline, and any abandonment grace already started.
336
+ * Cleared when the turn settles, so a completed turn cannot be abandoned retroactively.
337
+ */
338
+ private readonly turnTimers;
339
+ private readonly activeTurns;
340
+ private readonly commandResults;
341
+ /**
342
+ * Instructions stacked while a turn is running, per conversation.
343
+ *
344
+ * Held by the HOST, not by an adapter: that is what makes queueing work at
345
+ * every structure tier (ADE spec ร‚ยง2.9), including a third-party agent running
346
+ * its own TUI where there is no protocol to hand a steer to.
347
+ *
348
+ * The host does NOT auto-start the queued turn. It holds the instruction and
349
+ * signals when the active turn ends; the client starts the next turn, because
350
+ * the client is where the user's permission context lives. Auto-drain would
351
+ * convert a queue into unattended execution, which is a different decision.
352
+ */
353
+ private readonly queuedInstructions;
354
+ private queuedInstructionSequence;
355
+ private sequence;
356
+ private catalogRevision;
357
+ private providerCatalogFingerprint;
358
+ private providerCatalogRefresh;
359
+ constructor(options: AgentHostCoordinatorOptions);
360
+ /**
361
+ * The mounted coordination service, or `undefined` when the host has none.
362
+ *
363
+ * Deliberately NOT reachable through `request()`. A run coordinates with
364
+ * another run; a client surface watches. Exposing send/claim as host methods
365
+ * would let whatever is holding a transport act *as* a run, which is exactly
366
+ * the boundary coordination spec ยง4 draws โ€” and `AgentHostTransport` is a
367
+ * protected cross-repo interface whose consumers (Hub, Shell) would all need
368
+ * coordinating for a capability neither of them is asking for.
369
+ */
370
+ get coordination(): CoordinationService | undefined;
371
+ /**
372
+ * Puts what the workspace knows into the turn โ€” ADE ยง5.8's gate.
373
+ *
374
+ * ๐Ÿ”ด **In the coordinator, before the adapter is invoked, so it cannot be
375
+ * per-provider.** The gate is that a fact learned by one provider reaches a
376
+ * later run on a DIFFERENT one; injecting inside an adapter would make that a
377
+ * property each lane had to remember, and the lane that forgot would fail
378
+ * silently โ€” the prompt would simply be missing knowledge, which looks exactly
379
+ * like an agent that never learned anything.
380
+ *
381
+ * ๐Ÿ”ด **Prepended to `systemPrompt`, never replacing it.** Standing context
382
+ * about the codebase is what a system prompt is for, and every lane already
383
+ * carries one โ€” so this reaches all of them without touching three adapters.
384
+ * A caller's own system prompt is preserved below it.
385
+ *
386
+ * A failure here does NOT fail the turn. Knowledge is an enrichment; the run
387
+ * is the user's actual work, and a broken store must not be able to stop it.
388
+ * The turn simply proceeds without the block, which is the same behaviour as a
389
+ * workspace that has learned nothing yet.
390
+ */
391
+ private injectWorkspaceKnowledge;
392
+ /** Workspace knowledge โ€” ADE ยง5.8. Thin: the rules live in `core`. */
393
+ private listKnowledge;
394
+ private recordKnowledge;
395
+ private forgetKnowledge;
396
+ private knowledgeContext;
397
+ /** Intake โ€” ADE ยง5.1. Thin: every rule lives in `core/intakeClaim`. */
398
+ private listIntakeSources;
399
+ private listIntakeItems;
400
+ private claimIntakeItem;
401
+ private releaseIntakeItem;
402
+ private dispatchIntakeItem;
403
+ /**
404
+ * Sessions over the protocol โ€” ADE ยง5.5, build-order step 4.
405
+ *
406
+ * The substrate has had attach, takeover and input routing all along; none of
407
+ * it was reachable from a surface, which is the same "built, tested,
408
+ * unreachable" shape this repo has shipped repeatedly. These methods are thin
409
+ * on purpose: every rule worth trusting lives in `AgentSessionService` and
410
+ * `writeLease`, where it is tested without a host.
411
+ */
412
+ private listSessions;
413
+ private attachSession;
414
+ private detachSession;
415
+ private snapshotSession;
416
+ /**
417
+ * Hands a run what its peers said โ€” ADE ยง5.2b's `message` primitive.
418
+ *
419
+ * ๐Ÿ”ด Nothing called `deliverTo`. Messages were sent, journalled, reported
420
+ * `delivered` to the sender โ€” and sat in the bus forever, because the only
421
+ * thing that empties an inbox had no caller anywhere in the repo. The
422
+ * primitive was half a pipe: every agent could send and no agent could
423
+ * receive, while the sender was told it had been delivered.
424
+ *
425
+ * At TURN START and in the coordinator, for the same reason ยง5.8's knowledge
426
+ * injection is: a push that each lane had to remember would fail silently in
427
+ * the lane that forgot, and a prompt merely missing its messages looks exactly
428
+ * like a run nobody wrote to.
429
+ *
430
+ * Prepended to `systemPrompt` alongside knowledge rather than appended to the
431
+ * user's prompt โ€” what a peer said is standing context for this turn, not
432
+ * something the user typed, and putting it in their words would misattribute
433
+ * it.
434
+ *
435
+ * โš ๏ธ Draining also sets the run's CAUSE, which is what makes gate 8
436
+ * attribution and ยง8 loop detection work at all: a message this run sends
437
+ * while handling another inherits the chain. Both were inert for the same
438
+ * reason.
439
+ */
440
+ private deliverCoordinationMessages;
441
+ /**
442
+ * A run's activity changed โ€” ยง7's run state and last decision.
443
+ *
444
+ * ๐Ÿ”ด `awaiting-approval` had no producer at all, and the gap is not
445
+ * cosmetic: a peer deciding whether to wait for a run or take the work itself
446
+ * needs "blocked on a human" to look different from "busy". A run reported
447
+ * `running` while it sits on a permission prompt is the one case where
448
+ * waiting is guaranteed to be wrong.
449
+ *
450
+ * Public because the signal originates in a turn adapter, which the
451
+ * composition builds BEFORE this host exists โ€” the same ordering
452
+ * `setEventSink` already solves for coordination events.
453
+ */
454
+ reportRunActivity(signal: RunActivitySignal): void;
455
+ /**
456
+ * Puts a run on the coordination roster โ€” ADE ยง5.2b.
457
+ *
458
+ * ๐Ÿ”ด Nothing called `registerRun`. The primitives were reachable from both
459
+ * lanes and INERT: `peers()` returns an empty list for a caller it has never
460
+ * heard of, so every agent asking who else was working got the same answer as
461
+ * an agent genuinely alone. The build was complete and the feature did
462
+ * nothing โ€” the shape this repo keeps finding one level further in.
463
+ *
464
+ * An UPSERT, called at both ends of a turn, because a run spans many turns and
465
+ * its state changes: `running` while a turn is in flight, `idle` between them.
466
+ * A run is never removed here; `endRun` belongs to whoever created the run,
467
+ * and claims have lease expiry as the backstop for a host that never got the
468
+ * news.
469
+ *
470
+ * โš ๏ธ `complete: false`, always, and honestly. This host observes FILES โ€” the
471
+ * process sensor lives behind `xeno-use` and only the file-change port is
472
+ * consumed here โ€” so `commandsRun` is empty because commands are UNOBSERVED,
473
+ * not because none ran. A peer must be able to tell those apart.
474
+ */
475
+ private registerCoordinationRun;
476
+ /**
477
+ * Gives a run a session โ€” ADE ยง2.8, and the step ยง9 has been stuck on.
478
+ *
479
+ * Opened at TURN START rather than on demand, because a session is where a
480
+ * person looks to see what the agent is doing, and one that only exists after
481
+ * someone asks for it is not there during the minute they most want it.
482
+ *
483
+ * ๐Ÿ”ด Every ingredient is derived, none is asserted:
484
+ *
485
+ * - the render support comes from the ADAPTERS (`renderSupportFor`), so a
486
+ * provider nothing can execute is refused by name instead of opening a
487
+ * session that would render nothing;
488
+ * - the protocol channel is the run's OWN runtime-event stream, already
489
+ * redacted and already durable, so the terminal is a rendering of the run
490
+ * rather than a second opinion about it;
491
+ * - the PTY has no process behind it, because in `acp` there is nothing to
492
+ * attach to โ€” and `createBufferedSessionPty` throws rather than silently
493
+ * swallowing a write, so a broken mode rule surfaces instead of losing
494
+ * what someone typed.
495
+ *
496
+ * Failures are contained for the same reason the observation binder's are: a
497
+ * turn is the user's actual work, and a session is an observability surface
498
+ * over it. A run without a session is honest โ€” `session.list` simply will not
499
+ * show it โ€” whereas a turn that failed to start because a terminal could not
500
+ * be opened would be absurd.
501
+ *
502
+ * โš ๏ธ One session per RUN, not per turn. A second turn on the same run finds
503
+ * the session already open and leaves it alone; re-opening would discard the
504
+ * output a viewer is reading mid-conversation.
505
+ */
506
+ private openSessionForRun;
507
+ private routeSessionInput;
508
+ /**
509
+ * The turn a run is executing right now, if any.
510
+ *
511
+ * ยง2.8's routing needs two facts โ€” is a turn in flight, and can this agent
512
+ * take a correction mid-turn โ€” and both live here. `activeTurns` is keyed by
513
+ * conversation and request, so finding a RUN's turn means asking
514
+ * `resolveRunId` about each one, the same derivation everything else uses.
515
+ */
516
+ private activeTurnForRun;
517
+ /**
518
+ * Delivers what the substrate could not, through the ONE path that can.
519
+ *
520
+ * ยง2.8 promises typing never falls into a void, and `AgentSessionService`
521
+ * keeps its half by refusing to write into a PTY with no process behind it. It
522
+ * deliberately stops there: an `acp` steer travels `turn.steer`, where
523
+ * acknowledgement, idempotency and the named refusal already live, and a
524
+ * second delivery path from inside the substrate would be the unacknowledged
525
+ * one ยง5.5 measured to be wrong.
526
+ *
527
+ * So the host โ€” which owns execution โ€” closes the loop here, for BOTH input
528
+ * doors. Splitting it would leave the promise held at one entrance again.
529
+ *
530
+ * A failure is REPORTED, never swallowed: `turn_not_active` in particular is
531
+ * an ordinary outcome (someone typed between turns) and its message already
532
+ * tells the reader to queue instead. Reporting `delivered: true` there would
533
+ * be the precise lie this whole chain exists to prevent.
534
+ */
535
+ private deliverOwedSessionInput;
536
+ private takeOverSession;
537
+ private releaseSession;
538
+ /**
539
+ * Every run this host knows about โ€” ADE ยง9 step 6.
540
+ *
541
+ * Composed from three subsystems rather than a fourth record, because a
542
+ * separate fleet ledger would be a second copy of facts that already exist and
543
+ * would disagree with them the first time one was updated and the other was
544
+ * not.
545
+ *
546
+ * ๐Ÿ”ด The completeness flags are the load-bearing part. A fleet view showing
547
+ * three collisions when five happened, or four changed files when a drain was
548
+ * dropped, is worse than no fleet view: it is the shape a person uses to
549
+ * decide the work is safe to land.
550
+ */
551
+ /**
552
+ * Plans a fan-out WITHOUT starting anything โ€” ADE ยง5.2's scheduler.
553
+ *
554
+ * Deliberately separate from dispatch. A plan is the reviewable artifact: it
555
+ * shows which agent gets which task, which tasks nothing can run and why, and
556
+ * how the load actually spread โ€” all before a single agent touches a
557
+ * repository. Fusing plan and execute would remove the only moment at which
558
+ * any of that can be checked.
559
+ */
560
+ private planFleetFanOut;
561
+ /**
562
+ * Which agents could run a task requiring these capabilities โ€” ADE ยง5.2.
563
+ *
564
+ * A pure QUERY over the live provider catalog: it starts nothing, so a
565
+ * surface or a scheduler can ask before committing to anything.
566
+ *
567
+ * ๐Ÿ”ด The refusal REASON is the deliverable, not the boolean. ยง5.2's gate is
568
+ * that a task requiring an undeclared capability is "refused with a named
569
+ * reason" โ€” so this reports which capability nobody declares, and
570
+ * distinguishes that from every capable agent merely being down. Those two
571
+ * send a user to completely different places.
572
+ *
573
+ * The matching rules live in `routeByCapability` (provider-neutral, in
574
+ * `core`) rather than here: this method's job is to supply the catalog and
575
+ * shape the answer for the wire.
576
+ */
577
+ private routeByCapabilities;
578
+ private readFleetView;
579
+ /**
580
+ * A run's observed diff, for review.
581
+ *
582
+ * ๐Ÿ”ด Unavailable is reported as `available: false` with a reason, never as an
583
+ * empty change list. They are different facts โ€” "this run changed nothing" and
584
+ * "nobody was watching" โ€” and a surface that cannot tell them apart will show
585
+ * a clean review for an unobserved run.
586
+ */
587
+ /**
588
+ * What a run is not being told yet โ€” coordination ยง6 `hold`.
589
+ *
590
+ * ๐Ÿ”ด `available: false` when this host has no coordination service, so a
591
+ * surface can tell "this host does not coordinate" from "nothing is
592
+ * held". Reporting an empty list for both would make an unmounted service
593
+ * look like a quiet one.
594
+ */
595
+ private listHeldMessages;
596
+ /** A human approves one held message. ยง6's approval step, made reachable. */
597
+ private releaseHeldMessage;
598
+ /**
599
+ * A human pins or releases a run's inbound policy โ€” ยง6's override, made
600
+ * reachable.
601
+ *
602
+ * ๐Ÿ”ด Deliberately a HOST method and not a lane call. `CoordinationLanePort`
603
+ * exposes exactly four calls and this is not one of them, because an agent
604
+ * that could set its receiver's policy could accept its own messages past the
605
+ * rule that a message never moves trust upward.
606
+ */
607
+ private setCoordinationInboundPolicy;
608
+ private readRunObservation;
609
+ /**
610
+ * Content for one changed path โ€” ยง2.9 hunk-level review.
611
+ *
612
+ * The service refuses a path the run did not change, so this cannot be used to
613
+ * browse the sandbox: that is a different capability with a different consent
614
+ * story, and a review pane is not a licence to read arbitrary files.
615
+ */
616
+ private readRunObservationChange;
617
+ /** Where the observed runs collide โ€” ยง5.7, while both are still alive. */
618
+ private readRunObservationOverlaps;
619
+ /**
620
+ * How many turns are executing right now.
621
+ *
622
+ * Exposed so a composition can answer "would quitting destroy work?" โ€” which
623
+ * it cannot ask any other way, and which is the difference between an app that
624
+ * closes cleanly and one that silently ends a run the user is waiting on.
625
+ *
626
+ * A COUNT, not the turns themselves: a caller deciding whether to quit has no
627
+ * business with the requests, and handing them out would make an internal map
628
+ * part of the surface.
629
+ */
630
+ get activeTurnCount(): number;
631
+ /**
632
+ * The mounted run-observation service, or `undefined` when unmounted.
633
+ *
634
+ * The full change set is pulled through here rather than pushed on the feed:
635
+ * a diff is large and mostly unchanged between polls, while the notification
636
+ * that it moved is small. Same reason it is not on `AgentHostTransport` โ€”
637
+ * that is a protected cross-repo interface (root ABSOLUTE RULE ยง4).
638
+ */
639
+ get runObservation(): RunObservationService | undefined;
640
+ /**
641
+ * The mounted session substrate, or `undefined` when unmounted.
642
+ *
643
+ * Reached by composition, not through `request()`: attaching to a session
644
+ * means subscribing to a byte stream, which is not a request/response shape โ€”
645
+ * and `AgentHostTransport` is protected (root ABSOLUTE RULE ยง4).
646
+ */
647
+ get sessions(): AgentSessionService | undefined;
648
+ request<M extends AgentHostMethod>(method: M, input: AgentHostInput<M>): Promise<AgentHostOutput<M>>;
649
+ subscribe(listener: AgentHostEventListener): AgentHostUnsubscribe;
650
+ /**
651
+ * Forget a client whose connection is gone.
652
+ *
653
+ * ๐Ÿ”ด Before this there was no `connectedClients.delete` anywhere except a wholesale clear, so
654
+ * the set only ever grew within a session. That is invisible until something asks a question of
655
+ * it โ€” and `canPresentElicitations` is exactly such a question, asked immediately before the
656
+ * host puts a prompt to a person and waits with no timeout.
657
+ */
658
+ releaseClient(instanceId: string): void;
659
+ /**
660
+ * Is there a connected client that can put a question to a person and answer it?
661
+ *
662
+ * โš ๏ธ Subscribers are NOT the signal, and that is the trap this method exists to avoid: the RPC
663
+ * server subscribes exactly ONE listener and fans out to whatever sockets it has, so a listener
664
+ * count of 1 is equally consistent with ten attached clients and none. Only a completed
665
+ * handshake says someone is there, and only a declared capability says they can answer.
666
+ */
667
+ hasElicitationCapableClient(): boolean;
668
+ registerProvider(provider: AgentRuntimeProviderDescriptor): void;
669
+ registerTurnExecutionAdapter(adapter: AgentTurnExecutionAdapter): void;
670
+ close(): Promise<void>;
671
+ removeProvider(providerId: string): boolean;
672
+ recordRuntimeEvent(event: AgentRuntimeEventEnvelope): Promise<boolean>;
673
+ publishPersistedRuntimeEvent(event: AgentRuntimeEventEnvelope): void;
674
+ createElicitationSurfaceMessenger(): {
675
+ send(channel: string, payload: Record<string, unknown>): void;
676
+ };
677
+ /**
678
+ * Enqueue a subagent run โ€” ADE ยง5.2, the join between `fleet.plan` and `SubagentScheduler`.
679
+ *
680
+ * โš ๏ธ Reached through a PORT spanning two objects on purpose. `createRun`/`listRuns` live on
681
+ * `SubagentRunService` and `cancelRun` on `SubagentScheduler` โ€” and cancel must go through the
682
+ * SCHEDULER, because cancelling a run whose adapter has already launched it has to tell the
683
+ * adapter. Handing the host either object alone would push that distinction onto every caller.
684
+ *
685
+ * ๐Ÿ”ด Refuses with a NAMED reason when no scheduler is mounted, rather than pretending. A host
686
+ * with no scheduler is a normal composition (the standalone app had none until this landed),
687
+ * and a create that silently succeeded against nothing would queue work no one will ever run.
688
+ */
689
+ private createSubagentRun;
690
+ /**
691
+ * What the turn that spawned this run is allowed to reach.
692
+ *
693
+ * Resolved from `runContexts`, which the host populates at `turn.start` and keeps for the life
694
+ * of the run. Absent means the host genuinely does not know โ€” a run created outside a turn, or
695
+ * by a surface that declared no workspace โ€” and `boundSubagentWorkspace` treats that as
696
+ * authorising nothing rather than as permission.
697
+ */
698
+ private parentTurnWorkspace;
699
+ private listSubagentRuns;
700
+ private cancelSubagentRun;
701
+ /** Remember a timer owned by this turn, so settling can cancel it. */
702
+ private trackTurnTimer;
703
+ /**
704
+ * Drop every timer for a turn. Called when it settles, so a turn that finished normally can
705
+ * never be abandoned afterwards by a timer that was already in flight.
706
+ */
707
+ private clearTurnTimers;
708
+ /**
709
+ * Abort a turn, then STOP COUNTING IT if the adapter does not settle in time.
710
+ *
711
+ * ๐Ÿ”ด The honesty this preserves is the whole point. The host cannot make a third-party adapter
712
+ * stop โ€” it can only ask, and then decide what to believe. Waiting forever means one
713
+ * uncooperative adapter permanently consumes an admission slot; pretending the abort worked
714
+ * means reporting a success we do not have, which this repo's own rules forbid. So the host
715
+ * abandons ITS OWN record and says so: `turn.execution.abandoned` states that the host gave up
716
+ * tracking, NOT that the work stopped.
717
+ */
718
+ private abortAndAbandon;
719
+ private startTurn;
720
+ private recordContextCompaction;
721
+ private cancelTurn;
722
+ private steerTurn;
723
+ /** True while any turn is running for this conversation. */
724
+ private hasActiveTurn;
725
+ private queueSnapshot;
726
+ private queueTurnInstruction;
727
+ private listQueuedInstructions;
728
+ private dropQueuedInstruction;
729
+ private rememberTurnStartFailure;
730
+ private commandKey;
731
+ private isConnectedClient;
732
+ private handshake;
733
+ private listProviders;
734
+ private refreshProviderCatalog;
735
+ private listRuntimeEvents;
736
+ private requireStateRepository;
737
+ private requireWorkspaceService;
738
+ private requireInteractionService;
739
+ /**
740
+ * Re-issues a turn that process death interrupted (ยง5.5).
741
+ *
742
+ * โš ๏ธ It RESTARTS rather than resumes, and says so in the result. A turn killed
743
+ * with the process left no continuation point inside the agent โ€” only the
744
+ * request that produced it. Work already done is done again, and side effects
745
+ * already performed have already happened. Where the request carries a
746
+ * provider continuation the session is picked up, which narrows the gap
747
+ * without closing it.
748
+ *
749
+ * Everything after the lookup goes through `startTurn`, deliberately: a
750
+ * second execution path would be free to drift from the first on provider
751
+ * validation, catalog revision, adapter selection and idempotency โ€” and the
752
+ * one that runs rarely is the one that would rot.
753
+ */
754
+ /**
755
+ * Approve or revoke an ACP provider's binary.
756
+ *
757
+ * Fails CLOSED and by name in every branch. The shipping app previously
758
+ * rendered an enabled Approve button whose bridge answered "not available on
759
+ * this host yet" โ€” a message that was true of the bridge and false of the
760
+ * host, which implements this. `unavailable` here means the host genuinely
761
+ * has no approval service mounted, and says so.
762
+ */
763
+ private approveAcpProvider;
764
+ private resumeTurn;
765
+ /**
766
+ * Reports turns that were running when the previous process ended (ยง5.5).
767
+ *
768
+ * Called by the composition after construction. Each surviving record is
769
+ * journalled as a durable `turn.interrupted` runtime event, so the surface
770
+ * shows "this turn was interrupted" instead of a turn that simply stops
771
+ * mid-sentence and never says why. An absence indistinguishable from an
772
+ * outcome is the failure this whole mechanism exists to remove.
773
+ *
774
+ * Records are NOT cleared: `turn.resume` needs them. They clear when the turn
775
+ * reaches a terminal state, which a resumed turn eventually does.
776
+ */
777
+ reportInterruptedTurns(): Promise<number>;
778
+ private requirePermissionPolicyService;
779
+ private requireSdkControlService;
780
+ private requireEngineeringControlService;
781
+ private assertWorkspaceClient;
782
+ private assertSdkControlClient;
783
+ private assertEngineeringControlClient;
784
+ private setProvider;
785
+ private publishCatalogChange;
786
+ private appendRuntimeEvent;
787
+ /**
788
+ * Writes one coordination event to the run timeline.
789
+ *
790
+ * Silent when the run has no known conversation โ€” a coordination event
791
+ * addressed to a run this host never started a turn for has no timeline to
792
+ * join, and inventing a conversation id would put the entry somewhere a
793
+ * reviewer would never look. It stays on the live feed either way.
794
+ */
795
+ private recordCoordinationEvent;
796
+ private publish;
797
+ }
798
+ /**
799
+ * Coordination โ€” the team-agent primitives (`XENO_AGENT_COORDINATION_SPEC.md`).
800
+ *
801
+ * Exported from the PORTABLE entry rather than `./node`: these are
802
+ * provider-neutral rules with no Node dependency, and the host is the only party
803
+ * that can arbitrate them because it is the only party that sees every run.
804
+ */
805
+ export * from './coordination/claims.js';
806
+ export * from './coordination/messages.js';
807
+ export * from './coordination/query.js';
808
+ export * from './coordination/CoordinationService.js';
809
+ export * from './coordination/laneBridge.js';
810
+ export * from './coordination/coordinationTools.js';
811
+ export * from './coordination/permissionWaitRegistry.js';
812
+ export * from './coordination/renderInbox.js';
813
+ export * from './coordination/runtimeEvents.js';
814
+ export * from './knowledge/WorkspaceKnowledgeService.js';
815
+ export * from './intake/IntakeService.js';
816
+ export * from './observation/RunObservationService.js';
817
+ export * from './isolation/RunIsolationService.js';
818
+ /**
819
+ * The confining implementation โ€” browser-safe, and that is not an accident.
820
+ *
821
+ * It reaches the substrate over `fetch` and imports nothing from `node:`, so it
822
+ * belongs in THIS barrel while `RunExecutionEnvironment` does not: the
823
+ * environment constructs a `LocalCommandExecutor`, which spawns processes.
824
+ * Exporting the environment here made the browser barrel transitively reach
825
+ * `node:child_process` โ€” caught by `browserBarrelPurity.test.ts` rather than by
826
+ * review, which is the whole reason that gate exists.
827
+ */
828
+ export * from './isolation/SandboxCommandExecutor.js';
829
+ export * from './observation/XenoUseObservationSource.js';
830
+ export * from './observation/XenoUseRunObserver.js';
831
+ export * from './session/AgentSessionService.js';
832
+ export * from './session/runtimeEventChannel.js';
833
+ export * from './session/renderSupport.js';
834
+ //# sourceMappingURL=index.d.ts.map