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