@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/dist/routes/nodes.js
CHANGED
|
@@ -1,46 +1,98 @@
|
|
|
1
|
-
import { NodeId, NodeStatus, NodeTypeId } from '@braidhq/schema';
|
|
2
|
-
import {
|
|
3
|
-
import { Hono } from 'hono';
|
|
4
|
-
import { z } from 'zod';
|
|
1
|
+
import { GraphNode, ModelSnapshot, NodeId, NodeStatus, NodeTypeId } from '@braidhq/schema';
|
|
2
|
+
import { createRoute, OpenAPIHono, z } from '@hono/zod-openapi';
|
|
5
3
|
import { getWorkspaceId } from '../middleware/workspaceId.js';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
offset: z.coerce.number().int().nonnegative().optional(),
|
|
4
|
+
import { NotFoundResponse, ValidationFailureResponse, WorkspaceIdParam } from './_shared.js';
|
|
5
|
+
const ListQuery = z.object({
|
|
6
|
+
type: z.union([NodeTypeId, z.array(NodeTypeId)]).optional().openapi({ description: 'Filter by node type id. Pass one or many.' }),
|
|
7
|
+
status: z.union([NodeStatus, z.array(NodeStatus)]).optional().openapi({ description: 'Filter by node status. Pass one or many.' }),
|
|
8
|
+
q: z.string().optional().openapi({ description: 'Case-insensitive substring match against node name.' }),
|
|
12
9
|
});
|
|
13
|
-
const
|
|
14
|
-
|
|
10
|
+
const NodeIdParam = WorkspaceIdParam.extend({
|
|
11
|
+
nodeId: NodeId.openapi({ param: { name: 'nodeId', in: 'path' } }),
|
|
12
|
+
});
|
|
13
|
+
const ScopeQuery = z.object({
|
|
14
|
+
depth: z.coerce.number().int().positive().default(2).openapi({ description: 'How many hops to traverse from the seed node.' }),
|
|
15
|
+
});
|
|
16
|
+
const NodeListResponse = z.object({
|
|
17
|
+
items: z.array(GraphNode),
|
|
18
|
+
}).openapi('NodeListResponse');
|
|
19
|
+
const listNodesRoute = createRoute({
|
|
20
|
+
method: 'get',
|
|
21
|
+
path: '/',
|
|
22
|
+
operationId: 'listNodes',
|
|
23
|
+
summary: 'Search graph nodes by type, status, name substring.',
|
|
24
|
+
tags: ['nodes'],
|
|
25
|
+
request: {
|
|
26
|
+
params: WorkspaceIdParam,
|
|
27
|
+
query: ListQuery,
|
|
28
|
+
},
|
|
29
|
+
responses: {
|
|
30
|
+
200: {
|
|
31
|
+
description: 'A page of matching nodes.',
|
|
32
|
+
content: { 'application/json': { schema: NodeListResponse } },
|
|
33
|
+
},
|
|
34
|
+
400: ValidationFailureResponse,
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
const getNodeRoute = createRoute({
|
|
38
|
+
method: 'get',
|
|
39
|
+
path: '/{nodeId}',
|
|
40
|
+
operationId: 'getNode',
|
|
41
|
+
summary: 'Fetch a single node by id.',
|
|
42
|
+
tags: ['nodes'],
|
|
43
|
+
request: { params: NodeIdParam },
|
|
44
|
+
responses: {
|
|
45
|
+
200: {
|
|
46
|
+
description: 'The requested node.',
|
|
47
|
+
content: { 'application/json': { schema: GraphNode } },
|
|
48
|
+
},
|
|
49
|
+
404: NotFoundResponse,
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
const scopeRoute = createRoute({
|
|
53
|
+
method: 'get',
|
|
54
|
+
path: '/{nodeId}/scope',
|
|
55
|
+
operationId: 'getNodeScope',
|
|
56
|
+
summary: 'Return the subgraph reachable from a node within a depth budget.',
|
|
57
|
+
tags: ['nodes'],
|
|
58
|
+
request: {
|
|
59
|
+
params: NodeIdParam,
|
|
60
|
+
query: ScopeQuery,
|
|
61
|
+
},
|
|
62
|
+
responses: {
|
|
63
|
+
200: {
|
|
64
|
+
description: 'A scoped subgraph (nodes + edges) around the seed node.',
|
|
65
|
+
content: { 'application/json': { schema: ModelSnapshot } },
|
|
66
|
+
},
|
|
67
|
+
404: NotFoundResponse,
|
|
68
|
+
},
|
|
15
69
|
});
|
|
16
70
|
export function createNodesRouter(deps) {
|
|
17
|
-
const router = new
|
|
18
|
-
router.
|
|
71
|
+
const router = new OpenAPIHono();
|
|
72
|
+
router.openapi(listNodesRoute, async (context) => {
|
|
19
73
|
const workspaceId = getWorkspaceId(context);
|
|
20
|
-
const { type, status, q
|
|
74
|
+
const { type, status, q } = context.req.valid('query');
|
|
21
75
|
const types = type === undefined ? undefined : Array.isArray(type) ? type : [type];
|
|
22
76
|
const statuses = status === undefined ? undefined : Array.isArray(status) ? status : [status];
|
|
23
|
-
const nodes = await deps.modelService.
|
|
77
|
+
const nodes = await deps.modelService.listNodes(workspaceId, {
|
|
24
78
|
types,
|
|
25
79
|
statuses,
|
|
26
80
|
nameContains: q,
|
|
27
|
-
limit,
|
|
28
|
-
offset,
|
|
29
81
|
});
|
|
30
|
-
return context.json({ items: nodes });
|
|
82
|
+
return context.json({ items: nodes }, 200);
|
|
31
83
|
});
|
|
32
|
-
router.
|
|
84
|
+
router.openapi(getNodeRoute, async (context) => {
|
|
33
85
|
const workspaceId = getWorkspaceId(context);
|
|
34
|
-
const nodeId =
|
|
86
|
+
const { nodeId } = context.req.valid('param');
|
|
35
87
|
const node = await deps.modelService.getNode(workspaceId, nodeId);
|
|
36
|
-
return context.json(node);
|
|
88
|
+
return context.json(node, 200);
|
|
37
89
|
});
|
|
38
|
-
router.
|
|
90
|
+
router.openapi(scopeRoute, async (context) => {
|
|
39
91
|
const workspaceId = getWorkspaceId(context);
|
|
40
|
-
const nodeId =
|
|
92
|
+
const { nodeId } = context.req.valid('param');
|
|
41
93
|
const { depth } = context.req.valid('query');
|
|
42
94
|
const snapshot = await deps.modelService.scopeOf(workspaceId, nodeId, depth);
|
|
43
|
-
return context.json(snapshot);
|
|
95
|
+
return context.json(snapshot, 200);
|
|
44
96
|
});
|
|
45
97
|
return router;
|
|
46
98
|
}
|
package/dist/routes/nodes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nodes.js","sourceRoot":"","sources":["../../src/routes/nodes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"nodes.js","sourceRoot":"","sources":["../../src/routes/nodes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC1F,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAA;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAE5F,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,CAAC;IACzB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,C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E,KAAK,EAAE,OAAO,EAAE,EAAE;QAC3C,MAAM,WAAW,GAAG,cAAc,CAAC,OAAO,CAAC,CAAA;QAC3C,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;QAC7C,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;QAC5C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,CAAC,CAAA;QAC5E,OAAO,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAA;IACpC,CAAC,CAAC,CAAA;IAEF,OAAO,MAAM,CAAA;AACf,CAAC"}
|
package/dist/routes/oauth.d.ts
CHANGED
|
@@ -7,14 +7,13 @@ export interface OAuthRouterDeps {
|
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
9
|
* OAuth routes for source-loader providers that need user consent.
|
|
10
|
+
* `POST /oauth/google/start` returns an authorizationUrl.
|
|
11
|
+
* `GET /oauth/google/callback` returns an HTML page that closes the popup.
|
|
10
12
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* (single browser round-trip); a server restart cancels in-flight flows,
|
|
16
|
-
* which is acceptable for a local desktop / single-user install. SaaS
|
|
17
|
-
* deployments should swap the in-memory `pending` map for a shared store.
|
|
13
|
+
* Pending state is kept in process memory. The flow is short-lived,
|
|
14
|
+
* a single browser round-trip, and a server restart cancels it,
|
|
15
|
+
* acceptable for a local desktop or single-user install.
|
|
16
|
+
* SaaS deployments should swap `pending` for a shared store.
|
|
18
17
|
*/
|
|
19
18
|
export declare function createOAuthRouter(deps: OAuthRouterDeps): Hono;
|
|
20
19
|
//# sourceMappingURL=oauth.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../../src/routes/oauth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAY,MAAM,wCAAwC,CAAA;AACnF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAA;AAE3E,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAW3B,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAA;IACjC,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAA;CAC9B;AASD
|
|
1
|
+
{"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../../src/routes/oauth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAY,MAAM,wCAAwC,CAAA;AACnF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAA;AAE3E,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAW3B,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAA;IACjC,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAA;CAC9B;AASD;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,eAAe,GAAG,IAAI,CAqD7D"}
|
package/dist/routes/oauth.js
CHANGED
|
@@ -9,14 +9,13 @@ const StartBodySchema = z.object({
|
|
|
9
9
|
});
|
|
10
10
|
/**
|
|
11
11
|
* OAuth routes for source-loader providers that need user consent.
|
|
12
|
+
* `POST /oauth/google/start` returns an authorizationUrl.
|
|
13
|
+
* `GET /oauth/google/callback` returns an HTML page that closes the popup.
|
|
12
14
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* (single browser round-trip); a server restart cancels in-flight flows,
|
|
18
|
-
* which is acceptable for a local desktop / single-user install. SaaS
|
|
19
|
-
* deployments should swap the in-memory `pending` map for a shared store.
|
|
15
|
+
* Pending state is kept in process memory. The flow is short-lived,
|
|
16
|
+
* a single browser round-trip, and a server restart cancels it,
|
|
17
|
+
* acceptable for a local desktop or single-user install.
|
|
18
|
+
* SaaS deployments should swap `pending` for a shared store.
|
|
20
19
|
*/
|
|
21
20
|
export function createOAuthRouter(deps) {
|
|
22
21
|
const router = new Hono();
|
package/dist/routes/oauth.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauth.js","sourceRoot":"","sources":["../../src/routes/oauth.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAA;AAE7F,MAAM,oBAAoB,GAAG,gDAAgD,CAAA;AAE7E,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/B,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC9B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC5B,CAAC,CAAA;AAcF
|
|
1
|
+
{"version":3,"file":"oauth.js","sourceRoot":"","sources":["../../src/routes/oauth.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAA;AAE7F,MAAM,oBAAoB,GAAG,gDAAgD,CAAA;AAE7E,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/B,WAAW,EAAE,C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AK,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAA;IAC7C,OAAO;;;;;qDAK4C,MAAM;;;;;QAKnD,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,sBAAsB;OACtE,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC;;;0FAG0D,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;;;eAGjG,CAAA;AACf,CAAC;AAED,SAAS,UAAU,CAAC,CAAS;IAC3B,OAAO,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,CAAE,CAAC,CAAA;AACrH,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { PluginRegistry, WorkspaceRepository } from '@braidhq/core';
|
|
2
|
-
import {
|
|
2
|
+
import { OpenAPIHono } from '@hono/zod-openapi';
|
|
3
3
|
export interface OntologyRouterDeps {
|
|
4
4
|
workspaceRepository: WorkspaceRepository;
|
|
5
5
|
pluginRegistry: PluginRegistry;
|
|
6
6
|
}
|
|
7
|
-
export declare function createOntologyRouter(deps: OntologyRouterDeps):
|
|
7
|
+
export declare function createOntologyRouter(deps: OntologyRouterDeps): OpenAPIHono;
|
|
8
8
|
//# sourceMappingURL=ontology.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ontology.d.ts","sourceRoot":"","sources":["../../src/routes/ontology.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"ontology.d.ts","sourceRoot":"","sources":["../../src/routes/ontology.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AAGxE,OAAO,EAAe,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAI5D,MAAM,WAAW,kBAAkB;IACjC,mBAAmB,EAAE,mBAAmB,CAAA;IACxC,cAAc,EAAE,cAAc,CAAA;CAC/B;AAkBD,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,kBAAkB,GAAG,WAAW,CAkB1E"}
|
package/dist/routes/ontology.js
CHANGED
|
@@ -1,20 +1,37 @@
|
|
|
1
1
|
import { NotFoundError } from '@braidhq/core';
|
|
2
|
-
import {
|
|
2
|
+
import { OntologyResponse } from '@braidhq/schema';
|
|
3
|
+
import { createRoute, OpenAPIHono } from '@hono/zod-openapi';
|
|
3
4
|
import { getWorkspaceId } from '../middleware/workspaceId.js';
|
|
5
|
+
import { NotFoundResponse, WorkspaceIdParam } from './_shared.js';
|
|
6
|
+
const getOntologyRoute = createRoute({
|
|
7
|
+
method: 'get',
|
|
8
|
+
path: '/',
|
|
9
|
+
operationId: 'getOntology',
|
|
10
|
+
summary: 'Return the active ontology (node types + edge types) for a workspace.',
|
|
11
|
+
tags: ['ontology'],
|
|
12
|
+
request: { params: WorkspaceIdParam },
|
|
13
|
+
responses: {
|
|
14
|
+
200: {
|
|
15
|
+
description: 'The active ontology for the workspace.',
|
|
16
|
+
content: { 'application/json': { schema: OntologyResponse } },
|
|
17
|
+
},
|
|
18
|
+
404: NotFoundResponse,
|
|
19
|
+
},
|
|
20
|
+
});
|
|
4
21
|
export function createOntologyRouter(deps) {
|
|
5
|
-
const router = new
|
|
6
|
-
router.
|
|
22
|
+
const router = new OpenAPIHono();
|
|
23
|
+
router.openapi(getOntologyRoute, async (context) => {
|
|
7
24
|
const workspaceId = getWorkspaceId(context);
|
|
8
25
|
const workspaces = await deps.workspaceRepository.list();
|
|
9
26
|
const workspace = workspaces.find(ws => ws.id === workspaceId);
|
|
10
27
|
if (!workspace)
|
|
11
28
|
throw new NotFoundError(`Workspace "${workspaceId}" not registered`);
|
|
12
29
|
const ontology = deps.pluginRegistry.requireOntology(workspace.productManifest.ontologyId);
|
|
13
|
-
return context.json({
|
|
30
|
+
return context.json(OntologyResponse.parse({
|
|
14
31
|
ontologyId: ontology.ontologyId,
|
|
15
32
|
nodeTypes: ontology.nodeTypes,
|
|
16
33
|
edgeTypes: ontology.edgeTypes,
|
|
17
|
-
});
|
|
34
|
+
}), 200);
|
|
18
35
|
});
|
|
19
36
|
return router;
|
|
20
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ontology.js","sourceRoot":"","sources":["../../src/routes/ontology.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAC7C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"ontology.js","sourceRoot":"","sources":["../../src/routes/ontology.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAOjE,MAAM,gBAAgB,GAAG,WAAW,CAAC;IACnC,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,GAAG;IACT,WAAW,EAAE,aAAa;IAC1B,OAAO,EAAE,uEAAuE;IAChF,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,OAAO,EAAE,EAAE,MAAM,EAAE,gBAAgB,EAAE;IACrC,SAAS,EAAE;QACT,GAAG,EAAE;YACH,WAAW,EAAE,wCAAwC;YACrD,OAAO,EAAE,EAAE,kBAAkB,EAAE,EAAE,MAAM,EAAE,gBAAgB,EAAE,EAAE;SAC9D;QACD,GAAG,EAAE,gBAAgB;KACtB;CACF,CAAC,CAAA;AAEF,MAAM,UAAU,oBAAoB,CAAC,IAAwB;IAC3D,MAAM,MAAM,GAAG,IAAI,WAAW,EAAE,CAAA;IAEhC,MAAM,CAAC,OAAO,CAAC,gBAAgB,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;QACjD,MAAM,WAAW,GAAG,cAAc,CAAC,OAAO,CAAC,CAAA;QAC3C,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,IAAI,EAAE,CAAA;QACxD,MAAM,SAAS,GAAG,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,WAAW,CAAC,CAAA;QAC9D,IAAI,CAAC,SAAS;YACZ,MAAM,IAAI,aAAa,CAAC,cAAc,WAAW,kBAAkB,CAAC,CAAA;QACtE,MAAM,QAAQ,GAAG,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,SAAS,CAAC,eAAe,CAAC,UAAU,CAAC,CAAA;QAC1F,OAAO,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC;YACzC,UAAU,EAAE,QAAQ,CAAC,UAAU;YAC/B,SAAS,EAAE,QAAQ,CAAC,SAAS;YAC7B,SAAS,EAAE,QAAQ,CAAC,SAAS;SAC9B,CAAC,EAAE,GAAG,CAAC,CAAA;IACV,CAAC,CAAC,CAAA;IAEF,OAAO,MAAM,CAAA;AACf,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import type { HITLService, ModelRepository, ProposalRepository,
|
|
2
|
-
import {
|
|
1
|
+
import type { HITLService, ModelRepository, ModelValidationService, ProposalRepository, WorkspaceService } from '@braidhq/core';
|
|
2
|
+
import { OpenAPIHono } from '@hono/zod-openapi';
|
|
3
3
|
export interface ProposalsRouterDeps {
|
|
4
4
|
hitlService: HITLService;
|
|
5
5
|
proposalRepository: ProposalRepository;
|
|
6
6
|
modelRepository: ModelRepository;
|
|
7
|
-
|
|
7
|
+
modelValidationService: ModelValidationService;
|
|
8
|
+
workspaceService: WorkspaceService;
|
|
8
9
|
}
|
|
9
|
-
export declare function createProposalsRouter(deps: ProposalsRouterDeps):
|
|
10
|
+
export declare function createProposalsRouter(deps: ProposalsRouterDeps): OpenAPIHono;
|
|
10
11
|
//# sourceMappingURL=proposals.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proposals.d.ts","sourceRoot":"","sources":["../../src/routes/proposals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,kBAAkB,EAAE,
|
|
1
|
+
{"version":3,"file":"proposals.d.ts","sourceRoot":"","sources":["../../src/routes/proposals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAE/H,OAAO,EAAe,WAAW,EAAK,MAAM,mBAAmB,CAAA;AA2C/D,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,WAAW,CAAA;IACxB,kBAAkB,EAAE,kBAAkB,CAAA;IACtC,eAAe,EAAE,eAAe,CAAA;IAChC,sBAAsB,EAAE,sBAAsB,CAAA;IAC9C,gBAAgB,EAAE,gBAAgB,CAAA;CACnC;AA8GD,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,mBAAmB,GAAG,WAAW,CA6E5E"}
|
package/dist/routes/proposals.js
CHANGED
|
@@ -1,79 +1,210 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { Proposal, ProposalCreate, ProposalId, ProposalStatus, UserId, ValidationResult } from '@braidhq/schema';
|
|
2
|
+
import { createRoute, OpenAPIHono, z } from '@hono/zod-openapi';
|
|
3
|
+
import { getUserId } from '../middleware/auth.js';
|
|
4
|
+
import { getViewerContext, requirePermission } from '../middleware/workspaceAccess.js';
|
|
5
5
|
import { getWorkspaceId } from '../middleware/workspaceId.js';
|
|
6
|
+
import { NotFoundResponse, ValidationFailureResponse, WorkspaceIdParam } from './_shared.js';
|
|
6
7
|
import { assertEntityInWorkspace } from './helpers.js';
|
|
7
|
-
const
|
|
8
|
-
status: z.union([ProposalStatus, z.array(ProposalStatus)]).optional(),
|
|
8
|
+
const ListQuery = z.object({
|
|
9
|
+
status: z.union([ProposalStatus, z.array(ProposalStatus)]).optional().openapi({ description: 'Filter by proposal status. Pass one or many.' }),
|
|
9
10
|
limit: z.coerce.number().int().positive().optional(),
|
|
10
11
|
offset: z.coerce.number().int().nonnegative().optional(),
|
|
12
|
+
showAll: z.coerce.boolean().optional().openapi({ description: 'Owner-only: bypass the personal-pending filter so every member\'s drafts are visible.' }),
|
|
11
13
|
});
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
// Body `userId` is a back-compat shim.
|
|
15
|
+
// It serves API consumers still on neither the `X-Braid-User` header,
|
|
16
|
+
// nor the Bearer-token flow.
|
|
17
|
+
// When present it overrides the middleware-derived id.
|
|
18
|
+
// When omitted the handler falls back to `getUserId(c)`.
|
|
19
|
+
// Studio sends it via header only.
|
|
20
|
+
// The path will be removed once the deprecation window closes.
|
|
21
|
+
const ApplyBody = z.object({
|
|
22
|
+
userId: UserId.optional(),
|
|
23
|
+
}).openapi('ProposalApplyBody');
|
|
24
|
+
const RejectBody = z.object({
|
|
16
25
|
reason: z.string().min(1),
|
|
17
|
-
userId: UserId,
|
|
26
|
+
userId: UserId.optional(),
|
|
27
|
+
}).openapi('ProposalRejectBody');
|
|
28
|
+
// Skill-facing create. Body must carry `workspaceId` matching the route param.
|
|
29
|
+
// Zod parses the rest of the ProposalCreate fields,
|
|
30
|
+
// and HITLService.submitProposal validates ops against the live graph.
|
|
31
|
+
const CreateBody = ProposalCreate.omit({ workspaceId: true }).openapi('ProposalCreateBody');
|
|
32
|
+
const ProposalIdParam = WorkspaceIdParam.extend({
|
|
33
|
+
proposalId: ProposalId.openapi({ param: { name: 'proposalId', in: 'path' } }),
|
|
34
|
+
});
|
|
35
|
+
const ProposalListResponse = z.object({
|
|
36
|
+
items: z.array(Proposal),
|
|
37
|
+
}).openapi('ProposalListResponse');
|
|
38
|
+
const createProposalRoute = createRoute({
|
|
39
|
+
method: 'post',
|
|
40
|
+
path: '/',
|
|
41
|
+
operationId: 'createProposal',
|
|
42
|
+
summary: 'Submit a proposal draft. Server validates operations against the live graph.',
|
|
43
|
+
description: 'Skills POST here to submit graph operations for HITL review. Returns 201 with the saved proposal on success, 400 with structured issues on validation failure.',
|
|
44
|
+
tags: ['proposals'],
|
|
45
|
+
request: {
|
|
46
|
+
params: WorkspaceIdParam,
|
|
47
|
+
body: { content: { 'application/json': { schema: CreateBody } } },
|
|
48
|
+
},
|
|
49
|
+
responses: {
|
|
50
|
+
201: {
|
|
51
|
+
description: 'The saved proposal.',
|
|
52
|
+
content: { 'application/json': { schema: Proposal } },
|
|
53
|
+
},
|
|
54
|
+
400: ValidationFailureResponse,
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
const listProposalsRoute = createRoute({
|
|
58
|
+
method: 'get',
|
|
59
|
+
path: '/',
|
|
60
|
+
operationId: 'listProposals',
|
|
61
|
+
summary: 'List proposals for a workspace, optionally filtered by status.',
|
|
62
|
+
tags: ['proposals'],
|
|
63
|
+
request: {
|
|
64
|
+
params: WorkspaceIdParam,
|
|
65
|
+
query: ListQuery,
|
|
66
|
+
},
|
|
67
|
+
responses: {
|
|
68
|
+
200: {
|
|
69
|
+
description: 'A page of matching proposals.',
|
|
70
|
+
content: { 'application/json': { schema: ProposalListResponse } },
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
});
|
|
74
|
+
const getProposalRoute = createRoute({
|
|
75
|
+
method: 'get',
|
|
76
|
+
path: '/{proposalId}',
|
|
77
|
+
operationId: 'getProposal',
|
|
78
|
+
summary: 'Fetch a single proposal by id.',
|
|
79
|
+
tags: ['proposals'],
|
|
80
|
+
request: { params: ProposalIdParam },
|
|
81
|
+
responses: {
|
|
82
|
+
200: {
|
|
83
|
+
description: 'The requested proposal.',
|
|
84
|
+
content: { 'application/json': { schema: Proposal } },
|
|
85
|
+
},
|
|
86
|
+
404: NotFoundResponse,
|
|
87
|
+
},
|
|
88
|
+
});
|
|
89
|
+
const validateProposalRoute = createRoute({
|
|
90
|
+
method: 'get',
|
|
91
|
+
path: '/{proposalId}/validate',
|
|
92
|
+
operationId: 'validateProposal',
|
|
93
|
+
summary: 'Pre-apply check that returns the validation issues a proposal would hit if applied now.',
|
|
94
|
+
tags: ['proposals'],
|
|
95
|
+
request: { params: ProposalIdParam },
|
|
96
|
+
responses: {
|
|
97
|
+
200: {
|
|
98
|
+
description: 'Validation result for the proposal against the current graph.',
|
|
99
|
+
content: { 'application/json': { schema: ValidationResult } },
|
|
100
|
+
},
|
|
101
|
+
404: NotFoundResponse,
|
|
102
|
+
},
|
|
103
|
+
});
|
|
104
|
+
const applyProposalRoute = createRoute({
|
|
105
|
+
method: 'post',
|
|
106
|
+
path: '/{proposalId}/apply',
|
|
107
|
+
operationId: 'applyProposal',
|
|
108
|
+
summary: 'Apply a proposal to the graph. Human-triggered in the UI.',
|
|
109
|
+
tags: ['proposals'],
|
|
110
|
+
request: {
|
|
111
|
+
params: ProposalIdParam,
|
|
112
|
+
body: { content: { 'application/json': { schema: ApplyBody } } },
|
|
113
|
+
},
|
|
114
|
+
responses: {
|
|
115
|
+
200: {
|
|
116
|
+
description: 'The updated proposal.',
|
|
117
|
+
content: { 'application/json': { schema: Proposal } },
|
|
118
|
+
},
|
|
119
|
+
404: NotFoundResponse,
|
|
120
|
+
},
|
|
121
|
+
});
|
|
122
|
+
const rejectProposalRoute = createRoute({
|
|
123
|
+
method: 'post',
|
|
124
|
+
path: '/{proposalId}/reject',
|
|
125
|
+
operationId: 'rejectProposal',
|
|
126
|
+
summary: 'Reject a proposal with a rationale. Human-triggered in the UI.',
|
|
127
|
+
tags: ['proposals'],
|
|
128
|
+
request: {
|
|
129
|
+
params: ProposalIdParam,
|
|
130
|
+
body: { content: { 'application/json': { schema: RejectBody } } },
|
|
131
|
+
},
|
|
132
|
+
responses: {
|
|
133
|
+
200: {
|
|
134
|
+
description: 'The updated proposal.',
|
|
135
|
+
content: { 'application/json': { schema: Proposal } },
|
|
136
|
+
},
|
|
137
|
+
404: NotFoundResponse,
|
|
138
|
+
},
|
|
18
139
|
});
|
|
19
|
-
// Skill-facing create. Body must carry `workspaceId` matching the route
|
|
20
|
-
// param; we let zod parse the rest of the ProposalDraft fields and let
|
|
21
|
-
// HITLService.submitProposal validate ops against the live graph.
|
|
22
|
-
const CreateBodySchema = ProposalDraft.omit({ workspaceId: true });
|
|
23
140
|
export function createProposalsRouter(deps) {
|
|
24
|
-
const router = new
|
|
25
|
-
//
|
|
26
|
-
//
|
|
27
|
-
//
|
|
28
|
-
router.
|
|
141
|
+
const router = new OpenAPIHono();
|
|
142
|
+
// Apply and reject are HITL decisions, Owner and Maintainer only.
|
|
143
|
+
// Guests never see the buttons, the UI hides the tab.
|
|
144
|
+
// Defence-in-depth here means a direct curl from a Guest still 403s.
|
|
145
|
+
router.use('/:proposalId/apply', requirePermission('proposal.write'));
|
|
146
|
+
router.use('/:proposalId/reject', requirePermission('proposal.write'));
|
|
147
|
+
router.openapi(createProposalRoute, async (context) => {
|
|
29
148
|
const workspaceId = getWorkspaceId(context);
|
|
30
149
|
const body = context.req.valid('json');
|
|
31
|
-
const
|
|
150
|
+
const submitterId = getUserId(context);
|
|
151
|
+
const proposal = await deps.hitlService.submitProposal({ workspaceId, ...body, submitterId });
|
|
32
152
|
return context.json(proposal.toData(), 201);
|
|
33
153
|
});
|
|
34
|
-
router.
|
|
154
|
+
router.openapi(listProposalsRoute, async (context) => {
|
|
35
155
|
const workspaceId = getWorkspaceId(context);
|
|
36
|
-
const { status, limit, offset } = context.req.valid('query');
|
|
156
|
+
const { status, limit, offset, showAll } = context.req.valid('query');
|
|
37
157
|
const statuses = status === undefined ? undefined : Array.isArray(status) ? status : [status];
|
|
38
|
-
|
|
39
|
-
|
|
158
|
+
// Show All bypass is gated to the workspace owner.
|
|
159
|
+
// Everyone else is forced through the personal-pending filter,
|
|
160
|
+
// whatever they send.
|
|
161
|
+
const viewer = getViewerContext(context);
|
|
162
|
+
const viewerId = (showAll && viewer?.effectiveRole === 'owner') ? undefined : getUserId(context);
|
|
163
|
+
const proposals = await deps.proposalRepository.list({
|
|
164
|
+
workspaceId,
|
|
165
|
+
statuses,
|
|
166
|
+
limit,
|
|
167
|
+
offset,
|
|
168
|
+
...(viewerId ? { viewerId } : {}),
|
|
169
|
+
});
|
|
170
|
+
return context.json({ items: proposals.map(proposal => proposal.toData()) }, 200);
|
|
40
171
|
});
|
|
41
|
-
router.
|
|
172
|
+
router.openapi(getProposalRoute, async (context) => {
|
|
42
173
|
const workspaceId = getWorkspaceId(context);
|
|
43
|
-
const proposalId =
|
|
174
|
+
const { proposalId } = context.req.valid('param');
|
|
44
175
|
const proposal = await deps.proposalRepository.load(proposalId);
|
|
45
176
|
assertEntityInWorkspace(workspaceId, proposal.workspaceId, 'Proposal', proposalId);
|
|
46
|
-
return context.json(proposal.toData());
|
|
177
|
+
return context.json(proposal.toData(), 200);
|
|
47
178
|
});
|
|
48
|
-
|
|
49
|
-
// tried to apply this proposal right now. Skills call this after writing
|
|
50
|
-
// their proposal so they can iterate on issues without the user in the loop.
|
|
51
|
-
router.get('/:proposalId/validate', async (context) => {
|
|
179
|
+
router.openapi(validateProposalRoute, async (context) => {
|
|
52
180
|
const workspaceId = getWorkspaceId(context);
|
|
53
|
-
const proposalId =
|
|
181
|
+
const { proposalId } = context.req.valid('param');
|
|
54
182
|
const proposal = await deps.proposalRepository.load(proposalId);
|
|
55
183
|
assertEntityInWorkspace(workspaceId, proposal.workspaceId, 'Proposal', proposalId);
|
|
184
|
+
const workspace = await deps.workspaceService.findById(workspaceId);
|
|
56
185
|
const snapshot = await deps.modelRepository.load(workspaceId);
|
|
57
|
-
const result = await deps.
|
|
58
|
-
return context.json(result);
|
|
186
|
+
const result = await deps.modelValidationService.validateOperations(snapshot, proposal.operations, workspace);
|
|
187
|
+
return context.json(result, 200);
|
|
59
188
|
});
|
|
60
|
-
router.
|
|
189
|
+
router.openapi(applyProposalRoute, async (context) => {
|
|
61
190
|
const workspaceId = getWorkspaceId(context);
|
|
62
|
-
const proposalId =
|
|
63
|
-
const
|
|
191
|
+
const { proposalId } = context.req.valid('param');
|
|
192
|
+
const body = context.req.valid('json');
|
|
193
|
+
const userId = body.userId ?? getUserId(context);
|
|
64
194
|
const proposal = await deps.proposalRepository.load(proposalId);
|
|
65
195
|
assertEntityInWorkspace(workspaceId, proposal.workspaceId, 'Proposal', proposalId);
|
|
66
|
-
const
|
|
67
|
-
return context.json(
|
|
196
|
+
const applied = await deps.hitlService.applyProposal(proposalId, userId);
|
|
197
|
+
return context.json(applied.toData(), 200);
|
|
68
198
|
});
|
|
69
|
-
router.
|
|
199
|
+
router.openapi(rejectProposalRoute, async (context) => {
|
|
70
200
|
const workspaceId = getWorkspaceId(context);
|
|
71
|
-
const proposalId =
|
|
72
|
-
const { reason, userId } = context.req.valid('json');
|
|
201
|
+
const { proposalId } = context.req.valid('param');
|
|
202
|
+
const { reason, userId: bodyUserId } = context.req.valid('json');
|
|
203
|
+
const userId = bodyUserId ?? getUserId(context);
|
|
73
204
|
const proposal = await deps.proposalRepository.load(proposalId);
|
|
74
205
|
assertEntityInWorkspace(workspaceId, proposal.workspaceId, 'Proposal', proposalId);
|
|
75
|
-
const
|
|
76
|
-
return context.json(
|
|
206
|
+
const rejected = await deps.hitlService.rejectProposal(proposalId, reason, userId);
|
|
207
|
+
return context.json(rejected.toData(), 200);
|
|
77
208
|
});
|
|
78
209
|
return router;
|
|
79
210
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proposals.js","sourceRoot":"","sources":["../../src/routes/proposals.ts"],"names":[],"mappings":"AACA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/core';
|
|
2
|
+
import { OpenAPIHono } from '@hono/zod-openapi';
|
|
3
|
+
export interface ReactorCyclesRouterDeps {
|
|
4
|
+
reactorCycleRepository: ReactorCycleRepository;
|
|
5
|
+
}
|
|
6
|
+
export declare function createReactorCyclesRouter(deps: ReactorCyclesRouterDeps): OpenAPIHono;
|
|
7
|
+
//# sourceMappingURL=reactorCycles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reactorCycles.d.ts","sourceRoot":"","sources":["../../src/routes/reactorCycles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAA;AAG3D,OAAO,EAAe,WAAW,EAAK,MAAM,mBAAmB,CAAA;AAY/D,MAAM,WAAW,uBAAuB;IACtC,sBAAsB,EAAE,sBAAsB,CAAA;CAC/C;AAmCD,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,uBAAuB,GAAG,WAAW,CAmBpF"}
|