@eloxiv/contracts 0.0.0-stage → 0.1.0

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 (537) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +6 -2
  3. package/dist/Agent.d.ts +792 -0
  4. package/dist/Agent.d.ts.map +1 -0
  5. package/dist/Agent.js +610 -0
  6. package/dist/Agent.js.map +1 -0
  7. package/dist/Analytics.d.ts +46 -0
  8. package/dist/Analytics.d.ts.map +1 -0
  9. package/dist/Analytics.js +89 -0
  10. package/dist/Analytics.js.map +1 -0
  11. package/dist/Approval.d.ts +70 -0
  12. package/dist/Approval.d.ts.map +1 -0
  13. package/dist/Approval.js +127 -0
  14. package/dist/Approval.js.map +1 -0
  15. package/dist/Catalog.d.ts +238 -0
  16. package/dist/Catalog.d.ts.map +1 -0
  17. package/dist/Catalog.js +169 -0
  18. package/dist/Catalog.js.map +1 -0
  19. package/dist/Checklist.d.ts +99 -0
  20. package/dist/Checklist.d.ts.map +1 -0
  21. package/dist/Checklist.js +105 -0
  22. package/dist/Checklist.js.map +1 -0
  23. package/dist/Data.d.ts +107 -0
  24. package/dist/Data.d.ts.map +1 -0
  25. package/dist/Data.js +93 -0
  26. package/dist/Data.js.map +1 -0
  27. package/dist/Devices.d.ts +857 -0
  28. package/dist/Devices.d.ts.map +1 -0
  29. package/dist/Devices.js +590 -0
  30. package/dist/Devices.js.map +1 -0
  31. package/dist/Durable.d.ts +406 -0
  32. package/dist/Durable.d.ts.map +1 -0
  33. package/dist/Durable.js +203 -0
  34. package/dist/Durable.js.map +1 -0
  35. package/dist/Errors.d.ts +95 -0
  36. package/dist/Errors.d.ts.map +1 -0
  37. package/dist/Errors.js +72 -0
  38. package/dist/Errors.js.map +1 -0
  39. package/dist/JsonSchema.d.ts +355 -0
  40. package/dist/JsonSchema.d.ts.map +1 -0
  41. package/dist/JsonSchema.js +151 -0
  42. package/dist/JsonSchema.js.map +1 -0
  43. package/dist/Manifest.d.ts +353 -0
  44. package/dist/Manifest.d.ts.map +1 -0
  45. package/dist/Manifest.js +894 -0
  46. package/dist/Manifest.js.map +1 -0
  47. package/dist/Module.d.ts +447 -0
  48. package/dist/Module.d.ts.map +1 -0
  49. package/dist/Module.js +221 -0
  50. package/dist/Module.js.map +1 -0
  51. package/dist/Optimistic.d.ts +192 -0
  52. package/dist/Optimistic.d.ts.map +1 -0
  53. package/dist/Optimistic.js +319 -0
  54. package/dist/Optimistic.js.map +1 -0
  55. package/dist/Projection.d.ts +163 -0
  56. package/dist/Projection.d.ts.map +1 -0
  57. package/dist/Projection.js +158 -0
  58. package/dist/Projection.js.map +1 -0
  59. package/dist/Proposals.d.ts +103 -0
  60. package/dist/Proposals.d.ts.map +1 -0
  61. package/dist/Proposals.js +72 -0
  62. package/dist/Proposals.js.map +1 -0
  63. package/dist/Receipt.d.ts +243 -0
  64. package/dist/Receipt.d.ts.map +1 -0
  65. package/dist/Receipt.js +108 -0
  66. package/dist/Receipt.js.map +1 -0
  67. package/dist/Records.d.ts +297 -0
  68. package/dist/Records.d.ts.map +1 -0
  69. package/dist/Records.js +171 -0
  70. package/dist/Records.js.map +1 -0
  71. package/dist/Render.d.ts +207 -0
  72. package/dist/Render.d.ts.map +1 -0
  73. package/dist/Render.js +502 -0
  74. package/dist/Render.js.map +1 -0
  75. package/dist/Rpc.d.ts +115 -0
  76. package/dist/Rpc.d.ts.map +1 -0
  77. package/dist/Rpc.js +68 -0
  78. package/dist/Rpc.js.map +1 -0
  79. package/dist/SearchLanguages.d.ts +4 -0
  80. package/dist/SearchLanguages.d.ts.map +1 -0
  81. package/dist/SearchLanguages.js +33 -0
  82. package/dist/SearchLanguages.js.map +1 -0
  83. package/dist/Service.d.ts +59 -0
  84. package/dist/Service.d.ts.map +1 -0
  85. package/dist/Service.js +38 -0
  86. package/dist/Service.js.map +1 -0
  87. package/dist/Versions.d.ts +9 -0
  88. package/dist/Versions.d.ts.map +1 -0
  89. package/dist/Versions.js +78 -0
  90. package/dist/Versions.js.map +1 -0
  91. package/dist/contracts/ActionConsent.d.ts +189 -0
  92. package/dist/contracts/ActionConsent.d.ts.map +1 -0
  93. package/dist/contracts/ActionConsent.js +129 -0
  94. package/dist/contracts/ActionConsent.js.map +1 -0
  95. package/dist/contracts/ActionRegistry.d.ts +149 -0
  96. package/dist/contracts/ActionRegistry.d.ts.map +1 -0
  97. package/dist/contracts/ActionRegistry.js +37 -0
  98. package/dist/contracts/ActionRegistry.js.map +1 -0
  99. package/dist/contracts/Actor.d.ts +129 -0
  100. package/dist/contracts/Actor.d.ts.map +1 -0
  101. package/dist/contracts/Actor.js +47 -0
  102. package/dist/contracts/Actor.js.map +1 -0
  103. package/dist/contracts/AgentResources.d.ts +248 -0
  104. package/dist/contracts/AgentResources.d.ts.map +1 -0
  105. package/dist/contracts/AgentResources.js +158 -0
  106. package/dist/contracts/AgentResources.js.map +1 -0
  107. package/dist/contracts/AgentRuntime.d.ts +453 -0
  108. package/dist/contracts/AgentRuntime.d.ts.map +1 -0
  109. package/dist/contracts/AgentRuntime.js +117 -0
  110. package/dist/contracts/AgentRuntime.js.map +1 -0
  111. package/dist/contracts/Approvals.d.ts +303 -0
  112. package/dist/contracts/Approvals.d.ts.map +1 -0
  113. package/dist/contracts/Approvals.js +117 -0
  114. package/dist/contracts/Approvals.js.map +1 -0
  115. package/dist/contracts/Audit.d.ts +510 -0
  116. package/dist/contracts/Audit.d.ts.map +1 -0
  117. package/dist/contracts/Audit.js +139 -0
  118. package/dist/contracts/Audit.js.map +1 -0
  119. package/dist/contracts/CalendarProvider.d.ts +572 -0
  120. package/dist/contracts/CalendarProvider.d.ts.map +1 -0
  121. package/dist/contracts/CalendarProvider.js +203 -0
  122. package/dist/contracts/CalendarProvider.js.map +1 -0
  123. package/dist/contracts/Capability.d.ts +197 -0
  124. package/dist/contracts/Capability.d.ts.map +1 -0
  125. package/dist/contracts/Capability.js +189 -0
  126. package/dist/contracts/Capability.js.map +1 -0
  127. package/dist/contracts/ClientSDK.d.ts +250 -0
  128. package/dist/contracts/ClientSDK.d.ts.map +1 -0
  129. package/dist/contracts/ClientSDK.js +184 -0
  130. package/dist/contracts/ClientSDK.js.map +1 -0
  131. package/dist/contracts/CollabDocument.d.ts +781 -0
  132. package/dist/contracts/CollabDocument.d.ts.map +1 -0
  133. package/dist/contracts/CollabDocument.js +364 -0
  134. package/dist/contracts/CollabDocument.js.map +1 -0
  135. package/dist/contracts/Command.d.ts +183 -0
  136. package/dist/contracts/Command.d.ts.map +1 -0
  137. package/dist/contracts/Command.js +66 -0
  138. package/dist/contracts/Command.js.map +1 -0
  139. package/dist/contracts/Connections.d.ts +612 -0
  140. package/dist/contracts/Connections.d.ts.map +1 -0
  141. package/dist/contracts/Connections.js +323 -0
  142. package/dist/contracts/Connections.js.map +1 -0
  143. package/dist/contracts/ContextAccounting.d.ts +79 -0
  144. package/dist/contracts/ContextAccounting.d.ts.map +1 -0
  145. package/dist/contracts/ContextAccounting.js +32 -0
  146. package/dist/contracts/ContextAccounting.js.map +1 -0
  147. package/dist/contracts/Daemon.d.ts +486 -0
  148. package/dist/contracts/Daemon.d.ts.map +1 -0
  149. package/dist/contracts/Daemon.js +192 -0
  150. package/dist/contracts/Daemon.js.map +1 -0
  151. package/dist/contracts/DbTx.d.ts +149 -0
  152. package/dist/contracts/DbTx.d.ts.map +1 -0
  153. package/dist/contracts/DbTx.js +94 -0
  154. package/dist/contracts/DbTx.js.map +1 -0
  155. package/dist/contracts/Delegation.d.ts +121 -0
  156. package/dist/contracts/Delegation.d.ts.map +1 -0
  157. package/dist/contracts/Delegation.js +76 -0
  158. package/dist/contracts/Delegation.js.map +1 -0
  159. package/dist/contracts/DeviceControl.d.ts +293 -0
  160. package/dist/contracts/DeviceControl.d.ts.map +1 -0
  161. package/dist/contracts/DeviceControl.js +107 -0
  162. package/dist/contracts/DeviceControl.js.map +1 -0
  163. package/dist/contracts/Directory.d.ts +492 -0
  164. package/dist/contracts/Directory.d.ts.map +1 -0
  165. package/dist/contracts/Directory.js +225 -0
  166. package/dist/contracts/Directory.js.map +1 -0
  167. package/dist/contracts/DirectoryProvider.d.ts +214 -0
  168. package/dist/contracts/DirectoryProvider.d.ts.map +1 -0
  169. package/dist/contracts/DirectoryProvider.js +73 -0
  170. package/dist/contracts/DirectoryProvider.js.map +1 -0
  171. package/dist/contracts/DocumentSource.d.ts +190 -0
  172. package/dist/contracts/DocumentSource.d.ts.map +1 -0
  173. package/dist/contracts/DocumentSource.js +64 -0
  174. package/dist/contracts/DocumentSource.js.map +1 -0
  175. package/dist/contracts/Files.d.ts +762 -0
  176. package/dist/contracts/Files.d.ts.map +1 -0
  177. package/dist/contracts/Files.js +339 -0
  178. package/dist/contracts/Files.js.map +1 -0
  179. package/dist/contracts/Flags.d.ts +265 -0
  180. package/dist/contracts/Flags.d.ts.map +1 -0
  181. package/dist/contracts/Flags.js +197 -0
  182. package/dist/contracts/Flags.js.map +1 -0
  183. package/dist/contracts/Host.d.ts +320 -0
  184. package/dist/contracts/Host.d.ts.map +1 -0
  185. package/dist/contracts/Host.js +224 -0
  186. package/dist/contracts/Host.js.map +1 -0
  187. package/dist/contracts/HttpApi.d.ts +102 -0
  188. package/dist/contracts/HttpApi.d.ts.map +1 -0
  189. package/dist/contracts/HttpApi.js +89 -0
  190. package/dist/contracts/HttpApi.js.map +1 -0
  191. package/dist/contracts/Ingestion.d.ts +522 -0
  192. package/dist/contracts/Ingestion.d.ts.map +1 -0
  193. package/dist/contracts/Ingestion.js +275 -0
  194. package/dist/contracts/Ingestion.js.map +1 -0
  195. package/dist/contracts/Ingress.d.ts +132 -0
  196. package/dist/contracts/Ingress.d.ts.map +1 -0
  197. package/dist/contracts/Ingress.js +102 -0
  198. package/dist/contracts/Ingress.js.map +1 -0
  199. package/dist/contracts/Invocation.d.ts +361 -0
  200. package/dist/contracts/Invocation.d.ts.map +1 -0
  201. package/dist/contracts/Invocation.js +104 -0
  202. package/dist/contracts/Invocation.js.map +1 -0
  203. package/dist/contracts/LocalClient.d.ts +878 -0
  204. package/dist/contracts/LocalClient.d.ts.map +1 -0
  205. package/dist/contracts/LocalClient.js +423 -0
  206. package/dist/contracts/LocalClient.js.map +1 -0
  207. package/dist/contracts/Locale.d.ts +162 -0
  208. package/dist/contracts/Locale.d.ts.map +1 -0
  209. package/dist/contracts/Locale.js +123 -0
  210. package/dist/contracts/Locale.js.map +1 -0
  211. package/dist/contracts/MachineIdentity.d.ts +434 -0
  212. package/dist/contracts/MachineIdentity.d.ts.map +1 -0
  213. package/dist/contracts/MachineIdentity.js +223 -0
  214. package/dist/contracts/MachineIdentity.js.map +1 -0
  215. package/dist/contracts/MailProvider.d.ts +791 -0
  216. package/dist/contracts/MailProvider.d.ts.map +1 -0
  217. package/dist/contracts/MailProvider.js +237 -0
  218. package/dist/contracts/MailProvider.js.map +1 -0
  219. package/dist/contracts/Memory.d.ts +62 -0
  220. package/dist/contracts/Memory.d.ts.map +1 -0
  221. package/dist/contracts/Memory.js +43 -0
  222. package/dist/contracts/Memory.js.map +1 -0
  223. package/dist/contracts/Messaging.d.ts +154 -0
  224. package/dist/contracts/Messaging.d.ts.map +1 -0
  225. package/dist/contracts/Messaging.js +97 -0
  226. package/dist/contracts/Messaging.js.map +1 -0
  227. package/dist/contracts/Metering.d.ts +334 -0
  228. package/dist/contracts/Metering.d.ts.map +1 -0
  229. package/dist/contracts/Metering.js +202 -0
  230. package/dist/contracts/Metering.js.map +1 -0
  231. package/dist/contracts/ModelProvider.d.ts +142 -0
  232. package/dist/contracts/ModelProvider.d.ts.map +1 -0
  233. package/dist/contracts/ModelProvider.js +72 -0
  234. package/dist/contracts/ModelProvider.js.map +1 -0
  235. package/dist/contracts/ModuleManifest.d.ts +2519 -0
  236. package/dist/contracts/ModuleManifest.d.ts.map +1 -0
  237. package/dist/contracts/ModuleManifest.js +272 -0
  238. package/dist/contracts/ModuleManifest.js.map +1 -0
  239. package/dist/contracts/NotificationChannel.d.ts +378 -0
  240. package/dist/contracts/NotificationChannel.d.ts.map +1 -0
  241. package/dist/contracts/NotificationChannel.js +136 -0
  242. package/dist/contracts/NotificationChannel.js.map +1 -0
  243. package/dist/contracts/Notifications.d.ts +417 -0
  244. package/dist/contracts/Notifications.d.ts.map +1 -0
  245. package/dist/contracts/Notifications.js +267 -0
  246. package/dist/contracts/Notifications.js.map +1 -0
  247. package/dist/contracts/Outbox.d.ts +469 -0
  248. package/dist/contracts/Outbox.d.ts.map +1 -0
  249. package/dist/contracts/Outbox.js +215 -0
  250. package/dist/contracts/Outbox.js.map +1 -0
  251. package/dist/contracts/Privacy.d.ts +1029 -0
  252. package/dist/contracts/Privacy.d.ts.map +1 -0
  253. package/dist/contracts/Privacy.js +437 -0
  254. package/dist/contracts/Privacy.js.map +1 -0
  255. package/dist/contracts/Progress.d.ts +305 -0
  256. package/dist/contracts/Progress.d.ts.map +1 -0
  257. package/dist/contracts/Progress.js +174 -0
  258. package/dist/contracts/Progress.js.map +1 -0
  259. package/dist/contracts/QuerySurface.d.ts +231 -0
  260. package/dist/contracts/QuerySurface.d.ts.map +1 -0
  261. package/dist/contracts/QuerySurface.js +113 -0
  262. package/dist/contracts/QuerySurface.js.map +1 -0
  263. package/dist/contracts/Readiness.d.ts +105 -0
  264. package/dist/contracts/Readiness.d.ts.map +1 -0
  265. package/dist/contracts/Readiness.js +57 -0
  266. package/dist/contracts/Readiness.js.map +1 -0
  267. package/dist/contracts/Release.d.ts +295 -0
  268. package/dist/contracts/Release.d.ts.map +1 -0
  269. package/dist/contracts/Release.js +175 -0
  270. package/dist/contracts/Release.js.map +1 -0
  271. package/dist/contracts/ResultRendering.d.ts +533 -0
  272. package/dist/contracts/ResultRendering.d.ts.map +1 -0
  273. package/dist/contracts/ResultRendering.js +59 -0
  274. package/dist/contracts/ResultRendering.js.map +1 -0
  275. package/dist/contracts/Sandbox.d.ts +1164 -0
  276. package/dist/contracts/Sandbox.d.ts.map +1 -0
  277. package/dist/contracts/Sandbox.js +550 -0
  278. package/dist/contracts/Sandbox.js.map +1 -0
  279. package/dist/contracts/Scheduler.d.ts +814 -0
  280. package/dist/contracts/Scheduler.d.ts.map +1 -0
  281. package/dist/contracts/Scheduler.js +202 -0
  282. package/dist/contracts/Scheduler.js.map +1 -0
  283. package/dist/contracts/ScreenContext.d.ts +514 -0
  284. package/dist/contracts/ScreenContext.d.ts.map +1 -0
  285. package/dist/contracts/ScreenContext.js +272 -0
  286. package/dist/contracts/ScreenContext.js.map +1 -0
  287. package/dist/contracts/Search.d.ts +308 -0
  288. package/dist/contracts/Search.d.ts.map +1 -0
  289. package/dist/contracts/Search.js +107 -0
  290. package/dist/contracts/Search.js.map +1 -0
  291. package/dist/contracts/Secrets.d.ts +483 -0
  292. package/dist/contracts/Secrets.d.ts.map +1 -0
  293. package/dist/contracts/Secrets.js +136 -0
  294. package/dist/contracts/Secrets.js.map +1 -0
  295. package/dist/contracts/Settings.d.ts +221 -0
  296. package/dist/contracts/Settings.d.ts.map +1 -0
  297. package/dist/contracts/Settings.js +163 -0
  298. package/dist/contracts/Settings.js.map +1 -0
  299. package/dist/contracts/Sharing.d.ts +319 -0
  300. package/dist/contracts/Sharing.d.ts.map +1 -0
  301. package/dist/contracts/Sharing.js +172 -0
  302. package/dist/contracts/Sharing.js.map +1 -0
  303. package/dist/contracts/Slot.d.ts +162 -0
  304. package/dist/contracts/Slot.d.ts.map +1 -0
  305. package/dist/contracts/Slot.js +56 -0
  306. package/dist/contracts/Slot.js.map +1 -0
  307. package/dist/contracts/Space.d.ts +256 -0
  308. package/dist/contracts/Space.d.ts.map +1 -0
  309. package/dist/contracts/Space.js +133 -0
  310. package/dist/contracts/Space.js.map +1 -0
  311. package/dist/contracts/StorageAdapter.d.ts +124 -0
  312. package/dist/contracts/StorageAdapter.d.ts.map +1 -0
  313. package/dist/contracts/StorageAdapter.js +96 -0
  314. package/dist/contracts/StorageAdapter.js.map +1 -0
  315. package/dist/contracts/StorageBackend.d.ts +310 -0
  316. package/dist/contracts/StorageBackend.d.ts.map +1 -0
  317. package/dist/contracts/StorageBackend.js +196 -0
  318. package/dist/contracts/StorageBackend.js.map +1 -0
  319. package/dist/contracts/Sync.d.ts +286 -0
  320. package/dist/contracts/Sync.d.ts.map +1 -0
  321. package/dist/contracts/Sync.js +157 -0
  322. package/dist/contracts/Sync.js.map +1 -0
  323. package/dist/contracts/Telemetry.d.ts +183 -0
  324. package/dist/contracts/Telemetry.d.ts.map +1 -0
  325. package/dist/contracts/Telemetry.js +153 -0
  326. package/dist/contracts/Telemetry.js.map +1 -0
  327. package/dist/contracts/ThemeTokens.d.ts +212 -0
  328. package/dist/contracts/ThemeTokens.d.ts.map +1 -0
  329. package/dist/contracts/ThemeTokens.js +111 -0
  330. package/dist/contracts/ThemeTokens.js.map +1 -0
  331. package/dist/contracts/ToolSource.d.ts +135 -0
  332. package/dist/contracts/ToolSource.d.ts.map +1 -0
  333. package/dist/contracts/ToolSource.js +81 -0
  334. package/dist/contracts/ToolSource.js.map +1 -0
  335. package/dist/contracts/Versioning.d.ts +363 -0
  336. package/dist/contracts/Versioning.d.ts.map +1 -0
  337. package/dist/contracts/Versioning.js +201 -0
  338. package/dist/contracts/Versioning.js.map +1 -0
  339. package/dist/contracts/View.d.ts +232 -0
  340. package/dist/contracts/View.d.ts.map +1 -0
  341. package/dist/contracts/View.js +102 -0
  342. package/dist/contracts/View.js.map +1 -0
  343. package/dist/contracts/WorkItems.d.ts +242 -0
  344. package/dist/contracts/WorkItems.d.ts.map +1 -0
  345. package/dist/contracts/WorkItems.js +126 -0
  346. package/dist/contracts/WorkItems.js.map +1 -0
  347. package/dist/contracts/Workflow.d.ts +191 -0
  348. package/dist/contracts/Workflow.d.ts.map +1 -0
  349. package/dist/contracts/Workflow.js +63 -0
  350. package/dist/contracts/Workflow.js.map +1 -0
  351. package/dist/contracts/index.d.ts +75 -0
  352. package/dist/contracts/index.d.ts.map +1 -0
  353. package/dist/contracts/index.js +196 -0
  354. package/dist/contracts/index.js.map +1 -0
  355. package/dist/devices/module.d.ts +3777 -0
  356. package/dist/devices/module.d.ts.map +1 -0
  357. package/dist/devices/module.js +179 -0
  358. package/dist/devices/module.js.map +1 -0
  359. package/dist/drizzle/Entity.d.ts +148 -0
  360. package/dist/drizzle/Entity.d.ts.map +1 -0
  361. package/dist/drizzle/Entity.js +396 -0
  362. package/dist/drizzle/Entity.js.map +1 -0
  363. package/dist/index.d.ts +20 -0
  364. package/dist/index.d.ts.map +1 -0
  365. package/dist/index.js +20 -0
  366. package/dist/index.js.map +1 -0
  367. package/package.json +48 -3
  368. package/schema/Actor.json +46 -0
  369. package/schema/AuditRecord.json +403 -0
  370. package/schema/DaemonHealth.json +29 -0
  371. package/schema/InvocationError.json +257 -0
  372. package/schema/InvocationReceipt.json +253 -0
  373. package/schema/Lockfile.json +129 -0
  374. package/schema/OutboxEvent.json +36 -0
  375. package/schema/PairingConfirm.json +33 -0
  376. package/schema/PairingResult.json +18 -0
  377. package/schema/PairingStart.json +18 -0
  378. package/schema/ProvenanceEntry.json +110 -0
  379. package/schema/ReplayEnvelope.json +269 -0
  380. package/schema/Surface.json +17 -0
  381. package/schema/codegen/LocalClient.json +1295 -0
  382. package/schema/codegen/Sandbox.json +320 -0
  383. package/schema/contracts/ActionConsent.json +1930 -0
  384. package/schema/contracts/ActionRegistry.json +722 -0
  385. package/schema/contracts/Actor.json +451 -0
  386. package/schema/contracts/AgentResources.json +1400 -0
  387. package/schema/contracts/AgentRuntime.json +4017 -0
  388. package/schema/contracts/Approvals.json +2916 -0
  389. package/schema/contracts/Audit.json +3268 -0
  390. package/schema/contracts/CalendarProvider.json +5557 -0
  391. package/schema/contracts/ClientSDK.json +1400 -0
  392. package/schema/contracts/CollabDocument.json +4012 -0
  393. package/schema/contracts/Command.json +616 -0
  394. package/schema/contracts/Connections.json +6687 -0
  395. package/schema/contracts/ContextAccounting.json +685 -0
  396. package/schema/contracts/Daemon.json +4555 -0
  397. package/schema/contracts/DbTx.json +321 -0
  398. package/schema/contracts/Delegation.json +949 -0
  399. package/schema/contracts/DeviceControl.json +2626 -0
  400. package/schema/contracts/Directory.json +5168 -0
  401. package/schema/contracts/DirectoryProvider.json +2090 -0
  402. package/schema/contracts/DocumentSource.json +2044 -0
  403. package/schema/contracts/Files.json +4122 -0
  404. package/schema/contracts/Flags.json +1202 -0
  405. package/schema/contracts/Host.json +1769 -0
  406. package/schema/contracts/HttpApi.json +1615 -0
  407. package/schema/contracts/Ingestion.json +3211 -0
  408. package/schema/contracts/Ingress.json +819 -0
  409. package/schema/contracts/Invocation.json +2044 -0
  410. package/schema/contracts/LocalClient.json +6642 -0
  411. package/schema/contracts/Locale.json +654 -0
  412. package/schema/contracts/MachineIdentity.json +2303 -0
  413. package/schema/contracts/MailProvider.json +6663 -0
  414. package/schema/contracts/Memory.json +579 -0
  415. package/schema/contracts/Messaging.json +1764 -0
  416. package/schema/contracts/Metering.json +3060 -0
  417. package/schema/contracts/ModelProvider.json +1127 -0
  418. package/schema/contracts/ModuleManifest.json +9449 -0
  419. package/schema/contracts/NotificationChannel.json +986 -0
  420. package/schema/contracts/Notifications.json +4280 -0
  421. package/schema/contracts/Outbox.json +1451 -0
  422. package/schema/contracts/Privacy.json +4354 -0
  423. package/schema/contracts/Progress.json +1524 -0
  424. package/schema/contracts/QuerySurface.json +661 -0
  425. package/schema/contracts/Readiness.json +209 -0
  426. package/schema/contracts/Release.json +805 -0
  427. package/schema/contracts/ResultRendering.json +2859 -0
  428. package/schema/contracts/Sandbox.json +2286 -0
  429. package/schema/contracts/Scheduler.json +6138 -0
  430. package/schema/contracts/ScreenContext.json +1238 -0
  431. package/schema/contracts/Search.json +1058 -0
  432. package/schema/contracts/Secrets.json +2444 -0
  433. package/schema/contracts/Settings.json +654 -0
  434. package/schema/contracts/Sharing.json +2854 -0
  435. package/schema/contracts/Slot.json +537 -0
  436. package/schema/contracts/Space.json +892 -0
  437. package/schema/contracts/StorageAdapter.json +623 -0
  438. package/schema/contracts/StorageBackend.json +2421 -0
  439. package/schema/contracts/Sync.json +894 -0
  440. package/schema/contracts/Telemetry.json +696 -0
  441. package/schema/contracts/ThemeTokens.json +547 -0
  442. package/schema/contracts/ToolSource.json +1333 -0
  443. package/schema/contracts/Versioning.json +1481 -0
  444. package/schema/contracts/View.json +750 -0
  445. package/schema/contracts/WorkItems.json +1731 -0
  446. package/schema/contracts/Workflow.json +1242 -0
  447. package/src/Agent.ts +758 -0
  448. package/src/Analytics.ts +110 -0
  449. package/src/Approval.ts +131 -0
  450. package/src/Catalog.ts +192 -0
  451. package/src/Checklist.ts +162 -0
  452. package/src/Data.ts +109 -0
  453. package/src/Devices.ts +721 -0
  454. package/src/Durable.ts +240 -0
  455. package/src/Errors.ts +111 -0
  456. package/src/JsonSchema.ts +166 -0
  457. package/src/Manifest.ts +1147 -0
  458. package/src/Module.ts +640 -0
  459. package/src/Optimistic.ts +332 -0
  460. package/src/Projection.ts +207 -0
  461. package/src/Proposals.ts +89 -0
  462. package/src/Receipt.ts +125 -0
  463. package/src/Records.ts +197 -0
  464. package/src/Render.ts +515 -0
  465. package/src/Rpc.ts +113 -0
  466. package/src/SearchLanguages.ts +33 -0
  467. package/src/Service.ts +102 -0
  468. package/src/Versions.ts +69 -0
  469. package/src/contracts/ActionConsent.ts +150 -0
  470. package/src/contracts/ActionRegistry.ts +39 -0
  471. package/src/contracts/Actor.ts +53 -0
  472. package/src/contracts/AgentResources.ts +167 -0
  473. package/src/contracts/AgentRuntime.ts +154 -0
  474. package/src/contracts/Approvals.ts +133 -0
  475. package/src/contracts/Audit.ts +160 -0
  476. package/src/contracts/CalendarProvider.ts +241 -0
  477. package/src/contracts/Capability.ts +246 -0
  478. package/src/contracts/ClientSDK.ts +199 -0
  479. package/src/contracts/CollabDocument.ts +420 -0
  480. package/src/contracts/Command.ts +74 -0
  481. package/src/contracts/Connections.ts +360 -0
  482. package/src/contracts/ContextAccounting.ts +35 -0
  483. package/src/contracts/Daemon.ts +247 -0
  484. package/src/contracts/DbTx.ts +110 -0
  485. package/src/contracts/Delegation.ts +91 -0
  486. package/src/contracts/DeviceControl.ts +143 -0
  487. package/src/contracts/Directory.ts +384 -0
  488. package/src/contracts/DirectoryProvider.ts +82 -0
  489. package/src/contracts/DocumentSource.ts +71 -0
  490. package/src/contracts/Files.ts +395 -0
  491. package/src/contracts/Flags.ts +241 -0
  492. package/src/contracts/Host.ts +245 -0
  493. package/src/contracts/HttpApi.ts +100 -0
  494. package/src/contracts/Ingestion.ts +315 -0
  495. package/src/contracts/Ingress.ts +132 -0
  496. package/src/contracts/Invocation.ts +122 -0
  497. package/src/contracts/LocalClient.ts +614 -0
  498. package/src/contracts/Locale.ts +133 -0
  499. package/src/contracts/MachineIdentity.ts +305 -0
  500. package/src/contracts/MailProvider.ts +272 -0
  501. package/src/contracts/Memory.ts +47 -0
  502. package/src/contracts/Messaging.ts +108 -0
  503. package/src/contracts/Metering.ts +231 -0
  504. package/src/contracts/ModelProvider.ts +87 -0
  505. package/src/contracts/ModuleManifest.ts +310 -0
  506. package/src/contracts/NotificationChannel.ts +158 -0
  507. package/src/contracts/Notifications.ts +309 -0
  508. package/src/contracts/Outbox.ts +246 -0
  509. package/src/contracts/Privacy.ts +502 -0
  510. package/src/contracts/Progress.ts +196 -0
  511. package/src/contracts/QuerySurface.ts +134 -0
  512. package/src/contracts/Readiness.ts +67 -0
  513. package/src/contracts/Release.ts +199 -0
  514. package/src/contracts/ResultRendering.ts +65 -0
  515. package/src/contracts/Sandbox.ts +648 -0
  516. package/src/contracts/Scheduler.ts +237 -0
  517. package/src/contracts/ScreenContext.ts +316 -0
  518. package/src/contracts/Search.ts +126 -0
  519. package/src/contracts/Secrets.ts +162 -0
  520. package/src/contracts/Settings.ts +207 -0
  521. package/src/contracts/Sharing.ts +205 -0
  522. package/src/contracts/Slot.ts +61 -0
  523. package/src/contracts/Space.ts +157 -0
  524. package/src/contracts/StorageAdapter.ts +104 -0
  525. package/src/contracts/StorageBackend.ts +220 -0
  526. package/src/contracts/Sync.ts +180 -0
  527. package/src/contracts/Telemetry.ts +177 -0
  528. package/src/contracts/ThemeTokens.ts +136 -0
  529. package/src/contracts/ToolSource.ts +94 -0
  530. package/src/contracts/Versioning.ts +237 -0
  531. package/src/contracts/View.ts +116 -0
  532. package/src/contracts/WorkItems.ts +144 -0
  533. package/src/contracts/Workflow.ts +67 -0
  534. package/src/contracts/index.ts +205 -0
  535. package/src/devices/module.ts +201 -0
  536. package/src/drizzle/Entity.ts +524 -0
  537. package/src/index.ts +19 -0
