@cats-inc/cats-platform 0.1.10 → 0.2.8
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/.env.example +9 -16
- package/README.md +18 -0
- package/build/desktop/bootstrapNavigation.d.ts.map +1 -1
- package/build/desktop/bootstrapNavigation.js +6 -13
- package/build/desktop/bootstrapNavigation.js.map +1 -1
- package/build/desktop/bootstrapPage.d.ts.map +1 -1
- package/build/desktop/bootstrapPage.js +264 -77
- package/build/desktop/bootstrapPage.js.map +1 -1
- package/build/desktop/cliInventoryProbe.d.ts +23 -2
- package/build/desktop/cliInventoryProbe.d.ts.map +1 -1
- package/build/desktop/cliInventoryProbe.js +54 -9
- package/build/desktop/cliInventoryProbe.js.map +1 -1
- package/build/desktop/config.d.ts +0 -4
- package/build/desktop/config.d.ts.map +1 -1
- package/build/desktop/config.js +1 -6
- package/build/desktop/config.js.map +1 -1
- package/build/desktop/contracts.d.ts +19 -2
- package/build/desktop/contracts.d.ts.map +1 -1
- package/build/desktop/contracts.js +1 -2
- package/build/desktop/contracts.js.map +1 -1
- package/build/desktop/hostVersion.d.ts.map +1 -1
- package/build/desktop/hostVersion.js +3 -5
- package/build/desktop/hostVersion.js.map +1 -1
- package/build/desktop/main.js +177 -201
- package/build/desktop/main.js.map +1 -1
- package/build/desktop/packaging.d.ts +2 -0
- package/build/desktop/packaging.d.ts.map +1 -1
- package/build/desktop/packaging.js +34 -14
- package/build/desktop/packaging.js.map +1 -1
- package/build/desktop/preload.cjs +7 -0
- package/build/desktop/preload.cjs.map +1 -1
- package/build/desktop/processSupervisor.d.ts.map +1 -1
- package/build/desktop/processSupervisor.js +3 -0
- package/build/desktop/processSupervisor.js.map +1 -1
- package/build/desktop/providerSelection.d.ts +37 -0
- package/build/desktop/providerSelection.d.ts.map +1 -0
- package/build/desktop/providerSelection.js +112 -0
- package/build/desktop/providerSelection.js.map +1 -0
- package/build/desktop/readiness.d.ts +2 -0
- package/build/desktop/readiness.d.ts.map +1 -1
- package/build/desktop/readiness.js +49 -35
- package/build/desktop/readiness.js.map +1 -1
- package/build/desktop/setupAssets.d.ts.map +1 -1
- package/build/desktop/setupAssets.js +16 -14
- package/build/desktop/setupAssets.js.map +1 -1
- package/build/desktop/setupAudit.d.ts +2 -3
- package/build/desktop/setupAudit.d.ts.map +1 -1
- package/build/desktop/setupAudit.js +14 -34
- package/build/desktop/setupAudit.js.map +1 -1
- package/build/desktop/tray.d.ts +1 -1
- package/build/desktop/tray.d.ts.map +1 -1
- package/build/desktop/tray.js +2 -7
- package/build/desktop/tray.js.map +1 -1
- package/build/desktop/trayMenu.d.ts +23 -2
- package/build/desktop/trayMenu.d.ts.map +1 -1
- package/build/desktop/trayMenu.js +24 -30
- package/build/desktop/trayMenu.js.map +1 -1
- package/build/desktop/updateDialog.d.ts +66 -0
- package/build/desktop/updateDialog.d.ts.map +1 -0
- package/build/desktop/updateDialog.js +258 -0
- package/build/desktop/updateDialog.js.map +1 -0
- package/build/desktop/updaterAdapter.d.ts +1 -0
- package/build/desktop/updaterAdapter.d.ts.map +1 -1
- package/build/desktop/updaterAdapter.js +13 -1
- package/build/desktop/updaterAdapter.js.map +1 -1
- package/build/renderer/assets/{ActiveSessionPermissionChip-Dl2UOFgh.js → ActiveSessionPermissionChip-CAgN-tXv.js} +1 -1
- package/build/renderer/assets/App-BZA23O2J.js +2 -0
- package/build/renderer/assets/App-DxsV-tKS.css +1 -0
- package/build/renderer/assets/{App-ChvP0G9X.js → App-YqprEL2n.js} +1 -1
- package/build/renderer/assets/App-rGw9J8PZ.js +1 -0
- package/build/renderer/assets/WorkspaceAppRoutes-BCHCikmJ.js +1 -0
- package/build/renderer/assets/app-BV3UAQkR.css +1 -0
- package/build/renderer/assets/app-CVPqqfZo.js +45 -0
- package/build/renderer/assets/conversationSidebarRecentEntries-iqaLqA1n.js +6 -0
- package/build/renderer/assets/{useDraftSessionChips-By3XXabI.js → useDraftSessionChips-D9BX6X92.js} +1 -1
- package/build/renderer/index.html +2 -2
- package/build/server/app/renderer/auth/api.d.ts +28 -2
- package/build/server/app/renderer/auth/api.d.ts.map +1 -1
- package/build/server/app/renderer/auth/api.js +29 -4
- package/build/server/app/renderer/auth/api.js.map +1 -1
- package/build/server/app/renderer/providerCatalogClient.d.ts.map +1 -1
- package/build/server/app/renderer/providerCatalogClient.js +15 -6
- package/build/server/app/renderer/providerCatalogClient.js.map +1 -1
- package/build/server/app/renderer/providerRegistryClient.d.ts +1 -1
- package/build/server/app/renderer/providerRegistryClient.d.ts.map +1 -1
- package/build/server/app/renderer/providerRegistryClient.js +23 -41
- package/build/server/app/renderer/providerRegistryClient.js.map +1 -1
- package/build/server/app/renderer/settings/settingsDesktopUpdateLabels.d.ts +11 -4
- package/build/server/app/renderer/settings/settingsDesktopUpdateLabels.d.ts.map +1 -1
- package/build/server/app/renderer/settings/settingsDesktopUpdateLabels.js +25 -5
- package/build/server/app/renderer/settings/settingsDesktopUpdateLabels.js.map +1 -1
- package/build/server/app/server/appPackageRoutes.d.ts +2 -0
- package/build/server/app/server/appPackageRoutes.d.ts.map +1 -1
- package/build/server/app/server/appPackageRoutes.js +105 -0
- package/build/server/app/server/appPackageRoutes.js.map +1 -1
- package/build/server/app/server/authGatePolicy.js +8 -3
- package/build/server/app/server/authGatePolicy.js.map +1 -1
- package/build/server/app/server/authRoutes.d.ts +14 -1
- package/build/server/app/server/authRoutes.d.ts.map +1 -1
- package/build/server/app/server/authRoutes.js +395 -76
- package/build/server/app/server/authRoutes.js.map +1 -1
- package/build/server/app/server/contracts.d.ts +19 -1
- package/build/server/app/server/contracts.d.ts.map +1 -1
- package/build/server/app/server/dependencies.d.ts.map +1 -1
- package/build/server/app/server/dependencies.js +48 -2
- package/build/server/app/server/dependencies.js.map +1 -1
- package/build/server/app/server/goldenPathStartupResume.d.ts +55 -0
- package/build/server/app/server/goldenPathStartupResume.d.ts.map +1 -0
- package/build/server/app/server/goldenPathStartupResume.js +109 -0
- package/build/server/app/server/goldenPathStartupResume.js.map +1 -0
- package/build/server/app/server/platformSetupRoutes.d.ts +2 -1
- package/build/server/app/server/platformSetupRoutes.d.ts.map +1 -1
- package/build/server/app/server/platformSetupRoutes.js +117 -64
- package/build/server/app/server/platformSetupRoutes.js.map +1 -1
- package/build/server/app/server/polling.d.ts.map +1 -1
- package/build/server/app/server/polling.js +2 -0
- package/build/server/app/server/polling.js.map +1 -1
- package/build/server/app/server/requestRouter.d.ts.map +1 -1
- package/build/server/app/server/requestRouter.js +33 -0
- package/build/server/app/server/requestRouter.js.map +1 -1
- package/build/server/app/server/runtimeSurfaceProxy.d.ts.map +1 -1
- package/build/server/app/server/runtimeSurfaceProxy.js +16 -19
- package/build/server/app/server/runtimeSurfaceProxy.js.map +1 -1
- package/build/server/app/server/startupRecovery.d.ts.map +1 -1
- package/build/server/app/server/startupRecovery.js +5 -0
- package/build/server/app/server/startupRecovery.js.map +1 -1
- package/build/server/app/server/telegramCommandSurface.d.ts +29 -0
- package/build/server/app/server/telegramCommandSurface.d.ts.map +1 -0
- package/build/server/app/server/telegramCommandSurface.js +123 -0
- package/build/server/app/server/telegramCommandSurface.js.map +1 -0
- package/build/server/app/server/transportWorkGoldenPath.d.ts +82 -0
- package/build/server/app/server/transportWorkGoldenPath.d.ts.map +1 -0
- package/build/server/app/server/transportWorkGoldenPath.js +307 -0
- package/build/server/app/server/transportWorkGoldenPath.js.map +1 -0
- package/build/server/config.d.ts +22 -3
- package/build/server/config.d.ts.map +1 -1
- package/build/server/config.js +14 -13
- package/build/server/config.js.map +1 -1
- package/build/server/design/components/providerModelFieldsSupport.d.ts +3 -3
- package/build/server/design/components/providerModelFieldsSupport.d.ts.map +1 -1
- package/build/server/design/components/providerModelFieldsSupport.js +40 -38
- package/build/server/design/components/providerModelFieldsSupport.js.map +1 -1
- package/build/server/design/components/useProviderCatalogState.d.ts +1 -0
- package/build/server/design/components/useProviderCatalogState.d.ts.map +1 -1
- package/build/server/design/components/useProviderCatalogState.js +1 -0
- package/build/server/design/components/useProviderCatalogState.js.map +1 -1
- package/build/server/design/components/useProviderRegistryAutoRecheck.d.ts.map +1 -1
- package/build/server/design/components/useProviderRegistryAutoRecheck.js +20 -13
- package/build/server/design/components/useProviderRegistryAutoRecheck.js.map +1 -1
- package/build/server/design/components/useProviderRegistryState.d.ts.map +1 -1
- package/build/server/design/components/useProviderRegistryState.js +12 -25
- package/build/server/design/components/useProviderRegistryState.js.map +1 -1
- package/build/server/design/components/useProviderTargetReconciliation.d.ts.map +1 -1
- package/build/server/design/components/useProviderTargetReconciliation.js +5 -2
- package/build/server/design/components/useProviderTargetReconciliation.js.map +1 -1
- package/build/server/index.js +4 -0
- package/build/server/index.js.map +1 -1
- package/build/server/platform/apps/packageInstaller.d.ts +19 -0
- package/build/server/platform/apps/packageInstaller.d.ts.map +1 -0
- package/build/server/platform/apps/packageInstaller.js +92 -0
- package/build/server/platform/apps/packageInstaller.js.map +1 -0
- package/build/server/platform/apps/registry.d.ts +6 -0
- package/build/server/platform/apps/registry.d.ts.map +1 -1
- package/build/server/platform/apps/registry.js +24 -0
- package/build/server/platform/apps/registry.js.map +1 -1
- package/build/server/platform/apps/renderer.d.ts +6 -0
- package/build/server/platform/apps/renderer.d.ts.map +1 -0
- package/build/server/platform/apps/renderer.js +18 -0
- package/build/server/platform/apps/renderer.js.map +1 -0
- package/build/server/platform/auth/actionGrant.d.ts +61 -0
- package/build/server/platform/auth/actionGrant.d.ts.map +1 -0
- package/build/server/platform/auth/actionGrant.js +108 -0
- package/build/server/platform/auth/actionGrant.js.map +1 -0
- package/build/server/platform/auth/adminCredentials.d.ts +37 -0
- package/build/server/platform/auth/adminCredentials.d.ts.map +1 -0
- package/build/server/platform/auth/adminCredentials.js +63 -0
- package/build/server/platform/auth/adminCredentials.js.map +1 -0
- package/build/server/platform/auth/bootstrap.d.ts +14 -0
- package/build/server/platform/auth/bootstrap.d.ts.map +1 -1
- package/build/server/platform/auth/bootstrap.js +29 -4
- package/build/server/platform/auth/bootstrap.js.map +1 -1
- package/build/server/platform/auth/config.d.ts.map +1 -1
- package/build/server/platform/auth/config.js +1 -1
- package/build/server/platform/auth/config.js.map +1 -1
- package/build/server/platform/auth/errorCodes.d.ts +2 -0
- package/build/server/platform/auth/errorCodes.d.ts.map +1 -1
- package/build/server/platform/auth/errorCodes.js +2 -0
- package/build/server/platform/auth/errorCodes.js.map +1 -1
- package/build/server/platform/auth/googleAccount.d.ts +40 -13
- package/build/server/platform/auth/googleAccount.d.ts.map +1 -1
- package/build/server/platform/auth/googleAccount.js +89 -70
- package/build/server/platform/auth/googleAccount.js.map +1 -1
- package/build/server/platform/auth/index.d.ts +4 -0
- package/build/server/platform/auth/index.d.ts.map +1 -1
- package/build/server/platform/auth/index.js +4 -0
- package/build/server/platform/auth/index.js.map +1 -1
- package/build/server/platform/auth/localLogin.d.ts +10 -0
- package/build/server/platform/auth/localLogin.d.ts.map +1 -1
- package/build/server/platform/auth/localLogin.js +17 -0
- package/build/server/platform/auth/localLogin.js.map +1 -1
- package/build/server/platform/auth/loginMethods.d.ts +18 -0
- package/build/server/platform/auth/loginMethods.d.ts.map +1 -0
- package/build/server/platform/auth/loginMethods.js +19 -0
- package/build/server/platform/auth/loginMethods.js.map +1 -0
- package/build/server/platform/auth/securityEvents.d.ts +31 -0
- package/build/server/platform/auth/securityEvents.d.ts.map +1 -0
- package/build/server/platform/auth/securityEvents.js +45 -0
- package/build/server/platform/auth/securityEvents.js.map +1 -0
- package/build/server/platform/runtime/deliveryClient.d.ts +111 -0
- package/build/server/platform/runtime/deliveryClient.d.ts.map +1 -0
- package/build/server/platform/runtime/deliveryClient.js +289 -0
- package/build/server/platform/runtime/deliveryClient.js.map +1 -0
- package/build/server/platform/supervision/providerCapabilityBootstrapYaml.d.ts +1 -0
- package/build/server/platform/supervision/providerCapabilityBootstrapYaml.d.ts.map +1 -1
- package/build/server/platform/supervision/providerCapabilityBootstrapYaml.js +10 -0
- package/build/server/platform/supervision/providerCapabilityBootstrapYaml.js.map +1 -1
- package/build/server/platform/supervision/runtimeBoundary.d.ts +11 -1
- package/build/server/platform/supervision/runtimeBoundary.d.ts.map +1 -1
- package/build/server/platform/supervision/runtimeBoundary.js +2 -2
- package/build/server/platform/supervision/runtimeBoundary.js.map +1 -1
- package/build/server/platform/transports/telegram/bridge.d.ts +18 -0
- package/build/server/platform/transports/telegram/bridge.d.ts.map +1 -1
- package/build/server/platform/transports/telegram/bridge.js +176 -0
- package/build/server/platform/transports/telegram/bridge.js.map +1 -1
- package/build/server/platform/transports/telegram/commandPort.d.ts +40 -0
- package/build/server/platform/transports/telegram/commandPort.d.ts.map +1 -0
- package/build/server/platform/transports/telegram/commandPort.js +17 -0
- package/build/server/platform/transports/telegram/commandPort.js.map +1 -0
- package/build/server/platform/transports/telegram/commandRouter.d.ts +22 -0
- package/build/server/platform/transports/telegram/commandRouter.d.ts.map +1 -1
- package/build/server/platform/transports/telegram/commandRouter.js.map +1 -1
- package/build/server/platform/transports/telegram/commands/index.d.ts.map +1 -1
- package/build/server/platform/transports/telegram/commands/index.js +38 -0
- package/build/server/platform/transports/telegram/commands/index.js.map +1 -1
- package/build/server/platform/transports/telegram/ingressDispatch.d.ts +56 -0
- package/build/server/platform/transports/telegram/ingressDispatch.d.ts.map +1 -0
- package/build/server/platform/transports/telegram/ingressDispatch.js +93 -0
- package/build/server/platform/transports/telegram/ingressDispatch.js.map +1 -0
- package/build/server/platform/transports/telegram/polling.d.ts +34 -0
- package/build/server/platform/transports/telegram/polling.d.ts.map +1 -1
- package/build/server/platform/transports/telegram/polling.js +86 -9
- package/build/server/platform/transports/telegram/polling.js.map +1 -1
- package/build/server/platform/transports/telegram/relay/index.d.ts +3 -0
- package/build/server/platform/transports/telegram/relay/index.d.ts.map +1 -1
- package/build/server/platform/transports/telegram/relay/index.js +5 -1
- package/build/server/platform/transports/telegram/relay/index.js.map +1 -1
- package/build/server/platform/transports/telegram/relay/ingress.d.ts +2 -0
- package/build/server/platform/transports/telegram/relay/ingress.d.ts.map +1 -1
- package/build/server/platform/transports/telegram/relay/ingress.js +1 -1
- package/build/server/platform/transports/telegram/relay/ingress.js.map +1 -1
- package/build/server/platform/transports/work-delivery/actionTokens.d.ts +66 -0
- package/build/server/platform/transports/work-delivery/actionTokens.d.ts.map +1 -0
- package/build/server/platform/transports/work-delivery/actionTokens.js +145 -0
- package/build/server/platform/transports/work-delivery/actionTokens.js.map +1 -0
- package/build/server/platform/transports/work-delivery/contracts.d.ts +172 -0
- package/build/server/platform/transports/work-delivery/contracts.d.ts.map +1 -0
- package/build/server/platform/transports/work-delivery/contracts.js +26 -0
- package/build/server/platform/transports/work-delivery/contracts.js.map +1 -0
- package/build/server/platform/transports/work-delivery/deliveryGates.d.ts +32 -0
- package/build/server/platform/transports/work-delivery/deliveryGates.d.ts.map +1 -0
- package/build/server/platform/transports/work-delivery/deliveryGates.js +45 -0
- package/build/server/platform/transports/work-delivery/deliveryGates.js.map +1 -0
- package/build/server/platform/transports/work-delivery/inboundClassification.d.ts +31 -0
- package/build/server/platform/transports/work-delivery/inboundClassification.d.ts.map +1 -0
- package/build/server/platform/transports/work-delivery/inboundClassification.js +52 -0
- package/build/server/platform/transports/work-delivery/inboundClassification.js.map +1 -0
- package/build/server/platform/transports/work-delivery/outbox.d.ts +84 -0
- package/build/server/platform/transports/work-delivery/outbox.d.ts.map +1 -0
- package/build/server/platform/transports/work-delivery/outbox.js +270 -0
- package/build/server/platform/transports/work-delivery/outbox.js.map +1 -0
- package/build/server/platform/transports/work-delivery/permissionEnvelope.d.ts +57 -0
- package/build/server/platform/transports/work-delivery/permissionEnvelope.d.ts.map +1 -0
- package/build/server/platform/transports/work-delivery/permissionEnvelope.js +74 -0
- package/build/server/platform/transports/work-delivery/permissionEnvelope.js.map +1 -0
- package/build/server/platform/transports/work-delivery/port.d.ts +60 -0
- package/build/server/platform/transports/work-delivery/port.d.ts.map +1 -0
- package/build/server/platform/transports/work-delivery/port.js +15 -0
- package/build/server/platform/transports/work-delivery/port.js.map +1 -0
- package/build/server/platform/transports/work-delivery/proposal.d.ts +31 -0
- package/build/server/platform/transports/work-delivery/proposal.d.ts.map +1 -0
- package/build/server/platform/transports/work-delivery/proposal.js +59 -0
- package/build/server/platform/transports/work-delivery/proposal.js.map +1 -0
- package/build/server/platform/transports/work-delivery/readiness.d.ts +61 -0
- package/build/server/platform/transports/work-delivery/readiness.d.ts.map +1 -0
- package/build/server/platform/transports/work-delivery/readiness.js +123 -0
- package/build/server/platform/transports/work-delivery/readiness.js.map +1 -0
- package/build/server/platform/transports/work-delivery/stageProjection.d.ts +43 -0
- package/build/server/platform/transports/work-delivery/stageProjection.d.ts.map +1 -0
- package/build/server/platform/transports/work-delivery/stageProjection.js +132 -0
- package/build/server/platform/transports/work-delivery/stageProjection.js.map +1 -0
- package/build/server/platform/transports/work-delivery/stateStore.d.ts +21 -0
- package/build/server/platform/transports/work-delivery/stateStore.d.ts.map +1 -0
- package/build/server/platform/transports/work-delivery/stateStore.js +193 -0
- package/build/server/platform/transports/work-delivery/stateStore.js.map +1 -0
- package/build/server/platform/transports/work-delivery/telemetry.d.ts +49 -0
- package/build/server/platform/transports/work-delivery/telemetry.d.ts.map +1 -0
- package/build/server/platform/transports/work-delivery/telemetry.js +80 -0
- package/build/server/platform/transports/work-delivery/telemetry.js.map +1 -0
- package/build/server/products/chat/api/contracts.d.ts +10 -8
- package/build/server/products/chat/api/contracts.d.ts.map +1 -1
- package/build/server/products/chat/api/resources/channelRoutes.d.ts.map +1 -1
- package/build/server/products/chat/api/resources/channelRoutes.js +27 -1
- package/build/server/products/chat/api/resources/channelRoutes.js.map +1 -1
- package/build/server/products/chat/api/routeSupport.d.ts +8 -0
- package/build/server/products/chat/api/routeSupport.d.ts.map +1 -1
- package/build/server/products/chat/api/routeSupport.js +5 -4
- package/build/server/products/chat/api/routeSupport.js.map +1 -1
- package/build/server/products/chat/api/setupRoutes.d.ts.map +1 -1
- package/build/server/products/chat/api/setupRoutes.js +24 -91
- package/build/server/products/chat/api/setupRoutes.js.map +1 -1
- package/build/server/products/chat/state/model/channelExecutionTargets.d.ts +15 -0
- package/build/server/products/chat/state/model/channelExecutionTargets.d.ts.map +1 -1
- package/build/server/products/chat/state/model/channelExecutionTargets.js +25 -0
- package/build/server/products/chat/state/model/channelExecutionTargets.js.map +1 -1
- package/build/server/products/chat/state/model/index.d.ts +1 -1
- package/build/server/products/chat/state/model/index.d.ts.map +1 -1
- package/build/server/products/chat/state/model/index.js +1 -1
- package/build/server/products/chat/state/model/index.js.map +1 -1
- package/build/server/products/code/api/relayRoutes.d.ts.map +1 -1
- package/build/server/products/code/api/relayRoutes.js +36 -7
- package/build/server/products/code/api/relayRoutes.js.map +1 -1
- package/build/server/products/code/state/relayState.d.ts +2 -1
- package/build/server/products/code/state/relayState.d.ts.map +1 -1
- package/build/server/products/code/state/relayState.js +7 -7
- package/build/server/products/code/state/relayState.js.map +1 -1
- package/build/server/products/shared/api/workspaceContracts.d.ts +5 -8
- package/build/server/products/shared/api/workspaceContracts.d.ts.map +1 -1
- package/build/server/products/work/api/goldenPathProjection.d.ts +156 -0
- package/build/server/products/work/api/goldenPathProjection.d.ts.map +1 -0
- package/build/server/products/work/api/goldenPathProjection.js +252 -0
- package/build/server/products/work/api/goldenPathProjection.js.map +1 -0
- package/build/server/products/work/api/index.d.ts +54 -1
- package/build/server/products/work/api/index.d.ts.map +1 -1
- package/build/server/products/work/api/index.js +182 -4
- package/build/server/products/work/api/index.js.map +1 -1
- package/build/server/products/work/api/projection.d.ts +7 -1
- package/build/server/products/work/api/projection.d.ts.map +1 -1
- package/build/server/products/work/api/projection.js +7 -1
- package/build/server/products/work/api/projection.js.map +1 -1
- package/build/server/products/work/shared/apiPaths.d.ts +8 -0
- package/build/server/products/work/shared/apiPaths.d.ts.map +1 -1
- package/build/server/products/work/shared/apiPaths.js +8 -0
- package/build/server/products/work/shared/apiPaths.js.map +1 -1
- package/build/server/products/work/shared/workGoldenPathMessages.d.ts +83 -0
- package/build/server/products/work/shared/workGoldenPathMessages.d.ts.map +1 -0
- package/build/server/products/work/shared/workGoldenPathMessages.js +211 -0
- package/build/server/products/work/shared/workGoldenPathMessages.js.map +1 -0
- package/build/server/products/work/shared/workGoldenPathMetadata.d.ts +45 -0
- package/build/server/products/work/shared/workGoldenPathMetadata.d.ts.map +1 -0
- package/build/server/products/work/shared/workGoldenPathMetadata.js +122 -0
- package/build/server/products/work/shared/workGoldenPathMetadata.js.map +1 -0
- package/build/server/products/work/state/workCompletionEvidence.d.ts +42 -0
- package/build/server/products/work/state/workCompletionEvidence.d.ts.map +1 -0
- package/build/server/products/work/state/workCompletionEvidence.js +59 -0
- package/build/server/products/work/state/workCompletionEvidence.js.map +1 -0
- package/build/server/products/work/state/workExecutionTaskDelegate.d.ts +16 -0
- package/build/server/products/work/state/workExecutionTaskDelegate.d.ts.map +1 -1
- package/build/server/products/work/state/workExecutionTaskDelegate.js +91 -68
- package/build/server/products/work/state/workExecutionTaskDelegate.js.map +1 -1
- package/build/server/products/work/state/workGoldenPathAdmission.d.ts +78 -0
- package/build/server/products/work/state/workGoldenPathAdmission.d.ts.map +1 -0
- package/build/server/products/work/state/workGoldenPathAdmission.js +249 -0
- package/build/server/products/work/state/workGoldenPathAdmission.js.map +1 -0
- package/build/server/products/work/state/workGoldenPathDeliveryEvidence.d.ts +33 -0
- package/build/server/products/work/state/workGoldenPathDeliveryEvidence.d.ts.map +1 -0
- package/build/server/products/work/state/workGoldenPathDeliveryEvidence.js +161 -0
- package/build/server/products/work/state/workGoldenPathDeliveryEvidence.js.map +1 -0
- package/build/server/products/work/state/workGoldenPathIntake.d.ts +34 -0
- package/build/server/products/work/state/workGoldenPathIntake.d.ts.map +1 -0
- package/build/server/products/work/state/workGoldenPathIntake.js +50 -0
- package/build/server/products/work/state/workGoldenPathIntake.js.map +1 -0
- package/build/server/products/work/state/workGoldenPathLifecycle.d.ts +44 -0
- package/build/server/products/work/state/workGoldenPathLifecycle.d.ts.map +1 -0
- package/build/server/products/work/state/workGoldenPathLifecycle.js +146 -0
- package/build/server/products/work/state/workGoldenPathLifecycle.js.map +1 -0
- package/build/server/products/work/state/workGoldenPathPublish.d.ts +84 -0
- package/build/server/products/work/state/workGoldenPathPublish.d.ts.map +1 -0
- package/build/server/products/work/state/workGoldenPathPublish.js +488 -0
- package/build/server/products/work/state/workGoldenPathPublish.js.map +1 -0
- package/build/server/products/work/state/workGoldenPathRunner.d.ts +121 -0
- package/build/server/products/work/state/workGoldenPathRunner.d.ts.map +1 -0
- package/build/server/products/work/state/workGoldenPathRunner.js +447 -0
- package/build/server/products/work/state/workGoldenPathRunner.js.map +1 -0
- package/build/server/products/work/state/workGoldenPathRuntimeExecutor.d.ts +74 -0
- package/build/server/products/work/state/workGoldenPathRuntimeExecutor.d.ts.map +1 -0
- package/build/server/products/work/state/workGoldenPathRuntimeExecutor.js +239 -0
- package/build/server/products/work/state/workGoldenPathRuntimeExecutor.js.map +1 -0
- package/build/server/products/work/state/workGoldenPathService.d.ts +152 -0
- package/build/server/products/work/state/workGoldenPathService.d.ts.map +1 -0
- package/build/server/products/work/state/workGoldenPathService.js +1057 -0
- package/build/server/products/work/state/workGoldenPathService.js.map +1 -0
- package/build/server/products/work/state/workGoldenPathTelegramPort.d.ts +87 -0
- package/build/server/products/work/state/workGoldenPathTelegramPort.d.ts.map +1 -0
- package/build/server/products/work/state/workGoldenPathTelegramPort.js +220 -0
- package/build/server/products/work/state/workGoldenPathTelegramPort.js.map +1 -0
- package/build/server/runtime/client.d.ts +24 -0
- package/build/server/runtime/client.d.ts.map +1 -1
- package/build/server/runtime/client.js +62 -1
- package/build/server/runtime/client.js.map +1 -1
- package/build/server/runtime/setup.d.ts +10 -4
- package/build/server/runtime/setup.d.ts.map +1 -1
- package/build/server/runtime/setup.js +14 -18
- package/build/server/runtime/setup.js.map +1 -1
- package/build/server/runtime/usageSnapshot.d.ts +3 -0
- package/build/server/runtime/usageSnapshot.d.ts.map +1 -0
- package/build/server/runtime/usageSnapshot.js +69 -0
- package/build/server/runtime/usageSnapshot.js.map +1 -0
- package/build/server/server/routes/providerCapabilityBootstrap.d.ts +69 -0
- package/build/server/server/routes/providerCapabilityBootstrap.d.ts.map +1 -0
- package/build/server/server/routes/providerCapabilityBootstrap.js +165 -0
- package/build/server/server/routes/providerCapabilityBootstrap.js.map +1 -0
- package/build/server/server/routes/providers.d.ts.map +1 -1
- package/build/server/server/routes/providers.js +112 -81
- package/build/server/server/routes/providers.js.map +1 -1
- package/build/server/server/routes/telegram.d.ts +9 -0
- package/build/server/server/routes/telegram.d.ts.map +1 -1
- package/build/server/server/routes/telegram.js +79 -72
- package/build/server/server/routes/telegram.js.map +1 -1
- package/build/server/shared/catsAppManifest.d.ts +3 -1
- package/build/server/shared/catsAppManifest.d.ts.map +1 -1
- package/build/server/shared/catsAppManifest.js +2 -0
- package/build/server/shared/catsAppManifest.js.map +1 -1
- package/build/server/shared/executionLabel.d.ts.map +1 -1
- package/build/server/shared/executionLabel.js +8 -1
- package/build/server/shared/executionLabel.js.map +1 -1
- package/build/server/shared/i18n/catalogs/en.d.ts.map +1 -1
- package/build/server/shared/i18n/catalogs/en.js +238 -3
- package/build/server/shared/i18n/catalogs/en.js.map +1 -1
- package/build/server/shared/i18n/catalogs/zh-TW.d.ts.map +1 -1
- package/build/server/shared/i18n/catalogs/zh-TW.js +236 -3
- package/build/server/shared/i18n/catalogs/zh-TW.js.map +1 -1
- package/build/server/shared/i18n/index.d.ts +231 -0
- package/build/server/shared/i18n/index.d.ts.map +1 -1
- package/build/server/shared/i18n/messageKeys.d.ts +231 -0
- package/build/server/shared/i18n/messageKeys.d.ts.map +1 -1
- package/build/server/shared/i18n/messageKeys.js +231 -0
- package/build/server/shared/i18n/messageKeys.js.map +1 -1
- package/build/server/shared/platformSetupOperation.d.ts +2 -0
- package/build/server/shared/platformSetupOperation.d.ts.map +1 -0
- package/build/server/shared/platformSetupOperation.js +9 -0
- package/build/server/shared/platformSetupOperation.js.map +1 -0
- package/build/server/shared/providerCatalog.d.ts +6 -2
- package/build/server/shared/providerCatalog.d.ts.map +1 -1
- package/build/server/shared/providerCatalog.js +15 -1
- package/build/server/shared/providerCatalog.js.map +1 -1
- package/build/server/shared/providerCatalogData.d.ts +38 -22
- package/build/server/shared/providerCatalogData.d.ts.map +1 -1
- package/build/server/shared/providerCatalogData.js +31 -10
- package/build/server/shared/providerCatalogData.js.map +1 -1
- package/build/server/shared/providerCatalogInstances.d.ts.map +1 -1
- package/build/server/shared/providerCatalogInstances.js +6 -0
- package/build/server/shared/providerCatalogInstances.js.map +1 -1
- package/build/server/shared/providerModelLabelRegistry.d.ts +29 -0
- package/build/server/shared/providerModelLabelRegistry.d.ts.map +1 -0
- package/build/server/shared/providerModelLabelRegistry.js +49 -0
- package/build/server/shared/providerModelLabelRegistry.js.map +1 -0
- package/build/server/shared/providerSelection.d.ts.map +1 -1
- package/build/server/shared/providerSelection.js +10 -13
- package/build/server/shared/providerSelection.js.map +1 -1
- package/build/server/shared/runtimeSetup.d.ts +17 -4
- package/build/server/shared/runtimeSetup.d.ts.map +1 -1
- package/build/server/shared/runtimeStatusPresentation.js +1 -1
- package/build/server/shared/runtimeStatusPresentation.js.map +1 -1
- package/package.json +23 -1
- package/packages/app-sdk/browser.d.ts +51 -0
- package/packages/app-sdk/browser.js +48 -0
- package/packages/app-sdk/package.d.ts +14 -0
- package/packages/app-sdk/package.js +131 -0
- package/packages/app-sdk/package.json +7 -0
- package/scripts/README.md +73 -26
- package/scripts/build-desktop-installer.mjs +15 -0
- package/scripts/build-test-ui.mjs +1 -1
- package/scripts/bundle-server.mjs +23 -10
- package/scripts/linux/build-desktop-package.sh +6 -6
- package/scripts/linux/install-antigravity.sh +0 -0
- package/scripts/linux/install-devin.sh +0 -0
- package/scripts/linux/install-meta-cli.sh +8 -0
- package/scripts/linux/node-cli-common.sh +2 -75
- package/scripts/linux/provider-cli-common.sh +103 -30
- package/scripts/linux/sync-agent-skills.sh +27 -5
- package/scripts/linux/test-linux-package-smoke.sh +4 -3
- package/scripts/linux/upgrade-cli-tools.sh +1 -1
- package/scripts/macos/build-desktop-package.sh +5 -5
- package/scripts/macos/install-antigravity.sh +0 -0
- package/scripts/macos/install-devin.sh +0 -0
- package/scripts/macos/install-meta-cli.sh +8 -0
- package/scripts/macos/node-cli-common.sh +2 -75
- package/scripts/macos/provider-cli-common.sh +103 -30
- package/scripts/macos/sync-agent-skills.sh +27 -5
- package/scripts/macos/test-macos-package-smoke.sh +4 -3
- package/scripts/macos/upgrade-cli-tools.sh +1 -1
- package/scripts/package-desktop.mjs +15 -2
- package/scripts/testing/check-usage-app.mts +266 -0
- package/scripts/testing/usage-app-smoke-electron.cjs +10 -0
- package/scripts/testing/usage-app-smoke-renderer.tsx +8 -0
- package/scripts/verify-desktop-app-bundle.mjs +108 -0
- package/scripts/windows/Build-DesktopPackage.ps1 +9 -6
- package/scripts/windows/Check-WindowsSetupReadiness.ps1 +14 -443
- package/scripts/windows/{Install-Aider.ps1 → Install-MetaCli.ps1} +180 -92
- package/scripts/windows/Install-Ollama.ps1 +4 -1
- package/scripts/windows/Remove-MergedBranches.ps1 +229 -0
- package/scripts/windows/Sync-AgentSkills.ps1 +29 -6
- package/scripts/windows/Test-WindowsInstallerSmoke.ps1 +2 -1
- package/build/desktop/updateNotifications.d.ts +0 -64
- package/build/desktop/updateNotifications.d.ts.map +0 -1
- package/build/desktop/updateNotifications.js +0 -143
- package/build/desktop/updateNotifications.js.map +0 -1
- package/build/renderer/assets/App-C57f4p8k.js +0 -2
- package/build/renderer/assets/App-CPqGDXVi.js +0 -1
- package/build/renderer/assets/App-DGwkRFZl.css +0 -1
- package/build/renderer/assets/WorkspaceAppRoutes-DYg2vnjz.js +0 -1
- package/build/renderer/assets/app-DVN9Ghrk.js +0 -43
- package/build/renderer/assets/app-XnXwkcD2.css +0 -1
- package/build/renderer/assets/conversationSidebarRecentEntries-XZVCnMLw.js +0 -6
- package/scripts/linux/install-aider.sh +0 -8
- package/scripts/macos/install-aider.sh +0 -8
|
@@ -1,15 +1,40 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
|
+
import { assertPlatformAdminCredentials } from './adminCredentials.js';
|
|
2
3
|
import { createLocalPasswordHash } from './password.js';
|
|
3
4
|
import { issueBrowserSession } from './session.js';
|
|
5
|
+
/**
|
|
6
|
+
* Raised when first-admin creation loses the uniqueness recheck that runs
|
|
7
|
+
* inside the serialized auth-state mutation. Callers map this to a conflict
|
|
8
|
+
* response instead of creating a second Account.
|
|
9
|
+
*/
|
|
10
|
+
export class PlatformFirstAdminExistsError extends Error {
|
|
11
|
+
constructor() {
|
|
12
|
+
super('First admin already exists.');
|
|
13
|
+
this.name = 'PlatformFirstAdminExistsError';
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* SPEC-113 requirement 5: the "no Admin exists" check must run inside the same
|
|
18
|
+
* serialized mutation that persists the new records. A prior setup-status read
|
|
19
|
+
* is not concurrency control.
|
|
20
|
+
*/
|
|
21
|
+
export function hasExistingPlatformAdmin(state) {
|
|
22
|
+
return state.accounts.length > 0
|
|
23
|
+
|| state.memberships.some((membership) => membership.roles.some((role) => role === 'owner' || role === 'admin'));
|
|
24
|
+
}
|
|
4
25
|
export async function createFirstAdminLocalAuthState(input) {
|
|
5
|
-
if (input.state
|
|
6
|
-
throw new
|
|
26
|
+
if (hasExistingPlatformAdmin(input.state)) {
|
|
27
|
+
throw new PlatformFirstAdminExistsError();
|
|
7
28
|
}
|
|
29
|
+
const credentials = assertPlatformAdminCredentials({
|
|
30
|
+
identifier: input.identifier,
|
|
31
|
+
password: input.password,
|
|
32
|
+
});
|
|
8
33
|
const now = input.now ?? new Date();
|
|
9
34
|
const nowIso = now.toISOString();
|
|
10
35
|
const accountId = `auth-account-${randomUUID()}`;
|
|
11
|
-
const normalizedIdentifier = normalizeAccountIdentifier(
|
|
12
|
-
const password = await createLocalPasswordHash(
|
|
36
|
+
const normalizedIdentifier = normalizeAccountIdentifier(credentials.identifier);
|
|
37
|
+
const password = await createLocalPasswordHash(credentials.password);
|
|
13
38
|
const account = {
|
|
14
39
|
id: accountId,
|
|
15
40
|
displayName: input.displayName.trim() || 'Owner',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../../../../src/platform/auth/bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAkC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../../../../src/platform/auth/bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAkC,MAAM,cAAc,CAAC;AAQnF;;;;GAIG;AACH,MAAM,OAAO,6BAA8B,SAAQ,KAAK;IACtD;QACE,KAAK,CAAC,6BAA6B,CAAC,CAAC;QACrC,IAAI,CAAC,IAAI,GAAG,+BAA+B,CAAC;IAC9C,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,UAAU,wBAAwB,CAAC,KAAwB;IAC/D,OAAO,KAAK,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC;WAC3B,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE,CACvC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,OAAO,IAAI,IAAI,KAAK,OAAO,CAAC,CACtE,CAAC;AACN,CAAC;AAoBD,MAAM,CAAC,KAAK,UAAU,8BAA8B,CAClD,KAAiC;IAEjC,IAAI,wBAAwB,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,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B,qBAAqB,EAAE,MAAM,EAAE,CAAC;IAChC,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,MAAM,EAAE,wBAAwB,CAAC;CAClC;AAED,eAAO,MAAM,2BAA2B,QAA2B,CAAC;AACpE,eAAO,MAAM,kCAAkC,QAA2B,CAAC;AAC3E,eAAO,MAAM,gCAAgC,IAAI,CAAC;AAClD,eAAO,MAAM,6BAA6B,QAAS,CAAC;AACpD,eAAO,MAAM,sCAAsC,MAAM,CAAC;AAC1D,eAAO,MAAM,gCAAgC,QAAiB,CAAC;AAC/D,eAAO,MAAM,qCAAqC,MAAM,CAAC;AAEzD,MAAM,WAAW,2BAA2B;IAC1C,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,2BAA2B,GAAG,kBAAkB,CAqD7F"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolvePlatformAuthRecoveryTokenPathFromChatState, resolvePlatformAuthStatePathFromChatState, } from '../../shared/platformPaths.js';
|
|
2
|
-
export const DEFAULT_AUTH_SESSION_TTL_MS =
|
|
2
|
+
export const DEFAULT_AUTH_SESSION_TTL_MS = 30 * 24 * 60 * 60 * 1000;
|
|
3
3
|
export const DEFAULT_AUTH_MOBILE_SESSION_TTL_MS = 30 * 24 * 60 * 60 * 1000;
|
|
4
4
|
export const DEFAULT_AUTH_LOGIN_FAILURE_LIMIT = 5;
|
|
5
5
|
export const DEFAULT_AUTH_LOGIN_LOCKOUT_MS = 30_000;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../src/platform/auth/config.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iDAAiD,EACjD,yCAAyC,GAC1C,MAAM,+BAA+B,C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,CAAC,IAAY,EAAE,IAAY;IAC9D,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC;YACjB,eAAe,CAAC,UAAU,IAAI,IAAI,IAAI,EAAE,CAAC;YACzC,uBAAuB;YACvB,uBAAuB;SACxB,CAAC,CAAC,CAAC;AACN,CAAC;AAED,SAAS,eAAe,CAAC,KAAa;IACpC,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC;QAC9B,IAAI,MAAM,CAAC,QAAQ,KAAK,OAAO,IAAI,MAAM,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;YAChE,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;QACnD,CAAC;QACD,OAAO,MAAM,CAAC,MAAM,CAAC;IACvB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CACb,gCAAgC,KAAK,MACnC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CACvD,EAAE,CACH,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -2,6 +2,8 @@ export declare const PLATFORM_AUTH_ERROR_CODES: {
|
|
|
2
2
|
readonly unauthenticated: "E_UNAUTHENTICATED";
|
|
3
3
|
readonly forbidden: "E_FORBIDDEN";
|
|
4
4
|
readonly csrfMismatch: "E_CSRF_MISMATCH";
|
|
5
|
+
readonly reauthRequired: "E_REAUTH_REQUIRED";
|
|
6
|
+
readonly identityConflict: "E_IDENTITY_CONFLICT";
|
|
5
7
|
};
|
|
6
8
|
export type PlatformAuthErrorCode = (typeof PLATFORM_AUTH_ERROR_CODES)[keyof typeof PLATFORM_AUTH_ERROR_CODES];
|
|
7
9
|
//# sourceMappingURL=errorCodes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errorCodes.d.ts","sourceRoot":"","sources":["../../../../src/platform/auth/errorCodes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB
|
|
1
|
+
{"version":3,"file":"errorCodes.d.ts","sourceRoot":"","sources":["../../../../src/platform/auth/errorCodes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB;;;;;;CAM5B,CAAC;AAEX,MAAM,MAAM,qBAAqB,GAC/B,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,OAAO,yBAAyB,CAAC,CAAC"}
|
|
@@ -2,5 +2,7 @@ export const PLATFORM_AUTH_ERROR_CODES = {
|
|
|
2
2
|
unauthenticated: 'E_UNAUTHENTICATED',
|
|
3
3
|
forbidden: 'E_FORBIDDEN',
|
|
4
4
|
csrfMismatch: 'E_CSRF_MISMATCH',
|
|
5
|
+
reauthRequired: 'E_REAUTH_REQUIRED',
|
|
6
|
+
identityConflict: 'E_IDENTITY_CONFLICT',
|
|
5
7
|
};
|
|
6
8
|
//# sourceMappingURL=errorCodes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errorCodes.js","sourceRoot":"","sources":["../../../../src/platform/auth/errorCodes.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,eAAe,EAAE,mBAAmB;IACpC,SAAS,EAAE,aAAa;IACxB,YAAY,EAAE,iBAAiB;
|
|
1
|
+
{"version":3,"file":"errorCodes.js","sourceRoot":"","sources":["../../../../src/platform/auth/errorCodes.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,eAAe,EAAE,mBAAmB;IACpC,SAAS,EAAE,aAAa;IACxB,YAAY,EAAE,iBAAiB;IAC/B,cAAc,EAAE,mBAAmB;IACnC,gBAAgB,EAAE,qBAAqB;CAC/B,CAAC"}
|
|
@@ -1,47 +1,74 @@
|
|
|
1
1
|
import { type BrowserSessionIssueResult } from './session.js';
|
|
2
2
|
import type { PlatformAccountRecord, PlatformAuthState, PlatformIdentityRecord, PlatformMembershipRecord } from './types.js';
|
|
3
3
|
import type { PlatformVerifiedGoogleIdentity } from './googleVerifier.js';
|
|
4
|
-
export interface
|
|
4
|
+
export interface CreateGoogleBrowserSessionInput {
|
|
5
5
|
state: PlatformAuthState;
|
|
6
6
|
identity: PlatformVerifiedGoogleIdentity;
|
|
7
7
|
sessionSecret: string;
|
|
8
8
|
sessionTtlMs: number;
|
|
9
9
|
now?: Date;
|
|
10
10
|
}
|
|
11
|
-
export interface
|
|
11
|
+
export interface CreateGoogleBrowserSessionResult {
|
|
12
12
|
state: PlatformAuthState;
|
|
13
13
|
account: PlatformAccountRecord;
|
|
14
14
|
identity: PlatformIdentityRecord;
|
|
15
15
|
membership: PlatformMembershipRecord;
|
|
16
16
|
session: BrowserSessionIssueResult;
|
|
17
17
|
}
|
|
18
|
-
export interface
|
|
18
|
+
export interface LinkGoogleIdentityToAccountInput {
|
|
19
19
|
state: PlatformAuthState;
|
|
20
|
+
accountId: string;
|
|
20
21
|
identity: PlatformVerifiedGoogleIdentity;
|
|
21
|
-
sessionSecret: string;
|
|
22
|
-
sessionTtlMs: number;
|
|
23
22
|
now?: Date;
|
|
24
23
|
}
|
|
25
|
-
export interface
|
|
24
|
+
export interface LinkGoogleIdentityToAccountResult {
|
|
26
25
|
state: PlatformAuthState;
|
|
27
26
|
account: PlatformAccountRecord;
|
|
28
27
|
identity: PlatformIdentityRecord;
|
|
29
28
|
membership: PlatformMembershipRecord;
|
|
30
|
-
|
|
29
|
+
adoptedAccountEmail: boolean;
|
|
31
30
|
}
|
|
32
|
-
export
|
|
31
|
+
export type GoogleIdentityLinkRejectionReason = 'account_not_found' | 'email_mismatch' | 'subject_owned_by_other_account' | 'account_has_other_google_identity';
|
|
32
|
+
export type LinkGoogleIdentityToAccountOutcome = {
|
|
33
|
+
ok: true;
|
|
34
|
+
result: LinkGoogleIdentityToAccountResult;
|
|
35
|
+
} | {
|
|
36
|
+
ok: false;
|
|
37
|
+
reason: GoogleIdentityLinkRejectionReason;
|
|
38
|
+
};
|
|
39
|
+
export interface UnlinkGoogleIdentityFromAccountInput {
|
|
33
40
|
state: PlatformAuthState;
|
|
34
41
|
accountId: string;
|
|
35
|
-
|
|
42
|
+
keepSessionId: string;
|
|
36
43
|
now?: Date;
|
|
37
44
|
}
|
|
38
|
-
export interface
|
|
45
|
+
export interface UnlinkGoogleIdentityFromAccountResult {
|
|
39
46
|
state: PlatformAuthState;
|
|
40
47
|
account: PlatformAccountRecord;
|
|
41
|
-
identity: PlatformIdentityRecord;
|
|
42
48
|
membership: PlatformMembershipRecord;
|
|
49
|
+
revokedSessionIds: string[];
|
|
43
50
|
}
|
|
44
|
-
export
|
|
45
|
-
export
|
|
51
|
+
export type GoogleIdentityUnlinkRejectionReason = 'account_not_found' | 'google_not_linked' | 'local_fallback_missing';
|
|
52
|
+
export type UnlinkGoogleIdentityFromAccountOutcome = {
|
|
53
|
+
ok: true;
|
|
54
|
+
result: UnlinkGoogleIdentityFromAccountResult;
|
|
55
|
+
} | {
|
|
56
|
+
ok: false;
|
|
57
|
+
reason: GoogleIdentityUnlinkRejectionReason;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* ADR-111 section 4: trim and lowercase only. Cats deliberately does not apply
|
|
61
|
+
* Gmail alias, dot, or plus-address canonicalization, so two addresses Google
|
|
62
|
+
* may route to one mailbox stay distinct here.
|
|
63
|
+
*/
|
|
64
|
+
export declare function normalizePlatformAccountEmail(value: string | null | undefined): string | null;
|
|
65
|
+
export declare function linkGoogleIdentityToAccount(input: LinkGoogleIdentityToAccountInput): LinkGoogleIdentityToAccountOutcome;
|
|
66
|
+
/**
|
|
67
|
+
* ADR-111 section 6: unlinking must preserve a usable local login and must not
|
|
68
|
+
* leave ambient access behind. Session records do not retain which identity
|
|
69
|
+
* established them, so every other browser and mobile session for the account
|
|
70
|
+
* is revoked and only the step-up-verified session survives.
|
|
71
|
+
*/
|
|
72
|
+
export declare function unlinkGoogleIdentityFromAccount(input: UnlinkGoogleIdentityFromAccountInput): UnlinkGoogleIdentityFromAccountOutcome;
|
|
46
73
|
export declare function createGoogleBrowserSessionForLinkedIdentity(input: CreateGoogleBrowserSessionInput): CreateGoogleBrowserSessionResult | null;
|
|
47
74
|
//# sourceMappingURL=googleAccount.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"googleAccount.d.ts","sourceRoot":"","sources":["../../../../src/platform/auth/googleAccount.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"googleAccount.d.ts","sourceRoot":"","sources":["../../../../src/platform/auth/googleAccount.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,yBAAyB,EAC/B,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EACV,qBAAqB,EACrB,iBAAiB,EACjB,sBAAsB,EACtB,wBAAwB,EACzB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,qBAAqB,CAAC;AAE1E,MAAM,WAAW,+BAA+B;IAC9C,KAAK,EAAE,iBAAiB,CAAC;IACzB,QAAQ,EAAE,8BAA8B,CAAC;IACzC,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,IAAI,CAAC;CACZ;AAED,MAAM,WAAW,gCAAgC;IAC/C,KAAK,EAAE,iBAAiB,CAAC;IACzB,OAAO,EAAE,qBAAqB,CAAC;IAC/B,QAAQ,EAAE,sBAAsB,CAAC;IACjC,UAAU,EAAE,wBAAwB,CAAC;IACrC,OAAO,EAAE,yBAAyB,CAAC;CACpC;AAED,MAAM,WAAW,gCAAgC;IAC/C,KAAK,EAAE,iBAAiB,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,8BAA8B,CAAC;IACzC,GAAG,CAAC,EAAE,IAAI,CAAC;CACZ;AAED,MAAM,WAAW,iCAAiC;IAChD,KAAK,EAAE,iBAAiB,CAAC;IACzB,OAAO,EAAE,q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CAAoC,GAC1C,sCAAsC,CA2DxC;AAED,wBAAgB,2CAA2C,CACzD,KAAK,EAAE,+BAA+B,GACrC,gCAAgC,GAAG,IAAI,CAmDzC"}
|
|
@@ -1,58 +1,13 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
|
-
import { issueBrowserSession } from './session.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
id: accountId,
|
|
12
|
-
displayName: input.identity.displayName ?? input.identity.email,
|
|
13
|
-
email: input.identity.email,
|
|
14
|
-
avatarUrl: input.identity.avatarUrl,
|
|
15
|
-
status: 'active',
|
|
16
|
-
createdAt: nowIso,
|
|
17
|
-
updatedAt: nowIso,
|
|
18
|
-
};
|
|
19
|
-
const providerIdentity = {
|
|
20
|
-
id: `auth-identity-${randomUUID()}`,
|
|
21
|
-
accountId,
|
|
22
|
-
provider: 'google',
|
|
23
|
-
providerSubject: input.identity.providerSubject,
|
|
24
|
-
email: input.identity.email,
|
|
25
|
-
createdAt: nowIso,
|
|
26
|
-
updatedAt: nowIso,
|
|
27
|
-
};
|
|
28
|
-
const membership = {
|
|
29
|
-
id: `auth-membership-${randomUUID()}`,
|
|
30
|
-
accountId,
|
|
31
|
-
roles: ['owner', 'admin'],
|
|
32
|
-
coreActorId: 'actor-owner',
|
|
33
|
-
createdAt: nowIso,
|
|
34
|
-
updatedAt: nowIso,
|
|
35
|
-
};
|
|
36
|
-
const session = issueBrowserSession({
|
|
37
|
-
accountId,
|
|
38
|
-
sessionSecret: input.sessionSecret,
|
|
39
|
-
ttlMs: input.sessionTtlMs,
|
|
40
|
-
now,
|
|
41
|
-
});
|
|
42
|
-
return {
|
|
43
|
-
state: {
|
|
44
|
-
...input.state,
|
|
45
|
-
updatedAt: nowIso,
|
|
46
|
-
accounts: [account],
|
|
47
|
-
identities: [providerIdentity],
|
|
48
|
-
memberships: [membership],
|
|
49
|
-
sessions: [session.session],
|
|
50
|
-
},
|
|
51
|
-
account,
|
|
52
|
-
identity: providerIdentity,
|
|
53
|
-
membership,
|
|
54
|
-
session,
|
|
55
|
-
};
|
|
2
|
+
import { issueBrowserSession, revokeSession, } from './session.js';
|
|
3
|
+
/**
|
|
4
|
+
* ADR-111 section 4: trim and lowercase only. Cats deliberately does not apply
|
|
5
|
+
* Gmail alias, dot, or plus-address canonicalization, so two addresses Google
|
|
6
|
+
* may route to one mailbox stay distinct here.
|
|
7
|
+
*/
|
|
8
|
+
export function normalizePlatformAccountEmail(value) {
|
|
9
|
+
const normalized = value?.trim().toLowerCase();
|
|
10
|
+
return normalized ? normalized : null;
|
|
56
11
|
}
|
|
57
12
|
export function linkGoogleIdentityToAccount(input) {
|
|
58
13
|
const account = input.state.accounts.find((candidate) => candidate.id === input.accountId && candidate.status === 'active') ?? null;
|
|
@@ -60,24 +15,32 @@ export function linkGoogleIdentityToAccount(input) {
|
|
|
60
15
|
? input.state.memberships.find((candidate) => candidate.accountId === account.id) ?? null
|
|
61
16
|
: null;
|
|
62
17
|
if (!account || !membership) {
|
|
63
|
-
return
|
|
18
|
+
return { ok: false, reason: 'account_not_found' };
|
|
64
19
|
}
|
|
65
20
|
const identityForSubject = input.state.identities.find((candidate) => candidate.provider === 'google'
|
|
66
21
|
&& candidate.providerSubject === input.identity.providerSubject) ?? null;
|
|
67
22
|
if (identityForSubject && identityForSubject.accountId !== account.id) {
|
|
68
|
-
|
|
23
|
+
return { ok: false, reason: 'subject_owned_by_other_account' };
|
|
69
24
|
}
|
|
70
25
|
const identityForAccount = input.state.identities.find((candidate) => candidate.provider === 'google'
|
|
71
26
|
&& candidate.accountId === account.id) ?? null;
|
|
72
27
|
if (identityForAccount
|
|
73
28
|
&& identityForAccount.providerSubject !== input.identity.providerSubject) {
|
|
74
|
-
|
|
29
|
+
return { ok: false, reason: 'account_has_other_google_identity' };
|
|
30
|
+
}
|
|
31
|
+
// SPEC-113 requirements 28 and 29: an account that already carries an email
|
|
32
|
+
// must match it exactly. Only an email-less local-handle account may adopt
|
|
33
|
+
// the verified Google address, and only through this step-up-protected path.
|
|
34
|
+
const accountEmail = normalizePlatformAccountEmail(account.email);
|
|
35
|
+
const verifiedEmail = normalizePlatformAccountEmail(input.identity.email);
|
|
36
|
+
if (accountEmail && accountEmail !== verifiedEmail) {
|
|
37
|
+
return { ok: false, reason: 'email_mismatch' };
|
|
75
38
|
}
|
|
76
39
|
const nowIso = (input.now ?? new Date()).toISOString();
|
|
77
40
|
const linkedIdentity = identityForSubject
|
|
78
41
|
? {
|
|
79
42
|
...identityForSubject,
|
|
80
|
-
email:
|
|
43
|
+
email: verifiedEmail,
|
|
81
44
|
updatedAt: nowIso,
|
|
82
45
|
}
|
|
83
46
|
: {
|
|
@@ -85,13 +48,14 @@ export function linkGoogleIdentityToAccount(input) {
|
|
|
85
48
|
accountId: account.id,
|
|
86
49
|
provider: 'google',
|
|
87
50
|
providerSubject: input.identity.providerSubject,
|
|
88
|
-
email:
|
|
51
|
+
email: verifiedEmail,
|
|
89
52
|
createdAt: nowIso,
|
|
90
53
|
updatedAt: nowIso,
|
|
91
54
|
};
|
|
55
|
+
const adoptedAccountEmail = accountEmail === null && verifiedEmail !== null;
|
|
92
56
|
const updatedAccount = {
|
|
93
57
|
...account,
|
|
94
|
-
email:
|
|
58
|
+
email: adoptedAccountEmail ? verifiedEmail : account.email,
|
|
95
59
|
avatarUrl: input.identity.avatarUrl ?? account.avatarUrl,
|
|
96
60
|
updatedAt: nowIso,
|
|
97
61
|
};
|
|
@@ -99,15 +63,71 @@ export function linkGoogleIdentityToAccount(input) {
|
|
|
99
63
|
? input.state.identities.map((candidate) => candidate.id === identityForSubject.id ? linkedIdentity : candidate)
|
|
100
64
|
: [...input.state.identities, linkedIdentity];
|
|
101
65
|
return {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
66
|
+
ok: true,
|
|
67
|
+
result: {
|
|
68
|
+
state: {
|
|
69
|
+
...input.state,
|
|
70
|
+
updatedAt: nowIso,
|
|
71
|
+
accounts: input.state.accounts.map((candidate) => candidate.id === account.id ? updatedAccount : candidate),
|
|
72
|
+
identities: nextIdentities,
|
|
73
|
+
},
|
|
74
|
+
account: updatedAccount,
|
|
75
|
+
identity: linkedIdentity,
|
|
76
|
+
membership: structuredClone(membership),
|
|
77
|
+
adoptedAccountEmail,
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* ADR-111 section 6: unlinking must preserve a usable local login and must not
|
|
83
|
+
* leave ambient access behind. Session records do not retain which identity
|
|
84
|
+
* established them, so every other browser and mobile session for the account
|
|
85
|
+
* is revoked and only the step-up-verified session survives.
|
|
86
|
+
*/
|
|
87
|
+
export function unlinkGoogleIdentityFromAccount(input) {
|
|
88
|
+
const account = input.state.accounts.find((candidate) => candidate.id === input.accountId && candidate.status === 'active') ?? null;
|
|
89
|
+
const membership = account
|
|
90
|
+
? input.state.memberships.find((candidate) => candidate.accountId === account.id) ?? null
|
|
91
|
+
: null;
|
|
92
|
+
if (!account || !membership) {
|
|
93
|
+
return { ok: false, reason: 'account_not_found' };
|
|
94
|
+
}
|
|
95
|
+
const googleIdentity = input.state.identities.find((candidate) => candidate.provider === 'google' && candidate.accountId === account.id) ?? null;
|
|
96
|
+
if (!googleIdentity) {
|
|
97
|
+
return { ok: false, reason: 'google_not_linked' };
|
|
98
|
+
}
|
|
99
|
+
const hasLocalFallback = input.state.identities.some((candidate) => candidate.provider === 'local_password'
|
|
100
|
+
&& candidate.accountId === account.id
|
|
101
|
+
&& Boolean(candidate.passwordHash)
|
|
102
|
+
&& Boolean(candidate.passwordHashAlgorithm));
|
|
103
|
+
if (!hasLocalFallback) {
|
|
104
|
+
return { ok: false, reason: 'local_fallback_missing' };
|
|
105
|
+
}
|
|
106
|
+
const now = input.now ?? new Date();
|
|
107
|
+
const nowIso = now.toISOString();
|
|
108
|
+
const revokedSessionIds = [];
|
|
109
|
+
const sessions = input.state.sessions.map((session) => {
|
|
110
|
+
if (session.accountId !== account.id
|
|
111
|
+
|| session.id === input.keepSessionId
|
|
112
|
+
|| session.revokedAt !== null) {
|
|
113
|
+
return session;
|
|
114
|
+
}
|
|
115
|
+
revokedSessionIds.push(session.id);
|
|
116
|
+
return revokeSession(session, now);
|
|
117
|
+
});
|
|
118
|
+
return {
|
|
119
|
+
ok: true,
|
|
120
|
+
result: {
|
|
121
|
+
state: {
|
|
122
|
+
...input.state,
|
|
123
|
+
updatedAt: nowIso,
|
|
124
|
+
identities: input.state.identities.filter((candidate) => candidate.id !== googleIdentity.id),
|
|
125
|
+
sessions,
|
|
126
|
+
},
|
|
127
|
+
account: structuredClone(account),
|
|
128
|
+
membership: structuredClone(membership),
|
|
129
|
+
revokedSessionIds,
|
|
107
130
|
},
|
|
108
|
-
account: updatedAccount,
|
|
109
|
-
identity: linkedIdentity,
|
|
110
|
-
membership: structuredClone(membership),
|
|
111
131
|
};
|
|
112
132
|
}
|
|
113
133
|
export function createGoogleBrowserSessionForLinkedIdentity(input) {
|
|
@@ -132,12 +152,11 @@ export function createGoogleBrowserSessionForLinkedIdentity(input) {
|
|
|
132
152
|
});
|
|
133
153
|
const updatedIdentity = {
|
|
134
154
|
...providerIdentity,
|
|
135
|
-
email: input.identity.email,
|
|
155
|
+
email: normalizePlatformAccountEmail(input.identity.email),
|
|
136
156
|
updatedAt: nowIso,
|
|
137
157
|
};
|
|
138
158
|
const updatedAccount = {
|
|
139
159
|
...account,
|
|
140
|
-
email: input.identity.email,
|
|
141
160
|
avatarUrl: input.identity.avatarUrl ?? account.avatarUrl,
|
|
142
161
|
updatedAt: nowIso,
|
|
143
162
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"googleAccount.js","sourceRoot":"","sources":["../../../../src/platform/auth/googleAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE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AClB,CAAC;IACF,MAAM,cAAc,GAA0B;QAC5C,GAAG,OAAO;QACV,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC,SAAS,IAAI,OAAO,CAAC,SAAS;QACxD,SAAS,EAAE,MAAM;KAClB,CAAC;IAEF,OAAO;QACL,KAAK,EAAE;YACL,GAAG,KAAK,CAAC,KAAK;YACd,SAAS,EAAE,MAAM;YACjB,QAAQ,EAAE,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAC/C,SAAS,CAAC,EAAE,KAAK,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,CACzD;YACD,UAAU,EAAE,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CACnD,SAAS,CAAC,EAAE,KAAK,gBAAgB,CAAC,EAAE,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS,CACnE;YACD,QAAQ,EAAE,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,OAAO,CAAC,OAAO,CAAC;SACrD;QACD,OAAO,EAAE,cAAc;QACvB,QAAQ,EAAE,eAAe;QACzB,UAAU,EAAE,eAAe,CAAC,UAAU,CAAC;QACvC,OAAO;KACR,CAAC;AACJ,CAAC"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
export * from './actionGrant.js';
|
|
1
2
|
export * from './actorAttribution.js';
|
|
3
|
+
export * from './adminCredentials.js';
|
|
2
4
|
export * from './bootstrap.js';
|
|
3
5
|
export * from './bootstrapEnvelope.js';
|
|
4
6
|
export * from './browserHandoff.js';
|
|
@@ -12,11 +14,13 @@ export * from './googleCsrf.js';
|
|
|
12
14
|
export * from './googleJwksVerifier.js';
|
|
13
15
|
export * from './googleVerifier.js';
|
|
14
16
|
export * from './localLogin.js';
|
|
17
|
+
export * from './loginMethods.js';
|
|
15
18
|
export * from './originGate.js';
|
|
16
19
|
export * from './password.js';
|
|
17
20
|
export * from './principal.js';
|
|
18
21
|
export * from './readiness.js';
|
|
19
22
|
export * from './recovery.js';
|
|
23
|
+
export * from './securityEvents.js';
|
|
20
24
|
export * from './session.js';
|
|
21
25
|
export * from './state.js';
|
|
22
26
|
export * from './store.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/platform/auth/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/platform/auth/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
export * from './actionGrant.js';
|
|
1
2
|
export * from './actorAttribution.js';
|
|
3
|
+
export * from './adminCredentials.js';
|
|
2
4
|
export * from './bootstrap.js';
|
|
3
5
|
export * from './bootstrapEnvelope.js';
|
|
4
6
|
export * from './browserHandoff.js';
|
|
@@ -12,11 +14,13 @@ export * from './googleCsrf.js';
|
|
|
12
14
|
export * from './googleJwksVerifier.js';
|
|
13
15
|
export * from './googleVerifier.js';
|
|
14
16
|
export * from './localLogin.js';
|
|
17
|
+
export * from './loginMethods.js';
|
|
15
18
|
export * from './originGate.js';
|
|
16
19
|
export * from './password.js';
|
|
17
20
|
export * from './principal.js';
|
|
18
21
|
export * from './readiness.js';
|
|
19
22
|
export * from './recovery.js';
|
|
23
|
+
export * from './securityEvents.js';
|
|
20
24
|
export * from './session.js';
|
|
21
25
|
export * from './state.js';
|
|
22
26
|
export * from './store.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/platform/auth/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;A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;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC"}
|
|
@@ -4,6 +4,16 @@ export interface PlatformLocalPasswordCredentialMatch {
|
|
|
4
4
|
account: PlatformAccountRecord;
|
|
5
5
|
membership: PlatformMembershipRecord;
|
|
6
6
|
}
|
|
7
|
+
/**
|
|
8
|
+
* SPEC-113 requirement 16: step-up verifies the local-password Identity that
|
|
9
|
+
* belongs to the *current* account. The caller must never be able to choose
|
|
10
|
+
* which identity is checked, so this takes an account id rather than a
|
|
11
|
+
* client-supplied identifier.
|
|
12
|
+
*/
|
|
13
|
+
export declare function verifyPlatformLocalPasswordForAccount(state: PlatformAuthState, input: {
|
|
14
|
+
accountId: string;
|
|
15
|
+
password: string;
|
|
16
|
+
}): Promise<PlatformLocalPasswordCredentialMatch | null>;
|
|
7
17
|
export declare function verifyPlatformLocalPasswordCredential(state: PlatformAuthState, input: {
|
|
8
18
|
identifier: string;
|
|
9
19
|
password: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localLogin.d.ts","sourceRoot":"","sources":["../../../../src/platform/auth/localLogin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,qBAAqB,EACrB,iBAAiB,EACjB,sBAAsB,EACtB,wBAAwB,EACzB,MAAM,YAAY,CAAC;AAEpB,MAAM,WAAW,oCAAoC;IACnD,QAAQ,EAAE,sBAAsB,CAAC;IACjC,OAAO,EAAE,qBAAqB,CAAC;IAC/B,UAAU,EAAE,wBAAwB,CAAC;CACtC;AAED,wBAAsB,qCAAqC,CACzD,KAAK,EAAE,iBAAiB,EACxB,KAAK,EAAE;IACL,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB,GACA,OAAO,CAAC,oCAAoC,GAAG,IAAI,CAAC,CA4BtD"}
|
|
1
|
+
{"version":3,"file":"localLogin.d.ts","sourceRoot":"","sources":["../../../../src/platform/auth/localLogin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,qBAAqB,EACrB,iBAAiB,EACjB,sBAAsB,EACtB,wBAAwB,EACzB,MAAM,YAAY,CAAC;AAEpB,MAAM,WAAW,oCAAoC;IACnD,QAAQ,EAAE,sBAAsB,CAAC;IACjC,OAAO,EAAE,qBAAqB,CAAC;IAC/B,UAAU,EAAE,wBAAwB,CAAC;CACtC;AAED;;;;;GAKG;AACH,wBAAsB,qCAAqC,CACzD,KAAK,EAAE,iBAAiB,EACxB,KAAK,EAAE;IACL,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB,GACA,OAAO,CAAC,oCAAoC,GAAG,IAAI,CAAC,CAYtD;AAED,wBAAsB,qCAAqC,CACzD,KAAK,EAAE,iBAAiB,EACxB,KAAK,EAAE;IACL,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB,GACA,OAAO,CAAC,oCAAoC,GAAG,IAAI,CAAC,CA4BtD"}
|
|
@@ -1,4 +1,21 @@
|
|
|
1
1
|
import { verifyLocalPassword } from './password.js';
|
|
2
|
+
/**
|
|
3
|
+
* SPEC-113 requirement 16: step-up verifies the local-password Identity that
|
|
4
|
+
* belongs to the *current* account. The caller must never be able to choose
|
|
5
|
+
* which identity is checked, so this takes an account id rather than a
|
|
6
|
+
* client-supplied identifier.
|
|
7
|
+
*/
|
|
8
|
+
export async function verifyPlatformLocalPasswordForAccount(state, input) {
|
|
9
|
+
const identity = state.identities.find((candidate) => candidate.provider === 'local_password'
|
|
10
|
+
&& candidate.accountId === input.accountId) ?? null;
|
|
11
|
+
if (!identity) {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
return verifyPlatformLocalPasswordCredential(state, {
|
|
15
|
+
identifier: identity.providerSubject,
|
|
16
|
+
password: input.password,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
2
19
|
export async function verifyPlatformLocalPasswordCredential(state, input) {
|
|
3
20
|
const identity = state.identities.find((candidate) => candidate.provider === 'local_password'
|
|
4
21
|
&& (candidate.providerSubject === input.identifier
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localLogin.js","sourceRoot":"","sources":["../../../../src/platform/auth/localLogin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAcpD,MAAM,CAAC,KAAK,UAAU,qCAAqC,CACzD,KAAwB,EACxB,KAGC;IAED,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CACnD,SAAS,CAAC,QAAQ,KAAK,gBAAgB;WACpC,CACD,SAAS,CAAC,eAAe,KAAK,KAAK,CAAC,UAAU;eAC3C,SAAS,CAAC,KAAK,EAAE,WAAW,EAAE,KAAK,KAAK,CAAC,UAAU,CACvD,CACF,IAAI,IAAI,CAAC;IACV,MAAM,OAAO,GAAG,QAAQ;QACtB,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,EAAE,KAAK,QAAQ,CAAC,SAAS,CAAC,IAAI,IAAI;QACjF,CAAC,CAAC,IAAI,CAAC;IACT,MAAM,UAAU,GAAG,OAAO;QACxB,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,SAAS,KAAK,OAAO,CAAC,EAAE,CAAC,IAAI,IAAI;QACnF,CAAC,CAAC,IAAI,CAAC;IACT,MAAM,KAAK,GAAG,QAAQ,EAAE,YAAY,IAAI,QAAQ,CAAC,qBAAqB;QACpE,CAAC,CAAC,MAAM,mBAAmB,CAAC,KAAK,CAAC,QAAQ,EAAE;YACxC,YAAY,EAAE,QAAQ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
|
+
* SPEC-113 requirement 10: the authenticated auth-status projection reports
|
|
4
|
+
* which login methods the current account owns. Requirement 13 makes Identity
|
|
5
|
+
* records the only source; the renderer must not infer linked state from
|
|
6
|
+
* account email, avatar, or a prior login result.
|
|
7
|
+
*/
|
|
8
|
+
export interface PlatformLoginMethodsSummary {
|
|
9
|
+
localPassword: {
|
|
10
|
+
linked: boolean;
|
|
11
|
+
};
|
|
12
|
+
google: {
|
|
13
|
+
linked: boolean;
|
|
14
|
+
email: string | null;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export declare function summarizePlatformLoginMethods(state: PlatformAuthState, accountId: string): PlatformLoginMethodsSummary;
|
|
18
|
+
//# sourceMappingURL=loginMethods.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loginMethods.d.ts","sourceRoot":"","sources":["../../../../src/platform/auth/loginMethods.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpD;;;;;GAKG;AACH,MAAM,WAAW,2BAA2B;IAC1C,aAAa,EAAE;QACb,MAAM,EAAE,OAAO,CAAC;KACjB,CAAC;IACF,MAAM,EAAE;QACN,MAAM,EAAE,OAAO,CAAC;QAChB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;KACtB,CAAC;CACH;AAED,wBAAgB,6BAA6B,CAC3C,KAAK,EAAE,iBAAiB,EACxB,SAAS,EAAE,MAAM,GAChB,2BAA2B,CAsB7B"}
|