@eloxiv/testing 0.0.0-stage → 0.1.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 (1006) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +6 -2
  3. package/dist/Admin.d.ts +20 -0
  4. package/dist/Admin.d.ts.map +1 -0
  5. package/dist/Admin.js +61 -0
  6. package/dist/Admin.js.map +1 -0
  7. package/dist/Agent.d.ts +97 -0
  8. package/dist/Agent.d.ts.map +1 -0
  9. package/dist/Agent.js +210 -0
  10. package/dist/Agent.js.map +1 -0
  11. package/dist/AgentSurface.d.ts +20 -0
  12. package/dist/AgentSurface.d.ts.map +1 -0
  13. package/dist/AgentSurface.js +36 -0
  14. package/dist/AgentSurface.js.map +1 -0
  15. package/dist/Embedder.d.ts +21 -0
  16. package/dist/Embedder.d.ts.map +1 -0
  17. package/dist/Embedder.js +54 -0
  18. package/dist/Embedder.js.map +1 -0
  19. package/dist/EvalMain.d.ts +2 -0
  20. package/dist/EvalMain.d.ts.map +1 -0
  21. package/dist/EvalMain.js +80 -0
  22. package/dist/EvalMain.js.map +1 -0
  23. package/dist/Evals.d.ts +95 -0
  24. package/dist/Evals.d.ts.map +1 -0
  25. package/dist/Evals.js +389 -0
  26. package/dist/Evals.js.map +1 -0
  27. package/dist/Kernel.d.ts +88 -0
  28. package/dist/Kernel.d.ts.map +1 -0
  29. package/dist/Kernel.js +108 -0
  30. package/dist/Kernel.js.map +1 -0
  31. package/dist/Launch.d.ts +86 -0
  32. package/dist/Launch.d.ts.map +1 -0
  33. package/dist/Launch.js +370 -0
  34. package/dist/Launch.js.map +1 -0
  35. package/dist/Locks.d.ts +39 -0
  36. package/dist/Locks.d.ts.map +1 -0
  37. package/dist/Locks.js +94 -0
  38. package/dist/Locks.js.map +1 -0
  39. package/dist/Routes.d.ts +19 -0
  40. package/dist/Routes.d.ts.map +1 -0
  41. package/dist/Routes.js +38 -0
  42. package/dist/Routes.js.map +1 -0
  43. package/dist/ScriptedChatModel.d.ts +51 -0
  44. package/dist/ScriptedChatModel.d.ts.map +1 -0
  45. package/dist/ScriptedChatModel.js +135 -0
  46. package/dist/ScriptedChatModel.js.map +1 -0
  47. package/dist/SmtpSink.d.ts +36 -0
  48. package/dist/SmtpSink.d.ts.map +1 -0
  49. package/dist/SmtpSink.js +185 -0
  50. package/dist/SmtpSink.js.map +1 -0
  51. package/dist/System.d.ts +271 -0
  52. package/dist/System.d.ts.map +1 -0
  53. package/dist/System.js +908 -0
  54. package/dist/System.js.map +1 -0
  55. package/dist/TcpProxy.d.ts +17 -0
  56. package/dist/TcpProxy.d.ts.map +1 -0
  57. package/dist/TcpProxy.js +100 -0
  58. package/dist/TcpProxy.js.map +1 -0
  59. package/dist/auth/TrustedProxyAuth.d.ts +28 -0
  60. package/dist/auth/TrustedProxyAuth.d.ts.map +1 -0
  61. package/dist/auth/TrustedProxyAuth.js +128 -0
  62. package/dist/auth/TrustedProxyAuth.js.map +1 -0
  63. package/dist/conformance/ActionConsent.d.ts +3 -0
  64. package/dist/conformance/ActionConsent.d.ts.map +1 -0
  65. package/dist/conformance/ActionConsent.js +347 -0
  66. package/dist/conformance/ActionConsent.js.map +1 -0
  67. package/dist/conformance/ActionRegistry.d.ts +64 -0
  68. package/dist/conformance/ActionRegistry.d.ts.map +1 -0
  69. package/dist/conformance/ActionRegistry.js +136 -0
  70. package/dist/conformance/ActionRegistry.js.map +1 -0
  71. package/dist/conformance/Actor.d.ts +43 -0
  72. package/dist/conformance/Actor.d.ts.map +1 -0
  73. package/dist/conformance/Actor.js +171 -0
  74. package/dist/conformance/Actor.js.map +1 -0
  75. package/dist/conformance/AgentReference.d.ts +30 -0
  76. package/dist/conformance/AgentReference.d.ts.map +1 -0
  77. package/dist/conformance/AgentReference.js +137 -0
  78. package/dist/conformance/AgentReference.js.map +1 -0
  79. package/dist/conformance/AgentResources.d.ts +3 -0
  80. package/dist/conformance/AgentResources.d.ts.map +1 -0
  81. package/dist/conformance/AgentResources.js +454 -0
  82. package/dist/conformance/AgentResources.js.map +1 -0
  83. package/dist/conformance/AgentRuntime.d.ts +3 -0
  84. package/dist/conformance/AgentRuntime.d.ts.map +1 -0
  85. package/dist/conformance/AgentRuntime.js +302 -0
  86. package/dist/conformance/AgentRuntime.js.map +1 -0
  87. package/dist/conformance/AgentSubject.d.ts +87 -0
  88. package/dist/conformance/AgentSubject.d.ts.map +1 -0
  89. package/dist/conformance/AgentSubject.js +18 -0
  90. package/dist/conformance/AgentSubject.js.map +1 -0
  91. package/dist/conformance/Approvals.d.ts +3 -0
  92. package/dist/conformance/Approvals.d.ts.map +1 -0
  93. package/dist/conformance/Approvals.js +258 -0
  94. package/dist/conformance/Approvals.js.map +1 -0
  95. package/dist/conformance/Audit.d.ts +3 -0
  96. package/dist/conformance/Audit.d.ts.map +1 -0
  97. package/dist/conformance/Audit.js +221 -0
  98. package/dist/conformance/Audit.js.map +1 -0
  99. package/dist/conformance/CalendarProvider.d.ts +4 -0
  100. package/dist/conformance/CalendarProvider.d.ts.map +1 -0
  101. package/dist/conformance/CalendarProvider.js +108 -0
  102. package/dist/conformance/CalendarProvider.js.map +1 -0
  103. package/dist/conformance/CapabilityKit.d.ts +191 -0
  104. package/dist/conformance/CapabilityKit.d.ts.map +1 -0
  105. package/dist/conformance/CapabilityKit.js +375 -0
  106. package/dist/conformance/CapabilityKit.js.map +1 -0
  107. package/dist/conformance/ClientSDK.d.ts +78 -0
  108. package/dist/conformance/ClientSDK.d.ts.map +1 -0
  109. package/dist/conformance/ClientSDK.js +163 -0
  110. package/dist/conformance/ClientSDK.js.map +1 -0
  111. package/dist/conformance/CollabDocument.d.ts +3 -0
  112. package/dist/conformance/CollabDocument.d.ts.map +1 -0
  113. package/dist/conformance/CollabDocument.js +934 -0
  114. package/dist/conformance/CollabDocument.js.map +1 -0
  115. package/dist/conformance/CollabReference.d.ts +8 -0
  116. package/dist/conformance/CollabReference.d.ts.map +1 -0
  117. package/dist/conformance/CollabReference.js +138 -0
  118. package/dist/conformance/CollabReference.js.map +1 -0
  119. package/dist/conformance/CollabSubject.d.ts +68 -0
  120. package/dist/conformance/CollabSubject.d.ts.map +1 -0
  121. package/dist/conformance/CollabSubject.js +2 -0
  122. package/dist/conformance/CollabSubject.js.map +1 -0
  123. package/dist/conformance/Command.d.ts +3 -0
  124. package/dist/conformance/Command.d.ts.map +1 -0
  125. package/dist/conformance/Command.js +73 -0
  126. package/dist/conformance/Command.js.map +1 -0
  127. package/dist/conformance/Connections.d.ts +4 -0
  128. package/dist/conformance/Connections.d.ts.map +1 -0
  129. package/dist/conformance/Connections.js +308 -0
  130. package/dist/conformance/Connections.js.map +1 -0
  131. package/dist/conformance/ConnectionsReference.d.ts +56 -0
  132. package/dist/conformance/ConnectionsReference.d.ts.map +1 -0
  133. package/dist/conformance/ConnectionsReference.js +74 -0
  134. package/dist/conformance/ConnectionsReference.js.map +1 -0
  135. package/dist/conformance/ConnectorReference.d.ts +86 -0
  136. package/dist/conformance/ConnectorReference.d.ts.map +1 -0
  137. package/dist/conformance/ConnectorReference.js +185 -0
  138. package/dist/conformance/ConnectorReference.js.map +1 -0
  139. package/dist/conformance/ContextAccounting.d.ts +8 -0
  140. package/dist/conformance/ContextAccounting.d.ts.map +1 -0
  141. package/dist/conformance/ContextAccounting.js +125 -0
  142. package/dist/conformance/ContextAccounting.js.map +1 -0
  143. package/dist/conformance/Daemon.d.ts +150 -0
  144. package/dist/conformance/Daemon.d.ts.map +1 -0
  145. package/dist/conformance/Daemon.js +718 -0
  146. package/dist/conformance/Daemon.js.map +1 -0
  147. package/dist/conformance/DaemonReference.d.ts +15 -0
  148. package/dist/conformance/DaemonReference.d.ts.map +1 -0
  149. package/dist/conformance/DaemonReference.js +163 -0
  150. package/dist/conformance/DaemonReference.js.map +1 -0
  151. package/dist/conformance/DbTx.d.ts +17 -0
  152. package/dist/conformance/DbTx.d.ts.map +1 -0
  153. package/dist/conformance/DbTx.js +184 -0
  154. package/dist/conformance/DbTx.js.map +1 -0
  155. package/dist/conformance/DecisionTokens.d.ts +3 -0
  156. package/dist/conformance/DecisionTokens.d.ts.map +1 -0
  157. package/dist/conformance/DecisionTokens.js +551 -0
  158. package/dist/conformance/DecisionTokens.js.map +1 -0
  159. package/dist/conformance/Delegation.d.ts +3 -0
  160. package/dist/conformance/Delegation.d.ts.map +1 -0
  161. package/dist/conformance/Delegation.js +149 -0
  162. package/dist/conformance/Delegation.js.map +1 -0
  163. package/dist/conformance/DeskReference.d.ts +21 -0
  164. package/dist/conformance/DeskReference.d.ts.map +1 -0
  165. package/dist/conformance/DeskReference.js +47 -0
  166. package/dist/conformance/DeskReference.js.map +1 -0
  167. package/dist/conformance/DeviceControl.d.ts +3 -0
  168. package/dist/conformance/DeviceControl.d.ts.map +1 -0
  169. package/dist/conformance/DeviceControl.js +579 -0
  170. package/dist/conformance/DeviceControl.js.map +1 -0
  171. package/dist/conformance/Directory.d.ts +36 -0
  172. package/dist/conformance/Directory.d.ts.map +1 -0
  173. package/dist/conformance/Directory.js +253 -0
  174. package/dist/conformance/Directory.js.map +1 -0
  175. package/dist/conformance/DirectoryProvider.d.ts +4 -0
  176. package/dist/conformance/DirectoryProvider.d.ts.map +1 -0
  177. package/dist/conformance/DirectoryProvider.js +58 -0
  178. package/dist/conformance/DirectoryProvider.js.map +1 -0
  179. package/dist/conformance/DocumentSource.d.ts +4 -0
  180. package/dist/conformance/DocumentSource.d.ts.map +1 -0
  181. package/dist/conformance/DocumentSource.js +43 -0
  182. package/dist/conformance/DocumentSource.js.map +1 -0
  183. package/dist/conformance/EndpointReference.d.ts +40 -0
  184. package/dist/conformance/EndpointReference.d.ts.map +1 -0
  185. package/dist/conformance/EndpointReference.js +67 -0
  186. package/dist/conformance/EndpointReference.js.map +1 -0
  187. package/dist/conformance/Files.d.ts +40 -0
  188. package/dist/conformance/Files.d.ts.map +1 -0
  189. package/dist/conformance/Files.js +592 -0
  190. package/dist/conformance/Files.js.map +1 -0
  191. package/dist/conformance/FilesReference.d.ts +31 -0
  192. package/dist/conformance/FilesReference.d.ts.map +1 -0
  193. package/dist/conformance/FilesReference.js +116 -0
  194. package/dist/conformance/FilesReference.js.map +1 -0
  195. package/dist/conformance/FilesSubject.d.ts +46 -0
  196. package/dist/conformance/FilesSubject.d.ts.map +1 -0
  197. package/dist/conformance/FilesSubject.js +3 -0
  198. package/dist/conformance/FilesSubject.js.map +1 -0
  199. package/dist/conformance/Flags.d.ts +3 -0
  200. package/dist/conformance/Flags.d.ts.map +1 -0
  201. package/dist/conformance/Flags.js +183 -0
  202. package/dist/conformance/Flags.js.map +1 -0
  203. package/dist/conformance/Host.d.ts +64 -0
  204. package/dist/conformance/Host.d.ts.map +1 -0
  205. package/dist/conformance/Host.js +152 -0
  206. package/dist/conformance/Host.js.map +1 -0
  207. package/dist/conformance/HttpApi.d.ts +5 -0
  208. package/dist/conformance/HttpApi.d.ts.map +1 -0
  209. package/dist/conformance/HttpApi.js +131 -0
  210. package/dist/conformance/HttpApi.js.map +1 -0
  211. package/dist/conformance/InboxReference.d.ts +28 -0
  212. package/dist/conformance/InboxReference.d.ts.map +1 -0
  213. package/dist/conformance/InboxReference.js +331 -0
  214. package/dist/conformance/InboxReference.js.map +1 -0
  215. package/dist/conformance/InboxSubject.d.ts +92 -0
  216. package/dist/conformance/InboxSubject.d.ts.map +1 -0
  217. package/dist/conformance/InboxSubject.js +16 -0
  218. package/dist/conformance/InboxSubject.js.map +1 -0
  219. package/dist/conformance/Ingestion.d.ts +10 -0
  220. package/dist/conformance/Ingestion.d.ts.map +1 -0
  221. package/dist/conformance/Ingestion.js +335 -0
  222. package/dist/conformance/Ingestion.js.map +1 -0
  223. package/dist/conformance/Ingress.d.ts +62 -0
  224. package/dist/conformance/Ingress.d.ts.map +1 -0
  225. package/dist/conformance/Ingress.js +346 -0
  226. package/dist/conformance/Ingress.js.map +1 -0
  227. package/dist/conformance/Invocation.d.ts +3 -0
  228. package/dist/conformance/Invocation.d.ts.map +1 -0
  229. package/dist/conformance/Invocation.js +665 -0
  230. package/dist/conformance/Invocation.js.map +1 -0
  231. package/dist/conformance/IsolationMatrix.d.ts +60 -0
  232. package/dist/conformance/IsolationMatrix.d.ts.map +1 -0
  233. package/dist/conformance/IsolationMatrix.js +196 -0
  234. package/dist/conformance/IsolationMatrix.js.map +1 -0
  235. package/dist/conformance/LiveConnection.d.ts +72 -0
  236. package/dist/conformance/LiveConnection.d.ts.map +1 -0
  237. package/dist/conformance/LiveConnection.js +125 -0
  238. package/dist/conformance/LiveConnection.js.map +1 -0
  239. package/dist/conformance/LocalClient.d.ts +70 -0
  240. package/dist/conformance/LocalClient.d.ts.map +1 -0
  241. package/dist/conformance/LocalClient.js +576 -0
  242. package/dist/conformance/LocalClient.js.map +1 -0
  243. package/dist/conformance/Locale.d.ts +28 -0
  244. package/dist/conformance/Locale.d.ts.map +1 -0
  245. package/dist/conformance/Locale.js +115 -0
  246. package/dist/conformance/Locale.js.map +1 -0
  247. package/dist/conformance/MachineIdentity.d.ts +39 -0
  248. package/dist/conformance/MachineIdentity.d.ts.map +1 -0
  249. package/dist/conformance/MachineIdentity.js +595 -0
  250. package/dist/conformance/MachineIdentity.js.map +1 -0
  251. package/dist/conformance/MailProvider.d.ts +4 -0
  252. package/dist/conformance/MailProvider.d.ts.map +1 -0
  253. package/dist/conformance/MailProvider.js +167 -0
  254. package/dist/conformance/MailProvider.js.map +1 -0
  255. package/dist/conformance/Memory.d.ts +10 -0
  256. package/dist/conformance/Memory.d.ts.map +1 -0
  257. package/dist/conformance/Memory.js +179 -0
  258. package/dist/conformance/Memory.js.map +1 -0
  259. package/dist/conformance/Messaging.d.ts +49 -0
  260. package/dist/conformance/Messaging.d.ts.map +1 -0
  261. package/dist/conformance/Messaging.js +117 -0
  262. package/dist/conformance/Messaging.js.map +1 -0
  263. package/dist/conformance/Metering.d.ts +26 -0
  264. package/dist/conformance/Metering.d.ts.map +1 -0
  265. package/dist/conformance/Metering.js +236 -0
  266. package/dist/conformance/Metering.js.map +1 -0
  267. package/dist/conformance/ModelProvider.d.ts +32 -0
  268. package/dist/conformance/ModelProvider.d.ts.map +1 -0
  269. package/dist/conformance/ModelProvider.js +100 -0
  270. package/dist/conformance/ModelProvider.js.map +1 -0
  271. package/dist/conformance/ModuleManifest.d.ts +9 -0
  272. package/dist/conformance/ModuleManifest.d.ts.map +1 -0
  273. package/dist/conformance/ModuleManifest.js +542 -0
  274. package/dist/conformance/ModuleManifest.js.map +1 -0
  275. package/dist/conformance/NotebookAgent.d.ts +32 -0
  276. package/dist/conformance/NotebookAgent.d.ts.map +1 -0
  277. package/dist/conformance/NotebookAgent.js +31 -0
  278. package/dist/conformance/NotebookAgent.js.map +1 -0
  279. package/dist/conformance/NotificationChannel.d.ts +40 -0
  280. package/dist/conformance/NotificationChannel.d.ts.map +1 -0
  281. package/dist/conformance/NotificationChannel.js +78 -0
  282. package/dist/conformance/NotificationChannel.js.map +1 -0
  283. package/dist/conformance/Notifications.d.ts +3 -0
  284. package/dist/conformance/Notifications.d.ts.map +1 -0
  285. package/dist/conformance/Notifications.js +240 -0
  286. package/dist/conformance/Notifications.js.map +1 -0
  287. package/dist/conformance/OAuthClient.d.ts +123 -0
  288. package/dist/conformance/OAuthClient.d.ts.map +1 -0
  289. package/dist/conformance/OAuthClient.js +204 -0
  290. package/dist/conformance/OAuthClient.js.map +1 -0
  291. package/dist/conformance/Outbox.d.ts +3 -0
  292. package/dist/conformance/Outbox.d.ts.map +1 -0
  293. package/dist/conformance/Outbox.js +266 -0
  294. package/dist/conformance/Outbox.js.map +1 -0
  295. package/dist/conformance/PlatformReference.d.ts +5 -0
  296. package/dist/conformance/PlatformReference.d.ts.map +1 -0
  297. package/dist/conformance/PlatformReference.js +66 -0
  298. package/dist/conformance/PlatformReference.js.map +1 -0
  299. package/dist/conformance/PlatformSubject.d.ts +45 -0
  300. package/dist/conformance/PlatformSubject.d.ts.map +1 -0
  301. package/dist/conformance/PlatformSubject.js +3 -0
  302. package/dist/conformance/PlatformSubject.js.map +1 -0
  303. package/dist/conformance/Privacy.d.ts +3 -0
  304. package/dist/conformance/Privacy.d.ts.map +1 -0
  305. package/dist/conformance/Privacy.js +437 -0
  306. package/dist/conformance/Privacy.js.map +1 -0
  307. package/dist/conformance/Progress.d.ts +3 -0
  308. package/dist/conformance/Progress.d.ts.map +1 -0
  309. package/dist/conformance/Progress.js +153 -0
  310. package/dist/conformance/Progress.js.map +1 -0
  311. package/dist/conformance/Push.d.ts +38 -0
  312. package/dist/conformance/Push.d.ts.map +1 -0
  313. package/dist/conformance/Push.js +649 -0
  314. package/dist/conformance/Push.js.map +1 -0
  315. package/dist/conformance/PushReference.d.ts +3 -0
  316. package/dist/conformance/PushReference.d.ts.map +1 -0
  317. package/dist/conformance/PushReference.js +97 -0
  318. package/dist/conformance/PushReference.js.map +1 -0
  319. package/dist/conformance/QuerySurface.d.ts +9 -0
  320. package/dist/conformance/QuerySurface.d.ts.map +1 -0
  321. package/dist/conformance/QuerySurface.js +349 -0
  322. package/dist/conformance/QuerySurface.js.map +1 -0
  323. package/dist/conformance/Readiness.d.ts +23 -0
  324. package/dist/conformance/Readiness.d.ts.map +1 -0
  325. package/dist/conformance/Readiness.js +110 -0
  326. package/dist/conformance/Readiness.js.map +1 -0
  327. package/dist/conformance/Reference.d.ts +17 -0
  328. package/dist/conformance/Reference.d.ts.map +1 -0
  329. package/dist/conformance/Reference.js +246 -0
  330. package/dist/conformance/Reference.js.map +1 -0
  331. package/dist/conformance/Release.d.ts +73 -0
  332. package/dist/conformance/Release.d.ts.map +1 -0
  333. package/dist/conformance/Release.js +556 -0
  334. package/dist/conformance/Release.js.map +1 -0
  335. package/dist/conformance/ReleaseReference.d.ts +5 -0
  336. package/dist/conformance/ReleaseReference.d.ts.map +1 -0
  337. package/dist/conformance/ReleaseReference.js +124 -0
  338. package/dist/conformance/ReleaseReference.js.map +1 -0
  339. package/dist/conformance/ResultRendering.d.ts +3 -0
  340. package/dist/conformance/ResultRendering.d.ts.map +1 -0
  341. package/dist/conformance/ResultRendering.js +120 -0
  342. package/dist/conformance/ResultRendering.js.map +1 -0
  343. package/dist/conformance/Sandbox.d.ts +58 -0
  344. package/dist/conformance/Sandbox.d.ts.map +1 -0
  345. package/dist/conformance/Sandbox.js +213 -0
  346. package/dist/conformance/Sandbox.js.map +1 -0
  347. package/dist/conformance/SandboxReference.d.ts +3 -0
  348. package/dist/conformance/SandboxReference.d.ts.map +1 -0
  349. package/dist/conformance/SandboxReference.js +44 -0
  350. package/dist/conformance/SandboxReference.js.map +1 -0
  351. package/dist/conformance/Scheduler.d.ts +106 -0
  352. package/dist/conformance/Scheduler.d.ts.map +1 -0
  353. package/dist/conformance/Scheduler.js +576 -0
  354. package/dist/conformance/Scheduler.js.map +1 -0
  355. package/dist/conformance/ScreenContext.d.ts +84 -0
  356. package/dist/conformance/ScreenContext.d.ts.map +1 -0
  357. package/dist/conformance/ScreenContext.js +290 -0
  358. package/dist/conformance/ScreenContext.js.map +1 -0
  359. package/dist/conformance/Search.d.ts +3 -0
  360. package/dist/conformance/Search.d.ts.map +1 -0
  361. package/dist/conformance/Search.js +333 -0
  362. package/dist/conformance/Search.js.map +1 -0
  363. package/dist/conformance/Secrets.d.ts +8 -0
  364. package/dist/conformance/Secrets.d.ts.map +1 -0
  365. package/dist/conformance/Secrets.js +231 -0
  366. package/dist/conformance/Secrets.js.map +1 -0
  367. package/dist/conformance/SecretsReference.d.ts +44 -0
  368. package/dist/conformance/SecretsReference.d.ts.map +1 -0
  369. package/dist/conformance/SecretsReference.js +73 -0
  370. package/dist/conformance/SecretsReference.js.map +1 -0
  371. package/dist/conformance/ServicesReference.d.ts +8 -0
  372. package/dist/conformance/ServicesReference.d.ts.map +1 -0
  373. package/dist/conformance/ServicesReference.js +273 -0
  374. package/dist/conformance/ServicesReference.js.map +1 -0
  375. package/dist/conformance/ServicesSubject.d.ts +104 -0
  376. package/dist/conformance/ServicesSubject.d.ts.map +1 -0
  377. package/dist/conformance/ServicesSubject.js +2 -0
  378. package/dist/conformance/ServicesSubject.js.map +1 -0
  379. package/dist/conformance/Settings.d.ts +3 -0
  380. package/dist/conformance/Settings.d.ts.map +1 -0
  381. package/dist/conformance/Settings.js +177 -0
  382. package/dist/conformance/Settings.js.map +1 -0
  383. package/dist/conformance/Sharing.d.ts +3 -0
  384. package/dist/conformance/Sharing.d.ts.map +1 -0
  385. package/dist/conformance/Sharing.js +368 -0
  386. package/dist/conformance/Sharing.js.map +1 -0
  387. package/dist/conformance/ShellSubject.d.ts +29 -0
  388. package/dist/conformance/ShellSubject.d.ts.map +1 -0
  389. package/dist/conformance/ShellSubject.js +13 -0
  390. package/dist/conformance/ShellSubject.js.map +1 -0
  391. package/dist/conformance/SignOutRace.d.ts +23 -0
  392. package/dist/conformance/SignOutRace.d.ts.map +1 -0
  393. package/dist/conformance/SignOutRace.js +49 -0
  394. package/dist/conformance/SignOutRace.js.map +1 -0
  395. package/dist/conformance/Slot.d.ts +3 -0
  396. package/dist/conformance/Slot.d.ts.map +1 -0
  397. package/dist/conformance/Slot.js +79 -0
  398. package/dist/conformance/Slot.js.map +1 -0
  399. package/dist/conformance/Space.d.ts +63 -0
  400. package/dist/conformance/Space.d.ts.map +1 -0
  401. package/dist/conformance/Space.js +294 -0
  402. package/dist/conformance/Space.js.map +1 -0
  403. package/dist/conformance/StorageAdapter.d.ts +76 -0
  404. package/dist/conformance/StorageAdapter.d.ts.map +1 -0
  405. package/dist/conformance/StorageAdapter.js +181 -0
  406. package/dist/conformance/StorageAdapter.js.map +1 -0
  407. package/dist/conformance/StorageBackend.d.ts +23 -0
  408. package/dist/conformance/StorageBackend.d.ts.map +1 -0
  409. package/dist/conformance/StorageBackend.js +274 -0
  410. package/dist/conformance/StorageBackend.js.map +1 -0
  411. package/dist/conformance/Subject.d.ts +198 -0
  412. package/dist/conformance/Subject.d.ts.map +1 -0
  413. package/dist/conformance/Subject.js +26 -0
  414. package/dist/conformance/Subject.js.map +1 -0
  415. package/dist/conformance/Sync.d.ts +3 -0
  416. package/dist/conformance/Sync.d.ts.map +1 -0
  417. package/dist/conformance/Sync.js +190 -0
  418. package/dist/conformance/Sync.js.map +1 -0
  419. package/dist/conformance/Telemetry.d.ts +3 -0
  420. package/dist/conformance/Telemetry.d.ts.map +1 -0
  421. package/dist/conformance/Telemetry.js +218 -0
  422. package/dist/conformance/Telemetry.js.map +1 -0
  423. package/dist/conformance/ThemeTokens.d.ts +22 -0
  424. package/dist/conformance/ThemeTokens.d.ts.map +1 -0
  425. package/dist/conformance/ThemeTokens.js +121 -0
  426. package/dist/conformance/ThemeTokens.js.map +1 -0
  427. package/dist/conformance/ToolSource.d.ts +5 -0
  428. package/dist/conformance/ToolSource.d.ts.map +1 -0
  429. package/dist/conformance/ToolSource.js +520 -0
  430. package/dist/conformance/ToolSource.js.map +1 -0
  431. package/dist/conformance/Versioning.d.ts +3 -0
  432. package/dist/conformance/Versioning.d.ts.map +1 -0
  433. package/dist/conformance/Versioning.js +160 -0
  434. package/dist/conformance/Versioning.js.map +1 -0
  435. package/dist/conformance/View.d.ts +3 -0
  436. package/dist/conformance/View.d.ts.map +1 -0
  437. package/dist/conformance/View.js +121 -0
  438. package/dist/conformance/View.js.map +1 -0
  439. package/dist/conformance/WorkItems.d.ts +3 -0
  440. package/dist/conformance/WorkItems.d.ts.map +1 -0
  441. package/dist/conformance/WorkItems.js +152 -0
  442. package/dist/conformance/WorkItems.js.map +1 -0
  443. package/dist/conformance/Workflow.d.ts +63 -0
  444. package/dist/conformance/Workflow.d.ts.map +1 -0
  445. package/dist/conformance/Workflow.js +235 -0
  446. package/dist/conformance/Workflow.js.map +1 -0
  447. package/dist/conformance/acme/chatlog.d.ts +591 -0
  448. package/dist/conformance/acme/chatlog.d.ts.map +1 -0
  449. package/dist/conformance/acme/chatlog.js +101 -0
  450. package/dist/conformance/acme/chatlog.js.map +1 -0
  451. package/dist/conformance/acme/connector.d.ts +12 -0
  452. package/dist/conformance/acme/connector.d.ts.map +1 -0
  453. package/dist/conformance/acme/connector.js +123 -0
  454. package/dist/conformance/acme/connector.js.map +1 -0
  455. package/dist/conformance/acme/migrations/0000_messages.sql +8 -0
  456. package/dist/conformance/archive/app.d.ts +728 -0
  457. package/dist/conformance/archive/app.d.ts.map +1 -0
  458. package/dist/conformance/archive/app.js +30 -0
  459. package/dist/conformance/archive/app.js.map +1 -0
  460. package/dist/conformance/archive/contract.d.ts +467 -0
  461. package/dist/conformance/archive/contract.d.ts.map +1 -0
  462. package/dist/conformance/archive/contract.js +187 -0
  463. package/dist/conformance/archive/contract.js.map +1 -0
  464. package/dist/conformance/archive/memo.sync.gen.d.ts +148 -0
  465. package/dist/conformance/archive/memo.sync.gen.d.ts.map +1 -0
  466. package/dist/conformance/archive/memo.sync.gen.js +23 -0
  467. package/dist/conformance/archive/memo.sync.gen.js.map +1 -0
  468. package/dist/conformance/archive/migrations/archive/0000_archive.sql +9 -0
  469. package/dist/conformance/archive/migrations/memo/0000_memo.sql +6 -0
  470. package/dist/conformance/archive/schema.d.ts +185 -0
  471. package/dist/conformance/archive/schema.d.ts.map +1 -0
  472. package/dist/conformance/archive/schema.js +22 -0
  473. package/dist/conformance/archive/schema.js.map +1 -0
  474. package/dist/conformance/archive/server.d.ts +273 -0
  475. package/dist/conformance/archive/server.d.ts.map +1 -0
  476. package/dist/conformance/archive/server.js +127 -0
  477. package/dist/conformance/archive/server.js.map +1 -0
  478. package/dist/conformance/archive/sync.gen.d.ts +319 -0
  479. package/dist/conformance/archive/sync.gen.d.ts.map +1 -0
  480. package/dist/conformance/archive/sync.gen.js +29 -0
  481. package/dist/conformance/archive/sync.gen.js.map +1 -0
  482. package/dist/conformance/atlas/app.d.ts +3 -0
  483. package/dist/conformance/atlas/app.d.ts.map +1 -0
  484. package/dist/conformance/atlas/app.js +15 -0
  485. package/dist/conformance/atlas/app.js.map +1 -0
  486. package/dist/conformance/atlas/contract.d.ts +489 -0
  487. package/dist/conformance/atlas/contract.d.ts.map +1 -0
  488. package/dist/conformance/atlas/contract.js +114 -0
  489. package/dist/conformance/atlas/contract.js.map +1 -0
  490. package/dist/conformance/crm/app.d.ts +304 -0
  491. package/dist/conformance/crm/app.d.ts.map +1 -0
  492. package/dist/conformance/crm/app.js +95 -0
  493. package/dist/conformance/crm/app.js.map +1 -0
  494. package/dist/conformance/crm/contract.d.ts +586 -0
  495. package/dist/conformance/crm/contract.d.ts.map +1 -0
  496. package/dist/conformance/crm/contract.js +153 -0
  497. package/dist/conformance/crm/contract.js.map +1 -0
  498. package/dist/conformance/crm/migrations/crm/0000_crm.sql +18 -0
  499. package/dist/conformance/crm/migrations/team/0000_team.sql +6 -0
  500. package/dist/conformance/crm/schema.d.ts +261 -0
  501. package/dist/conformance/crm/schema.d.ts.map +1 -0
  502. package/dist/conformance/crm/schema.js +25 -0
  503. package/dist/conformance/crm/schema.js.map +1 -0
  504. package/dist/conformance/crm/sync.gen.d.ts +188 -0
  505. package/dist/conformance/crm/sync.gen.d.ts.map +1 -0
  506. package/dist/conformance/crm/sync.gen.js +25 -0
  507. package/dist/conformance/crm/sync.gen.js.map +1 -0
  508. package/dist/conformance/desk/contract.d.ts +306 -0
  509. package/dist/conformance/desk/contract.d.ts.map +1 -0
  510. package/dist/conformance/desk/contract.js +56 -0
  511. package/dist/conformance/desk/contract.js.map +1 -0
  512. package/dist/conformance/desk/migrations/0000_notes.sql +7 -0
  513. package/dist/conformance/desk/server.d.ts +231 -0
  514. package/dist/conformance/desk/server.d.ts.map +1 -0
  515. package/dist/conformance/desk/server.js +123 -0
  516. package/dist/conformance/desk/server.js.map +1 -0
  517. package/dist/conformance/drafts/migrations/0000_drafts.sql +8 -0
  518. package/dist/conformance/drafts/module.d.ts +571 -0
  519. package/dist/conformance/drafts/module.d.ts.map +1 -0
  520. package/dist/conformance/drafts/module.js +190 -0
  521. package/dist/conformance/drafts/module.js.map +1 -0
  522. package/dist/conformance/fixture/app.d.ts +24 -0
  523. package/dist/conformance/fixture/app.d.ts.map +1 -0
  524. package/dist/conformance/fixture/app.js +26 -0
  525. package/dist/conformance/fixture/app.js.map +1 -0
  526. package/dist/conformance/fixture/docs/bad-sync.d.ts +105 -0
  527. package/dist/conformance/fixture/docs/bad-sync.d.ts.map +1 -0
  528. package/dist/conformance/fixture/docs/bad-sync.js +22 -0
  529. package/dist/conformance/fixture/docs/bad-sync.js.map +1 -0
  530. package/dist/conformance/fixture/docs/contract.d.ts +1091 -0
  531. package/dist/conformance/fixture/docs/contract.d.ts.map +1 -0
  532. package/dist/conformance/fixture/docs/contract.js +277 -0
  533. package/dist/conformance/fixture/docs/contract.js.map +1 -0
  534. package/dist/conformance/fixture/docs/migrations/0000_docs.sql +9 -0
  535. package/dist/conformance/fixture/docs/migrations/0001_seen.sql +12 -0
  536. package/dist/conformance/fixture/docs/migrations/0002_attachment.sql +6 -0
  537. package/dist/conformance/fixture/docs/policy.cedar +110 -0
  538. package/dist/conformance/fixture/docs/schema.d.ts +308 -0
  539. package/dist/conformance/fixture/docs/schema.d.ts.map +1 -0
  540. package/dist/conformance/fixture/docs/schema.js +36 -0
  541. package/dist/conformance/fixture/docs/schema.js.map +1 -0
  542. package/dist/conformance/fixture/docs/server.d.ts +552 -0
  543. package/dist/conformance/fixture/docs/server.d.ts.map +1 -0
  544. package/dist/conformance/fixture/docs/server.js +192 -0
  545. package/dist/conformance/fixture/docs/server.js.map +1 -0
  546. package/dist/conformance/fixture/docs/sync.d.ts +402 -0
  547. package/dist/conformance/fixture/docs/sync.d.ts.map +1 -0
  548. package/dist/conformance/fixture/docs/sync.gen.d.ts +574 -0
  549. package/dist/conformance/fixture/docs/sync.gen.d.ts.map +1 -0
  550. package/dist/conformance/fixture/docs/sync.gen.js +48 -0
  551. package/dist/conformance/fixture/docs/sync.gen.js.map +1 -0
  552. package/dist/conformance/fixture/docs/sync.js +23 -0
  553. package/dist/conformance/fixture/docs/sync.js.map +1 -0
  554. package/dist/conformance/fixture/peer/migrations/0000_peer.sql +8 -0
  555. package/dist/conformance/fixture/peer/module.d.ts +306 -0
  556. package/dist/conformance/fixture/peer/module.d.ts.map +1 -0
  557. package/dist/conformance/fixture/peer/module.js +44 -0
  558. package/dist/conformance/fixture/peer/module.js.map +1 -0
  559. package/dist/conformance/fixture/release/blocking/0000_item.sql +3 -0
  560. package/dist/conformance/fixture/release/blocking/0001_wait.sql +2 -0
  561. package/dist/conformance/fixture/release/blocking-renamed/0000_item.sql +3 -0
  562. package/dist/conformance/fixture/release/blocking-renamed/0001_wait.sql +5 -0
  563. package/dist/conformance/fixture/release/broken/0000_item.sql +3 -0
  564. package/dist/conformance/fixture/release/broken/0001_extra.sql +3 -0
  565. package/dist/conformance/fixture/release/broken/0002_label.sql +3 -0
  566. package/dist/conformance/fixture/release/drift/escalate/0000_item.sql +5 -0
  567. package/dist/conformance/fixture/release/drift/escalate/0001_escalate.sql +8 -0
  568. package/dist/conformance/fixture/release/drift/v1/0000_item.sql +5 -0
  569. package/dist/conformance/fixture/release/escape/0000_item.sql +3 -0
  570. package/dist/conformance/fixture/release/escape/0001_escape.sql +5 -0
  571. package/dist/conformance/fixture/release/misnamed/0000_item.sql +3 -0
  572. package/dist/conformance/fixture/release/misnamed/0001_misname.sql +10 -0
  573. package/dist/conformance/fixture/release/module.d.ts +1878 -0
  574. package/dist/conformance/fixture/release/module.d.ts.map +1 -0
  575. package/dist/conformance/fixture/release/module.js +102 -0
  576. package/dist/conformance/fixture/release/module.js.map +1 -0
  577. package/dist/conformance/fixture/release/outside/0000_item.sql +3 -0
  578. package/dist/conformance/fixture/release/outside/0001_extra.sql +3 -0
  579. package/dist/conformance/fixture/release/outside/0002_index.sql +4 -0
  580. package/dist/conformance/fixture/release/outside/0003_later.sql +1 -0
  581. package/dist/conformance/fixture/release/renamed/0000_item.sql +3 -0
  582. package/dist/conformance/fixture/release/renamed/0001_misname.sql +10 -0
  583. package/dist/conformance/fixture/release/renamed/0002_restore.sql +1 -0
  584. package/dist/conformance/fixture/release/rogue/0000_item.sql +3 -0
  585. package/dist/conformance/fixture/release/rogue/0001_extra.sql +3 -0
  586. package/dist/conformance/fixture/release/rogue/0002_definer.sql +1 -0
  587. package/dist/conformance/fixture/release/slow/0000_item.sql +5 -0
  588. package/dist/conformance/fixture/release/undeclared/0000_item.sql +3 -0
  589. package/dist/conformance/fixture/release/undeclared/0001_extra.sql +3 -0
  590. package/dist/conformance/fixture/release/undeclared/0002_index.sql +1 -0
  591. package/dist/conformance/fixture/release/v1/0000_item.sql +3 -0
  592. package/dist/conformance/fixture/release/v2/0000_item.sql +3 -0
  593. package/dist/conformance/fixture/release/v2/0001_extra.sql +3 -0
  594. package/dist/conformance/fixture/release/v2/0002_label.sql +3 -0
  595. package/dist/conformance/fixture/release/viewed-retyped/0000_item.sql +3 -0
  596. package/dist/conformance/fixture/release/viewed-retyped/0001_retype.sql +1 -0
  597. package/dist/conformance/kit-hash.d.ts +8 -0
  598. package/dist/conformance/kit-hash.d.ts.map +1 -0
  599. package/dist/conformance/kit-hash.js +20 -0
  600. package/dist/conformance/kit-hash.js.map +1 -0
  601. package/dist/conformance/ledger/contract.d.ts +380 -0
  602. package/dist/conformance/ledger/contract.d.ts.map +1 -0
  603. package/dist/conformance/ledger/contract.js +81 -0
  604. package/dist/conformance/ledger/contract.js.map +1 -0
  605. package/dist/conformance/ledger/migrations/0000_entries.sql +8 -0
  606. package/dist/conformance/ledger/server.d.ts +312 -0
  607. package/dist/conformance/ledger/server.d.ts.map +1 -0
  608. package/dist/conformance/ledger/server.js +152 -0
  609. package/dist/conformance/ledger/server.js.map +1 -0
  610. package/dist/conformance/library/app.d.ts +616 -0
  611. package/dist/conformance/library/app.d.ts.map +1 -0
  612. package/dist/conformance/library/app.js +35 -0
  613. package/dist/conformance/library/app.js.map +1 -0
  614. package/dist/conformance/library/contract.d.ts +377 -0
  615. package/dist/conformance/library/contract.d.ts.map +1 -0
  616. package/dist/conformance/library/contract.js +63 -0
  617. package/dist/conformance/library/contract.js.map +1 -0
  618. package/dist/conformance/library/migrations/0000_library.sql +14 -0
  619. package/dist/conformance/library/schema.d.ts +174 -0
  620. package/dist/conformance/library/schema.d.ts.map +1 -0
  621. package/dist/conformance/library/schema.js +24 -0
  622. package/dist/conformance/library/schema.js.map +1 -0
  623. package/dist/conformance/library/server.d.ts +191 -0
  624. package/dist/conformance/library/server.d.ts.map +1 -0
  625. package/dist/conformance/library/server.js +52 -0
  626. package/dist/conformance/library/server.js.map +1 -0
  627. package/dist/conformance/library/sync.gen.d.ts +519 -0
  628. package/dist/conformance/library/sync.gen.d.ts.map +1 -0
  629. package/dist/conformance/library/sync.gen.js +42 -0
  630. package/dist/conformance/library/sync.gen.js.map +1 -0
  631. package/dist/conformance/locale/catalog.d.ts +93 -0
  632. package/dist/conformance/locale/catalog.d.ts.map +1 -0
  633. package/dist/conformance/locale/catalog.js +104 -0
  634. package/dist/conformance/locale/catalog.js.map +1 -0
  635. package/dist/conformance/notebook/app.d.ts +1039 -0
  636. package/dist/conformance/notebook/app.d.ts.map +1 -0
  637. package/dist/conformance/notebook/app.js +88 -0
  638. package/dist/conformance/notebook/app.js.map +1 -0
  639. package/dist/conformance/notebook/evals/pages.evals.json +94 -0
  640. package/dist/conformance/notebook/migrations/0000_notebook.sql +10 -0
  641. package/dist/conformance/notebook/module.d.ts +717 -0
  642. package/dist/conformance/notebook/module.d.ts.map +1 -0
  643. package/dist/conformance/notebook/module.js +188 -0
  644. package/dist/conformance/notebook/module.js.map +1 -0
  645. package/dist/conformance/pad/app.d.ts +9 -0
  646. package/dist/conformance/pad/app.d.ts.map +1 -0
  647. package/dist/conformance/pad/app.js +13 -0
  648. package/dist/conformance/pad/app.js.map +1 -0
  649. package/dist/conformance/pad/contract.d.ts +281 -0
  650. package/dist/conformance/pad/contract.d.ts.map +1 -0
  651. package/dist/conformance/pad/contract.js +66 -0
  652. package/dist/conformance/pad/contract.js.map +1 -0
  653. package/dist/conformance/pad/migrations/pad/0000_pad.sql +8 -0
  654. package/dist/conformance/pad/migrations/pad/0001_live_copy.sql +2 -0
  655. package/dist/conformance/pad/schema.d.ts +127 -0
  656. package/dist/conformance/pad/schema.d.ts.map +1 -0
  657. package/dist/conformance/pad/schema.js +17 -0
  658. package/dist/conformance/pad/schema.js.map +1 -0
  659. package/dist/conformance/pad/server.d.ts +149 -0
  660. package/dist/conformance/pad/server.d.ts.map +1 -0
  661. package/dist/conformance/pad/server.js +81 -0
  662. package/dist/conformance/pad/server.js.map +1 -0
  663. package/dist/conformance/purchases/app.d.ts +480 -0
  664. package/dist/conformance/purchases/app.d.ts.map +1 -0
  665. package/dist/conformance/purchases/app.js +32 -0
  666. package/dist/conformance/purchases/app.js.map +1 -0
  667. package/dist/conformance/purchases/contract.d.ts +720 -0
  668. package/dist/conformance/purchases/contract.d.ts.map +1 -0
  669. package/dist/conformance/purchases/contract.js +148 -0
  670. package/dist/conformance/purchases/contract.js.map +1 -0
  671. package/dist/conformance/purchases/migrations/0000_purchases.sql +17 -0
  672. package/dist/conformance/purchases/server.d.ts +250 -0
  673. package/dist/conformance/purchases/server.d.ts.map +1 -0
  674. package/dist/conformance/purchases/server.js +85 -0
  675. package/dist/conformance/purchases/server.js.map +1 -0
  676. package/dist/conformance/studio/app.d.ts +996 -0
  677. package/dist/conformance/studio/app.d.ts.map +1 -0
  678. package/dist/conformance/studio/app.js +251 -0
  679. package/dist/conformance/studio/app.js.map +1 -0
  680. package/dist/conformance/studio/contract.d.ts +1318 -0
  681. package/dist/conformance/studio/contract.d.ts.map +1 -0
  682. package/dist/conformance/studio/contract.js +280 -0
  683. package/dist/conformance/studio/contract.js.map +1 -0
  684. package/dist/conformance/studio/migrations/billing/0000_billing.sql +6 -0
  685. package/dist/conformance/studio/migrations/journal/0000_journal.sql +9 -0
  686. package/dist/conformance/studio/migrations/mailbox/0000_mailbox.sql +7 -0
  687. package/dist/conformance/studio/migrations/tasks/0000_tasks.sql +7 -0
  688. package/dist/conformance/workshop/app.d.ts +8 -0
  689. package/dist/conformance/workshop/app.d.ts.map +1 -0
  690. package/dist/conformance/workshop/app.js +13 -0
  691. package/dist/conformance/workshop/app.js.map +1 -0
  692. package/dist/conformance/workshop/migrations/0000_notes.sql +7 -0
  693. package/dist/conformance/workshop/module.d.ts +407 -0
  694. package/dist/conformance/workshop/module.d.ts.map +1 -0
  695. package/dist/conformance/workshop/module.js +71 -0
  696. package/dist/conformance/workshop/module.js.map +1 -0
  697. package/dist/fakes/AcmeFake.d.ts +46 -0
  698. package/dist/fakes/AcmeFake.d.ts.map +1 -0
  699. package/dist/fakes/AcmeFake.js +131 -0
  700. package/dist/fakes/AcmeFake.js.map +1 -0
  701. package/dist/fakes/ApnsFake.d.ts +79 -0
  702. package/dist/fakes/ApnsFake.d.ts.map +1 -0
  703. package/dist/fakes/ApnsFake.js +220 -0
  704. package/dist/fakes/ApnsFake.js.map +1 -0
  705. package/dist/fakes/FcmFake.d.ts +46 -0
  706. package/dist/fakes/FcmFake.d.ts.map +1 -0
  707. package/dist/fakes/FcmFake.js +185 -0
  708. package/dist/fakes/FcmFake.js.map +1 -0
  709. package/dist/fakes/GoogleFake.d.ts +221 -0
  710. package/dist/fakes/GoogleFake.d.ts.map +1 -0
  711. package/dist/fakes/GoogleFake.js +1035 -0
  712. package/dist/fakes/GoogleFake.js.map +1 -0
  713. package/dist/fakes/HttpApiFake.d.ts +22 -0
  714. package/dist/fakes/HttpApiFake.d.ts.map +1 -0
  715. package/dist/fakes/HttpApiFake.js +74 -0
  716. package/dist/fakes/HttpApiFake.js.map +1 -0
  717. package/dist/fakes/McpFake.d.ts +80 -0
  718. package/dist/fakes/McpFake.d.ts.map +1 -0
  719. package/dist/fakes/McpFake.js +312 -0
  720. package/dist/fakes/McpFake.js.map +1 -0
  721. package/dist/fakes/MicrosoftGraphFake.d.ts +254 -0
  722. package/dist/fakes/MicrosoftGraphFake.d.ts.map +1 -0
  723. package/dist/fakes/MicrosoftGraphFake.js +850 -0
  724. package/dist/fakes/MicrosoftGraphFake.js.map +1 -0
  725. package/dist/fakes/S3Fake.d.ts +29 -0
  726. package/dist/fakes/S3Fake.d.ts.map +1 -0
  727. package/dist/fakes/S3Fake.js +347 -0
  728. package/dist/fakes/S3Fake.js.map +1 -0
  729. package/dist/fakes/Server.d.ts +137 -0
  730. package/dist/fakes/Server.d.ts.map +1 -0
  731. package/dist/fakes/Server.js +357 -0
  732. package/dist/fakes/Server.js.map +1 -0
  733. package/dist/fakes/SignInProviderFake.d.ts +21 -0
  734. package/dist/fakes/SignInProviderFake.d.ts.map +1 -0
  735. package/dist/fakes/SignInProviderFake.js +56 -0
  736. package/dist/fakes/SignInProviderFake.js.map +1 -0
  737. package/dist/fakes/SlackFake.d.ts +136 -0
  738. package/dist/fakes/SlackFake.d.ts.map +1 -0
  739. package/dist/fakes/SlackFake.js +787 -0
  740. package/dist/fakes/SlackFake.js.map +1 -0
  741. package/dist/fakes/Store.d.ts +40 -0
  742. package/dist/fakes/Store.d.ts.map +1 -0
  743. package/dist/fakes/Store.js +82 -0
  744. package/dist/fakes/Store.js.map +1 -0
  745. package/dist/fakes/TelemetryFakes.d.ts +77 -0
  746. package/dist/fakes/TelemetryFakes.d.ts.map +1 -0
  747. package/dist/fakes/TelemetryFakes.js +121 -0
  748. package/dist/fakes/TelemetryFakes.js.map +1 -0
  749. package/dist/fakes/TestCa.d.ts +11 -0
  750. package/dist/fakes/TestCa.d.ts.map +1 -0
  751. package/dist/fakes/TestCa.js +115 -0
  752. package/dist/fakes/TestCa.js.map +1 -0
  753. package/dist/fakes/WorkOsFake.d.ts +40 -0
  754. package/dist/fakes/WorkOsFake.d.ts.map +1 -0
  755. package/dist/fakes/WorkOsFake.js +103 -0
  756. package/dist/fakes/WorkOsFake.js.map +1 -0
  757. package/dist/index.d.ts +10 -0
  758. package/dist/index.d.ts.map +1 -0
  759. package/dist/index.js +10 -0
  760. package/dist/index.js.map +1 -0
  761. package/dist/make/reference.d.ts +520 -0
  762. package/dist/make/reference.d.ts.map +1 -0
  763. package/dist/make/reference.js +182 -0
  764. package/dist/make/reference.js.map +1 -0
  765. package/dist/make/sources.d.ts +48 -0
  766. package/dist/make/sources.d.ts.map +1 -0
  767. package/dist/make/sources.js +806 -0
  768. package/dist/make/sources.js.map +1 -0
  769. package/package.json +77 -3
  770. package/src/Admin.ts +82 -0
  771. package/src/Agent.ts +289 -0
  772. package/src/AgentSurface.ts +51 -0
  773. package/src/Embedder.ts +69 -0
  774. package/src/EvalMain.ts +81 -0
  775. package/src/Evals.ts +490 -0
  776. package/src/Kernel.ts +228 -0
  777. package/src/Launch.ts +428 -0
  778. package/src/Locks.ts +123 -0
  779. package/src/Routes.ts +65 -0
  780. package/src/ScriptedChatModel.ts +189 -0
  781. package/src/SmtpSink.ts +205 -0
  782. package/src/System.ts +1075 -0
  783. package/src/TcpProxy.ts +102 -0
  784. package/src/auth/TrustedProxyAuth.ts +173 -0
  785. package/src/conformance/ActionConsent.ts +437 -0
  786. package/src/conformance/ActionRegistry.ts +174 -0
  787. package/src/conformance/Actor.ts +216 -0
  788. package/src/conformance/AgentReference.ts +171 -0
  789. package/src/conformance/AgentResources.ts +548 -0
  790. package/src/conformance/AgentRuntime.ts +388 -0
  791. package/src/conformance/AgentSubject.ts +103 -0
  792. package/src/conformance/Approvals.ts +363 -0
  793. package/src/conformance/Audit.ts +257 -0
  794. package/src/conformance/CalendarProvider.ts +156 -0
  795. package/src/conformance/CapabilityKit.ts +564 -0
  796. package/src/conformance/ClientSDK.ts +233 -0
  797. package/src/conformance/CollabDocument.ts +1203 -0
  798. package/src/conformance/CollabReference.ts +152 -0
  799. package/src/conformance/CollabSubject.ts +64 -0
  800. package/src/conformance/Command.ts +75 -0
  801. package/src/conformance/Connections.ts +357 -0
  802. package/src/conformance/ConnectionsReference.ts +172 -0
  803. package/src/conformance/ConnectorReference.ts +280 -0
  804. package/src/conformance/ContextAccounting.ts +169 -0
  805. package/src/conformance/Daemon.ts +936 -0
  806. package/src/conformance/DaemonReference.ts +189 -0
  807. package/src/conformance/DbTx.ts +253 -0
  808. package/src/conformance/DecisionTokens.ts +652 -0
  809. package/src/conformance/Delegation.ts +177 -0
  810. package/src/conformance/DeskReference.ts +73 -0
  811. package/src/conformance/DeviceControl.ts +700 -0
  812. package/src/conformance/Directory.ts +315 -0
  813. package/src/conformance/DirectoryProvider.ts +72 -0
  814. package/src/conformance/DocumentSource.ts +62 -0
  815. package/src/conformance/EndpointReference.ts +117 -0
  816. package/src/conformance/Files.ts +685 -0
  817. package/src/conformance/FilesReference.ts +154 -0
  818. package/src/conformance/FilesSubject.ts +50 -0
  819. package/src/conformance/Flags.ts +215 -0
  820. package/src/conformance/Host.ts +197 -0
  821. package/src/conformance/HttpApi.ts +169 -0
  822. package/src/conformance/InboxReference.ts +401 -0
  823. package/src/conformance/InboxSubject.ts +101 -0
  824. package/src/conformance/Ingestion.ts +425 -0
  825. package/src/conformance/Ingress.ts +498 -0
  826. package/src/conformance/Invocation.ts +780 -0
  827. package/src/conformance/IsolationMatrix.ts +215 -0
  828. package/src/conformance/LiveConnection.ts +197 -0
  829. package/src/conformance/LocalClient.ts +707 -0
  830. package/src/conformance/Locale.ts +141 -0
  831. package/src/conformance/MachineIdentity.ts +828 -0
  832. package/src/conformance/MailProvider.ts +217 -0
  833. package/src/conformance/Memory.ts +223 -0
  834. package/src/conformance/Messaging.ts +185 -0
  835. package/src/conformance/Metering.ts +293 -0
  836. package/src/conformance/ModelProvider.ts +139 -0
  837. package/src/conformance/ModuleManifest.ts +630 -0
  838. package/src/conformance/NotebookAgent.ts +41 -0
  839. package/src/conformance/NotificationChannel.ts +122 -0
  840. package/src/conformance/Notifications.ts +316 -0
  841. package/src/conformance/OAuthClient.ts +240 -0
  842. package/src/conformance/Outbox.ts +342 -0
  843. package/src/conformance/PlatformReference.ts +73 -0
  844. package/src/conformance/PlatformSubject.ts +50 -0
  845. package/src/conformance/Privacy.ts +577 -0
  846. package/src/conformance/Progress.ts +244 -0
  847. package/src/conformance/Push.ts +820 -0
  848. package/src/conformance/PushReference.ts +101 -0
  849. package/src/conformance/QuerySurface.ts +408 -0
  850. package/src/conformance/Readiness.ts +157 -0
  851. package/src/conformance/Reference.ts +326 -0
  852. package/src/conformance/Release.ts +690 -0
  853. package/src/conformance/ReleaseReference.ts +179 -0
  854. package/src/conformance/ResultRendering.ts +149 -0
  855. package/src/conformance/Sandbox.ts +313 -0
  856. package/src/conformance/SandboxReference.ts +52 -0
  857. package/src/conformance/Scheduler.ts +764 -0
  858. package/src/conformance/ScreenContext.ts +402 -0
  859. package/src/conformance/Search.ts +419 -0
  860. package/src/conformance/Secrets.ts +277 -0
  861. package/src/conformance/SecretsReference.ts +131 -0
  862. package/src/conformance/ServicesReference.ts +330 -0
  863. package/src/conformance/ServicesSubject.ts +105 -0
  864. package/src/conformance/Settings.ts +204 -0
  865. package/src/conformance/Sharing.ts +486 -0
  866. package/src/conformance/ShellSubject.ts +47 -0
  867. package/src/conformance/SignOutRace.ts +77 -0
  868. package/src/conformance/Slot.ts +84 -0
  869. package/src/conformance/Space.ts +432 -0
  870. package/src/conformance/StorageAdapter.ts +253 -0
  871. package/src/conformance/StorageBackend.ts +327 -0
  872. package/src/conformance/Subject.ts +208 -0
  873. package/src/conformance/Sync.ts +215 -0
  874. package/src/conformance/Telemetry.ts +287 -0
  875. package/src/conformance/ThemeTokens.ts +163 -0
  876. package/src/conformance/ToolSource.ts +632 -0
  877. package/src/conformance/Versioning.ts +199 -0
  878. package/src/conformance/View.ts +143 -0
  879. package/src/conformance/WorkItems.ts +186 -0
  880. package/src/conformance/Workflow.ts +304 -0
  881. package/src/conformance/acme/chatlog.ts +115 -0
  882. package/src/conformance/acme/connector.ts +151 -0
  883. package/src/conformance/acme/migrations/0000_messages.sql +8 -0
  884. package/src/conformance/archive/app.ts +33 -0
  885. package/src/conformance/archive/contract.ts +191 -0
  886. package/src/conformance/archive/memo.sync.gen.ts +25 -0
  887. package/src/conformance/archive/migrations/archive/0000_archive.sql +9 -0
  888. package/src/conformance/archive/migrations/memo/0000_memo.sql +6 -0
  889. package/src/conformance/archive/schema.ts +25 -0
  890. package/src/conformance/archive/server.ts +146 -0
  891. package/src/conformance/archive/sync.gen.ts +32 -0
  892. package/src/conformance/atlas/app.ts +16 -0
  893. package/src/conformance/atlas/contract.ts +118 -0
  894. package/src/conformance/crm/app.ts +107 -0
  895. package/src/conformance/crm/contract.ts +163 -0
  896. package/src/conformance/crm/migrations/crm/0000_crm.sql +18 -0
  897. package/src/conformance/crm/migrations/team/0000_team.sql +6 -0
  898. package/src/conformance/crm/schema.ts +28 -0
  899. package/src/conformance/crm/sync.gen.ts +27 -0
  900. package/src/conformance/desk/contract.ts +61 -0
  901. package/src/conformance/desk/migrations/0000_notes.sql +7 -0
  902. package/src/conformance/desk/server.ts +131 -0
  903. package/src/conformance/drafts/migrations/0000_drafts.sql +8 -0
  904. package/src/conformance/drafts/module.ts +211 -0
  905. package/src/conformance/fixture/app.ts +37 -0
  906. package/src/conformance/fixture/docs/bad-sync.ts +34 -0
  907. package/src/conformance/fixture/docs/contract.ts +297 -0
  908. package/src/conformance/fixture/docs/migrations/0000_docs.sql +9 -0
  909. package/src/conformance/fixture/docs/migrations/0001_seen.sql +12 -0
  910. package/src/conformance/fixture/docs/migrations/0002_attachment.sql +6 -0
  911. package/src/conformance/fixture/docs/policy.cedar +110 -0
  912. package/src/conformance/fixture/docs/schema.ts +41 -0
  913. package/src/conformance/fixture/docs/server.ts +292 -0
  914. package/src/conformance/fixture/docs/sync.gen.ts +54 -0
  915. package/src/conformance/fixture/docs/sync.ts +24 -0
  916. package/src/conformance/fixture/peer/migrations/0000_peer.sql +8 -0
  917. package/src/conformance/fixture/peer/module.ts +51 -0
  918. package/src/conformance/fixture/release/blocking/0000_item.sql +3 -0
  919. package/src/conformance/fixture/release/blocking/0001_wait.sql +2 -0
  920. package/src/conformance/fixture/release/blocking-renamed/0000_item.sql +3 -0
  921. package/src/conformance/fixture/release/blocking-renamed/0001_wait.sql +5 -0
  922. package/src/conformance/fixture/release/broken/0000_item.sql +3 -0
  923. package/src/conformance/fixture/release/broken/0001_extra.sql +3 -0
  924. package/src/conformance/fixture/release/broken/0002_label.sql +3 -0
  925. package/src/conformance/fixture/release/drift/escalate/0000_item.sql +5 -0
  926. package/src/conformance/fixture/release/drift/escalate/0001_escalate.sql +8 -0
  927. package/src/conformance/fixture/release/drift/v1/0000_item.sql +5 -0
  928. package/src/conformance/fixture/release/escape/0000_item.sql +3 -0
  929. package/src/conformance/fixture/release/escape/0001_escape.sql +5 -0
  930. package/src/conformance/fixture/release/misnamed/0000_item.sql +3 -0
  931. package/src/conformance/fixture/release/misnamed/0001_misname.sql +10 -0
  932. package/src/conformance/fixture/release/module.ts +119 -0
  933. package/src/conformance/fixture/release/outside/0000_item.sql +3 -0
  934. package/src/conformance/fixture/release/outside/0001_extra.sql +3 -0
  935. package/src/conformance/fixture/release/outside/0002_index.sql +4 -0
  936. package/src/conformance/fixture/release/outside/0003_later.sql +1 -0
  937. package/src/conformance/fixture/release/renamed/0000_item.sql +3 -0
  938. package/src/conformance/fixture/release/renamed/0001_misname.sql +10 -0
  939. package/src/conformance/fixture/release/renamed/0002_restore.sql +1 -0
  940. package/src/conformance/fixture/release/rogue/0000_item.sql +3 -0
  941. package/src/conformance/fixture/release/rogue/0001_extra.sql +3 -0
  942. package/src/conformance/fixture/release/rogue/0002_definer.sql +1 -0
  943. package/src/conformance/fixture/release/slow/0000_item.sql +5 -0
  944. package/src/conformance/fixture/release/undeclared/0000_item.sql +3 -0
  945. package/src/conformance/fixture/release/undeclared/0001_extra.sql +3 -0
  946. package/src/conformance/fixture/release/undeclared/0002_index.sql +1 -0
  947. package/src/conformance/fixture/release/v1/0000_item.sql +3 -0
  948. package/src/conformance/fixture/release/v2/0000_item.sql +3 -0
  949. package/src/conformance/fixture/release/v2/0001_extra.sql +3 -0
  950. package/src/conformance/fixture/release/v2/0002_label.sql +3 -0
  951. package/src/conformance/fixture/release/viewed-retyped/0000_item.sql +3 -0
  952. package/src/conformance/fixture/release/viewed-retyped/0001_retype.sql +1 -0
  953. package/src/conformance/kit-hash.ts +18 -0
  954. package/src/conformance/ledger/contract.ts +92 -0
  955. package/src/conformance/ledger/migrations/0000_entries.sql +8 -0
  956. package/src/conformance/ledger/server.ts +174 -0
  957. package/src/conformance/library/app.ts +38 -0
  958. package/src/conformance/library/contract.ts +66 -0
  959. package/src/conformance/library/migrations/0000_library.sql +14 -0
  960. package/src/conformance/library/schema.ts +27 -0
  961. package/src/conformance/library/server.ts +65 -0
  962. package/src/conformance/library/sync.gen.ts +47 -0
  963. package/src/conformance/locale/catalog.ts +111 -0
  964. package/src/conformance/notebook/app.ts +115 -0
  965. package/src/conformance/notebook/evals/pages.evals.json +94 -0
  966. package/src/conformance/notebook/migrations/0000_notebook.sql +10 -0
  967. package/src/conformance/notebook/module.ts +215 -0
  968. package/src/conformance/notebook/skills/meeting-notes.md +4 -0
  969. package/src/conformance/pad/app.ts +21 -0
  970. package/src/conformance/pad/contract.ts +69 -0
  971. package/src/conformance/pad/migrations/pad/0000_pad.sql +8 -0
  972. package/src/conformance/pad/migrations/pad/0001_live_copy.sql +2 -0
  973. package/src/conformance/pad/schema.ts +18 -0
  974. package/src/conformance/pad/server.ts +102 -0
  975. package/src/conformance/purchases/app.ts +34 -0
  976. package/src/conformance/purchases/contract.ts +161 -0
  977. package/src/conformance/purchases/migrations/0000_purchases.sql +17 -0
  978. package/src/conformance/purchases/server.ts +95 -0
  979. package/src/conformance/replica-search.mjs +22 -0
  980. package/src/conformance/studio/app.ts +298 -0
  981. package/src/conformance/studio/contract.ts +319 -0
  982. package/src/conformance/studio/migrations/billing/0000_billing.sql +6 -0
  983. package/src/conformance/studio/migrations/journal/0000_journal.sql +9 -0
  984. package/src/conformance/studio/migrations/mailbox/0000_mailbox.sql +7 -0
  985. package/src/conformance/studio/migrations/tasks/0000_tasks.sql +7 -0
  986. package/src/conformance/workshop/app.ts +14 -0
  987. package/src/conformance/workshop/migrations/0000_notes.sql +7 -0
  988. package/src/conformance/workshop/module.ts +79 -0
  989. package/src/fakes/AcmeFake.ts +182 -0
  990. package/src/fakes/ApnsFake.ts +245 -0
  991. package/src/fakes/FcmFake.ts +231 -0
  992. package/src/fakes/GoogleFake.ts +1346 -0
  993. package/src/fakes/HttpApiFake.ts +116 -0
  994. package/src/fakes/McpFake.ts +355 -0
  995. package/src/fakes/MicrosoftGraphFake.ts +1191 -0
  996. package/src/fakes/S3Fake.ts +376 -0
  997. package/src/fakes/Server.ts +445 -0
  998. package/src/fakes/SignInProviderFake.ts +70 -0
  999. package/src/fakes/SlackFake.ts +893 -0
  1000. package/src/fakes/Store.ts +96 -0
  1001. package/src/fakes/TelemetryFakes.ts +197 -0
  1002. package/src/fakes/TestCa.ts +166 -0
  1003. package/src/fakes/WorkOsFake.ts +136 -0
  1004. package/src/index.ts +9 -0
  1005. package/src/make/reference.ts +259 -0
  1006. package/src/make/sources.ts +836 -0
