@alneas/eaos-server 0.0.0-stage → 0.2.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 (360) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/LICENSE +21 -0
  3. package/README.ja.md +49 -0
  4. package/README.md +46 -2
  5. package/dist/agentic/agent-jobs.d.ts +333 -0
  6. package/dist/agentic/agent-jobs.js +15 -0
  7. package/dist/agentic/agent-jobs.js.map +1 -0
  8. package/dist/agentic/agent-node.d.ts +40 -0
  9. package/dist/agentic/agent-node.js +7 -0
  10. package/dist/agentic/agent-node.js.map +1 -0
  11. package/dist/agentic/agent-runner.d.ts +33 -0
  12. package/dist/agentic/agent-runner.js +7 -0
  13. package/dist/agentic/agent-runner.js.map +1 -0
  14. package/dist/agentic/ai-broker.d.ts +169 -0
  15. package/dist/agentic/ai-broker.js +8 -0
  16. package/dist/agentic/ai-broker.js.map +1 -0
  17. package/dist/agentic/atomic-checkpointer.d.ts +137 -0
  18. package/dist/agentic/atomic-checkpointer.js +9 -0
  19. package/dist/agentic/atomic-checkpointer.js.map +1 -0
  20. package/dist/agentic/autonomous-worker.d.ts +122 -0
  21. package/dist/agentic/autonomous-worker.js +10 -0
  22. package/dist/agentic/autonomous-worker.js.map +1 -0
  23. package/dist/agentic/event-bridge.d.ts +350 -0
  24. package/dist/agentic/event-bridge.js +9 -0
  25. package/dist/agentic/event-bridge.js.map +1 -0
  26. package/dist/agentic/executor.d.ts +91 -0
  27. package/dist/agentic/executor.js +12 -0
  28. package/dist/agentic/executor.js.map +1 -0
  29. package/dist/agentic/graph-projection.d.ts +119 -0
  30. package/dist/agentic/graph-projection.js +7 -0
  31. package/dist/agentic/graph-projection.js.map +1 -0
  32. package/dist/agentic/graph.d.ts +524 -0
  33. package/dist/agentic/graph.js +7 -0
  34. package/dist/agentic/graph.js.map +1 -0
  35. package/dist/agentic/index.d.ts +28 -0
  36. package/dist/agentic/index.js +87 -0
  37. package/dist/agentic/index.js.map +1 -0
  38. package/dist/agentic/local-runner.d.ts +106 -0
  39. package/dist/agentic/local-runner.js +7 -0
  40. package/dist/agentic/local-runner.js.map +1 -0
  41. package/dist/agentic/remote-executor.d.ts +67 -0
  42. package/dist/agentic/remote-executor.js +8 -0
  43. package/dist/agentic/remote-executor.js.map +1 -0
  44. package/dist/agentic/types.d.ts +157 -0
  45. package/dist/agentic/types.js +7 -0
  46. package/dist/agentic/types.js.map +1 -0
  47. package/dist/agentic/workflow-catalog.d.ts +152 -0
  48. package/dist/agentic/workflow-catalog.js +7 -0
  49. package/dist/agentic/workflow-catalog.js.map +1 -0
  50. package/dist/agentic/workflow-compiler.d.ts +44 -0
  51. package/dist/agentic/workflow-compiler.js +8 -0
  52. package/dist/agentic/workflow-compiler.js.map +1 -0
  53. package/dist/agentic/workflow-coordinator.d.ts +170 -0
  54. package/dist/agentic/workflow-coordinator.js +8 -0
  55. package/dist/agentic/workflow-coordinator.js.map +1 -0
  56. package/dist/agentic/workflow-manager.d.ts +91 -0
  57. package/dist/agentic/workflow-manager.js +7 -0
  58. package/dist/agentic/workflow-manager.js.map +1 -0
  59. package/dist/agentic/workflow-registry.d.ts +334 -0
  60. package/dist/agentic/workflow-registry.js +7 -0
  61. package/dist/agentic/workflow-registry.js.map +1 -0
  62. package/dist/artifacts-CteHmCMI.d.ts +614 -0
  63. package/dist/auth-hooks/api-key.d.ts +75 -0
  64. package/dist/auth-hooks/api-key.js +7 -0
  65. package/dist/auth-hooks/api-key.js.map +1 -0
  66. package/dist/auth-hooks/index.d.ts +80 -0
  67. package/dist/auth-hooks/index.js +28 -0
  68. package/dist/auth-hooks/index.js.map +1 -0
  69. package/dist/browser-auth/account-memberships.d.ts +213 -0
  70. package/dist/browser-auth/account-memberships.js +13 -0
  71. package/dist/browser-auth/account-memberships.js.map +1 -0
  72. package/dist/browser-auth/index.d.ts +8 -0
  73. package/dist/browser-auth/index.js +59 -0
  74. package/dist/browser-auth/index.js.map +1 -0
  75. package/dist/browser-auth/kratos-session.d.ts +37 -0
  76. package/dist/browser-auth/kratos-session.js +7 -0
  77. package/dist/browser-auth/kratos-session.js.map +1 -0
  78. package/dist/browser-auth/platform-session.d.ts +120 -0
  79. package/dist/browser-auth/platform-session.js +7 -0
  80. package/dist/browser-auth/platform-session.js.map +1 -0
  81. package/dist/browser-auth/public-memberships.d.ts +22 -0
  82. package/dist/browser-auth/public-memberships.js +7 -0
  83. package/dist/browser-auth/public-memberships.js.map +1 -0
  84. package/dist/cache/index.d.ts +181 -0
  85. package/dist/cache/index.js +197 -0
  86. package/dist/cache/index.js.map +1 -0
  87. package/dist/chunk-32746UQZ.js +131 -0
  88. package/dist/chunk-32746UQZ.js.map +1 -0
  89. package/dist/chunk-3NLSWP2Y.js +223 -0
  90. package/dist/chunk-3NLSWP2Y.js.map +1 -0
  91. package/dist/chunk-3P4XTTQH.js +346 -0
  92. package/dist/chunk-3P4XTTQH.js.map +1 -0
  93. package/dist/chunk-3VITSHN3.js +15 -0
  94. package/dist/chunk-3VITSHN3.js.map +1 -0
  95. package/dist/chunk-46UWPEW2.js +226 -0
  96. package/dist/chunk-46UWPEW2.js.map +1 -0
  97. package/dist/chunk-4BARRLJR.js +180 -0
  98. package/dist/chunk-4BARRLJR.js.map +1 -0
  99. package/dist/chunk-4VORUFKR.js +45 -0
  100. package/dist/chunk-4VORUFKR.js.map +1 -0
  101. package/dist/chunk-55D4ERWO.js +1 -0
  102. package/dist/chunk-55D4ERWO.js.map +1 -0
  103. package/dist/chunk-5TBBZIND.js +18 -0
  104. package/dist/chunk-5TBBZIND.js.map +1 -0
  105. package/dist/chunk-5WOZWPZA.js +211 -0
  106. package/dist/chunk-5WOZWPZA.js.map +1 -0
  107. package/dist/chunk-6CBVZ6CT.js +168 -0
  108. package/dist/chunk-6CBVZ6CT.js.map +1 -0
  109. package/dist/chunk-6XZXYNJR.js +74 -0
  110. package/dist/chunk-6XZXYNJR.js.map +1 -0
  111. package/dist/chunk-753HWDSC.js +222 -0
  112. package/dist/chunk-753HWDSC.js.map +1 -0
  113. package/dist/chunk-7AHSS7SO.js +81 -0
  114. package/dist/chunk-7AHSS7SO.js.map +1 -0
  115. package/dist/chunk-7FTJN4SA.js +1 -0
  116. package/dist/chunk-7FTJN4SA.js.map +1 -0
  117. package/dist/chunk-AVDMLTPF.js +24 -0
  118. package/dist/chunk-AVDMLTPF.js.map +1 -0
  119. package/dist/chunk-BKAHUEIT.js +95 -0
  120. package/dist/chunk-BKAHUEIT.js.map +1 -0
  121. package/dist/chunk-CJ7OFEF7.js +134 -0
  122. package/dist/chunk-CJ7OFEF7.js.map +1 -0
  123. package/dist/chunk-EJKWDZIU.js +111 -0
  124. package/dist/chunk-EJKWDZIU.js.map +1 -0
  125. package/dist/chunk-F2J6IQ6I.js +247 -0
  126. package/dist/chunk-F2J6IQ6I.js.map +1 -0
  127. package/dist/chunk-F3O7CELI.js +23 -0
  128. package/dist/chunk-F3O7CELI.js.map +1 -0
  129. package/dist/chunk-F4IITPGX.js +221 -0
  130. package/dist/chunk-F4IITPGX.js.map +1 -0
  131. package/dist/chunk-FD6VC2NA.js +66 -0
  132. package/dist/chunk-FD6VC2NA.js.map +1 -0
  133. package/dist/chunk-FRRRWAHO.js +14 -0
  134. package/dist/chunk-FRRRWAHO.js.map +1 -0
  135. package/dist/chunk-HCKAGLLB.js +17 -0
  136. package/dist/chunk-HCKAGLLB.js.map +1 -0
  137. package/dist/chunk-HVC7FG6B.js +191 -0
  138. package/dist/chunk-HVC7FG6B.js.map +1 -0
  139. package/dist/chunk-HXFVOR7Z.js +496 -0
  140. package/dist/chunk-HXFVOR7Z.js.map +1 -0
  141. package/dist/chunk-IJWYS2PF.js +122 -0
  142. package/dist/chunk-IJWYS2PF.js.map +1 -0
  143. package/dist/chunk-INCHXAFK.js +1395 -0
  144. package/dist/chunk-INCHXAFK.js.map +1 -0
  145. package/dist/chunk-JT6BRGQM.js +1 -0
  146. package/dist/chunk-JT6BRGQM.js.map +1 -0
  147. package/dist/chunk-L6PMAEMB.js +115 -0
  148. package/dist/chunk-L6PMAEMB.js.map +1 -0
  149. package/dist/chunk-LOUGW6MU.js +126 -0
  150. package/dist/chunk-LOUGW6MU.js.map +1 -0
  151. package/dist/chunk-LYPZPE53.js +129 -0
  152. package/dist/chunk-LYPZPE53.js.map +1 -0
  153. package/dist/chunk-NNCCN7JP.js +186 -0
  154. package/dist/chunk-NNCCN7JP.js.map +1 -0
  155. package/dist/chunk-PBC3MZUL.js +212 -0
  156. package/dist/chunk-PBC3MZUL.js.map +1 -0
  157. package/dist/chunk-R4ADP2DC.js +20 -0
  158. package/dist/chunk-R4ADP2DC.js.map +1 -0
  159. package/dist/chunk-RHN4Y6VS.js +44 -0
  160. package/dist/chunk-RHN4Y6VS.js.map +1 -0
  161. package/dist/chunk-SDJNYPYK.js +770 -0
  162. package/dist/chunk-SDJNYPYK.js.map +1 -0
  163. package/dist/chunk-UGNTCOVR.js +28 -0
  164. package/dist/chunk-UGNTCOVR.js.map +1 -0
  165. package/dist/chunk-VC2PCK2S.js +31 -0
  166. package/dist/chunk-VC2PCK2S.js.map +1 -0
  167. package/dist/chunk-VF5YDZJC.js +305 -0
  168. package/dist/chunk-VF5YDZJC.js.map +1 -0
  169. package/dist/chunk-VISRDVTK.js +675 -0
  170. package/dist/chunk-VISRDVTK.js.map +1 -0
  171. package/dist/chunk-W6O3LVBY.js +102 -0
  172. package/dist/chunk-W6O3LVBY.js.map +1 -0
  173. package/dist/chunk-WFEAKJLR.js +47 -0
  174. package/dist/chunk-WFEAKJLR.js.map +1 -0
  175. package/dist/chunk-XIEY2OF4.js +67 -0
  176. package/dist/chunk-XIEY2OF4.js.map +1 -0
  177. package/dist/chunk-XITLHDG3.js +37 -0
  178. package/dist/chunk-XITLHDG3.js.map +1 -0
  179. package/dist/chunk-XMWPYZWZ.js +61 -0
  180. package/dist/chunk-XMWPYZWZ.js.map +1 -0
  181. package/dist/chunk-XUP6CNOM.js +34 -0
  182. package/dist/chunk-XUP6CNOM.js.map +1 -0
  183. package/dist/chunk-YABTQZDJ.js +25 -0
  184. package/dist/chunk-YABTQZDJ.js.map +1 -0
  185. package/dist/chunk-YMHVRBUU.js +199 -0
  186. package/dist/chunk-YMHVRBUU.js.map +1 -0
  187. package/dist/chunk-YMJ7BRKU.js +510 -0
  188. package/dist/chunk-YMJ7BRKU.js.map +1 -0
  189. package/dist/chunk-ZC3XWU7B.js +28 -0
  190. package/dist/chunk-ZC3XWU7B.js.map +1 -0
  191. package/dist/chunk-ZHMTD5KV.js +90 -0
  192. package/dist/chunk-ZHMTD5KV.js.map +1 -0
  193. package/dist/chunk-ZWZDLOE7.js +160 -0
  194. package/dist/chunk-ZWZDLOE7.js.map +1 -0
  195. package/dist/db-package/db/local-first-sqlite-adapter.d.ts +432 -0
  196. package/dist/db-package/db/local-first-sqlite-adapter.js +7 -0
  197. package/dist/db-package/db/local-first-sqlite-adapter.js.map +1 -0
  198. package/dist/db-package/index.d.ts +7 -0
  199. package/dist/db-package/index.js +16 -0
  200. package/dist/db-package/index.js.map +1 -0
  201. package/dist/db-package/migration/aggregator.d.ts +86 -0
  202. package/dist/db-package/migration/aggregator.js +7 -0
  203. package/dist/db-package/migration/aggregator.js.map +1 -0
  204. package/dist/db-package/migration/index.d.ts +3 -0
  205. package/dist/db-package/migration/index.js +8 -0
  206. package/dist/db-package/migration/index.js.map +1 -0
  207. package/dist/engine.d.ts +205 -0
  208. package/dist/engine.js +20 -0
  209. package/dist/engine.js.map +1 -0
  210. package/dist/entitlements/index.d.ts +313 -0
  211. package/dist/entitlements/index.js +23 -0
  212. package/dist/entitlements/index.js.map +1 -0
  213. package/dist/execution/chat.d.ts +7 -0
  214. package/dist/execution/chat.js +7 -0
  215. package/dist/execution/chat.js.map +1 -0
  216. package/dist/execution/index.d.ts +342 -0
  217. package/dist/execution/index.js +66 -0
  218. package/dist/execution/index.js.map +1 -0
  219. package/dist/execution/tool-agent.d.ts +7 -0
  220. package/dist/execution/tool-agent.js +8 -0
  221. package/dist/execution/tool-agent.js.map +1 -0
  222. package/dist/extensions/index.d.ts +172 -0
  223. package/dist/extensions/index.js +95 -0
  224. package/dist/extensions/index.js.map +1 -0
  225. package/dist/health/index.d.ts +35 -0
  226. package/dist/health/index.js +7 -0
  227. package/dist/health/index.js.map +1 -0
  228. package/dist/index.d.ts +43 -0
  229. package/dist/index.js +161 -0
  230. package/dist/index.js.map +1 -0
  231. package/dist/lifecycle/index.d.ts +133 -0
  232. package/dist/lifecycle/index.js +13 -0
  233. package/dist/lifecycle/index.js.map +1 -0
  234. package/dist/lifecycle-engine/backend-migration.d.ts +2 -0
  235. package/dist/lifecycle-engine/backend-migration.js +11 -0
  236. package/dist/lifecycle-engine/backend-migration.js.map +1 -0
  237. package/dist/lifecycle-engine/baseline.d.ts +2 -0
  238. package/dist/lifecycle-engine/baseline.js +9 -0
  239. package/dist/lifecycle-engine/baseline.js.map +1 -0
  240. package/dist/lifecycle-engine/index.d.ts +1497 -0
  241. package/dist/lifecycle-engine/index.js +41 -0
  242. package/dist/lifecycle-engine/index.js.map +1 -0
  243. package/dist/lifecycle-engine/platform/artifacts.d.ts +4 -0
  244. package/dist/lifecycle-engine/platform/artifacts.js +7 -0
  245. package/dist/lifecycle-engine/platform/artifacts.js.map +1 -0
  246. package/dist/lifecycle-engine/platform/control-plane.d.ts +12 -0
  247. package/dist/lifecycle-engine/platform/control-plane.js +2 -0
  248. package/dist/lifecycle-engine/platform/control-plane.js.map +1 -0
  249. package/dist/lifecycle-engine/platform/database-router.d.ts +118 -0
  250. package/dist/lifecycle-engine/platform/database-router.js +7 -0
  251. package/dist/lifecycle-engine/platform/database-router.js.map +1 -0
  252. package/dist/lifecycle-engine/platform/deployment-placements.d.ts +464 -0
  253. package/dist/lifecycle-engine/platform/deployment-placements.js +16 -0
  254. package/dist/lifecycle-engine/platform/deployment-placements.js.map +1 -0
  255. package/dist/lifecycle-engine/platform/deployment.d.ts +4 -0
  256. package/dist/lifecycle-engine/platform/deployment.js +17 -0
  257. package/dist/lifecycle-engine/platform/deployment.js.map +1 -0
  258. package/dist/lifecycle-engine/platform/index.d.ts +737 -0
  259. package/dist/lifecycle-engine/platform/index.js +60 -0
  260. package/dist/lifecycle-engine/platform/index.js.map +1 -0
  261. package/dist/lifecycle-engine/platform/runtime.d.ts +80 -0
  262. package/dist/lifecycle-engine/platform/runtime.js +11 -0
  263. package/dist/lifecycle-engine/platform/runtime.js.map +1 -0
  264. package/dist/lifecycle-engine/platform/site-publication.d.ts +102 -0
  265. package/dist/lifecycle-engine/platform/site-publication.js +7 -0
  266. package/dist/lifecycle-engine/platform/site-publication.js.map +1 -0
  267. package/dist/lifecycle-engine/platform/user-directory.d.ts +139 -0
  268. package/dist/lifecycle-engine/platform/user-directory.js +13 -0
  269. package/dist/lifecycle-engine/platform/user-directory.js.map +1 -0
  270. package/dist/mcp.d.ts +92 -0
  271. package/dist/mcp.js +10 -0
  272. package/dist/mcp.js.map +1 -0
  273. package/dist/middleware/auth.d.ts +118 -0
  274. package/dist/middleware/auth.js +7 -0
  275. package/dist/middleware/auth.js.map +1 -0
  276. package/dist/middleware/error-handler.d.ts +35 -0
  277. package/dist/middleware/error-handler.js +7 -0
  278. package/dist/middleware/error-handler.js.map +1 -0
  279. package/dist/middleware/module-guard.d.ts +33 -0
  280. package/dist/middleware/module-guard.js +7 -0
  281. package/dist/middleware/module-guard.js.map +1 -0
  282. package/dist/platform-admin/index.d.ts +37 -0
  283. package/dist/platform-admin/index.js +11 -0
  284. package/dist/platform-admin/index.js.map +1 -0
  285. package/dist/platform-admin/store.d.ts +346 -0
  286. package/dist/platform-admin/store.js +7 -0
  287. package/dist/platform-admin/store.js.map +1 -0
  288. package/dist/plugin-data/annotations.d.ts +6 -0
  289. package/dist/plugin-data/annotations.js +12 -0
  290. package/dist/plugin-data/annotations.js.map +1 -0
  291. package/dist/plugin-data/atomic-context.d.ts +41 -0
  292. package/dist/plugin-data/atomic-context.js +9 -0
  293. package/dist/plugin-data/atomic-context.js.map +1 -0
  294. package/dist/plugin-data/atomic.d.ts +6 -0
  295. package/dist/plugin-data/atomic.js +26 -0
  296. package/dist/plugin-data/atomic.js.map +1 -0
  297. package/dist/plugin-data/audit.d.ts +6 -0
  298. package/dist/plugin-data/audit.js +12 -0
  299. package/dist/plugin-data/audit.js.map +1 -0
  300. package/dist/plugin-data/commands.d.ts +6 -0
  301. package/dist/plugin-data/commands.js +8 -0
  302. package/dist/plugin-data/commands.js.map +1 -0
  303. package/dist/plugin-data/composite.d.ts +6 -0
  304. package/dist/plugin-data/composite.js +8 -0
  305. package/dist/plugin-data/composite.js.map +1 -0
  306. package/dist/plugin-data/delivery.d.ts +6 -0
  307. package/dist/plugin-data/delivery.js +16 -0
  308. package/dist/plugin-data/delivery.js.map +1 -0
  309. package/dist/plugin-data/index.d.ts +2798 -0
  310. package/dist/plugin-data/index.js +102 -0
  311. package/dist/plugin-data/index.js.map +1 -0
  312. package/dist/plugin-data/json-documents.d.ts +6 -0
  313. package/dist/plugin-data/json-documents.js +16 -0
  314. package/dist/plugin-data/json-documents.js.map +1 -0
  315. package/dist/plugin-data/outbox.d.ts +6 -0
  316. package/dist/plugin-data/outbox.js +16 -0
  317. package/dist/plugin-data/outbox.js.map +1 -0
  318. package/dist/plugin-data/scoped-records.d.ts +6 -0
  319. package/dist/plugin-data/scoped-records.js +10 -0
  320. package/dist/plugin-data/scoped-records.js.map +1 -0
  321. package/dist/plugin-sdk.d.ts +41 -0
  322. package/dist/plugin-sdk.js +10 -0
  323. package/dist/plugin-sdk.js.map +1 -0
  324. package/dist/sql-lifecycle/index.d.ts +138 -0
  325. package/dist/sql-lifecycle/index.js +167 -0
  326. package/dist/sql-lifecycle/index.js.map +1 -0
  327. package/dist/storage/index.d.ts +2 -0
  328. package/dist/storage/index.js +13 -0
  329. package/dist/storage/index.js.map +1 -0
  330. package/dist/storage/s3-compatible.d.ts +139 -0
  331. package/dist/storage/s3-compatible.js +11 -0
  332. package/dist/storage/s3-compatible.js.map +1 -0
  333. package/dist/tenant.d.ts +108 -0
  334. package/dist/tenant.js +9 -0
  335. package/dist/tenant.js.map +1 -0
  336. package/dist/workspace-context.d.ts +119 -0
  337. package/dist/workspace-context.js +9 -0
  338. package/dist/workspace-context.js.map +1 -0
  339. package/docs/api.md +30560 -0
  340. package/docs/db/README.md +49 -0
  341. package/docs/db/docs/api.md +1613 -0
  342. package/docs/db/docs/guide.md +47 -0
  343. package/docs/entitlements.md +60 -0
  344. package/docs/guide.md +92 -0
  345. package/docs/index.md +57 -0
  346. package/docs/ja/db/README.md +46 -0
  347. package/docs/ja/db/docs/guide.md +53 -0
  348. package/docs/ja/guide.md +46 -0
  349. package/docs/ja/lifecycle/README.md +46 -0
  350. package/docs/ja/lifecycle/docs/guide.md +45 -0
  351. package/docs/ja/storage/README.md +46 -0
  352. package/docs/ja/storage/docs/guide.md +43 -0
  353. package/docs/lifecycle/README.md +49 -0
  354. package/docs/lifecycle/docs/api.md +3770 -0
  355. package/docs/lifecycle/docs/baseline.md +50 -0
  356. package/docs/lifecycle/docs/guide.md +47 -0
  357. package/docs/storage/README.md +49 -0
  358. package/docs/storage/docs/api.md +470 -0
  359. package/docs/storage/docs/guide.md +47 -0
  360. package/package.json +354 -4
