@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
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { tmpdir } from 'node:os';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { BatchService, createLogger, HistoryService, HITLService, ModelService, ModelValidationService, PluginRegistry, ReactorService, SourceLoaderRunner, SourceUnitObservationService, SystemClock, SystemScheduler, WorkspaceLock, WorkspaceService, } from '@braidhq/core';
|
|
4
|
+
import { InMemoryClarificationRepository, InMemoryModelRepository, InMemoryProposalRepository, InMemoryReactorCycleRepository, InMemorySourceUnitObservationRepository, InMemoryWorkspaceEventBus, InMemoryWorkspaceRepository, NoopRunRepository, } from '@braidhq/core/in-memory';
|
|
5
|
+
import { localTrust } from './authMode.js';
|
|
6
|
+
export function composeApp(options = {}) {
|
|
7
|
+
const clock = options.clock ?? new SystemClock();
|
|
8
|
+
const proposalRepository = options.proposalRepository ?? new InMemoryProposalRepository();
|
|
9
|
+
const clarificationRepository = options.clarificationRepository ?? new InMemoryClarificationRepository();
|
|
10
|
+
const modelRepository = options.modelRepository ?? new InMemoryModelRepository();
|
|
11
|
+
const workspaceRepository = options.workspaceRepository ?? new InMemoryWorkspaceRepository();
|
|
12
|
+
const pluginRegistry = options.pluginRegistry ?? new PluginRegistry();
|
|
13
|
+
const eventBus = options.eventBus ?? new InMemoryWorkspaceEventBus();
|
|
14
|
+
const workspaceService = new WorkspaceService({ workspaceRepository, pluginRegistry });
|
|
15
|
+
const modelService = new ModelService({ modelRepository });
|
|
16
|
+
const modelValidationService = new ModelValidationService({ pluginRegistry });
|
|
17
|
+
const sourceLoaderRunner = new SourceLoaderRunner({ pluginRegistry, clock, eventBus });
|
|
18
|
+
// Shared lock domain so HITL mutations and history restore exclude each other.
|
|
19
|
+
const workspaceLock = new WorkspaceLock();
|
|
20
|
+
const hitlService = new HITLService({
|
|
21
|
+
proposalRepository,
|
|
22
|
+
clarificationRepository,
|
|
23
|
+
modelRepository,
|
|
24
|
+
modelValidationService,
|
|
25
|
+
workspaceService,
|
|
26
|
+
clock,
|
|
27
|
+
eventBus,
|
|
28
|
+
workspaceLock,
|
|
29
|
+
...(options.history ? { history: options.history } : {}),
|
|
30
|
+
...(options.modelSerializer ? { modelSerializer: options.modelSerializer } : {}),
|
|
31
|
+
...(options.userDirectory ? { userDirectory: options.userDirectory } : {}),
|
|
32
|
+
});
|
|
33
|
+
const historyService = options.history && options.bootstrap
|
|
34
|
+
? new HistoryService({
|
|
35
|
+
history: options.history,
|
|
36
|
+
workspaceService,
|
|
37
|
+
workspaceLock,
|
|
38
|
+
bootstrap: options.bootstrap,
|
|
39
|
+
runRepository: options.runRepository ?? new NoopRunRepository(),
|
|
40
|
+
...(options.skillRunner ? { skillRunner: options.skillRunner } : {}),
|
|
41
|
+
...(options.userDirectory ? { userDirectory: options.userDirectory } : {}),
|
|
42
|
+
eventBus,
|
|
43
|
+
clock,
|
|
44
|
+
})
|
|
45
|
+
: undefined;
|
|
46
|
+
const sourceUnitObservationRepository = options.sourceUnitObservationRepository ?? new InMemorySourceUnitObservationRepository();
|
|
47
|
+
const sourceUnitDigest = options.sourceUnitDigest ?? new FailingSourceUnitDigest();
|
|
48
|
+
const sourceUnitObservationService = new SourceUnitObservationService({
|
|
49
|
+
repository: sourceUnitObservationRepository,
|
|
50
|
+
digest: sourceUnitDigest,
|
|
51
|
+
workspaceService,
|
|
52
|
+
clock,
|
|
53
|
+
});
|
|
54
|
+
// Batch needs SkillRunner, HistoryService, BatchPlanRepository, and a lister.
|
|
55
|
+
// Without them there is no batch surface.
|
|
56
|
+
const batchService = historyService && options.skillRunner && options.batchPlanRepository && options.intentLister
|
|
57
|
+
? new BatchService({
|
|
58
|
+
workspaceService,
|
|
59
|
+
skillRunner: options.skillRunner,
|
|
60
|
+
proposalRepository,
|
|
61
|
+
clarificationRepository,
|
|
62
|
+
historyService,
|
|
63
|
+
hitlService,
|
|
64
|
+
batchPlanRepository: options.batchPlanRepository,
|
|
65
|
+
intentLister: options.intentLister,
|
|
66
|
+
pluginRegistry,
|
|
67
|
+
eventBus,
|
|
68
|
+
workspaceLock,
|
|
69
|
+
clock,
|
|
70
|
+
sourceUnitObservationService,
|
|
71
|
+
})
|
|
72
|
+
: undefined;
|
|
73
|
+
// Reactor shares Batch's dependency footprint of skillRunner, intentLister,
|
|
74
|
+
// and sourceUnitObservationService, plus the event bus.
|
|
75
|
+
// We construct it whenever those are present.
|
|
76
|
+
// The service stays inert until something calls `start(workspaceId)`.
|
|
77
|
+
// `composeFsApp` drives start on workspaces,
|
|
78
|
+
// whose ProductManifest.reactor.enabled is true.
|
|
79
|
+
const reactorCycleRepository = options.reactorCycleRepository ?? new InMemoryReactorCycleRepository();
|
|
80
|
+
const reactorService = options.skillRunner && options.intentLister && sourceUnitDigest && !(sourceUnitDigest instanceof FailingSourceUnitDigest)
|
|
81
|
+
? new ReactorService({
|
|
82
|
+
eventBus,
|
|
83
|
+
workspaceService,
|
|
84
|
+
pluginRegistry,
|
|
85
|
+
skillRunner: options.skillRunner,
|
|
86
|
+
sourceUnitObservationService,
|
|
87
|
+
intentLister: options.intentLister,
|
|
88
|
+
digest: sourceUnitDigest,
|
|
89
|
+
reactorCycleRepository,
|
|
90
|
+
workspaceLock,
|
|
91
|
+
clock,
|
|
92
|
+
logger: createLogger('reactor'),
|
|
93
|
+
scheduler: new SystemScheduler(),
|
|
94
|
+
})
|
|
95
|
+
: undefined;
|
|
96
|
+
return {
|
|
97
|
+
workspaceService,
|
|
98
|
+
hitlService,
|
|
99
|
+
...(historyService ? { historyService } : {}),
|
|
100
|
+
...(batchService ? { batchService } : {}),
|
|
101
|
+
...(reactorService ? { reactorService } : {}),
|
|
102
|
+
reactorCycleRepository,
|
|
103
|
+
...(options.intentLister ? { intentLister: options.intentLister } : {}),
|
|
104
|
+
...(options.sourceUnitDigest ? { sourceUnitDigest: options.sourceUnitDigest } : {}),
|
|
105
|
+
...(options.bootstrap ? { bootstrap: options.bootstrap } : {}),
|
|
106
|
+
sourceUnitObservationService,
|
|
107
|
+
modelService,
|
|
108
|
+
modelValidationService,
|
|
109
|
+
sourceLoaderRunner,
|
|
110
|
+
eventBus,
|
|
111
|
+
pluginRegistry,
|
|
112
|
+
proposalRepository,
|
|
113
|
+
clarificationRepository,
|
|
114
|
+
modelRepository,
|
|
115
|
+
workspaceRepository,
|
|
116
|
+
skillRegistry: options.skillRegistry,
|
|
117
|
+
skillRunner: options.skillRunner,
|
|
118
|
+
runRepository: options.runRepository ?? new NoopRunRepository(),
|
|
119
|
+
workspacesRoot: options.workspacesRoot ?? join(tmpdir(), 'braid-workspaces'),
|
|
120
|
+
// `composeApp` is the test and in-memory composition entry.
|
|
121
|
+
// It defaults to local trust, the local-user fallback,
|
|
122
|
+
// so a test that wires a sessionStore still resolves a caller.
|
|
123
|
+
authMode: options.authMode ?? localTrust,
|
|
124
|
+
clock,
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
// Default `SourceUnitDigest` for in-memory `composeApp()` callers. Any call throws.
|
|
128
|
+
// Production must wire a real impl via `composeFsApp` or pass one explicitly.
|
|
129
|
+
// Tests that don't exercise observations stay happy,
|
|
130
|
+
// because the digest is never reached.
|
|
131
|
+
class FailingSourceUnitDigest {
|
|
132
|
+
async computeSha() {
|
|
133
|
+
throw new Error('SourceUnitDigest is not wired. Pass `sourceUnitDigest` to composeApp() (composeFsApp does this automatically).');
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
//# sourceMappingURL=composeApp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composeApp.js","sourceRoot":"","sources":["../src/composeApp.ts"],"names":[],"mappings":"AA4BA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,WAAW,EACX,YAAY,EACZ,sBAAsB,EACtB,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,4BAA4B,EAC5B,WAAW,EACX,eAAe,EACf,aAAa,EACb,gBAAgB,GACjB,MAAM,eAAe,CAAA;AACtB,OAAO,EACL,+BAA+B,EAC/B,uBAAuB,EACvB,0BAA0B,EAC1B,8BAA8B,EAC9B,uCAAuC,EACvC,yBAAyB,EACzB,2BAA2B,EAC3B,iBAAiB,GAClB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAyH1C,MAAM,UAAU,UAAU,CAAC,UAA0B,EAAE;IACrD,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,IAAI,WAAW,EAAE,CAAA;IAChD,MAAM,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,IAAI,IAAI,0BAA0B,EAAE,CAAA;IACzF,MAAM,uBAAuB,GAAG,OAAO,CAAC,uBAAuB,IAAI,IAAI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,EAAE,CAAC;QACvE,GAAG,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACnF,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC9D,4BAA4B;QAC5B,YAAY;QACZ,sBAAsB;QACtB,kBAAkB;QAClB,QAAQ;QACR,cAAc;QACd,kBAAkB;QAClB,uBAAuB;QACvB,eAAe;QACf,mBAAmB;QACnB,aAAa,EAAE,OAAO,CAAC,aAAa;QACpC,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,aAAa,EAAE,OAAO,CAAC,aAAa,IAAI,IAAI,iBAAiB,EAAE;QAC/D,cAAc,EAAE,OAAO,CAAC,cAAc,IAAK,IAAI,CAAC,MAAM,EAAE,EAAE,kBAAkB,CAAkB;QAC9F,4DAA4D;QAC5D,uDAAuD;QACvD,+DAA+D;QAC/D,QAAQ,EAAE,OAAO,CAAC,QAAQ,IAAI,UAAU;QACxC,KAAK;KACN,CAAA;AACH,CAAC;AAED,oFAAoF;AACpF,8EAA8E;AAC9E,qDAAqD;AACrD,uCAAuC;AACvC,MAAM,uBAAuB;IAC3B,KAAK,CAAC,UAAU;QACd,MAAM,IAAI,KAAK,CACb,gHAAgH,CACjH,CAAA;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { AgentPlugin, OntologyPlugin, SourceLoaderPlugin, StoragePlugin } from '@braidhq/core';
|
|
2
|
+
import type { AgentEffort, StorageKind } from '@braidhq/schema';
|
|
3
|
+
import type { AppDependencies } from './composeApp.js';
|
|
4
|
+
import { AgentKind } from '@braidhq/schema';
|
|
5
|
+
export interface ComposeFsOptions {
|
|
6
|
+
readonly braidHome?: string;
|
|
7
|
+
readonly apiUrl?: string;
|
|
8
|
+
readonly storageKind?: StorageKind;
|
|
9
|
+
readonly agentKind?: AgentKind;
|
|
10
|
+
readonly agentModel?: string;
|
|
11
|
+
readonly agentEffort?: AgentEffort;
|
|
12
|
+
readonly extraStoragePlugins?: readonly StoragePlugin[];
|
|
13
|
+
readonly extraOntologyPlugins?: readonly OntologyPlugin[];
|
|
14
|
+
readonly extraSourceLoaderPlugins?: readonly SourceLoaderPlugin[];
|
|
15
|
+
readonly extraAgentPlugins?: readonly AgentPlugin[];
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Opinionated production composition, the coding preset.
|
|
19
|
+
* Filesystem-persists workspaces, proposals, and clarifications,
|
|
20
|
+
* and bundles Kuzu storage, the DDD ontology, the git, github, and drive
|
|
21
|
+
* loaders, and the claude-code agent.
|
|
22
|
+
*
|
|
23
|
+
* To run a different plugin set, either pass `extraXxxPlugins` and flip
|
|
24
|
+
* `storageKind` or `agentKind`, or call `composeApp` with your own registry.
|
|
25
|
+
*/
|
|
26
|
+
export declare function composeFsApp(options?: ComposeFsOptions): Promise<AppDependencies>;
|
|
27
|
+
//# sourceMappingURL=composeFsApp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composeFsApp.d.ts","sourceRoot":"","sources":["../src/composeFsApp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AACnG,OAAO,KAAK,EAAwC,WAAW,EAAE,WAAW,EAAe,MAAM,iBAAiB,CAAA;AAClH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAgBtD,OAAO,EAAW,SAAS,EAAoC,MAAM,iBAAiB,CAAA;AAwCtF,MAAM,WAAW,gBAAgB;IAI/B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IAIxB,QAAQ,CAAC,WAAW,CAAC,EAAE,WAAW,CAAA;IAClC,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAA;IAC9B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,WAAW,CAAC,EAAE,WAAW,CAAA;IAKlC,QAAQ,CAAC,mBAAmB,CAAC,EAAE,SAAS,aAAa,EAAE,CAAA;IACvD,QAAQ,CAAC,oBAAoB,CAAC,EAAE,SAAS,cAAc,EAAE,CAAA;IACzD,QAAQ,CAAC,wBAAwB,CAAC,EAAE,SAAS,kBAAkB,EAAE,CAAA;IACjE,QAAQ,CAAC,iBAAiB,CAAC,EAAE,SAAS,WAAW,EAAE,CAAA;CACpD;AAED;;;;;;;;GAQG;AACH,wBAAsB,YAAY,CAAC,OAAO,GAAE,gBAAqB,GAAG,OAAO,CAAC,eAAe,CAAC,CA8Q3F"}
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
import { spawn } from 'node:child_process';
|
|
2
|
+
import { homedir } from 'node:os';
|
|
3
|
+
import { join } from 'node:path';
|
|
4
|
+
import process from 'node:process';
|
|
5
|
+
import { fileURLToPath } from 'node:url';
|
|
6
|
+
import { claudeCodeAgentPlugin } from '@braidhq/agent-claude-code';
|
|
7
|
+
import { builtinSkillsRoot, NotFoundError, PluginRegistry, ValidationError, WorkspaceBootstrapService, } from '@braidhq/core';
|
|
8
|
+
import { InMemoryWorkspaceEventBus } from '@braidhq/core/in-memory';
|
|
9
|
+
import { dddOntology } from '@braidhq/ontology-ddd';
|
|
10
|
+
import { AgentId, AgentKind, StorageKind as StorageKindSchema } from '@braidhq/schema';
|
|
11
|
+
import { createGoogleDriveLoader } from '@braidhq/source-loader-gdrive';
|
|
12
|
+
import { gitLoader } from '@braidhq/source-loader-git';
|
|
13
|
+
import { createGithubLoader } from '@braidhq/source-loader-github';
|
|
14
|
+
import { kuzuStoragePlugin } from '@braidhq/storage-kuzu';
|
|
15
|
+
import { authenticated, localTrust } from './authMode.js';
|
|
16
|
+
import { composeApp } from './composeApp.js';
|
|
17
|
+
import { parseBoolEnv } from './infrastructure/_shared/env.js';
|
|
18
|
+
import { AccessPolicy } from './infrastructure/auth/AccessPolicy.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';
|
|
25
|
+
import { GoogleOAuth } from './infrastructure/oauth/GoogleOAuth.js';
|
|
26
|
+
import { FsReactorCycleRepository } from './infrastructure/reactor/FsReactorCycleRepository.js';
|
|
27
|
+
import { FsSecretStore } from './infrastructure/secrets/SecretStore.js';
|
|
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';
|
|
34
|
+
import { ensureWorkspaceOwners } from './infrastructure/users/ensureWorkspaceOwners.js';
|
|
35
|
+
import { UserDirectoryFromRegistry } from './infrastructure/users/UserDirectoryFromRegistry.js';
|
|
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';
|
|
48
|
+
/**
|
|
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.
|
|
53
|
+
*
|
|
54
|
+
* To run a different plugin set, either pass `extraXxxPlugins` and flip
|
|
55
|
+
* `storageKind` or `agentKind`, or call `composeApp` with your own registry.
|
|
56
|
+
*/
|
|
57
|
+
export async function composeFsApp(options = {}) {
|
|
58
|
+
const braidHome = options.braidHome ?? process.env.BRAID_HOME ?? join(homedir(), '.braid');
|
|
59
|
+
const apiUrl = options.apiUrl ?? 'http://localhost:4321';
|
|
60
|
+
const secretStore = new FsSecretStore(join(braidHome, 'secrets'));
|
|
61
|
+
const googleClientId = process.env.BRAID_GOOGLE_CLIENT_ID;
|
|
62
|
+
const googleClientSecret = process.env.BRAID_GOOGLE_CLIENT_SECRET;
|
|
63
|
+
const googleRedirect = process.env.BRAID_GOOGLE_REDIRECT_URI ?? `${apiUrl}/oauth/google/callback`;
|
|
64
|
+
const googleLoginRedirect = process.env.BRAID_GOOGLE_LOGIN_REDIRECT_URI ?? `${apiUrl}/auth/google/callback`;
|
|
65
|
+
const googleOAuth = googleClientId && googleClientSecret
|
|
66
|
+
? new GoogleOAuth({
|
|
67
|
+
clientId: googleClientId,
|
|
68
|
+
clientSecret: googleClientSecret,
|
|
69
|
+
redirectUri: googleRedirect,
|
|
70
|
+
loginRedirectUri: googleLoginRedirect,
|
|
71
|
+
})
|
|
72
|
+
: undefined;
|
|
73
|
+
const registry = new WorkspaceRegistryFile(join(braidHome, 'workspaces.json'));
|
|
74
|
+
const workspaceRepository = new FsWorkspaceRepository({ registry });
|
|
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.
|
|
77
|
+
const userRegistry = new UserRegistryFile(join(braidHome, 'users.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
|
+
const accessPolicyConfig = {};
|
|
85
|
+
const allowedDomains = parseCsv(process.env.BRAID_ALLOWED_DOMAINS);
|
|
86
|
+
if (allowedDomains)
|
|
87
|
+
accessPolicyConfig.allowedDomains = allowedDomains;
|
|
88
|
+
const allowedEmails = parseCsv(process.env.BRAID_ALLOWED_EMAILS);
|
|
89
|
+
if (allowedEmails)
|
|
90
|
+
accessPolicyConfig.allowedEmails = allowedEmails;
|
|
91
|
+
const adminEmails = parseCsv(process.env.BRAID_ADMIN_EMAILS);
|
|
92
|
+
if (adminEmails)
|
|
93
|
+
accessPolicyConfig.adminEmails = adminEmails;
|
|
94
|
+
const accessPolicy = new AccessPolicy(join(braidHome, 'access.json'), accessPolicyConfig);
|
|
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 });
|
|
104
|
+
const studioUrl = process.env.BRAID_STUDIO_URL ?? 'http://localhost:5173';
|
|
105
|
+
const workspaceRoots = async () => {
|
|
106
|
+
const workspaces = await workspaceRepository.list();
|
|
107
|
+
return new Map(workspaces.map(ws => [ws.id, ws.rootPath]));
|
|
108
|
+
};
|
|
109
|
+
const proposalRepository = new FsProposalRepository({ workspaceRoots });
|
|
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.
|
|
114
|
+
const pluginRegistry = new PluginRegistry();
|
|
115
|
+
pluginRegistry.register(kuzuStoragePlugin);
|
|
116
|
+
for (const plugin of options.extraStoragePlugins ?? [])
|
|
117
|
+
pluginRegistry.register(plugin);
|
|
118
|
+
pluginRegistry.register(dddOntology);
|
|
119
|
+
for (const plugin of options.extraOntologyPlugins ?? [])
|
|
120
|
+
pluginRegistry.register(plugin);
|
|
121
|
+
pluginRegistry.register(gitLoader);
|
|
122
|
+
pluginRegistry.register(createGithubLoader());
|
|
123
|
+
for (const plugin of options.extraSourceLoaderPlugins ?? [])
|
|
124
|
+
pluginRegistry.register(plugin);
|
|
125
|
+
pluginRegistry.register(claudeCodeAgentPlugin);
|
|
126
|
+
for (const plugin of options.extraAgentPlugins ?? [])
|
|
127
|
+
pluginRegistry.register(plugin);
|
|
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.
|
|
133
|
+
const oauth = googleOAuth;
|
|
134
|
+
pluginRegistry.register(createGoogleDriveLoader({
|
|
135
|
+
resolveAccessToken: async ({ workspaceId, sourceId }) => {
|
|
136
|
+
if (!oauth) {
|
|
137
|
+
throw new ValidationError(`Google Drive source "${sourceId}" cannot be loaded: set BRAID_GOOGLE_CLIENT_ID and BRAID_GOOGLE_CLIENT_SECRET on the server, restart, then re-sync.`);
|
|
138
|
+
}
|
|
139
|
+
const key = `${workspaceId}--${sourceId}`;
|
|
140
|
+
const stored = await secretStore.read('oauth-google', key);
|
|
141
|
+
if (!stored) {
|
|
142
|
+
throw new NotFoundError(`Google Drive source "${sourceId}" on workspace "${workspaceId}" is not connected. `
|
|
143
|
+
+ `Authorise via POST /oauth/google/start.`);
|
|
144
|
+
}
|
|
145
|
+
// 60-second skew, so we don't hand out a token about to expire mid-request.
|
|
146
|
+
const stillValidUntil = new Date(stored.expiresAt).getTime() - 60_000;
|
|
147
|
+
if (Date.now() < stillValidUntil)
|
|
148
|
+
return stored.accessToken;
|
|
149
|
+
const refreshed = await oauth.refreshAccessToken(stored.refreshToken);
|
|
150
|
+
await secretStore.write('oauth-google', key, {
|
|
151
|
+
...stored,
|
|
152
|
+
accessToken: refreshed.accessToken,
|
|
153
|
+
expiresAt: refreshed.expiresAt,
|
|
154
|
+
});
|
|
155
|
+
return refreshed.accessToken;
|
|
156
|
+
},
|
|
157
|
+
}));
|
|
158
|
+
// Resolve the active storage plugin and ask it for a ModelRepository.
|
|
159
|
+
const storageKind = StorageKindSchema.parse(options.storageKind ?? process.env.BRAID_STORAGE_KIND ?? DEFAULT_STORAGE_KIND);
|
|
160
|
+
const modelRepository = await pluginRegistry.requireStoragePlugin(storageKind).createModelRepository({ kind: storageKind, config: {} }, {
|
|
161
|
+
workspaceRootPath: braidHome,
|
|
162
|
+
logger: { info: () => { }, warn: () => { }, error: () => { } },
|
|
163
|
+
resolveWorkspaceRoot: async (workspaceId) => {
|
|
164
|
+
const roots = await workspaceRoots();
|
|
165
|
+
const root = roots.get(workspaceId);
|
|
166
|
+
if (!root)
|
|
167
|
+
throw new NotFoundError(`Workspace "${workspaceId}" not registered`);
|
|
168
|
+
return root;
|
|
169
|
+
},
|
|
170
|
+
});
|
|
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),
|
|
177
|
+
kind: agentKind,
|
|
178
|
+
model: options.agentModel ?? DEFAULT_AGENT_MODEL,
|
|
179
|
+
effort: options.agentEffort ?? DEFAULT_AGENT_EFFORT,
|
|
180
|
+
extraArgs: [],
|
|
181
|
+
env: {},
|
|
182
|
+
};
|
|
183
|
+
const runRepository = new FsRunRepository();
|
|
184
|
+
// Built after pluginRegistry is populated,
|
|
185
|
+
// so plugin-shipped SKILL.md files mount under the `plugin` origin,
|
|
186
|
+
// alongside builtins.
|
|
187
|
+
const skillRegistry = new FsSkillRegistry({
|
|
188
|
+
builtinSkillsRoot: builtinSkillsRoot,
|
|
189
|
+
pluginRegistry,
|
|
190
|
+
});
|
|
191
|
+
const eventBus = new InMemoryWorkspaceEventBus();
|
|
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,
|
|
198
|
+
// via SkillManifest.readinessIssuesFor, with a clear pointer.
|
|
199
|
+
const uvxBin = await detectUvx();
|
|
200
|
+
if (!uvxBin) {
|
|
201
|
+
console.warn('[braid] `uv` not found on PATH; the built-in braid-core MCP gateway will not be available. '
|
|
202
|
+
+ 'Install via `brew install uv` or https://docs.astral.sh/uv/ to enable.');
|
|
203
|
+
}
|
|
204
|
+
// Build the list of reference dirs symlinked into every skill session:
|
|
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.
|
|
211
|
+
const pluginReferenceDirs = pluginRegistry.pluginReferenceDirs().map((ref) => {
|
|
212
|
+
const dir = typeof ref.directory === 'string' ? ref.directory : fileURLToPath(ref.directory);
|
|
213
|
+
return { name: ref.name, path: dir };
|
|
214
|
+
});
|
|
215
|
+
const skillRunner = new SubprocessSkillRunner({
|
|
216
|
+
skillRegistry,
|
|
217
|
+
buildAgentBinding: descriptor => pluginRegistry.requireAgentPlugin(descriptor.kind).createBinding(descriptor),
|
|
218
|
+
defaultAgent,
|
|
219
|
+
apiUrl,
|
|
220
|
+
runRepository,
|
|
221
|
+
eventBus,
|
|
222
|
+
...(uvxBin
|
|
223
|
+
? { coreGateway: { specUrl: `${apiUrl}/openapi.json`, uvxBin } }
|
|
224
|
+
: {}),
|
|
225
|
+
referenceDirs: [
|
|
226
|
+
{ name: 'shared', path: join(builtinSkillsRoot, 'shared') },
|
|
227
|
+
...pluginReferenceDirs,
|
|
228
|
+
],
|
|
229
|
+
});
|
|
230
|
+
// Shared by WorkspaceBootstrapService (boot reconciliation),
|
|
231
|
+
// and HITLService (per-mutation commits).
|
|
232
|
+
const history = new GitWorkspaceHistory();
|
|
233
|
+
const modelSerializer = new FsModelSerializer();
|
|
234
|
+
const bootstrap = new WorkspaceBootstrapService({
|
|
235
|
+
history,
|
|
236
|
+
serializer: modelSerializer,
|
|
237
|
+
modelRepository,
|
|
238
|
+
});
|
|
239
|
+
const workspacesRoot = join(braidHome, 'workspaces');
|
|
240
|
+
const userDirectory = new UserDirectoryFromRegistry(userRegistry);
|
|
241
|
+
const deps = composeApp({
|
|
242
|
+
workspaceRepository,
|
|
243
|
+
proposalRepository,
|
|
244
|
+
clarificationRepository,
|
|
245
|
+
modelRepository,
|
|
246
|
+
skillRegistry,
|
|
247
|
+
skillRunner,
|
|
248
|
+
runRepository,
|
|
249
|
+
pluginRegistry,
|
|
250
|
+
eventBus,
|
|
251
|
+
workspacesRoot,
|
|
252
|
+
history,
|
|
253
|
+
modelSerializer,
|
|
254
|
+
bootstrap,
|
|
255
|
+
batchPlanRepository: new FsBatchPlanRepository(),
|
|
256
|
+
intentLister: listIntentItems,
|
|
257
|
+
sourceUnitObservationRepository: new FsSourceUnitObservationRepository({ workspaceRoots }),
|
|
258
|
+
reactorCycleRepository: new FsReactorCycleRepository({ workspaceRoots }),
|
|
259
|
+
sourceUnitDigest: new FsSourceUnitDigest(),
|
|
260
|
+
userDirectory,
|
|
261
|
+
authMode,
|
|
262
|
+
});
|
|
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.
|
|
267
|
+
await discoverCanonicalWorkspaces(workspacesRoot, deps.workspaceService);
|
|
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);
|
|
275
|
+
return {
|
|
276
|
+
...deps,
|
|
277
|
+
bootstrap,
|
|
278
|
+
secretStore,
|
|
279
|
+
userRegistry,
|
|
280
|
+
workspaceRegistry: registry,
|
|
281
|
+
sessionStore,
|
|
282
|
+
accessPolicy,
|
|
283
|
+
studioUrl,
|
|
284
|
+
...(googleOAuth ? { googleOAuth } : {}),
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
function parseCsv(input) {
|
|
288
|
+
if (!input)
|
|
289
|
+
return undefined;
|
|
290
|
+
const parts = input.split(',').map(s => s.trim()).filter(s => s.length > 0);
|
|
291
|
+
return parts.length > 0 ? parts : undefined;
|
|
292
|
+
}
|
|
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.
|
|
300
|
+
async function detectUvx() {
|
|
301
|
+
const pinned = process.env.BRAID_UVX_BIN;
|
|
302
|
+
const command = pinned && pinned.length > 0 ? pinned : 'uvx';
|
|
303
|
+
return await new Promise((resolve) => {
|
|
304
|
+
const child = spawn(command, ['--version'], { stdio: 'ignore' });
|
|
305
|
+
child.once('error', () => resolve(undefined));
|
|
306
|
+
child.once('exit', code => resolve(code === 0 ? command : undefined));
|
|
307
|
+
});
|
|
308
|
+
}
|
|
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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|
@@ -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.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"}
|
|
@@ -0,0 +1,19 @@
|
|
|
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 function parseBoolEnv(value, defaultValue) {
|
|
10
|
+
if (value === undefined)
|
|
11
|
+
return defaultValue;
|
|
12
|
+
const lower = value.trim().toLowerCase();
|
|
13
|
+
if (lower === 'true' || lower === '1' || lower === 'yes' || lower === 'on')
|
|
14
|
+
return true;
|
|
15
|
+
if (lower === 'false' || lower === '0' || lower === 'no' || lower === 'off')
|
|
16
|
+
return false;
|
|
17
|
+
return defaultValue;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=env.js.map
|
|
@@ -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,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E,CAAC;YAClD,MAAM,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,GAAG,aAAa,CAAC,MAAM,CAAC,CAAA;QACvD,CAAC;QACD,OAAO,MAAM,CAAA;IACf,CAAC;IACD,OAAO,KAAK,CAAA;AACd,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
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,OAA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