@@ -0,0 +1,308 @@
1
+ /**
2
+ * The Connections conformance kit (docs/contracts/connections.md). `connectionsConformance(subject)` registers,
3
+ * against a kernel serving the reference `acme` connector over the acme protocol fake: the consent flow (PKCE
4
+ * S256, the registered redirect URI, state bound to the session and single use), one Connection per account
5
+ * with merged scopes and incremental consent, tokens kept only as ciphertext in Secrets, proactive refresh,
6
+ * single-flight refresh across two kernels, rotation-safe refresh, 401 versus 403, the owner's membership
7
+ * re-checked on every use, owner-only use, the lifecycle actions on every surface (audited), disconnect, and
8
+ * `returnTo` confined to trusted origins.
9
+ */
10
+ import { describe, expect, it } from "vitest";
11
+ import { failed, ok } from "./CapabilityKit.js";
12
+ export const connectionsConformance = (subject) => describe("Connections conformance", () => {
13
+ const connect = async (scopes, user = subject().owner) => {
14
+ const flow = await subject().consent(user, { action: "connections.connect", input: { provider: "acme", scopes } });
15
+ expect(flow.callback?.status, await flow.callback?.clone().text()).toBe(200);
16
+ const list = ok(await subject().action(user, "connections.list", {})).connections;
17
+ return list.find((c) => c.provider === "acme" && c.ownerId === user.id);
18
+ };
19
+ it("runs authorization code with PKCE S256 through the kernel's routes, with the state and redirect URI the kernel registered", async () => {
20
+ const s = subject();
21
+ const flow = await s.consent(s.owner, {
22
+ action: "connections.connect",
23
+ input: { provider: "acme", scopes: ["items.read"] },
24
+ });
25
+ const started = ok(flow.started);
26
+ expect(started.authorizeUrl).toBe(`${s.url}/connections/authorize?flow=${encodeURIComponent(started.flowId)}`);
27
+ const sent = new URL(flow.providerUrl).searchParams;
28
+ expect(sent.get("code_challenge_method")).toBe("S256");
29
+ expect(sent.get("code_challenge")).toMatch(/^[A-Za-z0-9_-]{43}$/u);
30
+ expect(sent.get("redirect_uri")).toBe(`${s.url}/connections/callback`);
31
+ expect((sent.get("state") ?? "").length).toBeGreaterThanOrEqual(43);
32
+ expect(sent.get("scope")?.split(" ")).toEqual(expect.arrayContaining(["profile", "items.read"]));
33
+ expect(flow.callback?.status).toBe(200);
34
+ const connection = ok(await s.action(s.owner, "connections.list", {})).connections[0];
35
+ expect(connection).toMatchObject({ provider: "acme", accountLabel: s.fake.self.email, status: "active" });
36
+ expect(connection.scopes).toEqual(expect.arrayContaining(["items.read", "profile"]));
37
+ });
38
+ it("binds the state to the session that opened the consent: another session's callback is refused and creates nothing, and a state works once", async () => {
39
+ const s = subject();
40
+ const intruder = await s.member("intruder");
41
+ const before = await s.sql(`SELECT count(*)::int AS n FROM eloxiv.connection`);
42
+ const hijacked = await s.consent(s.owner, { action: "connections.connect", input: { provider: "acme", scopes: ["items.read"] } }, { callbackSession: intruder.session });
43
+ expect(hijacked.callback?.status).toBe(403);
44
+ expect(await s.sql(`SELECT count(*)::int AS n FROM eloxiv.connection`)).toEqual(before);
45
+ // The rightful session completes the same response; replaying it afterwards is refused.
46
+ const own = await fetch(hijacked.callbackUrl, {
47
+ headers: { authorization: `Bearer ${s.owner.session}` },
48
+ redirect: "manual",
49
+ });
50
+ expect(own.status).toBe(200);
51
+ const replay = await fetch(hijacked.callbackUrl, {
52
+ headers: { authorization: `Bearer ${s.owner.session}` },
53
+ redirect: "manual",
54
+ });
55
+ expect(replay.status).toBe(403);
56
+ // A forged state, and someone else's consent link, are refused.
57
+ const forged = await fetch(`${s.url}/connections/callback?code=x&state=forged`, {
58
+ headers: { authorization: `Bearer ${s.owner.session}` },
59
+ redirect: "manual",
60
+ });
61
+ expect(forged.status).toBe(403);
62
+ const started = ok(await s.action(s.owner, "connections.connect", { provider: "acme", scopes: ["items.read"] }));
63
+ const stolen = await fetch(started.authorizeUrl, {
64
+ headers: { authorization: `Bearer ${intruder.session}` },
65
+ redirect: "manual",
66
+ });
67
+ expect(stolen.status).toBe(403);
68
+ });
69
+ it("keeps one Connection per account: more scopes upgrade it by incremental consent and merge its scopes", async () => {
70
+ const s = subject();
71
+ const first = await connect(["items.read"]);
72
+ const second = await connect(["chat.read"]);
73
+ expect(second.id).toBe(first.id);
74
+ expect(second.scopes).toEqual(expect.arrayContaining(["items.read", "chat.read"]));
75
+ const upgrade = await s.consent(s.owner, {
76
+ action: "connections.reconnect",
77
+ input: { connectionId: first.id, scopes: ["chat.write"] },
78
+ });
79
+ expect(new URL(upgrade.providerUrl).searchParams.get("scope")?.split(" ")).toEqual(expect.arrayContaining(["items.read", "chat.read", "chat.write"]));
80
+ const all = ok(await s.action(s.owner, "connections.list", {})).connections.filter((c) => c.provider === "acme");
81
+ expect(all).toHaveLength(1);
82
+ expect(all[0].scopes).toEqual(expect.arrayContaining(["items.read", "chat.read", "chat.write"]));
83
+ });
84
+ it("refuses a reconnect that signs in a different provider account, leaving the Connection as it was", async () => {
85
+ const s = subject();
86
+ const connection = await connect(["items.read"]);
87
+ s.fake.oauth.addAccount({ id: "acme-user-2", email: "robin@acme.example", name: "Robin" });
88
+ s.fake.oauth.signedIn = "robin@acme.example";
89
+ try {
90
+ const flow = await s.consent(s.owner, {
91
+ action: "connections.reconnect",
92
+ input: { connectionId: connection.id },
93
+ });
94
+ expect(flow.callback?.status).toBe(403);
95
+ }
96
+ finally {
97
+ s.fake.oauth.signedIn = s.fake.self.email;
98
+ }
99
+ const after = ok(await s.action(s.owner, "connections.list", {})).connections.filter((c) => c.provider === "acme");
100
+ expect(after.map((c) => c.accountLabel)).toEqual([s.fake.self.email]);
101
+ });
102
+ it("keeps tokens only in Secrets, as ciphertext: no issued token appears in any kernel table", async () => {
103
+ const s = subject();
104
+ await connect(["items.read"]);
105
+ const dump = JSON.stringify(await s.sql(`SELECT
106
+ (SELECT json_agg(c) FROM eloxiv.connection c) AS connections,
107
+ (SELECT json_agg(f) FROM eloxiv.connection_flow f) AS flows,
108
+ (SELECT json_agg(encode(ciphertext, 'escape') || encode(wrapped_key, 'escape')) FROM eloxiv.secret) AS secrets,
109
+ (SELECT json_agg(encode(ciphertext, 'base64')) FROM eloxiv.secret) AS base64,
110
+ (SELECT json_agg(a) FROM eloxiv.audit_log a) AS audit`));
111
+ expect(s.fake.oauth.issued.length).toBeGreaterThan(0);
112
+ for (const token of s.fake.oauth.issued)
113
+ expect(dump).not.toContain(token);
114
+ const names = await s.sql(`SELECT DISTINCT name FROM eloxiv.secret WHERE scope_kind = 'connection' ORDER BY 1`);
115
+ expect(names.map((r) => r.name)).toEqual(["access_token", "refresh_token"]);
116
+ });
117
+ it("refreshes proactively, before the access token expires", async () => {
118
+ const s = subject();
119
+ const connection = await connect(["items.read"]);
120
+ await s.sql(`UPDATE eloxiv.connection SET access_expires_at = now() + interval '10 seconds' WHERE id = $1`, [
121
+ connection.id,
122
+ ]);
123
+ const refreshes = s.fake.oauth.stats.refreshes;
124
+ const requests = s.fake.apiRequests();
125
+ ok(await s.request(connection.id, s.owner, "/items", ["items.read"]));
126
+ expect(s.fake.oauth.stats.refreshes - refreshes).toBe(1);
127
+ expect(s.fake.apiRequests() - requests, "no request was refused first").toBe(1);
128
+ });
129
+ it("refreshes single-flight across processes: two kernels needing a refresh at once refresh the grant once", async () => {
130
+ const s = subject();
131
+ const connection = await connect(["items.read"]);
132
+ const other = await s.second();
133
+ try {
134
+ await s.sql(`UPDATE eloxiv.connection SET access_expires_at = now() + interval '5 seconds' WHERE id = $1`, [
135
+ connection.id,
136
+ ]);
137
+ s.fake.oauth.refreshDelayMs = 300;
138
+ const refreshes = s.fake.oauth.stats.refreshes;
139
+ const results = await Promise.all([
140
+ s.request(connection.id, s.owner, "/items", ["items.read"]),
141
+ other.request(connection.id, s.owner, "/items", ["items.read"]),
142
+ s.request(connection.id, s.owner, "/items", ["items.read"]),
143
+ other.request(connection.id, s.owner, "/items", ["items.read"]),
144
+ ]);
145
+ for (const result of results)
146
+ ok(result);
147
+ expect(s.fake.oauth.stats.refreshes - refreshes).toBe(1);
148
+ }
149
+ finally {
150
+ s.fake.oauth.refreshDelayMs = 0;
151
+ await other.dispose();
152
+ }
153
+ });
154
+ it("is rotation-safe: with refresh tokens rotated and the used one refused, every refresh stores the new one", async () => {
155
+ const s = subject();
156
+ const connection = await connect(["items.read"]);
157
+ const failures = s.fake.oauth.stats.refreshFailures;
158
+ for (let i = 0; i < 3; i++)
159
+ expect(ok(await s.refresh(connection.id)).refreshed).toBe(true);
160
+ expect(s.fake.oauth.stats.refreshFailures).toBe(failures);
161
+ ok(await s.request(connection.id, s.owner, "/items", ["items.read"]));
162
+ });
163
+ it("401: refreshes once and retries; when the refresh fails, the Connection needs reauthorisation, its owner is notified, and calls fail fast", async () => {
164
+ const s = subject();
165
+ const connection = await connect(["items.read"]);
166
+ s.fake.oauth.expireAccessTokens(s.fake.self.email);
167
+ const refreshes = s.fake.oauth.stats.refreshes;
168
+ ok(await s.request(connection.id, s.owner, "/items", ["items.read"]));
169
+ expect(s.fake.oauth.stats.refreshes - refreshes).toBe(1);
170
+ s.fake.oauth.revokeRefreshTokens(s.fake.self.email);
171
+ s.fake.oauth.expireAccessTokens(s.fake.self.email);
172
+ expect(failed(await s.request(connection.id, s.owner, "/items", ["items.read"]))._tag).toBe("Unauthorized");
173
+ const [row] = await s.sql(`SELECT status FROM eloxiv.connection WHERE id = $1`, [
174
+ connection.id,
175
+ ]);
176
+ expect(row?.status).toBe("needs-reauth");
177
+ const notes = await s.sql(`SELECT title FROM eloxiv_notifications.notification WHERE recipient_id = $1`, [s.owner.id]);
178
+ expect(notes.some((n) => /reconnect/iu.test(n.title))).toBe(true);
179
+ const audits = await s.sql(`SELECT 1 FROM eloxiv.audit_log WHERE action = 'eloxiv.connections.needs-reauth' AND detail->>'connectionId' = $1`, [connection.id]);
180
+ expect(audits.length).toBe(1);
181
+ const requests = s.fake.apiRequests();
182
+ expect(failed(await s.request(connection.id, s.owner, "/items", ["items.read"]))._tag).toBe("Unauthorized");
183
+ expect(s.fake.apiRequests()).toBe(requests);
184
+ const again = await connect(["items.read"]);
185
+ expect(again).toMatchObject({ id: connection.id, status: "active" });
186
+ });
187
+ it("403: never refreshes; reports the scopes the operation needs that the grant lacks, and offers incremental consent", async () => {
188
+ const s = subject();
189
+ const connection = await connect(["items.read", "chat.read"]);
190
+ // The person withdrew chat.read at the provider: it answers 403 insufficient_scope (RFC 6750).
191
+ s.fake.oauth.revokeScopes(s.fake.self.email, ["chat.read"]);
192
+ try {
193
+ const refreshes = s.fake.oauth.stats.refreshes;
194
+ const refused = failed(await s.request(connection.id, s.owner, "/channels", ["chat.read"]));
195
+ expect(refused._tag).toBe("Forbidden");
196
+ expect(refused["missingScopes"]).toEqual(["chat.read"]);
197
+ expect(refused["consent"]).toEqual({
198
+ action: "connections.reconnect",
199
+ connectionId: connection.id,
200
+ scopes: ["chat.read"],
201
+ });
202
+ expect(s.fake.oauth.stats.refreshes).toBe(refreshes);
203
+ const [row] = await s.sql(`SELECT status FROM eloxiv.connection WHERE id = $1`, [
204
+ connection.id,
205
+ ]);
206
+ expect(row?.status).toBe("active");
207
+ }
208
+ finally {
209
+ s.fake.oauth.restoreScopes(s.fake.self.email);
210
+ }
211
+ });
212
+ it("re-checks the owner's membership on every use: a member who left cannot use the Connection, and nothing reaches the provider", async () => {
213
+ const s = subject();
214
+ const leaver = await s.member("leaver");
215
+ const connection = await connect(["items.read"], leaver);
216
+ ok(await s.request(connection.id, leaver, "/items", ["items.read"]));
217
+ await s.removeMember(leaver);
218
+ const requests = s.fake.apiRequests();
219
+ const refused = failed(await s.request(connection.id, leaver, "/items", ["items.read"]));
220
+ expect(refused._tag).toBe("Forbidden");
221
+ expect(String(refused["message"])).toMatch(/no longer a member/u);
222
+ expect(s.fake.apiRequests()).toBe(requests);
223
+ await s.restoreMember(leaver);
224
+ ok(await s.request(connection.id, leaver, "/items", ["items.read"]));
225
+ });
226
+ it("lets only the owner use a Connection", async () => {
227
+ const s = subject();
228
+ const connection = await connect(["items.read"]);
229
+ const other = await s.member("bystander");
230
+ expect(failed(await s.request(connection.id, other, "/items", ["items.read"]))._tag).toBe("Forbidden");
231
+ });
232
+ it("offers connect, reconnect, disconnect and list on every surface, each call audited with its surface", async () => {
233
+ const s = subject();
234
+ const user = await s.member("surfaces");
235
+ for (const surface of ["http", "rpc", "mcp", "agent"]) {
236
+ const listed = ok(await s.action(user, "connections.list", {}, surface));
237
+ expect(Array.isArray(listed.connections)).toBe(true);
238
+ const started = ok(await s.action(user, "connections.connect", { provider: "acme", scopes: ["items.read"] }, surface));
239
+ expect(started.authorizeUrl).toContain("/connections/authorize?flow=");
240
+ }
241
+ const audited = await s.sql(`SELECT DISTINCT surface FROM eloxiv.audit_log WHERE action = 'connections.connect' AND actor_user_id = $1 ORDER BY 1`, [user.id]);
242
+ expect(audited.map((r) => r.surface)).toEqual(["agent", "http", "mcp", "rpc"]);
243
+ const connection = await connect(["items.read"], user);
244
+ expect(ok(await s.action(user, "connections.reconnect", { connectionId: connection.id }, "mcp")).authorizeUrl).toContain("flow=");
245
+ ok(await s.action(user, "connections.disconnect", { connectionId: connection.id }, "agent"));
246
+ const [audit] = await s.sql(`SELECT surface, outcome FROM eloxiv.audit_log WHERE action = 'connections.disconnect' AND actor_user_id = $1`, [user.id]);
247
+ expect(audit).toEqual({ surface: "agent", outcome: "succeeded" });
248
+ });
249
+ it("disconnects: its tokens are deleted at once and it is never used again; only its owner or an administrator may disconnect it", async () => {
250
+ const s = subject();
251
+ const owner = await s.member("disconnecting");
252
+ const connection = await connect(["items.read"], owner);
253
+ const other = await s.member("not-the-owner");
254
+ expect(failed(await s.action(other, "connections.disconnect", { connectionId: connection.id }))._tag).toBe("Forbidden");
255
+ const admin = await s.member("administrator", ["admin"]);
256
+ ok(await s.action(admin, "connections.disconnect", { connectionId: connection.id }));
257
+ const secrets = await s.sql(`SELECT 1 FROM eloxiv.secret WHERE subject = $1`, [connection.id]);
258
+ expect(secrets).toEqual([]);
259
+ expect(failed(await s.request(connection.id, owner, "/items", ["items.read"]))._tag).toBe("NotFound");
260
+ const listed = ok(await s.action(owner, "connections.list", {})).connections;
261
+ expect(listed.map((c) => c.id)).not.toContain(connection.id);
262
+ });
263
+ it("sends the browser back only to the app or a trusted origin", async () => {
264
+ const s = subject();
265
+ expect(failed(await s.action(s.owner, "connections.connect", { provider: "acme", returnTo: "https://evil.example/x" }))
266
+ ._tag).toBe("InvalidInput");
267
+ const flow = await s.consent(s.owner, {
268
+ action: "connections.connect",
269
+ input: { provider: "acme", returnTo: "/settings/connections" },
270
+ });
271
+ expect(flow.callback?.status).toBe(302);
272
+ const location = new URL(flow.callback.headers.get("location"));
273
+ expect(location.pathname).toBe("/settings/connections");
274
+ expect(location.searchParams.get("connection")).toMatch(/^conn_/u);
275
+ });
276
+ it("never sends the browser to another origin, whatever form returnTo takes", async () => {
277
+ const s = subject();
278
+ const origin = new URL(s.url).origin;
279
+ // Backslash, protocol-relative, whitespace-split, scheme-relative, credentials and non-http forms: a
280
+ // browser reads each as another host (or as script).
281
+ const hostile = [
282
+ "/\\attacker.example/done",
283
+ "\\\\attacker.example/done",
284
+ "\\/attacker.example/done",
285
+ "//attacker.example/done",
286
+ "/\t/attacker.example/done",
287
+ "/\n/attacker.example/done",
288
+ " //attacker.example/done",
289
+ "https:attacker.example/done",
290
+ "https://attacker.example\\@" + new URL(s.url).host + "/done",
291
+ `${origin}@attacker.example/done`,
292
+ "javascript:alert(1)",
293
+ "data:text/html,<script>alert(1)</script>",
294
+ ];
295
+ for (const returnTo of hostile) {
296
+ const refused = await s.action(s.owner, "connections.connect", { provider: "acme", returnTo });
297
+ expect(refused.ok, JSON.stringify(returnTo)).toBe(false);
298
+ expect(refused.error._tag, JSON.stringify(returnTo)).toBe("InvalidInput");
299
+ }
300
+ // Encoded forms stay paths on the app's own origin.
301
+ for (const returnTo of ["/%5Cattacker.example/done", "/%2F%2Fattacker.example/done", "/a/..%2F..%2Fx"]) {
302
+ const flow = await s.consent(s.owner, { action: "connections.connect", input: { provider: "acme", returnTo } });
303
+ expect(flow.callback?.status, returnTo).toBe(302);
304
+ expect(new URL(flow.callback.headers.get("location")).origin, returnTo).toBe(origin);
305
+ }
306
+ });
307
+ });
308
+ //# sourceMappingURL=Connections.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Connections.js","sourceRoot":"","sources":["../../src/conformance/Connections.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AAC7C,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AAK/C,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,OAAiC,EAAE,EAAE,CAC1E,QAAQ,CAAC,yBAAyB,EAAE,GAAG,EAAE;IACvC,MAAM,OAAO,GAAG,KAAK,EAAE,MAA6B,EAAE,IAAI,GAAG,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;QAC9E,MAAM,IAAI,GAAG,MAAM,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,qBAAqB,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC,CAAA;QAClH,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QAC5E,MAAM,IAAI,GAAG,EAAE,CAAC,MAAM,OAAO,EAAE,C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AAE,OAAuC,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAA;QAC5G,CAAC;QACD,oDAAoD;QACpD,KAAK,MAAM,QAAQ,IAAI,CAAC,2BAA2B,EAAE,8BAA8B,EAAE,gBAAgB,CAAC,EAAE,CAAC;YACvG,MAAM,IAAI,GAAG,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,MAAM,EAAE,qBAAqB,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAA;YAC/G,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;YACjD,MAAM,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,QAAS,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAE,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACxF,CAAC;IACH,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * The Eloxiv kernel as the Connections, Metering and Messaging kits' subject: an in-process kernel on a fresh
3
+ * database with the kernel's inbox and `connections` modules and the reference `acme` connector, whose
4
+ * settings point at the acme protocol fake. `second()` starts another kernel on the same database (another
5
+ * process's view, sharing only the database).
6
+ */
7
+ import type { CapabilityName, ConnectionLimits } from "@eloxiv/contracts";
8
+ import { type ConnectorDefinition, type KernelOptions } from "@eloxiv/kernel";
9
+ import { type AcmeFake } from "../fakes/AcmeFake.ts";
10
+ import { type TestKernel } from "../Kernel.ts";
11
+ import type { CallResult } from "./CapabilityKit.ts";
12
+ import { consent, type ConnectorUser, type Surface } from "./ConnectorReference.ts";
13
+ export interface KernelView {
14
+ /** An HTTP request over a Connection, as `user`, for an operation needing `scopes`. */
15
+ readonly request: (connectionId: string, user: ConnectorUser, path: string, scopes: ReadonlyArray<string>) => Promise<CallResult>;
16
+ readonly refresh: (connectionId: string) => Promise<CallResult>;
17
+ /** One capability operation over a Connection, as `user`. */
18
+ readonly call: (connectionId: string, user: ConnectorUser, capability: CapabilityName, operation: string, input: unknown) => Promise<CallResult>;
19
+ readonly dispose: () => Promise<void>;
20
+ }
21
+ export interface ConnectionsSubject extends KernelView {
22
+ readonly url: string;
23
+ readonly fake: AcmeFake;
24
+ readonly owner: ConnectorUser;
25
+ readonly member: (name: string, roles?: ReadonlyArray<string>) => Promise<ConnectorUser>;
26
+ readonly removeMember: (user: ConnectorUser) => Promise<void>;
27
+ readonly restoreMember: (user: ConnectorUser) => Promise<void>;
28
+ readonly action: (user: ConnectorUser, action: string, input: unknown, surface?: Surface) => Promise<CallResult>;
29
+ readonly consent: (user: ConnectorUser, start: {
30
+ readonly action: "connections.connect" | "connections.reconnect";
31
+ readonly input: unknown;
32
+ }, options?: {
33
+ readonly callbackSession?: string | undefined;
34
+ }) => ReturnType<typeof consent>;
35
+ /** Superuser SQL on the app's database. */
36
+ readonly sql: <A = Record<string, unknown>>(text: string, params?: ReadonlyArray<unknown>) => Promise<ReadonlyArray<A>>;
37
+ /** Another kernel on the same database. */
38
+ readonly second: () => Promise<KernelView>;
39
+ }
40
+ export declare const startConnectionsReference: (options: {
41
+ readonly name: string;
42
+ readonly limits?: Partial<ConnectionLimits> | undefined;
43
+ readonly rotateRefreshTokens?: boolean | undefined;
44
+ readonly options?: Partial<KernelOptions> | undefined;
45
+ /** Connections settings to override (the refresh timeout, for example). */
46
+ readonly connections?: {
47
+ readonly refreshTimeoutMs?: number;
48
+ } | undefined;
49
+ /** The connector under test (default: the reference `acme` connector with `limits`). */
50
+ readonly connector?: ConnectorDefinition | undefined;
51
+ /** Install the `chatlog` fixture module, whose Ingress source receives the acme platform's events. */
52
+ readonly messaging?: boolean | undefined;
53
+ }) => Promise<ConnectionsSubject & {
54
+ readonly kernel: TestKernel;
55
+ }>;
56
+ //# sourceMappingURL=ConnectionsReference.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConnectionsReference.d.ts","sourceRoot":"","sources":["../../src/conformance/ConnectionsReference.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AACzE,OAAO,EAIL,KAAK,mBAAmB,EAExB,KAAK,aAAa,EACnB,MAAM,gBAAgB,CAAA;AAGvB,OAAO,EAAiB,KAAK,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AACnE,OAAO,EAAe,KAAK,UAAU,EAAE,MAAM,cAAc,CAAA;AAI3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,EAAc,OAAO,EAAgB,KAAK,aAAa,EAAE,KAAK,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAI7G,MAAM,WAAW,UAAU;IACzB,uFAAuF;IACvF,QAAQ,CAAC,OAAO,EAAE,CAChB,YAAY,EAAE,MAAM,EACpB,IAAI,EAAE,aAAa,EACnB,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,KAC1B,OAAO,CAAC,UAAU,CAAC,CAAA;IACxB,QAAQ,CAAC,OAAO,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,CAAC,CAAA;IAC/D,6DAA6D;IAC7D,QAAQ,CAAC,IAAI,EAAE,CACb,YAAY,EAAE,MAAM,EACpB,IAAI,EAAE,aAAa,EACnB,UAAU,EAAE,cAAc,EAC1B,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,OAAO,KACX,OAAO,CAAC,UAAU,CAAC,CAAA;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CACtC;AAED,MAAM,WAAW,kBAAmB,S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,MAAM,OAAO,CAAC,UAAU,CAAC,CAAA;CAC3C;AAED,eAAO,MAAM,yBAAyB,YAAmB;IACvD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,GAAG,SAAS,CAAA;IACvD,QAAQ,CAAC,mBAAmB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAClD,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,SAAS,CAAA;IACrD,2EAA2E;IAC3E,QAAQ,CAAC,WAAW,CAAC,EAAE;QAAE,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAAA;IACzE,wFAAwF;IACxF,QAAQ,CAAC,SAAS,CAAC,EAAE,mBAAmB,GAAG,SAAS,CAAA;IACpD,sGAAsG;IACtG,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CACzC,KAAG,OAAO,CAAC,kBAAkB,GAAG;IAAE,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAA;CAAE,CA2F/D,CAAA"}
@@ -0,0 +1,74 @@
1
+ import { Connections, connectionsModule, inboxModules, } from "@eloxiv/kernel";
2
+ import { Effect, Redacted } from "effect";
3
+ import { resolve } from "node:path";
4
+ import { startAcmeFake } from "../fakes/AcmeFake.js";
5
+ import { startKernel } from "../Kernel.js";
6
+ import { defaultRuntime, dropDatabase } from "../System.js";
7
+ import { chatlogModule } from "./acme/chatlog.js";
8
+ import { acmeConnector } from "./acme/connector.js";
9
+ import { callAction, consent, createMember } from "./ConnectorReference.js";
10
+ const root = resolve(import.meta.dirname, "../../../..");
11
+ export const startConnectionsReference = async (options) => {
12
+ const database = `eloxiv_t_${options.name}_${defaultRuntime()}`;
13
+ await dropDatabase(database, root);
14
+ const fake = await startAcmeFake(options.rotateRefreshTokens === undefined ? {} : { rotateRefreshTokens: options.rotateRefreshTokens });
15
+ const connector = options.connector ?? acmeConnector(options.limits);
16
+ const modules = [...inboxModules, connectionsModule, ...(options.messaging === true ? [chatlogModule] : [])];
17
+ const app = { name: options.name, modules, connectors: [connector] };
18
+ const config = {
19
+ connectors: { acme: { ...fake.settings, team: fake.team } },
20
+ ingress: { sweepMs: 200, secrets: { "chatlog.events": [Redacted.make(fake.signingSecret)] } },
21
+ ...(options.connections === undefined ? {} : { connections: options.connections }),
22
+ };
23
+ const kernel = await startKernel({ app, database, config, options: options.options });
24
+ const owner = await createMember(kernel, "owner", "acme");
25
+ const view = (k) => ({
26
+ request: (connectionId, user, path, scopes) => k.run(Effect.gen(function* () {
27
+ const http = (yield* Connections).http(connectionId, { userId: user.id, orgId: user.org }, scopes);
28
+ const response = yield* http.request({ method: "GET", url: `${fake.settings["apiUrl"]}${path}` });
29
+ return { status: response.status, json: response.json };
30
+ }).pipe(Effect.map((value) => ({ ok: true, value })), Effect.catch((error) => Effect.succeed({ ok: false, error })))),
31
+ refresh: (connectionId) => k.run(Effect.gen(function* () {
32
+ return yield* (yield* Connections).refresh(connectionId);
33
+ }).pipe(Effect.map((value) => ({ ok: true, value })), Effect.catch((error) => Effect.succeed({ ok: false, error })))),
34
+ call: (connectionId, user, capability, operation, input) => k.run(Effect.gen(function* () {
35
+ const bound = yield* (yield* Connections).capability(connectionId, capability, {
36
+ userId: user.id,
37
+ orgId: user.org,
38
+ });
39
+ return yield* bound.operations[operation](input);
40
+ }).pipe(Effect.map((value) => ({ ok: true, value })), Effect.catch((error) => Effect.succeed({ ok: false, error })))),
41
+ dispose: () => k.dispose(),
42
+ });
43
+ const main = view(kernel);
44
+ return {
45
+ kernel,
46
+ url: kernel.url,
47
+ fake,
48
+ owner,
49
+ ...main,
50
+ dispose: async () => {
51
+ await kernel.dispose();
52
+ await fake.close();
53
+ },
54
+ member: (name, roles) => createMember(kernel, name, "acme", roles),
55
+ removeMember: async (user) => {
56
+ await kernel.admin(`DELETE FROM eloxiv.membership WHERE org_id = $1 AND user_id = $2`, [user.org, user.id]);
57
+ },
58
+ restoreMember: async (user) => {
59
+ await kernel.admin(`INSERT INTO eloxiv.membership (org_id, user_id) VALUES ($1, $2) ON CONFLICT DO NOTHING`, [
60
+ user.org,
61
+ user.id,
62
+ ]);
63
+ await kernel.admin(`INSERT INTO eloxiv.membership_role (org_id, user_id, role_id) VALUES ($1, $2, 'member') ON CONFLICT DO NOTHING`, [user.org, user.id]);
64
+ },
65
+ action: (user, action, input, surface) => callAction(kernel, modules, user, action, input, surface),
66
+ consent: (user, start, options) => consent(kernel, modules, user, start, options),
67
+ sql: (text, params) => kernel.admin(text, params),
68
+ second: async () => {
69
+ const other = await startKernel({ app, database, config, skipSetup: true, options: options.options });
70
+ return view(other);
71
+ },
72
+ };
73
+ };
74
+ //# sourceMappingURL=ConnectionsReference.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConnectionsReference.js","sourceRoot":"","sources":["../../src/conformance/ConnectionsReference.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,YAAY,GAIb,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,aAAa,EAAiB,MAAM,sBAAsB,CAAA;AACnE,OAAO,EAAE,WAAW,EAAmB,MAAM,cAAc,CAAA;AAC3D,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEnD,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,EAAoC,MAAM,yBAAyB,CAAA;AAE7G,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,IAAI,CAAC,OAAO,EAAE,aAAa,CAAC,CAAA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AAI,EAAE,KAAK,EAAE,OAAO,CAAC;QACjF,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,CAAU;QAC1D,MAAM,EAAE,KAAK,IAAI,EAAE;YACjB,MAAM,KAAK,GAAG,MAAM,WAAW,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC,CAAA;YACrG,OAAO,IAAI,CAAC,KAAK,CAAC,CAAA;QACpB,CAAC;KACF,CAAA;AACH,CAAC,CAAA"}
@@ -0,0 +1,86 @@
1
+ import type { CapabilityName } from "@eloxiv/contracts";
2
+ import { type AnyKernelModule, type ConnectionSyncDefinition, type ConnectorDefinition, type KernelOptions } from "@eloxiv/kernel";
3
+ import { type TestKernel } from "../Kernel.ts";
4
+ import type { AccountControls, CallResult, ProviderHarness, Seeds } from "./CapabilityKit.ts";
5
+ export declare const OWNER_PASSWORD = "connections-owner-password";
6
+ export interface ConnectorUser {
7
+ readonly id: string;
8
+ readonly email: string;
9
+ readonly session: string;
10
+ readonly org: string;
11
+ }
12
+ /** A member of `org` with a signed-in session (and optionally extra roles). */
13
+ export declare const createMember: (kernel: TestKernel, name: string, org: string, roles?: ReadonlyArray<string>) => Promise<ConnectorUser>;
14
+ export type Surface = "http" | "rpc" | "mcp" | "agent";
15
+ /** Call an action as `user` on a surface; the decoded output, or the standard error. */
16
+ export declare const callAction: (kernel: TestKernel, modules: ReadonlyArray<AnyKernelModule>, user: ConnectorUser, action: string, input: unknown, surface?: Surface) => Promise<CallResult>;
17
+ /**
18
+ * The consent flow, as a browser signed in as `user` would follow it: start it with `connections.connect` (or
19
+ * `reconnect`), open the kernel's authorize URL, follow the provider's authorization endpoint (which approves
20
+ * as the account the fake has signed in), and land on the kernel's callback. Returns what each hop answered.
21
+ */
22
+ export declare const consent: (kernel: TestKernel, modules: ReadonlyArray<AnyKernelModule>, user: ConnectorUser, start: {
23
+ readonly action: "connections.connect" | "connections.reconnect";
24
+ readonly input: unknown;
25
+ }, options?: {
26
+ readonly callbackSession?: string | undefined;
27
+ }) => Promise<{
28
+ started: {
29
+ readonly ok: false;
30
+ readonly error: {
31
+ readonly _tag: string;
32
+ readonly [key: string]: any;
33
+ };
34
+ };
35
+ callback: undefined;
36
+ provider: undefined;
37
+ authorize?: never;
38
+ providerUrl?: never;
39
+ callbackUrl?: never;
40
+ } | {
41
+ started: {
42
+ readonly ok: true;
43
+ readonly value: any;
44
+ };
45
+ authorize: Response;
46
+ callback: undefined;
47
+ provider: undefined;
48
+ providerUrl?: never;
49
+ callbackUrl?: never;
50
+ } | {
51
+ started: {
52
+ readonly ok: true;
53
+ readonly value: any;
54
+ };
55
+ authorize: Response;
56
+ providerUrl: string;
57
+ provider: Response;
58
+ callbackUrl: string;
59
+ callback: Response;
60
+ }>;
61
+ /** What a protocol fake exposes to the harness. */
62
+ export interface FakeProvider {
63
+ readonly settings: Record<string, string>;
64
+ readonly self: {
65
+ readonly email: string;
66
+ };
67
+ readonly controls: AccountControls;
68
+ }
69
+ export interface ConnectorReference {
70
+ readonly kernel: TestKernel;
71
+ readonly owner: ConnectorUser;
72
+ readonly modules: ReadonlyArray<AnyKernelModule>;
73
+ readonly harness: ProviderHarness;
74
+ readonly dispose: () => Promise<void>;
75
+ }
76
+ export declare const startConnectorReference: (options: {
77
+ readonly name: string;
78
+ readonly connector: ConnectorDefinition;
79
+ readonly fake: FakeProvider;
80
+ readonly label: string;
81
+ readonly seeds: Partial<Record<CapabilityName, Seeds>>;
82
+ readonly modules?: ReadonlyArray<AnyKernelModule> | undefined;
83
+ readonly connectionSyncs?: ReadonlyArray<ConnectionSyncDefinition> | undefined;
84
+ readonly options?: Partial<KernelOptions> | undefined;
85
+ }) => Promise<ConnectorReference>;
86
+ //# sourceMappingURL=ConnectorReference.d.ts.map
@@ -0,0 +1 @@
1
+ {"version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