@knpkv/control-center 0.3.0 → 0.4.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 (298) hide show
  1. package/README.md +52 -9
  2. package/dist/client/.vite/manifest.json +183 -170
  3. package/dist/client/assets/{ActiveWorkPage-DJQgGZeV.js → ActiveWorkPage-Dd1mxPrq.js} +2 -2
  4. package/dist/client/assets/{ActiveWorkPage-DJQgGZeV.js.map → ActiveWorkPage-Dd1mxPrq.js.map} +1 -1
  5. package/dist/client/assets/AgentPage-C3LThgPZ.js +3 -0
  6. package/dist/client/assets/AgentPage-C3LThgPZ.js.map +1 -0
  7. package/dist/client/assets/{AtlassianOAuthCallbackPage-D1F1xE_2.js → AtlassianOAuthCallbackPage-BPoF6oKf.js} +2 -2
  8. package/dist/client/assets/{AtlassianOAuthCallbackPage-D1F1xE_2.js.map → AtlassianOAuthCallbackPage-BPoF6oKf.js.map} +1 -1
  9. package/dist/client/assets/AuthorizedSharePage-jjqu6W_f.js +2 -0
  10. package/dist/client/assets/AuthorizedSharePage-jjqu6W_f.js.map +1 -0
  11. package/dist/client/assets/BrowserCrypto-BMbjhcvP.js +2 -0
  12. package/dist/client/assets/{BrowserCrypto-DVWR7DFd.js.map → BrowserCrypto-BMbjhcvP.js.map} +1 -1
  13. package/dist/client/assets/BrowserSessionHydrator-BC1ymLkL.js +2 -0
  14. package/dist/client/assets/BrowserSessionHydrator-BC1ymLkL.js.map +1 -0
  15. package/dist/client/assets/CommandSearch-WwAVDrD9.js +2 -0
  16. package/dist/client/assets/{CommandSearch-CP_QCbkm.js.map → CommandSearch-WwAVDrD9.js.map} +1 -1
  17. package/dist/client/assets/ItemsPage-CKK_KkJ2.js +2 -0
  18. package/dist/client/assets/{ItemsPage-BGFUkRL2.js.map → ItemsPage-CKK_KkJ2.js.map} +1 -1
  19. package/dist/client/assets/{PairPage-DIgzx0K2.js → PairPage-DA6cmyqF.js} +2 -2
  20. package/dist/client/assets/{PairPage-DIgzx0K2.js.map → PairPage-DA6cmyqF.js.map} +1 -1
  21. package/dist/client/assets/PortfolioOverview-CEI4gpXi.js +2 -0
  22. package/dist/client/assets/PortfolioOverview-CEI4gpXi.js.map +1 -0
  23. package/dist/client/assets/PullRequestReviewPanel-D7AKnwL-.js +6 -0
  24. package/dist/client/assets/PullRequestReviewPanel-D7AKnwL-.js.map +1 -0
  25. package/dist/client/assets/ReleaseRoute-CbPW3qUT.js +2 -0
  26. package/dist/client/assets/{ReleaseRoute-DXJ8Jg60.js.map → ReleaseRoute-CbPW3qUT.js.map} +1 -1
  27. package/dist/client/assets/ReleaseWorkset-BluAe7Sq.js +2 -0
  28. package/dist/client/assets/{ReleaseWorkset-Dtzalmji.js.map → ReleaseWorkset-BluAe7Sq.js.map} +1 -1
  29. package/dist/client/assets/ServicesPage-_B89DAvG.js +2 -0
  30. package/dist/client/assets/ServicesPage-_B89DAvG.js.map +1 -0
  31. package/dist/client/assets/TimelinePage-DvpgD8AY.js +2 -0
  32. package/dist/client/assets/TimelinePage-DvpgD8AY.js.map +1 -0
  33. package/dist/client/assets/WorkspaceEntityLink-DPj6MKI2.js +2 -0
  34. package/dist/client/assets/{WorkspaceEntityLink-AdZ_T-Wk.js.map → WorkspaceEntityLink-DPj6MKI2.js.map} +1 -1
  35. package/dist/client/assets/WorkspaceEntityRoute-B01fxxB3.js +3 -0
  36. package/dist/client/assets/WorkspaceEntityRoute-B01fxxB3.js.map +1 -0
  37. package/dist/client/assets/{WorkspaceHomeLink-XbKSPths.js → WorkspaceHomeLink-CkJfzO25.js} +2 -2
  38. package/dist/client/assets/{WorkspaceHomeLink-XbKSPths.js.map → WorkspaceHomeLink-CkJfzO25.js.map} +1 -1
  39. package/dist/client/assets/WorkspacePullRequestDetails-HwDgp12e.js +3 -0
  40. package/dist/client/assets/WorkspacePullRequestDetails-HwDgp12e.js.map +1 -0
  41. package/dist/client/assets/{WorkspaceReleaseLayout-cfboC5Qh.js → WorkspaceReleaseLayout-CGHi8eoo.js} +2 -2
  42. package/dist/client/assets/{WorkspaceReleaseLayout-cfboC5Qh.js.map → WorkspaceReleaseLayout-CGHi8eoo.js.map} +1 -1
  43. package/dist/client/assets/{WorkspaceSettingsPage-Fy7Wx8Y2.js → WorkspaceSettingsPage-DyoGiGJG.js} +2 -2
  44. package/dist/client/assets/{WorkspaceSettingsPage-Fy7Wx8Y2.js.map → WorkspaceSettingsPage-DyoGiGJG.js.map} +1 -1
  45. package/dist/client/assets/agent-api-CeONl_8w.js +19 -0
  46. package/dist/client/assets/agent-api-CeONl_8w.js.map +1 -0
  47. package/dist/client/assets/authenticatedMutationClient-DYaieXUe.js +2 -0
  48. package/dist/client/assets/{authenticatedMutationClient-Ccwguc3i.js.map → authenticatedMutationClient-DYaieXUe.js.map} +1 -1
  49. package/dist/client/assets/authorizedShareTransport-cxBoQzQ2.js +2 -0
  50. package/dist/client/assets/{authorizedShareTransport-DZHgFEkh.js.map → authorizedShareTransport-cxBoQzQ2.js.map} +1 -1
  51. package/dist/client/assets/client-DKS82kT_.js +5 -0
  52. package/dist/client/assets/client-DKS82kT_.js.map +1 -0
  53. package/dist/client/assets/connectionTestTransport-I_Ga9UNs.js +2 -0
  54. package/dist/client/assets/{connectionTestTransport-BQ55d6Me.js.map → connectionTestTransport-I_Ga9UNs.js.map} +1 -1
  55. package/dist/client/assets/index-C7_FDTU7.js +11 -0
  56. package/dist/client/assets/index-C7_FDTU7.js.map +1 -0
  57. package/dist/client/assets/{patterns-5N-j-AD2-BwypFm-e.js → patterns-5N-j-AD2-B9qgekXA.js} +2 -2
  58. package/dist/client/assets/{patterns-5N-j-AD2-BwypFm-e.js.map → patterns-5N-j-AD2-B9qgekXA.js.map} +1 -1
  59. package/dist/client/assets/{presentPortfolio-D3ZIcnqt.js → presentPortfolio-C_JsoSWg.js} +2 -2
  60. package/dist/client/assets/presentPortfolio-C_JsoSWg.js.map +1 -0
  61. package/dist/client/assets/{presentWorkspaceItems-Bmh4oEbH.js → presentWorkspaceItems-DboAfwGc.js} +2 -2
  62. package/dist/client/assets/{presentWorkspaceItems-Bmh4oEbH.js.map → presentWorkspaceItems-DboAfwGc.js.map} +1 -1
  63. package/dist/client/assets/{pullRequestReviewFailures-S74M-fOk.js → pullRequestReviewFailures-DHmYwffV.js} +2 -2
  64. package/dist/client/assets/{pullRequestReviewFailures-S74M-fOk.js.map → pullRequestReviewFailures-DHmYwffV.js.map} +1 -1
  65. package/dist/client/assets/pullRequestReviewThreadReplay-Vy1k53qE.js +2 -0
  66. package/dist/client/assets/pullRequestReviewThreadReplay-Vy1k53qE.js.map +1 -0
  67. package/dist/client/assets/releaseRoutes-t9uCfs5T.js +2 -0
  68. package/dist/client/assets/{releaseRoutes-BCuIdZyA.js.map → releaseRoutes-t9uCfs5T.js.map} +1 -1
  69. package/dist/client/assets/serviceOnboarding-DLINCon7.js +2 -0
  70. package/dist/client/assets/{serviceOnboarding-Jg_0yNjf.js.map → serviceOnboarding-DLINCon7.js.map} +1 -1
  71. package/dist/client/assets/{useWorkspaceDefaultLanding-CzlDdEF-.js → useWorkspaceDefaultLanding-CC5ImHkL.js} +3 -3
  72. package/dist/client/assets/{useWorkspaceDefaultLanding-CzlDdEF-.js.map → useWorkspaceDefaultLanding-CC5ImHkL.js.map} +1 -1
  73. package/dist/client/assets/{useWorkspaceItems-Cd3MPke2.js → useWorkspaceItems-B1X-JNwq.js} +2 -2
  74. package/dist/client/assets/{useWorkspaceItems-Cd3MPke2.js.map → useWorkspaceItems-B1X-JNwq.js.map} +1 -1
  75. package/dist/client/assets/workspaceEntityRoutes-2TejMrzb.js +2 -0
  76. package/dist/client/assets/workspaceEntityRoutes-2TejMrzb.js.map +1 -0
  77. package/dist/client/assets/workspaceScrollCapture-BsjcWVsk.js +2 -0
  78. package/dist/client/assets/workspaceScrollCapture-BsjcWVsk.js.map +1 -0
  79. package/dist/client/assets/workspaceSettingsTransport-Dw2hueXv.js +2 -0
  80. package/dist/client/assets/{workspaceSettingsTransport-CZWYL5T7.js.map → workspaceSettingsTransport-Dw2hueXv.js.map} +1 -1
  81. package/dist/client/build-graph.json +17 -0
  82. package/dist/client/index.html +1 -1
  83. package/dist/server/api/agent.d.ts +563 -44
  84. package/dist/server/api/agent.d.ts.map +1 -1
  85. package/dist/server/api/deliveryGraph.d.ts +454 -454
  86. package/dist/server/api/index.d.ts +1 -1
  87. package/dist/server/api/index.d.ts.map +1 -1
  88. package/dist/server/api/index.js +4 -4
  89. package/dist/server/api/liveEvents.d.ts +20 -0
  90. package/dist/server/api/liveEvents.d.ts.map +1 -1
  91. package/dist/server/api/portfolio.d.ts +23 -0
  92. package/dist/server/api/portfolio.d.ts.map +1 -1
  93. package/dist/server/api/shares.d.ts +2 -2
  94. package/dist/server/assets/{BindConfig-DIsf2Rnh.js → BindConfig-Bj282xDC.js} +2094 -290
  95. package/dist/server/assets/BindConfig-Bj282xDC.js.map +1 -0
  96. package/dist/server/assets/{CodePipelineStateDecoder-CVf1A2zG.js → CodePipelineStateDecoder-CNiFRgSi.js} +2 -2
  97. package/dist/server/assets/{CodePipelineStateDecoder-CVf1A2zG.js.map → CodePipelineStateDecoder-CNiFRgSi.js.map} +1 -1
  98. package/dist/server/assets/{agent-CyZ40zs1.js → agent-ZvwskOQu.js} +160 -10
  99. package/dist/server/assets/agent-ZvwskOQu.js.map +1 -0
  100. package/dist/server/assets/{controlCenterApi-ZUX3Y-LE.js → controlCenterApi-5j3gOXgE.js} +5 -5
  101. package/dist/server/assets/{controlCenterApi-ZUX3Y-LE.js.map → controlCenterApi-5j3gOXgE.js.map} +1 -1
  102. package/dist/server/assets/{descriptor-CKtTnhef.js → descriptor-CCvNzSZL.js} +10 -10
  103. package/dist/server/assets/{descriptor-CKtTnhef.js.map → descriptor-CCvNzSZL.js.map} +1 -1
  104. package/dist/server/assets/{failures-mgYDkUZy.js → failures-CesHLYbN.js} +2 -2
  105. package/dist/server/assets/{failures-mgYDkUZy.js.map → failures-CesHLYbN.js.map} +1 -1
  106. package/dist/server/assets/{firstPartyServices-D7b8BOek.js → firstPartyServices-Cdzjcs2H.js} +2 -2
  107. package/dist/server/assets/{firstPartyServices-D7b8BOek.js.map → firstPartyServices-Cdzjcs2H.js.map} +1 -1
  108. package/dist/server/assets/{manualPluginSynchronization-DFlhKvav.js → manualPluginSynchronization-CzIhZ_Dw.js} +5 -5
  109. package/dist/server/assets/{manualPluginSynchronization-DFlhKvav.js.map → manualPluginSynchronization-CzIhZ_Dw.js.map} +1 -1
  110. package/dist/server/assets/{plugins-D__oMDpI.js → plugins-DiPrfzV8.js} +2 -2
  111. package/dist/server/assets/{plugins-D__oMDpI.js.map → plugins-DiPrfzV8.js.map} +1 -1
  112. package/dist/server/assets/{readiness-BhA-Nr9c.js → readiness-BtntBhDj.js} +3 -3
  113. package/dist/server/assets/{readiness-BhA-Nr9c.js.map → readiness-BtntBhDj.js.map} +1 -1
  114. package/dist/server/assets/{relationshipInferenceMaterialization-DYBcaWhQ.js → relationshipInferenceMaterialization-CR6xyMNL.js} +1121 -159
  115. package/dist/server/assets/relationshipInferenceMaterialization-CR6xyMNL.js.map +1 -0
  116. package/dist/server/assets/{workspaceSettings-BE713Oe8.js → workspaceSettings-C2Zsk6RI.js} +2784 -2700
  117. package/dist/server/assets/workspaceSettings-C2Zsk6RI.js.map +1 -0
  118. package/dist/server/build-graph.json +117 -4
  119. package/dist/server/domain/actors.d.ts +12 -12
  120. package/dist/server/domain/deliveryGraph.d.ts +49 -49
  121. package/dist/server/domain/governedAction/bindings.d.ts +24 -12
  122. package/dist/server/domain/governedAction/bindings.d.ts.map +1 -1
  123. package/dist/server/domain/governedAction/lifecycle.d.ts +8 -8
  124. package/dist/server/domain/governedAction/model.d.ts +39 -18
  125. package/dist/server/domain/governedAction/model.d.ts.map +1 -1
  126. package/dist/server/domain/governedAction/stateMachine.d.ts +34 -34
  127. package/dist/server/domain/index.js +6 -6
  128. package/dist/server/domain/normalizedIssue.d.ts +1 -1
  129. package/dist/server/domain/prReview.d.ts +38 -0
  130. package/dist/server/domain/prReview.d.ts.map +1 -1
  131. package/dist/server/domain/prReviewReconciliation.d.ts +56 -0
  132. package/dist/server/domain/prReviewReconciliation.d.ts.map +1 -0
  133. package/dist/server/domain/prReviewRevision.d.ts +1 -0
  134. package/dist/server/domain/prReviewRevision.d.ts.map +1 -1
  135. package/dist/server/domain/readiness/model.d.ts +3 -3
  136. package/dist/server/domain/release.d.ts +3 -3
  137. package/dist/server/domain/releasePublication.d.ts +4 -0
  138. package/dist/server/domain/releasePublication.d.ts.map +1 -0
  139. package/dist/server/index.js +8 -8
  140. package/dist/server/server/agent/AgentJobWorker.d.ts +10 -1
  141. package/dist/server/server/agent/AgentJobWorker.d.ts.map +1 -1
  142. package/dist/server/server/agent/ReleaseAgentPrompt.d.ts.map +1 -1
  143. package/dist/server/server/agent/internal/AgentJobTaskExecutor.d.ts +4 -3
  144. package/dist/server/server/agent/internal/AgentJobTaskExecutor.d.ts.map +1 -1
  145. package/dist/server/server/agent/internal/PrReviewSandboxSession.d.ts +17 -1
  146. package/dist/server/server/agent/internal/PrReviewSandboxSession.d.ts.map +1 -1
  147. package/dist/server/server/agent/internal/PrReviewTaskExecutor.d.ts +76 -2
  148. package/dist/server/server/agent/internal/PrReviewTaskExecutor.d.ts.map +1 -1
  149. package/dist/server/server/agent/internal/PrReviewTelemetry.d.ts +27 -0
  150. package/dist/server/server/agent/internal/PrReviewTelemetry.d.ts.map +1 -0
  151. package/dist/server/server/api/ApplicationServices.d.ts +39 -5
  152. package/dist/server/server/api/ApplicationServices.d.ts.map +1 -1
  153. package/dist/server/server/api/Handlers.d.ts.map +1 -1
  154. package/dist/server/server/api/RequestBoundary.d.ts.map +1 -1
  155. package/dist/server/server/application/GovernedReviewSuggestionPublicationGateway.d.ts.map +1 -1
  156. package/dist/server/server/application/ReviewSuggestionPublicationGateway.d.ts +4 -0
  157. package/dist/server/server/application/ReviewSuggestionPublicationGateway.d.ts.map +1 -1
  158. package/dist/server/server/application/index.d.ts +1 -0
  159. package/dist/server/server/application/index.d.ts.map +1 -1
  160. package/dist/server/server/application/liveEvents.d.ts.map +1 -1
  161. package/dist/server/server/application/pipelineExecutionProjection.d.ts +6 -6
  162. package/dist/server/server/application/portfolioSnapshots.d.ts +2014 -4
  163. package/dist/server/server/application/portfolioSnapshots.d.ts.map +1 -1
  164. package/dist/server/server/application/pullRequestReviews.d.ts.map +1 -1
  165. package/dist/server/server/application/releaseAgent.d.ts +11 -3
  166. package/dist/server/server/application/releaseAgent.d.ts.map +1 -1
  167. package/dist/server/server/application/releasePublicationIntent.d.ts +7 -0
  168. package/dist/server/server/application/releasePublicationIntent.d.ts.map +1 -0
  169. package/dist/server/server/application/releasePublicationMetadata.d.ts +61 -0
  170. package/dist/server/server/application/releasePublicationMetadata.d.ts.map +1 -0
  171. package/dist/server/server/application/releasePublicationSubmissions.d.ts +3699 -0
  172. package/dist/server/server/application/releasePublicationSubmissions.d.ts.map +1 -0
  173. package/dist/server/server/application/releaseSynchronization.d.ts.map +1 -1
  174. package/dist/server/server/cli.js +8 -8
  175. package/dist/server/server/cli.js.map +1 -1
  176. package/dist/server/server/governance/governedActionDigests.d.ts +233 -218
  177. package/dist/server/server/governance/governedActionDigests.d.ts.map +1 -1
  178. package/dist/server/server/governance/internal/GovernedActionExecutionEngine.d.ts +3 -4
  179. package/dist/server/server/governance/internal/GovernedActionExecutionEngine.d.ts.map +1 -1
  180. package/dist/server/server/governance/internal/execution-store/begin.d.ts.map +1 -1
  181. package/dist/server/server/governance/internal/execution-store/dispatch-inbox.d.ts +1 -1
  182. package/dist/server/server/governance/internal/execution-store/dispatch-outcome.d.ts +8 -8
  183. package/dist/server/server/governance/internal/execution-store/provider-outcome-fold.d.ts +2 -2
  184. package/dist/server/server/governance/internal/execution-store/reconciliation-inbox.d.ts +1 -1
  185. package/dist/server/server/governance/internal/execution-store/recovery-claim.d.ts +36 -30
  186. package/dist/server/server/governance/internal/execution-store/recovery-claim.d.ts.map +1 -1
  187. package/dist/server/server/index.js +5 -5
  188. package/dist/server/server/internal/codepipeline-state-probe.js +1 -1
  189. package/dist/server/server/persistence/Database.d.ts +1 -1
  190. package/dist/server/server/persistence/Database.d.ts.map +1 -1
  191. package/dist/server/server/persistence/Persistence.d.ts +1539 -577
  192. package/dist/server/server/persistence/Persistence.d.ts.map +1 -1
  193. package/dist/server/server/persistence/backup/BackupArchive.d.ts.map +1 -1
  194. package/dist/server/server/persistence/repositories/agentJobModels.d.ts +345 -8
  195. package/dist/server/server/persistence/repositories/agentJobModels.d.ts.map +1 -1
  196. package/dist/server/server/persistence/repositories/agentJobRepository.d.ts +654 -192
  197. package/dist/server/server/persistence/repositories/agentJobRepository.d.ts.map +1 -1
  198. package/dist/server/server/persistence/repositories/delivery-graph/contract.d.ts +138 -138
  199. package/dist/server/server/persistence/repositories/delivery-graph/decode.d.ts +25 -25
  200. package/dist/server/server/persistence/repositories/delivery-graph/read.d.ts +111 -111
  201. package/dist/server/server/persistence/repositories/delivery-graph/rows.d.ts +27 -27
  202. package/dist/server/server/persistence/repositories/delivery-graph/write.d.ts +48 -48
  203. package/dist/server/server/persistence/repositories/deliveryGraphRepository.d.ts +111 -111
  204. package/dist/server/server/persistence/repositories/governed-action/codec.d.ts +255 -234
  205. package/dist/server/server/persistence/repositories/governed-action/codec.d.ts.map +1 -1
  206. package/dist/server/server/persistence/repositories/governed-action/contract.d.ts +66 -46
  207. package/dist/server/server/persistence/repositories/governed-action/contract.d.ts.map +1 -1
  208. package/dist/server/server/persistence/repositories/governed-action/read.d.ts +664 -190
  209. package/dist/server/server/persistence/repositories/governed-action/read.d.ts.map +1 -1
  210. package/dist/server/server/persistence/repositories/governed-action/transaction.d.ts +676 -206
  211. package/dist/server/server/persistence/repositories/governed-action/transaction.d.ts.map +1 -1
  212. package/dist/server/server/persistence/repositories/governed-action/write-preparation.d.ts +37 -31
  213. package/dist/server/server/persistence/repositories/governed-action/write-preparation.d.ts.map +1 -1
  214. package/dist/server/server/persistence/repositories/governed-action/write-replay.d.ts +44 -32
  215. package/dist/server/server/persistence/repositories/governed-action/write-replay.d.ts.map +1 -1
  216. package/dist/server/server/persistence/repositories/governed-action/write.d.ts +44 -32
  217. package/dist/server/server/persistence/repositories/governed-action/write.d.ts.map +1 -1
  218. package/dist/server/server/persistence/repositories/governedActionRepository.d.ts +674 -205
  219. package/dist/server/server/persistence/repositories/governedActionRepository.d.ts.map +1 -1
  220. package/dist/server/server/persistence/repositories/internal/reviewSuggestionRevisions.d.ts +85 -4
  221. package/dist/server/server/persistence/repositories/internal/reviewSuggestionRevisions.d.ts.map +1 -1
  222. package/dist/server/server/persistence/repositories/models.d.ts +9 -9
  223. package/dist/server/server/persistence/repositories/peopleRepository.d.ts +36 -36
  224. package/dist/server/server/persistence/repositories/providerAccountRepository.d.ts +1 -1
  225. package/dist/server/server/persistence/repositories/readiness/assessments.d.ts +6 -6
  226. package/dist/server/server/persistence/repositories/readiness/contract.d.ts +450 -450
  227. package/dist/server/server/persistence/repositories/readiness/queue.d.ts +14 -14
  228. package/dist/server/server/persistence/repositories/readinessRepository.d.ts +7 -7
  229. package/dist/server/server/persistence/repositories/releaseRepository.d.ts +18 -18
  230. package/dist/server/server/persistence/repositories/retentionRepository.d.ts.map +1 -1
  231. package/dist/server/server/persistence/repositories/timelineRepository.d.ts +4 -4
  232. package/dist/server/server/plugins/atlassian/AtlassianOAuthGrants.d.ts.map +1 -1
  233. package/dist/server/server/plugins/atlassian/AtlassianOAuthScopes.d.ts +9 -0
  234. package/dist/server/server/plugins/atlassian/AtlassianOAuthScopes.d.ts.map +1 -0
  235. package/dist/server/server/plugins/atlassian/AtlassianProfiles.d.ts.map +1 -1
  236. package/dist/server/server/plugins/codecommit/CodeCommitPluginDefinition.d.ts.map +1 -1
  237. package/dist/server/server/plugins/jira/JiraReadPlugin.d.ts +2 -2
  238. package/dist/server/server/plugins/jira/JiraReadPlugin.d.ts.map +1 -1
  239. package/dist/server/server/plugins/jira/JiraReadProvider.d.ts.map +1 -1
  240. package/dist/server/server/plugins/jira/JiraReleaseVersionLimits.d.ts +8 -0
  241. package/dist/server/server/plugins/jira/JiraReleaseVersionLimits.d.ts.map +1 -0
  242. package/dist/server/server/plugins/jira/index.d.ts +1 -1
  243. package/dist/server/server/plugins/jira/index.d.ts.map +1 -1
  244. package/dist/server/server/runtime/Bootstrap.d.ts +1 -1
  245. package/dist/server/server/runtime/Bootstrap.d.ts.map +1 -1
  246. package/dist/server/server/runtime/ControlCenterServer.d.ts +3 -3
  247. package/dist/server/server/runtime/ControlCenterServer.d.ts.map +1 -1
  248. package/dist/server/server/runtime/PrReviewWorkerStartup.d.ts +11 -1
  249. package/dist/server/server/runtime/PrReviewWorkerStartup.d.ts.map +1 -1
  250. package/dist/server/server/runtime/RetentionStartup.d.ts.map +1 -1
  251. package/dist/server/server/runtime/ServerLifecycle.d.ts.map +1 -1
  252. package/dist/server/server/secrets/SecretStore.d.ts.map +1 -1
  253. package/package.json +9 -8
  254. package/dist/client/assets/AgentPage-DGL93TJU.js +0 -3
  255. package/dist/client/assets/AgentPage-DGL93TJU.js.map +0 -1
  256. package/dist/client/assets/AuthorizedSharePage-DCQUFY2I.js +0 -2
  257. package/dist/client/assets/AuthorizedSharePage-DCQUFY2I.js.map +0 -1
  258. package/dist/client/assets/BrowserCrypto-DVWR7DFd.js +0 -2
  259. package/dist/client/assets/BrowserSessionHydrator-DE46feEX.js +0 -2
  260. package/dist/client/assets/BrowserSessionHydrator-DE46feEX.js.map +0 -1
  261. package/dist/client/assets/CommandSearch-CP_QCbkm.js +0 -2
  262. package/dist/client/assets/ItemsPage-BGFUkRL2.js +0 -2
  263. package/dist/client/assets/PortfolioOverview-D45rk8Hl.js +0 -2
  264. package/dist/client/assets/PortfolioOverview-D45rk8Hl.js.map +0 -1
  265. package/dist/client/assets/PullRequestReviewPanel-CqPtjhVW.js +0 -6
  266. package/dist/client/assets/PullRequestReviewPanel-CqPtjhVW.js.map +0 -1
  267. package/dist/client/assets/ReleaseRoute-DXJ8Jg60.js +0 -2
  268. package/dist/client/assets/ReleaseWorkset-Dtzalmji.js +0 -2
  269. package/dist/client/assets/ServicesPage-DGcUjd2H.js +0 -2
  270. package/dist/client/assets/ServicesPage-DGcUjd2H.js.map +0 -1
  271. package/dist/client/assets/TimelinePage-Bq1RTQlP.js +0 -2
  272. package/dist/client/assets/TimelinePage-Bq1RTQlP.js.map +0 -1
  273. package/dist/client/assets/WorkspaceEntityLink-AdZ_T-Wk.js +0 -2
  274. package/dist/client/assets/WorkspaceEntityRoute-Bxxnc8us.js +0 -3
  275. package/dist/client/assets/WorkspaceEntityRoute-Bxxnc8us.js.map +0 -1
  276. package/dist/client/assets/WorkspacePullRequestDetails-BErJ5bk8.js +0 -3
  277. package/dist/client/assets/WorkspacePullRequestDetails-BErJ5bk8.js.map +0 -1
  278. package/dist/client/assets/agent-api-QVqt4a0O.js +0 -19
  279. package/dist/client/assets/agent-api-QVqt4a0O.js.map +0 -1
  280. package/dist/client/assets/authenticatedMutationClient-Ccwguc3i.js +0 -2
  281. package/dist/client/assets/authorizedShareTransport-DZHgFEkh.js +0 -2
  282. package/dist/client/assets/client-D27unen8.js +0 -5
  283. package/dist/client/assets/client-D27unen8.js.map +0 -1
  284. package/dist/client/assets/connectionTestTransport-BQ55d6Me.js +0 -2
  285. package/dist/client/assets/index-j5ze816l.js +0 -11
  286. package/dist/client/assets/index-j5ze816l.js.map +0 -1
  287. package/dist/client/assets/presentPortfolio-D3ZIcnqt.js.map +0 -1
  288. package/dist/client/assets/pullRequestReviewThreadReplay-oljKM7Xz.js +0 -2
  289. package/dist/client/assets/pullRequestReviewThreadReplay-oljKM7Xz.js.map +0 -1
  290. package/dist/client/assets/releaseRoutes-BCuIdZyA.js +0 -2
  291. package/dist/client/assets/serviceOnboarding-Jg_0yNjf.js +0 -2
  292. package/dist/client/assets/workspaceScrollCapture-CJ4QUptr.js +0 -2
  293. package/dist/client/assets/workspaceScrollCapture-CJ4QUptr.js.map +0 -1
  294. package/dist/client/assets/workspaceSettingsTransport-CZWYL5T7.js +0 -2
  295. package/dist/server/assets/BindConfig-DIsf2Rnh.js.map +0 -1
  296. package/dist/server/assets/agent-CyZ40zs1.js.map +0 -1
  297. package/dist/server/assets/relationshipInferenceMaterialization-DYBcaWhQ.js.map +0 -1
  298. package/dist/server/assets/workspaceSettings-BE713Oe8.js.map +0 -1
