Skip to content

Commit b0e78a8

Browse files
os-zhuangclaude
andauthored
feat(spec)!: remove the dead static capabilities-descriptor cluster (#3605)
* feat(spec)!: remove the dead static capabilities-descriptor cluster (#1878 family) The "RUNTIME CAPABILITIES PROTOCOL" tail of stack.zod.ts (ObjectQL/ObjectUI/ Kernel/ObjectStack CapabilitiesSchema + the deprecated ObjectOS alias + all five types, 214 lines) had zero consumers repo-wide: never authorable (defineStack has no such key), never registered, never fed any endpoint. Worse, the fixed-boolean self-portrait lied — fieldLevelSecurity/ rowLevelSecurity/auditLogging/backgroundJobs all default(false) while live and enforced, and odataApi never existed. Real capability discovery is dynamic: GET /api/v1/discovery (declared===enforced, #3298) + the /.well-known WellKnownCapabilitiesSchema contract + driver-level Driver/DatasourceCapabilities. - Delete the cluster + the four dead stack.test.ts describe blocks + the src/index.ts explicit re-exports + two now-orphan imports (ClusterCapabilityConfigSchema/FeatureFlagSchema — both modules stay, ApiEndpointSchema remains consumed by the stack `apis` key). - api-surface: 10 exports, pure removal. No manifest keys existed; no doc page was generated for them. - Changeset (minor) carries the dead-boolean → live-discovery migration table. objectui re-exports dropped in the companion PR. Verified: 6716 spec tests green, tsc clean, check:docs/api-surface/ skill-refs/react-blocks in sync, downstream-contract typecheck clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * docs(skills): drop the removed capabilities-descriptor reference from the feature-flags example The platform skill's os:check example imported ObjectStackCapabilities to type a system.features array — the descriptor this PR removes (and which no endpoint ever served). The example now shows only the live part (FeatureFlag.create compile-checked values) and the prose points capability discovery at GET /api/v1/discovery. Caught by check:skill-examples — my repo-wide grep excluded *.md and missed TS blocks inside skill docs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent 7cf20c6 commit b0e78a8

6 files changed

Lines changed: 46 additions & 643 deletions

File tree

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
"@objectstack/spec": minor
3+
---
4+
5+
feat(spec)!: remove the dead static capabilities-descriptor cluster (`ObjectQL`/`ObjectUI`/`Kernel`/`ObjectStack`/`ObjectOS CapabilitiesSchema`) (#1878 family)
6+
7+
The "RUNTIME CAPABILITIES PROTOCOL" tail of `stack.zod.ts``ObjectQLCapabilitiesSchema`,
8+
`ObjectUICapabilitiesSchema`, `KernelCapabilitiesSchema`, `ObjectStackCapabilitiesSchema`,
9+
the deprecated `ObjectOSCapabilitiesSchema` alias, and all five inferred types — is
10+
removed. Verified zero consumers repo-wide (framework, objectui apart from bare
11+
re-exports, cloud, downstream-contract): it was never authorable (`defineStack` has
12+
no such key), never registered, and never fed any endpoint.
13+
14+
Worse than dead, it **lied**: the fixed-boolean self-portrait defaulted
15+
`fieldLevelSecurity` / `rowLevelSecurity` / `auditLogging` / `backgroundJobs` to
16+
`false` while every one of those is live and enforced on the platform, and
17+
advertised `odataApi` which has never existed. An AI reading the schema would
18+
build a systematically wrong model of the platform.
19+
20+
**Migration — runtime capability discovery is dynamic, not a static schema:**
21+
22+
| Removed | Live replacement |
23+
| --- | --- |
24+
| `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) |
25+
| `WellKnown`-style backend feature probes | `WellKnownCapabilitiesSchema` (`@objectstack/spec/api` discovery contract: `comments`/`automation`/`cron`/`search`/…) |
26+
| `ObjectQLCapabilitiesSchema` driver/query booleans | driver-level `DriverCapabilities` / `DatasourceCapabilities` (`@objectstack/spec/data`) — per-connection, resolved at runtime |
27+
| `ObjectStackCapabilitiesSchema` layer roll-up + `ObjectOS*` aliases | none — no replacement import |
28+
29+
The objectui `@object-ui/types` re-exports of these symbols are dropped in the
30+
companion objectui change. `ClusterCapabilityConfigSchema` / `FeatureFlagSchema` /
31+
`ApiEndpointSchema` (referenced by the dead cluster) are untouched — they live in
32+
their own modules and `ApiEndpointSchema` remains consumed by the stack `apis` key.

packages/spec/api-surface.json

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@
4747
"ExpressionSchema (const)",
4848
"F (const)",
4949
"GUEST_POSITION (const)",
50-
"KernelCapabilities (type)",
51-
"KernelCapabilitiesSchema (const)",
5250
"MAP_SUPPORTED_FIELDS (const)",
5351
"METADATA_ALIASES (const)",
5452
"MIGRATIONS_BY_MAJOR (const)",
@@ -67,19 +65,11 @@
6765
"ORGANIZATION_ADMIN (const)",
6866
"ORGANIZATION_ADMIN_GRANTS (const)",
6967
"ORGANIZATION_ADMIN_NO_BYPASS (const)",
70-
"ObjectOSCapabilities (type)",
71-
"ObjectOSCapabilitiesSchema (const)",
72-
"ObjectQLCapabilities (type)",
73-
"ObjectQLCapabilitiesSchema (const)",
7468
"ObjectStack (type)",
75-
"ObjectStackCapabilities (type)",
76-
"ObjectStackCapabilitiesSchema (const)",
7769
"ObjectStackDefinition (type)",
7870
"ObjectStackDefinitionInput (type)",
7971
"ObjectStackDefinitionSchema (const)",
8072
"ObjectStackSchema (const)",
81-
"ObjectUICapabilities (type)",
82-
"ObjectUICapabilitiesSchema (const)",
8373
"P (const)",
8474
"PLATFORM_CAPABILITY_PROVIDERS (const)",
8575
"PLATFORM_CAPABILITY_TOKENS (const)",

packages/spec/src/index.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,7 @@ export {
5959
ComposeStacksOptionsSchema,
6060
ConflictStrategySchema,
6161
ObjectStackDefinitionSchema,
62-
ObjectStackSchema,
63-
ObjectStackCapabilitiesSchema,
64-
ObjectQLCapabilitiesSchema,
65-
ObjectUICapabilitiesSchema,
66-
KernelCapabilitiesSchema,
67-
ObjectOSCapabilitiesSchema
62+
ObjectStackSchema
6863
} from './stack.zod';
6964

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

0 commit comments

Comments
 (0)