@knpkv/control-center 0.7.0 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. package/dist/client/.vite/manifest.json +312 -255
  2. package/dist/client/assets/ActiveWorkPage-DKlotZGc.js +2 -0
  3. package/dist/client/assets/{ActiveWorkPage-BsaIr8ah.js.map → ActiveWorkPage-DKlotZGc.js.map} +1 -1
  4. package/dist/client/assets/AgentPage-Cxm1gj2C.js +6 -0
  5. package/dist/client/assets/{AgentPage-Cybynsnc.js.map → AgentPage-Cxm1gj2C.js.map} +1 -1
  6. package/dist/client/assets/{AtlassianOAuthCallbackPage-Du3pHuS9.js → AtlassianOAuthCallbackPage-fEFUJE2g.js} +2 -2
  7. package/dist/client/assets/{AtlassianOAuthCallbackPage-Du3pHuS9.js.map → AtlassianOAuthCallbackPage-fEFUJE2g.js.map} +1 -1
  8. package/dist/client/assets/AuthorizedSharePage-Dh7Y_gmJ.js +2 -0
  9. package/dist/client/assets/{AuthorizedSharePage-tfTdXNjt.js.map → AuthorizedSharePage-Dh7Y_gmJ.js.map} +1 -1
  10. package/dist/client/assets/BrowserCrypto-CoBR2WBd.js +2 -0
  11. package/dist/client/assets/{BrowserCrypto-DVxU0-Oc.js.map → BrowserCrypto-CoBR2WBd.js.map} +1 -1
  12. package/dist/client/assets/BrowserSessionHydrator-DkomS8Yl.js +2 -0
  13. package/dist/client/assets/{BrowserSessionHydrator-CvtvZstV.js.map → BrowserSessionHydrator-DkomS8Yl.js.map} +1 -1
  14. package/dist/client/assets/CommandSearch-nf16HEqz.js +2 -0
  15. package/dist/client/assets/{CommandSearch-Bf_oW_kD.js.map → CommandSearch-nf16HEqz.js.map} +1 -1
  16. package/dist/client/assets/Dialog-DSwimdwG-BeHnBpPp.js +42 -0
  17. package/dist/client/assets/Dialog-DSwimdwG-BeHnBpPp.js.map +1 -0
  18. package/dist/client/assets/Domain-cJ5aJFpE.js +2 -0
  19. package/dist/client/assets/Domain-cJ5aJFpE.js.map +1 -0
  20. package/dist/client/assets/ItemsPage-Bok8Vpy4.js +2 -0
  21. package/dist/client/assets/{ItemsPage-BmWEHinz.js.map → ItemsPage-Bok8Vpy4.js.map} +1 -1
  22. package/dist/client/assets/OpenPullRequestPage-DdL7PhKZ.js +2 -0
  23. package/dist/client/assets/OpenPullRequestPage-DdL7PhKZ.js.map +1 -0
  24. package/dist/client/assets/{Pages-BmZj4KzS.js → Pages-DrDuXLFH.js} +2 -2
  25. package/dist/client/assets/{Pages-BmZj4KzS.js.map → Pages-DrDuXLFH.js.map} +1 -1
  26. package/dist/client/assets/PairPage-BCtzYqK6.js +2 -0
  27. package/dist/client/assets/{PairPage-CLLUweYZ.js.map → PairPage-BCtzYqK6.js.map} +1 -1
  28. package/dist/client/assets/PortalProvider-CN_81Fy3-D_japesx.js +2 -0
  29. package/dist/client/assets/{PortalProvider-BpgZwSpw-nEH0TqWT.js.map → PortalProvider-CN_81Fy3-D_japesx.js.map} +1 -1
  30. package/dist/client/assets/PortfolioOverview-C-jqvYgQ.js +2 -0
  31. package/dist/client/assets/{PortfolioOverview-BBKSc-yI.js.map → PortfolioOverview-C-jqvYgQ.js.map} +1 -1
  32. package/dist/client/assets/{PullRequestReviewPanel-Boi0A6pq.js → PullRequestReviewPanel-DwVYuZ8Q.js} +5 -5
  33. package/dist/client/assets/{PullRequestReviewPanel-Boi0A6pq.js.map → PullRequestReviewPanel-DwVYuZ8Q.js.map} +1 -1
  34. package/dist/client/assets/ReleaseRoute-cuvP4ug5.js +2 -0
  35. package/dist/client/assets/{ReleaseRoute-D4CttCjC.js.map → ReleaseRoute-cuvP4ug5.js.map} +1 -1
  36. package/dist/client/assets/ReleaseWorkset-DImwmjS3.js +2 -0
  37. package/dist/client/assets/{ReleaseWorkset-Dt-ArwsN.js.map → ReleaseWorkset-DImwmjS3.js.map} +1 -1
  38. package/dist/client/assets/ReviewSuggestionPublicationSurface-BZIa-Vvc.js +2 -0
  39. package/dist/client/assets/{ReviewSuggestionPublicationSurface-N9Qwdh2n.js.map → ReviewSuggestionPublicationSurface-BZIa-Vvc.js.map} +1 -1
  40. package/dist/client/assets/ServicesPage-CrM8R820.js +2 -0
  41. package/dist/client/assets/{ServicesPage-D0ygZTFD.js.map → ServicesPage-CrM8R820.js.map} +1 -1
  42. package/dist/client/assets/TimelinePage-FrvepGa_.js +2 -0
  43. package/dist/client/assets/{TimelinePage-Bb2o9DGU.js.map → TimelinePage-FrvepGa_.js.map} +1 -1
  44. package/dist/client/assets/{WorkspaceEntityLink-Cw675wTN.js → WorkspaceEntityLink-CAj42f02.js} +2 -2
  45. package/dist/client/assets/{WorkspaceEntityLink-Cw675wTN.js.map → WorkspaceEntityLink-CAj42f02.js.map} +1 -1
  46. package/dist/client/assets/WorkspaceEntityRoute-rQ9ccetx.js +14 -0
  47. package/dist/client/assets/WorkspaceEntityRoute-rQ9ccetx.js.map +1 -0
  48. package/dist/client/assets/WorkspaceHomeLink-ObQ3AQVw.js +2 -0
  49. package/dist/client/assets/{WorkspaceHomeLink-FGslxXCu.js.map → WorkspaceHomeLink-ObQ3AQVw.js.map} +1 -1
  50. package/dist/client/assets/WorkspacePullRequestDetails-BhxoqR7V.js +3 -0
  51. package/dist/client/assets/{WorkspacePullRequestDetails-Dxg8argO.js.map → WorkspacePullRequestDetails-BhxoqR7V.js.map} +1 -1
  52. package/dist/client/assets/{WorkspaceReleaseLayout-BvEiZJEb.js → WorkspaceReleaseLayout-BWL66Fff.js} +2 -2
  53. package/dist/client/assets/{WorkspaceReleaseLayout-BvEiZJEb.js.map → WorkspaceReleaseLayout-BWL66Fff.js.map} +1 -1
  54. package/dist/client/assets/{WorkspaceRichText-CocmKQ4T.js → WorkspaceRichText-Beh64wsV.js} +2 -2
  55. package/dist/client/assets/{WorkspaceRichText-CocmKQ4T.js.map → WorkspaceRichText-Beh64wsV.js.map} +1 -1
  56. package/dist/client/assets/WorkspaceSettingsPage-DutfiGPe.js +2 -0
  57. package/dist/client/assets/{WorkspaceSettingsPage-iZhUs-pg.js.map → WorkspaceSettingsPage-DutfiGPe.js.map} +1 -1
  58. package/dist/client/assets/{agent-api-CzdQFCcD.js → agent-api-CUWP1qs8.js} +2 -2
  59. package/dist/client/assets/{agent-api-CzdQFCcD.js.map → agent-api-CUWP1qs8.js.map} +1 -1
  60. package/dist/client/assets/{atlassianOAuthSetupIntentStorage-BxsxmjSm.js → atlassianOAuthSetupIntentStorage-Cy1Gw639.js} +2 -2
  61. package/dist/client/assets/{atlassianOAuthSetupIntentStorage-BxsxmjSm.js.map → atlassianOAuthSetupIntentStorage-Cy1Gw639.js.map} +1 -1
  62. package/dist/client/assets/authenticatedMutationClient-Bc_-Jpbo.js +2 -0
  63. package/dist/client/assets/{authenticatedMutationClient-DUqEcJHu.js.map → authenticatedMutationClient-Bc_-Jpbo.js.map} +1 -1
  64. package/dist/client/assets/authorizedShareTransport-kkT3Jf6q.js +2 -0
  65. package/dist/client/assets/{authorizedShareTransport-7YCNH9l3.js.map → authorizedShareTransport-kkT3Jf6q.js.map} +1 -1
  66. package/dist/client/assets/client-D3WRV6yl.js +5 -0
  67. package/dist/client/assets/client-D3WRV6yl.js.map +1 -0
  68. package/dist/client/assets/{confluenceTasks-D9yrB-oV.js → confluenceTasks-By7BV0WN.js} +2 -2
  69. package/dist/client/assets/{confluenceTasks-D9yrB-oV.js.map → confluenceTasks-By7BV0WN.js.map} +1 -1
  70. package/dist/client/assets/connectionTestTransport-CRq7l9X0.js +2 -0
  71. package/dist/client/assets/{connectionTestTransport-D8tiZ4ym.js.map → connectionTestTransport-CRq7l9X0.js.map} +1 -1
  72. package/dist/client/assets/controlCenterRelayDock-CyYeXh75.js +3 -0
  73. package/dist/client/assets/controlCenterRelayDock-CyYeXh75.js.map +1 -0
  74. package/dist/client/assets/controlCenterRelayDockChrome-upgtq649.js +3 -0
  75. package/dist/client/assets/controlCenterRelayDockChrome-upgtq649.js.map +1 -0
  76. package/dist/client/assets/index-kmYFvwT0.js +11 -0
  77. package/dist/client/assets/index-kmYFvwT0.js.map +1 -0
  78. package/dist/client/assets/index-tjRpNCt_.css +1 -0
  79. package/dist/client/assets/openPullRequest-BMlmibLP.js +2 -0
  80. package/dist/client/assets/openPullRequest-BMlmibLP.js.map +1 -0
  81. package/dist/client/assets/patterns-DuFUSnJW.js +2 -0
  82. package/dist/client/assets/patterns-DuFUSnJW.js.map +1 -0
  83. package/dist/client/assets/{presentPortfolio-c8-wbodG.js → presentPortfolio-DVP-zqTg.js} +2 -2
  84. package/dist/client/assets/{presentPortfolio-c8-wbodG.js.map → presentPortfolio-DVP-zqTg.js.map} +1 -1
  85. package/dist/client/assets/{presentWorkspaceItems-DfhyQeSY.js → presentWorkspaceItems-BY8bmqjF.js} +2 -2
  86. package/dist/client/assets/{presentWorkspaceItems-DfhyQeSY.js.map → presentWorkspaceItems-BY8bmqjF.js.map} +1 -1
  87. package/dist/client/assets/primitives-DYGtIZqB-r-Glkv2i.js +2 -0
  88. package/dist/client/assets/primitives-DYGtIZqB-r-Glkv2i.js.map +1 -0
  89. package/dist/client/assets/pullRequestReviewFailures-CCNxSXP6.js +2 -0
  90. package/dist/client/assets/{pullRequestReviewFailures-QvtS729d.js.map → pullRequestReviewFailures-CCNxSXP6.js.map} +1 -1
  91. package/dist/client/assets/pullRequestReviewThreadReplay-eI3Y4i6s.js +2 -0
  92. package/dist/client/assets/{pullRequestReviewThreadReplay-CpPdYxQE.js.map → pullRequestReviewThreadReplay-eI3Y4i6s.js.map} +1 -1
  93. package/dist/client/assets/{releaseAgentTransport-BCQDYqZt.js → releaseAgentTransport-CJjWwE8y.js} +2 -2
  94. package/dist/client/assets/{releaseAgentTransport-BCQDYqZt.js.map → releaseAgentTransport-CJjWwE8y.js.map} +1 -1
  95. package/dist/client/assets/releaseRoutes-h4FVwFvJ.js +2 -0
  96. package/dist/client/assets/{releaseRoutes-CSP_eBj6.js.map → releaseRoutes-h4FVwFvJ.js.map} +1 -1
  97. package/dist/client/assets/{serviceOnboarding-B6v5VXTG.js → serviceOnboarding-F9Lj6a7y.js} +2 -2
  98. package/dist/client/assets/{serviceOnboarding-B6v5VXTG.js.map → serviceOnboarding-F9Lj6a7y.js.map} +1 -1
  99. package/dist/client/assets/useWorkspaceDefaultLanding-BmaR7aTj.js +3 -0
  100. package/dist/client/assets/{useWorkspaceDefaultLanding-C3PRrLgk.js.map → useWorkspaceDefaultLanding-BmaR7aTj.js.map} +1 -1
  101. package/dist/client/assets/useWorkspaceItems-6KWfmFtx.js +2 -0
  102. package/dist/client/assets/{useWorkspaceItems-CHYpfLmL.js.map → useWorkspaceItems-6KWfmFtx.js.map} +1 -1
  103. package/dist/client/assets/{workspaceEntityRoutes-CFPO-iFw.js → workspaceEntityRoutes-BHccxrFj.js} +2 -2
  104. package/dist/client/assets/{workspaceEntityRoutes-CFPO-iFw.js.map → workspaceEntityRoutes-BHccxrFj.js.map} +1 -1
  105. package/dist/client/assets/{workspaceScrollCapture-DUj-_YMd.js → workspaceScrollCapture-BzsNJoL7.js} +2 -2
  106. package/dist/client/assets/{workspaceScrollCapture-DUj-_YMd.js.map → workspaceScrollCapture-BzsNJoL7.js.map} +1 -1
  107. package/dist/client/assets/workspaceSettingsTransport-BwRQteEH.js +2 -0
  108. package/dist/client/assets/{workspaceSettingsTransport-Kq7lfPsC.js.map → workspaceSettingsTransport-BwRQteEH.js.map} +1 -1
  109. package/dist/client/build-graph.json +63 -0
  110. package/dist/client/index.html +3 -3
  111. package/dist/server/api/index.js +1 -1
  112. package/dist/server/assets/{BindConfig-hNWrGfu2.js → BindConfig-BG-FGtB5.js} +14 -5
  113. package/dist/server/assets/BindConfig-BG-FGtB5.js.map +1 -0
  114. package/dist/server/assets/{controlCenterApi-BcVWTP9F.js → controlCenterApi-WaKi6EUb.js} +2 -1
  115. package/dist/server/assets/controlCenterApi-WaKi6EUb.js.map +1 -0
  116. package/dist/server/index.js +1 -1
  117. package/dist/server/server/cli.js +1 -1
  118. package/dist/server/server/index.js +1 -1
  119. package/package.json +8 -7
  120. package/dist/client/assets/ActiveWorkPage-BsaIr8ah.js +0 -2
  121. package/dist/client/assets/AgentPage-Cybynsnc.js +0 -6
  122. package/dist/client/assets/AuthorizedSharePage-tfTdXNjt.js +0 -2
  123. package/dist/client/assets/BrowserCrypto-DVxU0-Oc.js +0 -2
  124. package/dist/client/assets/BrowserSessionHydrator-CvtvZstV.js +0 -2
  125. package/dist/client/assets/CommandSearch-Bf_oW_kD.js +0 -2
  126. package/dist/client/assets/Dialog-1WvU8GjA-C7r26HF0.js +0 -42
  127. package/dist/client/assets/Dialog-1WvU8GjA-C7r26HF0.js.map +0 -1
  128. package/dist/client/assets/ItemsPage-BmWEHinz.js +0 -2
  129. package/dist/client/assets/OpenPullRequestPage-DkCom6mf.js +0 -2
  130. package/dist/client/assets/OpenPullRequestPage-DkCom6mf.js.map +0 -1
  131. package/dist/client/assets/PairPage-CLLUweYZ.js +0 -2
  132. package/dist/client/assets/PortalProvider-BpgZwSpw-nEH0TqWT.js +0 -2
  133. package/dist/client/assets/PortfolioOverview-BBKSc-yI.js +0 -2
  134. package/dist/client/assets/ReleaseRoute-D4CttCjC.js +0 -2
  135. package/dist/client/assets/ReleaseWorkset-Dt-ArwsN.js +0 -2
  136. package/dist/client/assets/ReviewSuggestionPublicationSurface-N9Qwdh2n.js +0 -2
  137. package/dist/client/assets/ServicesPage-D0ygZTFD.js +0 -2
  138. package/dist/client/assets/TimelinePage-Bb2o9DGU.js +0 -2
  139. package/dist/client/assets/WorkspaceEntityRoute-rLRiaF8b.js +0 -14
  140. package/dist/client/assets/WorkspaceEntityRoute-rLRiaF8b.js.map +0 -1
  141. package/dist/client/assets/WorkspaceHomeLink-FGslxXCu.js +0 -2
  142. package/dist/client/assets/WorkspacePullRequestDetails-Dxg8argO.js +0 -3
  143. package/dist/client/assets/WorkspaceSettingsPage-iZhUs-pg.js +0 -2
  144. package/dist/client/assets/authenticatedMutationClient-DUqEcJHu.js +0 -2
  145. package/dist/client/assets/authorizedShareTransport-7YCNH9l3.js +0 -2
  146. package/dist/client/assets/client-D2F6HlDk.js +0 -5
  147. package/dist/client/assets/client-D2F6HlDk.js.map +0 -1
  148. package/dist/client/assets/connectionTestTransport-D8tiZ4ym.js +0 -2
  149. package/dist/client/assets/index-BWx9sNOT.js +0 -11
  150. package/dist/client/assets/index-BWx9sNOT.js.map +0 -1
  151. package/dist/client/assets/index-CIfiz7oF.css +0 -1
  152. package/dist/client/assets/patterns-CxMz8DKX-ByHwV03y.js +0 -2
  153. package/dist/client/assets/patterns-CxMz8DKX-ByHwV03y.js.map +0 -1
  154. package/dist/client/assets/primitives-CW89TsFB-BBLwFFPo.js +0 -2
  155. package/dist/client/assets/primitives-CW89TsFB-BBLwFFPo.js.map +0 -1
  156. package/dist/client/assets/pullRequestReviewFailures-QvtS729d.js +0 -2
  157. package/dist/client/assets/pullRequestReviewThreadReplay-CpPdYxQE.js +0 -2
  158. package/dist/client/assets/releaseRoutes-CSP_eBj6.js +0 -2
  159. package/dist/client/assets/useWorkspaceDefaultLanding-C3PRrLgk.js +0 -3
  160. package/dist/client/assets/useWorkspaceItems-CHYpfLmL.js +0 -2
  161. package/dist/client/assets/workspaceSettingsTransport-Kq7lfPsC.js +0 -2
  162. package/dist/server/assets/BindConfig-hNWrGfu2.js.map +0 -1
  163. package/dist/server/assets/controlCenterApi-BcVWTP9F.js.map +0 -1
