Repository navigation
Description
Problem or use case
Maintainer direction: project-owner choice applies to every extension and integration, not only storage. Owners choose their libraries, providers and infrastructure. URLCode supplies declarative composition, enforceable request/authority boundaries and agent/human review tools; it must not make adopting the entire bundled stack a prerequisite.
This broadens the original storage-only scope of this issue. SQLite, PostgreSQL, Better Auth, Express and Fastify are examples, not a required provider shortlist. Follow-up to #841 and #1041. #837 remains on hold; this does not reactivate its legacy facade expansion.
Ordinary trusted Node application code already supports native npm imports. What still needs to be consistent across extensions is optional adoption, owner-supplied implementations, truthful capability reporting, and preservation of upstream APIs. Current bundled auth/store/audit persistence has SQLite-specific assumptions. These must be described as implementation properties, not universal URLCode requirements.
Proposed behavior and alternatives
Rule for every extension
- Owner chooses the implementation. Bundled integrations are optional tested defaults. Core and unrelated capabilities must not import or require them. Dependencies genuinely necessary for a selected feature must be explicit and scoped to that feature.
- Native libraries remain native. Direct use in trusted application code does not require an extension descriptor, catalog entry or per-library adapter. Preserve native configuration, clients, queries, plugin APIs and advanced features. An internal implementation dependency need not have a public replacement slot when it does not constrain the application contract.
- Integrate only at meaningful boundaries. A focused integration is needed when a provider participates in URLCode-specific identity, declarative operations, lifecycle, authority or review behavior. Prefer existing standard interfaces and the generic extension/request contracts. Do not build a universal lowest-common-denominator API or mirror every upstream feature.
- Describe behavior, not a preferred provider's internals. Providers declare only guarantees they actually enforce. Refuse requested features whose guarantees cannot be enforced. Identify opaque trusted application behavior without claiming URLCode inspects or controls it. Compatibility does not imply identical features or a zero-change swap.
- Keep operator choices outside route behavior. Credentials, connections, provider instances, service endpoints and resource setup belong in trusted operator configuration. Define who creates/closes shared resources and owns migrations/transactions. Do not imply cross-provider atomicity.
- Independent integrations are first-class. Independently named/versioned packages can provide integrations without core edits, first-party namespace requirements or release lockstep beyond a declared compatible contract.
- Respect existing projects. Agents inspect and use the installed stack before proposing defaults. Review shows selected implementations, declared operations, authority, lifecycle/target requirements and known coverage gaps without exposing secrets. Static artifact inspection must not execute provider code.
- Preserve enforcement boundaries. Owner choice does not waive operator approval, revision-pinned grants or sandbox isolation. Unsupported target/provider combinations refuse before serving. Trusted native imports remain trusted execution, not a promise to run arbitrary npm libraries in the sandbox.
Apply the rule across domains
| Domain | URLCode integration responsibility | Owner/upstream responsibility |
|---|---|---|
| Identity/authentication | Verified principal and route authorization handoff; truthful credential/capability metadata | Auth library/service, accounts, sessions, login clients and enabled plugins |
| Storage | Declared operation inputs/results and requested ownership/atomicity/retry guarantees | Database/client/ORM/service, queries, data schemas, migrations, pools and backups |
| Audit | Explicit event/evidence requirements, delivery guarantees and failure behavior where requested | Chosen durable destination and native implementation; generic telemetry is not automatically durable audit |
| MCP/other protocols | Explicit operations, authority and standard protocol boundary | Upstream protocol tooling and native integrations; do not expose every provider operation automatically |
| UI/forms/presentation | Optional declarative metadata and HTTP contracts | Frontend framework, components, form libraries and build tooling |
| Mail, caching, abuse controls and other optional capabilities | Only the declared behavior/guarantees URLCode needs to compose | Owner-selected native implementations and infrastructure |
| Hosting | Documented request/response, lifecycle and enforcement responsibilities | Owner's framework/server/runtime and its operational controls |
This table is a design policy, not a mandate to rebuild retired extensions or ship an adapter for every listed domain. Existing standard interfaces should work directly wherever their semantics fit.
Acceptance evidence
- Audit each current extension and its authoring/scaffold guidance against these rules. Record provider-specific assumptions, which are legitimate defaults, and which incorrectly constrain the public contract. File focused follow-ups rather than silently expanding this issue into an all-provider rewrite.
- Demonstrate an application using ordinary upstream libraries through native APIs without URLCode adapter metadata or unrelated bundled extensions.
- Demonstrate substitution at materially different relevant capability boundaries using independently owned integrations without modifying core. Reuse the existing Auth.js and Hono proofs where applicable; they do not prove storage portability, revocation parity or every host's operational coverage.
- For supported substitutions, show that declarative application intent stays stable where semantics match; identify native configuration/client changes and unsupported capabilities honestly. No universal parity facade or automatic data migration promise.
- For stateful integrations, test concurrent operations, rollback, retries and audit evidence wherever advertised. Use explicit isolated test resources/setup/teardown; if isolation is unavailable, refuse rather than fall back to live data. For auth/protocol/hosting integrations, test their corresponding refusal, lifecycle and authority behavior.
- Ensure installation, inspection, review and generated agent guidance respect independent package identities and the owner's selected stack. Provider-owned native APIs remain accessible; static inspection does not import executable code.
- Document the distinction between native application library use, optional URLCode declarative integration and bundled convenience implementations. Declare supported/refused guarantees and target limits.
Storage-specific clarification retained from the original scope
SQLite remains an optional local convenience implementation. PostgreSQL is one possible contrasting proof, not a required backend or the product objective. Owners may retain any suitable client, ORM, database or storage service. Do not require the bundled store's schema, SQLite files, migration/backup commands or synchronous execution model just to integrate owner-selected storage. A database URL switch is not a claim of full declarative-store parity; behavioral guarantees need evidence.
Scope boundaries and related work
No universal ORM, authentication facade, provider marketplace, distributed transaction layer or exhaustive adapter catalog. Do not duplicate upstream tools merely to present a uniform API. No historical compatibility/migration shims are required by the maintainer. This issue authorizes scoping the consistent contract and focused implementations, not automatic provider replacement or weakening guarantees.
#1041 owns the wider reuse audit; #1047 addresses a concrete generic-auth/OpenAPI metadata gap. #1042/#1043 delivered native auth body-format support and bounded dependency-review evidence. #837 remains on hold until its remaining scope is explicitly reconsidered under this direction.
Activity
[-][Request]: Let project owners choose storage through native tools and optional integrations[/-][+][Request]: Make every extension respect project-owner choice of libraries and providers[/+]jimhoyd commentedon Sep 30, 2026
Owner decisions (2026-09-30) on the owner-choice plan:
peek/ackover that event table, so an owner can forward audit events to any sink. The separate outbox/drain machinery goes; the pull contract stays, moved into core.audit,storeorauthmay be installed when the first-party one isn't. The refusal inaddon-install.tsis lifted for that case, and the exports types move into core.databaseand options; email/password becomes a default rather than forced. When the database isn't the bundled SQLite file, the SQLite-only lock, triggers and migrate CLI don't apply, and activation says so. Hermetic test/audit runs with an owner database need an owner-provided isolated database, or they are refused. They never fall back to live data.@jimhoyd/urlcode/extensionsto a separate core subpath,@jimhoyd/urlcode/sqlite.Slices, in order. All start after #1050 (one serving process per database) merges.
sqlitesubpath.feat(auth): honour the owner's Better Auth database and sign-in metho…
refactor(core): move the SQLite helpers to @jimhoyd/urlcode/sqlite (#…
test(proofs): native-storage proof, the owner's own database behind a…
feat: provider-neutral scaffold, review and agent guidance (#1052 S6) (…
feat(store): the audit log is the store's own, with a tap in core; na…
docs: describe bundled store/auth as defaults, not URLCode rules (#1052…
fix(core): the one-server lock refusal names the owner-choice path, n…
docs: remove stale benchmark, lock-refusal and sqlite-helper prose af…