@@ -0,0 +1,319 @@
1
+ /**
2
+ * Optimistic effects (decision "Data": each client keeps a policy-scoped partial replica with optimistic writes;
3
+ * criterion 6). An action may declare the change it predicts on the replica, so a client shows it before the
4
+ * server answers. The declaration is small and declarative, derived from the action's `writes` and `target`:
5
+ *
6
+ * - `insert`: a new record of the action's `writes` entity, its fields taken from the input, the acting user and
7
+ * organisation, the current time or constants. Its key is derived from a key the caller names in the input
8
+ * (`recordKey`), so the client and the kernel arrive at the same primary key and the confirmed row replaces the
9
+ * predicted one;
10
+ * - `update`: fields of the action's target record (or each of its targets) set from the input;
11
+ * - `delete`: the action's target record (or each of its targets) removed;
12
+ * - `custom`: a change the three kinds cannot describe (several rows, a computed field, a counter, a move between
13
+ * parents), predicted by the module's own code: a function in its `predictions.ts`, which `eloxiv generate` wires
14
+ * into the action's mutator. It may change only the tables of the entities the action declares (`writes`,
15
+ * `target`, `actsOn`) that sync, and runs only on the client's replica.
16
+ *
17
+ * The prediction is only a prediction. The kernel never runs it: the action's handler is the authority, through
18
+ * the one invocation path, and the replica replaces the prediction with the server's rows, or drops it when the
19
+ * call is refused. `eloxiv generate` writes each module's mutators from these declarations (`sync.gen.ts`); the
20
+ * client reaches them through `@eloxiv/client` only.
21
+ */
22
+ import { Schema } from "effect";
23
+ /** Where one predicted field's value comes from. */
24
+ export const OptimisticValue = Schema.Union([
25
+ /** The input field's encoded value; `default` when the caller left it out. */
26
+ Schema.Struct({ from: Schema.Literal("input"), field: Schema.String, default: Schema.optionalKey(Schema.Json) }),
27
+ /** The acting user's id or the acting organisation's. */
28
+ Schema.Struct({ from: Schema.Literal("actor"), field: Schema.Literals(["userId", "orgId"]) }),
29
+ /** The time on the client's clock, as sync carries instants (epoch milliseconds). */
30
+ Schema.Struct({ from: Schema.Literal("now") }),
31
+ /** A constant. */
32
+ Schema.Struct({ from: Schema.Literal("value"), value: Schema.Json }),
33
+ ]);
34
+ /** The change an action predicts on the replica. */
35
+ export const OptimisticEffect = Schema.Union([
36
+ Schema.Struct({
37
+ kind: Schema.Literal("insert"),
38
+ /**
39
+ * The input field naming the new record's key: the record's primary key is `recordKey` of it, for the acting
40
+ * user and organisation (the kernel derives it on every surface; a caller that leaves it out gets a fresh one).
41
+ */
42
+ key: Schema.String,
43
+ /** Every synced field of the record but its primary key: where its value comes from. */
44
+ values: Schema.Record(Schema.String, OptimisticValue),
45
+ }),
46
+ /** The fields of the target record(s) the action sets. */
47
+ Schema.Struct({ kind: Schema.Literal("update"), set: Schema.Record(Schema.String, OptimisticValue) }),
48
+ Schema.Struct({ kind: Schema.Literal("delete") }),
49
+ /**
50
+ * The module predicts the change itself: its `predictions.ts` exports a function named like the action's local
51
+ * name, which may change only the synced tables of the entities the action declares (`predictedEntityNames`).
52
+ */
53
+ Schema.Struct({ kind: Schema.Literal("custom") }),
54
+ ]);
55
+ /** Builders for an action's `optimistic` declaration. */
56
+ export const optimistic = {
57
+ /** The action inserts a record of its `writes` entity, keyed by `recordKey` of `input[key]`. */
58
+ insert: (spec) => ({ kind: "insert", key: spec.key, values: spec.values }),
59
+ /** The action sets these fields of its target record(s). */
60
+ update: (spec) => ({ kind: "update", set: spec.set }),
61
+ /** The action deletes its target record(s). */
62
+ delete: () => ({ kind: "delete" }),
63
+ /**
64
+ * The module predicts the change itself, for one the three kinds cannot describe: its `predictions.ts` exports a
65
+ * function named like the action (`wave` for `hello.wave`), which changes only the tables of the entities the
66
+ * action declares (`writes`, `target`, `actsOn`).
67
+ */
68
+ custom: () => ({ kind: "custom" }),
69
+ /** An input field's value, or `fallback` when the caller left it out. */
70
+ input: (field, ...fallback) => fallback.length === 0 ? { from: "input", field } : { from: "input", field, default: fallback[0] },
71
+ /** The acting user's or organisation's id. */
72
+ actor: (field) => ({ from: "actor", field }),
73
+ /** Now, in epoch milliseconds. */
74
+ now: () => ({ from: "now" }),
75
+ /** A constant. */
76
+ value: (value) => ({ from: "value", value }),
77
+ };
78
+ /**
79
+ * The entity a declarative optimistic effect changes: its `writes` entity for an insert, its target's for an update
80
+ * or a delete. A custom prediction may change several (`predictedEntityNames`), so it has none here.
81
+ */
82
+ export const optimisticEntityName = (action) => action.optimistic === undefined || action.optimistic.kind === "custom"
83
+ ? undefined
84
+ : action.optimistic.kind === "insert"
85
+ ? action.writes
86
+ : action.target?.entity;
87
+ /**
88
+ * The entities an action's prediction may change: for a custom prediction, every entity the action declares
89
+ * (`writes`, `target`, `actsOn`, once each, in that order), exactly the ones its policy reaches; for a declarative
90
+ * effect, the one it names (`optimisticEntityName`).
91
+ */
92
+ export const predictedEntityNames = (action) => {
93
+ if (action.optimistic === undefined)
94
+ return [];
95
+ if (action.optimistic.kind !== "custom") {
96
+ const one = optimisticEntityName(action);
97
+ return one === undefined ? [] : [one];
98
+ }
99
+ const names = [action.writes, action.target?.entity, ...action.actsOn].filter((n) => n !== undefined);
100
+ return [...new Set(names)];
101
+ };
102
+ /**
103
+ * Why an action's optimistic effect cannot be generated or would predict something other than what it says, as
104
+ * sentences naming the action (empty when it is sound): the entity it changes syncs, every field it sets is a
105
+ * synced field (never the primary key, which an insert derives and an update or delete takes from the target),
106
+ * an insert gives every field the replica cannot leave empty, and every input field it reads is in the input.
107
+ */
108
+ export const optimisticProblems = (action, entities) => {
109
+ const effect = action.optimistic;
110
+ if (effect === undefined)
111
+ return [];
112
+ const name = action.name;
113
+ if (!Schema.is(OptimisticEffect)(effect)) {
114
+ return [`${name}: its optimistic effect is not an insert, update, delete or custom prediction`];
115
+ }
116
+ const problems = [];
117
+ if (action.hints.readOnly)
118
+ problems.push(`${name} is read-only, so it predicts no change`);
119
+ if (effect.kind === "custom") {
120
+ const declared = predictedEntityNames(action);
121
+ if (declared.length === 0) {
122
+ problems.push(`${name} predicts a change of its own, so it must declare the entities it changes (writes, target or actsOn)`);
123
+ return problems;
124
+ }
125
+ const known = declared.map((n) => entities[n]).filter((e) => e !== undefined);
126
+ if (known.length > 0 && known.every((e) => e.sync === false)) {
127
+ problems.push(`${name} predicts a change of its own, but none of the entities it declares syncs`);
128
+ }
129
+ return problems;
130
+ }
131
+ const inputFields = action.input.fields;
132
+ const inputHas = (field) => inputFields !== undefined && Object.hasOwn(inputFields, field);
133
+ const entityName = optimisticEntityName(action);
134
+ if (entityName === undefined) {
135
+ problems.push(effect.kind === "insert"
136
+ ? `${name} predicts an insert, so it must declare the entity it writes (writes)`
137
+ : `${name} predicts ${effect.kind === "update" ? "an update" : "a delete"} of its target, so it must declare one (target)`);
138
+ return problems;
139
+ }
140
+ const entity = entities[entityName];
141
+ if (entity === undefined)
142
+ return problems;
143
+ if (entity.sync === false) {
144
+ problems.push(`${name} predicts a change to ${entity.name}, which does not sync`);
145
+ return problems;
146
+ }
147
+ const synced = new Set(entity.sync.fields);
148
+ const storage = entity.storage;
149
+ const values = (record) => {
150
+ for (const [field, value] of Object.entries(record)) {
151
+ if (field === entity.primaryKey) {
152
+ problems.push(`${name} sets ${entity.name}'s primary key ${field}, which ${effect.kind === "insert" ? "the kernel derives from the key" : "is the target"}`);
153
+ }
154
+ else if (!synced.has(field)) {
155
+ problems.push(`${name} predicts ${entity.name} field ${field}, which ${entity.name} does not sync`);
156
+ }
157
+ if (value.from === "input" && !inputHas(value.field)) {
158
+ problems.push(`${name} predicts ${field} from input field ${value.field}, which its input does not have`);
159
+ }
160
+ if (value.from === "now" && storage[field] !== undefined && storage[field].type !== "number") {
161
+ problems.push(`${name} predicts ${field} as the time, but ${entity.name} stores it as ${storage[field].type}`);
162
+ }
163
+ }
164
+ };
165
+ if (effect.kind === "insert") {
166
+ if (!inputHas(effect.key))
167
+ problems.push(`${name}'s record key comes from input field ${effect.key}, which its input does not have`);
168
+ if (action.target !== undefined && action.target.field === effect.key) {
169
+ problems.push(`${name}'s record key ${effect.key} is also its target field`);
170
+ }
171
+ values(effect.values);
172
+ for (const field of synced) {
173
+ if (field === entity.primaryKey || Object.hasOwn(effect.values, field))
174
+ continue;
175
+ if (storage[field] !== undefined && !storage[field].nullable) {
176
+ problems.push(`${name} predicts an insert without ${entity.name} field ${field}, which cannot be empty`);
177
+ }
178
+ }
179
+ }
180
+ else if (effect.kind === "update") {
181
+ if (Object.keys(effect.set).length === 0)
182
+ problems.push(`${name} predicts an update that sets nothing`);
183
+ values(effect.set);
184
+ }
185
+ return problems;
186
+ };
187
+ /**
188
+ * What a caller may name as a record's key: 1 to 128 letters, digits, `_` or `-` (a UUID, a nanoid). The record's
189
+ * primary key is derived from it (`recordKey`), never taken from it.
190
+ */
191
+ export const RECORD_KEY_PATTERN = /^[A-Za-z0-9_-]{1,128}$/;
192
+ export const isRecordKeyNonce = (value) => typeof value === "string" && RECORD_KEY_PATTERN.test(value);
193
+ /**
194
+ * The primary key of the record an insert creates from a key the caller named: a UUID (version 8, RFC 9562) from
195
+ * SHA-256 of the acting organisation, the acting user, the entity's Cedar type and the key. The client computes it
196
+ * for its prediction and the kernel for the handler, so both arrive at the same record. A caller can never choose a
197
+ * record's key outright: the same key named by another user, in another organisation or for another entity is
198
+ * another record, so no insert can collide with (and so disclose) a record the caller did not create itself.
199
+ */
200
+ export const recordKey = (actor, cedarType, nonce) => {
201
+ if (!isRecordKeyNonce(nonce)) {
202
+ throw new Error(`A record key must be 1 to 128 letters, digits, _ or -, not ${JSON.stringify(nonce)}`);
203
+ }
204
+ const digest = sha256Bytes(utf8Bytes(JSON.stringify(["eloxiv.record-key.v1", actor.orgId, actor.userId, cedarType, nonce])));
205
+ const bytes = digest.slice(0, 16);
206
+ bytes[6] = (bytes[6] & 0x0f) | 0x80;
207
+ bytes[8] = (bytes[8] & 0x3f) | 0x80;
208
+ const hex = [...bytes].map((b) => b.toString(16).padStart(2, "0")).join("");
209
+ return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;
210
+ };
211
+ /** A fresh key for `recordKey`: 22 random letters, digits, `_` and `-` (132 bits). */
212
+ export const newRecordKeyNonce = () => {
213
+ const alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-";
214
+ const random = new Uint8Array(22);
215
+ // Web Crypto where the runtime has it (React Native may not); a key only has to be unique, not secret.
216
+ const source = globalThis.crypto;
217
+ if (typeof source?.getRandomValues === "function")
218
+ source.getRandomValues(random);
219
+ else
220
+ for (let i = 0; i < random.length; i++)
221
+ random[i] = Math.floor(Math.random() * 256);
222
+ return [...random].map((b) => alphabet[b & 63]).join("");
223
+ };
224
+ const K = new Uint32Array([
225
+ 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98,
226
+ 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786,
227
+ 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 0x983e5152, 0xa831c66d, 0xb00327c8,
228
+ 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,
229
+ 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819,
230
+ 0xd6990624, 0xf40e3585, 0x106aa070, 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a,
231
+ 0x5b9cca4f, 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7,
232
+ 0xc67178f2,
233
+ ]);
234
+ /**
235
+ * A string's UTF-8 bytes, as `TextEncoder` gives them (a lone surrogate becomes U+FFFD), in plain JavaScript: the
236
+ * contracts compile and run without the DOM's or Node's globals (React Native's typecheck has no `TextEncoder`).
237
+ */
238
+ export const utf8Bytes = (text) => {
239
+ const out = [];
240
+ for (let i = 0; i < text.length; i++) {
241
+ let code = text.charCodeAt(i);
242
+ if (code >= 0xd800 && code <= 0xdbff) {
243
+ const next = i + 1 < text.length ? text.charCodeAt(i + 1) : 0;
244
+ if (next >= 0xdc00 && next <= 0xdfff) {
245
+ code = 0x10000 + ((code - 0xd800) << 10) + (next - 0xdc00);
246
+ i++;
247
+ }
248
+ else
249
+ code = 0xfffd;
250
+ }
251
+ else if (code >= 0xdc00 && code <= 0xdfff)
252
+ code = 0xfffd;
253
+ if (code < 0x80)
254
+ out.push(code);
255
+ else if (code < 0x800)
256
+ out.push(0xc0 | (code >> 6), 0x80 | (code & 0x3f));
257
+ else if (code < 0x10000)
258
+ out.push(0xe0 | (code >> 12), 0x80 | ((code >> 6) & 0x3f), 0x80 | (code & 0x3f));
259
+ else
260
+ out.push(0xf0 | (code >> 18), 0x80 | ((code >> 12) & 0x3f), 0x80 | ((code >> 6) & 0x3f), 0x80 | (code & 0x3f));
261
+ }
262
+ return Uint8Array.from(out);
263
+ };
264
+ /**
265
+ * SHA-256 (FIPS 180-4), synchronously and in plain JavaScript: a prediction runs inside Zero's mutator on every
266
+ * runtime the client SDK supports (React Native's Hermes has no `crypto.subtle`), and must give the kernel's answer.
267
+ */
268
+ export const sha256Bytes = (message) => {
269
+ const length = message.length;
270
+ const padded = new Uint8Array(((length + 9 + 63) >> 6) << 6);
271
+ padded.set(message);
272
+ padded[length] = 0x80;
273
+ const view = new DataView(padded.buffer);
274
+ view.setUint32(padded.length - 8, Math.floor(length / 0x20000000));
275
+ view.setUint32(padded.length - 4, (length << 3) >>> 0);
276
+ const h = new Uint32Array([
277
+ 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19,
278
+ ]);
279
+ const w = new Uint32Array(64);
280
+ const rotr = (x, n) => (x >>> n) | (x << (32 - n));
281
+ for (let offset = 0; offset < padded.length; offset += 64) {
282
+ for (let i = 0; i < 16; i++)
283
+ w[i] = view.getUint32(offset + i * 4);
284
+ for (let i = 16; i < 64; i++) {
285
+ const a = w[i - 15];
286
+ const b = w[i - 2];
287
+ const s0 = rotr(a, 7) ^ rotr(a, 18) ^ (a >>> 3);
288
+ const s1 = rotr(b, 17) ^ rotr(b, 19) ^ (b >>> 10);
289
+ w[i] = (w[i - 16] + s0 + w[i - 7] + s1) >>> 0;
290
+ }
291
+ let [a, b, c, d, e, f, g, hh] = h;
292
+ for (let i = 0; i < 64; i++) {
293
+ const t1 = (hh + (rotr(e, 6) ^ rotr(e, 11) ^ rotr(e, 25)) + ((e & f) ^ (~e & g)) + K[i] + w[i]) >>> 0;
294
+ const t2 = ((rotr(a, 2) ^ rotr(a, 13) ^ rotr(a, 22)) + ((a & b) ^ (a & c) ^ (b & c))) >>> 0;
295
+ hh = g;
296
+ g = f;
297
+ f = e;
298
+ e = (d + t1) >>> 0;
299
+ d = c;
300
+ c = b;
301
+ b = a;
302
+ a = (t1 + t2) >>> 0;
303
+ }
304
+ h[0] = (h[0] + a) >>> 0;
305
+ h[1] = (h[1] + b) >>> 0;
306
+ h[2] = (h[2] + c) >>> 0;
307
+ h[3] = (h[3] + d) >>> 0;
308
+ h[4] = (h[4] + e) >>> 0;
309
+ h[5] = (h[5] + f) >>> 0;
310
+ h[6] = (h[6] + g) >>> 0;
311
+ h[7] = (h[7] + hh) >>> 0;
312
+ }
313
+ const out = new Uint8Array(32);
314
+ const outView = new DataView(out.buffer);
315
+ for (let i = 0; i < 8; i++)
316
+ outView.setUint32(i * 4, h[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,CAAC,CAAC,CAAC,CAAE,GAAG,EAAE,CAAC,KAAK,CAAC,CAAA;IAC3B,CAAC;IACD,MAAM,GAAG,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAA;IAC9B,MAAM,OAAO,GAAG,IAAI,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;IACxC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE;QAAE,OAAO,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAE,CAAC,CAAA;IAC3D,OAAO,GAAG,CAAA;AACZ,CAAC,CAAA"}
@@ -0,0 +1,163 @@
1
+ /**
2
+ * The action registry's projection: one action definition becomes the schema
3
+ * every surface publishes (decisions.md "One action registry is the source of
4
+ * truth"). Surfaces take the action's input as raw JSON documented with this
5
+ * input schema (the invocation path decodes it), and return the result
6
+ * envelope `{ kind: "output", output } | { kind: "replay", receipt }`.
7
+ */
8
+ import { Schema } from "effect";
9
+ import { InvocationError } from "./Errors.ts";
10
+ import { type AnyAction } from "./Module.ts";
11
+ /** Where the HTTP surface serves each action: `POST <prefix>/<action>`. */
12
+ export declare const HTTP_ACTIONS_PREFIX = "/api/actions";
13
+ /**
14
+ * The read batch (`POST /api/batch`): up to `READ_BATCH_MAX_ITEMS` read-only actions in one request, each run
15
+ * through the invocation path on its own (its own identity, policy, audit and failure), answered in order. It is a
16
+ * transport, not an action: it is no tool and appears in no catalogue.
17
+ */
18
+ export declare const READ_BATCH_PATH = "/api/batch";
19
+ export declare const READ_BATCH_MAX_ITEMS = 25;
20
+ export declare const ReadBatchRequest: Schema.Struct<{
21
+ readonly items: Schema.$Array<Schema.Struct<{
22
+ readonly action: Schema.String;
23
+ readonly input: Schema.Unknown;
24
+ }>>;
25
+ }>;
26
+ export type ReadBatchRequest = typeof ReadBatchRequest.Type;
27
+ /** One item's answer: its result envelope, or the error and the HTTP status it would have had on its own. */
28
+ export type ReadBatchItemResult = {
29
+ readonly ok: true;
30
+ readonly result: unknown;
31
+ } | {
32
+ readonly ok: false;
33
+ readonly status: number;
34
+ readonly error: {
35
+ readonly _tag: string;
36
+ readonly message?: string;
37
+ readonly [field: string]: unknown;
38
+ };
39
+ };
40
+ /**
41
+ * WebMCP (browser agents, `navigator.modelContext`): a person's own session asks for a short-lived agent session for
42
+ * the browser agent (`session`), every call of which is the agent's on the kernel (consent, agent tool groups and
43
+ * person-only actions apply); the agent session lists the tools it reaches (`tools`, the compatibility manifest),
44
+ * each called on its HTTP route; `revoke` ends it.
45
+ */
46
+ export declare const WEBMCP_PATHS: {
47
+ readonly session: "/api/webmcp/session";
48
+ readonly revoke: "/api/webmcp/session/revoke";
49
+ readonly tools: "/api/webmcp/tools";
50
+ };
51
+ /**
52
+ * The kernel's MCP server identity (`GET /.well-known/mcp.json`, public): its canonical name (what MCP hosts, the
53
+ * CLI and a settings page list it as), its endpoint and OAuth resource, and where to discover how to sign in. Every
54
+ * client that connects an MCP host reads the name from here rather than making one up.
55
+ */
56
+ export declare const MCP_IDENTITY_PATH = "/.well-known/mcp.json";
57
+ export interface McpServerIdentity {
58
+ readonly name: string;
59
+ readonly title: string;
60
+ readonly version: string;
61
+ /** The streamable-HTTP endpoint. */
62
+ readonly endpoint: string;
63
+ /** The OAuth resource (RFC 8707) a token for it is bound to. */
64
+ readonly resource: string;
65
+ /** Its protected resource metadata (RFC 9728), which names the authorisation server. */
66
+ readonly resourceMetadata: string;
67
+ readonly transport: "streamable-http";
68
+ }
69
+ /** An app's MCP server name: its name with anything but letters, digits and `._-` as `-`. */
70
+ export declare const mcpServerName: (appName: string) => string;
71
+ /** One tool of the WebMCP manifest: an action an agent session reaches, called at `path`. */
72
+ export interface WebMcpToolManifest {
73
+ readonly name: string;
74
+ readonly description: string;
75
+ readonly inputSchema: Record<string, unknown>;
76
+ readonly readOnly: boolean;
77
+ readonly destructive: boolean;
78
+ /** Agent calls of it are held for the person's consent (`ConsentRequired`) unless a remembered permission covers them. */
79
+ readonly consent: boolean;
80
+ /** Its HTTP route (`POST`). */
81
+ readonly path: string;
82
+ }
83
+ /** The HTTP status each invocation error is answered with, on its own or as a batch item. */
84
+ export declare const INVOCATION_ERROR_STATUS: Readonly<Record<InvocationError["_tag"], number>>;
85
+ /** A JSON Schema document (draft 2020-12). */
86
+ export declare const JsonSchemaObject: Schema.$Record<Schema.String, Schema.Unknown>;
87
+ /** One registered action, as the registry lists it. */
88
+ export declare const ActionDescriptor: Schema.Struct<{
89
+ readonly name: Schema.String;
90
+ readonly module: Schema.String;
91
+ /** What people see the action called (`ActionContract.title`). */
92
+ readonly title: Schema.String;
93
+ readonly description: Schema.String;
94
+ /** The action's id in its module's Cedar namespace (`<Namespace>::Action::"<id>"`). */
95
+ readonly cedarAction: Schema.String;
96
+ /** The name MCP and agent tools use (`hello.greet` -> `hello_greet`). */
97
+ readonly toolName: Schema.String;
98
+ readonly writes: Schema.NullOr<Schema.String>;
99
+ readonly target: Schema.NullOr<Schema.Struct<{
100
+ readonly entity: Schema.String;
101
+ readonly field: Schema.String;
102
+ }>>;
103
+ readonly bestEffort: Schema.Boolean;
104
+ readonly hints: Schema.Struct<{
105
+ readonly readOnly: Schema.Boolean;
106
+ readonly destructive: Schema.Boolean;
107
+ readonly idempotent: Schema.Boolean;
108
+ }>;
109
+ /** An agent acting for a person needs the person's consent for each call (ActionConsent). */
110
+ readonly consent: Schema.Boolean;
111
+ /** Which surfaces offer the action: the app's agent, MCP, the API (typed client, HTTP, CLI, sync). */
112
+ readonly exposure: Schema.Struct<{
113
+ readonly agent: Schema.Boolean;
114
+ readonly mcp: Schema.Boolean;
115
+ readonly api: Schema.Boolean;
116
+ }>;
117
+ readonly input: Schema.$Record<Schema.String, Schema.Unknown>;
118
+ readonly output: Schema.$Record<Schema.String, Schema.Unknown>;
119
+ /** What every surface returns: the output envelope or a replay receipt. */
120
+ readonly result: Schema.$Record<Schema.String, Schema.Unknown>;
121
+ }>;
122
+ export type ActionDescriptor = typeof ActionDescriptor.Type;
123
+ /**
124
+ * What each surface publishes for one action. Every input schema is the action's input (MCP's wrapped in an
125
+ * object root when it has none, see `mcpToolInput`); every result the envelope.
126
+ */
127
+ export declare const SurfaceProjection: Schema.Struct<{
128
+ readonly rpc: Schema.Struct<{
129
+ readonly tag: Schema.String;
130
+ readonly payload: Schema.$Record<Schema.String, Schema.Unknown>;
131
+ readonly success: Schema.$Record<Schema.String, Schema.Unknown>;
132
+ readonly error: Schema.$Record<Schema.String, Schema.Unknown>;
133
+ }>;
134
+ readonly http: Schema.Struct<{
135
+ readonly method: Schema.Literal<"POST">;
136
+ readonly path: Schema.String;
137
+ readonly requestBody: Schema.$Record<Schema.String, Schema.Unknown>;
138
+ readonly response: Schema.$Record<Schema.String, Schema.Unknown>;
139
+ }>;
140
+ readonly mcp: Schema.Struct<{
141
+ readonly name: Schema.String;
142
+ readonly description: Schema.String;
143
+ readonly inputSchema: Schema.$Record<Schema.String, Schema.Unknown>;
144
+ readonly outputSchema: Schema.$Record<Schema.String, Schema.Unknown>;
145
+ }>;
146
+ readonly agent: Schema.Struct<{
147
+ readonly name: Schema.String;
148
+ readonly description: Schema.String;
149
+ readonly inputSchema: Schema.$Record<Schema.String, Schema.Unknown>;
150
+ }>;
151
+ }>;
152
+ export type SurfaceProjection = typeof SurfaceProjection.Type;
153
+ export declare const describeAction: (action: AnyAction, module: string) => ActionDescriptor;
154
+ /**
155
+ * An action's input schema as MCP tool parameters. MCP requires an object-rooted JSON Schema (tool arguments
156
+ * are always an object); an input whose schema is not (`Schema.Struct({})` emits `{ not: { type: "null" } }`)
157
+ * is wrapped as `{ type: "object", allOf: [schema] }`, so its constraints are still documented. Object-rooted
158
+ * inputs are returned unchanged.
159
+ */
160
+ export declare const mcpToolInput: (input: Record<string, unknown>) => Record<string, unknown>;
161
+ /** The schema each surface publishes for `action`, derived only from its definition. */
162
+ export declare const projectAction: (action: AnyAction) => SurfaceProjection;
163
+ //# sourceMappingURL=Projection.d.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