feat: add db-sqlite module - #155
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: accc7ed The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Pull request overview
Adds a reusable SQLite database foundation module to the catalog and introduces “module capabilities” so modules can depend on abstract capabilities (e.g., db-sql) that the add command can resolve to concrete provider modules.
Changes:
- Introduces catalog-level capability modeling (
provides+required-capability) and capability provider lookup. - Adds a new
db-sqlitepackage module with generated SQLite configuration, migrations, and health-check scripts. - Updates scaffolding + CLI logic to support conditional
package.jsonentries and capability-driven dependency resolution.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/scaffold/src/service/plan/ContributionResolver.ts | Enables conditional pkg-json-entry contributions by resolving templates and dropping empty names. |
| packages/scaffold/src/service/blueprint/BlueprintService.ts | Fails Blueprint resolution on unresolved capability deps to enforce pre-resolution. |
| packages/domain/src/Catalog.ts | Adds ModuleCapability, required-capability dependency type, and provides on module definitions/tree output. |
| packages/catalog/src/registry/modules/packages.ts | Registers new db-sqlite module and its file + package.json contributions. |
| packages/catalog/src/registry/moduleRegistry.test.ts | Adds validation that required capabilities always have compatible provider modules. |
| packages/catalog/src/registry/content/db.ts | New generated source templates for SQLite database layer, migrations, and scripts. |
| packages/catalog/src/CatalogService.ts | Builds capability→providers index and exposes getCapabilityProviders; enriches catalog tree with capability metadata. |
| apps/cli/src/commands/add.ts | Adds capability resolution into add dependency resolution (interactive selection vs non-interactive failure). |
| apps/cli/e2e/matrix.test.ts | Adds e2e coverage harness for required-capability resolution paths (currently gated on catalog usage). |
| .changeset/curly-parks-learn.md | Publishes db-sqlite as a minor feature. |
| .changeset/clear-colts-roll.md | Publishes module capabilities as a minor feature. |
Comment on lines
+526
to
+565
| if (capabilityMatrix.length > 0) { | ||
| layer(CLI.layer)("modules with required capabilities", (it) => { | ||
| for (const entry of capabilityMatrix) { | ||
| it.effect( | ||
| entry.label, | ||
| () => | ||
| Effect.gen(function* () { | ||
| const cli = yield* CLI; | ||
| const name = `matrix-capability-${entry.capability}-${entry.requiringModule}-${entry.providerModule}`; | ||
| const root = `${cli.workdir}/${name}`; | ||
|
|
||
| yield* cli.run("init", name, "--yes", "--root", cli.workdir); | ||
| yield* cli.expectExitCode(0); | ||
|
|
||
| yield* cli.run( | ||
| "add", | ||
| "--yes", | ||
| "--root", | ||
| root, | ||
| "--target", | ||
| entry.requiringTarget, | ||
| "--modules", | ||
| entry.requiringModule, | ||
| ); | ||
|
|
||
| if (entry.providerCount === 1) { | ||
| yield* cli.expectExitCode(0); | ||
|
|
||
| yield* cli.withinProject(name, function* (project) { | ||
| yield* project.expectTypeCheckPasses(); | ||
| }); | ||
| } else { | ||
| yield* cli.expectExitCode(1); | ||
| } | ||
| }).pipe(Effect.provide(CLI.layer)), | ||
| { timeout: 180_000 }, | ||
| ); | ||
| } | ||
| }); | ||
| } |
lloydrichards
force-pushed
the
feat/db-module
branch
2 times, most recently
from
July 3, 2026 09:21
cb5e6bc to
8ced7df
Compare
lloydrichards
force-pushed
the
feat/db-module
branch
from
July 4, 2026 06:54
8ced7df to
9de834c
Compare
lloydrichards
force-pushed
the
feat/db-module
branch
from
July 4, 2026 06:59
9de834c to
accc7ed
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Goals/Scope
Add a new SQLite database module.
Description
maxtricto include capacities).addcommand to validate capacity inputs.