Skip to content

feat(create-objectstack): default scaffold ships the three generic connector executors (#3056)#3104

Merged
os-zhuang merged 2 commits into
mainfrom
claude/github-issue-3056-9e4x3c
Jul 17, 2026
Merged

feat(create-objectstack): default scaffold ships the three generic connector executors (#3056)#3104
os-zhuang merged 2 commits into
mainfrom
claude/github-issue-3056-9e4x3c

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

Implements the template-preset half of #3056 — the part 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). 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 edits objectstack.config.ts to add the matching connector plugin to plugins:. 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.tsplugins: now wires new ConnectorRestPlugin(), new ConnectorOpenApiPlugin(), new ConnectorMcpPlugin() (zero-arg = contribute the provider factory only), plus requires: ['automation'] (see below).
  • templates/blank/package.json — adds @objectstack/connector-rest, -openapi, -mcp at ^15.0.0 (kept in lockstep by scripts/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).
  • changesetcreate-objectstack minor.

⚠️ Reviewer note — why requires: ['automation'] is included

The 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 declarative connectors: entries (ADR-0097). Their defensive try/catch around getService('automation') does not save it — the kernel resolves plugin dependencies by throwing before any init() runs.

I verified this end-to-end against the published registry (exactly as scaffold-e2e installs), not just by reading code:

Case Result
connectors, no automation ❌ boot crash: [Kernel] Dependency 'com.objectstack.service-automation' not found for plugin 'com.objectstack.connector.rest'
connectors + requires: ['automation'] os validate / os build / os start all green; /api/v1/health OK; /api/v1/readyrunning
+ declarative provider: 'rest' connector ✅ materializes (healthy boot)
declarative connector without its plugin ❌ fails boot loudly: "declares provider 'rest', but no provider factory is registered… Installed providers: [mcp]"

@objectstack/service-automation ships transitively via @objectstack/cli, so requires: ['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

  • Booted the actual edited template config against published 15.1.1 (registry): validate + build + start --artifact + health/ready probes green; tsc --noEmit clean.
  • template-consistency ratchets pass (all @objectstack/* deps pin ^15.x; engines.protocol '^15'; README template table unchanged).
  • scaffold-e2e (Job 1) runs on this PR since it touches packages/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

…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
@vercel

vercel Bot commented Jul 17, 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 Jul 17, 2026 9:12am

Request Review

@github-actions github-actions Bot added documentation Improvements or additions to documentation dependencies Pull requests that update a dependency file tooling size/m labels Jul 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): create-objectstack.

7 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:

  • content/docs/ai/skills-reference.mdx (via create-objectstack)
  • content/docs/ai/skills.mdx (via create-objectstack)
  • content/docs/getting-started/index.mdx (via create-objectstack)
  • content/docs/getting-started/your-first-project.mdx (via create-objectstack)
  • content/docs/plugins/packages.mdx (via create-objectstack)
  • content/docs/releases/v15.mdx (via create-objectstack)
  • content/docs/releases/v9.mdx (via create-objectstack)

Advisory only. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs origin/main → pass the list as args.docs.

…/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
@github-actions github-actions Bot added ci/cd and removed ci/cd labels Jul 17, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review July 17, 2026 09:21
@os-zhuang
os-zhuang merged commit 3f218e4 into main Jul 17, 2026
19 checks passed
@os-zhuang
os-zhuang deleted the claude/github-issue-3056-9e4x3c branch July 17, 2026 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation size/m tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants