Skip to content

Commit b566735

Browse files
docs(getting-started): describe the packages a 19 scaffold pins and where PostgreSQL's pg comes from (#38885)
<!-- claude-projects-attribution: {"github_login":"huangyiirene"} --> _Requested by **Irene** · [project thread](https://claude.ai/code/project/chan_01TJXtQ1tVD26ecLDZxFS67x?thread=cmsg_01TJXtQ1tVD26ecLDZxFS67xVyDYAjYnLgMAN8BSqZxYiX)_ Fixes #38851 ## What changes Docs only, two pages: - `content/docs/getting-started/your-first-project.mdx` - The connector paragraph says the scaffold pins no generic connector executor, and keeps the add-one-when-needed steps (`npm install @objectstack/connector-rest`, list it in `plugins:`, add a `connectors:` entry). That matches the blank template's README and `objectstack.config.ts` comment. - "The packages you depend on" lists the pins the 19 scaffold writes (`packages/create-objectstack/src/templates/blank/package.json`): `spec`, `runtime`, `plugin-hono-server`; dev `cli`, `skills`, `verify`. The connector-executor row is gone and an `@objectstack/skills` row is added. The sentence says the pins sit at the scaffolder's exact version (`template-consistency.test.ts`) and no longer counts them. - The driver paragraph says PostgreSQL needs only `OS_DATABASE_URL`: `pg` is an optional peer of `driver-sql`, and the CLI brings it through `@objectstack/knowledge-pgvector`. MySQL still needs `npm install mysql2`, or the boot is refused. - `content/docs/data-modeling/drivers.mdx`: the `postgres://` row keeps "install it yourself, or boot fails loudly", now scoped to an embedder without the CLI. A CLI project already has `pg`. ## Why The card measured `npm create objectstack@19.0.0-next.3`. It writes no connector-executor pins and does pin `@objectstack/skills`. It also boots on PostgreSQL with no `pg` install, because `pg@8.23.1` arrives through `@objectstack/knowledge-pgvector`. The docs are the side to change, and `pg` arriving that way is intended: - `KNOWLEDGE_STORE_PROVIDERS` in `packages/core/src/capability-providers.ts` (ADR-0161) names `@objectstack/knowledge-pgvector` as the knowledge store when the platform database is PostgreSQL. - That package has `pg` as a hard dependency. - `@objectstack/cli` (`dependencies`) and `@objectstack/verify` depend on it. `@objectstack/driver-sql` keeps `pg` as an optional peer, so an embedder that boots `@objectstack/runtime` without the CLI still has to install it. That is why the boot-refusal wording is scoped and kept. Read at `main` 81aacd3. ## Verification Run locally at head `d9734630` (branch off `main` 81aacd3; `main` has 6 newer commits, none touching the two pages or the package manifests and template cited above, and the merge is clean). `NODE_OPTIONS=--max-old-space-size=8192`. Every command below exited 0: the full `pnpm build`, then the 45 commands `node scripts/pm/dispatch-gates.mjs --commands` derives for this diff. <details><summary>Gate log (46 commands, all exit 0)</summary> ```text pnpm build :: exit 0 node scripts/check-adr-links.mjs :: exit 0 node scripts/check-adr-links.mjs --self-test :: exit 0 node scripts/check-closing-keyword-parity.mjs :: exit 0 node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0 node scripts/check-comment-mask-corpus.mjs :: exit 0 node scripts/check-doc-route-spelling.mjs --advisory :: exit 0 node scripts/check-doc-route-spelling.mjs --self-test :: exit 0 node scripts/check-docs-section-name.mjs :: exit 0 node scripts/check-docs-section-name.mjs --self-test :: exit 0 node scripts/check-section-landing-index.mjs :: exit 0 node scripts/check-section-landing-index.mjs --self-test :: exit 0 node scripts/ci/plan-test-core-shards.mjs --self-test :: exit 0 pnpm --filter @objectstack/lint run check:doc-formula-expressions :: exit 0 pnpm --filter @objectstack/lint run check:doc-security-posture :: exit 0 pnpm --filter @objectstack/spec run check:docs :: exit 0 pnpm --filter @objectstack/spec run check:empty-state :: exit 0 pnpm --filter @objectstack/spec run check:liveness :: exit 0 pnpm --filter @objectstack/spec run check:skill-examples :: exit 0 pnpm --filter @objectstack/spec run check:strictness-ledger :: exit 0 pnpm --filter @objectstack/spec run check:variant-docs :: exit 0 pnpm --filter @objectstack/spec run check:yaml-examples :: exit 0 pnpm check:adr-anchors :: exit 0 pnpm check:ci-filter-parity :: exit 0 pnpm check:closed-ceremony-text :: exit 0 pnpm check:corpus-claim-drift :: exit 0 pnpm check:cross-package-test-inputs :: exit 0 pnpm check:doc-anchors :: exit 0 pnpm check:doc-authoring :: exit 0 pnpm check:doc-frontmatter :: exit 0 pnpm check:docs-audit-scope :: exit 0 pnpm check:docs-redirects :: exit 0 pnpm check:docs-single-h1 :: exit 0 pnpm check:docs-spec-enumerations :: exit 0 pnpm check:docs-transcript-drift :: exit 0 pnpm check:driver-memory-census :: exit 0 pnpm check:gitlink-declared :: exit 0 pnpm check:nul-bytes :: exit 0 pnpm check:pm-expected-skips :: exit 0 pnpm check:published-readme-links :: exit 0 pnpm check:react-page-adapter-contract :: exit 0 pnpm check:refd-timer-probe :: exit 0 pnpm check:role-word :: exit 0 pnpm check:skill-identifier-liveness :: exit 0 pnpm check:vendor-version-stamps :: exit 0 pnpm check:watch-hint-literal :: exit 0 ``` </details> `check-commit-card-trailers --range origin/main..HEAD`: 2 commits clean. Clause-②: no Metadata-protocol: none No changeset: `content/docs/**` publishes from no package, so the PR carries `skip-changeset`. ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. (not touched) - [x] 2. Every name I added uses the casing for its kind. (no names added) - [x] 3. No formatter ran; `pnpm lint` passes. (no code changed; lint not run) - [x] 4. One issue, one branch off an up-to-date `main`, one pull request. - [x] 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset. (publishes nothing) - [x] 6. `packages/spec` touched: its generated artifacts are regenerated and committed. (not touched) - [x] 7. No hand edits to `content/docs/references/`, `packages/*/CHANGELOG.md` or `content/docs/releases/`. - [x] 8. Title, body and comments are in English. - [x] The *Before Submitting* list in CONTRIBUTING.md is done. --- _Generated by [Claude Code](https://claude.ai/code/session_01J8VVAopEc3J75SNarkyP3g)_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01J8VVAopEc3J75SNarkyP3g --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 4b954a7 commit b566735

2 files changed

Lines changed: 18 additions & 11 deletions

File tree

‎content/docs/data-modeling/drivers.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Drivers can be selected in two ways:
4444
| URL pattern | Inferred driver | npm package |
4545
| :--- | :--- | :--- |
4646
| `mongodb://…`, `mongodb+srv://…` | MongoDB | `@objectstack/driver-mongodb` |
47-
| `postgres://…`, `postgresql://…` | PostgreSQL (Knex `pg`) | `@objectstack/driver-sql` + `pg` (**optional** peer — install it yourself, or boot fails loudly) |
47+
| `postgres://…`, `postgresql://…` | PostgreSQL (Knex `pg`) | `@objectstack/driver-sql` + `pg` (**optional** peer — a CLI project already has it, through `@objectstack/cli`'s `@objectstack/knowledge-pgvector`; an embedder without the CLI installs it, or boot fails loudly) |
4848
| `mysql://…`, `mysql2://…` | MySQL (Knex `mysql2`) | `@objectstack/driver-sql` + `mysql2` (**optional** peer — install it yourself, or boot fails loudly) |
4949
| `libsql://…`, `http(s)://*.turso.…` | Turso / libSQL | `@objectstack/driver-turso` (**optional** — install it yourself) |
5050
| `wasm-sqlite://…`, `*.wasm.db` | SQLite (pure-JS WASM) | `@objectstack/driver-sqlite-wasm` |

‎content/docs/getting-started/your-first-project.mdx‎

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,10 @@ The REST API needs no configuration — it is on by default for every object
219219
with `apiEnabled`. The starter lists no `plugins:`: a plugin is code, and an app
220220
with code in `plugins:` installs only as a managed package, never as the
221221
editable copy a marketplace trial template is (`manifest.installModes:
222-
['unmanaged']`). To integrate an external REST / OpenAPI / MCP service as pure
223-
metadata, install that **generic connector executor**
224-
(`@objectstack/connector-rest`, `-openapi` or `-mcp`), list it in `plugins:`,
222+
['unmanaged']`). The scaffold pins no **generic connector executor** either:
223+
when the app first calls an external REST / OpenAPI / MCP service as pure
224+
metadata, add the one it needs (`npm install @objectstack/connector-rest`, or
225+
`-openapi` / `-mcp`), list it in `plugins:`,
225226
and add a `connectors:` entry naming its `provider`; the `automation`
226227
capability materializes it into a live connector at boot — see
227228
[Automation → Connectors](/docs/automation/connectors).
@@ -261,26 +262,32 @@ record it is about.
261262

262263
### The packages you depend on
263264

264-
A standalone project uses a handful of published packages — this is the entire
265+
The scaffold pins these published packages in `package.json`, each at the exact
266+
version of the `create-objectstack` that wrote it — this is the entire
265267
framework surface you install:
266268

267269
| Package | What it does |
268270
|:---|:---|
269271
| `@objectstack/spec` | The protocol: `defineStack`, `ObjectSchema`, `Field.*` builders, all Zod schemas. Your metadata imports only this. |
270-
| `@objectstack/runtime` | The kernel that interprets metadata at runtime. Brings the database drivers with it — SQLite and MongoDB work as installed; PostgreSQL and MySQL also need their client package (below). |
272+
| `@objectstack/runtime` | The kernel that interprets metadata at runtime. Brings the database drivers with it — SQLite and MongoDB work as installed and PostgreSQL's client comes with the CLI; MySQL also needs its client package (below). |
271273
| `@objectstack/plugin-hono-server` | The HTTP server that mounts the generated REST API. |
272-
| `@objectstack/connector-rest` · `-openapi` · `-mcp` | The three generic connector executors — register the `rest` / `openapi` / `mcp` provider factories so declarative `connectors:` entries materialize ([ADR-0097](/docs/automation/flows)). |
273274
| `@objectstack/cli` *(dev)* | The `os` / `objectstack` CLI: `dev`, `validate`, `build`, `start`. |
275+
| `@objectstack/skills` *(dev)* | The published AI skills catalog, at your `@objectstack/spec`'s version — the package the skills bundle in step 3 is copied from. |
274276
| `@objectstack/verify` *(dev)* | The test harness: `bootStack` boots this app's own stack in-process, on an in-memory database and with no server port, and returns the handle a test asserts through. `npm test` runs the starter test `starter.test.ts` with it. |
275277

278+
No connector executor is pinned: add one when the app needs it (above).
279+
276280
No driver package is listed because none is installed directly: `@objectstack/runtime`
277281
depends on `driver-sql`, `driver-sqlite-wasm` and `driver-memory` and installs
278282
`driver-mongodb` as an optional dependency, and the CLI carries them too.
279283
`objectstack dev` resolves **SQLite** by default, which needs nothing more. For
280-
production, MongoDB needs only `OS_DATABASE_URL` pointed at it. Postgres and MySQL need
281-
one install first: their database client (`npm install pg`, or `npm install mysql2`) is
282-
an optional peer of `driver-sql` that your project adds itself, and without it the boot
283-
is refused. No code changes either way — see [Drivers](/docs/data-modeling/drivers).
284+
production, MongoDB needs only `OS_DATABASE_URL` pointed at it, and so does
285+
PostgreSQL: its client `pg` is an optional peer of `driver-sql`, and the CLI brings
286+
it — `@objectstack/cli` depends on `@objectstack/knowledge-pgvector`, the knowledge
287+
store for a PostgreSQL database, which depends on `pg`. MySQL needs one install
288+
first: its client (`npm install mysql2`) is an optional peer of `driver-sql` that
289+
your project adds itself, and without it the boot is refused. No code changes
290+
either way — see [Drivers](/docs/data-modeling/drivers).
284291

285292
## 3. Run it
286293

0 commit comments

Comments
 (0)