Skip to content

Commit b4487aa

Browse files
os-zhuangclaude
andauthored
feat(spec)!: remove the per-provider connector "template" cluster (#4480) (#4500)
BREAKING CHANGE: @objectstack/spec/integration no longer exports the six per-provider connector schemas — DatabaseConnectorSchema, FileStorageConnectorSchema, GitHubConnectorSchema, MessageQueueConnectorSchema, SaasConnectorSchema, VercelConnectorSchema — nor their ~100 sub-schema/type/ example exports (2,672 lines). The six generated reference pages go with them. #4480 started as one dead key (DatabaseConnector.readReplicaConfig, found while removing datasource.readReplicas in #4468) and scoped out to the whole cluster: zero consumers for all six schemas. Nothing in the monorepo imported any of them — not the automation engine (engine.registerConnector validates against ConnectorSchema from connector.zod.ts, engine.ts:1379), not the `connectors:` stack collection (DeclarativeConnectorEntrySchema), not even their own module's live half. They were the losing side of a decided architecture fight, left standing. ADR-0023 rejected hand-modelling each external system's shape inside the spec; ADR-0097's connector protocol does the opposite — provider shapes come from the provider itself (connector-openapi materializes instances from an OpenAPI document, connector-mcp from an MCP server). The templates hardcoded Postgres/S3/GitHub/RabbitMQ/Vercel shapes nothing would ever read, and were semantically wrong where they overlapped the live platform: DatabaseConnectorSchema modelled "tables to sync", CDC, and readReplicaConfig — read-replica routing declared a SECOND time, down to a `weight` field for a load balancer that does not exist. External-database access is datasource federation (ADR-0015), which is live and is not a connector. The removal kit: - integration/index.ts: six export lines removed; module header now records the decision so the next reader finds the ADR trail, not a gap - json-schema.manifest.json: 47 entries deleted deliberately (the gen:schema ratchet's documented retirement path) - authorable-surface.json: 365 lines deleted deliberately (gate (a)'s strict- removal trip wire, whole-cluster edition) - api-surface.json regenerated from the rebuilt dist - docs: six connector-* reference pages deleted, plus three sibling pages (message-queue/object-storage/tenant under references/integration) whose entire content documented deleted-file exports; section meta + index regenerated; hand-written tables in references/index.mdx and getting-started/quick-reference.mdx rewritten around the one live protocol - PROTOCOL_MAP.md: six rows collapsed into the connector.zod.ts row (the protocol-map link test is what caught this surface) - v17 release notes: dead-clusters table row - changeset: major, with the no-migration rationale (these schemas validated no stored metadata, so there is no D2 conversion to register — nothing to rewrite) No runtime behaviour changes: the ADR-0097 path — ConnectorSchema, DeclarativeConnectorEntrySchema, the provider contract, connector-descriptor, connector auth — is untouched, which the service-automation suite (609 tests) confirms. Follow-up filed: #4499 — automation/trigger-registry.zod.ts carries a THIRD declaration of the same business need (its own ConnectorSchema cluster, ~440 lines, zero runtime consumers; the engine imports integration's schema). Kept out of this PR: that file mixes the dead cluster with trigger-registry exports that need individual verdicts. Closes #4480 Claude-Session: https://claude.ai/code/session_01WsgTqRF58HsQYKLsrZ5pQY Co-authored-by: Claude <noreply@anthropic.com>
1 parent 304423e commit b4487aa

32 files changed

Lines changed: 100 additions & 6167 deletions
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
'@objectstack/spec': major
3+
---
4+
5+
The per-provider connector "template" cluster is removed (#4480, ADR-0049)
6+
7+
`@objectstack/spec/integration` no longer exports the six per-provider
8+
connector schemas and their sub-schema/type/example clusters (~110 exports,
9+
2,672 lines):
10+
11+
- `DatabaseConnectorSchema` (+ `DatabaseProviderSchema`, `DatabasePoolConfigSchema`,
12+
`SslConfigSchema`, `CdcConfigSchema`, `DatabaseTableSchema`, the three
13+
`*ConnectorExample` constants)
14+
- `FileStorageConnectorSchema` (+ bucket/versioning/multipart/filter configs, examples)
15+
- `GitHubConnectorSchema` (+ repository/commit/PR/actions/release/issue configs, examples)
16+
- `MessageQueueConnectorSchema` (+ its queue/topic/consumer configs, examples)
17+
- `SaasConnectorSchema` (+ examples)
18+
- `VercelConnectorSchema` (+ its deployment/domain/env configs, examples)
19+
20+
The six generated reference pages under `docs/references/integration/` go with
21+
them.
22+
23+
**Why removal, not completion.** These files were the losing side of an
24+
architecture decision the same module's live half already records. ADR-0023
25+
rejected hand-modelling each external system's shape inside the spec —
26+
"re-inventing OpenAPI inside this schema" — and ADR-0097's connector protocol
27+
does the opposite: one `ConnectorSchema`, with provider shapes coming from the
28+
provider itself (`connector-openapi` materializes instances from an OpenAPI
29+
document, `connector-mcp` from an MCP server). The templates hardcoded
30+
Postgres/S3/GitHub/RabbitMQ/Vercel shapes into spec files nothing ever read:
31+
32+
- `engine.registerConnector()` validates against `ConnectorSchema` from
33+
`connector.zod.ts` — never the templates
34+
- the `connectors:` stack collection parses `DeclarativeConnectorEntrySchema`
35+
never the templates
36+
- nothing else in the monorepo, objectui included, imported any of the six
37+
38+
They were also semantically wrong where they overlapped the live platform:
39+
`DatabaseConnectorSchema` modelled "tables to sync", CDC, and `readReplicaConfig`
40+
— a second, independent declaration of read-replica routing (the first,
41+
`datasource.readReplicas`, was removed in #4468), complete with a `weight`
42+
field for a load balancer that does not exist. External-database access is
43+
datasource federation (ADR-0015), which is live and is not a connector.
44+
45+
**Migration.** There is nothing to migrate: these schemas validated no stored
46+
metadata (the `connectors:` collection never used them) and no runtime read
47+
their output. If you imported one as a TypeScript type for your own code,
48+
model your provider config yourself, or — the supported path — declare a
49+
provider-bound connector instance and let connector-openapi / connector-mcp
50+
derive the shape:
51+
52+
```ts
53+
// before (typed against a dead spec export)
54+
import { DatabaseConnector } from '@objectstack/spec/integration';
55+
56+
// after (the live protocol)
57+
import { Connector, DeclarativeConnectorEntry } from '@objectstack/spec/integration';
58+
```
59+
60+
The base protocol — `ConnectorSchema`, `DeclarativeConnectorEntrySchema`, the
61+
ADR-0097 provider contract, connector-descriptor, connector auth — is
62+
unchanged.

content/docs/getting-started/quick-reference.mdx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -193,19 +193,18 @@ Environments, marketplace, licensing, and multi-tenancy.
193193
| **[Plugin Security](/docs/references/cloud/plugin-security)** | `plugin-security.zod.ts` | PluginSecurityProtocol, SBOM | Plugin security policies |
194194
| **[Tenant](/docs/references/cloud/tenant)** | `tenant.zod.ts` | Tenant | Multi-tenancy isolation |
195195

196-
## Integration Protocol (7 schemas)
196+
## Integration Protocol (1 schema)
197197

198-
External system connectors and adapters.
198+
External system connectors — one protocol (ADR-0097): a connector entry is
199+
either a catalog descriptor or a provider-bound instance that a generic
200+
executor (connector-openapi / connector-mcp) materializes at boot. The
201+
per-provider schema "templates" (SaaS / database / file-storage /
202+
message-queue / GitHub / Vercel) were removed in #4480: provider shapes come
203+
from the provider itself, not from hand-written spec files.
199204

200205
| Protocol | Source File | Key Schemas | Purpose |
201206
|:---------|:-----------|:------------|:--------|
202-
| **[Connector](/docs/references/integration/connector)** | `connector.zod.ts` | Connector | Generic connector interface |
203-
| **[SaaS Connector](/docs/references/integration/connector)** | `connector/saas.zod.ts` | SaaSConnector | SaaS integrations |
204-
| **[Database Connector](/docs/references/integration/connector)** | `connector/database.zod.ts` | DatabaseConnector | Database adapters |
205-
| **[File Storage](/docs/references/integration/connector)** | `connector/file-storage.zod.ts` | FileStorageConnector | Cloud storage |
206-
| **[Message Queue](/docs/references/integration/message-queue)** | `connector/message-queue.zod.ts` | MessageQueueConnector | Queue integrations |
207-
| **[GitHub](/docs/references/integration/connector)** | `connector/github.zod.ts` | GitHubConnector | GitHub API integration |
208-
| **[Vercel](/docs/references/integration/connector)** | `connector/vercel.zod.ts` | VercelConnector | Vercel deployment |
207+
| **[Connector](/docs/references/integration/connector)** | `connector.zod.ts` | Connector | The connector protocol — auth, sync, webhooks, rate limiting |
209208

210209
## Shared Protocol (5 schemas)
211210

content/docs/references/index.mdx

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Protocol Reference
3-
description: Complete reference of all 139 ObjectStack protocol specifications
3+
description: Complete reference of all 133 ObjectStack protocol specifications
44
---
55

66
# Protocol Reference
@@ -30,7 +30,7 @@ These reference pages are **auto-generated** from the Zod source files in `packa
3030
| [QA Protocol](#qa-protocol) | 1 | Test Suites and BDD Scenarios |
3131
| [Studio Protocol](#studio-protocol) | 1 | Studio plugin development |
3232

33-
**Total: 175 Zod schemas** (across 14 protocol modules + 1 root stack schema)
33+
**Total: 169 Zod schemas** (across 14 protocol modules + 1 root stack schema)
3434

3535
---
3636

@@ -313,19 +313,18 @@ Defines marketplace and multi-tenancy capabilities.
313313
## Integration Protocol
314314

315315
**Location:** `packages/spec/src/integration/`
316-
**Count:** 7 schemas
316+
**Count:** 1 schema
317317

318-
Defines external system connectors and adapters.
318+
Defines external system connectors — one protocol (ADR-0097). A connector
319+
entry is either a catalog descriptor or a provider-bound instance that a
320+
generic executor (connector-openapi / connector-mcp) materializes at boot.
321+
The per-provider "templates" (`connector/saas.zod.ts` and five siblings) were
322+
removed in #4480: they hand-modelled each external system's shape inside the
323+
spec, which ADR-0023 rejected, and nothing ever consumed them.
319324

320325
| File | Schema | Purpose |
321326
| :--- | :--- | :--- |
322-
| `connector.zod.ts` | `ConnectorSchema` | Generic connector interface |
323-
| `connector/saas.zod.ts` | `SaaSConnectorSchema` | SaaS platform connectors (Salesforce, HubSpot, etc.) |
324-
| `connector/database.zod.ts` | `DatabaseConnectorSchema` | Database connection adapters |
325-
| `connector/file-storage.zod.ts` | `FileStorageConnectorSchema` | Cloud storage connectors (S3, Azure Blob, etc.) |
326-
| `connector/message-queue.zod.ts` | `MessageQueueConnectorSchema` | Message queue integrations (RabbitMQ, Kafka, etc.) |
327-
| `connector/github.zod.ts` | `GitHubConnectorSchema` | GitHub API integration |
328-
| `connector/vercel.zod.ts` | `VercelConnectorSchema` | Vercel deployment integration |
327+
| `connector.zod.ts` | `ConnectorSchema` | The connector protocol — auth, sync, webhooks, rate limiting |
329328

330329
**Learn more:** [Integration Protocol Reference](/docs/references/integration)
331330

content/docs/references/integration/connector-database.mdx

Lines changed: 0 additions & 139 deletions
This file was deleted.

0 commit comments

Comments
 (0)