@segmentstream/ontology 0.0.0-stage → 0.92.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (483) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +2 -0
  3. package/README.md +1655 -2
  4. package/dist/action.d.ts +193 -0
  5. package/dist/action.js +41 -0
  6. package/dist/agent-chat.d.ts +44 -0
  7. package/dist/agent-chat.js +91 -0
  8. package/dist/agent-task-contract.d.ts +64 -0
  9. package/dist/agent-task-contract.js +15 -0
  10. package/dist/agent-task.d.ts +39 -0
  11. package/dist/agent-task.js +112 -0
  12. package/dist/analyze.d.ts +215 -0
  13. package/dist/analyze.js +2438 -0
  14. package/dist/app-feedback.d.ts +167 -0
  15. package/dist/app-feedback.js +176 -0
  16. package/dist/authoring-input.d.ts +3 -0
  17. package/dist/authoring-input.js +107 -0
  18. package/dist/authoring-names.d.ts +4 -0
  19. package/dist/authoring-names.js +13 -0
  20. package/dist/authoring-records.d.ts +35 -0
  21. package/dist/authoring-records.js +264 -0
  22. package/dist/authoring.d.ts +15 -0
  23. package/dist/authoring.js +331 -0
  24. package/dist/bin/check.d.ts +30 -0
  25. package/dist/bin/check.js +99 -0
  26. package/dist/bin/load.d.ts +48 -0
  27. package/dist/bin/load.js +139 -0
  28. package/dist/bin/main.d.ts +31 -0
  29. package/dist/bin/main.js +121 -0
  30. package/dist/bin/migrate.d.ts +57 -0
  31. package/dist/bin/migrate.js +170 -0
  32. package/dist/bin/output.d.ts +31 -0
  33. package/dist/bin/output.js +84 -0
  34. package/dist/bin.d.ts +2 -0
  35. package/dist/bin.js +31 -0
  36. package/dist/blob.d.ts +52 -0
  37. package/dist/blob.js +87 -0
  38. package/dist/channel-session.d.ts +16 -0
  39. package/dist/channel-session.js +16 -0
  40. package/dist/chat.d.ts +43 -0
  41. package/dist/chat.js +34 -0
  42. package/dist/confirmation.d.ts +46 -0
  43. package/dist/confirmation.js +41 -0
  44. package/dist/connection.d.ts +213 -0
  45. package/dist/connection.js +289 -0
  46. package/dist/deployment.d.ts +35 -0
  47. package/dist/deployment.js +76 -0
  48. package/dist/diagnostics.d.ts +27 -0
  49. package/dist/diagnostics.js +106 -0
  50. package/dist/emails.d.ts +70 -0
  51. package/dist/emails.js +221 -0
  52. package/dist/entity.d.ts +331 -0
  53. package/dist/entity.js +153 -0
  54. package/dist/errors.d.ts +154 -0
  55. package/dist/errors.js +109 -0
  56. package/dist/feedback-config.d.ts +24 -0
  57. package/dist/feedback-config.js +126 -0
  58. package/dist/files.d.ts +39 -0
  59. package/dist/files.js +4 -0
  60. package/dist/groups.d.ts +95 -0
  61. package/dist/groups.js +280 -0
  62. package/dist/index.d.ts +109 -0
  63. package/dist/index.js +70 -0
  64. package/dist/internal/diagnostics.js +594 -0
  65. package/dist/legacy.d.ts +160 -0
  66. package/dist/legacy.js +270 -0
  67. package/dist/manifest-compatibility.d.ts +8 -0
  68. package/dist/manifest-compatibility.js +87 -0
  69. package/dist/manifest.d.ts +3329 -0
  70. package/dist/manifest.js +757 -0
  71. package/dist/me.d.ts +46 -0
  72. package/dist/me.js +109 -0
  73. package/dist/metric-filters.d.ts +48 -0
  74. package/dist/metric-filters.js +252 -0
  75. package/dist/metric-routes.d.ts +132 -0
  76. package/dist/metric-routes.js +498 -0
  77. package/dist/metric.d.ts +172 -0
  78. package/dist/metric.js +132 -0
  79. package/dist/migrate/apply.d.ts +94 -0
  80. package/dist/migrate/apply.js +526 -0
  81. package/dist/migrate/errors.d.ts +46 -0
  82. package/dist/migrate/errors.js +38 -0
  83. package/dist/migrate/index.d.ts +10 -0
  84. package/dist/migrate/index.js +7 -0
  85. package/dist/migrate/model.d.ts +2311 -0
  86. package/dist/migrate/model.js +148 -0
  87. package/dist/migrate/plan.d.ts +51 -0
  88. package/dist/migrate/plan.js +1856 -0
  89. package/dist/migrate/preview.d.ts +13 -0
  90. package/dist/migrate/preview.js +65 -0
  91. package/dist/migrate/storage.d.ts +226 -0
  92. package/dist/migrate/storage.js +774 -0
  93. package/dist/model-metrics.d.ts +22 -0
  94. package/dist/model-metrics.js +545 -0
  95. package/dist/names.d.ts +49 -0
  96. package/dist/names.js +110 -0
  97. package/dist/navigation-artifact.d.ts +13 -0
  98. package/dist/navigation-artifact.js +11 -0
  99. package/dist/navigation-catalog.d.ts +55 -0
  100. package/dist/navigation-catalog.js +297 -0
  101. package/dist/nitro-navigation.d.ts +3 -0
  102. package/dist/nitro-navigation.js +64 -0
  103. package/dist/nitro-workflows.d.ts +108 -0
  104. package/dist/nitro-workflows.js +286 -0
  105. package/dist/nitro.d.ts +40 -0
  106. package/dist/nitro.js +50 -0
  107. package/dist/ontology.d.ts +41 -0
  108. package/dist/ontology.js +46 -0
  109. package/dist/permissions.d.ts +198 -0
  110. package/dist/permissions.js +272 -0
  111. package/dist/property.d.ts +188 -0
  112. package/dist/property.js +301 -0
  113. package/dist/query.d.ts +245 -0
  114. package/dist/query.js +615 -0
  115. package/dist/relationship.d.ts +99 -0
  116. package/dist/relationship.js +33 -0
  117. package/dist/render.d.ts +81 -0
  118. package/dist/render.js +512 -0
  119. package/dist/replication/baseline.d.ts +51 -0
  120. package/dist/replication/baseline.js +215 -0
  121. package/dist/replication/bigquery.d.ts +37 -0
  122. package/dist/replication/bigquery.js +211 -0
  123. package/dist/replication/coverage.d.ts +14 -0
  124. package/dist/replication/coverage.js +53 -0
  125. package/dist/replication/evolution.d.ts +25 -0
  126. package/dist/replication/evolution.js +184 -0
  127. package/dist/replication/identities.d.ts +6 -0
  128. package/dist/replication/identities.js +47 -0
  129. package/dist/replication/legacy-baseline.d.ts +27 -0
  130. package/dist/replication/legacy-baseline.js +109 -0
  131. package/dist/replication/legacy-store.d.ts +19 -0
  132. package/dist/replication/legacy-store.js +63 -0
  133. package/dist/replication/lineage.d.ts +36 -0
  134. package/dist/replication/lineage.js +72 -0
  135. package/dist/replication/migrate.d.ts +21 -0
  136. package/dist/replication/migrate.js +84 -0
  137. package/dist/replication/model.d.ts +52 -0
  138. package/dist/replication/model.js +99 -0
  139. package/dist/replication/scans.d.ts +34 -0
  140. package/dist/replication/scans.js +158 -0
  141. package/dist/replication/schema.d.ts +11 -0
  142. package/dist/replication/schema.js +226 -0
  143. package/dist/replication/shadow-schema.d.ts +4 -0
  144. package/dist/replication/shadow-schema.js +61 -0
  145. package/dist/replication/shadow.d.ts +127 -0
  146. package/dist/replication/shadow.js +614 -0
  147. package/dist/replication/source-replacement.d.ts +33 -0
  148. package/dist/replication/source-replacement.js +76 -0
  149. package/dist/replication/store.d.ts +36 -0
  150. package/dist/replication/store.js +382 -0
  151. package/dist/replication/transaction.d.ts +23 -0
  152. package/dist/replication/transaction.js +88 -0
  153. package/dist/role.d.ts +61 -0
  154. package/dist/role.js +76 -0
  155. package/dist/runtime/action-deadlocks.d.ts +21 -0
  156. package/dist/runtime/action-deadlocks.js +130 -0
  157. package/dist/runtime/action-transactions.d.ts +35 -0
  158. package/dist/runtime/action-transactions.js +54 -0
  159. package/dist/runtime/agent-counters.d.ts +26 -0
  160. package/dist/runtime/agent-counters.js +98 -0
  161. package/dist/runtime/agent-tasks.d.ts +63 -0
  162. package/dist/runtime/agent-tasks.js +120 -0
  163. package/dist/runtime/agents.d.ts +15 -0
  164. package/dist/runtime/agents.js +457 -0
  165. package/dist/runtime/batch-diagnostics.d.ts +22 -0
  166. package/dist/runtime/batch-diagnostics.js +89 -0
  167. package/dist/runtime/batch.d.ts +52 -0
  168. package/dist/runtime/batch.js +534 -0
  169. package/dist/runtime/channel-session-revocation.d.ts +3 -0
  170. package/dist/runtime/channel-session-revocation.js +5 -0
  171. package/dist/runtime/channel-sessions.d.ts +4 -0
  172. package/dist/runtime/channel-sessions.js +61 -0
  173. package/dist/runtime/confirmations.d.ts +29 -0
  174. package/dist/runtime/confirmations.js +57 -0
  175. package/dist/runtime/cursor.d.ts +23 -0
  176. package/dist/runtime/cursor.js +100 -0
  177. package/dist/runtime/deployment.d.ts +7 -0
  178. package/dist/runtime/deployment.js +4 -0
  179. package/dist/runtime/errors.d.ts +118 -0
  180. package/dist/runtime/errors.js +109 -0
  181. package/dist/runtime/federation-tables.d.ts +2 -0
  182. package/dist/runtime/federation-tables.js +20 -0
  183. package/dist/runtime/federation.d.ts +42 -0
  184. package/dist/runtime/federation.js +222 -0
  185. package/dist/runtime/files.d.ts +39 -0
  186. package/dist/runtime/files.js +44 -0
  187. package/dist/runtime/generated-actions.d.ts +37 -0
  188. package/dist/runtime/generated-actions.js +307 -0
  189. package/dist/runtime/history.d.ts +91 -0
  190. package/dist/runtime/history.js +77 -0
  191. package/dist/runtime/ids.d.ts +6 -0
  192. package/dist/runtime/ids.js +39 -0
  193. package/dist/runtime/member-tables.d.ts +8 -0
  194. package/dist/runtime/member-tables.js +33 -0
  195. package/dist/runtime/member-writes.d.ts +78 -0
  196. package/dist/runtime/member-writes.js +202 -0
  197. package/dist/runtime/metric-query.d.ts +19 -0
  198. package/dist/runtime/metric-query.js +411 -0
  199. package/dist/runtime/model.d.ts +67 -0
  200. package/dist/runtime/model.js +150 -0
  201. package/dist/runtime/new-user-hook.d.ts +6 -0
  202. package/dist/runtime/new-user-hook.js +37 -0
  203. package/dist/runtime/oauth.d.ts +9 -0
  204. package/dist/runtime/oauth.js +299 -0
  205. package/dist/runtime/pipeline.d.ts +155 -0
  206. package/dist/runtime/pipeline.js +597 -0
  207. package/dist/runtime/postgres-tls.d.ts +10 -0
  208. package/dist/runtime/postgres-tls.js +14 -0
  209. package/dist/runtime/principals.d.ts +302 -0
  210. package/dist/runtime/principals.js +1307 -0
  211. package/dist/runtime/reads.d.ts +55 -0
  212. package/dist/runtime/reads.js +313 -0
  213. package/dist/runtime/records.d.ts +42 -0
  214. package/dist/runtime/records.js +245 -0
  215. package/dist/runtime/resolve-agent-identity.d.ts +6 -0
  216. package/dist/runtime/resolve-agent-identity.js +181 -0
  217. package/dist/runtime/service-binding.d.ts +18 -0
  218. package/dist/runtime/service-binding.js +266 -0
  219. package/dist/runtime/sign-in-links.d.ts +68 -0
  220. package/dist/runtime/sign-in-links.js +147 -0
  221. package/dist/runtime/sql-runtime.d.ts +131 -0
  222. package/dist/runtime/sql-runtime.js +362 -0
  223. package/dist/runtime/statement.d.ts +18 -0
  224. package/dist/runtime/statement.js +31 -0
  225. package/dist/runtime/user-identities.d.ts +66 -0
  226. package/dist/runtime/user-identities.js +106 -0
  227. package/dist/runtime/user-identity-sql.d.ts +86 -0
  228. package/dist/runtime/user-identity-sql.js +297 -0
  229. package/dist/runtime/user-roles.d.ts +16 -0
  230. package/dist/runtime/user-roles.js +32 -0
  231. package/dist/runtime/validation.d.ts +16 -0
  232. package/dist/runtime/validation.js +26 -0
  233. package/dist/runtime/where.d.ts +57 -0
  234. package/dist/runtime/where.js +404 -0
  235. package/dist/runtime/workflow-admission.d.ts +49 -0
  236. package/dist/runtime/workflow-admission.js +92 -0
  237. package/dist/runtime/workflow-argument-codec.d.ts +10 -0
  238. package/dist/runtime/workflow-argument-codec.js +120 -0
  239. package/dist/runtime/workflow-arguments.d.ts +17 -0
  240. package/dist/runtime/workflow-arguments.js +99 -0
  241. package/dist/runtime/workflow-starts.d.ts +203 -0
  242. package/dist/runtime/workflow-starts.js +493 -0
  243. package/dist/runtime/workflow-users.d.ts +9 -0
  244. package/dist/runtime/workflow-users.js +17 -0
  245. package/dist/runtime/workload.d.ts +25 -0
  246. package/dist/runtime/workload.js +24 -0
  247. package/dist/runtime/writes.d.ts +108 -0
  248. package/dist/runtime/writes.js +491 -0
  249. package/dist/runtime-source.d.ts +22 -0
  250. package/dist/runtime-source.js +28 -0
  251. package/dist/runtime.d.ts +310 -0
  252. package/dist/runtime.js +31 -0
  253. package/dist/server.d.ts +23 -0
  254. package/dist/server.js +107 -0
  255. package/dist/service/agent/attachments.d.ts +33 -0
  256. package/dist/service/agent/attachments.js +228 -0
  257. package/dist/service/agent/authentication.d.ts +22 -0
  258. package/dist/service/agent/authentication.js +58 -0
  259. package/dist/service/agent/confirmations.d.ts +5 -0
  260. package/dist/service/agent/confirmations.js +73 -0
  261. package/dist/service/agent/conversation-routes.d.ts +14 -0
  262. package/dist/service/agent/conversation-routes.js +45 -0
  263. package/dist/service/agent/conversations.d.ts +40 -0
  264. package/dist/service/agent/conversations.js +69 -0
  265. package/dist/service/agent/files.d.ts +12 -0
  266. package/dist/service/agent/files.js +69 -0
  267. package/dist/service/agent/protocol.d.ts +90 -0
  268. package/dist/service/agent/protocol.js +114 -0
  269. package/dist/service/agent/server.d.ts +28 -0
  270. package/dist/service/agent/server.js +374 -0
  271. package/dist/service/agent/task-caller.d.ts +21 -0
  272. package/dist/service/agent/task-caller.js +35 -0
  273. package/dist/service/agent/task-start.d.ts +53 -0
  274. package/dist/service/agent/task-start.js +161 -0
  275. package/dist/service/agent/tasks.d.ts +40 -0
  276. package/dist/service/agent/tasks.js +155 -0
  277. package/dist/service/api.d.ts +50 -0
  278. package/dist/service/api.js +288 -0
  279. package/dist/service/authentication.d.ts +227 -0
  280. package/dist/service/authentication.js +767 -0
  281. package/dist/service/caller-context.d.ts +24 -0
  282. package/dist/service/caller-context.js +6 -0
  283. package/dist/service/catalog.d.ts +42 -0
  284. package/dist/service/catalog.js +66 -0
  285. package/dist/service/channel/provider.d.ts +10 -0
  286. package/dist/service/channel/provider.js +1 -0
  287. package/dist/service/channel/providers/telegram.d.ts +18 -0
  288. package/dist/service/channel/providers/telegram.js +108 -0
  289. package/dist/service/channel/sessions.d.ts +5 -0
  290. package/dist/service/channel/sessions.js +53 -0
  291. package/dist/service/channel/sign-in.d.ts +7 -0
  292. package/dist/service/channel/sign-in.js +78 -0
  293. package/dist/service/chat/archive.d.ts +64 -0
  294. package/dist/service/chat/archive.js +62 -0
  295. package/dist/service/chat/attribution.d.ts +26 -0
  296. package/dist/service/chat/attribution.js +28 -0
  297. package/dist/service/chat/delivery.d.ts +18 -0
  298. package/dist/service/chat/delivery.js +251 -0
  299. package/dist/service/chat/diagnostics.d.ts +2 -0
  300. package/dist/service/chat/diagnostics.js +35 -0
  301. package/dist/service/chat/envelope.d.ts +96 -0
  302. package/dist/service/chat/envelope.js +39 -0
  303. package/dist/service/chat/idempotency.d.ts +19 -0
  304. package/dist/service/chat/idempotency.js +37 -0
  305. package/dist/service/chat/providers/telegram.d.ts +36 -0
  306. package/dist/service/chat/providers/telegram.js +133 -0
  307. package/dist/service/chat/reads.d.ts +25 -0
  308. package/dist/service/chat/reads.js +75 -0
  309. package/dist/service/chat/resolve.d.ts +34 -0
  310. package/dist/service/chat/resolve.js +150 -0
  311. package/dist/service/chat/routes.d.ts +23 -0
  312. package/dist/service/chat/routes.js +75 -0
  313. package/dist/service/chat/schemas.d.ts +43 -0
  314. package/dist/service/chat/schemas.js +31 -0
  315. package/dist/service/config.d.ts +218 -0
  316. package/dist/service/config.js +265 -0
  317. package/dist/service/connection-stream.d.ts +10 -0
  318. package/dist/service/connection-stream.js +191 -0
  319. package/dist/service/connections.d.ts +60 -0
  320. package/dist/service/connections.js +271 -0
  321. package/dist/service/decisions.d.ts +35 -0
  322. package/dist/service/decisions.js +63 -0
  323. package/dist/service/descriptions.d.ts +8 -0
  324. package/dist/service/descriptions.js +20 -0
  325. package/dist/service/discovery-schemas.d.ts +92 -0
  326. package/dist/service/discovery-schemas.js +59 -0
  327. package/dist/service/discovery-search.d.ts +30 -0
  328. package/dist/service/discovery-search.js +95 -0
  329. package/dist/service/discovery.d.ts +37 -0
  330. package/dist/service/discovery.js +436 -0
  331. package/dist/service/docs.d.ts +9 -0
  332. package/dist/service/docs.js +197 -0
  333. package/dist/service/errors.d.ts +145 -0
  334. package/dist/service/errors.js +704 -0
  335. package/dist/service/federation-provider.d.ts +36 -0
  336. package/dist/service/federation-provider.js +110 -0
  337. package/dist/service/federation-server.d.ts +20 -0
  338. package/dist/service/federation-server.js +249 -0
  339. package/dist/service/federation-status.d.ts +40 -0
  340. package/dist/service/federation-status.js +151 -0
  341. package/dist/service/handlers.d.ts +18 -0
  342. package/dist/service/handlers.js +287 -0
  343. package/dist/service/mcp/confirmation.d.ts +68 -0
  344. package/dist/service/mcp/confirmation.js +178 -0
  345. package/dist/service/mcp/find-input.d.ts +12 -0
  346. package/dist/service/mcp/find-input.js +122 -0
  347. package/dist/service/mcp/input-schema.d.ts +6 -0
  348. package/dist/service/mcp/input-schema.js +126 -0
  349. package/dist/service/mcp/listing.d.ts +26 -0
  350. package/dist/service/mcp/listing.js +92 -0
  351. package/dist/service/mcp/metric-tools.d.ts +85 -0
  352. package/dist/service/mcp/metric-tools.js +258 -0
  353. package/dist/service/mcp/request-log.d.ts +5 -0
  354. package/dist/service/mcp/request-log.js +53 -0
  355. package/dist/service/mcp/runtime-policy.d.ts +27 -0
  356. package/dist/service/mcp/runtime-policy.js +62 -0
  357. package/dist/service/mcp/server.d.ts +52 -0
  358. package/dist/service/mcp/server.js +861 -0
  359. package/dist/service/mcp/tools.d.ts +99 -0
  360. package/dist/service/mcp/tools.js +938 -0
  361. package/dist/service/member-file-routes.d.ts +22 -0
  362. package/dist/service/member-file-routes.js +52 -0
  363. package/dist/service/member-files.d.ts +245 -0
  364. package/dist/service/member-files.js +258 -0
  365. package/dist/service/metric-query-platform.d.ts +77 -0
  366. package/dist/service/metric-query-platform.js +198 -0
  367. package/dist/service/metric-query-scopes.d.ts +43 -0
  368. package/dist/service/metric-query-scopes.js +147 -0
  369. package/dist/service/metric-query.d.ts +48 -0
  370. package/dist/service/metric-query.js +200 -0
  371. package/dist/service/name-suggestions.d.ts +3 -0
  372. package/dist/service/name-suggestions.js +38 -0
  373. package/dist/service/navigation-schemas.d.ts +80 -0
  374. package/dist/service/navigation-schemas.js +49 -0
  375. package/dist/service/navigation.d.ts +20 -0
  376. package/dist/service/navigation.js +165 -0
  377. package/dist/service/oauth/protocol.d.ts +70 -0
  378. package/dist/service/oauth/protocol.js +157 -0
  379. package/dist/service/oauth/refresh-replay.d.ts +2 -0
  380. package/dist/service/oauth/refresh-replay.js +20 -0
  381. package/dist/service/oauth/server.d.ts +28 -0
  382. package/dist/service/oauth/server.js +769 -0
  383. package/dist/service/operations.d.ts +170 -0
  384. package/dist/service/operations.js +392 -0
  385. package/dist/service/plan.d.ts +57 -0
  386. package/dist/service/plan.js +96 -0
  387. package/dist/service/rate-limit.d.ts +22 -0
  388. package/dist/service/rate-limit.js +52 -0
  389. package/dist/service/record-reads.d.ts +21 -0
  390. package/dist/service/record-reads.js +155 -0
  391. package/dist/service/replication.d.ts +5 -0
  392. package/dist/service/replication.js +39 -0
  393. package/dist/service/runtime-contract.d.ts +508 -0
  394. package/dist/service/runtime-contract.js +18 -0
  395. package/dist/service/runtime-identity.d.ts +71 -0
  396. package/dist/service/runtime-identity.js +122 -0
  397. package/dist/service/schemas.d.ts +961 -0
  398. package/dist/service/schemas.js +639 -0
  399. package/dist/service/service.d.ts +21 -0
  400. package/dist/service/service.js +526 -0
  401. package/dist/service/warehouse-platform.d.ts +17 -0
  402. package/dist/service/warehouse-platform.js +122 -0
  403. package/dist/service/warehouse-query.d.ts +24 -0
  404. package/dist/service/warehouse-query.js +280 -0
  405. package/dist/service/webhooks.d.ts +106 -0
  406. package/dist/service/webhooks.js +233 -0
  407. package/dist/service/workflow-admission-provider.d.ts +31 -0
  408. package/dist/service/workflow-admission-provider.js +205 -0
  409. package/dist/service/workflow-argument-serialization.d.ts +2 -0
  410. package/dist/service/workflow-argument-serialization.js +14 -0
  411. package/dist/service/workflow-callback.d.ts +22 -0
  412. package/dist/service/workflow-callback.js +75 -0
  413. package/dist/service/workflow-deployment.d.ts +8 -0
  414. package/dist/service/workflow-deployment.js +131 -0
  415. package/dist/service/workflow-diagnostics.d.ts +23 -0
  416. package/dist/service/workflow-diagnostics.js +263 -0
  417. package/dist/service/workflow-errors.d.ts +26 -0
  418. package/dist/service/workflow-errors.js +181 -0
  419. package/dist/service/workflow-logging.d.ts +2 -0
  420. package/dist/service/workflow-logging.js +50 -0
  421. package/dist/service/workflow-queue-fence.d.ts +6 -0
  422. package/dist/service/workflow-queue-fence.js +66 -0
  423. package/dist/service/workflows.d.ts +200 -0
  424. package/dist/service/workflows.js +1549 -0
  425. package/dist/sign-in.d.ts +58 -0
  426. package/dist/sign-in.js +57 -0
  427. package/dist/source.d.ts +30 -0
  428. package/dist/source.js +107 -0
  429. package/dist/start-recovery-contract.d.ts +49 -0
  430. package/dist/start-recovery-contract.js +26 -0
  431. package/dist/start-recovery.d.ts +27 -0
  432. package/dist/start-recovery.js +81 -0
  433. package/dist/storage/api.d.ts +4 -0
  434. package/dist/storage/api.js +40 -0
  435. package/dist/storage/attachments.d.ts +146 -0
  436. package/dist/storage/attachments.js +733 -0
  437. package/dist/storage/authorization.d.ts +38 -0
  438. package/dist/storage/authorization.js +83 -0
  439. package/dist/storage/file-access.d.ts +17 -0
  440. package/dist/storage/file-access.js +8 -0
  441. package/dist/storage/limits.d.ts +12 -0
  442. package/dist/storage/limits.js +17 -0
  443. package/dist/storage/maintenance-auth.d.ts +20 -0
  444. package/dist/storage/maintenance-auth.js +24 -0
  445. package/dist/storage/maintenance.d.ts +11 -0
  446. package/dist/storage/maintenance.js +67 -0
  447. package/dist/storage/neon.d.ts +4 -0
  448. package/dist/storage/neon.js +318 -0
  449. package/dist/storage/operator.d.ts +11 -0
  450. package/dist/storage/operator.js +30 -0
  451. package/dist/storage/provider.d.ts +93 -0
  452. package/dist/storage/provider.js +36 -0
  453. package/dist/storage/sessions.d.ts +184 -0
  454. package/dist/storage/sessions.js +688 -0
  455. package/dist/storage/tables.d.ts +54 -0
  456. package/dist/storage/tables.js +205 -0
  457. package/dist/storage/transfers.d.ts +16 -0
  458. package/dist/storage/transfers.js +153 -0
  459. package/dist/storage/writes.d.ts +7 -0
  460. package/dist/storage/writes.js +88 -0
  461. package/dist/telegram.d.ts +35 -0
  462. package/dist/telegram.js +173 -0
  463. package/dist/user-identity.d.ts +28 -0
  464. package/dist/user-identity.js +106 -0
  465. package/dist/user.d.ts +75 -0
  466. package/dist/user.js +111 -0
  467. package/dist/warehouse-backed.d.ts +6 -0
  468. package/dist/warehouse-backed.js +495 -0
  469. package/dist/webhook-token.d.ts +11 -0
  470. package/dist/webhook-token.js +18 -0
  471. package/dist/webhooks.d.ts +40 -0
  472. package/dist/webhooks.js +55 -0
  473. package/dist/wire.d.ts +10 -0
  474. package/dist/wire.js +35 -0
  475. package/dist/workflow-runtime.d.ts +116 -0
  476. package/dist/workflow-runtime.js +109 -0
  477. package/dist/workflow-topics.d.ts +28 -0
  478. package/dist/workflow-topics.js +28 -0
  479. package/dist/workflow.d.ts +284 -0
  480. package/dist/workflow.js +259 -0
  481. package/dist/workflows.d.ts +24 -0
  482. package/dist/workflows.js +18 -0
  483. package/package.json +127 -4
