@dotdo/do 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 (486) hide show
  1. package/README.md +400 -0
  2. package/dist/ai/embeddings.d.ts +129 -0
  3. package/dist/ai/embeddings.d.ts.map +1 -0
  4. package/dist/ai/embeddings.js +217 -0
  5. package/dist/ai/embeddings.js.map +1 -0
  6. package/dist/ai/gateway.d.ts +139 -0
  7. package/dist/ai/gateway.d.ts.map +1 -0
  8. package/dist/ai/gateway.js +179 -0
  9. package/dist/ai/gateway.js.map +1 -0
  10. package/dist/ai/image.d.ts +140 -0
  11. package/dist/ai/image.d.ts.map +1 -0
  12. package/dist/ai/image.js +199 -0
  13. package/dist/ai/image.js.map +1 -0
  14. package/dist/ai/index.d.ts +98 -0
  15. package/dist/ai/index.d.ts.map +1 -0
  16. package/dist/ai/index.js +223 -0
  17. package/dist/ai/index.js.map +1 -0
  18. package/dist/ai/models.d.ts +81 -0
  19. package/dist/ai/models.d.ts.map +1 -0
  20. package/dist/ai/models.js +537 -0
  21. package/dist/ai/models.js.map +1 -0
  22. package/dist/ai/text.d.ts +176 -0
  23. package/dist/ai/text.d.ts.map +1 -0
  24. package/dist/ai/text.js +253 -0
  25. package/dist/ai/text.js.map +1 -0
  26. package/dist/ai/voice/agents.d.ts +224 -0
  27. package/dist/ai/voice/agents.d.ts.map +1 -0
  28. package/dist/ai/voice/agents.js +375 -0
  29. package/dist/ai/voice/agents.js.map +1 -0
  30. package/dist/ai/voice/campaigns.d.ts +307 -0
  31. package/dist/ai/voice/campaigns.d.ts.map +1 -0
  32. package/dist/ai/voice/campaigns.js +739 -0
  33. package/dist/ai/voice/campaigns.js.map +1 -0
  34. package/dist/ai/voice/index.d.ts +21 -0
  35. package/dist/ai/voice/index.d.ts.map +1 -0
  36. package/dist/ai/voice/index.js +42 -0
  37. package/dist/ai/voice/index.js.map +1 -0
  38. package/dist/ai/voice/providers.d.ts +283 -0
  39. package/dist/ai/voice/providers.d.ts.map +1 -0
  40. package/dist/ai/voice/providers.js +286 -0
  41. package/dist/ai/voice/providers.js.map +1 -0
  42. package/dist/ai/voice/sessions.d.ts +294 -0
  43. package/dist/ai/voice/sessions.d.ts.map +1 -0
  44. package/dist/ai/voice/sessions.js +531 -0
  45. package/dist/ai/voice/sessions.js.map +1 -0
  46. package/dist/ai/voice/tools.d.ts +242 -0
  47. package/dist/ai/voice/tools.d.ts.map +1 -0
  48. package/dist/ai/voice/tools.js +370 -0
  49. package/dist/ai/voice/tools.js.map +1 -0
  50. package/dist/ai/voice/tts.d.ts +173 -0
  51. package/dist/ai/voice/tts.d.ts.map +1 -0
  52. package/dist/ai/voice/tts.js +252 -0
  53. package/dist/ai/voice/tts.js.map +1 -0
  54. package/dist/ai/voice/webrtc.d.ts +228 -0
  55. package/dist/ai/voice/webrtc.d.ts.map +1 -0
  56. package/dist/ai/voice/webrtc.js +372 -0
  57. package/dist/ai/voice/webrtc.js.map +1 -0
  58. package/dist/api/index.d.ts +103 -0
  59. package/dist/api/index.d.ts.map +1 -0
  60. package/dist/api/index.js +191 -0
  61. package/dist/api/index.js.map +1 -0
  62. package/dist/api/mcp/handlers.d.ts +25 -0
  63. package/dist/api/mcp/handlers.d.ts.map +1 -0
  64. package/dist/api/mcp/handlers.js +422 -0
  65. package/dist/api/mcp/handlers.js.map +1 -0
  66. package/dist/api/mcp/index.d.ts +113 -0
  67. package/dist/api/mcp/index.d.ts.map +1 -0
  68. package/dist/api/mcp/index.js +141 -0
  69. package/dist/api/mcp/index.js.map +1 -0
  70. package/dist/api/middleware/auth.d.ts +65 -0
  71. package/dist/api/middleware/auth.d.ts.map +1 -0
  72. package/dist/api/middleware/auth.js +271 -0
  73. package/dist/api/middleware/auth.js.map +1 -0
  74. package/dist/api/middleware/cors.d.ts +62 -0
  75. package/dist/api/middleware/cors.d.ts.map +1 -0
  76. package/dist/api/middleware/cors.js +225 -0
  77. package/dist/api/middleware/cors.js.map +1 -0
  78. package/dist/api/middleware/index.d.ts +60 -0
  79. package/dist/api/middleware/index.d.ts.map +1 -0
  80. package/dist/api/middleware/index.js +175 -0
  81. package/dist/api/middleware/index.js.map +1 -0
  82. package/dist/api/middleware/rateLimit.d.ts +84 -0
  83. package/dist/api/middleware/rateLimit.d.ts.map +1 -0
  84. package/dist/api/middleware/rateLimit.js +321 -0
  85. package/dist/api/middleware/rateLimit.js.map +1 -0
  86. package/dist/api/routes/ai.d.ts +17 -0
  87. package/dist/api/routes/ai.d.ts.map +1 -0
  88. package/dist/api/routes/ai.js +430 -0
  89. package/dist/api/routes/ai.js.map +1 -0
  90. package/dist/api/routes/do.d.ts +17 -0
  91. package/dist/api/routes/do.d.ts.map +1 -0
  92. package/dist/api/routes/do.js +458 -0
  93. package/dist/api/routes/do.js.map +1 -0
  94. package/dist/api/routes/functions.d.ts +111 -0
  95. package/dist/api/routes/functions.d.ts.map +1 -0
  96. package/dist/api/routes/functions.js +548 -0
  97. package/dist/api/routes/functions.js.map +1 -0
  98. package/dist/api/routes/health.d.ts +16 -0
  99. package/dist/api/routes/health.d.ts.map +1 -0
  100. package/dist/api/routes/health.js +163 -0
  101. package/dist/api/routes/health.js.map +1 -0
  102. package/dist/api/routes/index.d.ts +41 -0
  103. package/dist/api/routes/index.d.ts.map +1 -0
  104. package/dist/api/routes/index.js +275 -0
  105. package/dist/api/routes/index.js.map +1 -0
  106. package/dist/api/routes/nouns.d.ts +26 -0
  107. package/dist/api/routes/nouns.d.ts.map +1 -0
  108. package/dist/api/routes/nouns.js +456 -0
  109. package/dist/api/routes/nouns.js.map +1 -0
  110. package/dist/api/routes/orgs.d.ts +17 -0
  111. package/dist/api/routes/orgs.d.ts.map +1 -0
  112. package/dist/api/routes/orgs.js +560 -0
  113. package/dist/api/routes/orgs.js.map +1 -0
  114. package/dist/api/routes/relationships.d.ts +30 -0
  115. package/dist/api/routes/relationships.d.ts.map +1 -0
  116. package/dist/api/routes/relationships.js +360 -0
  117. package/dist/api/routes/relationships.js.map +1 -0
  118. package/dist/api/routes/roles.d.ts +17 -0
  119. package/dist/api/routes/roles.d.ts.map +1 -0
  120. package/dist/api/routes/roles.js +721 -0
  121. package/dist/api/routes/roles.js.map +1 -0
  122. package/dist/api/routes/things.d.ts +27 -0
  123. package/dist/api/routes/things.d.ts.map +1 -0
  124. package/dist/api/routes/things.js +568 -0
  125. package/dist/api/routes/things.js.map +1 -0
  126. package/dist/api/routes/users.d.ts +17 -0
  127. package/dist/api/routes/users.d.ts.map +1 -0
  128. package/dist/api/routes/users.js +401 -0
  129. package/dist/api/routes/users.js.map +1 -0
  130. package/dist/api/routes/verbs.d.ts +31 -0
  131. package/dist/api/routes/verbs.d.ts.map +1 -0
  132. package/dist/api/routes/verbs.js +505 -0
  133. package/dist/api/routes/verbs.js.map +1 -0
  134. package/dist/api/routes/workflows.d.ts +44 -0
  135. package/dist/api/routes/workflows.d.ts.map +1 -0
  136. package/dist/api/routes/workflows.js +521 -0
  137. package/dist/api/routes/workflows.js.map +1 -0
  138. package/dist/api/types.d.ts +370 -0
  139. package/dist/api/types.d.ts.map +1 -0
  140. package/dist/api/types.js +11 -0
  141. package/dist/api/types.js.map +1 -0
  142. package/dist/db/cdc/events.d.ts +201 -0
  143. package/dist/db/cdc/events.d.ts.map +1 -0
  144. package/dist/db/cdc/events.js +271 -0
  145. package/dist/db/cdc/events.js.map +1 -0
  146. package/dist/db/cdc/index.d.ts +13 -0
  147. package/dist/db/cdc/index.d.ts.map +1 -0
  148. package/dist/db/cdc/index.js +16 -0
  149. package/dist/db/cdc/index.js.map +1 -0
  150. package/dist/db/cdc/replay.d.ts +388 -0
  151. package/dist/db/cdc/replay.d.ts.map +1 -0
  152. package/dist/db/cdc/replay.js +469 -0
  153. package/dist/db/cdc/replay.js.map +1 -0
  154. package/dist/db/cdc/storage.d.ts +567 -0
  155. package/dist/db/cdc/storage.d.ts.map +1 -0
  156. package/dist/db/cdc/storage.js +856 -0
  157. package/dist/db/cdc/storage.js.map +1 -0
  158. package/dist/db/cdc/streaming.d.ts +459 -0
  159. package/dist/db/cdc/streaming.d.ts.map +1 -0
  160. package/dist/db/cdc/streaming.js +636 -0
  161. package/dist/db/cdc/streaming.js.map +1 -0
  162. package/dist/db/collections/actions.d.ts +440 -0
  163. package/dist/db/collections/actions.d.ts.map +1 -0
  164. package/dist/db/collections/actions.js +631 -0
  165. package/dist/db/collections/actions.js.map +1 -0
  166. package/dist/db/collections/base.d.ts +342 -0
  167. package/dist/db/collections/base.d.ts.map +1 -0
  168. package/dist/db/collections/base.js +510 -0
  169. package/dist/db/collections/base.js.map +1 -0
  170. package/dist/db/collections/index.d.ts +50 -0
  171. package/dist/db/collections/index.d.ts.map +1 -0
  172. package/dist/db/collections/index.js +48 -0
  173. package/dist/db/collections/index.js.map +1 -0
  174. package/dist/db/collections/nouns.d.ts +260 -0
  175. package/dist/db/collections/nouns.d.ts.map +1 -0
  176. package/dist/db/collections/nouns.js +273 -0
  177. package/dist/db/collections/nouns.js.map +1 -0
  178. package/dist/db/collections/relationships.d.ts +484 -0
  179. package/dist/db/collections/relationships.d.ts.map +1 -0
  180. package/dist/db/collections/relationships.js +815 -0
  181. package/dist/db/collections/relationships.js.map +1 -0
  182. package/dist/db/collections/things.d.ts +439 -0
  183. package/dist/db/collections/things.d.ts.map +1 -0
  184. package/dist/db/collections/things.js +603 -0
  185. package/dist/db/collections/things.js.map +1 -0
  186. package/dist/db/collections/verbs.d.ts +308 -0
  187. package/dist/db/collections/verbs.d.ts.map +1 -0
  188. package/dist/db/collections/verbs.js +480 -0
  189. package/dist/db/collections/verbs.js.map +1 -0
  190. package/dist/db/index.d.ts +14 -0
  191. package/dist/db/index.d.ts.map +1 -0
  192. package/dist/db/index.js +23 -0
  193. package/dist/db/index.js.map +1 -0
  194. package/dist/db/storage/cold.d.ts +313 -0
  195. package/dist/db/storage/cold.d.ts.map +1 -0
  196. package/dist/db/storage/cold.js +319 -0
  197. package/dist/db/storage/cold.js.map +1 -0
  198. package/dist/db/storage/hot.d.ts +340 -0
  199. package/dist/db/storage/hot.d.ts.map +1 -0
  200. package/dist/db/storage/hot.js +333 -0
  201. package/dist/db/storage/hot.js.map +1 -0
  202. package/dist/db/storage/index.d.ts +242 -0
  203. package/dist/db/storage/index.d.ts.map +1 -0
  204. package/dist/db/storage/index.js +109 -0
  205. package/dist/db/storage/index.js.map +1 -0
  206. package/dist/db/storage/snapshots.d.ts +342 -0
  207. package/dist/db/storage/snapshots.d.ts.map +1 -0
  208. package/dist/db/storage/snapshots.js +298 -0
  209. package/dist/db/storage/snapshots.js.map +1 -0
  210. package/dist/db/storage/vortex.d.ts +324 -0
  211. package/dist/db/storage/vortex.d.ts.map +1 -0
  212. package/dist/db/storage/vortex.js +365 -0
  213. package/dist/db/storage/vortex.js.map +1 -0
  214. package/dist/db/storage/warm.d.ts +306 -0
  215. package/dist/db/storage/warm.d.ts.map +1 -0
  216. package/dist/db/storage/warm.js +339 -0
  217. package/dist/db/storage/warm.js.map +1 -0
  218. package/dist/do/DigitalObject.d.ts +595 -0
  219. package/dist/do/DigitalObject.d.ts.map +1 -0
  220. package/dist/do/DigitalObject.js +971 -0
  221. package/dist/do/DigitalObject.js.map +1 -0
  222. package/dist/do/business/financial/accounting.d.ts +436 -0
  223. package/dist/do/business/financial/accounting.d.ts.map +1 -0
  224. package/dist/do/business/financial/accounting.js +476 -0
  225. package/dist/do/business/financial/accounting.js.map +1 -0
  226. package/dist/do/business/financial/index.d.ts +15 -0
  227. package/dist/do/business/financial/index.d.ts.map +1 -0
  228. package/dist/do/business/financial/index.js +20 -0
  229. package/dist/do/business/financial/index.js.map +1 -0
  230. package/dist/do/business/financial/metrics.d.ts +370 -0
  231. package/dist/do/business/financial/metrics.d.ts.map +1 -0
  232. package/dist/do/business/financial/metrics.js +376 -0
  233. package/dist/do/business/financial/metrics.js.map +1 -0
  234. package/dist/do/business/financial/payments.d.ts +397 -0
  235. package/dist/do/business/financial/payments.d.ts.map +1 -0
  236. package/dist/do/business/financial/payments.js +395 -0
  237. package/dist/do/business/financial/payments.js.map +1 -0
  238. package/dist/do/business/financial/reports.d.ts +284 -0
  239. package/dist/do/business/financial/reports.d.ts.map +1 -0
  240. package/dist/do/business/financial/reports.js +347 -0
  241. package/dist/do/business/financial/reports.js.map +1 -0
  242. package/dist/do/business/financial/stripe.d.ts +254 -0
  243. package/dist/do/business/financial/stripe.d.ts.map +1 -0
  244. package/dist/do/business/financial/stripe.js +261 -0
  245. package/dist/do/business/financial/stripe.js.map +1 -0
  246. package/dist/do/business/financial/subscriptions.d.ts +402 -0
  247. package/dist/do/business/financial/subscriptions.d.ts.map +1 -0
  248. package/dist/do/business/financial/subscriptions.js +349 -0
  249. package/dist/do/business/financial/subscriptions.js.map +1 -0
  250. package/dist/do/business/index.d.ts +9 -0
  251. package/dist/do/business/index.d.ts.map +1 -0
  252. package/dist/do/business/index.js +10 -0
  253. package/dist/do/business/index.js.map +1 -0
  254. package/dist/do/colo/followers.d.ts +194 -0
  255. package/dist/do/colo/followers.d.ts.map +1 -0
  256. package/dist/do/colo/followers.js +224 -0
  257. package/dist/do/colo/followers.js.map +1 -0
  258. package/dist/do/colo/fork.d.ts +103 -0
  259. package/dist/do/colo/fork.d.ts.map +1 -0
  260. package/dist/do/colo/fork.js +143 -0
  261. package/dist/do/colo/fork.js.map +1 -0
  262. package/dist/do/colo/index.d.ts +181 -0
  263. package/dist/do/colo/index.d.ts.map +1 -0
  264. package/dist/do/colo/index.js +145 -0
  265. package/dist/do/colo/index.js.map +1 -0
  266. package/dist/do/colo/info.d.ts +106 -0
  267. package/dist/do/colo/info.d.ts.map +1 -0
  268. package/dist/do/colo/info.js +196 -0
  269. package/dist/do/colo/info.js.map +1 -0
  270. package/dist/do/colo/migrate.d.ts +161 -0
  271. package/dist/do/colo/migrate.d.ts.map +1 -0
  272. package/dist/do/colo/migrate.js +190 -0
  273. package/dist/do/colo/migrate.js.map +1 -0
  274. package/dist/do/colo/routing.d.ts +182 -0
  275. package/dist/do/colo/routing.d.ts.map +1 -0
  276. package/dist/do/colo/routing.js +254 -0
  277. package/dist/do/colo/routing.js.map +1 -0
  278. package/dist/do/domains/dns.d.ts +269 -0
  279. package/dist/do/domains/dns.d.ts.map +1 -0
  280. package/dist/do/domains/dns.js +215 -0
  281. package/dist/do/domains/dns.js.map +1 -0
  282. package/dist/do/domains/index.d.ts +40 -0
  283. package/dist/do/domains/index.d.ts.map +1 -0
  284. package/dist/do/domains/index.js +61 -0
  285. package/dist/do/domains/index.js.map +1 -0
  286. package/dist/do/domains/routing.d.ts +263 -0
  287. package/dist/do/domains/routing.d.ts.map +1 -0
  288. package/dist/do/domains/routing.js +362 -0
  289. package/dist/do/domains/routing.js.map +1 -0
  290. package/dist/do/domains/ssl.d.ts +217 -0
  291. package/dist/do/domains/ssl.d.ts.map +1 -0
  292. package/dist/do/domains/ssl.js +231 -0
  293. package/dist/do/domains/ssl.js.map +1 -0
  294. package/dist/do/domains/subdomains.d.ts +207 -0
  295. package/dist/do/domains/subdomains.d.ts.map +1 -0
  296. package/dist/do/domains/subdomains.js +223 -0
  297. package/dist/do/domains/subdomains.js.map +1 -0
  298. package/dist/do/domains/tlds.d.ts +175 -0
  299. package/dist/do/domains/tlds.d.ts.map +1 -0
  300. package/dist/do/domains/tlds.js +188 -0
  301. package/dist/do/domains/tlds.js.map +1 -0
  302. package/dist/do/domains/validation.d.ts +164 -0
  303. package/dist/do/domains/validation.d.ts.map +1 -0
  304. package/dist/do/domains/validation.js +290 -0
  305. package/dist/do/domains/validation.js.map +1 -0
  306. package/dist/do/hibernation.d.ts +385 -0
  307. package/dist/do/hibernation.d.ts.map +1 -0
  308. package/dist/do/hibernation.js +518 -0
  309. package/dist/do/hibernation.js.map +1 -0
  310. package/dist/do/index.d.ts +19 -0
  311. package/dist/do/index.d.ts.map +1 -0
  312. package/dist/do/index.js +23 -0
  313. package/dist/do/index.js.map +1 -0
  314. package/dist/do/state.d.ts +336 -0
  315. package/dist/do/state.d.ts.map +1 -0
  316. package/dist/do/state.js +290 -0
  317. package/dist/do/state.js.map +1 -0
  318. package/dist/index.d.ts +44 -0
  319. package/dist/index.d.ts.map +1 -0
  320. package/dist/index.js +89 -0
  321. package/dist/index.js.map +1 -0
  322. package/dist/rpc/client.d.ts +426 -0
  323. package/dist/rpc/client.d.ts.map +1 -0
  324. package/dist/rpc/client.js +826 -0
  325. package/dist/rpc/client.js.map +1 -0
  326. package/dist/rpc/index.d.ts +19 -0
  327. package/dist/rpc/index.d.ts.map +1 -0
  328. package/dist/rpc/index.js +23 -0
  329. package/dist/rpc/index.js.map +1 -0
  330. package/dist/rpc/methods.d.ts +364 -0
  331. package/dist/rpc/methods.d.ts.map +1 -0
  332. package/dist/rpc/methods.js +557 -0
  333. package/dist/rpc/methods.js.map +1 -0
  334. package/dist/rpc/protocol.d.ts +310 -0
  335. package/dist/rpc/protocol.d.ts.map +1 -0
  336. package/dist/rpc/protocol.js +672 -0
  337. package/dist/rpc/protocol.js.map +1 -0
  338. package/dist/rpc/routes.d.ts +332 -0
  339. package/dist/rpc/routes.d.ts.map +1 -0
  340. package/dist/rpc/routes.js +633 -0
  341. package/dist/rpc/routes.js.map +1 -0
  342. package/dist/rpc/server.d.ts +380 -0
  343. package/dist/rpc/server.d.ts.map +1 -0
  344. package/dist/rpc/server.js +850 -0
  345. package/dist/rpc/server.js.map +1 -0
  346. package/dist/sdk/auth.d.ts +201 -0
  347. package/dist/sdk/auth.d.ts.map +1 -0
  348. package/dist/sdk/auth.js +343 -0
  349. package/dist/sdk/auth.js.map +1 -0
  350. package/dist/sdk/client.d.ts +123 -0
  351. package/dist/sdk/client.d.ts.map +1 -0
  352. package/dist/sdk/client.js +403 -0
  353. package/dist/sdk/client.js.map +1 -0
  354. package/dist/sdk/index.d.ts +123 -0
  355. package/dist/sdk/index.d.ts.map +1 -0
  356. package/dist/sdk/index.js +230 -0
  357. package/dist/sdk/index.js.map +1 -0
  358. package/dist/sdk/rpc.d.ts +275 -0
  359. package/dist/sdk/rpc.d.ts.map +1 -0
  360. package/dist/sdk/rpc.js +249 -0
  361. package/dist/sdk/rpc.js.map +1 -0
  362. package/dist/sdk/transport.d.ts +283 -0
  363. package/dist/sdk/transport.d.ts.map +1 -0
  364. package/dist/sdk/transport.js +661 -0
  365. package/dist/sdk/transport.js.map +1 -0
  366. package/dist/sdk/types.d.ts +265 -0
  367. package/dist/sdk/types.d.ts.map +1 -0
  368. package/dist/sdk/types.js +27 -0
  369. package/dist/sdk/types.js.map +1 -0
  370. package/dist/types/ai.d.ts +533 -0
  371. package/dist/types/ai.d.ts.map +1 -0
  372. package/dist/types/ai.js +18 -0
  373. package/dist/types/ai.js.map +1 -0
  374. package/dist/types/app.d.ts +371 -0
  375. package/dist/types/app.d.ts.map +1 -0
  376. package/dist/types/app.js +151 -0
  377. package/dist/types/app.js.map +1 -0
  378. package/dist/types/business.d.ts +482 -0
  379. package/dist/types/business.d.ts.map +1 -0
  380. package/dist/types/business.js +60 -0
  381. package/dist/types/business.js.map +1 -0
  382. package/dist/types/cascade.d.ts +323 -0
  383. package/dist/types/cascade.d.ts.map +1 -0
  384. package/dist/types/cascade.js +82 -0
  385. package/dist/types/cascade.js.map +1 -0
  386. package/dist/types/collections.d.ts +704 -0
  387. package/dist/types/collections.d.ts.map +1 -0
  388. package/dist/types/collections.js +23 -0
  389. package/dist/types/collections.js.map +1 -0
  390. package/dist/types/colo.d.ts +171 -0
  391. package/dist/types/colo.d.ts.map +1 -0
  392. package/dist/types/colo.js +63 -0
  393. package/dist/types/colo.js.map +1 -0
  394. package/dist/types/communication.d.ts +595 -0
  395. package/dist/types/communication.d.ts.map +1 -0
  396. package/dist/types/communication.js +16 -0
  397. package/dist/types/communication.js.map +1 -0
  398. package/dist/types/content.d.ts +286 -0
  399. package/dist/types/content.d.ts.map +1 -0
  400. package/dist/types/content.js +8 -0
  401. package/dist/types/content.js.map +1 -0
  402. package/dist/types/context.d.ts +407 -0
  403. package/dist/types/context.d.ts.map +1 -0
  404. package/dist/types/context.js +36 -0
  405. package/dist/types/context.js.map +1 -0
  406. package/dist/types/databases.d.ts +377 -0
  407. package/dist/types/databases.d.ts.map +1 -0
  408. package/dist/types/databases.js +14 -0
  409. package/dist/types/databases.js.map +1 -0
  410. package/dist/types/domains.d.ts +132 -0
  411. package/dist/types/domains.d.ts.map +1 -0
  412. package/dist/types/domains.js +107 -0
  413. package/dist/types/domains.js.map +1 -0
  414. package/dist/types/execution.d.ts +381 -0
  415. package/dist/types/execution.d.ts.map +1 -0
  416. package/dist/types/execution.js +40 -0
  417. package/dist/types/execution.js.map +1 -0
  418. package/dist/types/financial.d.ts +608 -0
  419. package/dist/types/financial.d.ts.map +1 -0
  420. package/dist/types/financial.js +12 -0
  421. package/dist/types/financial.js.map +1 -0
  422. package/dist/types/functions.d.ts +215 -0
  423. package/dist/types/functions.d.ts.map +1 -0
  424. package/dist/types/functions.js +15 -0
  425. package/dist/types/functions.js.map +1 -0
  426. package/dist/types/git.d.ts +299 -0
  427. package/dist/types/git.d.ts.map +1 -0
  428. package/dist/types/git.js +17 -0
  429. package/dist/types/git.js.map +1 -0
  430. package/dist/types/identity.d.ts +141 -0
  431. package/dist/types/identity.d.ts.map +1 -0
  432. package/dist/types/identity.js +54 -0
  433. package/dist/types/identity.js.map +1 -0
  434. package/dist/types/index.d.ts +40 -0
  435. package/dist/types/index.d.ts.map +1 -0
  436. package/dist/types/index.js +65 -0
  437. package/dist/types/index.js.map +1 -0
  438. package/dist/types/integrations.d.ts +356 -0
  439. package/dist/types/integrations.d.ts.map +1 -0
  440. package/dist/types/integrations.js +19 -0
  441. package/dist/types/integrations.js.map +1 -0
  442. package/dist/types/mdxui.d.ts +1955 -0
  443. package/dist/types/mdxui.d.ts.map +1 -0
  444. package/dist/types/mdxui.js +751 -0
  445. package/dist/types/mdxui.js.map +1 -0
  446. package/dist/types/observability.d.ts +315 -0
  447. package/dist/types/observability.d.ts.map +1 -0
  448. package/dist/types/observability.js +13 -0
  449. package/dist/types/observability.js.map +1 -0
  450. package/dist/types/rpc.d.ts +339 -0
  451. package/dist/types/rpc.d.ts.map +1 -0
  452. package/dist/types/rpc.js +24 -0
  453. package/dist/types/rpc.js.map +1 -0
  454. package/dist/types/saas.d.ts +678 -0
  455. package/dist/types/saas.d.ts.map +1 -0
  456. package/dist/types/saas.js +59 -0
  457. package/dist/types/saas.js.map +1 -0
  458. package/dist/types/service.d.ts +676 -0
  459. package/dist/types/service.d.ts.map +1 -0
  460. package/dist/types/service.js +69 -0
  461. package/dist/types/service.js.map +1 -0
  462. package/dist/types/site.d.ts +317 -0
  463. package/dist/types/site.d.ts.map +1 -0
  464. package/dist/types/site.js +203 -0
  465. package/dist/types/site.js.map +1 -0
  466. package/dist/types/startup.d.ts +576 -0
  467. package/dist/types/startup.d.ts.map +1 -0
  468. package/dist/types/startup.js +59 -0
  469. package/dist/types/startup.js.map +1 -0
  470. package/dist/types/storage.d.ts +276 -0
  471. package/dist/types/storage.d.ts.map +1 -0
  472. package/dist/types/storage.js +35 -0
  473. package/dist/types/storage.js.map +1 -0
  474. package/dist/types/telephony.d.ts +458 -0
  475. package/dist/types/telephony.d.ts.map +1 -0
  476. package/dist/types/telephony.js +19 -0
  477. package/dist/types/telephony.js.map +1 -0
  478. package/dist/types/tenant.d.ts +708 -0
  479. package/dist/types/tenant.d.ts.map +1 -0
  480. package/dist/types/tenant.js +103 -0
  481. package/dist/types/tenant.js.map +1 -0
  482. package/dist/types/voice-ai.d.ts +459 -0
  483. package/dist/types/voice-ai.d.ts.map +1 -0
  484. package/dist/types/voice-ai.js +32 -0
  485. package/dist/types/voice-ai.js.map +1 -0
  486. package/package.json +143 -0
