Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .changeset/prune-dead-capabilities-descriptor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
"@objectstack/spec": minor
---

feat(spec)!: remove the dead static capabilities-descriptor cluster (`ObjectQL`/`ObjectUI`/`Kernel`/`ObjectStack`/`ObjectOS CapabilitiesSchema`) (#1878 family)

The "RUNTIME CAPABILITIES PROTOCOL" tail of `stack.zod.ts` — `ObjectQLCapabilitiesSchema`,
`ObjectUICapabilitiesSchema`, `KernelCapabilitiesSchema`, `ObjectStackCapabilitiesSchema`,
the deprecated `ObjectOSCapabilitiesSchema` alias, and all five inferred types — is
removed. Verified zero consumers repo-wide (framework, objectui apart from bare
re-exports, cloud, downstream-contract): it was never authorable (`defineStack` has
no such key), never registered, and never fed any endpoint.

Worse than dead, it **lied**: the fixed-boolean self-portrait defaulted
`fieldLevelSecurity` / `rowLevelSecurity` / `auditLogging` / `backgroundJobs` to
`false` while every one of those is live and enforced on the platform, and
advertised `odataApi` which has never existed. An AI reading the schema would
build a systematically wrong model of the platform.

**Migration — runtime capability discovery is dynamic, not a static schema:**

| Removed | Live replacement |
| --- | --- |
| `KernelCapabilitiesSchema` booleans (`restApi`/`websockets`/`auditLogging`/…) | `GET /api/v1/discovery` — dynamic `capabilities` record with **declared === enforced** discipline (#3298: a capability is advertised only when the route is actually mounted AND the engine supports it) |
| `WellKnown`-style backend feature probes | `WellKnownCapabilitiesSchema` (`@objectstack/spec/api` discovery contract: `comments`/`automation`/`cron`/`search`/…) |
| `ObjectQLCapabilitiesSchema` driver/query booleans | driver-level `DriverCapabilities` / `DatasourceCapabilities` (`@objectstack/spec/data`) — per-connection, resolved at runtime |
| `ObjectStackCapabilitiesSchema` layer roll-up + `ObjectOS*` aliases | none — no replacement import |

The objectui `@object-ui/types` re-exports of these symbols are dropped in the
companion objectui change. `ClusterCapabilityConfigSchema` / `FeatureFlagSchema` /
`ApiEndpointSchema` (referenced by the dead cluster) are untouched — they live in
their own modules and `ApiEndpointSchema` remains consumed by the stack `apis` key.
10 changes: 0 additions & 10 deletions packages/spec/api-surface.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@
"ExpressionSchema (const)",
"F (const)",
"GUEST_POSITION (const)",
"KernelCapabilities (type)",
"KernelCapabilitiesSchema (const)",
"MAP_SUPPORTED_FIELDS (const)",
"METADATA_ALIASES (const)",
"MIGRATIONS_BY_MAJOR (const)",
Expand All @@ -67,19 +65,11 @@
"ORGANIZATION_ADMIN (const)",
"ORGANIZATION_ADMIN_GRANTS (const)",
"ORGANIZATION_ADMIN_NO_BYPASS (const)",
"ObjectOSCapabilities (type)",
"ObjectOSCapabilitiesSchema (const)",
"ObjectQLCapabilities (type)",
"ObjectQLCapabilitiesSchema (const)",
"ObjectStack (type)",
"ObjectStackCapabilities (type)",
"ObjectStackCapabilitiesSchema (const)",
"ObjectStackDefinition (type)",
"ObjectStackDefinitionInput (type)",
"ObjectStackDefinitionSchema (const)",
"ObjectStackSchema (const)",
"ObjectUICapabilities (type)",
"ObjectUICapabilitiesSchema (const)",
"P (const)",
"PLATFORM_CAPABILITY_PROVIDERS (const)",
"PLATFORM_CAPABILITY_TOKENS (const)",
Expand Down
7 changes: 1 addition & 6 deletions packages/spec/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,7 @@ export {
ComposeStacksOptionsSchema,
ConflictStrategySchema,
ObjectStackDefinitionSchema,
ObjectStackSchema,
ObjectStackCapabilitiesSchema,
ObjectQLCapabilitiesSchema,
ObjectUICapabilitiesSchema,
KernelCapabilitiesSchema,
ObjectOSCapabilitiesSchema
ObjectStackSchema
} from './stack.zod';

export type { DefineStackOptions, ComposeStacksOptions, ConflictStrategy, ObjectStackDefinitionInput } from './stack.zod';
Expand Down
Loading
Loading