Skip to content

Commit c57f3cf

Browse files
os-zhuangclaude
andauthored
feat(spec)!: remove the trigger-registry Connector cluster (#4499) (#4503)
BREAKING CHANGE: @objectstack/spec/automation no longer exports the third declaration of the connector vocabulary — ConnectorSchema, ConnectorInstanceSchema, ConnectorOperationSchema, ConnectorTriggerSchema, ConnectorCategorySchema, the Authentication*/OAuth2Config/Operation* family, their inferred types, and the Connector.apiKey()/.oauth2() factory helpers. All 630 lines of automation/trigger-registry.zod.ts go, plus its test and generated reference page. Despite the filename the file contained no trigger registry: every export was connector vocabulary, self-contained and read by nothing. The automation engine registers and validates connectors against ConnectorSchema from integration/connector.zod.ts (ADR-0097) and never imported this one; the stack `connectors:` collection parses DeclarativeConnectorEntrySchema; outside the spec package the only references in the monorepo were the two doc generators that published it. A full dependent typecheck (119 tasks) passes with the file gone — the compiler confirms the zero-consumer verdict. This closes the connector triple-declaration (Prime Directive #12): the ADR-0097 contract is the one spelling, the six per-provider templates fell in #4480, this was the last copy. integration/connector.zod.ts's header loses its "When to use Integration Connector vs. Trigger Registry?" section with it — guidance that steered lightweight cases to a dead file with the platform's authority, the same defect class as the capabilities.readOnly prescription corrected in #4487. The removal kit, same shape as #4480: - automation/index.ts barrel line removed with a note recording the decision - authorable-surface.json: 69 keys deleted deliberately (gate (a)'s strict- removal trip wire); json-schema.manifest.json: 11 entries - build-docs page list and build-skill-references source list pruned; reference pages, skill references, api-surface regenerated (the references/automation/connector.mdx page survives with only the live DataSyncConfig on it) - strictness ledger: row dropped per the checker's contract, prose note keeps the audit trail (the old row's "descriptors are code-registered; bindings authored" was optimistic twice over); automation section total 99 → 88 - PROTOCOL_MAP row, quick-reference row, v17 dead-clusters row - major changeset with the name-collision warning: the live module also exports ConnectorTriggerSchema/Connector with different shapes, so an import-path find-and-replace is not a migration No D2 conversion: none of this was storable stack metadata, so there is no source for `os migrate meta` to rewrite. Closes #4499 Claude-Session: https://claude.ai/code/session_01WsgTqRF58HsQYKLsrZ5pQY Co-authored-by: Claude <noreply@anthropic.com>
1 parent 2b64e0e commit c57f3cf

20 files changed

Lines changed: 84 additions & 1479 deletions

File tree

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
'@objectstack/spec': major
3+
---
4+
5+
The `trigger-registry.zod.ts` Connector cluster is removed (#4499)
6+
7+
`@objectstack/spec/automation` no longer exports the third declaration of the
8+
connector vocabulary: `ConnectorSchema`, `ConnectorInstanceSchema`,
9+
`ConnectorOperationSchema`, `ConnectorTriggerSchema`, `ConnectorCategorySchema`,
10+
`AuthenticationSchema` / `AuthenticationTypeSchema` / `AuthFieldSchema` /
11+
`OAuth2ConfigSchema`, `OperationTypeSchema` / `OperationParameterSchema`, their
12+
inferred types, and the `Connector.apiKey()` / `Connector.oauth2()` factory
13+
helpers — 630 lines, all of `automation/trigger-registry.zod.ts`.
14+
15+
Despite the filename, the file contained no trigger registry. Every export was
16+
connector vocabulary, self-contained and read by nothing:
17+
18+
- the automation engine registers and validates connectors against
19+
`ConnectorSchema` from `integration/connector.zod.ts` (ADR-0097) — it never
20+
imported this one;
21+
- the stack `connectors:` collection parses `DeclarativeConnectorEntrySchema`;
22+
- outside the spec package, the only references anywhere in the monorepo were
23+
the two documentation generators that published it.
24+
25+
This closes the connector triple-declaration: `integration/connector.zod.ts`
26+
is the one live contract (ADR-0097), the six per-provider "templates" fell in
27+
#4480, and this cluster is the last copy (Prime Directive #12 — one
28+
capability, one contract).
29+
30+
**Migration.** If you imported any of these names from
31+
`@objectstack/spec/automation`, there is nothing to migrate *to* on that
32+
module: nothing ever consumed what you built against them. Declare real
33+
connector instances with `defineConnector` / the stack `connectors:` collection
34+
(`DeclarativeConnectorEntrySchema`), or materialize them from a provider
35+
document via connector-openapi / connector-mcp. Note the name collision when
36+
migrating types: the live `integration/connector.zod.ts` also exports a
37+
`ConnectorTriggerSchema` and a `Connector` type with *different shapes* — a
38+
find-and-replace of the import path is not a migration.
39+
40+
The removal also deletes the "When to use Integration Connector vs. Trigger
41+
Registry?" comparison from `integration/connector.zod.ts`'s header, which
42+
steered "lightweight" cases to the dead file with the platform's authority —
43+
the same defect class as the `capabilities.readOnly` prescription #4487
44+
corrected. No D2 conversion: none of this was storable stack metadata, so
45+
there is no source for `os migrate meta` to rewrite.

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ Flows, state machines, approvals, and integrations.
157157
| **[State Machine](/docs/references/automation/state-machine)** | `state-machine.zod.ts` | StateMachine | State machine definitions |
158158
| **[Webhook](/docs/references/automation/webhook)** | `webhook.zod.ts` | Webhook | Outbound webhooks |
159159
| **[ETL](/docs/references/automation/etl)** | `etl.zod.ts` | ETLPipeline | Data transformation pipelines |
160-
| **[Trigger Registry](/docs/references/automation/trigger-registry)** | `trigger-registry.zod.ts` | TriggerRegistry | Event-driven triggers |
161160
| **[Sync](/docs/references/automation/sync)** | `sync.zod.ts` | DataSyncConfig, SyncMode | Bi-directional data sync |
162161

163162
## Security Protocol (3 schemas)

content/docs/references/automation/connector.mdx

Lines changed: 3 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -8,58 +8,13 @@ description: Connector protocol schemas
88
## TypeScript Usage
99

1010
```typescript
11-
import { Connector, ConnectorTrigger, DataSyncConfig } from '@objectstack/spec/automation';
12-
import type { Connector, ConnectorTrigger, DataSyncConfig } from '@objectstack/spec/automation';
11+
import { DataSyncConfig } from '@objectstack/spec/automation';
12+
import type { DataSyncConfig } from '@objectstack/spec/automation';
1313

1414
// Validate data
15-
const result = Connector.parse(data);
15+
const result = DataSyncConfig.parse(data);
1616
```
1717

18-
---
19-
20-
## Connector
21-
22-
### Properties
23-
24-
| Property | Type | Required | Description |
25-
| :--- | :--- | :--- | :--- |
26-
| **id** | `string` || Connector ID (snake_case) |
27-
| **name** | `string` || Connector name |
28-
| **description** | `string` | optional | Connector description |
29-
| **version** | `string` | optional | Connector version |
30-
| **icon** | `string` | optional | Connector icon |
31-
| **category** | `Enum<'crm' \| 'payment' \| 'communication' \| 'storage' \| 'analytics' \| 'database' \| 'marketing' \| 'accounting' \| 'hr' \| 'productivity' \| 'ecommerce' \| 'support' \| 'devtools' \| 'social' \| 'other'>` || Connector category |
32-
| **baseUrl** | `string` | optional | API base URL |
33-
| **authentication** | `{ type: Enum<'none' \| 'apiKey' \| 'basic' \| 'bearer' \| 'oauth1' \| 'oauth2' \| 'custom'>; fields?: { name: string; label: string; type: Enum<'text' \| 'password' \| 'url' \| 'select'>; description?: string; … }[]; oauth2?: object; test?: object }` || Authentication config |
34-
| **operations** | `{ id: string; name: string; description?: string; type: Enum<'read' \| 'write' \| 'delete' \| 'search' \| 'trigger' \| 'action'>; … }[]` | optional | Connector operations |
35-
| **triggers** | `{ id: string; name: string; description?: string; type: Enum<'webhook' \| 'polling' \| 'stream'>; … }[]` | optional | Connector triggers |
36-
| **rateLimit** | `{ requestsPerSecond?: number; requestsPerMinute?: number; requestsPerHour?: number }` | optional | Rate limiting |
37-
| **author** | `string` | optional | Connector author |
38-
| **documentation** | `string` | optional | Documentation URL |
39-
| **homepage** | `string` | optional | Homepage URL |
40-
| **license** | `string` | optional | License (SPDX identifier) |
41-
| **tags** | `string[]` | optional | Connector tags |
42-
| **verified** | `boolean` || Verified connector |
43-
| **metadata** | `Record<string, any>` | optional | Custom metadata |
44-
45-
46-
---
47-
48-
## ConnectorTrigger
49-
50-
### Properties
51-
52-
| Property | Type | Required | Description |
53-
| :--- | :--- | :--- | :--- |
54-
| **id** | `string` || Trigger ID (snake_case) |
55-
| **name** | `string` || Trigger name |
56-
| **description** | `string` | optional | Trigger description |
57-
| **type** | `Enum<'webhook' \| 'polling' \| 'stream'>` || Trigger mechanism |
58-
| **config** | `Record<string, any>` | optional | Trigger configuration |
59-
| **outputSchema** | `Record<string, any>` | optional | Event payload schema |
60-
| **pollingIntervalMs** | `integer` | optional | Polling interval in ms |
61-
62-
6318
---
6419

6520
## DataSyncConfig

content/docs/references/automation/index.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,5 @@ This section contains all protocol schemas for the automation layer of ObjectSta
2020
<Card href="/docs/references/automation/state-machine" title="State Machine" description="Source: packages/spec/src/automation/state-machine.zod.ts" />
2121
<Card href="/docs/references/automation/sync" title="Sync" description="Source: packages/spec/src/automation/sync.zod.ts" />
2222
<Card href="/docs/references/automation/time-relative-trigger" title="Time Relative Trigger" description="Source: packages/spec/src/automation/time-relative-trigger.zod.ts" />
23-
<Card href="/docs/references/automation/trigger-registry" title="Trigger Registry" description="Source: packages/spec/src/automation/trigger-registry.zod.ts" />
2423
<Card href="/docs/references/automation/webhook" title="Webhook" description="Source: packages/spec/src/automation/webhook.zod.ts" />
2524
</Cards>

content/docs/references/automation/meta.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"node-executor",
99
"state-machine",
1010
"time-relative-trigger",
11-
"trigger-registry",
1211
"---Integration & Data---",
1312
"bpmn-interop",
1413
"connector",

0 commit comments

Comments
 (0)