@@ -0,0 +1,704 @@
1
+ /**
2
+ * Collection Types for Digital Objects
3
+ *
4
+ * Every DO can contain these collections:
5
+ * - Data: Databases, Nouns, Verbs, Things, Actions, Relationships
6
+ * - Execution: Functions, Workflows, Actions (durable)
7
+ * - Events: Events (immutable), Experiments, Analytics
8
+ * - External: Integrations, Webhooks
9
+ * - Identity: Orgs, Roles, Users, Agents
10
+ */
11
+ /**
12
+ * Noun - defines an entity type
13
+ */
14
+ export interface Noun {
15
+ id: string;
16
+ name: string;
17
+ singular: string;
18
+ plural: string;
19
+ slug: string;
20
+ schema?: Record<string, unknown>;
21
+ description?: string;
22
+ }
23
+ /**
24
+ * Verb - defines an action type with all grammatical forms
25
+ *
26
+ * Every verb has:
27
+ * - action: create (imperative)
28
+ * - activity: creating (present participle)
29
+ * - event: created (past tense - what happened)
30
+ * - reverse: createdBy (passive - who/what did it)
31
+ * - inverse: delete (opposite action)
32
+ *
33
+ * Example: create → creating → created → createdBy → delete
34
+ */
35
+ export interface Verb {
36
+ id: string;
37
+ name: string;
38
+ /** Imperative form: create, update, delete */
39
+ action: string;
40
+ /** Short form: act */
41
+ act: string;
42
+ /** Present participle: creating, updating, deleting */
43
+ activity: string;
44
+ /** Past tense (event): created, updated, deleted */
45
+ event: string;
46
+ /** Passive form: createdBy, updatedBy, deletedBy */
47
+ reverse: string;
48
+ /** Opposite action: create ↔ delete, start ↔ stop */
49
+ inverse?: string;
50
+ description?: string;
51
+ }
52
+ /**
53
+ * Actor - who initiated an action
54
+ */
55
+ export type ActorType = 'User' | 'Agent' | 'Service' | 'System';
56
+ export interface Actor {
57
+ /** Actor type */
58
+ type: ActorType;
59
+ /** Actor ID (user ID, agent ID, service name) */
60
+ id: string;
61
+ /** Display name */
62
+ name?: string;
63
+ }
64
+ /**
65
+ * Thing - an instance of a Noun
66
+ *
67
+ * Supports two MDXLD formats:
68
+ * - Expanded: { $id, $type, $content, $code, ...data }
69
+ * - Compact: { id, type, data, content, code }
70
+ *
71
+ * DUAL NATURE: A Thing can also BE its own DO via $ref.
72
+ * Example: `headless.ly` is a Thing in `startups.studio` BUT ALSO
73
+ * its own DO with $context pointing back to startups.studio.
74
+ */
75
+ export interface ThingExpanded {
76
+ /** Entity ID (JSON-LD @id) */
77
+ $id: string;
78
+ /** Entity type (JSON-LD @type, replaces noun) */
79
+ $type: string;
80
+ /**
81
+ * URL reference to this Thing's own DO (if it has one)
82
+ * Creates the Parent→Child side of the dual nature pattern.
83
+ * The child DO's $context creates the Child→Parent side.
84
+ * Example: 'https://headless.ly'
85
+ */
86
+ $ref?: string;
87
+ /** MDX content (markdown + JSX) */
88
+ $content?: string;
89
+ /** Executable code */
90
+ $code?: string;
91
+ /** Version */
92
+ $version?: number;
93
+ /** Created timestamp */
94
+ $createdAt?: number;
95
+ /** Updated timestamp */
96
+ $updatedAt?: number;
97
+ /** Data fields spread at root level */
98
+ [key: string]: unknown;
99
+ }
100
+ export interface ThingCompact<T = unknown> {
101
+ /** Entity ID */
102
+ id: string;
103
+ /** Entity type (replaces noun) */
104
+ type: string;
105
+ /** Entity data */
106
+ data: T;
107
+ /**
108
+ * URL reference to this Thing's own DO (if it has one)
109
+ * Creates the Parent→Child side of the dual nature pattern.
110
+ * Example: 'https://headless.ly'
111
+ */
112
+ ref?: string;
113
+ /** MDX content */
114
+ content?: string;
115
+ /** Executable code */
116
+ code?: string;
117
+ /** Version */
118
+ version?: number;
119
+ /** Created timestamp */
120
+ createdAt?: number;
121
+ /** Updated timestamp */
122
+ updatedAt?: number;
123
+ }
124
+ /**
125
+ * Thing - union of both formats
126
+ * Use ThingExpanded for MDXLD-style documents
127
+ * Use ThingCompact for traditional data structures
128
+ */
129
+ export type Thing<T = unknown> = ThingExpanded | ThingCompact<T>;
130
+ /**
131
+ * Type guard for expanded format
132
+ */
133
+ export declare function isThingExpanded<T>(thing: Thing<T>): thing is ThingExpanded;
134
+ /**
135
+ * Type guard for compact format
136
+ */
137
+ export declare function isThingCompact<T>(thing: Thing<T>): thing is ThingCompact<T>;
138
+ /**
139
+ * Action - an instance of a Verb (durable action)
140
+ *
141
+ * Every action has:
142
+ * - actor: who initiated (User, Agent, Service)
143
+ * - timestamp: when it happened
144
+ * - request: the request that initiated it
145
+ * - input/object: what it operates on
146
+ * - config/options: settings for the action
147
+ * - output/results: what it produced
148
+ * - state/status: current state
149
+ */
150
+ export interface Action<TInput = unknown, TOutput = unknown, TConfig = unknown> {
151
+ /** Action ID */
152
+ $id: string;
153
+ /** Verb reference (action type) */
154
+ verb: string;
155
+ /** Subject (what performed the action, if not actor) */
156
+ subject?: string;
157
+ /** Object/Input (what the action operates on) */
158
+ object?: string;
159
+ input?: TInput;
160
+ /** Config/Options/Settings for the action */
161
+ config?: TConfig;
162
+ /** Output/Results of the action */
163
+ output?: TOutput;
164
+ /** Current state/status */
165
+ status: ActionStatus;
166
+ /** Actor - who initiated this action */
167
+ actor: Actor;
168
+ /** Request that initiated this action */
169
+ request?: ActionRequest;
170
+ /** Timestamps */
171
+ createdAt: number;
172
+ startedAt?: number;
173
+ completedAt?: number;
174
+ updatedAt?: number;
175
+ /** Error if failed */
176
+ error?: ActionError;
177
+ /** Metadata */
178
+ metadata?: Record<string, unknown>;
179
+ }
180
+ export type ActionStatus = 'Pending' | 'Running' | 'Completed' | 'Failed' | 'Cancelled' | 'Retrying' | 'Blocked';
181
+ /**
182
+ * Request that initiated an action
183
+ */
184
+ export interface ActionRequest {
185
+ /** Request ID */
186
+ id: string;
187
+ /** Request method */
188
+ method?: string;
189
+ /** Request path/URL */
190
+ path?: string;
191
+ /** Request timestamp */
192
+ timestamp: number;
193
+ /** Trace/correlation ID */
194
+ traceId?: string;
195
+ }
196
+ /**
197
+ * Error from a failed action
198
+ */
199
+ export interface ActionError {
200
+ /** Error code */
201
+ code: string;
202
+ /** Error message */
203
+ message: string;
204
+ /** Stack trace */
205
+ stack?: string;
206
+ /** Retry count */
207
+ retryCount?: number;
208
+ /** Is retryable */
209
+ retryable?: boolean;
210
+ }
211
+ /**
212
+ * Relationship - connection between Things
213
+ */
214
+ export interface Relationship {
215
+ id: string;
216
+ from: string;
217
+ to: string;
218
+ type: string;
219
+ data?: Record<string, unknown>;
220
+ createdAt: number;
221
+ }
222
+ export type FunctionType = 'code' | 'generative' | 'agentic' | 'human';
223
+ /**
224
+ * Function - executable unit with 4 tiers
225
+ * - code: Pure code execution
226
+ * - generative: AI model call
227
+ * - agentic: Autonomous agent
228
+ * - human: Human-in-the-loop
229
+ */
230
+ export interface Function {
231
+ id: string;
232
+ name: string;
233
+ type: FunctionType;
234
+ definition: FunctionDefinition;
235
+ description?: string;
236
+ inputs?: SchemaDefinition;
237
+ outputs?: SchemaDefinition;
238
+ timeout?: number;
239
+ }
240
+ export type FunctionDefinition = {
241
+ type: 'code';
242
+ code: string;
243
+ runtime?: string;
244
+ } | {
245
+ type: 'generative';
246
+ model: string;
247
+ prompt: string;
248
+ schema?: Record<string, unknown>;
249
+ } | {
250
+ type: 'agentic';
251
+ agent: string;
252
+ goal: string;
253
+ } | {
254
+ type: 'human';
255
+ assignee?: string;
256
+ instructions: string;
257
+ };
258
+ export interface SchemaDefinition {
259
+ type: string;
260
+ properties?: Record<string, SchemaDefinition>;
261
+ required?: string[];
262
+ items?: SchemaDefinition;
263
+ [key: string]: unknown;
264
+ }
265
+ /**
266
+ * Workflows can be:
267
+ * 1. Durable code functions responding to events or time intervals
268
+ * 2. XState-based state machines
269
+ *
270
+ * Both are durably executed and survive hibernation.
271
+ */
272
+ export type WorkflowType = 'code' | 'state-machine';
273
+ export type WorkflowExecutionState = 'Idle' | 'Running' | 'Paused' | 'Waiting' | 'Completed' | 'Failed';
274
+ /**
275
+ * Workflow - unified interface for both types
276
+ */
277
+ export interface Workflow<TContext = Record<string, unknown>> {
278
+ id: string;
279
+ name: string;
280
+ type: WorkflowType;
281
+ definition: WorkflowDefinition | StateMachineDefinition;
282
+ executionState: WorkflowExecutionState;
283
+ context: TContext;
284
+ /** Current state (for state machines) or current step (for code workflows) */
285
+ currentState?: string;
286
+ /** History of state transitions */
287
+ history?: WorkflowHistoryEntry[];
288
+ /** Actor who started the workflow */
289
+ actor?: Actor;
290
+ /** Timestamps */
291
+ createdAt: number;
292
+ startedAt?: number;
293
+ completedAt?: number;
294
+ updatedAt?: number;
295
+ /** Error if failed */
296
+ error?: ActionError;
297
+ }
298
+ /**
299
+ * Code workflow definition - durable functions triggered by events or time
300
+ */
301
+ export interface WorkflowDefinition {
302
+ type: 'code';
303
+ steps: WorkflowStep[];
304
+ initialContext?: Record<string, unknown>;
305
+ /** Event triggers */
306
+ triggers?: WorkflowTrigger[];
307
+ /** Error handling */
308
+ onError?: 'stop' | 'continue' | 'retry';
309
+ retryPolicy?: RetryPolicy;
310
+ }
311
+ export interface WorkflowStep {
312
+ id: string;
313
+ name: string;
314
+ /** Function to execute */
315
+ function: string;
316
+ /** Input mapping from context */
317
+ inputs?: Record<string, unknown>;
318
+ /** Condition to execute (expression) */
319
+ condition?: string;
320
+ /** Next step(s) */
321
+ next?: string | string[];
322
+ /** Error handling for this step */
323
+ onError?: 'stop' | 'continue' | 'retry' | 'goto';
324
+ errorTarget?: string;
325
+ /** Timeout for this step in ms */
326
+ timeout?: number;
327
+ }
328
+ export interface WorkflowTrigger {
329
+ type: 'event' | 'schedule' | 'webhook';
330
+ /** Event pattern: NS.Object.event (e.g., Order.Payment.completed) */
331
+ event?: string;
332
+ /** Schedule: cron expression or interval */
333
+ schedule?: string;
334
+ /** Webhook path */
335
+ webhook?: string;
336
+ /** Condition to trigger */
337
+ condition?: string;
338
+ }
339
+ export interface RetryPolicy {
340
+ maxAttempts: number;
341
+ initialDelay: number;
342
+ maxDelay: number;
343
+ backoffMultiplier: number;
344
+ }
345
+ /**
346
+ * State machine definition - XState-compatible
347
+ *
348
+ * Based on XState v5 machine config format
349
+ */
350
+ export interface StateMachineDefinition {
351
+ type: 'state-machine';
352
+ /** Machine ID */
353
+ id: string;
354
+ /** Initial state */
355
+ initial: string;
356
+ /** Initial context */
357
+ context?: Record<string, unknown>;
358
+ /** State definitions */
359
+ states: Record<string, StateNode>;
360
+ /** Machine-level event handlers */
361
+ on?: Record<string, Transition | Transition[]>;
362
+ }
363
+ export interface StateNode {
364
+ /** State type */
365
+ type?: 'atomic' | 'compound' | 'parallel' | 'final' | 'history';
366
+ /** Entry actions */
367
+ entry?: StateAction | StateAction[];
368
+ /** Exit actions */
369
+ exit?: StateAction | StateAction[];
370
+ /** Event handlers */
371
+ on?: Record<string, Transition | Transition[]>;
372
+ /** Invoked services/actors */
373
+ invoke?: InvokeConfig | InvokeConfig[];
374
+ /** Nested states (for compound/parallel) */
375
+ states?: Record<string, StateNode>;
376
+ /** Initial nested state (for compound) */
377
+ initial?: string;
378
+ /** After delays */
379
+ after?: Record<string | number, Transition | Transition[]>;
380
+ /** Always transitions (eventless) */
381
+ always?: Transition | Transition[];
382
+ /** Tags for state */
383
+ tags?: string[];
384
+ /** Meta information */
385
+ meta?: Record<string, unknown>;
386
+ }
387
+ export interface Transition {
388
+ /** Target state */
389
+ target?: string;
390
+ /** Guard condition */
391
+ guard?: string | GuardConfig;
392
+ /** Actions to execute */
393
+ actions?: StateAction | StateAction[];
394
+ /** Description */
395
+ description?: string;
396
+ /** Reenter the same state */
397
+ reenter?: boolean;
398
+ }
399
+ export interface GuardConfig {
400
+ type: string;
401
+ params?: Record<string, unknown>;
402
+ }
403
+ export type StateAction = string | {
404
+ type: string;
405
+ params?: Record<string, unknown>;
406
+ } | {
407
+ type: 'assign';
408
+ assignment: Record<string, unknown> | string;
409
+ } | {
410
+ type: 'raise';
411
+ event: string | {
412
+ type: string;
413
+ };
414
+ } | {
415
+ type: 'sendTo';
416
+ to: string;
417
+ event: string | {
418
+ type: string;
419
+ };
420
+ delay?: number;
421
+ } | {
422
+ type: 'emit';
423
+ event: string;
424
+ data?: unknown;
425
+ } | {
426
+ type: 'log';
427
+ message?: string;
428
+ };
429
+ export interface InvokeConfig {
430
+ /** Invoked service ID */
431
+ id?: string;
432
+ /** Service source (function name or actor) */
433
+ src: string | {
434
+ type: string;
435
+ input?: unknown;
436
+ };
437
+ /** Input for the service */
438
+ input?: unknown;
439
+ /** Events to send on done/error */
440
+ onDone?: Transition | Transition[];
441
+ onError?: Transition | Transition[];
442
+ /** onSnapshot for actors */
443
+ onSnapshot?: Transition | Transition[];
444
+ }
445
+ export interface WorkflowHistoryEntry {
446
+ timestamp: number;
447
+ event: string;
448
+ previousState: string;
449
+ currentState: string;
450
+ context?: Record<string, unknown>;
451
+ actor?: Actor;
452
+ }
453
+ /**
454
+ * Event - immutable record of something that happened
455
+ */
456
+ export interface Event<T = unknown> {
457
+ id: string;
458
+ type: string;
459
+ payload: T;
460
+ source: string;
461
+ timestamp: number;
462
+ correlationId?: string;
463
+ causationId?: string;
464
+ metadata?: Record<string, unknown>;
465
+ }
466
+ export type ExperimentStatus = 'Draft' | 'Running' | 'Paused' | 'Concluded';
467
+ /**
468
+ * Experiment - A/B testing and feature flags
469
+ */
470
+ export interface Experiment {
471
+ id: string;
472
+ name: string;
473
+ description?: string;
474
+ variants: Variant[];
475
+ allocation: AllocationStrategy;
476
+ status: ExperimentStatus;
477
+ metrics?: string[];
478
+ startedAt?: number;
479
+ concludedAt?: number;
480
+ results?: ExperimentResults;
481
+ }
482
+ export interface Variant {
483
+ id: string;
484
+ name: string;
485
+ weight: number;
486
+ config?: Record<string, unknown>;
487
+ }
488
+ export interface AllocationStrategy {
489
+ type: 'random' | 'sticky' | 'deterministic';
490
+ seed?: string;
491
+ stickyKey?: string;
492
+ }
493
+ export interface ExperimentResults {
494
+ winner?: string;
495
+ confidence?: number;
496
+ metrics: Record<string, VariantMetrics>;
497
+ }
498
+ export interface VariantMetrics {
499
+ participants: number;
500
+ conversions?: number;
501
+ values?: number[];
502
+ mean?: number;
503
+ variance?: number;
504
+ }
505
+ /**
506
+ * Organization - group of users
507
+ */
508
+ export interface Org {
509
+ id: string;
510
+ name: string;
511
+ parentId?: string;
512
+ metadata?: Record<string, unknown>;
513
+ createdAt: number;
514
+ updatedAt: number;
515
+ }
516
+ /**
517
+ * Role - set of permissions
518
+ */
519
+ export interface Role {
520
+ id: string;
521
+ name: string;
522
+ description?: string;
523
+ permissions: Permission[];
524
+ orgId?: string;
525
+ }
526
+ export interface Permission {
527
+ resource: string;
528
+ action: string;
529
+ condition?: string;
530
+ }
531
+ /**
532
+ * User - human identity
533
+ */
534
+ export interface User {
535
+ id: string;
536
+ email: string;
537
+ name?: string;
538
+ roles: string[];
539
+ orgId?: string;
540
+ metadata?: Record<string, unknown>;
541
+ createdAt: number;
542
+ updatedAt: number;
543
+ lastLoginAt?: number;
544
+ }
545
+ export type AgentStatus = 'Idle' | 'Working' | 'Blocked' | 'Paused' | 'Stopped';
546
+ /**
547
+ * Agent modality - how the agent communicates
548
+ *
549
+ * Voice is a MODALITY, not an entity type.
550
+ * An agent has personality + capabilities + modalities.
551
+ */
552
+ export type AgentModality = 'text' | 'voice' | 'video' | 'multimodal';
553
+ /**
554
+ * Agent personality - who the agent is
555
+ */
556
+ export interface AgentPersonality {
557
+ /** Personality name */
558
+ name: string;
559
+ /** Persona description */
560
+ description?: string;
561
+ /** Voice/tone characteristics */
562
+ tone?: string;
563
+ /** Communication style */
564
+ style?: 'formal' | 'casual' | 'professional' | 'friendly';
565
+ /** Language */
566
+ language?: string;
567
+ /** Custom traits */
568
+ traits?: string[];
569
+ }
570
+ /**
571
+ * Agent voice configuration (when modality includes voice)
572
+ */
573
+ export interface AgentVoiceConfig {
574
+ /** Voice provider */
575
+ provider: 'elevenlabs' | 'playht' | 'azure' | 'google' | 'openai' | 'deepgram';
576
+ /** Voice ID */
577
+ voiceId: string;
578
+ /** Voice name (for reference) */
579
+ voiceName?: string;
580
+ /** Speaking rate (0.5-2.0) */
581
+ speed?: number;
582
+ /** Stability (for ElevenLabs) */
583
+ stability?: number;
584
+ }
585
+ /**
586
+ * Agent - autonomous agent with personality and modalities
587
+ *
588
+ * Agents are distinct from their modalities:
589
+ * - Personality: Who they are (tone, style, traits)
590
+ * - Capabilities: What they can do (tools, skills)
591
+ * - Modalities: How they communicate (text, voice, video)
592
+ */
593
+ export interface Agent {
594
+ id: string;
595
+ name: string;
596
+ type: string;
597
+ description?: string;
598
+ /** Agent personality */
599
+ personality?: AgentPersonality;
600
+ /** Supported modalities */
601
+ modalities: AgentModality[];
602
+ /** Voice configuration (if voice modality enabled) */
603
+ voiceConfig?: AgentVoiceConfig;
604
+ /** Capabilities/skills */
605
+ capabilities: string[];
606
+ /** Current status */
607
+ status: AgentStatus;
608
+ /** Current task */
609
+ currentTask?: string;
610
+ /** Agent memory */
611
+ memory?: Record<string, unknown>;
612
+ /** Agent configuration */
613
+ config?: AgentConfig;
614
+ /** Timestamps */
615
+ createdAt: number;
616
+ updatedAt: number;
617
+ }
618
+ export interface AgentConfig {
619
+ model?: string;
620
+ maxIterations?: number;
621
+ timeout?: number;
622
+ tools?: string[];
623
+ systemPrompt?: string;
624
+ /** Temperature for AI responses */
625
+ temperature?: number;
626
+ /** Maximum tokens per response */
627
+ maxTokens?: number;
628
+ }
629
+ export type IntegrationStatus = 'Active' | 'Inactive' | 'Error' | 'Pending';
630
+ /**
631
+ * Integration - external service connection
632
+ */
633
+ export interface Integration {
634
+ id: string;
635
+ type: string;
636
+ name?: string;
637
+ config: Record<string, unknown>;
638
+ credentials?: IntegrationCredentials;
639
+ status: IntegrationStatus;
640
+ lastSyncAt?: number;
641
+ error?: string;
642
+ createdAt: number;
643
+ updatedAt: number;
644
+ }
645
+ export interface IntegrationCredentials {
646
+ type: 'oauth' | 'api_key' | 'basic' | 'bearer' | 'custom';
647
+ data: Record<string, unknown>;
648
+ expiresAt?: number;
649
+ }
650
+ /**
651
+ * Webhook - outbound event notification
652
+ */
653
+ export interface Webhook {
654
+ id: string;
655
+ url: string;
656
+ events: string[];
657
+ secret?: string;
658
+ headers?: Record<string, string>;
659
+ enabled: boolean;
660
+ retryPolicy?: RetryPolicy;
661
+ lastTriggeredAt?: number;
662
+ failureCount?: number;
663
+ createdAt: number;
664
+ updatedAt: number;
665
+ }
666
+ /**
667
+ * Standard collection methods for any collection type
668
+ */
669
+ export interface CollectionMethods<T> {
670
+ list(options?: ListOptions): Promise<ListResult<T>>;
671
+ get(id: string): Promise<T | null>;
672
+ create(data: Omit<T, 'id'>): Promise<T>;
673
+ update(id: string, data: Partial<T>): Promise<T>;
674
+ delete(id: string): Promise<void>;
675
+ count(filter?: FilterExpression): Promise<number>;
676
+ find(filter: FilterExpression): Promise<T[]>;
677
+ }
678
+ export interface ListOptions {
679
+ limit?: number;
680
+ offset?: number;
681
+ cursor?: string;
682
+ orderBy?: string;
683
+ orderDir?: 'asc' | 'desc';
684
+ filter?: FilterExpression;
685
+ }
686
+ export interface ListResult<T> {
687
+ items: T[];
688
+ total?: number;
689
+ cursor?: string;
690
+ hasMore: boolean;
691
+ }
692
+ export type FilterExpression = {
693
+ field: string;
694
+ op: FilterOp;
695
+ value: unknown;
696
+ } | {
697
+ and: FilterExpression[];
698
+ } | {
699
+ or: FilterExpression[];
700
+ } | {
701
+ not: FilterExpression;
702
+ };
703
+ export type FilterOp = 'eq' | 'ne' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'nin' | 'contains' | 'startsWith' | 'endsWith';
704
+ //# sourceMappingURL=collections.d.ts.map