feat(create-objectstack): default scaffold ships the three generic connector executors (#3056)#3104
Merged
Merged
Conversation
…nnector executors (#3056) Closes the last authoring gap in the ADR-0097 promise that integrations are expressible **and executable** as pure metadata. `npm create objectstack` now generates an `objectstack.config.ts` whose `plugins:` wires the `rest`, `openapi`, and `mcp` connector executors (zero-arg = contribute the provider factory only), so an author (human or AI) can add a declarative `connectors:` entry naming `provider: 'rest' | 'openapi' | 'mcp'` and have it materialize into a live, dispatchable connector at boot — no host-code edit. Why `requires: ['automation']` is added alongside the plugins: the connector plugins declare a hard `dependencies = ['com.objectstack.service-automation']`, and the automation service is what actually materializes declarative `connectors:` entries (ADR-0097). Without it, the kernel throws `Dependency 'com.objectstack.service-automation' not found` at boot — a broken scaffold. Verified end-to-end against the published registry: connectors-only crashes boot; connectors + `requires: ['automation']` boots healthy and a declarative `provider: 'rest'` instance materializes (a declarative connector whose factory is absent fails boot loudly). Automation ships transitively via `@objectstack/cli`, so no new runtime dependency is needed. Scope note: the showcase demo half (in-repo stdio MCP fixture, DevToolsMcpConnector, CI-pinned dogfood) already landed in #3062; this is the template-preset half that was blocked on the 15.1.0 publish (now 15.1.1 is `latest`, and the template's `^15.0.0` pins resolve to it). Changes: - templates/blank/objectstack.config.ts — `requires: ['automation']` + `plugins:` with the three zero-arg executors; brand connectors stay marketplace/opt-in; stdio-MCP opt-in (#3055) documented inline. - templates/blank/package.json — add `@objectstack/connector-{rest,openapi,mcp}` at `^15.0.0` (in lockstep via scripts/sync-template-versions.mjs). - templates/blank/README.md — "Connectors (default providers)" section. - docs/getting-started/your-first-project.mdx — config snippet + packages table match the new scaffold output. - docs/automation/flows.mdx — restore the "scaffolded apps ship the three executors" statement. - changeset (create-objectstack, minor). Refs #3056, #3062 (showcase half), #3055 / #3059 (stdio gate), ADR-0097. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GjAgyTXaxSMVDWtGYxAXL7
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📓 Docs Drift CheckThis PR changes 1 package(s): 7 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
…/docker was removed) The "Docker build and run" step `cp`'d Dockerfile / docker-compose.yml / .dockerignore from `examples/docker/`, which was deleted in 6c28bac without updating this workflow — so the job failed at `cp: cannot stat '.../examples/docker/Dockerfile'` on every PR touching `packages/create-objectstack/**` (a pre-existing break, not from #3056). The blank template already ships its own Dockerfile (multi-stage: `npm ci` + `os build`, runtime `FROM ghcr.io/objectstack-ai/objectstack`), so build the generated project as-is with `--pull=false` against the base image built in the prior step. This fixes the failure and strictly improves coverage — the e2e now exercises the exact Docker path a real `npm create objectstack` user ships, instead of a separate example copy. Also drops the now-dead `examples/docker/**` path trigger. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GjAgyTXaxSMVDWtGYxAXL7
os-zhuang
marked this pull request as ready for review
July 17, 2026 09:21
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.
Implements the template-preset half of #3056 — the part that was blocked on the 15.1.0 publish (now
15.1.1islatest, and the template's^15.0.0pins resolve to it). The showcase demo half already landed in #3062.Problem
An author (human or AI) can write a complete, valid provider-bound
connectors:entry today, but it only materializes if a human also editsobjectstack.config.tsto add the matching connector plugin toplugins:. The metadata layer is complete; the scaffold kept a code-editing step exactly where an AI author can't help itself. This closes that gap in the default preset (the scaffold), per the ADR-0097 promise that integrations are expressible and executable as pure metadata.What changed
templates/blank/objectstack.config.ts—plugins:now wiresnew ConnectorRestPlugin(),new ConnectorOpenApiPlugin(),new ConnectorMcpPlugin()(zero-arg = contribute the provider factory only), plusrequires: ['automation'](see below).templates/blank/package.json— adds@objectstack/connector-rest,-openapi,-mcpat^15.0.0(kept in lockstep byscripts/sync-template-versions.mjs; ran it — no-op).templates/blank/README.md— new "Connectors (default providers)" section (provider table, how to add/remove, the stdio-MCP security note).docs/getting-started/your-first-project.mdx— config snippet + "packages you depend on" table match the new scaffold output.docs/automation/flows.mdx— restores the "scaffolded apps ship the three executors" statement (the prior wording only credited the showcase).create-objectstackminor.requires: ['automation']is includedThe issue's checklist listed only the three plugins, but adding them without automation ships a scaffold that crashes on boot. The connector plugins declare a hard
dependencies = ['com.objectstack.service-automation'], and the automation service is also what materializes declarativeconnectors:entries (ADR-0097). Their defensivetry/catcharoundgetService('automation')does not save it — the kernel resolves plugindependenciesby throwing before anyinit()runs.I verified this end-to-end against the published registry (exactly as
scaffold-e2einstalls), not just by reading code:[Kernel] Dependency 'com.objectstack.service-automation' not found for plugin 'com.objectstack.connector.rest'requires: ['automation']os validate/os build/os startall green;/api/v1/healthOK;/api/v1/ready→runningprovider: 'rest'connector@objectstack/service-automationships transitively via@objectstack/cli, sorequires: ['automation']resolves with no new direct dependency. This keeps the change to the preset layer only (ADR-0018 §Addendum layering unchanged — nothing moved into the engine/kernel).Verification
validate+build+start --artifact+ health/ready probes green;tsc --noEmitclean.template-consistencyratchets pass (all@objectstack/*deps pin^15.x;engines.protocol '^15'; README template table unchanged).scaffold-e2e(Job 1) runs on this PR since it touchespackages/create-objectstack/**— the definitive registry proof.Refs #3056, #3062 (showcase half), #3055 / #3059 (stdio gate), #3017 / #3049, ADR-0097, ADR-0018 §Addendum.
🤖 Generated with Claude Code
https://claude.ai/code/session_01GjAgyTXaxSMVDWtGYxAXL7
Generated by Claude Code