@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
|
@@ -4,51 +4,55 @@ import { join } from 'node:path';
|
|
|
4
4
|
import process from 'node:process';
|
|
5
5
|
import { fileURLToPath } from 'node:url';
|
|
6
6
|
import { claudeCodeAgentPlugin } from '@braidhq/agent-claude-code';
|
|
7
|
-
import { builtinSkillsRoot,
|
|
8
|
-
import { InMemoryWorkspaceEventBus } from '@braidhq/core/
|
|
7
|
+
import { builtinSkillsRoot, NotFoundError, PluginRegistry, ValidationError, WorkspaceBootstrapService, } from '@braidhq/core';
|
|
8
|
+
import { InMemoryWorkspaceEventBus } from '@braidhq/core/in-memory';
|
|
9
9
|
import { dddOntology } from '@braidhq/ontology-ddd';
|
|
10
10
|
import { AgentId, AgentKind, StorageKind as StorageKindSchema } from '@braidhq/schema';
|
|
11
11
|
import { createGoogleDriveLoader } from '@braidhq/source-loader-gdrive';
|
|
12
12
|
import { gitLoader } from '@braidhq/source-loader-git';
|
|
13
13
|
import { createGithubLoader } from '@braidhq/source-loader-github';
|
|
14
14
|
import { kuzuStoragePlugin } from '@braidhq/storage-kuzu';
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
15
|
+
import { authenticated, localTrust } from './authMode.js';
|
|
16
|
+
import { composeApp } from './composeApp.js';
|
|
17
|
+
import { parseBoolEnv } from './infrastructure/_shared/env.js';
|
|
17
18
|
import { AccessPolicy } from './infrastructure/auth/AccessPolicy.js';
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import { FsGraphSerializer } from './infrastructure/fs/FsGraphSerializer.js';
|
|
25
|
-
import { FsProposalRepository } from './infrastructure/fs/FsProposalRepository.js';
|
|
26
|
-
import { FsRunRepository } from './infrastructure/fs/FsRunRepository.js';
|
|
27
|
-
import { FsSkillRegistry } from './infrastructure/fs/FsSkillRegistry.js';
|
|
28
|
-
import { FsSourceUnitDigest } from './infrastructure/fs/FsSourceUnitDigest.js';
|
|
29
|
-
import { FsSourceUnitStateRepository } from './infrastructure/fs/FsSourceUnitStateRepository.js';
|
|
30
|
-
import { FsWorkspaceRepository } from './infrastructure/fs/FsWorkspaceRepository.js';
|
|
31
|
-
import { listIntentItems } from './infrastructure/fs/intentScan.js';
|
|
32
|
-
import { discoverCanonicalWorkspaces } from './infrastructure/fs/WorkspaceDiscovery.js';
|
|
33
|
-
import { WorkspaceRegistryFile } from './infrastructure/fs/WorkspaceRegistryFile.js';
|
|
34
|
-
import { GitWorkspaceHistory } from './infrastructure/git/GitWorkspaceHistory.js';
|
|
19
|
+
import { FsSessionStore } from './infrastructure/auth/SessionStore.js';
|
|
20
|
+
import { FsBatchPlanRepository } from './infrastructure/batch/FsBatchPlanRepository.js';
|
|
21
|
+
import { GitWorkspaceHistory } from './infrastructure/history/GitWorkspaceHistory.js';
|
|
22
|
+
import { FsClarificationRepository } from './infrastructure/hitl/FsClarificationRepository.js';
|
|
23
|
+
import { FsProposalRepository } from './infrastructure/hitl/FsProposalRepository.js';
|
|
24
|
+
import { FsModelSerializer } from './infrastructure/model/FsModelSerializer.js';
|
|
35
25
|
import { GoogleOAuth } from './infrastructure/oauth/GoogleOAuth.js';
|
|
26
|
+
import { FsReactorCycleRepository } from './infrastructure/reactor/FsReactorCycleRepository.js';
|
|
36
27
|
import { FsSecretStore } from './infrastructure/secrets/SecretStore.js';
|
|
37
|
-
import {
|
|
28
|
+
import { FsRunRepository } from './infrastructure/skill/FsRunRepository.js';
|
|
29
|
+
import { FsSkillRegistry } from './infrastructure/skill/FsSkillRegistry.js';
|
|
30
|
+
import { SubprocessSkillRunner } from './infrastructure/skill/SubprocessSkillRunner.js';
|
|
31
|
+
import { FsSourceUnitDigest } from './infrastructure/source/FsSourceUnitDigest.js';
|
|
32
|
+
import { FsSourceUnitObservationRepository } from './infrastructure/source/FsSourceUnitObservationRepository.js';
|
|
33
|
+
import { listIntentItems } from './infrastructure/source/intentScan.js';
|
|
38
34
|
import { ensureWorkspaceOwners } from './infrastructure/users/ensureWorkspaceOwners.js';
|
|
39
35
|
import { UserDirectoryFromRegistry } from './infrastructure/users/UserDirectoryFromRegistry.js';
|
|
40
36
|
import { UserRegistryFile } from './infrastructure/users/UserRegistryFile.js';
|
|
37
|
+
import { FsWorkspaceRepository } from './infrastructure/workspace/FsWorkspaceRepository.js';
|
|
38
|
+
import { discoverCanonicalWorkspaces } from './infrastructure/workspace/WorkspaceDiscovery.js';
|
|
39
|
+
import { WorkspaceRegistryFile } from './infrastructure/workspace/WorkspaceRegistryFile.js';
|
|
40
|
+
import { startupBeforeServe } from './startup.js';
|
|
41
|
+
// The coding preset's default plugin identities, its worldview in one place.
|
|
42
|
+
// A caller overrides any of these through ComposeFsOptions,
|
|
43
|
+
// or drops to composeApp with its own PluginRegistry for a different worldview.
|
|
44
|
+
const DEFAULT_STORAGE_KIND = 'kuzu';
|
|
45
|
+
const DEFAULT_AGENT_KIND = 'claude-code';
|
|
46
|
+
const DEFAULT_AGENT_MODEL = 'opus';
|
|
47
|
+
const DEFAULT_AGENT_EFFORT = 'high';
|
|
41
48
|
/**
|
|
42
|
-
* Opinionated production composition
|
|
43
|
-
* workspaces
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
* agent).
|
|
49
|
+
* Opinionated production composition, the coding preset.
|
|
50
|
+
* Filesystem-persists workspaces, proposals, and clarifications,
|
|
51
|
+
* and bundles Kuzu storage, the DDD ontology, the git, github, and drive
|
|
52
|
+
* loaders, and the claude-code agent.
|
|
47
53
|
*
|
|
48
|
-
* To run
|
|
49
|
-
*
|
|
50
|
-
* / `agentKind` to pick a different active one, OR
|
|
51
|
-
* 2. Call `composeApp` directly with a `pluginRegistry` you built yourself.
|
|
54
|
+
* To run a different plugin set, either pass `extraXxxPlugins` and flip
|
|
55
|
+
* `storageKind` or `agentKind`, or call `composeApp` with your own registry.
|
|
52
56
|
*/
|
|
53
57
|
export async function composeFsApp(options = {}) {
|
|
54
58
|
const braidHome = options.braidHome ?? process.env.BRAID_HOME ?? join(homedir(), '.braid');
|
|
@@ -68,19 +72,15 @@ export async function composeFsApp(options = {}) {
|
|
|
68
72
|
: undefined;
|
|
69
73
|
const registry = new WorkspaceRegistryFile(join(braidHome, 'workspaces.json'));
|
|
70
74
|
const workspaceRepository = new FsWorkspaceRepository({ registry });
|
|
71
|
-
// Server-side user roster
|
|
72
|
-
// Auth and ACL belong to the host, not to
|
|
73
|
-
// workspace records. Single-user local installs get a `local-user`
|
|
74
|
-
// bootstrapped here so `userIdMiddleware`'s default actually resolves.
|
|
75
|
+
// Server-side user roster, distinct from any workspace's git history.
|
|
76
|
+
// Auth and ACL belong to the host, not to what a workspace records.
|
|
75
77
|
const userRegistry = new UserRegistryFile(join(braidHome, 'users.json'));
|
|
76
|
-
|
|
77
|
-
//
|
|
78
|
-
//
|
|
79
|
-
//
|
|
80
|
-
//
|
|
81
|
-
|
|
82
|
-
// why this is fine to read once.
|
|
83
|
-
const sessionStore = new SessionStore(join(braidHome, 'sessions.json'));
|
|
78
|
+
// Auth state. Both files live next to `users.json` under `${BRAID_HOME}`,
|
|
79
|
+
// never inside a workspace,
|
|
80
|
+
// because access control is host state, not a workspace artifact.
|
|
81
|
+
// AccessPolicy reads env at construct time.
|
|
82
|
+
// Production deployments restart on config changes, so reading once is fine.
|
|
83
|
+
const sessionStore = new FsSessionStore(join(braidHome, 'sessions.json'));
|
|
84
84
|
const accessPolicyConfig = {};
|
|
85
85
|
const allowedDomains = parseCsv(process.env.BRAID_ALLOWED_DOMAINS);
|
|
86
86
|
if (allowedDomains)
|
|
@@ -92,21 +92,25 @@ export async function composeFsApp(options = {}) {
|
|
|
92
92
|
if (adminEmails)
|
|
93
93
|
accessPolicyConfig.adminEmails = adminEmails;
|
|
94
94
|
const accessPolicy = new AccessPolicy(join(braidHome, 'access.json'), accessPolicyConfig);
|
|
95
|
-
//
|
|
96
|
-
//
|
|
97
|
-
|
|
95
|
+
// Boot, part one, provision host identity, who may use this server.
|
|
96
|
+
// Local trust is the default.
|
|
97
|
+
// Production sets `BRAID_LOCAL_TRUST=false` to require real authentication.
|
|
98
|
+
// We do not flip the default when Google OAuth env is present,
|
|
99
|
+
// those creds also feed the Drive loader,
|
|
100
|
+
// and a dev pulling from Drive should not hit Login on every reload.
|
|
101
|
+
const authMode = parseBoolEnv(process.env.BRAID_LOCAL_TRUST, true) ? localTrust : authenticated;
|
|
102
|
+
// Local trust seeds `local-user`, authenticated mode syncs the login allowlist.
|
|
103
|
+
await authMode.provision({ userRegistry, accessPolicy });
|
|
98
104
|
const studioUrl = process.env.BRAID_STUDIO_URL ?? 'http://localhost:5173';
|
|
99
105
|
const workspaceRoots = async () => {
|
|
100
106
|
const workspaces = await workspaceRepository.list();
|
|
101
107
|
return new Map(workspaces.map(ws => [ws.id, ws.rootPath]));
|
|
102
108
|
};
|
|
103
109
|
const proposalRepository = new FsProposalRepository({ workspaceRoots });
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
//
|
|
107
|
-
//
|
|
108
|
-
// and c4 registered; the active one is chosen per-workspace via
|
|
109
|
-
// PRODUCT.md.ontologyId.
|
|
110
|
+
const clarificationRepository = new FsClarificationRepository({ workspaceRoots });
|
|
111
|
+
// Plugin registration. Defaults bundle first, then extras,
|
|
112
|
+
// so a caller passing `extraOntologyPlugins: [c4]` gets both ddd and c4.
|
|
113
|
+
// The active one is chosen per-workspace via PRODUCT.md.ontologyId.
|
|
110
114
|
const pluginRegistry = new PluginRegistry();
|
|
111
115
|
pluginRegistry.register(kuzuStoragePlugin);
|
|
112
116
|
for (const plugin of options.extraStoragePlugins ?? [])
|
|
@@ -121,10 +125,11 @@ export async function composeFsApp(options = {}) {
|
|
|
121
125
|
pluginRegistry.register(claudeCodeAgentPlugin);
|
|
122
126
|
for (const plugin of options.extraAgentPlugins ?? [])
|
|
123
127
|
pluginRegistry.register(plugin);
|
|
124
|
-
// The gdrive loader is always registered
|
|
125
|
-
// `kind: gdrive` source doesn't crash at plugin lookup.
|
|
126
|
-
// vars aren't configured,
|
|
127
|
-
//
|
|
128
|
+
// The gdrive loader is always registered,
|
|
129
|
+
// so a `kind: gdrive` source doesn't crash at plugin lookup.
|
|
130
|
+
// If OAuth env vars aren't configured,
|
|
131
|
+
// the token resolver throws an actionable error at provision time,
|
|
132
|
+
// so the user knows exactly what to set.
|
|
128
133
|
const oauth = googleOAuth;
|
|
129
134
|
pluginRegistry.register(createGoogleDriveLoader({
|
|
130
135
|
resolveAccessToken: async ({ workspaceId, sourceId }) => {
|
|
@@ -137,7 +142,7 @@ export async function composeFsApp(options = {}) {
|
|
|
137
142
|
throw new NotFoundError(`Google Drive source "${sourceId}" on workspace "${workspaceId}" is not connected. `
|
|
138
143
|
+ `Authorise via POST /oauth/google/start.`);
|
|
139
144
|
}
|
|
140
|
-
// 60-second skew so we don't hand out a token about to expire mid-request.
|
|
145
|
+
// 60-second skew, so we don't hand out a token about to expire mid-request.
|
|
141
146
|
const stillValidUntil = new Date(stored.expiresAt).getTime() - 60_000;
|
|
142
147
|
if (Date.now() < stillValidUntil)
|
|
143
148
|
return stored.accessToken;
|
|
@@ -151,7 +156,7 @@ export async function composeFsApp(options = {}) {
|
|
|
151
156
|
},
|
|
152
157
|
}));
|
|
153
158
|
// Resolve the active storage plugin and ask it for a ModelRepository.
|
|
154
|
-
const storageKind = StorageKindSchema.parse(options.storageKind ?? process.env.BRAID_STORAGE_KIND ??
|
|
159
|
+
const storageKind = StorageKindSchema.parse(options.storageKind ?? process.env.BRAID_STORAGE_KIND ?? DEFAULT_STORAGE_KIND);
|
|
155
160
|
const modelRepository = await pluginRegistry.requireStoragePlugin(storageKind).createModelRepository({ kind: storageKind, config: {} }, {
|
|
156
161
|
workspaceRootPath: braidHome,
|
|
157
162
|
logger: { info: () => { }, warn: () => { }, error: () => { } },
|
|
@@ -163,30 +168,33 @@ export async function composeFsApp(options = {}) {
|
|
|
163
168
|
return root;
|
|
164
169
|
},
|
|
165
170
|
});
|
|
166
|
-
//
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
171
|
+
// Server default agent.
|
|
172
|
+
// A skill overrides kind, model, or effort in its SKILL.md frontmatter,
|
|
173
|
+
// and the runner merges that onto this default at run time.
|
|
174
|
+
const agentKind = AgentKind.parse(options.agentKind ?? DEFAULT_AGENT_KIND);
|
|
175
|
+
const defaultAgent = {
|
|
176
|
+
id: AgentId.parse(DEFAULT_AGENT_KIND),
|
|
170
177
|
kind: agentKind,
|
|
171
|
-
model: options.agentModel ??
|
|
172
|
-
effort: options.agentEffort ??
|
|
178
|
+
model: options.agentModel ?? DEFAULT_AGENT_MODEL,
|
|
179
|
+
effort: options.agentEffort ?? DEFAULT_AGENT_EFFORT,
|
|
173
180
|
extraArgs: [],
|
|
174
181
|
env: {},
|
|
175
|
-
}
|
|
182
|
+
};
|
|
176
183
|
const runRepository = new FsRunRepository();
|
|
177
|
-
// Built after pluginRegistry is populated
|
|
178
|
-
// files mount under the `plugin`
|
|
184
|
+
// Built after pluginRegistry is populated,
|
|
185
|
+
// so plugin-shipped SKILL.md files mount under the `plugin` origin,
|
|
186
|
+
// alongside builtins.
|
|
179
187
|
const skillRegistry = new FsSkillRegistry({
|
|
180
188
|
builtinSkillsRoot: builtinSkillsRoot,
|
|
181
189
|
pluginRegistry,
|
|
182
190
|
});
|
|
183
191
|
const eventBus = new InMemoryWorkspaceEventBus();
|
|
184
|
-
// Built-in braid-core MCP gateway
|
|
185
|
-
//
|
|
186
|
-
// The gateway lifecycle tracks the claude subprocess
|
|
187
|
-
// long-running server
|
|
188
|
-
//
|
|
189
|
-
// `
|
|
192
|
+
// Built-in braid-core MCP gateway. Each spawned skill gets a stdio entry,
|
|
193
|
+
// running `uvx openapi-mcp-gateway --transport stdio`.
|
|
194
|
+
// The gateway lifecycle tracks the claude subprocess,
|
|
195
|
+
// with no separate long-running server, and needs `uv` on PATH.
|
|
196
|
+
// If `uv` is missing, the entry is skipped.
|
|
197
|
+
// Skills that require `braid-core` then surface as not-ready,
|
|
190
198
|
// via SkillManifest.readinessIssuesFor, with a clear pointer.
|
|
191
199
|
const uvxBin = await detectUvx();
|
|
192
200
|
if (!uvxBin) {
|
|
@@ -194,17 +202,20 @@ export async function composeFsApp(options = {}) {
|
|
|
194
202
|
+ 'Install via `brew install uv` or https://docs.astral.sh/uv/ to enable.');
|
|
195
203
|
}
|
|
196
204
|
// Build the list of reference dirs symlinked into every skill session:
|
|
197
|
-
//
|
|
198
|
-
//
|
|
199
|
-
// -
|
|
200
|
-
//
|
|
205
|
+
// - builtin `shared/` from @braidhq/core,
|
|
206
|
+
// format docs for Proposal, Clarification, Validator, content conventions,
|
|
207
|
+
// and drift-detection guidance.
|
|
208
|
+
// - whatever each registered plugin contributes,
|
|
209
|
+
// for example the concept doc from ontology-ddd.
|
|
210
|
+
// Plugin contributions resolve `URL` to an absolute path.
|
|
201
211
|
const pluginReferenceDirs = pluginRegistry.pluginReferenceDirs().map((ref) => {
|
|
202
212
|
const dir = typeof ref.directory === 'string' ? ref.directory : fileURLToPath(ref.directory);
|
|
203
213
|
return { name: ref.name, path: dir };
|
|
204
214
|
});
|
|
205
215
|
const skillRunner = new SubprocessSkillRunner({
|
|
206
216
|
skillRegistry,
|
|
207
|
-
|
|
217
|
+
buildAgentBinding: descriptor => pluginRegistry.requireAgentPlugin(descriptor.kind).createBinding(descriptor),
|
|
218
|
+
defaultAgent,
|
|
208
219
|
apiUrl,
|
|
209
220
|
runRepository,
|
|
210
221
|
eventBus,
|
|
@@ -216,12 +227,13 @@ export async function composeFsApp(options = {}) {
|
|
|
216
227
|
...pluginReferenceDirs,
|
|
217
228
|
],
|
|
218
229
|
});
|
|
219
|
-
// Shared by
|
|
230
|
+
// Shared by WorkspaceBootstrapService (boot reconciliation),
|
|
231
|
+
// and HITLService (per-mutation commits).
|
|
220
232
|
const history = new GitWorkspaceHistory();
|
|
221
|
-
const
|
|
222
|
-
const bootstrap = new
|
|
233
|
+
const modelSerializer = new FsModelSerializer();
|
|
234
|
+
const bootstrap = new WorkspaceBootstrapService({
|
|
223
235
|
history,
|
|
224
|
-
serializer:
|
|
236
|
+
serializer: modelSerializer,
|
|
225
237
|
modelRepository,
|
|
226
238
|
});
|
|
227
239
|
const workspacesRoot = join(braidHome, 'workspaces');
|
|
@@ -229,8 +241,7 @@ export async function composeFsApp(options = {}) {
|
|
|
229
241
|
const deps = composeApp({
|
|
230
242
|
workspaceRepository,
|
|
231
243
|
proposalRepository,
|
|
232
|
-
|
|
233
|
-
decisionRepository,
|
|
244
|
+
clarificationRepository,
|
|
234
245
|
modelRepository,
|
|
235
246
|
skillRegistry,
|
|
236
247
|
skillRunner,
|
|
@@ -239,44 +250,28 @@ export async function composeFsApp(options = {}) {
|
|
|
239
250
|
eventBus,
|
|
240
251
|
workspacesRoot,
|
|
241
252
|
history,
|
|
242
|
-
|
|
253
|
+
modelSerializer,
|
|
243
254
|
bootstrap,
|
|
244
255
|
batchPlanRepository: new FsBatchPlanRepository(),
|
|
245
256
|
intentLister: listIntentItems,
|
|
246
|
-
|
|
257
|
+
sourceUnitObservationRepository: new FsSourceUnitObservationRepository({ workspaceRoots }),
|
|
258
|
+
reactorCycleRepository: new FsReactorCycleRepository({ workspaceRoots }),
|
|
247
259
|
sourceUnitDigest: new FsSourceUnitDigest(),
|
|
248
260
|
userDirectory,
|
|
261
|
+
authMode,
|
|
249
262
|
});
|
|
250
|
-
//
|
|
251
|
-
//
|
|
252
|
-
//
|
|
263
|
+
// Boot, part two, reconcile workspaces, register then boot each.
|
|
264
|
+
// Pick up workspaces on disk but not in the registry,
|
|
265
|
+
// such as CLI-created ones, scaffold orphans, or copies from another machine.
|
|
266
|
+
// Registry add is idempotent, safe on every boot.
|
|
253
267
|
await discoverCanonicalWorkspaces(workspacesRoot, deps.workspaceService);
|
|
254
|
-
//
|
|
255
|
-
//
|
|
256
|
-
//
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
//
|
|
260
|
-
|
|
261
|
-
for (const workspace of await deps.workspaceService.list()) {
|
|
262
|
-
try {
|
|
263
|
-
await bootstrap.ensure(workspace);
|
|
264
|
-
// Mark any batch plan left running by a previous process as failed so
|
|
265
|
-
// the UI doesn't show a phantom spinner. Safe to call even when there
|
|
266
|
-
// is no plan or when the plan is already terminal.
|
|
267
|
-
await deps.batchService?.reconcileAfterBoot(workspace.id);
|
|
268
|
-
}
|
|
269
|
-
catch (err) {
|
|
270
|
-
bootstrapLog.warn({ err, workspaceId: workspace.id }, 'workspace bootstrap failed; skipping');
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
// Local trust is the default; production deployments opt into the
|
|
274
|
-
// Bearer-token gate by setting `BRAID_LOCAL_TRUST=false`. We deliberately
|
|
275
|
-
// DON'T flip the default just because Google OAuth env vars are
|
|
276
|
-
// present — those same creds are also used by the Drive source
|
|
277
|
-
// loader for ingest, so a local dev workspace pulling from Drive
|
|
278
|
-
// would otherwise get pushed into the Login flow on every reload.
|
|
279
|
-
const localTrust = parseBoolEnv(process.env.BRAID_LOCAL_TRUST, true);
|
|
268
|
+
// Give any workspace with an empty members[] its default owner,
|
|
269
|
+
// covering older registry entries and freshly discovered workspaces.
|
|
270
|
+
// Owner promotion via `/members` routes can rewrite this later.
|
|
271
|
+
await ensureWorkspaceOwners(registry, authMode.defaultPrincipal);
|
|
272
|
+
// Blocking per-workspace startup, provision, recover, subscribe, catch-up sync.
|
|
273
|
+
// See startup.ts, the single home for boot steps.
|
|
274
|
+
await startupBeforeServe(deps);
|
|
280
275
|
return {
|
|
281
276
|
...deps,
|
|
282
277
|
bootstrap,
|
|
@@ -286,7 +281,6 @@ export async function composeFsApp(options = {}) {
|
|
|
286
281
|
sessionStore,
|
|
287
282
|
accessPolicy,
|
|
288
283
|
studioUrl,
|
|
289
|
-
localTrust,
|
|
290
284
|
...(googleOAuth ? { googleOAuth } : {}),
|
|
291
285
|
};
|
|
292
286
|
}
|
|
@@ -296,14 +290,13 @@ function parseCsv(input) {
|
|
|
296
290
|
const parts = input.split(',').map(s => s.trim()).filter(s => s.length > 0);
|
|
297
291
|
return parts.length > 0 ? parts : undefined;
|
|
298
292
|
}
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
*/
|
|
293
|
+
// Resolve the `uvx` binary path by running `uvx --version`.
|
|
294
|
+
// Returns `'uvx'` when the call succeeds.
|
|
295
|
+
// We let `PATH` resolve it at spawn time,
|
|
296
|
+
// so we don't bake an absolute path into mcp-config.
|
|
297
|
+
// Returns `undefined` when `uv` isn't installed.
|
|
298
|
+
// Honours `BRAID_UVX_BIN` for pinning a specific binary, a uv off PATH,
|
|
299
|
+
// or a stub injected by tests.
|
|
307
300
|
async function detectUvx() {
|
|
308
301
|
const pinned = process.env.BRAID_UVX_BIN;
|
|
309
302
|
const command = pinned && pinned.length > 0 ? pinned : 'uvx';
|
|
@@ -313,4 +306,4 @@ async function detectUvx() {
|
|
|
313
306
|
child.once('exit', code => resolve(code === 0 ? command : undefined));
|
|
314
307
|
});
|
|
315
308
|
}
|
|
316
|
-
//# sourceMappingURL=
|
|
309
|
+
//# sourceMappingURL=composeFsApp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composeFsApp.js","sourceRoot":"","sources":["../src/composeFsApp.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,OAAO,MAAM,cAAc,CAAA;AAClC,OAAO,EAAE,aAAa,EAAE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* from './composeApp.js';
|
|
3
|
+
export * from './composeFsApp.js';
|
|
4
4
|
export * from './middleware/error.js';
|
|
5
|
+
export * from './startServer.js';
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,mBAAmB,CAAA;AACjC,cAAc,uBAAuB,CAAA;AACrC,cAAc,kBAAkB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from './app.js';
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
2
|
+
export * from './composeApp.js';
|
|
3
|
+
export * from './composeFsApp.js';
|
|
4
4
|
export * from './middleware/error.js';
|
|
5
|
+
export * from './startServer.js';
|
|
5
6
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,mBAAmB,CAAA;AACjC,cAAc,uBAAuB,CAAA;AACrC,cAAc,kBAAkB,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parse a boolean env var. Canonical form is `true` or `false`.
|
|
3
|
+
* We also accept the common YAML and shell idioms (`yes`/`no`, `on`/`off`, `1`/`0`),
|
|
4
|
+
* so existing `.env` files don't break on the rename.
|
|
5
|
+
*
|
|
6
|
+
* Returns `defaultValue` when the variable is unset or the literal is unrecognised.
|
|
7
|
+
* This silent fall-through keeps a typo in env from crashing the server boot.
|
|
8
|
+
*/
|
|
9
|
+
export declare function parseBoolEnv(value: string | undefined, defaultValue: boolean): boolean;
|
|
10
|
+
//# sourceMappingURL=env.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/_shared/env.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,YAAY,EAAE,OAAO,GAAG,OAAO,CAStF"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Parse a boolean env var. Canonical form is `true`
|
|
3
|
-
* accept the common YAML
|
|
4
|
-
*
|
|
2
|
+
* Parse a boolean env var. Canonical form is `true` or `false`.
|
|
3
|
+
* We also accept the common YAML and shell idioms (`yes`/`no`, `on`/`off`, `1`/`0`),
|
|
4
|
+
* so existing `.env` files don't break on the rename.
|
|
5
5
|
*
|
|
6
|
-
* Returns `defaultValue` when the variable is unset or the literal is
|
|
7
|
-
*
|
|
8
|
-
* crash the server boot).
|
|
6
|
+
* Returns `defaultValue` when the variable is unset or the literal is unrecognised.
|
|
7
|
+
* This silent fall-through keeps a typo in env from crashing the server boot.
|
|
9
8
|
*/
|
|
10
9
|
export function parseBoolEnv(value, defaultValue) {
|
|
11
10
|
if (value === undefined)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.js","sourceRoot":"","sources":["../../../src/infrastructure/_shared/env.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,UAAU,YAAY,CAAC,KAAyB,EAAE,YAAqB;IAC3E,IAAI,KAAK,KAAK,SAAS;QACrB,OAAO,YAAY,CAAA;IACrB,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAA;IACxC,IAAI,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,GAAG,IAAI,KAAK,KAAK,KAAK,IAAI,KAAK,KAAK,IAAI;QACxE,OAAO,IAAI,CAAA;IACb,IAAI,KAAK,KAAK,OAAO,IAAI,KAAK,KAAK,GAAG,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,KAAK;QACzE,OAAO,KAAK,CAAA;IACd,OAAO,YAAY,CAAA;AACrB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface MarkdownDocument<T> {
|
|
2
|
+
readonly frontmatter: T;
|
|
3
|
+
readonly body: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Splits a markdown file into YAML frontmatter and body.
|
|
7
|
+
* The YAML sits between `---` delimiters on their own lines at the top.
|
|
8
|
+
* Keys are normalised recursively from kebab-case to camelCase,
|
|
9
|
+
* from the YAML convention Claude Code uses to the TS convention,
|
|
10
|
+
* so Zod schemas can declare fields naturally in TS.
|
|
11
|
+
*/
|
|
12
|
+
export declare function parseMarkdownFrontmatter<T>(content: string): MarkdownDocument<T>;
|
|
13
|
+
//# sourceMappingURL=frontmatter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frontmatter.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/_shared/frontmatter.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,gBAAgB,CAAC,CAAC;IACjC,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAA;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAmBhF"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { parse as parseYaml } from 'yaml';
|
|
2
2
|
const FRONTMATTER_DELIMITER = '---';
|
|
3
3
|
/**
|
|
4
|
-
* Splits a markdown file into YAML frontmatter
|
|
5
|
-
* between `---` delimiters on their own lines at the top
|
|
6
|
-
* Keys are normalised from kebab-case
|
|
7
|
-
* Code
|
|
8
|
-
* can declare fields naturally in TS.
|
|
4
|
+
* Splits a markdown file into YAML frontmatter and body.
|
|
5
|
+
* The YAML sits between `---` delimiters on their own lines at the top.
|
|
6
|
+
* Keys are normalised recursively from kebab-case to camelCase,
|
|
7
|
+
* from the YAML convention Claude Code uses to the TS convention,
|
|
8
|
+
* so Zod schemas can declare fields naturally in TS.
|
|
9
9
|
*/
|
|
10
10
|
export function parseMarkdownFrontmatter(content) {
|
|
11
11
|
const lines = content.split('\n');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frontmatter.js","sourceRoot":"","sources":["../../../src/infrastructure/_shared/frontmatter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAA;AAEzC,MAAM,qBAAqB,GAAG,KAAK,CAAA;AAOnC;;;;;;GAMG;AACH,MAAM,UAAU,wBAAwB,CAAI,OAAe;IACzD,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IACjC,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,qBAAqB,EAAE,CAAC;QAC/C,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAA;IACxE,CAAC;IACD,IAAI,YAAY,GAAG,CAAC,CAAC,CAAA;IACrB,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC,MAAM,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QACrD,IAAI,KAAK,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,KAAK,qBAAqB,EAAE,CAAC;YACnD,YAAY,GAAG,KAAK,CAAA;YACpB,MAA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
1
|
+
{"version":3,"file":"jsonFileStore.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/_shared/jsonFileStore.ts"],"names":[],"mappings":"AAGA,wBAAsB,YAAY,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAGlE;AAED,wBAAsB,aAAa,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAGlF;AAED,wBAAsB,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAG9E;AAED,wBAAsB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAaxE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonFileStore.js","sourceRoot":"","sources":["../../../src/infrastructure/_shared/jsonFileStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACrE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAEzC,MAAM,CAAC,KAAK,UAAU,YAAY,CAAI,QAAgB;IACpD,MAAM,GAAG,GAAG,MAAM,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAA;IAC7C,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAM,CAAA;AAC7B,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,aAAa,CAAI,QAAgB,EAAE,OAAU;IACjE,MAAM,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IACnD,MAAM,SAAS,CAAC,QAAQ,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;AAC7E,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,QAAgB,EAAE,MAAc;IAC7D,MAAM,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IACjD,MAAM,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAA;AAChC,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,SAAiB;IACnD,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,CAAA;IACpD,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,SAAS,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAA;QACjE,OAAO,OAAO;aACX,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;aAC/D,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;IAC9C,CAAC;IACD,OAAO,KAAK,EAAE,CAAC;QACb,IAAK,KAA+B,CAAC,IAAI,KAAK,QAAQ;YACpD,OAAO,EAAE,CAAA;QACX,MAAM,KAAK,CAAA;IACb,CAAC;AACH,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { AbsolutePath,
|
|
1
|
+
import type { AbsolutePath, ClarificationStatus, ProposalStatus, WorkspaceId } from '@braidhq/schema';
|
|
2
2
|
export declare const PROPOSAL_STATUSES: readonly ProposalStatus[];
|
|
3
|
-
export declare const CLARIFY_STATUSES: readonly
|
|
3
|
+
export declare const CLARIFY_STATUSES: readonly ClarificationStatus[];
|
|
4
4
|
/**
|
|
5
|
-
* Path-prefix containment check. Both inputs must be absolute.
|
|
6
|
-
* the `/foo/bar-evil` vs `/foo/bar/` aliasing gotcha
|
|
7
|
-
* parent with a trailing slash before `startsWith`.
|
|
5
|
+
* Path-prefix containment check. Both inputs must be absolute.
|
|
6
|
+
* Handles the `/foo/bar-evil` vs `/foo/bar/` aliasing gotcha,
|
|
7
|
+
* normalising the parent with a trailing slash before `startsWith`.
|
|
8
8
|
*/
|
|
9
9
|
export declare function isUnder(candidate: string, parent: string): boolean;
|
|
10
10
|
/** `true` when `path` resolves to anything (file, dir, symlink). */
|
|
@@ -12,17 +12,24 @@ export declare function pathExists(path: string): Promise<boolean>;
|
|
|
12
12
|
export declare function workspaceArtifactsDir(workspaceRoot: AbsolutePath): string;
|
|
13
13
|
export declare function graphJsonPath(workspaceRoot: AbsolutePath): string;
|
|
14
14
|
export declare function batchPlanPath(workspaceRoot: AbsolutePath): string;
|
|
15
|
-
export declare function
|
|
16
|
-
export declare function
|
|
17
|
-
export declare function
|
|
15
|
+
export declare function sourceUnitObservationDir(workspaceRoot: AbsolutePath): string;
|
|
16
|
+
export declare function sourceUnitObservationFilePath(workspaceRoot: AbsolutePath, sourceId: string, relativePath: string): string;
|
|
17
|
+
export declare function sourceUnitObservationSourceDir(workspaceRoot: AbsolutePath, sourceId: string): string;
|
|
18
18
|
export declare function proposalsDir(workspaceRoot: AbsolutePath, status: ProposalStatus): string;
|
|
19
|
-
export declare function
|
|
20
|
-
export declare function decisionsDir(workspaceRoot: AbsolutePath): string;
|
|
19
|
+
export declare function clarificationDir(workspaceRoot: AbsolutePath, status: ClarificationStatus): string;
|
|
21
20
|
export declare function viewsDir(workspaceRoot: AbsolutePath, kind: string): string;
|
|
22
21
|
export declare function runsDir(workspaceRoot: AbsolutePath): string;
|
|
22
|
+
export declare function reactorCyclesDir(workspaceRoot: AbsolutePath): string;
|
|
23
|
+
export declare function reactorCycleFilePath(workspaceRoot: AbsolutePath, cycleId: string): string;
|
|
23
24
|
export declare function runIndexPath(workspaceRoot: AbsolutePath): string;
|
|
24
25
|
export declare function runEventsPath(workspaceRoot: AbsolutePath, runId: string): string;
|
|
25
26
|
export declare function runSessionsMetadataPath(workspaceRoot: AbsolutePath): string;
|
|
27
|
+
/**
|
|
28
|
+
* claude stores conversation memory keyed by cwd,
|
|
29
|
+
* so resume must spawn from the same dir as the first turn.
|
|
30
|
+
* Keeping it in the workspace, not /tmp, stays derivable from runId,
|
|
31
|
+
* and survives a server restart.
|
|
32
|
+
*/
|
|
26
33
|
export declare function sessionsDir(workspaceRoot: AbsolutePath): string;
|
|
27
34
|
export declare function sessionDirPath(workspaceRoot: AbsolutePath, runId: string): string;
|
|
28
35
|
export declare function workspaceSkillsDir(workspaceRoot: AbsolutePath): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/_shared/paths.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,mBAAmB,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAIrG,eAAO,MAAM,iBAAiB,EAAE,SAAS,cAAc,EAAuC,CAAA;AAC9F,eAAO,MAAM,gBAAgB,EAAE,SAAS,mBAAmB,EAAkD,CAAA;AAE7G;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAGlE;AAED,oEAAoE;AACpE,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAQ/D;AAED,wBAAgB,qBAAqB,CAAC,aAAa,EAAE,YAAY,GAAG,MAAM,CAEzE;AAED,wBAAgB,aAAa,CAAC,aAAa,EAAE,YAAY,GAAG,MAAM,CAEjE;AAED,wBAAgB,aAAa,CAAC,aAAa,EAAE,YAAY,GAAG,MAAM,CAEjE;AAED,wBAAgB,wBAAwB,CAAC,aAAa,EAAE,YAAY,GAAG,MAAM,CAE5E;AAED,wBAAgB,6BAA6B,CAC3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