@@ -0,0 +1,3699 @@
1
+ /** Human-confirmed, append-only release publication boundary for Relay. @module */
2
+ import * as Context from "effect/Context";
3
+ import * as Crypto from "effect/Crypto";
4
+ import * as DateTime from "effect/DateTime";
5
+ import * as Effect from "effect/Effect";
6
+ import * as Layer from "effect/Layer";
7
+ import * as Schema from "effect/Schema";
8
+ import type { SubmitReleasePublicationRequest, SubmitReleasePublicationResponse } from "../../api/agent.js";
9
+ import { type ReleaseId, type WorkspaceId } from "../../domain/identifiers.js";
10
+ import type { UtcTimestamp } from "../../domain/utcTimestamp.js";
11
+ import type { SessionSummary } from "../auth/models.js";
12
+ import { GovernedActionPolicyBindingSource, GovernedActionProposalAuthority, GovernedActionSubmission } from "../governance/GovernedActionSubmission.js";
13
+ import { Persistence } from "../persistence/Persistence.js";
14
+ import { PluginConnectionMap } from "../plugins/PluginConnectionMap.js";
15
+ import { latestConfluencePublicationReference } from "./releasePublicationMetadata.js";
16
+ declare const ReleasePublicationSubmissionError_base: Schema.Class<ReleasePublicationSubmissionError, Schema.TaggedStruct<"ReleasePublicationSubmissionError", {
17
+ readonly reason: Schema.Literals<readonly ["unauthorized", "conflict", "forbidden", "invalid-request", "unavailable"]>;
18
+ }>, import("effect/Cause").YieldableError>;
19
+ export declare class ReleasePublicationSubmissionError extends ReleasePublicationSubmissionError_base {
20
+ }
21
+ export interface ConfluenceReleasePublicationHistory {
22
+ readonly hasBlockingPublication: boolean;
23
+ readonly latestReference: ReturnType<typeof latestConfluencePublicationReference>;
24
+ }
25
+ /** Require creates to have no history and updates to match the exact latest durable receipt. */
26
+ export declare const confluencePublicationRequestMatchesHistory: (request: Pick<SubmitReleasePublicationRequest, "publicationActionId">, history: ConfluenceReleasePublicationHistory) => boolean;
27
+ /** Preserve the exact referenced page for idempotency while separately checking whether it is still latest. */
28
+ export declare const confluencePublicationRequestContext: (request: Pick<SubmitReleasePublicationRequest, "publicationActionId">, history: ConfluenceReleasePublicationHistory, requestedReference: ConfluenceReleasePublicationHistory["latestReference"]) => {
29
+ historyMatches: boolean;
30
+ publication: import("./releasePublicationMetadata.js").LatestConfluencePublicationReference | null;
31
+ };
32
+ /** Load enough indexed history to distinguish never-published from malformed successful receipts. */
33
+ export declare const loadConfluenceReleasePublicationHistory: (history: Pick<{
34
+ commit: (input: unknown) => Effect.Effect<{
35
+ readonly _tag: "committed";
36
+ readonly transition: import("../../domain/governedAction/stateMachine.ts").GovernedActionTransitionV1;
37
+ } | {
38
+ readonly _tag: "replayed";
39
+ readonly transition: import("../../domain/governedAction/stateMachine.ts").GovernedActionTransitionV1;
40
+ }, import("../persistence/Persistence.js").PersistenceOperationFailure, never>;
41
+ read: (input: unknown) => Effect.Effect<{
42
+ envelope: {
43
+ readonly providerId: "codecommit" | "codepipeline" | "jira" | "confluence" | "clockify";
44
+ readonly pluginConnectionId: string & import("effect/Brand").Brand<"PluginConnectionId">;
45
+ readonly workspaceId: string & import("effect/Brand").Brand<"WorkspaceId">;
46
+ readonly schemaVersion: 1;
47
+ readonly causationId: (string & import("effect/Brand").Brand<"DomainEventId">) | null;
48
+ readonly correlationId: (string & import("effect/Brand").Brand<"DomainEventCorrelationId">) | null;
49
+ readonly proposal: Schema.Struct.ReadonlySide<{
50
+ readonly proposalKey: Schema.brand<Schema.String, string>;
51
+ readonly capabilityVersion: Schema.Int;
52
+ readonly request: Schema.Struct<{
53
+ readonly actionKind: Schema.brand<Schema.String, string>;
54
+ readonly target: Schema.Struct<{
55
+ entityType: Schema.brand<Schema.String, string>;
56
+ vendorImmutableId: Schema.brand<Schema.String, "VendorImmutableId">;
57
+ }>;
58
+ readonly expectedRevision: Schema.brand<Schema.String, "Revision">;
59
+ readonly payload: Schema.Codec<Schema.Json, Schema.Json, never, never>;
60
+ readonly evidenceIds: Schema.$Array<Schema.brand<Schema.String, string>>;
61
+ }>;
62
+ readonly payloadDigest: Schema.brand<Schema.String, "PluginActionPayloadDigest">;
63
+ readonly summary: Schema.String;
64
+ readonly impact: Schema.Struct<{
65
+ readonly level: Schema.Literals<readonly ["low", "medium", "high", "critical"]>;
66
+ readonly summary: Schema.String;
67
+ }>;
68
+ readonly proposedAt: Schema.DateTimeUtcFromString;
69
+ }, "Type">;
70
+ readonly idempotencyKey: string & import("effect/Brand").Brand<"GovernedActionIdempotencyKey">;
71
+ readonly pluginId: string & import("effect/Brand").Brand<string>;
72
+ readonly actionId: string & import("effect/Brand").Brand<"GovernedActionId">;
73
+ readonly policy: Schema.Struct.ReadonlySide<{
74
+ readonly policyId: Schema.brand<Schema.String, string>;
75
+ readonly policyVersion: Schema.Int;
76
+ readonly policyDigest: Schema.brand<Schema.String, string>;
77
+ readonly requiredPermission: Schema.Literals<readonly ["workspace-owner", "workspace-approver", "release-owner", "release-approver", "change-owner", "issue-owner", "issue-assignee", "page-owner", "author", "contributor", "reviewer", "operator", "deployment-approver", "merge-approver", "watcher"]>;
78
+ }, "Type">;
79
+ readonly evidenceSetDigest: string & import("effect/Brand").Brand<string>;
80
+ readonly pluginConnectionRevision: number & import("effect/Brand").Brand<"GovernedActionPluginConnectionRevision">;
81
+ readonly pluginConnectionAuthorityDigest: string & import("effect/Brand").Brand<string>;
82
+ readonly pluginContractVersion: Schema.Struct.ReadonlySide<{
83
+ readonly major: Schema.Int;
84
+ readonly minor: Schema.Int;
85
+ readonly patch: Schema.Int;
86
+ }, "Type">;
87
+ readonly pluginAdapterVersion: Schema.Struct.ReadonlySide<{
88
+ readonly major: Schema.Int;
89
+ readonly minor: Schema.Int;
90
+ readonly patch: Schema.Int;
91
+ }, "Type">;
92
+ readonly capability: Schema.Struct.ReadonlySide<{
93
+ readonly capabilityId: Schema.Literal<"action.execute">;
94
+ readonly version: Schema.Int;
95
+ }, "Type">;
96
+ readonly targetEntityId: string & import("effect/Brand").Brand<"EntityId">;
97
+ readonly evidence: readonly Schema.Struct.ReadonlySide<{
98
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
99
+ readonly evidenceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "EvidenceId">;
100
+ readonly evidenceClaimIds: Schema.$Array<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "EvidenceClaimId">>;
101
+ readonly observedAt: Schema.DateTimeUtcFromString;
102
+ readonly validUntil: Schema.NullOr<Schema.DateTimeUtcFromString>;
103
+ readonly currentUntil: Schema.NullOr<Schema.DateTimeUtcFromString>;
104
+ readonly evaluatedAt: Schema.DateTimeUtcFromString;
105
+ readonly source: Schema.Literals<readonly ["current", "stale", "missing", "unavailable"]>;
106
+ readonly validity: Schema.Literals<readonly ["valid", "expired"]>;
107
+ }, "Type">[];
108
+ readonly origin: Schema.Struct.ReadonlySide<{
109
+ readonly _tag: Schema.tag<"human">;
110
+ readonly actor: Schema.TaggedStruct<"human", {
111
+ readonly personId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PersonId">;
112
+ }>;
113
+ readonly sessionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "SessionId">;
114
+ }, "Type"> | Schema.Struct.ReadonlySide<{
115
+ readonly _tag: Schema.tag<"agent">;
116
+ readonly actor: Schema.TaggedStruct<"agent", {
117
+ readonly agentId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "AgentId">;
118
+ }>;
119
+ readonly jobId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "JobId">;
120
+ readonly initiatingSessionId: Schema.NullOr<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "SessionId">>;
121
+ }, "Type">;
122
+ readonly proposalExpiresAt: DateTime.Utc;
123
+ readonly envelopeDigest: string & import("effect/Brand").Brand<string>;
124
+ readonly releasePublication?: {
125
+ readonly releaseId: string & import("effect/Brand").Brand<"ReleaseId">;
126
+ readonly sourceRevisionDigest: string & import("effect/Brand").Brand<string>;
127
+ readonly sourceRevisionCount: number;
128
+ readonly predecessorPublicationActionId?: (string & import("effect/Brand").Brand<"GovernedActionId">) | null;
129
+ };
130
+ };
131
+ head: Schema.Struct.ReadonlySide<{
132
+ readonly state: Schema.Literals<readonly ["proposed", "authorized", "denied", "expired", "cancelled", "started", "cancel-requested", "cancel-requested-unknown", "succeeded", "failed", "unknown"]>;
133
+ readonly lineage: Schema.TaggedUnion<{
134
+ readonly accepted: Schema.TaggedStruct<"accepted", {
135
+ readonly receipt: Schema.Struct<{
136
+ readonly status: Schema.Literal<"accepted">;
137
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
138
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
139
+ readonly safeSummary: Schema.String;
140
+ readonly observedAt: Schema.DateTimeUtcFromString;
141
+ }>;
142
+ }>;
143
+ readonly reconcilable: Schema.TaggedStruct<"reconcilable", {
144
+ readonly providerOperationId: Schema.NullOr<Schema.brand<Schema.String, string>>;
145
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
146
+ }>;
147
+ readonly manual: Schema.TaggedStruct<"manual", {
148
+ readonly providerOperationId: Schema.NullOr<Schema.brand<Schema.String, string>>;
149
+ }>;
150
+ readonly none: Schema.TaggedStruct<"none", {}>;
151
+ readonly terminal: Schema.TaggedStruct<"terminal", {
152
+ readonly receipt: Schema.Struct<{
153
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
154
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
155
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
156
+ readonly safeSummary: Schema.String;
157
+ readonly observedAt: Schema.DateTimeUtcFromString;
158
+ }>;
159
+ }>;
160
+ }>;
161
+ }, "Type">;
162
+ headTransition: Schema.Struct.ReadonlySide<{
163
+ readonly commandDigest: Schema.brand<Schema.String, "GovernedActionCommandDigest">;
164
+ readonly schemaVersion: Schema.Literal<1>;
165
+ readonly transitionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionTransitionId">;
166
+ readonly previousTransitionId: Schema.NullOr<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionTransitionId">>;
167
+ readonly commandId: Schema.brand<Schema.String, string>;
168
+ readonly actionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionId">;
169
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
170
+ readonly sequence: Schema.Int;
171
+ readonly fromState: Schema.NullOr<Schema.Literals<readonly ["proposed", "authorized", "denied", "expired", "cancelled", "started", "cancel-requested", "cancel-requested-unknown", "succeeded", "failed", "unknown"]>>;
172
+ readonly toState: Schema.Literals<readonly ["proposed", "authorized", "denied", "expired", "cancelled", "started", "cancel-requested", "cancel-requested-unknown", "succeeded", "failed", "unknown"]>;
173
+ readonly actionEnvelopeDigest: Schema.brand<Schema.String, string>;
174
+ readonly command: Schema.TaggedUnion<{
175
+ readonly propose: Schema.TaggedStruct<"propose", {}>;
176
+ readonly authorize: Schema.TaggedStruct<"authorize", {
177
+ readonly authorizationId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAuthorizationId">;
178
+ }>;
179
+ readonly deny: Schema.TaggedStruct<"deny", {
180
+ readonly reason: Schema.Literals<readonly ["revision-changed", "evidence-stale", "evidence-invalid", "policy-denied", "session-invalid", "capability-changed", "plugin-unavailable", "preflight-blocked"]>;
181
+ readonly safeSummary: Schema.String;
182
+ }>;
183
+ readonly expire: Schema.TaggedStruct<"expire", {
184
+ readonly reason: Schema.Literals<readonly ["proposal-expired", "authorization-expired"]>;
185
+ }>;
186
+ readonly cancel: Schema.TaggedStruct<"cancel", {
187
+ readonly safeSummary: Schema.String;
188
+ }>;
189
+ readonly start: Schema.TaggedStruct<"start", {
190
+ readonly attemptId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAttemptId">;
191
+ }>;
192
+ readonly requestCancellation: Schema.TaggedStruct<"requestCancellation", {
193
+ readonly safeSummary: Schema.String;
194
+ }>;
195
+ readonly recordAccepted: Schema.TaggedStruct<"recordAccepted", {
196
+ readonly receipt: Schema.Struct<{
197
+ readonly status: Schema.Literal<"accepted">;
198
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
199
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
200
+ readonly safeSummary: Schema.String;
201
+ readonly observedAt: Schema.DateTimeUtcFromString;
202
+ }>;
203
+ }>;
204
+ readonly recordSucceeded: Schema.TaggedStruct<"recordSucceeded", {
205
+ readonly receipt: Schema.Struct<{
206
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
207
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
208
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
209
+ readonly safeSummary: Schema.String;
210
+ readonly observedAt: Schema.DateTimeUtcFromString;
211
+ }>;
212
+ readonly source: Schema.TaggedUnion<{
213
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
214
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
215
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
216
+ }>;
217
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
218
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
219
+ }>;
220
+ }>;
221
+ }>;
222
+ readonly recordFailed: Schema.TaggedStruct<"recordFailed", {
223
+ readonly receipt: Schema.Struct<{
224
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
225
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
226
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
227
+ readonly safeSummary: Schema.String;
228
+ readonly observedAt: Schema.DateTimeUtcFromString;
229
+ }>;
230
+ readonly source: Schema.TaggedUnion<{
231
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
232
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
233
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
234
+ }>;
235
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
236
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
237
+ }>;
238
+ }>;
239
+ }>;
240
+ readonly recordUnknown: Schema.TaggedStruct<"recordUnknown", {
241
+ readonly outcome: Schema.TaggedUnion<{
242
+ readonly reconcilable: Schema.TaggedStruct<"reconcilable", {
243
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
244
+ readonly observedAt: Schema.DateTimeUtcFromString;
245
+ readonly safeSummary: Schema.String;
246
+ }>;
247
+ readonly manual: Schema.TaggedStruct<"manual", {
248
+ readonly observedAt: Schema.DateTimeUtcFromString;
249
+ readonly safeSummary: Schema.String;
250
+ readonly reason: Schema.Literals<readonly ["dispatch-deadline-exceeded", "interrupted-after-intent", "provider-defect-after-intent", "malformed-provider-result", "receipt-persistence-failed", "missing-reconciliation-locator"]>;
251
+ }>;
252
+ }>;
253
+ }>;
254
+ readonly recordCancelled: Schema.TaggedStruct<"recordCancelled", {
255
+ readonly receipt: Schema.Struct<{
256
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
257
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
258
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
259
+ readonly safeSummary: Schema.String;
260
+ readonly observedAt: Schema.DateTimeUtcFromString;
261
+ }>;
262
+ readonly source: Schema.TaggedUnion<{
263
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
264
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
265
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
266
+ }>;
267
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
268
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
269
+ }>;
270
+ }>;
271
+ }>;
272
+ readonly reconciliationPending: Schema.TaggedStruct<"reconciliationPending", {
273
+ readonly checkedAt: Schema.DateTimeUtcFromString;
274
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
275
+ }>;
276
+ }>;
277
+ readonly cause: Schema.TaggedUnion<{
278
+ readonly human: Schema.TaggedStruct<"human", {
279
+ readonly actor: Schema.TaggedStruct<"human", {
280
+ readonly personId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PersonId">;
281
+ }>;
282
+ readonly sessionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "SessionId">;
283
+ }>;
284
+ readonly agent: Schema.TaggedStruct<"agent", {
285
+ readonly actor: Schema.TaggedStruct<"agent", {
286
+ readonly agentId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "AgentId">;
287
+ }>;
288
+ readonly jobId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "JobId">;
289
+ }>;
290
+ readonly system: Schema.TaggedStruct<"system", {
291
+ readonly component: Schema.brand<Schema.String, string>;
292
+ }>;
293
+ }>;
294
+ readonly occurredAt: Schema.DateTimeUtcFromString;
295
+ readonly causationId: Schema.NullOr<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "DomainEventId">>;
296
+ readonly correlationId: Schema.NullOr<Schema.brand<Schema.String, "DomainEventCorrelationId">>;
297
+ }, "Type">;
298
+ history: Schema.Struct.ReadonlySide<{
299
+ readonly commandDigest: Schema.brand<Schema.String, "GovernedActionCommandDigest">;
300
+ readonly schemaVersion: Schema.Literal<1>;
301
+ readonly transitionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionTransitionId">;
302
+ readonly previousTransitionId: Schema.NullOr<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionTransitionId">>;
303
+ readonly commandId: Schema.brand<Schema.String, string>;
304
+ readonly actionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionId">;
305
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
306
+ readonly sequence: Schema.Int;
307
+ readonly fromState: Schema.NullOr<Schema.Literals<readonly ["proposed", "authorized", "denied", "expired", "cancelled", "started", "cancel-requested", "cancel-requested-unknown", "succeeded", "failed", "unknown"]>>;
308
+ readonly toState: Schema.Literals<readonly ["proposed", "authorized", "denied", "expired", "cancelled", "started", "cancel-requested", "cancel-requested-unknown", "succeeded", "failed", "unknown"]>;
309
+ readonly actionEnvelopeDigest: Schema.brand<Schema.String, string>;
310
+ readonly command: Schema.TaggedUnion<{
311
+ readonly propose: Schema.TaggedStruct<"propose", {}>;
312
+ readonly authorize: Schema.TaggedStruct<"authorize", {
313
+ readonly authorizationId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAuthorizationId">;
314
+ }>;
315
+ readonly deny: Schema.TaggedStruct<"deny", {
316
+ readonly reason: Schema.Literals<readonly ["revision-changed", "evidence-stale", "evidence-invalid", "policy-denied", "session-invalid", "capability-changed", "plugin-unavailable", "preflight-blocked"]>;
317
+ readonly safeSummary: Schema.String;
318
+ }>;
319
+ readonly expire: Schema.TaggedStruct<"expire", {
320
+ readonly reason: Schema.Literals<readonly ["proposal-expired", "authorization-expired"]>;
321
+ }>;
322
+ readonly cancel: Schema.TaggedStruct<"cancel", {
323
+ readonly safeSummary: Schema.String;
324
+ }>;
325
+ readonly start: Schema.TaggedStruct<"start", {
326
+ readonly attemptId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAttemptId">;
327
+ }>;
328
+ readonly requestCancellation: Schema.TaggedStruct<"requestCancellation", {
329
+ readonly safeSummary: Schema.String;
330
+ }>;
331
+ readonly recordAccepted: Schema.TaggedStruct<"recordAccepted", {
332
+ readonly receipt: Schema.Struct<{
333
+ readonly status: Schema.Literal<"accepted">;
334
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
335
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
336
+ readonly safeSummary: Schema.String;
337
+ readonly observedAt: Schema.DateTimeUtcFromString;
338
+ }>;
339
+ }>;
340
+ readonly recordSucceeded: Schema.TaggedStruct<"recordSucceeded", {
341
+ readonly receipt: Schema.Struct<{
342
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
343
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
344
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
345
+ readonly safeSummary: Schema.String;
346
+ readonly observedAt: Schema.DateTimeUtcFromString;
347
+ }>;
348
+ readonly source: Schema.TaggedUnion<{
349
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
350
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
351
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
352
+ }>;
353
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
354
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
355
+ }>;
356
+ }>;
357
+ }>;
358
+ readonly recordFailed: Schema.TaggedStruct<"recordFailed", {
359
+ readonly receipt: Schema.Struct<{
360
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
361
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
362
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
363
+ readonly safeSummary: Schema.String;
364
+ readonly observedAt: Schema.DateTimeUtcFromString;
365
+ }>;
366
+ readonly source: Schema.TaggedUnion<{
367
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
368
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
369
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
370
+ }>;
371
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
372
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
373
+ }>;
374
+ }>;
375
+ }>;
376
+ readonly recordUnknown: Schema.TaggedStruct<"recordUnknown", {
377
+ readonly outcome: Schema.TaggedUnion<{
378
+ readonly reconcilable: Schema.TaggedStruct<"reconcilable", {
379
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
380
+ readonly observedAt: Schema.DateTimeUtcFromString;
381
+ readonly safeSummary: Schema.String;
382
+ }>;
383
+ readonly manual: Schema.TaggedStruct<"manual", {
384
+ readonly observedAt: Schema.DateTimeUtcFromString;
385
+ readonly safeSummary: Schema.String;
386
+ readonly reason: Schema.Literals<readonly ["dispatch-deadline-exceeded", "interrupted-after-intent", "provider-defect-after-intent", "malformed-provider-result", "receipt-persistence-failed", "missing-reconciliation-locator"]>;
387
+ }>;
388
+ }>;
389
+ }>;
390
+ readonly recordCancelled: Schema.TaggedStruct<"recordCancelled", {
391
+ readonly receipt: Schema.Struct<{
392
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
393
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
394
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
395
+ readonly safeSummary: Schema.String;
396
+ readonly observedAt: Schema.DateTimeUtcFromString;
397
+ }>;
398
+ readonly source: Schema.TaggedUnion<{
399
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
400
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
401
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
402
+ }>;
403
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
404
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
405
+ }>;
406
+ }>;
407
+ }>;
408
+ readonly reconciliationPending: Schema.TaggedStruct<"reconciliationPending", {
409
+ readonly checkedAt: Schema.DateTimeUtcFromString;
410
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
411
+ }>;
412
+ }>;
413
+ readonly cause: Schema.TaggedUnion<{
414
+ readonly human: Schema.TaggedStruct<"human", {
415
+ readonly actor: Schema.TaggedStruct<"human", {
416
+ readonly personId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PersonId">;
417
+ }>;
418
+ readonly sessionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "SessionId">;
419
+ }>;
420
+ readonly agent: Schema.TaggedStruct<"agent", {
421
+ readonly actor: Schema.TaggedStruct<"agent", {
422
+ readonly agentId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "AgentId">;
423
+ }>;
424
+ readonly jobId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "JobId">;
425
+ }>;
426
+ readonly system: Schema.TaggedStruct<"system", {
427
+ readonly component: Schema.brand<Schema.String, string>;
428
+ }>;
429
+ }>;
430
+ readonly occurredAt: Schema.DateTimeUtcFromString;
431
+ readonly causationId: Schema.NullOr<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "DomainEventId">>;
432
+ readonly correlationId: Schema.NullOr<Schema.brand<Schema.String, "DomainEventCorrelationId">>;
433
+ }, "Type">[];
434
+ authorization: Schema.Struct.ReadonlySide<{
435
+ readonly schemaVersion: Schema.Literal<1>;
436
+ readonly authorizationId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAuthorizationId">;
437
+ readonly actionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionId">;
438
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
439
+ readonly pluginConnectionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PluginConnectionId">;
440
+ readonly pluginConnectionRevision: Schema.brand<Schema.Int, "GovernedActionPluginConnectionRevision">;
441
+ readonly pluginConnectionAuthorityDigest: Schema.brand<Schema.String, string>;
442
+ readonly actionEnvelopeDigest: Schema.brand<Schema.String, string>;
443
+ readonly idempotencyKey: Schema.brand<Schema.String, "GovernedActionIdempotencyKey">;
444
+ readonly payloadDigest: Schema.brand<Schema.String, "PluginActionPayloadDigest">;
445
+ readonly evidenceSetDigest: Schema.brand<Schema.String, string>;
446
+ readonly policyDigest: Schema.brand<Schema.String, string>;
447
+ readonly expectedRevision: Schema.brand<Schema.String, "Revision">;
448
+ readonly capabilityVersion: Schema.Int;
449
+ readonly actor: Schema.TaggedStruct<"human", {
450
+ readonly personId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PersonId">;
451
+ }>;
452
+ readonly sessionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "SessionId">;
453
+ readonly sessionPermission: Schema.Literals<readonly ["workspace-owner", "workspace-approver", "release-owner", "release-approver", "change-owner", "issue-owner", "issue-assignee", "page-owner", "author", "contributor", "reviewer", "operator", "deployment-approver", "merge-approver", "watcher"]>;
454
+ readonly sessionExpiresAt: Schema.DateTimeUtcFromString;
455
+ readonly requiredPermission: Schema.Literals<readonly ["workspace-owner", "workspace-approver", "release-owner", "release-approver", "change-owner", "issue-owner", "issue-assignee", "page-owner", "author", "contributor", "reviewer", "operator", "deployment-approver", "merge-approver", "watcher"]>;
456
+ readonly authorizedAt: Schema.DateTimeUtcFromString;
457
+ readonly expiresAt: Schema.DateTimeUtcFromString;
458
+ }, "Type"> | null;
459
+ policyEvaluation: Schema.Struct.ReadonlySide<{
460
+ readonly schemaVersion: Schema.Literal<1>;
461
+ readonly actionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionId">;
462
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
463
+ readonly policy: Schema.Struct<{
464
+ readonly policyId: Schema.brand<Schema.String, string>;
465
+ readonly policyVersion: Schema.Int;
466
+ readonly policyDigest: Schema.brand<Schema.String, string>;
467
+ readonly requiredPermission: Schema.Literals<readonly ["workspace-owner", "workspace-approver", "release-owner", "release-approver", "change-owner", "issue-owner", "issue-assignee", "page-owner", "author", "contributor", "reviewer", "operator", "deployment-approver", "merge-approver", "watcher"]>;
468
+ }>;
469
+ readonly payloadDigest: Schema.brand<Schema.String, "PluginActionPayloadDigest">;
470
+ readonly evidenceSetDigest: Schema.brand<Schema.String, string>;
471
+ readonly expectedRevision: Schema.brand<Schema.String, "Revision">;
472
+ readonly decision: Schema.Literals<readonly ["allowed", "denied"]>;
473
+ readonly evaluatedAt: Schema.DateTimeUtcFromString;
474
+ }, "Type"> | null;
475
+ attempt: Schema.Struct.ReadonlySide<{
476
+ readonly schemaVersion: Schema.Literal<1>;
477
+ readonly attemptId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAttemptId">;
478
+ readonly authorizationId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAuthorizationId">;
479
+ readonly actionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionId">;
480
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
481
+ readonly pluginConnectionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PluginConnectionId">;
482
+ readonly idempotencyKey: Schema.brand<Schema.String, "GovernedActionIdempotencyKey">;
483
+ readonly attemptNumber: Schema.Literal<1>;
484
+ readonly actionEnvelopeDigest: Schema.brand<Schema.String, string>;
485
+ readonly expectedRevision: Schema.brand<Schema.String, "Revision">;
486
+ readonly policyEvaluationDigest: Schema.brand<Schema.String, string>;
487
+ readonly preflight: Schema.TaggedStruct<"ready", {
488
+ readonly checkedRevision: Schema.brand<Schema.String, "Revision">;
489
+ readonly checkedAt: Schema.DateTimeUtcFromString;
490
+ }>;
491
+ readonly startedAt: Schema.DateTimeUtcFromString;
492
+ }, "Type"> | null;
493
+ }, import("../persistence/Persistence.js").PersistenceOperationFailure, never>;
494
+ readByIdempotencyKey: (input: unknown) => Effect.Effect<{
495
+ envelope: {
496
+ readonly providerId: "codecommit" | "codepipeline" | "jira" | "confluence" | "clockify";
497
+ readonly pluginConnectionId: string & import("effect/Brand").Brand<"PluginConnectionId">;
498
+ readonly workspaceId: string & import("effect/Brand").Brand<"WorkspaceId">;
499
+ readonly schemaVersion: 1;
500
+ readonly causationId: (string & import("effect/Brand").Brand<"DomainEventId">) | null;
501
+ readonly correlationId: (string & import("effect/Brand").Brand<"DomainEventCorrelationId">) | null;
502
+ readonly proposal: Schema.Struct.ReadonlySide<{
503
+ readonly proposalKey: Schema.brand<Schema.String, string>;
504
+ readonly capabilityVersion: Schema.Int;
505
+ readonly request: Schema.Struct<{
506
+ readonly actionKind: Schema.brand<Schema.String, string>;
507
+ readonly target: Schema.Struct<{
508
+ entityType: Schema.brand<Schema.String, string>;
509
+ vendorImmutableId: Schema.brand<Schema.String, "VendorImmutableId">;
510
+ }>;
511
+ readonly expectedRevision: Schema.brand<Schema.String, "Revision">;
512
+ readonly payload: Schema.Codec<Schema.Json, Schema.Json, never, never>;
513
+ readonly evidenceIds: Schema.$Array<Schema.brand<Schema.String, string>>;
514
+ }>;
515
+ readonly payloadDigest: Schema.brand<Schema.String, "PluginActionPayloadDigest">;
516
+ readonly summary: Schema.String;
517
+ readonly impact: Schema.Struct<{
518
+ readonly level: Schema.Literals<readonly ["low", "medium", "high", "critical"]>;
519
+ readonly summary: Schema.String;
520
+ }>;
521
+ readonly proposedAt: Schema.DateTimeUtcFromString;
522
+ }, "Type">;
523
+ readonly idempotencyKey: string & import("effect/Brand").Brand<"GovernedActionIdempotencyKey">;
524
+ readonly pluginId: string & import("effect/Brand").Brand<string>;
525
+ readonly actionId: string & import("effect/Brand").Brand<"GovernedActionId">;
526
+ readonly policy: Schema.Struct.ReadonlySide<{
527
+ readonly policyId: Schema.brand<Schema.String, string>;
528
+ readonly policyVersion: Schema.Int;
529
+ readonly policyDigest: Schema.brand<Schema.String, string>;
530
+ readonly requiredPermission: Schema.Literals<readonly ["workspace-owner", "workspace-approver", "release-owner", "release-approver", "change-owner", "issue-owner", "issue-assignee", "page-owner", "author", "contributor", "reviewer", "operator", "deployment-approver", "merge-approver", "watcher"]>;
531
+ }, "Type">;
532
+ readonly evidenceSetDigest: string & import("effect/Brand").Brand<string>;
533
+ readonly pluginConnectionRevision: number & import("effect/Brand").Brand<"GovernedActionPluginConnectionRevision">;
534
+ readonly pluginConnectionAuthorityDigest: string & import("effect/Brand").Brand<string>;
535
+ readonly pluginContractVersion: Schema.Struct.ReadonlySide<{
536
+ readonly major: Schema.Int;
537
+ readonly minor: Schema.Int;
538
+ readonly patch: Schema.Int;
539
+ }, "Type">;
540
+ readonly pluginAdapterVersion: Schema.Struct.ReadonlySide<{
541
+ readonly major: Schema.Int;
542
+ readonly minor: Schema.Int;
543
+ readonly patch: Schema.Int;
544
+ }, "Type">;
545
+ readonly capability: Schema.Struct.ReadonlySide<{
546
+ readonly capabilityId: Schema.Literal<"action.execute">;
547
+ readonly version: Schema.Int;
548
+ }, "Type">;
549
+ readonly targetEntityId: string & import("effect/Brand").Brand<"EntityId">;
550
+ readonly evidence: readonly Schema.Struct.ReadonlySide<{
551
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
552
+ readonly evidenceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "EvidenceId">;
553
+ readonly evidenceClaimIds: Schema.$Array<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "EvidenceClaimId">>;
554
+ readonly observedAt: Schema.DateTimeUtcFromString;
555
+ readonly validUntil: Schema.NullOr<Schema.DateTimeUtcFromString>;
556
+ readonly currentUntil: Schema.NullOr<Schema.DateTimeUtcFromString>;
557
+ readonly evaluatedAt: Schema.DateTimeUtcFromString;
558
+ readonly source: Schema.Literals<readonly ["current", "stale", "missing", "unavailable"]>;
559
+ readonly validity: Schema.Literals<readonly ["valid", "expired"]>;
560
+ }, "Type">[];
561
+ readonly origin: Schema.Struct.ReadonlySide<{
562
+ readonly _tag: Schema.tag<"human">;
563
+ readonly actor: Schema.TaggedStruct<"human", {
564
+ readonly personId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PersonId">;
565
+ }>;
566
+ readonly sessionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "SessionId">;
567
+ }, "Type"> | Schema.Struct.ReadonlySide<{
568
+ readonly _tag: Schema.tag<"agent">;
569
+ readonly actor: Schema.TaggedStruct<"agent", {
570
+ readonly agentId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "AgentId">;
571
+ }>;
572
+ readonly jobId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "JobId">;
573
+ readonly initiatingSessionId: Schema.NullOr<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "SessionId">>;
574
+ }, "Type">;
575
+ readonly proposalExpiresAt: DateTime.Utc;
576
+ readonly envelopeDigest: string & import("effect/Brand").Brand<string>;
577
+ readonly releasePublication?: {
578
+ readonly releaseId: string & import("effect/Brand").Brand<"ReleaseId">;
579
+ readonly sourceRevisionDigest: string & import("effect/Brand").Brand<string>;
580
+ readonly sourceRevisionCount: number;
581
+ readonly predecessorPublicationActionId?: (string & import("effect/Brand").Brand<"GovernedActionId">) | null;
582
+ };
583
+ };
584
+ head: Schema.Struct.ReadonlySide<{
585
+ readonly state: Schema.Literals<readonly ["proposed", "authorized", "denied", "expired", "cancelled", "started", "cancel-requested", "cancel-requested-unknown", "succeeded", "failed", "unknown"]>;
586
+ readonly lineage: Schema.TaggedUnion<{
587
+ readonly accepted: Schema.TaggedStruct<"accepted", {
588
+ readonly receipt: Schema.Struct<{
589
+ readonly status: Schema.Literal<"accepted">;
590
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
591
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
592
+ readonly safeSummary: Schema.String;
593
+ readonly observedAt: Schema.DateTimeUtcFromString;
594
+ }>;
595
+ }>;
596
+ readonly reconcilable: Schema.TaggedStruct<"reconcilable", {
597
+ readonly providerOperationId: Schema.NullOr<Schema.brand<Schema.String, string>>;
598
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
599
+ }>;
600
+ readonly manual: Schema.TaggedStruct<"manual", {
601
+ readonly providerOperationId: Schema.NullOr<Schema.brand<Schema.String, string>>;
602
+ }>;
603
+ readonly none: Schema.TaggedStruct<"none", {}>;
604
+ readonly terminal: Schema.TaggedStruct<"terminal", {
605
+ readonly receipt: Schema.Struct<{
606
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
607
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
608
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
609
+ readonly safeSummary: Schema.String;
610
+ readonly observedAt: Schema.DateTimeUtcFromString;
611
+ }>;
612
+ }>;
613
+ }>;
614
+ }, "Type">;
615
+ headTransition: Schema.Struct.ReadonlySide<{
616
+ readonly commandDigest: Schema.brand<Schema.String, "GovernedActionCommandDigest">;
617
+ readonly schemaVersion: Schema.Literal<1>;
618
+ readonly transitionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionTransitionId">;
619
+ readonly previousTransitionId: Schema.NullOr<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionTransitionId">>;
620
+ readonly commandId: Schema.brand<Schema.String, string>;
621
+ readonly actionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionId">;
622
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
623
+ readonly sequence: Schema.Int;
624
+ readonly fromState: Schema.NullOr<Schema.Literals<readonly ["proposed", "authorized", "denied", "expired", "cancelled", "started", "cancel-requested", "cancel-requested-unknown", "succeeded", "failed", "unknown"]>>;
625
+ readonly toState: Schema.Literals<readonly ["proposed", "authorized", "denied", "expired", "cancelled", "started", "cancel-requested", "cancel-requested-unknown", "succeeded", "failed", "unknown"]>;
626
+ readonly actionEnvelopeDigest: Schema.brand<Schema.String, string>;
627
+ readonly command: Schema.TaggedUnion<{
628
+ readonly propose: Schema.TaggedStruct<"propose", {}>;
629
+ readonly authorize: Schema.TaggedStruct<"authorize", {
630
+ readonly authorizationId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAuthorizationId">;
631
+ }>;
632
+ readonly deny: Schema.TaggedStruct<"deny", {
633
+ readonly reason: Schema.Literals<readonly ["revision-changed", "evidence-stale", "evidence-invalid", "policy-denied", "session-invalid", "capability-changed", "plugin-unavailable", "preflight-blocked"]>;
634
+ readonly safeSummary: Schema.String;
635
+ }>;
636
+ readonly expire: Schema.TaggedStruct<"expire", {
637
+ readonly reason: Schema.Literals<readonly ["proposal-expired", "authorization-expired"]>;
638
+ }>;
639
+ readonly cancel: Schema.TaggedStruct<"cancel", {
640
+ readonly safeSummary: Schema.String;
641
+ }>;
642
+ readonly start: Schema.TaggedStruct<"start", {
643
+ readonly attemptId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAttemptId">;
644
+ }>;
645
+ readonly requestCancellation: Schema.TaggedStruct<"requestCancellation", {
646
+ readonly safeSummary: Schema.String;
647
+ }>;
648
+ readonly recordAccepted: Schema.TaggedStruct<"recordAccepted", {
649
+ readonly receipt: Schema.Struct<{
650
+ readonly status: Schema.Literal<"accepted">;
651
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
652
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
653
+ readonly safeSummary: Schema.String;
654
+ readonly observedAt: Schema.DateTimeUtcFromString;
655
+ }>;
656
+ }>;
657
+ readonly recordSucceeded: Schema.TaggedStruct<"recordSucceeded", {
658
+ readonly receipt: Schema.Struct<{
659
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
660
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
661
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
662
+ readonly safeSummary: Schema.String;
663
+ readonly observedAt: Schema.DateTimeUtcFromString;
664
+ }>;
665
+ readonly source: Schema.TaggedUnion<{
666
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
667
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
668
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
669
+ }>;
670
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
671
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
672
+ }>;
673
+ }>;
674
+ }>;
675
+ readonly recordFailed: Schema.TaggedStruct<"recordFailed", {
676
+ readonly receipt: Schema.Struct<{
677
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
678
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
679
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
680
+ readonly safeSummary: Schema.String;
681
+ readonly observedAt: Schema.DateTimeUtcFromString;
682
+ }>;
683
+ readonly source: Schema.TaggedUnion<{
684
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
685
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
686
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
687
+ }>;
688
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
689
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
690
+ }>;
691
+ }>;
692
+ }>;
693
+ readonly recordUnknown: Schema.TaggedStruct<"recordUnknown", {
694
+ readonly outcome: Schema.TaggedUnion<{
695
+ readonly reconcilable: Schema.TaggedStruct<"reconcilable", {
696
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
697
+ readonly observedAt: Schema.DateTimeUtcFromString;
698
+ readonly safeSummary: Schema.String;
699
+ }>;
700
+ readonly manual: Schema.TaggedStruct<"manual", {
701
+ readonly observedAt: Schema.DateTimeUtcFromString;
702
+ readonly safeSummary: Schema.String;
703
+ readonly reason: Schema.Literals<readonly ["dispatch-deadline-exceeded", "interrupted-after-intent", "provider-defect-after-intent", "malformed-provider-result", "receipt-persistence-failed", "missing-reconciliation-locator"]>;
704
+ }>;
705
+ }>;
706
+ }>;
707
+ readonly recordCancelled: Schema.TaggedStruct<"recordCancelled", {
708
+ readonly receipt: Schema.Struct<{
709
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
710
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
711
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
712
+ readonly safeSummary: Schema.String;
713
+ readonly observedAt: Schema.DateTimeUtcFromString;
714
+ }>;
715
+ readonly source: Schema.TaggedUnion<{
716
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
717
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
718
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
719
+ }>;
720
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
721
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
722
+ }>;
723
+ }>;
724
+ }>;
725
+ readonly reconciliationPending: Schema.TaggedStruct<"reconciliationPending", {
726
+ readonly checkedAt: Schema.DateTimeUtcFromString;
727
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
728
+ }>;
729
+ }>;
730
+ readonly cause: Schema.TaggedUnion<{
731
+ readonly human: Schema.TaggedStruct<"human", {
732
+ readonly actor: Schema.TaggedStruct<"human", {
733
+ readonly personId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PersonId">;
734
+ }>;
735
+ readonly sessionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "SessionId">;
736
+ }>;
737
+ readonly agent: Schema.TaggedStruct<"agent", {
738
+ readonly actor: Schema.TaggedStruct<"agent", {
739
+ readonly agentId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "AgentId">;
740
+ }>;
741
+ readonly jobId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "JobId">;
742
+ }>;
743
+ readonly system: Schema.TaggedStruct<"system", {
744
+ readonly component: Schema.brand<Schema.String, string>;
745
+ }>;
746
+ }>;
747
+ readonly occurredAt: Schema.DateTimeUtcFromString;
748
+ readonly causationId: Schema.NullOr<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "DomainEventId">>;
749
+ readonly correlationId: Schema.NullOr<Schema.brand<Schema.String, "DomainEventCorrelationId">>;
750
+ }, "Type">;
751
+ history: Schema.Struct.ReadonlySide<{
752
+ readonly commandDigest: Schema.brand<Schema.String, "GovernedActionCommandDigest">;
753
+ readonly schemaVersion: Schema.Literal<1>;
754
+ readonly transitionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionTransitionId">;
755
+ readonly previousTransitionId: Schema.NullOr<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionTransitionId">>;
756
+ readonly commandId: Schema.brand<Schema.String, string>;
757
+ readonly actionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionId">;
758
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
759
+ readonly sequence: Schema.Int;
760
+ readonly fromState: Schema.NullOr<Schema.Literals<readonly ["proposed", "authorized", "denied", "expired", "cancelled", "started", "cancel-requested", "cancel-requested-unknown", "succeeded", "failed", "unknown"]>>;
761
+ readonly toState: Schema.Literals<readonly ["proposed", "authorized", "denied", "expired", "cancelled", "started", "cancel-requested", "cancel-requested-unknown", "succeeded", "failed", "unknown"]>;
762
+ readonly actionEnvelopeDigest: Schema.brand<Schema.String, string>;
763
+ readonly command: Schema.TaggedUnion<{
764
+ readonly propose: Schema.TaggedStruct<"propose", {}>;
765
+ readonly authorize: Schema.TaggedStruct<"authorize", {
766
+ readonly authorizationId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAuthorizationId">;
767
+ }>;
768
+ readonly deny: Schema.TaggedStruct<"deny", {
769
+ readonly reason: Schema.Literals<readonly ["revision-changed", "evidence-stale", "evidence-invalid", "policy-denied", "session-invalid", "capability-changed", "plugin-unavailable", "preflight-blocked"]>;
770
+ readonly safeSummary: Schema.String;
771
+ }>;
772
+ readonly expire: Schema.TaggedStruct<"expire", {
773
+ readonly reason: Schema.Literals<readonly ["proposal-expired", "authorization-expired"]>;
774
+ }>;
775
+ readonly cancel: Schema.TaggedStruct<"cancel", {
776
+ readonly safeSummary: Schema.String;
777
+ }>;
778
+ readonly start: Schema.TaggedStruct<"start", {
779
+ readonly attemptId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAttemptId">;
780
+ }>;
781
+ readonly requestCancellation: Schema.TaggedStruct<"requestCancellation", {
782
+ readonly safeSummary: Schema.String;
783
+ }>;
784
+ readonly recordAccepted: Schema.TaggedStruct<"recordAccepted", {
785
+ readonly receipt: Schema.Struct<{
786
+ readonly status: Schema.Literal<"accepted">;
787
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
788
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
789
+ readonly safeSummary: Schema.String;
790
+ readonly observedAt: Schema.DateTimeUtcFromString;
791
+ }>;
792
+ }>;
793
+ readonly recordSucceeded: Schema.TaggedStruct<"recordSucceeded", {
794
+ readonly receipt: Schema.Struct<{
795
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
796
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
797
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
798
+ readonly safeSummary: Schema.String;
799
+ readonly observedAt: Schema.DateTimeUtcFromString;
800
+ }>;
801
+ readonly source: Schema.TaggedUnion<{
802
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
803
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
804
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
805
+ }>;
806
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
807
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
808
+ }>;
809
+ }>;
810
+ }>;
811
+ readonly recordFailed: Schema.TaggedStruct<"recordFailed", {
812
+ readonly receipt: Schema.Struct<{
813
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
814
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
815
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
816
+ readonly safeSummary: Schema.String;
817
+ readonly observedAt: Schema.DateTimeUtcFromString;
818
+ }>;
819
+ readonly source: Schema.TaggedUnion<{
820
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
821
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
822
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
823
+ }>;
824
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
825
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
826
+ }>;
827
+ }>;
828
+ }>;
829
+ readonly recordUnknown: Schema.TaggedStruct<"recordUnknown", {
830
+ readonly outcome: Schema.TaggedUnion<{
831
+ readonly reconcilable: Schema.TaggedStruct<"reconcilable", {
832
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
833
+ readonly observedAt: Schema.DateTimeUtcFromString;
834
+ readonly safeSummary: Schema.String;
835
+ }>;
836
+ readonly manual: Schema.TaggedStruct<"manual", {
837
+ readonly observedAt: Schema.DateTimeUtcFromString;
838
+ readonly safeSummary: Schema.String;
839
+ readonly reason: Schema.Literals<readonly ["dispatch-deadline-exceeded", "interrupted-after-intent", "provider-defect-after-intent", "malformed-provider-result", "receipt-persistence-failed", "missing-reconciliation-locator"]>;
840
+ }>;
841
+ }>;
842
+ }>;
843
+ readonly recordCancelled: Schema.TaggedStruct<"recordCancelled", {
844
+ readonly receipt: Schema.Struct<{
845
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
846
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
847
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
848
+ readonly safeSummary: Schema.String;
849
+ readonly observedAt: Schema.DateTimeUtcFromString;
850
+ }>;
851
+ readonly source: Schema.TaggedUnion<{
852
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
853
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
854
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
855
+ }>;
856
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
857
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
858
+ }>;
859
+ }>;
860
+ }>;
861
+ readonly reconciliationPending: Schema.TaggedStruct<"reconciliationPending", {
862
+ readonly checkedAt: Schema.DateTimeUtcFromString;
863
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
864
+ }>;
865
+ }>;
866
+ readonly cause: Schema.TaggedUnion<{
867
+ readonly human: Schema.TaggedStruct<"human", {
868
+ readonly actor: Schema.TaggedStruct<"human", {
869
+ readonly personId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PersonId">;
870
+ }>;
871
+ readonly sessionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "SessionId">;
872
+ }>;
873
+ readonly agent: Schema.TaggedStruct<"agent", {
874
+ readonly actor: Schema.TaggedStruct<"agent", {
875
+ readonly agentId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "AgentId">;
876
+ }>;
877
+ readonly jobId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "JobId">;
878
+ }>;
879
+ readonly system: Schema.TaggedStruct<"system", {
880
+ readonly component: Schema.brand<Schema.String, string>;
881
+ }>;
882
+ }>;
883
+ readonly occurredAt: Schema.DateTimeUtcFromString;
884
+ readonly causationId: Schema.NullOr<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "DomainEventId">>;
885
+ readonly correlationId: Schema.NullOr<Schema.brand<Schema.String, "DomainEventCorrelationId">>;
886
+ }, "Type">[];
887
+ authorization: Schema.Struct.ReadonlySide<{
888
+ readonly schemaVersion: Schema.Literal<1>;
889
+ readonly authorizationId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAuthorizationId">;
890
+ readonly actionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionId">;
891
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
892
+ readonly pluginConnectionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PluginConnectionId">;
893
+ readonly pluginConnectionRevision: Schema.brand<Schema.Int, "GovernedActionPluginConnectionRevision">;
894
+ readonly pluginConnectionAuthorityDigest: Schema.brand<Schema.String, string>;
895
+ readonly actionEnvelopeDigest: Schema.brand<Schema.String, string>;
896
+ readonly idempotencyKey: Schema.brand<Schema.String, "GovernedActionIdempotencyKey">;
897
+ readonly payloadDigest: Schema.brand<Schema.String, "PluginActionPayloadDigest">;
898
+ readonly evidenceSetDigest: Schema.brand<Schema.String, string>;
899
+ readonly policyDigest: Schema.brand<Schema.String, string>;
900
+ readonly expectedRevision: Schema.brand<Schema.String, "Revision">;
901
+ readonly capabilityVersion: Schema.Int;
902
+ readonly actor: Schema.TaggedStruct<"human", {
903
+ readonly personId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PersonId">;
904
+ }>;
905
+ readonly sessionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "SessionId">;
906
+ readonly sessionPermission: Schema.Literals<readonly ["workspace-owner", "workspace-approver", "release-owner", "release-approver", "change-owner", "issue-owner", "issue-assignee", "page-owner", "author", "contributor", "reviewer", "operator", "deployment-approver", "merge-approver", "watcher"]>;
907
+ readonly sessionExpiresAt: Schema.DateTimeUtcFromString;
908
+ readonly requiredPermission: Schema.Literals<readonly ["workspace-owner", "workspace-approver", "release-owner", "release-approver", "change-owner", "issue-owner", "issue-assignee", "page-owner", "author", "contributor", "reviewer", "operator", "deployment-approver", "merge-approver", "watcher"]>;
909
+ readonly authorizedAt: Schema.DateTimeUtcFromString;
910
+ readonly expiresAt: Schema.DateTimeUtcFromString;
911
+ }, "Type"> | null;
912
+ policyEvaluation: Schema.Struct.ReadonlySide<{
913
+ readonly schemaVersion: Schema.Literal<1>;
914
+ readonly actionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionId">;
915
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
916
+ readonly policy: Schema.Struct<{
917
+ readonly policyId: Schema.brand<Schema.String, string>;
918
+ readonly policyVersion: Schema.Int;
919
+ readonly policyDigest: Schema.brand<Schema.String, string>;
920
+ readonly requiredPermission: Schema.Literals<readonly ["workspace-owner", "workspace-approver", "release-owner", "release-approver", "change-owner", "issue-owner", "issue-assignee", "page-owner", "author", "contributor", "reviewer", "operator", "deployment-approver", "merge-approver", "watcher"]>;
921
+ }>;
922
+ readonly payloadDigest: Schema.brand<Schema.String, "PluginActionPayloadDigest">;
923
+ readonly evidenceSetDigest: Schema.brand<Schema.String, string>;
924
+ readonly expectedRevision: Schema.brand<Schema.String, "Revision">;
925
+ readonly decision: Schema.Literals<readonly ["allowed", "denied"]>;
926
+ readonly evaluatedAt: Schema.DateTimeUtcFromString;
927
+ }, "Type"> | null;
928
+ attempt: Schema.Struct.ReadonlySide<{
929
+ readonly schemaVersion: Schema.Literal<1>;
930
+ readonly attemptId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAttemptId">;
931
+ readonly authorizationId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAuthorizationId">;
932
+ readonly actionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionId">;
933
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
934
+ readonly pluginConnectionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PluginConnectionId">;
935
+ readonly idempotencyKey: Schema.brand<Schema.String, "GovernedActionIdempotencyKey">;
936
+ readonly attemptNumber: Schema.Literal<1>;
937
+ readonly actionEnvelopeDigest: Schema.brand<Schema.String, string>;
938
+ readonly expectedRevision: Schema.brand<Schema.String, "Revision">;
939
+ readonly policyEvaluationDigest: Schema.brand<Schema.String, string>;
940
+ readonly preflight: Schema.TaggedStruct<"ready", {
941
+ readonly checkedRevision: Schema.brand<Schema.String, "Revision">;
942
+ readonly checkedAt: Schema.DateTimeUtcFromString;
943
+ }>;
944
+ readonly startedAt: Schema.DateTimeUtcFromString;
945
+ }, "Type"> | null;
946
+ }, import("../persistence/Persistence.js").PersistenceOperationFailure, never>;
947
+ readLatestTerminalByTarget: (input: unknown) => Effect.Effect<readonly Schema.Struct.ReadonlySide<{
948
+ readonly envelope: Schema.Struct<{
949
+ readonly envelopeDigest: Schema.brand<Schema.String, string>;
950
+ readonly schemaVersion: Schema.Literal<1>;
951
+ readonly actionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionId">;
952
+ readonly idempotencyKey: Schema.brand<Schema.String, "GovernedActionIdempotencyKey">;
953
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
954
+ readonly pluginConnectionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PluginConnectionId">;
955
+ readonly pluginConnectionRevision: Schema.brand<Schema.Int, "GovernedActionPluginConnectionRevision">;
956
+ readonly pluginConnectionAuthorityDigest: Schema.brand<Schema.String, string>;
957
+ readonly pluginId: Schema.brand<Schema.String, string>;
958
+ readonly pluginContractVersion: Schema.Struct<{
959
+ readonly major: Schema.Int;
960
+ readonly minor: Schema.Int;
961
+ readonly patch: Schema.Int;
962
+ }>;
963
+ readonly pluginAdapterVersion: Schema.Struct<{
964
+ readonly major: Schema.Int;
965
+ readonly minor: Schema.Int;
966
+ readonly patch: Schema.Int;
967
+ }>;
968
+ readonly providerId: Schema.Literals<readonly ["codecommit", "codepipeline", "jira", "confluence", "clockify"]>;
969
+ readonly capability: Schema.Struct<{
970
+ readonly capabilityId: Schema.Literal<"action.execute">;
971
+ readonly version: Schema.Int;
972
+ }>;
973
+ readonly targetEntityId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "EntityId">;
974
+ readonly proposal: Schema.Struct<{
975
+ readonly proposalKey: Schema.brand<Schema.String, string>;
976
+ readonly capabilityVersion: Schema.Int;
977
+ readonly request: Schema.Struct<{
978
+ readonly actionKind: Schema.brand<Schema.String, string>;
979
+ readonly target: Schema.Struct<{
980
+ entityType: Schema.brand<Schema.String, string>;
981
+ vendorImmutableId: Schema.brand<Schema.String, "VendorImmutableId">;
982
+ }>;
983
+ readonly expectedRevision: Schema.brand<Schema.String, "Revision">;
984
+ readonly payload: Schema.Codec<Schema.Json, Schema.Json, never, never>;
985
+ readonly evidenceIds: Schema.$Array<Schema.brand<Schema.String, string>>;
986
+ }>;
987
+ readonly payloadDigest: Schema.brand<Schema.String, "PluginActionPayloadDigest">;
988
+ readonly summary: Schema.String;
989
+ readonly impact: Schema.Struct<{
990
+ readonly level: Schema.Literals<readonly ["low", "medium", "high", "critical"]>;
991
+ readonly summary: Schema.String;
992
+ }>;
993
+ readonly proposedAt: Schema.DateTimeUtcFromString;
994
+ }>;
995
+ readonly evidence: Schema.$Array<Schema.Struct<{
996
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
997
+ readonly evidenceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "EvidenceId">;
998
+ readonly evidenceClaimIds: Schema.$Array<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "EvidenceClaimId">>;
999
+ readonly observedAt: Schema.DateTimeUtcFromString;
1000
+ readonly validUntil: Schema.NullOr<Schema.DateTimeUtcFromString>;
1001
+ readonly currentUntil: Schema.NullOr<Schema.DateTimeUtcFromString>;
1002
+ readonly evaluatedAt: Schema.DateTimeUtcFromString;
1003
+ readonly source: Schema.Literals<readonly ["current", "stale", "missing", "unavailable"]>;
1004
+ readonly validity: Schema.Literals<readonly ["valid", "expired"]>;
1005
+ }>>;
1006
+ readonly evidenceSetDigest: Schema.brand<Schema.String, string>;
1007
+ readonly policy: Schema.Struct<{
1008
+ readonly policyId: Schema.brand<Schema.String, string>;
1009
+ readonly policyVersion: Schema.Int;
1010
+ readonly policyDigest: Schema.brand<Schema.String, string>;
1011
+ readonly requiredPermission: Schema.Literals<readonly ["workspace-owner", "workspace-approver", "release-owner", "release-approver", "change-owner", "issue-owner", "issue-assignee", "page-owner", "author", "contributor", "reviewer", "operator", "deployment-approver", "merge-approver", "watcher"]>;
1012
+ }>;
1013
+ readonly origin: Schema.TaggedUnion<{
1014
+ readonly human: Schema.TaggedStruct<"human", {
1015
+ readonly actor: Schema.TaggedStruct<"human", {
1016
+ readonly personId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PersonId">;
1017
+ }>;
1018
+ readonly sessionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "SessionId">;
1019
+ }>;
1020
+ readonly agent: Schema.TaggedStruct<"agent", {
1021
+ readonly actor: Schema.TaggedStruct<"agent", {
1022
+ readonly agentId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "AgentId">;
1023
+ }>;
1024
+ readonly jobId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "JobId">;
1025
+ readonly initiatingSessionId: Schema.NullOr<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "SessionId">>;
1026
+ }>;
1027
+ }>;
1028
+ readonly proposalExpiresAt: Schema.DateTimeUtcFromString;
1029
+ readonly causationId: Schema.NullOr<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "DomainEventId">>;
1030
+ readonly correlationId: Schema.NullOr<Schema.brand<Schema.String, "DomainEventCorrelationId">>;
1031
+ readonly releasePublication: Schema.optionalKey<Schema.Struct<{
1032
+ readonly releaseId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "ReleaseId">;
1033
+ readonly predecessorPublicationActionId: Schema.optionalKey<Schema.NullOr<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionId">>>;
1034
+ readonly sourceRevisionDigest: Schema.brand<Schema.String, string>;
1035
+ readonly sourceRevisionCount: Schema.Int;
1036
+ }>>;
1037
+ }>;
1038
+ readonly head: Schema.Struct<{
1039
+ readonly state: Schema.Literals<readonly ["proposed", "authorized", "denied", "expired", "cancelled", "started", "cancel-requested", "cancel-requested-unknown", "succeeded", "failed", "unknown"]>;
1040
+ readonly lineage: Schema.TaggedUnion<{
1041
+ readonly accepted: Schema.TaggedStruct<"accepted", {
1042
+ readonly receipt: Schema.Struct<{
1043
+ readonly status: Schema.Literal<"accepted">;
1044
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
1045
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
1046
+ readonly safeSummary: Schema.String;
1047
+ readonly observedAt: Schema.DateTimeUtcFromString;
1048
+ }>;
1049
+ }>;
1050
+ readonly reconcilable: Schema.TaggedStruct<"reconcilable", {
1051
+ readonly providerOperationId: Schema.NullOr<Schema.brand<Schema.String, string>>;
1052
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
1053
+ }>;
1054
+ readonly manual: Schema.TaggedStruct<"manual", {
1055
+ readonly providerOperationId: Schema.NullOr<Schema.brand<Schema.String, string>>;
1056
+ }>;
1057
+ readonly none: Schema.TaggedStruct<"none", {}>;
1058
+ readonly terminal: Schema.TaggedStruct<"terminal", {
1059
+ readonly receipt: Schema.Struct<{
1060
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
1061
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
1062
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
1063
+ readonly safeSummary: Schema.String;
1064
+ readonly observedAt: Schema.DateTimeUtcFromString;
1065
+ }>;
1066
+ }>;
1067
+ }>;
1068
+ }>;
1069
+ readonly headTransition: Schema.Struct<{
1070
+ readonly commandDigest: Schema.brand<Schema.String, "GovernedActionCommandDigest">;
1071
+ readonly schemaVersion: Schema.Literal<1>;
1072
+ readonly transitionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionTransitionId">;
1073
+ readonly previousTransitionId: Schema.NullOr<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionTransitionId">>;
1074
+ readonly commandId: Schema.brand<Schema.String, string>;
1075
+ readonly actionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionId">;
1076
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
1077
+ readonly sequence: Schema.Int;
1078
+ readonly fromState: Schema.NullOr<Schema.Literals<readonly ["proposed", "authorized", "denied", "expired", "cancelled", "started", "cancel-requested", "cancel-requested-unknown", "succeeded", "failed", "unknown"]>>;
1079
+ readonly toState: Schema.Literals<readonly ["proposed", "authorized", "denied", "expired", "cancelled", "started", "cancel-requested", "cancel-requested-unknown", "succeeded", "failed", "unknown"]>;
1080
+ readonly actionEnvelopeDigest: Schema.brand<Schema.String, string>;
1081
+ readonly command: Schema.TaggedUnion<{
1082
+ readonly propose: Schema.TaggedStruct<"propose", {}>;
1083
+ readonly authorize: Schema.TaggedStruct<"authorize", {
1084
+ readonly authorizationId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAuthorizationId">;
1085
+ }>;
1086
+ readonly deny: Schema.TaggedStruct<"deny", {
1087
+ readonly reason: Schema.Literals<readonly ["revision-changed", "evidence-stale", "evidence-invalid", "policy-denied", "session-invalid", "capability-changed", "plugin-unavailable", "preflight-blocked"]>;
1088
+ readonly safeSummary: Schema.String;
1089
+ }>;
1090
+ readonly expire: Schema.TaggedStruct<"expire", {
1091
+ readonly reason: Schema.Literals<readonly ["proposal-expired", "authorization-expired"]>;
1092
+ }>;
1093
+ readonly cancel: Schema.TaggedStruct<"cancel", {
1094
+ readonly safeSummary: Schema.String;
1095
+ }>;
1096
+ readonly start: Schema.TaggedStruct<"start", {
1097
+ readonly attemptId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAttemptId">;
1098
+ }>;
1099
+ readonly requestCancellation: Schema.TaggedStruct<"requestCancellation", {
1100
+ readonly safeSummary: Schema.String;
1101
+ }>;
1102
+ readonly recordAccepted: Schema.TaggedStruct<"recordAccepted", {
1103
+ readonly receipt: Schema.Struct<{
1104
+ readonly status: Schema.Literal<"accepted">;
1105
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
1106
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
1107
+ readonly safeSummary: Schema.String;
1108
+ readonly observedAt: Schema.DateTimeUtcFromString;
1109
+ }>;
1110
+ }>;
1111
+ readonly recordSucceeded: Schema.TaggedStruct<"recordSucceeded", {
1112
+ readonly receipt: Schema.Struct<{
1113
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
1114
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
1115
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
1116
+ readonly safeSummary: Schema.String;
1117
+ readonly observedAt: Schema.DateTimeUtcFromString;
1118
+ }>;
1119
+ readonly source: Schema.TaggedUnion<{
1120
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
1121
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
1122
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
1123
+ }>;
1124
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
1125
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
1126
+ }>;
1127
+ }>;
1128
+ }>;
1129
+ readonly recordFailed: Schema.TaggedStruct<"recordFailed", {
1130
+ readonly receipt: Schema.Struct<{
1131
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
1132
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
1133
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
1134
+ readonly safeSummary: Schema.String;
1135
+ readonly observedAt: Schema.DateTimeUtcFromString;
1136
+ }>;
1137
+ readonly source: Schema.TaggedUnion<{
1138
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
1139
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
1140
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
1141
+ }>;
1142
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
1143
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
1144
+ }>;
1145
+ }>;
1146
+ }>;
1147
+ readonly recordUnknown: Schema.TaggedStruct<"recordUnknown", {
1148
+ readonly outcome: Schema.TaggedUnion<{
1149
+ readonly reconcilable: Schema.TaggedStruct<"reconcilable", {
1150
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
1151
+ readonly observedAt: Schema.DateTimeUtcFromString;
1152
+ readonly safeSummary: Schema.String;
1153
+ }>;
1154
+ readonly manual: Schema.TaggedStruct<"manual", {
1155
+ readonly observedAt: Schema.DateTimeUtcFromString;
1156
+ readonly safeSummary: Schema.String;
1157
+ readonly reason: Schema.Literals<readonly ["dispatch-deadline-exceeded", "interrupted-after-intent", "provider-defect-after-intent", "malformed-provider-result", "receipt-persistence-failed", "missing-reconciliation-locator"]>;
1158
+ }>;
1159
+ }>;
1160
+ }>;
1161
+ readonly recordCancelled: Schema.TaggedStruct<"recordCancelled", {
1162
+ readonly receipt: Schema.Struct<{
1163
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
1164
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
1165
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
1166
+ readonly safeSummary: Schema.String;
1167
+ readonly observedAt: Schema.DateTimeUtcFromString;
1168
+ }>;
1169
+ readonly source: Schema.TaggedUnion<{
1170
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
1171
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
1172
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
1173
+ }>;
1174
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
1175
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
1176
+ }>;
1177
+ }>;
1178
+ }>;
1179
+ readonly reconciliationPending: Schema.TaggedStruct<"reconciliationPending", {
1180
+ readonly checkedAt: Schema.DateTimeUtcFromString;
1181
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
1182
+ }>;
1183
+ }>;
1184
+ readonly cause: Schema.TaggedUnion<{
1185
+ readonly human: Schema.TaggedStruct<"human", {
1186
+ readonly actor: Schema.TaggedStruct<"human", {
1187
+ readonly personId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PersonId">;
1188
+ }>;
1189
+ readonly sessionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "SessionId">;
1190
+ }>;
1191
+ readonly agent: Schema.TaggedStruct<"agent", {
1192
+ readonly actor: Schema.TaggedStruct<"agent", {
1193
+ readonly agentId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "AgentId">;
1194
+ }>;
1195
+ readonly jobId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "JobId">;
1196
+ }>;
1197
+ readonly system: Schema.TaggedStruct<"system", {
1198
+ readonly component: Schema.brand<Schema.String, string>;
1199
+ }>;
1200
+ }>;
1201
+ readonly occurredAt: Schema.DateTimeUtcFromString;
1202
+ readonly causationId: Schema.NullOr<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "DomainEventId">>;
1203
+ readonly correlationId: Schema.NullOr<Schema.brand<Schema.String, "DomainEventCorrelationId">>;
1204
+ }>;
1205
+ readonly history: Schema.$Array<Schema.Struct<{
1206
+ readonly commandDigest: Schema.brand<Schema.String, "GovernedActionCommandDigest">;
1207
+ readonly schemaVersion: Schema.Literal<1>;
1208
+ readonly transitionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionTransitionId">;
1209
+ readonly previousTransitionId: Schema.NullOr<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionTransitionId">>;
1210
+ readonly commandId: Schema.brand<Schema.String, string>;
1211
+ readonly actionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionId">;
1212
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
1213
+ readonly sequence: Schema.Int;
1214
+ readonly fromState: Schema.NullOr<Schema.Literals<readonly ["proposed", "authorized", "denied", "expired", "cancelled", "started", "cancel-requested", "cancel-requested-unknown", "succeeded", "failed", "unknown"]>>;
1215
+ readonly toState: Schema.Literals<readonly ["proposed", "authorized", "denied", "expired", "cancelled", "started", "cancel-requested", "cancel-requested-unknown", "succeeded", "failed", "unknown"]>;
1216
+ readonly actionEnvelopeDigest: Schema.brand<Schema.String, string>;
1217
+ readonly command: Schema.TaggedUnion<{
1218
+ readonly propose: Schema.TaggedStruct<"propose", {}>;
1219
+ readonly authorize: Schema.TaggedStruct<"authorize", {
1220
+ readonly authorizationId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAuthorizationId">;
1221
+ }>;
1222
+ readonly deny: Schema.TaggedStruct<"deny", {
1223
+ readonly reason: Schema.Literals<readonly ["revision-changed", "evidence-stale", "evidence-invalid", "policy-denied", "session-invalid", "capability-changed", "plugin-unavailable", "preflight-blocked"]>;
1224
+ readonly safeSummary: Schema.String;
1225
+ }>;
1226
+ readonly expire: Schema.TaggedStruct<"expire", {
1227
+ readonly reason: Schema.Literals<readonly ["proposal-expired", "authorization-expired"]>;
1228
+ }>;
1229
+ readonly cancel: Schema.TaggedStruct<"cancel", {
1230
+ readonly safeSummary: Schema.String;
1231
+ }>;
1232
+ readonly start: Schema.TaggedStruct<"start", {
1233
+ readonly attemptId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAttemptId">;
1234
+ }>;
1235
+ readonly requestCancellation: Schema.TaggedStruct<"requestCancellation", {
1236
+ readonly safeSummary: Schema.String;
1237
+ }>;
1238
+ readonly recordAccepted: Schema.TaggedStruct<"recordAccepted", {
1239
+ readonly receipt: Schema.Struct<{
1240
+ readonly status: Schema.Literal<"accepted">;
1241
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
1242
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
1243
+ readonly safeSummary: Schema.String;
1244
+ readonly observedAt: Schema.DateTimeUtcFromString;
1245
+ }>;
1246
+ }>;
1247
+ readonly recordSucceeded: Schema.TaggedStruct<"recordSucceeded", {
1248
+ readonly receipt: Schema.Struct<{
1249
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
1250
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
1251
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
1252
+ readonly safeSummary: Schema.String;
1253
+ readonly observedAt: Schema.DateTimeUtcFromString;
1254
+ }>;
1255
+ readonly source: Schema.TaggedUnion<{
1256
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
1257
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
1258
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
1259
+ }>;
1260
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
1261
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
1262
+ }>;
1263
+ }>;
1264
+ }>;
1265
+ readonly recordFailed: Schema.TaggedStruct<"recordFailed", {
1266
+ readonly receipt: Schema.Struct<{
1267
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
1268
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
1269
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
1270
+ readonly safeSummary: Schema.String;
1271
+ readonly observedAt: Schema.DateTimeUtcFromString;
1272
+ }>;
1273
+ readonly source: Schema.TaggedUnion<{
1274
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
1275
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
1276
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
1277
+ }>;
1278
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
1279
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
1280
+ }>;
1281
+ }>;
1282
+ }>;
1283
+ readonly recordUnknown: Schema.TaggedStruct<"recordUnknown", {
1284
+ readonly outcome: Schema.TaggedUnion<{
1285
+ readonly reconcilable: Schema.TaggedStruct<"reconcilable", {
1286
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
1287
+ readonly observedAt: Schema.DateTimeUtcFromString;
1288
+ readonly safeSummary: Schema.String;
1289
+ }>;
1290
+ readonly manual: Schema.TaggedStruct<"manual", {
1291
+ readonly observedAt: Schema.DateTimeUtcFromString;
1292
+ readonly safeSummary: Schema.String;
1293
+ readonly reason: Schema.Literals<readonly ["dispatch-deadline-exceeded", "interrupted-after-intent", "provider-defect-after-intent", "malformed-provider-result", "receipt-persistence-failed", "missing-reconciliation-locator"]>;
1294
+ }>;
1295
+ }>;
1296
+ }>;
1297
+ readonly recordCancelled: Schema.TaggedStruct<"recordCancelled", {
1298
+ readonly receipt: Schema.Struct<{
1299
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
1300
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
1301
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
1302
+ readonly safeSummary: Schema.String;
1303
+ readonly observedAt: Schema.DateTimeUtcFromString;
1304
+ }>;
1305
+ readonly source: Schema.TaggedUnion<{
1306
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
1307
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
1308
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
1309
+ }>;
1310
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
1311
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
1312
+ }>;
1313
+ }>;
1314
+ }>;
1315
+ readonly reconciliationPending: Schema.TaggedStruct<"reconciliationPending", {
1316
+ readonly checkedAt: Schema.DateTimeUtcFromString;
1317
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
1318
+ }>;
1319
+ }>;
1320
+ readonly cause: Schema.TaggedUnion<{
1321
+ readonly human: Schema.TaggedStruct<"human", {
1322
+ readonly actor: Schema.TaggedStruct<"human", {
1323
+ readonly personId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PersonId">;
1324
+ }>;
1325
+ readonly sessionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "SessionId">;
1326
+ }>;
1327
+ readonly agent: Schema.TaggedStruct<"agent", {
1328
+ readonly actor: Schema.TaggedStruct<"agent", {
1329
+ readonly agentId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "AgentId">;
1330
+ }>;
1331
+ readonly jobId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "JobId">;
1332
+ }>;
1333
+ readonly system: Schema.TaggedStruct<"system", {
1334
+ readonly component: Schema.brand<Schema.String, string>;
1335
+ }>;
1336
+ }>;
1337
+ readonly occurredAt: Schema.DateTimeUtcFromString;
1338
+ readonly causationId: Schema.NullOr<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "DomainEventId">>;
1339
+ readonly correlationId: Schema.NullOr<Schema.brand<Schema.String, "DomainEventCorrelationId">>;
1340
+ }>>;
1341
+ readonly authorization: Schema.NullOr<Schema.Struct<{
1342
+ readonly schemaVersion: Schema.Literal<1>;
1343
+ readonly authorizationId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAuthorizationId">;
1344
+ readonly actionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionId">;
1345
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
1346
+ readonly pluginConnectionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PluginConnectionId">;
1347
+ readonly pluginConnectionRevision: Schema.brand<Schema.Int, "GovernedActionPluginConnectionRevision">;
1348
+ readonly pluginConnectionAuthorityDigest: Schema.brand<Schema.String, string>;
1349
+ readonly actionEnvelopeDigest: Schema.brand<Schema.String, string>;
1350
+ readonly idempotencyKey: Schema.brand<Schema.String, "GovernedActionIdempotencyKey">;
1351
+ readonly payloadDigest: Schema.brand<Schema.String, "PluginActionPayloadDigest">;
1352
+ readonly evidenceSetDigest: Schema.brand<Schema.String, string>;
1353
+ readonly policyDigest: Schema.brand<Schema.String, string>;
1354
+ readonly expectedRevision: Schema.brand<Schema.String, "Revision">;
1355
+ readonly capabilityVersion: Schema.Int;
1356
+ readonly actor: Schema.TaggedStruct<"human", {
1357
+ readonly personId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PersonId">;
1358
+ }>;
1359
+ readonly sessionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "SessionId">;
1360
+ readonly sessionPermission: Schema.Literals<readonly ["workspace-owner", "workspace-approver", "release-owner", "release-approver", "change-owner", "issue-owner", "issue-assignee", "page-owner", "author", "contributor", "reviewer", "operator", "deployment-approver", "merge-approver", "watcher"]>;
1361
+ readonly sessionExpiresAt: Schema.DateTimeUtcFromString;
1362
+ readonly requiredPermission: Schema.Literals<readonly ["workspace-owner", "workspace-approver", "release-owner", "release-approver", "change-owner", "issue-owner", "issue-assignee", "page-owner", "author", "contributor", "reviewer", "operator", "deployment-approver", "merge-approver", "watcher"]>;
1363
+ readonly authorizedAt: Schema.DateTimeUtcFromString;
1364
+ readonly expiresAt: Schema.DateTimeUtcFromString;
1365
+ }>>;
1366
+ readonly policyEvaluation: Schema.NullOr<Schema.Struct<{
1367
+ readonly schemaVersion: Schema.Literal<1>;
1368
+ readonly actionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionId">;
1369
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
1370
+ readonly policy: Schema.Struct<{
1371
+ readonly policyId: Schema.brand<Schema.String, string>;
1372
+ readonly policyVersion: Schema.Int;
1373
+ readonly policyDigest: Schema.brand<Schema.String, string>;
1374
+ readonly requiredPermission: Schema.Literals<readonly ["workspace-owner", "workspace-approver", "release-owner", "release-approver", "change-owner", "issue-owner", "issue-assignee", "page-owner", "author", "contributor", "reviewer", "operator", "deployment-approver", "merge-approver", "watcher"]>;
1375
+ }>;
1376
+ readonly payloadDigest: Schema.brand<Schema.String, "PluginActionPayloadDigest">;
1377
+ readonly evidenceSetDigest: Schema.brand<Schema.String, string>;
1378
+ readonly expectedRevision: Schema.brand<Schema.String, "Revision">;
1379
+ readonly decision: Schema.Literals<readonly ["allowed", "denied"]>;
1380
+ readonly evaluatedAt: Schema.DateTimeUtcFromString;
1381
+ }>>;
1382
+ readonly attempt: Schema.NullOr<Schema.Struct<{
1383
+ readonly schemaVersion: Schema.Literal<1>;
1384
+ readonly attemptId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAttemptId">;
1385
+ readonly authorizationId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAuthorizationId">;
1386
+ readonly actionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionId">;
1387
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
1388
+ readonly pluginConnectionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PluginConnectionId">;
1389
+ readonly idempotencyKey: Schema.brand<Schema.String, "GovernedActionIdempotencyKey">;
1390
+ readonly attemptNumber: Schema.Literal<1>;
1391
+ readonly actionEnvelopeDigest: Schema.brand<Schema.String, string>;
1392
+ readonly expectedRevision: Schema.brand<Schema.String, "Revision">;
1393
+ readonly policyEvaluationDigest: Schema.brand<Schema.String, string>;
1394
+ readonly preflight: Schema.TaggedStruct<"ready", {
1395
+ readonly checkedRevision: Schema.brand<Schema.String, "Revision">;
1396
+ readonly checkedAt: Schema.DateTimeUtcFromString;
1397
+ }>;
1398
+ readonly startedAt: Schema.DateTimeUtcFromString;
1399
+ }>>;
1400
+ }, "Type">[], import("../persistence/Persistence.js").PersistenceOperationFailure, never>;
1401
+ readLatestTerminalReleasePublications: (input: unknown) => Effect.Effect<{
1402
+ envelope: {
1403
+ readonly providerId: "codecommit" | "codepipeline" | "jira" | "confluence" | "clockify";
1404
+ readonly pluginConnectionId: string & import("effect/Brand").Brand<"PluginConnectionId">;
1405
+ readonly workspaceId: string & import("effect/Brand").Brand<"WorkspaceId">;
1406
+ readonly schemaVersion: 1;
1407
+ readonly causationId: (string & import("effect/Brand").Brand<"DomainEventId">) | null;
1408
+ readonly correlationId: (string & import("effect/Brand").Brand<"DomainEventCorrelationId">) | null;
1409
+ readonly proposal: Schema.Struct.ReadonlySide<{
1410
+ readonly proposalKey: Schema.brand<Schema.String, string>;
1411
+ readonly capabilityVersion: Schema.Int;
1412
+ readonly request: Schema.Struct<{
1413
+ readonly actionKind: Schema.brand<Schema.String, string>;
1414
+ readonly target: Schema.Struct<{
1415
+ entityType: Schema.brand<Schema.String, string>;
1416
+ vendorImmutableId: Schema.brand<Schema.String, "VendorImmutableId">;
1417
+ }>;
1418
+ readonly expectedRevision: Schema.brand<Schema.String, "Revision">;
1419
+ readonly payload: Schema.Codec<Schema.Json, Schema.Json, never, never>;
1420
+ readonly evidenceIds: Schema.$Array<Schema.brand<Schema.String, string>>;
1421
+ }>;
1422
+ readonly payloadDigest: Schema.brand<Schema.String, "PluginActionPayloadDigest">;
1423
+ readonly summary: Schema.String;
1424
+ readonly impact: Schema.Struct<{
1425
+ readonly level: Schema.Literals<readonly ["low", "medium", "high", "critical"]>;
1426
+ readonly summary: Schema.String;
1427
+ }>;
1428
+ readonly proposedAt: Schema.DateTimeUtcFromString;
1429
+ }, "Type">;
1430
+ readonly idempotencyKey: string & import("effect/Brand").Brand<"GovernedActionIdempotencyKey">;
1431
+ readonly pluginId: string & import("effect/Brand").Brand<string>;
1432
+ readonly actionId: string & import("effect/Brand").Brand<"GovernedActionId">;
1433
+ readonly policy: Schema.Struct.ReadonlySide<{
1434
+ readonly policyId: Schema.brand<Schema.String, string>;
1435
+ readonly policyVersion: Schema.Int;
1436
+ readonly policyDigest: Schema.brand<Schema.String, string>;
1437
+ readonly requiredPermission: Schema.Literals<readonly ["workspace-owner", "workspace-approver", "release-owner", "release-approver", "change-owner", "issue-owner", "issue-assignee", "page-owner", "author", "contributor", "reviewer", "operator", "deployment-approver", "merge-approver", "watcher"]>;
1438
+ }, "Type">;
1439
+ readonly evidenceSetDigest: string & import("effect/Brand").Brand<string>;
1440
+ readonly pluginConnectionRevision: number & import("effect/Brand").Brand<"GovernedActionPluginConnectionRevision">;
1441
+ readonly pluginConnectionAuthorityDigest: string & import("effect/Brand").Brand<string>;
1442
+ readonly pluginContractVersion: Schema.Struct.ReadonlySide<{
1443
+ readonly major: Schema.Int;
1444
+ readonly minor: Schema.Int;
1445
+ readonly patch: Schema.Int;
1446
+ }, "Type">;
1447
+ readonly pluginAdapterVersion: Schema.Struct.ReadonlySide<{
1448
+ readonly major: Schema.Int;
1449
+ readonly minor: Schema.Int;
1450
+ readonly patch: Schema.Int;
1451
+ }, "Type">;
1452
+ readonly capability: Schema.Struct.ReadonlySide<{
1453
+ readonly capabilityId: Schema.Literal<"action.execute">;
1454
+ readonly version: Schema.Int;
1455
+ }, "Type">;
1456
+ readonly targetEntityId: string & import("effect/Brand").Brand<"EntityId">;
1457
+ readonly evidence: readonly Schema.Struct.ReadonlySide<{
1458
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
1459
+ readonly evidenceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "EvidenceId">;
1460
+ readonly evidenceClaimIds: Schema.$Array<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "EvidenceClaimId">>;
1461
+ readonly observedAt: Schema.DateTimeUtcFromString;
1462
+ readonly validUntil: Schema.NullOr<Schema.DateTimeUtcFromString>;
1463
+ readonly currentUntil: Schema.NullOr<Schema.DateTimeUtcFromString>;
1464
+ readonly evaluatedAt: Schema.DateTimeUtcFromString;
1465
+ readonly source: Schema.Literals<readonly ["current", "stale", "missing", "unavailable"]>;
1466
+ readonly validity: Schema.Literals<readonly ["valid", "expired"]>;
1467
+ }, "Type">[];
1468
+ readonly origin: Schema.Struct.ReadonlySide<{
1469
+ readonly _tag: Schema.tag<"human">;
1470
+ readonly actor: Schema.TaggedStruct<"human", {
1471
+ readonly personId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PersonId">;
1472
+ }>;
1473
+ readonly sessionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "SessionId">;
1474
+ }, "Type"> | Schema.Struct.ReadonlySide<{
1475
+ readonly _tag: Schema.tag<"agent">;
1476
+ readonly actor: Schema.TaggedStruct<"agent", {
1477
+ readonly agentId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "AgentId">;
1478
+ }>;
1479
+ readonly jobId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "JobId">;
1480
+ readonly initiatingSessionId: Schema.NullOr<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "SessionId">>;
1481
+ }, "Type">;
1482
+ readonly proposalExpiresAt: DateTime.Utc;
1483
+ readonly envelopeDigest: string & import("effect/Brand").Brand<string>;
1484
+ readonly releasePublication?: {
1485
+ readonly releaseId: string & import("effect/Brand").Brand<"ReleaseId">;
1486
+ readonly sourceRevisionDigest: string & import("effect/Brand").Brand<string>;
1487
+ readonly sourceRevisionCount: number;
1488
+ readonly predecessorPublicationActionId?: (string & import("effect/Brand").Brand<"GovernedActionId">) | null;
1489
+ };
1490
+ };
1491
+ head: Schema.Struct.ReadonlySide<{
1492
+ readonly state: Schema.Literals<readonly ["proposed", "authorized", "denied", "expired", "cancelled", "started", "cancel-requested", "cancel-requested-unknown", "succeeded", "failed", "unknown"]>;
1493
+ readonly lineage: Schema.TaggedUnion<{
1494
+ readonly accepted: Schema.TaggedStruct<"accepted", {
1495
+ readonly receipt: Schema.Struct<{
1496
+ readonly status: Schema.Literal<"accepted">;
1497
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
1498
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
1499
+ readonly safeSummary: Schema.String;
1500
+ readonly observedAt: Schema.DateTimeUtcFromString;
1501
+ }>;
1502
+ }>;
1503
+ readonly reconcilable: Schema.TaggedStruct<"reconcilable", {
1504
+ readonly providerOperationId: Schema.NullOr<Schema.brand<Schema.String, string>>;
1505
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
1506
+ }>;
1507
+ readonly manual: Schema.TaggedStruct<"manual", {
1508
+ readonly providerOperationId: Schema.NullOr<Schema.brand<Schema.String, string>>;
1509
+ }>;
1510
+ readonly none: Schema.TaggedStruct<"none", {}>;
1511
+ readonly terminal: Schema.TaggedStruct<"terminal", {
1512
+ readonly receipt: Schema.Struct<{
1513
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
1514
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
1515
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
1516
+ readonly safeSummary: Schema.String;
1517
+ readonly observedAt: Schema.DateTimeUtcFromString;
1518
+ }>;
1519
+ }>;
1520
+ }>;
1521
+ }, "Type">;
1522
+ headTransition: Schema.Struct.ReadonlySide<{
1523
+ readonly commandDigest: Schema.brand<Schema.String, "GovernedActionCommandDigest">;
1524
+ readonly schemaVersion: Schema.Literal<1>;
1525
+ readonly transitionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionTransitionId">;
1526
+ readonly previousTransitionId: Schema.NullOr<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionTransitionId">>;
1527
+ readonly commandId: Schema.brand<Schema.String, string>;
1528
+ readonly actionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionId">;
1529
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
1530
+ readonly sequence: Schema.Int;
1531
+ readonly fromState: Schema.NullOr<Schema.Literals<readonly ["proposed", "authorized", "denied", "expired", "cancelled", "started", "cancel-requested", "cancel-requested-unknown", "succeeded", "failed", "unknown"]>>;
1532
+ readonly toState: Schema.Literals<readonly ["proposed", "authorized", "denied", "expired", "cancelled", "started", "cancel-requested", "cancel-requested-unknown", "succeeded", "failed", "unknown"]>;
1533
+ readonly actionEnvelopeDigest: Schema.brand<Schema.String, string>;
1534
+ readonly command: Schema.TaggedUnion<{
1535
+ readonly propose: Schema.TaggedStruct<"propose", {}>;
1536
+ readonly authorize: Schema.TaggedStruct<"authorize", {
1537
+ readonly authorizationId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAuthorizationId">;
1538
+ }>;
1539
+ readonly deny: Schema.TaggedStruct<"deny", {
1540
+ readonly reason: Schema.Literals<readonly ["revision-changed", "evidence-stale", "evidence-invalid", "policy-denied", "session-invalid", "capability-changed", "plugin-unavailable", "preflight-blocked"]>;
1541
+ readonly safeSummary: Schema.String;
1542
+ }>;
1543
+ readonly expire: Schema.TaggedStruct<"expire", {
1544
+ readonly reason: Schema.Literals<readonly ["proposal-expired", "authorization-expired"]>;
1545
+ }>;
1546
+ readonly cancel: Schema.TaggedStruct<"cancel", {
1547
+ readonly safeSummary: Schema.String;
1548
+ }>;
1549
+ readonly start: Schema.TaggedStruct<"start", {
1550
+ readonly attemptId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAttemptId">;
1551
+ }>;
1552
+ readonly requestCancellation: Schema.TaggedStruct<"requestCancellation", {
1553
+ readonly safeSummary: Schema.String;
1554
+ }>;
1555
+ readonly recordAccepted: Schema.TaggedStruct<"recordAccepted", {
1556
+ readonly receipt: Schema.Struct<{
1557
+ readonly status: Schema.Literal<"accepted">;
1558
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
1559
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
1560
+ readonly safeSummary: Schema.String;
1561
+ readonly observedAt: Schema.DateTimeUtcFromString;
1562
+ }>;
1563
+ }>;
1564
+ readonly recordSucceeded: Schema.TaggedStruct<"recordSucceeded", {
1565
+ readonly receipt: Schema.Struct<{
1566
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
1567
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
1568
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
1569
+ readonly safeSummary: Schema.String;
1570
+ readonly observedAt: Schema.DateTimeUtcFromString;
1571
+ }>;
1572
+ readonly source: Schema.TaggedUnion<{
1573
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
1574
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
1575
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
1576
+ }>;
1577
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
1578
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
1579
+ }>;
1580
+ }>;
1581
+ }>;
1582
+ readonly recordFailed: Schema.TaggedStruct<"recordFailed", {
1583
+ readonly receipt: Schema.Struct<{
1584
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
1585
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
1586
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
1587
+ readonly safeSummary: Schema.String;
1588
+ readonly observedAt: Schema.DateTimeUtcFromString;
1589
+ }>;
1590
+ readonly source: Schema.TaggedUnion<{
1591
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
1592
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
1593
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
1594
+ }>;
1595
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
1596
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
1597
+ }>;
1598
+ }>;
1599
+ }>;
1600
+ readonly recordUnknown: Schema.TaggedStruct<"recordUnknown", {
1601
+ readonly outcome: Schema.TaggedUnion<{
1602
+ readonly reconcilable: Schema.TaggedStruct<"reconcilable", {
1603
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
1604
+ readonly observedAt: Schema.DateTimeUtcFromString;
1605
+ readonly safeSummary: Schema.String;
1606
+ }>;
1607
+ readonly manual: Schema.TaggedStruct<"manual", {
1608
+ readonly observedAt: Schema.DateTimeUtcFromString;
1609
+ readonly safeSummary: Schema.String;
1610
+ readonly reason: Schema.Literals<readonly ["dispatch-deadline-exceeded", "interrupted-after-intent", "provider-defect-after-intent", "malformed-provider-result", "receipt-persistence-failed", "missing-reconciliation-locator"]>;
1611
+ }>;
1612
+ }>;
1613
+ }>;
1614
+ readonly recordCancelled: Schema.TaggedStruct<"recordCancelled", {
1615
+ readonly receipt: Schema.Struct<{
1616
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
1617
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
1618
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
1619
+ readonly safeSummary: Schema.String;
1620
+ readonly observedAt: Schema.DateTimeUtcFromString;
1621
+ }>;
1622
+ readonly source: Schema.TaggedUnion<{
1623
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
1624
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
1625
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
1626
+ }>;
1627
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
1628
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
1629
+ }>;
1630
+ }>;
1631
+ }>;
1632
+ readonly reconciliationPending: Schema.TaggedStruct<"reconciliationPending", {
1633
+ readonly checkedAt: Schema.DateTimeUtcFromString;
1634
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
1635
+ }>;
1636
+ }>;
1637
+ readonly cause: Schema.TaggedUnion<{
1638
+ readonly human: Schema.TaggedStruct<"human", {
1639
+ readonly actor: Schema.TaggedStruct<"human", {
1640
+ readonly personId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PersonId">;
1641
+ }>;
1642
+ readonly sessionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "SessionId">;
1643
+ }>;
1644
+ readonly agent: Schema.TaggedStruct<"agent", {
1645
+ readonly actor: Schema.TaggedStruct<"agent", {
1646
+ readonly agentId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "AgentId">;
1647
+ }>;
1648
+ readonly jobId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "JobId">;
1649
+ }>;
1650
+ readonly system: Schema.TaggedStruct<"system", {
1651
+ readonly component: Schema.brand<Schema.String, string>;
1652
+ }>;
1653
+ }>;
1654
+ readonly occurredAt: Schema.DateTimeUtcFromString;
1655
+ readonly causationId: Schema.NullOr<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "DomainEventId">>;
1656
+ readonly correlationId: Schema.NullOr<Schema.brand<Schema.String, "DomainEventCorrelationId">>;
1657
+ }, "Type">;
1658
+ history: Schema.Struct.ReadonlySide<{
1659
+ readonly commandDigest: Schema.brand<Schema.String, "GovernedActionCommandDigest">;
1660
+ readonly schemaVersion: Schema.Literal<1>;
1661
+ readonly transitionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionTransitionId">;
1662
+ readonly previousTransitionId: Schema.NullOr<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionTransitionId">>;
1663
+ readonly commandId: Schema.brand<Schema.String, string>;
1664
+ readonly actionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionId">;
1665
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
1666
+ readonly sequence: Schema.Int;
1667
+ readonly fromState: Schema.NullOr<Schema.Literals<readonly ["proposed", "authorized", "denied", "expired", "cancelled", "started", "cancel-requested", "cancel-requested-unknown", "succeeded", "failed", "unknown"]>>;
1668
+ readonly toState: Schema.Literals<readonly ["proposed", "authorized", "denied", "expired", "cancelled", "started", "cancel-requested", "cancel-requested-unknown", "succeeded", "failed", "unknown"]>;
1669
+ readonly actionEnvelopeDigest: Schema.brand<Schema.String, string>;
1670
+ readonly command: Schema.TaggedUnion<{
1671
+ readonly propose: Schema.TaggedStruct<"propose", {}>;
1672
+ readonly authorize: Schema.TaggedStruct<"authorize", {
1673
+ readonly authorizationId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAuthorizationId">;
1674
+ }>;
1675
+ readonly deny: Schema.TaggedStruct<"deny", {
1676
+ readonly reason: Schema.Literals<readonly ["revision-changed", "evidence-stale", "evidence-invalid", "policy-denied", "session-invalid", "capability-changed", "plugin-unavailable", "preflight-blocked"]>;
1677
+ readonly safeSummary: Schema.String;
1678
+ }>;
1679
+ readonly expire: Schema.TaggedStruct<"expire", {
1680
+ readonly reason: Schema.Literals<readonly ["proposal-expired", "authorization-expired"]>;
1681
+ }>;
1682
+ readonly cancel: Schema.TaggedStruct<"cancel", {
1683
+ readonly safeSummary: Schema.String;
1684
+ }>;
1685
+ readonly start: Schema.TaggedStruct<"start", {
1686
+ readonly attemptId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAttemptId">;
1687
+ }>;
1688
+ readonly requestCancellation: Schema.TaggedStruct<"requestCancellation", {
1689
+ readonly safeSummary: Schema.String;
1690
+ }>;
1691
+ readonly recordAccepted: Schema.TaggedStruct<"recordAccepted", {
1692
+ readonly receipt: Schema.Struct<{
1693
+ readonly status: Schema.Literal<"accepted">;
1694
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
1695
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
1696
+ readonly safeSummary: Schema.String;
1697
+ readonly observedAt: Schema.DateTimeUtcFromString;
1698
+ }>;
1699
+ }>;
1700
+ readonly recordSucceeded: Schema.TaggedStruct<"recordSucceeded", {
1701
+ readonly receipt: Schema.Struct<{
1702
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
1703
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
1704
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
1705
+ readonly safeSummary: Schema.String;
1706
+ readonly observedAt: Schema.DateTimeUtcFromString;
1707
+ }>;
1708
+ readonly source: Schema.TaggedUnion<{
1709
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
1710
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
1711
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
1712
+ }>;
1713
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
1714
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
1715
+ }>;
1716
+ }>;
1717
+ }>;
1718
+ readonly recordFailed: Schema.TaggedStruct<"recordFailed", {
1719
+ readonly receipt: Schema.Struct<{
1720
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
1721
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
1722
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
1723
+ readonly safeSummary: Schema.String;
1724
+ readonly observedAt: Schema.DateTimeUtcFromString;
1725
+ }>;
1726
+ readonly source: Schema.TaggedUnion<{
1727
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
1728
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
1729
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
1730
+ }>;
1731
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
1732
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
1733
+ }>;
1734
+ }>;
1735
+ }>;
1736
+ readonly recordUnknown: Schema.TaggedStruct<"recordUnknown", {
1737
+ readonly outcome: Schema.TaggedUnion<{
1738
+ readonly reconcilable: Schema.TaggedStruct<"reconcilable", {
1739
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
1740
+ readonly observedAt: Schema.DateTimeUtcFromString;
1741
+ readonly safeSummary: Schema.String;
1742
+ }>;
1743
+ readonly manual: Schema.TaggedStruct<"manual", {
1744
+ readonly observedAt: Schema.DateTimeUtcFromString;
1745
+ readonly safeSummary: Schema.String;
1746
+ readonly reason: Schema.Literals<readonly ["dispatch-deadline-exceeded", "interrupted-after-intent", "provider-defect-after-intent", "malformed-provider-result", "receipt-persistence-failed", "missing-reconciliation-locator"]>;
1747
+ }>;
1748
+ }>;
1749
+ }>;
1750
+ readonly recordCancelled: Schema.TaggedStruct<"recordCancelled", {
1751
+ readonly receipt: Schema.Struct<{
1752
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
1753
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
1754
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
1755
+ readonly safeSummary: Schema.String;
1756
+ readonly observedAt: Schema.DateTimeUtcFromString;
1757
+ }>;
1758
+ readonly source: Schema.TaggedUnion<{
1759
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
1760
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
1761
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
1762
+ }>;
1763
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
1764
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
1765
+ }>;
1766
+ }>;
1767
+ }>;
1768
+ readonly reconciliationPending: Schema.TaggedStruct<"reconciliationPending", {
1769
+ readonly checkedAt: Schema.DateTimeUtcFromString;
1770
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
1771
+ }>;
1772
+ }>;
1773
+ readonly cause: Schema.TaggedUnion<{
1774
+ readonly human: Schema.TaggedStruct<"human", {
1775
+ readonly actor: Schema.TaggedStruct<"human", {
1776
+ readonly personId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PersonId">;
1777
+ }>;
1778
+ readonly sessionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "SessionId">;
1779
+ }>;
1780
+ readonly agent: Schema.TaggedStruct<"agent", {
1781
+ readonly actor: Schema.TaggedStruct<"agent", {
1782
+ readonly agentId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "AgentId">;
1783
+ }>;
1784
+ readonly jobId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "JobId">;
1785
+ }>;
1786
+ readonly system: Schema.TaggedStruct<"system", {
1787
+ readonly component: Schema.brand<Schema.String, string>;
1788
+ }>;
1789
+ }>;
1790
+ readonly occurredAt: Schema.DateTimeUtcFromString;
1791
+ readonly causationId: Schema.NullOr<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "DomainEventId">>;
1792
+ readonly correlationId: Schema.NullOr<Schema.brand<Schema.String, "DomainEventCorrelationId">>;
1793
+ }, "Type">[];
1794
+ authorization: Schema.Struct.ReadonlySide<{
1795
+ readonly schemaVersion: Schema.Literal<1>;
1796
+ readonly authorizationId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAuthorizationId">;
1797
+ readonly actionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionId">;
1798
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
1799
+ readonly pluginConnectionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PluginConnectionId">;
1800
+ readonly pluginConnectionRevision: Schema.brand<Schema.Int, "GovernedActionPluginConnectionRevision">;
1801
+ readonly pluginConnectionAuthorityDigest: Schema.brand<Schema.String, string>;
1802
+ readonly actionEnvelopeDigest: Schema.brand<Schema.String, string>;
1803
+ readonly idempotencyKey: Schema.brand<Schema.String, "GovernedActionIdempotencyKey">;
1804
+ readonly payloadDigest: Schema.brand<Schema.String, "PluginActionPayloadDigest">;
1805
+ readonly evidenceSetDigest: Schema.brand<Schema.String, string>;
1806
+ readonly policyDigest: Schema.brand<Schema.String, string>;
1807
+ readonly expectedRevision: Schema.brand<Schema.String, "Revision">;
1808
+ readonly capabilityVersion: Schema.Int;
1809
+ readonly actor: Schema.TaggedStruct<"human", {
1810
+ readonly personId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PersonId">;
1811
+ }>;
1812
+ readonly sessionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "SessionId">;
1813
+ readonly sessionPermission: Schema.Literals<readonly ["workspace-owner", "workspace-approver", "release-owner", "release-approver", "change-owner", "issue-owner", "issue-assignee", "page-owner", "author", "contributor", "reviewer", "operator", "deployment-approver", "merge-approver", "watcher"]>;
1814
+ readonly sessionExpiresAt: Schema.DateTimeUtcFromString;
1815
+ readonly requiredPermission: Schema.Literals<readonly ["workspace-owner", "workspace-approver", "release-owner", "release-approver", "change-owner", "issue-owner", "issue-assignee", "page-owner", "author", "contributor", "reviewer", "operator", "deployment-approver", "merge-approver", "watcher"]>;
1816
+ readonly authorizedAt: Schema.DateTimeUtcFromString;
1817
+ readonly expiresAt: Schema.DateTimeUtcFromString;
1818
+ }, "Type"> | null;
1819
+ policyEvaluation: Schema.Struct.ReadonlySide<{
1820
+ readonly schemaVersion: Schema.Literal<1>;
1821
+ readonly actionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionId">;
1822
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
1823
+ readonly policy: Schema.Struct<{
1824
+ readonly policyId: Schema.brand<Schema.String, string>;
1825
+ readonly policyVersion: Schema.Int;
1826
+ readonly policyDigest: Schema.brand<Schema.String, string>;
1827
+ readonly requiredPermission: Schema.Literals<readonly ["workspace-owner", "workspace-approver", "release-owner", "release-approver", "change-owner", "issue-owner", "issue-assignee", "page-owner", "author", "contributor", "reviewer", "operator", "deployment-approver", "merge-approver", "watcher"]>;
1828
+ }>;
1829
+ readonly payloadDigest: Schema.brand<Schema.String, "PluginActionPayloadDigest">;
1830
+ readonly evidenceSetDigest: Schema.brand<Schema.String, string>;
1831
+ readonly expectedRevision: Schema.brand<Schema.String, "Revision">;
1832
+ readonly decision: Schema.Literals<readonly ["allowed", "denied"]>;
1833
+ readonly evaluatedAt: Schema.DateTimeUtcFromString;
1834
+ }, "Type"> | null;
1835
+ attempt: Schema.Struct.ReadonlySide<{
1836
+ readonly schemaVersion: Schema.Literal<1>;
1837
+ readonly attemptId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAttemptId">;
1838
+ readonly authorizationId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAuthorizationId">;
1839
+ readonly actionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionId">;
1840
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
1841
+ readonly pluginConnectionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PluginConnectionId">;
1842
+ readonly idempotencyKey: Schema.brand<Schema.String, "GovernedActionIdempotencyKey">;
1843
+ readonly attemptNumber: Schema.Literal<1>;
1844
+ readonly actionEnvelopeDigest: Schema.brand<Schema.String, string>;
1845
+ readonly expectedRevision: Schema.brand<Schema.String, "Revision">;
1846
+ readonly policyEvaluationDigest: Schema.brand<Schema.String, string>;
1847
+ readonly preflight: Schema.TaggedStruct<"ready", {
1848
+ readonly checkedRevision: Schema.brand<Schema.String, "Revision">;
1849
+ readonly checkedAt: Schema.DateTimeUtcFromString;
1850
+ }>;
1851
+ readonly startedAt: Schema.DateTimeUtcFromString;
1852
+ }, "Type"> | null;
1853
+ }[], import("../persistence/Persistence.js").PersistenceOperationFailure, never>;
1854
+ }, "readLatestTerminalReleasePublications">, workspaceId: string & import("effect/Brand").Brand<"WorkspaceId">, releaseId: string & import("effect/Brand").Brand<"ReleaseId">) => Effect.Effect<{
1855
+ hasBlockingPublication: boolean;
1856
+ latestReference: import("./releasePublicationMetadata.js").LatestConfluencePublicationReference | null;
1857
+ }, import("../persistence/Persistence.js").PersistenceOperationFailure, never>;
1858
+ /** Resolve one release update target through the bounded indexed publication projection. */
1859
+ export declare const loadLatestConfluenceReleasePublication: (history: Pick<{
1860
+ commit: (input: unknown) => Effect.Effect<{
1861
+ readonly _tag: "committed";
1862
+ readonly transition: import("../../domain/governedAction/stateMachine.ts").GovernedActionTransitionV1;
1863
+ } | {
1864
+ readonly _tag: "replayed";
1865
+ readonly transition: import("../../domain/governedAction/stateMachine.ts").GovernedActionTransitionV1;
1866
+ }, import("../persistence/Persistence.js").PersistenceOperationFailure, never>;
1867
+ read: (input: unknown) => Effect.Effect<{
1868
+ envelope: {
1869
+ readonly providerId: "codecommit" | "codepipeline" | "jira" | "confluence" | "clockify";
1870
+ readonly pluginConnectionId: string & import("effect/Brand").Brand<"PluginConnectionId">;
1871
+ readonly workspaceId: string & import("effect/Brand").Brand<"WorkspaceId">;
1872
+ readonly schemaVersion: 1;
1873
+ readonly causationId: (string & import("effect/Brand").Brand<"DomainEventId">) | null;
1874
+ readonly correlationId: (string & import("effect/Brand").Brand<"DomainEventCorrelationId">) | null;
1875
+ readonly proposal: Schema.Struct.ReadonlySide<{
1876
+ readonly proposalKey: Schema.brand<Schema.String, string>;
1877
+ readonly capabilityVersion: Schema.Int;
1878
+ readonly request: Schema.Struct<{
1879
+ readonly actionKind: Schema.brand<Schema.String, string>;
1880
+ readonly target: Schema.Struct<{
1881
+ entityType: Schema.brand<Schema.String, string>;
1882
+ vendorImmutableId: Schema.brand<Schema.String, "VendorImmutableId">;
1883
+ }>;
1884
+ readonly expectedRevision: Schema.brand<Schema.String, "Revision">;
1885
+ readonly payload: Schema.Codec<Schema.Json, Schema.Json, never, never>;
1886
+ readonly evidenceIds: Schema.$Array<Schema.brand<Schema.String, string>>;
1887
+ }>;
1888
+ readonly payloadDigest: Schema.brand<Schema.String, "PluginActionPayloadDigest">;
1889
+ readonly summary: Schema.String;
1890
+ readonly impact: Schema.Struct<{
1891
+ readonly level: Schema.Literals<readonly ["low", "medium", "high", "critical"]>;
1892
+ readonly summary: Schema.String;
1893
+ }>;
1894
+ readonly proposedAt: Schema.DateTimeUtcFromString;
1895
+ }, "Type">;
1896
+ readonly idempotencyKey: string & import("effect/Brand").Brand<"GovernedActionIdempotencyKey">;
1897
+ readonly pluginId: string & import("effect/Brand").Brand<string>;
1898
+ readonly actionId: string & import("effect/Brand").Brand<"GovernedActionId">;
1899
+ readonly policy: Schema.Struct.ReadonlySide<{
1900
+ readonly policyId: Schema.brand<Schema.String, string>;
1901
+ readonly policyVersion: Schema.Int;
1902
+ readonly policyDigest: Schema.brand<Schema.String, string>;
1903
+ readonly requiredPermission: Schema.Literals<readonly ["workspace-owner", "workspace-approver", "release-owner", "release-approver", "change-owner", "issue-owner", "issue-assignee", "page-owner", "author", "contributor", "reviewer", "operator", "deployment-approver", "merge-approver", "watcher"]>;
1904
+ }, "Type">;
1905
+ readonly evidenceSetDigest: string & import("effect/Brand").Brand<string>;
1906
+ readonly pluginConnectionRevision: number & import("effect/Brand").Brand<"GovernedActionPluginConnectionRevision">;
1907
+ readonly pluginConnectionAuthorityDigest: string & import("effect/Brand").Brand<string>;
1908
+ readonly pluginContractVersion: Schema.Struct.ReadonlySide<{
1909
+ readonly major: Schema.Int;
1910
+ readonly minor: Schema.Int;
1911
+ readonly patch: Schema.Int;
1912
+ }, "Type">;
1913
+ readonly pluginAdapterVersion: Schema.Struct.ReadonlySide<{
1914
+ readonly major: Schema.Int;
1915
+ readonly minor: Schema.Int;
1916
+ readonly patch: Schema.Int;
1917
+ }, "Type">;
1918
+ readonly capability: Schema.Struct.ReadonlySide<{
1919
+ readonly capabilityId: Schema.Literal<"action.execute">;
1920
+ readonly version: Schema.Int;
1921
+ }, "Type">;
1922
+ readonly targetEntityId: string & import("effect/Brand").Brand<"EntityId">;
1923
+ readonly evidence: readonly Schema.Struct.ReadonlySide<{
1924
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
1925
+ readonly evidenceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "EvidenceId">;
1926
+ readonly evidenceClaimIds: Schema.$Array<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "EvidenceClaimId">>;
1927
+ readonly observedAt: Schema.DateTimeUtcFromString;
1928
+ readonly validUntil: Schema.NullOr<Schema.DateTimeUtcFromString>;
1929
+ readonly currentUntil: Schema.NullOr<Schema.DateTimeUtcFromString>;
1930
+ readonly evaluatedAt: Schema.DateTimeUtcFromString;
1931
+ readonly source: Schema.Literals<readonly ["current", "stale", "missing", "unavailable"]>;
1932
+ readonly validity: Schema.Literals<readonly ["valid", "expired"]>;
1933
+ }, "Type">[];
1934
+ readonly origin: Schema.Struct.ReadonlySide<{
1935
+ readonly _tag: Schema.tag<"human">;
1936
+ readonly actor: Schema.TaggedStruct<"human", {
1937
+ readonly personId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PersonId">;
1938
+ }>;
1939
+ readonly sessionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "SessionId">;
1940
+ }, "Type"> | Schema.Struct.ReadonlySide<{
1941
+ readonly _tag: Schema.tag<"agent">;
1942
+ readonly actor: Schema.TaggedStruct<"agent", {
1943
+ readonly agentId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "AgentId">;
1944
+ }>;
1945
+ readonly jobId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "JobId">;
1946
+ readonly initiatingSessionId: Schema.NullOr<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "SessionId">>;
1947
+ }, "Type">;
1948
+ readonly proposalExpiresAt: DateTime.Utc;
1949
+ readonly envelopeDigest: string & import("effect/Brand").Brand<string>;
1950
+ readonly releasePublication?: {
1951
+ readonly releaseId: string & import("effect/Brand").Brand<"ReleaseId">;
1952
+ readonly sourceRevisionDigest: string & import("effect/Brand").Brand<string>;
1953
+ readonly sourceRevisionCount: number;
1954
+ readonly predecessorPublicationActionId?: (string & import("effect/Brand").Brand<"GovernedActionId">) | null;
1955
+ };
1956
+ };
1957
+ head: Schema.Struct.ReadonlySide<{
1958
+ readonly state: Schema.Literals<readonly ["proposed", "authorized", "denied", "expired", "cancelled", "started", "cancel-requested", "cancel-requested-unknown", "succeeded", "failed", "unknown"]>;
1959
+ readonly lineage: Schema.TaggedUnion<{
1960
+ readonly accepted: Schema.TaggedStruct<"accepted", {
1961
+ readonly receipt: Schema.Struct<{
1962
+ readonly status: Schema.Literal<"accepted">;
1963
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
1964
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
1965
+ readonly safeSummary: Schema.String;
1966
+ readonly observedAt: Schema.DateTimeUtcFromString;
1967
+ }>;
1968
+ }>;
1969
+ readonly reconcilable: Schema.TaggedStruct<"reconcilable", {
1970
+ readonly providerOperationId: Schema.NullOr<Schema.brand<Schema.String, string>>;
1971
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
1972
+ }>;
1973
+ readonly manual: Schema.TaggedStruct<"manual", {
1974
+ readonly providerOperationId: Schema.NullOr<Schema.brand<Schema.String, string>>;
1975
+ }>;
1976
+ readonly none: Schema.TaggedStruct<"none", {}>;
1977
+ readonly terminal: Schema.TaggedStruct<"terminal", {
1978
+ readonly receipt: Schema.Struct<{
1979
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
1980
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
1981
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
1982
+ readonly safeSummary: Schema.String;
1983
+ readonly observedAt: Schema.DateTimeUtcFromString;
1984
+ }>;
1985
+ }>;
1986
+ }>;
1987
+ }, "Type">;
1988
+ headTransition: Schema.Struct.ReadonlySide<{
1989
+ readonly commandDigest: Schema.brand<Schema.String, "GovernedActionCommandDigest">;
1990
+ readonly schemaVersion: Schema.Literal<1>;
1991
+ readonly transitionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionTransitionId">;
1992
+ readonly previousTransitionId: Schema.NullOr<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionTransitionId">>;
1993
+ readonly commandId: Schema.brand<Schema.String, string>;
1994
+ readonly actionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionId">;
1995
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
1996
+ readonly sequence: Schema.Int;
1997
+ readonly fromState: Schema.NullOr<Schema.Literals<readonly ["proposed", "authorized", "denied", "expired", "cancelled", "started", "cancel-requested", "cancel-requested-unknown", "succeeded", "failed", "unknown"]>>;
1998
+ readonly toState: Schema.Literals<readonly ["proposed", "authorized", "denied", "expired", "cancelled", "started", "cancel-requested", "cancel-requested-unknown", "succeeded", "failed", "unknown"]>;
1999
+ readonly actionEnvelopeDigest: Schema.brand<Schema.String, string>;
2000
+ readonly command: Schema.TaggedUnion<{
2001
+ readonly propose: Schema.TaggedStruct<"propose", {}>;
2002
+ readonly authorize: Schema.TaggedStruct<"authorize", {
2003
+ readonly authorizationId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAuthorizationId">;
2004
+ }>;
2005
+ readonly deny: Schema.TaggedStruct<"deny", {
2006
+ readonly reason: Schema.Literals<readonly ["revision-changed", "evidence-stale", "evidence-invalid", "policy-denied", "session-invalid", "capability-changed", "plugin-unavailable", "preflight-blocked"]>;
2007
+ readonly safeSummary: Schema.String;
2008
+ }>;
2009
+ readonly expire: Schema.TaggedStruct<"expire", {
2010
+ readonly reason: Schema.Literals<readonly ["proposal-expired", "authorization-expired"]>;
2011
+ }>;
2012
+ readonly cancel: Schema.TaggedStruct<"cancel", {
2013
+ readonly safeSummary: Schema.String;
2014
+ }>;
2015
+ readonly start: Schema.TaggedStruct<"start", {
2016
+ readonly attemptId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAttemptId">;
2017
+ }>;
2018
+ readonly requestCancellation: Schema.TaggedStruct<"requestCancellation", {
2019
+ readonly safeSummary: Schema.String;
2020
+ }>;
2021
+ readonly recordAccepted: Schema.TaggedStruct<"recordAccepted", {
2022
+ readonly receipt: Schema.Struct<{
2023
+ readonly status: Schema.Literal<"accepted">;
2024
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
2025
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
2026
+ readonly safeSummary: Schema.String;
2027
+ readonly observedAt: Schema.DateTimeUtcFromString;
2028
+ }>;
2029
+ }>;
2030
+ readonly recordSucceeded: Schema.TaggedStruct<"recordSucceeded", {
2031
+ readonly receipt: Schema.Struct<{
2032
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
2033
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
2034
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
2035
+ readonly safeSummary: Schema.String;
2036
+ readonly observedAt: Schema.DateTimeUtcFromString;
2037
+ }>;
2038
+ readonly source: Schema.TaggedUnion<{
2039
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
2040
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
2041
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
2042
+ }>;
2043
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
2044
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
2045
+ }>;
2046
+ }>;
2047
+ }>;
2048
+ readonly recordFailed: Schema.TaggedStruct<"recordFailed", {
2049
+ readonly receipt: Schema.Struct<{
2050
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
2051
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
2052
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
2053
+ readonly safeSummary: Schema.String;
2054
+ readonly observedAt: Schema.DateTimeUtcFromString;
2055
+ }>;
2056
+ readonly source: Schema.TaggedUnion<{
2057
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
2058
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
2059
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
2060
+ }>;
2061
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
2062
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
2063
+ }>;
2064
+ }>;
2065
+ }>;
2066
+ readonly recordUnknown: Schema.TaggedStruct<"recordUnknown", {
2067
+ readonly outcome: Schema.TaggedUnion<{
2068
+ readonly reconcilable: Schema.TaggedStruct<"reconcilable", {
2069
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
2070
+ readonly observedAt: Schema.DateTimeUtcFromString;
2071
+ readonly safeSummary: Schema.String;
2072
+ }>;
2073
+ readonly manual: Schema.TaggedStruct<"manual", {
2074
+ readonly observedAt: Schema.DateTimeUtcFromString;
2075
+ readonly safeSummary: Schema.String;
2076
+ readonly reason: Schema.Literals<readonly ["dispatch-deadline-exceeded", "interrupted-after-intent", "provider-defect-after-intent", "malformed-provider-result", "receipt-persistence-failed", "missing-reconciliation-locator"]>;
2077
+ }>;
2078
+ }>;
2079
+ }>;
2080
+ readonly recordCancelled: Schema.TaggedStruct<"recordCancelled", {
2081
+ readonly receipt: Schema.Struct<{
2082
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
2083
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
2084
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
2085
+ readonly safeSummary: Schema.String;
2086
+ readonly observedAt: Schema.DateTimeUtcFromString;
2087
+ }>;
2088
+ readonly source: Schema.TaggedUnion<{
2089
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
2090
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
2091
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
2092
+ }>;
2093
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
2094
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
2095
+ }>;
2096
+ }>;
2097
+ }>;
2098
+ readonly reconciliationPending: Schema.TaggedStruct<"reconciliationPending", {
2099
+ readonly checkedAt: Schema.DateTimeUtcFromString;
2100
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
2101
+ }>;
2102
+ }>;
2103
+ readonly cause: Schema.TaggedUnion<{
2104
+ readonly human: Schema.TaggedStruct<"human", {
2105
+ readonly actor: Schema.TaggedStruct<"human", {
2106
+ readonly personId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PersonId">;
2107
+ }>;
2108
+ readonly sessionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "SessionId">;
2109
+ }>;
2110
+ readonly agent: Schema.TaggedStruct<"agent", {
2111
+ readonly actor: Schema.TaggedStruct<"agent", {
2112
+ readonly agentId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "AgentId">;
2113
+ }>;
2114
+ readonly jobId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "JobId">;
2115
+ }>;
2116
+ readonly system: Schema.TaggedStruct<"system", {
2117
+ readonly component: Schema.brand<Schema.String, string>;
2118
+ }>;
2119
+ }>;
2120
+ readonly occurredAt: Schema.DateTimeUtcFromString;
2121
+ readonly causationId: Schema.NullOr<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "DomainEventId">>;
2122
+ readonly correlationId: Schema.NullOr<Schema.brand<Schema.String, "DomainEventCorrelationId">>;
2123
+ }, "Type">;
2124
+ history: Schema.Struct.ReadonlySide<{
2125
+ readonly commandDigest: Schema.brand<Schema.String, "GovernedActionCommandDigest">;
2126
+ readonly schemaVersion: Schema.Literal<1>;
2127
+ readonly transitionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionTransitionId">;
2128
+ readonly previousTransitionId: Schema.NullOr<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionTransitionId">>;
2129
+ readonly commandId: Schema.brand<Schema.String, string>;
2130
+ readonly actionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionId">;
2131
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
2132
+ readonly sequence: Schema.Int;
2133
+ readonly fromState: Schema.NullOr<Schema.Literals<readonly ["proposed", "authorized", "denied", "expired", "cancelled", "started", "cancel-requested", "cancel-requested-unknown", "succeeded", "failed", "unknown"]>>;
2134
+ readonly toState: Schema.Literals<readonly ["proposed", "authorized", "denied", "expired", "cancelled", "started", "cancel-requested", "cancel-requested-unknown", "succeeded", "failed", "unknown"]>;
2135
+ readonly actionEnvelopeDigest: Schema.brand<Schema.String, string>;
2136
+ readonly command: Schema.TaggedUnion<{
2137
+ readonly propose: Schema.TaggedStruct<"propose", {}>;
2138
+ readonly authorize: Schema.TaggedStruct<"authorize", {
2139
+ readonly authorizationId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAuthorizationId">;
2140
+ }>;
2141
+ readonly deny: Schema.TaggedStruct<"deny", {
2142
+ readonly reason: Schema.Literals<readonly ["revision-changed", "evidence-stale", "evidence-invalid", "policy-denied", "session-invalid", "capability-changed", "plugin-unavailable", "preflight-blocked"]>;
2143
+ readonly safeSummary: Schema.String;
2144
+ }>;
2145
+ readonly expire: Schema.TaggedStruct<"expire", {
2146
+ readonly reason: Schema.Literals<readonly ["proposal-expired", "authorization-expired"]>;
2147
+ }>;
2148
+ readonly cancel: Schema.TaggedStruct<"cancel", {
2149
+ readonly safeSummary: Schema.String;
2150
+ }>;
2151
+ readonly start: Schema.TaggedStruct<"start", {
2152
+ readonly attemptId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAttemptId">;
2153
+ }>;
2154
+ readonly requestCancellation: Schema.TaggedStruct<"requestCancellation", {
2155
+ readonly safeSummary: Schema.String;
2156
+ }>;
2157
+ readonly recordAccepted: Schema.TaggedStruct<"recordAccepted", {
2158
+ readonly receipt: Schema.Struct<{
2159
+ readonly status: Schema.Literal<"accepted">;
2160
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
2161
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
2162
+ readonly safeSummary: Schema.String;
2163
+ readonly observedAt: Schema.DateTimeUtcFromString;
2164
+ }>;
2165
+ }>;
2166
+ readonly recordSucceeded: Schema.TaggedStruct<"recordSucceeded", {
2167
+ readonly receipt: Schema.Struct<{
2168
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
2169
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
2170
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
2171
+ readonly safeSummary: Schema.String;
2172
+ readonly observedAt: Schema.DateTimeUtcFromString;
2173
+ }>;
2174
+ readonly source: Schema.TaggedUnion<{
2175
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
2176
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
2177
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
2178
+ }>;
2179
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
2180
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
2181
+ }>;
2182
+ }>;
2183
+ }>;
2184
+ readonly recordFailed: Schema.TaggedStruct<"recordFailed", {
2185
+ readonly receipt: Schema.Struct<{
2186
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
2187
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
2188
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
2189
+ readonly safeSummary: Schema.String;
2190
+ readonly observedAt: Schema.DateTimeUtcFromString;
2191
+ }>;
2192
+ readonly source: Schema.TaggedUnion<{
2193
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
2194
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
2195
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
2196
+ }>;
2197
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
2198
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
2199
+ }>;
2200
+ }>;
2201
+ }>;
2202
+ readonly recordUnknown: Schema.TaggedStruct<"recordUnknown", {
2203
+ readonly outcome: Schema.TaggedUnion<{
2204
+ readonly reconcilable: Schema.TaggedStruct<"reconcilable", {
2205
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
2206
+ readonly observedAt: Schema.DateTimeUtcFromString;
2207
+ readonly safeSummary: Schema.String;
2208
+ }>;
2209
+ readonly manual: Schema.TaggedStruct<"manual", {
2210
+ readonly observedAt: Schema.DateTimeUtcFromString;
2211
+ readonly safeSummary: Schema.String;
2212
+ readonly reason: Schema.Literals<readonly ["dispatch-deadline-exceeded", "interrupted-after-intent", "provider-defect-after-intent", "malformed-provider-result", "receipt-persistence-failed", "missing-reconciliation-locator"]>;
2213
+ }>;
2214
+ }>;
2215
+ }>;
2216
+ readonly recordCancelled: Schema.TaggedStruct<"recordCancelled", {
2217
+ readonly receipt: Schema.Struct<{
2218
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
2219
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
2220
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
2221
+ readonly safeSummary: Schema.String;
2222
+ readonly observedAt: Schema.DateTimeUtcFromString;
2223
+ }>;
2224
+ readonly source: Schema.TaggedUnion<{
2225
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
2226
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
2227
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
2228
+ }>;
2229
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
2230
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
2231
+ }>;
2232
+ }>;
2233
+ }>;
2234
+ readonly reconciliationPending: Schema.TaggedStruct<"reconciliationPending", {
2235
+ readonly checkedAt: Schema.DateTimeUtcFromString;
2236
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
2237
+ }>;
2238
+ }>;
2239
+ readonly cause: Schema.TaggedUnion<{
2240
+ readonly human: Schema.TaggedStruct<"human", {
2241
+ readonly actor: Schema.TaggedStruct<"human", {
2242
+ readonly personId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PersonId">;
2243
+ }>;
2244
+ readonly sessionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "SessionId">;
2245
+ }>;
2246
+ readonly agent: Schema.TaggedStruct<"agent", {
2247
+ readonly actor: Schema.TaggedStruct<"agent", {
2248
+ readonly agentId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "AgentId">;
2249
+ }>;
2250
+ readonly jobId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "JobId">;
2251
+ }>;
2252
+ readonly system: Schema.TaggedStruct<"system", {
2253
+ readonly component: Schema.brand<Schema.String, string>;
2254
+ }>;
2255
+ }>;
2256
+ readonly occurredAt: Schema.DateTimeUtcFromString;
2257
+ readonly causationId: Schema.NullOr<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "DomainEventId">>;
2258
+ readonly correlationId: Schema.NullOr<Schema.brand<Schema.String, "DomainEventCorrelationId">>;
2259
+ }, "Type">[];
2260
+ authorization: Schema.Struct.ReadonlySide<{
2261
+ readonly schemaVersion: Schema.Literal<1>;
2262
+ readonly authorizationId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAuthorizationId">;
2263
+ readonly actionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionId">;
2264
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
2265
+ readonly pluginConnectionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PluginConnectionId">;
2266
+ readonly pluginConnectionRevision: Schema.brand<Schema.Int, "GovernedActionPluginConnectionRevision">;
2267
+ readonly pluginConnectionAuthorityDigest: Schema.brand<Schema.String, string>;
2268
+ readonly actionEnvelopeDigest: Schema.brand<Schema.String, string>;
2269
+ readonly idempotencyKey: Schema.brand<Schema.String, "GovernedActionIdempotencyKey">;
2270
+ readonly payloadDigest: Schema.brand<Schema.String, "PluginActionPayloadDigest">;
2271
+ readonly evidenceSetDigest: Schema.brand<Schema.String, string>;
2272
+ readonly policyDigest: Schema.brand<Schema.String, string>;
2273
+ readonly expectedRevision: Schema.brand<Schema.String, "Revision">;
2274
+ readonly capabilityVersion: Schema.Int;
2275
+ readonly actor: Schema.TaggedStruct<"human", {
2276
+ readonly personId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PersonId">;
2277
+ }>;
2278
+ readonly sessionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "SessionId">;
2279
+ readonly sessionPermission: Schema.Literals<readonly ["workspace-owner", "workspace-approver", "release-owner", "release-approver", "change-owner", "issue-owner", "issue-assignee", "page-owner", "author", "contributor", "reviewer", "operator", "deployment-approver", "merge-approver", "watcher"]>;
2280
+ readonly sessionExpiresAt: Schema.DateTimeUtcFromString;
2281
+ readonly requiredPermission: Schema.Literals<readonly ["workspace-owner", "workspace-approver", "release-owner", "release-approver", "change-owner", "issue-owner", "issue-assignee", "page-owner", "author", "contributor", "reviewer", "operator", "deployment-approver", "merge-approver", "watcher"]>;
2282
+ readonly authorizedAt: Schema.DateTimeUtcFromString;
2283
+ readonly expiresAt: Schema.DateTimeUtcFromString;
2284
+ }, "Type"> | null;
2285
+ policyEvaluation: Schema.Struct.ReadonlySide<{
2286
+ readonly schemaVersion: Schema.Literal<1>;
2287
+ readonly actionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionId">;
2288
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
2289
+ readonly policy: Schema.Struct<{
2290
+ readonly policyId: Schema.brand<Schema.String, string>;
2291
+ readonly policyVersion: Schema.Int;
2292
+ readonly policyDigest: Schema.brand<Schema.String, string>;
2293
+ readonly requiredPermission: Schema.Literals<readonly ["workspace-owner", "workspace-approver", "release-owner", "release-approver", "change-owner", "issue-owner", "issue-assignee", "page-owner", "author", "contributor", "reviewer", "operator", "deployment-approver", "merge-approver", "watcher"]>;
2294
+ }>;
2295
+ readonly payloadDigest: Schema.brand<Schema.String, "PluginActionPayloadDigest">;
2296
+ readonly evidenceSetDigest: Schema.brand<Schema.String, string>;
2297
+ readonly expectedRevision: Schema.brand<Schema.String, "Revision">;
2298
+ readonly decision: Schema.Literals<readonly ["allowed", "denied"]>;
2299
+ readonly evaluatedAt: Schema.DateTimeUtcFromString;
2300
+ }, "Type"> | null;
2301
+ attempt: Schema.Struct.ReadonlySide<{
2302
+ readonly schemaVersion: Schema.Literal<1>;
2303
+ readonly attemptId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAttemptId">;
2304
+ readonly authorizationId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAuthorizationId">;
2305
+ readonly actionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionId">;
2306
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
2307
+ readonly pluginConnectionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PluginConnectionId">;
2308
+ readonly idempotencyKey: Schema.brand<Schema.String, "GovernedActionIdempotencyKey">;
2309
+ readonly attemptNumber: Schema.Literal<1>;
2310
+ readonly actionEnvelopeDigest: Schema.brand<Schema.String, string>;
2311
+ readonly expectedRevision: Schema.brand<Schema.String, "Revision">;
2312
+ readonly policyEvaluationDigest: Schema.brand<Schema.String, string>;
2313
+ readonly preflight: Schema.TaggedStruct<"ready", {
2314
+ readonly checkedRevision: Schema.brand<Schema.String, "Revision">;
2315
+ readonly checkedAt: Schema.DateTimeUtcFromString;
2316
+ }>;
2317
+ readonly startedAt: Schema.DateTimeUtcFromString;
2318
+ }, "Type"> | null;
2319
+ }, import("../persistence/Persistence.js").PersistenceOperationFailure, never>;
2320
+ readByIdempotencyKey: (input: unknown) => Effect.Effect<{
2321
+ envelope: {
2322
+ readonly providerId: "codecommit" | "codepipeline" | "jira" | "confluence" | "clockify";
2323
+ readonly pluginConnectionId: string & import("effect/Brand").Brand<"PluginConnectionId">;
2324
+ readonly workspaceId: string & import("effect/Brand").Brand<"WorkspaceId">;
2325
+ readonly schemaVersion: 1;
2326
+ readonly causationId: (string & import("effect/Brand").Brand<"DomainEventId">) | null;
2327
+ readonly correlationId: (string & import("effect/Brand").Brand<"DomainEventCorrelationId">) | null;
2328
+ readonly proposal: Schema.Struct.ReadonlySide<{
2329
+ readonly proposalKey: Schema.brand<Schema.String, string>;
2330
+ readonly capabilityVersion: Schema.Int;
2331
+ readonly request: Schema.Struct<{
2332
+ readonly actionKind: Schema.brand<Schema.String, string>;
2333
+ readonly target: Schema.Struct<{
2334
+ entityType: Schema.brand<Schema.String, string>;
2335
+ vendorImmutableId: Schema.brand<Schema.String, "VendorImmutableId">;
2336
+ }>;
2337
+ readonly expectedRevision: Schema.brand<Schema.String, "Revision">;
2338
+ readonly payload: Schema.Codec<Schema.Json, Schema.Json, never, never>;
2339
+ readonly evidenceIds: Schema.$Array<Schema.brand<Schema.String, string>>;
2340
+ }>;
2341
+ readonly payloadDigest: Schema.brand<Schema.String, "PluginActionPayloadDigest">;
2342
+ readonly summary: Schema.String;
2343
+ readonly impact: Schema.Struct<{
2344
+ readonly level: Schema.Literals<readonly ["low", "medium", "high", "critical"]>;
2345
+ readonly summary: Schema.String;
2346
+ }>;
2347
+ readonly proposedAt: Schema.DateTimeUtcFromString;
2348
+ }, "Type">;
2349
+ readonly idempotencyKey: string & import("effect/Brand").Brand<"GovernedActionIdempotencyKey">;
2350
+ readonly pluginId: string & import("effect/Brand").Brand<string>;
2351
+ readonly actionId: string & import("effect/Brand").Brand<"GovernedActionId">;
2352
+ readonly policy: Schema.Struct.ReadonlySide<{
2353
+ readonly policyId: Schema.brand<Schema.String, string>;
2354
+ readonly policyVersion: Schema.Int;
2355
+ readonly policyDigest: Schema.brand<Schema.String, string>;
2356
+ readonly requiredPermission: Schema.Literals<readonly ["workspace-owner", "workspace-approver", "release-owner", "release-approver", "change-owner", "issue-owner", "issue-assignee", "page-owner", "author", "contributor", "reviewer", "operator", "deployment-approver", "merge-approver", "watcher"]>;
2357
+ }, "Type">;
2358
+ readonly evidenceSetDigest: string & import("effect/Brand").Brand<string>;
2359
+ readonly pluginConnectionRevision: number & import("effect/Brand").Brand<"GovernedActionPluginConnectionRevision">;
2360
+ readonly pluginConnectionAuthorityDigest: string & import("effect/Brand").Brand<string>;
2361
+ readonly pluginContractVersion: Schema.Struct.ReadonlySide<{
2362
+ readonly major: Schema.Int;
2363
+ readonly minor: Schema.Int;
2364
+ readonly patch: Schema.Int;
2365
+ }, "Type">;
2366
+ readonly pluginAdapterVersion: Schema.Struct.ReadonlySide<{
2367
+ readonly major: Schema.Int;
2368
+ readonly minor: Schema.Int;
2369
+ readonly patch: Schema.Int;
2370
+ }, "Type">;
2371
+ readonly capability: Schema.Struct.ReadonlySide<{
2372
+ readonly capabilityId: Schema.Literal<"action.execute">;
2373
+ readonly version: Schema.Int;
2374
+ }, "Type">;
2375
+ readonly targetEntityId: string & import("effect/Brand").Brand<"EntityId">;
2376
+ readonly evidence: readonly Schema.Struct.ReadonlySide<{
2377
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
2378
+ readonly evidenceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "EvidenceId">;
2379
+ readonly evidenceClaimIds: Schema.$Array<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "EvidenceClaimId">>;
2380
+ readonly observedAt: Schema.DateTimeUtcFromString;
2381
+ readonly validUntil: Schema.NullOr<Schema.DateTimeUtcFromString>;
2382
+ readonly currentUntil: Schema.NullOr<Schema.DateTimeUtcFromString>;
2383
+ readonly evaluatedAt: Schema.DateTimeUtcFromString;
2384
+ readonly source: Schema.Literals<readonly ["current", "stale", "missing", "unavailable"]>;
2385
+ readonly validity: Schema.Literals<readonly ["valid", "expired"]>;
2386
+ }, "Type">[];
2387
+ readonly origin: Schema.Struct.ReadonlySide<{
2388
+ readonly _tag: Schema.tag<"human">;
2389
+ readonly actor: Schema.TaggedStruct<"human", {
2390
+ readonly personId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PersonId">;
2391
+ }>;
2392
+ readonly sessionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "SessionId">;
2393
+ }, "Type"> | Schema.Struct.ReadonlySide<{
2394
+ readonly _tag: Schema.tag<"agent">;
2395
+ readonly actor: Schema.TaggedStruct<"agent", {
2396
+ readonly agentId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "AgentId">;
2397
+ }>;
2398
+ readonly jobId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "JobId">;
2399
+ readonly initiatingSessionId: Schema.NullOr<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "SessionId">>;
2400
+ }, "Type">;
2401
+ readonly proposalExpiresAt: DateTime.Utc;
2402
+ readonly envelopeDigest: string & import("effect/Brand").Brand<string>;
2403
+ readonly releasePublication?: {
2404
+ readonly releaseId: string & import("effect/Brand").Brand<"ReleaseId">;
2405
+ readonly sourceRevisionDigest: string & import("effect/Brand").Brand<string>;
2406
+ readonly sourceRevisionCount: number;
2407
+ readonly predecessorPublicationActionId?: (string & import("effect/Brand").Brand<"GovernedActionId">) | null;
2408
+ };
2409
+ };
2410
+ head: Schema.Struct.ReadonlySide<{
2411
+ readonly state: Schema.Literals<readonly ["proposed", "authorized", "denied", "expired", "cancelled", "started", "cancel-requested", "cancel-requested-unknown", "succeeded", "failed", "unknown"]>;
2412
+ readonly lineage: Schema.TaggedUnion<{
2413
+ readonly accepted: Schema.TaggedStruct<"accepted", {
2414
+ readonly receipt: Schema.Struct<{
2415
+ readonly status: Schema.Literal<"accepted">;
2416
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
2417
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
2418
+ readonly safeSummary: Schema.String;
2419
+ readonly observedAt: Schema.DateTimeUtcFromString;
2420
+ }>;
2421
+ }>;
2422
+ readonly reconcilable: Schema.TaggedStruct<"reconcilable", {
2423
+ readonly providerOperationId: Schema.NullOr<Schema.brand<Schema.String, string>>;
2424
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
2425
+ }>;
2426
+ readonly manual: Schema.TaggedStruct<"manual", {
2427
+ readonly providerOperationId: Schema.NullOr<Schema.brand<Schema.String, string>>;
2428
+ }>;
2429
+ readonly none: Schema.TaggedStruct<"none", {}>;
2430
+ readonly terminal: Schema.TaggedStruct<"terminal", {
2431
+ readonly receipt: Schema.Struct<{
2432
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
2433
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
2434
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
2435
+ readonly safeSummary: Schema.String;
2436
+ readonly observedAt: Schema.DateTimeUtcFromString;
2437
+ }>;
2438
+ }>;
2439
+ }>;
2440
+ }, "Type">;
2441
+ headTransition: Schema.Struct.ReadonlySide<{
2442
+ readonly commandDigest: Schema.brand<Schema.String, "GovernedActionCommandDigest">;
2443
+ readonly schemaVersion: Schema.Literal<1>;
2444
+ readonly transitionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionTransitionId">;
2445
+ readonly previousTransitionId: Schema.NullOr<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionTransitionId">>;
2446
+ readonly commandId: Schema.brand<Schema.String, string>;
2447
+ readonly actionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionId">;
2448
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
2449
+ readonly sequence: Schema.Int;
2450
+ readonly fromState: Schema.NullOr<Schema.Literals<readonly ["proposed", "authorized", "denied", "expired", "cancelled", "started", "cancel-requested", "cancel-requested-unknown", "succeeded", "failed", "unknown"]>>;
2451
+ readonly toState: Schema.Literals<readonly ["proposed", "authorized", "denied", "expired", "cancelled", "started", "cancel-requested", "cancel-requested-unknown", "succeeded", "failed", "unknown"]>;
2452
+ readonly actionEnvelopeDigest: Schema.brand<Schema.String, string>;
2453
+ readonly command: Schema.TaggedUnion<{
2454
+ readonly propose: Schema.TaggedStruct<"propose", {}>;
2455
+ readonly authorize: Schema.TaggedStruct<"authorize", {
2456
+ readonly authorizationId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAuthorizationId">;
2457
+ }>;
2458
+ readonly deny: Schema.TaggedStruct<"deny", {
2459
+ readonly reason: Schema.Literals<readonly ["revision-changed", "evidence-stale", "evidence-invalid", "policy-denied", "session-invalid", "capability-changed", "plugin-unavailable", "preflight-blocked"]>;
2460
+ readonly safeSummary: Schema.String;
2461
+ }>;
2462
+ readonly expire: Schema.TaggedStruct<"expire", {
2463
+ readonly reason: Schema.Literals<readonly ["proposal-expired", "authorization-expired"]>;
2464
+ }>;
2465
+ readonly cancel: Schema.TaggedStruct<"cancel", {
2466
+ readonly safeSummary: Schema.String;
2467
+ }>;
2468
+ readonly start: Schema.TaggedStruct<"start", {
2469
+ readonly attemptId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAttemptId">;
2470
+ }>;
2471
+ readonly requestCancellation: Schema.TaggedStruct<"requestCancellation", {
2472
+ readonly safeSummary: Schema.String;
2473
+ }>;
2474
+ readonly recordAccepted: Schema.TaggedStruct<"recordAccepted", {
2475
+ readonly receipt: Schema.Struct<{
2476
+ readonly status: Schema.Literal<"accepted">;
2477
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
2478
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
2479
+ readonly safeSummary: Schema.String;
2480
+ readonly observedAt: Schema.DateTimeUtcFromString;
2481
+ }>;
2482
+ }>;
2483
+ readonly recordSucceeded: Schema.TaggedStruct<"recordSucceeded", {
2484
+ readonly receipt: Schema.Struct<{
2485
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
2486
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
2487
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
2488
+ readonly safeSummary: Schema.String;
2489
+ readonly observedAt: Schema.DateTimeUtcFromString;
2490
+ }>;
2491
+ readonly source: Schema.TaggedUnion<{
2492
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
2493
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
2494
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
2495
+ }>;
2496
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
2497
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
2498
+ }>;
2499
+ }>;
2500
+ }>;
2501
+ readonly recordFailed: Schema.TaggedStruct<"recordFailed", {
2502
+ readonly receipt: Schema.Struct<{
2503
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
2504
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
2505
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
2506
+ readonly safeSummary: Schema.String;
2507
+ readonly observedAt: Schema.DateTimeUtcFromString;
2508
+ }>;
2509
+ readonly source: Schema.TaggedUnion<{
2510
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
2511
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
2512
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
2513
+ }>;
2514
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
2515
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
2516
+ }>;
2517
+ }>;
2518
+ }>;
2519
+ readonly recordUnknown: Schema.TaggedStruct<"recordUnknown", {
2520
+ readonly outcome: Schema.TaggedUnion<{
2521
+ readonly reconcilable: Schema.TaggedStruct<"reconcilable", {
2522
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
2523
+ readonly observedAt: Schema.DateTimeUtcFromString;
2524
+ readonly safeSummary: Schema.String;
2525
+ }>;
2526
+ readonly manual: Schema.TaggedStruct<"manual", {
2527
+ readonly observedAt: Schema.DateTimeUtcFromString;
2528
+ readonly safeSummary: Schema.String;
2529
+ readonly reason: Schema.Literals<readonly ["dispatch-deadline-exceeded", "interrupted-after-intent", "provider-defect-after-intent", "malformed-provider-result", "receipt-persistence-failed", "missing-reconciliation-locator"]>;
2530
+ }>;
2531
+ }>;
2532
+ }>;
2533
+ readonly recordCancelled: Schema.TaggedStruct<"recordCancelled", {
2534
+ readonly receipt: Schema.Struct<{
2535
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
2536
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
2537
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
2538
+ readonly safeSummary: Schema.String;
2539
+ readonly observedAt: Schema.DateTimeUtcFromString;
2540
+ }>;
2541
+ readonly source: Schema.TaggedUnion<{
2542
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
2543
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
2544
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
2545
+ }>;
2546
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
2547
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
2548
+ }>;
2549
+ }>;
2550
+ }>;
2551
+ readonly reconciliationPending: Schema.TaggedStruct<"reconciliationPending", {
2552
+ readonly checkedAt: Schema.DateTimeUtcFromString;
2553
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
2554
+ }>;
2555
+ }>;
2556
+ readonly cause: Schema.TaggedUnion<{
2557
+ readonly human: Schema.TaggedStruct<"human", {
2558
+ readonly actor: Schema.TaggedStruct<"human", {
2559
+ readonly personId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PersonId">;
2560
+ }>;
2561
+ readonly sessionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "SessionId">;
2562
+ }>;
2563
+ readonly agent: Schema.TaggedStruct<"agent", {
2564
+ readonly actor: Schema.TaggedStruct<"agent", {
2565
+ readonly agentId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "AgentId">;
2566
+ }>;
2567
+ readonly jobId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "JobId">;
2568
+ }>;
2569
+ readonly system: Schema.TaggedStruct<"system", {
2570
+ readonly component: Schema.brand<Schema.String, string>;
2571
+ }>;
2572
+ }>;
2573
+ readonly occurredAt: Schema.DateTimeUtcFromString;
2574
+ readonly causationId: Schema.NullOr<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "DomainEventId">>;
2575
+ readonly correlationId: Schema.NullOr<Schema.brand<Schema.String, "DomainEventCorrelationId">>;
2576
+ }, "Type">;
2577
+ history: Schema.Struct.ReadonlySide<{
2578
+ readonly commandDigest: Schema.brand<Schema.String, "GovernedActionCommandDigest">;
2579
+ readonly schemaVersion: Schema.Literal<1>;
2580
+ readonly transitionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionTransitionId">;
2581
+ readonly previousTransitionId: Schema.NullOr<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionTransitionId">>;
2582
+ readonly commandId: Schema.brand<Schema.String, string>;
2583
+ readonly actionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionId">;
2584
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
2585
+ readonly sequence: Schema.Int;
2586
+ readonly fromState: Schema.NullOr<Schema.Literals<readonly ["proposed", "authorized", "denied", "expired", "cancelled", "started", "cancel-requested", "cancel-requested-unknown", "succeeded", "failed", "unknown"]>>;
2587
+ readonly toState: Schema.Literals<readonly ["proposed", "authorized", "denied", "expired", "cancelled", "started", "cancel-requested", "cancel-requested-unknown", "succeeded", "failed", "unknown"]>;
2588
+ readonly actionEnvelopeDigest: Schema.brand<Schema.String, string>;
2589
+ readonly command: Schema.TaggedUnion<{
2590
+ readonly propose: Schema.TaggedStruct<"propose", {}>;
2591
+ readonly authorize: Schema.TaggedStruct<"authorize", {
2592
+ readonly authorizationId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAuthorizationId">;
2593
+ }>;
2594
+ readonly deny: Schema.TaggedStruct<"deny", {
2595
+ readonly reason: Schema.Literals<readonly ["revision-changed", "evidence-stale", "evidence-invalid", "policy-denied", "session-invalid", "capability-changed", "plugin-unavailable", "preflight-blocked"]>;
2596
+ readonly safeSummary: Schema.String;
2597
+ }>;
2598
+ readonly expire: Schema.TaggedStruct<"expire", {
2599
+ readonly reason: Schema.Literals<readonly ["proposal-expired", "authorization-expired"]>;
2600
+ }>;
2601
+ readonly cancel: Schema.TaggedStruct<"cancel", {
2602
+ readonly safeSummary: Schema.String;
2603
+ }>;
2604
+ readonly start: Schema.TaggedStruct<"start", {
2605
+ readonly attemptId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAttemptId">;
2606
+ }>;
2607
+ readonly requestCancellation: Schema.TaggedStruct<"requestCancellation", {
2608
+ readonly safeSummary: Schema.String;
2609
+ }>;
2610
+ readonly recordAccepted: Schema.TaggedStruct<"recordAccepted", {
2611
+ readonly receipt: Schema.Struct<{
2612
+ readonly status: Schema.Literal<"accepted">;
2613
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
2614
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
2615
+ readonly safeSummary: Schema.String;
2616
+ readonly observedAt: Schema.DateTimeUtcFromString;
2617
+ }>;
2618
+ }>;
2619
+ readonly recordSucceeded: Schema.TaggedStruct<"recordSucceeded", {
2620
+ readonly receipt: Schema.Struct<{
2621
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
2622
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
2623
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
2624
+ readonly safeSummary: Schema.String;
2625
+ readonly observedAt: Schema.DateTimeUtcFromString;
2626
+ }>;
2627
+ readonly source: Schema.TaggedUnion<{
2628
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
2629
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
2630
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
2631
+ }>;
2632
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
2633
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
2634
+ }>;
2635
+ }>;
2636
+ }>;
2637
+ readonly recordFailed: Schema.TaggedStruct<"recordFailed", {
2638
+ readonly receipt: Schema.Struct<{
2639
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
2640
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
2641
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
2642
+ readonly safeSummary: Schema.String;
2643
+ readonly observedAt: Schema.DateTimeUtcFromString;
2644
+ }>;
2645
+ readonly source: Schema.TaggedUnion<{
2646
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
2647
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
2648
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
2649
+ }>;
2650
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
2651
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
2652
+ }>;
2653
+ }>;
2654
+ }>;
2655
+ readonly recordUnknown: Schema.TaggedStruct<"recordUnknown", {
2656
+ readonly outcome: Schema.TaggedUnion<{
2657
+ readonly reconcilable: Schema.TaggedStruct<"reconcilable", {
2658
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
2659
+ readonly observedAt: Schema.DateTimeUtcFromString;
2660
+ readonly safeSummary: Schema.String;
2661
+ }>;
2662
+ readonly manual: Schema.TaggedStruct<"manual", {
2663
+ readonly observedAt: Schema.DateTimeUtcFromString;
2664
+ readonly safeSummary: Schema.String;
2665
+ readonly reason: Schema.Literals<readonly ["dispatch-deadline-exceeded", "interrupted-after-intent", "provider-defect-after-intent", "malformed-provider-result", "receipt-persistence-failed", "missing-reconciliation-locator"]>;
2666
+ }>;
2667
+ }>;
2668
+ }>;
2669
+ readonly recordCancelled: Schema.TaggedStruct<"recordCancelled", {
2670
+ readonly receipt: Schema.Struct<{
2671
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
2672
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
2673
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
2674
+ readonly safeSummary: Schema.String;
2675
+ readonly observedAt: Schema.DateTimeUtcFromString;
2676
+ }>;
2677
+ readonly source: Schema.TaggedUnion<{
2678
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
2679
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
2680
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
2681
+ }>;
2682
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
2683
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
2684
+ }>;
2685
+ }>;
2686
+ }>;
2687
+ readonly reconciliationPending: Schema.TaggedStruct<"reconciliationPending", {
2688
+ readonly checkedAt: Schema.DateTimeUtcFromString;
2689
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
2690
+ }>;
2691
+ }>;
2692
+ readonly cause: Schema.TaggedUnion<{
2693
+ readonly human: Schema.TaggedStruct<"human", {
2694
+ readonly actor: Schema.TaggedStruct<"human", {
2695
+ readonly personId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PersonId">;
2696
+ }>;
2697
+ readonly sessionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "SessionId">;
2698
+ }>;
2699
+ readonly agent: Schema.TaggedStruct<"agent", {
2700
+ readonly actor: Schema.TaggedStruct<"agent", {
2701
+ readonly agentId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "AgentId">;
2702
+ }>;
2703
+ readonly jobId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "JobId">;
2704
+ }>;
2705
+ readonly system: Schema.TaggedStruct<"system", {
2706
+ readonly component: Schema.brand<Schema.String, string>;
2707
+ }>;
2708
+ }>;
2709
+ readonly occurredAt: Schema.DateTimeUtcFromString;
2710
+ readonly causationId: Schema.NullOr<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "DomainEventId">>;
2711
+ readonly correlationId: Schema.NullOr<Schema.brand<Schema.String, "DomainEventCorrelationId">>;
2712
+ }, "Type">[];
2713
+ authorization: Schema.Struct.ReadonlySide<{
2714
+ readonly schemaVersion: Schema.Literal<1>;
2715
+ readonly authorizationId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAuthorizationId">;
2716
+ readonly actionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionId">;
2717
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
2718
+ readonly pluginConnectionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PluginConnectionId">;
2719
+ readonly pluginConnectionRevision: Schema.brand<Schema.Int, "GovernedActionPluginConnectionRevision">;
2720
+ readonly pluginConnectionAuthorityDigest: Schema.brand<Schema.String, string>;
2721
+ readonly actionEnvelopeDigest: Schema.brand<Schema.String, string>;
2722
+ readonly idempotencyKey: Schema.brand<Schema.String, "GovernedActionIdempotencyKey">;
2723
+ readonly payloadDigest: Schema.brand<Schema.String, "PluginActionPayloadDigest">;
2724
+ readonly evidenceSetDigest: Schema.brand<Schema.String, string>;
2725
+ readonly policyDigest: Schema.brand<Schema.String, string>;
2726
+ readonly expectedRevision: Schema.brand<Schema.String, "Revision">;
2727
+ readonly capabilityVersion: Schema.Int;
2728
+ readonly actor: Schema.TaggedStruct<"human", {
2729
+ readonly personId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PersonId">;
2730
+ }>;
2731
+ readonly sessionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "SessionId">;
2732
+ readonly sessionPermission: Schema.Literals<readonly ["workspace-owner", "workspace-approver", "release-owner", "release-approver", "change-owner", "issue-owner", "issue-assignee", "page-owner", "author", "contributor", "reviewer", "operator", "deployment-approver", "merge-approver", "watcher"]>;
2733
+ readonly sessionExpiresAt: Schema.DateTimeUtcFromString;
2734
+ readonly requiredPermission: Schema.Literals<readonly ["workspace-owner", "workspace-approver", "release-owner", "release-approver", "change-owner", "issue-owner", "issue-assignee", "page-owner", "author", "contributor", "reviewer", "operator", "deployment-approver", "merge-approver", "watcher"]>;
2735
+ readonly authorizedAt: Schema.DateTimeUtcFromString;
2736
+ readonly expiresAt: Schema.DateTimeUtcFromString;
2737
+ }, "Type"> | null;
2738
+ policyEvaluation: Schema.Struct.ReadonlySide<{
2739
+ readonly schemaVersion: Schema.Literal<1>;
2740
+ readonly actionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionId">;
2741
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
2742
+ readonly policy: Schema.Struct<{
2743
+ readonly policyId: Schema.brand<Schema.String, string>;
2744
+ readonly policyVersion: Schema.Int;
2745
+ readonly policyDigest: Schema.brand<Schema.String, string>;
2746
+ readonly requiredPermission: Schema.Literals<readonly ["workspace-owner", "workspace-approver", "release-owner", "release-approver", "change-owner", "issue-owner", "issue-assignee", "page-owner", "author", "contributor", "reviewer", "operator", "deployment-approver", "merge-approver", "watcher"]>;
2747
+ }>;
2748
+ readonly payloadDigest: Schema.brand<Schema.String, "PluginActionPayloadDigest">;
2749
+ readonly evidenceSetDigest: Schema.brand<Schema.String, string>;
2750
+ readonly expectedRevision: Schema.brand<Schema.String, "Revision">;
2751
+ readonly decision: Schema.Literals<readonly ["allowed", "denied"]>;
2752
+ readonly evaluatedAt: Schema.DateTimeUtcFromString;
2753
+ }, "Type"> | null;
2754
+ attempt: Schema.Struct.ReadonlySide<{
2755
+ readonly schemaVersion: Schema.Literal<1>;
2756
+ readonly attemptId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAttemptId">;
2757
+ readonly authorizationId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAuthorizationId">;
2758
+ readonly actionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionId">;
2759
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
2760
+ readonly pluginConnectionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PluginConnectionId">;
2761
+ readonly idempotencyKey: Schema.brand<Schema.String, "GovernedActionIdempotencyKey">;
2762
+ readonly attemptNumber: Schema.Literal<1>;
2763
+ readonly actionEnvelopeDigest: Schema.brand<Schema.String, string>;
2764
+ readonly expectedRevision: Schema.brand<Schema.String, "Revision">;
2765
+ readonly policyEvaluationDigest: Schema.brand<Schema.String, string>;
2766
+ readonly preflight: Schema.TaggedStruct<"ready", {
2767
+ readonly checkedRevision: Schema.brand<Schema.String, "Revision">;
2768
+ readonly checkedAt: Schema.DateTimeUtcFromString;
2769
+ }>;
2770
+ readonly startedAt: Schema.DateTimeUtcFromString;
2771
+ }, "Type"> | null;
2772
+ }, import("../persistence/Persistence.js").PersistenceOperationFailure, never>;
2773
+ readLatestTerminalByTarget: (input: unknown) => Effect.Effect<readonly Schema.Struct.ReadonlySide<{
2774
+ readonly envelope: Schema.Struct<{
2775
+ readonly envelopeDigest: Schema.brand<Schema.String, string>;
2776
+ readonly schemaVersion: Schema.Literal<1>;
2777
+ readonly actionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionId">;
2778
+ readonly idempotencyKey: Schema.brand<Schema.String, "GovernedActionIdempotencyKey">;
2779
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
2780
+ readonly pluginConnectionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PluginConnectionId">;
2781
+ readonly pluginConnectionRevision: Schema.brand<Schema.Int, "GovernedActionPluginConnectionRevision">;
2782
+ readonly pluginConnectionAuthorityDigest: Schema.brand<Schema.String, string>;
2783
+ readonly pluginId: Schema.brand<Schema.String, string>;
2784
+ readonly pluginContractVersion: Schema.Struct<{
2785
+ readonly major: Schema.Int;
2786
+ readonly minor: Schema.Int;
2787
+ readonly patch: Schema.Int;
2788
+ }>;
2789
+ readonly pluginAdapterVersion: Schema.Struct<{
2790
+ readonly major: Schema.Int;
2791
+ readonly minor: Schema.Int;
2792
+ readonly patch: Schema.Int;
2793
+ }>;
2794
+ readonly providerId: Schema.Literals<readonly ["codecommit", "codepipeline", "jira", "confluence", "clockify"]>;
2795
+ readonly capability: Schema.Struct<{
2796
+ readonly capabilityId: Schema.Literal<"action.execute">;
2797
+ readonly version: Schema.Int;
2798
+ }>;
2799
+ readonly targetEntityId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "EntityId">;
2800
+ readonly proposal: Schema.Struct<{
2801
+ readonly proposalKey: Schema.brand<Schema.String, string>;
2802
+ readonly capabilityVersion: Schema.Int;
2803
+ readonly request: Schema.Struct<{
2804
+ readonly actionKind: Schema.brand<Schema.String, string>;
2805
+ readonly target: Schema.Struct<{
2806
+ entityType: Schema.brand<Schema.String, string>;
2807
+ vendorImmutableId: Schema.brand<Schema.String, "VendorImmutableId">;
2808
+ }>;
2809
+ readonly expectedRevision: Schema.brand<Schema.String, "Revision">;
2810
+ readonly payload: Schema.Codec<Schema.Json, Schema.Json, never, never>;
2811
+ readonly evidenceIds: Schema.$Array<Schema.brand<Schema.String, string>>;
2812
+ }>;
2813
+ readonly payloadDigest: Schema.brand<Schema.String, "PluginActionPayloadDigest">;
2814
+ readonly summary: Schema.String;
2815
+ readonly impact: Schema.Struct<{
2816
+ readonly level: Schema.Literals<readonly ["low", "medium", "high", "critical"]>;
2817
+ readonly summary: Schema.String;
2818
+ }>;
2819
+ readonly proposedAt: Schema.DateTimeUtcFromString;
2820
+ }>;
2821
+ readonly evidence: Schema.$Array<Schema.Struct<{
2822
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
2823
+ readonly evidenceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "EvidenceId">;
2824
+ readonly evidenceClaimIds: Schema.$Array<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "EvidenceClaimId">>;
2825
+ readonly observedAt: Schema.DateTimeUtcFromString;
2826
+ readonly validUntil: Schema.NullOr<Schema.DateTimeUtcFromString>;
2827
+ readonly currentUntil: Schema.NullOr<Schema.DateTimeUtcFromString>;
2828
+ readonly evaluatedAt: Schema.DateTimeUtcFromString;
2829
+ readonly source: Schema.Literals<readonly ["current", "stale", "missing", "unavailable"]>;
2830
+ readonly validity: Schema.Literals<readonly ["valid", "expired"]>;
2831
+ }>>;
2832
+ readonly evidenceSetDigest: Schema.brand<Schema.String, string>;
2833
+ readonly policy: Schema.Struct<{
2834
+ readonly policyId: Schema.brand<Schema.String, string>;
2835
+ readonly policyVersion: Schema.Int;
2836
+ readonly policyDigest: Schema.brand<Schema.String, string>;
2837
+ readonly requiredPermission: Schema.Literals<readonly ["workspace-owner", "workspace-approver", "release-owner", "release-approver", "change-owner", "issue-owner", "issue-assignee", "page-owner", "author", "contributor", "reviewer", "operator", "deployment-approver", "merge-approver", "watcher"]>;
2838
+ }>;
2839
+ readonly origin: Schema.TaggedUnion<{
2840
+ readonly human: Schema.TaggedStruct<"human", {
2841
+ readonly actor: Schema.TaggedStruct<"human", {
2842
+ readonly personId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PersonId">;
2843
+ }>;
2844
+ readonly sessionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "SessionId">;
2845
+ }>;
2846
+ readonly agent: Schema.TaggedStruct<"agent", {
2847
+ readonly actor: Schema.TaggedStruct<"agent", {
2848
+ readonly agentId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "AgentId">;
2849
+ }>;
2850
+ readonly jobId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "JobId">;
2851
+ readonly initiatingSessionId: Schema.NullOr<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "SessionId">>;
2852
+ }>;
2853
+ }>;
2854
+ readonly proposalExpiresAt: Schema.DateTimeUtcFromString;
2855
+ readonly causationId: Schema.NullOr<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "DomainEventId">>;
2856
+ readonly correlationId: Schema.NullOr<Schema.brand<Schema.String, "DomainEventCorrelationId">>;
2857
+ readonly releasePublication: Schema.optionalKey<Schema.Struct<{
2858
+ readonly releaseId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "ReleaseId">;
2859
+ readonly predecessorPublicationActionId: Schema.optionalKey<Schema.NullOr<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionId">>>;
2860
+ readonly sourceRevisionDigest: Schema.brand<Schema.String, string>;
2861
+ readonly sourceRevisionCount: Schema.Int;
2862
+ }>>;
2863
+ }>;
2864
+ readonly head: Schema.Struct<{
2865
+ readonly state: Schema.Literals<readonly ["proposed", "authorized", "denied", "expired", "cancelled", "started", "cancel-requested", "cancel-requested-unknown", "succeeded", "failed", "unknown"]>;
2866
+ readonly lineage: Schema.TaggedUnion<{
2867
+ readonly accepted: Schema.TaggedStruct<"accepted", {
2868
+ readonly receipt: Schema.Struct<{
2869
+ readonly status: Schema.Literal<"accepted">;
2870
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
2871
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
2872
+ readonly safeSummary: Schema.String;
2873
+ readonly observedAt: Schema.DateTimeUtcFromString;
2874
+ }>;
2875
+ }>;
2876
+ readonly reconcilable: Schema.TaggedStruct<"reconcilable", {
2877
+ readonly providerOperationId: Schema.NullOr<Schema.brand<Schema.String, string>>;
2878
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
2879
+ }>;
2880
+ readonly manual: Schema.TaggedStruct<"manual", {
2881
+ readonly providerOperationId: Schema.NullOr<Schema.brand<Schema.String, string>>;
2882
+ }>;
2883
+ readonly none: Schema.TaggedStruct<"none", {}>;
2884
+ readonly terminal: Schema.TaggedStruct<"terminal", {
2885
+ readonly receipt: Schema.Struct<{
2886
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
2887
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
2888
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
2889
+ readonly safeSummary: Schema.String;
2890
+ readonly observedAt: Schema.DateTimeUtcFromString;
2891
+ }>;
2892
+ }>;
2893
+ }>;
2894
+ }>;
2895
+ readonly headTransition: Schema.Struct<{
2896
+ readonly commandDigest: Schema.brand<Schema.String, "GovernedActionCommandDigest">;
2897
+ readonly schemaVersion: Schema.Literal<1>;
2898
+ readonly transitionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionTransitionId">;
2899
+ readonly previousTransitionId: Schema.NullOr<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionTransitionId">>;
2900
+ readonly commandId: Schema.brand<Schema.String, string>;
2901
+ readonly actionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionId">;
2902
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
2903
+ readonly sequence: Schema.Int;
2904
+ readonly fromState: Schema.NullOr<Schema.Literals<readonly ["proposed", "authorized", "denied", "expired", "cancelled", "started", "cancel-requested", "cancel-requested-unknown", "succeeded", "failed", "unknown"]>>;
2905
+ readonly toState: Schema.Literals<readonly ["proposed", "authorized", "denied", "expired", "cancelled", "started", "cancel-requested", "cancel-requested-unknown", "succeeded", "failed", "unknown"]>;
2906
+ readonly actionEnvelopeDigest: Schema.brand<Schema.String, string>;
2907
+ readonly command: Schema.TaggedUnion<{
2908
+ readonly propose: Schema.TaggedStruct<"propose", {}>;
2909
+ readonly authorize: Schema.TaggedStruct<"authorize", {
2910
+ readonly authorizationId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAuthorizationId">;
2911
+ }>;
2912
+ readonly deny: Schema.TaggedStruct<"deny", {
2913
+ readonly reason: Schema.Literals<readonly ["revision-changed", "evidence-stale", "evidence-invalid", "policy-denied", "session-invalid", "capability-changed", "plugin-unavailable", "preflight-blocked"]>;
2914
+ readonly safeSummary: Schema.String;
2915
+ }>;
2916
+ readonly expire: Schema.TaggedStruct<"expire", {
2917
+ readonly reason: Schema.Literals<readonly ["proposal-expired", "authorization-expired"]>;
2918
+ }>;
2919
+ readonly cancel: Schema.TaggedStruct<"cancel", {
2920
+ readonly safeSummary: Schema.String;
2921
+ }>;
2922
+ readonly start: Schema.TaggedStruct<"start", {
2923
+ readonly attemptId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAttemptId">;
2924
+ }>;
2925
+ readonly requestCancellation: Schema.TaggedStruct<"requestCancellation", {
2926
+ readonly safeSummary: Schema.String;
2927
+ }>;
2928
+ readonly recordAccepted: Schema.TaggedStruct<"recordAccepted", {
2929
+ readonly receipt: Schema.Struct<{
2930
+ readonly status: Schema.Literal<"accepted">;
2931
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
2932
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
2933
+ readonly safeSummary: Schema.String;
2934
+ readonly observedAt: Schema.DateTimeUtcFromString;
2935
+ }>;
2936
+ }>;
2937
+ readonly recordSucceeded: Schema.TaggedStruct<"recordSucceeded", {
2938
+ readonly receipt: Schema.Struct<{
2939
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
2940
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
2941
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
2942
+ readonly safeSummary: Schema.String;
2943
+ readonly observedAt: Schema.DateTimeUtcFromString;
2944
+ }>;
2945
+ readonly source: Schema.TaggedUnion<{
2946
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
2947
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
2948
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
2949
+ }>;
2950
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
2951
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
2952
+ }>;
2953
+ }>;
2954
+ }>;
2955
+ readonly recordFailed: Schema.TaggedStruct<"recordFailed", {
2956
+ readonly receipt: Schema.Struct<{
2957
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
2958
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
2959
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
2960
+ readonly safeSummary: Schema.String;
2961
+ readonly observedAt: Schema.DateTimeUtcFromString;
2962
+ }>;
2963
+ readonly source: Schema.TaggedUnion<{
2964
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
2965
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
2966
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
2967
+ }>;
2968
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
2969
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
2970
+ }>;
2971
+ }>;
2972
+ }>;
2973
+ readonly recordUnknown: Schema.TaggedStruct<"recordUnknown", {
2974
+ readonly outcome: Schema.TaggedUnion<{
2975
+ readonly reconcilable: Schema.TaggedStruct<"reconcilable", {
2976
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
2977
+ readonly observedAt: Schema.DateTimeUtcFromString;
2978
+ readonly safeSummary: Schema.String;
2979
+ }>;
2980
+ readonly manual: Schema.TaggedStruct<"manual", {
2981
+ readonly observedAt: Schema.DateTimeUtcFromString;
2982
+ readonly safeSummary: Schema.String;
2983
+ readonly reason: Schema.Literals<readonly ["dispatch-deadline-exceeded", "interrupted-after-intent", "provider-defect-after-intent", "malformed-provider-result", "receipt-persistence-failed", "missing-reconciliation-locator"]>;
2984
+ }>;
2985
+ }>;
2986
+ }>;
2987
+ readonly recordCancelled: Schema.TaggedStruct<"recordCancelled", {
2988
+ readonly receipt: Schema.Struct<{
2989
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
2990
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
2991
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
2992
+ readonly safeSummary: Schema.String;
2993
+ readonly observedAt: Schema.DateTimeUtcFromString;
2994
+ }>;
2995
+ readonly source: Schema.TaggedUnion<{
2996
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
2997
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
2998
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
2999
+ }>;
3000
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
3001
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
3002
+ }>;
3003
+ }>;
3004
+ }>;
3005
+ readonly reconciliationPending: Schema.TaggedStruct<"reconciliationPending", {
3006
+ readonly checkedAt: Schema.DateTimeUtcFromString;
3007
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
3008
+ }>;
3009
+ }>;
3010
+ readonly cause: Schema.TaggedUnion<{
3011
+ readonly human: Schema.TaggedStruct<"human", {
3012
+ readonly actor: Schema.TaggedStruct<"human", {
3013
+ readonly personId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PersonId">;
3014
+ }>;
3015
+ readonly sessionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "SessionId">;
3016
+ }>;
3017
+ readonly agent: Schema.TaggedStruct<"agent", {
3018
+ readonly actor: Schema.TaggedStruct<"agent", {
3019
+ readonly agentId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "AgentId">;
3020
+ }>;
3021
+ readonly jobId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "JobId">;
3022
+ }>;
3023
+ readonly system: Schema.TaggedStruct<"system", {
3024
+ readonly component: Schema.brand<Schema.String, string>;
3025
+ }>;
3026
+ }>;
3027
+ readonly occurredAt: Schema.DateTimeUtcFromString;
3028
+ readonly causationId: Schema.NullOr<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "DomainEventId">>;
3029
+ readonly correlationId: Schema.NullOr<Schema.brand<Schema.String, "DomainEventCorrelationId">>;
3030
+ }>;
3031
+ readonly history: Schema.$Array<Schema.Struct<{
3032
+ readonly commandDigest: Schema.brand<Schema.String, "GovernedActionCommandDigest">;
3033
+ readonly schemaVersion: Schema.Literal<1>;
3034
+ readonly transitionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionTransitionId">;
3035
+ readonly previousTransitionId: Schema.NullOr<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionTransitionId">>;
3036
+ readonly commandId: Schema.brand<Schema.String, string>;
3037
+ readonly actionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionId">;
3038
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
3039
+ readonly sequence: Schema.Int;
3040
+ readonly fromState: Schema.NullOr<Schema.Literals<readonly ["proposed", "authorized", "denied", "expired", "cancelled", "started", "cancel-requested", "cancel-requested-unknown", "succeeded", "failed", "unknown"]>>;
3041
+ readonly toState: Schema.Literals<readonly ["proposed", "authorized", "denied", "expired", "cancelled", "started", "cancel-requested", "cancel-requested-unknown", "succeeded", "failed", "unknown"]>;
3042
+ readonly actionEnvelopeDigest: Schema.brand<Schema.String, string>;
3043
+ readonly command: Schema.TaggedUnion<{
3044
+ readonly propose: Schema.TaggedStruct<"propose", {}>;
3045
+ readonly authorize: Schema.TaggedStruct<"authorize", {
3046
+ readonly authorizationId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAuthorizationId">;
3047
+ }>;
3048
+ readonly deny: Schema.TaggedStruct<"deny", {
3049
+ readonly reason: Schema.Literals<readonly ["revision-changed", "evidence-stale", "evidence-invalid", "policy-denied", "session-invalid", "capability-changed", "plugin-unavailable", "preflight-blocked"]>;
3050
+ readonly safeSummary: Schema.String;
3051
+ }>;
3052
+ readonly expire: Schema.TaggedStruct<"expire", {
3053
+ readonly reason: Schema.Literals<readonly ["proposal-expired", "authorization-expired"]>;
3054
+ }>;
3055
+ readonly cancel: Schema.TaggedStruct<"cancel", {
3056
+ readonly safeSummary: Schema.String;
3057
+ }>;
3058
+ readonly start: Schema.TaggedStruct<"start", {
3059
+ readonly attemptId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAttemptId">;
3060
+ }>;
3061
+ readonly requestCancellation: Schema.TaggedStruct<"requestCancellation", {
3062
+ readonly safeSummary: Schema.String;
3063
+ }>;
3064
+ readonly recordAccepted: Schema.TaggedStruct<"recordAccepted", {
3065
+ readonly receipt: Schema.Struct<{
3066
+ readonly status: Schema.Literal<"accepted">;
3067
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
3068
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
3069
+ readonly safeSummary: Schema.String;
3070
+ readonly observedAt: Schema.DateTimeUtcFromString;
3071
+ }>;
3072
+ }>;
3073
+ readonly recordSucceeded: Schema.TaggedStruct<"recordSucceeded", {
3074
+ readonly receipt: Schema.Struct<{
3075
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
3076
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
3077
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
3078
+ readonly safeSummary: Schema.String;
3079
+ readonly observedAt: Schema.DateTimeUtcFromString;
3080
+ }>;
3081
+ readonly source: Schema.TaggedUnion<{
3082
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
3083
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
3084
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
3085
+ }>;
3086
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
3087
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
3088
+ }>;
3089
+ }>;
3090
+ }>;
3091
+ readonly recordFailed: Schema.TaggedStruct<"recordFailed", {
3092
+ readonly receipt: Schema.Struct<{
3093
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
3094
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
3095
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
3096
+ readonly safeSummary: Schema.String;
3097
+ readonly observedAt: Schema.DateTimeUtcFromString;
3098
+ }>;
3099
+ readonly source: Schema.TaggedUnion<{
3100
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
3101
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
3102
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
3103
+ }>;
3104
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
3105
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
3106
+ }>;
3107
+ }>;
3108
+ }>;
3109
+ readonly recordUnknown: Schema.TaggedStruct<"recordUnknown", {
3110
+ readonly outcome: Schema.TaggedUnion<{
3111
+ readonly reconcilable: Schema.TaggedStruct<"reconcilable", {
3112
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
3113
+ readonly observedAt: Schema.DateTimeUtcFromString;
3114
+ readonly safeSummary: Schema.String;
3115
+ }>;
3116
+ readonly manual: Schema.TaggedStruct<"manual", {
3117
+ readonly observedAt: Schema.DateTimeUtcFromString;
3118
+ readonly safeSummary: Schema.String;
3119
+ readonly reason: Schema.Literals<readonly ["dispatch-deadline-exceeded", "interrupted-after-intent", "provider-defect-after-intent", "malformed-provider-result", "receipt-persistence-failed", "missing-reconciliation-locator"]>;
3120
+ }>;
3121
+ }>;
3122
+ }>;
3123
+ readonly recordCancelled: Schema.TaggedStruct<"recordCancelled", {
3124
+ readonly receipt: Schema.Struct<{
3125
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
3126
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
3127
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
3128
+ readonly safeSummary: Schema.String;
3129
+ readonly observedAt: Schema.DateTimeUtcFromString;
3130
+ }>;
3131
+ readonly source: Schema.TaggedUnion<{
3132
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
3133
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
3134
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
3135
+ }>;
3136
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
3137
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
3138
+ }>;
3139
+ }>;
3140
+ }>;
3141
+ readonly reconciliationPending: Schema.TaggedStruct<"reconciliationPending", {
3142
+ readonly checkedAt: Schema.DateTimeUtcFromString;
3143
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
3144
+ }>;
3145
+ }>;
3146
+ readonly cause: Schema.TaggedUnion<{
3147
+ readonly human: Schema.TaggedStruct<"human", {
3148
+ readonly actor: Schema.TaggedStruct<"human", {
3149
+ readonly personId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PersonId">;
3150
+ }>;
3151
+ readonly sessionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "SessionId">;
3152
+ }>;
3153
+ readonly agent: Schema.TaggedStruct<"agent", {
3154
+ readonly actor: Schema.TaggedStruct<"agent", {
3155
+ readonly agentId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "AgentId">;
3156
+ }>;
3157
+ readonly jobId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "JobId">;
3158
+ }>;
3159
+ readonly system: Schema.TaggedStruct<"system", {
3160
+ readonly component: Schema.brand<Schema.String, string>;
3161
+ }>;
3162
+ }>;
3163
+ readonly occurredAt: Schema.DateTimeUtcFromString;
3164
+ readonly causationId: Schema.NullOr<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "DomainEventId">>;
3165
+ readonly correlationId: Schema.NullOr<Schema.brand<Schema.String, "DomainEventCorrelationId">>;
3166
+ }>>;
3167
+ readonly authorization: Schema.NullOr<Schema.Struct<{
3168
+ readonly schemaVersion: Schema.Literal<1>;
3169
+ readonly authorizationId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAuthorizationId">;
3170
+ readonly actionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionId">;
3171
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
3172
+ readonly pluginConnectionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PluginConnectionId">;
3173
+ readonly pluginConnectionRevision: Schema.brand<Schema.Int, "GovernedActionPluginConnectionRevision">;
3174
+ readonly pluginConnectionAuthorityDigest: Schema.brand<Schema.String, string>;
3175
+ readonly actionEnvelopeDigest: Schema.brand<Schema.String, string>;
3176
+ readonly idempotencyKey: Schema.brand<Schema.String, "GovernedActionIdempotencyKey">;
3177
+ readonly payloadDigest: Schema.brand<Schema.String, "PluginActionPayloadDigest">;
3178
+ readonly evidenceSetDigest: Schema.brand<Schema.String, string>;
3179
+ readonly policyDigest: Schema.brand<Schema.String, string>;
3180
+ readonly expectedRevision: Schema.brand<Schema.String, "Revision">;
3181
+ readonly capabilityVersion: Schema.Int;
3182
+ readonly actor: Schema.TaggedStruct<"human", {
3183
+ readonly personId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PersonId">;
3184
+ }>;
3185
+ readonly sessionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "SessionId">;
3186
+ readonly sessionPermission: Schema.Literals<readonly ["workspace-owner", "workspace-approver", "release-owner", "release-approver", "change-owner", "issue-owner", "issue-assignee", "page-owner", "author", "contributor", "reviewer", "operator", "deployment-approver", "merge-approver", "watcher"]>;
3187
+ readonly sessionExpiresAt: Schema.DateTimeUtcFromString;
3188
+ readonly requiredPermission: Schema.Literals<readonly ["workspace-owner", "workspace-approver", "release-owner", "release-approver", "change-owner", "issue-owner", "issue-assignee", "page-owner", "author", "contributor", "reviewer", "operator", "deployment-approver", "merge-approver", "watcher"]>;
3189
+ readonly authorizedAt: Schema.DateTimeUtcFromString;
3190
+ readonly expiresAt: Schema.DateTimeUtcFromString;
3191
+ }>>;
3192
+ readonly policyEvaluation: Schema.NullOr<Schema.Struct<{
3193
+ readonly schemaVersion: Schema.Literal<1>;
3194
+ readonly actionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionId">;
3195
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
3196
+ readonly policy: Schema.Struct<{
3197
+ readonly policyId: Schema.brand<Schema.String, string>;
3198
+ readonly policyVersion: Schema.Int;
3199
+ readonly policyDigest: Schema.brand<Schema.String, string>;
3200
+ readonly requiredPermission: Schema.Literals<readonly ["workspace-owner", "workspace-approver", "release-owner", "release-approver", "change-owner", "issue-owner", "issue-assignee", "page-owner", "author", "contributor", "reviewer", "operator", "deployment-approver", "merge-approver", "watcher"]>;
3201
+ }>;
3202
+ readonly payloadDigest: Schema.brand<Schema.String, "PluginActionPayloadDigest">;
3203
+ readonly evidenceSetDigest: Schema.brand<Schema.String, string>;
3204
+ readonly expectedRevision: Schema.brand<Schema.String, "Revision">;
3205
+ readonly decision: Schema.Literals<readonly ["allowed", "denied"]>;
3206
+ readonly evaluatedAt: Schema.DateTimeUtcFromString;
3207
+ }>>;
3208
+ readonly attempt: Schema.NullOr<Schema.Struct<{
3209
+ readonly schemaVersion: Schema.Literal<1>;
3210
+ readonly attemptId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAttemptId">;
3211
+ readonly authorizationId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAuthorizationId">;
3212
+ readonly actionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionId">;
3213
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
3214
+ readonly pluginConnectionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PluginConnectionId">;
3215
+ readonly idempotencyKey: Schema.brand<Schema.String, "GovernedActionIdempotencyKey">;
3216
+ readonly attemptNumber: Schema.Literal<1>;
3217
+ readonly actionEnvelopeDigest: Schema.brand<Schema.String, string>;
3218
+ readonly expectedRevision: Schema.brand<Schema.String, "Revision">;
3219
+ readonly policyEvaluationDigest: Schema.brand<Schema.String, string>;
3220
+ readonly preflight: Schema.TaggedStruct<"ready", {
3221
+ readonly checkedRevision: Schema.brand<Schema.String, "Revision">;
3222
+ readonly checkedAt: Schema.DateTimeUtcFromString;
3223
+ }>;
3224
+ readonly startedAt: Schema.DateTimeUtcFromString;
3225
+ }>>;
3226
+ }, "Type">[], import("../persistence/Persistence.js").PersistenceOperationFailure, never>;
3227
+ readLatestTerminalReleasePublications: (input: unknown) => Effect.Effect<{
3228
+ envelope: {
3229
+ readonly providerId: "codecommit" | "codepipeline" | "jira" | "confluence" | "clockify";
3230
+ readonly pluginConnectionId: string & import("effect/Brand").Brand<"PluginConnectionId">;
3231
+ readonly workspaceId: string & import("effect/Brand").Brand<"WorkspaceId">;
3232
+ readonly schemaVersion: 1;
3233
+ readonly causationId: (string & import("effect/Brand").Brand<"DomainEventId">) | null;
3234
+ readonly correlationId: (string & import("effect/Brand").Brand<"DomainEventCorrelationId">) | null;
3235
+ readonly proposal: Schema.Struct.ReadonlySide<{
3236
+ readonly proposalKey: Schema.brand<Schema.String, string>;
3237
+ readonly capabilityVersion: Schema.Int;
3238
+ readonly request: Schema.Struct<{
3239
+ readonly actionKind: Schema.brand<Schema.String, string>;
3240
+ readonly target: Schema.Struct<{
3241
+ entityType: Schema.brand<Schema.String, string>;
3242
+ vendorImmutableId: Schema.brand<Schema.String, "VendorImmutableId">;
3243
+ }>;
3244
+ readonly expectedRevision: Schema.brand<Schema.String, "Revision">;
3245
+ readonly payload: Schema.Codec<Schema.Json, Schema.Json, never, never>;
3246
+ readonly evidenceIds: Schema.$Array<Schema.brand<Schema.String, string>>;
3247
+ }>;
3248
+ readonly payloadDigest: Schema.brand<Schema.String, "PluginActionPayloadDigest">;
3249
+ readonly summary: Schema.String;
3250
+ readonly impact: Schema.Struct<{
3251
+ readonly level: Schema.Literals<readonly ["low", "medium", "high", "critical"]>;
3252
+ readonly summary: Schema.String;
3253
+ }>;
3254
+ readonly proposedAt: Schema.DateTimeUtcFromString;
3255
+ }, "Type">;
3256
+ readonly idempotencyKey: string & import("effect/Brand").Brand<"GovernedActionIdempotencyKey">;
3257
+ readonly pluginId: string & import("effect/Brand").Brand<string>;
3258
+ readonly actionId: string & import("effect/Brand").Brand<"GovernedActionId">;
3259
+ readonly policy: Schema.Struct.ReadonlySide<{
3260
+ readonly policyId: Schema.brand<Schema.String, string>;
3261
+ readonly policyVersion: Schema.Int;
3262
+ readonly policyDigest: Schema.brand<Schema.String, string>;
3263
+ readonly requiredPermission: Schema.Literals<readonly ["workspace-owner", "workspace-approver", "release-owner", "release-approver", "change-owner", "issue-owner", "issue-assignee", "page-owner", "author", "contributor", "reviewer", "operator", "deployment-approver", "merge-approver", "watcher"]>;
3264
+ }, "Type">;
3265
+ readonly evidenceSetDigest: string & import("effect/Brand").Brand<string>;
3266
+ readonly pluginConnectionRevision: number & import("effect/Brand").Brand<"GovernedActionPluginConnectionRevision">;
3267
+ readonly pluginConnectionAuthorityDigest: string & import("effect/Brand").Brand<string>;
3268
+ readonly pluginContractVersion: Schema.Struct.ReadonlySide<{
3269
+ readonly major: Schema.Int;
3270
+ readonly minor: Schema.Int;
3271
+ readonly patch: Schema.Int;
3272
+ }, "Type">;
3273
+ readonly pluginAdapterVersion: Schema.Struct.ReadonlySide<{
3274
+ readonly major: Schema.Int;
3275
+ readonly minor: Schema.Int;
3276
+ readonly patch: Schema.Int;
3277
+ }, "Type">;
3278
+ readonly capability: Schema.Struct.ReadonlySide<{
3279
+ readonly capabilityId: Schema.Literal<"action.execute">;
3280
+ readonly version: Schema.Int;
3281
+ }, "Type">;
3282
+ readonly targetEntityId: string & import("effect/Brand").Brand<"EntityId">;
3283
+ readonly evidence: readonly Schema.Struct.ReadonlySide<{
3284
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
3285
+ readonly evidenceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "EvidenceId">;
3286
+ readonly evidenceClaimIds: Schema.$Array<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "EvidenceClaimId">>;
3287
+ readonly observedAt: Schema.DateTimeUtcFromString;
3288
+ readonly validUntil: Schema.NullOr<Schema.DateTimeUtcFromString>;
3289
+ readonly currentUntil: Schema.NullOr<Schema.DateTimeUtcFromString>;
3290
+ readonly evaluatedAt: Schema.DateTimeUtcFromString;
3291
+ readonly source: Schema.Literals<readonly ["current", "stale", "missing", "unavailable"]>;
3292
+ readonly validity: Schema.Literals<readonly ["valid", "expired"]>;
3293
+ }, "Type">[];
3294
+ readonly origin: Schema.Struct.ReadonlySide<{
3295
+ readonly _tag: Schema.tag<"human">;
3296
+ readonly actor: Schema.TaggedStruct<"human", {
3297
+ readonly personId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PersonId">;
3298
+ }>;
3299
+ readonly sessionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "SessionId">;
3300
+ }, "Type"> | Schema.Struct.ReadonlySide<{
3301
+ readonly _tag: Schema.tag<"agent">;
3302
+ readonly actor: Schema.TaggedStruct<"agent", {
3303
+ readonly agentId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "AgentId">;
3304
+ }>;
3305
+ readonly jobId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "JobId">;
3306
+ readonly initiatingSessionId: Schema.NullOr<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "SessionId">>;
3307
+ }, "Type">;
3308
+ readonly proposalExpiresAt: DateTime.Utc;
3309
+ readonly envelopeDigest: string & import("effect/Brand").Brand<string>;
3310
+ readonly releasePublication?: {
3311
+ readonly releaseId: string & import("effect/Brand").Brand<"ReleaseId">;
3312
+ readonly sourceRevisionDigest: string & import("effect/Brand").Brand<string>;
3313
+ readonly sourceRevisionCount: number;
3314
+ readonly predecessorPublicationActionId?: (string & import("effect/Brand").Brand<"GovernedActionId">) | null;
3315
+ };
3316
+ };
3317
+ head: Schema.Struct.ReadonlySide<{
3318
+ readonly state: Schema.Literals<readonly ["proposed", "authorized", "denied", "expired", "cancelled", "started", "cancel-requested", "cancel-requested-unknown", "succeeded", "failed", "unknown"]>;
3319
+ readonly lineage: Schema.TaggedUnion<{
3320
+ readonly accepted: Schema.TaggedStruct<"accepted", {
3321
+ readonly receipt: Schema.Struct<{
3322
+ readonly status: Schema.Literal<"accepted">;
3323
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
3324
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
3325
+ readonly safeSummary: Schema.String;
3326
+ readonly observedAt: Schema.DateTimeUtcFromString;
3327
+ }>;
3328
+ }>;
3329
+ readonly reconcilable: Schema.TaggedStruct<"reconcilable", {
3330
+ readonly providerOperationId: Schema.NullOr<Schema.brand<Schema.String, string>>;
3331
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
3332
+ }>;
3333
+ readonly manual: Schema.TaggedStruct<"manual", {
3334
+ readonly providerOperationId: Schema.NullOr<Schema.brand<Schema.String, string>>;
3335
+ }>;
3336
+ readonly none: Schema.TaggedStruct<"none", {}>;
3337
+ readonly terminal: Schema.TaggedStruct<"terminal", {
3338
+ readonly receipt: Schema.Struct<{
3339
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
3340
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
3341
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
3342
+ readonly safeSummary: Schema.String;
3343
+ readonly observedAt: Schema.DateTimeUtcFromString;
3344
+ }>;
3345
+ }>;
3346
+ }>;
3347
+ }, "Type">;
3348
+ headTransition: Schema.Struct.ReadonlySide<{
3349
+ readonly commandDigest: Schema.brand<Schema.String, "GovernedActionCommandDigest">;
3350
+ readonly schemaVersion: Schema.Literal<1>;
3351
+ readonly transitionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionTransitionId">;
3352
+ readonly previousTransitionId: Schema.NullOr<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionTransitionId">>;
3353
+ readonly commandId: Schema.brand<Schema.String, string>;
3354
+ readonly actionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionId">;
3355
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
3356
+ readonly sequence: Schema.Int;
3357
+ readonly fromState: Schema.NullOr<Schema.Literals<readonly ["proposed", "authorized", "denied", "expired", "cancelled", "started", "cancel-requested", "cancel-requested-unknown", "succeeded", "failed", "unknown"]>>;
3358
+ readonly toState: Schema.Literals<readonly ["proposed", "authorized", "denied", "expired", "cancelled", "started", "cancel-requested", "cancel-requested-unknown", "succeeded", "failed", "unknown"]>;
3359
+ readonly actionEnvelopeDigest: Schema.brand<Schema.String, string>;
3360
+ readonly command: Schema.TaggedUnion<{
3361
+ readonly propose: Schema.TaggedStruct<"propose", {}>;
3362
+ readonly authorize: Schema.TaggedStruct<"authorize", {
3363
+ readonly authorizationId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAuthorizationId">;
3364
+ }>;
3365
+ readonly deny: Schema.TaggedStruct<"deny", {
3366
+ readonly reason: Schema.Literals<readonly ["revision-changed", "evidence-stale", "evidence-invalid", "policy-denied", "session-invalid", "capability-changed", "plugin-unavailable", "preflight-blocked"]>;
3367
+ readonly safeSummary: Schema.String;
3368
+ }>;
3369
+ readonly expire: Schema.TaggedStruct<"expire", {
3370
+ readonly reason: Schema.Literals<readonly ["proposal-expired", "authorization-expired"]>;
3371
+ }>;
3372
+ readonly cancel: Schema.TaggedStruct<"cancel", {
3373
+ readonly safeSummary: Schema.String;
3374
+ }>;
3375
+ readonly start: Schema.TaggedStruct<"start", {
3376
+ readonly attemptId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAttemptId">;
3377
+ }>;
3378
+ readonly requestCancellation: Schema.TaggedStruct<"requestCancellation", {
3379
+ readonly safeSummary: Schema.String;
3380
+ }>;
3381
+ readonly recordAccepted: Schema.TaggedStruct<"recordAccepted", {
3382
+ readonly receipt: Schema.Struct<{
3383
+ readonly status: Schema.Literal<"accepted">;
3384
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
3385
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
3386
+ readonly safeSummary: Schema.String;
3387
+ readonly observedAt: Schema.DateTimeUtcFromString;
3388
+ }>;
3389
+ }>;
3390
+ readonly recordSucceeded: Schema.TaggedStruct<"recordSucceeded", {
3391
+ readonly receipt: Schema.Struct<{
3392
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
3393
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
3394
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
3395
+ readonly safeSummary: Schema.String;
3396
+ readonly observedAt: Schema.DateTimeUtcFromString;
3397
+ }>;
3398
+ readonly source: Schema.TaggedUnion<{
3399
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
3400
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
3401
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
3402
+ }>;
3403
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
3404
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
3405
+ }>;
3406
+ }>;
3407
+ }>;
3408
+ readonly recordFailed: Schema.TaggedStruct<"recordFailed", {
3409
+ readonly receipt: Schema.Struct<{
3410
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
3411
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
3412
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
3413
+ readonly safeSummary: Schema.String;
3414
+ readonly observedAt: Schema.DateTimeUtcFromString;
3415
+ }>;
3416
+ readonly source: Schema.TaggedUnion<{
3417
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
3418
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
3419
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
3420
+ }>;
3421
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
3422
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
3423
+ }>;
3424
+ }>;
3425
+ }>;
3426
+ readonly recordUnknown: Schema.TaggedStruct<"recordUnknown", {
3427
+ readonly outcome: Schema.TaggedUnion<{
3428
+ readonly reconcilable: Schema.TaggedStruct<"reconcilable", {
3429
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
3430
+ readonly observedAt: Schema.DateTimeUtcFromString;
3431
+ readonly safeSummary: Schema.String;
3432
+ }>;
3433
+ readonly manual: Schema.TaggedStruct<"manual", {
3434
+ readonly observedAt: Schema.DateTimeUtcFromString;
3435
+ readonly safeSummary: Schema.String;
3436
+ readonly reason: Schema.Literals<readonly ["dispatch-deadline-exceeded", "interrupted-after-intent", "provider-defect-after-intent", "malformed-provider-result", "receipt-persistence-failed", "missing-reconciliation-locator"]>;
3437
+ }>;
3438
+ }>;
3439
+ }>;
3440
+ readonly recordCancelled: Schema.TaggedStruct<"recordCancelled", {
3441
+ readonly receipt: Schema.Struct<{
3442
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
3443
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
3444
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
3445
+ readonly safeSummary: Schema.String;
3446
+ readonly observedAt: Schema.DateTimeUtcFromString;
3447
+ }>;
3448
+ readonly source: Schema.TaggedUnion<{
3449
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
3450
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
3451
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
3452
+ }>;
3453
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
3454
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
3455
+ }>;
3456
+ }>;
3457
+ }>;
3458
+ readonly reconciliationPending: Schema.TaggedStruct<"reconciliationPending", {
3459
+ readonly checkedAt: Schema.DateTimeUtcFromString;
3460
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
3461
+ }>;
3462
+ }>;
3463
+ readonly cause: Schema.TaggedUnion<{
3464
+ readonly human: Schema.TaggedStruct<"human", {
3465
+ readonly actor: Schema.TaggedStruct<"human", {
3466
+ readonly personId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PersonId">;
3467
+ }>;
3468
+ readonly sessionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "SessionId">;
3469
+ }>;
3470
+ readonly agent: Schema.TaggedStruct<"agent", {
3471
+ readonly actor: Schema.TaggedStruct<"agent", {
3472
+ readonly agentId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "AgentId">;
3473
+ }>;
3474
+ readonly jobId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "JobId">;
3475
+ }>;
3476
+ readonly system: Schema.TaggedStruct<"system", {
3477
+ readonly component: Schema.brand<Schema.String, string>;
3478
+ }>;
3479
+ }>;
3480
+ readonly occurredAt: Schema.DateTimeUtcFromString;
3481
+ readonly causationId: Schema.NullOr<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "DomainEventId">>;
3482
+ readonly correlationId: Schema.NullOr<Schema.brand<Schema.String, "DomainEventCorrelationId">>;
3483
+ }, "Type">;
3484
+ history: Schema.Struct.ReadonlySide<{
3485
+ readonly commandDigest: Schema.brand<Schema.String, "GovernedActionCommandDigest">;
3486
+ readonly schemaVersion: Schema.Literal<1>;
3487
+ readonly transitionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionTransitionId">;
3488
+ readonly previousTransitionId: Schema.NullOr<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionTransitionId">>;
3489
+ readonly commandId: Schema.brand<Schema.String, string>;
3490
+ readonly actionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionId">;
3491
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
3492
+ readonly sequence: Schema.Int;
3493
+ readonly fromState: Schema.NullOr<Schema.Literals<readonly ["proposed", "authorized", "denied", "expired", "cancelled", "started", "cancel-requested", "cancel-requested-unknown", "succeeded", "failed", "unknown"]>>;
3494
+ readonly toState: Schema.Literals<readonly ["proposed", "authorized", "denied", "expired", "cancelled", "started", "cancel-requested", "cancel-requested-unknown", "succeeded", "failed", "unknown"]>;
3495
+ readonly actionEnvelopeDigest: Schema.brand<Schema.String, string>;
3496
+ readonly command: Schema.TaggedUnion<{
3497
+ readonly propose: Schema.TaggedStruct<"propose", {}>;
3498
+ readonly authorize: Schema.TaggedStruct<"authorize", {
3499
+ readonly authorizationId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAuthorizationId">;
3500
+ }>;
3501
+ readonly deny: Schema.TaggedStruct<"deny", {
3502
+ readonly reason: Schema.Literals<readonly ["revision-changed", "evidence-stale", "evidence-invalid", "policy-denied", "session-invalid", "capability-changed", "plugin-unavailable", "preflight-blocked"]>;
3503
+ readonly safeSummary: Schema.String;
3504
+ }>;
3505
+ readonly expire: Schema.TaggedStruct<"expire", {
3506
+ readonly reason: Schema.Literals<readonly ["proposal-expired", "authorization-expired"]>;
3507
+ }>;
3508
+ readonly cancel: Schema.TaggedStruct<"cancel", {
3509
+ readonly safeSummary: Schema.String;
3510
+ }>;
3511
+ readonly start: Schema.TaggedStruct<"start", {
3512
+ readonly attemptId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAttemptId">;
3513
+ }>;
3514
+ readonly requestCancellation: Schema.TaggedStruct<"requestCancellation", {
3515
+ readonly safeSummary: Schema.String;
3516
+ }>;
3517
+ readonly recordAccepted: Schema.TaggedStruct<"recordAccepted", {
3518
+ readonly receipt: Schema.Struct<{
3519
+ readonly status: Schema.Literal<"accepted">;
3520
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
3521
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
3522
+ readonly safeSummary: Schema.String;
3523
+ readonly observedAt: Schema.DateTimeUtcFromString;
3524
+ }>;
3525
+ }>;
3526
+ readonly recordSucceeded: Schema.TaggedStruct<"recordSucceeded", {
3527
+ readonly receipt: Schema.Struct<{
3528
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
3529
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
3530
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
3531
+ readonly safeSummary: Schema.String;
3532
+ readonly observedAt: Schema.DateTimeUtcFromString;
3533
+ }>;
3534
+ readonly source: Schema.TaggedUnion<{
3535
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
3536
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
3537
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
3538
+ }>;
3539
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
3540
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
3541
+ }>;
3542
+ }>;
3543
+ }>;
3544
+ readonly recordFailed: Schema.TaggedStruct<"recordFailed", {
3545
+ readonly receipt: Schema.Struct<{
3546
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
3547
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
3548
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
3549
+ readonly safeSummary: Schema.String;
3550
+ readonly observedAt: Schema.DateTimeUtcFromString;
3551
+ }>;
3552
+ readonly source: Schema.TaggedUnion<{
3553
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
3554
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
3555
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
3556
+ }>;
3557
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
3558
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
3559
+ }>;
3560
+ }>;
3561
+ }>;
3562
+ readonly recordUnknown: Schema.TaggedStruct<"recordUnknown", {
3563
+ readonly outcome: Schema.TaggedUnion<{
3564
+ readonly reconcilable: Schema.TaggedStruct<"reconcilable", {
3565
+ readonly reconciliationKey: Schema.brand<Schema.String, string>;
3566
+ readonly observedAt: Schema.DateTimeUtcFromString;
3567
+ readonly safeSummary: Schema.String;
3568
+ }>;
3569
+ readonly manual: Schema.TaggedStruct<"manual", {
3570
+ readonly observedAt: Schema.DateTimeUtcFromString;
3571
+ readonly safeSummary: Schema.String;
3572
+ readonly reason: Schema.Literals<readonly ["dispatch-deadline-exceeded", "interrupted-after-intent", "provider-defect-after-intent", "malformed-provider-result", "receipt-persistence-failed", "missing-reconciliation-locator"]>;
3573
+ }>;
3574
+ }>;
3575
+ }>;
3576
+ readonly recordCancelled: Schema.TaggedStruct<"recordCancelled", {
3577
+ readonly receipt: Schema.Struct<{
3578
+ readonly observationBasis: Schema.optionalKey<Schema.Literal<"authorization">>;
3579
+ readonly status: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
3580
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
3581
+ readonly safeSummary: Schema.String;
3582
+ readonly observedAt: Schema.DateTimeUtcFromString;
3583
+ }>;
3584
+ readonly source: Schema.TaggedUnion<{
3585
+ readonly direct: Schema.TaggedStruct<"direct", {}>;
3586
+ readonly providerOperation: Schema.TaggedStruct<"providerOperation", {
3587
+ readonly providerOperationId: Schema.brand<Schema.String, string>;
3588
+ }>;
3589
+ readonly reconciliation: Schema.TaggedStruct<"reconciliation", {
3590
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
3591
+ }>;
3592
+ }>;
3593
+ }>;
3594
+ readonly reconciliationPending: Schema.TaggedStruct<"reconciliationPending", {
3595
+ readonly checkedAt: Schema.DateTimeUtcFromString;
3596
+ readonly reconciliationKey: Schema.NullOr<Schema.brand<Schema.String, string>>;
3597
+ }>;
3598
+ }>;
3599
+ readonly cause: Schema.TaggedUnion<{
3600
+ readonly human: Schema.TaggedStruct<"human", {
3601
+ readonly actor: Schema.TaggedStruct<"human", {
3602
+ readonly personId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PersonId">;
3603
+ }>;
3604
+ readonly sessionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "SessionId">;
3605
+ }>;
3606
+ readonly agent: Schema.TaggedStruct<"agent", {
3607
+ readonly actor: Schema.TaggedStruct<"agent", {
3608
+ readonly agentId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "AgentId">;
3609
+ }>;
3610
+ readonly jobId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "JobId">;
3611
+ }>;
3612
+ readonly system: Schema.TaggedStruct<"system", {
3613
+ readonly component: Schema.brand<Schema.String, string>;
3614
+ }>;
3615
+ }>;
3616
+ readonly occurredAt: Schema.DateTimeUtcFromString;
3617
+ readonly causationId: Schema.NullOr<Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "DomainEventId">>;
3618
+ readonly correlationId: Schema.NullOr<Schema.brand<Schema.String, "DomainEventCorrelationId">>;
3619
+ }, "Type">[];
3620
+ authorization: Schema.Struct.ReadonlySide<{
3621
+ readonly schemaVersion: Schema.Literal<1>;
3622
+ readonly authorizationId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAuthorizationId">;
3623
+ readonly actionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionId">;
3624
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
3625
+ readonly pluginConnectionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PluginConnectionId">;
3626
+ readonly pluginConnectionRevision: Schema.brand<Schema.Int, "GovernedActionPluginConnectionRevision">;
3627
+ readonly pluginConnectionAuthorityDigest: Schema.brand<Schema.String, string>;
3628
+ readonly actionEnvelopeDigest: Schema.brand<Schema.String, string>;
3629
+ readonly idempotencyKey: Schema.brand<Schema.String, "GovernedActionIdempotencyKey">;
3630
+ readonly payloadDigest: Schema.brand<Schema.String, "PluginActionPayloadDigest">;
3631
+ readonly evidenceSetDigest: Schema.brand<Schema.String, string>;
3632
+ readonly policyDigest: Schema.brand<Schema.String, string>;
3633
+ readonly expectedRevision: Schema.brand<Schema.String, "Revision">;
3634
+ readonly capabilityVersion: Schema.Int;
3635
+ readonly actor: Schema.TaggedStruct<"human", {
3636
+ readonly personId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PersonId">;
3637
+ }>;
3638
+ readonly sessionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "SessionId">;
3639
+ readonly sessionPermission: Schema.Literals<readonly ["workspace-owner", "workspace-approver", "release-owner", "release-approver", "change-owner", "issue-owner", "issue-assignee", "page-owner", "author", "contributor", "reviewer", "operator", "deployment-approver", "merge-approver", "watcher"]>;
3640
+ readonly sessionExpiresAt: Schema.DateTimeUtcFromString;
3641
+ readonly requiredPermission: Schema.Literals<readonly ["workspace-owner", "workspace-approver", "release-owner", "release-approver", "change-owner", "issue-owner", "issue-assignee", "page-owner", "author", "contributor", "reviewer", "operator", "deployment-approver", "merge-approver", "watcher"]>;
3642
+ readonly authorizedAt: Schema.DateTimeUtcFromString;
3643
+ readonly expiresAt: Schema.DateTimeUtcFromString;
3644
+ }, "Type"> | null;
3645
+ policyEvaluation: Schema.Struct.ReadonlySide<{
3646
+ readonly schemaVersion: Schema.Literal<1>;
3647
+ readonly actionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionId">;
3648
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
3649
+ readonly policy: Schema.Struct<{
3650
+ readonly policyId: Schema.brand<Schema.String, string>;
3651
+ readonly policyVersion: Schema.Int;
3652
+ readonly policyDigest: Schema.brand<Schema.String, string>;
3653
+ readonly requiredPermission: Schema.Literals<readonly ["workspace-owner", "workspace-approver", "release-owner", "release-approver", "change-owner", "issue-owner", "issue-assignee", "page-owner", "author", "contributor", "reviewer", "operator", "deployment-approver", "merge-approver", "watcher"]>;
3654
+ }>;
3655
+ readonly payloadDigest: Schema.brand<Schema.String, "PluginActionPayloadDigest">;
3656
+ readonly evidenceSetDigest: Schema.brand<Schema.String, string>;
3657
+ readonly expectedRevision: Schema.brand<Schema.String, "Revision">;
3658
+ readonly decision: Schema.Literals<readonly ["allowed", "denied"]>;
3659
+ readonly evaluatedAt: Schema.DateTimeUtcFromString;
3660
+ }, "Type"> | null;
3661
+ attempt: Schema.Struct.ReadonlySide<{
3662
+ readonly schemaVersion: Schema.Literal<1>;
3663
+ readonly attemptId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAttemptId">;
3664
+ readonly authorizationId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionAuthorizationId">;
3665
+ readonly actionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "GovernedActionId">;
3666
+ readonly workspaceId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "WorkspaceId">;
3667
+ readonly pluginConnectionId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "PluginConnectionId">;
3668
+ readonly idempotencyKey: Schema.brand<Schema.String, "GovernedActionIdempotencyKey">;
3669
+ readonly attemptNumber: Schema.Literal<1>;
3670
+ readonly actionEnvelopeDigest: Schema.brand<Schema.String, string>;
3671
+ readonly expectedRevision: Schema.brand<Schema.String, "Revision">;
3672
+ readonly policyEvaluationDigest: Schema.brand<Schema.String, string>;
3673
+ readonly preflight: Schema.TaggedStruct<"ready", {
3674
+ readonly checkedRevision: Schema.brand<Schema.String, "Revision">;
3675
+ readonly checkedAt: Schema.DateTimeUtcFromString;
3676
+ }>;
3677
+ readonly startedAt: Schema.DateTimeUtcFromString;
3678
+ }, "Type"> | null;
3679
+ }[], import("../persistence/Persistence.js").PersistenceOperationFailure, never>;
3680
+ }, "readLatestTerminalReleasePublications">, workspaceId: string & import("effect/Brand").Brand<"WorkspaceId">, releaseId: string & import("effect/Brand").Brand<"ReleaseId">) => Effect.Effect<import("./releasePublicationMetadata.js").LatestConfluencePublicationReference | null, import("../persistence/Persistence.js").PersistenceOperationFailure, never>;
3681
+ interface SubmitInput {
3682
+ readonly expectedReleaseUpdatedAt?: UtcTimestamp;
3683
+ readonly releaseId: ReleaseId;
3684
+ readonly request: SubmitReleasePublicationRequest;
3685
+ readonly session: SessionSummary;
3686
+ readonly useReleaseIdentity?: boolean;
3687
+ readonly workspaceId: WorkspaceId;
3688
+ }
3689
+ declare const ReleasePublicationSubmissions_base: Context.ServiceClass<ReleasePublicationSubmissions, "@knpkv/control-center/server/application/ReleasePublicationSubmissions", {
3690
+ readonly submit: (input: SubmitInput) => Effect.Effect<SubmitReleasePublicationResponse, ReleasePublicationSubmissionError>;
3691
+ }>;
3692
+ export declare class ReleasePublicationSubmissions extends ReleasePublicationSubmissions_base {
3693
+ }
3694
+ /** Match Jira's release-version name and UTF-8 description limits before provider work. */
3695
+ export declare const jiraPublicationPayloadWithinLimits: (title: string, markdown: string) => boolean;
3696
+ export declare const releasePublicationSubmissionsLayer: Layer.Layer<ReleasePublicationSubmissions, never, Crypto.Crypto | Persistence | GovernedActionSubmission | GovernedActionProposalAuthority | GovernedActionPolicyBindingSource | PluginConnectionMap>;
3697
+ export declare const releasePublicationSubmissionsUnavailableLayer: Layer.Layer<ReleasePublicationSubmissions, never, never>;
3698
+ export {};
3699
+ //# sourceMappingURL=releasePublicationSubmissions.d.ts.map