@knpkv/control-center 0.8.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.
- package/dist/client/.vite/manifest.json +66 -66
- package/dist/client/assets/ActiveWorkPage-DKlotZGc.js +2 -0
- package/dist/client/assets/{ActiveWorkPage-C6lIQfjL.js.map → ActiveWorkPage-DKlotZGc.js.map} +1 -1
- package/dist/client/assets/{AgentPage-DqB5BilE.js → AgentPage-Cxm1gj2C.js} +3 -3
- package/dist/client/assets/{AgentPage-DqB5BilE.js.map → AgentPage-Cxm1gj2C.js.map} +1 -1
- package/dist/client/assets/{AtlassianOAuthCallbackPage-DzTO6SqN.js → AtlassianOAuthCallbackPage-fEFUJE2g.js} +2 -2
- package/dist/client/assets/{AtlassianOAuthCallbackPage-DzTO6SqN.js.map → AtlassianOAuthCallbackPage-fEFUJE2g.js.map} +1 -1
- package/dist/client/assets/{AuthorizedSharePage-V_E5giT7.js → AuthorizedSharePage-Dh7Y_gmJ.js} +2 -2
- package/dist/client/assets/{AuthorizedSharePage-V_E5giT7.js.map → AuthorizedSharePage-Dh7Y_gmJ.js.map} +1 -1
- package/dist/client/assets/{BrowserSessionHydrator-CEypgMkR.js → BrowserSessionHydrator-DkomS8Yl.js} +2 -2
- package/dist/client/assets/{BrowserSessionHydrator-CEypgMkR.js.map → BrowserSessionHydrator-DkomS8Yl.js.map} +1 -1
- package/dist/client/assets/{CommandSearch-syQMt_rx.js → CommandSearch-nf16HEqz.js} +2 -2
- package/dist/client/assets/{CommandSearch-syQMt_rx.js.map → CommandSearch-nf16HEqz.js.map} +1 -1
- package/dist/client/assets/{ItemsPage-Cr3--iJc.js → ItemsPage-Bok8Vpy4.js} +2 -2
- package/dist/client/assets/{ItemsPage-Cr3--iJc.js.map → ItemsPage-Bok8Vpy4.js.map} +1 -1
- package/dist/client/assets/{OpenPullRequestPage-BYoRmtui.js → OpenPullRequestPage-DdL7PhKZ.js} +2 -2
- package/dist/client/assets/{OpenPullRequestPage-BYoRmtui.js.map → OpenPullRequestPage-DdL7PhKZ.js.map} +1 -1
- package/dist/client/assets/{PairPage-ByOBKuBB.js → PairPage-BCtzYqK6.js} +2 -2
- package/dist/client/assets/{PairPage-ByOBKuBB.js.map → PairPage-BCtzYqK6.js.map} +1 -1
- package/dist/client/assets/{PortfolioOverview-BacOXO-c.js → PortfolioOverview-C-jqvYgQ.js} +2 -2
- package/dist/client/assets/{PortfolioOverview-BacOXO-c.js.map → PortfolioOverview-C-jqvYgQ.js.map} +1 -1
- package/dist/client/assets/{ReleaseRoute-C-MfQKnL.js → ReleaseRoute-cuvP4ug5.js} +2 -2
- package/dist/client/assets/{ReleaseRoute-C-MfQKnL.js.map → ReleaseRoute-cuvP4ug5.js.map} +1 -1
- package/dist/client/assets/{ReleaseWorkset-MV3I0HCi.js → ReleaseWorkset-DImwmjS3.js} +2 -2
- package/dist/client/assets/{ReleaseWorkset-MV3I0HCi.js.map → ReleaseWorkset-DImwmjS3.js.map} +1 -1
- package/dist/client/assets/{ServicesPage-BjeCOlsh.js → ServicesPage-CrM8R820.js} +2 -2
- package/dist/client/assets/{ServicesPage-BjeCOlsh.js.map → ServicesPage-CrM8R820.js.map} +1 -1
- package/dist/client/assets/{TimelinePage-Ccnp6Mmg.js → TimelinePage-FrvepGa_.js} +2 -2
- package/dist/client/assets/{TimelinePage-Ccnp6Mmg.js.map → TimelinePage-FrvepGa_.js.map} +1 -1
- package/dist/client/assets/{WorkspaceEntityLink-D3TXDcD0.js → WorkspaceEntityLink-CAj42f02.js} +2 -2
- package/dist/client/assets/{WorkspaceEntityLink-D3TXDcD0.js.map → WorkspaceEntityLink-CAj42f02.js.map} +1 -1
- package/dist/client/assets/WorkspaceEntityRoute-rQ9ccetx.js +14 -0
- package/dist/client/assets/{WorkspaceEntityRoute-uUK6vwM_.js.map → WorkspaceEntityRoute-rQ9ccetx.js.map} +1 -1
- package/dist/client/assets/WorkspaceHomeLink-ObQ3AQVw.js +2 -0
- package/dist/client/assets/{WorkspaceHomeLink-D5SdEgJJ.js.map → WorkspaceHomeLink-ObQ3AQVw.js.map} +1 -1
- package/dist/client/assets/{WorkspacePullRequestDetails-CKedGIT8.js → WorkspacePullRequestDetails-BhxoqR7V.js} +2 -2
- package/dist/client/assets/{WorkspacePullRequestDetails-CKedGIT8.js.map → WorkspacePullRequestDetails-BhxoqR7V.js.map} +1 -1
- package/dist/client/assets/{WorkspaceReleaseLayout-Bdvl0q99.js → WorkspaceReleaseLayout-BWL66Fff.js} +2 -2
- package/dist/client/assets/{WorkspaceReleaseLayout-Bdvl0q99.js.map → WorkspaceReleaseLayout-BWL66Fff.js.map} +1 -1
- package/dist/client/assets/{WorkspaceSettingsPage-BxFq65Vf.js → WorkspaceSettingsPage-DutfiGPe.js} +2 -2
- package/dist/client/assets/{WorkspaceSettingsPage-BxFq65Vf.js.map → WorkspaceSettingsPage-DutfiGPe.js.map} +1 -1
- package/dist/client/assets/{controlCenterRelayDock-D7375HPG.js → controlCenterRelayDock-CyYeXh75.js} +3 -3
- package/dist/client/assets/{controlCenterRelayDock-D7375HPG.js.map → controlCenterRelayDock-CyYeXh75.js.map} +1 -1
- package/dist/client/assets/{controlCenterRelayDockChrome-B7jSUI3t.js → controlCenterRelayDockChrome-upgtq649.js} +2 -2
- package/dist/client/assets/{controlCenterRelayDockChrome-B7jSUI3t.js.map → controlCenterRelayDockChrome-upgtq649.js.map} +1 -1
- package/dist/client/assets/{index-BVikncBH.js → index-kmYFvwT0.js} +3 -3
- package/dist/client/assets/{index-BVikncBH.js.map → index-kmYFvwT0.js.map} +1 -1
- package/dist/client/assets/patterns-DuFUSnJW.js +2 -0
- package/dist/client/assets/patterns-DuFUSnJW.js.map +1 -0
- package/dist/client/assets/{useWorkspaceDefaultLanding-DMWfrZfF.js → useWorkspaceDefaultLanding-BmaR7aTj.js} +2 -2
- package/dist/client/assets/{useWorkspaceDefaultLanding-DMWfrZfF.js.map → useWorkspaceDefaultLanding-BmaR7aTj.js.map} +1 -1
- package/dist/client/assets/{workspaceEntityRoutes-BJ-SC0Jd.js → workspaceEntityRoutes-BHccxrFj.js} +2 -2
- package/dist/client/assets/{workspaceEntityRoutes-BJ-SC0Jd.js.map → workspaceEntityRoutes-BHccxrFj.js.map} +1 -1
- package/dist/client/assets/{workspaceScrollCapture-CwBIBHg8.js → workspaceScrollCapture-BzsNJoL7.js} +2 -2
- package/dist/client/assets/{workspaceScrollCapture-CwBIBHg8.js.map → workspaceScrollCapture-BzsNJoL7.js.map} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/assets/{BindConfig-D8aIjI_R.js → BindConfig-BG-FGtB5.js} +13 -4
- package/dist/server/assets/BindConfig-BG-FGtB5.js.map +1 -0
- package/dist/server/server/cli.js +1 -1
- package/dist/server/server/index.js +1 -1
- package/package.json +5 -5
- package/dist/client/assets/ActiveWorkPage-C6lIQfjL.js +0 -2
- package/dist/client/assets/WorkspaceEntityRoute-uUK6vwM_.js +0 -14
- package/dist/client/assets/WorkspaceHomeLink-D5SdEgJJ.js +0 -2
- package/dist/client/assets/patterns-DAeEdyxU.js +0 -2
- package/dist/client/assets/patterns-DAeEdyxU.js.map +0 -1
- package/dist/server/assets/BindConfig-D8aIjI_R.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"mappings":";ghBAEM,IAA2B,MAAM,EAAiB,EAAG,EAAkB,EAAG,EAAmB,GAAG,CAAC,CAAC,CAAC,KAAK,EAAa,iBAAiB,CAAC,EAChI,EAAsB,EAAc,CAC7C,GAAI,EACJ,QAAqB,MAAM,EAAiB,EAAG,EAAkB,EAAG,EAAmB,GAAG,CAAC,CAC/F,CAAC,EACK,EAA0B,EAAc,CAC1C,QAAS,EACT,OAAQ,EAAa,CAAmB,CAAC,CAAC,MAAM,EAAmB,CAAC,CAAC,EACrE,UAAW,EACX,SAAU,EAAa,CAAmB,CAAC,CAAC,MAAM,EAAmB,CAAC,CAAC,CAC3E,CAAC,EACK,EAAsB,GAAY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wB,EAAW,UAAW,CAAS,EACrF,CAAC,EAAW,SAAS,EACrB,CAAC,EACP,IAAK,YACH,OAAO,IAAc,OACjB,EAAW,WACX,EAAW,WAAW,OAAQ,GAAc,EAAwB,EAAW,CAAS,CAAC,EAC/F,IAAK,+BACL,IAAK,YACH,MAAO,CAAC,CACZ,CACF,EAEa,IACX,EACA,IACyC,CACzC,IAAM,EAAU,GAAuC,EAAY,CAAS,EAC5E,OAAO,EAAQ,SAAW,EAAI,EAAQ,GAAK,MAC7C,EAEa,GAAoC,GAAiE,CAChH,IAAM,EAAU,EAA2B,CAAkB,CAAC,CAAC,CAAK,EACpE,GAAI,EAAiB,CAAO,EAAG,MAAM,IAAI,EAAmC,CAAE,SAAU,UAAW,CAAC,EACpG,OAAO,EAAQ,OACjB,EAEa,GACX,GAC4B,CAC5B,IAAM,EAAU,EAA2B,CAAuB,CAAC,CAAC,CAAK,EACzE,GAAI,EAAiB,CAAO,EAAG,MAAM,IAAI,EAAmC,CAAE,SAAU,cAAe,CAAC,EACxG,OAAO,EAAQ,OACjB,EAEa,GAAkC,GAAiC,CAC9E,QAAS,qBACT,OAAQ,CAAC,CAAE,GAAI,qBAAsB,MAAO,oBAAqB,CAAC,EAClE,UAAW,mBACX,SAAU,CAAC,CAAE,GAAI,mBAAoB,MAAO,qBAAsB,CAAC,CACrE,CAAC","names":[],"ignoreList":[],"sources":["../../../../relay-product/dist/model.js","../../../../relay-product/dist/conversation.js","../../../../relay-product/dist/dock.js","../../../src/client/controlCenterRelayDock.tsx"],"sourcesContent":["import * as Effect from \"effect/Effect\";\nimport * as Schema from \"effect/Schema\";\nconst SelectorId = Schema.String.check(Schema.isTrimmed(), Schema.isNonEmpty(), Schema.isMaxLength(200)).pipe(Schema.brand(\"RelaySelectorId\"));\nexport const RelaySelectorOption = Schema.Struct({\n id: SelectorId,\n label: Schema.String.check(Schema.isTrimmed(), Schema.isNonEmpty(), Schema.isMaxLength(200))\n});\nconst RelaySelectorStateInput = Schema.Struct({\n modelId: SelectorId,\n models: Schema.Array(RelaySelectorOption).check(Schema.isMinLength(1)),\n profileId: SelectorId,\n profiles: Schema.Array(RelaySelectorOption).check(Schema.isMinLength(1))\n});\nconst hasUniqueOptionIds = (options) => new Set(options.map(({ id }) => id)).size === options.length;\nexport const RelaySelectorState = RelaySelectorStateInput.check(Schema.makeFilter(({ profiles }) => hasUniqueOptionIds(profiles), {\n expected: \"unique Relay profile option identifiers\"\n}), Schema.makeFilter(({ models }) => hasUniqueOptionIds(models), {\n expected: \"unique Relay model option identifiers\"\n}), Schema.makeFilter(({ profileId, profiles }) => profiles.some(({ id }) => id === profileId), {\n expected: \"a selected Relay profile present in the profile options\"\n}), Schema.makeFilter(({ modelId, models }) => models.some(({ id }) => id === modelId), {\n expected: \"a selected Relay model present in the model options\"\n}));\nexport const RelayDockState = Schema.TaggedUnion({\n collapsed: {},\n expanded: {}\n});\nexport const RelayState = Schema.Struct({\n dock: RelayDockState,\n selection: RelaySelectorState\n});\nexport class InvalidRelaySelectorState extends Schema.TaggedError()(\"InvalidRelaySelectorState\", {\n reason: Schema.Literals([\n \"duplicate-model\",\n \"duplicate-profile\",\n \"invalid-input\",\n \"model-not-found\",\n \"profile-not-found\"\n ])\n}) {\n}\nconst decodeSelectorStateInput = Schema.decodeUnknownEffect(RelaySelectorStateInput);\n/** Decode the visible selector state and initialize the product-owned dock as collapsed. */\nexport const makeInitialRelayState = Effect.fn(\"RelayProduct.makeInitialRelayState\")(function* (input) {\n const selection = yield* decodeSelectorStateInput(input).pipe(Effect.mapError(() => new InvalidRelaySelectorState({ reason: \"invalid-input\" })));\n if (!hasUniqueOptionIds(selection.profiles)) {\n return yield* new InvalidRelaySelectorState({ reason: \"duplicate-profile\" });\n }\n if (!hasUniqueOptionIds(selection.models)) {\n return yield* new InvalidRelaySelectorState({ reason: \"duplicate-model\" });\n }\n if (!selection.profiles.some(({ id }) => id === selection.profileId)) {\n return yield* new InvalidRelaySelectorState({ reason: \"profile-not-found\" });\n }\n if (!selection.models.some(({ id }) => id === selection.modelId)) {\n return yield* new InvalidRelaySelectorState({ reason: \"model-not-found\" });\n }\n return RelayState.make({\n dock: RelayDockState.cases.collapsed.make({}),\n selection: RelaySelectorState.make(selection)\n });\n});\n//# sourceMappingURL=model.js.map","import * as Context from \"effect/Context\";\nimport * as Effect from \"effect/Effect\";\nimport * as Layer from \"effect/Layer\";\nimport * as Schema from \"effect/Schema\";\nimport { RelaySelectorState } from \"./model.js\";\nconst trimmedIdentifier = (maximumLength) => Schema.String.check(Schema.isTrimmed(), Schema.isNonEmpty(), Schema.isMaxLength(maximumLength));\nconst canonicalUuid = (brand) => Schema.String.check(Schema.isUUID(7), Schema.isPattern(/^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u, {\n expected: \"a canonical lowercase UUID v7\"\n})).pipe(Schema.brand(brand));\nexport const AgenticProduct = Schema.Literals([\"codecommit\", \"control-center\"]);\nexport const RelayProductOperation = Schema.Literals([\n \"continue-pull-request-conversation\",\n \"locate-pull-request-conversation\"\n]);\nconst PrincipalId = trimmedIdentifier(200).pipe(Schema.brand(\"RelayPrincipalId\"));\nconst WorkspaceId = canonicalUuid(\"RelayWorkspaceId\");\nconst PluginConnectionId = canonicalUuid(\"RelayPluginConnectionId\");\nconst EntityId = canonicalUuid(\"RelayEntityId\");\nconst RepositoryName = trimmedIdentifier(1_000).pipe(Schema.brand(\"RelayRepositoryName\"));\nconst PullRequestId = trimmedIdentifier(200).pipe(Schema.brand(\"RelayPullRequestId\"));\nconst AccountId = trimmedIdentifier(200).pipe(Schema.brand(\"RelayAccountId\"));\nconst Region = trimmedIdentifier(100).pipe(Schema.brand(\"RelayRegion\"));\nconst ProductPath = Schema.String.check(Schema.isTrimmed(), Schema.isNonEmpty(), Schema.isMaxLength(4_096), Schema.isPattern(/^\\/(?!\\/)/u, { expected: \"an application-owned absolute path\" }));\nexport const ProductAuthorization = Schema.TaggedUnion({\n codecommit: {\n principalId: PrincipalId\n },\n \"control-center\": {\n principalId: PrincipalId,\n workspaceId: WorkspaceId\n }\n});\n/** Provider identity a host agent may use to find one PR conversation. */\nexport const PullRequestConversationLocator = Schema.Struct({\n accountId: Schema.optionalKey(AccountId),\n provider: Schema.Literal(\"codecommit\"),\n pullRequestId: PullRequestId,\n region: Region,\n repositoryName: RepositoryName\n});\nconst ControlCenterThreadIdentity = Schema.Struct({\n pluginConnectionId: PluginConnectionId,\n pullRequestId: PullRequestId,\n repositoryName: RepositoryName,\n workspaceId: WorkspaceId\n});\nconst CodeCommitThreadIdentity = Schema.Struct({\n accountId: AccountId,\n pullRequestId: PullRequestId,\n region: Region,\n repositoryName: RepositoryName\n});\nconst ControlCenterPullRequestRoute = Schema.Struct({\n entityId: EntityId,\n href: ProductPath\n});\nconst CodeCommitPullRequestRoute = Schema.Struct({\n accountId: AccountId,\n href: ProductPath,\n /** Credential/account alias used by the browser URL; accountId stays canonical. */\n pullRequestId: PullRequestId,\n routeAccountId: Schema.optionalKey(AccountId)\n});\n/** Stable product-qualified identity. Head revisions never participate in thread identity. */\nexport const PullRequestThreadIdentity = Schema.TaggedUnion({\n codecommit: {\n ...CodeCommitThreadIdentity.fields\n },\n \"control-center\": {\n ...ControlCenterThreadIdentity.fields\n }\n});\n/** Durable thread identity, exact product route, and explicit Relay selection for one PR. */\nexport const PullRequestConversation = Schema.TaggedUnion({\n codecommit: {\n route: CodeCommitPullRequestRoute,\n selection: RelaySelectorState,\n thread: CodeCommitThreadIdentity\n },\n \"control-center\": {\n route: ControlCenterPullRequestRoute,\n selection: RelaySelectorState,\n thread: ControlCenterThreadIdentity\n }\n}).check(Schema.makeFilter((conversation) => {\n switch (conversation._tag) {\n case \"codecommit\":\n return (conversation.route.accountId === conversation.thread.accountId &&\n conversation.route.pullRequestId === conversation.thread.pullRequestId &&\n conversation.route.href ===\n `/accounts/${encodeURIComponent(conversation.route.routeAccountId ?? conversation.route.accountId)}/prs/${encodeURIComponent(conversation.route.pullRequestId)}`);\n case \"control-center\":\n return (conversation.route.href ===\n `/w/${conversation.thread.workspaceId}/items/${conversation.route.entityId}`);\n }\n}, { expected: \"a product-qualified thread paired with its exact pull-request route\" }));\nexport const pullRequestThreadIdentity = (conversation) => {\n switch (conversation._tag) {\n case \"codecommit\":\n return PullRequestThreadIdentity.cases.codecommit.make(conversation.thread);\n case \"control-center\":\n return PullRequestThreadIdentity.cases[\"control-center\"].make(conversation.thread);\n }\n};\nexport const PullRequestContinuationMessage = Schema.String.check(Schema.isTrimmed(), Schema.isNonEmpty(), Schema.isMaxLength(8_000)).pipe(Schema.brand(\"PullRequestContinuationMessage\"));\nexport const ContinuePullRequestConversationRequest = Schema.Struct({\n conversation: PullRequestConversation,\n message: PullRequestContinuationMessage,\n selection: RelaySelectorState\n});\nconst ContinuationMessageId = trimmedIdentifier(200).pipe(Schema.brand(\"RelayContinuationMessageId\"));\nexport const PullRequestConversationContinuation = Schema.Struct({\n messageId: ContinuationMessageId,\n thread: PullRequestThreadIdentity\n});\nexport class RelayAuthenticationRequired extends Schema.TaggedError()(\"RelayAuthenticationRequired\", {\n operation: RelayProductOperation,\n product: AgenticProduct\n}) {\n}\nexport class RelayAuthorizationDenied extends Schema.TaggedError()(\"RelayAuthorizationDenied\", {\n operation: RelayProductOperation,\n product: AgenticProduct\n}) {\n}\nexport class RelayAuthenticationUnavailable extends Schema.TaggedError()(\"RelayAuthenticationUnavailable\", {\n operation: RelayProductOperation,\n product: AgenticProduct\n}) {\n}\nexport class PullRequestConversationNotFound extends Schema.TaggedError()(\"PullRequestConversationNotFound\", {\n product: AgenticProduct,\n pullRequestId: PullRequestId,\n repositoryName: RepositoryName\n}) {\n}\nexport class PullRequestConversationAmbiguous extends Schema.TaggedError()(\"PullRequestConversationAmbiguous\", {\n matches: Schema.Int.check(Schema.isGreaterThan(1)),\n product: AgenticProduct,\n pullRequestId: PullRequestId,\n repositoryName: RepositoryName\n}) {\n}\nexport class PullRequestConversationLookupFailed extends Schema.TaggedError()(\"PullRequestConversationLookupFailed\", {\n product: AgenticProduct\n}) {\n}\nexport class PullRequestConversationRedirectFailed extends Schema.TaggedError()(\"PullRequestConversationRedirectFailed\", {\n href: ProductPath,\n product: AgenticProduct\n}) {\n}\nexport class PullRequestConversationContinuationRejected extends Schema.TaggedError()(\"PullRequestConversationContinuationRejected\", {\n product: AgenticProduct,\n reason: Schema.Literals([\"conversation-busy\", \"selection-unavailable\", \"thread-not-found\"]),\n thread: PullRequestThreadIdentity\n}) {\n}\nexport class PullRequestConversationContinuationFailed extends Schema.TaggedError()(\"PullRequestConversationContinuationFailed\", {\n product: AgenticProduct,\n thread: PullRequestThreadIdentity\n}) {\n}\nexport class RelayProductAdapterContractError extends Schema.TaggedError()(\"RelayProductAdapterContractError\", {\n actualProduct: AgenticProduct,\n expectedProduct: AgenticProduct,\n operation: RelayProductOperation\n}) {\n}\nexport class RelayProductContinuationReceiptMismatch extends Schema.TaggedError()(\"RelayProductContinuationReceiptMismatch\", {\n actualThread: PullRequestThreadIdentity,\n expectedThread: PullRequestThreadIdentity\n}) {\n}\nexport class RelayProduct extends Context.Service()(\"@knpkv/relay-product/RelayProduct\") {\n}\nconst requireProduct = (expectedProduct, actualProduct, operation) => expectedProduct === actualProduct\n ? Effect.void\n : new RelayProductAdapterContractError({ actualProduct, expectedProduct, operation });\nconst samePullRequestThread = (left, right) => {\n if (left._tag !== right._tag)\n return false;\n switch (left._tag) {\n case \"codecommit\":\n return (right._tag === \"codecommit\" &&\n left.accountId === right.accountId &&\n left.pullRequestId === right.pullRequestId &&\n left.region === right.region &&\n left.repositoryName === right.repositoryName);\n case \"control-center\":\n return (right._tag === \"control-center\" &&\n left.pluginConnectionId === right.pluginConnectionId &&\n left.pullRequestId === right.pullRequestId &&\n left.repositoryName === right.repositoryName &&\n left.workspaceId === right.workspaceId);\n }\n};\n/** One orchestration path shared by Control Center and CodeCommit product ports. */\nexport const makeRelayProductAdapter = (port) => {\n const openPullRequestConversation = Effect.fn(\"RelayProduct.openPullRequestConversation\")(function* (locator) {\n const operation = \"locate-pull-request-conversation\";\n const authorization = yield* port.authorize(operation);\n yield* requireProduct(port.product, authorization._tag, operation);\n const conversation = yield* port.locatePullRequestConversation(authorization, locator);\n yield* requireProduct(port.product, conversation._tag, operation);\n yield* port.redirectToPullRequest(conversation);\n return conversation;\n });\n const continuePullRequestConversation = Effect.fn(\"RelayProduct.continuePullRequestConversation\")(function* (request) {\n const operation = \"continue-pull-request-conversation\";\n const authorization = yield* port.authorize(operation);\n yield* requireProduct(port.product, authorization._tag, operation);\n yield* requireProduct(port.product, request.conversation._tag, operation);\n const receipt = yield* port.continuePullRequestConversation(authorization, request);\n const expectedThread = pullRequestThreadIdentity(request.conversation);\n if (!samePullRequestThread(expectedThread, receipt.thread)) {\n return yield* new RelayProductContinuationReceiptMismatch({\n actualThread: receipt.thread,\n expectedThread\n });\n }\n return receipt;\n });\n return RelayProduct.of({ continuePullRequestConversation, openPullRequestConversation });\n};\nexport const layer = (port) => Layer.succeed(RelayProduct, makeRelayProductAdapter(port));\n//# sourceMappingURL=conversation.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as Cause from \"effect/Cause\";\nimport * as Data from \"effect/Data\";\nimport * as Effect from \"effect/Effect\";\nimport * as Exit from \"effect/Exit\";\nimport * as Result from \"effect/Result\";\nimport * as Schema from \"effect/Schema\";\nimport { Component, lazy, Suspense, useCallback, useEffect, useRef, useState } from \"react\";\nimport { ContinuePullRequestConversationRequest, PullRequestConversationLocator, pullRequestThreadIdentity } from \"./conversation.js\";\nimport { RelayProductDockProvider, useRelayProductDockRegistration } from \"./registry.js\";\nexport class RelayProductDockInvariantViolation extends Data.TaggedError(\"RelayProductDockInvariantViolation\") {\n}\nconst LazyRelayDock = lazy(async () => {\n const patterns = await import(\"@knpkv/rly/patterns\");\n return { default: patterns.RelayDock };\n});\n/** Keep routed product content mounted when optional Relay chrome cannot load. */\nexport class RelayProductDockChromeBoundary extends Component {\n state = { failed: false };\n static getDerivedStateFromError(cause) {\n void cause;\n return { failed: true };\n }\n render() {\n return this.state.failed ? null : this.props.children;\n }\n}\nconst actionFailureDescription = (failure) => {\n switch (failure._tag) {\n case \"RelayAuthenticationRequired\":\n return \"Authenticate with this product before using its Relay conversations.\";\n case \"RelayAuthorizationDenied\":\n return \"This session cannot use Relay for pull-request conversations.\";\n case \"RelayAuthenticationUnavailable\":\n return \"The product authentication boundary is unavailable.\";\n case \"PullRequestConversationNotFound\":\n return `No Relay conversation matches ${failure.repositoryName} PR #${failure.pullRequestId}.`;\n case \"PullRequestConversationAmbiguous\":\n return `${String(failure.matches)} Relay conversations match this pull request; include its account.`;\n case \"PullRequestConversationLookupFailed\":\n return \"Relay could not search the product's pull-request conversations.\";\n case \"PullRequestConversationRedirectFailed\":\n return \"Relay found the conversation but could not open its exact pull-request page.\";\n case \"PullRequestConversationContinuationRejected\":\n return failure.reason === \"conversation-busy\"\n ? \"This pull-request conversation already has a run in progress.\"\n : failure.reason === \"selection-unavailable\"\n ? \"The selected Relay profile or model is no longer available.\"\n : \"This pull-request conversation no longer exists.\";\n case \"PullRequestConversationContinuationFailed\":\n return \"Relay could not continue this pull-request conversation.\";\n case \"RelayProductAdapterContractError\":\n return \"The active product does not own this pull-request conversation.\";\n case \"RelayProductContinuationReceiptMismatch\":\n return \"Relay returned a continuation receipt for another pull-request conversation.\";\n }\n};\nconst failureFromCause = (cause) => {\n const failure = cause.reasons.find(Cause.isFailReason);\n return failure === undefined\n ? \"Relay ended unexpectedly. No request was accepted.\"\n : actionFailureDescription(failure.error);\n};\nconst useRelayDockAction = () => {\n const [state, setState] = useState({ description: null, pending: false });\n const request = useRef(0);\n useEffect(() => () => {\n request.current += 1;\n }, []);\n const run = useCallback((effect) => {\n request.current += 1;\n const current = request.current;\n setState({ description: null, pending: true });\n void Effect.runPromiseExit(effect).then((exit) => {\n if (request.current !== current)\n return;\n setState(Exit.isSuccess(exit)\n ? { description: null, pending: false }\n : { description: failureFromCause(exit.cause), pending: false });\n });\n }, []);\n return [state, run];\n};\nconst HostConversationLocator = ({ host }) => {\n const [accountId, setAccountId] = useState(\"\");\n const [pullRequestId, setPullRequestId] = useState(\"\");\n const [region, setRegion] = useState(\"\");\n const [repositoryName, setRepositoryName] = useState(\"\");\n const [validation, setValidation] = useState(null);\n const [action, runAction] = useRelayDockAction();\n const submit = (event) => {\n event.preventDefault();\n const account = accountId.trim();\n const locatorInput = account.length === 0\n ? {\n provider: \"codecommit\",\n pullRequestId: pullRequestId.trim(),\n region: region.trim(),\n repositoryName: repositoryName.trim()\n }\n : {\n accountId: account,\n provider: \"codecommit\",\n pullRequestId: pullRequestId.trim(),\n region: region.trim(),\n repositoryName: repositoryName.trim()\n };\n const decoded = Schema.decodeUnknownResult(PullRequestConversationLocator)(locatorInput);\n if (Result.isFailure(decoded)) {\n setValidation(\"Enter a region, repository, and pull-request number.\");\n return;\n }\n setValidation(null);\n runAction(host.locatePullRequestConversation(decoded.success));\n };\n return (_jsxs(\"form\", { \"aria-label\": \"Find a pull request conversation\", onSubmit: submit, children: [_jsx(\"h2\", { children: \"Find a pull request conversation\" }), _jsx(\"p\", { children: \"Relay opens the exact product page before continuing a PR thread.\" }), _jsxs(\"label\", { children: [_jsx(\"span\", { children: \"Region\" }), _jsx(\"input\", { onChange: (event) => setRegion(event.currentTarget.value), value: region })] }), _jsxs(\"label\", { children: [_jsx(\"span\", { children: \"Repository\" }), _jsx(\"input\", { onChange: (event) => setRepositoryName(event.currentTarget.value), value: repositoryName })] }), _jsxs(\"label\", { children: [_jsx(\"span\", { children: \"Pull request\" }), _jsx(\"input\", { inputMode: \"numeric\", onChange: (event) => setPullRequestId(event.currentTarget.value), value: pullRequestId })] }), _jsxs(\"label\", { children: [_jsx(\"span\", { children: \"Account (optional)\" }), _jsx(\"input\", { onChange: (event) => setAccountId(event.currentTarget.value), value: accountId })] }), validation === null && action.description === null ? null : (_jsx(\"p\", { \"aria-live\": \"assertive\", role: \"alert\", children: validation ?? action.description })), _jsx(\"button\", { disabled: action.pending, type: \"submit\", children: action.pending ? \"Opening PR conversation…\" : \"Open PR conversation\" })] }));\n};\nconst ThreadMessages = ({ messages }) => messages.length === 0 ? (_jsx(\"p\", { children: \"No Relay turns yet. The first message starts this PR's durable thread.\" })) : (_jsx(\"ol\", { \"aria-label\": \"Pull request conversation\", children: messages.map((message) => (_jsxs(\"li\", { \"data-relay-message-role\": message.role, children: [_jsx(\"strong\", { children: message.role === \"relay\" ? \"Relay\" : message.role === \"operator\" ? \"You\" : \"System\" }), _jsx(\"p\", { children: message.text })] }, message.id))) }));\nexport const relaySelectionMatchesRegistration = (selection, registration) => registration.selection.profiles.some(({ id }) => id === selection.profileId) &&\n registration.selection.models.some(({ id }) => id === selection.modelId);\nconst PullRequestContinuation = ({ registration, selection }) => {\n const [message, setMessage] = useState(\"\");\n const [validation, setValidation] = useState(null);\n const [action, runAction] = useRelayDockAction();\n const selectionMatchesRegistration = relaySelectionMatchesRegistration(selection, registration);\n const submit = (event) => {\n event.preventDefault();\n if (!selectionMatchesRegistration) {\n setValidation(\"Rerun Relay with the selected profile or model before continuing this PR thread.\");\n return;\n }\n const decoded = Schema.decodeUnknownResult(ContinuePullRequestConversationRequest)({\n conversation: registration.conversation,\n message: message.trim(),\n selection\n });\n if (Result.isFailure(decoded)) {\n setValidation(\"Enter a pull-request request of 8,000 characters or fewer.\");\n return;\n }\n setValidation(null);\n runAction(registration\n .continuePullRequestConversation(decoded.success)\n .pipe(Effect.tap(() => Effect.sync(() => setMessage(\"\")))));\n };\n return (_jsxs(\"form\", { \"aria-label\": \"Continue pull request conversation\", onSubmit: submit, children: [_jsxs(\"label\", { children: [_jsx(\"span\", { children: \"Continue this PR thread\" }), _jsx(\"textarea\", { maxLength: 8_000, onChange: (event) => setMessage(event.currentTarget.value), placeholder: \"Ask Relay to verify one concrete part of this pull request\\u2026\", rows: 3, value: message })] }), validation === null && action.description === null ? null : (_jsx(\"p\", { \"aria-live\": \"assertive\", role: \"alert\", children: validation ?? action.description })), !selectionMatchesRegistration && validation === null ? (_jsx(\"p\", { \"aria-live\": \"polite\", children: \"Rerun Relay with the selected profile or model before continuing this PR thread.\" })) : null, _jsx(\"button\", { disabled: action.pending || message.trim().length === 0 || !selectionMatchesRegistration, type: \"submit\", children: action.pending ? \"Continuing on this PR…\" : \"Continue on this PR\" })] }));\n};\nconst relayDockState = (host, registration) => {\n if (registration === null) {\n return { content: _jsx(HostConversationLocator, { host: host }), status: \"ready\" };\n }\n switch (registration.status) {\n case \"loading\":\n return {\n description: \"Loading the durable conversation for this pull request.\",\n status: \"loading\",\n title: \"Loading PR thread\"\n };\n case \"error\":\n return { description: registration.description, status: \"error\", title: \"PR thread unavailable\" };\n case \"unavailable\":\n return { description: registration.description, status: \"unavailable\", title: \"Relay unavailable for this PR\" };\n case \"ready\":\n return { content: _jsx(ThreadMessages, { messages: registration.messages }), status: \"ready\" };\n }\n};\nconst selectionIdentity = (registration) => registration === null ? \"host\" : JSON.stringify(pullRequestThreadIdentity(registration.conversation));\nconst selectorRevision = (selection) => JSON.stringify({\n modelId: selection.modelId,\n models: selection.models,\n profileId: selection.profileId,\n profiles: selection.profiles\n});\n/** Own one collapsed Relay dock while application pages register exact PR threads underneath it. */\nexport const RelayProductDock = ({ children, host }) => {\n return (_jsxs(RelayProductDockProvider, { children: [children, _jsx(RelayProductDockChrome, { host: host })] }));\n};\n/** Render the chrome for a registration provider; keep this component lazy at product route boundaries. */\nexport const RelayProductDockChrome = ({ host }) => {\n const registration = useRelayProductDockRegistration();\n const activeSelection = registration?.selection ?? host.selection;\n const identity = selectionIdentity(registration);\n const activeSelectorRevision = selectorRevision(activeSelection);\n const [selection, setSelection] = useState(activeSelection);\n useEffect(() => setSelection(activeSelection), [activeSelectorRevision, identity]);\n const setModel = (value) => {\n const option = selection.models.find(({ id }) => id === value);\n if (option === undefined)\n return;\n const pairedProfile = selection.profiles.find(({ id }) => id === option.id);\n setSelection(pairedProfile === undefined\n ? { ...selection, modelId: option.id }\n : { ...selection, modelId: option.id, profileId: pairedProfile.id });\n };\n const setProfile = (value) => {\n const option = selection.profiles.find(({ id }) => id === value);\n if (option === undefined)\n return;\n const pairedModel = selection.models.find(({ id }) => id === option.id);\n setSelection(pairedModel === undefined\n ? { ...selection, profileId: option.id }\n : { ...selection, modelId: pairedModel.id, profileId: option.id });\n };\n const readyRegistration = registration?.status === \"ready\" ? registration : null;\n return (_jsx(\"div\", { \"data-relay-product-dock-chrome\": \"\", style: {\n insetBlockEnd: \"max(var(--rly-space-16), env(safe-area-inset-bottom, 0px))\",\n insetInlineEnd: \"max(var(--rly-space-16), env(safe-area-inset-right, 0px))\",\n position: \"fixed\",\n zIndex: 80\n }, children: _jsx(RelayProductDockChromeBoundary, { children: _jsx(Suspense, { fallback: null, children: _jsx(LazyRelayDock, { context: registration?.context ?? host.context, defaultOpen: false, footer: readyRegistration === null ? undefined : (_jsx(PullRequestContinuation, { registration: readyRegistration, selection: selection }, identity)), selection: {\n model: {\n onValueChange: setModel,\n options: selection.models.map(({ id, label }) => ({ label, value: id })),\n value: selection.modelId\n },\n profile: {\n onValueChange: setProfile,\n options: selection.profiles.map(({ id, label }) => ({ label, value: id })),\n value: selection.profileId\n }\n }, state: relayDockState(host, registration) }) }) }) }));\n};\nexport { RelayProductDockProvider, RelayProductDockProviderMissing, useRelayProductDockRegistration, useRelayPullRequestDock } from \"./registry.js\";\n//# sourceMappingURL=dock.js.map","import { PullRequestConversation } from \"@knpkv/relay-product/conversation\"\nimport { RelayProductDockInvariantViolation } from \"@knpkv/relay-product\"\nimport { RelaySelectorState } from \"@knpkv/relay-product/model\"\nimport * as Result from \"effect/Result\"\nimport * as Schema from \"effect/Schema\"\n\nimport type { OpenPullRequestCandidate, OpenPullRequestResolution } from \"./openPullRequest/openPullRequest.js\"\n\n/** Enforce an optional browser-safe account label for every resolver outcome. */\nconst candidateMatchesAccount = (candidate: OpenPullRequestCandidate, accountId: string): boolean =>\n candidate.accountLabel === accountId || candidate.accountLabel.endsWith(` · AWS ${accountId}`)\n\n/** Apply the host account constraint before classifying a locator result. */\nexport const controlCenterRelayCandidatesForAccount = (\n resolution: OpenPullRequestResolution,\n accountId: string | undefined\n): ReadonlyArray<OpenPullRequestCandidate> => {\n switch (resolution._tag) {\n case \"found\":\n return accountId === undefined || candidateMatchesAccount(resolution.candidate, accountId)\n ? [resolution.candidate]\n : []\n case \"ambiguous\":\n return accountId === undefined\n ? resolution.candidates\n : resolution.candidates.filter((candidate) => candidateMatchesAccount(candidate, accountId))\n case \"account-identity-unavailable\":\n case \"not-found\":\n return []\n }\n}\n\nexport const selectControlCenterRelayCandidate = (\n resolution: OpenPullRequestResolution,\n accountId: string | undefined\n): OpenPullRequestCandidate | undefined => {\n const matches = controlCenterRelayCandidatesForAccount(resolution, accountId)\n return matches.length === 1 ? matches[0] : undefined\n}\n\nexport const decodeControlCenterRelaySelector = (input: typeof RelaySelectorState.Encoded): RelaySelectorState => {\n const decoded = Schema.decodeUnknownResult(RelaySelectorState)(input)\n if (Result.isFailure(decoded)) throw new RelayProductDockInvariantViolation({ boundary: \"selector\" })\n return decoded.success\n}\n\nexport const decodeControlCenterRelayConversation = (\n input: typeof PullRequestConversation.Encoded\n): PullRequestConversation => {\n const decoded = Schema.decodeUnknownResult(PullRequestConversation)(input)\n if (Result.isFailure(decoded)) throw new RelayProductDockInvariantViolation({ boundary: \"conversation\" })\n return decoded.success\n}\n\nexport const controlCenterRelayHostSelection = decodeControlCenterRelaySelector({\n modelId: \"configured-default\",\n models: [{ id: \"configured-default\", label: \"Configured default\" }],\n profileId: \"read-only-review\",\n profiles: [{ id: \"read-only-review\", label: \"Read-only PR review\" }]\n})\n"],"file":"controlCenterRelayDock-D7375HPG.js"}
|
|
1
|
+
{"version":3,"mappings":";ghBAEM,IAA2B,MAAM,EAAiB,EAAG,EAAkB,EAAG,EAAmB,GAAG,CAAC,CAAC,CAAC,KAAK,EAAa,iBAAiB,CAAC,EAChI,EAAsB,EAAc,CAC7C,GAAI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,MAAO,EAAU,SACrB,CACJ,EAAG,MAAO,GAAe,EAAM,CAAY,CAAE,CAAC,CAAE,CAAC,CAAE,CAAC,CAAE,CAAC,CAC3E,ECpNM,GAA2B,EAAqC,IACpE,EAAU,eAAiB,GAAa,EAAU,aAAa,SAAS,UAAU,GAAW,EAGlF,IACX,EACA,IAC4C,CAC5C,OAAQ,EAAW,KAAnB,CACE,IAAK,QACH,OAAO,IAAc,QAAa,EAAwB,EAAW,UAAW,CAAS,EACrF,CAAC,EAAW,SAAS,EACrB,CAAC,EACP,IAAK,YACH,OAAO,IAAc,OACjB,EAAW,WACX,EAAW,WAAW,OAAQ,GAAc,EAAwB,EAAW,CAAS,CAAC,EAC/F,IAAK,+BACL,IAAK,YACH,MAAO,CAAC,CACZ,CACF,EAEa,IACX,EACA,IACyC,CACzC,IAAM,EAAU,GAAuC,EAAY,CAAS,EAC5E,OAAO,EAAQ,SAAW,EAAI,EAAQ,GAAK,MAC7C,EAEa,GAAoC,GAAiE,CAChH,IAAM,EAAU,EAA2B,CAAkB,CAAC,CAAC,CAAK,EACpE,GAAI,EAAiB,CAAO,EAAG,MAAM,IAAI,EAAmC,CAAE,SAAU,UAAW,CAAC,EACpG,OAAO,EAAQ,OACjB,EAEa,GACX,GAC4B,CAC5B,IAAM,EAAU,EAA2B,CAAuB,CAAC,CAAC,CAAK,EACzE,GAAI,EAAiB,CAAO,EAAG,MAAM,IAAI,EAAmC,CAAE,SAAU,cAAe,CAAC,EACxG,OAAO,EAAQ,OACjB,EAEa,GAAkC,GAAiC,CAC9E,QAAS,qBACT,OAAQ,CAAC,CAAE,GAAI,qBAAsB,MAAO,oBAAqB,CAAC,EAClE,UAAW,mBACX,SAAU,CAAC,CAAE,GAAI,mBAAoB,MAAO,qBAAsB,CAAC,CACrE,CAAC","names":[],"ignoreList":[],"sources":["../../../../relay-product/dist/model.js","../../../../relay-product/dist/conversation.js","../../../../relay-product/dist/dock.js","../../../src/client/controlCenterRelayDock.tsx"],"sourcesContent":["import * as Effect from \"effect/Effect\";\nimport * as Schema from \"effect/Schema\";\nconst SelectorId = Schema.String.check(Schema.isTrimmed(), Schema.isNonEmpty(), Schema.isMaxLength(200)).pipe(Schema.brand(\"RelaySelectorId\"));\nexport const RelaySelectorOption = Schema.Struct({\n id: SelectorId,\n label: Schema.String.check(Schema.isTrimmed(), Schema.isNonEmpty(), Schema.isMaxLength(200))\n});\nconst RelaySelectorStateInput = Schema.Struct({\n modelId: SelectorId,\n models: Schema.Array(RelaySelectorOption).check(Schema.isMinLength(1)),\n profileId: SelectorId,\n profiles: Schema.Array(RelaySelectorOption).check(Schema.isMinLength(1))\n});\nconst hasUniqueOptionIds = (options) => new Set(options.map(({ id }) => id)).size === options.length;\nexport const RelaySelectorState = RelaySelectorStateInput.check(Schema.makeFilter(({ profiles }) => hasUniqueOptionIds(profiles), {\n expected: \"unique Relay profile option identifiers\"\n}), Schema.makeFilter(({ models }) => hasUniqueOptionIds(models), {\n expected: \"unique Relay model option identifiers\"\n}), Schema.makeFilter(({ profileId, profiles }) => profiles.some(({ id }) => id === profileId), {\n expected: \"a selected Relay profile present in the profile options\"\n}), Schema.makeFilter(({ modelId, models }) => models.some(({ id }) => id === modelId), {\n expected: \"a selected Relay model present in the model options\"\n}));\nexport const RelayDockState = Schema.TaggedUnion({\n collapsed: {},\n expanded: {}\n});\nexport const RelayState = Schema.Struct({\n dock: RelayDockState,\n selection: RelaySelectorState\n});\nexport class InvalidRelaySelectorState extends Schema.TaggedError()(\"InvalidRelaySelectorState\", {\n reason: Schema.Literals([\n \"duplicate-model\",\n \"duplicate-profile\",\n \"invalid-input\",\n \"model-not-found\",\n \"profile-not-found\"\n ])\n}) {\n}\nconst decodeSelectorStateInput = Schema.decodeUnknownEffect(RelaySelectorStateInput);\n/** Decode the visible selector state and initialize the product-owned dock as collapsed. */\nexport const makeInitialRelayState = Effect.fn(\"RelayProduct.makeInitialRelayState\")(function* (input) {\n const selection = yield* decodeSelectorStateInput(input).pipe(Effect.mapError(() => new InvalidRelaySelectorState({ reason: \"invalid-input\" })));\n if (!hasUniqueOptionIds(selection.profiles)) {\n return yield* new InvalidRelaySelectorState({ reason: \"duplicate-profile\" });\n }\n if (!hasUniqueOptionIds(selection.models)) {\n return yield* new InvalidRelaySelectorState({ reason: \"duplicate-model\" });\n }\n if (!selection.profiles.some(({ id }) => id === selection.profileId)) {\n return yield* new InvalidRelaySelectorState({ reason: \"profile-not-found\" });\n }\n if (!selection.models.some(({ id }) => id === selection.modelId)) {\n return yield* new InvalidRelaySelectorState({ reason: \"model-not-found\" });\n }\n return RelayState.make({\n dock: RelayDockState.cases.collapsed.make({}),\n selection: RelaySelectorState.make(selection)\n });\n});\n//# sourceMappingURL=model.js.map","import * as Context from \"effect/Context\";\nimport * as Effect from \"effect/Effect\";\nimport * as Layer from \"effect/Layer\";\nimport * as Schema from \"effect/Schema\";\nimport { RelaySelectorState } from \"./model.js\";\nconst trimmedIdentifier = (maximumLength) => Schema.String.check(Schema.isTrimmed(), Schema.isNonEmpty(), Schema.isMaxLength(maximumLength));\nconst canonicalUuid = (brand) => Schema.String.check(Schema.isUUID(7), Schema.isPattern(/^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u, {\n expected: \"a canonical lowercase UUID v7\"\n})).pipe(Schema.brand(brand));\nexport const AgenticProduct = Schema.Literals([\"codecommit\", \"control-center\"]);\nexport const RelayProductOperation = Schema.Literals([\n \"continue-pull-request-conversation\",\n \"locate-pull-request-conversation\"\n]);\nconst PrincipalId = trimmedIdentifier(200).pipe(Schema.brand(\"RelayPrincipalId\"));\nconst WorkspaceId = canonicalUuid(\"RelayWorkspaceId\");\nconst PluginConnectionId = canonicalUuid(\"RelayPluginConnectionId\");\nconst EntityId = canonicalUuid(\"RelayEntityId\");\nconst RepositoryName = trimmedIdentifier(1_000).pipe(Schema.brand(\"RelayRepositoryName\"));\nconst PullRequestId = trimmedIdentifier(200).pipe(Schema.brand(\"RelayPullRequestId\"));\nconst AccountId = trimmedIdentifier(200).pipe(Schema.brand(\"RelayAccountId\"));\nconst Region = trimmedIdentifier(100).pipe(Schema.brand(\"RelayRegion\"));\nconst ProductPath = Schema.String.check(Schema.isTrimmed(), Schema.isNonEmpty(), Schema.isMaxLength(4_096), Schema.isPattern(/^\\/(?!\\/)/u, { expected: \"an application-owned absolute path\" }));\nexport const ProductAuthorization = Schema.TaggedUnion({\n codecommit: {\n principalId: PrincipalId\n },\n \"control-center\": {\n principalId: PrincipalId,\n workspaceId: WorkspaceId\n }\n});\n/** Provider identity a host agent may use to find one PR conversation. */\nexport const PullRequestConversationLocator = Schema.Struct({\n accountId: Schema.optionalKey(AccountId),\n provider: Schema.Literal(\"codecommit\"),\n pullRequestId: PullRequestId,\n region: Region,\n repositoryName: RepositoryName\n});\nconst ControlCenterThreadIdentity = Schema.Struct({\n pluginConnectionId: PluginConnectionId,\n pullRequestId: PullRequestId,\n repositoryName: RepositoryName,\n workspaceId: WorkspaceId\n});\nconst CodeCommitThreadIdentity = Schema.Struct({\n accountId: AccountId,\n pullRequestId: PullRequestId,\n region: Region,\n repositoryName: RepositoryName\n});\nconst ControlCenterPullRequestRoute = Schema.Struct({\n entityId: EntityId,\n href: ProductPath\n});\nconst CodeCommitPullRequestRoute = Schema.Struct({\n accountId: AccountId,\n href: ProductPath,\n /** Credential/account alias used by the browser URL; accountId stays canonical. */\n pullRequestId: PullRequestId,\n routeAccountId: Schema.optionalKey(AccountId)\n});\n/** Stable product-qualified identity. Head revisions never participate in thread identity. */\nexport const PullRequestThreadIdentity = Schema.TaggedUnion({\n codecommit: {\n ...CodeCommitThreadIdentity.fields\n },\n \"control-center\": {\n ...ControlCenterThreadIdentity.fields\n }\n});\n/** Durable thread identity, exact product route, and explicit Relay selection for one PR. */\nexport const PullRequestConversation = Schema.TaggedUnion({\n codecommit: {\n route: CodeCommitPullRequestRoute,\n selection: RelaySelectorState,\n thread: CodeCommitThreadIdentity\n },\n \"control-center\": {\n route: ControlCenterPullRequestRoute,\n selection: RelaySelectorState,\n thread: ControlCenterThreadIdentity\n }\n}).check(Schema.makeFilter((conversation) => {\n switch (conversation._tag) {\n case \"codecommit\":\n return (conversation.route.accountId === conversation.thread.accountId &&\n conversation.route.pullRequestId === conversation.thread.pullRequestId &&\n conversation.route.href ===\n `/accounts/${encodeURIComponent(conversation.route.routeAccountId ?? conversation.route.accountId)}/prs/${encodeURIComponent(conversation.route.pullRequestId)}`);\n case \"control-center\":\n return (conversation.route.href ===\n `/w/${conversation.thread.workspaceId}/items/${conversation.route.entityId}`);\n }\n}, { expected: \"a product-qualified thread paired with its exact pull-request route\" }));\nexport const pullRequestThreadIdentity = (conversation) => {\n switch (conversation._tag) {\n case \"codecommit\":\n return PullRequestThreadIdentity.cases.codecommit.make(conversation.thread);\n case \"control-center\":\n return PullRequestThreadIdentity.cases[\"control-center\"].make(conversation.thread);\n }\n};\nexport const PullRequestContinuationMessage = Schema.String.check(Schema.isTrimmed(), Schema.isNonEmpty(), Schema.isMaxLength(8_000)).pipe(Schema.brand(\"PullRequestContinuationMessage\"));\nexport const ContinuePullRequestConversationRequest = Schema.Struct({\n conversation: PullRequestConversation,\n message: PullRequestContinuationMessage,\n selection: RelaySelectorState\n});\nconst ContinuationMessageId = trimmedIdentifier(200).pipe(Schema.brand(\"RelayContinuationMessageId\"));\nexport const PullRequestConversationContinuation = Schema.Struct({\n messageId: ContinuationMessageId,\n thread: PullRequestThreadIdentity\n});\nexport class RelayAuthenticationRequired extends Schema.TaggedError()(\"RelayAuthenticationRequired\", {\n operation: RelayProductOperation,\n product: AgenticProduct\n}) {\n}\nexport class RelayAuthorizationDenied extends Schema.TaggedError()(\"RelayAuthorizationDenied\", {\n operation: RelayProductOperation,\n product: AgenticProduct\n}) {\n}\nexport class RelayAuthenticationUnavailable extends Schema.TaggedError()(\"RelayAuthenticationUnavailable\", {\n operation: RelayProductOperation,\n product: AgenticProduct\n}) {\n}\nexport class PullRequestConversationNotFound extends Schema.TaggedError()(\"PullRequestConversationNotFound\", {\n product: AgenticProduct,\n pullRequestId: PullRequestId,\n repositoryName: RepositoryName\n}) {\n}\nexport class PullRequestConversationAmbiguous extends Schema.TaggedError()(\"PullRequestConversationAmbiguous\", {\n matches: Schema.Int.check(Schema.isGreaterThan(1)),\n product: AgenticProduct,\n pullRequestId: PullRequestId,\n repositoryName: RepositoryName\n}) {\n}\nexport class PullRequestConversationLookupFailed extends Schema.TaggedError()(\"PullRequestConversationLookupFailed\", {\n product: AgenticProduct\n}) {\n}\nexport class PullRequestConversationRedirectFailed extends Schema.TaggedError()(\"PullRequestConversationRedirectFailed\", {\n href: ProductPath,\n product: AgenticProduct\n}) {\n}\nexport class PullRequestConversationContinuationRejected extends Schema.TaggedError()(\"PullRequestConversationContinuationRejected\", {\n product: AgenticProduct,\n reason: Schema.Literals([\"conversation-busy\", \"selection-unavailable\", \"thread-not-found\"]),\n thread: PullRequestThreadIdentity\n}) {\n}\nexport class PullRequestConversationContinuationFailed extends Schema.TaggedError()(\"PullRequestConversationContinuationFailed\", {\n product: AgenticProduct,\n thread: PullRequestThreadIdentity\n}) {\n}\nexport class RelayProductAdapterContractError extends Schema.TaggedError()(\"RelayProductAdapterContractError\", {\n actualProduct: AgenticProduct,\n expectedProduct: AgenticProduct,\n operation: RelayProductOperation\n}) {\n}\nexport class RelayProductContinuationReceiptMismatch extends Schema.TaggedError()(\"RelayProductContinuationReceiptMismatch\", {\n actualThread: PullRequestThreadIdentity,\n expectedThread: PullRequestThreadIdentity\n}) {\n}\nexport class RelayProduct extends Context.Service()(\"@knpkv/relay-product/RelayProduct\") {\n}\nconst requireProduct = (expectedProduct, actualProduct, operation) => expectedProduct === actualProduct\n ? Effect.void\n : new RelayProductAdapterContractError({ actualProduct, expectedProduct, operation });\nconst samePullRequestThread = (left, right) => {\n if (left._tag !== right._tag)\n return false;\n switch (left._tag) {\n case \"codecommit\":\n return (right._tag === \"codecommit\" &&\n left.accountId === right.accountId &&\n left.pullRequestId === right.pullRequestId &&\n left.region === right.region &&\n left.repositoryName === right.repositoryName);\n case \"control-center\":\n return (right._tag === \"control-center\" &&\n left.pluginConnectionId === right.pluginConnectionId &&\n left.pullRequestId === right.pullRequestId &&\n left.repositoryName === right.repositoryName &&\n left.workspaceId === right.workspaceId);\n }\n};\n/** One orchestration path shared by Control Center and CodeCommit product ports. */\nexport const makeRelayProductAdapter = (port) => {\n const openPullRequestConversation = Effect.fn(\"RelayProduct.openPullRequestConversation\")(function* (locator) {\n const operation = \"locate-pull-request-conversation\";\n const authorization = yield* port.authorize(operation);\n yield* requireProduct(port.product, authorization._tag, operation);\n const conversation = yield* port.locatePullRequestConversation(authorization, locator);\n yield* requireProduct(port.product, conversation._tag, operation);\n yield* port.redirectToPullRequest(conversation);\n return conversation;\n });\n const continuePullRequestConversation = Effect.fn(\"RelayProduct.continuePullRequestConversation\")(function* (request) {\n const operation = \"continue-pull-request-conversation\";\n const authorization = yield* port.authorize(operation);\n yield* requireProduct(port.product, authorization._tag, operation);\n yield* requireProduct(port.product, request.conversation._tag, operation);\n const receipt = yield* port.continuePullRequestConversation(authorization, request);\n const expectedThread = pullRequestThreadIdentity(request.conversation);\n if (!samePullRequestThread(expectedThread, receipt.thread)) {\n return yield* new RelayProductContinuationReceiptMismatch({\n actualThread: receipt.thread,\n expectedThread\n });\n }\n return receipt;\n });\n return RelayProduct.of({ continuePullRequestConversation, openPullRequestConversation });\n};\nexport const layer = (port) => Layer.succeed(RelayProduct, makeRelayProductAdapter(port));\n//# sourceMappingURL=conversation.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as Cause from \"effect/Cause\";\nimport * as Data from \"effect/Data\";\nimport * as Effect from \"effect/Effect\";\nimport * as Exit from \"effect/Exit\";\nimport * as Result from \"effect/Result\";\nimport * as Schema from \"effect/Schema\";\nimport { Component, lazy, Suspense, useCallback, useEffect, useRef, useState } from \"react\";\nimport { ContinuePullRequestConversationRequest, PullRequestConversationLocator, pullRequestThreadIdentity } from \"./conversation.js\";\nimport { RelayProductDockProvider, useRelayProductDockRegistration } from \"./registry.js\";\nexport class RelayProductDockInvariantViolation extends Data.TaggedError(\"RelayProductDockInvariantViolation\") {\n}\nconst LazyRelayDock = lazy(async () => {\n const patterns = await import(\"@knpkv/rly/patterns\");\n return { default: patterns.RelayDock };\n});\n/** Keep routed product content mounted when optional Relay chrome cannot load. */\nexport class RelayProductDockChromeBoundary extends Component {\n state = { failed: false };\n static getDerivedStateFromError(cause) {\n void cause;\n return { failed: true };\n }\n render() {\n return this.state.failed ? null : this.props.children;\n }\n}\nconst actionFailureDescription = (failure) => {\n switch (failure._tag) {\n case \"RelayAuthenticationRequired\":\n return \"Authenticate with this product before using its Relay conversations.\";\n case \"RelayAuthorizationDenied\":\n return \"This session cannot use Relay for pull-request conversations.\";\n case \"RelayAuthenticationUnavailable\":\n return \"The product authentication boundary is unavailable.\";\n case \"PullRequestConversationNotFound\":\n return `No Relay conversation matches ${failure.repositoryName} PR #${failure.pullRequestId}.`;\n case \"PullRequestConversationAmbiguous\":\n return `${String(failure.matches)} Relay conversations match this pull request; include its account.`;\n case \"PullRequestConversationLookupFailed\":\n return \"Relay could not search the product's pull-request conversations.\";\n case \"PullRequestConversationRedirectFailed\":\n return \"Relay found the conversation but could not open its exact pull-request page.\";\n case \"PullRequestConversationContinuationRejected\":\n return failure.reason === \"conversation-busy\"\n ? \"This pull-request conversation already has a run in progress.\"\n : failure.reason === \"selection-unavailable\"\n ? \"The selected Relay profile or model is no longer available.\"\n : \"This pull-request conversation no longer exists.\";\n case \"PullRequestConversationContinuationFailed\":\n return \"Relay could not continue this pull-request conversation.\";\n case \"RelayProductAdapterContractError\":\n return \"The active product does not own this pull-request conversation.\";\n case \"RelayProductContinuationReceiptMismatch\":\n return \"Relay returned a continuation receipt for another pull-request conversation.\";\n }\n};\nconst failureFromCause = (cause) => {\n const failure = cause.reasons.find(Cause.isFailReason);\n return failure === undefined\n ? \"Relay ended unexpectedly. No request was accepted.\"\n : actionFailureDescription(failure.error);\n};\nconst useRelayDockAction = () => {\n const [state, setState] = useState({ description: null, pending: false });\n const request = useRef(0);\n useEffect(() => () => {\n request.current += 1;\n }, []);\n const run = useCallback((effect) => {\n request.current += 1;\n const current = request.current;\n setState({ description: null, pending: true });\n void Effect.runPromiseExit(effect).then((exit) => {\n if (request.current !== current)\n return;\n setState(Exit.isSuccess(exit)\n ? { description: null, pending: false }\n : { description: failureFromCause(exit.cause), pending: false });\n });\n }, []);\n return [state, run];\n};\nconst HostConversationLocator = ({ host }) => {\n const [accountId, setAccountId] = useState(\"\");\n const [pullRequestId, setPullRequestId] = useState(\"\");\n const [region, setRegion] = useState(\"\");\n const [repositoryName, setRepositoryName] = useState(\"\");\n const [validation, setValidation] = useState(null);\n const [action, runAction] = useRelayDockAction();\n const submit = (event) => {\n event.preventDefault();\n const account = accountId.trim();\n const locatorInput = account.length === 0\n ? {\n provider: \"codecommit\",\n pullRequestId: pullRequestId.trim(),\n region: region.trim(),\n repositoryName: repositoryName.trim()\n }\n : {\n accountId: account,\n provider: \"codecommit\",\n pullRequestId: pullRequestId.trim(),\n region: region.trim(),\n repositoryName: repositoryName.trim()\n };\n const decoded = Schema.decodeUnknownResult(PullRequestConversationLocator)(locatorInput);\n if (Result.isFailure(decoded)) {\n setValidation(\"Enter a region, repository, and pull-request number.\");\n return;\n }\n setValidation(null);\n runAction(host.locatePullRequestConversation(decoded.success));\n };\n return (_jsxs(\"form\", { \"aria-label\": \"Find a pull request conversation\", onSubmit: submit, children: [_jsx(\"h2\", { children: \"Find a pull request conversation\" }), _jsx(\"p\", { children: \"Relay opens the exact product page before continuing a PR thread.\" }), _jsxs(\"label\", { children: [_jsx(\"span\", { children: \"Region\" }), _jsx(\"input\", { onChange: (event) => setRegion(event.currentTarget.value), value: region })] }), _jsxs(\"label\", { children: [_jsx(\"span\", { children: \"Repository\" }), _jsx(\"input\", { onChange: (event) => setRepositoryName(event.currentTarget.value), value: repositoryName })] }), _jsxs(\"label\", { children: [_jsx(\"span\", { children: \"Pull request\" }), _jsx(\"input\", { inputMode: \"numeric\", onChange: (event) => setPullRequestId(event.currentTarget.value), value: pullRequestId })] }), _jsxs(\"label\", { children: [_jsx(\"span\", { children: \"Account (optional)\" }), _jsx(\"input\", { onChange: (event) => setAccountId(event.currentTarget.value), value: accountId })] }), validation === null && action.description === null ? null : (_jsx(\"p\", { \"aria-live\": \"assertive\", role: \"alert\", children: validation ?? action.description })), _jsx(\"button\", { disabled: action.pending, type: \"submit\", children: action.pending ? \"Opening PR conversation…\" : \"Open PR conversation\" })] }));\n};\nconst ThreadMessages = ({ messages }) => messages.length === 0 ? (_jsx(\"p\", { children: \"No Relay turns yet. The first message starts this PR's durable thread.\" })) : (_jsx(\"ol\", { \"aria-label\": \"Pull request conversation\", children: messages.map((message) => (_jsxs(\"li\", { \"data-relay-message-role\": message.role, children: [_jsx(\"strong\", { children: message.role === \"relay\" ? \"Relay\" : message.role === \"operator\" ? \"You\" : \"System\" }), _jsx(\"p\", { children: message.text })] }, message.id))) }));\nexport const relaySelectionMatchesRegistration = (selection, registration) => registration.selection.profiles.some(({ id }) => id === selection.profileId) &&\n registration.selection.models.some(({ id }) => id === selection.modelId);\nconst PullRequestContinuation = ({ registration, selection }) => {\n const [message, setMessage] = useState(\"\");\n const [validation, setValidation] = useState(null);\n const [action, runAction] = useRelayDockAction();\n const selectionMatchesRegistration = relaySelectionMatchesRegistration(selection, registration);\n const submit = (event) => {\n event.preventDefault();\n if (!selectionMatchesRegistration) {\n setValidation(\"Rerun Relay with the selected profile or model before continuing this PR thread.\");\n return;\n }\n const decoded = Schema.decodeUnknownResult(ContinuePullRequestConversationRequest)({\n conversation: registration.conversation,\n message: message.trim(),\n selection\n });\n if (Result.isFailure(decoded)) {\n setValidation(\"Enter a pull-request request of 8,000 characters or fewer.\");\n return;\n }\n setValidation(null);\n runAction(registration\n .continuePullRequestConversation(decoded.success)\n .pipe(Effect.tap(() => Effect.sync(() => setMessage(\"\")))));\n };\n return (_jsxs(\"form\", { \"aria-label\": \"Continue pull request conversation\", onSubmit: submit, children: [_jsxs(\"label\", { children: [_jsx(\"span\", { children: \"Continue this PR thread\" }), _jsx(\"textarea\", { maxLength: 8_000, onChange: (event) => setMessage(event.currentTarget.value), placeholder: \"Ask Relay to verify one concrete part of this pull request\\u2026\", rows: 3, value: message })] }), validation === null && action.description === null ? null : (_jsx(\"p\", { \"aria-live\": \"assertive\", role: \"alert\", children: validation ?? action.description })), !selectionMatchesRegistration && validation === null ? (_jsx(\"p\", { \"aria-live\": \"polite\", children: \"Rerun Relay with the selected profile or model before continuing this PR thread.\" })) : null, _jsx(\"button\", { disabled: action.pending || message.trim().length === 0 || !selectionMatchesRegistration, type: \"submit\", children: action.pending ? \"Continuing on this PR…\" : \"Continue on this PR\" })] }));\n};\nconst relayDockState = (host, registration) => {\n if (registration === null) {\n return { content: _jsx(HostConversationLocator, { host: host }), status: \"ready\" };\n }\n switch (registration.status) {\n case \"loading\":\n return {\n description: \"Loading the durable conversation for this pull request.\",\n status: \"loading\",\n title: \"Loading PR thread\"\n };\n case \"error\":\n return { description: registration.description, status: \"error\", title: \"PR thread unavailable\" };\n case \"unavailable\":\n return { description: registration.description, status: \"unavailable\", title: \"Relay unavailable for this PR\" };\n case \"ready\":\n return { content: _jsx(ThreadMessages, { messages: registration.messages }), status: \"ready\" };\n }\n};\nconst selectionIdentity = (registration) => registration === null ? \"host\" : JSON.stringify(pullRequestThreadIdentity(registration.conversation));\nconst selectorRevision = (selection) => JSON.stringify({\n modelId: selection.modelId,\n models: selection.models,\n profileId: selection.profileId,\n profiles: selection.profiles\n});\n/** Own one collapsed Relay dock while application pages register exact PR threads underneath it. */\nexport const RelayProductDock = ({ children, host }) => {\n return (_jsxs(RelayProductDockProvider, { children: [children, _jsx(RelayProductDockChrome, { host: host })] }));\n};\n/** Render the chrome for a registration provider; keep this component lazy at product route boundaries. */\nexport const RelayProductDockChrome = ({ host }) => {\n const registration = useRelayProductDockRegistration();\n const activeSelection = registration?.selection ?? host.selection;\n const identity = selectionIdentity(registration);\n const activeSelectorRevision = selectorRevision(activeSelection);\n const [selection, setSelection] = useState(activeSelection);\n useEffect(() => setSelection(activeSelection), [activeSelectorRevision, identity]);\n const setModel = (value) => {\n const option = selection.models.find(({ id }) => id === value);\n if (option === undefined)\n return;\n const pairedProfile = selection.profiles.find(({ id }) => id === option.id);\n setSelection(pairedProfile === undefined\n ? { ...selection, modelId: option.id }\n : { ...selection, modelId: option.id, profileId: pairedProfile.id });\n };\n const setProfile = (value) => {\n const option = selection.profiles.find(({ id }) => id === value);\n if (option === undefined)\n return;\n const pairedModel = selection.models.find(({ id }) => id === option.id);\n setSelection(pairedModel === undefined\n ? { ...selection, profileId: option.id }\n : { ...selection, modelId: pairedModel.id, profileId: option.id });\n };\n const readyRegistration = registration?.status === \"ready\" ? registration : null;\n return (_jsx(\"div\", { \"data-relay-product-dock-chrome\": \"\", style: {\n insetBlockEnd: \"max(var(--rly-space-16), env(safe-area-inset-bottom, 0px))\",\n insetInlineEnd: \"max(var(--rly-space-16), env(safe-area-inset-right, 0px))\",\n position: \"fixed\",\n zIndex: 80\n }, children: _jsx(RelayProductDockChromeBoundary, { children: _jsx(Suspense, { fallback: null, children: _jsx(LazyRelayDock, { context: registration?.context ?? host.context, defaultOpen: false, footer: readyRegistration === null ? undefined : (_jsx(PullRequestContinuation, { registration: readyRegistration, selection: selection }, identity)), selection: {\n model: {\n onValueChange: setModel,\n options: selection.models.map(({ id, label }) => ({ label, value: id })),\n value: selection.modelId\n },\n profile: {\n onValueChange: setProfile,\n options: selection.profiles.map(({ id, label }) => ({ label, value: id })),\n value: selection.profileId\n }\n }, state: relayDockState(host, registration) }) }) }) }));\n};\nexport { RelayProductDockProvider, RelayProductDockProviderMissing, useRelayProductDockRegistration, useRelayPullRequestDock } from \"./registry.js\";\n//# sourceMappingURL=dock.js.map","import { PullRequestConversation } from \"@knpkv/relay-product/conversation\"\nimport { RelayProductDockInvariantViolation } from \"@knpkv/relay-product\"\nimport { RelaySelectorState } from \"@knpkv/relay-product/model\"\nimport * as Result from \"effect/Result\"\nimport * as Schema from \"effect/Schema\"\n\nimport type { OpenPullRequestCandidate, OpenPullRequestResolution } from \"./openPullRequest/openPullRequest.js\"\n\n/** Enforce an optional browser-safe account label for every resolver outcome. */\nconst candidateMatchesAccount = (candidate: OpenPullRequestCandidate, accountId: string): boolean =>\n candidate.accountLabel === accountId || candidate.accountLabel.endsWith(` · AWS ${accountId}`)\n\n/** Apply the host account constraint before classifying a locator result. */\nexport const controlCenterRelayCandidatesForAccount = (\n resolution: OpenPullRequestResolution,\n accountId: string | undefined\n): ReadonlyArray<OpenPullRequestCandidate> => {\n switch (resolution._tag) {\n case \"found\":\n return accountId === undefined || candidateMatchesAccount(resolution.candidate, accountId)\n ? [resolution.candidate]\n : []\n case \"ambiguous\":\n return accountId === undefined\n ? resolution.candidates\n : resolution.candidates.filter((candidate) => candidateMatchesAccount(candidate, accountId))\n case \"account-identity-unavailable\":\n case \"not-found\":\n return []\n }\n}\n\nexport const selectControlCenterRelayCandidate = (\n resolution: OpenPullRequestResolution,\n accountId: string | undefined\n): OpenPullRequestCandidate | undefined => {\n const matches = controlCenterRelayCandidatesForAccount(resolution, accountId)\n return matches.length === 1 ? matches[0] : undefined\n}\n\nexport const decodeControlCenterRelaySelector = (input: typeof RelaySelectorState.Encoded): RelaySelectorState => {\n const decoded = Schema.decodeUnknownResult(RelaySelectorState)(input)\n if (Result.isFailure(decoded)) throw new RelayProductDockInvariantViolation({ boundary: \"selector\" })\n return decoded.success\n}\n\nexport const decodeControlCenterRelayConversation = (\n input: typeof PullRequestConversation.Encoded\n): PullRequestConversation => {\n const decoded = Schema.decodeUnknownResult(PullRequestConversation)(input)\n if (Result.isFailure(decoded)) throw new RelayProductDockInvariantViolation({ boundary: \"conversation\" })\n return decoded.success\n}\n\nexport const controlCenterRelayHostSelection = decodeControlCenterRelaySelector({\n modelId: \"configured-default\",\n models: [{ id: \"configured-default\", label: \"Configured default\" }],\n profileId: \"read-only-review\",\n profiles: [{ id: \"read-only-review\", label: \"Read-only PR review\" }]\n})\n"],"file":"controlCenterRelayDock-CyYeXh75.js"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/openPullRequest-BMlmibLP.js","assets/agent-api-CUWP1qs8.js","assets/client-D3WRV6yl.js","assets/Domain-cJ5aJFpE.js","assets/authenticatedMutationClient-Bc_-Jpbo.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-CwJFpaho.js";import{o as n}from"./hooks-K-sIfGqH.js";import{t as r}from"./preload-helper-Czpn1I53.js";import{t as i}from"./jsx-runtime-NZYk81nU.js";import{p as a}from"./index-
|
|
3
|
-
//# sourceMappingURL=controlCenterRelayDockChrome-
|
|
2
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-CwJFpaho.js";import{o as n}from"./hooks-K-sIfGqH.js";import{t as r}from"./preload-helper-Czpn1I53.js";import{t as i}from"./jsx-runtime-NZYk81nU.js";import{p as a}from"./index-kmYFvwT0.js";import{Li as o,mi as s,tr as c,xi as l}from"./agent-api-CUWP1qs8.js";import{t as u}from"./Domain-cJ5aJFpE.js";import{n as d}from"./workspaceEntityPaths-xAl2jRFm.js";import{a as f,d as p,f as m,m as h,n as g,o as _,p as v,s as y,t as b,u as x}from"./controlCenterRelayDock-CyYeXh75.js";var S=e(t(),1),C=i(),w=()=>{let e=a(),t=n(),i=(0,S.useMemo)(()=>({context:[{id:`product`,label:`Product`,value:`Control Center`}],locatePullRequestConversation:s(`ControlCenterRelayDock.locatePullRequestConversation`)(function*(n){if(e.state._tag!==`authenticated`)return yield*new v({operation:`locate-pull-request-conversation`,product:`control-center`});let i=e.state.session;if(i.permission!==`workspace-owner`&&i.permission!==`workspace-approver`)return yield*new h({operation:`locate-pull-request-conversation`,product:`control-center`});let a=yield*c(u)({pullRequestId:n.pullRequestId,region:n.region,repositoryName:n.repositoryName}).pipe(l(()=>new x({product:`control-center`}))),s=yield*o({try:()=>r(()=>import(`./openPullRequest-BMlmibLP.js`),__vite__mapDeps([0,1,2,3,4])),catch:()=>new x({product:`control-center`})}),g=yield*o({try:e=>s.browserOpenPullRequestTransport.resolve(a,e),catch:()=>new x({product:`control-center`})}),_=f(g,n.accountId);if(_!==void 0){let e=d(i.workspaceId,_.entityId);return yield*o({try:async()=>{await t(e)},catch:()=>new m({href:e,product:`control-center`})})}if(g._tag===`ambiguous`){let e=b(g,n.accountId);return n.accountId!==void 0&&e.length===0?yield*new p({product:`control-center`,pullRequestId:n.pullRequestId,repositoryName:n.repositoryName}):yield*new y({matches:e.length,product:`control-center`,pullRequestId:n.pullRequestId,repositoryName:n.repositoryName})}return g._tag===`account-identity-unavailable`?yield*new x({product:`control-center`}):yield*new p({product:`control-center`,pullRequestId:n.pullRequestId,repositoryName:n.repositoryName})}),product:`control-center`,selection:g}),[e.state,t]);return(0,C.jsx)(_,{host:i})};export{w as ControlCenterRelayDockChrome};
|
|
3
|
+
//# sourceMappingURL=controlCenterRelayDockChrome-upgtq649.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"mappings":";ujBA0Ba,MAAmD,CAC9D,IAAM,EAAiB,EAAkB,EACnC,EAAW,EAAY,EACvB,KAAO,gBACJ,CACL,QAAS,CAAC,CAAE,GAAI,UAAW,MAAO,UAAW,MAAO,gBAAiB,CAAC,EACtE,8BAA+B,EAAU,sDAAsD,CAAC,CAAC,UAC/F,EACA,CACA,GAAI,EAAe,MAAM,OAAS,gBAChC,OAAO,MAAO,IAAI,EAA4B,CAC5C,UAAW,mCACX,QAAS,gBACX,CAAC,EAEH,IAAM,EAAU,EAAe,MAAM,QACrC,GAAI,EAAQ,aAAe,mBAAqB,EAAQ,aAAe,qBACrE,OAAO,MAAO,IAAI,EAAyB,CACzC,UAAW,mCACX,QAAS,gBACX,CA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AAW,CACb,GACA,CAAC,EAAe,MAAO,CAAQ,CACjC,EACA,OAAO,SAAC,EAAD,CAA8B,MAAO,EAC9C","names":[],"ignoreList":[],"sources":["../../../src/client/controlCenterRelayDockChrome.tsx"],"sourcesContent":["import {\n PullRequestConversationAmbiguous,\n type PullRequestConversationLocator,\n PullRequestConversationLookupFailed,\n PullRequestConversationNotFound,\n PullRequestConversationRedirectFailed,\n RelayAuthenticationRequired,\n RelayAuthorizationDenied,\n RelayProductDockChrome,\n type RelayProductDockHost\n} from \"@knpkv/relay-product\"\nimport * as Effect from \"effect/Effect\"\nimport * as Schema from \"effect/Schema\"\nimport { type ReactElement, useMemo } from \"react\"\nimport { useNavigate } from \"react-router\"\n\nimport * as CodeCommitDomain from \"@knpkv/codecommit-core/Domain.js\"\nimport { useBrowserSession } from \"./BrowserSession.js\"\nimport {\n controlCenterRelayCandidatesForAccount,\n controlCenterRelayHostSelection,\n selectControlCenterRelayCandidate\n} from \"./controlCenterRelayDock.js\"\nimport { workspaceEntityPath } from \"./workspaceEntityPaths.js\"\n\n/** Install Control Center's authenticated resolver behind the shared Relay chrome. */\nexport const ControlCenterRelayDockChrome = (): ReactElement => {\n const browserSession = useBrowserSession()\n const navigate = useNavigate()\n const host = useMemo<RelayProductDockHost>(\n () => ({\n context: [{ id: \"product\", label: \"Product\", value: \"Control Center\" }],\n locatePullRequestConversation: Effect.fn(\"ControlCenterRelayDock.locatePullRequestConversation\")(function* (\n locator: PullRequestConversationLocator\n ) {\n if (browserSession.state._tag !== \"authenticated\") {\n return yield* new RelayAuthenticationRequired({\n operation: \"locate-pull-request-conversation\",\n product: \"control-center\"\n })\n }\n const session = browserSession.state.session\n if (session.permission !== \"workspace-owner\" && session.permission !== \"workspace-approver\") {\n return yield* new RelayAuthorizationDenied({\n operation: \"locate-pull-request-conversation\",\n product: \"control-center\"\n })\n }\n const providerLocator = yield* Schema.decodeUnknownEffect(CodeCommitDomain.CodeCommitPullRequestLocator)({\n pullRequestId: locator.pullRequestId,\n region: locator.region,\n repositoryName: locator.repositoryName\n }).pipe(\n Effect.mapError(\n (): PullRequestConversationLookupFailed =>\n new PullRequestConversationLookupFailed({ product: \"control-center\" })\n )\n )\n const openPullRequest = yield* Effect.tryPromise({\n try: () => import(\"./openPullRequest/openPullRequest.js\"),\n catch: (): PullRequestConversationLookupFailed =>\n new PullRequestConversationLookupFailed({ product: \"control-center\" })\n })\n const resolution = yield* Effect.tryPromise({\n try: (signal) => openPullRequest.browserOpenPullRequestTransport.resolve(providerLocator, signal),\n catch: (): PullRequestConversationLookupFailed =>\n new PullRequestConversationLookupFailed({ product: \"control-center\" })\n })\n const candidate = selectControlCenterRelayCandidate(resolution, locator.accountId)\n if (candidate !== undefined) {\n const href = workspaceEntityPath(session.workspaceId, candidate.entityId)\n return yield* Effect.tryPromise({\n try: async () => {\n await navigate(href)\n },\n catch: (): PullRequestConversationRedirectFailed =>\n new PullRequestConversationRedirectFailed({ href, product: \"control-center\" })\n })\n }\n if (resolution._tag === \"ambiguous\") {\n const matches = controlCenterRelayCandidatesForAccount(resolution, locator.accountId)\n if (locator.accountId !== undefined && matches.length === 0) {\n return yield* new PullRequestConversationNotFound({\n product: \"control-center\",\n pullRequestId: locator.pullRequestId,\n repositoryName: locator.repositoryName\n })\n }\n return yield* new PullRequestConversationAmbiguous({\n matches: matches.length,\n product: \"control-center\",\n pullRequestId: locator.pullRequestId,\n repositoryName: locator.repositoryName\n })\n }\n if (resolution._tag === \"account-identity-unavailable\") {\n return yield* new PullRequestConversationLookupFailed({ product: \"control-center\" })\n }\n return yield* new PullRequestConversationNotFound({\n product: \"control-center\",\n pullRequestId: locator.pullRequestId,\n repositoryName: locator.repositoryName\n })\n }),\n product: \"control-center\",\n selection: controlCenterRelayHostSelection\n }),\n [browserSession.state, navigate]\n )\n return <RelayProductDockChrome host={host} />\n}\n"],"file":"controlCenterRelayDockChrome-
|
|
1
|
+
{"version":3,"mappings":";ujBA0Ba,MAAmD,CAC9D,IAAM,EAAiB,E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AW,EACjD,MAAO,IAAI,EAAgC,CAChD,QAAS,iBACT,cAAe,EAAQ,cACvB,eAAgB,EAAQ,cAC1B,CAAC,EAEI,MAAO,IAAI,EAAiC,CACjD,QAAS,EAAQ,OACjB,QAAS,iBACT,cAAe,EAAQ,cACvB,eAAgB,EAAQ,cAC1B,CAAC,CACH,CAIA,OAHI,EAAW,OAAS,+BACf,MAAO,IAAI,EAAoC,CAAE,QAAS,gBAAiB,CAAC,EAE9E,MAAO,IAAI,EAAgC,CAChD,QAAS,iBACT,cAAe,EAAQ,cACvB,eAAgB,EAAQ,cAC1B,CAAC,CACH,CAAC,EACD,QAAS,iBACT,UAAW,CACb,GACA,CAAC,EAAe,MAAO,CAAQ,CACjC,EACA,OAAO,SAAC,EAAD,CAA8B,MAAO,EAC9C","names":[],"ignoreList":[],"sources":["../../../src/client/controlCenterRelayDockChrome.tsx"],"sourcesContent":["import {\n PullRequestConversationAmbiguous,\n type PullRequestConversationLocator,\n PullRequestConversationLookupFailed,\n PullRequestConversationNotFound,\n PullRequestConversationRedirectFailed,\n RelayAuthenticationRequired,\n RelayAuthorizationDenied,\n RelayProductDockChrome,\n type RelayProductDockHost\n} from \"@knpkv/relay-product\"\nimport * as Effect from \"effect/Effect\"\nimport * as Schema from \"effect/Schema\"\nimport { type ReactElement, useMemo } from \"react\"\nimport { useNavigate } from \"react-router\"\n\nimport * as CodeCommitDomain from \"@knpkv/codecommit-core/Domain.js\"\nimport { useBrowserSession } from \"./BrowserSession.js\"\nimport {\n controlCenterRelayCandidatesForAccount,\n controlCenterRelayHostSelection,\n selectControlCenterRelayCandidate\n} from \"./controlCenterRelayDock.js\"\nimport { workspaceEntityPath } from \"./workspaceEntityPaths.js\"\n\n/** Install Control Center's authenticated resolver behind the shared Relay chrome. */\nexport const ControlCenterRelayDockChrome = (): ReactElement => {\n const browserSession = useBrowserSession()\n const navigate = useNavigate()\n const host = useMemo<RelayProductDockHost>(\n () => ({\n context: [{ id: \"product\", label: \"Product\", value: \"Control Center\" }],\n locatePullRequestConversation: Effect.fn(\"ControlCenterRelayDock.locatePullRequestConversation\")(function* (\n locator: PullRequestConversationLocator\n ) {\n if (browserSession.state._tag !== \"authenticated\") {\n return yield* new RelayAuthenticationRequired({\n operation: \"locate-pull-request-conversation\",\n product: \"control-center\"\n })\n }\n const session = browserSession.state.session\n if (session.permission !== \"workspace-owner\" && session.permission !== \"workspace-approver\") {\n return yield* new RelayAuthorizationDenied({\n operation: \"locate-pull-request-conversation\",\n product: \"control-center\"\n })\n }\n const providerLocator = yield* Schema.decodeUnknownEffect(CodeCommitDomain.CodeCommitPullRequestLocator)({\n pullRequestId: locator.pullRequestId,\n region: locator.region,\n repositoryName: locator.repositoryName\n }).pipe(\n Effect.mapError(\n (): PullRequestConversationLookupFailed =>\n new PullRequestConversationLookupFailed({ product: \"control-center\" })\n )\n )\n const openPullRequest = yield* Effect.tryPromise({\n try: () => import(\"./openPullRequest/openPullRequest.js\"),\n catch: (): PullRequestConversationLookupFailed =>\n new PullRequestConversationLookupFailed({ product: \"control-center\" })\n })\n const resolution = yield* Effect.tryPromise({\n try: (signal) => openPullRequest.browserOpenPullRequestTransport.resolve(providerLocator, signal),\n catch: (): PullRequestConversationLookupFailed =>\n new PullRequestConversationLookupFailed({ product: \"control-center\" })\n })\n const candidate = selectControlCenterRelayCandidate(resolution, locator.accountId)\n if (candidate !== undefined) {\n const href = workspaceEntityPath(session.workspaceId, candidate.entityId)\n return yield* Effect.tryPromise({\n try: async () => {\n await navigate(href)\n },\n catch: (): PullRequestConversationRedirectFailed =>\n new PullRequestConversationRedirectFailed({ href, product: \"control-center\" })\n })\n }\n if (resolution._tag === \"ambiguous\") {\n const matches = controlCenterRelayCandidatesForAccount(resolution, locator.accountId)\n if (locator.accountId !== undefined && matches.length === 0) {\n return yield* new PullRequestConversationNotFound({\n product: \"control-center\",\n pullRequestId: locator.pullRequestId,\n repositoryName: locator.repositoryName\n })\n }\n return yield* new PullRequestConversationAmbiguous({\n matches: matches.length,\n product: \"control-center\",\n pullRequestId: locator.pullRequestId,\n repositoryName: locator.repositoryName\n })\n }\n if (resolution._tag === \"account-identity-unavailable\") {\n return yield* new PullRequestConversationLookupFailed({ product: \"control-center\" })\n }\n return yield* new PullRequestConversationNotFound({\n product: \"control-center\",\n pullRequestId: locator.pullRequestId,\n repositoryName: locator.repositoryName\n })\n }),\n product: \"control-center\",\n selection: controlCenterRelayHostSelection\n }),\n [browserSession.state, navigate]\n )\n return <RelayProductDockChrome host={host} />\n}\n"],"file":"controlCenterRelayDockChrome-upgtq649.js"}
|