@braidhq/server 0.0.1 → 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 +164 -0
- package/dist/app.d.ts +12 -3
- package/dist/app.d.ts.map +1 -1
- package/dist/app.js +154 -9
- 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/composeFsApp.js +309 -0
- 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/_shared/env.js +19 -0
- 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/_shared/paths.d.ts +43 -0
- package/dist/infrastructure/_shared/paths.d.ts.map +1 -0
- package/dist/infrastructure/_shared/paths.js +96 -0
- package/dist/infrastructure/_shared/paths.js.map +1 -0
- package/dist/infrastructure/auth/AccessPolicy.d.ts +87 -0
- package/dist/infrastructure/auth/AccessPolicy.d.ts.map +1 -0
- package/dist/infrastructure/auth/AccessPolicy.js +177 -0
- package/dist/infrastructure/auth/AccessPolicy.js.map +1 -0
- package/dist/infrastructure/auth/SessionStore.d.ts +50 -0
- package/dist/infrastructure/auth/SessionStore.d.ts.map +1 -0
- package/dist/infrastructure/auth/SessionStore.js +104 -0
- package/dist/infrastructure/auth/SessionStore.js.map +1 -0
- package/dist/infrastructure/batch/FsBatchPlanRepository.d.ts +79 -0
- package/dist/infrastructure/batch/FsBatchPlanRepository.d.ts.map +1 -0
- package/dist/infrastructure/batch/FsBatchPlanRepository.js +42 -0
- package/dist/infrastructure/batch/FsBatchPlanRepository.js.map +1 -0
- package/dist/infrastructure/history/GitWorkspaceHistory.d.ts +18 -0
- package/dist/infrastructure/history/GitWorkspaceHistory.d.ts.map +1 -0
- package/dist/infrastructure/history/GitWorkspaceHistory.js +310 -0
- package/dist/infrastructure/history/GitWorkspaceHistory.js.map +1 -0
- package/dist/infrastructure/history/commitMessage.d.ts +4 -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/hitl/FsClarificationRepository.js +39 -0
- 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 +10 -3
- 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/model/FsModelSerializer.js +60 -0
- package/dist/infrastructure/model/FsModelSerializer.js.map +1 -0
- package/dist/infrastructure/oauth/GoogleOAuth.d.ts +43 -14
- package/dist/infrastructure/oauth/GoogleOAuth.d.ts.map +1 -1
- package/dist/infrastructure/oauth/GoogleOAuth.js +78 -11
- 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 +9 -4
- package/dist/infrastructure/skill/FsRunRepository.d.ts.map +1 -0
- package/dist/infrastructure/skill/FsRunRepository.js +162 -0
- 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 +38 -18
- package/dist/infrastructure/skill/FsSkillRegistry.js.map +1 -0
- package/dist/infrastructure/{agent → skill}/SubprocessSkillRunner.d.ts +13 -15
- package/dist/infrastructure/skill/SubprocessSkillRunner.d.ts.map +1 -0
- package/dist/infrastructure/{agent → skill}/SubprocessSkillRunner.js +124 -40
- 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/source/FsSourceUnitDigest.js +58 -0
- 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/source/FsSourceUnitObservationRepository.js +88 -0
- package/dist/infrastructure/source/FsSourceUnitObservationRepository.js.map +1 -0
- package/dist/infrastructure/source/intentScan.d.ts +13 -0
- package/dist/infrastructure/source/intentScan.d.ts.map +1 -0
- package/dist/infrastructure/source/intentScan.js +137 -0
- package/dist/infrastructure/source/intentScan.js.map +1 -0
- package/dist/infrastructure/users/UserDirectoryFromRegistry.d.ts +14 -0
- package/dist/infrastructure/users/UserDirectoryFromRegistry.d.ts.map +1 -0
- package/dist/infrastructure/users/UserDirectoryFromRegistry.js +21 -0
- package/dist/infrastructure/users/UserDirectoryFromRegistry.js.map +1 -0
- package/dist/infrastructure/users/UserRegistryFile.d.ts +22 -0
- package/dist/infrastructure/users/UserRegistryFile.d.ts.map +1 -0
- package/dist/infrastructure/users/UserRegistryFile.js +89 -0
- package/dist/infrastructure/users/UserRegistryFile.js.map +1 -0
- package/dist/infrastructure/users/ensureWorkspaceOwners.d.ts +12 -0
- package/dist/infrastructure/users/ensureWorkspaceOwners.d.ts.map +1 -0
- package/dist/infrastructure/users/ensureWorkspaceOwners.js +25 -0
- package/dist/infrastructure/users/ensureWorkspaceOwners.js.map +1 -0
- package/dist/infrastructure/workspace/FsWorkspaceRepository.d.ts.map +1 -0
- package/dist/infrastructure/{fs → workspace}/FsWorkspaceRepository.js +15 -5
- 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/workspace/WorkspaceDiscovery.js +50 -0
- package/dist/infrastructure/workspace/WorkspaceDiscovery.js.map +1 -0
- package/dist/infrastructure/workspace/WorkspaceRegistryFile.d.ts +42 -0
- package/dist/infrastructure/workspace/WorkspaceRegistryFile.d.ts.map +1 -0
- package/dist/infrastructure/workspace/WorkspaceRegistryFile.js +160 -0
- 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 -28
- package/dist/infrastructure/workspace/productManifestWriter.js.map +1 -0
- package/dist/middleware/auth.d.ts +39 -0
- package/dist/middleware/auth.d.ts.map +1 -0
- package/dist/middleware/auth.js +87 -0
- package/dist/middleware/auth.js.map +1 -0
- package/dist/middleware/cors.d.ts.map +1 -1
- package/dist/middleware/cors.js +5 -2
- 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 +51 -0
- package/dist/middleware/workspaceAccess.d.ts.map +1 -0
- package/dist/middleware/workspaceAccess.js +91 -0
- package/dist/middleware/workspaceAccess.js.map +1 -0
- package/dist/policy/CapabilityCheck.d.ts +14 -0
- package/dist/policy/CapabilityCheck.d.ts.map +1 -0
- package/dist/policy/CapabilityCheck.js +2 -0
- package/dist/policy/CapabilityCheck.js.map +1 -0
- package/dist/policy/PermissionRegistry.d.ts +25 -0
- package/dist/policy/PermissionRegistry.d.ts.map +1 -0
- package/dist/policy/PermissionRegistry.js +29 -0
- package/dist/policy/PermissionRegistry.js.map +1 -0
- package/dist/policy/ViewerContext.d.ts +29 -0
- package/dist/policy/ViewerContext.d.ts.map +1 -0
- package/dist/policy/ViewerContext.js +2 -0
- package/dist/policy/ViewerContext.js.map +1 -0
- package/dist/policy/checks.d.ts +15 -0
- package/dist/policy/checks.d.ts.map +1 -0
- package/dist/policy/checks.js +55 -0
- package/dist/policy/checks.js.map +1 -0
- package/dist/policy/defaultRegistry.d.ts +9 -0
- package/dist/policy/defaultRegistry.d.ts.map +1 -0
- package/dist/policy/defaultRegistry.js +15 -0
- package/dist/policy/defaultRegistry.js.map +1 -0
- package/dist/policy/index.d.ts +8 -0
- package/dist/policy/index.d.ts.map +1 -0
- package/dist/policy/index.js +5 -0
- package/dist/policy/index.js.map +1 -0
- package/dist/policy/resolveViewer.d.ts +16 -0
- package/dist/policy/resolveViewer.d.ts.map +1 -0
- package/dist/policy/resolveViewer.js +37 -0
- package/dist/policy/resolveViewer.js.map +1 -0
- package/dist/routes/_shared.d.ts +138 -0
- package/dist/routes/_shared.d.ts.map +1 -0
- package/dist/routes/_shared.js +33 -0
- package/dist/routes/_shared.js.map +1 -0
- package/dist/routes/admin.d.ts +13 -0
- package/dist/routes/admin.d.ts.map +1 -0
- package/dist/routes/admin.js +228 -0
- package/dist/routes/admin.js.map +1 -0
- package/dist/routes/auth.d.ts +35 -0
- package/dist/routes/auth.d.ts.map +1 -0
- package/dist/routes/auth.js +168 -0
- package/dist/routes/auth.js.map +1 -0
- package/dist/routes/batch.d.ts +7 -0
- package/dist/routes/batch.d.ts.map +1 -0
- package/dist/routes/batch.js +47 -0
- package/dist/routes/batch.js.map +1 -0
- 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 +2 -2
- package/dist/routes/edges.d.ts.map +1 -1
- package/dist/routes/edges.js +34 -16
- package/dist/routes/edges.js.map +1 -1
- package/dist/routes/health.d.ts +2 -2
- package/dist/routes/health.d.ts.map +1 -1
- package/dist/routes/health.js +21 -3
- package/dist/routes/health.js.map +1 -1
- package/dist/routes/history.d.ts +7 -0
- package/dist/routes/history.d.ts.map +1 -0
- package/dist/routes/history.js +90 -0
- package/dist/routes/history.js.map +1 -0
- package/dist/routes/model.d.ts +2 -2
- package/dist/routes/model.d.ts.map +1 -1
- package/dist/routes/model.js +20 -4
- package/dist/routes/model.js.map +1 -1
- package/dist/routes/nodes.d.ts +2 -2
- package/dist/routes/nodes.d.ts.map +1 -1
- package/dist/routes/nodes.js +77 -25
- 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/ontology.d.ts +2 -2
- package/dist/routes/ontology.d.ts.map +1 -1
- package/dist/routes/ontology.js +22 -5
- package/dist/routes/ontology.js.map +1 -1
- package/dist/routes/proposals.d.ts +5 -4
- package/dist/routes/proposals.d.ts.map +1 -1
- package/dist/routes/proposals.js +176 -45
- 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 +66 -12
- package/dist/routes/runs.js.map +1 -1
- package/dist/routes/skillInputOptions.d.ts +10 -0
- package/dist/routes/skillInputOptions.d.ts.map +1 -0
- package/dist/routes/skillInputOptions.js +159 -0
- package/dist/routes/skillInputOptions.js.map +1 -0
- package/dist/routes/skills.d.ts +21 -3
- package/dist/routes/skills.d.ts.map +1 -1
- package/dist/routes/skills.js +223 -21
- package/dist/routes/skills.js.map +1 -1
- package/dist/routes/sourceLoaders.d.ts +7 -0
- package/dist/routes/sourceLoaders.d.ts.map +1 -0
- package/dist/routes/sourceLoaders.js +30 -0
- package/dist/routes/sourceLoaders.js.map +1 -0
- 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 +7 -0
- package/dist/routes/users.d.ts.map +1 -0
- package/dist/routes/users.js +109 -0
- package/dist/routes/users.js.map +1 -0
- 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 +11 -0
- package/dist/routes/workspaceMembers.d.ts.map +1 -0
- package/dist/routes/workspaceMembers.js +81 -0
- package/dist/routes/workspaceMembers.js.map +1 -0
- package/dist/routes/workspaces.d.ts +30 -1
- package/dist/routes/workspaces.d.ts.map +1 -1
- package/dist/routes/workspaces.js +207 -63
- package/dist/routes/workspaces.js.map +1 -1
- package/dist/server.js +9 -29
- 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 +49 -32
- package/LICENSE +0 -21
- package/dist/composeFs.d.ts +0 -20
- package/dist/composeFs.d.ts.map +0 -1
- package/dist/composeFs.js +0 -134
- package/dist/composeFs.js.map +0 -1
- package/dist/composition.d.ts +0 -49
- package/dist/composition.d.ts.map +0 -1
- package/dist/composition.js +0 -43
- package/dist/composition.js.map +0 -1
- package/dist/infrastructure/agent/ClaudeCodeAgentBinding.d.ts +0 -8
- package/dist/infrastructure/agent/ClaudeCodeAgentBinding.d.ts.map +0 -1
- package/dist/infrastructure/agent/ClaudeCodeAgentBinding.js +0 -62
- package/dist/infrastructure/agent/ClaudeCodeAgentBinding.js.map +0 -1
- 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 -18
- package/dist/infrastructure/agent/mcpConfig.d.ts.map +0 -1
- package/dist/infrastructure/agent/mcpConfig.js +0 -47
- 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/fs/FsClarifyTicketRepository.d.ts +0 -13
- package/dist/infrastructure/fs/FsClarifyTicketRepository.d.ts.map +0 -1
- package/dist/infrastructure/fs/FsClarifyTicketRepository.js +0 -33
- 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/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 +0 -88
- 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/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/WorkspaceRegistryFile.d.ts +0 -17
- package/dist/infrastructure/fs/WorkspaceRegistryFile.d.ts.map +0 -1
- package/dist/infrastructure/fs/WorkspaceRegistryFile.js +0 -58
- 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/jsonFileStore.d.ts.map +0 -1
- package/dist/infrastructure/fs/jsonFileStore.js.map +0 -1
- package/dist/infrastructure/fs/paths.d.ts +0 -22
- package/dist/infrastructure/fs/paths.d.ts.map +0 -1
- package/dist/infrastructure/fs/paths.js +0 -46
- 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/orphanReaper.d.ts +0 -18
- package/dist/infrastructure/orphanReaper.d.ts.map +0 -1
- package/dist/infrastructure/orphanReaper.js.map +0 -1
- package/dist/routes/clarify.d.ts +0 -8
- package/dist/routes/clarify.d.ts.map +0 -1
- package/dist/routes/clarify.js +0 -84
- 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 -30
- package/dist/routes/decisions.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/{fs → hitl}/FsProposalRepository.d.ts +0 -0
- /package/dist/infrastructure/{fs → workspace}/FsWorkspaceRepository.d.ts +0 -0
package/README.md
ADDED
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
# @braidhq/server
|
|
2
|
+
|
|
3
|
+
Braid keeps a product's intent and its code aligned in one knowledge graph. `@braidhq/server` is the process that runs it. It wires core's ports to real filesystem, git, and vendor adapters, exposes the graph over HTTP, and drives the agents that fill it.
|
|
4
|
+
|
|
5
|
+
## Role
|
|
6
|
+
|
|
7
|
+
Server is the composition root and the presentation layer. It turns the framework into a running application.
|
|
8
|
+
|
|
9
|
+
- **The Wiring**: The composition root that binds core's ports to concrete adapters, the one place infrastructure is instantiated.
|
|
10
|
+
- **The Adapters**: Filesystem and git implementations of core's repositories and history, plus the subprocess runner that executes skills.
|
|
11
|
+
- **The API**: A REST and SSE surface built on Hono, one router per resource, with authentication, workspace scoping, and an OpenAPI 3 spec at `GET /openapi.json`.
|
|
12
|
+
|
|
13
|
+
## Positioning: framework kernel and worldview preset
|
|
14
|
+
|
|
15
|
+
Braid is worldview-agnostic. The intent-graph engine, workspaces, proposals, HITL review, the reactor, and the authorization policy, knows nothing about software. A worldview supplies the rest: an ontology plus the storage, source loaders, and agent that serve it. The software worldview, a DDD ontology whose sources split into `intent` and `code`, is the default, not a built-in.
|
|
16
|
+
|
|
17
|
+
Two layers share this package for now.
|
|
18
|
+
|
|
19
|
+
- **Kernel**: `composeApp`, routes, middleware, policy, auth mode, and the generic filesystem infrastructure. Worldview-agnostic. `composeApp` registers no plugin, a caller hands it a `PluginRegistry`. Nothing here imports a concrete ontology, storage, loader, or agent.
|
|
20
|
+
- **Coding preset**: `composeFsApp` assembles the default bundle, Kuzu storage, the DDD ontology, the git, github, and drive loaders, and the claude-code agent, over filesystem persistence. Its default identities live as `DEFAULT_*` constants at the head of the file.
|
|
21
|
+
|
|
22
|
+
A future app, a story world or a research-notes base, reuses the kernel and swaps the preset for its own ontology and adapters. When that second worldview arrives, the coding preset extracts into its own package, `@braidhq/preset-code`, and this package drops its plugin dependencies. Until a second worldview exists that pressure is speculative, so both layers stay here at no cost. The seam is `composeApp`: whatever the kernel reaches without a concrete plugin already belongs to it.
|
|
23
|
+
|
|
24
|
+
## Structure
|
|
25
|
+
|
|
26
|
+
The package layers outward from core. Infrastructure implements core's ports, routes expose them, and composition binds the two.
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
src/
|
|
30
|
+
├── server.ts process entry, serves the app
|
|
31
|
+
├── app.ts builds the Hono app, mounts middleware and routes
|
|
32
|
+
├── composeApp.ts the worldview-agnostic kernel root
|
|
33
|
+
├── composeFsApp.ts the coding preset, filesystem and vendor adapters
|
|
34
|
+
├── startup.ts blocking per-workspace boot steps
|
|
35
|
+
├── authMode.ts AuthMode strategy, localTrust and authenticated
|
|
36
|
+
├── routes/ one router per resource
|
|
37
|
+
├── middleware/ auth, cors, error mapping, workspace scoping
|
|
38
|
+
├── policy/ authorization rules
|
|
39
|
+
└── infrastructure/ adapters behind core ports, one folder per domain concern
|
|
40
|
+
├── hitl/ proposal and clarification stores
|
|
41
|
+
├── workspace/ workspace repository, registry, discovery, PRODUCT.md writer
|
|
42
|
+
├── skill/ skill registry, run store, subprocess runner and its event stream
|
|
43
|
+
├── source/ source unit observations, digests, intent listing
|
|
44
|
+
├── model/ graph serializer
|
|
45
|
+
├── reactor/ reactor cycle store
|
|
46
|
+
├── batch/ batch plan store
|
|
47
|
+
├── history/ GitWorkspaceHistory, commit messages
|
|
48
|
+
├── users/, auth/, secrets/, oauth/ host services, no core port
|
|
49
|
+
└── _shared/ cross-cutting fs plumbing, paths, json store, frontmatter
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
- **composeApp / composeFsApp**: The kernel root and the coding preset. `composeApp` takes a deps object, registers no plugin, and defaults every unset port to an in-memory adapter. `composeFsApp` builds the filesystem, git, and vendor adapters, registers the default plugin bundle, then hands the result to `composeApp`. Production runs the latter. See Positioning above.
|
|
53
|
+
- **startup**: The two boot passes, `startupBeforeServe` and `startupAfterServe`. See Startup below for the full order.
|
|
54
|
+
- **infrastructure**: The real adapters behind core's ports, grouped by domain concern to mirror `core/domain`, never by storage technology. Each folder owns one aggregate's adapter, so a future SQLite or Postgres store lands beside the filesystem one instead of in a separate `sql/` tree. `hitl/` persists proposals and clarifications, `workspace/` the graph and workspace files, `history/` records every change as a git commit, `skill/` runs a skill as a subprocess and streams its events back. `_shared/` holds the cross-cutting fs plumbing, its underscore marking it as the one folder that is not a domain concern, matching `routes/_shared.ts`. `users/ auth/ secrets/ oauth/` are host services with no core port.
|
|
55
|
+
- **routes**: One `createXxxRouter(deps)` per resource, each taking only the services it needs. Bodies validate through zod, path ids parse through their branded schema.
|
|
56
|
+
- **middleware**: The cross-cutting edge. Auth resolves the user, workspace middleware scopes and authorizes the request, and the error middleware maps `BraidError` subclasses to problem+json status codes.
|
|
57
|
+
|
|
58
|
+
## Startup
|
|
59
|
+
|
|
60
|
+
The blocking phase runs inside `composeFsApp` before the server accepts a request, in two groups.
|
|
61
|
+
|
|
62
|
+
Provision host identity, who may use this server:
|
|
63
|
+
|
|
64
|
+
1. `authMode.provision` seeds what the deployment's mode needs. Local trust seeds the `local-user` fallback account, authenticated mode syncs the login allowlist to the user roster. See Auth Mode below.
|
|
65
|
+
|
|
66
|
+
Reconcile workspaces, register then boot each:
|
|
67
|
+
|
|
68
|
+
2. `discoverCanonicalWorkspaces` registers workspaces present on disk but absent from the registry.
|
|
69
|
+
3. `ensureWorkspaceOwners` gives any ownerless workspace the auth mode's default principal, or throws under authenticated mode where every workspace must have an explicit owner.
|
|
70
|
+
4. `startupBeforeServe` runs the per-workspace pass. Per workspace it provisions the git repo and store, recovers a batch left running by a killed process, subscribes the reactor when the workspace opts in, and fires a catch-up sync for each loader-backed source.
|
|
71
|
+
|
|
72
|
+
After `serve()`, the background phase runs cosmetic recovery that need not finish first, via `startupAfterServe`:
|
|
73
|
+
|
|
74
|
+
5. `reapOrphanRuns` marks runs left without a completion, from a killed process, as aborted so the UI does not show them active forever.
|
|
75
|
+
|
|
76
|
+
Both passes live in `startup.ts`, `startupBeforeServe` before `serve()` and `startupAfterServe` after. A new blocking per-workspace step is added to `startupBeforeServe`, a new background step to `startupAfterServe`. Provisioning tied to one adapter stays next to that adapter's construction. Source loaders take part without a bespoke step, the sync in step 4 fires for any registered loader.
|
|
77
|
+
|
|
78
|
+
## Auth Mode
|
|
79
|
+
|
|
80
|
+
One axis separates a trusted local install from an authenticated remote server, who the implicit user is. Rather than scatter that decision, an `AuthMode` strategy carries it, and the auth and ownership code reads the strategy, never a hardcoded `local-user`.
|
|
81
|
+
|
|
82
|
+
```mermaid
|
|
83
|
+
classDiagram
|
|
84
|
+
class AuthMode {
|
|
85
|
+
<<interface>>
|
|
86
|
+
+defaultPrincipal: UserId | null
|
|
87
|
+
+requiresAuth: boolean
|
|
88
|
+
+provision(context) Promise
|
|
89
|
+
}
|
|
90
|
+
class localTrust {
|
|
91
|
+
<<const>>
|
|
92
|
+
defaultPrincipal = local-user
|
|
93
|
+
requiresAuth = false
|
|
94
|
+
provision() seeds local-user
|
|
95
|
+
}
|
|
96
|
+
class authenticated {
|
|
97
|
+
<<const>>
|
|
98
|
+
defaultPrincipal = null
|
|
99
|
+
requiresAuth = true
|
|
100
|
+
provision() syncs allowlist
|
|
101
|
+
}
|
|
102
|
+
AuthMode <|.. localTrust
|
|
103
|
+
AuthMode <|.. authenticated
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Two consumers read the strategy, neither a hardcoded account. `authMiddleware` resolves the caller, applying the Bearer gate under `requiresAuth` and falling back to `defaultPrincipal` when one is present. `ensureWorkspaceOwners` gives an ownerless workspace the principal, or throws when there is none.
|
|
107
|
+
|
|
108
|
+
`composeFsApp` picks the mode from `BRAID_LOCAL_TRUST`, local trust by default. Adding a mode, a service account or an SSO-only deployment, is a new `AuthMode`, with no change to the middleware, the ownership code, or boot.
|
|
109
|
+
|
|
110
|
+
## Authorization
|
|
111
|
+
|
|
112
|
+
Every gated action is a capability. The server is the authoritative check, and Studio mirrors the same list to grey out affordances it cannot use. The authoritative logic is `packages/server/src/policy/checks.ts`, the matrix below is a readable mirror of it.
|
|
113
|
+
|
|
114
|
+
### Where the decision happens
|
|
115
|
+
|
|
116
|
+
A request's permission is decided in three steps, all under `policy/`.
|
|
117
|
+
|
|
118
|
+
1. `resolveViewer(user, member)` builds a `ViewerContext` once per request, the caller's `effectiveRole` in this workspace. It is the sole place a server admin short-circuits to an `owner` role.
|
|
119
|
+
2. `workspaceAccessMiddleware` runs `resolveViewer`, stamps the viewer on the request, and rejects an outright outsider. `requirePermission(cap)` and the server-scope `requireServerCapability(cap)` are the route gates that read it.
|
|
120
|
+
3. `PermissionRegistry.can(capability, viewer)` finds the capability's check and evaluates it against the viewer. An unregistered capability denies by default.
|
|
121
|
+
|
|
122
|
+
Each capability owns one pure check in `checks.ts`, a stateless const object. Plugins register their own checks on the same registry, so adding a capability never edits an existing one.
|
|
123
|
+
|
|
124
|
+
### Capability matrix
|
|
125
|
+
|
|
126
|
+
Workspace roles resolve from membership. `admin` is the server role, which short-circuits to an `owner` effectiveRole in any workspace, so an admin holds every workspace capability below.
|
|
127
|
+
|
|
128
|
+
| Capability | owner | maintainer | member | Notes |
|
|
129
|
+
|---|:--:|:--:|:--:|---|
|
|
130
|
+
| `server.admin` | n/a | n/a | n/a | Server role `admin` only. Gates `/admin`, read from the server role, not `effectiveRole`, since a workspace owner also resolves to `owner`. |
|
|
131
|
+
| `workspace.create` | n/a | n/a | n/a | Server scope, resolved with no member, so only a server admin passes. |
|
|
132
|
+
| `workspace.read` | yes | yes | yes | Any member. |
|
|
133
|
+
| `workspace.write` | yes | | | Owner only. |
|
|
134
|
+
| `proposal.read` | yes | yes | | Owner or maintainer. |
|
|
135
|
+
| `proposal.write` | yes | yes | | Owner or maintainer. |
|
|
136
|
+
| `clarification.read` | yes | yes | | Owner or maintainer. |
|
|
137
|
+
| `clarification.write` | yes | yes | | Owner or maintainer. |
|
|
138
|
+
| `history.write` | yes | | | Owner only. |
|
|
139
|
+
| `skill.run` | yes | maybe | maybe | Owner always. Otherwise the skill's `allowedRoles`, overridden per member by `skillOverrides`. |
|
|
140
|
+
|
|
141
|
+
## Boundaries
|
|
142
|
+
|
|
143
|
+
These are the rules for anyone editing server. They are enforced in review rather than by tooling.
|
|
144
|
+
|
|
145
|
+
- **Composition Only Here**: Infrastructure concretes are instantiated at the composition root, never inside a route or a service.
|
|
146
|
+
- **Routes Stay Thin**: A route validates input, calls one service, and shapes the response. Business rules live in core, not in the handler.
|
|
147
|
+
- **Adapters Implement Ports**: Every fs, git, or agent class satisfies an interface declared in core, so swapping one never touches the framework.
|
|
148
|
+
- **Errors Map at the Edge**: Domain code throws a `BraidError`, and the error middleware is the only place that turns it into an HTTP status.
|
|
149
|
+
- **Scope Through Middleware**: Workspace access is checked once in middleware, not re-derived inside each route.
|
|
150
|
+
|
|
151
|
+
## Dependencies
|
|
152
|
+
|
|
153
|
+
Server sits at the outer edge, above core and the plugin packages the coding preset bundles as defaults.
|
|
154
|
+
|
|
155
|
+
- **Depends On**: `@braidhq/core` and `@braidhq/schema`, `hono` for HTTP, `simple-git` for history, and, only through the coding preset, the default plugin bundle of `storage-kuzu`, `agent-claude-code`, `ontology-ddd`, and `source-loader-*`. The kernel itself needs none of the plugin packages; they leave with the preset when it extracts. See Positioning.
|
|
156
|
+
- **Consumed By**: `cli` and the `desktop` Tauri shell, which run it as their backend.
|
|
157
|
+
|
|
158
|
+
## MCP Gateway
|
|
159
|
+
|
|
160
|
+
Skills run as coding-agent subprocesses and reach this server's REST API as MCP tools, not by curl. An off-the-shelf translator, `openapi-mcp-gateway`, reads `/openapi.json` and re-exposes each operation as a tool named `braid-core`.
|
|
161
|
+
|
|
162
|
+
The gateway is spawned per skill run and torn down with it, so there is no long-lived gateway process, no open port, and no network auth to manage. The transport is an implementation detail of the runner.
|
|
163
|
+
|
|
164
|
+
SSE streams, the OAuth HTML callback, and the workspace-admin routes are deliberately absent from the spec, they are not one-shot MCP tools. The `GET /openapi.json` test in `test/app.test.ts` pins that boundary.
|
package/dist/app.d.ts
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
|
-
import type { AppDependencies } from './
|
|
2
|
-
import {
|
|
1
|
+
import type { AppDependencies } from './composeApp.js';
|
|
2
|
+
import { OpenAPIHono } from '@hono/zod-openapi';
|
|
3
3
|
export interface AppOptions {
|
|
4
4
|
readonly corsOrigins?: readonly string[];
|
|
5
|
+
/**
|
|
6
|
+
* Base URL the OpenAPI spec advertises in its `servers[]` block.
|
|
7
|
+
* Downstream consumers use it to dispatch REST calls,
|
|
8
|
+
* openapi-mcp-gateway, Swagger UI, and code generators among them.
|
|
9
|
+
* When unset, the spec omits `servers[]` and leaves the consumer to guess.
|
|
10
|
+
* `composeFsApp` threads its `apiUrl` here,
|
|
11
|
+
* so the gateway routes calls back without an explicit base-url flag.
|
|
12
|
+
*/
|
|
13
|
+
readonly apiUrl?: string;
|
|
5
14
|
}
|
|
6
|
-
export declare function createApp(deps: AppDependencies, options?: AppOptions):
|
|
15
|
+
export declare function createApp(deps: AppDependencies, options?: AppOptions): OpenAPIHono;
|
|
7
16
|
//# sourceMappingURL=app.d.ts.map
|
package/dist/app.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AA8B/C,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACxC;;;;;;;OAOG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CACzB;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,eAAe,EAAE,OAAO,GAAE,UAAe,GAAG,WAAW,CAqMtF"}
|
package/dist/app.js
CHANGED
|
@@ -1,34 +1,115 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OpenAPIHono } from '@hono/zod-openapi';
|
|
2
|
+
import { authMiddleware } from './middleware/auth.js';
|
|
2
3
|
import { corsMiddleware } from './middleware/cors.js';
|
|
3
4
|
import { errorHandler } from './middleware/error.js';
|
|
5
|
+
import { workspaceAccessMiddleware } from './middleware/workspaceAccess.js';
|
|
4
6
|
import { workspaceIdMiddleware } from './middleware/workspaceId.js';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
+
import { createAdminRouter } from './routes/admin.js';
|
|
8
|
+
import { createAuthRouter } from './routes/auth.js';
|
|
9
|
+
import { createBatchRouter } from './routes/batch.js';
|
|
10
|
+
import { createClarificationRouter } from './routes/clarifications.js';
|
|
7
11
|
import { createEdgesRouter } from './routes/edges.js';
|
|
8
12
|
import { healthRouter } from './routes/health.js';
|
|
13
|
+
import { createHistoryRouter } from './routes/history.js';
|
|
9
14
|
import { createModelRouter } from './routes/model.js';
|
|
10
15
|
import { createNodesRouter } from './routes/nodes.js';
|
|
11
16
|
import { createOAuthRouter } from './routes/oauth.js';
|
|
12
17
|
import { createOntologyRouter } from './routes/ontology.js';
|
|
13
18
|
import { createProposalsRouter } from './routes/proposals.js';
|
|
19
|
+
import { createReactorCyclesRouter } from './routes/reactorCycles.js';
|
|
14
20
|
import { createRunsRouter } from './routes/runs.js';
|
|
21
|
+
import { createSkillInputOptionsRouter } from './routes/skillInputOptions.js';
|
|
15
22
|
import { createSkillsRouter } from './routes/skills.js';
|
|
23
|
+
import { createSourceLoadersRouter } from './routes/sourceLoaders.js';
|
|
24
|
+
import { createSourceUnitObservationsRouter } from './routes/sourceUnitObservations.js';
|
|
25
|
+
import { createGithubWebhookReceiver, createSourceWebhooksAdminRouter } from './routes/sourceWebhooks.js';
|
|
26
|
+
import { createUsersRouter } from './routes/users.js';
|
|
16
27
|
import { createWorkspaceEventsRouter } from './routes/workspaceEvents.js';
|
|
28
|
+
import { createTransferOwnershipRouter, createWorkspaceMembersRouter } from './routes/workspaceMembers.js';
|
|
17
29
|
import { createWorkspacesRouter } from './routes/workspaces.js';
|
|
18
30
|
export function createApp(deps, options = {}) {
|
|
19
|
-
const app = new
|
|
31
|
+
const app = new OpenAPIHono();
|
|
32
|
+
// Global middleware, every request passes these in order.
|
|
20
33
|
app.use('*', options.corsOrigins
|
|
21
34
|
? corsMiddleware({ allowedOrigins: options.corsOrigins })
|
|
22
35
|
: corsMiddleware());
|
|
36
|
+
// Identity and auth gate. Resolves the caller's `userId` from a Bearer session
|
|
37
|
+
// when auth is enforced, else the `X-Braid-User` header or the default principal.
|
|
38
|
+
// Non-public routes that lack a required Bearer token are rejected.
|
|
39
|
+
app.use('*', authMiddleware({
|
|
40
|
+
...(deps.sessionStore ? { sessionStore: deps.sessionStore } : {}),
|
|
41
|
+
requireAuth: deps.authMode.requiresAuth,
|
|
42
|
+
defaultPrincipal: deps.authMode.defaultPrincipal,
|
|
43
|
+
}));
|
|
23
44
|
app.onError(errorHandler);
|
|
45
|
+
// Host-level routes, not scoped to a single workspace.
|
|
24
46
|
app.route('/health', healthRouter);
|
|
47
|
+
if (deps.sessionStore && deps.accessPolicy && deps.userRegistry) {
|
|
48
|
+
app.route('/auth', createAuthRouter({
|
|
49
|
+
clock: deps.clock,
|
|
50
|
+
sessionStore: deps.sessionStore,
|
|
51
|
+
accessPolicy: deps.accessPolicy,
|
|
52
|
+
userRegistry: deps.userRegistry,
|
|
53
|
+
...(deps.googleOAuth ? { googleOAuth: deps.googleOAuth } : {}),
|
|
54
|
+
studioUrl: deps.studioUrl ?? 'http://localhost:5173',
|
|
55
|
+
requiresAuth: deps.authMode.requiresAuth,
|
|
56
|
+
}));
|
|
57
|
+
}
|
|
58
|
+
if (deps.userRegistry) {
|
|
59
|
+
app.route('/users', createUsersRouter({
|
|
60
|
+
userRegistry: deps.userRegistry,
|
|
61
|
+
}));
|
|
62
|
+
}
|
|
63
|
+
if (deps.userRegistry && deps.accessPolicy && deps.workspaceRegistry) {
|
|
64
|
+
app.route('/admin', createAdminRouter({
|
|
65
|
+
userRegistry: deps.userRegistry,
|
|
66
|
+
accessPolicy: deps.accessPolicy,
|
|
67
|
+
workspaceRegistry: deps.workspaceRegistry,
|
|
68
|
+
workspaceService: deps.workspaceService,
|
|
69
|
+
}));
|
|
70
|
+
}
|
|
25
71
|
app.route('/workspaces', createWorkspacesRouter({
|
|
26
72
|
workspaceService: deps.workspaceService,
|
|
27
73
|
sourceLoaderRunner: deps.sourceLoaderRunner,
|
|
74
|
+
workspacesRoot: deps.workspacesRoot,
|
|
75
|
+
pluginRegistry: deps.pluginRegistry,
|
|
76
|
+
...(deps.bootstrap ? { bootstrap: deps.bootstrap } : {}),
|
|
77
|
+
...(deps.workspaceRegistry ? { workspaceRegistry: deps.workspaceRegistry } : {}),
|
|
78
|
+
...(deps.userRegistry ? { userRegistry: deps.userRegistry } : {}),
|
|
79
|
+
...(deps.historyService ? { historyService: deps.historyService } : {}),
|
|
28
80
|
}));
|
|
29
81
|
app.route('/workspaces', createWorkspaceEventsRouter({ eventBus: deps.eventBus }));
|
|
30
|
-
|
|
82
|
+
// Server-level plugin discovery for Studio's loader dropdown,
|
|
83
|
+
// sourced from the active PluginRegistry, not hardcoded strings.
|
|
84
|
+
// Installed loaders are identical across workspaces, not scoped to one.
|
|
85
|
+
app.route('/source-loaders', createSourceLoadersRouter({ pluginRegistry: deps.pluginRegistry }));
|
|
86
|
+
// Public webhook receivers, authenticated by per-source HMAC secrets,
|
|
87
|
+
// inside the handler, not by a Bearer token.
|
|
88
|
+
// The auth middleware exempts the `/webhooks/` prefix.
|
|
89
|
+
// Mounted only when a SecretStore is wired,
|
|
90
|
+
// without one there is nowhere to read the secrets.
|
|
91
|
+
if (deps.secretStore) {
|
|
92
|
+
app.route('/webhooks', createGithubWebhookReceiver({
|
|
93
|
+
workspaceService: deps.workspaceService,
|
|
94
|
+
sourceLoaderRunner: deps.sourceLoaderRunner,
|
|
95
|
+
secretStore: deps.secretStore,
|
|
96
|
+
pluginRegistry: deps.pluginRegistry,
|
|
97
|
+
}));
|
|
98
|
+
}
|
|
99
|
+
// Workspace-scoped sub-app, mounted under `/workspaces/:workspaceId` below.
|
|
100
|
+
const workspaceScoped = new OpenAPIHono();
|
|
31
101
|
workspaceScoped.use('*', workspaceIdMiddleware);
|
|
102
|
+
// Workspace membership gate, present only in composeFsApp,
|
|
103
|
+
// which wires both the workspace registry and the user registry.
|
|
104
|
+
// In-memory tests compose without these and stay open,
|
|
105
|
+
// so existing routes keep behaving.
|
|
106
|
+
if (deps.workspaceRegistry && deps.userRegistry) {
|
|
107
|
+
workspaceScoped.use('*', workspaceAccessMiddleware({
|
|
108
|
+
registry: deps.workspaceRegistry,
|
|
109
|
+
workspaceService: deps.workspaceService,
|
|
110
|
+
userRegistry: deps.userRegistry,
|
|
111
|
+
}));
|
|
112
|
+
}
|
|
32
113
|
workspaceScoped.route('/model', createModelRouter({ modelService: deps.modelService }));
|
|
33
114
|
workspaceScoped.route('/nodes', createNodesRouter({ modelService: deps.modelService }));
|
|
34
115
|
workspaceScoped.route('/edges', createEdgesRouter({ modelService: deps.modelService }));
|
|
@@ -36,13 +117,25 @@ export function createApp(deps, options = {}) {
|
|
|
36
117
|
hitlService: deps.hitlService,
|
|
37
118
|
proposalRepository: deps.proposalRepository,
|
|
38
119
|
modelRepository: deps.modelRepository,
|
|
39
|
-
|
|
120
|
+
modelValidationService: deps.modelValidationService,
|
|
121
|
+
workspaceService: deps.workspaceService,
|
|
40
122
|
}));
|
|
41
|
-
workspaceScoped.route('/
|
|
123
|
+
workspaceScoped.route('/clarifications', createClarificationRouter({
|
|
42
124
|
hitlService: deps.hitlService,
|
|
43
|
-
|
|
125
|
+
clarificationRepository: deps.clarificationRepository,
|
|
126
|
+
}));
|
|
127
|
+
workspaceScoped.route('/source-unit-states', createSourceUnitObservationsRouter({
|
|
128
|
+
sourceUnitObservationService: deps.sourceUnitObservationService,
|
|
129
|
+
...(deps.intentLister && deps.sourceUnitDigest
|
|
130
|
+
? {
|
|
131
|
+
diffSupport: {
|
|
132
|
+
workspaceService: deps.workspaceService,
|
|
133
|
+
intentLister: deps.intentLister,
|
|
134
|
+
digest: deps.sourceUnitDigest,
|
|
135
|
+
},
|
|
136
|
+
}
|
|
137
|
+
: {}),
|
|
44
138
|
}));
|
|
45
|
-
workspaceScoped.route('/decisions', createDecisionsRouter({ decisionRepository: deps.decisionRepository }));
|
|
46
139
|
workspaceScoped.route('/ontology', createOntologyRouter({
|
|
47
140
|
workspaceRepository: deps.workspaceRepository,
|
|
48
141
|
pluginRegistry: deps.pluginRegistry,
|
|
@@ -52,6 +145,9 @@ export function createApp(deps, options = {}) {
|
|
|
52
145
|
skillRegistry: deps.skillRegistry,
|
|
53
146
|
skillRunner: deps.skillRunner,
|
|
54
147
|
workspaceRepository: deps.workspaceRepository,
|
|
148
|
+
sourceUnitObservationService: deps.sourceUnitObservationService,
|
|
149
|
+
runRepository: deps.runRepository,
|
|
150
|
+
pluginRegistry: deps.pluginRegistry,
|
|
55
151
|
}));
|
|
56
152
|
workspaceScoped.route('/runs', createRunsRouter({
|
|
57
153
|
runRepository: deps.runRepository,
|
|
@@ -59,6 +155,41 @@ export function createApp(deps, options = {}) {
|
|
|
59
155
|
workspaceRepository: deps.workspaceRepository,
|
|
60
156
|
}));
|
|
61
157
|
}
|
|
158
|
+
if (deps.historyService) {
|
|
159
|
+
workspaceScoped.route('/history', createHistoryRouter({ historyService: deps.historyService }));
|
|
160
|
+
}
|
|
161
|
+
if (deps.batchService) {
|
|
162
|
+
workspaceScoped.route('/batch', createBatchRouter({ batchService: deps.batchService }));
|
|
163
|
+
}
|
|
164
|
+
workspaceScoped.route('/reactor-cycles', createReactorCyclesRouter({
|
|
165
|
+
reactorCycleRepository: deps.reactorCycleRepository,
|
|
166
|
+
}));
|
|
167
|
+
if (deps.secretStore) {
|
|
168
|
+
workspaceScoped.route('/source-webhooks', createSourceWebhooksAdminRouter({
|
|
169
|
+
workspaceService: deps.workspaceService,
|
|
170
|
+
secretStore: deps.secretStore,
|
|
171
|
+
pluginRegistry: deps.pluginRegistry,
|
|
172
|
+
...(options.apiUrl ? { apiUrl: options.apiUrl } : {}),
|
|
173
|
+
}));
|
|
174
|
+
}
|
|
175
|
+
workspaceScoped.route('/skill-input-options', createSkillInputOptionsRouter({
|
|
176
|
+
modelRepository: deps.modelRepository,
|
|
177
|
+
clarificationRepository: deps.clarificationRepository,
|
|
178
|
+
workspaceRepository: deps.workspaceRepository,
|
|
179
|
+
pluginRegistry: deps.pluginRegistry,
|
|
180
|
+
}));
|
|
181
|
+
if (deps.workspaceRegistry) {
|
|
182
|
+
workspaceScoped.route('/members', createWorkspaceMembersRouter({
|
|
183
|
+
workspaceService: deps.workspaceService,
|
|
184
|
+
registry: deps.workspaceRegistry,
|
|
185
|
+
clock: deps.clock,
|
|
186
|
+
}));
|
|
187
|
+
workspaceScoped.route('/transfer-ownership', createTransferOwnershipRouter({
|
|
188
|
+
workspaceService: deps.workspaceService,
|
|
189
|
+
registry: deps.workspaceRegistry,
|
|
190
|
+
clock: deps.clock,
|
|
191
|
+
}));
|
|
192
|
+
}
|
|
62
193
|
app.route('/workspaces/:workspaceId', workspaceScoped);
|
|
63
194
|
if (deps.secretStore) {
|
|
64
195
|
app.route('/oauth', createOAuthRouter({
|
|
@@ -66,6 +197,20 @@ export function createApp(deps, options = {}) {
|
|
|
66
197
|
...(deps.googleOAuth ? { google: deps.googleOAuth } : {}),
|
|
67
198
|
}));
|
|
68
199
|
}
|
|
200
|
+
// OpenAPI 3 spec, consumed by openapi-mcp-gateway, to surface REST operations as MCP tools.
|
|
201
|
+
// SSE routes and the OAuth HTML callback are intentionally absent,
|
|
202
|
+
// they mount plain Hono sub-routers, so they never register with the doc.
|
|
203
|
+
// The `servers[]` block lets the gateway resolve the upstream base URL,
|
|
204
|
+
// without an explicit --base-url flag.
|
|
205
|
+
app.doc('/openapi.json', {
|
|
206
|
+
openapi: '3.0.0',
|
|
207
|
+
info: {
|
|
208
|
+
title: 'Braid REST API',
|
|
209
|
+
version: '0.0.1',
|
|
210
|
+
description: 'REST surface exposed by @braidhq/server. Each operation also becomes an MCP tool via openapi-mcp-gateway.',
|
|
211
|
+
},
|
|
212
|
+
...(options.apiUrl ? { servers: [{ url: options.apiUrl }] } : {}),
|
|
213
|
+
});
|
|
69
214
|
return app;
|
|
70
215
|
}
|
|
71
216
|
//# sourceMappingURL=app.js.map
|
package/dist/app.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.js","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"app.js","sourceRoot":"","sources":["../src/app.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,EAAE,IAAI,CAAC,iBAAiB;YAChC,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC,CAAC,CAAA;IACL,CAAC;IAED,GAAG,CAAC,KAAK,CAAC,0BAA0B,EAAE,eAAe,CAAC,CAAA;IAEtD,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;QACrB,GAAG,CAAC,KAAK,CAAC,QAAQ,EAAE,iBAAiB,CAAC;YACpC,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC1D,CAAC,CAAC,CAAA;IACL,CAAC;IAED,4FAA4F;IAC5F,mEAAmE;IACnE,0EAA0E;IAC1E,wEAAwE;IACxE,uCAAuC;IACvC,GAAG,CAAC,GAAG,CAAC,eAAe,EAAE;QACvB,OAAO,EAAE,OAAO;QAChB,IAAI,EAAE;YACJ,KAAK,EAAE,gBAAgB;YACvB,OAAO,EAAE,OAAO;YAChB,WAAW,EAAE,2GAA2G;SACzH;QACD,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAClE,CAAC,CAAA;IAEF,OAAO,GAAG,CAAA;AACZ,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { UserId } from '@braidhq/schema';
|
|
2
|
+
import type { AccessPolicy } from './infrastructure/auth/AccessPolicy.js';
|
|
3
|
+
import type { UserRegistryFile } from './infrastructure/users/UserRegistryFile.js';
|
|
4
|
+
export declare const LOCAL_USER_ID: string & import("zod").$brand<"UserId">;
|
|
5
|
+
export interface AuthContext {
|
|
6
|
+
readonly userRegistry: UserRegistryFile;
|
|
7
|
+
readonly accessPolicy: AccessPolicy;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* How a deployment resolves identity.
|
|
11
|
+
* The one axis that separates a trusted local install,
|
|
12
|
+
* from an authenticated remote server.
|
|
13
|
+
*
|
|
14
|
+
* Two separate axes, not one nullable field.
|
|
15
|
+
* `defaultPrincipal` is the identity axis, the implicit user for an
|
|
16
|
+
* unauthenticated request, and the owner a workspace falls back to,
|
|
17
|
+
* or null when there is no implicit user.
|
|
18
|
+
* `requiresAuth` is the policy axis, whether a caller must present a valid
|
|
19
|
+
* Bearer token. The middleware reads this, never the principal's null-ness.
|
|
20
|
+
*
|
|
21
|
+
* Stateless behaviour behind an interface, so a const object per mode,
|
|
22
|
+
* the idiomatic strategy form when there is no constructor dependency.
|
|
23
|
+
*/
|
|
24
|
+
export interface AuthMode {
|
|
25
|
+
readonly defaultPrincipal: UserId | null;
|
|
26
|
+
readonly requiresAuth: boolean;
|
|
27
|
+
provision: (context: AuthContext) => Promise<void>;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* A local desktop or sidecar. One implicit user owns everything,
|
|
31
|
+
* so provision seeds that `local-user` admin account, idempotently.
|
|
32
|
+
*/
|
|
33
|
+
export declare const localTrust: AuthMode;
|
|
34
|
+
/**
|
|
35
|
+
* A remote server. Real users authenticate against an allowlist,
|
|
36
|
+
* so provision back-fills `approvedEmails` from the roster, idempotently.
|
|
37
|
+
*/
|
|
38
|
+
export declare const authenticated: AuthMode;
|
|
39
|
+
//# sourceMappingURL=authMode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authMode.d.ts","sourceRoot":"","sources":["../src/authMode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAa,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAA;AACzE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAA;AAKlF,eAAO,MAAM,aAAa,yCAAmC,CAAA;AAE7D,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,YAAY,EAAE,gBAAgB,CAAA;IACvC,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAA;CACpC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAA;IACxC,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAA;IAE9B,SAAS,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CACnD;AAED;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,QAaxB,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,QAS3B,CAAA"}
|
package/dist/authMode.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { userInfo } from 'node:os';
|
|
2
|
+
import process from 'node:process';
|
|
3
|
+
import { UserId as UserIdSchema } from '@braidhq/schema';
|
|
4
|
+
export const LOCAL_USER_ID = UserIdSchema.parse('local-user');
|
|
5
|
+
/**
|
|
6
|
+
* A local desktop or sidecar. One implicit user owns everything,
|
|
7
|
+
* so provision seeds that `local-user` admin account, idempotently.
|
|
8
|
+
*/
|
|
9
|
+
export const localTrust = {
|
|
10
|
+
defaultPrincipal: LOCAL_USER_ID,
|
|
11
|
+
requiresAuth: false,
|
|
12
|
+
async provision({ userRegistry }) {
|
|
13
|
+
if (await userRegistry.get(LOCAL_USER_ID))
|
|
14
|
+
return;
|
|
15
|
+
await userRegistry.create({
|
|
16
|
+
id: LOCAL_USER_ID,
|
|
17
|
+
displayName: osUsername(),
|
|
18
|
+
serverRole: 'admin',
|
|
19
|
+
createdAt: new Date().toISOString(),
|
|
20
|
+
});
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* A remote server. Real users authenticate against an allowlist,
|
|
25
|
+
* so provision back-fills `approvedEmails` from the roster, idempotently.
|
|
26
|
+
*/
|
|
27
|
+
export const authenticated = {
|
|
28
|
+
defaultPrincipal: null,
|
|
29
|
+
requiresAuth: true,
|
|
30
|
+
async provision({ userRegistry, accessPolicy }) {
|
|
31
|
+
for (const user of await userRegistry.list()) {
|
|
32
|
+
if (user.email)
|
|
33
|
+
await accessPolicy.approveEmail(user.email);
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
// Default display name from the OS account.
|
|
38
|
+
// Some sandboxed environments throw on userInfo(), so fall through.
|
|
39
|
+
function osUsername() {
|
|
40
|
+
try {
|
|
41
|
+
const info = userInfo();
|
|
42
|
+
if (info.username && info.username.length > 0)
|
|
43
|
+
return info.username;
|
|
44
|
+
}
|
|
45
|
+
catch {
|
|
46
|
+
// The userInfo lookup can throw, fall through to the env vars below.
|
|
47
|
+
}
|
|
48
|
+
return process.env.USER ?? process.env.USERNAME ?? 'local';
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=authMode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authMode.js","sourceRoot":"","sources":["../src/authMode.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAClC,OAAO,OAAO,MAAM,cAAc,CAAA;AAClC,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAExD,MAAM,CAAC,MAAM,aAAa,GAAG,YAAY,CAAC,KAAK,CAAC,YAAY,CAAC,CAAA;AA6B7D;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAAa;IAClC,gBAAgB,EAAE,aAAa;IAC/B,YAAY,EAAE,KAAK;IACnB,KAAK,CAAC,SAAS,CAAC,EAAE,YAAY,EAAE;QAC9B,IAAI,MAAM,YAAY,CAAC,GAAG,CAAC,aAAa,CAAC;YACvC,OAAM;QACR,MAAM,YAAY,CAAC,MAAM,CAAC;YACxB,EAAE,EAAE,aAAa;YACjB,WAAW,EAAE,UAAU,EAAE;YACzB,UAAU,EAAE,OAAO;YACnB,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAe;SACjD,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAa;IACrC,gBAAgB,EAAE,IAAI;IACtB,YAAY,EAAE,IAAI;IAClB,KAAK,CAAC,SAAS,CAAC,EAAE,YAAY,EAAE,YAAY,EAAE;QAC5C,KAAK,MAAM,IAAI,IAAI,MAAM,YAAY,CAAC,IAAI,EAAE,EAAE,CAAC;YAC7C,IAAI,IAAI,CAAC,KAAK;gBACZ,MAAM,YAAY,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QAC/C,CAAC;IACH,CAAC;CACF,CAAA;AAED,4CAA4C;AAC5C,oEAAoE;AACpE,SAAS,UAAU;IACjB,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,QAAQ,EAAE,CAAA;QACvB,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC;YAC3C,OAAO,IAAI,CAAC,QAAQ,CAAA;IACxB,CAAC;IACD,MAAM,CAAC;QACL,qEAAqE;IACvE,CAAC;IACD,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,OAAO,CAAA;AAC5D,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { BatchPlanRepository, ClarificationRepository, Clock, IntentLister, ModelRepository, ModelSerializer, ProposalRepository, ReactorCycleRepository, RunRepository, SkillRegistry, SkillRunner, SourceUnitDigest, SourceUnitObservationRepository, UserDirectory, WorkspaceBootstrapService, WorkspaceEventBus, WorkspaceHistory, WorkspaceRepository } from '@braidhq/core';
|
|
2
|
+
import type { AbsolutePath } from '@braidhq/schema';
|
|
3
|
+
import type { AuthMode } from './authMode.js';
|
|
4
|
+
import type { AccessPolicy } from './infrastructure/auth/AccessPolicy.js';
|
|
5
|
+
import type { SessionStore } from './infrastructure/auth/SessionStore.js';
|
|
6
|
+
import type { GoogleOAuth } from './infrastructure/oauth/GoogleOAuth.js';
|
|
7
|
+
import type { SecretStore } from './infrastructure/secrets/SecretStore.js';
|
|
8
|
+
import type { UserRegistryFile } from './infrastructure/users/UserRegistryFile.js';
|
|
9
|
+
import type { WorkspaceRegistryFile } from './infrastructure/workspace/WorkspaceRegistryFile.js';
|
|
10
|
+
import { BatchService, HistoryService, HITLService, ModelService, ModelValidationService, PluginRegistry, ReactorService, SourceLoaderRunner, SourceUnitObservationService, WorkspaceService } from '@braidhq/core';
|
|
11
|
+
/**
|
|
12
|
+
* The assembled application, what routes and middleware consume.
|
|
13
|
+
* A required field is always present.
|
|
14
|
+
* An optional field is a capability slot,
|
|
15
|
+
* absent under in-memory or test wiring, filled by `composeFsApp`.
|
|
16
|
+
*/
|
|
17
|
+
export interface AppDependencies {
|
|
18
|
+
workspaceService: WorkspaceService;
|
|
19
|
+
hitlService: HITLService;
|
|
20
|
+
modelService: ModelService;
|
|
21
|
+
modelValidationService: ModelValidationService;
|
|
22
|
+
sourceLoaderRunner: SourceLoaderRunner;
|
|
23
|
+
sourceUnitObservationService: SourceUnitObservationService;
|
|
24
|
+
historyService?: HistoryService;
|
|
25
|
+
batchService?: BatchService;
|
|
26
|
+
reactorService?: ReactorService;
|
|
27
|
+
modelRepository: ModelRepository;
|
|
28
|
+
workspaceRepository: WorkspaceRepository;
|
|
29
|
+
proposalRepository: ProposalRepository;
|
|
30
|
+
clarificationRepository: ClarificationRepository;
|
|
31
|
+
runRepository: RunRepository;
|
|
32
|
+
reactorCycleRepository: ReactorCycleRepository;
|
|
33
|
+
intentLister?: IntentLister;
|
|
34
|
+
sourceUnitDigest?: SourceUnitDigest;
|
|
35
|
+
skillRegistry: SkillRegistry | undefined;
|
|
36
|
+
skillRunner: SkillRunner | undefined;
|
|
37
|
+
eventBus: WorkspaceEventBus;
|
|
38
|
+
pluginRegistry: PluginRegistry;
|
|
39
|
+
clock: Clock;
|
|
40
|
+
workspacesRoot: AbsolutePath;
|
|
41
|
+
bootstrap?: WorkspaceBootstrapService;
|
|
42
|
+
authMode: AuthMode;
|
|
43
|
+
userRegistry?: UserRegistryFile;
|
|
44
|
+
workspaceRegistry?: WorkspaceRegistryFile;
|
|
45
|
+
sessionStore?: SessionStore;
|
|
46
|
+
accessPolicy?: AccessPolicy;
|
|
47
|
+
secretStore?: SecretStore;
|
|
48
|
+
googleOAuth?: GoogleOAuth;
|
|
49
|
+
studioUrl?: string;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Every field is optional, an unset one falls to an in-memory default.
|
|
53
|
+
* `composeFsApp` passes the fs, git, and vendor adapters through here.
|
|
54
|
+
*/
|
|
55
|
+
export interface ComposeOptions {
|
|
56
|
+
clock?: Clock;
|
|
57
|
+
eventBus?: WorkspaceEventBus;
|
|
58
|
+
pluginRegistry?: PluginRegistry;
|
|
59
|
+
modelRepository?: ModelRepository;
|
|
60
|
+
workspaceRepository?: WorkspaceRepository;
|
|
61
|
+
proposalRepository?: ProposalRepository;
|
|
62
|
+
clarificationRepository?: ClarificationRepository;
|
|
63
|
+
runRepository?: RunRepository;
|
|
64
|
+
reactorCycleRepository?: ReactorCycleRepository;
|
|
65
|
+
sourceUnitObservationRepository?: SourceUnitObservationRepository;
|
|
66
|
+
batchPlanRepository?: BatchPlanRepository;
|
|
67
|
+
intentLister?: IntentLister;
|
|
68
|
+
sourceUnitDigest?: SourceUnitDigest;
|
|
69
|
+
skillRegistry?: SkillRegistry;
|
|
70
|
+
skillRunner?: SkillRunner;
|
|
71
|
+
history?: WorkspaceHistory;
|
|
72
|
+
modelSerializer?: ModelSerializer;
|
|
73
|
+
bootstrap?: WorkspaceBootstrapService;
|
|
74
|
+
userDirectory?: UserDirectory;
|
|
75
|
+
authMode?: AuthMode;
|
|
76
|
+
workspacesRoot?: AbsolutePath;
|
|
77
|
+
}
|
|
78
|
+
export declare function composeApp(options?: ComposeOptions): AppDependencies;
|
|
79
|
+
//# sourceMappingURL=composeApp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composeApp.d.ts","sourceRoot":"","sources":["../src/composeApp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,uBAAuB,EACvB,KAAK,EACL,YAAY,EACZ,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACtB,aAAa,EACb,aAAa,EACb,WAAW,EACX,gBAAgB,EAChB,+BAA+B,EAC/B,aAAa,EACb,yBAAyB,EACzB,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,eAAe,CAAA;AACtB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAC7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAA;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAA;AACzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAA;AACxE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAA;AAC1E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAA;AAClF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qDAAqD,CAAA;AAGhG,OAAO,EACL,YAAY,EAEZ,cAAc,EACd,WAAW,EACX,YAAY,EACZ,sBAAsB,EACtB,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,4BAA4B,EAI5B,gBAAgB,EACjB,MAAM,eAAe,CAAA;AAatB;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAE9B,gBAAgB,EAAE,gBAAgB,CAAA;IAClC,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,YAAY,CAAA;I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