@@ -290,6 +290,7 @@ Schema.Class("Sandbox")({
290
290
  pullRequestId: PullRequestId,
291
291
  awsAccountId: Schema.String,
292
292
  repositoryName: RepositoryName,
293
+ region: AwsRegion,
293
294
  sourceBranch: Schema.String,
294
295
  containerId: Schema.optional(Schema.String),
295
296
  port: Schema.optional(Schema.Number),
@@ -1040,4 +1041,4 @@ var ControlCenterApi = class extends HttpApi.make("ControlCenterApi").add(Sessio
1040
1041
  //#endregion
1041
1042
  export { RepositoryName as $, CompleteDiffContentRange as A, RelationshipHistoryInspection as B, LiveEventsApiGroup as C, StreamHeartbeatLiveEvent as D, StreamHeartbeat as E, DiffFileAnchor as F, WorkspaceEntityActivity as G, RelationshipRepairCandidates as H, CreateRelationshipRepairProposalRequest as I, AwsProfileName as J, WorkspaceEntityGraph as K, DeliveryGraphApiGroup as L, CompleteDiffInventory as M, CompleteDiffInventoryEntry as N, StreamResetRequired as O, DiffApiGroup as P, RelativeFileVersion as Q, EvidenceInspection as R, EventCursorFromString as S, PortfolioSnapshotLiveEvent as T, RelationshipRepairProposalDraft as U, RelationshipRepairCandidate as V, ReleaseDeliveryGraphInspection as W, CodeCommitPullRequestUrl as X, AwsRegion as Y, PullRequestId as Z, MediaApiGroup as _, WorkspaceSettingsEtag as a, SafeMediaContentType as b, workspaceSettingsEtag as c, TimelineExportLimitFromString as d, SandboxId as et, TimelineExportResponseHeaders as f, SharesApiGroup as g, CreateAuthorizedShareRequest as h, WorkspaceSettingsApiGroup as i, CodePipelineLogReadRequest as it, CompleteDiffContentRequest as j, StreamResetRequiredLiveEvent as k, TimelineApiGroup as l, AuthorizedShareSummary as m, UpdateWorkspaceSettingsRequest as n, CodePipelineApiGroup as nt, WorkspaceSettingsReadModel as o, AuthorizedShareResolution as p, WorkspaceEntityInspection as q, WorkspacePresentationReadModel as r, CodePipelineArtifactReadRequest as rt, WorkspaceSettingsRevision as s, ControlCenterApi as t, identityMatches as tt, TimelineExportContentType as u, MediaResponseHeaders as v, PortfolioInvalidatedLiveEvent as w, ControlCenterLiveEvent as x, OpaqueMediaId as y, InspectedEntityProjection as z };
1042
1043
 
1043
- //# sourceMappingURL=controlCenterApi-BcVWTP9F.js.map
1044
+ //# sourceMappingURL=controlCenterApi-WaKi6EUb.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"controlCenterApi-WaKi6EUb.js","names":[],"sources":["../../../src/api/codepipeline.ts","../../../../codecommit-core/src/Domain.ts","../../../src/api/deliveryGraph.ts","../../../src/api/diff.ts","../../../src/api/liveEvents.ts","../../../src/api/media.ts","../../../src/api/shares.ts","../../../src/api/timeline.ts","../../../src/api/workspaceSettings.ts","../../../src/api/controlCenterApi.ts"],"sourcesContent":["import * as Schema from \"effect/Schema\"\nimport { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from \"effect/unstable/httpapi\"\n\nimport { PluginConnectionId } from \"../domain/identifiers.js\"\nimport {\n PluginPipelineArtifactRangeRequestV1,\n PluginPipelineLogPageRequestV1,\n PluginPipelineLogPageV1\n} from \"../domain/plugins/index.js\"\nimport {\n ConflictApiError,\n ForbiddenApiError,\n NotFoundApiError,\n RateLimitedApiError,\n RequestTimedOutApiError,\n ServiceUnavailableApiError,\n UnauthorizedApiError\n} from \"./errors.js\"\nimport { SessionCookieAuth } from \"./session.js\"\n\n/** Workspace-scoped request for one bounded CodePipeline action log page. */\nexport const CodePipelineLogReadRequest = Schema.Struct({\n pluginConnectionId: PluginConnectionId,\n request: PluginPipelineLogPageRequestV1\n})\n\n/** Workspace-scoped request for one bounded CodePipeline action artifact range. */\nexport const CodePipelineArtifactReadRequest = Schema.Struct({\n pluginConnectionId: PluginConnectionId,\n request: PluginPipelineArtifactRangeRequestV1\n})\n\nconst readErrors = [\n UnauthorizedApiError,\n ForbiddenApiError,\n NotFoundApiError,\n ConflictApiError,\n RateLimitedApiError,\n RequestTimedOutApiError,\n ServiceUnavailableApiError\n]\n\nconst logs = HttpApiEndpoint.post(\"logs\", \"/logs\", {\n payload: CodePipelineLogReadRequest,\n success: PluginPipelineLogPageV1,\n error: readErrors\n}).middleware(SessionCookieAuth)\n\nconst artifactBytes = Schema.Uint8Array.pipe(\n HttpApiSchema.asUint8Array({ contentType: \"application/octet-stream\" })\n)\nconst artifact = HttpApiEndpoint.post(\"artifact\", \"/artifact\", {\n payload: CodePipelineArtifactReadRequest,\n success: [\n artifactBytes,\n artifactBytes.pipe(HttpApiSchema.status(206)),\n artifactBytes.pipe(HttpApiSchema.status(416))\n ],\n error: readErrors\n}).middleware(SessionCookieAuth)\n\n/** Authenticated workspace-scoped CodePipeline evidence proxy. */\nexport class CodePipelineApiGroup extends HttpApiGroup.make(\"codepipeline\")\n .add(logs)\n .add(artifact)\n .prefix(\"/api/v1/codepipeline\")\n{}\n","/**\n * Domain models for CodeCommit operations.\n *\n * Provides branded types for compile-time ID safety, `Schema.Class` models\n * with computed properties, and `Schema.Literal` enumerations. Central types\n * include {@link PullRequest} (with approval rules, approver ARNs, and\n * review detection), {@link ApprovalRule} (per-PR rule with pool members\n * and satisfaction state), and {@link PersistentNotification} (including\n * approval_requested and review_reminder types).\n *\n * **Mental model**\n *\n * - ApprovalRule: per-PR rule with pool members (normalized names) + raw ARNs\n * - needsMyReview: standalone fn (not method) so it works with wire objects too\n * - PersistentNotificationType: includes approval_requested, review_reminder\n *\n * **Gotchas**\n *\n * - ApprovalRule uses `Schema.Class`, but instances round-trip as plain objects\n * through JSON without class instance checks\n *\n * **Common tasks**\n *\n * - Define approval rule: {@link ApprovalRule}\n * - Check review needed: {@link needsMyReview}\n * - PR console URL: {@link codecommitConsoleUrl}\n * - Notification types: {@link PersistentNotificationType}\n *\n * **Quickstart**\n *\n * ```ts\n * import { needsMyReview, PullRequest } from \"./Domain.js\"\n *\n * declare const pr: PullRequest\n * if (needsMyReview(pr, \"alice\")) {\n * console.log(`Review needed: ${pr.consoleUrl}`)\n * }\n * ```\n *\n * @category Domain\n * @module\n */\nimport { Data, Effect, Schema, SchemaGetter, SchemaIssue } from \"effect\"\n\n// ---------------------------------------------------------------------------\n// Branded Types\n// ---------------------------------------------------------------------------\n\n/**\n * Branded pull request identifier.\n *\n * @category Domain\n */\nexport const PullRequestId = Schema.String.pipe(Schema.brand(\"PullRequestId\"))\nexport type PullRequestId = typeof PullRequestId.Type\n\n/**\n * Branded repository name.\n *\n * @category Domain\n */\nexport const RepositoryName = Schema.String.pipe(Schema.brand(\"RepositoryName\"))\nexport type RepositoryName = typeof RepositoryName.Type\n\n/**\n * Branded AWS profile name.\n *\n * @category Domain\n */\nexport const AwsProfileName = Schema.String.pipe(Schema.brand(\"AwsProfileName\"))\nexport type AwsProfileName = typeof AwsProfileName.Type\n\n/**\n * Branded AWS region name.\n *\n * @category Domain\n */\nexport const AwsRegion = Schema.String.pipe(Schema.brand(\"AwsRegion\"))\nexport type AwsRegion = typeof AwsRegion.Type\n\n/**\n * Branded comment identifier.\n *\n * @category Domain\n */\nexport const CommentId = Schema.String.pipe(Schema.brand(\"CommentId\"))\nexport type CommentId = typeof CommentId.Type\n\n/**\n * Branded sandbox identifier.\n *\n * @category Domain\n */\nexport const SandboxId = Schema.String.pipe(Schema.brand(\"SandboxId\"))\nexport type SandboxId = typeof SandboxId.Type\n\n// ---------------------------------------------------------------------------\n// Enumerations\n// ---------------------------------------------------------------------------\n\n/**\n * Pull request status.\n *\n * @category Domain\n */\nexport const PullRequestStatus = Schema.Literals([\"OPEN\", \"CLOSED\", \"MERGED\"])\nexport type PullRequestStatus = typeof PullRequestStatus.Type\n\n/** Normalizes provider/cache account identifiers; blank values are unresolved, not identities. */\nexport const normalizeAccountId = (value: string | null | undefined): string | undefined => {\n const normalized = value?.trim()\n return normalized === undefined || normalized.length === 0 ? undefined : normalized\n}\n\n/**\n * Notification severity type.\n *\n * @category Domain\n */\nexport const NotificationType = Schema.Literals([\"error\", \"info\", \"warning\", \"success\"])\nexport type NotificationType = typeof NotificationType.Type\n\n/**\n * Application loading status.\n *\n * @category Domain\n */\nexport const AppStatus = Schema.Literals([\"idle\", \"loading\", \"error\"])\nexport type AppStatus = typeof AppStatus.Type\n\n/**\n * Sandbox lifecycle status.\n *\n * @category Domain\n */\nexport const SandboxStatus = Schema.Literals([\n \"creating\",\n \"cloning\",\n \"starting\",\n \"running\",\n \"stopping\",\n \"stopped\",\n \"error\"\n])\nexport type SandboxStatus = typeof SandboxStatus.Type\n\n// ---------------------------------------------------------------------------\n// Domain Models\n// ---------------------------------------------------------------------------\n\n/**\n * AWS account reference (profile + region).\n *\n * @category Domain\n */\nexport class Account extends Schema.Class<Account>(\"Account\")({\n profile: AwsProfileName,\n region: AwsRegion,\n awsAccountId: Schema.optional(Schema.String),\n repoAccountId: Schema.optional(Schema.String)\n}) {}\n\n/**\n * Approval rule attached to a pull request.\n *\n * @category Domain\n */\nexport class ApprovalRule extends Schema.Class<ApprovalRule>(\"ApprovalRule\")({\n ruleName: Schema.String,\n requiredApprovals: Schema.Number,\n poolMembers: Schema.Array(Schema.String),\n poolMemberArns: Schema.Array(Schema.String).pipe(Schema.withDecodingDefaultTypeKey(Effect.succeed([]))),\n satisfied: Schema.Boolean,\n fromTemplate: Schema.optional(Schema.String)\n}) {}\n\n/**\n * CodeCommit pull request.\n *\n * @category Domain\n */\nexport class PullRequest extends Schema.Class<PullRequest>(\"PullRequest\")({\n id: PullRequestId,\n title: Schema.String,\n description: Schema.optional(Schema.String),\n author: Schema.String,\n repositoryName: RepositoryName,\n creationDate: Schema.Date,\n lastModifiedDate: Schema.Date,\n link: Schema.String,\n account: Account,\n status: PullRequestStatus,\n sourceBranch: Schema.String,\n destinationBranch: Schema.String,\n isMergeable: Schema.Boolean,\n isApproved: Schema.Boolean,\n commentCount: Schema.optional(Schema.Number),\n healthScore: Schema.optional(Schema.Number),\n fetchedAt: Schema.optional(Schema.Date),\n approvedBy: Schema.Array(Schema.String),\n approvedByArns: Schema.Array(Schema.String).pipe(Schema.withDecodingDefaultTypeKey(Effect.succeed([]))),\n commentedBy: Schema.Array(Schema.String),\n filesChanged: Schema.optional(Schema.Number),\n approvalRules: Schema.Array(ApprovalRule).pipe(Schema.withDecodingDefaultTypeKey(Effect.succeed([])))\n}) {\n get consoleUrl(): string {\n return codecommitConsoleUrl(this.account.region, this.repositoryName, this.id)\n }\n}\n\n/**\n * Robust identity comparison for matching a caller against an author or\n * approval-pool member.\n *\n * Both sides normally arrive already normalised by `normalizeAuthor`\n * (ARN → trailing `/`-segment), so the happy path is a plain equality. Under\n * cross-account SSO / assumed-role setups the two strings can still diverge —\n * e.g. one side is a full ARN or `AWSReservedSSO_<perm>_<id>/<user>` form while\n * the other is the bare username, or they differ only in case. This is a\n * SUPERSET of exact match: it still matches when the strings are equal, and\n * additionally matches when, after case-folding and reducing each side to its\n * final `/`- or `:`-segment (the username), the username segments are equal.\n * It deliberately anchors on the username segment so unrelated users never match.\n *\n * @category Domain\n */\nexport const identityMatches = (callerUsername: string, prAuthor: string): boolean => {\n const norm = (s: string) => s.trim().toLowerCase()\n const tail = (s: string) => {\n const segments = norm(s).split(/[/:]/).filter((seg) => seg.length > 0)\n return segments[segments.length - 1] ?? \"\"\n }\n const a = norm(callerUsername)\n const b = norm(prAuthor)\n if (a === \"\" || b === \"\") return false\n if (a === b) return true\n const ta = tail(callerUsername)\n const tb = tail(prAuthor)\n return ta !== \"\" && ta === tb\n}\n\n/**\n * Check if a PR needs review from the given user.\n * Standalone function so it works with both Schema.Class instances and plain wire objects.\n *\n * Uses {@link identityMatches} (a superset of exact equality) for the\n * caller-vs-pool-member and caller-vs-approver comparisons so SSO/ARN identity\n * forms still match when they refer to the same user.\n */\nexport const needsMyReview = (\n pr: { readonly approvalRules: ReadonlyArray<ApprovalRule>; readonly approvedBy: ReadonlyArray<string> },\n currentUser: string | undefined\n): boolean => {\n if (currentUser === undefined || currentUser.length === 0) return false\n if (pr.approvedBy.some((approver) => identityMatches(currentUser, approver))) return false\n return pr.approvalRules.some(\n (rule) => !rule.satisfied && rule.poolMembers.some((member) => identityMatches(currentUser, member))\n )\n}\n\nconst consoleDomainForRegion = (region: string): string =>\n region.startsWith(\"cn-\")\n ? \"console.amazonaws.cn\"\n : region.startsWith(\"us-gov-\")\n ? \"console.amazonaws-us-gov.com\"\n : \"console.aws.amazon.com\"\n\nexport const codecommitConsoleUrl = (region: string, repo: string, prId: string): string =>\n `https://${region}.${\n consoleDomainForRegion(\n region\n )\n }/codesuite/codecommit/repositories/${repo}/pull-requests/${prId}?region=${region}`\n\nconst CodeCommitLocatorRegion = AwsRegion.check(\n Schema.isPattern(/^[a-z]{2}(?:-gov)?-[a-z0-9-]+-[0-9]+$/u)\n)\nconst CodeCommitLocatorRepositoryName = RepositoryName.check(\n Schema.isPattern(/^[A-Za-z0-9._-]{1,100}$/u)\n)\nconst CodeCommitLocatorPullRequestId = PullRequestId.check(\n Schema.isPattern(/^[0-9]{1,200}$/u)\n)\n\n/** Provider coordinates recovered from an AWS CodeCommit console pull-request URL. */\nexport const CodeCommitPullRequestLocator = Schema.Struct({\n region: CodeCommitLocatorRegion,\n repositoryName: CodeCommitLocatorRepositoryName,\n pullRequestId: CodeCommitLocatorPullRequestId\n})\nexport type CodeCommitPullRequestLocator = typeof CodeCommitPullRequestLocator.Type\n\nconst codeCommitConsoleHost =\n /^(?<region>[a-z]{2}(?:-gov)?-[a-z0-9-]+-\\d+)\\.(?<domain>console\\.aws\\.amazon\\.com|console\\.amazonaws\\.cn|console\\.amazonaws-us-gov\\.com)$/u\nconst codeCommitPullRequestPath =\n /^\\/codesuite\\/codecommit\\/repositories\\/(?<repositoryName>[A-Za-z0-9._-]{1,100})\\/pull-requests\\/(?<pullRequestId>[0-9]{1,200})(?:\\/(?<view>activity|changes|details))?$/u\n\nconst parseCodeCommitPullRequestUrl = (input: string): CodeCommitPullRequestLocator | null => {\n if (!URL.canParse(input)) return null\n const url = new URL(input)\n const host = codeCommitConsoleHost.exec(url.hostname)\n const path = codeCommitPullRequestPath.exec(url.pathname)\n const region = host?.groups?.region\n const domain = host?.groups?.domain\n const repositoryName = path?.groups?.repositoryName\n const pullRequestId = path?.groups?.pullRequestId\n const view = path?.groups?.view\n const queryRegions = url.searchParams.getAll(\"region\")\n if (\n url.protocol !== \"https:\" ||\n url.port.length > 0 ||\n url.username.length > 0 ||\n url.password.length > 0 ||\n (url.hash.length > 0 && view !== \"activity\") ||\n region === undefined ||\n domain === undefined ||\n repositoryName === undefined ||\n pullRequestId === undefined ||\n domain !== consoleDomainForRegion(region) ||\n queryRegions.length > 1 ||\n (queryRegions.length === 1 && queryRegions[0] !== region)\n ) return null\n return {\n region: AwsRegion.make(region),\n repositoryName: RepositoryName.make(repositoryName),\n pullRequestId: PullRequestId.make(pullRequestId)\n }\n}\n\n/**\n * Decodes a shared AWS Console PR link into provider coordinates.\n *\n * The URL does not identify an AWS account. Callers must resolve the locator\n * within their authenticated workspace and reject ambiguous matches.\n */\nexport const CodeCommitPullRequestUrl = Schema.String.check(\n Schema.isTrimmed(),\n Schema.isNonEmpty(),\n Schema.isMaxLength(2_048)\n).pipe(\n Schema.decodeTo(CodeCommitPullRequestLocator, {\n decode: SchemaGetter.transformOrFail((input, options) => {\n const locator = parseCodeCommitPullRequestUrl(input)\n return locator === null\n ? Effect.fail(\n new SchemaIssue.InvalidValue({ expected: \"an AWS CodeCommit pull-request console URL\" }, input, options)\n )\n : Effect.succeed(locator)\n }),\n encode: SchemaGetter.transform(({ pullRequestId, region, repositoryName }) =>\n codecommitConsoleUrl(region, repositoryName, pullRequestId)\n )\n })\n)\n\n/**\n * Code sandbox instance for a pull request.\n *\n * @category Domain\n */\nexport class Sandbox extends Schema.Class<Sandbox>(\"Sandbox\")({\n id: SandboxId,\n pullRequestId: PullRequestId,\n awsAccountId: Schema.String,\n repositoryName: RepositoryName,\n region: AwsRegion,\n sourceBranch: Schema.String,\n containerId: Schema.optional(Schema.String),\n port: Schema.optional(Schema.Number),\n workspacePath: Schema.String,\n status: SandboxStatus,\n error: Schema.optional(Schema.String),\n createdAt: Schema.Date,\n lastActivityAt: Schema.Date\n}) {}\n\n/**\n * Comment on a pull request.\n *\n * @category Domain\n */\nexport class PRComment extends Schema.Class<PRComment>(\"PRComment\")({\n id: CommentId,\n content: Schema.String,\n author: Schema.String,\n creationDate: Schema.Date,\n inReplyTo: Schema.optional(CommentId),\n deleted: Schema.Boolean,\n filePath: Schema.optional(Schema.String),\n lineNumber: Schema.optional(Schema.Number)\n}) {}\n\n/**\n * Recursive comment thread (root comment + nested replies).\n *\n * @category Domain\n */\nexport interface CommentThread {\n readonly root: PRComment\n readonly replies: ReadonlyArray<CommentThread>\n}\n\n/** Provider-relative side of a pull-request file position. */\nexport const RelativeFileVersion = Schema.Literals([\"BEFORE\", \"AFTER\"])\nexport type RelativeFileVersion = typeof RelativeFileVersion.Type\n\n/**\n * Comments grouped by file location in a pull request.\n *\n * @category Domain\n */\nexport interface PRCommentLocation {\n readonly filePath?: string\n readonly beforeCommitId?: string\n readonly afterCommitId?: string\n readonly relativeFileVersion?: RelativeFileVersion\n readonly comments: ReadonlyArray<CommentThread>\n}\n\n// ---------------------------------------------------------------------------\n// JSON-safe comment schemas (for HTTP API wire format)\n// ---------------------------------------------------------------------------\n\nconst PRCommentJson = Schema.Struct({\n id: Schema.String,\n content: Schema.String,\n author: Schema.String,\n creationDate: Schema.String,\n inReplyTo: Schema.optional(Schema.String),\n deleted: Schema.Boolean,\n filePath: Schema.optional(Schema.String),\n lineNumber: Schema.optional(Schema.Number)\n})\n\nexport interface CommentThreadJsonEncoded {\n readonly root: typeof PRCommentJson.Type\n readonly replies: ReadonlyArray<CommentThreadJsonEncoded>\n}\n\nconst CommentThreadJson: Schema.Codec<CommentThreadJsonEncoded> = Schema.Struct({\n root: PRCommentJson,\n replies: Schema.Array(Schema.suspend((): Schema.Codec<CommentThreadJsonEncoded> => CommentThreadJson))\n})\n\n/**\n * JSON-safe schema for comment locations (HTTP wire format).\n * Dates are ISO strings, no branded types.\n *\n * @category Domain\n */\nexport const PRCommentLocationJson = Schema.Struct({\n filePath: Schema.optional(Schema.String),\n beforeCommitId: Schema.optional(Schema.String),\n afterCommitId: Schema.optional(Schema.String),\n relativeFileVersion: Schema.optional(RelativeFileVersion),\n comments: Schema.Array(CommentThreadJson)\n})\n\n// NOTE: replies of deleted root comments are omitted — matches UI behavior\n// (deleted comments hide their subtree).\nconst serializeThread = (t: CommentThread): CommentThreadJsonEncoded => ({\n root: {\n id: t.root.id,\n content: t.root.content,\n author: t.root.author,\n creationDate: t.root.creationDate.toISOString(),\n ...((t.root.inReplyTo != null) && { inReplyTo: t.root.inReplyTo }),\n deleted: t.root.deleted,\n ...((t.root.filePath != null) && { filePath: t.root.filePath }),\n ...((t.root.lineNumber != null) && { lineNumber: t.root.lineNumber })\n },\n replies: t.root.deleted ? [] : t.replies.map(serializeThread)\n})\n\n/**\n * Encode PRCommentLocations to JSON-safe format for HTTP responses.\n *\n * @category Domain\n */\nexport const encodeCommentLocations = (\n locations: ReadonlyArray<PRCommentLocation>\n): ReadonlyArray<typeof PRCommentLocationJson.Type> =>\n locations.map((loc) => ({\n ...((loc.filePath != null) && { filePath: loc.filePath }),\n ...((loc.beforeCommitId != null) && { beforeCommitId: loc.beforeCommitId }),\n ...((loc.afterCommitId != null) && { afterCommitId: loc.afterCommitId }),\n ...((loc.relativeFileVersion != null) && { relativeFileVersion: loc.relativeFileVersion }),\n comments: loc.comments.map(serializeThread)\n }))\n\n// ---------------------------------------------------------------------------\n// Persistent Notification Types\n// ---------------------------------------------------------------------------\n\nexport const PersistentNotificationType = Schema.Literals([\n \"new_comment\",\n \"comment_edited\",\n \"comment_deleted\",\n \"approval_changed\",\n \"approval_requested\",\n \"review_reminder\",\n \"merge_changed\",\n \"title_changed\",\n \"description_changed\",\n \"pr_merged\",\n \"pr_closed\",\n \"pr_reopened\"\n])\nexport type PersistentNotificationType = typeof PersistentNotificationType.Type\n\nexport class PersistentNotification extends Schema.Class<PersistentNotification>(\"PersistentNotification\")({\n id: Schema.Number,\n pullRequestId: PullRequestId,\n awsAccountId: Schema.String,\n type: PersistentNotificationType,\n message: Schema.String,\n createdAt: Schema.Date,\n read: Schema.Boolean\n}) {}\n\nexport type PRSyncStatus = Data.TaggedEnum<{\n readonly Cached: { readonly fetchedAt: Date }\n readonly Syncing: { readonly fetchedAt: Date }\n readonly UpToDate: { readonly fetchedAt: Date }\n readonly Failed: { readonly fetchedAt: Date; readonly error: string }\n}>\nexport const PRSyncStatus = Data.taggedEnum<PRSyncStatus>()\n\n// ---------------------------------------------------------------------------\n// State Models\n// ---------------------------------------------------------------------------\n\n/**\n * Notification item with timestamp.\n *\n * @category Domain\n */\nexport class NotificationItem extends Schema.Class<NotificationItem>(\"NotificationItem\")({\n type: NotificationType,\n title: Schema.String,\n message: Schema.String,\n timestamp: Schema.Date,\n profile: Schema.optionalKey(Schema.String)\n}) {}\n\n/**\n * Notification state container.\n *\n * @category Domain\n */\nexport interface NotificationsState {\n readonly items: ReadonlyArray<NotificationItem>\n}\n\n/**\n * Account configuration in app state.\n *\n * @category Domain\n */\nexport interface AccountState {\n readonly profile: AwsProfileName\n readonly region: AwsRegion\n readonly enabled: boolean\n}\n\n/** Account-region scope whose pull-request list completed in the latest refresh. */\nexport interface PullRequestRefreshScope {\n readonly profile: AwsProfileName\n readonly region: AwsRegion\n readonly awsAccountId: string\n}\n\n/**\n * Application state.\n *\n * @category Domain\n */\nexport interface AppState {\n readonly pullRequests: ReadonlyArray<PullRequest>\n readonly accounts: ReadonlyArray<AccountState>\n readonly status: AppStatus\n readonly statusDetail?: string | undefined\n readonly error?: string | undefined\n readonly lastUpdated?: Date\n readonly currentUser?: string\n readonly pendingReviewCount?: number\n /** Monotonic sequence incremented when a list refresh starts. */\n readonly refreshGeneration?: number\n readonly successfulRefreshScopes?: ReadonlyArray<PullRequestRefreshScope>\n}\n","import * as CodeCommitDomain from \"@knpkv/codecommit-core/Domain.js\"\nimport * as Effect from \"effect/Effect\"\nimport * as Schema from \"effect/Schema\"\nimport { HttpApiEndpoint, HttpApiGroup } from \"effect/unstable/httpapi\"\n\nimport { PersonSourceIdentity, Role } from \"../domain/actors.js\"\nimport {\n DeliveryEntityKind,\n DeliveryEntityProjection,\n DeliveryEntityService,\n DeliveryEntityStatusGroup,\n DeliveryNode,\n DeliveryRelationship,\n EvidenceClaim,\n EvidenceItem,\n LedgerRevision\n} from \"../domain/deliveryGraph.js\"\nimport { Freshness } from \"../domain/freshness.js\"\nimport { GovernedActionState } from \"../domain/governedAction/index.js\"\nimport {\n EntityId,\n EnvironmentId,\n EvidenceId,\n GovernedActionId,\n PersonId,\n RelationshipId,\n RelationshipRepairProposalId,\n RelationshipRepairReviewId,\n ReleaseId\n} from \"../domain/identifiers.js\"\nimport {\n RelationshipRepairApplication,\n RelationshipRepairDisposition,\n RelationshipRepairProposal,\n RelationshipRepairRationale,\n RelationshipRepairReviewDecision\n} from \"../domain/relationshipRepair.js\"\nimport { Revision, SourceRevision } from \"../domain/sourceRevision.js\"\nimport { TimelineEvent } from \"../domain/timeline.js\"\nimport { UtcTimestamp } from \"../domain/utcTimestamp.js\"\nimport {\n ConflictApiError,\n ForbiddenApiError,\n InvalidRequestApiError,\n NotFoundApiError,\n PayloadTooLargeApiError,\n RequestTimedOutApiError,\n ServiceUnavailableApiError,\n UnauthorizedApiError\n} from \"./errors.js\"\nimport { SessionCookieAuth, SessionMutationAuth } from \"./session.js\"\nimport { CanonicalNonNegativeIntegerFromString } from \"./wire.js\"\n\nexport const MAXIMUM_RELEASE_SLICE_RECORDS = 500\nexport const MAXIMUM_WORKSPACE_ENTITY_PROJECTIONS = 500\nexport const MAXIMUM_WORKSPACE_ENTITY_RELEASES = 500\nexport const MAXIMUM_WORKSPACE_ENTITY_OWNERS = 20\nexport const MAXIMUM_WORKSPACE_OWNER_OPTIONS = 200\nexport const MAXIMUM_WORKSPACE_OWNER_ROLES = 16\nexport const MAXIMUM_WORKSPACE_ENTITY_RELATIONSHIPS = 100\nexport const MAXIMUM_WORKSPACE_ENTITY_ACTIVITY = 20\nconst MAXIMUM_RELATIONSHIP_HISTORY = 200\nconst MAXIMUM_EVIDENCE_CLAIMS = 200\nexport const MAXIMUM_REPAIR_PROPOSALS = 128\n\nconst boundedArray = <T, E, RD, RE>(schema: Schema.Codec<T, E, RD, RE>, maximum: number) =>\n Schema.Array(schema).check(Schema.isMaxLength(maximum))\n\n/** One persisted entity projection with its ledger observation time. */\nexport const InspectedEntityProjection = Schema.Struct({\n projection: DeliveryEntityProjection,\n recordedAt: UtcTimestamp\n}).annotate({ identifier: \"InspectedEntityProjection\" })\n\n/** Bounded deterministic graph prefix; `truncated` explicitly reports incomplete material. */\nexport const ReleaseDeliveryGraphInspection = Schema.Struct({\n releaseId: ReleaseId,\n environmentId: Schema.NullOr(EnvironmentId),\n truncated: Schema.Boolean,\n nodes: boundedArray(DeliveryNode, MAXIMUM_RELEASE_SLICE_RECORDS),\n entityProjections: boundedArray(InspectedEntityProjection, MAXIMUM_RELEASE_SLICE_RECORDS),\n relationships: boundedArray(DeliveryRelationship, MAXIMUM_RELEASE_SLICE_RECORDS),\n evidenceClaims: boundedArray(EvidenceClaim, MAXIMUM_RELEASE_SLICE_RECORDS),\n evidenceItems: boundedArray(EvidenceItem, MAXIMUM_RELEASE_SLICE_RECORDS)\n}).annotate({ identifier: \"ReleaseDeliveryGraphInspection\" })\n\n/** Decoded release delivery-graph inspection. */\nexport type ReleaseDeliveryGraphInspection = typeof ReleaseDeliveryGraphInspection.Type\n\nconst WorkspaceEntityReleaseIds = Schema.Array(ReleaseId).check(\n Schema.isUnique(),\n Schema.isMaxLength(MAXIMUM_WORKSPACE_ENTITY_RELEASES),\n Schema.makeFilter(\n (releaseIds) =>\n releaseIds.every((releaseId, index) => {\n const previous = releaseIds[index - 1]\n return index === 0 || (previous !== undefined && previous < releaseId)\n }),\n { expected: \"sorted workspace entity release identifiers\" }\n )\n)\n\n/** Compact canonical human identity assigned to one current workspace entity. */\nexport const WorkspaceEntityOwner = Schema.Struct({\n avatarFallback: Schema.String.check(Schema.isTrimmed(), Schema.isNonEmpty(), Schema.isMaxLength(4)),\n displayName: Schema.String.check(Schema.isTrimmed(), Schema.isNonEmpty(), Schema.isMaxLength(200)),\n personId: PersonId,\n roles: boundedArray(Role, MAXIMUM_WORKSPACE_OWNER_ROLES).check(Schema.isMinLength(1)),\n sourceIdentities: Schema.optionalKey(boundedArray(PersonSourceIdentity, MAXIMUM_WORKSPACE_OWNER_ROLES))\n}).annotate({ identifier: \"WorkspaceEntityOwner\" })\n\n/** Decoded entity owner identity. */\nexport type WorkspaceEntityOwner = typeof WorkspaceEntityOwner.Type\n\nconst WorkspaceEntityOwners = boundedArray(WorkspaceEntityOwner, MAXIMUM_WORKSPACE_ENTITY_OWNERS)\nconst WorkspaceOwnerOptions = boundedArray(WorkspaceEntityOwner, MAXIMUM_WORKSPACE_OWNER_OPTIONS)\n\n/** One current workspace entity projection and every bounded current release membership. */\nexport const WorkspaceEntityProjection = Schema.Struct({\n canonicalReleaseId: Schema.NullOr(ReleaseId),\n owners: WorkspaceEntityOwners,\n ownersTruncated: Schema.Boolean,\n releaseIds: WorkspaceEntityReleaseIds,\n releaseMembershipsTruncated: Schema.Boolean,\n projection: DeliveryEntityProjection,\n recordedAt: UtcTimestamp\n}).check(\n Schema.makeFilter(\n ({ canonicalReleaseId, releaseIds }) => canonicalReleaseId === (releaseIds[0] ?? null),\n { expected: \"canonical release identifier to be the first current release membership\" }\n ),\n Schema.makeFilter(\n ({ releaseIds, releaseMembershipsTruncated }) =>\n !releaseMembershipsTruncated || releaseIds.length === MAXIMUM_WORKSPACE_ENTITY_RELEASES,\n { expected: \"truncated workspace release memberships to contain the complete bounded prefix\" }\n ),\n Schema.makeFilter(\n ({ owners, ownersTruncated }) => !ownersTruncated || owners.length === MAXIMUM_WORKSPACE_ENTITY_OWNERS,\n { expected: \"truncated workspace owners to contain the complete bounded prefix\" }\n )\n).annotate({ identifier: \"WorkspaceEntityProjection\" })\n\n/** Bounded workspace-wide index of current present normalized entities. */\nexport const WorkspaceEntityProjectionIndex = Schema.Struct({\n matchedCount: Schema.Int.check(Schema.isGreaterThanOrEqualTo(0)),\n ownerOptions: WorkspaceOwnerOptions,\n ownerOptionsTruncated: Schema.Boolean,\n totalCount: Schema.Int.check(Schema.isGreaterThanOrEqualTo(0)),\n truncated: Schema.Boolean,\n items: boundedArray(WorkspaceEntityProjection, MAXIMUM_WORKSPACE_ENTITY_PROJECTIONS)\n}).check(\n Schema.makeFilter(\n ({ ownerOptions, ownerOptionsTruncated }) =>\n !ownerOptionsTruncated || ownerOptions.length === MAXIMUM_WORKSPACE_OWNER_OPTIONS,\n { expected: \"truncated workspace owner options to contain the complete bounded prefix\" }\n )\n).annotate({ identifier: \"WorkspaceEntityProjectionIndex\" })\n\n/** Decoded workspace-wide current entity index. */\nexport type WorkspaceEntityProjectionIndex = typeof WorkspaceEntityProjectionIndex.Type\n\n/** Browser-safe exact CodeCommit match returned by the server-side batch resolver. */\nexport const CodeCommitPullRequestCandidate = Schema.Struct({\n entityId: EntityId,\n accountLabel: Schema.String.check(Schema.isTrimmed(), Schema.isNonEmpty(), Schema.isMaxLength(500)),\n title: Schema.String.check(Schema.isTrimmed(), Schema.isNonEmpty(), Schema.isMaxLength(1_000))\n})\nexport type CodeCommitPullRequestCandidate = typeof CodeCommitPullRequestCandidate.Type\n\n/** Fail-closed result because shared console URLs contain no AWS account identity. */\nexport const CodeCommitPullRequestResolution = Schema.TaggedUnion({\n found: { candidate: CodeCommitPullRequestCandidate },\n ambiguous: {\n candidates: boundedArray(CodeCommitPullRequestCandidate, MAXIMUM_WORKSPACE_ENTITY_PROJECTIONS)\n },\n \"account-identity-unavailable\": {},\n \"not-found\": { indexTruncated: Schema.Boolean }\n})\nexport type CodeCommitPullRequestResolution = typeof CodeCommitPullRequestResolution.Type\n\n/** Complete bounded graph closure surrounding one exact normalized entity. */\nexport const WorkspaceEntityGraph = Schema.Struct({\n truncated: Schema.Boolean,\n nodes: boundedArray(DeliveryNode, MAXIMUM_WORKSPACE_ENTITY_RELATIONSHIPS * 2),\n relatedEntityProjections: boundedArray(\n InspectedEntityProjection,\n MAXIMUM_WORKSPACE_ENTITY_RELATIONSHIPS\n ),\n relationships: boundedArray(DeliveryRelationship, MAXIMUM_WORKSPACE_ENTITY_RELATIONSHIPS),\n evidenceClaims: boundedArray(EvidenceClaim, MAXIMUM_WORKSPACE_ENTITY_RELATIONSHIPS * 2),\n evidenceItems: boundedArray(EvidenceItem, MAXIMUM_WORKSPACE_ENTITY_RELATIONSHIPS * 2)\n}).annotate({ identifier: \"WorkspaceEntityGraph\" })\n\n/** Decoded exact entity graph closure. */\nexport type WorkspaceEntityGraph = typeof WorkspaceEntityGraph.Type\n\n/** Bounded attributable activity for one exact normalized entity. */\nexport const WorkspaceEntityActivity = Schema.Struct({\n truncated: Schema.Boolean,\n events: boundedArray(TimelineEvent, MAXIMUM_WORKSPACE_ENTITY_ACTIVITY)\n}).annotate({ identifier: \"WorkspaceEntityActivity\" })\n\n/** Decoded exact entity activity. */\nexport type WorkspaceEntityActivity = typeof WorkspaceEntityActivity.Type\n\n/** Current revision-scoped Control Center approval for a Clockify entry. */\nexport const ClockifyApproval = Schema.Struct({\n actionId: GovernedActionId,\n decision: Schema.Literals([\"approved\", \"rejected\"]),\n rationale: Schema.String.check(Schema.isTrimmed(), Schema.isNonEmpty(), Schema.isMaxLength(1_000)),\n decidedAt: UtcTimestamp\n}).annotate({ identifier: \"ClockifyApproval\" })\n\n/** Decoded browser-safe Clockify approval projection. */\nexport type ClockifyApproval = typeof ClockifyApproval.Type\n\n/** Canonical provider-neutral full-page read model for one workspace entity. */\nexport const WorkspaceEntityInspection = Schema.Struct({\n entity: WorkspaceEntityProjection,\n source: SourceRevision,\n isSourceCurrent: Schema.Boolean,\n sourceActionsAvailable: Schema.Boolean.pipe(\n Schema.withDecodingDefaultTypeKey(Effect.succeed(false))\n ),\n sourceSynchronizationAvailable: Schema.Boolean.pipe(\n Schema.withDecodingDefaultTypeKey(Effect.succeed(false))\n ),\n freshness: Schema.NullOr(Freshness),\n clockifyApproval: Schema.NullOr(ClockifyApproval).pipe(\n Schema.withDecodingDefaultTypeKey(Effect.succeed(null))\n ),\n graph: WorkspaceEntityGraph,\n activity: WorkspaceEntityActivity\n}).annotate({ identifier: \"WorkspaceEntityInspection\" })\n\n/** Decoded canonical workspace entity read model. */\nexport type WorkspaceEntityInspection = typeof WorkspaceEntityInspection.Type\n\n/** Bounded immutable lifecycle history for one relationship, newest first. */\nexport const RelationshipHistoryInspection = Schema.Struct({\n relationshipId: RelationshipId,\n revisions: boundedArray(DeliveryRelationship, MAXIMUM_RELATIONSHIP_HISTORY)\n}).annotate({ identifier: \"RelationshipHistoryInspection\" })\n\n/** Decoded relationship lifecycle history. */\nexport type RelationshipHistoryInspection = typeof RelationshipHistoryInspection.Type\n\n/** One immutable evidence item and every bounded claim attributed to it. */\nexport const EvidenceInspection = Schema.Struct({\n evidence: EvidenceItem,\n claims: boundedArray(EvidenceClaim, MAXIMUM_EVIDENCE_CLAIMS)\n}).annotate({ identifier: \"EvidenceInspection\" })\n\n/** Decoded evidence inspection. */\nexport type EvidenceInspection = typeof EvidenceInspection.Type\n\n/** Read-only repair suggestion derived from one current incomplete relationship. */\nexport const RelationshipRepairCandidate = Schema.Struct({\n relationship: DeliveryRelationship,\n suggestedDisposition: Schema.Literals([\"link\", \"verify\", \"reject\"]),\n explanation: Schema.String.check(Schema.isTrimmed(), Schema.isNonEmpty(), Schema.isMaxLength(1_000)),\n impact: Schema.Struct({\n releaseId: ReleaseId,\n environmentId: Schema.NullOr(EnvironmentId)\n }),\n requiredPermission: Schema.Literal(\"workspace-owner\")\n}).annotate({ identifier: \"RelationshipRepairCandidate\" })\n\n/** Decoded read-only relationship repair suggestion. */\nexport type RelationshipRepairCandidate = typeof RelationshipRepairCandidate.Type\n\n/** Bounded candidate discovery result; discovery never mutates the relationship ledger. */\nexport const RelationshipRepairCandidates = Schema.Struct({\n releaseId: ReleaseId,\n environmentId: Schema.NullOr(EnvironmentId),\n truncated: Schema.Boolean,\n candidates: boundedArray(RelationshipRepairCandidate, MAXIMUM_RELEASE_SLICE_RECORDS)\n}).annotate({ identifier: \"RelationshipRepairCandidates\" })\n\n/** Decoded relationship repair candidate discovery result. */\nexport type RelationshipRepairCandidates = typeof RelationshipRepairCandidates.Type\n\n/** Non-mutating proposal input with the optimistic precondition required by a future apply step. */\nexport const RelationshipRepairProposalDraft = Schema.Struct({\n candidate: RelationshipRepairCandidate,\n precondition: Schema.Struct({\n relationshipId: RelationshipId,\n expectedRevision: LedgerRevision\n }),\n proposal: Schema.Struct({\n disposition: Schema.Literals([\"link\", \"verify\", \"reject\"]),\n rationale: Schema.String.check(Schema.isTrimmed(), Schema.isNonEmpty(), Schema.isMaxLength(1_000))\n })\n}).annotate({ identifier: \"RelationshipRepairProposalDraft\" })\n\n/** Decoded read-only relationship repair proposal draft. */\nexport type RelationshipRepairProposalDraft = typeof RelationshipRepairProposalDraft.Type\n\n/** Idempotent intent for creating a durable proposal from one exact repair candidate. */\nexport const CreateRelationshipRepairProposalRequest = Schema.Struct({\n proposalId: RelationshipRepairProposal.fields.proposalId,\n environmentId: RelationshipRepairProposal.fields.environmentId,\n expectedRevision: RelationshipRepairProposal.fields.expectedRevision,\n disposition: RelationshipRepairDisposition,\n rationale: RelationshipRepairRationale\n}).annotate({ identifier: \"CreateRelationshipRepairProposalRequest\" })\n\n/** Decoded relationship-repair proposal creation request. */\nexport type CreateRelationshipRepairProposalRequest = typeof CreateRelationshipRepairProposalRequest.Type\n\n/** Bounded newest-first proposal page for one release/environment scope. */\nexport const RelationshipRepairProposalList = Schema.Struct({\n releaseId: ReleaseId,\n environmentId: Schema.NullOr(EnvironmentId),\n status: Schema.NullOr(RelationshipRepairProposal.fields.status),\n truncated: Schema.Boolean,\n proposals: boundedArray(RelationshipRepairProposal, MAXIMUM_REPAIR_PROPOSALS),\n applications: boundedArray(RelationshipRepairApplication, MAXIMUM_REPAIR_PROPOSALS)\n}).annotate({ identifier: \"RelationshipRepairProposalList\" })\n\n/** Decoded bounded relationship-repair proposal page. */\nexport type RelationshipRepairProposalList = typeof RelationshipRepairProposalList.Type\n\n/** Idempotent immutable review command for one pending proposal. */\nexport const ReviewRelationshipRepairProposalRequest = Schema.Struct({\n reviewId: RelationshipRepairReviewId,\n decision: RelationshipRepairReviewDecision,\n rationale: RelationshipRepairRationale\n}).annotate({ identifier: \"ReviewRelationshipRepairProposalRequest\" })\n\n/** Decoded relationship-repair review request. */\nexport type ReviewRelationshipRepairProposalRequest = typeof ReviewRelationshipRepairProposalRequest.Type\n\n/** Applied proposal together with the immutable relationship revision it appended. */\nexport const ApplyRelationshipRepairProposalResponse = Schema.Struct({\n application: RelationshipRepairApplication,\n relationship: DeliveryRelationship\n}).annotate({ identifier: \"ApplyRelationshipRepairProposalResponse\" })\n\n/** Decoded approved-proposal application response. */\nexport type ApplyRelationshipRepairProposalResponse = typeof ApplyRelationshipRepairProposalResponse.Type\n\nconst readErrors = [\n UnauthorizedApiError,\n ForbiddenApiError,\n NotFoundApiError,\n RequestTimedOutApiError,\n ServiceUnavailableApiError\n]\n\nconst releaseSlice = HttpApiEndpoint.get(\"releaseSlice\", \"/api/v1/relationships/releases/:releaseId\", {\n params: { releaseId: ReleaseId },\n query: { environmentId: Schema.optionalKey(EnvironmentId) },\n success: ReleaseDeliveryGraphInspection,\n error: readErrors\n}).middleware(SessionCookieAuth)\n\nconst workspaceEntityProjections = HttpApiEndpoint.get(\n \"workspaceEntityProjections\",\n \"/api/v1/items\",\n {\n query: {\n q: Schema.optionalKey(\n Schema.String.check(Schema.isTrimmed(), Schema.isNonEmpty(), Schema.isMaxLength(200))\n ),\n owner: Schema.optionalKey(PersonId),\n service: Schema.optionalKey(DeliveryEntityService),\n status: Schema.optionalKey(DeliveryEntityStatusGroup),\n type: Schema.optionalKey(DeliveryEntityKind)\n },\n success: WorkspaceEntityProjectionIndex,\n error: readErrors\n }\n).middleware(SessionCookieAuth)\n\nconst resolveCodeCommitPullRequest = HttpApiEndpoint.post(\n \"resolveCodeCommitPullRequest\",\n \"/api/v1/codecommit/pull-requests/resolve\",\n {\n payload: CodeCommitDomain.CodeCommitPullRequestLocator,\n success: CodeCommitPullRequestResolution,\n error: readErrors\n }\n)\n .middleware(SessionCookieAuth)\n .middleware(SessionMutationAuth)\n\nconst workspaceEntity = HttpApiEndpoint.get(\"workspaceEntity\", \"/api/v1/items/:entityId\", {\n params: { entityId: EntityId },\n success: WorkspaceEntityInspection,\n error: readErrors\n}).middleware(SessionCookieAuth)\n\n/** Human-confirmed governed action against one exact Clockify source revision. */\nexport const SubmitClockifyActionRequest = Schema.TaggedUnion({\n \"correct-association\": {\n expectedRevision: Revision,\n jiraIssueKey: Schema.String.check(\n Schema.isTrimmed(),\n Schema.isPattern(/^[A-Z][A-Z0-9]*-[1-9][0-9]*$/u),\n Schema.isMaxLength(100)\n )\n },\n \"record-approval\": {\n expectedRevision: Revision,\n decision: Schema.Literals([\"approved\", \"rejected\"]),\n rationale: Schema.String.check(Schema.isTrimmed(), Schema.isNonEmpty(), Schema.isMaxLength(1_000))\n }\n})\nexport type SubmitClockifyActionRequest = typeof SubmitClockifyActionRequest.Type\n\n/** Durable identity and resulting lifecycle state of a submitted Clockify action. */\nexport const SubmitClockifyActionResponse = Schema.Struct({\n actionId: GovernedActionId,\n state: GovernedActionState\n})\nexport type SubmitClockifyActionResponse = typeof SubmitClockifyActionResponse.Type\n\nconst submitClockifyAction = HttpApiEndpoint.post(\n \"submitClockifyAction\",\n \"/api/v1/items/:entityId/clockify-actions\",\n {\n params: { entityId: EntityId },\n payload: SubmitClockifyActionRequest,\n success: SubmitClockifyActionResponse,\n error: [\n ...readErrors,\n InvalidRequestApiError,\n ConflictApiError\n ]\n }\n)\n .middleware(SessionCookieAuth)\n .middleware(SessionMutationAuth)\n\nconst relationship = HttpApiEndpoint.get(\"relationship\", \"/api/v1/relationships/:relationshipId\", {\n params: { relationshipId: RelationshipId },\n query: {\n revision: Schema.optionalKey(CanonicalNonNegativeIntegerFromString.pipe(Schema.decodeTo(LedgerRevision)))\n },\n success: DeliveryRelationship,\n error: readErrors\n}).middleware(SessionCookieAuth)\n\nconst repairCandidates = HttpApiEndpoint.get(\n \"repairCandidates\",\n \"/api/v1/relationships/releases/:releaseId/repair-candidates\",\n {\n params: { releaseId: ReleaseId },\n query: { environmentId: Schema.optionalKey(EnvironmentId) },\n success: RelationshipRepairCandidates,\n error: readErrors\n }\n).middleware(SessionCookieAuth)\n\nconst repairProposalDraft = HttpApiEndpoint.get(\n \"repairProposalDraft\",\n \"/api/v1/relationships/releases/:releaseId/repair-candidates/:relationshipId/proposal-draft\",\n {\n params: { releaseId: ReleaseId, relationshipId: RelationshipId },\n query: {\n environmentId: Schema.optionalKey(EnvironmentId),\n revision: CanonicalNonNegativeIntegerFromString.pipe(Schema.decodeTo(LedgerRevision))\n },\n success: RelationshipRepairProposalDraft,\n error: readErrors\n }\n).middleware(SessionCookieAuth)\n\nconst createRepairProposal = HttpApiEndpoint.post(\n \"createRepairProposal\",\n \"/api/v1/relationships/releases/:releaseId/repair-candidates/:relationshipId/proposals\",\n {\n params: { releaseId: ReleaseId, relationshipId: RelationshipId },\n payload: CreateRelationshipRepairProposalRequest,\n success: RelationshipRepairProposal,\n error: [\n ...readErrors,\n InvalidRequestApiError,\n ConflictApiError,\n PayloadTooLargeApiError\n ]\n }\n)\n .middleware(SessionCookieAuth)\n .middleware(SessionMutationAuth)\n\nconst listRepairProposals = HttpApiEndpoint.get(\n \"listRepairProposals\",\n \"/api/v1/relationships/releases/:releaseId/repair-proposals\",\n {\n params: { releaseId: ReleaseId },\n query: {\n environmentId: Schema.optionalKey(EnvironmentId),\n status: Schema.optionalKey(RelationshipRepairProposal.fields.status)\n },\n success: RelationshipRepairProposalList,\n error: readErrors\n }\n).middleware(SessionCookieAuth)\n\nconst getRepairProposal = HttpApiEndpoint.get(\n \"getRepairProposal\",\n \"/api/v1/relationships/repair-proposals/:proposalId\",\n {\n params: { proposalId: RelationshipRepairProposalId },\n success: RelationshipRepairProposal,\n error: readErrors\n }\n).middleware(SessionCookieAuth)\n\nconst reviewRepairProposal = HttpApiEndpoint.post(\n \"reviewRepairProposal\",\n \"/api/v1/relationships/repair-proposals/:proposalId/reviews\",\n {\n params: { proposalId: RelationshipRepairProposalId },\n payload: ReviewRelationshipRepairProposalRequest,\n success: RelationshipRepairProposal,\n error: [\n ...readErrors,\n InvalidRequestApiError,\n ConflictApiError,\n PayloadTooLargeApiError\n ]\n }\n)\n .middleware(SessionCookieAuth)\n .middleware(SessionMutationAuth)\n\nconst applyRepairProposal = HttpApiEndpoint.post(\n \"applyRepairProposal\",\n \"/api/v1/relationships/repair-proposals/:proposalId/applications\",\n {\n params: { proposalId: RelationshipRepairProposalId },\n success: ApplyRelationshipRepairProposalResponse,\n error: [\n ...readErrors,\n InvalidRequestApiError,\n ConflictApiError\n ]\n }\n)\n .middleware(SessionCookieAuth)\n .middleware(SessionMutationAuth)\n\nconst relationshipHistory = HttpApiEndpoint.get(\n \"relationshipHistory\",\n \"/api/v1/relationships/:relationshipId/history\",\n {\n params: { relationshipId: RelationshipId },\n success: RelationshipHistoryInspection,\n error: readErrors\n }\n).middleware(SessionCookieAuth)\n\nconst evidence = HttpApiEndpoint.get(\"evidence\", \"/api/v1/evidence/:evidenceId\", {\n params: { evidenceId: EvidenceId },\n success: EvidenceInspection,\n error: readErrors\n}).middleware(SessionCookieAuth)\n\n/** Authenticated, workspace-safe delivery relationship and evidence inspection. */\nexport class DeliveryGraphApiGroup extends HttpApiGroup.make(\"deliveryGraph\")\n .add(\n workspaceEntityProjections,\n resolveCodeCommitPullRequest,\n workspaceEntity,\n submitClockifyAction,\n releaseSlice,\n repairCandidates,\n repairProposalDraft,\n createRepairProposal,\n listRepairProposals,\n getRepairProposal,\n reviewRepairProposal,\n applyRepairProposal,\n relationship,\n relationshipHistory,\n evidence\n )\n{}\n","import * as Schema from \"effect/Schema\"\nimport { HttpApiEndpoint, HttpApiGroup } from \"effect/unstable/httpapi\"\n\nimport { PluginConnectionId } from \"../domain/identifiers.js\"\nimport { PluginDiffInventoryEntryV1 } from \"../domain/plugins/events.js\"\nimport { Revision, VendorImmutableId } from \"../domain/sourceRevision.js\"\nimport {\n ConflictApiError,\n ForbiddenApiError,\n InvalidRequestApiError,\n NotFoundApiError,\n PayloadTooLargeApiError,\n RateLimitedApiError,\n RequestTimedOutApiError,\n ServiceUnavailableApiError,\n UnauthorizedApiError\n} from \"./errors.js\"\nimport { SessionCookieAuth } from \"./session.js\"\n\nconst MaximumCompleteDiffFiles = 500\n\n/** Lowercase SHA-256 digest of canonical exact-revision diff-file identity. */\nexport const DiffFileAnchor = Schema.String.check(\n Schema.isPattern(/^sha256:[0-9a-f]{64}$/u, { expected: \"a lowercase SHA-256 diff-file anchor\" })\n).pipe(Schema.brand(\"DiffFileAnchor\"))\n\n/** Decoded stable diff-file anchor. */\nexport type DiffFileAnchor = typeof DiffFileAnchor.Type\n\n/** One file from a completely indexed immutable pull-request revision. */\nexport const CompleteDiffInventoryEntry = Schema.Struct({\n ...PluginDiffInventoryEntryV1.fields,\n anchor: DiffFileAnchor\n}).annotate({ identifier: \"CompleteDiffInventoryEntry\" })\n\n/** Decoded complete-inventory entry. */\nexport type CompleteDiffInventoryEntry = typeof CompleteDiffInventoryEntry.Type\n\n/** Complete bounded inventory; `ready` is emitted only after pagination ends. */\nexport const CompleteDiffInventory = Schema.Struct({\n entries: Schema.Array(CompleteDiffInventoryEntry).check(\n Schema.makeFilter((entries) => entries.length <= MaximumCompleteDiffFiles, {\n expected: `at most ${MaximumCompleteDiffFiles} changed files`\n })\n ),\n ready: Schema.Literal(true)\n}).annotate({ identifier: \"CompleteDiffInventory\" })\n\n/** Decoded complete immutable inventory. */\nexport type CompleteDiffInventory = typeof CompleteDiffInventory.Type\n\nconst BoundedOffset = Schema.Int.pipe(\n Schema.check(Schema.isGreaterThanOrEqualTo(0)),\n Schema.check(Schema.isLessThanOrEqualTo(1_048_576))\n)\nconst BoundedLength = Schema.Int.pipe(\n Schema.check(Schema.isBetween({ minimum: 1, maximum: 1_048_576 }))\n)\nconst DiffPath = PluginDiffInventoryEntryV1.fields.path\n\n/** Browser-safe lazy content result for one immutable side and range. */\nexport const CompleteDiffContentRange = Schema.Struct({\n bytesBase64: Schema.NullOr(Schema.String.check(Schema.isMaxLength(1_398_104))),\n totalBytes: Schema.NullOr(Schema.Int.check(Schema.isGreaterThanOrEqualTo(0))),\n unavailableReason: Schema.NullOr(\n Schema.Literals([\"binary\", \"generated\", \"oversized\", \"missing\", \"provider-unavailable\"])\n )\n})\n .check(\n Schema.makeFilter(\n ({ bytesBase64, totalBytes, unavailableReason }) =>\n unavailableReason === null ? bytesBase64 !== null && totalBytes !== null : bytesBase64 === null,\n { expected: \"available bounded content or an explicit unavailable reason\" }\n )\n )\n .annotate({ identifier: \"CompleteDiffContentRange\" })\n\n/** Decoded lazy content response. */\nexport type CompleteDiffContentRange = typeof CompleteDiffContentRange.Type\n\nconst diffReadErrors = [\n InvalidRequestApiError,\n UnauthorizedApiError,\n ForbiddenApiError,\n NotFoundApiError,\n ConflictApiError,\n RateLimitedApiError,\n RequestTimedOutApiError,\n ServiceUnavailableApiError\n]\n\nconst inventory = HttpApiEndpoint.get(\"inventory\", \"/:pluginConnectionId/pull-requests/:vendorImmutableId/inventory\", {\n params: Schema.Struct({ pluginConnectionId: PluginConnectionId, vendorImmutableId: VendorImmutableId }),\n query: Schema.Struct({ revision: Revision }),\n success: CompleteDiffInventory,\n error: diffReadErrors\n}).middleware(SessionCookieAuth)\n\nexport const CompleteDiffContentRequest = Schema.Struct({\n revision: Revision,\n anchor: DiffFileAnchor,\n path: DiffPath,\n previousPath: Schema.NullOr(DiffPath),\n status: PluginDiffInventoryEntryV1.fields.status,\n side: Schema.Literals([\"before\", \"after\"]),\n offset: BoundedOffset,\n length: BoundedLength\n}).annotate({ identifier: \"CompleteDiffContentRequest\" })\n\n/** Decoded bounded content-read payload. */\nexport type CompleteDiffContentRequest = typeof CompleteDiffContentRequest.Type\n\nconst content = HttpApiEndpoint.post(\"content\", \"/:pluginConnectionId/pull-requests/:vendorImmutableId/content\", {\n params: Schema.Struct({ pluginConnectionId: PluginConnectionId, vendorImmutableId: VendorImmutableId }),\n payload: CompleteDiffContentRequest,\n success: CompleteDiffContentRange,\n error: [...diffReadErrors, PayloadTooLargeApiError]\n}).middleware(SessionCookieAuth)\n\n/** Authenticated, workspace-scoped, bounded complete-diff reads. */\nexport class DiffApiGroup extends HttpApiGroup.make(\"diff\").add(inventory).add(content).prefix(\"/api/v1/diffs\") {}\n","import * as Schema from \"effect/Schema\"\nimport { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from \"effect/unstable/httpapi\"\n\nimport { PortfolioInvalidatedEventV1 } from \"../domain/domainEvent.js\"\nimport { EventCursor } from \"../domain/identifiers.js\"\nimport { UtcTimestamp } from \"../domain/utcTimestamp.js\"\nimport {\n ForbiddenApiError,\n InvalidRequestApiError,\n RateLimitedApiError,\n RequestTimedOutApiError,\n ServiceUnavailableApiError,\n UnauthorizedApiError\n} from \"./errors.js\"\nimport { PortfolioSnapshot } from \"./portfolio.js\"\nimport { SessionCookieAuth } from \"./session.js\"\nimport { CanonicalNonNegativeIntegerFromString } from \"./wire.js\"\n\n/** URL/header representation of a nonnegative workspace event cursor. */\nexport const EventCursorFromString = CanonicalNonNegativeIntegerFromString.pipe(Schema.decodeTo(EventCursor))\n\n/** Replay boundary telling a client to replace local state with an authoritative snapshot. */\nexport const StreamResetRequired = Schema.Struct({\n reason: Schema.Literals([\"retention\", \"cursor-ahead\", \"gap\", \"replay-budget\"]),\n requestedCursor: EventCursor,\n headCursor: EventCursor,\n prunedThroughCursor: EventCursor\n}).annotate({ identifier: \"StreamResetRequired\" })\n\n/** Decoded reset instruction carried by the live event stream. */\nexport type StreamResetRequired = typeof StreamResetRequired.Type\n\n/** Keepalive payload that reports the latest durable cursor without advancing EventSource state. */\nexport const StreamHeartbeat = Schema.Struct({\n eventCursor: EventCursor,\n sentAt: UtcTimestamp\n}).annotate({ identifier: \"StreamHeartbeat\" })\n\n/** Decoded keepalive payload carried by the live event stream. */\nexport type StreamHeartbeat = typeof StreamHeartbeat.Type\n\n/** Authoritative portfolio replacement emitted first and after replay reset. */\nexport const PortfolioSnapshotLiveEvent = Schema.Struct({\n id: EventCursorFromString,\n event: Schema.Literal(\"portfolio.snapshot\"),\n data: Schema.fromJsonString(PortfolioSnapshot)\n}).annotate({ identifier: \"PortfolioSnapshotLiveEvent\" })\n\n/** Decoded authoritative portfolio stream event. */\nexport type PortfolioSnapshotLiveEvent = typeof PortfolioSnapshotLiveEvent.Type\n\n/** Durable notification that a browser should refresh its portfolio projection. */\nexport const PortfolioInvalidatedLiveEvent = Schema.Struct({\n id: EventCursorFromString,\n event: Schema.Literal(\"portfolio.invalidated\"),\n data: Schema.fromJsonString(PortfolioInvalidatedEventV1)\n}).annotate({ identifier: \"PortfolioInvalidatedLiveEvent\" })\n\n/** Decoded portfolio invalidation stream event. */\nexport type PortfolioInvalidatedLiveEvent = typeof PortfolioInvalidatedLiveEvent.Type\n\n/** Replay-gap instruction; it deliberately has no SSE ID so it cannot advance resume state. */\nexport const StreamResetRequiredLiveEvent = Schema.Struct({\n id: Schema.optionalKey(Schema.Undefined),\n event: Schema.Literal(\"stream.reset-required\"),\n data: Schema.fromJsonString(StreamResetRequired)\n}).annotate({ identifier: \"StreamResetRequiredLiveEvent\" })\n\n/** Decoded replay-gap stream event. */\nexport type StreamResetRequiredLiveEvent = typeof StreamResetRequiredLiveEvent.Type\n\n/** Keepalive event; it deliberately has no SSE ID so it cannot advance resume state. */\nexport const StreamHeartbeatLiveEvent = Schema.Struct({\n id: Schema.optionalKey(Schema.Undefined),\n event: Schema.Literal(\"stream.heartbeat\"),\n data: Schema.fromJsonString(StreamHeartbeat)\n}).annotate({ identifier: \"StreamHeartbeatLiveEvent\" })\n\n/** Decoded keepalive stream event. */\nexport type StreamHeartbeatLiveEvent = typeof StreamHeartbeatLiveEvent.Type\n\n/** Closed browser-safe union emitted by the authenticated live event stream. */\nexport const ControlCenterLiveEvent = Schema.Union([\n PortfolioSnapshotLiveEvent,\n PortfolioInvalidatedLiveEvent,\n StreamResetRequiredLiveEvent,\n StreamHeartbeatLiveEvent\n]).annotate({ identifier: \"ControlCenterLiveEvent\" })\n\n/** Decoded browser-safe live event. */\nexport type ControlCenterLiveEvent = typeof ControlCenterLiveEvent.Type\n\nconst stream = HttpApiEndpoint.get(\"stream\", \"/api/v1/events\", {\n query: {\n after: Schema.optionalKey(EventCursorFromString)\n },\n headers: {\n \"last-event-id\": Schema.optionalKey(EventCursorFromString)\n },\n success: HttpApiSchema.StreamSse({ events: ControlCenterLiveEvent }),\n error: [\n InvalidRequestApiError,\n UnauthorizedApiError,\n ForbiddenApiError,\n RateLimitedApiError,\n RequestTimedOutApiError,\n ServiceUnavailableApiError\n ]\n}).middleware(SessionCookieAuth)\n\n/** Authenticated resumable stream of workspace-local Control Center events. */\nexport class LiveEventsApiGroup extends HttpApiGroup.make(\"liveEvents\").add(stream) {}\n","import * as Schema from \"effect/Schema\"\nimport { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from \"effect/unstable/httpapi\"\n\nimport {\n CorrelationId,\n ForbiddenApiError,\n NotFoundApiError,\n RequestTimedOutApiError,\n ServiceUnavailableApiError,\n UnauthorizedApiError\n} from \"./errors.js\"\nimport { SessionCookieAuth } from \"./session.js\"\nimport { CanonicalNonNegativeIntegerFromString } from \"./wire.js\"\n\n/** Workspace-scoped opaque media reference that reveals neither provider URLs nor local storage keys. */\nexport const OpaqueMediaId = Schema.String.check(\n Schema.isPattern(/^media_[0-9a-f]{64}$/u, { expected: \"an opaque SHA-256 media identifier\" })\n).pipe(Schema.brand(\"OpaqueMediaId\"))\n\n/** Decoded opaque media identifier. */\nexport type OpaqueMediaId = typeof OpaqueMediaId.Type\n\n/** Closed set of inert raster formats accepted at the authenticated media boundary. */\nexport const SafeMediaContentType = Schema.Literals([\n \"image/avif\",\n \"image/jpeg\",\n \"image/png\",\n \"image/webp\"\n])\n\n/** Decoded safe raster media content type. */\nexport type SafeMediaContentType = typeof SafeMediaContentType.Type\n\n/** Security and metadata headers required on authenticated opaque media responses. */\nexport const MediaResponseHeaders = Schema.Struct({\n \"x-correlation-id\": CorrelationId,\n \"content-type\": SafeMediaContentType,\n \"content-length\": CanonicalNonNegativeIntegerFromString,\n \"cache-control\": Schema.Literal(\"private, no-store\"),\n \"x-content-type-options\": Schema.Literal(\"nosniff\")\n}).annotate({ identifier: \"MediaResponseHeaders\" })\n\n/** Decoded opaque media response headers. */\nexport type MediaResponseHeaders = typeof MediaResponseHeaders.Type\n\nconst read = HttpApiEndpoint.get(\"read\", \"/:mediaId\", {\n params: Schema.Struct({ mediaId: OpaqueMediaId }),\n success: HttpApiSchema.StreamUint8Array({ contentType: \"application/octet-stream\" }),\n error: [\n UnauthorizedApiError,\n ForbiddenApiError,\n NotFoundApiError,\n RequestTimedOutApiError,\n ServiceUnavailableApiError\n ]\n}).middleware(SessionCookieAuth)\n\n/** Authenticated, workspace-resolved opaque media contract. */\nexport class MediaApiGroup extends HttpApiGroup.make(\"media\").add(read).prefix(\"/api/v1/media\") {}\n","import * as Schema from \"effect/Schema\"\nimport { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from \"effect/unstable/httpapi\"\n\nimport { EntityId, PersonId, ShareId, WorkspaceId } from \"../domain/identifiers.js\"\nimport { UtcTimestamp } from \"../domain/utcTimestamp.js\"\nimport { InspectedEntityProjection } from \"./deliveryGraph.js\"\nimport {\n ConflictApiError,\n ForbiddenApiError,\n InvalidRequestApiError,\n NotFoundApiError,\n RequestTimedOutApiError,\n ServiceUnavailableApiError,\n UnauthorizedApiError\n} from \"./errors.js\"\nimport { SessionCookieAuth, SessionMutationAuth } from \"./session.js\"\n\n/** Owner-authored intent for one exact entity share grant. */\nexport const CreateAuthorizedShareRequest = Schema.Struct({\n shareId: ShareId,\n entityId: EntityId,\n granteePersonId: PersonId,\n expiresAt: UtcTimestamp\n})\n\n/** Decoded authorized-share creation request. */\nexport type CreateAuthorizedShareRequest = typeof CreateAuthorizedShareRequest.Type\n\n/** Secret-free grant metadata returned to authenticated callers. */\nexport const AuthorizedShareSummary = Schema.Struct({\n shareId: ShareId,\n entityId: EntityId,\n granteePersonId: PersonId,\n createdAt: UtcTimestamp,\n expiresAt: UtcTimestamp,\n revokedAt: Schema.NullOr(UtcTimestamp)\n}).annotate({ identifier: \"AuthorizedShareSummary\" })\n\n/** Decoded secret-free authorized-share metadata. */\nexport type AuthorizedShareSummary = typeof AuthorizedShareSummary.Type\n\n/** Exact current entity projection resolved without relationships or release context. */\nexport const AuthorizedShareResolution = Schema.Struct({\n share: AuthorizedShareSummary,\n item: InspectedEntityProjection\n}).annotate({ identifier: \"AuthorizedShareResolution\" })\n\n/** Decoded authorized-share resolution. */\nexport type AuthorizedShareResolution = typeof AuthorizedShareResolution.Type\n\nconst authenticatedErrors = [\n UnauthorizedApiError,\n ForbiddenApiError,\n RequestTimedOutApiError,\n ServiceUnavailableApiError\n]\n\nconst create = HttpApiEndpoint.post(\"create\", \"/\", {\n payload: CreateAuthorizedShareRequest,\n success: AuthorizedShareSummary,\n error: [...authenticatedErrors, InvalidRequestApiError, NotFoundApiError, ConflictApiError]\n})\n .middleware(SessionCookieAuth)\n .middleware(SessionMutationAuth)\n\nconst resolve = HttpApiEndpoint.get(\"resolve\", \"/:workspaceId/:shareId\", {\n params: Schema.Struct({ workspaceId: WorkspaceId, shareId: ShareId }),\n success: AuthorizedShareResolution,\n error: [...authenticatedErrors, NotFoundApiError]\n}).middleware(SessionCookieAuth)\n\nconst revoke = HttpApiEndpoint.delete(\"revoke\", \"/:workspaceId/:shareId\", {\n params: Schema.Struct({ workspaceId: WorkspaceId, shareId: ShareId }),\n success: HttpApiSchema.NoContent,\n error: [...authenticatedErrors, NotFoundApiError]\n})\n .middleware(SessionCookieAuth)\n .middleware(SessionMutationAuth)\n\n/** Exact-scope authenticated entity-share contract. */\nexport class SharesApiGroup extends HttpApiGroup.make(\"shares\")\n .add(create, resolve, revoke)\n .prefix(\"/api/v1/shares\")\n{}\n","import * as Schema from \"effect/Schema\"\nimport { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from \"effect/unstable/httpapi\"\n\nimport { TimelineActorKind, TimelineCursor, TimelineEventDetail, TimelinePage } from \"../domain/timeline.js\"\nimport { UtcTimestamp } from \"../domain/utcTimestamp.js\"\nimport {\n ForbiddenApiError,\n InvalidRequestApiError,\n NotFoundApiError,\n RequestTimedOutApiError,\n ServiceUnavailableApiError,\n UnauthorizedApiError\n} from \"./errors.js\"\nimport { SessionCookieAuth } from \"./session.js\"\nimport { CanonicalNonNegativeIntegerFromString } from \"./wire.js\"\n\nconst TimelinePageSizeFromString = CanonicalNonNegativeIntegerFromString.pipe(\n Schema.check(Schema.isGreaterThanOrEqualTo(1), Schema.isLessThanOrEqualTo(100))\n)\n\n/** Hard caller-selected event bound for one Timeline download. */\nexport const TimelineExportLimitFromString = CanonicalNonNegativeIntegerFromString.pipe(\n Schema.check(Schema.isGreaterThanOrEqualTo(1), Schema.isLessThanOrEqualTo(1_000))\n)\n\n/** Content types emitted by the bounded Timeline download endpoints. */\nexport const TimelineExportContentType = Schema.Literals([\n \"application/json; charset=utf-8\",\n \"text/csv; charset=utf-8\"\n])\n\n/** Security, download, and truncation headers on a Timeline export response. */\nexport const TimelineExportResponseHeaders = Schema.Struct({\n \"cache-control\": Schema.Literal(\"private, no-store\"),\n \"content-disposition\": Schema.Literals([\n \"attachment; filename=\\\"timeline-export.csv\\\"\",\n \"attachment; filename=\\\"timeline-export.json\\\"\"\n ]),\n \"content-type\": TimelineExportContentType,\n \"x-content-type-options\": Schema.Literal(\"nosniff\"),\n \"x-timeline-export-count\": CanonicalNonNegativeIntegerFromString,\n \"x-timeline-export-limit\": TimelineExportLimitFromString,\n \"x-timeline-export-truncated\": Schema.Literals([\"false\", \"true\"])\n}).annotate({ identifier: \"TimelineExportResponseHeaders\" })\n\nconst exportQuery = {\n actor: Schema.optionalKey(TimelineActorKind),\n from: Schema.optionalKey(UtcTimestamp),\n limit: TimelineExportLimitFromString,\n to: Schema.optionalKey(UtcTimestamp)\n}\n\nconst timelineErrors: readonly [\n typeof InvalidRequestApiError,\n typeof UnauthorizedApiError,\n typeof ForbiddenApiError,\n typeof RequestTimedOutApiError,\n typeof ServiceUnavailableApiError\n] = [\n InvalidRequestApiError,\n UnauthorizedApiError,\n ForbiddenApiError,\n RequestTimedOutApiError,\n ServiceUnavailableApiError\n]\n\nconst page = HttpApiEndpoint.get(\"page\", \"/api/v1/timeline\", {\n query: {\n actor: Schema.optionalKey(TimelineActorKind),\n beforeEventKey: Schema.optionalKey(Schema.String.check(Schema.isNonEmpty(), Schema.isMaxLength(1_024))),\n beforeOccurredAt: Schema.optionalKey(UtcTimestamp),\n from: Schema.optionalKey(UtcTimestamp),\n limit: Schema.optionalKey(TimelinePageSizeFromString),\n to: Schema.optionalKey(UtcTimestamp)\n },\n success: TimelinePage,\n error: timelineErrors\n}).middleware(SessionCookieAuth)\n\nconst detail = HttpApiEndpoint.get(\"detail\", \"/api/v1/timeline/events/:eventKey\", {\n params: { eventKey: TimelineCursor.fields.eventKey },\n success: TimelineEventDetail,\n error: [\n InvalidRequestApiError,\n UnauthorizedApiError,\n ForbiddenApiError,\n NotFoundApiError,\n RequestTimedOutApiError,\n ServiceUnavailableApiError\n ]\n}).middleware(SessionCookieAuth)\n\nconst exportCsv = HttpApiEndpoint.get(\"exportCsv\", \"/api/v1/timeline/export.csv\", {\n query: exportQuery,\n success: HttpApiSchema.StreamUint8Array({ contentType: \"text/csv; charset=utf-8\" }),\n error: timelineErrors\n}).middleware(SessionCookieAuth)\n\nconst exportJson = HttpApiEndpoint.get(\"exportJson\", \"/api/v1/timeline/export.json\", {\n query: exportQuery,\n success: HttpApiSchema.StreamUint8Array({ contentType: \"application/json; charset=utf-8\" }),\n error: timelineErrors\n}).middleware(SessionCookieAuth)\n\n/** Authenticated, workspace-scoped durable activity Timeline. */\nexport class TimelineApiGroup extends HttpApiGroup.make(\"timeline\")\n .add(page)\n .add(detail)\n .add(exportCsv)\n .add(exportJson)\n{}\n","import * as Schema from \"effect/Schema\"\nimport { HttpApiEndpoint, HttpApiGroup } from \"effect/unstable/httpapi\"\n\nimport { PersonId, WorkspaceId, WorkspaceSettingsMutationId } from \"../domain/identifiers.js\"\nimport { UtcTimestamp } from \"../domain/utcTimestamp.js\"\nimport { GovernedWorkspaceSettingsSections, WorkspaceSettingsV1 } from \"../domain/workspaceSettings.js\"\nimport {\n ConflictApiError,\n ForbiddenApiError,\n InvalidRequestApiError,\n RequestTimedOutApiError,\n ServiceUnavailableApiError,\n UnauthorizedApiError\n} from \"./errors.js\"\nimport { SessionCookieAuth, SessionMutationAuth } from \"./session.js\"\n\n/** Positive optimistic-concurrency revision of the workspace settings aggregate. */\nexport const WorkspaceSettingsRevision = Schema.Int.check(\n Schema.isGreaterThan(0)\n).pipe(Schema.brand(\"WorkspaceSettingsRevision\"))\n\n/** Decoded workspace-settings revision. */\nexport type WorkspaceSettingsRevision = typeof WorkspaceSettingsRevision.Type\n\n/** Strong browser-visible validator for one exact settings revision. */\nexport const WorkspaceSettingsEtag = Schema.String.check(\n Schema.isPattern(/^\"workspace-settings-v1-[1-9][0-9]*\"$/u, {\n expected: \"a strong version-one workspace-settings ETag\"\n })\n).pipe(Schema.brand(\"WorkspaceSettingsEtag\"))\n\n/** Decoded workspace-settings ETag. */\nexport type WorkspaceSettingsEtag = typeof WorkspaceSettingsEtag.Type\n\n/** Construct the strong validator returned with one settings revision. */\nexport const workspaceSettingsEtag = (\n revision: WorkspaceSettingsRevision\n): WorkspaceSettingsEtag => WorkspaceSettingsEtag.make(`\"workspace-settings-v1-${String(revision)}\"`)\n\n/** Server-authoritative settings document returned to authenticated workspace sessions. */\nexport const WorkspaceSettingsReadModel = Schema.Struct({\n workspaceId: WorkspaceId,\n revision: WorkspaceSettingsRevision,\n etag: WorkspaceSettingsEtag,\n settings: WorkspaceSettingsV1,\n createdAt: UtcTimestamp,\n updatedAt: UtcTimestamp,\n updatedByPersonId: Schema.NullOr(PersonId)\n}).annotate({ identifier: \"WorkspaceSettingsReadModel\" })\n\n/** Decoded workspace-settings read model. */\nexport type WorkspaceSettingsReadModel = typeof WorkspaceSettingsReadModel.Type\n\n/** Safe workspace presentation defaults shared with every authenticated collaborator. */\nexport const WorkspacePresentationReadModel = Schema.Struct({\n workspaceId: WorkspaceId,\n revision: WorkspaceSettingsRevision,\n presentation: WorkspaceSettingsV1.fields.presentation\n}).annotate({ identifier: \"WorkspacePresentationReadModel\" })\n\n/** Decoded collaborator-safe workspace presentation projection. */\nexport type WorkspacePresentationReadModel = typeof WorkspacePresentationReadModel.Type\n\n/** Complete compare-and-swap replacement of one workspace settings document. */\nexport const UpdateWorkspaceSettingsRequest = Schema.Struct({\n mutationId: WorkspaceSettingsMutationId,\n expectedRevision: WorkspaceSettingsRevision,\n settings: WorkspaceSettingsV1,\n acknowledgedGovernedSections: GovernedWorkspaceSettingsSections\n}).annotate({ identifier: \"UpdateWorkspaceSettingsRequest\" })\n\n/** Decoded workspace-settings replacement request. */\nexport type UpdateWorkspaceSettingsRequest = typeof UpdateWorkspaceSettingsRequest.Type\n\nconst authenticatedErrors = [\n UnauthorizedApiError,\n ForbiddenApiError,\n RequestTimedOutApiError,\n ServiceUnavailableApiError\n]\n\nconst read = HttpApiEndpoint.get(\"read\", \"/\", {\n success: WorkspaceSettingsReadModel,\n error: authenticatedErrors\n}).middleware(SessionCookieAuth)\n\nconst readPresentation = HttpApiEndpoint.get(\"readPresentation\", \"/presentation\", {\n success: WorkspacePresentationReadModel,\n error: authenticatedErrors\n}).middleware(SessionCookieAuth)\n\nconst update = HttpApiEndpoint.put(\"update\", \"/\", {\n payload: UpdateWorkspaceSettingsRequest,\n success: WorkspaceSettingsReadModel,\n error: [...authenticatedErrors, InvalidRequestApiError, ConflictApiError]\n})\n .middleware(SessionCookieAuth)\n .middleware(SessionMutationAuth)\n\n/** Authenticated workspace settings read and concurrency-safe mutation contract. */\nexport class WorkspaceSettingsApiGroup extends HttpApiGroup.make(\"workspaceSettings\")\n .add(read, readPresentation, update)\n .prefix(\"/api/v1/settings\")\n{}\n","import { HttpApi } from \"effect/unstable/httpapi\"\n\nimport { AgentApiGroup } from \"./agent.js\"\nimport { CodePipelineApiGroup } from \"./codepipeline.js\"\nimport { DeliveryGraphApiGroup } from \"./deliveryGraph.js\"\nimport { DiffApiGroup } from \"./diff.js\"\nimport { LiveEventsApiGroup } from \"./liveEvents.js\"\nimport { MediaApiGroup } from \"./media.js\"\nimport { PluginsApiGroup } from \"./plugins.js\"\nimport { PortfolioApiGroup } from \"./portfolio.js\"\nimport { SessionApiGroup } from \"./session.js\"\nimport { SharesApiGroup } from \"./shares.js\"\nimport { TimelineApiGroup } from \"./timeline.js\"\nimport { WorkspaceSettingsApiGroup } from \"./workspaceSettings.js\"\n\n/** Browser-safe authenticated HTTP contract shared by the generated client and server implementation. */\nexport class ControlCenterApi extends HttpApi.make(\"ControlCenterApi\")\n .add(SessionApiGroup)\n .add(SharesApiGroup)\n .add(PluginsApiGroup)\n .add(PortfolioApiGroup)\n .add(DeliveryGraphApiGroup)\n .add(DiffApiGroup)\n .add(CodePipelineApiGroup)\n .add(MediaApiGroup)\n .add(LiveEventsApiGroup)\n .add(TimelineApiGroup)\n .add(WorkspaceSettingsApiGroup)\n .add(AgentApiGroup)\n{}\n"],"mappings":";;;;;;;;;;AAqBA,IAAa,6BAA6B,SAAO,OAAO;CACtD,oBAAoB;CACpB,SAAS;AACX,CAAC;;AAGD,IAAa,kCAAkC,SAAO,OAAO;CAC3D,oBAAoB;CACpB,SAAS;AACX,CAAC;AAED,IAAM,eAAa;CACjB;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,IAAM,OAAO,gBAAgB,KAAK,QAAQ,SAAS;CACjD,SAAS;CACT,SAAS;CACT,OAAO;AACT,CAAC,CAAC,CAAC,WAAW,iBAAiB;AAE/B,IAAM,gBAAgB,SAAO,WAAW,KACtC,cAAc,aAAa,EAAE,aAAa,2BAA2B,CAAC,CACxE;AACA,IAAM,WAAW,gBAAgB,KAAK,YAAY,aAAa;CAC7D,SAAS;CACT,SAAS;EACP;EACA,cAAc,KAAK,cAAc,OAAO,GAAG,CAAC;EAC5C,cAAc,KAAK,cAAc,OAAO,GAAG,CAAC;CAC9C;CACA,OAAO;AACT,CAAC,CAAC,CAAC,WAAW,iBAAiB;;AAG/B,IAAa,uBAAb,cAA0C,aAAa,KAAK,cAAc,CAAC,CACxE,IAAI,IAAI,CAAC,CACT,IAAI,QAAQ,CAAC,CACb,OAAO,sBAAsB,CAAC,CACjC,CAAC;;;;;;;;;;;;;;;;;;;;;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;CAC1D,YAAY;CACZ,kBAAkB;CAClB,UAAU;CACV,8BAA8B;AAChC,CAAC,CAAC,CAAC,SAAS,EAAE,YAAY,iCAAiC,CAAC;AAK5D,IAAM,sBAAsB;CAC1B;CACA;CACA;CACA;AACF;AAEA,IAAM,OAAO,gBAAgB,IAAI,QAAQ,KAAK;CAC5C,SAAS;CACT,OAAO;AACT,CAAC,CAAC,CAAC,WAAW,iBAAiB;AAE/B,IAAM,mBAAmB,gBAAgB,IAAI,oBAAoB,iBAAiB;CAChF,SAAS;CACT,OAAO;AACT,CAAC,CAAC,CAAC,WAAW,iBAAiB;AAE/B,IAAM,SAAS,gBAAgB,IAAI,UAAU,KAAK;CAChD,SAAS;CACT,SAAS;CACT,OAAO;EAAC,GAAG;EAAqB;EAAwB;CAAgB;AAC1E,CAAC,CAAC,CACC,WAAW,iBAAiB,CAAC,CAC7B,WAAW,mBAAmB;;AAGjC,IAAa,4BAAb,cAA+C,aAAa,KAAK,mBAAmB,CAAC,CAClF,IAAI,MAAM,kBAAkB,MAAM,CAAC,CACnC,OAAO,kBAAkB,CAAC,CAC7B,CAAC;;;;ACvFD,IAAa,mBAAb,cAAsC,QAAQ,KAAK,kBAAkB,CAAC,CACnE,IAAI,eAAe,CAAC,CACpB,IAAI,cAAc,CAAC,CACnB,IAAI,eAAe,CAAC,CACpB,IAAI,iBAAiB,CAAC,CACtB,IAAI,qBAAqB,CAAC,CAC1B,IAAI,YAAY,CAAC,CACjB,IAAI,oBAAoB,CAAC,CACzB,IAAI,aAAa,CAAC,CAClB,IAAI,kBAAkB,CAAC,CACvB,IAAI,gBAAgB,CAAC,CACrB,IAAI,yBAAyB,CAAC,CAC9B,IAAI,aAAa,CAAC,CACrB,CAAC"}
@@ -2,7 +2,7 @@ import { $ as NormalizedPageContent, $n as PrReviewSuggestionEdit, $r as Governe
2
2
  import { $ as SourceRevision, A as DiffInventoryPageRequestV1, At as ShareId, B as PluginRelativePathV1, C as PluginProviderReceiptV1, Ct as RelationshipRepairProposalId, D as DiffContentRangeRequestV1, Dt as ReviewSuggestionPublicationReservationId, E as ReadyPluginActionPreflightV1, Et as ReviewCommandArtifactId, F as PluginDiffInventoryEntryV1, G as MaximumPluginDescriptorBytes, H as PluginSyncRequestV1, I as PluginEntityReferenceV1, J as PluginPayloadJson, K as MaximumPluginPayloadBytes, L as PluginEntityType, M as DiffInventoryPageV1, Mt as WorkspaceSettingsMutationId, N as NormalizedPluginEventV1, Nt as UtcTimestamp, O as DiffContentRangeRequestV2, Ot as RoleAssignmentId, P as PluginCheckpointV1, Q as Revision, R as PluginEventId, S as PluginProviderOperationId, St as RelationshipId, T as ProposePluginActionRequestV1, Tt as ReleaseId, U as ReadPluginEntityRequestV1, V as PluginSyncPageV1, W as ReadPluginEntityResultV1, X as NormalizationSchemaVersion, Y as hasMaximumPluginJsonBytes, Z as ProviderId, _ as PluginActionPreflightV1, _t as PersonId, a as PluginConfigurationFieldV1, at as EntityId, b as PluginActionReconciliationRequestV1, bt as ProviderAccountId, c as SemanticVersion, ct as EvidenceClaimId, d as PluginAcceptedProviderReceiptV1, dt as GovernedActionAttemptId, et as SourceUrl, f as PluginActionActorIdentityV1, ft as GovernedActionAuthorizationId, g as PluginActionPayloadDigest, gt as JobId, h as PluginActionDispatchResultV1, ht as GraphNodeId, i as PluginCapabilityOfferV1, it as DomainEventId, j as DiffInventoryPageRequestV2, jt as WorkspaceId, k as DiffContentRangeV1, kt as SessionId, l as AuthorizedPluginActionV1, lt as EvidenceId, m as PluginActionCancellationResultV1, mt as GovernedActionTransitionId, n as NegotiatedPluginDescriptorV1, nt as AgentId, o as PluginDescriptorV1, ot as EnvironmentId, p as PluginActionCancellationRequestV1, pt as GovernedActionId, q as MaximumPluginSyncPageBytes, r as PluginCapabilityId, rt as AgentThreadId, s as PluginId, st as EventCursor, t as NegotiatedPluginCapabilityV1, tt as VendorImmutableId, u as BlockedPluginActionPreflightV1, ut as FollowedResourceId, v as PluginActionProposalV1, vt as PluginConnectionId, w as PluginTerminalProviderReceiptV1, wt as RelationshipRepairReviewId, x as PluginActionReconciliationResultV1, xt as ReadinessAssessmentId, y as PluginActionReconciliationKey, yt as PrReviewSuggestionRevisionId, z as PluginPageCursorV1 } from "./assets/descriptor-DQy34_YW.js";
3
3
  import { $t as PluginSynchronizationState, A as PullRequestReviewState, An as UnauthorizedApiError, At as OpaqueSecretReference, B as ReleaseAgentThreadPage, Bt as PluginConnectionIdentity, C as PublishedReviewComment, Cn as ForbiddenApiError, Ct as CreatePluginConnectionResponse, D as PullRequestReviewNotStarted, Dn as RateLimitedApiError, Dt as DiscoveredAtlassianProfile, E as PullRequestReviewInterrupted, En as PayloadTooLargeApiError, Et as CreatePluginConnectionsResponse, F as ReleaseAgentProvider, Ft as PluginConfiguration, Gt as PluginCredentialReplacement, H as ReleaseAgentTurnResponse, Ht as PluginConnectionSetupFailureClass, I as ReleaseAgentThreadCursor, It as PluginConfigurationKey, J as ReviewSuggestionPublicationPreview, Jt as PluginOverviewResponse, K as ReviewSuggestionPublicationContent, Kt as PluginHealthResponse, L as ReleaseAgentThreadCursorFromString, Lt as PluginConfigurationMetadata, M as PullRequestReviewThreadPage, Mt as PatchProviderAccountRequest, N as PullRequestReviewUnavailable, Nt as PluginAdministrationDiagnostic, O as PullRequestReviewPending, On as RequestTimedOutApiError, Ot as DiscoveredAwsProfile, P as ReleaseAgentHistoryMessage, Pt as PluginAdministrationDiagnosticSeverity, Q as ReviewSuggestionRevisionSequenceFromString, Qt as PluginSynchronizationSchedule, R as ReleaseAgentThreadEvent, Rt as PluginConfigurationPatchValue, S as PublishReviewSuggestionRequest, Sn as CorrelationResponseHeaders, St as CreatePluginConnectionRequest, T as PullRequestReviewFailed, Tn as NotFoundApiError, Tt as CreatePluginConnectionsRequest, U as ReviewAgentProfile, Ut as PluginConnectionSummary, V as ReleaseAgentTurnRequest, Vt as PluginConnectionPermission, W as ReviewAgentProfileId, Wt as PluginConnectionTestResult, X as ReviewSuggestionRevisionPage, Xt as PluginServiceCatalogField, Y as ReviewSuggestionPublicationSelection, Yt as PluginServiceCatalogEntry, Z as ReviewSuggestionRevisionPageSizeFromString, Zt as PluginSynchronizationResult, _ as EnqueuePullRequestReviewResponse, _n as SessionListResponse, _t as AwsResourceDiscoveryResponse, a as AgentProvider, an as BrowserPairingPermission, at as PortfolioReleaseSummary, bn as ConflictApiError, bt as CreateAtlassianOAuthGrantRequest, c as AgentProviderCatalogEntry, cn as CurrentSessionResponse, ct as AtlassianOAuthGrantExchangeResponse, d as AwsReviewPublicationIdentity, dn as MutationCsrf, dt as AtlassianOAuthProvider, en as PluginsApiGroup, et as PortfolioApiGroup, fn as PairSessionRequest, ft as AtlassianOAuthProviderIntent, g as EnqueuePullRequestReviewRequest, gn as SessionCookieAuth, gt as AwsResourceDiscoveryRequest, h as EditReviewSuggestionResponse, hn as SessionApiGroup, ht as AwsProfileDiscoveryResponse, i as AgentPrompt, in as SetPluginConnectionEnabledRequest, it as PortfolioReleaseRole, j as PullRequestReviewThreadEvent, jt as PatchPluginConfigurationRequest, kn as ServiceUnavailableApiError, kt as ExchangeAtlassianOAuthGrantRequest, l as AgentProviderHealth, ln as IssueBrowserPairingCodeRequest, lt as AtlassianOAuthGrantId, m as EditReviewSuggestionRequest, mn as PairingCode, mt as AtlassianProfileDiscoveryResponse, n as AgentHistoryMessage, nn as RedactedPluginConfigurationValue, nt as PortfolioRelationshipCounts, o as AgentProviderCapability, on as CsrfToken, ot as PortfolioSnapshot, p as DurableAgentProviderId, pn as PairSessionResponse, pt as AtlassianOAuthSite, q as ReviewSuggestionPublicationOperation, qt as PluginListResponse, r as AgentModelId, rn as RevokePluginConnectionRequest, rt as PortfolioReleaseCollaborator, s as AgentProviderCatalog, sn as CurrentSession, st as AtlassianOAuthClientConfiguration, t as AgentApiGroup, tn as ReauthorizePluginConnectionRequest, tt as PortfolioReadinessSummary, u as AgentSafeProfile, un as IssueBrowserPairingCodeResponse, ut as AtlassianOAuthGrantStartResponse, v as EnqueueReleaseAgentJobRequest, vn as SessionMutationAuth, vt as AwsServiceResourceDiscovery, w as PullRequestReviewCompleted, wn as InvalidRequestApiError, wt as CreatePluginConnectionValue, x as MAXIMUM_REVIEW_THREAD_PROMPT_LENGTH, xn as CorrelationId, xt as CreatePluginConnectionBatchResult, y as EnqueueReleaseAgentJobResponse, yn as SessionSummary, yt as CompleteAtlassianOAuthGrantRequest, z as ReleaseAgentThreadEventLimitFromString, zt as PluginConnectionAdministration } from "./assets/agent-o4yHf4nS.js";
4
4
  import { a as PluginPipelineLogPageRequestV1, c as PluginDiscoveryV1, i as PluginPipelineLogEventV1, n as PluginPipelineArtifactRangeRequestV1, o as PluginPipelineLogPageV1, r as PluginPipelineArtifactRangeV1, s as PluginDiscoveryEndpointV1, t as PluginPipelineActionReferenceV1 } from "./assets/plugins-k_lxiDeA.js";
5
- import { A as CompleteDiffContentRange, B as RelationshipHistoryInspection, C as LiveEventsApiGroup, D as StreamHeartbeatLiveEvent, E as StreamHeartbeat, F as DiffFileAnchor, G as WorkspaceEntityActivity, H as RelationshipRepairCandidates, I as CreateRelationshipRepairProposalRequest, K as WorkspaceEntityGraph, L as DeliveryGraphApiGroup, M as CompleteDiffInventory, N as CompleteDiffInventoryEntry, O as StreamResetRequired, P as DiffApiGroup, R as EvidenceInspection, S as EventCursorFromString, T as PortfolioSnapshotLiveEvent, U as RelationshipRepairProposalDraft, V as RelationshipRepairCandidate, W as ReleaseDeliveryGraphInspection, _ as MediaApiGroup, a as WorkspaceSettingsEtag, b as SafeMediaContentType, c as workspaceSettingsEtag, d as TimelineExportLimitFromString, f as TimelineExportResponseHeaders, g as SharesApiGroup, h as CreateAuthorizedShareRequest, i as WorkspaceSettingsApiGroup, it as CodePipelineLogReadRequest, j as CompleteDiffContentRequest, k as StreamResetRequiredLiveEvent, l as TimelineApiGroup, m as AuthorizedShareSummary, n as UpdateWorkspaceSettingsRequest, nt as CodePipelineApiGroup, o as WorkspaceSettingsReadModel, p as AuthorizedShareResolution, q as WorkspaceEntityInspection, r as WorkspacePresentationReadModel, rt as CodePipelineArtifactReadRequest, s as WorkspaceSettingsRevision, t as ControlCenterApi, u as TimelineExportContentType, v as MediaResponseHeaders, w as PortfolioInvalidatedLiveEvent, x as ControlCenterLiveEvent, y as OpaqueMediaId, z as InspectedEntityProjection } from "./assets/controlCenterApi-BcVWTP9F.js";
5
+ import { A as CompleteDiffContentRange, B as RelationshipHistoryInspection, C as LiveEventsApiGroup, D as StreamHeartbeatLiveEvent, E as StreamHeartbeat, F as DiffFileAnchor, G as WorkspaceEntityActivity, H as RelationshipRepairCandidates, I as CreateRelationshipRepairProposalRequest, K as WorkspaceEntityGraph, L as DeliveryGraphApiGroup, M as CompleteDiffInventory, N as CompleteDiffInventoryEntry, O as StreamResetRequired, P as DiffApiGroup, R as EvidenceInspection, S as EventCursorFromString, T as PortfolioSnapshotLiveEvent, U as RelationshipRepairProposalDraft, V as RelationshipRepairCandidate, W as ReleaseDeliveryGraphInspection, _ as MediaApiGroup, a as WorkspaceSettingsEtag, b as SafeMediaContentType, c as workspaceSettingsEtag, d as TimelineExportLimitFromString, f as TimelineExportResponseHeaders, g as SharesApiGroup, h as CreateAuthorizedShareRequest, i as WorkspaceSettingsApiGroup, it as CodePipelineLogReadRequest, j as CompleteDiffContentRequest, k as StreamResetRequiredLiveEvent, l as TimelineApiGroup, m as AuthorizedShareSummary, n as UpdateWorkspaceSettingsRequest, nt as CodePipelineApiGroup, o as WorkspaceSettingsReadModel, p as AuthorizedShareResolution, q as WorkspaceEntityInspection, r as WorkspacePresentationReadModel, rt as CodePipelineArtifactReadRequest, s as WorkspaceSettingsRevision, t as ControlCenterApi, u as TimelineExportContentType, v as MediaResponseHeaders, w as PortfolioInvalidatedLiveEvent, x as ControlCenterLiveEvent, y as OpaqueMediaId, z as InspectedEntityProjection } from "./assets/controlCenterApi-WaKi6EUb.js";
6
6
  import { makeControlCenterApiClient, makeControlCenterApiUrls } from "./api/index.js";
7
7
  import { a as ReleaseReadinessCandidateMaterial, c as normalizeReadinessRuleMaterial, d as AuthorizedShareTarget, i as ReadinessRuleMaterial, l as normalizeReleaseReadinessCandidateMaterial, n as summarizeEnvironmentReadiness, o as ReleaseReadinessChildMaterial, r as EnvironmentReadinessCandidateMaterial, s as normalizeEnvironmentReadinessCandidateMaterial, t as rollUpReleaseReadiness, u as AuthorizedShareGrant } from "./assets/readiness-BsuNI9Du.js";
8
8
  import { n as firstPartyServiceIdentities, r as firstPartyServiceIdentityByProvider, t as FirstPartyServiceIdentity } from "./assets/firstPartyServices-xzN6J3zg.js";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { _t as PersonId, jt as WorkspaceId } from "../assets/descriptor-DQy34_YW.js";
3
3
  import { a as AgentProvider, r as AgentModelId } from "../assets/agent-o4yHf4nS.js";
4
- import { Br as terminalRecoveryLayer, Cr as decodeOperationalDataPaths, Dr as syncDataRootPath, Er as publishFreshDataRootClaim, Lr as MINIMUM_PR_REVIEW_BUDGET_MILLIS, Qn as ControlCenterBootstrap, Sr as decodeControlCenterDataPaths, Tr as publishDataRootMarker, a as decodeBindConfig, ar as restoreBackup, ei as layer, gr as DATA_ROOT_MARKER_NAME, l as makeControlCenterServer, or as verifyBackup, rr as createOfflineVerifiedBackup, vr as DATA_ROOT_MARKER_V2_PREFIX, wr as inspectFreshDataRootClaim, xn as ServerLifecycle, xr as boundDataRootMarkerContent, yr as DATA_ROOT_PENDING_MARKER_PREFIX, zr as TerminalRecovery } from "../assets/BindConfig-hNWrGfu2.js";
4
+ import { Br as terminalRecoveryLayer, Cr as decodeOperationalDataPaths, Dr as syncDataRootPath, Er as publishFreshDataRootClaim, Lr as MINIMUM_PR_REVIEW_BUDGET_MILLIS, Qn as ControlCenterBootstrap, Sr as decodeControlCenterDataPaths, Tr as publishDataRootMarker, a as decodeBindConfig, ar as restoreBackup, ei as layer, gr as DATA_ROOT_MARKER_NAME, l as makeControlCenterServer, or as verifyBackup, rr as createOfflineVerifiedBackup, vr as DATA_ROOT_MARKER_V2_PREFIX, wr as inspectFreshDataRootClaim, xn as ServerLifecycle, xr as boundDataRootMarkerContent, yr as DATA_ROOT_PENDING_MARKER_PREFIX, zr as TerminalRecovery } from "../assets/BindConfig-BG-FGtB5.js";
5
5
  import { Dr as PersistenceConfigError, Ut as AgentLeaseOwner, gr as validateExistingControlCenterDatabase, sr as WorkspaceName, wr as DatabaseInitializationError } from "../assets/relationshipInferenceMaterialization-C9yhjFww.js";
6
6
  import * as Effect from "effect/Effect";
7
7
  import * as Schema from "effect/Schema";
@@ -1,5 +1,5 @@
1
1
  import { kt as SessionId } from "../assets/descriptor-DQy34_YW.js";
2
- import { $ as deliveryGraphInspectionLayer, $n as controlCenterBootstrapLayer, $r as TerminalRecoveryRefusedError, $t as authorizePairingRequest, A as makeTimelineExportAudits, An as PrReviewSandboxTools, Ar as makeSecretStore, At as listPluginConnectionSummaries, B as releaseAgentJobsUnavailableLayer, Bn as prReviewSandboxToolsLayer, Br as terminalRecoveryLayer, Bt as JiraReadPluginConfiguration, C as staticApplicationWithAssetsLayer, Cn as AgentJobWorker, Ct as DEFAULT_MAXIMUM_LIVE_STREAMS, D as makeStaticAssetStore, Dn as PrReviewCommandArtifactId, Dt as releasePublicationSubmissionsLayer, E as StaticAssetStoreError, En as prReviewAgentJobWorkerLayer, Et as LiveStreamAdmissionExceeded, F as synchronizeFakeRelease, Fn as ReviewReadFile, Fr as SecretTooLargeError, Ft as pluginAdministrationLayerWithConnections, G as relationshipRepairProposalsLayer, Gn as PLUGIN_RETRY_MAX_DELAY_MILLIS, Gr as SESSION_ABSOLUTE_LIFETIME_DAYS, Gt as ClockifyReadPluginConfiguration, H as releaseAgentTurnsLayer, Hn as PLUGIN_OPERATION_MAX_ATTEMPTS, Hr as PairingCodeId, Ht as makeJiraReadPluginRuntime, I as synchronizeFakeReleaseFromMap, In as ReviewRunCommand, Ir as secretStoreIoError, It as pluginAdministrationOAuthLayer, J as portfolioSnapshotsLayer, Jn as retryPluginStream, Jr as AuthCryptoError, Jt as makeClockifyReadPluginRuntime, K as pullRequestReviewsLayer, Kn as isPluginFailureRetryable, Kr as SESSION_IDLE_LIFETIME_HOURS, Kt as clockifyReadOnlyPluginDescriptor, L as makeReleaseAgentJobs, Ln as ReviewSearchArtifact, Lt as pluginAdministrationOAuthLayerWithConnections, M as reconcileFakeReleaseProjection, Mn as ReviewListFiles, Mr as SecretProtectionError, Mt as makePluginAdministrationWithConnections, N as reconcileFakeReleaseSyncAttempts, Nn as ReviewPageArtifact, Nr as SecretStoreInputError, Nt as makePluginAdministrationWithOAuth, O as makeWorkspaceSettingsAdministration, On as PrReviewSandboxSessionError, Or as SecretRoot, Ot as releasePublicationSubmissionsUnavailableLayer, P as recoverFakeReleaseProjection, Pn as ReviewReadDiff, Pr as SecretStoreIoError, Pt as pluginAdministrationLayer, Q as makeLiveEvents, Qn as ControlCenterBootstrap, Qr as FirstRunPairingAlreadyIssuedError, Qt as PluginConnectionMap, R as releaseAgentJobsLayer, Rn as ReviewSearchFiles, Rr as TERMINAL_RECOVERY_CONFIRMATION, Rt as mapPersistenceReadError, S as staticApplicationLayer, Sn as ApiBindConfiguration, St as controlCenterApiMiddlewareLayer, T as StaticAssetStore, Tn as agentJobWorkerWithPrReviewLayer, Tt as LiveStreamAdmission, U as releaseAgentUnavailableLayer, Un as PLUGIN_RATE_LIMIT_MAX_DELAY_MILLIS, Ur as PairingCodeSummary, Ut as makeJiraReadPluginRuntimeFromProvider, V as makeReleaseAgentTurns, Vn as CodeCommitPluginDefinition, Vr as PAIRING_CODE_LIFETIME_MINUTES, Vt as jiraReadPluginDescriptor, W as makeRelationshipRepairProposals, Wn as PLUGIN_RETRY_BASE_DELAY_MILLIS, Wr as PairingPurpose, Wt as CodePipelinePluginDefinition, X as mediaReadsLayer, Xn as agentProviderRuntimeRegistryLayer, Xr as AuthPersistenceError, Xt as clockifyActionSubmissionsLayer, Y as makeMediaReads, Yn as AgentRuntimeRegistry, Yr as AuthPermissionDeniedError, Yt as makeClockifyReadPluginRuntimeFromProvider, Z as liveEventsLayer, Zn as agentRuntimeRegistryLayer, Zr as CredentialRejectedError, Zt as clockifyActionSubmissionsUnavailableLayer, _ as prReviewWorkerStartupLayer, _n as hashCsrfToken, _t as HttpByteLimit, a as decodeBindConfig, an as withCorrelationResponse, ar as restoreBackup, at as codePipelineReadsLayer, b as controlCenterTransportProtocol, bn as ServerDraining, bt as controlCenterApiLayer, c as makeControlCenterApplication, cn as InsecureLanCapability, cr as BackupBlobEntryV1, ct as makeAuthorizedShares, d as ReleaseSynchronizationStartup, dn as authorizeAuthenticatedMutation, dr as BackupId, dt as requestRateLimiterLayer, en as mutationCsrfLayer, er as makeControlCenterBootstrap, et as makeDeliveryGraphInspection, f as ReleaseSynchronizationStartupConfigurationError, fn as authorizeAuthenticatedRead, fr as BackupManifestJsonV1, ft as securityHeaders, g as PrReviewWorkerStartup, gn as effectiveRequestAuthority, gt as DEFAULT_HTTP_SECURITY_LIMITS, h as PrReviewWorkerRunning, hn as authorizeRequest, ht as limitRequestBodyStream, i as TransportPolicy, in as provideCurrentRequest, ir as createVerifiedBackup, it as makeCompleteDiffReads, j as timelineExportAuditsLayer, jn as ReviewApplyPatch, jr as SecretNotFoundError, jt as makePluginAdministration, k as workspaceSettingsAdministrationLayer, kn as PrReviewSandboxSessions, kr as SecretStore, kt as listFirstPartyServiceMetadata, l as makeControlCenterServer, ln as RequestAccess, lr as BackupBoundaryV1, lt as requestBoundaryLayer, m as releaseSynchronizationStartupLayer, mn as authorizeInsecureLanCapability, mr as ReproducibleBlobGap, mt as authorizeRequestBody, n as BindConfigError, nn as CurrentRequestContext, nr as authLayer, nt as timelineReadsLayer, o as effectiveReachableUrls, on as CsrfDigest, or as verifyBackup, ot as makeCodePipelineReads, p as releaseIdFromStartupState, pn as authorizeAuthenticatedReadPost, pr as BackupManifestV1, pt as RequestBodyPolicyError, q as makePortfolioSnapshots, qn as retryPluginOperation, qr as SessionSummary, qt as clockifyReadPluginDescriptor, r as DirectTlsMaterial, rn as makeCurrentRequestContext, rr as createOfflineVerifiedBackup, rt as completeDiffReadsLayer, s as PrReviewWorkerConfigurationError, sn as CsrfToken, sr as BackupBlobCountsV1, st as authorizedSharesLayer, t as BindConfig, tn as sessionCookieAuthLayer, tr as Auth, tt as makeTimelineReads, u as requestUrlBoundaryLayer, un as RequestSecurityError, ur as BackupDatabaseArtifactV1, ut as RequestLimitPolicy, v as DirectTlsServerError, vn as sessionCookiePolicy, vt as HttpSecurityLimits, w as StaticAssetMimeType, wn as agentJobWorkerLayer, wt as DEFAULT_MAXIMUM_LIVE_STREAMS_PER_SESSION, x as makeNodeTransportLayer, xn as ServerLifecycle, xt as controlCenterApiLayerWithLifecycle, y as NODE_LISTENER_SECURITY_POLICY, yn as verifyCsrfToken, yt as controlCenterApiHandlersLayer, z as releaseAgentJobsLayerForWorkerWorkspace, zn as prReviewSandboxSessionsLayer, zr as TerminalRecovery, zt as mapPersistenceWriteError } from "../assets/BindConfig-hNWrGfu2.js";
2
+ import { $ as deliveryGraphInspectionLayer, $n as controlCenterBootstrapLayer, $r as TerminalRecoveryRefusedError, $t as authorizePairingRequest, A as makeTimelineExportAudits, An as PrReviewSandboxTools, Ar as makeSecretStore, At as listPluginConnectionSummaries, B as releaseAgentJobsUnavailableLayer, Bn as prReviewSandboxToolsLayer, Br as terminalRecoveryLayer, Bt as JiraReadPluginConfiguration, C as staticApplicationWithAssetsLayer, Cn as AgentJobWorker, Ct as DEFAULT_MAXIMUM_LIVE_STREAMS, D as makeStaticAssetStore, Dn as PrReviewCommandArtifactId, Dt as releasePublicationSubmissionsLayer, E as StaticAssetStoreError, En as prReviewAgentJobWorkerLayer, Et as LiveStreamAdmissionExceeded, F as synchronizeFakeRelease, Fn as ReviewReadFile, Fr as SecretTooLargeError, Ft as pluginAdministrationLayerWithConnections, G as relationshipRepairProposalsLayer, Gn as PLUGIN_RETRY_MAX_DELAY_MILLIS, Gr as SESSION_ABSOLUTE_LIFETIME_DAYS, Gt as ClockifyReadPluginConfiguration, H as releaseAgentTurnsLayer, Hn as PLUGIN_OPERATION_MAX_ATTEMPTS, Hr as PairingCodeId, Ht as makeJiraReadPluginRuntime, I as synchronizeFakeReleaseFromMap, In as ReviewRunCommand, Ir as secretStoreIoError, It as pluginAdministrationOAuthLayer, J as portfolioSnapshotsLayer, Jn as retryPluginStream, Jr as AuthCryptoError, Jt as makeClockifyReadPluginRuntime, K as pullRequestReviewsLayer, Kn as isPluginFailureRetryable, Kr as SESSION_IDLE_LIFETIME_HOURS, Kt as clockifyReadOnlyPluginDescriptor, L as makeReleaseAgentJobs, Ln as ReviewSearchArtifact, Lt as pluginAdministrationOAuthLayerWithConnections, M as reconcileFakeReleaseProjection, Mn as ReviewListFiles, Mr as SecretProtectionError, Mt as makePluginAdministrationWithConnections, N as reconcileFakeReleaseSyncAttempts, Nn as ReviewPageArtifact, Nr as SecretStoreInputError, Nt as makePluginAdministrationWithOAuth, O as makeWorkspaceSettingsAdministration, On as PrReviewSandboxSessionError, Or as SecretRoot, Ot as releasePublicationSubmissionsUnavailableLayer, P as recoverFakeReleaseProjection, Pn as ReviewReadDiff, Pr as SecretStoreIoError, Pt as pluginAdministrationLayer, Q as makeLiveEvents, Qn as ControlCenterBootstrap, Qr as FirstRunPairingAlreadyIssuedError, Qt as PluginConnectionMap, R as releaseAgentJobsLayer, Rn as ReviewSearchFiles, Rr as TERMINAL_RECOVERY_CONFIRMATION, Rt as mapPersistenceReadError, S as staticApplicationLayer, Sn as ApiBindConfiguration, St as controlCenterApiMiddlewareLayer, T as StaticAssetStore, Tn as agentJobWorkerWithPrReviewLayer, Tt as LiveStreamAdmission, U as releaseAgentUnavailableLayer, Un as PLUGIN_RATE_LIMIT_MAX_DELAY_MILLIS, Ur as PairingCodeSummary, Ut as makeJiraReadPluginRuntimeFromProvider, V as makeReleaseAgentTurns, Vn as CodeCommitPluginDefinition, Vr as PAIRING_CODE_LIFETIME_MINUTES, Vt as jiraReadPluginDescriptor, W as makeRelationshipRepairProposals, Wn as PLUGIN_RETRY_BASE_DELAY_MILLIS, Wr as PairingPurpose, Wt as CodePipelinePluginDefinition, X as mediaReadsLayer, Xn as agentProviderRuntimeRegistryLayer, Xr as AuthPersistenceError, Xt as clockifyActionSubmissionsLayer, Y as makeMediaReads, Yn as AgentRuntimeRegistry, Yr as AuthPermissionDeniedError, Yt as makeClockifyReadPluginRuntimeFromProvider, Z as liveEventsLayer, Zn as agentRuntimeRegistryLayer, Zr as CredentialRejectedError, Zt as clockifyActionSubmissionsUnavailableLayer, _ as prReviewWorkerStartupLayer, _n as hashCsrfToken, _t as HttpByteLimit, a as decodeBindConfig, an as withCorrelationResponse, ar as restoreBackup, at as codePipelineReadsLayer, b as controlCenterTransportProtocol, bn as ServerDraining, bt as controlCenterApiLayer, c as makeControlCenterApplication, cn as InsecureLanCapability, cr as BackupBlobEntryV1, ct as makeAuthorizedShares, d as ReleaseSynchronizationStartup, dn as authorizeAuthenticatedMutation, dr as BackupId, dt as requestRateLimiterLayer, en as mutationCsrfLayer, er as makeControlCenterBootstrap, et as makeDeliveryGraphInspection, f as ReleaseSynchronizationStartupConfigurationError, fn as authorizeAuthenticatedRead, fr as BackupManifestJsonV1, ft as securityHeaders, g as PrReviewWorkerStartup, gn as effectiveRequestAuthority, gt as DEFAULT_HTTP_SECURITY_LIMITS, h as PrReviewWorkerRunning, hn as authorizeRequest, ht as limitRequestBodyStream, i as TransportPolicy, in as provideCurrentRequest, ir as createVerifiedBackup, it as makeCompleteDiffReads, j as timelineExportAuditsLayer, jn as ReviewApplyPatch, jr as SecretNotFoundError, jt as makePluginAdministration, k as workspaceSettingsAdministrationLayer, kn as PrReviewSandboxSessions, kr as SecretStore, kt as listFirstPartyServiceMetadata, l as makeControlCenterServer, ln as RequestAccess, lr as BackupBoundaryV1, lt as requestBoundaryLayer, m as releaseSynchronizationStartupLayer, mn as authorizeInsecureLanCapability, mr as ReproducibleBlobGap, mt as authorizeRequestBody, n as BindConfigError, nn as CurrentRequestContext, nr as authLayer, nt as timelineReadsLayer, o as effectiveReachableUrls, on as CsrfDigest, or as verifyBackup, ot as makeCodePipelineReads, p as releaseIdFromStartupState, pn as authorizeAuthenticatedReadPost, pr as BackupManifestV1, pt as RequestBodyPolicyError, q as makePortfolioSnapshots, qn as retryPluginOperation, qr as SessionSummary, qt as clockifyReadPluginDescriptor, r as DirectTlsMaterial, rn as makeCurrentRequestContext, rr as createOfflineVerifiedBackup, rt as completeDiffReadsLayer, s as PrReviewWorkerConfigurationError, sn as CsrfToken, sr as BackupBlobCountsV1, st as authorizedSharesLayer, t as BindConfig, tn as sessionCookieAuthLayer, tr as Auth, tt as makeTimelineReads, u as requestUrlBoundaryLayer, un as RequestSecurityError, ur as BackupDatabaseArtifactV1, ut as RequestLimitPolicy, v as DirectTlsServerError, vn as sessionCookiePolicy, vt as HttpSecurityLimits, w as StaticAssetMimeType, wn as agentJobWorkerLayer, wt as DEFAULT_MAXIMUM_LIVE_STREAMS_PER_SESSION, x as makeNodeTransportLayer, xn as ServerLifecycle, xt as controlCenterApiLayerWithLifecycle, y as NODE_LISTENER_SECURITY_POLICY, yn as verifyCsrfToken, yt as controlCenterApiHandlersLayer, z as releaseAgentJobsLayerForWorkerWorkspace, zn as prReviewSandboxSessionsLayer, zr as TerminalRecovery, zt as mapPersistenceWriteError } from "../assets/BindConfig-BG-FGtB5.js";
3
3
  import { $ as negotiatePluginDescriptorV1, $n as QuarantineReasonCode, $t as AppendAgentEventInput, A as PullRequestReviews, An as ReviewSuggestionPublicationDigest, Ar as QuarantineWriteError, At as BlobNotFoundError, Bn as ContentBlobStorageClass, Br as BackupInputError, Bt as AgentJobState, C as CodePipelineReads, Cn as ReadReviewSuggestionRevisionsInput, Cr as ContentMetadataMismatchError, D as MediaReads, Dn as ReserveReviewSuggestionPublicationInput, Dr as PersistenceConfigError, E as LiveEvents, En as ReleaseReviewSuggestionPublicationInput, Er as PersistedRecordError, Fn as SecretRef, Fr as SecretReferenceScopeConflictError, Ft as AgentAttemptSequence, Gn as PersonRecord, Gr as BackupStorageError, Gt as AgentReviewResultInput, Hn as EntityRecord, Hr as BackupLimitError, Ht as AgentJobTaskTag, Ir as SourceIdentityMismatchError, It as AgentContextSnapshotRecord, J as digestEnvironmentReadinessCandidate, Jn as ProviderAccountDisplayName, Jt as AgentReviewThreadBeforeInput, Kn as PluginConnectionDisplayName, Kr as SchemaWriteBarrierError, Kt as AgentReviewResultRecord, L as PluginConnection, Lr as WorkspaceSettingsGovernanceError, Lt as AgentEventCursor, M as ReleaseAgentJobs, Mn as ReviewSuggestionRevisionLeaseFence, Mr as RecordNotFoundError, Mt as BlobStoreIoError, Nn as RunningPrReviewAttempt, Nr as ReproducibleContentUnavailableError, Nt as BlobTooLargeError, O as PluginAdministration, On as ReviewSuggestionPublicationCommentId, Or as PersistenceOperationError, Ot as BlobContainmentError, Pr as RevisionConflictError, Pt as BlobUnexpectedEofError, Q as hasPluginCapability, Qn as QuarantineDiagnosticSummary, Qt as AgentThreadEventPageSize, R as Persistence, Rn as ContentBlobDigest, Rr as WorkspaceSettingsMutationConflictError, Rt as AgentJobInputError, S as AuthorizedShares, Sn as ReadReviewSuggestionPublicationInput, Sr as decodePersistenceConfig, T as DeliveryGraphInspection, Tn as RecordReviewSuggestionPublicationInput, Tr as MAXIMUM_PERSISTENCE_RECORD_KEY_LENGTH, Un as FollowedResourceDisplayName, Ur as BackupManifestError, Ut as AgentLeaseOwner, Vn as EntityKind, Vr as BackupIntegrityError, Vt as AgentJobTask, Wn as FollowedResourceRecord, Wr as BackupSqlError, Wt as AgentLeaseToken, X as digestReleaseReadinessCandidate, Xn as ProviderFamily, Xt as AgentReviewThreadTailInput, Y as digestReadinessRule, Yn as ProviderAccountRecord, Yt as AgentReviewThreadHistoryInput, Z as HOST_PLUGIN_CAPABILITY_VERSIONS, Zn as ProviderFamilyMatchesProvider, Zt as AgentThreadEvent, _n as MAXIMUM_REVIEW_BUDGET_MILLIS, an as CompleteTargetedReviewInput, ar as VendorAccountId, b as ApplicationResourceNotFound, bn as ReadReviewBudgetInput, br as LocalDatabaseUrl, cn as EnqueueAgentJobTask, cr as WorkspaceRecord, dn as LatestAgentReviewInput, en as AppendReviewSuggestionRevisionInput, er as QuarantineRecordKind, fn as LatestAgentReviewRecord, gn as MAXIMUM_REVIEW_BUDGET_EXTENSION_COUNT, hn as MAXIMUM_AGENT_THREAD_EVENT_PAGE_SIZE, i as DomainEventWakeups, in as CompleteAgentReviewInput, ir as RoleAssignmentRecord, j as RelationshipRepairProposals, jn as ReviewSuggestionPublicationReservation, jr as RecordAlreadyExistsError, jt as BlobStoreInputError, k as PortfolioSnapshots, kn as ReviewSuggestionPublicationCommentLocator, kr as PluginConnectionLimitError, kt as BlobIntegrityError, ln as ExtendReviewBudgetInput, lr as providerFamilyForProvider, mn as MAXIMUM_AGENT_JOB_PROMPT_LENGTH, nn as ClaimAgentJobInput, nr as RecordRevision, on as EMPTY_PR_REVIEW_THREAD_CONTEXT, or as VendorResourceId, pn as MAXIMUM_AGENT_ATTEMPT_OUTPUT_BYTES, q as ReadinessDigestError, qn as PluginConnectionRecord, qt as AgentReviewThreadAfterInput, rn as ClaimedAgentJob, rr as ReleaseSnapshotRecord, sn as EnqueueAgentJobInput, sr as WorkspaceName, tn as AttachRunningPrReviewSessionInput, tr as QuarantinedRecordMetadata, un as InterruptRunningReviewsInput, vn as PrReviewThreadContextSnapshot, wn as RecordAgentReviewProgressInput, wr as DatabaseInitializationError, x as ApplicationServiceUnavailable, xn as ReadReviewSuggestionPublication, xr as PersistenceConfig, y as ApplicationRateLimited, yn as PrReviewThreadSubject, yr as BlobRoot, z as persistenceLayer, zn as ContentBlobMetadata, zr as WorkspaceSettingsNoChangesError, zt as AgentJobPrompt } from "../assets/relationshipInferenceMaterialization-C9yhjFww.js";
4
4
  import { a as PluginConflictFailure, c as PluginRateLimitFailure, d as PluginUnsupportedCapabilityFailure, f as pluginFailureClass, i as PluginConfigurationFailure, l as PluginTimeoutFailure, n as PluginAuthorizationFailure, o as PluginMalformedResponseFailure, r as PluginCancellationFailure, s as PluginOutageFailure, t as PluginAuthenticationFailure, u as PluginUnknownOutcomeFailure } from "../assets/failures-BKL6Zn18.js";
5
5
  import { Effect, Predicate, Result, Schema, SchemaTransformation } from "effect";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knpkv/control-center",
3
- "version": "0.7.0",
3
+ "version": "0.8.1",
4
4
  "description": "Human- and agent-oriented delivery control center",
5
5
  "license": "MIT",
6
6
  "author": "knpkv",
@@ -57,18 +57,19 @@
57
57
  "react-markdown": "^10.1.0",
58
58
  "react-router": "8.3.0",
59
59
  "remark-gfm": "^4.0.1",
60
- "@knpkv/ai-claude": "^0.2.1",
60
+ "@knpkv/ai-claude": "^0.3.0",
61
61
  "@knpkv/ai-codex": "^0.4.0",
62
+ "@knpkv/ai-runtime": "^0.4.0",
62
63
  "@knpkv/atlassian-common": "^1.4.1",
63
64
  "@knpkv/clockify-api-client": "^1.1.1",
64
- "@knpkv/ai-runtime": "^0.4.0",
65
- "@knpkv/codecommit-core": "^0.14.0",
65
+ "@knpkv/codecommit-core": "^0.16.0",
66
66
  "@knpkv/confluence-api-client": "^1.1.1",
67
- "@knpkv/control-center-sql": "^0.4.0",
68
67
  "@knpkv/confluence-to-markdown": "^2.2.1",
68
+ "@knpkv/control-center-sql": "^0.4.0",
69
69
  "@knpkv/jira-api-client": "^1.1.1",
70
- "@knpkv/review": "^0.2.0",
71
- "@knpkv/rly": "^0.4.1"
70
+ "@knpkv/relay-product": "^0.1.0",
71
+ "@knpkv/review": "^0.2.1",
72
+ "@knpkv/rly": "^0.5.1"
72
73
  },
73
74
  "devDependencies": {
74
75
  "@effect/vitest": "4.0.0-rc.109",
@@ -1,2 +0,0 @@
1
- import{l as e,r as t}from"./hooks-K-sIfGqH.js";import{s as n,t as r}from"./lib-6h955hh9.js";import{t as i}from"./jsx-runtime-NZYk81nU.js";import{s as a}from"./Dialog-1WvU8GjA-C7r26HF0.js";import{r as o,t as s}from"./releasePaths-XoI2BHX3.js";import{a as c,d as l,f as u}from"./patterns-CxMz8DKX-ByHwV03y.js";import{r as d}from"./primitives-CW89TsFB-BBLwFFPo.js";import{i as f,l as p,n as m}from"./releaseRoutes-CSP_eBj6.js";import{portfolioSessionBoundaryPresentation as h}from"./PortfolioOverview-BBKSc-yI.js";import{t as g}from"./ReleaseWorkset-Dt-ArwsN.js";import{ReleaseAction as _,ReleaseAgentEntry as v,ReleaseEvidence as y,t as b}from"./ReleaseRoute-D4CttCjC.js";var x={page:`_page_rorzd_1`,hero:`_hero_rorzd_2`,selectedRelease:`_selectedRelease_rorzd_3`,identity:`_identity_rorzd_4`,contextSection:`_contextSection_rorzd_5`,intro:`_intro_rorzd_28`,releaseSelector:`_releaseSelector_rorzd_32`,releaseChoice:`_releaseChoice_rorzd_40`,fullLink:`_fullLink_rorzd_90`},S=i(),C=e=>m(new URLSearchParams(e).get(`release`)),w=({releases:e,selected:t,stateForRelease:n,workspaceId:i})=>(0,S.jsx)(`nav`,{"aria-label":`Release decisions`,className:x.releaseSelector,children:e.map(e=>(0,S.jsxs)(r,{"aria-current":e.id===t.id?`page`:void 0,className:x.releaseChoice,"data-active":e.id===t.id?`true`:`false`,state:n(e),to:s(i,e.id),children:[(0,S.jsx)(`span`,{children:e.relay.codename}),(0,S.jsx)(`strong`,{children:e.release.verdict})]},e.id))}),T=()=>{let i=e(),m=t();if(i.controller.state._tag===`session`)return(0,S.jsx)(a,{...h(i.controller.state.reason)});if(i.controller.state._tag!==`ready`)return(0,S.jsx)(a,{description:`Control Center is loading the release portfolio before opening the decision queue.`,title:`Loading active work`});let T=i.controller.state.portfolio.releases;if(T.length===0)return(0,S.jsx)(a,{action:(0,S.jsx)(r,{to:`/w/${i.workspaceId}/overview`,children:`Return to overview`}),description:`Active work appears when a synchronized release needs a human decision.`,title:`No active release work`});let E=C(m.search);if(E===null){let e=T[0];if(e===void 0)throw Error(`unreachable empty release portfolio`);return(0,S.jsx)(n,{replace:!0,to:s(i.workspaceId,e.id)})}let D=T.find(({id:e})=>e===E);if(D===void 0)return(0,S.jsx)(a,{action:(0,S.jsx)(r,{to:s(i.workspaceId,T[0]?.id??E),children:`Open current work`}),description:`This release is not part of the current workspace snapshot.`,title:`Release work not found`});let O=p(m.state,i.workspaceId,D.id);return(0,S.jsxs)(`article`,{className:x.page,children:[(0,S.jsxs)(`header`,{className:x.hero,children:[(0,S.jsx)(d,{as:`p`,tone:`secondary`,variant:`label`,children:`Active work`}),(0,S.jsxs)(d,{as:`h1`,variant:`verdict`,children:[`Decisions,`,(0,S.jsx)(`br`,{}),`not tickets.`]}),(0,S.jsx)(d,{className:x.intro,tone:`secondary`,variant:`body-large`,children:`One place to review the relationship changes that decide whether a release can move.`})]}),(0,S.jsx)(w,{releases:T,selected:D,stateForRelease:e=>O.isStored?f(i.workspaceId,e.id,O.origin):void 0,workspaceId:i.workspaceId}),(0,S.jsxs)(`section`,{"aria-labelledby":`active-release-title`,className:x.selectedRelease,children:[(0,S.jsxs)(`div`,{className:x.identity,children:[(0,S.jsx)(l,{algorithm:D.relay.algorithm,codename:D.relay.codename,size:`hero`,symbolIndices:D.relay.symbolIndices}),(0,S.jsxs)(`div`,{children:[(0,S.jsx)(d,{as:`h2`,id:`active-release-title`,variant:`page-title`,children:D.serviceName}),(0,S.jsx)(r,{className:x.fullLink,state:m.state,to:o(i.workspaceId,D.id),children:`Open full release`})]})]}),(0,S.jsx)(u,{reason:D.readinessReason,tone:D.release.tone,verdict:D.release.verdict}),D.collaborators.length===0?null:(0,S.jsx)(c,{"aria-label":`${D.relay.codename} collaborators`,expanded:!0,limit:D.collaborators.length,onExpandedChange:()=>void 0,people:D.collaborators}),(0,S.jsx)(_,{release:D}),(0,S.jsxs)(`section`,{"aria-labelledby":`active-workset-title`,className:x.contextSection,children:[(0,S.jsx)(d,{as:`h3`,id:`active-workset-title`,variant:`section-title`,children:`Release work`}),(0,S.jsx)(g,{release:D,workspaceId:i.workspaceId})]}),(0,S.jsx)(b,{release:D}),(0,S.jsxs)(`section`,{"aria-labelledby":`active-evidence-title`,className:x.contextSection,children:[(0,S.jsx)(d,{as:`h3`,id:`active-evidence-title`,variant:`section-title`,children:`Evidence`}),(0,S.jsx)(y,{release:D})]}),(0,S.jsxs)(`section`,{"aria-labelledby":`active-agent-title`,className:x.contextSection,children:[(0,S.jsx)(d,{as:`h3`,id:`active-agent-title`,variant:`section-title`,children:`Release agent`}),(0,S.jsx)(v,{release:D})]})]})]})};export{T as ActiveWorkPage};
2
- //# sourceMappingURL=ActiveWorkPage-BsaIr8ah.js.map
@@ -1,6 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-CwJFpaho.js";import{l as n,r,u as i}from"./hooks-K-sIfGqH.js";import{a,s as o,t as s}from"./lib-6h955hh9.js";import{t as c}from"./jsx-runtime-NZYk81nU.js";import{n as l,s as u}from"./Dialog-1WvU8GjA-C7r26HF0.js";import{r as d}from"./releasePaths-XoI2BHX3.js";import{c as f,d as p,u as m}from"./index-BWx9sNOT.js";import{a as ee,d as te,p as ne}from"./patterns-CxMz8DKX-ByHwV03y.js";import{n as h,r as g,t as _}from"./primitives-CW89TsFB-BBLwFFPo.js";import{En as v,Ga as y,Gr as re,Kr as b,Kt as ie,Pn as x,Rn as S,Va as ae,Wa as C,Xr as oe,Xt as se,_ as w,ar as T,dn as ce,en as le,fa as E,g as D,h as O,hr as k,ir as A,pr as j,sr as M,tr as N,ua as P,xr as F,yr as I,zn as L}from"./agent-api-CzdQFCcD.js";import{a as ue,i as de,n as fe,o as R,r as pe,t as z}from"./releaseAgentTransport-BCQDYqZt.js";import{c as me,n as B,r as V}from"./releaseRoutes-CSP_eBj6.js";import{usePortfolioOverviewController as H}from"./PortfolioOverview-BBKSc-yI.js";import{s as U,t as he}from"./workspaceEntityRoutes-CFPO-iFw.js";import{t as W}from"./useWorkspaceItems-CHYpfLmL.js";var G=e(t(),1),ge=e=>`${e} release`,K=24,q=256e3,J=L({eventCursor:le,relayCodename:w,serviceName:O,updatedAt:se,version:D}),Y=L({content:S.check(k(),j(32e3)),context:F(J),dateTime:S.check(k(),j(64)),id:S.check(k(),j(100)),provider:F(x([`codex`,`claude`])),role:x([`user`,`assistant`]),time:S.check(k(),j(32))}),_e=v(Y).check(I(e=>e.length<=K,{expected:`at most ${K} stored release-agent messages`}),I(e=>e.reduce((e,t)=>e+t.content.length,0)<=q,{expected:`at most ${q} stored release-agent characters`}),I(e=>{let t=new Set;for(let n of e){if(t.has(n.id))return!1;t.add(n.id)}return!0},{expected:`unique stored release-agent message ids`})),X=T(_e),ve=e=>{let t=sessionStorage.getItem(`cc_session_id`);return t===null||!M(ce)(t)?null:`cc_release_agent_thread:${t}:${e}`},ye=e=>{let t=[],n=0;for(let r of e.slice(-24).reverse()){if(n+r.content.length>q)break;t.unshift(r),n+=r.content.length}return t},be=e=>{try{let t=ve(e);if(t===null)return[];let n=sessionStorage.getItem(t);if(n===null)return[];let r=N(X)(n);return E(r)?r.success:[]}catch{return[]}},xe=(e,t)=>{let n=A(X)(ye(t));if(!P(n))try{let t=ve(e);if(t===null)return;sessionStorage.setItem(t,n.success)}catch{}},Se=50,Ce=8,we=/\btemplate\b/iu,Te=e=>{let t=e.details;return e.entityState===`present`&&t._tag===`page`&&t.contentState===`loaded`&&t.content?.markdown!==void 0&&t.content.markdown.trim().length>0?{entityId:e.entityId,markdown:t.content.markdown,revision:t.revision,title:e.title}:null},Ee=e=>[...e].sort((e,t)=>!we.test(e.title)-+!we.test(t.title)||e.title.localeCompare(t.title)),De=e=>e.entityState===`present`&&e.details._tag===`page`&&we.test(e.title),Oe=(e=>async t=>{let n=(await e.list(t)).filter(De).slice(0,Se),r=[];for(let i=0;i<n.length;i+=Ce){let a=n.slice(i,i+Ce),o=await Promise.allSettled(a.map(({entityId:n})=>e.load(n,t)));for(let e of o){if(e.status===`rejected`){if(y(`NotFoundApiError`)(e.reason))continue;throw e.reason}let t=Te(e.value);t!==null&&r.push(t)}}return Ee(r)})({list:async e=>(await W.load(e,{owner:`all`,query:``,service:`all`,status:`all`,type:`page`})).items.map(({projection:e})=>e),load:async(e,t)=>(await de.load(e,t)).entity.projection}),Z={room:`_room_19zge_1`,hero:`_hero_19zge_2`,heroCopy:`_heroCopy_19zge_3`,people:`_people_19zge_4`,starters:`_starters_19zge_5`,composer:`_composer_19zge_6`,templatePicker:`_templatePicker_19zge_7`,legacy:`_legacy_19zge_8`,legacyHeader:`_legacyHeader_19zge_9`,legacyContext:`_legacyContext_19zge_10`,back:`_back_19zge_19`,eyebrow:`_eyebrow_19zge_60`,publication:`_publication_19zge_70`,publicationAction:`_publicationAction_19zge_74`,presetList:`_presetList_19zge_90`,preset:`_preset_19zge_90`,suggestionList:`_suggestionList_19zge_97`,suggestion:`_suggestion_19zge_97`,thread:`_thread_19zge_168`,threadContext:`_threadContext_19zge_172`,failure:`_failure_19zge_202`,state:`_state_19zge_206`},Q=c(),ke=(e,t,n)=>{let r=t.length===1?t[0]:void 0;return r===void 0?void 0:f(e,r.id,n)},Ae={description:`The workspace-wide view of release readiness, people, source health, and agent work.`,label:`Overview`,path:`/`},je={"/":Ae,"/pair":{description:`The private browser-pairing flow. Credentials never become part of the agent context.`,label:`Browser pairing`,path:`/pair`},"/releases":{description:`Release relationships, blockers, collaborators, pull requests, and deployment evidence.`,label:`Releases`,path:`/releases`},"/services":{description:`Negotiated plugin health and the connections that provide delivery evidence.`,label:`Services`,path:`/services`}},Me=`https://control-center.invalid`,Ne=/^\/(?![\\/])[^\\]*$/u,Pe=(e,t)=>e!==null&&Ne.test(e)?e:t,$=e=>{if(e===null)return Ae;let t=URL.parse(e,Me);if(t===null||t.origin!==Me)return{description:`The calling page is not a recognized Control Center context. No fallback workspace or entity is substituted.`,label:`Context unavailable`,path:null};let n=`${t.pathname}${t.search}${t.hash}`,r=je[t.pathname];if(r!==void 0)return{...r,path:n};let i=t.pathname.split(`/`),a=V(i[2]),o=i[3],s=B(i[4]),c=i[5],l=i[1]===`w`&&i[4]===void 0,u=i[1]===`w`&&a!==null&&o===`releases`&&s!==null&&(c===void 0||c===`preview`||c===`agent`);if(l&&a!==null&&o===`overview`&&s===null)return{description:`Workspace ${a} release readiness, people, source health, and agent work.`,label:`Workspace overview`,path:n};if(l&&a!==null&&o===`items`&&s===null){let e=he(t.searchParams.get(`object`));return e===null?{description:`Current normalized delivery items in workspace ${a}, including the exact active filters and selection.`,label:`Workspace items`,path:n}:{description:`Workspace item ${e} is selected in the normalized delivery view. Relay will keep this exact entity selection and the surrounding item filters in context.`,label:`Workspace item ${e.slice(-6)}`,path:n}}let d=i[1]===`w`&&a!==null&&o===`items`&&c===void 0?he(i[4]):null;if(d!==null)return{description:`Workspace item ${d} is open in the normalized delivery view. Relay will keep this exact entity in context.`,label:`Workspace item ${d.slice(-6)}`,path:n};if(l&&a!==null&&o===`timeline`&&s===null){let e=t.searchParams.get(`event`);return{description:e===null?`Attributable delivery activity in workspace ${a}, including the exact actor and date filters.`:`Timeline event ${e} in workspace ${a}, including the exact actor and date filters.`,label:`Workspace timeline`,path:n}}let f=t.searchParams.get(`release`),p=f===null||B(f)!==null;return l&&a!==null&&o===`work`&&s===null&&p?{description:`Active release decisions in workspace ${a}, including the exact selected release and filters.`,label:`Active work`,path:n}:u?{description:`Release ${s} in workspace ${a}. Relay will resolve current release facts on the server before answering.`,label:`Release ${s.slice(-6)}`,path:n}:{description:`The calling page is not a recognized Control Center context. No fallback workspace or entity is substituted.`,label:`Context unavailable`,path:null}},Fe=()=>{let e=oe();return{dateTime:re(e),time:b(e,{hour:`2-digit`,minute:`2-digit`})}},Ie=e=>!ae(e,`_tag`)||!C(e._tag)?null:e._tag,Le=e=>{switch(Ie(e)){case`UnauthorizedApiError`:return`session-expired`;case`ForbiddenApiError`:return`blocked`;case`NotFoundApiError`:case`ApplicationResourceNotFound`:return`not-found`;case`ConflictApiError`:return`conflict`;case`ServiceUnavailableApiError`:case`ApplicationServiceUnavailable`:return`unavailable`;case`RateLimitedApiError`:return`rate-limited`;case`RequestTimedOutApiError`:return`timed-out`;default:return`failed`}},Re=e=>{switch(e){case`session-expired`:return(0,Q.jsx)(u,{action:(0,Q.jsx)(s,{to:`/pair`,children:`Pair this browser`}),announce:`assertive`,description:`Pair this browser again, then return to the release thread. Your local messages remain in this tab.`,title:`Session expired`,tone:`caution`});case`blocked`:return(0,Q.jsx)(u,{announce:`assertive`,description:`This connection cannot run a release agent. Use an allowed Control Center address.`,title:`Agent access blocked`,tone:`critical`});case`not-found`:return(0,Q.jsx)(u,{announce:`assertive`,description:`This release is no longer in the current workspace snapshot. Return to the release before asking again.`,title:`Release not found`,tone:`caution`});case`conflict`:return(0,Q.jsx)(u,{announce:`assertive`,description:`The release publication state changed or its destination is ambiguous. Refresh the release context and use the explicit publication controls.`,title:`Release publication needs attention`,tone:`caution`});case`unavailable`:return(0,Q.jsx)(u,{announce:`assertive`,description:`Start the configured local Codex or Claude runner, then ask again.`,title:`Relay is unavailable`,tone:`caution`});case`rate-limited`:return(0,Q.jsx)(u,{announce:`assertive`,description:`Relay has reached its local turn budget. Wait a moment, then submit the message again.`,title:`Too many agent turns`,tone:`caution`});case`timed-out`:return(0,Q.jsx)(u,{announce:`assertive`,description:`The local model exceeded this turn's deadline. Narrow the question, then submit it again.`,title:`Relay took too long`,tone:`caution`});case`failed`:return(0,Q.jsx)(u,{announce:`assertive`,description:`The agent did not complete this turn. Your message is still here; ask again when the runtime is ready.`,title:`Relay could not answer`,tone:`critical`})}},ze=[{description:`Fast, repository-aware release work with the configured Codex CLI.`,label:`Run with Codex`,provider:`codex`},{description:`Use the configured Claude CLI for a second agent perspective.`,label:`Run with Claude`,provider:`claude`}],Be=[{label:`Release blockers`,prompt:`What blocks this release?`},{label:`Release summary`,prompt:`Write a concise release summary.`},{label:`Missing evidence`,prompt:`Which evidence is still missing?`}],Ve=12e3,He=64e3,Ue=`
2
- [earlier content truncated]`,We=e=>{let t=[],n=0;for(let r of e.slice(-12).reverse()){let e=r.content.length<=Ve?r.content:`${r.content.slice(0,11972)}${Ue}`;if(n+e.length>He)break;t.unshift({content:e,role:r.role}),n+=e.length}return t},Ge={kind:`human`,person:{avatarFallback:`YO`,id:`current-operator`,name:`You`,role:`Release operator`}},Ke={avatarFallback:`AI`,id:`relay`,kind:`agent`,name:`Relay`,role:`Release agent`},qe=e=>e.map(e=>({actor:e.role===`user`?Ge:Ke,content:e.content,dateTime:e.dateTime,id:e.id,time:e.time,...e.context!==void 0&&{evidence:(0,Q.jsxs)(`span`,{children:[`Answered from `,e.context.serviceName,` `,e.context.version,` · `,e.context.relayCodename,` · snapshot `,e.context.eventCursor]})}})),Je=e=>e.reduce((e,{id:t})=>{let n=Number(t.split(`-`)[1]);return Number.isSafeInteger(n)&&n>=e?n+1:e},0),Ye=({disabled:e,isRunning:t,onPromptChange:n,onSubmit:r,prompt:i,provider:a})=>(0,Q.jsxs)(`form`,{className:Z.composer,onSubmit:r,children:[(0,Q.jsx)(h,{label:`What do you need?`,children:t=>(0,Q.jsx)(`textarea`,{...t,autoFocus:!0,disabled:e,maxLength:8e3,onChange:e=>n(e.currentTarget.value),placeholder:`Ask about blockers, people, checks, or release notes…`,rows:4,value:i})}),(0,Q.jsx)(l,{disabled:e||i.trim().length===0,loading:t,size:`principal`,stretch:!0,type:`submit`,variant:`primary`,children:`Ask Relay with ${a===`codex`?`Codex`:`Claude`}`})]}),Xe=(e,t)=>{let n=[`Work on the exact synchronized Confluence page below.`,`Page title: ${t.title}`,`Current revision: ${t.revision}`,t.contentState===`loaded`?`Current safe-Markdown page body:`:`The current page body was not synchronized. Draft a complete replacement body.`].join(`
3
- `),r=t.contentState===`loaded`?`
4
- `:`
5
- No current body is available.`,i=`\n\nUser request:\n${e}`,a=n.length+r.length+i.length;if(a>8e3)return e;let o=8e3-a;return`${n}${r}${t.contentState===`loaded`?t.markdown.slice(0,o):``}${i}`},Ze=(e,t)=>{if(e._tag!==`ready`&&e._tag!==`stale`)return null;let{entity:n,source:r}=e.inspection,i=n.projection.details;if(r.providerId!==`confluence`||i._tag!==`page`||!n.releaseIds.includes(t))return null;let a=R(i,e.inspection);return{contentState:a.contentState,entityId:n.projection.entityId,markdown:a.content??``,revision:a.revision,title:n.projection.title}},Qe=({availableProviders:e,confluencePage:t,loadConfluenceTemplates:n,providerCatalogPending:i,release:o,runTurn:c,submitPublication:f,workspaceId:p})=>{let m=r(),[v]=a(),y=$(v.get(`from`)),[re,b]=(0,G.useState)(``),[x,S]=(0,G.useState)(`codex`),ae=(0,G.useRef)(!1),[C,oe]=(0,G.useState)(()=>be(o.id)),[se,w]=(0,G.useState)(null),[T,ce]=(0,G.useState)(!1),[le,E]=(0,G.useState)(``),D=t._tag===`ready`?t.target:null,O=D?.title??ge(o.version),k=D?.markdown??`Release `+o.version+` for `+o.serviceName+`. Published by Relay after human confirmation.`,[A,j]=(0,G.useState)(O),[M,N]=(0,G.useState)(k),[P,F]=(0,G.useState)(null),[I,L]=(0,G.useState)(n===void 0?{_tag:`ready`,templates:[]}:{_tag:`loading`}),[ue,de]=(0,G.useState)(null),fe=(0,G.useRef)(Je(C)),R=(0,G.useRef)(null),pe=(0,G.useRef)(null),z=me(o.id);(0,G.useEffect)(()=>()=>{let e=R.current;R.current=null,e?.abort()},[]),(0,G.useEffect)(()=>{xe(o.id,C)},[C,o.id]),(0,G.useEffect)(()=>{j(O),N(k)},[D?.entityId,D?.revision,k,O]),(0,G.useEffect)(()=>{D!==null&&pe.current?.scrollIntoView({block:`start`})},[D?.entityId]),(0,G.useEffect)(()=>{if(n===void 0||D!==null)return;let e=new AbortController;return L({_tag:`loading`}),n(e.signal).then(t=>{e.signal.aborted||L({_tag:`ready`,templates:t})},()=>{e.signal.aborted||L({_tag:`failed`})}),()=>e.abort()},[D?.entityId,n]);let B=(0,G.useMemo)(()=>qe(C),[C]),V=[...C].reverse().find(e=>e.provider!==void 0)?.provider,H=c===void 0,U=i||e!==void 0&&!e.includes(x),he=e?.length===0,W=o.releasePageAwareness,K=I._tag===`ready`?I.templates.find(({entityId:e})=>e===ue)??null:null,q=W?.state===`not-published`,J=W?.state===`stale`&&W.publicationActionId!==void 0,Y=D!==null||K!==null||q||J,_e=W===void 0||W.state===`unknown`,X=[...C].reverse().find(({role:e})=>e===`assistant`)?.content;(0,G.useEffect)(()=>{if(e===void 0||ae.current&&e.includes(x))return;let t=e[0];t!==void 0&&S(t)},[e,x]);let ve=e=>{e.preventDefault();let t=re.trim();if(t.length===0||c===void 0||U||T)return;let n=We(C),r={...Fe(),content:t,id:`turn-${fe.current++}-human`,role:`user`},i=new AbortController;R.current?.abort(),R.current=i,oe(e=>[...e,r]),b(``),w(null),ce(!0),E(`Relay is reading the release context.`),c({history:n,originPath:Pe(v.get(`from`),`${m.pathname}${m.hash}`),prompt:D===null?K===null?t:Xe(t,{contentState:`loaded`,entityId:K.entityId,markdown:K.markdown,revision:K.revision,title:K.title}):Xe(t,D),provider:x,releaseId:o.id,workspaceId:p},{signal:i.signal}).then(e=>{if(i.signal.aborted)return;let t=e.reply.trim();if(t.length===0){w(`failed`),E(`Relay returned an empty answer.`);return}oe(n=>[...n,{...Fe(),content:t,context:{eventCursor:e.eventCursor,relayCodename:e.release.relay.codename,serviceName:e.release.serviceName,updatedAt:e.release.updatedAt,version:e.release.version},id:`turn-${fe.current++}-agent`,provider:e.provider,role:`assistant`}]),E(`Relay answered in this release thread.`)},e=>{i.signal.aborted||(w(Le(e)),E(`Relay could not complete this turn.`))}).finally(()=>{R.current===i&&(R.current=null,ce(!1))})},ye=e=>{if(P!==null||A.trim()===``||M.trim()===``||e===`confluence`&&!Y)return;F(e);let t=e===`confluence`&&(D!==null||J);E(`Relay is `+(t?`updating`:`creating`)+` the `+e+` release artifact.`),f({releaseId:o.id,provider:e,title:A.trim(),markdown:M.trim(),...t&&D===null&&W?.publicationActionId!==void 0&&{publicationActionId:W.publicationActionId},...e===`confluence`&&D!==null&&{targetEntityId:D.entityId,targetRevision:ie.make(D.revision)},...e===`confluence`&&D===null&&K!==null&&{templateEntityId:K.entityId}}).then(n=>E(`Relay submitted a governed `+(t?`Confluence page update`:e+` publication`)+` (`+n.state+`).`),()=>E(`Relay could not publish the `+e+` release artifact.`)).finally(()=>F(null))};return(0,Q.jsxs)(`article`,{className:Z.room,"data-release-agent-id":o.id,children:[(0,Q.jsx)(s,{className:Z.back,state:m.state,to:d(p,o.id),children:`Back to release`}),y.path===null?null:(0,Q.jsx)(s,{className:Z.back,to:y.path,children:`Return to calling page`}),y.path===null?null:(0,Q.jsx)(g,{className:Z.eyebrow,tone:`secondary`,variant:`label`,children:y.label}),(0,Q.jsxs)(`header`,{className:Z.hero,children:[(0,Q.jsx)(te,{algorithm:o.relay.algorithm,codename:o.relay.codename,"data-rly-release-transition-name":z.relay,"data-rly-release-transition-part":`relay`,size:`hero`,style:{viewTransitionName:z.relay},symbolIndices:o.relay.symbolIndices}),(0,Q.jsxs)(`div`,{className:Z.heroCopy,children:[(0,Q.jsxs)(g,{className:Z.eyebrow,tone:`secondary`,variant:`label`,children:[o.lifecycleLabel,` · `,o.version]}),(0,Q.jsxs)(g,{as:`h1`,id:`agent-title`,variant:`verdict`,children:[`Ask `,o.relay.codename,`.`]}),(0,Q.jsx)(g,{tone:`secondary`,variant:`body-large`,children:`Relay resolves the current release before every answer. This thread stays in this tab.`})]})]}),(0,Q.jsxs)(`section`,{"aria-labelledby":`agent-collaborators`,className:Z.people,children:[(0,Q.jsx)(g,{as:`h2`,id:`agent-collaborators`,variant:`section-title`,children:`In this release`}),o.collaborators.length===0?(0,Q.jsx)(g,{tone:`secondary`,children:`No owner or approver is assigned yet.`}):(0,Q.jsx)(ee,{"aria-label":`${o.serviceName} release collaborators`,expanded:!0,limit:o.collaborators.length,onExpandedChange:()=>void 0,people:o.collaborators})]}),(0,Q.jsxs)(`section`,{"aria-labelledby":`agent-presets`,className:Z.starters,children:[(0,Q.jsx)(g,{as:`h2`,id:`agent-presets`,tone:`secondary`,variant:`label`,children:`Agent preset`}),(0,Q.jsx)(`div`,{"aria-label":`Agent presets`,className:Z.presetList,role:`radiogroup`,children:ze.map(t=>(0,Q.jsxs)(`button`,{"aria-checked":x===t.provider,className:Z.preset,disabled:H||T||i||e!==void 0&&!e.includes(t.provider),onClick:()=>{ae.current=!0,S(t.provider)},role:`radio`,type:`button`,children:[(0,Q.jsx)(`strong`,{children:t.label}),(0,Q.jsx)(`span`,{children:t.description}),e!==void 0&&!e.includes(t.provider)?(0,Q.jsx)(`small`,{children:`Not configured`}):null]},t.provider))}),(0,Q.jsx)(g,{as:`h2`,id:`agent-starters`,tone:`secondary`,variant:`label`,children:`Prompt templates`}),(0,Q.jsx)(`div`,{className:Z.suggestionList,children:[...D===null?[]:[{label:`Draft this page`,prompt:`Draft the complete updated Confluence page in Markdown for this release. Return only the page body, ready for owner review.`}],...Be].map(e=>(0,Q.jsxs)(`button`,{className:Z.suggestion,disabled:H||U||T,onClick:()=>b(e.prompt),type:`button`,children:[(0,Q.jsx)(`strong`,{children:e.label}),(0,Q.jsx)(`span`,{children:e.prompt})]},e.label))})]}),H?(0,Q.jsx)(u,{description:`Connect the server to a local Codex or Claude runner. Provider credentials and repository access stay server-side; this tab stores its bounded thread locally.`,title:`Local agent not connected`}):i?null:he?(0,Q.jsx)(u,{action:(0,Q.jsx)(s,{to:`/settings`,children:`Configure an agent`}),description:`Enable a local Codex or Claude runner in Settings, then return here to draft or review this release.`,title:`No agent is configured`,tone:`caution`}):U?(0,Q.jsx)(u,{description:`Choose a configured Codex or Claude preset before starting this turn.`,title:`Selected agent is not configured`,tone:`caution`}):null,se===null?null:(0,Q.jsx)(`div`,{className:Z.failure,children:Re(se)}),(0,Q.jsx)(ne,{...le.length===0?{}:{announcement:le},className:Z.thread,composer:(0,Q.jsx)(Ye,{disabled:H||U,isRunning:T,onPromptChange:b,onSubmit:ve,prompt:re,provider:x}),context:(0,Q.jsxs)(`div`,{className:Z.threadContext,children:[(0,Q.jsx)(`strong`,{children:o.serviceName}),(0,Q.jsx)(`span`,{children:o.version}),(0,Q.jsx)(`span`,{children:o.relay.codename}),(0,Q.jsxs)(`span`,{children:[`Preset `,x]}),V===void 0?null:(0,Q.jsxs)(`span`,{children:[`Last answer `,V]})]}),emptyLabel:`Ask one useful question. Relay will answer only for this release.`,heading:`Release thread`,messages:B}),(0,Q.jsxs)(_,{as:`section`,"aria-labelledby":`relay-publication`,className:`${Z.people} ${Z.publication}`,padding:`spacious`,ref:pe,form:`grouped`,children:[(0,Q.jsx)(g,{as:`h2`,id:`relay-publication`,variant:`section-title`,children:D===null?`Publish a release artifact`:`Edit this Confluence page`}),(0,Q.jsx)(g,{tone:`secondary`,children:D===null?`These governed actions use the current release context and require your workspace-owner confirmation. Jira issue edits remain proposal-only.`:`You are editing the synchronized page at revision ${D.revision}. Type directly, or ask Relay for a draft and bring its latest answer into the editor. Publishing is an explicit, revision-guarded owner action.`}),D===null?(0,Q.jsxs)(`div`,{className:Z.templatePicker,children:[(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(g,{as:`h3`,variant:`card-title`,children:`Start from a Confluence template`}),(0,Q.jsx)(g,{tone:`secondary`,children:`Choose any synchronized Confluence page. Control Center creates a separate release-owned copy; the source page remains unchanged.`})]}),I._tag===`loading`?(0,Q.jsx)(g,{tone:`secondary`,children:`Loading Confluence templates…`}):null,I._tag===`failed`?(0,Q.jsx)(g,{tone:`secondary`,children:`Templates could not be loaded. You can still write a new page from scratch.`}):null,I._tag===`ready`&&I.templates.length===0?(0,Q.jsx)(g,{tone:`secondary`,children:`No synchronized page body is available yet. Synchronize Confluence, then return here.`}):null,I._tag===`ready`&&I.templates.length>0?(0,Q.jsx)(h,{label:`Existing Confluence page`,children:e=>(0,Q.jsxs)(`select`,{...e,onChange:e=>{let t=I.templates.find(({entityId:t})=>t===e.target.value);if(t===void 0){de(null);return}de(t.entityId),j(`${t.title} — ${o.version}`),N(t.markdown),E(`A copy of the template is now in the editor. The source page is unchanged.`)},value:ue??``,children:[(0,Q.jsx)(`option`,{value:``,children:`Write a new page`}),I.templates.map(e=>(0,Q.jsxs)(`option`,{value:e.entityId,children:[e.title,` · revision `,e.revision]},e.entityId))]})}):null,K===null?null:(0,Q.jsx)(l,{disabled:H||U||T,onClick:()=>b(`Adapt the selected Confluence template for this release. Preserve its useful structure, replace placeholders with current release facts, and return only the complete Markdown body.`),variant:`secondary`,children:`Ask Relay to adapt this copy`})]}):null,t._tag===`loading`?(0,Q.jsx)(g,{tone:`secondary`,children:`Loading the exact Confluence page that opened Relay…`}):null,t._tag===`unavailable`?(0,Q.jsx)(g,{tone:`secondary`,children:`The calling item is not an editable Confluence page in this release. The generic release publication controls remain available.`}):null,D?.contentState===`lazy`?(0,Q.jsx)(g,{tone:`secondary`,children:`The existing page body was not synchronized. Start from a complete Relay draft or paste the complete page body before publishing; an empty replacement is blocked.`}):null,W?.state===`stale`?(0,Q.jsx)(g,{tone:`secondary`,children:`The release changed after the last successful Confluence publication. Relay suggests updating the page; publishing requires an explicit owner confirmation.`}):null,(0,Q.jsx)(h,{label:D===null?`Title`:`Confluence page title`,children:e=>(0,Q.jsx)(`input`,{...e,value:A,onChange:e=>j(e.target.value)})}),(0,Q.jsx)(h,{label:D===null?`Release notes`:`Page body (Markdown)`,children:e=>(0,Q.jsx)(`textarea`,{...e,rows:D===null?6:10,value:M,onChange:e=>N(e.target.value)})}),(D!==null||K!==null)&&X!==void 0?(0,Q.jsx)(l,{disabled:P!==null,onClick:()=>{N(X),E(`The latest Relay answer is now in the page editor. Review it before publishing.`)},variant:`secondary`,children:`Use latest Relay answer`}):null,(0,Q.jsxs)(`div`,{className:D===null?Z.presetList:Z.publicationAction,children:[D===null?(0,Q.jsx)(l,{disabled:P!==null,loading:P===`jira`,onClick:()=>ye(`jira`),children:`Create Jira release version`}):null,(0,Q.jsx)(l,{disabled:P!==null||!Y||t._tag===`loading`||A.trim()===``||M.trim()===``,loading:P===`confluence`,onClick:()=>ye(`confluence`),children:D===null?K===null?W?.state===`stale`?`Update Confluence release page`:W?.state===`current`?`Confluence release page is current`:`Create Confluence release page`:`Create template copy in Confluence`:`Publish page update`}),W?.state===`current`?(0,Q.jsx)(g,{tone:`secondary`,children:`Relay will suggest an update after synchronized release changes make this page stale.`}):null,W?.state===`stale`&&!J?(0,Q.jsx)(g,{tone:`secondary`,children:`The existing page identity is unavailable, so Relay will not create a duplicate page.`}):null,_e?(0,Q.jsx)(g,{tone:`secondary`,children:`Confluence publication status is unavailable. Refresh the release context before publishing to avoid creating a duplicate page.`}):null]})]})]})},$e=({entityId:e,...t})=>{let n=p(),r=m(n.state),i=ue(t.workspaceId,e,`${t.release.id}:${t.release.version}`,r,n.invalidateSession),a=Ze(i.state,t.release.id),o=i.state._tag===`idle`||i.state._tag===`loading`?{_tag:`loading`}:a===null?{_tag:`unavailable`}:{_tag:`ready`,target:a};return(0,Q.jsx)(Qe,{...t,confluencePage:o})},et=e=>{let[t]=a(),n=U(t.get(`from`)??``);return n!==null&&n.workspaceId===e.workspaceId?(0,Q.jsx)($e,{...e,entityId:n.entityId}):(0,Q.jsx)(Qe,{...e,confluencePage:{_tag:`none`}})},tt=({context:e})=>{switch(e.controller.state._tag){case`loading`:return(0,Q.jsx)(u,{description:`Control Center is loading the exact release and its collaborators.`,title:`Loading release context`});case`session`:return(0,Q.jsx)(u,{action:e.controller.state.reason===`anonymous`?(0,Q.jsx)(s,{to:`/pair`,children:`Pair this browser`}):void 0,description:`Release context must be available before Relay can answer.`,title:e.controller.state.reason===`blocked`?`Release access blocked`:`Release context unavailable`,tone:e.controller.state.reason===`blocked`?`critical`:`caution`});case`failed`:return(0,Q.jsx)(u,{action:(0,Q.jsx)(l,{onClick:e.controller.onRetry,children:`Try again`}),description:`Control Center could not load the release. Check the server, then try again.`,title:`Release context unavailable`,tone:`critical`});case`ready`:return(0,Q.jsx)(Q.Fragment,{})}},nt=()=>{let[e]=a(),t=$(e.get(`from`));return(0,Q.jsxs)(`section`,{"aria-labelledby":`agent-title`,className:Z.legacy,children:[(0,Q.jsxs)(`header`,{className:Z.legacyHeader,children:[(0,Q.jsx)(g,{className:Z.eyebrow,tone:`secondary`,variant:`label`,children:`Relay`}),(0,Q.jsx)(g,{as:`h1`,id:`agent-title`,variant:`verdict`,children:`Ask in context.`}),(0,Q.jsx)(g,{tone:`secondary`,variant:`body-large`,children:`Open Relay from a release to start an exact, release-owned thread.`})]}),(0,Q.jsxs)(_,{as:`section`,className:Z.legacyContext,padding:`spacious`,form:`grouped`,tone:`secondary`,children:[(0,Q.jsx)(g,{tone:`secondary`,variant:`label`,children:`Current context`}),(0,Q.jsx)(g,{as:`h2`,variant:`section-title`,children:t.label}),(0,Q.jsx)(g,{tone:`secondary`,children:t.description}),t.path===null?null:(0,Q.jsxs)(s,{className:Z.back,to:t.path,children:[`Return to `,t.label]})]}),(0,Q.jsxs)(_,{as:`section`,className:Z.legacyContext,padding:`spacious`,form:`grouped`,children:[(0,Q.jsx)(g,{tone:`secondary`,variant:`label`,children:`Choose a release`}),(0,Q.jsx)(g,{as:`h2`,variant:`section-title`,children:`Run Relay with an exact release context`}),(0,Q.jsx)(g,{tone:`secondary`,children:`Relay never runs as an unscoped chatbot. Choose the release whose evidence, freshness, and permissions should bound the thread before sending a message.`}),(0,Q.jsx)(s,{className:Z.back,to:`/releases`,children:`Choose a release to run Relay`})]})]})},rt=({originPath:e})=>{let t=H(),n=$(e);switch(t.state._tag){case`session`:return(0,Q.jsxs)(`section`,{"aria-labelledby":`agent-title`,className:Z.state,children:[(0,Q.jsx)(g,{as:`h2`,id:`agent-title`,variant:`section-title`,children:`Release context stays private`}),(0,Q.jsx)(u,{action:t.state.reason===`anonymous`?(0,Q.jsx)(s,{to:`/pair`,children:`Pair this browser`}):void 0,description:`Pair this browser before Relay reads a workspace release.`,title:`Pairing required`,tone:`caution`})]});case`loading`:return(0,Q.jsxs)(`section`,{"aria-labelledby":`agent-title`,className:Z.state,children:[(0,Q.jsx)(g,{as:`h2`,id:`agent-title`,variant:`section-title`,children:`Choosing a release`}),(0,Q.jsx)(u,{description:`Loading the releases for this page context.`,title:`Choosing a release`})]});case`failed`:return(0,Q.jsxs)(`section`,{"aria-labelledby":`agent-title`,className:Z.state,children:[(0,Q.jsx)(g,{as:`h2`,id:`agent-title`,variant:`section-title`,children:`Release context unavailable`}),(0,Q.jsx)(u,{action:(0,Q.jsx)(l,{onClick:t.onRetry,children:`Try again`}),description:`Relay could not load the releases needed to preserve this page context.`,title:`Release context unavailable`,tone:`critical`})]});case`ready`:{let{portfolio:r}=t.state,i=ke(r.workspaceId,r.releases,e);return i===void 0?(0,Q.jsxs)(`section`,{"aria-labelledby":`agent-title`,className:Z.legacy,children:[(0,Q.jsxs)(`header`,{className:Z.legacyHeader,children:[(0,Q.jsx)(g,{className:Z.eyebrow,tone:`secondary`,variant:`label`,children:`Relay`}),(0,Q.jsx)(g,{as:`h1`,id:`agent-title`,variant:`verdict`,children:`Choose a release.`}),(0,Q.jsx)(g,{tone:`secondary`,variant:`body-large`,children:`Relay will keep the exact page context below and answer inside the release you choose.`})]}),(0,Q.jsxs)(_,{as:`section`,className:Z.legacyContext,padding:`spacious`,form:`grouped`,tone:`secondary`,children:[(0,Q.jsx)(g,{tone:`secondary`,variant:`label`,children:`Calling page`}),(0,Q.jsx)(g,{as:`h2`,variant:`section-title`,children:n.label}),(0,Q.jsx)(g,{tone:`secondary`,children:n.description}),n.path===null?null:(0,Q.jsx)(s,{className:Z.back,to:n.path,children:`Return to calling page`})]}),r.releases.length===0?(0,Q.jsx)(u,{action:(0,Q.jsx)(s,{to:`/services`,children:`Connect a service`}),description:`Relay needs one synchronized release before it can start a scoped thread.`,title:`No releases available`}):(0,Q.jsx)(`div`,{"aria-label":`Releases available to Relay`,className:Z.presetList,children:r.releases.map(t=>(0,Q.jsxs)(s,{className:Z.preset,to:f(r.workspaceId,t.id,e),children:[(0,Q.jsx)(`strong`,{children:t.relay.codename}),(0,Q.jsxs)(`span`,{children:[t.serviceName,` · `,t.version]}),(0,Q.jsx)(`small`,{children:t.lifecycleLabel})]},t.id))})]}):(0,Q.jsx)(o,{replace:!0,to:i})}}},it=({availableProviders:e,loadConfluenceTemplates:t,providerCatalogPending:r=!1,runTurn:a,submitPublication:o=pe})=>{let c=n(),l=i(),d=V(l.workspaceId),f=B(l.releaseId);if(l.workspaceId===void 0&&l.releaseId===void 0)return(0,Q.jsx)(nt,{});if(d===null||f===null||c===null||c.workspaceId!==d)return(0,Q.jsx)(`section`,{className:Z.state,children:(0,Q.jsx)(u,{action:d===null?(0,Q.jsx)(s,{to:`/`,children:`Return to Control Center`}):void 0,description:`This address does not identify a release in the current workspace.`,title:`Release not found`})});if(c.controller.state._tag!==`ready`)return(0,Q.jsx)(tt,{context:c});let p=c.controller.state.portfolio.releases.find(e=>e.id===f);return p===void 0?(0,Q.jsx)(`section`,{className:Z.state,children:(0,Q.jsx)(u,{action:(0,Q.jsx)(s,{to:c.controller.state.portfolio.workspaceId===d?`/w/${d}/overview`:`/`,children:`Return to workspace`}),description:`This release does not exist in the current workspace snapshot.`,title:`Release not found`})}):(0,Q.jsx)(et,{availableProviders:e,...t===void 0?{}:{loadConfluenceTemplates:t},providerCatalogPending:r,release:p,runTurn:a,submitPublication:o,workspaceId:d},p.id)},at=({loadConfluenceTemplates:e=Oe,loadPresets:t=z,runTurn:n=fe}={})=>{let o=r(),[s]=a(),c=i(),[d,f]=(0,G.useState)({_tag:`loading`}),[p,m]=(0,G.useState)(0);(0,G.useEffect)(()=>{let e=new AbortController;return f({_tag:`loading`}),t(e.signal).then(t=>{e.signal.aborted||f({_tag:`ready`,providers:t})},()=>{e.signal.aborted||f({_tag:`failed`})}),()=>e.abort()},[p,t]);let ee=d._tag===`ready`?d.providers:void 0,te=c.workspaceId!==void 0||c.releaseId!==void 0,ne=Pe(s.get(`from`),`${o.pathname}${o.hash}`);return(0,Q.jsxs)(Q.Fragment,{children:[d._tag===`failed`?(0,Q.jsx)(`section`,{className:Z.state,children:(0,Q.jsx)(u,{action:(0,Q.jsx)(l,{onClick:()=>m(e=>e+1),children:`Retry agent presets`}),description:`Relay could not confirm the configured local runners. You can retry without leaving this release.`,title:`Agent presets could not be refreshed`,tone:`caution`})}):null,te?(0,Q.jsx)(it,{...ee===void 0?{}:{availableProviders:ee},loadConfluenceTemplates:e,providerCatalogPending:d._tag!==`ready`,runTurn:n}):(0,Q.jsx)(rt,{originPath:ne})]})};export{it as AgentPage,at as ConnectedAgentPage,We as boundedReleaseAgentHistory,Ze as confluencePageDraftTarget,$ as contextFor,ke as contextualSingleReleaseAgentPath,Xe as pageAwareAgentPrompt};
6
- //# sourceMappingURL=AgentPage-Cybynsnc.js.map
@@ -1,2 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-CwJFpaho.js";import{u as n}from"./hooks-K-sIfGqH.js";import{t as r}from"./lib-6h955hh9.js";import{t as i}from"./jsx-runtime-NZYk81nU.js";import{a,i as o,n as s,s as c}from"./Dialog-1WvU8GjA-C7r26HF0.js";import{d as l}from"./index-BWx9sNOT.js";import{v as u}from"./patterns-CxMz8DKX-ByHwV03y.js";import{r as d,t as f}from"./primitives-CW89TsFB-BBLwFFPo.js";import{Ci as p,Da as m,Ei as h,Gr as g,Hi as _,Ki as v,Mi as y,Ni as b,Pi as x,Va as S,er as C,fn as w,ma as T,pn as E,ri as D}from"./agent-api-CzdQFCcD.js";import{i as O,n as k,r as A}from"./presentWorkspaceItems-DfhyQeSY.js";import{t as j}from"./authorizedShareTransport-7YCNH9l3.js";var M=e(t(),1),N={page:`_page_m9pfd_1`,hero:`_hero_m9pfd_2`,item:`_item_m9pfd_3`,facts:`_facts_m9pfd_4`,itemHeader:`_itemHeader_m9pfd_24`},P=i(),F=3e4,I=e=>t=>S(t,`_tag`)&&t._tag===e,L=I(`NotFoundApiError`),R=I(`UnauthorizedApiError`),z=class extends v(`AuthorizedShareResolveError`){},B=({transport:e=j}={})=>{let t=n(),i=l(),v=C(w)(t.shareId),S=C(E)(t.workspaceId),I=m(v)?v.value:null,B=m(S)?S.value:null,V=i.state._tag===`authenticated`||i.state._tag===`storage-unavailable`?i.state.session:null,H=V!==null&&V.workspaceId===B?V:null,[U,W]=(0,M.useState)(0),[G,K]=(0,M.useState)({_tag:`idle`});if((0,M.useEffect)(()=>{if(I===null||B===null||H===null){K({_tag:`idle`});return}let t=new AbortController;K({_tag:`loading`});let n=x({try:()=>e.resolve(B,I,t.signal),catch:e=>new z({cause:e})}).pipe(b(e=>y(()=>{t.signal.aborted||K({_tag:`ready`,resolution:e})}))),r=p(n,_(T(F))).pipe(D(e=>y(()=>{t.signal.aborted||(R(e.cause)&&i.invalidateSession(H.sessionId),K(L(e.cause)?{_tag:`not-found`}:{_tag:`failed`}))})));return h(r,{signal:t.signal}).catch(()=>{t.signal.aborted||K({_tag:`failed`})}),()=>t.abort()},[i,U,H,I,e,B]),I===null||B===null)return(0,P.jsx)(c,{action:(0,P.jsx)(r,{to:`/`,children:`Return to Control Center`}),description:`This authorized link is malformed. No item was substituted.`,title:`Share unavailable`,tone:`caution`});if(i.state._tag===`checking`||G._tag===`loading`)return(0,P.jsxs)(`section`,{"aria-label":`Loading authorized share`,className:N.page,children:[(0,P.jsx)(o,{height:`8rem`,variant:`block`}),(0,P.jsx)(o,{height:`18rem`,variant:`block`})]});if(V===null)return(0,P.jsx)(c,{action:(0,P.jsx)(r,{to:`/pair`,children:`Pair this browser`}),description:`This link grants no bearer access. Pair as the selected person, then reopen it.`,title:`Authentication required`,tone:`caution`});if(V.workspaceId!==B)return(0,P.jsx)(c,{description:`This link is scoped to another workspace. No item was substituted.`,title:`Share unavailable`,tone:`caution`});if(G._tag===`not-found`)return(0,P.jsx)(c,{description:`The link may target another person, be expired or revoked, or point to a deleted item.`,title:`Share unavailable`,tone:`caution`});if(G._tag===`failed`||G._tag===`idle`)return(0,P.jsx)(c,{action:(0,P.jsx)(s,{onClick:()=>W(e=>e+1),children:`Try again`}),description:`Control Center could not resolve this authorized link.`,title:`Share unavailable`,tone:`caution`});let q=G.resolution.item.projection,J=A(q.details),Y=O(q.entityType,J);return(0,P.jsxs)(`article`,{className:N.page,children:[(0,P.jsxs)(`header`,{className:N.hero,children:[(0,P.jsx)(d,{as:`p`,tone:`secondary`,variant:`label`,children:`Authorized item`}),(0,P.jsx)(d,{as:`h1`,variant:`verdict`,children:`Exact scope. Nothing adjacent.`}),(0,P.jsx)(d,{tone:`secondary`,variant:`body-large`,children:`This view contains only the granted current item projection. Releases, relationships, and evidence remain private.`})]}),(0,P.jsxs)(f,{as:`section`,className:N.item,padding:`spacious`,tone:`secondary`,children:[(0,P.jsxs)(`div`,{className:N.itemHeader,children:[(0,P.jsx)(u,{service:k(q.entityType),size:`compact`}),(0,P.jsx)(a,{label:J,size:`compact`,tone:Y.tone})]}),(0,P.jsx)(d,{as:`p`,tone:`secondary`,variant:`label`,children:q.displayKey}),(0,P.jsx)(d,{as:`h2`,variant:`section-title`,children:q.title}),(0,P.jsxs)(`dl`,{className:N.facts,children:[(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`dt`,{children:`Type`}),(0,P.jsx)(`dd`,{children:q.entityType})]}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`dt`,{children:`Observed`}),(0,P.jsx)(`dd`,{children:g(G.resolution.item.recordedAt)})]}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`dt`,{children:`Expires`}),(0,P.jsx)(`dd`,{children:g(G.resolution.share.expiresAt)})]})]})]})]})};export{B as AuthorizedSharePage};
2
- //# sourceMappingURL=AuthorizedSharePage-tfTdXNjt.js.map
@@ -1,2 +0,0 @@
1
- import{Ai as e,Mi as t,Pi as n,Tn as r,_a as i,_i as a,ci as o,ga as s,ii as c,mi as l,ra as u,si as d,wn as f}from"./agent-api-CzdQFCcD.js";var p=e=>e.toString(16).padStart(2,`0`),m=e=>[e.subarray(0,4),e.subarray(4,6),e.subarray(6,8),e.subarray(8,10),e.subarray(10,16)].map(e=>Array.from(e,p).join(``)).join(`-`),h=()=>globalThis.crypto.getRandomValues(new Uint8Array(16));function g(e=h()){return e[6]=e[6]&15|64,e[8]=e[8]&63|128,e}var _=e=>m(e===void 0?g():g(e)),v=2**48-1;function y(e,t=h()){let n=Math.min(Math.max(0,Math.trunc(e)),v);return t[0]=Math.floor(n/2**40),t[1]=Math.floor(n/2**32)&255,t[2]=Math.floor(n/2**24)&255,t[3]=Math.floor(n/2**16)&255,t[4]=Math.floor(n/256)&255,t[5]=n&255,t[6]=t[6]&15|112,t[8]=t[8]&63|128,t}var b=(e,t)=>m(t===void 0?y(e):y(e,t)),x=`~effect/platform/Crypto`,S=i(`effect/Crypto`),C=n=>{let r=n.randomBytes,i=e=>a(w(`randomBytes`,e),r),o=e=>(e[0]&31)*2**48+e[1]*2**40+e[2]*2**32+e[3]*2**24+e[4]*2**16+e[5]*256+e[6],s=()=>o(r(7))/2**53,l=()=>{for(;;){let e=r(7),t=o(e);if(!(e[0]&32))return t+-(2**53-1);if(t<2**53-1)return t+1}};return S.of({[x]:x,randomBytes:i,nextDoubleUnsafe:s,nextIntUnsafe:l,digest:n.digest,random:t(()=>s()),randomBoolean:t(()=>s()>.5),randomInt:t(()=>l()),randomBetween:(e,n)=>t(()=>s()*(n-e)+e),randomIntBetween(e,n,r){let i=r?.halfOpen===!0?0:1;return t(()=>{let t=Math.ceil(e),r=Math.floor(n);return Math.floor(s()*(r-t+i))+t})},randomShuffle:e=>t(()=>{let t=Array.from(e);for(let e=t.length-1;e>=1;--e){let n=Math.min(e,Math.floor(s()*(e+1))),r=t[e];t[e]=t[n],t[n]=r}return t}),randomUUIDv4:t(()=>_(r(16))),randomUUIDv7:c(t=>e(b(t.currentTimeMillisUnsafe(),r(16))))})},w=(t,n)=>Number.isSafeInteger(n)&&n>=0?e(n):o(f({module:`Crypto`,method:t,description:`size must be a non-negative safe integer`})),T=s(`@effect/platform-browser/Crypto/WebCrypto`,{defaultValue:()=>globalThis.crypto}),E=u(S,l(function*(){let e=yield*T;return e?C({randomBytes:t=>{let n=new Uint8Array(t);for(let t=0;t<n.length;t+=65536)e.getRandomValues(n.subarray(t,t+65536));return n},digest:(t,i)=>typeof e.subtle.digest==`function`?a(n({try:()=>e.subtle.digest(t,new Uint8Array(i)),catch:e=>r({module:`Crypto`,method:`digest`,_tag:`Unknown`,description:`Could not compute digest`,cause:e})}),e=>new Uint8Array(e)):o(r({module:`Crypto`,method:`digest`,_tag:`Unknown`,description:`crypto.subtle.digest is not available`}))}):yield*d(Error(`Web Crypto API is not available`))}));export{S as n,E as t};
2
- //# sourceMappingURL=BrowserCrypto-DVxU0-Oc.js.map
@@ -1,2 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-CwJFpaho.js";import{d as n}from"./index-BWx9sNOT.js";import{Ei as r,Si as i,Va as a,Wa as o,mi as s}from"./agent-api-CzdQFCcD.js";import{o as c,t as l}from"./client-D2F6HlDk.js";var u=e(t(),1),d=s(function*(){return yield*(yield*l()).session.current()}).pipe(i(c)),f=e=>!a(e,`_tag`)||!o(e._tag)?{_tag:`unavailable`}:e._tag===`UnauthorizedApiError`?{_tag:`anonymous`}:e._tag===`ForbiddenApiError`?{_tag:`blocked`}:{_tag:`unavailable`},p=({loadSession:e=d}={})=>{let{beginHydration:t,completeHydration:i}=n();return(0,u.useEffect)(()=>{let n=t(),a=new AbortController,o=!0;return r(e,{signal:a.signal}).then(e=>{o&&i(n,{_tag:`authenticated`,csrfToken:e.csrfToken,session:e.session})},e=>{o&&i(n,f(e))}),()=>{o=!1,a.abort()}},[t,i,e]),null};export{p as BrowserSessionHydrator};
2
- //# sourceMappingURL=BrowserSessionHydrator-CvtvZstV.js.map
@@ -1,2 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-CwJFpaho.js";import{o as n,r}from"./hooks-K-sIfGqH.js";import{t as i}from"./lib-6h955hh9.js";import{t as a}from"./jsx-runtime-NZYk81nU.js";import{a as o,t as s}from"./Dialog-1WvU8GjA-C7r26HF0.js";import{r as c,s as l}from"./releasePaths-XoI2BHX3.js";import{d as u,s as d,u as f}from"./index-BWx9sNOT.js";import{v as p}from"./patterns-CxMz8DKX-ByHwV03y.js";import{Ei as m,Ga as h,Si as g,Wa as _,mi as v}from"./agent-api-CzdQFCcD.js";import{o as y,t as b}from"./client-D2F6HlDk.js";import{i as x,o as S}from"./releaseRoutes-CSP_eBj6.js";import{t as C}from"./presentPortfolio-c8-wbodG.js";import{n as w,r as T}from"./workspaceEntityRoutes-CFPO-iFw.js";import{n as E,t as D}from"./useWorkspaceItems-CHYpfLmL.js";import{t as O}from"./workspaceScrollCapture-DUj-_YMd.js";var k=e(t(),1),A=e=>{let t=new URLSearchParams,n=e.trim();return n.length>0&&t.set(`q`,n),t},j=(e,t)=>{let n=A(t),r=n.size===0?``:`?${n.toString()}`;return`${l(e)}${r}#results`},M=h(`UnauthorizedApiError`),N={load:e=>m(v(function*(){return yield*(yield*b()).portfolio.snapshot()}).pipe(g(y)),{signal:e})},P=e=>C(e).releases.map(t=>({codename:t.relay.codename,href:c(e.workspaceId,t.id),id:t.id,serviceName:t.serviceName,status:t.lifecycleLabel,tone:t.lifecycleTone,version:t.version})),F=(e,t,n=N)=>{let[r,i]=(0,k.useState)(0),[a,o]=(0,k.useState)({_tag:`idle`});(0,k.useEffect)(()=>{if(e===null){o({_tag:`idle`});return}let r=new AbortController;return o({_tag:`loading`,sessionKey:e}),n.load(r.signal).then(t=>{r.signal.aborted||o({_tag:`ready`,releases:P(t),sessionKey:e,workspaceId:t.workspaceId})},n=>{r.signal.aborted||(M(n)&&t(e),o({_tag:`failed`,sessionKey:e}))}),()=>r.abort()},[t,r,e,n]);let s=e===null?{_tag:`idle`}:a._tag===`idle`||a.sessionKey!==e?{_tag:`loading`,sessionKey:e}:a;return{retry:(0,k.useCallback)(()=>i(e=>e+1),[]),state:s}},I={trigger:`_trigger_dhy9p_1`,pairTrigger:`_pairTrigger_dhy9p_2`,dialog:`_dialog_dhy9p_13`,searchField:`_searchField_dhy9p_17`,results:`_results_dhy9p_43`,result:`_result_dhy9p_43`,resultCopy:`_resultCopy_dhy9p_69`,releaseMark:`_releaseMark_dhy9p_75`,resultKey:`_resultKey_dhy9p_96`,message:`_message_dhy9p_102`,loading:`_loading_dhy9p_103`,footer:`_footer_dhy9p_120`,visuallyHidden:`_visuallyHidden_dhy9p_149`},L=a(),R=2,z=6,B=new Set,V=e=>e.split(`-`).map(e=>`${e.charAt(0).toLocaleUpperCase(`en-US`)}${e.slice(1)}`).join(` `),H=e=>e===null?!1:`isContentEditable`in e&&e.isContentEditable===!0?!0:!(`nodeName`in e)||!_(e.nodeName)?!1:e.nodeName===`INPUT`||e.nodeName===`SELECT`||e.nodeName===`TEXTAREA`,U=(e,t)=>{let n=t.map(e=>e.toLocaleLowerCase(`en-US`));return n.some(t=>t===e)?0:n.some(t=>t.startsWith(e))?1:n.some(t=>t.includes(e))?2:3},W=(e,t,n)=>{let r=n.trim().toLocaleLowerCase(`en-US`);if(r.length===0)return[];let i=e.flatMap(e=>{let t=U(r,[e.codename,e.version,e.serviceName,e.status]);return t===3?[]:[{_tag:`release`,rank:t,release:e}]}),a=t.flatMap(e=>{let t=U(r,[e.key,e.title,e.status]);return t===3?[]:[{_tag:`item`,item:e,rank:t}]});return[...i,...a].sort((e,t)=>{if(e.rank!==t.rank)return e.rank-t.rank;if(e._tag!==t._tag)return e._tag===`release`?-1:1;let n=e._tag===`release`?e.release.codename:e.item.key,r=t._tag===`release`?t.release.codename:t.item.key;return n.localeCompare(r)}).slice(0,z)},G=({releaseTransport:e=N,sessionKey:t,transport:a=D,workspaceId:c})=>{let l=u(),f=r(),m=n(),h=(0,k.useRef)(null),[g,_]=(0,k.useState)(!1),[v,y]=(0,k.useState)(``),[b,C]=(0,k.useState)(0),A=v.trim(),M=(0,k.useDeferredValue)(A),P=M.length>=R,z=F(g?t:null,l.invalidateSession,e),U=z.state,G=(0,k.useMemo)(()=>U._tag===`ready`&&U.workspaceId===c?new Set(U.releases.map(({id:e})=>e)):B,[U,c]),K=U._tag===`ready`&&U.workspaceId===c,q=(0,k.useMemo)(()=>({owner:`all`,query:P?M:``,service:`all`,status:`all`,type:`all`}),[M,P]),J=E(c,G,q,U._tag===`ready`?U.releases.map(({id:e})=>e).join(`:`):`command-search`,g&&P&&K?t:null,l.invalidateSession,a),Y=K&&J.state._tag===`ready`&&!J.state.refreshing?W(U.releases,J.state.items,M):[],X=Y.length>0,Z=e=>{_(e),e||(y(``),C(0))};(0,k.useEffect)(()=>{let e=e=>{e.defaultPrevented||H(e.target)||e.key.toLocaleLowerCase(`en-US`)!==`k`||!e.metaKey&&!e.ctrlKey||(e.preventDefault(),_(!0))};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[]),(0,k.useEffect)(()=>C(0),[M]);let Q=e=>{if(Z(!1),e._tag===`release`){m(e.release.href,{state:x(c,e.release.id,S(f))});return}let t=e.item;O(f,t.href),m(t.href,{state:T(f.state,c,t.entityId,w(f))})};return(0,L.jsxs)(s.Root,{onOpenChange:Z,open:g,children:[(0,L.jsx)(s.Trigger,{className:I.trigger,size:`compact`,variant:`quiet`,children:`Search ⌘K`}),(0,L.jsxs)(s.Content,{className:I.dialog,description:`Find releases and current work, or continue with Relay.`,initialFocusRef:h,size:`wide`,title:`Go anywhere.`,children:[(0,L.jsxs)(`label`,{className:I.searchField,children:[(0,L.jsx)(`span`,{className:I.visuallyHidden,children:`Search workspace`}),(0,L.jsx)(`input`,{"aria-activedescendant":X?`command-search-option-${b}`:void 0,"aria-autocomplete":`list`,"aria-busy":M!==A||U._tag===`loading`||J.state._tag===`loading`,"aria-controls":X?`command-search-results`:void 0,"aria-expanded":X,"aria-label":`Search workspace`,autoComplete:`off`,maxLength:200,onChange:e=>y(e.currentTarget.value),onKeyDown:e=>{if(Y.length!==0){if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault();let t=e.key===`ArrowDown`?1:-1;C(e=>(e+t+Y.length)%Y.length);return}if(e.key===`Enter`){e.preventDefault();let t=Y[b];t!==void 0&&Q(t)}}},placeholder:`Release, ticket, PR, page, pipeline…`,ref:h,role:`combobox`,type:`search`,value:v})]}),A.length<R?(0,L.jsxs)(`div`,{className:I.message,children:[(0,L.jsx)(`strong`,{children:`Type two characters.`}),(0,L.jsx)(`span`,{children:`Search releases, tickets, pull requests, docs, pipelines, deployments, and time.`})]}):M!==A||U._tag===`idle`||U._tag===`loading`||J.state._tag===`idle`||J.state._tag===`loading`?(0,L.jsx)(`div`,{className:I.loading,children:`Searching the current workspace…`}):!K||J.state._tag===`failed`?(0,L.jsxs)(`div`,{className:I.message,children:[(0,L.jsx)(`strong`,{children:`Search is unavailable.`}),(0,L.jsx)(`span`,{children:`The release and item indexes were not changed.`}),(0,L.jsx)(`button`,{onClick:()=>{z.retry(),J.retry()},type:`button`,children:`Try again`})]}):Y.length===0?(0,L.jsxs)(`div`,{className:I.message,children:[(0,L.jsxs)(`strong`,{children:[`No release or current item matches “`,M,`”.`]}),(0,L.jsx)(`span`,{children:`Try a release name, version, key, title, or current status.`})]}):(0,L.jsx)(`div`,{"aria-label":`Workspace search results`,className:I.results,id:`command-search-results`,role:`listbox`,children:Y.map((e,t)=>{let n=e._tag===`release`,r=n?e.release.id:e.item.entityId;return(0,L.jsxs)(`button`,{"aria-selected":t===b,className:I.result,id:`command-search-option-${t}`,onClick:()=>Q(e),onMouseEnter:()=>C(t),role:`option`,type:`button`,children:[n?(0,L.jsx)(`span`,{className:I.releaseMark,children:`R`}):(0,L.jsx)(p,{service:e.item.service,size:`compact`}),(0,L.jsxs)(`span`,{className:I.resultCopy,children:[(0,L.jsx)(`span`,{className:I.resultKey,children:n?`${e.release.version} · Release`:e.item.key}),(0,L.jsx)(`strong`,{children:n?e.release.codename:e.item.title}),(0,L.jsx)(`span`,{children:n?e.release.serviceName:V(e.item.kind)})]}),(0,L.jsx)(o,{label:n?e.release.status:e.item.status,size:`compact`,tone:n?e.release.tone:e.item.tone})]},r)})}),(0,L.jsxs)(`footer`,{className:I.footer,children:[(0,L.jsx)(i,{onClick:()=>Z(!1),to:j(c,A),children:`Open item results`}),(0,L.jsx)(i,{onClick:()=>Z(!1),to:d(f.pathname,f.search,f.hash),children:`Ask Relay from here`}),(0,L.jsx)(`span`,{children:`↑↓ choose · Enter open · Esc close`})]})]})]})},K=e=>{let t=u(),n=t.state._tag===`authenticated`||t.state._tag===`storage-unavailable`?t.state.session:null,r=f(t.state);return n!==null&&n.workspaceId!==e.workspaceId?null:r===null?(0,L.jsx)(i,{className:I.pairTrigger,to:`/pair`,children:`Pair to search`}):(0,L.jsx)(G,{...e,sessionKey:r})};export{K as CommandSearch,W as commandSearchResults};
2
- //# sourceMappingURL=CommandSearch-Bf_oW_kD.js.map