package/dist/groups.js ADDED
@@ -0,0 +1,280 @@
1
+ const object = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
2
+ /** Strict validation of the `groups` section that `agent/segmentstream.json` authors. */
3
+ export function groupPolicyIssues(value) {
4
+ const issues = [];
5
+ const issue = (path, message) => issues.push({ path, message });
6
+ function section(value, path, keys) {
7
+ if (value === undefined) {
8
+ return {};
9
+ }
10
+ if (!object(value)) {
11
+ issue(path, "must be an object");
12
+ return {};
13
+ }
14
+ for (const key of Object.keys(value)) {
15
+ if (!keys.includes(key)) {
16
+ issue([...path, key], "is not a known setting");
17
+ }
18
+ }
19
+ return value;
20
+ }
21
+ function number(value, path, min, max, integer = false) {
22
+ if (value !== undefined &&
23
+ (typeof value !== "number" ||
24
+ !Number.isFinite(value) ||
25
+ value < min ||
26
+ value > max ||
27
+ (integer && !Number.isInteger(value)))) {
28
+ issue(path, `must be ${integer ? "an integer" : "a number"} between ${min} and ${max}`);
29
+ }
30
+ }
31
+ function bool(value, path) {
32
+ if (value !== undefined && typeof value !== "boolean") {
33
+ issue(path, "must be a boolean");
34
+ }
35
+ }
36
+ function text(value, path, max = 8000) {
37
+ if (value !== undefined && (typeof value !== "string" || value.length > max)) {
38
+ issue(path, `must be text of at most ${max} characters`);
39
+ }
40
+ }
41
+ function smart(value, path, restricted = false) {
42
+ const s = section(value, path, [
43
+ "instructions",
44
+ "criteria",
45
+ "context",
46
+ "engagement",
47
+ "thresholds",
48
+ ...(restricted ? [] : ["model", "timeoutSeconds"]),
49
+ ]);
50
+ if (s.model !== undefined &&
51
+ (typeof s.model !== "string" || !/^[^\s/]+\/[^\s]+$/.test(s.model))) {
52
+ issue([...path, "model"], "must be a Gateway provider/model id");
53
+ }
54
+ number(s.timeoutSeconds, [...path, "timeoutSeconds"], 1, 30);
55
+ if (typeof s.instructions === "string") {
56
+ text(s.instructions, [...path, "instructions"]);
57
+ }
58
+ else if (s.instructions !== undefined) {
59
+ const instructions = section(s.instructions, [...path, "instructions"], ["append", "replace", "file"]);
60
+ if (Object.keys(instructions).length !== 1) {
61
+ issue([...path, "instructions"], "must specify exactly one of append, replace or file");
62
+ }
63
+ for (const [key, value] of Object.entries(instructions)) {
64
+ text(value, [...path, "instructions", key]);
65
+ }
66
+ }
67
+ const criteria = section(s.criteria, [...path, "criteria"], ["observe", "reply"]);
68
+ text(criteria.observe, [...path, "criteria", "observe"]);
69
+ text(criteria.reply, [...path, "criteria", "reply"]);
70
+ const instructionLength = typeof s.instructions === "string"
71
+ ? s.instructions.length
72
+ : object(s.instructions)
73
+ ? String(s.instructions.append ?? s.instructions.replace ?? "").length
74
+ : 0;
75
+ if (instructionLength +
76
+ String(criteria.observe ?? "").length +
77
+ String(criteria.reply ?? "").length >
78
+ 8000) {
79
+ issue(path, "instructions and criteria must fit 8000 characters");
80
+ }
81
+ const c = section(s.context, [...path, "context"], [
82
+ "messages",
83
+ "includeChatGuidance",
84
+ ...(restricted
85
+ ? []
86
+ : ["includeAgentDescription", "includeAgentInstructions", "includeParticipants"]),
87
+ ]);
88
+ number(c.messages, [...path, "context", "messages"], 5, 60, true);
89
+ for (const key of ["includeAgentDescription", "includeChatGuidance", "includeParticipants"]) {
90
+ bool(c[key], [...path, "context", key]);
91
+ }
92
+ if (object(c.includeAgentInstructions)) {
93
+ const a = section(c.includeAgentInstructions, [...path, "context", "includeAgentInstructions"], ["maxChars"]);
94
+ number(a.maxChars, [...path, "context", "includeAgentInstructions", "maxChars"], 1, 6000, true);
95
+ if (a.maxChars === undefined) {
96
+ issue([...path, "context", "includeAgentInstructions"], "maxChars is required");
97
+ }
98
+ }
99
+ else {
100
+ bool(c.includeAgentInstructions, [...path, "context", "includeAgentInstructions"]);
101
+ }
102
+ const e = section(s.engagement, [...path, "engagement"], [
103
+ "policy",
104
+ "followUpMinutes",
105
+ "conversationMinutes",
106
+ "openQuestionMinutes",
107
+ "addresseeGate",
108
+ "agentAliases",
109
+ "idleMinutes",
110
+ "humanExchangeMinutes",
111
+ "humanQuestionMinutes",
112
+ "inferredMaxMinutes",
113
+ "burst",
114
+ ]);
115
+ if (e.policy !== undefined &&
116
+ e.policy !== "legacy" &&
117
+ e.policy !== "engaged" &&
118
+ e.policy !== "conversation") {
119
+ issue([...path, "engagement", "policy"], "must be legacy, engaged or conversation");
120
+ }
121
+ if (e.agentAliases !== undefined &&
122
+ (!Array.isArray(e.agentAliases) ||
123
+ e.agentAliases.length > 20 ||
124
+ e.agentAliases.some((a) => typeof a !== "string" || a.length < 1 || a.length > 128))) {
125
+ issue([...path, "engagement", "agentAliases"], "must contain at most 20 names of 1..128 characters");
126
+ }
127
+ for (const key of [
128
+ "idleMinutes",
129
+ "humanExchangeMinutes",
130
+ "humanQuestionMinutes",
131
+ "inferredMaxMinutes",
132
+ ]) {
133
+ number(e[key], [...path, "engagement", key], 1, 180);
134
+ }
135
+ const burst = section(e.burst, [...path, "engagement", "burst"], ["quietSeconds", "maxSeconds", "gapSeconds"]);
136
+ for (const key of ["quietSeconds", "maxSeconds", "gapSeconds"]) {
137
+ number(burst[key], [...path, "engagement", "burst", key], 1, 60);
138
+ }
139
+ if (burst.quietSeconds !== undefined &&
140
+ burst.maxSeconds !== undefined &&
141
+ Number(burst.quietSeconds) > Number(burst.maxSeconds)) {
142
+ issue([...path, "engagement", "burst"], "quietSeconds must not exceed maxSeconds");
143
+ }
144
+ for (const key of ["followUpMinutes", "conversationMinutes"]) {
145
+ number(e[key], [...path, "engagement", key], 1, 180);
146
+ }
147
+ if (e.openQuestionMinutes !== "unlimited") {
148
+ number(e.openQuestionMinutes, [...path, "engagement", "openQuestionMinutes"], 0, 1440);
149
+ }
150
+ bool(e.addresseeGate, [...path, "engagement", "addresseeGate"]);
151
+ const t = section(s.thresholds, [...path, "thresholds"], [
152
+ "engaged",
153
+ "neutral",
154
+ "humanThread",
155
+ "continuation",
156
+ "inferredContinuation",
157
+ "contested",
158
+ "ambient",
159
+ "humanExchange",
160
+ "reply",
161
+ "defer",
162
+ ]);
163
+ for (const [key, value] of Object.entries(t)) {
164
+ number(value, [...path, "thresholds", key], key === "reply" ? 0.5 : 0, 1);
165
+ }
166
+ // The top level's policy defaults to legacy; a chat or shadow policy may inherit conversation.
167
+ if ((t.reply !== undefined || t.defer !== undefined) &&
168
+ (path.length === 1
169
+ ? e.policy !== "conversation"
170
+ : e.policy !== undefined && e.policy !== "conversation")) {
171
+ issue([...path, "thresholds"], "reply and defer apply only to engagement.policy conversation");
172
+ }
173
+ // A chat or shadow policy may inherit `reply`; the agent checks each chat after inheritance.
174
+ if (path.length === 1
175
+ ? Number(t.defer ?? t.reply ?? 0.5) > Number(t.reply ?? 0.5)
176
+ : t.defer !== undefined && t.reply !== undefined && Number(t.defer) > Number(t.reply)) {
177
+ issue([...path, "thresholds"], "must satisfy defer <= reply");
178
+ }
179
+ const defaults = e.policy === "conversation"
180
+ ? [0.5, 0.9, 0.95]
181
+ : e.policy === "engaged"
182
+ ? [0.5, 0.75, 0.9]
183
+ : [0.5, 0.5, 0.5];
184
+ if ((!restricted &&
185
+ (Number(t.engaged ?? defaults[0]) > Number(t.neutral ?? defaults[1]) ||
186
+ Number(t.neutral ?? defaults[1]) > Number(t.humanThread ?? defaults[2]))) ||
187
+ (restricted &&
188
+ ((t.engaged !== undefined &&
189
+ t.neutral !== undefined &&
190
+ Number(t.engaged) > Number(t.neutral)) ||
191
+ (t.neutral !== undefined &&
192
+ t.humanThread !== undefined &&
193
+ Number(t.neutral) > Number(t.humanThread))))) {
194
+ issue([...path, "thresholds"], "must satisfy engaged <= neutral <= humanThread");
195
+ }
196
+ }
197
+ function override(value, path, isChat) {
198
+ const v = section(value, path, isChat
199
+ ? ["mode", "smart", "participants"]
200
+ : ["mode", "smart", "participants", "chats", "observability"]);
201
+ if (v.mode !== undefined && v.mode !== "smart" && v.mode !== "mention") {
202
+ issue([...path, "mode"], "must be smart or mention");
203
+ }
204
+ smart(v.smart, [...path, "smart"], isChat);
205
+ if (v.participants !== undefined) {
206
+ if (!object(v.participants)) {
207
+ issue([...path, "participants"], "must be an object");
208
+ }
209
+ else {
210
+ for (const [id, participant] of Object.entries(v.participants)) {
211
+ const p = section(participant, [...path, "participants", id], ["aliases"]);
212
+ if (!Array.isArray(p.aliases) ||
213
+ p.aliases.length > 10 ||
214
+ p.aliases.some((a) => typeof a !== "string" || a.length < 1 || a.length > 32 || a.includes("@"))) {
215
+ issue([...path, "participants", id, "aliases"], "must contain at most 10 names of 1..32 characters without @");
216
+ }
217
+ }
218
+ }
219
+ }
220
+ if (!isChat) {
221
+ if (v.chats !== undefined) {
222
+ if (!object(v.chats)) {
223
+ issue([...path, "chats"], "must be an object");
224
+ }
225
+ else {
226
+ for (const [key, entry] of Object.entries(v.chats)) {
227
+ if (!/^[a-z][a-z0-9_-]{0,31}:[^/\s]+(?:\/[^\s]+)?$/.test(key)) {
228
+ issue([...path, "chats", key], "must be provider:externalId[/scope]");
229
+ }
230
+ override(entry, [...path, "chats", key], true);
231
+ }
232
+ }
233
+ }
234
+ const o = section(v.observability, [...path, "observability"], ["storeRouterPayload", "shadow"]);
235
+ bool(o.storeRouterPayload, [...path, "observability", "storeRouterPayload"]);
236
+ smart(o.shadow, [...path, "observability", "shadow"]);
237
+ }
238
+ }
239
+ override(value, [], false);
240
+ return issues;
241
+ }
242
+ /** Expand authored files before bundling. The caller owns the workspace-relative filesystem boundary. */
243
+ export function expandGroupFiles(input, read) {
244
+ if (groupPolicyIssues(input).length > 0) {
245
+ throw new Error("Group policy authoring is invalid.");
246
+ }
247
+ const smart = (value) => {
248
+ const instructions = value?.instructions;
249
+ if (typeof instructions !== "object" || instructions.file === undefined) {
250
+ return value;
251
+ }
252
+ const path = instructions.file;
253
+ if (!path ||
254
+ path.startsWith("/") ||
255
+ path.split(/[\\/]/).some((part) => part === "..") ||
256
+ path.includes("\0")) {
257
+ throw new Error("Group instruction files must stay within agent/.");
258
+ }
259
+ const text = read(path);
260
+ if (text.length > 8000) {
261
+ throw new Error("Group instruction files must fit 8000 characters.");
262
+ }
263
+ return { ...value, instructions: { replace: text } };
264
+ };
265
+ return {
266
+ ...input,
267
+ smart: smart(input.smart),
268
+ ...(input.chats === undefined
269
+ ? {}
270
+ : {
271
+ chats: Object.fromEntries(Object.entries(input.chats).map(([key, value]) => [
272
+ key,
273
+ { ...value, smart: smart(value.smart) },
274
+ ])),
275
+ }),
276
+ ...(input.observability === undefined
277
+ ? {}
278
+ : { observability: { ...input.observability, shadow: smart(input.observability.shadow) } }),
279
+ };
280
+ }
@@ -0,0 +1,109 @@
1
+ export { BlobValue, BlobUpload, uploads, BLOB_CONTENT_TYPES, MAX_BLOB_BYTES } from "./blob.js";
2
+ export { Files } from "./files.js";
3
+ export type { FileTarget, StageFile, OpenFile } from "./files.js";
4
+ export { warehouse, compatibleWarehouseColumn, warehouseColumnType, validateWarehouseSource, } from "./source.js";
5
+ export type { WarehouseSource } from "./source.js";
6
+ export { m } from "./metric.js";
7
+ export type { AggregateDeclarations, AggregateOptions, AlignmentGroup, Metric, MetricColumnCondition, MetricCondition, Metrics, MetricExpression, MetricOptions, ModelMetric, ModelMetricOptions, ModelMetrics, } from "./metric.js";
8
+ export { METRIC_CONDITION_OPERATORS } from "./metric-filters.js";
9
+ export type { MetricQueryValue, MetricConditionOperator } from "./metric-filters.js";
10
+ export * from "./legacy.js";
11
+ export { action, isAction } from "./action.js";
12
+ export { ActionConfirmation, ConfirmationFact } from "./confirmation.js";
13
+ export type { ConfirmContext } from "./confirmation.js";
14
+ export type { Action, ActionConfig, ActionConfigWithConnections, ActionContext, ActionIdentity, ActionEncodedInput, ActionHints, ActionInput, ActionResult, ActionWriteTarget, Actions, AnyAction, PrepareContext, PrepareError, } from "./action.js";
15
+ export { CONNECTION_ERROR_REASONS, CONNECTION_KEY, CONNECTION_METHODS, connection, ConnectionError, Connections, ConnectionTransport, isConnection, MAXIMUM_CONNECTION_BODY_BYTES, MAXIMUM_CONNECTION_RESPONSE_BYTES, } from "./connection.js";
16
+ export type { AnyConnectionHandle, Connection, ConnectionCall, ConnectionClient, ConnectionErrorReason, ConnectionHandle, ConnectionHeaders, ConnectionMethod, ConnectionOptions, ConnectionReply, ConnectionRequest, ConnectionRequestOptions, ConnectionResponse, ConnectionStreamReply, ConnectionStreamResponse, ConnectionsOf, ConnectionStub, StubRequest, StubResponse, } from "./connection.js";
17
+ export type { DiscoveryOptions, EntityPermissions, JsonSchemaObject, MemberOptions, OntologyConfig, ResolvedAction, ResolvedConnection, ResolvedEntity, ResolvedIndex, ResolvedProperty, ResolvedRelationship, } from "./analyze.js";
18
+ export { Diagnostic, DIAGNOSTIC_CODES, formatDiagnostics, InvalidOntology } from "./diagnostics.js";
19
+ export type { DiagnosticCode } from "./diagnostics.js";
20
+ export { entity, isEntity } from "./entity.js";
21
+ export type { ActionsBuilder, AnyEntity, ActionHandle, ActionInvoker, MetricQueryGroupKey, AnyStoredEntity, BatchCreateValues, BatchKey, BatchUpdateRecord, BatchUpdateValues, BatchUpsertValues, CreateValues, DraftEntity, Entity, EntityDefinition, EntityRecord, EntityWrites, FreshMetricQueryInput, FreshMetricQueryRow, IndexDefinition, IndexField, InvocableActions, NoActions, Properties, RecordRef, Relationships, SystemFields, UpdateValues, } from "./entity.js";
22
+ export { ActionRejected, BatchErrorDetails, Conflict, DeploymentInterrupted, DeploymentSwitching, LimitErrorDetails, NotFound, PermissionDenied, ScopeViolated, } from "./errors.js";
23
+ export type { ActionError } from "./errors.js";
24
+ export { browserAuthenticationCompatible } from "./manifest-compatibility.js";
25
+ export { ActionManifest, actionConnectionKeys, canonicalJson, ConnectionManifest, EntityManifest, EntityPermissionsManifest, decodeManifestDocument, encodeManifest, formatManifest, IndexManifest, isValueMatched, MANIFEST_VERSION, manifestHash, ModelMetricManifest, OntologyManifest, OntologyManifestWire, PropertyManifest, RelationshipManifest, RoleManifest, ActionTriggerManifest, ScopeManifest, CronTriggerManifest, isActionTrigger, isCronTrigger, isWebhookTrigger, OtherTriggerManifest, WebhookTriggerManifest, WorkflowManifest, WorkflowTriggerManifest, SelectOptionManifest, SignInManifest, signInPolicyOf, channelPolicyOf, } from "./manifest.js";
26
+ export { SYSTEM_PROPERTIES } from "./names.js";
27
+ export type { SystemProperty } from "./names.js";
28
+ export { isMe, isMeMarker, MAX_ME_HOPS, me, ME_KEY, MeMarker, mePathOf, meToWire, MeTypeId, } from "./me.js";
29
+ export type { MeReference } from "./me.js";
30
+ export { check, defineOntology } from "./ontology.js";
31
+ export { webhookDeliveryJsonSchema } from "./analyze.js";
32
+ export { webhookToken, webhookTokenMatches, WEBHOOK_TOKEN_CONTEXT } from "./webhook-token.js";
33
+ export type { Ontology } from "./ontology.js";
34
+ export { DEFAULT_MEMBER_PERMISSIONS, effectiveScope, generatedActionPermissions, grants, isAllowed, parsePermission, permissionsOf, principalScopes, READ_VERB, readScope, rolesGranting, scopesOf, USER_MEMBER_VERBS, WILDCARD, WILDCARD_ENTITY_VERBS, } from "./permissions.js";
35
+ export type { ParsedPermission, PermissionHolder, RolePermissions, ScopedPermission, ScopeFilter, ScopeValue, ScopeWhere, UserMemberVerb, } from "./permissions.js";
36
+ export { p, PROPERTY_TYPES, propertyDefinition } from "./property.js";
37
+ export type { AnyProperty, NumberOptions, Property, PropertyDefinition, PropertyOf, PropertyOptions, BlobOptions, ListOptions, PropertyType, ReferenceOptions, SelectOption, SelectOptionInput, TextOptions, } from "./property.js";
38
+ export { ON_DELETE, rel } from "./relationship.js";
39
+ export type { AnyRelationship, EntityTarget, LazyEntity, ManyOptions, ManyRelationship, OnDelete, OneOptions, OneRelationship, Phrase, } from "./relationship.js";
40
+ export { renderCatalog } from "./render.js";
41
+ export type { RenderOptions } from "./render.js";
42
+ export { member, role, roleEntries, rolePermissions } from "./role.js";
43
+ export type { Role, RoleOptions, RolePermission } from "./role.js";
44
+ export type { FeedbackOptions, ResolvedFeedback } from "./feedback-config.js";
45
+ export { after, changed, cron, cronNeverFires, cronProblem, isWorkflow, isWorkflowTrigger, MAX_ACTION_TRIGGERS, MAX_WORKFLOWS, nextCronTime, webhook, workflow, } from "./workflow.js";
46
+ export { MAX_WEBHOOK_BODY_BYTES, MAX_META_WEBHOOK_BODY_BYTES, MAX_WEBHOOK_HEADERS, MAX_WEBHOOKS, WEBHOOK_BASE_PATH, WEBHOOK_SIGNATURE_SCHEMES, webhookDelivery, webhookHeaderProblem, webhookPath, } from "./webhooks.js";
47
+ export type { WebhookDelivery, WebhookSignatureScheme } from "./webhooks.js";
48
+ export type { ActionEvent, ActionTrigger, AfterOptions, AnyActionHandle, AnyWorkflow, ChangedBounds, CronOptions, CronProblem, CronTrigger, TriggerFunction, TriggerRecord, WebhookOptions, WebhookSignature, WebhookVerification, WebhookTrigger, Workflow, WorkflowFunction, WorkflowOptions, WorkflowRunContext, WorkflowTrigger, } from "./workflow.js";
49
+ export { CHANNEL_PROVIDERS, DEFAULT_SIGN_IN_POLICY, SIGN_IN_METHODS, SIGN_IN_POLICIES, } from "./sign-in.js";
50
+ export type { ChannelProvider, SignInCheck, SignInMethod, SignInOptions, SignInPolicy, } from "./sign-in.js";
51
+ export type { EmailTemplate } from "./emails.js";
52
+ export { OntologyActions, OntologyReads, OntologyRuntime, OntologyWrites } from "./runtime.js";
53
+ export type { ActionRunOptions } from "./runtime.js";
54
+ export type { BatchOptions, BatchRecordResult, BatchResult, BatchReturning, BatchSummaryResult, CreateManyInput, FieldCondition, OntologyRuntimeService, FindOptions, FreshMetricQueryOptions, GetOptions, Principal, RecordWhere, StoredRecord, StoredValues, UpsertResult, UpdateManyInput, UpsertManyInput, } from "./runtime.js";
55
+ export { User } from "./user.js";
56
+ export type { UserHandle, UserMemberWrites } from "./user.js";
57
+ export { AgentChat } from "./agent-chat.js";
58
+ export { UserIdentity, USER_IDENTITY_ORIGINS } from "./user-identity.js";
59
+ export type { UserIdentityOrigin } from "./user-identity.js";
60
+ export { AppFeedback, AppFeedbackFile, APP_FEEDBACK_ENTITIES, APP_FEEDBACK_FILE_MAX_BYTES, } from "./app-feedback.js";
61
+ export { ChatDelivery, ChatPostInput, ChatPostResult } from "./chat.js";
62
+ export { DEFAULT_QUERY_LIMIT, entityQueryResultSchema, entityQuerySchema, entityQuerySchemas, entityRecordSchema, FILTER_OPERATORS, LIST_FILTER_OPERATORS, MANY_QUANTIFIERS, MAX_IN_VALUES, MAX_QUERY_LIMIT, OrderBy, Query, queryFields, queryJsonSchema, queryLinks, QueryResult, queryResultJsonSchema, queryResultSchema, SortDirection, WHERE_COMBINATORS, } from "./query.js";
63
+ export type { EntityQuerySchemas, FieldFilter, FilterOperator, JsonRecord, ListFilterOperator, ManyFilter, QueryField, QueryLink, StorageType, Where, } from "./query.js";
64
+ export { InvalidQuery, InvalidValues, MemberNotFound, PrincipalRejected, StoredRecordMismatch, UnknownAction, UnknownRole, ValidationIssue, UndeclaredWrite, WriteOutsideAction, } from "./runtime/errors.js";
65
+ export { generatedActionManifests, generatedActions, upsertActionName, } from "./runtime/generated-actions.js";
66
+ export type { GeneratedActionManifest, GeneratedActions } from "./runtime/generated-actions.js";
67
+ export { Change, Edit, EditKind, HistoryEntry } from "./runtime/history.js";
68
+ export { ActionOutcome, ActionValidation, findAction, PREPARE_TIMEOUT, resolveAction, runAction, } from "./runtime/pipeline.js";
69
+ export type { ActionRequest, AfterCommit, CommittedAction, FoundAction, } from "./runtime/pipeline.js";
70
+ export { API_KEY_ITERATIONS, API_KEY_PREFIX, checkSignIn, createApiKey, createServiceUser, findApiKey, generateApiKey, grantMemberRoles, hashApiKeySecret, listApiKeys, listMembers, countUsersWithoutEmailIdentity, countUsersWithoutSegmentStreamIdentity, MEMBER_HISTORY_ACTIONS, parseApiKey, principalsOntology, resolvePrincipalByApiKey, resolvePrincipalByIdentity, reconcileWorkflowUsers, resolveWorkflowUser, revokeApiKey, WORKFLOW_USER_PROVIDER, workflowSubject, revokeMemberRoles, setMemberActive, setMemberBlocked, revokeMemberSessions, setUserRoles, SIGN_IN_RECORD_INTERVAL_MS, updateMemberRoles, } from "./runtime/principals.js";
71
+ export type { ApiKeyParts, ApiKeySummary, CreatedApiKey, IdentityClaims, MemberKey, MemberRolesChange, MemberStatus, MemberSummary, PrincipalsManifest, } from "./runtime/principals.js";
72
+ export { backendLayer, postgresLayer, sqlServiceRuntime } from "./runtime/service-binding.js";
73
+ export { makeOntologyRuntime } from "./runtime/sql-runtime.js";
74
+ export type { SqlOntologyRuntime, WriteScope } from "./runtime/sql-runtime.js";
75
+ export { BASE_PATH, deriveApi } from "./service/api.js";
76
+ export type { DeriveApiOptions, OntologyApi } from "./service/api.js";
77
+ export { WorkloadExecution } from "./runtime/workload.js";
78
+ export { CurrentPrincipal } from "./service/authentication.js";
79
+ export { deployedConnections, LocalConnectionContextError, localConnections, OIDC_TOKEN_HEADER, parseLocalConnectionContext, readLocalConnectionContext, RUNTIME_CONTEXT_FD, } from "./service/connections.js";
80
+ export type { ConnectionAudit, ConnectionTransportFactory, LocalConnection, LocalConnectionContext, } from "./service/connections.js";
81
+ export { configFromEnv, ENVIRONMENT_VARIABLES, NEON_AUTH_ENVIRONMENT_VARIABLES, OntologyServiceConfigError, RUNTIME_IDENTITY_ENVIRONMENT_VARIABLES, } from "./service/config.js";
82
+ export type { ActionCommitted, AfterCommitHook, NeonAuthEnvironment, OntologyEnvironment, OntologyServiceConfig, } from "./service/config.js";
83
+ export type { Decide, DecisionRequest } from "./service/decisions.js";
84
+ export { IdentityInUse, NotInvited, OntologyBackend } from "./service/runtime-contract.js";
85
+ export type { AgentIdentity, AgentMember, AgentLimits, AgentLimitScope, ChannelSignInInput, AgentResolution, ResolveIdentityInput, AgentPairing, AgentStore, SeenChat, GeneratedActionsProvider, IdentityProvider, OAuthClient, OAuthClientAuthMethod, OAuthGrant, OAuthDevice, DevicePoll, OAuthRequest, OAuthStore, OAuthToken, OAuthTokenKind, OntologyServiceRuntime, RunActionInput, SignInIdentity, UsedOAuthToken, } from "./service/runtime-contract.js";
86
+ export { createOntologyService, ONTOLOGY_HASH_HEADER, REQUEST_ID_HEADER, } from "./service/service.js";
87
+ export { AGENT_PATH } from "./service/agent/server.js";
88
+ export { AGENT_TASK_PATH, AGENT_TASK_RESULT_PATH } from "./service/agent/tasks.js";
89
+ export { ACT_AS_HEADER, ACT_AS_PROVIDER_HEADER, AGENT_TASK_HEADER, } from "./service/runtime-identity.js";
90
+ export type { RuntimeIdentityConfig } from "./service/runtime-identity.js";
91
+ export { MCP_PATH, MCP_PROTOCOL_VERSIONS } from "./service/mcp/server.js";
92
+ export { MCP_TOOL_NAME_MAX_LENGTH, mcpToolName } from "./names.js";
93
+ export type { OntologyService } from "./service/service.js";
94
+ export { applyMigration, CatalogInvalid, CatalogMismatch, isNoopMigration, migrate, MIGRATION_REFUSAL_CODES, MIGRATION_STEP_CLASSIFICATIONS, MIGRATION_STEP_KINDS, MigrationFailed, MigrationPlan, MigrationRefusal, MigrationRefused, MigrationStep, OntologyStorage, planMigration, preparePreviewDatabase, readCatalog, readRetainedStorage, readRuntimeTables, readHistoryActivityIndexes, readStorageNames, RetainedEntity, RetainedStorage, } from "./migrate/index.js";
95
+ export { deploymentFromEnv, DeploymentAdmissionError, requireDeploymentCapability, } from "./deployment.js";
96
+ export type { DeploymentObservation, DeploymentCapabilities, DeploymentAdmissionCode, } from "./deployment.js";
97
+ export type { ApplyMigrationError, ApplyMigrationOptions, CatalogInput, MigrateInput, MigrationOptions, MigrationRefusalCode, MigrationResult, MigrationStepClassification, MigrationStepKind, PlanMigrationInput, StorageNames, } from "./migrate/index.js";
98
+ export type { BlobStorageBinding } from "./storage/provider.js";
99
+ export { runBlobStorageMaintenance } from "./storage/operator.js";
100
+ export { runNewUserHook } from "./runtime/new-user-hook.js";
101
+ export { sqlAgentStore, resolveChannelIdentity, resolveChannelSignIn } from "./runtime/agents.js";
102
+ export { DEFAULT_AGENT_LIMITS, PLATFORM_CHANNEL_LIMITS, clampChannelLimits, effectiveChannelLimits, } from "./runtime/agent-counters.js";
103
+ export type { ChannelAppProvider } from "./service/channel/provider.js";
104
+ export type { RuntimeSource, ActionRuntime } from "./runtime-source.js";
105
+ export { callbackIdentityToken, serveWorkflowCallback } from "./service/workflow-callback.js";
106
+ export { compiledWorkflowId, triggerPath, vercelWorkflowEngine, WorkflowStepFailed, } from "./service/workflows.js";
107
+ export type { WorkflowEngine, WorkflowPage, WorkflowRunRecord, WorkflowStepRecord, } from "./service/workflows.js";
108
+ export { validateBrowserSignIn } from "./sign-in.js";
109
+ export type { BrowserSignInOptions, BrowserSignInMethod } from "./sign-in.js";
package/dist/index.js ADDED
@@ -0,0 +1,70 @@
1
+ export { BlobValue, BlobUpload, uploads, BLOB_CONTENT_TYPES, MAX_BLOB_BYTES } from "./blob.js";
2
+ export { Files } from "./files.js";
3
+ export { warehouse, compatibleWarehouseColumn, warehouseColumnType, validateWarehouseSource, } from "./source.js";
4
+ export { m } from "./metric.js";
5
+ export { METRIC_CONDITION_OPERATORS } from "./metric-filters.js";
6
+ // The earlier names of metrics, deprecated, and the readers that accept them.
7
+ export * from "./legacy.js";
8
+ export { action, isAction } from "./action.js";
9
+ export { ActionConfirmation, ConfirmationFact } from "./confirmation.js";
10
+ export { CONNECTION_ERROR_REASONS, CONNECTION_KEY, CONNECTION_METHODS, connection, ConnectionError, Connections, ConnectionTransport, isConnection, MAXIMUM_CONNECTION_BODY_BYTES, MAXIMUM_CONNECTION_RESPONSE_BYTES, } from "./connection.js";
11
+ export { Diagnostic, DIAGNOSTIC_CODES, formatDiagnostics, InvalidOntology } from "./diagnostics.js";
12
+ export { entity, isEntity } from "./entity.js";
13
+ export { ActionRejected, BatchErrorDetails, Conflict, DeploymentInterrupted, DeploymentSwitching, LimitErrorDetails, NotFound, PermissionDenied, ScopeViolated, } from "./errors.js";
14
+ export { browserAuthenticationCompatible } from "./manifest-compatibility.js";
15
+ export { ActionManifest, actionConnectionKeys, canonicalJson, ConnectionManifest, EntityManifest, EntityPermissionsManifest, decodeManifestDocument, encodeManifest, formatManifest, IndexManifest, isValueMatched, MANIFEST_VERSION, manifestHash, ModelMetricManifest, OntologyManifest, OntologyManifestWire, PropertyManifest, RelationshipManifest, RoleManifest, ActionTriggerManifest, ScopeManifest, CronTriggerManifest, isActionTrigger, isCronTrigger, isWebhookTrigger, OtherTriggerManifest, WebhookTriggerManifest, WorkflowManifest, WorkflowTriggerManifest, SelectOptionManifest, SignInManifest, signInPolicyOf, channelPolicyOf, } from "./manifest.js";
16
+ export { SYSTEM_PROPERTIES } from "./names.js";
17
+ export { isMe, isMeMarker, MAX_ME_HOPS, me, ME_KEY, MeMarker, mePathOf, meToWire, MeTypeId, } from "./me.js";
18
+ export { check, defineOntology } from "./ontology.js";
19
+ export { webhookDeliveryJsonSchema } from "./analyze.js";
20
+ export { webhookToken, webhookTokenMatches, WEBHOOK_TOKEN_CONTEXT } from "./webhook-token.js";
21
+ export { DEFAULT_MEMBER_PERMISSIONS, effectiveScope, generatedActionPermissions, grants, isAllowed, parsePermission, permissionsOf, principalScopes, READ_VERB, readScope, rolesGranting, scopesOf, USER_MEMBER_VERBS, WILDCARD, WILDCARD_ENTITY_VERBS, } from "./permissions.js";
22
+ export { p, PROPERTY_TYPES, propertyDefinition } from "./property.js";
23
+ export { ON_DELETE, rel } from "./relationship.js";
24
+ export { renderCatalog } from "./render.js";
25
+ export { member, role, roleEntries, rolePermissions } from "./role.js";
26
+ export { after, changed, cron, cronNeverFires, cronProblem, isWorkflow, isWorkflowTrigger, MAX_ACTION_TRIGGERS, MAX_WORKFLOWS, nextCronTime, webhook, workflow, } from "./workflow.js";
27
+ export { MAX_WEBHOOK_BODY_BYTES, MAX_META_WEBHOOK_BODY_BYTES, MAX_WEBHOOK_HEADERS, MAX_WEBHOOKS, WEBHOOK_BASE_PATH, WEBHOOK_SIGNATURE_SCHEMES, webhookDelivery, webhookHeaderProblem, webhookPath, } from "./webhooks.js";
28
+ export { CHANNEL_PROVIDERS, DEFAULT_SIGN_IN_POLICY, SIGN_IN_METHODS, SIGN_IN_POLICIES, } from "./sign-in.js";
29
+ export { OntologyActions, OntologyReads, OntologyRuntime, OntologyWrites } from "./runtime.js";
30
+ export { User } from "./user.js";
31
+ export { AgentChat } from "./agent-chat.js";
32
+ export { UserIdentity, USER_IDENTITY_ORIGINS } from "./user-identity.js";
33
+ export { AppFeedback, AppFeedbackFile, APP_FEEDBACK_ENTITIES, APP_FEEDBACK_FILE_MAX_BYTES, } from "./app-feedback.js";
34
+ export { ChatDelivery, ChatPostInput, ChatPostResult } from "./chat.js";
35
+ // The query language of `find` and of the service's list, query and traversal routes.
36
+ export { DEFAULT_QUERY_LIMIT, entityQueryResultSchema, entityQuerySchema, entityQuerySchemas, entityRecordSchema, FILTER_OPERATORS, LIST_FILTER_OPERATORS, MANY_QUANTIFIERS, MAX_IN_VALUES, MAX_QUERY_LIMIT, OrderBy, Query, queryFields, queryJsonSchema, queryLinks, QueryResult, queryResultJsonSchema, queryResultSchema, SortDirection, WHERE_COMBINATORS, } from "./query.js";
37
+ // The SQL runtime: data access, the action pipeline, generated actions, history and principals.
38
+ export { InvalidQuery, InvalidValues, MemberNotFound, PrincipalRejected, StoredRecordMismatch, UnknownAction, UnknownRole, ValidationIssue, UndeclaredWrite, WriteOutsideAction, } from "./runtime/errors.js";
39
+ export { generatedActionManifests, generatedActions, upsertActionName, } from "./runtime/generated-actions.js";
40
+ export { Change, Edit, EditKind, HistoryEntry } from "./runtime/history.js";
41
+ export { ActionOutcome, ActionValidation, findAction, PREPARE_TIMEOUT, resolveAction, runAction, } from "./runtime/pipeline.js";
42
+ export { API_KEY_ITERATIONS, API_KEY_PREFIX, checkSignIn, createApiKey, createServiceUser, findApiKey, generateApiKey, grantMemberRoles, hashApiKeySecret, listApiKeys, listMembers, countUsersWithoutEmailIdentity, countUsersWithoutSegmentStreamIdentity, MEMBER_HISTORY_ACTIONS, parseApiKey, principalsOntology, resolvePrincipalByApiKey, resolvePrincipalByIdentity, reconcileWorkflowUsers, resolveWorkflowUser, revokeApiKey, WORKFLOW_USER_PROVIDER, workflowSubject, revokeMemberRoles, setMemberActive, setMemberBlocked, revokeMemberSessions, setUserRoles, SIGN_IN_RECORD_INTERVAL_MS, updateMemberRoles, } from "./runtime/principals.js";
43
+ export { backendLayer, postgresLayer, sqlServiceRuntime } from "./runtime/service-binding.js";
44
+ export { makeOntologyRuntime } from "./runtime/sql-runtime.js";
45
+ // The HTTP service derived from the ontology.
46
+ export { BASE_PATH, deriveApi } from "./service/api.js";
47
+ export { WorkloadExecution } from "./runtime/workload.js";
48
+ export { CurrentPrincipal } from "./service/authentication.js";
49
+ export { deployedConnections, LocalConnectionContextError, localConnections, OIDC_TOKEN_HEADER, parseLocalConnectionContext, readLocalConnectionContext, RUNTIME_CONTEXT_FD, } from "./service/connections.js";
50
+ export { configFromEnv, ENVIRONMENT_VARIABLES, NEON_AUTH_ENVIRONMENT_VARIABLES, OntologyServiceConfigError, RUNTIME_IDENTITY_ENVIRONMENT_VARIABLES, } from "./service/config.js";
51
+ export { IdentityInUse, NotInvited, OntologyBackend } from "./service/runtime-contract.js";
52
+ export { createOntologyService, ONTOLOGY_HASH_HEADER, REQUEST_ID_HEADER, } from "./service/service.js";
53
+ // The app's own agent: pairing channel accounts with members, and acting as them, or as a
54
+ // workflow's user in the tasks workflows hand it.
55
+ export { AGENT_PATH } from "./service/agent/server.js";
56
+ export { AGENT_TASK_PATH, AGENT_TASK_RESULT_PATH } from "./service/agent/tasks.js";
57
+ export { ACT_AS_HEADER, ACT_AS_PROVIDER_HEADER, AGENT_TASK_HEADER, } from "./service/runtime-identity.js";
58
+ // The MCP server the service serves beside the HTTP API.
59
+ export { MCP_PATH, MCP_PROTOCOL_VERSIONS } from "./service/mcp/server.js";
60
+ export { MCP_TOOL_NAME_MAX_LENGTH, mcpToolName } from "./names.js";
61
+ // Migrations: the planner, the applier and the physical mapping they share with the runtime.
62
+ export { applyMigration, CatalogInvalid, CatalogMismatch, isNoopMigration, migrate, MIGRATION_REFUSAL_CODES, MIGRATION_STEP_CLASSIFICATIONS, MIGRATION_STEP_KINDS, MigrationFailed, MigrationPlan, MigrationRefusal, MigrationRefused, MigrationStep, OntologyStorage, planMigration, preparePreviewDatabase, readCatalog, readRetainedStorage, readRuntimeTables, readHistoryActivityIndexes, readStorageNames, RetainedEntity, RetainedStorage, } from "./migrate/index.js";
63
+ export { deploymentFromEnv, DeploymentAdmissionError, requireDeploymentCapability, } from "./deployment.js";
64
+ export { runBlobStorageMaintenance } from "./storage/operator.js";
65
+ export { runNewUserHook } from "./runtime/new-user-hook.js";
66
+ export { sqlAgentStore, resolveChannelIdentity, resolveChannelSignIn } from "./runtime/agents.js";
67
+ export { DEFAULT_AGENT_LIMITS, PLATFORM_CHANNEL_LIMITS, clampChannelLimits, effectiveChannelLimits, } from "./runtime/agent-counters.js";
68
+ export { callbackIdentityToken, serveWorkflowCallback } from "./service/workflow-callback.js";
69
+ export { compiledWorkflowId, triggerPath, vercelWorkflowEngine, WorkflowStepFailed, } from "./service/workflows.js";
70
+ export { validateBrowserSignIn } from "./sign-in.js";