@@ -0,0 +1,737 @@
1
+ import { BackendTarget, BackendMigrationPlan, LifecyclePlatformMigrationRecord, BackendMigrationVerificationReport, BackendMigrationCutover } from '../index.js';
2
+ export { Installation, LifecycleState, LifecycleStore, MigrationRecord } from '../index.js';
3
+ export { GatekeeperAuditEntry } from '@alneas/eaos-core/security/gatekeeper';
4
+ export { D as DeploymentComponent, d as DeploymentInventory, h as DeploymentPlugin, e as DeploymentReceipt, c as DeploymentResult, b as DeploymentTarget, i as DeploymentTask, a as DeploymentTaskStatus, j as PlatformContribution, P as PlatformPackage, g as deploymentActions, f as deploymentComponentKinds, s as summarizeDeployment, v as validateDeploymentPlugins, k as validateDeploymentReceipt, l as validateDeploymentTarget, m as validatePlatformPackages } from '../../artifacts-CteHmCMI.js';
5
+ export { DeploymentDestination, DeploymentExecution, DeploymentPlacements, deploymentExecutionTarget, deploymentPlacementHash, resolveDeploymentPlacements, summarizePlacedDeployment, validateDeploymentPlacements } from './deployment-placements.js';
6
+ export { PlatformRuntimeConfig, platformDatabaseTargets, resolvePlatformDatabaseTarget, validatePlatformRuntime } from './runtime.js';
7
+ export { TenantDatabaseRouter } from './database-router.js';
8
+ export { AccountMembership, AccountMemberships, DirectoryPerson, PersonKind, initialPersonName, parseAccountMemberships, personKinds, selectAccountTenant } from './user-directory.js';
9
+ export { SitePublicationMode, SitePublicationPolicy, parseSitePublicationPolicy } from './site-publication.js';
10
+ import '@alneas/eaos-core/contracts/data-contracts';
11
+ import '@alneas/eaos-core/plugin-sdk';
12
+ import '@alneas/eaos-core/db/adapter';
13
+
14
+ /**
15
+ * Platform tenant identity and admission metadata independent of company/person business schemas.
16
+ *
17
+ *
18
+ * Platform contracts are independent of a consumer's employee/company schema.
19
+ * @see PluginLifecycle for canonical integration usage.
20
+ */
21
+ interface PlatformTenant {
22
+ /**
23
+ * Concrete platform tenant identifier.
24
+ */
25
+ id: string;
26
+ /**
27
+ * Whether tenant admission is enabled.
28
+ */
29
+ active: boolean;
30
+ /**
31
+ * Host-configured tenant lookup domains; domain mapping alone never proves membership.
32
+ */
33
+ domains: readonly string[];
34
+ }
35
+ /**
36
+ * Host tenant lookup and current authenticated membership checks.
37
+ *
38
+ * @see PluginLifecycle for canonical integration usage.
39
+ */
40
+ interface TenantDirectory {
41
+ /**
42
+ * Find a tenant by exact ID; resolve null when unavailable.
43
+ * @param id - Concrete tenant ID whose platform record is requested.
44
+ * @returns The matching platform tenant, or null when unavailable.
45
+ * @throws Host adapter or callback failures reject the returned Promise; side effects may already be partially complete.
46
+
47
+ * @example
48
+ * ```typescript
49
+ * import type { TenantDirectory } from '@alneas/eaos-server/platform';
50
+ * export async function findTenant(directory: TenantDirectory, verifiedTenantId: string) {
51
+ * const tenant = await directory.find(verifiedTenantId);
52
+ * return tenant?.active === true ? tenant : null;
53
+ * }
54
+ * ```
55
+ */
56
+ find(id: string): Promise<PlatformTenant | null>;
57
+ /**
58
+ * Find a tenant by verified host/domain mapping; null when unmapped; never infer user membership.
59
+ *
60
+ * A domain mapping does not prove user membership.
61
+ * @param domain - Verified lookup domain; mapping alone never proves membership.
62
+ * @returns The mapped tenant, or null; membership must be checked separately.
63
+ * @throws Host adapter or callback failures reject the returned Promise; side effects may already be partially complete.
64
+
65
+ * @example
66
+ * ```typescript
67
+ * import type { TenantDirectory } from '@alneas/eaos-server/platform';
68
+ * export async function routeTenant(directory: TenantDirectory, trustedHostname: string) {
69
+ * // Routing hints still require independent authenticated membership checks.
70
+ * return directory.findByDomain(trustedHostname);
71
+ * }
72
+ * ```
73
+ */
74
+ findByDomain(domain: string): Promise<PlatformTenant | null>;
75
+ /**
76
+ * Check the current authenticated user's membership in the specified tenant.
77
+ * @param tenantId - Verified concrete tenant ID whose current state or permission is requested.
78
+ * @param userId - Authenticated user ID checked against live host membership.
79
+ * @returns True only when current host membership permits this tenant.
80
+ * @throws Host adapter or callback failures reject the returned Promise; side effects may already be partially complete.
81
+
82
+ * @example
83
+ * ```typescript
84
+ * import type { TenantDirectory } from '@alneas/eaos-server/platform';
85
+ * export async function admitted(directory: TenantDirectory, tenantId: string, userId: string) {
86
+ * return directory.isMember(tenantId, userId);
87
+ * }
88
+ * ```
89
+ */
90
+ isMember(tenantId: string, userId: string): Promise<boolean>;
91
+ }
92
+
93
+ /**
94
+ * Durable acknowledgement contract for verified-context audit events.
95
+ *
96
+ * Implementations must acknowledge durable storage; tenant/actor come from verified runtime context.
97
+ * @typeParam T - Immutable verified-context event payload appended by the host.
98
+ *
99
+ * @see PluginLifecycle for canonical integration usage.
100
+ */
101
+ interface AuditSink<T> {
102
+ /**
103
+ * Persist the immutable event and resolve only when durable; reject when evidence cannot be recorded.
104
+ * @param event - Immutable event with tenant/actor derived from verified runtime context; exclude secrets.
105
+ * @returns Resolves without a value only after durable audit acknowledgement.
106
+ * @throws Host adapter or callback failures reject the returned Promise; side effects may already be partially complete.
107
+
108
+ * @example
109
+ * ```typescript
110
+ * import type { AuditSink } from '@alneas/eaos-server/platform';
111
+ * export async function audit(sink: AuditSink<{ action: string; tenantId: string; actorId: string }>, tenantId: string, actorId: string) {
112
+ * await sink.append({ action: "example.reviewed", tenantId, actorId });
113
+ * }
114
+ * ```
115
+ */
116
+ append(event: Readonly<T>): Promise<void>;
117
+ }
118
+
119
+ /**
120
+ * Tenant record managed by the control plane; account membership stays host-owned.
121
+ *
122
+ *
123
+ * A tenant record managed by the platform control plane. Membership remains host-owned.
124
+ * @see PluginLifecycle for canonical integration usage.
125
+ */
126
+ interface PlatformTenantRecord extends PlatformTenant {
127
+ /**
128
+ * Public tenant display name.
129
+ */
130
+ name: string;
131
+ /**
132
+ * Creation timestamp.
133
+ */
134
+ createdAt: string;
135
+ /**
136
+ * Latest metadata modification timestamp.
137
+ */
138
+ updatedAt: string;
139
+ }
140
+ /**
141
+ * Requested tenant registration bound to an already configured backend.
142
+ *
143
+ * @see PluginLifecycle for canonical integration usage.
144
+ */
145
+ interface PlatformTenantCreateInput {
146
+ /**
147
+ * Concrete tenant identifier to create.
148
+ */
149
+ id: string;
150
+ /**
151
+ * Tenant display name.
152
+ */
153
+ name: string;
154
+ /**
155
+ * Requested domain lookup mappings; no membership is implied.
156
+ */
157
+ domains: readonly string[];
158
+ /**
159
+ * Existing opaque backend ID to assign; does not trigger provisioning.
160
+ */
161
+ backendId: string;
162
+ }
163
+ /**
164
+ * Partial tenant metadata change; omitted properties retain their current values.
165
+ *
166
+ * @see PluginLifecycle for canonical integration usage.
167
+ */
168
+ interface PlatformTenantPatch {
169
+ /**
170
+ * Optional replacement display name.
171
+ */
172
+ name?: string;
173
+ /**
174
+ * Optional admission enable/disable flag.
175
+ */
176
+ active?: boolean;
177
+ /**
178
+ * Optional complete replacement domain mapping list.
179
+ */
180
+ domains?: readonly string[];
181
+ }
182
+ /**
183
+ * Existing opaque backend target plus nonsecret host metadata.
184
+ *
185
+ *
186
+ * Backend IDs and database IDs are opaque host references, never DSNs or credentials.
187
+ * @see PluginLifecycle for canonical integration usage.
188
+ */
189
+ interface PlatformBackendRecord extends BackendTarget {
190
+ /**
191
+ * Optional display caption.
192
+ */
193
+ label?: string;
194
+ /**
195
+ * Optional provider name; never a DSN/credential.
196
+ */
197
+ provider?: string;
198
+ /**
199
+ * Optional host-reported capability names.
200
+ */
201
+ capabilities?: readonly string[];
202
+ }
203
+ /**
204
+ * Current tenant routing assignment and its recorded revision.
205
+ *
206
+ * @see PluginLifecycle for canonical integration usage.
207
+ */
208
+ interface TenantBackendPlacement {
209
+ /**
210
+ * Concrete tenant whose traffic is routed.
211
+ */
212
+ tenantId: string;
213
+ /**
214
+ * Configured target and its nonsecret metadata.
215
+ */
216
+ backend: PlatformBackendRecord;
217
+ /**
218
+ * Nonnegative routing revision tracking cutover.
219
+ */
220
+ routingRevision: number;
221
+ /**
222
+ * Routing-change timestamp.
223
+ */
224
+ changedAt: string;
225
+ }
226
+ /**
227
+ * Explicit platform administrative permissions checked independently from tenant roles.
228
+ *
229
+ * @see PluginLifecycle for canonical integration usage.
230
+ */
231
+ type PlatformAdminAction = 'tenant:list' | 'tenant:create' | 'tenant:update' | 'backend:list' | 'placement:read' | 'placement:plan' | 'placement:cutover' | 'placement:rollback' | 'placement:reconcile';
232
+ /**
233
+ * Explicit operator recovery action for an uncertain or failed migration execution.
234
+ *
235
+ * @see PluginLifecycle for canonical integration usage.
236
+ */
237
+ type PlatformMigrationReconcileAction = 'retry' | 'mark-failed' | 'mark-reconciling' | 'commit-verified';
238
+ /**
239
+ * Host-verified platform operator identity; tenant membership roles alone cannot grant platform administration.
240
+ *
241
+ * @see PluginLifecycle for canonical integration usage.
242
+ */
243
+ interface PlatformAdminPrincipal {
244
+ /**
245
+ * Authenticated platform actor identity.
246
+ */
247
+ userId: string;
248
+ /**
249
+ * Explicit trusted platform-administrator claim.
250
+ */
251
+ isPlatformAdmin: boolean;
252
+ /**
253
+ * Optional verified platform role metadata used by host authorization.
254
+ */
255
+ roles?: readonly string[];
256
+ }
257
+ /**
258
+ * Metadata-only platform administration outcome bound to verified actor and affected scope.
259
+ *
260
+ * @see PluginLifecycle for canonical integration usage.
261
+ */
262
+ interface PlatformAdminAuditEvent {
263
+ /**
264
+ * Requested platform administrative permission.
265
+ */
266
+ action: PlatformAdminAction;
267
+ /**
268
+ * Verified operator identity.
269
+ */
270
+ actorId: string;
271
+ /**
272
+ * Optional affected concrete tenant.
273
+ */
274
+ tenantId?: string;
275
+ /**
276
+ * Optional existing source backend reference.
277
+ */
278
+ sourceBackendId?: string;
279
+ /**
280
+ * Optional reviewed target backend reference.
281
+ */
282
+ targetBackendId?: string;
283
+ /**
284
+ * Optional backend migration identity.
285
+ */
286
+ migrationId?: string;
287
+ /**
288
+ * Allowed/denied/failed result reported by the host.
289
+ */
290
+ outcome: 'allowed' | 'denied' | 'failed';
291
+ /**
292
+ * Audit occurrence timestamp.
293
+ */
294
+ occurredAt: string;
295
+ }
296
+ /**
297
+ * Host persistence for tenant catalog, verified migration evidence and atomic routing/activation changes.
298
+ *
299
+ *
300
+ * Host persistence for the platform control plane. The framework never opens an
301
+ * ADB connection, stores credentials, or runs Pulumi from these callbacks.
302
+ * @see PluginLifecycle for canonical integration usage.
303
+ */
304
+ interface PlatformControlStore {
305
+ /**
306
+ * List current platform tenant records without granting membership.
307
+ * @returns Current platform tenant records, possibly empty.
308
+ * @throws Host adapter or callback failures reject the returned Promise; side effects may already be partially complete.
309
+
310
+ * @example
311
+ * ```typescript
312
+ * import type { PlatformControlStore } from '@alneas/eaos-server/platform';
313
+ * export async function reviewedOperation(store: PlatformControlStore) {
314
+ * // The host authenticates the operator and reviews any mutation inputs first.
315
+ * return store.listTenants();
316
+ * }
317
+ * ```
318
+ */
319
+ listTenants(): Promise<readonly PlatformTenantRecord[]>;
320
+ /**
321
+ * Persist tenant metadata and initial configured backend assignment.
322
+ * @param input - Reviewed operation inputs; preserve the verified tenant/migration/execution identity described by this contract.
323
+ * @returns The newly persisted platform tenant record.
324
+ * @throws Host adapter or callback failures reject the returned Promise; side effects may already be partially complete.
325
+
326
+ * @example
327
+ * ```typescript
328
+ * import type { PlatformControlStore } from '@alneas/eaos-server/platform';
329
+ * export async function reviewedOperation(store: PlatformControlStore, input: Parameters<PlatformControlStore["createTenant"]>[0]) {
330
+ * // The host authenticates the operator and reviews any mutation inputs first.
331
+ * return store.createTenant(input);
332
+ * }
333
+ * ```
334
+ */
335
+ createTenant(input: PlatformTenantCreateInput): Promise<PlatformTenantRecord>;
336
+ /**
337
+ * Update only supplied metadata fields for the specified tenant.
338
+ * @param tenantId - Verified concrete tenant ID whose current state or permission is requested.
339
+ * @param patch - Partial tenant metadata update; omitted fields retain their values.
340
+ * @returns The updated tenant record.
341
+ * @throws Host adapter or callback failures reject the returned Promise; side effects may already be partially complete.
342
+
343
+ * @example
344
+ * ```typescript
345
+ * import type { PlatformControlStore } from '@alneas/eaos-server/platform';
346
+ * export async function reviewedOperation(store: PlatformControlStore, tenantId: string, patch: Parameters<PlatformControlStore["updateTenant"]>[1]) {
347
+ * // The host authenticates the operator and reviews any mutation inputs first.
348
+ * return store.updateTenant(tenantId, patch);
349
+ * }
350
+ * ```
351
+ */
352
+ updateTenant(tenantId: string, patch: PlatformTenantPatch): Promise<PlatformTenantRecord>;
353
+ /**
354
+ * Register an already-provisioned opaque backend; never provision a database here.
355
+ *
356
+ * Register only an already-provisioned opaque backend; provisioning remains host-owned.
357
+ * @param backend - Already-provisioned opaque backend declaration; never a connection string or credentials.
358
+ * @returns The persisted existing backend registration.
359
+ * @throws Host adapter or callback failures reject the returned Promise; side effects may already be partially complete.
360
+
361
+ * @example
362
+ * ```typescript
363
+ * import type { PlatformControlStore } from '@alneas/eaos-server/platform';
364
+ * export async function reviewedOperation(store: PlatformControlStore, backend: Parameters<PlatformControlStore["registerBackend"]>[0]) {
365
+ * // The host authenticates the operator and reviews any mutation inputs first.
366
+ * return store.registerBackend(backend);
367
+ * }
368
+ * ```
369
+ */
370
+ registerBackend(backend: PlatformBackendRecord): Promise<PlatformBackendRecord>;
371
+ /**
372
+ * List registered nonsecret backend targets.
373
+ * @returns Configured opaque backend records, possibly empty.
374
+ * @throws Host adapter or callback failures reject the returned Promise; side effects may already be partially complete.
375
+
376
+ * @example
377
+ * ```typescript
378
+ * import type { PlatformControlStore } from '@alneas/eaos-server/platform';
379
+ * export async function reviewedOperation(store: PlatformControlStore) {
380
+ * // The host authenticates the operator and reviews any mutation inputs first.
381
+ * return store.listBackends();
382
+ * }
383
+ * ```
384
+ */
385
+ listBackends(): Promise<readonly PlatformBackendRecord[]>;
386
+ /**
387
+ * Resolve an existing backend by ID, or null.
388
+ * @param backendId - Existing opaque backend identity to resolve.
389
+ * @returns The existing backend, or null when absent.
390
+ * @throws Host adapter or callback failures reject the returned Promise; side effects may already be partially complete.
391
+
392
+ * @example
393
+ * ```typescript
394
+ * import type { PlatformControlStore } from '@alneas/eaos-server/platform';
395
+ * export async function reviewedOperation(store: PlatformControlStore, backendId: string) {
396
+ * // The host authenticates the operator and reviews any mutation inputs first.
397
+ * return store.getBackend(backendId);
398
+ * }
399
+ * ```
400
+ */
401
+ getBackend(backendId: string): Promise<PlatformBackendRecord | null>;
402
+ /**
403
+ * Read current tenant routing assignment, or null.
404
+ * @param tenantId - Verified concrete tenant ID whose current state or permission is requested.
405
+ * @returns Current tenant routing placement, or null when absent.
406
+ * @throws Host adapter or callback failures reject the returned Promise; side effects may already be partially complete.
407
+
408
+ * @example
409
+ * ```typescript
410
+ * import type { PlatformControlStore } from '@alneas/eaos-server/platform';
411
+ * export async function reviewedOperation(store: PlatformControlStore, tenantId: string) {
412
+ * // The host authenticates the operator and reviews any mutation inputs first.
413
+ * return store.getTenantPlacement(tenantId);
414
+ * }
415
+ * ```
416
+ */
417
+ getTenantPlacement(tenantId: string): Promise<TenantBackendPlacement | null>;
418
+ /**
419
+ * Durably persist the exact reviewed migration plan; no copy/cutover is executed.
420
+ * @param plan - Reviewed unmodified backend migration plan; host must preserve quiescence and source data.
421
+ * @returns Resolves without a value after the reviewed plan is durably stored.
422
+ * @throws Host adapter or callback failures reject the returned Promise; side effects may already be partially complete.
423
+
424
+ * @example
425
+ * ```typescript
426
+ * import type { PlatformControlStore } from '@alneas/eaos-server/platform';
427
+ * export async function reviewedOperation(store: PlatformControlStore, plan: Parameters<PlatformControlStore["saveMigrationPlan"]>[0]) {
428
+ * // The host authenticates the operator and reviews any mutation inputs first.
429
+ * await store.saveMigrationPlan(plan);
430
+ * }
431
+ * ```
432
+ */
433
+ saveMigrationPlan(plan: BackendMigrationPlan): Promise<void>;
434
+ /**
435
+ * Read a reviewed plan by migration ID, or null.
436
+ * @param migrationId - Stable reviewed backend migration identity.
437
+ * @returns The saved reviewed migration plan, or null when absent.
438
+ * @throws Host adapter or callback failures reject the returned Promise; side effects may already be partially complete.
439
+
440
+ * @example
441
+ * ```typescript
442
+ * import type { PlatformControlStore } from '@alneas/eaos-server/platform';
443
+ * export async function reviewedOperation(store: PlatformControlStore, migrationId: string) {
444
+ * // The host authenticates the operator and reviews any mutation inputs first.
445
+ * return store.getMigrationPlan(migrationId);
446
+ * }
447
+ * ```
448
+ */
449
+ getMigrationPlan(migrationId: string): Promise<BackendMigrationPlan | null>;
450
+ /**
451
+ * Read current migration progress/evidence, or null.
452
+ * @param migrationId - Stable reviewed backend migration identity.
453
+ * @returns The current progress/evidence record, or null when absent.
454
+ * @throws Host adapter or callback failures reject the returned Promise; side effects may already be partially complete.
455
+
456
+ * @example
457
+ * ```typescript
458
+ * import type { PlatformControlStore } from '@alneas/eaos-server/platform';
459
+ * export async function reviewedOperation(store: PlatformControlStore, migrationId: string) {
460
+ * // The host authenticates the operator and reviews any mutation inputs first.
461
+ * return store.getMigrationStatus(migrationId);
462
+ * }
463
+ * ```
464
+ */
465
+ getMigrationStatus(migrationId: string): Promise<LifecyclePlatformMigrationRecord | null>;
466
+ /**
467
+ * Claim execution for a tenant migration with a unique execution ID before host effects begin.
468
+ * @param input - Reviewed operation inputs; preserve the verified tenant/migration/execution identity described by this contract.
469
+ * @returns The claimed running migration record.
470
+ * @throws Host adapter or callback failures reject the returned Promise; side effects may already be partially complete.
471
+
472
+ * @example
473
+ * ```typescript
474
+ * import type { PlatformControlStore } from '@alneas/eaos-server/platform';
475
+ * export async function reviewedOperation(store: PlatformControlStore, input: Parameters<PlatformControlStore["beginMigrationExecution"]>[0]) {
476
+ * // The host authenticates the operator and reviews any mutation inputs first.
477
+ * return store.beginMigrationExecution(input);
478
+ * }
479
+ * ```
480
+ */
481
+ beginMigrationExecution(input: {
482
+ /**
483
+ * Verified concrete tenant whose reviewed migration or routing placement is being changed.
484
+ */
485
+ tenantId: string;
486
+ /**
487
+ * Stable identity of the saved reviewed migration plan whose execution/progress is being changed.
488
+ */
489
+ migrationId: string;
490
+ /**
491
+ * Unique host execution claim; preserve it when recording results so obsolete or competing workers cannot claim the transition.
492
+ */
493
+ executionId: string;
494
+ }): Promise<LifecyclePlatformMigrationRecord>;
495
+ /**
496
+ * Persist verified copy/cutover evidence for the claimed execution before routing commit.
497
+ * @param input - Reviewed operation inputs; preserve the verified tenant/migration/execution identity described by this contract.
498
+ * @returns The migration record containing persisted verification and cutover evidence.
499
+ * @throws Host adapter or callback failures reject the returned Promise; side effects may already be partially complete.
500
+
501
+ * @example
502
+ * ```typescript
503
+ * import type { PlatformControlStore } from '@alneas/eaos-server/platform';
504
+ * export async function reviewedOperation(store: PlatformControlStore, input: Parameters<PlatformControlStore["recordMigrationVerification"]>[0]) {
505
+ * // The host authenticates the operator and reviews any mutation inputs first.
506
+ * return store.recordMigrationVerification(input);
507
+ * }
508
+ * ```
509
+ */
510
+ recordMigrationVerification(input: {
511
+ /**
512
+ * Verified concrete tenant whose reviewed migration or routing placement is being changed.
513
+ */
514
+ tenantId: string;
515
+ /**
516
+ * Exact reviewed backend migration plan whose source, target, scope and digest must match the saved control-plane plan.
517
+ */
518
+ plan: BackendMigrationPlan;
519
+ /**
520
+ * Unique host execution claim; preserve it when recording results so obsolete or competing workers cannot claim the transition.
521
+ */
522
+ executionId: string;
523
+ /**
524
+ * Host-produced complete copy verification matching the plan and claimed execution; persistence does not independently measure the data.
525
+ */
526
+ verification: BackendMigrationVerificationReport;
527
+ /**
528
+ * Matching source-retaining host routing receipt; commit placement only after current verification is accepted.
529
+ */
530
+ cutover: BackendMigrationCutover;
531
+ }): Promise<LifecyclePlatformMigrationRecord>;
532
+ /**
533
+ * Record failed or uncertain/reconciling outcome without claiming rollback of host effects.
534
+ * @param input - Reviewed operation inputs; preserve the verified tenant/migration/execution identity described by this contract.
535
+ * @returns The recorded failed/reconciling migration state.
536
+ * @throws Host adapter or callback failures reject the returned Promise; side effects may already be partially complete.
537
+
538
+ * @example
539
+ * ```typescript
540
+ * import type { PlatformControlStore } from '@alneas/eaos-server/platform';
541
+ * export async function reviewedOperation(store: PlatformControlStore, input: Parameters<PlatformControlStore["markMigrationFailure"]>[0]) {
542
+ * // The host authenticates the operator and reviews any mutation inputs first.
543
+ * return store.markMigrationFailure(input);
544
+ * }
545
+ * ```
546
+ */
547
+ markMigrationFailure(input: {
548
+ /**
549
+ * Stable identity of the saved reviewed migration plan whose execution/progress is being changed.
550
+ */
551
+ migrationId: string;
552
+ /**
553
+ * Unique host execution claim; preserve it when recording results so obsolete or competing workers cannot claim the transition.
554
+ */
555
+ executionId?: string;
556
+ /**
557
+ * Explicit failed or reconciling classification; use reconciling when external copy/routing outcomes are uncertain.
558
+ */
559
+ status: 'failed' | 'reconciling';
560
+ /**
561
+ * Nonsecret failure description retained for operator diagnosis; exclude credentials and business payloads.
562
+ */
563
+ message: string;
564
+ }): Promise<LifecyclePlatformMigrationRecord>;
565
+ /**
566
+ * Apply an explicit documented operator recovery action with a retained note.
567
+ * @param input - Reviewed operation inputs; preserve the verified tenant/migration/execution identity described by this contract.
568
+ * @returns The resulting migration record after the explicit recovery action.
569
+ * @throws Host adapter or callback failures reject the returned Promise; side effects may already be partially complete.
570
+
571
+ * @example
572
+ * ```typescript
573
+ * import type { PlatformControlStore } from '@alneas/eaos-server/platform';
574
+ * export async function reviewedOperation(store: PlatformControlStore, input: Parameters<PlatformControlStore["reconcileMigration"]>[0]) {
575
+ * // The host authenticates the operator and reviews any mutation inputs first.
576
+ * return store.reconcileMigration(input);
577
+ * }
578
+ * ```
579
+ */
580
+ reconcileMigration(input: {
581
+ /**
582
+ * Stable identity of the saved reviewed migration plan whose execution/progress is being changed.
583
+ */
584
+ migrationId: string;
585
+ /**
586
+ * Explicit reviewed recovery action for this migration; never infer successful cutover from a timeout.
587
+ */
588
+ action: PlatformMigrationReconcileAction;
589
+ /**
590
+ * Retained operator explanation/evidence for the selected reconciliation action.
591
+ */
592
+ note: string;
593
+ }): Promise<LifecyclePlatformMigrationRecord>;
594
+ /**
595
+ * Create a reviewed reverse placement plan referencing the retained original source; no copy/cutover executes.
596
+ * @param input - Reviewed operation inputs; preserve the verified tenant/migration/execution identity described by this contract.
597
+ * @returns A reviewed source-retaining reverse migration plan; no backend effects run.
598
+ * @throws Host adapter or callback failures reject the returned Promise; side effects may already be partially complete.
599
+
600
+ * @example
601
+ * ```typescript
602
+ * import type { PlatformControlStore } from '@alneas/eaos-server/platform';
603
+ * export async function reviewedOperation(store: PlatformControlStore, input: Parameters<PlatformControlStore["createRollbackPlan"]>[0]) {
604
+ * // The host authenticates the operator and reviews any mutation inputs first.
605
+ * return store.createRollbackPlan(input);
606
+ * }
607
+ * ```
608
+ */
609
+ createRollbackPlan(input: {
610
+ /**
611
+ * Verified concrete tenant whose reviewed migration or routing placement is being changed.
612
+ */
613
+ tenantId: string;
614
+ /**
615
+ * Stable identity of the saved reviewed migration plan whose execution/progress is being changed.
616
+ */
617
+ migrationId: string;
618
+ /**
619
+ * Reviewed operator reason for creating a reverse migration to the retained source.
620
+ */
621
+ reason: string;
622
+ /**
623
+ * Parseable timestamp of the reviewed rollback-plan request.
624
+ */
625
+ requestedAt: string;
626
+ }): Promise<BackendMigrationPlan>;
627
+ /**
628
+ * Atomically commit verified plan, routing assignment and lifecycle activation switch.
629
+ *
630
+ * Atomically commits the verified plan, routing placement and lifecycle activation switch.
631
+ * @param input - Reviewed operation inputs; preserve the verified tenant/migration/execution identity described by this contract.
632
+ * @returns The atomically committed tenant routing placement.
633
+ * @throws Host adapter or callback failures reject the returned Promise; side effects may already be partially complete.
634
+
635
+ * @example
636
+ * ```typescript
637
+ * import type { PlatformControlStore } from '@alneas/eaos-server/platform';
638
+ * export async function reviewedOperation(store: PlatformControlStore, input: Parameters<PlatformControlStore["recordTenantPlacement"]>[0]) {
639
+ * // The host authenticates the operator and reviews any mutation inputs first.
640
+ * return store.recordTenantPlacement(input);
641
+ * }
642
+ * ```
643
+ */
644
+ recordTenantPlacement(input: {
645
+ /**
646
+ * Verified concrete tenant whose reviewed migration or routing placement is being changed.
647
+ */
648
+ tenantId: string;
649
+ /**
650
+ * Exact reviewed backend migration plan whose source, target, scope and digest must match the saved control-plane plan.
651
+ */
652
+ plan: BackendMigrationPlan;
653
+ /**
654
+ * Matching source-retaining host routing receipt; commit placement only after current verification is accepted.
655
+ */
656
+ cutover: BackendMigrationCutover;
657
+ }): Promise<TenantBackendPlacement>;
658
+ }
659
+ /**
660
+ * Host adapter performing prepare/copy/verify/cutover/retain-source phases against real resources.
661
+ *
662
+ *
663
+ * The host performs the five migration phases against its own adapters and credentials.
664
+ * @see PluginLifecycle for canonical integration usage.
665
+ */
666
+ interface PlatformPlacementExecutor {
667
+ /**
668
+ * Execute the reviewed plan with all-instance quiescence and return matching verification/cutover receipts; uncertain outcomes must be reconciled rather than blindly retried.
669
+ * @param plan - Reviewed unmodified backend migration plan; host must preserve quiescence and source data.
670
+ * @returns Matching verification and cutover receipts from the host execution.
671
+ * @throws Host adapter or callback failures reject the returned Promise; side effects may already be partially complete.
672
+
673
+ * @example
674
+ * ```typescript
675
+ * import type { PlatformPlacementExecutor } from '@alneas/eaos-server/platform';
676
+ * export async function executeReviewed(executor: PlatformPlacementExecutor, plan: Parameters<PlatformPlacementExecutor["execute"]>[0]) {
677
+ * // This host port performs real copy/verification/routing effects.
678
+ * const evidence = await executor.execute(plan);
679
+ * return { verification: evidence.verification, cutover: evidence.cutover };
680
+ * }
681
+ * ```
682
+ */
683
+ execute(plan: BackendMigrationPlan): Promise<{
684
+ /**
685
+ * Host-reported complete copy verification for the exact reviewed plan.
686
+ */
687
+ verification: BackendMigrationVerificationReport;
688
+ /**
689
+ * Routing receipt retaining source data for recovery.
690
+ */
691
+ cutover: BackendMigrationCutover;
692
+ }>;
693
+ }
694
+ /**
695
+ * Host authentication and live action/tenant authorization for platform administration.
696
+ *
697
+ * @see PluginLifecycle for canonical integration usage.
698
+ */
699
+ interface PlatformAdminAuthorization {
700
+ /**
701
+ * Resolve verified current operator identity from the request, or null when unauthenticated.
702
+ * @param request - Current authenticated HTTP request; resolve identity through trusted host session verification.
703
+ * @returns The verified platform operator, or null when unauthenticated.
704
+ * @throws Host adapter or callback failures reject the returned Promise; side effects may already be partially complete.
705
+
706
+ * @example
707
+ * ```typescript
708
+ * import type { PlatformAdminAuthorization } from '@alneas/eaos-server/platform';
709
+ * export async function authenticate(port: PlatformAdminAuthorization, request: Request) {
710
+ * const principal = await port.resolvePrincipal(request);
711
+ * return principal?.isPlatformAdmin === true ? principal : null;
712
+ * }
713
+ * ```
714
+ */
715
+ resolvePrincipal(request: Request): Promise<PlatformAdminPrincipal | null>;
716
+ /**
717
+ * Check current platform administrator permission for an action and optional concrete tenant; false denies access.
718
+ * @param principal - Verified current platform operator identity.
719
+ * @param action - Specific platform administrative permission to check against live policy.
720
+ * @param tenantId - Verified concrete tenant ID whose current state or permission is requested.
721
+ * @returns True only when live platform action/scope policy permits access.
722
+ * @throws Host adapter or callback failures reject the returned Promise; side effects may already be partially complete.
723
+
724
+ * @example
725
+ * ```typescript
726
+ * import type { PlatformAdminAuthorization } from '@alneas/eaos-server/platform';
727
+ * export async function canList(port: PlatformAdminAuthorization, request: Request) {
728
+ * const principal = await port.resolvePrincipal(request);
729
+ * return principal?.isPlatformAdmin === true && await port.authorize(principal, "tenant:list");
730
+ * }
731
+ * ```
732
+ */
733
+ authorize(principal: PlatformAdminPrincipal, action: PlatformAdminAction, tenantId?: string): Promise<boolean>;
734
+ }
735
+
736
+ export { BackendTarget };
737
+ export type { AuditSink, PlatformAdminAction, PlatformAdminAuditEvent, PlatformAdminAuthorization, PlatformAdminPrincipal, PlatformBackendRecord, PlatformControlStore, PlatformMigrationReconcileAction, PlatformPlacementExecutor, PlatformTenant, PlatformTenantCreateInput, PlatformTenantPatch, PlatformTenantRecord, TenantBackendPlacement, TenantDirectory };