Skip to content

docs(datasource): external-datasource federation guide + objectstack-data skill rule (ADR-0062) - #2211

Merged
xuyushun441-sys merged 1 commit into
mainfrom
docs/adr-0062-federation-guide
Jun 22, 2026
Merged

xuyushun441-sys merged 1 commit into
mainfrom
docs/adr-0062-federation-guide

Conversation

@xuyushun441-sys

Copy link
Copy Markdown
Collaborator

Docs + skill for the ADR-0062 federation runtime

Follow-up to the merged ADR-0062 epic (#2163). The headline capability — declare an external datasource → it's visible, auto-connected, validated, and queryable with zero app code — had no narrative documentation. This adds it.

Nothing was stale (no doc told users to use the now-removed onEnable bridge), and the new datasource.autoConnect field already auto-appears in the generated references/data/datasource.mdx (from the spec .describe()) — not hand-edited. This PR is purely the missing narrative.

Added

  • content/docs/guides/external-datasources.mdx — a how-to guide:
    • defineDatasource({ schemaMode: 'external', external: {...} })
    • object binding via datasource + external.remoteName/remoteSchema/columnMap
    • auto-connect (D2 gate: external / explicit object.datasource / autoConnect:true; a mapping-only managed datasource stays metadata-only) — no onEnable needed
    • onEnable + ctx.drivers.register as the dynamic-driver escape hatch only
    • credentialsRef fail-closed (D3)
    • ❌ no field.columnName on external objects → use external.columnMap (D7, build-rejected)
    • writes double opt-in; analytics over external; multi-tenant connect policy
    • Listed in the Integration nav after Database Drivers. Browser-verified rendering (TOC + Callouts + code blocks).
  • skills/objectstack-data/rules/datasources.md (+ linked from SKILL.md) — the same rules in the authoring skill, leading with the columnMap-not-columnName guardrail.

Not changed

  • The generated datasource reference (auto-includes autoConnect).
  • No code change → docs/skills only.

🤖 Generated with Claude Code

…ack-data skill rule (ADR-0062)

The ADR-0062 federation runtime ("declare an external datasource → visible,
auto-connected, queryable with zero app code") had no narrative docs. Adds:

- content/docs/guides/external-datasources.mdx — how-to: defineDatasource +
  schemaMode, object remoteName/remoteSchema/columnMap binding, auto-connect (D2
  gate: external / explicit object.datasource / autoConnect; mapping-only managed
  stays metadata-only), onEnable only as a dynamic-driver escape hatch,
  credentialsRef fail-closed (D3), no field.columnName on external → use columnMap
  (D7), writes double opt-in, analytics over external. Listed in the Integration
  nav after Database Drivers. Browser-verified rendering.
- skills/objectstack-data/rules/datasources.md (+ SKILL.md link) — same rules in
  the authoring skill, emphasizing the columnMap-not-columnName guardrail.

The autoConnect field is already auto-documented in the generated
references/data/datasource.mdx (from the spec describe()); not hand-edited.
@vercel

vercel Bot commented Jun 22, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jun 22, 2026 2:32pm

Request Review

This branch was successfully deployed

1 active deployment
Preview — 5e30b4ec Deployed Jun 22, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants