@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,3211 @@
1
+ {
2
+ "title": "Ingestion",
3
+ "kind": "kernel",
4
+ "version": "1.2.0",
5
+ "description": "Turns inbound content (files attached to records, DocumentSource documents over a Connection, emails and text a module receives) into extracted text and bounded, overlapping chunks that Search indexes under the record they belong to, so they are found exactly by those who may read the record. Each source item runs as a durable workflow (fetch, extract, chunk, index) that survives restarts without indexing anything twice, is idempotent per source item and version (resubmitting changes nothing; a new version supersedes the old one's chunks; a failed item resubmitted runs again), and reports its state and progress.",
6
+ "operations": {
7
+ "stageDataset": {
8
+ "description": "data.stage, ctx.ingestion.datasets.stage: stage rows as a dataset of the caller (a person) or the calling module, replacing it (or one page of it); bounded per dataset and per owner, expiring.",
9
+ "input": {
10
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
11
+ "type": "object",
12
+ "properties": {
13
+ "name": {
14
+ "type": "string",
15
+ "pattern": "^[a-z][a-z0-9_.:-]{0,63}$"
16
+ },
17
+ "rows": {
18
+ "type": "array",
19
+ "items": {
20
+ "type": "object"
21
+ }
22
+ },
23
+ "expiresInS": {
24
+ "anyOf": [
25
+ {
26
+ "type": "number"
27
+ },
28
+ {
29
+ "type": "string",
30
+ "enum": [
31
+ "Infinity",
32
+ "-Infinity",
33
+ "NaN"
34
+ ]
35
+ }
36
+ ]
37
+ }
38
+ },
39
+ "required": [
40
+ "name",
41
+ "rows"
42
+ ],
43
+ "additionalProperties": true
44
+ },
45
+ "output": {
46
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
47
+ "type": "object",
48
+ "properties": {
49
+ "name": {
50
+ "type": "string"
51
+ },
52
+ "rows": {
53
+ "anyOf": [
54
+ {
55
+ "type": "number"
56
+ },
57
+ {
58
+ "type": "string",
59
+ "enum": [
60
+ "Infinity",
61
+ "-Infinity",
62
+ "NaN"
63
+ ]
64
+ }
65
+ ]
66
+ },
67
+ "bytes": {
68
+ "anyOf": [
69
+ {
70
+ "type": "number"
71
+ },
72
+ {
73
+ "type": "string",
74
+ "enum": [
75
+ "Infinity",
76
+ "-Infinity",
77
+ "NaN"
78
+ ]
79
+ }
80
+ ]
81
+ },
82
+ "columns": {
83
+ "type": "array",
84
+ "items": {
85
+ "type": "object",
86
+ "properties": {
87
+ "name": {
88
+ "type": "string"
89
+ },
90
+ "type": {
91
+ "type": "string",
92
+ "enum": [
93
+ "number",
94
+ "boolean",
95
+ "text",
96
+ "json"
97
+ ]
98
+ }
99
+ },
100
+ "required": [
101
+ "name",
102
+ "type"
103
+ ],
104
+ "additionalProperties": true
105
+ }
106
+ },
107
+ "expiresAt": {
108
+ "type": "string"
109
+ }
110
+ },
111
+ "required": [
112
+ "name",
113
+ "rows",
114
+ "bytes",
115
+ "columns",
116
+ "expiresAt"
117
+ ],
118
+ "additionalProperties": true
119
+ },
120
+ "errors": {
121
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
122
+ "anyOf": [
123
+ {
124
+ "$ref": "#/$defs/UnauthenticatedEncoded"
125
+ },
126
+ {
127
+ "$ref": "#/$defs/ForbiddenEncoded"
128
+ },
129
+ {
130
+ "$ref": "#/$defs/InvalidInputEncoded"
131
+ }
132
+ ],
133
+ "$defs": {
134
+ "UnauthenticatedEncoded": {
135
+ "type": "object",
136
+ "properties": {
137
+ "_tag": {
138
+ "type": "string",
139
+ "enum": [
140
+ "Unauthenticated"
141
+ ]
142
+ },
143
+ "message": {
144
+ "type": "string"
145
+ }
146
+ },
147
+ "required": [
148
+ "_tag",
149
+ "message"
150
+ ],
151
+ "additionalProperties": true
152
+ },
153
+ "ForbiddenEncoded": {
154
+ "type": "object",
155
+ "properties": {
156
+ "_tag": {
157
+ "type": "string",
158
+ "enum": [
159
+ "Forbidden"
160
+ ]
161
+ },
162
+ "message": {
163
+ "type": "string"
164
+ },
165
+ "action": {
166
+ "type": "string"
167
+ }
168
+ },
169
+ "required": [
170
+ "_tag",
171
+ "message",
172
+ "action"
173
+ ],
174
+ "additionalProperties": true
175
+ },
176
+ "InvalidInputEncoded": {
177
+ "type": "object",
178
+ "properties": {
179
+ "_tag": {
180
+ "type": "string",
181
+ "enum": [
182
+ "InvalidInput"
183
+ ]
184
+ },
185
+ "message": {
186
+ "type": "string"
187
+ }
188
+ },
189
+ "required": [
190
+ "_tag",
191
+ "message"
192
+ ],
193
+ "additionalProperties": true
194
+ }
195
+ }
196
+ }
197
+ },
198
+ "queryDataset": {
199
+ "description": "data.query, ctx.ingestion.datasets.query: one read-only SELECT over the relation dataset, of the owner's dataset, in a transaction that always rolls back.",
200
+ "input": {
201
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
202
+ "type": "object",
203
+ "properties": {
204
+ "name": {
205
+ "type": "string",
206
+ "pattern": "^[a-z][a-z0-9_.:-]{0,63}$"
207
+ },
208
+ "sql": {
209
+ "type": "string",
210
+ "maxLength": 16384
211
+ },
212
+ "limit": {
213
+ "anyOf": [
214
+ {
215
+ "type": "number"
216
+ },
217
+ {
218
+ "type": "string",
219
+ "enum": [
220
+ "Infinity",
221
+ "-Infinity",
222
+ "NaN"
223
+ ]
224
+ }
225
+ ]
226
+ }
227
+ },
228
+ "required": [
229
+ "name",
230
+ "sql"
231
+ ],
232
+ "additionalProperties": true
233
+ },
234
+ "output": {
235
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
236
+ "type": "object",
237
+ "properties": {
238
+ "columns": {
239
+ "type": "array",
240
+ "items": {
241
+ "type": "string"
242
+ }
243
+ },
244
+ "rows": {
245
+ "type": "array",
246
+ "items": {
247
+ "type": "array"
248
+ }
249
+ },
250
+ "truncated": {
251
+ "type": "boolean"
252
+ }
253
+ },
254
+ "required": [
255
+ "columns",
256
+ "rows",
257
+ "truncated"
258
+ ],
259
+ "additionalProperties": true
260
+ },
261
+ "errors": {
262
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
263
+ "anyOf": [
264
+ {
265
+ "$ref": "#/$defs/UnauthenticatedEncoded"
266
+ },
267
+ {
268
+ "$ref": "#/$defs/ForbiddenEncoded"
269
+ },
270
+ {
271
+ "$ref": "#/$defs/InvalidInputEncoded"
272
+ }
273
+ ],
274
+ "$defs": {
275
+ "UnauthenticatedEncoded": {
276
+ "type": "object",
277
+ "properties": {
278
+ "_tag": {
279
+ "type": "string",
280
+ "enum": [
281
+ "Unauthenticated"
282
+ ]
283
+ },
284
+ "message": {
285
+ "type": "string"
286
+ }
287
+ },
288
+ "required": [
289
+ "_tag",
290
+ "message"
291
+ ],
292
+ "additionalProperties": true
293
+ },
294
+ "ForbiddenEncoded": {
295
+ "type": "object",
296
+ "properties": {
297
+ "_tag": {
298
+ "type": "string",
299
+ "enum": [
300
+ "Forbidden"
301
+ ]
302
+ },
303
+ "message": {
304
+ "type": "string"
305
+ },
306
+ "action": {
307
+ "type": "string"
308
+ }
309
+ },
310
+ "required": [
311
+ "_tag",
312
+ "message",
313
+ "action"
314
+ ],
315
+ "additionalProperties": true
316
+ },
317
+ "InvalidInputEncoded": {
318
+ "type": "object",
319
+ "properties": {
320
+ "_tag": {
321
+ "type": "string",
322
+ "enum": [
323
+ "InvalidInput"
324
+ ]
325
+ },
326
+ "message": {
327
+ "type": "string"
328
+ }
329
+ },
330
+ "required": [
331
+ "_tag",
332
+ "message"
333
+ ],
334
+ "additionalProperties": true
335
+ }
336
+ }
337
+ }
338
+ },
339
+ "listDatasets": {
340
+ "description": "data.datasets, ctx.ingestion.datasets.list: the owner's datasets that have not expired.",
341
+ "input": {
342
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
343
+ "not": {
344
+ "type": "null"
345
+ }
346
+ },
347
+ "output": {
348
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
349
+ "type": "object",
350
+ "properties": {
351
+ "datasets": {
352
+ "type": "array",
353
+ "items": {
354
+ "type": "object",
355
+ "properties": {
356
+ "name": {
357
+ "type": "string"
358
+ },
359
+ "rows": {
360
+ "anyOf": [
361
+ {
362
+ "type": "number"
363
+ },
364
+ {
365
+ "type": "string",
366
+ "enum": [
367
+ "Infinity",
368
+ "-Infinity",
369
+ "NaN"
370
+ ]
371
+ }
372
+ ]
373
+ },
374
+ "bytes": {
375
+ "anyOf": [
376
+ {
377
+ "type": "number"
378
+ },
379
+ {
380
+ "type": "string",
381
+ "enum": [
382
+ "Infinity",
383
+ "-Infinity",
384
+ "NaN"
385
+ ]
386
+ }
387
+ ]
388
+ },
389
+ "columns": {
390
+ "type": "array",
391
+ "items": {
392
+ "type": "object",
393
+ "properties": {
394
+ "name": {
395
+ "type": "string"
396
+ },
397
+ "type": {
398
+ "type": "string",
399
+ "enum": [
400
+ "number",
401
+ "boolean",
402
+ "text",
403
+ "json"
404
+ ]
405
+ }
406
+ },
407
+ "required": [
408
+ "name",
409
+ "type"
410
+ ],
411
+ "additionalProperties": true
412
+ }
413
+ },
414
+ "expiresAt": {
415
+ "type": "string"
416
+ }
417
+ },
418
+ "required": [
419
+ "name",
420
+ "rows",
421
+ "bytes",
422
+ "columns",
423
+ "expiresAt"
424
+ ],
425
+ "additionalProperties": true
426
+ }
427
+ }
428
+ },
429
+ "required": [
430
+ "datasets"
431
+ ],
432
+ "additionalProperties": true
433
+ },
434
+ "errors": {
435
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
436
+ "anyOf": [
437
+ {
438
+ "$ref": "#/$defs/UnauthenticatedEncoded"
439
+ },
440
+ {
441
+ "$ref": "#/$defs/ForbiddenEncoded"
442
+ }
443
+ ],
444
+ "$defs": {
445
+ "UnauthenticatedEncoded": {
446
+ "type": "object",
447
+ "properties": {
448
+ "_tag": {
449
+ "type": "string",
450
+ "enum": [
451
+ "Unauthenticated"
452
+ ]
453
+ },
454
+ "message": {
455
+ "type": "string"
456
+ }
457
+ },
458
+ "required": [
459
+ "_tag",
460
+ "message"
461
+ ],
462
+ "additionalProperties": true
463
+ },
464
+ "ForbiddenEncoded": {
465
+ "type": "object",
466
+ "properties": {
467
+ "_tag": {
468
+ "type": "string",
469
+ "enum": [
470
+ "Forbidden"
471
+ ]
472
+ },
473
+ "message": {
474
+ "type": "string"
475
+ },
476
+ "action": {
477
+ "type": "string"
478
+ }
479
+ },
480
+ "required": [
481
+ "_tag",
482
+ "message",
483
+ "action"
484
+ ],
485
+ "additionalProperties": true
486
+ }
487
+ }
488
+ }
489
+ },
490
+ "dropDataset": {
491
+ "description": "data.drop, ctx.ingestion.datasets.drop: delete one of the owner's datasets.",
492
+ "input": {
493
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
494
+ "type": "object",
495
+ "properties": {
496
+ "name": {
497
+ "type": "string"
498
+ }
499
+ },
500
+ "required": [
501
+ "name"
502
+ ],
503
+ "additionalProperties": true
504
+ },
505
+ "output": {
506
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
507
+ "type": "object",
508
+ "properties": {
509
+ "dropped": {
510
+ "type": "boolean"
511
+ }
512
+ },
513
+ "required": [
514
+ "dropped"
515
+ ],
516
+ "additionalProperties": true
517
+ },
518
+ "errors": {
519
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
520
+ "anyOf": [
521
+ {
522
+ "$ref": "#/$defs/UnauthenticatedEncoded"
523
+ },
524
+ {
525
+ "$ref": "#/$defs/ForbiddenEncoded"
526
+ }
527
+ ],
528
+ "$defs": {
529
+ "UnauthenticatedEncoded": {
530
+ "type": "object",
531
+ "properties": {
532
+ "_tag": {
533
+ "type": "string",
534
+ "enum": [
535
+ "Unauthenticated"
536
+ ]
537
+ },
538
+ "message": {
539
+ "type": "string"
540
+ }
541
+ },
542
+ "required": [
543
+ "_tag",
544
+ "message"
545
+ ],
546
+ "additionalProperties": true
547
+ },
548
+ "ForbiddenEncoded": {
549
+ "type": "object",
550
+ "properties": {
551
+ "_tag": {
552
+ "type": "string",
553
+ "enum": [
554
+ "Forbidden"
555
+ ]
556
+ },
557
+ "message": {
558
+ "type": "string"
559
+ },
560
+ "action": {
561
+ "type": "string"
562
+ }
563
+ },
564
+ "required": [
565
+ "_tag",
566
+ "message",
567
+ "action"
568
+ ],
569
+ "additionalProperties": true
570
+ }
571
+ }
572
+ }
573
+ },
574
+ "collect": {
575
+ "description": "data.collect, ctx.ingestion.collect: a durable, checkpointed collection of a provider's paginated listing over the caller's Connection into a dataset of the caller or the calling module, under the call's authority; at most three at once per owner.",
576
+ "input": {
577
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
578
+ "type": "object",
579
+ "properties": {
580
+ "connectionId": {
581
+ "type": "string"
582
+ },
583
+ "path": {
584
+ "type": "string",
585
+ "maxLength": 2000
586
+ },
587
+ "query": {
588
+ "type": "object",
589
+ "additionalProperties": {
590
+ "type": "string"
591
+ }
592
+ },
593
+ "items": {
594
+ "type": "string",
595
+ "maxLength": 200
596
+ },
597
+ "cursor": {
598
+ "anyOf": [
599
+ {
600
+ "type": "object",
601
+ "properties": {
602
+ "param": {
603
+ "type": "string"
604
+ },
605
+ "from": {
606
+ "type": "string"
607
+ }
608
+ },
609
+ "required": [
610
+ "param",
611
+ "from"
612
+ ],
613
+ "additionalProperties": true
614
+ },
615
+ {
616
+ "type": "object",
617
+ "properties": {
618
+ "param": {
619
+ "type": "string"
620
+ },
621
+ "page": {
622
+ "type": "integer",
623
+ "minimum": -9007199254740991,
624
+ "maximum": 9007199254740991
625
+ }
626
+ },
627
+ "required": [
628
+ "param",
629
+ "page"
630
+ ],
631
+ "additionalProperties": true
632
+ }
633
+ ]
634
+ },
635
+ "dataset": {
636
+ "type": "string",
637
+ "pattern": "^[a-z][a-z0-9_.:-]{0,63}$"
638
+ },
639
+ "maxPages": {
640
+ "type": "integer",
641
+ "minimum": 1,
642
+ "maximum": 500
643
+ }
644
+ },
645
+ "required": [
646
+ "connectionId",
647
+ "path",
648
+ "items",
649
+ "cursor",
650
+ "dataset",
651
+ "maxPages"
652
+ ],
653
+ "additionalProperties": true
654
+ },
655
+ "output": {
656
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
657
+ "type": "object",
658
+ "properties": {
659
+ "collectionId": {
660
+ "type": "string"
661
+ }
662
+ },
663
+ "required": [
664
+ "collectionId"
665
+ ],
666
+ "additionalProperties": true
667
+ },
668
+ "errors": {
669
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
670
+ "anyOf": [
671
+ {
672
+ "$ref": "#/$defs/UnauthenticatedEncoded"
673
+ },
674
+ {
675
+ "$ref": "#/$defs/ForbiddenEncoded"
676
+ },
677
+ {
678
+ "$ref": "#/$defs/InvalidInputEncoded"
679
+ }
680
+ ],
681
+ "$defs": {
682
+ "UnauthenticatedEncoded": {
683
+ "type": "object",
684
+ "properties": {
685
+ "_tag": {
686
+ "type": "string",
687
+ "enum": [
688
+ "Unauthenticated"
689
+ ]
690
+ },
691
+ "message": {
692
+ "type": "string"
693
+ }
694
+ },
695
+ "required": [
696
+ "_tag",
697
+ "message"
698
+ ],
699
+ "additionalProperties": true
700
+ },
701
+ "ForbiddenEncoded": {
702
+ "type": "object",
703
+ "properties": {
704
+ "_tag": {
705
+ "type": "string",
706
+ "enum": [
707
+ "Forbidden"
708
+ ]
709
+ },
710
+ "message": {
711
+ "type": "string"
712
+ },
713
+ "action": {
714
+ "type": "string"
715
+ }
716
+ },
717
+ "required": [
718
+ "_tag",
719
+ "message",
720
+ "action"
721
+ ],
722
+ "additionalProperties": true
723
+ },
724
+ "InvalidInputEncoded": {
725
+ "type": "object",
726
+ "properties": {
727
+ "_tag": {
728
+ "type": "string",
729
+ "enum": [
730
+ "InvalidInput"
731
+ ]
732
+ },
733
+ "message": {
734
+ "type": "string"
735
+ }
736
+ },
737
+ "required": [
738
+ "_tag",
739
+ "message"
740
+ ],
741
+ "additionalProperties": true
742
+ }
743
+ }
744
+ }
745
+ },
746
+ "collection": {
747
+ "description": "data.collection, ctx.ingestion.collection: how one of the owner's collections stands.",
748
+ "input": {
749
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
750
+ "type": "object",
751
+ "properties": {
752
+ "collectionId": {
753
+ "type": "string"
754
+ }
755
+ },
756
+ "required": [
757
+ "collectionId"
758
+ ],
759
+ "additionalProperties": true
760
+ },
761
+ "output": {
762
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
763
+ "type": "object",
764
+ "properties": {
765
+ "collectionId": {
766
+ "type": "string"
767
+ },
768
+ "status": {
769
+ "type": "string",
770
+ "enum": [
771
+ "running",
772
+ "completed",
773
+ "stopped",
774
+ "failed"
775
+ ]
776
+ },
777
+ "pages": {
778
+ "anyOf": [
779
+ {
780
+ "type": "number"
781
+ },
782
+ {
783
+ "type": "string",
784
+ "enum": [
785
+ "Infinity",
786
+ "-Infinity",
787
+ "NaN"
788
+ ]
789
+ }
790
+ ]
791
+ },
792
+ "items": {
793
+ "anyOf": [
794
+ {
795
+ "type": "number"
796
+ },
797
+ {
798
+ "type": "string",
799
+ "enum": [
800
+ "Infinity",
801
+ "-Infinity",
802
+ "NaN"
803
+ ]
804
+ }
805
+ ]
806
+ },
807
+ "dataset": {
808
+ "type": "string"
809
+ },
810
+ "error": {
811
+ "anyOf": [
812
+ {
813
+ "type": "string"
814
+ },
815
+ {
816
+ "type": "null"
817
+ }
818
+ ]
819
+ }
820
+ },
821
+ "required": [
822
+ "collectionId",
823
+ "status",
824
+ "pages",
825
+ "items",
826
+ "dataset",
827
+ "error"
828
+ ],
829
+ "additionalProperties": true
830
+ },
831
+ "errors": {
832
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
833
+ "anyOf": [
834
+ {
835
+ "$ref": "#/$defs/UnauthenticatedEncoded"
836
+ },
837
+ {
838
+ "$ref": "#/$defs/InvalidInputEncoded"
839
+ }
840
+ ],
841
+ "$defs": {
842
+ "UnauthenticatedEncoded": {
843
+ "type": "object",
844
+ "properties": {
845
+ "_tag": {
846
+ "type": "string",
847
+ "enum": [
848
+ "Unauthenticated"
849
+ ]
850
+ },
851
+ "message": {
852
+ "type": "string"
853
+ }
854
+ },
855
+ "required": [
856
+ "_tag",
857
+ "message"
858
+ ],
859
+ "additionalProperties": true
860
+ },
861
+ "InvalidInputEncoded": {
862
+ "type": "object",
863
+ "properties": {
864
+ "_tag": {
865
+ "type": "string",
866
+ "enum": [
867
+ "InvalidInput"
868
+ ]
869
+ },
870
+ "message": {
871
+ "type": "string"
872
+ }
873
+ },
874
+ "required": [
875
+ "_tag",
876
+ "message"
877
+ ],
878
+ "additionalProperties": true
879
+ }
880
+ }
881
+ }
882
+ },
883
+ "submit": {
884
+ "description": "In process (a handler's `ctx.ingestion.submit`, for the module's own records, in its transaction): queue a source item for a record. Idempotent per (record, source item, version).",
885
+ "input": {
886
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
887
+ "type": "object",
888
+ "properties": {
889
+ "record": {
890
+ "type": "object",
891
+ "properties": {
892
+ "entity": {
893
+ "type": "string"
894
+ },
895
+ "id": {
896
+ "type": "string"
897
+ }
898
+ },
899
+ "required": [
900
+ "entity",
901
+ "id"
902
+ ],
903
+ "additionalProperties": true
904
+ },
905
+ "source": {
906
+ "anyOf": [
907
+ {
908
+ "type": "object",
909
+ "properties": {
910
+ "kind": {
911
+ "type": "string",
912
+ "enum": [
913
+ "file"
914
+ ]
915
+ },
916
+ "fileId": {
917
+ "type": "string"
918
+ }
919
+ },
920
+ "required": [
921
+ "kind",
922
+ "fileId"
923
+ ],
924
+ "additionalProperties": true
925
+ },
926
+ {
927
+ "type": "object",
928
+ "properties": {
929
+ "kind": {
930
+ "type": "string",
931
+ "enum": [
932
+ "text"
933
+ ]
934
+ },
935
+ "key": {
936
+ "type": "string",
937
+ "minLength": 1,
938
+ "maxLength": 200
939
+ },
940
+ "title": {
941
+ "anyOf": [
942
+ {
943
+ "type": "string"
944
+ },
945
+ {
946
+ "type": "null"
947
+ }
948
+ ]
949
+ },
950
+ "mediaType": {
951
+ "type": "string"
952
+ },
953
+ "text": {
954
+ "type": "string"
955
+ }
956
+ },
957
+ "required": [
958
+ "kind",
959
+ "key",
960
+ "text"
961
+ ],
962
+ "additionalProperties": true
963
+ },
964
+ {
965
+ "type": "object",
966
+ "properties": {
967
+ "kind": {
968
+ "type": "string",
969
+ "enum": [
970
+ "email"
971
+ ]
972
+ },
973
+ "key": {
974
+ "type": "string",
975
+ "minLength": 1,
976
+ "maxLength": 500
977
+ },
978
+ "subject": {
979
+ "anyOf": [
980
+ {
981
+ "type": "string"
982
+ },
983
+ {
984
+ "type": "null"
985
+ }
986
+ ]
987
+ },
988
+ "from": {
989
+ "anyOf": [
990
+ {
991
+ "type": "string"
992
+ },
993
+ {
994
+ "type": "null"
995
+ }
996
+ ]
997
+ },
998
+ "text": {
999
+ "anyOf": [
1000
+ {
1001
+ "type": "string"
1002
+ },
1003
+ {
1004
+ "type": "null"
1005
+ }
1006
+ ]
1007
+ },
1008
+ "html": {
1009
+ "anyOf": [
1010
+ {
1011
+ "type": "string"
1012
+ },
1013
+ {
1014
+ "type": "null"
1015
+ }
1016
+ ]
1017
+ }
1018
+ },
1019
+ "required": [
1020
+ "kind",
1021
+ "key",
1022
+ "subject"
1023
+ ],
1024
+ "additionalProperties": true
1025
+ },
1026
+ {
1027
+ "type": "object",
1028
+ "properties": {
1029
+ "kind": {
1030
+ "type": "string",
1031
+ "enum": [
1032
+ "document"
1033
+ ]
1034
+ },
1035
+ "connectionId": {
1036
+ "type": "string"
1037
+ },
1038
+ "itemId": {
1039
+ "type": "string"
1040
+ },
1041
+ "version": {
1042
+ "type": "string"
1043
+ },
1044
+ "name": {
1045
+ "anyOf": [
1046
+ {
1047
+ "type": "string"
1048
+ },
1049
+ {
1050
+ "type": "null"
1051
+ }
1052
+ ]
1053
+ }
1054
+ },
1055
+ "required": [
1056
+ "kind",
1057
+ "connectionId",
1058
+ "itemId",
1059
+ "version"
1060
+ ],
1061
+ "additionalProperties": true
1062
+ }
1063
+ ]
1064
+ }
1065
+ },
1066
+ "required": [
1067
+ "record",
1068
+ "source"
1069
+ ],
1070
+ "additionalProperties": true
1071
+ },
1072
+ "output": {
1073
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1074
+ "type": "object",
1075
+ "properties": {
1076
+ "itemId": {
1077
+ "type": "string"
1078
+ },
1079
+ "state": {
1080
+ "type": "string",
1081
+ "enum": [
1082
+ "queued",
1083
+ "fetching",
1084
+ "extracting",
1085
+ "indexing",
1086
+ "done",
1087
+ "failed",
1088
+ "superseded"
1089
+ ]
1090
+ },
1091
+ "created": {
1092
+ "type": "boolean"
1093
+ }
1094
+ },
1095
+ "required": [
1096
+ "itemId",
1097
+ "state",
1098
+ "created"
1099
+ ],
1100
+ "additionalProperties": true
1101
+ },
1102
+ "errors": {
1103
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1104
+ "anyOf": [
1105
+ {
1106
+ "$ref": "#/$defs/ForbiddenEncoded"
1107
+ },
1108
+ {
1109
+ "$ref": "#/$defs/InvalidInputEncoded"
1110
+ }
1111
+ ],
1112
+ "$defs": {
1113
+ "ForbiddenEncoded": {
1114
+ "type": "object",
1115
+ "properties": {
1116
+ "_tag": {
1117
+ "type": "string",
1118
+ "enum": [
1119
+ "Forbidden"
1120
+ ]
1121
+ },
1122
+ "message": {
1123
+ "type": "string"
1124
+ },
1125
+ "action": {
1126
+ "type": "string"
1127
+ }
1128
+ },
1129
+ "required": [
1130
+ "_tag",
1131
+ "message",
1132
+ "action"
1133
+ ],
1134
+ "additionalProperties": true
1135
+ },
1136
+ "InvalidInputEncoded": {
1137
+ "type": "object",
1138
+ "properties": {
1139
+ "_tag": {
1140
+ "type": "string",
1141
+ "enum": [
1142
+ "InvalidInput"
1143
+ ]
1144
+ },
1145
+ "message": {
1146
+ "type": "string"
1147
+ }
1148
+ },
1149
+ "required": [
1150
+ "_tag",
1151
+ "message"
1152
+ ],
1153
+ "additionalProperties": true
1154
+ }
1155
+ }
1156
+ }
1157
+ },
1158
+ "status": {
1159
+ "description": "The ingestion items of a record the caller may read, with their state and progress (action ingestion.status).",
1160
+ "input": {
1161
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1162
+ "type": "object",
1163
+ "properties": {
1164
+ "entity": {
1165
+ "type": "string"
1166
+ },
1167
+ "id": {
1168
+ "type": "string"
1169
+ }
1170
+ },
1171
+ "required": [
1172
+ "entity",
1173
+ "id"
1174
+ ],
1175
+ "additionalProperties": true
1176
+ },
1177
+ "output": {
1178
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1179
+ "type": "object",
1180
+ "properties": {
1181
+ "items": {
1182
+ "type": "array",
1183
+ "items": {
1184
+ "type": "object",
1185
+ "properties": {
1186
+ "id": {
1187
+ "type": "string"
1188
+ },
1189
+ "orgId": {
1190
+ "type": "string"
1191
+ },
1192
+ "record": {
1193
+ "type": "object",
1194
+ "properties": {
1195
+ "entity": {
1196
+ "type": "string"
1197
+ },
1198
+ "id": {
1199
+ "type": "string"
1200
+ }
1201
+ },
1202
+ "required": [
1203
+ "entity",
1204
+ "id"
1205
+ ],
1206
+ "additionalProperties": true
1207
+ },
1208
+ "sourceKind": {
1209
+ "type": "string"
1210
+ },
1211
+ "sourceKey": {
1212
+ "type": "string"
1213
+ },
1214
+ "version": {
1215
+ "type": "string"
1216
+ },
1217
+ "title": {
1218
+ "anyOf": [
1219
+ {
1220
+ "type": "string"
1221
+ },
1222
+ {
1223
+ "type": "null"
1224
+ }
1225
+ ]
1226
+ },
1227
+ "mediaType": {
1228
+ "anyOf": [
1229
+ {
1230
+ "type": "string"
1231
+ },
1232
+ {
1233
+ "type": "null"
1234
+ }
1235
+ ]
1236
+ },
1237
+ "state": {
1238
+ "type": "string",
1239
+ "enum": [
1240
+ "queued",
1241
+ "fetching",
1242
+ "extracting",
1243
+ "indexing",
1244
+ "done",
1245
+ "failed",
1246
+ "superseded"
1247
+ ]
1248
+ },
1249
+ "progress": {
1250
+ "anyOf": [
1251
+ {
1252
+ "type": "number"
1253
+ },
1254
+ {
1255
+ "type": "string",
1256
+ "enum": [
1257
+ "Infinity",
1258
+ "-Infinity",
1259
+ "NaN"
1260
+ ]
1261
+ }
1262
+ ]
1263
+ },
1264
+ "chunks": {
1265
+ "anyOf": [
1266
+ {
1267
+ "type": "number"
1268
+ },
1269
+ {
1270
+ "type": "string",
1271
+ "enum": [
1272
+ "Infinity",
1273
+ "-Infinity",
1274
+ "NaN"
1275
+ ]
1276
+ }
1277
+ ]
1278
+ },
1279
+ "characters": {
1280
+ "anyOf": [
1281
+ {
1282
+ "type": "number"
1283
+ },
1284
+ {
1285
+ "type": "string",
1286
+ "enum": [
1287
+ "Infinity",
1288
+ "-Infinity",
1289
+ "NaN"
1290
+ ]
1291
+ }
1292
+ ]
1293
+ },
1294
+ "truncated": {
1295
+ "type": "boolean"
1296
+ },
1297
+ "error": {
1298
+ "anyOf": [
1299
+ {
1300
+ "type": "string"
1301
+ },
1302
+ {
1303
+ "type": "null"
1304
+ }
1305
+ ]
1306
+ },
1307
+ "createdAt": {
1308
+ "type": "string"
1309
+ },
1310
+ "updatedAt": {
1311
+ "type": "string"
1312
+ },
1313
+ "completedAt": {
1314
+ "anyOf": [
1315
+ {
1316
+ "type": "string"
1317
+ },
1318
+ {
1319
+ "type": "null"
1320
+ }
1321
+ ]
1322
+ }
1323
+ },
1324
+ "required": [
1325
+ "id",
1326
+ "orgId",
1327
+ "record",
1328
+ "sourceKind",
1329
+ "sourceKey",
1330
+ "version",
1331
+ "title",
1332
+ "mediaType",
1333
+ "state",
1334
+ "progress",
1335
+ "chunks",
1336
+ "characters",
1337
+ "truncated",
1338
+ "error",
1339
+ "createdAt",
1340
+ "updatedAt",
1341
+ "completedAt"
1342
+ ],
1343
+ "additionalProperties": true
1344
+ }
1345
+ }
1346
+ },
1347
+ "required": [
1348
+ "items"
1349
+ ],
1350
+ "additionalProperties": true
1351
+ },
1352
+ "errors": {
1353
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1354
+ "anyOf": [
1355
+ {
1356
+ "$ref": "#/$defs/UnauthenticatedEncoded"
1357
+ },
1358
+ {
1359
+ "$ref": "#/$defs/ForbiddenEncoded"
1360
+ },
1361
+ {
1362
+ "$ref": "#/$defs/InvalidInputEncoded"
1363
+ }
1364
+ ],
1365
+ "$defs": {
1366
+ "UnauthenticatedEncoded": {
1367
+ "type": "object",
1368
+ "properties": {
1369
+ "_tag": {
1370
+ "type": "string",
1371
+ "enum": [
1372
+ "Unauthenticated"
1373
+ ]
1374
+ },
1375
+ "message": {
1376
+ "type": "string"
1377
+ }
1378
+ },
1379
+ "required": [
1380
+ "_tag",
1381
+ "message"
1382
+ ],
1383
+ "additionalProperties": true
1384
+ },
1385
+ "ForbiddenEncoded": {
1386
+ "type": "object",
1387
+ "properties": {
1388
+ "_tag": {
1389
+ "type": "string",
1390
+ "enum": [
1391
+ "Forbidden"
1392
+ ]
1393
+ },
1394
+ "message": {
1395
+ "type": "string"
1396
+ },
1397
+ "action": {
1398
+ "type": "string"
1399
+ }
1400
+ },
1401
+ "required": [
1402
+ "_tag",
1403
+ "message",
1404
+ "action"
1405
+ ],
1406
+ "additionalProperties": true
1407
+ },
1408
+ "InvalidInputEncoded": {
1409
+ "type": "object",
1410
+ "properties": {
1411
+ "_tag": {
1412
+ "type": "string",
1413
+ "enum": [
1414
+ "InvalidInput"
1415
+ ]
1416
+ },
1417
+ "message": {
1418
+ "type": "string"
1419
+ }
1420
+ },
1421
+ "required": [
1422
+ "_tag",
1423
+ "message"
1424
+ ],
1425
+ "additionalProperties": true
1426
+ }
1427
+ }
1428
+ }
1429
+ },
1430
+ "openRun": {
1431
+ "description": "ctx.ingestion.runs.open: a bulk run of the calling module in the acting organisation over an inventory of item keys, with an optional budget of cost units; its id.",
1432
+ "input": {
1433
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1434
+ "type": "object",
1435
+ "properties": {
1436
+ "source": {
1437
+ "type": "string",
1438
+ "minLength": 1,
1439
+ "maxLength": 200
1440
+ },
1441
+ "items": {
1442
+ "type": "array",
1443
+ "items": {
1444
+ "type": "string",
1445
+ "minLength": 1,
1446
+ "maxLength": 500
1447
+ },
1448
+ "maxItems": 100000
1449
+ },
1450
+ "budget": {
1451
+ "anyOf": [
1452
+ {
1453
+ "type": "number"
1454
+ },
1455
+ {
1456
+ "type": "string",
1457
+ "enum": [
1458
+ "Infinity",
1459
+ "-Infinity",
1460
+ "NaN"
1461
+ ]
1462
+ }
1463
+ ]
1464
+ }
1465
+ },
1466
+ "required": [
1467
+ "source",
1468
+ "items"
1469
+ ],
1470
+ "additionalProperties": true
1471
+ },
1472
+ "output": {
1473
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1474
+ "type": "object",
1475
+ "properties": {
1476
+ "runId": {
1477
+ "type": "string"
1478
+ }
1479
+ },
1480
+ "required": [
1481
+ "runId"
1482
+ ],
1483
+ "additionalProperties": true
1484
+ },
1485
+ "errors": {
1486
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1487
+ "$ref": "#/$defs/InvalidInputEncoded",
1488
+ "$defs": {
1489
+ "InvalidInputEncoded": {
1490
+ "type": "object",
1491
+ "properties": {
1492
+ "_tag": {
1493
+ "type": "string",
1494
+ "enum": [
1495
+ "InvalidInput"
1496
+ ]
1497
+ },
1498
+ "message": {
1499
+ "type": "string"
1500
+ }
1501
+ },
1502
+ "required": [
1503
+ "_tag",
1504
+ "message"
1505
+ ],
1506
+ "additionalProperties": true
1507
+ }
1508
+ }
1509
+ }
1510
+ },
1511
+ "claim": {
1512
+ "description": "ctx.ingestion.runs.claim: lease up to `max` items for `leaseMs` to a worker: pending items, and items whose lease ran out (a crashed worker's, resumed with their next attempt). None once the run is stopped or completed.",
1513
+ "input": {
1514
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1515
+ "type": "object",
1516
+ "properties": {
1517
+ "runId": {
1518
+ "type": "string"
1519
+ },
1520
+ "worker": {
1521
+ "type": "string"
1522
+ },
1523
+ "max": {
1524
+ "anyOf": [
1525
+ {
1526
+ "type": "number"
1527
+ },
1528
+ {
1529
+ "type": "string",
1530
+ "enum": [
1531
+ "Infinity",
1532
+ "-Infinity",
1533
+ "NaN"
1534
+ ]
1535
+ }
1536
+ ]
1537
+ },
1538
+ "leaseMs": {
1539
+ "anyOf": [
1540
+ {
1541
+ "type": "number"
1542
+ },
1543
+ {
1544
+ "type": "string",
1545
+ "enum": [
1546
+ "Infinity",
1547
+ "-Infinity",
1548
+ "NaN"
1549
+ ]
1550
+ }
1551
+ ]
1552
+ }
1553
+ },
1554
+ "required": [
1555
+ "runId",
1556
+ "worker",
1557
+ "max",
1558
+ "leaseMs"
1559
+ ],
1560
+ "additionalProperties": true
1561
+ },
1562
+ "output": {
1563
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1564
+ "type": "array",
1565
+ "items": {
1566
+ "type": "object",
1567
+ "properties": {
1568
+ "key": {
1569
+ "type": "string"
1570
+ },
1571
+ "attempt": {
1572
+ "anyOf": [
1573
+ {
1574
+ "type": "number"
1575
+ },
1576
+ {
1577
+ "type": "string",
1578
+ "enum": [
1579
+ "Infinity",
1580
+ "-Infinity",
1581
+ "NaN"
1582
+ ]
1583
+ }
1584
+ ]
1585
+ }
1586
+ },
1587
+ "required": [
1588
+ "key",
1589
+ "attempt"
1590
+ ],
1591
+ "additionalProperties": true
1592
+ }
1593
+ },
1594
+ "errors": {
1595
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1596
+ "$ref": "#/$defs/InvalidInputEncoded",
1597
+ "$defs": {
1598
+ "InvalidInputEncoded": {
1599
+ "type": "object",
1600
+ "properties": {
1601
+ "_tag": {
1602
+ "type": "string",
1603
+ "enum": [
1604
+ "InvalidInput"
1605
+ ]
1606
+ },
1607
+ "message": {
1608
+ "type": "string"
1609
+ }
1610
+ },
1611
+ "required": [
1612
+ "_tag",
1613
+ "message"
1614
+ ],
1615
+ "additionalProperties": true
1616
+ }
1617
+ }
1618
+ }
1619
+ },
1620
+ "completeItem": {
1621
+ "description": "ctx.ingestion.runs.complete: an item the worker holds under the attempt `claim` gave it, done, with its cost (default 1); refused when that lease ran out or the item was leased again (by another worker, or the same one). Spending the budget stops the run: no item is leased after.",
1622
+ "input": {
1623
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1624
+ "type": "object",
1625
+ "properties": {
1626
+ "runId": {
1627
+ "type": "string"
1628
+ },
1629
+ "worker": {
1630
+ "type": "string"
1631
+ },
1632
+ "key": {
1633
+ "type": "string"
1634
+ },
1635
+ "attempt": {
1636
+ "anyOf": [
1637
+ {
1638
+ "type": "number"
1639
+ },
1640
+ {
1641
+ "type": "string",
1642
+ "enum": [
1643
+ "Infinity",
1644
+ "-Infinity",
1645
+ "NaN"
1646
+ ]
1647
+ }
1648
+ ]
1649
+ },
1650
+ "cost": {
1651
+ "anyOf": [
1652
+ {
1653
+ "type": "number"
1654
+ },
1655
+ {
1656
+ "type": "string",
1657
+ "enum": [
1658
+ "Infinity",
1659
+ "-Infinity",
1660
+ "NaN"
1661
+ ]
1662
+ }
1663
+ ]
1664
+ }
1665
+ },
1666
+ "required": [
1667
+ "runId",
1668
+ "worker",
1669
+ "key",
1670
+ "attempt"
1671
+ ],
1672
+ "additionalProperties": true
1673
+ },
1674
+ "output": {
1675
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1676
+ "type": "object",
1677
+ "properties": {
1678
+ "status": {
1679
+ "type": "string",
1680
+ "enum": [
1681
+ "running",
1682
+ "completed",
1683
+ "stopped"
1684
+ ]
1685
+ }
1686
+ },
1687
+ "required": [
1688
+ "status"
1689
+ ],
1690
+ "additionalProperties": true
1691
+ },
1692
+ "errors": {
1693
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1694
+ "$ref": "#/$defs/InvalidInputEncoded",
1695
+ "$defs": {
1696
+ "InvalidInputEncoded": {
1697
+ "type": "object",
1698
+ "properties": {
1699
+ "_tag": {
1700
+ "type": "string",
1701
+ "enum": [
1702
+ "InvalidInput"
1703
+ ]
1704
+ },
1705
+ "message": {
1706
+ "type": "string"
1707
+ }
1708
+ },
1709
+ "required": [
1710
+ "_tag",
1711
+ "message"
1712
+ ],
1713
+ "additionalProperties": true
1714
+ }
1715
+ }
1716
+ }
1717
+ },
1718
+ "reportItem": {
1719
+ "description": "ctx.ingestion.runs.report: an item the worker holds, not processed, with the reason (gone at the provider, refused): it counts towards completeness.",
1720
+ "input": {
1721
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1722
+ "type": "object",
1723
+ "properties": {
1724
+ "runId": {
1725
+ "type": "string"
1726
+ },
1727
+ "worker": {
1728
+ "type": "string"
1729
+ },
1730
+ "key": {
1731
+ "type": "string"
1732
+ },
1733
+ "attempt": {
1734
+ "anyOf": [
1735
+ {
1736
+ "type": "number"
1737
+ },
1738
+ {
1739
+ "type": "string",
1740
+ "enum": [
1741
+ "Infinity",
1742
+ "-Infinity",
1743
+ "NaN"
1744
+ ]
1745
+ }
1746
+ ]
1747
+ },
1748
+ "reason": {
1749
+ "type": "string"
1750
+ }
1751
+ },
1752
+ "required": [
1753
+ "runId",
1754
+ "worker",
1755
+ "key",
1756
+ "attempt",
1757
+ "reason"
1758
+ ],
1759
+ "additionalProperties": true
1760
+ },
1761
+ "output": {
1762
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1763
+ "type": "object",
1764
+ "properties": {
1765
+ "status": {
1766
+ "type": "string",
1767
+ "enum": [
1768
+ "running",
1769
+ "completed",
1770
+ "stopped"
1771
+ ]
1772
+ }
1773
+ },
1774
+ "required": [
1775
+ "status"
1776
+ ],
1777
+ "additionalProperties": true
1778
+ },
1779
+ "errors": {
1780
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1781
+ "$ref": "#/$defs/InvalidInputEncoded",
1782
+ "$defs": {
1783
+ "InvalidInputEncoded": {
1784
+ "type": "object",
1785
+ "properties": {
1786
+ "_tag": {
1787
+ "type": "string",
1788
+ "enum": [
1789
+ "InvalidInput"
1790
+ ]
1791
+ },
1792
+ "message": {
1793
+ "type": "string"
1794
+ }
1795
+ },
1796
+ "required": [
1797
+ "_tag",
1798
+ "message"
1799
+ ],
1800
+ "additionalProperties": true
1801
+ }
1802
+ }
1803
+ }
1804
+ },
1805
+ "inventory": {
1806
+ "description": "ctx.ingestion.runs.inventory: the run's inventory (the calling module's, in the acting organisation).",
1807
+ "input": {
1808
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1809
+ "type": "object",
1810
+ "properties": {
1811
+ "runId": {
1812
+ "type": "string"
1813
+ }
1814
+ },
1815
+ "required": [
1816
+ "runId"
1817
+ ],
1818
+ "additionalProperties": true
1819
+ },
1820
+ "output": {
1821
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1822
+ "type": "object",
1823
+ "properties": {
1824
+ "runId": {
1825
+ "type": "string"
1826
+ },
1827
+ "source": {
1828
+ "type": "string"
1829
+ },
1830
+ "status": {
1831
+ "type": "string",
1832
+ "enum": [
1833
+ "running",
1834
+ "completed",
1835
+ "stopped"
1836
+ ]
1837
+ },
1838
+ "stopReason": {
1839
+ "anyOf": [
1840
+ {
1841
+ "type": "string",
1842
+ "enum": [
1843
+ "budget"
1844
+ ]
1845
+ },
1846
+ {
1847
+ "type": "null"
1848
+ }
1849
+ ]
1850
+ },
1851
+ "budget": {
1852
+ "anyOf": [
1853
+ {
1854
+ "type": "number"
1855
+ },
1856
+ {
1857
+ "type": "string",
1858
+ "enum": [
1859
+ "Infinity",
1860
+ "-Infinity",
1861
+ "NaN"
1862
+ ]
1863
+ },
1864
+ {
1865
+ "type": "null"
1866
+ }
1867
+ ]
1868
+ },
1869
+ "spent": {
1870
+ "anyOf": [
1871
+ {
1872
+ "type": "number"
1873
+ },
1874
+ {
1875
+ "type": "string",
1876
+ "enum": [
1877
+ "Infinity",
1878
+ "-Infinity",
1879
+ "NaN"
1880
+ ]
1881
+ }
1882
+ ]
1883
+ },
1884
+ "complete": {
1885
+ "type": "boolean"
1886
+ },
1887
+ "counts": {
1888
+ "type": "object",
1889
+ "properties": {
1890
+ "pending": {
1891
+ "anyOf": [
1892
+ {
1893
+ "type": "number"
1894
+ },
1895
+ {
1896
+ "type": "string",
1897
+ "enum": [
1898
+ "Infinity",
1899
+ "-Infinity",
1900
+ "NaN"
1901
+ ]
1902
+ }
1903
+ ]
1904
+ },
1905
+ "leased": {
1906
+ "anyOf": [
1907
+ {
1908
+ "type": "number"
1909
+ },
1910
+ {
1911
+ "type": "string",
1912
+ "enum": [
1913
+ "Infinity",
1914
+ "-Infinity",
1915
+ "NaN"
1916
+ ]
1917
+ }
1918
+ ]
1919
+ },
1920
+ "done": {
1921
+ "anyOf": [
1922
+ {
1923
+ "type": "number"
1924
+ },
1925
+ {
1926
+ "type": "string",
1927
+ "enum": [
1928
+ "Infinity",
1929
+ "-Infinity",
1930
+ "NaN"
1931
+ ]
1932
+ }
1933
+ ]
1934
+ },
1935
+ "reported": {
1936
+ "anyOf": [
1937
+ {
1938
+ "type": "number"
1939
+ },
1940
+ {
1941
+ "type": "string",
1942
+ "enum": [
1943
+ "Infinity",
1944
+ "-Infinity",
1945
+ "NaN"
1946
+ ]
1947
+ }
1948
+ ]
1949
+ }
1950
+ },
1951
+ "required": [
1952
+ "pending",
1953
+ "leased",
1954
+ "done",
1955
+ "reported"
1956
+ ],
1957
+ "additionalProperties": true
1958
+ },
1959
+ "items": {
1960
+ "type": "array",
1961
+ "items": {
1962
+ "type": "object",
1963
+ "properties": {
1964
+ "key": {
1965
+ "type": "string"
1966
+ },
1967
+ "state": {
1968
+ "type": "string",
1969
+ "enum": [
1970
+ "pending",
1971
+ "leased",
1972
+ "done",
1973
+ "reported"
1974
+ ]
1975
+ },
1976
+ "attempts": {
1977
+ "anyOf": [
1978
+ {
1979
+ "type": "number"
1980
+ },
1981
+ {
1982
+ "type": "string",
1983
+ "enum": [
1984
+ "Infinity",
1985
+ "-Infinity",
1986
+ "NaN"
1987
+ ]
1988
+ }
1989
+ ]
1990
+ },
1991
+ "reason": {
1992
+ "anyOf": [
1993
+ {
1994
+ "type": "string"
1995
+ },
1996
+ {
1997
+ "type": "null"
1998
+ }
1999
+ ]
2000
+ }
2001
+ },
2002
+ "required": [
2003
+ "key",
2004
+ "state",
2005
+ "attempts",
2006
+ "reason"
2007
+ ],
2008
+ "additionalProperties": true
2009
+ }
2010
+ }
2011
+ },
2012
+ "required": [
2013
+ "runId",
2014
+ "source",
2015
+ "status",
2016
+ "stopReason",
2017
+ "budget",
2018
+ "spent",
2019
+ "complete",
2020
+ "counts",
2021
+ "items"
2022
+ ],
2023
+ "additionalProperties": true
2024
+ },
2025
+ "errors": {
2026
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2027
+ "$ref": "#/$defs/InvalidInputEncoded",
2028
+ "$defs": {
2029
+ "InvalidInputEncoded": {
2030
+ "type": "object",
2031
+ "properties": {
2032
+ "_tag": {
2033
+ "type": "string",
2034
+ "enum": [
2035
+ "InvalidInput"
2036
+ ]
2037
+ },
2038
+ "message": {
2039
+ "type": "string"
2040
+ }
2041
+ },
2042
+ "required": [
2043
+ "_tag",
2044
+ "message"
2045
+ ],
2046
+ "additionalProperties": true
2047
+ }
2048
+ }
2049
+ }
2050
+ },
2051
+ "finishRun": {
2052
+ "description": "ctx.ingestion.runs.finish: complete the run, refused (naming the items) while any item is neither done nor reported; a stopped run stays stopped.",
2053
+ "input": {
2054
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2055
+ "type": "object",
2056
+ "properties": {
2057
+ "runId": {
2058
+ "type": "string"
2059
+ }
2060
+ },
2061
+ "required": [
2062
+ "runId"
2063
+ ],
2064
+ "additionalProperties": true
2065
+ },
2066
+ "output": {
2067
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2068
+ "type": "object",
2069
+ "properties": {
2070
+ "runId": {
2071
+ "type": "string"
2072
+ },
2073
+ "source": {
2074
+ "type": "string"
2075
+ },
2076
+ "status": {
2077
+ "type": "string",
2078
+ "enum": [
2079
+ "running",
2080
+ "completed",
2081
+ "stopped"
2082
+ ]
2083
+ },
2084
+ "stopReason": {
2085
+ "anyOf": [
2086
+ {
2087
+ "type": "string",
2088
+ "enum": [
2089
+ "budget"
2090
+ ]
2091
+ },
2092
+ {
2093
+ "type": "null"
2094
+ }
2095
+ ]
2096
+ },
2097
+ "budget": {
2098
+ "anyOf": [
2099
+ {
2100
+ "type": "number"
2101
+ },
2102
+ {
2103
+ "type": "string",
2104
+ "enum": [
2105
+ "Infinity",
2106
+ "-Infinity",
2107
+ "NaN"
2108
+ ]
2109
+ },
2110
+ {
2111
+ "type": "null"
2112
+ }
2113
+ ]
2114
+ },
2115
+ "spent": {
2116
+ "anyOf": [
2117
+ {
2118
+ "type": "number"
2119
+ },
2120
+ {
2121
+ "type": "string",
2122
+ "enum": [
2123
+ "Infinity",
2124
+ "-Infinity",
2125
+ "NaN"
2126
+ ]
2127
+ }
2128
+ ]
2129
+ },
2130
+ "complete": {
2131
+ "type": "boolean"
2132
+ },
2133
+ "counts": {
2134
+ "type": "object",
2135
+ "properties": {
2136
+ "pending": {
2137
+ "anyOf": [
2138
+ {
2139
+ "type": "number"
2140
+ },
2141
+ {
2142
+ "type": "string",
2143
+ "enum": [
2144
+ "Infinity",
2145
+ "-Infinity",
2146
+ "NaN"
2147
+ ]
2148
+ }
2149
+ ]
2150
+ },
2151
+ "leased": {
2152
+ "anyOf": [
2153
+ {
2154
+ "type": "number"
2155
+ },
2156
+ {
2157
+ "type": "string",
2158
+ "enum": [
2159
+ "Infinity",
2160
+ "-Infinity",
2161
+ "NaN"
2162
+ ]
2163
+ }
2164
+ ]
2165
+ },
2166
+ "done": {
2167
+ "anyOf": [
2168
+ {
2169
+ "type": "number"
2170
+ },
2171
+ {
2172
+ "type": "string",
2173
+ "enum": [
2174
+ "Infinity",
2175
+ "-Infinity",
2176
+ "NaN"
2177
+ ]
2178
+ }
2179
+ ]
2180
+ },
2181
+ "reported": {
2182
+ "anyOf": [
2183
+ {
2184
+ "type": "number"
2185
+ },
2186
+ {
2187
+ "type": "string",
2188
+ "enum": [
2189
+ "Infinity",
2190
+ "-Infinity",
2191
+ "NaN"
2192
+ ]
2193
+ }
2194
+ ]
2195
+ }
2196
+ },
2197
+ "required": [
2198
+ "pending",
2199
+ "leased",
2200
+ "done",
2201
+ "reported"
2202
+ ],
2203
+ "additionalProperties": true
2204
+ },
2205
+ "items": {
2206
+ "type": "array",
2207
+ "items": {
2208
+ "type": "object",
2209
+ "properties": {
2210
+ "key": {
2211
+ "type": "string"
2212
+ },
2213
+ "state": {
2214
+ "type": "string",
2215
+ "enum": [
2216
+ "pending",
2217
+ "leased",
2218
+ "done",
2219
+ "reported"
2220
+ ]
2221
+ },
2222
+ "attempts": {
2223
+ "anyOf": [
2224
+ {
2225
+ "type": "number"
2226
+ },
2227
+ {
2228
+ "type": "string",
2229
+ "enum": [
2230
+ "Infinity",
2231
+ "-Infinity",
2232
+ "NaN"
2233
+ ]
2234
+ }
2235
+ ]
2236
+ },
2237
+ "reason": {
2238
+ "anyOf": [
2239
+ {
2240
+ "type": "string"
2241
+ },
2242
+ {
2243
+ "type": "null"
2244
+ }
2245
+ ]
2246
+ }
2247
+ },
2248
+ "required": [
2249
+ "key",
2250
+ "state",
2251
+ "attempts",
2252
+ "reason"
2253
+ ],
2254
+ "additionalProperties": true
2255
+ }
2256
+ }
2257
+ },
2258
+ "required": [
2259
+ "runId",
2260
+ "source",
2261
+ "status",
2262
+ "stopReason",
2263
+ "budget",
2264
+ "spent",
2265
+ "complete",
2266
+ "counts",
2267
+ "items"
2268
+ ],
2269
+ "additionalProperties": true
2270
+ },
2271
+ "errors": {
2272
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2273
+ "$ref": "#/$defs/InvalidInputEncoded",
2274
+ "$defs": {
2275
+ "InvalidInputEncoded": {
2276
+ "type": "object",
2277
+ "properties": {
2278
+ "_tag": {
2279
+ "type": "string",
2280
+ "enum": [
2281
+ "InvalidInput"
2282
+ ]
2283
+ },
2284
+ "message": {
2285
+ "type": "string"
2286
+ }
2287
+ },
2288
+ "required": [
2289
+ "_tag",
2290
+ "message"
2291
+ ],
2292
+ "additionalProperties": true
2293
+ }
2294
+ }
2295
+ }
2296
+ },
2297
+ "extract": {
2298
+ "description": "The extractor hook (in process, `Extractor`): text and an optional title from a media type the kernel does not extract itself.",
2299
+ "input": {
2300
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2301
+ "type": "object",
2302
+ "properties": {
2303
+ "mediaType": {
2304
+ "type": "string"
2305
+ },
2306
+ "name": {
2307
+ "anyOf": [
2308
+ {
2309
+ "type": "string"
2310
+ },
2311
+ {
2312
+ "type": "null"
2313
+ }
2314
+ ]
2315
+ },
2316
+ "bodyBase64": {
2317
+ "type": "string"
2318
+ }
2319
+ },
2320
+ "required": [
2321
+ "mediaType",
2322
+ "name",
2323
+ "bodyBase64"
2324
+ ],
2325
+ "additionalProperties": true
2326
+ },
2327
+ "output": {
2328
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2329
+ "type": "object",
2330
+ "properties": {
2331
+ "text": {
2332
+ "type": "string"
2333
+ },
2334
+ "title": {
2335
+ "anyOf": [
2336
+ {
2337
+ "type": "string"
2338
+ },
2339
+ {
2340
+ "type": "null"
2341
+ }
2342
+ ]
2343
+ }
2344
+ },
2345
+ "required": [
2346
+ "text",
2347
+ "title"
2348
+ ],
2349
+ "additionalProperties": true
2350
+ },
2351
+ "errors": {
2352
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2353
+ "not": {}
2354
+ }
2355
+ }
2356
+ },
2357
+ "types": {
2358
+ "IngestionSource": {
2359
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2360
+ "anyOf": [
2361
+ {
2362
+ "type": "object",
2363
+ "properties": {
2364
+ "kind": {
2365
+ "type": "string",
2366
+ "enum": [
2367
+ "file"
2368
+ ]
2369
+ },
2370
+ "fileId": {
2371
+ "type": "string"
2372
+ }
2373
+ },
2374
+ "required": [
2375
+ "kind",
2376
+ "fileId"
2377
+ ],
2378
+ "additionalProperties": true
2379
+ },
2380
+ {
2381
+ "type": "object",
2382
+ "properties": {
2383
+ "kind": {
2384
+ "type": "string",
2385
+ "enum": [
2386
+ "text"
2387
+ ]
2388
+ },
2389
+ "key": {
2390
+ "type": "string",
2391
+ "minLength": 1,
2392
+ "maxLength": 200
2393
+ },
2394
+ "title": {
2395
+ "anyOf": [
2396
+ {
2397
+ "type": "string"
2398
+ },
2399
+ {
2400
+ "type": "null"
2401
+ }
2402
+ ]
2403
+ },
2404
+ "mediaType": {
2405
+ "type": "string"
2406
+ },
2407
+ "text": {
2408
+ "type": "string"
2409
+ }
2410
+ },
2411
+ "required": [
2412
+ "kind",
2413
+ "key",
2414
+ "text"
2415
+ ],
2416
+ "additionalProperties": true
2417
+ },
2418
+ {
2419
+ "type": "object",
2420
+ "properties": {
2421
+ "kind": {
2422
+ "type": "string",
2423
+ "enum": [
2424
+ "email"
2425
+ ]
2426
+ },
2427
+ "key": {
2428
+ "type": "string",
2429
+ "minLength": 1,
2430
+ "maxLength": 500
2431
+ },
2432
+ "subject": {
2433
+ "anyOf": [
2434
+ {
2435
+ "type": "string"
2436
+ },
2437
+ {
2438
+ "type": "null"
2439
+ }
2440
+ ]
2441
+ },
2442
+ "from": {
2443
+ "anyOf": [
2444
+ {
2445
+ "type": "string"
2446
+ },
2447
+ {
2448
+ "type": "null"
2449
+ }
2450
+ ]
2451
+ },
2452
+ "text": {
2453
+ "anyOf": [
2454
+ {
2455
+ "type": "string"
2456
+ },
2457
+ {
2458
+ "type": "null"
2459
+ }
2460
+ ]
2461
+ },
2462
+ "html": {
2463
+ "anyOf": [
2464
+ {
2465
+ "type": "string"
2466
+ },
2467
+ {
2468
+ "type": "null"
2469
+ }
2470
+ ]
2471
+ }
2472
+ },
2473
+ "required": [
2474
+ "kind",
2475
+ "key",
2476
+ "subject"
2477
+ ],
2478
+ "additionalProperties": true
2479
+ },
2480
+ {
2481
+ "type": "object",
2482
+ "properties": {
2483
+ "kind": {
2484
+ "type": "string",
2485
+ "enum": [
2486
+ "document"
2487
+ ]
2488
+ },
2489
+ "connectionId": {
2490
+ "type": "string"
2491
+ },
2492
+ "itemId": {
2493
+ "type": "string"
2494
+ },
2495
+ "version": {
2496
+ "type": "string"
2497
+ },
2498
+ "name": {
2499
+ "anyOf": [
2500
+ {
2501
+ "type": "string"
2502
+ },
2503
+ {
2504
+ "type": "null"
2505
+ }
2506
+ ]
2507
+ }
2508
+ },
2509
+ "required": [
2510
+ "kind",
2511
+ "connectionId",
2512
+ "itemId",
2513
+ "version"
2514
+ ],
2515
+ "additionalProperties": true
2516
+ }
2517
+ ]
2518
+ },
2519
+ "SubmitIngestion": {
2520
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2521
+ "type": "object",
2522
+ "properties": {
2523
+ "record": {
2524
+ "type": "object",
2525
+ "properties": {
2526
+ "entity": {
2527
+ "type": "string"
2528
+ },
2529
+ "id": {
2530
+ "type": "string"
2531
+ }
2532
+ },
2533
+ "required": [
2534
+ "entity",
2535
+ "id"
2536
+ ],
2537
+ "additionalProperties": true
2538
+ },
2539
+ "source": {
2540
+ "anyOf": [
2541
+ {
2542
+ "type": "object",
2543
+ "properties": {
2544
+ "kind": {
2545
+ "type": "string",
2546
+ "enum": [
2547
+ "file"
2548
+ ]
2549
+ },
2550
+ "fileId": {
2551
+ "type": "string"
2552
+ }
2553
+ },
2554
+ "required": [
2555
+ "kind",
2556
+ "fileId"
2557
+ ],
2558
+ "additionalProperties": true
2559
+ },
2560
+ {
2561
+ "type": "object",
2562
+ "properties": {
2563
+ "kind": {
2564
+ "type": "string",
2565
+ "enum": [
2566
+ "text"
2567
+ ]
2568
+ },
2569
+ "key": {
2570
+ "type": "string",
2571
+ "minLength": 1,
2572
+ "maxLength": 200
2573
+ },
2574
+ "title": {
2575
+ "anyOf": [
2576
+ {
2577
+ "type": "string"
2578
+ },
2579
+ {
2580
+ "type": "null"
2581
+ }
2582
+ ]
2583
+ },
2584
+ "mediaType": {
2585
+ "type": "string"
2586
+ },
2587
+ "text": {
2588
+ "type": "string"
2589
+ }
2590
+ },
2591
+ "required": [
2592
+ "kind",
2593
+ "key",
2594
+ "text"
2595
+ ],
2596
+ "additionalProperties": true
2597
+ },
2598
+ {
2599
+ "type": "object",
2600
+ "properties": {
2601
+ "kind": {
2602
+ "type": "string",
2603
+ "enum": [
2604
+ "email"
2605
+ ]
2606
+ },
2607
+ "key": {
2608
+ "type": "string",
2609
+ "minLength": 1,
2610
+ "maxLength": 500
2611
+ },
2612
+ "subject": {
2613
+ "anyOf": [
2614
+ {
2615
+ "type": "string"
2616
+ },
2617
+ {
2618
+ "type": "null"
2619
+ }
2620
+ ]
2621
+ },
2622
+ "from": {
2623
+ "anyOf": [
2624
+ {
2625
+ "type": "string"
2626
+ },
2627
+ {
2628
+ "type": "null"
2629
+ }
2630
+ ]
2631
+ },
2632
+ "text": {
2633
+ "anyOf": [
2634
+ {
2635
+ "type": "string"
2636
+ },
2637
+ {
2638
+ "type": "null"
2639
+ }
2640
+ ]
2641
+ },
2642
+ "html": {
2643
+ "anyOf": [
2644
+ {
2645
+ "type": "string"
2646
+ },
2647
+ {
2648
+ "type": "null"
2649
+ }
2650
+ ]
2651
+ }
2652
+ },
2653
+ "required": [
2654
+ "kind",
2655
+ "key",
2656
+ "subject"
2657
+ ],
2658
+ "additionalProperties": true
2659
+ },
2660
+ {
2661
+ "type": "object",
2662
+ "properties": {
2663
+ "kind": {
2664
+ "type": "string",
2665
+ "enum": [
2666
+ "document"
2667
+ ]
2668
+ },
2669
+ "connectionId": {
2670
+ "type": "string"
2671
+ },
2672
+ "itemId": {
2673
+ "type": "string"
2674
+ },
2675
+ "version": {
2676
+ "type": "string"
2677
+ },
2678
+ "name": {
2679
+ "anyOf": [
2680
+ {
2681
+ "type": "string"
2682
+ },
2683
+ {
2684
+ "type": "null"
2685
+ }
2686
+ ]
2687
+ }
2688
+ },
2689
+ "required": [
2690
+ "kind",
2691
+ "connectionId",
2692
+ "itemId",
2693
+ "version"
2694
+ ],
2695
+ "additionalProperties": true
2696
+ }
2697
+ ]
2698
+ }
2699
+ },
2700
+ "required": [
2701
+ "record",
2702
+ "source"
2703
+ ],
2704
+ "additionalProperties": true
2705
+ },
2706
+ "IngestionState": {
2707
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2708
+ "type": "string",
2709
+ "enum": [
2710
+ "queued",
2711
+ "fetching",
2712
+ "extracting",
2713
+ "indexing",
2714
+ "done",
2715
+ "failed",
2716
+ "superseded"
2717
+ ]
2718
+ },
2719
+ "IngestionItem": {
2720
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2721
+ "type": "object",
2722
+ "properties": {
2723
+ "id": {
2724
+ "type": "string"
2725
+ },
2726
+ "orgId": {
2727
+ "type": "string"
2728
+ },
2729
+ "record": {
2730
+ "type": "object",
2731
+ "properties": {
2732
+ "entity": {
2733
+ "type": "string"
2734
+ },
2735
+ "id": {
2736
+ "type": "string"
2737
+ }
2738
+ },
2739
+ "required": [
2740
+ "entity",
2741
+ "id"
2742
+ ],
2743
+ "additionalProperties": true
2744
+ },
2745
+ "sourceKind": {
2746
+ "type": "string"
2747
+ },
2748
+ "sourceKey": {
2749
+ "type": "string"
2750
+ },
2751
+ "version": {
2752
+ "type": "string"
2753
+ },
2754
+ "title": {
2755
+ "anyOf": [
2756
+ {
2757
+ "type": "string"
2758
+ },
2759
+ {
2760
+ "type": "null"
2761
+ }
2762
+ ]
2763
+ },
2764
+ "mediaType": {
2765
+ "anyOf": [
2766
+ {
2767
+ "type": "string"
2768
+ },
2769
+ {
2770
+ "type": "null"
2771
+ }
2772
+ ]
2773
+ },
2774
+ "state": {
2775
+ "type": "string",
2776
+ "enum": [
2777
+ "queued",
2778
+ "fetching",
2779
+ "extracting",
2780
+ "indexing",
2781
+ "done",
2782
+ "failed",
2783
+ "superseded"
2784
+ ]
2785
+ },
2786
+ "progress": {
2787
+ "anyOf": [
2788
+ {
2789
+ "type": "number"
2790
+ },
2791
+ {
2792
+ "type": "string",
2793
+ "enum": [
2794
+ "Infinity",
2795
+ "-Infinity",
2796
+ "NaN"
2797
+ ]
2798
+ }
2799
+ ]
2800
+ },
2801
+ "chunks": {
2802
+ "anyOf": [
2803
+ {
2804
+ "type": "number"
2805
+ },
2806
+ {
2807
+ "type": "string",
2808
+ "enum": [
2809
+ "Infinity",
2810
+ "-Infinity",
2811
+ "NaN"
2812
+ ]
2813
+ }
2814
+ ]
2815
+ },
2816
+ "characters": {
2817
+ "anyOf": [
2818
+ {
2819
+ "type": "number"
2820
+ },
2821
+ {
2822
+ "type": "string",
2823
+ "enum": [
2824
+ "Infinity",
2825
+ "-Infinity",
2826
+ "NaN"
2827
+ ]
2828
+ }
2829
+ ]
2830
+ },
2831
+ "truncated": {
2832
+ "type": "boolean"
2833
+ },
2834
+ "error": {
2835
+ "anyOf": [
2836
+ {
2837
+ "type": "string"
2838
+ },
2839
+ {
2840
+ "type": "null"
2841
+ }
2842
+ ]
2843
+ },
2844
+ "createdAt": {
2845
+ "type": "string"
2846
+ },
2847
+ "updatedAt": {
2848
+ "type": "string"
2849
+ },
2850
+ "completedAt": {
2851
+ "anyOf": [
2852
+ {
2853
+ "type": "string"
2854
+ },
2855
+ {
2856
+ "type": "null"
2857
+ }
2858
+ ]
2859
+ }
2860
+ },
2861
+ "required": [
2862
+ "id",
2863
+ "orgId",
2864
+ "record",
2865
+ "sourceKind",
2866
+ "sourceKey",
2867
+ "version",
2868
+ "title",
2869
+ "mediaType",
2870
+ "state",
2871
+ "progress",
2872
+ "chunks",
2873
+ "characters",
2874
+ "truncated",
2875
+ "error",
2876
+ "createdAt",
2877
+ "updatedAt",
2878
+ "completedAt"
2879
+ ],
2880
+ "additionalProperties": true
2881
+ },
2882
+ "SubmitResult": {
2883
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2884
+ "type": "object",
2885
+ "properties": {
2886
+ "itemId": {
2887
+ "type": "string"
2888
+ },
2889
+ "state": {
2890
+ "type": "string",
2891
+ "enum": [
2892
+ "queued",
2893
+ "fetching",
2894
+ "extracting",
2895
+ "indexing",
2896
+ "done",
2897
+ "failed",
2898
+ "superseded"
2899
+ ]
2900
+ },
2901
+ "created": {
2902
+ "type": "boolean"
2903
+ }
2904
+ },
2905
+ "required": [
2906
+ "itemId",
2907
+ "state",
2908
+ "created"
2909
+ ],
2910
+ "additionalProperties": true
2911
+ },
2912
+ "Extracted": {
2913
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2914
+ "type": "object",
2915
+ "properties": {
2916
+ "text": {
2917
+ "type": "string"
2918
+ },
2919
+ "title": {
2920
+ "anyOf": [
2921
+ {
2922
+ "type": "string"
2923
+ },
2924
+ {
2925
+ "type": "null"
2926
+ }
2927
+ ]
2928
+ }
2929
+ },
2930
+ "required": [
2931
+ "text",
2932
+ "title"
2933
+ ],
2934
+ "additionalProperties": true
2935
+ },
2936
+ "OpenRun": {
2937
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2938
+ "type": "object",
2939
+ "properties": {
2940
+ "source": {
2941
+ "type": "string",
2942
+ "minLength": 1,
2943
+ "maxLength": 200
2944
+ },
2945
+ "items": {
2946
+ "type": "array",
2947
+ "items": {
2948
+ "type": "string",
2949
+ "minLength": 1,
2950
+ "maxLength": 500
2951
+ },
2952
+ "maxItems": 100000
2953
+ },
2954
+ "budget": {
2955
+ "anyOf": [
2956
+ {
2957
+ "type": "number"
2958
+ },
2959
+ {
2960
+ "type": "string",
2961
+ "enum": [
2962
+ "Infinity",
2963
+ "-Infinity",
2964
+ "NaN"
2965
+ ]
2966
+ }
2967
+ ]
2968
+ }
2969
+ },
2970
+ "required": [
2971
+ "source",
2972
+ "items"
2973
+ ],
2974
+ "additionalProperties": true
2975
+ },
2976
+ "ClaimedItem": {
2977
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2978
+ "type": "object",
2979
+ "properties": {
2980
+ "key": {
2981
+ "type": "string"
2982
+ },
2983
+ "attempt": {
2984
+ "anyOf": [
2985
+ {
2986
+ "type": "number"
2987
+ },
2988
+ {
2989
+ "type": "string",
2990
+ "enum": [
2991
+ "Infinity",
2992
+ "-Infinity",
2993
+ "NaN"
2994
+ ]
2995
+ }
2996
+ ]
2997
+ }
2998
+ },
2999
+ "required": [
3000
+ "key",
3001
+ "attempt"
3002
+ ],
3003
+ "additionalProperties": true
3004
+ },
3005
+ "RunInventory": {
3006
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3007
+ "type": "object",
3008
+ "properties": {
3009
+ "runId": {
3010
+ "type": "string"
3011
+ },
3012
+ "source": {
3013
+ "type": "string"
3014
+ },
3015
+ "status": {
3016
+ "type": "string",
3017
+ "enum": [
3018
+ "running",
3019
+ "completed",
3020
+ "stopped"
3021
+ ]
3022
+ },
3023
+ "stopReason": {
3024
+ "anyOf": [
3025
+ {
3026
+ "type": "string",
3027
+ "enum": [
3028
+ "budget"
3029
+ ]
3030
+ },
3031
+ {
3032
+ "type": "null"
3033
+ }
3034
+ ]
3035
+ },
3036
+ "budget": {
3037
+ "anyOf": [
3038
+ {
3039
+ "type": "number"
3040
+ },
3041
+ {
3042
+ "type": "string",
3043
+ "enum": [
3044
+ "Infinity",
3045
+ "-Infinity",
3046
+ "NaN"
3047
+ ]
3048
+ },
3049
+ {
3050
+ "type": "null"
3051
+ }
3052
+ ]
3053
+ },
3054
+ "spent": {
3055
+ "anyOf": [
3056
+ {
3057
+ "type": "number"
3058
+ },
3059
+ {
3060
+ "type": "string",
3061
+ "enum": [
3062
+ "Infinity",
3063
+ "-Infinity",
3064
+ "NaN"
3065
+ ]
3066
+ }
3067
+ ]
3068
+ },
3069
+ "complete": {
3070
+ "type": "boolean"
3071
+ },
3072
+ "counts": {
3073
+ "type": "object",
3074
+ "properties": {
3075
+ "pending": {
3076
+ "anyOf": [
3077
+ {
3078
+ "type": "number"
3079
+ },
3080
+ {
3081
+ "type": "string",
3082
+ "enum": [
3083
+ "Infinity",
3084
+ "-Infinity",
3085
+ "NaN"
3086
+ ]
3087
+ }
3088
+ ]
3089
+ },
3090
+ "leased": {
3091
+ "anyOf": [
3092
+ {
3093
+ "type": "number"
3094
+ },
3095
+ {
3096
+ "type": "string",
3097
+ "enum": [
3098
+ "Infinity",
3099
+ "-Infinity",
3100
+ "NaN"
3101
+ ]
3102
+ }
3103
+ ]
3104
+ },
3105
+ "done": {
3106
+ "anyOf": [
3107
+ {
3108
+ "type": "number"
3109
+ },
3110
+ {
3111
+ "type": "string",
3112
+ "enum": [
3113
+ "Infinity",
3114
+ "-Infinity",
3115
+ "NaN"
3116
+ ]
3117
+ }
3118
+ ]
3119
+ },
3120
+ "reported": {
3121
+ "anyOf": [
3122
+ {
3123
+ "type": "number"
3124
+ },
3125
+ {
3126
+ "type": "string",
3127
+ "enum": [
3128
+ "Infinity",
3129
+ "-Infinity",
3130
+ "NaN"
3131
+ ]
3132
+ }
3133
+ ]
3134
+ }
3135
+ },
3136
+ "required": [
3137
+ "pending",
3138
+ "leased",
3139
+ "done",
3140
+ "reported"
3141
+ ],
3142
+ "additionalProperties": true
3143
+ },
3144
+ "items": {
3145
+ "type": "array",
3146
+ "items": {
3147
+ "type": "object",
3148
+ "properties": {
3149
+ "key": {
3150
+ "type": "string"
3151
+ },
3152
+ "state": {
3153
+ "type": "string",
3154
+ "enum": [
3155
+ "pending",
3156
+ "leased",
3157
+ "done",
3158
+ "reported"
3159
+ ]
3160
+ },
3161
+ "attempts": {
3162
+ "anyOf": [
3163
+ {
3164
+ "type": "number"
3165
+ },
3166
+ {
3167
+ "type": "string",
3168
+ "enum": [
3169
+ "Infinity",
3170
+ "-Infinity",
3171
+ "NaN"
3172
+ ]
3173
+ }
3174
+ ]
3175
+ },
3176
+ "reason": {
3177
+ "anyOf": [
3178
+ {
3179
+ "type": "string"
3180
+ },
3181
+ {
3182
+ "type": "null"
3183
+ }
3184
+ ]
3185
+ }
3186
+ },
3187
+ "required": [
3188
+ "key",
3189
+ "state",
3190
+ "attempts",
3191
+ "reason"
3192
+ ],
3193
+ "additionalProperties": true
3194
+ }
3195
+ }
3196
+ },
3197
+ "required": [
3198
+ "runId",
3199
+ "source",
3200
+ "status",
3201
+ "stopReason",
3202
+ "budget",
3203
+ "spent",
3204
+ "complete",
3205
+ "counts",
3206
+ "items"
3207
+ ],
3208
+ "additionalProperties": true
3209
+ }
3210
+ }
3211
+ }