@braidhq/server 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +134 -106
- package/dist/app.d.ts +7 -15
- package/dist/app.d.ts.map +1 -1
- package/dist/app.js +72 -45
- package/dist/app.js.map +1 -1
- package/dist/authMode.d.ts +39 -0
- package/dist/authMode.d.ts.map +1 -0
- package/dist/authMode.js +50 -0
- package/dist/authMode.js.map +1 -0
- package/dist/composeApp.d.ts +79 -0
- package/dist/composeApp.d.ts.map +1 -0
- package/dist/composeApp.js +136 -0
- package/dist/composeApp.js.map +1 -0
- package/dist/composeFsApp.d.ts +27 -0
- package/dist/composeFsApp.d.ts.map +1 -0
- package/dist/{composeFs.js → composeFsApp.js} +118 -125
- package/dist/composeFsApp.js.map +1 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/_shared/env.d.ts +10 -0
- package/dist/infrastructure/_shared/env.d.ts.map +1 -0
- package/dist/infrastructure/{env.js → _shared/env.js} +5 -6
- package/dist/infrastructure/_shared/env.js.map +1 -0
- package/dist/infrastructure/_shared/frontmatter.d.ts +13 -0
- package/dist/infrastructure/_shared/frontmatter.d.ts.map +1 -0
- package/dist/infrastructure/{fs → _shared}/frontmatter.js +5 -5
- package/dist/infrastructure/_shared/frontmatter.js.map +1 -0
- package/dist/infrastructure/_shared/jsonFileStore.d.ts.map +1 -0
- package/dist/infrastructure/_shared/jsonFileStore.js.map +1 -0
- package/dist/infrastructure/{fs → _shared}/paths.d.ts +17 -10
- package/dist/infrastructure/_shared/paths.d.ts.map +1 -0
- package/dist/infrastructure/{fs → _shared}/paths.js +27 -20
- package/dist/infrastructure/_shared/paths.js.map +1 -0
- package/dist/infrastructure/auth/AccessPolicy.d.ts +33 -58
- package/dist/infrastructure/auth/AccessPolicy.d.ts.map +1 -1
- package/dist/infrastructure/auth/AccessPolicy.js +35 -42
- package/dist/infrastructure/auth/AccessPolicy.js.map +1 -1
- package/dist/infrastructure/auth/SessionStore.d.ts +22 -12
- package/dist/infrastructure/auth/SessionStore.d.ts.map +1 -1
- package/dist/infrastructure/auth/SessionStore.js +15 -18
- package/dist/infrastructure/auth/SessionStore.js.map +1 -1
- package/dist/infrastructure/batch/FsBatchPlanRepository.d.ts +79 -0
- package/dist/infrastructure/batch/FsBatchPlanRepository.d.ts.map +1 -0
- package/dist/infrastructure/{fs → batch}/FsBatchPlanRepository.js +1 -1
- package/dist/infrastructure/batch/FsBatchPlanRepository.js.map +1 -0
- package/dist/infrastructure/history/GitWorkspaceHistory.d.ts.map +1 -0
- package/dist/infrastructure/{git → history}/GitWorkspaceHistory.js +31 -24
- package/dist/infrastructure/history/GitWorkspaceHistory.js.map +1 -0
- package/dist/infrastructure/history/commitMessage.d.ts.map +1 -0
- package/dist/infrastructure/history/commitMessage.js +90 -0
- package/dist/infrastructure/history/commitMessage.js.map +1 -0
- package/dist/infrastructure/hitl/FsClarificationRepository.d.ts +13 -0
- package/dist/infrastructure/hitl/FsClarificationRepository.d.ts.map +1 -0
- package/dist/infrastructure/{fs/FsClarifyTicketRepository.js → hitl/FsClarificationRepository.js} +15 -15
- package/dist/infrastructure/hitl/FsClarificationRepository.js.map +1 -0
- package/dist/infrastructure/hitl/FsProposalRepository.d.ts.map +1 -0
- package/dist/infrastructure/{fs → hitl}/FsProposalRepository.js +7 -8
- package/dist/infrastructure/hitl/FsProposalRepository.js.map +1 -0
- package/dist/infrastructure/hitl/StatusedJsonStore.d.ts +30 -0
- package/dist/infrastructure/hitl/StatusedJsonStore.d.ts.map +1 -0
- package/dist/infrastructure/{fs/FsStatusedJsonRepository.js → hitl/StatusedJsonStore.js} +3 -3
- package/dist/infrastructure/hitl/StatusedJsonStore.js.map +1 -0
- package/dist/infrastructure/model/FsModelSerializer.d.ts +96 -0
- package/dist/infrastructure/model/FsModelSerializer.d.ts.map +1 -0
- package/dist/infrastructure/{fs/FsGraphSerializer.js → model/FsModelSerializer.js} +11 -11
- package/dist/infrastructure/model/FsModelSerializer.js.map +1 -0
- package/dist/infrastructure/oauth/GoogleOAuth.d.ts +20 -38
- package/dist/infrastructure/oauth/GoogleOAuth.d.ts.map +1 -1
- package/dist/infrastructure/oauth/GoogleOAuth.js +21 -22
- package/dist/infrastructure/oauth/GoogleOAuth.js.map +1 -1
- package/dist/infrastructure/reactor/FsReactorCycleRepository.d.ts +29 -0
- package/dist/infrastructure/reactor/FsReactorCycleRepository.d.ts.map +1 -0
- package/dist/infrastructure/reactor/FsReactorCycleRepository.js +94 -0
- package/dist/infrastructure/reactor/FsReactorCycleRepository.js.map +1 -0
- package/dist/infrastructure/secrets/SecretStore.d.ts +11 -14
- package/dist/infrastructure/secrets/SecretStore.d.ts.map +1 -1
- package/dist/infrastructure/secrets/SecretStore.js +4 -4
- package/dist/infrastructure/secrets/SecretStore.js.map +1 -1
- package/dist/infrastructure/{fs → skill}/FsRunRepository.d.ts +5 -3
- package/dist/infrastructure/skill/FsRunRepository.d.ts.map +1 -0
- package/dist/infrastructure/{fs → skill}/FsRunRepository.js +11 -9
- package/dist/infrastructure/skill/FsRunRepository.js.map +1 -0
- package/dist/infrastructure/{fs → skill}/FsSkillRegistry.d.ts +4 -13
- package/dist/infrastructure/skill/FsSkillRegistry.d.ts.map +1 -0
- package/dist/infrastructure/{fs → skill}/FsSkillRegistry.js +28 -20
- package/dist/infrastructure/skill/FsSkillRegistry.js.map +1 -0
- package/dist/infrastructure/skill/SubprocessSkillRunner.d.ts +52 -0
- package/dist/infrastructure/skill/SubprocessSkillRunner.d.ts.map +1 -0
- package/dist/infrastructure/{agent → skill}/SubprocessSkillRunner.js +107 -55
- package/dist/infrastructure/skill/SubprocessSkillRunner.js.map +1 -0
- package/dist/infrastructure/skill/asyncQueue.d.ts +20 -0
- package/dist/infrastructure/skill/asyncQueue.d.ts.map +1 -0
- package/dist/infrastructure/{agent → skill}/asyncQueue.js +2 -3
- package/dist/infrastructure/{agent → skill}/asyncQueue.js.map +1 -1
- package/dist/infrastructure/skill/lineBuffer.d.ts +15 -0
- package/dist/infrastructure/skill/lineBuffer.d.ts.map +1 -0
- package/dist/infrastructure/{agent/streamJsonParser.js → skill/lineBuffer.js} +5 -17
- package/dist/infrastructure/skill/lineBuffer.js.map +1 -0
- package/dist/infrastructure/skill/orphanReaper.d.ts +20 -0
- package/dist/infrastructure/skill/orphanReaper.d.ts.map +1 -0
- package/dist/infrastructure/{orphanReaper.js → skill/orphanReaper.js} +7 -5
- package/dist/infrastructure/skill/orphanReaper.js.map +1 -0
- package/dist/infrastructure/skill/subprocessEventStream.d.ts +16 -0
- package/dist/infrastructure/skill/subprocessEventStream.d.ts.map +1 -0
- package/dist/infrastructure/skill/subprocessEventStream.js +29 -0
- package/dist/infrastructure/skill/subprocessEventStream.js.map +1 -0
- package/dist/infrastructure/source/FsSourceUnitDigest.d.ts +19 -0
- package/dist/infrastructure/source/FsSourceUnitDigest.d.ts.map +1 -0
- package/dist/infrastructure/{fs → source}/FsSourceUnitDigest.js +9 -9
- package/dist/infrastructure/source/FsSourceUnitDigest.js.map +1 -0
- package/dist/infrastructure/source/FsSourceUnitObservationRepository.d.ts +31 -0
- package/dist/infrastructure/source/FsSourceUnitObservationRepository.d.ts.map +1 -0
- package/dist/infrastructure/{fs/FsSourceUnitStateRepository.js → source/FsSourceUnitObservationRepository.js} +18 -17
- package/dist/infrastructure/source/FsSourceUnitObservationRepository.js.map +1 -0
- package/dist/infrastructure/{fs → source}/intentScan.d.ts +4 -0
- package/dist/infrastructure/source/intentScan.d.ts.map +1 -0
- package/dist/infrastructure/{fs → source}/intentScan.js +18 -16
- package/dist/infrastructure/source/intentScan.js.map +1 -0
- package/dist/infrastructure/users/UserDirectoryFromRegistry.d.ts +2 -2
- package/dist/infrastructure/users/UserDirectoryFromRegistry.js +2 -2
- package/dist/infrastructure/users/UserRegistryFile.d.ts +4 -5
- package/dist/infrastructure/users/UserRegistryFile.d.ts.map +1 -1
- package/dist/infrastructure/users/UserRegistryFile.js +6 -8
- package/dist/infrastructure/users/UserRegistryFile.js.map +1 -1
- package/dist/infrastructure/users/ensureWorkspaceOwners.d.ts +9 -6
- package/dist/infrastructure/users/ensureWorkspaceOwners.d.ts.map +1 -1
- package/dist/infrastructure/users/ensureWorkspaceOwners.js +10 -7
- package/dist/infrastructure/users/ensureWorkspaceOwners.js.map +1 -1
- package/dist/infrastructure/workspace/FsWorkspaceRepository.d.ts.map +1 -0
- package/dist/infrastructure/{fs → workspace}/FsWorkspaceRepository.js +7 -6
- package/dist/infrastructure/workspace/FsWorkspaceRepository.js.map +1 -0
- package/dist/infrastructure/workspace/WorkspaceDiscovery.d.ts +18 -0
- package/dist/infrastructure/workspace/WorkspaceDiscovery.d.ts.map +1 -0
- package/dist/infrastructure/{fs → workspace}/WorkspaceDiscovery.js +15 -11
- package/dist/infrastructure/workspace/WorkspaceDiscovery.js.map +1 -0
- package/dist/infrastructure/{fs → workspace}/WorkspaceRegistryFile.d.ts +10 -9
- package/dist/infrastructure/workspace/WorkspaceRegistryFile.d.ts.map +1 -0
- package/dist/infrastructure/{fs → workspace}/WorkspaceRegistryFile.js +15 -17
- package/dist/infrastructure/workspace/WorkspaceRegistryFile.js.map +1 -0
- package/dist/infrastructure/workspace/productManifestWriter.d.ts +24 -0
- package/dist/infrastructure/workspace/productManifestWriter.d.ts.map +1 -0
- package/dist/infrastructure/{fs → workspace}/productManifestWriter.js +14 -26
- package/dist/infrastructure/workspace/productManifestWriter.js.map +1 -0
- package/dist/middleware/auth.d.ts +27 -17
- package/dist/middleware/auth.d.ts.map +1 -1
- package/dist/middleware/auth.js +59 -53
- package/dist/middleware/auth.js.map +1 -1
- package/dist/middleware/cors.d.ts.map +1 -1
- package/dist/middleware/cors.js +4 -1
- package/dist/middleware/cors.js.map +1 -1
- package/dist/middleware/error.d.ts.map +1 -1
- package/dist/middleware/error.js +15 -13
- package/dist/middleware/error.js.map +1 -1
- package/dist/middleware/workspaceAccess.d.ts +23 -19
- package/dist/middleware/workspaceAccess.d.ts.map +1 -1
- package/dist/middleware/workspaceAccess.js +31 -26
- package/dist/middleware/workspaceAccess.js.map +1 -1
- package/dist/policy/CapabilityCheck.d.ts +5 -5
- package/dist/policy/PermissionRegistry.d.ts +11 -9
- package/dist/policy/PermissionRegistry.d.ts.map +1 -1
- package/dist/policy/PermissionRegistry.js +10 -8
- package/dist/policy/PermissionRegistry.js.map +1 -1
- package/dist/policy/ViewerContext.d.ts +13 -11
- package/dist/policy/ViewerContext.d.ts.map +1 -1
- package/dist/policy/checks.d.ts +9 -9
- package/dist/policy/checks.d.ts.map +1 -1
- package/dist/policy/checks.js +14 -11
- package/dist/policy/checks.js.map +1 -1
- package/dist/policy/defaultRegistry.d.ts +3 -4
- package/dist/policy/defaultRegistry.d.ts.map +1 -1
- package/dist/policy/defaultRegistry.js +3 -4
- package/dist/policy/defaultRegistry.js.map +1 -1
- package/dist/policy/index.d.ts +2 -2
- package/dist/policy/index.d.ts.map +1 -1
- package/dist/policy/index.js +1 -1
- package/dist/policy/index.js.map +1 -1
- package/dist/policy/resolveViewer.d.ts +9 -9
- package/dist/policy/resolveViewer.js +9 -9
- package/dist/routes/_shared.d.ts +93 -153
- package/dist/routes/_shared.d.ts.map +1 -1
- package/dist/routes/_shared.js +9 -5
- package/dist/routes/_shared.js.map +1 -1
- package/dist/routes/admin.d.ts +1 -1
- package/dist/routes/admin.d.ts.map +1 -1
- package/dist/routes/admin.js +13 -12
- package/dist/routes/admin.js.map +1 -1
- package/dist/routes/auth.d.ts +12 -10
- package/dist/routes/auth.d.ts.map +1 -1
- package/dist/routes/auth.js +32 -34
- package/dist/routes/auth.js.map +1 -1
- package/dist/routes/clarifications.d.ts +8 -0
- package/dist/routes/clarifications.d.ts.map +1 -0
- package/dist/routes/clarifications.js +243 -0
- package/dist/routes/clarifications.js.map +1 -0
- package/dist/routes/edges.d.ts.map +1 -1
- package/dist/routes/edges.js +2 -6
- package/dist/routes/edges.js.map +1 -1
- package/dist/routes/history.d.ts.map +1 -1
- package/dist/routes/history.js +12 -10
- package/dist/routes/history.js.map +1 -1
- package/dist/routes/nodes.d.ts.map +1 -1
- package/dist/routes/nodes.js +4 -8
- package/dist/routes/nodes.js.map +1 -1
- package/dist/routes/oauth.d.ts +6 -7
- package/dist/routes/oauth.d.ts.map +1 -1
- package/dist/routes/oauth.js +6 -7
- package/dist/routes/oauth.js.map +1 -1
- package/dist/routes/proposals.d.ts +2 -2
- package/dist/routes/proposals.d.ts.map +1 -1
- package/dist/routes/proposals.js +30 -28
- package/dist/routes/proposals.js.map +1 -1
- package/dist/routes/reactorCycles.d.ts +7 -0
- package/dist/routes/reactorCycles.d.ts.map +1 -0
- package/dist/routes/reactorCycles.js +60 -0
- package/dist/routes/reactorCycles.js.map +1 -0
- package/dist/routes/runs.d.ts.map +1 -1
- package/dist/routes/runs.js +22 -19
- package/dist/routes/runs.js.map +1 -1
- package/dist/routes/skillInputOptions.d.ts +2 -2
- package/dist/routes/skillInputOptions.d.ts.map +1 -1
- package/dist/routes/skillInputOptions.js +43 -45
- package/dist/routes/skillInputOptions.js.map +1 -1
- package/dist/routes/skills.d.ts +19 -1
- package/dist/routes/skills.d.ts.map +1 -1
- package/dist/routes/skills.js +139 -7
- package/dist/routes/skills.js.map +1 -1
- package/dist/routes/sourceLoaders.d.ts.map +1 -1
- package/dist/routes/sourceLoaders.js +1 -0
- package/dist/routes/sourceLoaders.js.map +1 -1
- package/dist/routes/sourceUnitObservations.d.ts +20 -0
- package/dist/routes/sourceUnitObservations.d.ts.map +1 -0
- package/dist/routes/sourceUnitObservations.js +80 -0
- package/dist/routes/sourceUnitObservations.js.map +1 -0
- package/dist/routes/sourceWebhooks.d.ts +26 -0
- package/dist/routes/sourceWebhooks.d.ts.map +1 -0
- package/dist/routes/sourceWebhooks.js +301 -0
- package/dist/routes/sourceWebhooks.js.map +1 -0
- package/dist/routes/users.d.ts +0 -2
- package/dist/routes/users.d.ts.map +1 -1
- package/dist/routes/users.js +15 -33
- package/dist/routes/users.js.map +1 -1
- package/dist/routes/workspaceEvents.d.ts +5 -4
- package/dist/routes/workspaceEvents.d.ts.map +1 -1
- package/dist/routes/workspaceEvents.js +7 -6
- package/dist/routes/workspaceEvents.js.map +1 -1
- package/dist/routes/workspaceMembers.d.ts +1 -1
- package/dist/routes/workspaceMembers.d.ts.map +1 -1
- package/dist/routes/workspaceMembers.js +2 -2
- package/dist/routes/workspaceMembers.js.map +1 -1
- package/dist/routes/workspaces.d.ts +21 -10
- package/dist/routes/workspaces.d.ts.map +1 -1
- package/dist/routes/workspaces.js +97 -69
- package/dist/routes/workspaces.js.map +1 -1
- package/dist/server.js +6 -70
- package/dist/server.js.map +1 -1
- package/dist/startServer.d.ts +17 -0
- package/dist/startServer.d.ts.map +1 -0
- package/dist/startServer.js +81 -0
- package/dist/startServer.js.map +1 -0
- package/dist/startup.d.ts +28 -0
- package/dist/startup.d.ts.map +1 -0
- package/dist/startup.js +94 -0
- package/dist/startup.js.map +1 -0
- package/package.json +9 -9
- package/dist/composeFs.d.ts +0 -55
- package/dist/composeFs.d.ts.map +0 -1
- package/dist/composeFs.js.map +0 -1
- package/dist/composition.d.ts +0 -133
- package/dist/composition.d.ts.map +0 -1
- package/dist/composition.js +0 -113
- package/dist/composition.js.map +0 -1
- package/dist/infrastructure/agent/SubprocessSkillRunner.d.ts +0 -75
- package/dist/infrastructure/agent/SubprocessSkillRunner.d.ts.map +0 -1
- package/dist/infrastructure/agent/SubprocessSkillRunner.js.map +0 -1
- package/dist/infrastructure/agent/asyncQueue.d.ts +0 -22
- package/dist/infrastructure/agent/asyncQueue.d.ts.map +0 -1
- package/dist/infrastructure/agent/mcpConfig.d.ts +0 -38
- package/dist/infrastructure/agent/mcpConfig.d.ts.map +0 -1
- package/dist/infrastructure/agent/mcpConfig.js +0 -55
- package/dist/infrastructure/agent/mcpConfig.js.map +0 -1
- package/dist/infrastructure/agent/streamJsonParser.d.ts +0 -20
- package/dist/infrastructure/agent/streamJsonParser.d.ts.map +0 -1
- package/dist/infrastructure/agent/streamJsonParser.js.map +0 -1
- package/dist/infrastructure/agent/subprocessEventStream.d.ts +0 -26
- package/dist/infrastructure/agent/subprocessEventStream.d.ts.map +0 -1
- package/dist/infrastructure/agent/subprocessEventStream.js +0 -112
- package/dist/infrastructure/agent/subprocessEventStream.js.map +0 -1
- package/dist/infrastructure/auth/ensureApprovedEmails.d.ts +0 -16
- package/dist/infrastructure/auth/ensureApprovedEmails.d.ts.map +0 -1
- package/dist/infrastructure/auth/ensureApprovedEmails.js +0 -20
- package/dist/infrastructure/auth/ensureApprovedEmails.js.map +0 -1
- package/dist/infrastructure/env.d.ts +0 -11
- package/dist/infrastructure/env.d.ts.map +0 -1
- package/dist/infrastructure/env.js.map +0 -1
- package/dist/infrastructure/fs/FsBatchPlanRepository.d.ts +0 -300
- package/dist/infrastructure/fs/FsBatchPlanRepository.d.ts.map +0 -1
- package/dist/infrastructure/fs/FsBatchPlanRepository.js.map +0 -1
- package/dist/infrastructure/fs/FsClarifyTicketRepository.d.ts +0 -13
- package/dist/infrastructure/fs/FsClarifyTicketRepository.d.ts.map +0 -1
- package/dist/infrastructure/fs/FsClarifyTicketRepository.js.map +0 -1
- package/dist/infrastructure/fs/FsDecisionRepository.d.ts +0 -13
- package/dist/infrastructure/fs/FsDecisionRepository.d.ts.map +0 -1
- package/dist/infrastructure/fs/FsDecisionRepository.js +0 -56
- package/dist/infrastructure/fs/FsDecisionRepository.js.map +0 -1
- package/dist/infrastructure/fs/FsGraphSerializer.d.ts +0 -629
- package/dist/infrastructure/fs/FsGraphSerializer.d.ts.map +0 -1
- package/dist/infrastructure/fs/FsGraphSerializer.js.map +0 -1
- package/dist/infrastructure/fs/FsProposalRepository.d.ts.map +0 -1
- package/dist/infrastructure/fs/FsProposalRepository.js.map +0 -1
- package/dist/infrastructure/fs/FsRunRepository.d.ts.map +0 -1
- package/dist/infrastructure/fs/FsRunRepository.js.map +0 -1
- package/dist/infrastructure/fs/FsSkillRegistry.d.ts.map +0 -1
- package/dist/infrastructure/fs/FsSkillRegistry.js.map +0 -1
- package/dist/infrastructure/fs/FsSourceUnitDigest.d.ts +0 -19
- package/dist/infrastructure/fs/FsSourceUnitDigest.d.ts.map +0 -1
- package/dist/infrastructure/fs/FsSourceUnitDigest.js.map +0 -1
- package/dist/infrastructure/fs/FsSourceUnitStateRepository.d.ts +0 -30
- package/dist/infrastructure/fs/FsSourceUnitStateRepository.d.ts.map +0 -1
- package/dist/infrastructure/fs/FsSourceUnitStateRepository.js.map +0 -1
- package/dist/infrastructure/fs/FsStatusedJsonRepository.d.ts +0 -35
- package/dist/infrastructure/fs/FsStatusedJsonRepository.d.ts.map +0 -1
- package/dist/infrastructure/fs/FsStatusedJsonRepository.js.map +0 -1
- package/dist/infrastructure/fs/FsWorkspaceRepository.d.ts.map +0 -1
- package/dist/infrastructure/fs/FsWorkspaceRepository.js.map +0 -1
- package/dist/infrastructure/fs/WorkspaceDiscovery.d.ts +0 -15
- package/dist/infrastructure/fs/WorkspaceDiscovery.d.ts.map +0 -1
- package/dist/infrastructure/fs/WorkspaceDiscovery.js.map +0 -1
- package/dist/infrastructure/fs/WorkspaceRegistryFile.d.ts.map +0 -1
- package/dist/infrastructure/fs/WorkspaceRegistryFile.js.map +0 -1
- package/dist/infrastructure/fs/frontmatter.d.ts +0 -13
- package/dist/infrastructure/fs/frontmatter.d.ts.map +0 -1
- package/dist/infrastructure/fs/frontmatter.js.map +0 -1
- package/dist/infrastructure/fs/intentScan.d.ts.map +0 -1
- package/dist/infrastructure/fs/intentScan.js.map +0 -1
- package/dist/infrastructure/fs/jsonFileStore.d.ts.map +0 -1
- package/dist/infrastructure/fs/jsonFileStore.js.map +0 -1
- package/dist/infrastructure/fs/paths.d.ts.map +0 -1
- package/dist/infrastructure/fs/paths.js.map +0 -1
- package/dist/infrastructure/fs/productManifestWriter.d.ts +0 -22
- package/dist/infrastructure/fs/productManifestWriter.d.ts.map +0 -1
- package/dist/infrastructure/fs/productManifestWriter.js.map +0 -1
- package/dist/infrastructure/git/GitWorkspaceHistory.d.ts.map +0 -1
- package/dist/infrastructure/git/GitWorkspaceHistory.js.map +0 -1
- package/dist/infrastructure/git/commitMessage.d.ts.map +0 -1
- package/dist/infrastructure/git/commitMessage.js +0 -71
- package/dist/infrastructure/git/commitMessage.js.map +0 -1
- package/dist/infrastructure/orphanReaper.d.ts +0 -18
- package/dist/infrastructure/orphanReaper.d.ts.map +0 -1
- package/dist/infrastructure/orphanReaper.js.map +0 -1
- package/dist/infrastructure/users/ensureLocalUser.d.ts +0 -15
- package/dist/infrastructure/users/ensureLocalUser.d.ts.map +0 -1
- package/dist/infrastructure/users/ensureLocalUser.js +0 -38
- package/dist/infrastructure/users/ensureLocalUser.js.map +0 -1
- package/dist/middleware/requireAdmin.d.ts +0 -10
- package/dist/middleware/requireAdmin.d.ts.map +0 -1
- package/dist/middleware/requireAdmin.js +0 -24
- package/dist/middleware/requireAdmin.js.map +0 -1
- package/dist/middleware/userId.d.ts +0 -16
- package/dist/middleware/userId.d.ts.map +0 -1
- package/dist/middleware/userId.js +0 -27
- package/dist/middleware/userId.js.map +0 -1
- package/dist/policy/Capability.d.ts +0 -12
- package/dist/policy/Capability.d.ts.map +0 -1
- package/dist/policy/Capability.js +0 -31
- package/dist/policy/Capability.js.map +0 -1
- package/dist/routes/clarify.d.ts +0 -9
- package/dist/routes/clarify.d.ts.map +0 -1
- package/dist/routes/clarify.js +0 -274
- package/dist/routes/clarify.js.map +0 -1
- package/dist/routes/decisions.d.ts +0 -7
- package/dist/routes/decisions.d.ts.map +0 -1
- package/dist/routes/decisions.js +0 -68
- package/dist/routes/decisions.js.map +0 -1
- package/dist/routes/sourceUnitStates.d.ts +0 -7
- package/dist/routes/sourceUnitStates.d.ts.map +0 -1
- package/dist/routes/sourceUnitStates.js +0 -45
- package/dist/routes/sourceUnitStates.js.map +0 -1
- /package/dist/infrastructure/{fs → _shared}/jsonFileStore.d.ts +0 -0
- /package/dist/infrastructure/{fs → _shared}/jsonFileStore.js +0 -0
- /package/dist/infrastructure/{git → history}/GitWorkspaceHistory.d.ts +0 -0
- /package/dist/infrastructure/{git → history}/commitMessage.d.ts +0 -0
- /package/dist/infrastructure/{fs → hitl}/FsProposalRepository.d.ts +0 -0
- /package/dist/infrastructure/{fs → workspace}/FsWorkspaceRepository.d.ts +0 -0
package/dist/routes/_shared.d.ts
CHANGED
|
@@ -1,70 +1,36 @@
|
|
|
1
1
|
import { z } from '@hono/zod-openapi';
|
|
2
2
|
export declare const WorkspaceIdParam: z.ZodObject<{
|
|
3
|
-
workspaceId: z.ZodBranded<z.ZodString, "WorkspaceId">;
|
|
4
|
-
},
|
|
5
|
-
workspaceId: string & z.BRAND<"WorkspaceId">;
|
|
6
|
-
}, {
|
|
7
|
-
workspaceId: string;
|
|
8
|
-
}>;
|
|
3
|
+
workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId", "out">;
|
|
4
|
+
}, z.core.$strip>;
|
|
9
5
|
export declare const ProblemJsonResponseContent: {
|
|
10
6
|
'application/problem+json': {
|
|
11
7
|
schema: z.ZodObject<{
|
|
12
8
|
type: z.ZodString;
|
|
13
9
|
title: z.ZodString;
|
|
14
10
|
status: z.ZodNumber;
|
|
15
|
-
code: z.
|
|
11
|
+
code: z.ZodEnum<{
|
|
12
|
+
"BRAID-VALIDATION": "BRAID-VALIDATION";
|
|
13
|
+
"BRAID-UNAUTHORIZED": "BRAID-UNAUTHORIZED";
|
|
14
|
+
"BRAID-NOT-FOUND": "BRAID-NOT-FOUND";
|
|
15
|
+
"BRAID-CONFLICT": "BRAID-CONFLICT";
|
|
16
|
+
"BRAID-FORBIDDEN": "BRAID-FORBIDDEN";
|
|
17
|
+
"BRAID-UNAVAILABLE": "BRAID-UNAVAILABLE";
|
|
18
|
+
"BRAID-INTERNAL": "BRAID-INTERNAL";
|
|
19
|
+
}>;
|
|
16
20
|
detail: z.ZodOptional<z.ZodString>;
|
|
17
21
|
issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
18
|
-
code: z.ZodBranded<z.ZodString, "ValidationCode">;
|
|
19
|
-
severity: z.ZodEnum<
|
|
22
|
+
code: z.core.$ZodBranded<z.ZodString, "ValidationCode", "out">;
|
|
23
|
+
severity: z.ZodEnum<{
|
|
24
|
+
error: "error";
|
|
25
|
+
warning: "warning";
|
|
26
|
+
info: "info";
|
|
27
|
+
}>;
|
|
20
28
|
message: z.ZodString;
|
|
21
|
-
nodeId: z.ZodOptional<z.ZodBranded<z.ZodString, "NodeId">>;
|
|
22
|
-
edgeId: z.ZodOptional<z.ZodBranded<z.ZodString, "EdgeId">>;
|
|
29
|
+
nodeId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "NodeId", "out">>;
|
|
30
|
+
edgeId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "EdgeId", "out">>;
|
|
23
31
|
path: z.ZodOptional<z.ZodString>;
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
message: string;
|
|
27
|
-
severity: "error" | "warning" | "info";
|
|
28
|
-
path?: string | undefined;
|
|
29
|
-
nodeId?: (string & z.BRAND<"NodeId">) | undefined;
|
|
30
|
-
edgeId?: (string & z.BRAND<"EdgeId">) | undefined;
|
|
31
|
-
}, {
|
|
32
|
-
code: string;
|
|
33
|
-
message: string;
|
|
34
|
-
severity: "error" | "warning" | "info";
|
|
35
|
-
path?: string | undefined;
|
|
36
|
-
nodeId?: string | undefined;
|
|
37
|
-
edgeId?: string | undefined;
|
|
38
|
-
}>, "many">>;
|
|
39
|
-
}, "strip", z.ZodTypeAny, {
|
|
40
|
-
code: string;
|
|
41
|
-
type: string;
|
|
42
|
-
title: string;
|
|
43
|
-
status: number;
|
|
44
|
-
issues?: {
|
|
45
|
-
code: string & z.BRAND<"ValidationCode">;
|
|
46
|
-
message: string;
|
|
47
|
-
severity: "error" | "warning" | "info";
|
|
48
|
-
path?: string | undefined;
|
|
49
|
-
nodeId?: (string & z.BRAND<"NodeId">) | undefined;
|
|
50
|
-
edgeId?: (string & z.BRAND<"EdgeId">) | undefined;
|
|
51
|
-
}[] | undefined;
|
|
52
|
-
detail?: string | undefined;
|
|
53
|
-
}, {
|
|
54
|
-
code: string;
|
|
55
|
-
type: string;
|
|
56
|
-
title: string;
|
|
57
|
-
status: number;
|
|
58
|
-
issues?: {
|
|
59
|
-
code: string;
|
|
60
|
-
message: string;
|
|
61
|
-
severity: "error" | "warning" | "info";
|
|
62
|
-
path?: string | undefined;
|
|
63
|
-
nodeId?: string | undefined;
|
|
64
|
-
edgeId?: string | undefined;
|
|
65
|
-
}[] | undefined;
|
|
66
|
-
detail?: string | undefined;
|
|
67
|
-
}>;
|
|
32
|
+
}, z.core.$strip>>>;
|
|
33
|
+
}, z.core.$strip>;
|
|
68
34
|
};
|
|
69
35
|
};
|
|
70
36
|
export declare const NotFoundResponse: {
|
|
@@ -75,59 +41,63 @@ export declare const NotFoundResponse: {
|
|
|
75
41
|
type: z.ZodString;
|
|
76
42
|
title: z.ZodString;
|
|
77
43
|
status: z.ZodNumber;
|
|
78
|
-
code: z.
|
|
44
|
+
code: z.ZodEnum<{
|
|
45
|
+
"BRAID-VALIDATION": "BRAID-VALIDATION";
|
|
46
|
+
"BRAID-UNAUTHORIZED": "BRAID-UNAUTHORIZED";
|
|
47
|
+
"BRAID-NOT-FOUND": "BRAID-NOT-FOUND";
|
|
48
|
+
"BRAID-CONFLICT": "BRAID-CONFLICT";
|
|
49
|
+
"BRAID-FORBIDDEN": "BRAID-FORBIDDEN";
|
|
50
|
+
"BRAID-UNAVAILABLE": "BRAID-UNAVAILABLE";
|
|
51
|
+
"BRAID-INTERNAL": "BRAID-INTERNAL";
|
|
52
|
+
}>;
|
|
79
53
|
detail: z.ZodOptional<z.ZodString>;
|
|
80
54
|
issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
81
|
-
code: z.ZodBranded<z.ZodString, "ValidationCode">;
|
|
82
|
-
severity: z.ZodEnum<
|
|
55
|
+
code: z.core.$ZodBranded<z.ZodString, "ValidationCode", "out">;
|
|
56
|
+
severity: z.ZodEnum<{
|
|
57
|
+
error: "error";
|
|
58
|
+
warning: "warning";
|
|
59
|
+
info: "info";
|
|
60
|
+
}>;
|
|
83
61
|
message: z.ZodString;
|
|
84
|
-
nodeId: z.ZodOptional<z.ZodBranded<z.ZodString, "NodeId">>;
|
|
85
|
-
edgeId: z.ZodOptional<z.ZodBranded<z.ZodString, "EdgeId">>;
|
|
62
|
+
nodeId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "NodeId", "out">>;
|
|
63
|
+
edgeId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "EdgeId", "out">>;
|
|
86
64
|
path: z.ZodOptional<z.ZodString>;
|
|
87
|
-
},
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
message: string;
|
|
124
|
-
severity: "error" | "warning" | "info";
|
|
125
|
-
path?: string | undefined;
|
|
126
|
-
nodeId?: string | undefined;
|
|
127
|
-
edgeId?: string | undefined;
|
|
128
|
-
}[] | undefined;
|
|
129
|
-
detail?: string | undefined;
|
|
130
|
-
}>;
|
|
65
|
+
}, z.core.$strip>>>;
|
|
66
|
+
}, z.core.$strip>;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
export declare const ForbiddenResponse: {
|
|
71
|
+
readonly description: "The caller lacks permission for this action.";
|
|
72
|
+
readonly content: {
|
|
73
|
+
'application/problem+json': {
|
|
74
|
+
schema: z.ZodObject<{
|
|
75
|
+
type: z.ZodString;
|
|
76
|
+
title: z.ZodString;
|
|
77
|
+
status: z.ZodNumber;
|
|
78
|
+
code: z.ZodEnum<{
|
|
79
|
+
"BRAID-VALIDATION": "BRAID-VALIDATION";
|
|
80
|
+
"BRAID-UNAUTHORIZED": "BRAID-UNAUTHORIZED";
|
|
81
|
+
"BRAID-NOT-FOUND": "BRAID-NOT-FOUND";
|
|
82
|
+
"BRAID-CONFLICT": "BRAID-CONFLICT";
|
|
83
|
+
"BRAID-FORBIDDEN": "BRAID-FORBIDDEN";
|
|
84
|
+
"BRAID-UNAVAILABLE": "BRAID-UNAVAILABLE";
|
|
85
|
+
"BRAID-INTERNAL": "BRAID-INTERNAL";
|
|
86
|
+
}>;
|
|
87
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
88
|
+
issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
89
|
+
code: z.core.$ZodBranded<z.ZodString, "ValidationCode", "out">;
|
|
90
|
+
severity: z.ZodEnum<{
|
|
91
|
+
error: "error";
|
|
92
|
+
warning: "warning";
|
|
93
|
+
info: "info";
|
|
94
|
+
}>;
|
|
95
|
+
message: z.ZodString;
|
|
96
|
+
nodeId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "NodeId", "out">>;
|
|
97
|
+
edgeId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "EdgeId", "out">>;
|
|
98
|
+
path: z.ZodOptional<z.ZodString>;
|
|
99
|
+
}, z.core.$strip>>>;
|
|
100
|
+
}, z.core.$strip>;
|
|
131
101
|
};
|
|
132
102
|
};
|
|
133
103
|
};
|
|
@@ -139,59 +109,29 @@ export declare const ValidationFailureResponse: {
|
|
|
139
109
|
type: z.ZodString;
|
|
140
110
|
title: z.ZodString;
|
|
141
111
|
status: z.ZodNumber;
|
|
142
|
-
code: z.
|
|
112
|
+
code: z.ZodEnum<{
|
|
113
|
+
"BRAID-VALIDATION": "BRAID-VALIDATION";
|
|
114
|
+
"BRAID-UNAUTHORIZED": "BRAID-UNAUTHORIZED";
|
|
115
|
+
"BRAID-NOT-FOUND": "BRAID-NOT-FOUND";
|
|
116
|
+
"BRAID-CONFLICT": "BRAID-CONFLICT";
|
|
117
|
+
"BRAID-FORBIDDEN": "BRAID-FORBIDDEN";
|
|
118
|
+
"BRAID-UNAVAILABLE": "BRAID-UNAVAILABLE";
|
|
119
|
+
"BRAID-INTERNAL": "BRAID-INTERNAL";
|
|
120
|
+
}>;
|
|
143
121
|
detail: z.ZodOptional<z.ZodString>;
|
|
144
122
|
issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
145
|
-
code: z.ZodBranded<z.ZodString, "ValidationCode">;
|
|
146
|
-
severity: z.ZodEnum<
|
|
123
|
+
code: z.core.$ZodBranded<z.ZodString, "ValidationCode", "out">;
|
|
124
|
+
severity: z.ZodEnum<{
|
|
125
|
+
error: "error";
|
|
126
|
+
warning: "warning";
|
|
127
|
+
info: "info";
|
|
128
|
+
}>;
|
|
147
129
|
message: z.ZodString;
|
|
148
|
-
nodeId: z.ZodOptional<z.ZodBranded<z.ZodString, "NodeId">>;
|
|
149
|
-
edgeId: z.ZodOptional<z.ZodBranded<z.ZodString, "EdgeId">>;
|
|
130
|
+
nodeId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "NodeId", "out">>;
|
|
131
|
+
edgeId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "EdgeId", "out">>;
|
|
150
132
|
path: z.ZodOptional<z.ZodString>;
|
|
151
|
-
},
|
|
152
|
-
|
|
153
|
-
message: string;
|
|
154
|
-
severity: "error" | "warning" | "info";
|
|
155
|
-
path?: string | undefined;
|
|
156
|
-
nodeId?: (string & z.BRAND<"NodeId">) | undefined;
|
|
157
|
-
edgeId?: (string & z.BRAND<"EdgeId">) | undefined;
|
|
158
|
-
}, {
|
|
159
|
-
code: string;
|
|
160
|
-
message: string;
|
|
161
|
-
severity: "error" | "warning" | "info";
|
|
162
|
-
path?: string | undefined;
|
|
163
|
-
nodeId?: string | undefined;
|
|
164
|
-
edgeId?: string | undefined;
|
|
165
|
-
}>, "many">>;
|
|
166
|
-
}, "strip", z.ZodTypeAny, {
|
|
167
|
-
code: string;
|
|
168
|
-
type: string;
|
|
169
|
-
title: string;
|
|
170
|
-
status: number;
|
|
171
|
-
issues?: {
|
|
172
|
-
code: string & z.BRAND<"ValidationCode">;
|
|
173
|
-
message: string;
|
|
174
|
-
severity: "error" | "warning" | "info";
|
|
175
|
-
path?: string | undefined;
|
|
176
|
-
nodeId?: (string & z.BRAND<"NodeId">) | undefined;
|
|
177
|
-
edgeId?: (string & z.BRAND<"EdgeId">) | undefined;
|
|
178
|
-
}[] | undefined;
|
|
179
|
-
detail?: string | undefined;
|
|
180
|
-
}, {
|
|
181
|
-
code: string;
|
|
182
|
-
type: string;
|
|
183
|
-
title: string;
|
|
184
|
-
status: number;
|
|
185
|
-
issues?: {
|
|
186
|
-
code: string;
|
|
187
|
-
message: string;
|
|
188
|
-
severity: "error" | "warning" | "info";
|
|
189
|
-
path?: string | undefined;
|
|
190
|
-
nodeId?: string | undefined;
|
|
191
|
-
edgeId?: string | undefined;
|
|
192
|
-
}[] | undefined;
|
|
193
|
-
detail?: string | undefined;
|
|
194
|
-
}>;
|
|
133
|
+
}, z.core.$strip>>>;
|
|
134
|
+
}, z.core.$strip>;
|
|
195
135
|
};
|
|
196
136
|
};
|
|
197
137
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_shared.d.ts","sourceRoot":"","sources":["../../src/routes/_shared.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAA;AAErC,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"_shared.d.ts","sourceRoot":"","sources":["../../src/routes/_shared.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAA;AAErC,eAAO,MAAM,gBAAgB;;iBAK3B,CAAA;AAEF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEtC,CAAA;AAED,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGnB,CAAA;AAEV,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGpB,CAAA;AAEV,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAG5B,CAAA"}
|
package/dist/routes/_shared.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Shared OpenAPI building blocks used across workspace-scoped routes.
|
|
3
3
|
*
|
|
4
|
-
* Path parameters
|
|
5
|
-
*
|
|
6
|
-
* route under `/workspaces/:workspaceId/*` must
|
|
7
|
-
* `workspaceId` in its `request.params`.
|
|
8
|
-
* keep the declaration consistent.
|
|
4
|
+
* Path parameters on parent app.route() mounts do not merge,
|
|
5
|
+
* into a child route's OpenAPI definitions.
|
|
6
|
+
* So each route under `/workspaces/:workspaceId/*` must re-declare it,
|
|
7
|
+
* naming `workspaceId` in its own `request.params`.
|
|
8
|
+
* Use `WorkspaceIdParam` to keep the declaration consistent.
|
|
9
9
|
*/
|
|
10
10
|
import { BraidProblemJson, WorkspaceId } from '@braidhq/schema';
|
|
11
11
|
import { z } from '@hono/zod-openapi';
|
|
@@ -22,6 +22,10 @@ export const NotFoundResponse = {
|
|
|
22
22
|
description: 'The requested entity does not exist.',
|
|
23
23
|
content: ProblemJsonResponseContent,
|
|
24
24
|
};
|
|
25
|
+
export const ForbiddenResponse = {
|
|
26
|
+
description: 'The caller lacks permission for this action.',
|
|
27
|
+
content: ProblemJsonResponseContent,
|
|
28
|
+
};
|
|
25
29
|
export const ValidationFailureResponse = {
|
|
26
30
|
description: 'Request body or query failed validation.',
|
|
27
31
|
content: ProblemJsonResponseContent,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_shared.js","sourceRoot":"","sources":["../../src/routes/_shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAC/D,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAA;AAErC,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,WAAW,EAAE,WAAW,CAAC,OAAO,CAAC;QAC/B,KAAK,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,EAAE;QAC1C,OAAO,EAAE,cAAc;KACxB,CAAC;CACH,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,0BAA0B,EAAE,EAAE,MAAM,EAAE,gBAAgB,EAAE;CACzD,CAAA;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,WAAW,EAAE,sCAAsC;IACnD,OAAO,EAAE,0BAA0B;CAC3B,CAAA;AAEV,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,WAAW,EAAE,0CAA0C;IACvD,OAAO,EAAE,0BAA0B;CAC3B,CAAA"}
|
|
1
|
+
{"version":3,"file":"_shared.js","sourceRoot":"","sources":["../../src/routes/_shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAC/D,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAA;AAErC,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,WAAW,EAAE,WAAW,CAAC,OAAO,CAAC;QAC/B,KAAK,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,EAAE;QAC1C,OAAO,EAAE,cAAc;KACxB,CAAC;CACH,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,0BAA0B,EAAE,EAAE,MAAM,EAAE,gBAAgB,EAAE;CACzD,CAAA;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,WAAW,EAAE,sCAAsC;IACnD,OAAO,EAAE,0BAA0B;CAC3B,CAAA;AAEV,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,WAAW,EAAE,8CAA8C;IAC3D,OAAO,EAAE,0BAA0B;CAC3B,CAAA;AAEV,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,WAAW,EAAE,0CAA0C;IACvD,OAAO,EAAE,0BAA0B;CAC3B,CAAA"}
|
package/dist/routes/admin.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { WorkspaceService } from '@braidhq/core';
|
|
2
2
|
import type { AccessPolicy } from '../infrastructure/auth/AccessPolicy.js';
|
|
3
|
-
import type { WorkspaceRegistryFile } from '../infrastructure/fs/WorkspaceRegistryFile.js';
|
|
4
3
|
import type { UserRegistryFile } from '../infrastructure/users/UserRegistryFile.js';
|
|
4
|
+
import type { WorkspaceRegistryFile } from '../infrastructure/workspace/WorkspaceRegistryFile.js';
|
|
5
5
|
import { OpenAPIHono } from '@hono/zod-openapi';
|
|
6
6
|
export interface AdminRouterDeps {
|
|
7
7
|
userRegistry: UserRegistryFile;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin.d.ts","sourceRoot":"","sources":["../../src/routes/admin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAErD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAA;AAC1E,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"admin.d.ts","sourceRoot":"","sources":["../../src/routes/admin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAErD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAA;AAC1E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAA;AACnF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sDAAsD,CAAA;AAGjG,OAAO,EAAe,WAAW,EAAK,MAAM,mBAAmB,CAAA;AA6C/D,MAAM,WAAW,eAAe;IAC9B,YAAY,EAAE,gBAAgB,CAAA;IAC9B,YAAY,EAAE,YAAY,CAAA;IAC1B,iBAAiB,EAAE,qBAAqB,CAAA;IACxC,gBAAgB,EAAE,gBAAgB,CAAA;CACnC;AAqHD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,eAAe,GAAG,WAAW,CA2FpE"}
|
package/dist/routes/admin.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { NotFoundError } from '@braidhq/core';
|
|
2
2
|
import { ServerRole, User, UserId, WorkspaceId, WorkspaceRole } from '@braidhq/schema';
|
|
3
3
|
import { createRoute, OpenAPIHono, z } from '@hono/zod-openapi';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { getUserId } from '../middleware/auth.js';
|
|
5
|
+
import { requireServerCapability } from '../middleware/workspaceAccess.js';
|
|
6
6
|
import { NotFoundResponse, ValidationFailureResponse } from './_shared.js';
|
|
7
7
|
const Invite = z.object({
|
|
8
8
|
email: z.string().email(),
|
|
@@ -129,7 +129,7 @@ const deleteUserRoute = createRoute({
|
|
|
129
129
|
method: 'delete',
|
|
130
130
|
path: '/users/{userId}',
|
|
131
131
|
operationId: 'deleteUserAdmin',
|
|
132
|
-
summary: 'Delete a user record. Admin only. Idempotent. Does NOT clean up workspace memberships referencing this userId
|
|
132
|
+
summary: 'Delete a user record. Admin only. Idempotent. Does NOT clean up workspace memberships referencing this userId. Those rows become orphans.',
|
|
133
133
|
tags: ['admin'],
|
|
134
134
|
request: { params: UserIdParam },
|
|
135
135
|
responses: {
|
|
@@ -146,7 +146,7 @@ const deleteUserRoute = createRoute({
|
|
|
146
146
|
});
|
|
147
147
|
export function createAdminRouter(deps) {
|
|
148
148
|
const router = new OpenAPIHono();
|
|
149
|
-
router.use('*',
|
|
149
|
+
router.use('*', requireServerCapability('server.admin', deps.userRegistry));
|
|
150
150
|
router.openapi(listInvitesRoute, async (context) => {
|
|
151
151
|
const items = await deps.accessPolicy.listInvites();
|
|
152
152
|
return context.json({ items }, 200);
|
|
@@ -170,8 +170,8 @@ export function createAdminRouter(deps) {
|
|
|
170
170
|
deps.workspaceService.list(),
|
|
171
171
|
deps.workspaceRegistry.listAllWithMembers(),
|
|
172
172
|
]);
|
|
173
|
-
//
|
|
174
|
-
//
|
|
173
|
+
// Map rootPath to workspaceId so each membership carries a human id,
|
|
174
|
+
// without exposing rootPath to the client.
|
|
175
175
|
const idByRoot = new Map(workspaces.map(w => [w.rootPath, w.id]));
|
|
176
176
|
const membershipByUser = new Map();
|
|
177
177
|
for (const entry of entries) {
|
|
@@ -202,8 +202,8 @@ export function createAdminRouter(deps) {
|
|
|
202
202
|
router.openapi(deleteUserRoute, async (context) => {
|
|
203
203
|
const { userId } = context.req.valid('param');
|
|
204
204
|
const callerId = getUserId(context);
|
|
205
|
-
// Don't let an admin delete themselves
|
|
206
|
-
// would lock itself out otherwise.
|
|
205
|
+
// Don't let an admin delete themselves,
|
|
206
|
+
// a single-admin server would lock itself out otherwise.
|
|
207
207
|
if (userId === callerId) {
|
|
208
208
|
return context.json({
|
|
209
209
|
type: 'about:blank',
|
|
@@ -212,10 +212,11 @@ export function createAdminRouter(deps) {
|
|
|
212
212
|
detail: 'You cannot delete your own user record.',
|
|
213
213
|
}, 400, { 'Content-Type': 'application/problem+json' });
|
|
214
214
|
}
|
|
215
|
-
// Revoke persistent sign-in approval alongside the user record
|
|
216
|
-
// the same email can't sneak back in
|
|
217
|
-
//
|
|
218
|
-
//
|
|
215
|
+
// Revoke persistent sign-in approval alongside the user record,
|
|
216
|
+
// so the same email can't sneak back in at the next /auth/google,
|
|
217
|
+
// without a fresh invite from an admin.
|
|
218
|
+
// Read the user first to grab their email,
|
|
219
|
+
// tolerated when missing for idempotency.
|
|
219
220
|
const existing = await deps.userRegistry.get(userId);
|
|
220
221
|
if (existing?.email)
|
|
221
222
|
await deps.accessPolicy.revokeApproval(existing.email);
|
package/dist/routes/admin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin.js","sourceRoot":"","sources":["../../src/routes/admin.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AACtF,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAA;AAC/D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"admin.js","sourceRoot":"","sources":["../../src/routes/admin.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AACtF,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAA;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAA;AAC1E,OAAO,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAA;AAE1E,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;IACtB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE;IACzB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,E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aAAa;gBACpB,MAAM,EAAE,GAAG;gBACX,MAAM,EAAE,yCAAyC;aAClD,EACD,GAAG,EACH,EAAE,cAAc,EAAE,0BAA0B,EAAE,CAC/C,CAAA;QACH,CAAC;QACD,gEAAgE;QAChE,kEAAkE;QAClE,wCAAwC;QACxC,2CAA2C;QAC3C,0CAA0C;QAC1C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;QACpD,IAAI,QAAQ,EAAE,KAAK;YACjB,MAAM,IAAI,CAAC,YAAY,CAAC,cAAc,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;QACxD,MAAM,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;QACtC,OAAO,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;IAChC,CAAC,CAAC,CAAA;IAEF,OAAO,MAAM,CAAA;AACf,CAAC"}
|
package/dist/routes/auth.d.ts
CHANGED
|
@@ -10,24 +10,26 @@ export interface AuthRouterDeps {
|
|
|
10
10
|
accessPolicy: AccessPolicy;
|
|
11
11
|
userRegistry: UserRegistryFile;
|
|
12
12
|
/**
|
|
13
|
-
* When undefined, `/auth/google/*` respond with 503
|
|
14
|
-
* knows the server is missing OAuth env config
|
|
15
|
-
* silently mid-flow.
|
|
13
|
+
* When undefined, `/auth/google/*` respond with 503,
|
|
14
|
+
* so the operator knows the server is missing OAuth env config,
|
|
15
|
+
* rather than failing silently mid-flow.
|
|
16
16
|
*/
|
|
17
17
|
googleOAuth?: GoogleOAuth;
|
|
18
18
|
/**
|
|
19
|
-
* Where the Studio bundle is served from.
|
|
20
|
-
* with `#token=...` in the fragment
|
|
19
|
+
* Where the Studio bundle is served from.
|
|
20
|
+
* Login redirects land here, with `#token=...` in the fragment.
|
|
21
|
+
* Studio reads, stores, navigates.
|
|
21
22
|
* Defaults to the Vite dev server origin when unset.
|
|
22
23
|
*/
|
|
23
24
|
studioUrl: string;
|
|
24
25
|
/**
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
26
|
+
* Whether a caller must authenticate.
|
|
27
|
+
* Mirrored into `/auth/config.requiresAuth`,
|
|
28
|
+
* telling the Studio whether to gate behind the Login page.
|
|
29
|
+
* When false, anonymous sessions fall through, fine for a sidecar or dev.
|
|
30
|
+
* When true, the Login page is mandatory.
|
|
29
31
|
*/
|
|
30
|
-
|
|
32
|
+
requiresAuth: boolean;
|
|
31
33
|
}
|
|
32
34
|
export declare function createAuthRouter(deps: AuthRouterDeps): Hono;
|
|
33
35
|
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/routes/auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAG1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAA;AAC1E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAA;AAC1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAA;AAEnF,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAY3B,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,KAAK,CAAA;IACZ,YAAY,EAAE,YAAY,CAAA;IAC1B,YAAY,EAAE,YAAY,CAAA;IAC1B,YAAY,EAAE,gBAAgB,CAAA;IAC9B;;;;OAIG;IACH,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/routes/auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAG1C,OAAO,KAAK,EAAE,YAAY,EAA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